Skip to main content

StrategyPanBehavior

@zylem/game-lib


@zylem/game-lib / core / StrategyPanBehavior

Interface: StrategyPanBehavior

Defined in: packages/game-lib/src/lib/camera/behaviors/strategy-pan.ts:46

Extends​

Properties​

enabled?​

optional enabled?: boolean

Defined in: packages/game-lib/src/lib/camera/types.ts:86

When false, the behavior is skipped during the pipeline run.

Inherited from​

CameraBehavior.enabled


priority?​

optional priority?: number

Defined in: packages/game-lib/src/lib/camera/types.ts:84

Sort order: lower runs first. Default 0.

Inherited from​

CameraBehavior.priority

Methods​

onAttach()?​

optional onAttach(ctx): void

Defined in: packages/game-lib/src/lib/camera/types.ts:80

Called when the behavior is attached to the pipeline.

Parameters​

ctx​

CameraContext

Returns​

void

Inherited from​

CameraBehavior.onAttach


onDetach()?​

optional onDetach(ctx): void

Defined in: packages/game-lib/src/lib/camera/types.ts:82

Called when the behavior is removed from the pipeline.

Parameters​

ctx​

CameraContext

Returns​

void

Inherited from​

CameraBehavior.onDetach


setFollowKey()​

setFollowKey(key): void

Defined in: packages/game-lib/src/lib/camera/behaviors/strategy-pan.ts:48

Follow key, or pass null to pan freely. Clears a manual-pan suspension.

Parameters​

key​

string | null

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.

Parameters​

ctx​

CameraContext

pose​

CameraPose

Returns​

CameraPose

Inherited from​

CameraBehavior.update