Balloon Zinnia
- group .........
- 3D and WebGL scenes
- source ........
- https://ui.aryank.space/components/balloon-zinnia
- markdown ......
- /lab/balloon-zinnia.md
- human .........
- /lab/balloon-zinnia
── WHAT_IT_IS ────────────────────────────────────────────────────────────────────────────────
Twenty-two egg-shaped petals hinge around a small throat and sit on a short S-curved stem. A 512-wide ramp stripes both of them, and one 14 second clock keeps the sway, the breath, the colour flow and the band pulse in step. The pointer turns the head and swells the petals under it. A tap bobs the flower and squashes it. Raw WebGL2, no extra libraries.
── BEHAVIOUR ────────────────────────────────────────────────────────────────────────────────
* The petals are ellipsoids, not a mesh
Each petal is an egg hinged at the throat, instanced from a float texture. The stem is a tube from a second texture. One perspective function projects both, and both fragment shaders sample the same 512-wide ramp.
* One 14 second clock runs four motions
The period holds one sway, eight breaths, eight colour flows and six band pulses. They share the clock, so the stripes and the breath stay locked. Grain is off in the base preset. The only noise left is a 1/255 dither so the long blends do not band.
* No props paints the base preset
22 petals, puff 134, 5 bands, scale 100, grain 0, lean 48, cup 25, phase 60. A second set of numbers (15 petals, lean 50, cup 50, phase 72) only fills a control that is not a finite number.
* The loop stops when nobody is looking
Reduced motion freezes the clock and skips the entrance. A hidden tab or an offscreen host stops the frame loop. If WebGL2 is missing, the canvas hides and the background colour stays.
* A slow frame drops mesh density
Petal longitude and latitude, and the stem's ring count, step down a ladder when a frame runs long. A fast machine stays on the finest mesh, so the ladder does not change the picture there.