API

Type Alias TargetCameraHandlers

Handler shape for target/free camera interactions. Property names are the canonical interaction type strings used in inputMap entries. All handlers are plain functions since none need multi-method lifecycle.

type TargetCameraHandlers = {
    rotate: (pitch: number, yaw: number) => void;
    translate: (deltaX: number, deltaY: number, deltaZ: number) => void;
}
Index
rotate: (pitch: number, yaw: number) => void

Rotate the camera by pitch/yaw deltas. pitch rotates around the local X axis (look up/down), yaw around the local Y axis (look left/right). Mirrors the legacy cameraRotation accumulation surface (x = pitch, y = yaw).

translate: (deltaX: number, deltaY: number, deltaZ: number) => void

Translate the camera by world-space deltas (already oriented; the camera applies them directly). Mirrors the legacy cameraDirection accumulation surface, which input classes populate after transforming their local intent (e.g. keyboard strafe) into world space.