Scatter Photo Physics
- group .........
- 3D and WebGL scenes
- recording .....
- https://s4xw77gvirailb62.public.blob.vercel-storage.com/lab/scatter-photo-physics.mp4
- source ........
- https://ui.aryank.space/components/scatter-photo-physics
- markdown ......
- /lab/scatter-photo-physics.md
- human .........
- /lab/scatter-photo-physics
── WHAT_IT_IS ────────────────────────────────────────────────────────────────────────────────
Polaroid-style cards floating in zero gravity behind a wordmark, shoved around by the cursor. Gravity is switched off entirely and the bodies are held in by four static walls, so nothing settles: high air friction bleeds the energy off instead and each card drifts to a stop wherever it happens to be. Moving the pointer applies a randomly directed force to every card within a hundred and fifty pixels, so a sweep scatters the cluster rather than pushing it, and each card carries a random starting angle so the pile never looks aligned. The DOM cards are positioned from the physics bodies every frame; the simulation has no renderer of its own.
── BEHAVIOUR ────────────────────────────────────────────────────────────────────────────────
* Zero gravity, high air friction
Nothing falls and nothing settles into a pile. frictionAir at 0.075 bleeds the energy off instead, so a card drifts to a halt wherever it was pushed rather than sliding to the floor.
* The force is random, not directional
Cards in range get an impulse in a random direction rather than away from the cursor. That is why a sweep scatters the cluster instead of ploughing through it.
* Matter has no renderer here
The bodies are invisible; DOM cards are positioned from body.position and body.angle each frame. That keeps the cards as real elements with real images rather than canvas draws.