∞ forever components

Particles & Physics

Fresh Brioche Tray

Fresh Brioche Tray control in the Artisan Café system.

canvasmedium complexitymoderate motionpointeraccessible

Open on the canvas to copy the code → Free account · 3 copies a day · membership goes unlimited

Live demo — the real component, running in a sandbox. One self-contained HTML file, zero dependencies. Open it on the canvas →
1

When to use it

Bakery, café or artisan-food sites that want a tactile toy: tap to bake a pastry, drag to toss one around the tray.

When not to

Contexts without a pointer: the tray responds to pointer input only. Pages that need a static, quiet card.

Working with an AI agent

Every component ships agent-ready metadata. An example instruction for this one:

Change the pastry limit by editing 'balls.length >= 14' in addBun(), warm the pastries by editing the gradient stops baked into the bun sprite ('#FFF5D6', '#E9C96A', '#C78C46'), and recolour the board by editing --pa-board and --pa-board-deep in :root.

Safe to edit

  • pastry cap (balls.length >= 14 in addBun)
  • pastry radius (24 + Math.random() * 4 in Ball)
  • gravity and bounce (vy += 0.45 and the 0.55 floor bounce in Ball.update)
  • pastry colours (gradient stops baked into the bun sprite)
  • board and text colours (--pa-board, --pa-board-deep, --pa-blush, --pa-butter)
  • steam puffs (Steam class: max life and radius growth)

Keep intact

  • pa02- class prefix and the .pa02-tray-wrap root
  • bun sprite is baked once and scaled per pastry (no per-frame gradient)
  • prefers-reduced-motion guard and visibilitychange pause
  • demo-v1 preview lifecycle: initialize demoEnabled from window.__foreverPreview and stop attract work on the window forever:interactive event; retain manual feedback, settling, cleanup and explicit sessions

Known limitations

  • The tray is pointer driven only; there is no keyboard way to add or move a pastry
  • State remains local to each mounted instance; format/theme remount preserves takeover, not component values.

coffeesensoryartisansoundscapesteamorganicfresh-brioche-trayparticlesphysicssmokebriochepariocawarmth

More Particles & Physics components

  • Gravity Dot RainMatte verdigris, mauve, rose, moss and ochre dots fall under gravity with motion trails, bounce off the floor, and scatter away from the cursor on a dark…
  • Firework BurstColorful glowing sparks burst radially, fall under gravity, and fade against a dark sky. Initial automatic launches stop after first input; canvas clicks…
  • Confetti CannonOchre festival-paper palette: broad confetti rectangles fire from bottom corners, tumble and flip. First input stops automatic launches; a manual burst…
  • Bouncing Balls7–14 glossy matte-toned balls (verdigris, dusty rose, ochre, slate blue, lilac, moss) bounce off walls and collide with elastic physics; cursor repels…
  • Spring ChainA 16-node spring chain whips and follows the cursor in a lime-to-gold gradient; initial figure-eight attract motion stops after first input; manual chain…
  • Cloth Wave GridA 10x10 wireframe grid ripples like cloth via sine/cosine waves through dusted sky-blue, aqua and lilac hues; mesh nodes bulge away from the cursor on hover.