ai21.net
语言

Apple Liquid Glass 风格 UI 动效展示

演示视频

Apple Liquid Glass 风格 UI 动效展示 — 1

提示词

<role>
You are a senior UI motion designer and creative technologist. You build UI animations in code, frame-accurate, and render them to video yourself.
</role>

<inputs>
Style: Apple Liquid Glass. Reference platforms: iOS 26, iPadOS 26, macOS Tahoe 26.

Format: 1440x1440, 60fps, seamless loop.

Song: "Digital Clouds" by Alejandro Magaña (A. M.), from Mixkit, free under the Mixkit License. If the file is not attached, ask me for it and nothing else.

Tempo: about 120 BPM, 8 bars, and something happens on every beat. Measure the real tempo from the file. If it differs from 120, keep the beat map in beats and derive every time from the measured grid.

Palette: light mode system materials.
- Labels: #1D1D1F. Secondary labels: #6E6E73. Opaque surfaces: white.
- One accent, #0A84FF, used only for on, active and selected states.
- The Dynamic Island is the only pure-black element.

Canvas: a macOS Tahoe style wallpaper.
- Large, soft color fields: deep blue #1B3A8C, teal #2BB3B1, violet #7B5CFF, and a warm peach highlight #FFB38A.
- Slow parallax drift: 12px per bar at most.
- Saturated enough that the glass visibly refracts it, calm enough to sit behind text.

Font: SF Pro Display for 20px and above, SF Pro Text below 20px, if installed locally. Otherwise use Inter from Fontsource: 600 for titles, 500 for labels, 400 for body. Use -1% tracking at display sizes and tabular numbers for any number that changes.

Icons: one SF Symbols-like set drawn as SVG, medium weight matched to the adjacent text, one consistent optical size per state. Symbols needed: play, pause, speaker with 3 waves, house, heart, chart bars, person, magnifier, note, checkmark.

Pointer: an iPadOS adaptive pointer.
- A 22px translucent gray circle (#8E8E93 at 45%).
- It snaps (magnetism) into any control it hovers and becomes that control's highlight shape.
- It becomes an I-beam in text fields.
- It shrinks 10% on press.
</inputs>

<direction>
Apple keynote and WWDC Liquid Glass session-level UI motion. One element, never cut. Every state is the same element morphing its size, corner radius, material and color, while its content swaps with a short blur. The pointer drives every change with real clicks, holds and drags.

Material:
- Liquid Glass is a lens, not frosted plastic. It refracts the wallpaper, and the bending is strongest at the rim.
- Light frosting and a 10–16% white tint.
- A 1px specular rim lit from the top-left, with a fainter counter-highlight bottom-right. The highlight shifts as the element moves.
- A soft contact shadow: 0 10 30 at 12% black.
- Glass never sits on glass. Content on glass uses vibrant or solid fills.
- Corners are concentric: inner radius = outer radius − padding.
- When glass shapes split or merge, they join like droplets (smooth union), never crossfade.

Motion language:
- Apple-like springs everywhere:
- Morphs: response 0.45, damping 0.86.
- Presses: response 0.25, damping 0.72.
- Pointer snap: response 0.3, damping 0.9.
- Overshoot is at most 3%.
- On press, glass lifts and swells (scale 1.06–1.12, brighter rim). It never shrinks.
- A toggle knob on hold turns into a clear, enlarged glass lens that stretches in its direction of travel.
- The tab bar selection is a glass droplet that magnifies the icons under it while dragged.
- Sliders thicken when grabbed and rubber-band past their limits.

Camera:
- Each state fills about 60% of the frame, and the wallpaper is always visible around the glass.
- Camera moves use response 0.6, damping 1.0.
- The wallpaper scales at 70% of the camera zoom for depth.

The last frame is the first frame, pointer position and velocity included.

Banned: bouncy or elastic easing, overshoot over 3%, particle bursts, neon glows, colored gradients on UI chrome (the glass specular rim is the only gradient), heavy drop shadows, glass on glass, mismatched corner radii, mismatched icon weights, emoji, crossfades between states, dead time longer than half a beat, anything that looks like a template or a Dribbble clone.
</direction>

<structure>
120 BPM, 8 bars, 32 beats. Beat map, one line per beat:

1. A glass capsule button "Continue" floats on the wallpaper. The pointer glides in.
2. The pointer snaps into the button and becomes its highlight.
3. Click: the glass lifts and swells, the rim brightens.
4. The capsule contracts into a circle and becomes a spinning activity ring.
5. The ring completes, filling in accent.
6. It morphs into a checkmark that draws itself.
7. The circle stretches into a black Dynamic Island, compact: album art on the left, a live waveform on the right.
8. Click: the island expands into Now Playing ("Digital Clouds", "A. M.", progress 0:42 / 1:41).
9. Click play: the play icon morphs into pause, with a path morph rather than a swap.
10. Grab the progress bar: it thickens, and the time labels shift out of the way.
11. Scrub forward with direct manipulation. The time counts in tabular numbers.
12. Release: the bar springs thin, and playback continues from the new position.
13. The island dissolves into a glass volume slider with a speaker icon.
14. Drag up: the fill follows the pointer, and the speaker waves appear one by one.
15. Drag past max: the whole slider rubber-bands and stretches, leading edge first.
16. Release: it springs back to its length at 100%.
17. The slider morphs into a toggle (track plus knob), off. Its label is "Focus".
18. Hold: the knob turns into a clear, enlarged glass lens that shows the track through it.
19. Flip on the beat: the lens stretches in its travel direction, and the track fills with accent.
20. The knob detaches as a droplet and becomes the selection lens of a floating glass tab bar with 4 tabs: Home, Health, Activity, Profile.
21. Drag the lens across the tabs. The leading edge stretches ahead of the trailing edge, and the icons magnify under the lens.
22. The lens settles on "Activity", and its icon turns accent.
23. The tab bar grows upward into a glass widget card titled "Activity", with concentric radii.
24. A 7-day bar chart (M T W T F S S) rises in a left-to-right stagger.
25. Hover Thursday: a glass tooltip bubble shows "8,412 steps", anchored to the bar.
26. Hover Friday: the tooltip slides over and counts to "11,036 steps".
27. ⌘Space: the card collapses into a Tahoe Spotlight bar with a magnifier icon.
28. Type "ne": the results list filters (New Note, Network, News), and rows spring in and out.
29. Type "w": "New Note" rises to the top as a selected accent row.
30. Enter: the row presses and lifts.
31. The Spotlight bar drops into a glass notification banner from the top: a Notes icon, "Note created", "now".
32. The banner contracts back into the "Continue" capsule. The pointer returns to its frame-1 position and velocity.
</structure>

<build>
1. One HTML file at 1440x1440. Everything is computed from time inside seek(t): no CSS transitions, no timers, no state carried between frames.

2. Springs are closed-form damped step responses with Apple parameters: ω = 2π/response, ζ = dampingFraction.
- A value that is retargeted many times is the sum of one spring per retarget, so it stays a pure function of time.
- Releases start from the current value and the current velocity.

3. Asymmetric edges: the tab lens, the toggle knob and the slider stretch each have their leading edge on response 0.28 and their trailing edge on response 0.42.

4. Drags are direct manipulation.
- While held, the value is a function of pointer position, with rubber-banding past limits: offset = limit + (1 − 1/(x·0.55/d + 1))·d.
- On release it springs back from wherever it was.

5. Glass is rendered in a WebGL2 pass, not with CSS backdrop-filter:
- The wallpaper is drawn to a texture with a precomputed blurred mip chain.
- Every glass shape is a rounded-rect SDF. Merging and splitting use smooth-min with k = 24px.
- Refraction offsets the sample along the SDF gradient. The offset is strongest within 14px of the edge and scaled by lens thickness.
- Frost is a mip-level bias.
- Chromatic aberration is at most 1px, at the rim only.
- The specular rim comes from the SDF normal against a top-left light.
- The Dynamic Island is an opaque SDF in the same pass.
- Text, icons, charts and the pointer are crisp SVG/DOM layers above the canvas, under the same camera matrix.

6. Content swaps inside a morphing container:
- Exit takes 120ms: blur 6px, scale 0.96, fade.
- Enter starts 60ms later with its own spring.
- Exit and enter text never overlap.

7. Audio:
- Analyze the song with numpy (onset envelope plus autocorrelation) for the beat grid, and start on a measured downbeat.
- Synthesize Apple-subtle UI sounds with numpy: soft taps for clicks, ticks for scrub detents, a low detent at max volume, a keyboard click per typed letter, and a gentle two-note chime for the notification.
- Place each sound on its measured peak, mixed about 18dB under the track.

8. Render with Playwright at 1440x1440 with 4 subframes per frame (240fps).
- Blend to 60fps with ffmpeg: tmix=frames=4, select='not(mod(n\,4))', setpts=N/60/TB.
- Encode H.264 yuv420p, crf 16, with AAC 192k and faststart.

9. Before the full render, render one still per beat (32) as a contact sheet. Fix anything off the grid, cramped, illegible over the wallpaper, or with non-concentric radii.
</build>

<gotchas>
- The glass and the DOM layers must share one camera matrix per frame, or the content drifts off its glass.
- Glass over a bright wallpaper patch kills legibility. Add an adaptive dim under the text based on sampled wallpaper luminance, rather than a heavier tint.
- The Dynamic Island is never glass.
- Icons crossing a morph keep their optical size. Scale the container, not the glyphs.
- The tooltip stays anchored to its bar through the camera move, not to the screen.
- Typed characters in Spotlight enter with the pointer's I-beam; the caret blinks on half-beats.
- Never put will-change on anything the camera scales, or text renders blurry.
- Make the last frame identical to the first, pointer included, or the loop stutters.
</gotchas>

<start>
If the song file is missing, ask for it. Then measure the BPM and the downbeat, and show me the beat map as a table (beat, time, state, pointer action, sound), snapped to the measured grid, before writing any code. Wait for my OK.
</start>

中文译文

<role>
你是一位资深 UI 动效设计师兼创意技术专家。你用代码构建 UI 动画,做到帧级精确,并自行将其渲染为视频。
</role>

<inputs>
风格:Apple Liquid Glass。参考平台:iOS 26、iPadOS 26、macOS Tahoe 26。

规格:1440x1440,60fps,无缝循环。

歌曲:Alejandro Magaña (A. M.) 的 "Digital Clouds",来自 Mixkit,依据 Mixkit License 免费使用。如果文件没有附上,就向我要,别的什么都不要问。

速度:约 120 BPM,8 小节,每一拍都要有事情发生。从文件中测量真实速度。如果它与 120 不同,就让节拍图仍以拍为单位,并从实测网格推导每一个时间点。

调色板:浅色模式的系统材质。
- 标签:#1D1D1F。次级标签:#6E6E73。不透明表面:白色。
- 一个强调色 #0A84FF,仅用于开启、激活和选中状态。
- 灵动岛是唯一的纯黑元素。

画布:一张 macOS Tahoe 风格的壁纸。
- 大块柔和的色域:深蓝 #1B3A8C、青绿 #2BB3B1、紫罗兰 #7B5CFF,以及暖桃色高光 #FFB38A。
- 缓慢的视差漂移:每小节最多 12px。
- 饱和度要足以让玻璃产生可见的折射,又要足够平静,能待在文字后方。

字体:如果本地已安装,20px 及以上用 SF Pro Display,20px 以下用 SF Pro Text。否则使用 Fontsource 的 Inter:标题 600,标签 500,正文 400。在展示字号下使用 -1% 字距,任何会变化的数字都使用等宽数字。

图标:一套类似 SF Symbols 的图标,以 SVG 绘制,字重为 medium 并与相邻文字匹配,每个状态使用一致的光学尺寸。需要的符号:播放、暂停、带 3 道声波的扬声器、房子、爱心、柱状图、人物、放大镜、音符、对勾。

指针:iPadOS 自适应指针。
- 一个 22px 的半透明灰色圆形(#8E8E93,45% 不透明度)。
- 它会在悬停任何控件时吸附(磁吸)进去,并变成该控件的高亮形状。
- 在文本输入框中变成 I 型光标。
- 按下时缩小 10%。
</inputs>

<direction>
Apple 主题演讲与 WWDC 液态玻璃专场级别的 UI 动效。单一元素,全程不切镜。每个状态都是同一个元素在形变:改变尺寸、圆角半径、材质和颜色,同时其内容以一次短促的模糊完成替换。指针通过真实的点击、按住和拖拽驱动每一次变化。

材质:
- 液态玻璃是透镜,不是磨砂塑料。它折射壁纸,弯折在边缘处最强。
- 轻微磨砂,加 10–16% 的白色着色。
- 1px 的镜面高光边缘,光源来自左上;右下有更微弱的反向高光。高光随元素移动而位移。
- 柔和的接触阴影:0 10 30,12% 黑。
- 玻璃绝不叠在玻璃上。玻璃上的内容使用鲜艳填充或实色填充。
- 圆角是同心的:内半径 = 外半径 − 内边距。
- 当玻璃形状分裂或合并时,它们像液滴一样接合(平滑并集),绝不交叉淡入淡出。

动效语言:
- 到处都用类 Apple 的弹簧:
- 形变:response 0.45,damping 0.86。
- 按压:response 0.25,damping 0.72。
- 指针吸附:response 0.3,damping 0.9。
- 过冲最多 3%。
- 按下时,玻璃抬起并膨胀(缩放 1.06–1.12,边缘更亮)。它绝不缩小。
- 按住开关旋钮时,它会变成一枚通透、放大的玻璃透镜,并沿其运动方向拉伸。
- 标签栏的选中项是一枚玻璃液滴,拖拽时会放大其下方的图标。
- 滑块被抓住时变粗,越过限制时呈现橡皮筋效果。

镜头:
- 每个状态占据画面约 60%,玻璃周围始终可见壁纸。
- 镜头运动使用 response 0.6,damping 1.0。
- 壁纸以镜头缩放的 70% 进行缩放,以营造纵深。

最后一帧就是第一帧,包括指针位置和速度。

禁止:弹跳或弹性缓动、超过 3% 的过冲、粒子爆发、霓虹辉光、UI 外壳上的彩色渐变(玻璃的镜面边缘是唯一的渐变)、厚重的投影、玻璃叠玻璃、不一致的圆角半径、不一致的图标字重、emoji、状态之间的交叉淡入淡出、超过半拍的空耗时间,以及任何看起来像模板或 Dribbble 翻版的东西。
</direction>

<structure>
120 BPM,8 小节,32 拍。节拍图,每拍一行:

1. 一个玻璃胶囊按钮 "Continue" 漂浮在壁纸上。指针滑入。
2. 指针吸附进按钮,成为它的高亮。
3. 点击:玻璃抬起并膨胀,边缘变亮。
4. 胶囊收缩成圆形,变成一个旋转的活动圆环。
5. 圆环走完,以强调色填充。
6. 它形变成一个自行绘制的对勾。
7. 圆形拉伸成黑色的灵动岛,紧凑态:左侧是专辑封面,右侧是实时波形。
8. 点击:灵动岛展开为正在播放("Digital Clouds"、"A. M.",进度 0:42 / 1:41)。
9. 点击播放:播放图标形变为暂停,采用路径形变而非直接替换。
10. 抓住进度条:它变粗,时间标签移开让位。
11. 用直接操控向前拖动。时间以等宽数字计数。
12. 松开:进度条弹回细条,播放从新位置继续。
13. 灵动岛溶解成一条带扬声器图标的玻璃音量滑块。
14. 向上拖动:填充跟随指针,扬声器声波逐条出现。
15. 拖过最大值:整个滑块呈现橡皮筋效果并拉伸,前缘先行。
16. 松开:它弹回 100% 时对应的长度。
17. 滑块形变为一个开关(轨道加旋钮),处于关闭状态。它的标签是 "Focus"。
18. 按住:旋钮变成一枚通透、放大的玻璃透镜,可透过它看到轨道。
19. 在拍点上翻转开启:透镜沿其运动方向拉伸,轨道填充强调色。
20. 旋钮作为液滴脱离,变成带 4 个标签的浮动玻璃标签栏的选中透镜:Home、Health、Activity、Profile。
21. 将透镜拖过各个标签。前缘拉伸超出后缘,图标在透镜下方放大。
22. 透镜停在 "Activity" 上,其图标变为强调色。
23. 标签栏向上生长成一张玻璃小组件卡片,标题为 "Activity",圆角同心。
24. 一张 7 天柱状图(M T W T F S S)从左到右错峰升起。
25. 悬停周四:一个玻璃气泡提示显示 "8,412 steps",锚定在该柱上。
26. 悬停周五:气泡提示滑过去,数字计数到 "11,036 steps"。
27. ⌘Space:卡片收拢成一条带放大镜图标的 Tahoe Spotlight 栏。
28. 输入 "ne":结果列表过滤(New Note、Network、News),行以弹簧效果弹入弹出。
29. 输入 "w":"New Note" 升至顶部,成为选中的强调色行。
30. 回车:该行被按下并抬起。
31. Spotlight 栏从顶部落下,变成一条玻璃通知横幅:一个 Notes 图标、"Note created"、"now"。
32. 横幅收缩回 "Continue" 胶囊。指针回到它在第 1 帧的位置和速度。
</structure>

<build>
1. 一个 1440x1440 的 HTML 文件。一切都由 seek(t) 内的时间计算得出:没有 CSS 过渡,没有计时器,帧与帧之间不携带状态。

2. 弹簧是闭式阻尼阶跃响应,使用 Apple 参数:ω = 2π/response,ζ = dampingFraction。
- 被多次重设目标的值,等于每次重设目标各一个弹簧之和,因此它始终是时间的纯函数。
- 释放从当前值和当前速度开始。

3. 非对称边缘:标签透镜、开关旋钮和滑块拉伸各自的前缘使用 response 0.28,后缘使用 response 0.42。

4. 拖拽是直接操控。
- 按住期间,值是指针位置的函数,越过限制时呈现橡皮筋效果:offset = limit + (1 − 1/(x·0.55/d + 1))·d。
- 松开时,它从当时所在的位置弹回。

5. 玻璃在 WebGL2 通道中渲染,而不是使用 CSS backdrop-filter:
- 壁纸被绘制到一张纹理上,附带预先计算好的模糊 mip 链。
- 每个玻璃形状都是圆角矩形 SDF。合并与分裂使用 k = 24px 的 smooth-min。
- 折射沿 SDF 梯度偏移采样点。偏移在距边缘 14px 以内最强,并按透镜厚度缩放。
- 磨砂是 mip 层级偏置。
- 色差最多 1px,且只在边缘处。
- 镜面边缘光由 SDF 法线对左上方光源计算得出。
- 灵动岛是同一通道中的不透明 SDF。
- 文字、图标、图表和指针是位于画布之上的清晰 SVG/DOM 图层,处于同一相机矩阵之下。

6. 内容在形变容器内部完成替换:
- 退出耗时 120ms:模糊 6px,缩放 0.96,淡出。
- 进入在 60ms 之后开始,使用它自己的弹簧。
- 退出与进入的文字绝不重叠。

7. 音频:
- 用 numpy 分析歌曲(起音包络加自相关)以得到节拍网格,并从实测的强拍开始。
- 用 numpy 合成 Apple 式细微的 UI 音效:点击的轻柔敲击、拖动档位的咔哒声、最大音量处的低沉档位声、每敲一个字母的键盘声,以及通知的柔和双音提示。
- 把每个音效放在其测得的峰值上,混音比音轨低约 18dB。

8. 用 Playwright 以 1440x1440 渲染,每帧 4 个子帧(240fps)。
- 用 ffmpeg 混合到 60fps:tmix=frames=4, select='not(mod(n\,4))', setpts=N/60/TB。
- 编码 H.264 yuv420p、crf 16,音频 AAC 192k,并启用 faststart。

9. 在完整渲染之前,先为每一拍渲染一张静帧(32 张)作为联系表。修正任何脱离网格、拥挤、在壁纸上不可读或圆角不同心的地方。
</build>

<gotchas>
- 玻璃与 DOM 图层必须在每一帧共享同一个相机矩阵,否则内容会飘离它所在的玻璃。
- 玻璃压在壁纸的明亮区块上会毁掉可读性。根据采样到的壁纸亮度,在文字下方加入自适应压暗,而不是加重着色。
- 灵动岛永远不是玻璃。
- 跨越形变的图标保持其光学尺寸。缩放容器,而不是字形。
- 气泡提示在镜头运动过程中始终锚定在其柱子上,而不是锚定在屏幕上。
- Spotlight 中键入的字符随指针的 I 型光标一起进入;光标在半拍上闪烁。
- 绝不要在相机会缩放的任何对象上使用 will-change,否则文字会渲染模糊。
- 让最后一帧与第一帧完全相同,包括指针,否则循环会卡顿。
</gotchas>

<start>
如果歌曲文件缺失,向我要。然后测量 BPM 和强拍,并在写任何代码之前,把节拍图以表格形式(拍、时间、状态、指针动作、声音)展示给我,对齐到实测网格。等我的确认。
</start>

溯源

原作者
motion_conquest
发布日期
2026-09-25(由推文 ID 反解)
原始出处
查看原帖 ↗
收录来源
zhuyansen/awesome-opus-5.5-video · 2103510103622308152 · 未声明许可