Feature Library

Impacts the whole page feels

0.70 CPU ms
A still of the Impacts the whole page feels demo
Still
The live demo starts when it’s in view.Spin the turret to choose a weight, then click the bench to drop it · Sound starts off

One event, felt everywhere: impact({ x, y, mass }) makes every [data-body] element dip, rock and ring down on its shock mounts by its distance and its own…

What it costs a frame

0.70 ms
GPU
not used
CPU, median
0.70 ms
CPU, 95th pct
1.24 ms
Draw calls
0
Weight
Moderate

Measured 14 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 CPU 0.68–0.81 ms). What ran: Measured with the demo dropping weights by itself from its first frame and every 0.35 s after, hot hits from brick to anvil at seeded spots, so through the whole run plates ring on their springs, hundreds of sparks bounce off their edges, dust spreads, rims glow and the turret turns to each weight. The system is stepped from the demo’s update(), so the CPU time is all of it: the clock, the springs’ transform writes, the spark simulation and the Canvas 2D drawing. No GPU of its own. Phones: tiers are being measured next.

On every machine it was measured on
MachineGPU msCPU msCPU p95
RTX 4060 Laptop · 13th Gen Intel(R) Core(TM) i9-13900Hreference · measuring toolnot timed0.701.24
apple · Apple A19 Proin a browser tab · 16 November 2026not timed0.761.60
Intel Arc 140V (Xe2-LPG) · Intel Core Ultra 7 258Vin a browser tab · 15 November 2026not timed1.292.10

Bars against one 16.7 ms frame. A browser-tab run is timed in a visible tab without the tool’s scripted input, so read it as close, not exact.

What it needs

Renders with
DOM and CSSPlain DOM and CSS: every current browser.
Your browser
Runs hereNo WebGPU needed
Depends on
NothingNo other packages

What it’s for

  1. Dashboards and control rooms where an alarm or a big number lands with weight
  2. Games and toys: drops, slams and hits the interface itself feels
  3. Drag and drop that lands heavily
  4. A choice with a physical feel: a selector wheel, a carousel of modes
  5. Animations that must be paused, stepped and replayed exactly (tests, captures, tutorials)

Pitfalls, in brief

  1. The plates own their transform while they ring: a transform of your own on a [data-body] element is overwritten.
  2. Plates are measured against the root at register() and on a resize of the root.
  3. Hits come in client px (event.clientX and clientY).
  4. The sparks layer is a canvas over the whole root at z-index 4: anything that must sit above it (a menu, a dialog) needs a higher z-index or to live outside the root.
  5. Sound starts off and needs a click: call sound.power(true) from a click or a key press, never on load.
4 more in brief
  1. Everything moves on the clock: pause() freezes the plates, sparks and turret mid-flight and advance(ms) steps them in fixed 1/60 s ticks, the same every time.
  2. Under reduced motion (clock.calm) plates stay put and no sparks fly, but rims still glow and the turret still chooses (at once), so nothing that tells you something is lost.
  3. The turret is a radiogroup: Tab reaches the chosen head, arrows and Home and End choose.
  4. One frame loop runs only while something moves and stops by itself: do not drive the clock from a loop of your own as well, or it steps twice.
9 pitfalls in full, the hook-up guide, the module source and its tests come with the part.

Where it comes from

From HaTac. Fully custom code.

impactweightspringsshakesparksparticlescanvas 2dweb audiosoundtween clockdeterministicpause and stepdialspinnerdetentsinertiaradiogroupkeyboardtouchreduced motiondomno dependencies

Near it in the frame