@dioramajs/particles/confetti
Exports of @dioramajs/particles/confetti.
On this page
import { default, flight, MIN_DRAG } from '@dioramajs/particles/confetti'Functions
flight | The closed form of a launch from `x0, y0, 0` at `vx, vy, vz` under gravity `g` (down) and linear drag `k`: p(t) = p0 + v0·f + g·(t − f)/k with f = (1 − e^(−kt))/k. The vertex shader draws the same path. |
Constants
default | A burst of confetti from the element's box, a shower from the top of the viewport or fireworks over it, over everything, to mark a sign-up, an order or a donation. The element is never hidden, and under reduced motion nothing loads. |
MIN_DRAG | Drag never goes below this, so the closed form stays exact in float32. |
POOL | Pieces in the ring every burst writes into: one instanced draw. |
Interfaces
Flight | Where a piece is `t` s after launch, in world px (y up), without its sway. |