Trauma-based screenshake
three.js and WebGL · A camera move · MIT
- What it does
Camera shake where shake equals trauma squared, trauma decays 1.4 per second and is capped at 1, and the noise comes from accumulated time, not a random call, so the same time gives the same shake. Suggested amounts: 0.15 small, 0.4 hit, 0.7 explosion. Code is in the reference page, written for the starter but free of dependencies.
- Get it
const shake = new ShakeRig(); shake.addTrauma(0.4); each frame after placing the camera: shake.update(dt, camera);
- Needs (the whole pack)
Nothing to read the skills. To run what they build: Node and npm, Python 3 for the helper scripts, and Chromium through Playwright for the inspector and tests. Optional and paid: Tripo, Gemini and ElevenLabs keys for the three generator skills.
- License
MIT
- From