{"summary":"AI 画像生成の単調なスピナーを9種のプロシージャルな呼吸ドットに置き換え、エッジ屈折と色収差を備えた9種の出現トランジションと自在に組み合わせてリアルタイム調整できます。","notes":"<p>AI 画像生成には数秒からそれ以上の待ち時間が伴います。空のフレーム中央にスピナーを1つ置くだけでは待ち時間が退屈に感じられ、完成後にいきなり元画像へ切り替えると繋がりも唐突になります。待機から出現までをひと続きの体験として設計しましょう。生成中はフレーム内に関数で呼吸するドットグリッドを敷き、その上に光が走るステータステキストを添え、画像の準備が整ったらドットの中からそのまま浮かび上がらせて定着させることで、前後の流れが自然に繋がります。</p>\n        <h2>待機：呼吸するドットグリッド</h2>\n        <p>画像が届くまでの間、フレーム内にはデフォルト 20px 間隔で正方ドットグリッドを配置し、各ドットの半径と不透明度を中心座標から関数でリアルタイムに算出して、四隅を柔らかなビネットで引き締めます。ダークモードでは点灯したドットが淡いハローをまとい、フレーム外周には互いに逆回転しながら呼吸する内外2層のエッジグローが重なります。9種の待機パターンは3系統に分かれます。</p>\n        <ul>\n        <li><strong>ノイズ系：</strong>fBm breath は4オクターブのフラクタルノイズを重ねて雲のようにゆったり明滅し、他パターンの土台にもなります。Domain warp はノイズで別のノイズを押し流しながら一方向へドリフトさせ、煙がたなびくような動きを描きます。</li>\n        <li><strong>幾何学系：</strong>Ripple は中央から同心円の波紋を広げ、Spiral arms は3本の渦巻き腕を回転させ、Sine plasma は4組の正弦波を干渉させます。Light band は 3.3 秒ごとに柔らかな光の帯を斜めに走らせ、Double helix はフレームを横断する二重らせんと鎖間の結合線を描いて回転し、Snowflakes は六角の枝を持つ雪の結晶を単ドットの粉雪とともにゆっくり回転させながら舞い降ろします（小さなフレームでも枝ぶりが潰れないよう、1本の腕に最低4ドット分の長さを確保します）。いずれも淡いノイズを混ぜてドットごとに微細な輝度差を残し、「生成中」らしい有機的な表情を持たせています。</li>\n        <li><strong>ランダム系：</strong>Static grain は各ドットを固有の位相でランダムな輝度間を滑らかに補間（毎秒約 2.5 回変化）させ、激しいちらつきを抑えつつブラウン管テレビの砂嵐に近い質感を作ります。</li>\n        </ul>\n        <h2>出現：9種のトランジション</h2>\n        <p>各待機パターンにはデフォルトで対になる出現トランジションがありますが、どのパターンとトランジションも自由に組み合わせ可能です。なかでも Halftone・Dissolve・Denoise・Cells はどの待機表現とも相性よく馴染みます。</p>\n        <table>\n        <thead><tr><th>トランジション</th><th>標準ペアの待機パターン</th><th>現れ方</th></tr></thead>\n        <tbody>\n        <tr><td>Fisheye（魚眼）</td><td>Ripple</td><td>中央から円形領域が広がり、魚眼レンズのように膨らんだ内部映像が拡大とともにフラットへ戻る</td></tr>\n        <tr><td>Halftone（網点拡大）</td><td>fBm breath</td><td>各ドットが対応領域の平均色を帯びて接するまで膨らみ、後半でボケた状態からシャープに結像する</td></tr>\n        <tr><td>Unzip（開き）</td><td>Double helix</td><td>水平の中央線から上下へ波打ちながら開き、らせん状に揺れていた縁が最後に真っすぐ整う</td></tr>\n        <tr><td>Denoise（ノイズ除去）</td><td>Static grain</td><td>強いぼかしの上に毎秒24回更新される動的グレインを重ね、逆拡散のようにノイズが晴れていく</td></tr>\n        <tr><td>Spiral（スパイラル）</td><td>Spiral arms</td><td>1本の渦巻き腕がフレーム中央から回転しながら画像を掃き出す</td></tr>\n        <tr><td>Dissolve（ディゾルブ）</td><td>Domain warp</td><td>滑らかなノイズマップに沿ってひとかたまりずつ柔らかく溶け出し、境界が自然に馴染む</td></tr>\n        <tr><td>Interference（干渉）</td><td>Sine plasma</td><td>流れ続ける4組の正弦波干渉フィールドをそのまましきい値として画像を浮かび上がらせる</td></tr>\n        <tr><td>Stream（順次ストリーム）</td><td>Light band</td><td>上から下へ1行ずつ進み、先端の直上に 2px から 16px へ粗くなるブロック帯を残して段階読込を表現する</td></tr>\n        <tr><td>Cells（セル開花）</td><td>Snowflakes</td><td>Voronoi セルで領域を分割し、前半のランダムなタイミングで各セルの中心から円形にほころび開く</td></tr>\n        </tbody>\n        </table>\n        <p>さらに Halftone・Denoise・Cells では、出現時に中央から外側へショックウェーブのリングが走り、リング外周をわずかに引き伸ばし内側を引き締めつつ、すでに現れた画像領域にだけ控えめな4色の柔らかな光を添えます（未表示のドットは一切照らしません）。</p>\n        <h2>すべての出現トランジションに共通する細部</h2>\n        <ul>\n        <li><strong>拡大とソフトフォーカスからの定着：</strong>出現はデフォルト 1.4 秒で、立ち上がりが速く余韻の長いイージングで進みます。画像は 10% 拡大かつわずかにボケた状態から入り、等倍・シャープな状態へと落ち着きます（独自のボケ遷移を持つ Halftone と Denoise では重複適用しません）。フレーム自体は静止したままです。</li>\n        <li><strong>エッジのガラス屈折：</strong>フレーム内側 26px の領域が面取りガラスのように働き、端の画素を内側へサンプリングしてわずかに引き伸ばします（最も端でデフォルト最大 12px）。出現境界の内側 20px にも微細に揺らぐ屈折が入り、終盤でフラットに収まります。</li>\n        <li><strong>歪みに連動する色収差：</strong>屈折による画素のずれが生じた箇所でのみ、赤・青チャンネルのサンプリング位置を ±30% ずらします。静止した平坦な部分では一切色割れさせず、出現境界にも虹色の縁取りは描かず細い白のハイライト線だけを添えます。</li>\n        <li><strong>デコードとタイミング制御：</strong>画像のデコード完了（<code>image.decode()</code>）を待ってからトランジションを開始します。<a href=\"/ja/017-loading-states/\">017 4つのローディング表現の使い分けと体験設計</a> の原則に倣い、300ms 以内に返った画像は一瞬のちらつきを防ぐためドットを出さず直接フェードインさせます。3×3 グリッドなど複数枚を並べて生成する場合は不均等な遅延で時間差をつけて出現させ、失敗時はドットをその場で止めて理由と再試行導線を提示します。</li>\n        </ul>\n        <h2>パフォーマンスとリアルタイム調整</h2>\n        <p>各ドットの輝度はあらかじめ「1ドット1ピクセル」の小さなテクスチャへ書き込み、フルサイズ描画時はそれを読み取るだけに留めることで、画面の全ピクセルでノイズを計算する負荷を避けています。変化しないディゾルブマスクも初期化時にハーフサイズで1度だけ描画して使い回します。キャンバスは画像フレームのみを覆い、ピクセル密度は最大 2× に制限してビューポート外では描画を停止。画像が完全に定着したら最終フレームを描いた時点でループを止め、静止時の GPU 負荷をゼロにします。OS の「視差効果を減らす」が有効な場合は、呼吸・拡大・屈折・色収差・ショックウェーブをすべてオフにし、静止ドットと 200ms のフェードインへ切り替えることを推奨します。</p>\n        <p>呼吸速度、出現時間、ドット間隔、ドットサイズ、ノイズスケール、拡大率、ぼかし、色収差、エッジ屈折、ダークモードのグローはすべてスライダーとして開放しており、パターンごとに初期値を保持します。各行のダブルクリックまたはリセットボタンでいつでも初期値へ戻せます。</p>\n        <h2>AI に任せる</h2>\n        <p>下の Prompt は、プロジェクト既存の画像生成フローと描画技術スタックを整理したうえで、適用箇所・待機パターンとトランジションの組み合わせ・調整パネルの公開範囲を1つずつ確認します。承認後、プラットフォームの描画機能に合わせて非 GPU 環境向けのフォールバック込みで実装し、既存のレイアウト・配色・文言はそのまま保ちます。</p>","prompt":"Build the wait and the arrival for generated images in my product. While an image is being made, its box shows a grid of dots that breathe in one of nine loading patterns, under a status line with a moving sheen. When the image is ready it comes in through the dots in one of nine reveals, enlarged and soft at first and settling sharp, its edges bending like glass, with a colour split where the picture bends; three of the reveals also send a shockwave across it. Any pattern can be paired with any reveal. A settings panel shows the key numbers as sliders, set to the defaults below, so they can be tuned live.\n\nEvery value here comes from a working demo and is a default, not a requirement. Build it with these values first, then let me tune them with the panel (section 9).\n\nBefore building, look at my project (section 0) and ask me these, one at a time, with the recommended answer marked:\n1. Where it goes: every place a generated image appears (recommended; list them), or the ones I name.\n2. Which pattern and reveal: one pair everywhere (recommended: fBm breath with Halftone grow, or let me pick from section 3 and 5), a pair per place, or a different pair for each new image.\n3. The settings panel: only in development (recommended), behind a toggle, or for everyone.\nThen sum up my answers, say how you will build it on my platform (section 10), and wait for my go-ahead.\n\n0. Start from what exists\n- Find how images are generated and shown: where a request starts, where the result arrives (URL, blob, base64 or stream), whether progress or a partial image is reported, and the component that draws the image box.\n- Find how the project draws (DOM, canvas, WebGL, a native view tree), its framework and versions, its slider components, its dark mode and its reduced-motion setting.\n- Tell me in a few lines what you found before asking.\n\n1. Timing\n- The pass: the dots fade in over 500ms; the status line reads \"Making the first draft…\", then \"Refining the details…\" after 1.3s, and \"Done\" once the image is decoded and starts to come in. Use my product's own wording and language if it has some.\n- The reveal starts when the image is decoded (await image.decode() or its equivalent), never on the network response alone. It runs 1400ms with cubic-bezier(0.16, 1, 0.3, 1): fast in, a long settle. Call its progress R, 0 to 1, eased.\n- If the image is ready within 300ms of the request, skip the dots and just fade it in, or the loading state flashes. If the request fails, stop the dots where they are, say what happened and offer a retry.\n- Several images at once (a batch or a grid): each comes in after its own delay, picked unevenly, for example 0, 560, 220, 820, 380, 1040, 120, 700, 300ms across a 3 x 3 grid, so they arrive at uneven moments rather than together or as a sweep.\n\n2. The box and the dots\n- The image box has the image's own proportions and rounded corners (14px in a 600 x 772 card, the card 28px, concentric). Above it sits the status line, 20px type, in a dim ink; a 96px window of full ink, soft at both ends, crosses the text every 1.7s. Move the window and a copy of the text inside it in opposite directions as transforms, so the text never repaints.\n- Dots on a square grid, pitch 20px, centred in the box. Each dot's value v (0 to 1) comes from its loading pattern (section 3), worked out once per dot, not per pixel. The dot's radius goes from 0.55px to 15% of the pitch with v, its opacity from 0.1 to 1. A vignette dims the dots near the box's edge: 0.45 + 0.55 * smoothstep(8, 72, distance to the edge).\n- Dot glow (dark theme only): a soft halo round each lit dot, a Gaussian of sigma 0.3 * pitch, strength v^2, summed over the dot's own cell and its eight neighbours so halos cross cells without a seam.\n- Edge glow while loading (dark theme only), in two layers set apart so they never swell together. Outer: a wide haze (exp(-d / 12)) and a thin line on the rim (exp(-d / 2.5)), d the distance in from the box's edge, breathing every 2.4s, with two brighter arcs turning clockwise once in 8s. Inner: a soft band about 6px in (a Gaussian 3.5px wide) plus a faint wide haze, breathing every 3.7s from the opposite point of its swell, with three arcs turning anticlockwise once in 11s. Both fade out over the first third of the reveal.\n- Light theme: dark dots on a pale box, no glows, a softer rim on the reveals.\n\n3. The nine loading patterns\nAll take p, the dot's centre in px, and t, the breathing clock in seconds (scaled by the Breathing slider, so changing speed never jumps). n is value noise in fBm: four octaves, each at twice the frequency and half the amplitude, read at p / scale (scale 180px) and t * 0.32.\n- Ripple: rings from the centre, w = 0.5 + 0.5 * sin(r * 5.2 * PI / 2 - 2.6t), r = |p - centre| / scale; v = smoothstep(0.15, 0.85, mix(n, w, 0.6) * (0.55 + 0.6n)).\n- fBm breath: v = smoothstep(0.28, 0.74, n). The base the others build on.\n- Double helix: two strands lying across the box and turning, y = ±72 * sin(x / 44 - 1.8t) (in units of the box's height / 306), each a Gaussian 10 wide, the nearer one brighter (by cos of the phase), with base pairs on every second column between them.\n- Static grain: each dot eases from one random level to the next about 2.5 times a second, on its own offset, mixed 42% over n. Ease between levels (smoothstep), or it blinks.\n- Spiral arms: three arms, s = 0.5 + 0.5 * sin(3θ + 5.5r - 2.2t); v = smoothstep(0.12, 0.85, mix(n, s, 0.55) * (0.6 + 0.5n)).\n- Domain warp: the noise read at a point pushed far by more noise, the whole drifting one way so it streams like smoke: drift = (0.22t, -0.1t); w = (fbm(q * 1.1 + drift), fbm(q * 1.1 + drift + 5.2)); v = smoothstep(0.34, 0.7, fbm(q + 4(w - 0.5) + 1.6 drift)).\n- Sine plasma: four sines summed, sin(2.6x + 0.9t) + sin(3.1y - 1.1t) + sin(2.2(x + y) + 0.7t) + sin(4.4r - 1.5t), x, y in noise cells; v = smoothstep(0.2, 0.8, mix(0.5 + 0.125 * sum, n, 0.35)).\n- Light band: a Gaussian band, 0.15 wide, sweeping diagonally across every 3.3s over half-strength noise.\n- Snowflakes: six-armed flakes, each arm with a branch at half its length, one to a square of side z = max(0.27 * box height, 11 * pitch), placed at random in it, with an arm 0.37 to 0.5 z long, turning slowly as they fall (18px/s) with a little sway; behind them single-dot snow, one grain to a square of 0.4z, falling twice as fast at 35 to 60% brightness; noise at 12% beneath. Fold the angle into one twelfth of a turn so one arm and its branch, drawn once, make all six. Keep a flake's arm at least four dots long, or it reads as a blob.\n\n4. How every image comes in\nThese apply to all nine reveals.\n- Zoom in: the picture is read about the box's centre at 1 + 0.10 * (1 - R), so it arrives 10% enlarged and settles to its own size. The box itself never scales.\n- Blur in: read the picture 3 mip levels softer at the start, easing to sharp: bias = 3 * (1 - R)^0.8. Halftone and Denoise blur on their own; skip it there.\n- Edge bend: the box's rounded edge acts like the bevel of a glass slab. In the last 26px, read the picture from further in by bend * 2 * (1 - R)^0.7 * (1 - d / 26)^2 px (bend 6), so it stretches toward the edge; the edge itself stays put. Along a reveal's own front, the 20px just inside it bend the same way, by bend * exp(-(d / 14)^2), with a slow noise wobble of ±67% along the front, fading out as R passes 0.85.\n- Dispersion: wherever the picture is read from a moved place, read red from 30% further along the move and blue from 30% less. Colour then splits only where the picture bends, never where it holds still. Do not draw a coloured outline on the edge; the split belongs to the picture.\n- A thin white line rides each front (strength 0.55 on dark, 0.22 on light), fading as R passes 0.85.\n\n5. The nine reveals\nEach opens the picture over the dots by a mask a; R is the eased progress.\n- Fisheye lens: a circle grows from the centre to cover the box (front = 1.3R - 0.1 of the half-diagonal). Inside, the picture bulges like a fisheye (read at centre + d * (1 - k + k * u^2), u = distance / front, k = 0.5(1 - R)), a damped wave runs behind the edge, and red and blue split toward the rim; all of it relaxes to flat.\n- Halftone grow: each dot takes the picture's colour averaged over its cell and swells to half the pitch, until the circles touch; then the picture focuses in from 4.5 mip levels soft over the second half.\n- Unzip: opens from the middle outward, |y| < R * (half height + 30px) + 22 * sin(x / 44 - 1.8t) * (1 - R) (the wave in the helix's units, box height / 306), so its edges wave with the strands until they settle straight.\n- Denoise: the picture from 6 mip levels soft to sharp, (1 - R)^1.4, under 1.5px grain of ±45% * (1 - R)^2 that refreshes 24 times a second: diffusion run backwards.\n- Spiral wipe: one arm sweeps out from the centre: key = 0.72 * r / half-diagonal + 0.28 * angle / 2PI; open where key < 1.12R - 0.06.\n- Noise dissolve: a smooth two-octave noise map, drawn once at half size; open where it is below 1.3R - 0.15, with a soft edge of ±0.03.\n- Interference wipe: the same four-sine sum as Sine plasma as a threshold map, still moving; open where it is below 1.25R - 0.1.\n- Top-down stream: rows arrive from the top (front at 1.22R - 0.06 of the height); the band of 16% just above the front is still coarse, in blocks of 2px where it meets the finished rows growing to 16px at the front, the way a streamed image fills in.\n- Cell bloom: Voronoi cells about a fifth of the box's height; each starts at a random moment in the first 55% of R and opens as a circle growing from its seed.\n\nShockwave (on Halftone grow, Denoise and Cell bloom): as the image comes in, a ring runs out from the centre to 1.25 x the half-diagonal, 0.12 x the half-diagonal wide. With x = (distance - ring radius) / width and z = 0.75x, the picture is pushed outward by bend * 1.6 * 2.33 * z * exp(-z^2) * A (it stretches beyond the ring and squeezes behind it), with the same dispersion, and A = smoothstep(0, 0.08, R) * (1 - smoothstep(0.55, 1, R)). A faint glow rides the ring in four colours blending softly, inside to out #508CFF, #A06EFF, #FF6EB4, #FFBE8C, strength A * exp(-0.5x^2) * 0.16 on dark (screen: added light) and 0.12 on light (a tint), only on the part of the image already in, never on the dots.\n\n6. Pairing patterns and reveals\n- Each pattern has a reveal it suits: Ripple with Fisheye lens, fBm breath with Halftone grow, Double helix with Unzip, Static grain with Denoise, Spiral arms with Spiral wipe, Domain warp with Noise dissolve, Sine plasma with Interference wipe, Light band with Top-down stream, Snowflakes with Cell bloom. Any pattern still works with any reveal; Halftone, Dissolve, Denoise and Cell bloom are the most general.\n- If my product shows a gallery of the options (a picker or a settings page), show the patterns as tabs and the reveals in a row beneath, each wired to its pattern by a faint S-curve. As an image comes in, a bright run draws down its wire from the pattern to the reveal, with a dot at its head, and the reveal's name lights up with it (brightness p^2).\n\n7. Theme\n- Dark: page #0b0b0c, card #161618, box #0e0e0f, dots #f2f2f2. Light: page #f7f7f7, card #ffffff, box #f4f4f4, dots #1c1c1c. Use my product's own colours if it has them; keep the dots neutral.\n- The theme crossfades over 480ms; the dots, box and glows follow it.\n\n8. Keep it cheap\n- Work the pattern out once per dot into a small texture (one texel per dot), then draw the box at full size and only read it back. Never evaluate noise per pixel.\n- Masks that never change (the dissolve map) are drawn once at start, at half size.\n- Once an image is fully in and not fading, draw it once and stop; such a frame does no GPU work.\n- The canvas covers only the image boxes, at no more than 2x pixel density. Nothing draws while the box is off screen.\n- Reduced motion: no breathing (a still pattern), no zoom, bend, dispersion or shockwave; the image fades in over 200ms.\n\n9. The settings panel\n- One row per number: its name, a slider and its value with the unit. Moving a slider updates the picture at once. Each pattern keeps its own values (the tab on show sets the panel); double-clicking a row puts it back to the pattern's default, and a Reset button, shown only once something has moved, puts the whole pattern back.\n- Rows and defaults: Breathing 100% (0–300), Reveal time 1400ms (400–3000), Dot pitch 20px (12–36), Dot size 15% (5–30), Noise scale 180px (80–360), Zoom in 10% (0–30), Blur in 50% (0–100), Dispersion 30% (0–100), Edge bend 6px (0–20), Edge glow 30% (0–100, dark only), Dot glow 40% (0–100, dark only), and the theme (Auto, Dark, Light).\n- Per-pattern defaults on top of those: fBm breath reveal 1600, zoom 8, blur 30, bend 8; Domain warp scale 220, breathing 120, reveal 1600, blur 70; Snowflakes pitch 15, dot 14, reveal 1800, dispersion 35, bend 8; Ripple breathing 90, reveal 1600, zoom 6, dispersion 35; Light band breathing 110, reveal 1300, zoom 8, bend 8; Sine plasma scale 200, reveal 1600; Double helix pitch 18, breathing 110, dispersion 25; Static grain pitch 16, dot 13, reveal 1800, zoom 12, blur 30, dispersion 25, bend 8; Spiral arms breathing 120, reveal 1500, dispersion 35.\n- Use my slider component if I have one; otherwise a plain range input with a filled track, an upright handle and a number box beside it.\n\n10. How to build it, by platform\nThese are suggestions; check them against my stack and versions.\n- Web (as in the demo): one WebGL 2 canvas over the image boxes. Pass 1 draws the pattern into a texture of one texel per dot; pass 2 draws each box with its viewport set to the box, reading that texture, the picture (with mipmaps, for the blur and the halftone colours) and the masks. One requestAnimationFrame loop for every box on the page. Keep the status line in the DOM.\n- iOS: Metal (MTKView) with the same two passes, or SwiftUI on iOS 17+: a colorEffect for the dots and a layerEffect for the reveal, bend and dispersion.\n- Android: on API 33+, AGSL RuntimeShader in Compose (graphicsLayer with RenderEffect); otherwise OpenGL ES 3.\n- Flutter: FragmentProgram shaders, the dot texture drawn with a CustomPainter. React Native: react-native-skia RuntimeEffect.\n- Without a GPU path: draw the dots on a 2D canvas (one arc per dot), and reveal the image with CSS: a mask-image for the shape, transform: scale for the zoom and filter: blur for the softness; leave out the bend, dispersion and shockwave.\n\n11. Check\n- Each pattern reads as itself on a small box as well as a large one (the snowflakes as six-armed flakes, the helix as two strands).\n- The image starts to come in only once decoded; a fast image skips the dots; a failure stops them and says why.\n- On arrival the picture is enlarged and soft and settles sharp; its edges bend and split colour only where they move; the white front line is plain, never coloured.\n- The shockwave's glow stays faint and never lights the dots.\n- Every slider changes the picture at once; each pattern keeps its own values; Reset restores them.\n- 60 fps on a mid-range phone with several boxes loading; no GPU work once the images are in; light and dark, reduced motion and keyboard use of the panel all checked.","skill":"/skills/kubai-image-loading/SKILL.md","skillText":"# 生图点阵等待与出图\n\n《999 个小技巧，让你 Vibe 的产品更有质感》第 024 期 · @kubai087\n\n在用户的项目里按下面的要求改造。要求以用户的口吻写成：文中的 I、me、my 指用户；写着要先问的地方，先停下来问用户再继续。\n\n## 改造要求\n\nBuild the wait and the arrival for generated images in my product. While an image is being made, its box shows a grid of dots that breathe in one of nine loading patterns, under a status line with a moving sheen. When the image is ready it comes in through the dots in one of nine reveals, enlarged and soft at first and settling sharp, its edges bending like glass, with a colour split where the picture bends; three of the reveals also send a shockwave across it. Any pattern can be paired with any reveal. A settings panel shows the key numbers as sliders, set to the defaults below, so they can be tuned live.\n\nEvery value here comes from a working demo and is a default, not a requirement. Build it with these values first, then let me tune them with the panel (section 9).\n\nBefore building, look at my project (section 0) and ask me these, one at a time, with the recommended answer marked:\n1. Where it goes: every place a generated image appears (recommended; list them), or the ones I name.\n2. Which pattern and reveal: one pair everywhere (recommended: fBm breath with Halftone grow, or let me pick from section 3 and 5), a pair per place, or a different pair for each new image.\n3. The settings panel: only in development (recommended), behind a toggle, or for everyone.\nThen sum up my answers, say how you will build it on my platform (section 10), and wait for my go-ahead.\n\n0. Start from what exists\n- Find how images are generated and shown: where a request starts, where the result arrives (URL, blob, base64 or stream), whether progress or a partial image is reported, and the component that draws the image box.\n- Find how the project draws (DOM, canvas, WebGL, a native view tree), its framework and versions, its slider components, its dark mode and its reduced-motion setting.\n- Tell me in a few lines what you found before asking.\n\n1. Timing\n- The pass: the dots fade in over 500ms; the status line reads \"Making the first draft…\", then \"Refining the details…\" after 1.3s, and \"Done\" once the image is decoded and starts to come in. Use my product's own wording and language if it has some.\n- The reveal starts when the image is decoded (await image.decode() or its equivalent), never on the network response alone. It runs 1400ms with cubic-bezier(0.16, 1, 0.3, 1): fast in, a long settle. Call its progress R, 0 to 1, eased.\n- If the image is ready within 300ms of the request, skip the dots and just fade it in, or the loading state flashes. If the request fails, stop the dots where they are, say what happened and offer a retry.\n- Several images at once (a batch or a grid): each comes in after its own delay, picked unevenly, for example 0, 560, 220, 820, 380, 1040, 120, 700, 300ms across a 3 x 3 grid, so they arrive at uneven moments rather than together or as a sweep.\n\n2. The box and the dots\n- The image box has the image's own proportions and rounded corners (14px in a 600 x 772 card, the card 28px, concentric). Above it sits the status line, 20px type, in a dim ink; a 96px window of full ink, soft at both ends, crosses the text every 1.7s. Move the window and a copy of the text inside it in opposite directions as transforms, so the text never repaints.\n- Dots on a square grid, pitch 20px, centred in the box. Each dot's value v (0 to 1) comes from its loading pattern (section 3), worked out once per dot, not per pixel. The dot's radius goes from 0.55px to 15% of the pitch with v, its opacity from 0.1 to 1. A vignette dims the dots near the box's edge: 0.45 + 0.55 * smoothstep(8, 72, distance to the edge).\n- Dot glow (dark theme only): a soft halo round each lit dot, a Gaussian of sigma 0.3 * pitch, strength v^2, summed over the dot's own cell and its eight neighbours so halos cross cells without a seam.\n- Edge glow while loading (dark theme only), in two layers set apart so they never swell together. Outer: a wide haze (exp(-d / 12)) and a thin line on the rim (exp(-d / 2.5)), d the distance in from the box's edge, breathing every 2.4s, with two brighter arcs turning clockwise once in 8s. Inner: a soft band about 6px in (a Gaussian 3.5px wide) plus a faint wide haze, breathing every 3.7s from the opposite point of its swell, with three arcs turning anticlockwise once in 11s. Both fade out over the first third of the reveal.\n- Light theme: dark dots on a pale box, no glows, a softer rim on the reveals.\n\n3. The nine loading patterns\nAll take p, the dot's centre in px, and t, the breathing clock in seconds (scaled by the Breathing slider, so changing speed never jumps). n is value noise in fBm: four octaves, each at twice the frequency and half the amplitude, read at p / scale (scale 180px) and t * 0.32.\n- Ripple: rings from the centre, w = 0.5 + 0.5 * sin(r * 5.2 * PI / 2 - 2.6t), r = |p - centre| / scale; v = smoothstep(0.15, 0.85, mix(n, w, 0.6) * (0.55 + 0.6n)).\n- fBm breath: v = smoothstep(0.28, 0.74, n). The base the others build on.\n- Double helix: two strands lying across the box and turning, y = ±72 * sin(x / 44 - 1.8t) (in units of the box's height / 306), each a Gaussian 10 wide, the nearer one brighter (by cos of the phase), with base pairs on every second column between them.\n- Static grain: each dot eases from one random level to the next about 2.5 times a second, on its own offset, mixed 42% over n. Ease between levels (smoothstep), or it blinks.\n- Spiral arms: three arms, s = 0.5 + 0.5 * sin(3θ + 5.5r - 2.2t); v = smoothstep(0.12, 0.85, mix(n, s, 0.55) * (0.6 + 0.5n)).\n- Domain warp: the noise read at a point pushed far by more noise, the whole drifting one way so it streams like smoke: drift = (0.22t, -0.1t); w = (fbm(q * 1.1 + drift), fbm(q * 1.1 + drift + 5.2)); v = smoothstep(0.34, 0.7, fbm(q + 4(w - 0.5) + 1.6 drift)).\n- Sine plasma: four sines summed, sin(2.6x + 0.9t) + sin(3.1y - 1.1t) + sin(2.2(x + y) + 0.7t) + sin(4.4r - 1.5t), x, y in noise cells; v = smoothstep(0.2, 0.8, mix(0.5 + 0.125 * sum, n, 0.35)).\n- Light band: a Gaussian band, 0.15 wide, sweeping diagonally across every 3.3s over half-strength noise.\n- Snowflakes: six-armed flakes, each arm with a branch at half its length, one to a square of side z = max(0.27 * box height, 11 * pitch), placed at random in it, with an arm 0.37 to 0.5 z long, turning slowly as they fall (18px/s) with a little sway; behind them single-dot snow, one grain to a square of 0.4z, falling twice as fast at 35 to 60% brightness; noise at 12% beneath. Fold the angle into one twelfth of a turn so one arm and its branch, drawn once, make all six. Keep a flake's arm at least four dots long, or it reads as a blob.\n\n4. How every image comes in\nThese apply to all nine reveals.\n- Zoom in: the picture is read about the box's centre at 1 + 0.10 * (1 - R), so it arrives 10% enlarged and settles to its own size. The box itself never scales.\n- Blur in: read the picture 3 mip levels softer at the start, easing to sharp: bias = 3 * (1 - R)^0.8. Halftone and Denoise blur on their own; skip it there.\n- Edge bend: the box's rounded edge acts like the bevel of a glass slab. In the last 26px, read the picture from further in by bend * 2 * (1 - R)^0.7 * (1 - d / 26)^2 px (bend 6), so it stretches toward the edge; the edge itself stays put. Along a reveal's own front, the 20px just inside it bend the same way, by bend * exp(-(d / 14)^2), with a slow noise wobble of ±67% along the front, fading out as R passes 0.85.\n- Dispersion: wherever the picture is read from a moved place, read red from 30% further along the move and blue from 30% less. Colour then splits only where the picture bends, never where it holds still. Do not draw a coloured outline on the edge; the split belongs to the picture.\n- A thin white line rides each front (strength 0.55 on dark, 0.22 on light), fading as R passes 0.85.\n\n5. The nine reveals\nEach opens the picture over the dots by a mask a; R is the eased progress.\n- Fisheye lens: a circle grows from the centre to cover the box (front = 1.3R - 0.1 of the half-diagonal). Inside, the picture bulges like a fisheye (read at centre + d * (1 - k + k * u^2), u = distance / front, k = 0.5(1 - R)), a damped wave runs behind the edge, and red and blue split toward the rim; all of it relaxes to flat.\n- Halftone grow: each dot takes the picture's colour averaged over its cell and swells to half the pitch, until the circles touch; then the picture focuses in from 4.5 mip levels soft over the second half.\n- Unzip: opens from the middle outward, |y| < R * (half height + 30px) + 22 * sin(x / 44 - 1.8t) * (1 - R) (the wave in the helix's units, box height / 306), so its edges wave with the strands until they settle straight.\n- Denoise: the picture from 6 mip levels soft to sharp, (1 - R)^1.4, under 1.5px grain of ±45% * (1 - R)^2 that refreshes 24 times a second: diffusion run backwards.\n- Spiral wipe: one arm sweeps out from the centre: key = 0.72 * r / half-diagonal + 0.28 * angle / 2PI; open where key < 1.12R - 0.06.\n- Noise dissolve: a smooth two-octave noise map, drawn once at half size; open where it is below 1.3R - 0.15, with a soft edge of ±0.03.\n- Interference wipe: the same four-sine sum as Sine plasma as a threshold map, still moving; open where it is below 1.25R - 0.1.\n- Top-down stream: rows arrive from the top (front at 1.22R - 0.06 of the height); the band of 16% just above the front is still coarse, in blocks of 2px where it meets the finished rows growing to 16px at the front, the way a streamed image fills in.\n- Cell bloom: Voronoi cells about a fifth of the box's height; each starts at a random moment in the first 55% of R and opens as a circle growing from its seed.\n\nShockwave (on Halftone grow, Denoise and Cell bloom): as the image comes in, a ring runs out from the centre to 1.25 x the half-diagonal, 0.12 x the half-diagonal wide. With x = (distance - ring radius) / width and z = 0.75x, the picture is pushed outward by bend * 1.6 * 2.33 * z * exp(-z^2) * A (it stretches beyond the ring and squeezes behind it), with the same dispersion, and A = smoothstep(0, 0.08, R) * (1 - smoothstep(0.55, 1, R)). A faint glow rides the ring in four colours blending softly, inside to out #508CFF, #A06EFF, #FF6EB4, #FFBE8C, strength A * exp(-0.5x^2) * 0.16 on dark (screen: added light) and 0.12 on light (a tint), only on the part of the image already in, never on the dots.\n\n6. Pairing patterns and reveals\n- Each pattern has a reveal it suits: Ripple with Fisheye lens, fBm breath with Halftone grow, Double helix with Unzip, Static grain with Denoise, Spiral arms with Spiral wipe, Domain warp with Noise dissolve, Sine plasma with Interference wipe, Light band with Top-down stream, Snowflakes with Cell bloom. Any pattern still works with any reveal; Halftone, Dissolve, Denoise and Cell bloom are the most general.\n- If my product shows a gallery of the options (a picker or a settings page), show the patterns as tabs and the reveals in a row beneath, each wired to its pattern by a faint S-curve. As an image comes in, a bright run draws down its wire from the pattern to the reveal, with a dot at its head, and the reveal's name lights up with it (brightness p^2).\n\n7. Theme\n- Dark: page #0b0b0c, card #161618, box #0e0e0f, dots #f2f2f2. Light: page #f7f7f7, card #ffffff, box #f4f4f4, dots #1c1c1c. Use my product's own colours if it has them; keep the dots neutral.\n- The theme crossfades over 480ms; the dots, box and glows follow it.\n\n8. Keep it cheap\n- Work the pattern out once per dot into a small texture (one texel per dot), then draw the box at full size and only read it back. Never evaluate noise per pixel.\n- Masks that never change (the dissolve map) are drawn once at start, at half size.\n- Once an image is fully in and not fading, draw it once and stop; such a frame does no GPU work.\n- The canvas covers only the image boxes, at no more than 2x pixel density. Nothing draws while the box is off screen.\n- Reduced motion: no breathing (a still pattern), no zoom, bend, dispersion or shockwave; the image fades in over 200ms.\n\n9. The settings panel\n- One row per number: its name, a slider and its value with the unit. Moving a slider updates the picture at once. Each pattern keeps its own values (the tab on show sets the panel); double-clicking a row puts it back to the pattern's default, and a Reset button, shown only once something has moved, puts the whole pattern back.\n- Rows and defaults: Breathing 100% (0–300), Reveal time 1400ms (400–3000), Dot pitch 20px (12–36), Dot size 15% (5–30), Noise scale 180px (80–360), Zoom in 10% (0–30), Blur in 50% (0–100), Dispersion 30% (0–100), Edge bend 6px (0–20), Edge glow 30% (0–100, dark only), Dot glow 40% (0–100, dark only), and the theme (Auto, Dark, Light).\n- Per-pattern defaults on top of those: fBm breath reveal 1600, zoom 8, blur 30, bend 8; Domain warp scale 220, breathing 120, reveal 1600, blur 70; Snowflakes pitch 15, dot 14, reveal 1800, dispersion 35, bend 8; Ripple breathing 90, reveal 1600, zoom 6, dispersion 35; Light band breathing 110, reveal 1300, zoom 8, bend 8; Sine plasma scale 200, reveal 1600; Double helix pitch 18, breathing 110, dispersion 25; Static grain pitch 16, dot 13, reveal 1800, zoom 12, blur 30, dispersion 25, bend 8; Spiral arms breathing 120, reveal 1500, dispersion 35.\n- Use my slider component if I have one; otherwise a plain range input with a filled track, an upright handle and a number box beside it.\n\n10. How to build it, by platform\nThese are suggestions; check them against my stack and versions.\n- Web (as in the demo): one WebGL 2 canvas over the image boxes. Pass 1 draws the pattern into a texture of one texel per dot; pass 2 draws each box with its viewport set to the box, reading that texture, the picture (with mipmaps, for the blur and the halftone colours) and the masks. One requestAnimationFrame loop for every box on the page. Keep the status line in the DOM.\n- iOS: Metal (MTKView) with the same two passes, or SwiftUI on iOS 17+: a colorEffect for the dots and a layerEffect for the reveal, bend and dispersion.\n- Android: on API 33+, AGSL RuntimeShader in Compose (graphicsLayer with RenderEffect); otherwise OpenGL ES 3.\n- Flutter: FragmentProgram shaders, the dot texture drawn with a CustomPainter. React Native: react-native-skia RuntimeEffect.\n- Without a GPU path: draw the dots on a 2D canvas (one arc per dot), and reveal the image with CSS: a mask-image for the shape, transform: scale for the zoom and filter: blur for the softness; leave out the bend, dispersion and shockwave.\n\n11. Check\n- Each pattern reads as itself on a small box as well as a large one (the snowflakes as six-armed flakes, the helix as two strands).\n- The image starts to come in only once decoded; a fast image skips the dots; a failure stops them and says why.\n- On arrival the picture is enlarged and soft and settles sharp; its edges bend and split colour only where they move; the white front line is plain, never coloured.\n- The shockwave's glow stays faint and never lights the dots.\n- Every slider changes the picture at once; each pattern keeps its own values; Reset restores them.\n- 60 fps on a mid-range phone with several boxes loading; no GPU work once the images are in; light and dark, reduced motion and keyboard use of the panel all checked.\n"}