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 · 未聲明授權