Throw physics with pool-table collisions and comet trail

Featurekamo-internal
Shipped
April 29, 2026 at 11:32 PM UTC
Author
kamo
Commit
f72a0b8

Flicking a head past the throw threshold launches it across the viewport under explicit physics (friction, edge bounce, head-vs-head elastic collisions). Slow drops still land exactly where released. While the head is in motion an arcade-style fire trail follows it. Throw is gated by both release velocity (>= 650 px/s averaged over the last ~110 ms) and total drag distance (>= 30 px) so a quick precise re-position never accidentally triggers a throw. Magnitude is capped at 3200 px/s to keep edge-of-detection flicks tame. The throw RAF loop drives motion-value writes directly via .set() — bypassing framer-motion springs while in flight — and self-stops when all heads drop below the stop-speed threshold. placeHomeCluster and softPushCluster skip any anchor currently in the throw map so the spring system never fights the physics integrator. Struck heads detach from any cluster, promote to a solo cluster, and join the throw simulation with the impulse imparted by the collision. Trail rendering: SVG layer with radial-gradient embers along recent positions, mix-blend-mode: screen for additive glow, single CSS blur filter for softness — arcade aesthetic, near-zero CPU cost.

All changes

Like what you see shipping?

Every one of these updates lands in your workspace automatically. Start free and watch it grow week after week.

Start Free ForeverView Pricing