CutsceneCameraBehavior
@zylem/game-lib / cinematics / CutsceneCameraBehavior
Class: CutsceneCameraBehavior
Defined in: packages/game-lib/src/lib/cinematics/cutscene-camera-behavior.ts:17
Camera behavior that hands the pipeline a fixed pose each frame while a cutscene is playing. It runs after the game's own behaviors (high priority) so shots override follow/look-at logic, and it disables itself when the player has no pose (no active shot) so gameplay framing resumes.
damping applies optional per-frame smoothing for follow cameras; the
player passes 0 for authored moves so keyframes land exactly.
Implements
Constructors
Constructor
new CutsceneCameraBehavior():
CutsceneCameraBehavior
Returns
CutsceneCameraBehavior
Properties
enabled
enabled:
boolean=false
Defined in: packages/game-lib/src/lib/cinematics/cutscene-camera-behavior.ts:19
When false, the behavior is skipped during the pipeline run.
Implementation of
priority
priority:
number=1000
Defined in: packages/game-lib/src/lib/cinematics/cutscene-camera-behavior.ts:18
Sort order: lower runs first. Default 0.
Implementation of
Methods
onDetach()
onDetach():
void
Defined in: packages/game-lib/src/lib/cinematics/cutscene-camera-behavior.ts:38
Called when the behavior is removed from the pipeline.
Returns
void
Implementation of
setPose()
setPose(
pose,damping?):void
Defined in: packages/game-lib/src/lib/cinematics/cutscene-camera-behavior.ts:26
Sets the pose to show; null releases the camera back to gameplay.
Parameters
pose
EvaluatedPose | null
damping?
number = 0
Returns
void
snap()
snap():
void
Defined in: packages/game-lib/src/lib/cinematics/cutscene-camera-behavior.ts:34
Snap smoothing state so the next frame lands exactly on the pose (seeks, cuts).
Returns
void
update()
update(
ctx,pose):CameraPose
Defined in: packages/game-lib/src/lib/cinematics/cutscene-camera-behavior.ts:42
Receive current context and pose, return a modified pose.