Skip to main content

StrategyPanOptions

@zylem/game-lib


@zylem/game-lib / core / StrategyPanOptions

Interface: StrategyPanOptions

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

Properties​

breakFollowOnPan?​

optional breakFollowOnPan?: boolean

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

A manual pan or edge scroll drops follow until StrategyPanBehavior.setFollowKey. Default true.


edgeMargin?​

optional edgeMargin?: number

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

Fraction of the viewport that counts as an edge. Default 0.08.


edgeSpeed?​

optional edgeSpeed?: number

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

World units per second at a flush edge. Default 12.


followKey?​

optional followKey?: string | null

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

Target key to ease toward. Null follows nothing.


followLerp?​

optional followLerp?: number

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

Interpolation factor while following, per 60Hz frame. Default 0.12.


panSpeed?​

optional panSpeed?: number

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

World units per second at full stick deflection. Default 16.


sampleInput?​

optional sampleInput?: () => StrategyPanInput

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

Read pointer and pan intent. Kept as a closure so the behavior does not import InputManager. Typical source: inputs.p1.pointer and directions.

Returns​

StrategyPanInput