CameraBehavior
@zylem/game-lib / core / CameraBehavior
Interface: CameraBehavior
Defined in: packages/game-lib/src/lib/camera/types.ts:76
Behaviors modify the desired pose each frame. They are keyed by name (idempotent add) and sorted by priority.
Extended by
Properties
enabled?
optionalenabled?:boolean
Defined in: packages/game-lib/src/lib/camera/types.ts:86
When false, the behavior is skipped during the pipeline run.
priority?
optionalpriority?:number
Defined in: packages/game-lib/src/lib/camera/types.ts:84
Sort order: lower runs first. Default 0.
Methods
onAttach()?
optionalonAttach(ctx):void
Defined in: packages/game-lib/src/lib/camera/types.ts:80
Called when the behavior is attached to the pipeline.
Parameters
ctx
Returns
void
onDetach()?
optionalonDetach(ctx):void
Defined in: packages/game-lib/src/lib/camera/types.ts:82
Called when the behavior is removed from the pipeline.
Parameters
ctx
Returns
void
update()
update(
ctx,pose):CameraPose
Defined in: packages/game-lib/src/lib/camera/types.ts:78
Receive current context and pose, return a modified pose.