Feature Library

Scrubbable foil confetti

0.07 GPU · 0.17 CPU ms
A still of the Scrubbable foil confetti demo
Still
The live demo starts when it’s in view.

Metallic strips burst, tumble, flutter and settle on one analytic clock.

Seek backwards or replay the same seeded burst without stepping a simulation. One instanced mesh, fixed reusable buffers, an optional studio reflection helper and a settled reduced-motion frame, on WebGPU and WebGL2.

What it costs a frame

0.07 ms
0.17 ms
GPU
0.07 ms
CPU, median
0.17 ms
CPU, 95th pct
0.27 ms
Draw calls
2
Weight
Light

Measured 19 November 2026 on RTX 4060 Laptop, 13th Gen Intel(R) Core(TM) i9-13900H, Chrome 157, 1920×1080 at 1×. 600 frames × 3 rounds, median kept (rounds ranged GPU 0.07–0.07, CPU 0.15–0.17 ms). What ran: 1600 seeded foil strips in one instanced draw, with a caller-driven six-second analytic burst, reusable attributes and a prefiltered room environment. Default bench constructs no product card or ground; it repeatedly seeks through the burst, without DOM updates. Phones: tiers are being measured next.

How steadily it runs on RTX 4060 Laptop · 13th Gen Intel(R) Core(TM) i9-13900H · reference

Typical frame ?
3.29 ms
1% low ?
145 fps
Varies by ?
±0.85 ms
All metricsRTX 4060 Laptop · 13th Gen Intel(R) Core(TM) i9-13900H · reference
p50p95p990.11 ms6.97 ms +
How long each frame took. Most frames sit in the tall bars; a long tail to the right is hitching.

Frames run back to back, each starting once the GPU has finished the last, so frame times show the work itself. They have a floor of about 4–5 ms from the browser’s own scheduling: GPU and CPU ms stay the measure of cost.

Frames

Median (p50) ?
3.29 ms
p95 ?
5.25 ms
p99 ?
6.70 ms
Slowest ?
7.07 ms
Mean ?
3.65 ms
Standard deviation ?
0.85 ms
1% low ?
145 fps
0.1% low ?
142 fps
Hitches ?
7 of 600
Over budget ?
0 of 600

Main thread

Long tasks ?
0
Long frames ?
0
Event-loop delay ?
0.0 / 0.4 / 0.4 ms

Input

No input during this run.

Memory

JavaScript heap ?
37.7 → 35.5 MB
Growth ?
-2.15 MB

Browser

JavaScript a frame ?
0.01 ms
All tasks a frame ?
0.36 ms
Layout / style ?
0.00 / 0.00 ms
Main thread busy ?
10%

Garbage collection

Collections ?
4 (4 minor, 0 major)
Pauses ?
1.6 ms in all, longest 0.5

What it needs

Renders with
WebGPU or WebGLWebGPU where there is one, WebGL2 where there is not.
Your browser
Runs hereNo WebGPU needed
Depends on
three.js r187No other packages
With an agent
install("foil-confetti")Your coding agent reads its pitfalls and installs it through the library’s MCP server. Set it up

What it’s for

  1. A product reveal or launch moment
  2. A milestone celebration that can be replayed
  3. A timeline-driven burst that scrubs in both directions
  4. Lit foil without a compute simulation

Pitfalls, in brief

  1. Time is seconds in 0..duration. seek(t) pauses; play() restarts the same burst from zero.
  2. Capacity is fixed at construction (default at least 2600, maximum 10000).
  3. The anchor is a fixed world-space midpoint between two low cannon mouths, with y up and a settling plane at y=0.
  4. Duration scales the whole trajectory to a chosen clip length, including landing.
  5. Seeded input arrays are reproducible; transcendental shader maths and lighting may differ slightly across GPUs.
4 more in brief
  1. Supply a reflection environment for readable metal, or use createFoilStudio(renderer) once.
  2. Reduced motion forces the settled end frame, including explicit play and seek calls.
  3. No compute or storage-buffer feature is required.
  4. Counts are not timings.
9 pitfalls in full, the hook-up guide, the module source and its tests come with the part.

Where it comes from

From another of the maker’s apps. Fully custom code.

three.js contributors: The optional studio helper imports three.js RoomEnvironment and PMREMGenerator (MIT) to light the foil; these remain package dependencies, not vendored source.

confettifoilcelebrationlaunchburstscrubreplayseededinstancingmetallicTSLreduced motion

Near it in the frame