Noise

Adds camera shake on top of the shot.

Noise shakes the camera on top of everything else, so the shot stays framed correctly underneath. You can add as many as you like to one virtual camera. Noise runs after every Extension, and addNoise returns a function that removes one.

Which one?

NoiseUse it for
BasicMultiChannelPerlinContinuous shake: handheld cameras, engines, earthquakes.
ImpulseListenerOne-off shakes from events: explosions, hits, recoil.

Usage

import { BasicMultiChannelPerlinNoise } from '@pmndrs/klipp';

camera.addNoise(new BasicMultiChannelPerlinNoise({ positionAmplitude: [0.1, 0.1, 0], rotationAmplitude: [0.5, 0.5, 0] }));