Recomposer
Turns, rolls and zooms the finished shot.
A final touch on a shot the Body and Aim already built: turn it a little, roll it into a dutch angle, or zoom in. The Body and Aim keep working as they are, so the camera still follows and frames its targets, with the change on top. Animate the settings for effects like a slow dutch in a cutscene.
zoomScale scales the field of view, or the orthographic size, the shot has when it runs, for example from Lens or FollowZoom. With an orthographic camera, add it after GroupFraming to scale the size it fits too.
Settings
Usage
import { RecomposerExtension } from '@pmndrs/klipp';
const recomposer = new RecomposerExtension({ dutch: 12, zoomScale: 0.9 });
camera.addExtension(recomposer);
// any time later
recomposer.dutch = 12 * Math.sin(time);
import { RecomposerExtension } from '@pmndrs/klipp';
const recomposer = new RecomposerExtension({ dutch: 12, zoomScale: 0.9 });
camera.addExtension(recomposer);
<VirtualCamera name="villain" priority={10}>
<Body.HardLockToTarget target={[0, 2, 6]} />
<Aim.HardLookAt target={villainRef} />
<Extension.Recomposer dutch={12} zoomScale={0.9} />
</VirtualCamera>
ref gives you the RecomposerExtension.