pixi-reels
All recipes

Hold & Win: collector with particle streams

A collector lands and each coin's value flies into it on a bezier arc trailed by a stream of neon particles, ticking the collector total up. Pure game-layer choreography over the board's cellCenter() and release().

Loading recipe…

Press Run. A collector lands in the middle and, one coin at a time, each value arcs into it trailed by a burst of neon particles while the collector’s total ticks up.

Particles ride the same arc as the value

The flight is bezierFly from board.cellCenter(cell) to the collector. The particle stream is just more sprites on jittered copies of that arc, staggered by a per-particle delay, fading on arrival:

for (let i = 0; i < n; i++) {
  const s = new PIXI.Sprite(neonTexture);
  bezierFly(s, jitter(from), to, { delay: i * 0.04, arriveScale: 0.2 })
    .then(() => fadeAndDestroy(s));
}

The board only hands out geometry and clears the cell with release(); what flies along the arc — a coin clone, a particle ribbon, a character — is entirely yours.