Prompt(1/4)
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.
Every 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).
Before building, look at my project (section 0) and ask me these, one at a time, with the recommended answer marked:
1. Where it goes: every place a generated image appears (recommended; list them), or the ones I name.
2. 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.
3. The settings panel: only in development (recommended), behind a toggle, or for everyone.
Then sum up my answers, say how you will build it on my platform (section 10), and wait for my go-ahead.
0. Start from what exists
- 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.
- 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.
- Tell me in a few lines what you found before asking.
1. Timing
- 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.
- 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.
- 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.
- 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.
2. The box and the dots
- 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.
- 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).
- 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.
- 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.
- Light theme: dark dots on a pale box, no glows, a softer rim on the reveals.