Skip to main content

CameraPerspective

@zylem/game-lib


@zylem/game-lib / core / CameraPerspective

Interface: CameraPerspective

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

A perspective produces the base camera pose each frame. Exactly one perspective is active per camera at a time.

Properties​

defaults?​

optional defaults?: object

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

Optional defaults for smoothing and other pipeline settings.

damping?​

optional damping?: number


id​

id: string

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


projection?​

optional projection?: CameraProjection

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

Projection the Three.js camera must use. When omitted, the runtime keeps a perspective camera. Orthographic perspectives set this so a runtime switch replaces the camera instance.

Methods​

getBasePose()​

getBasePose(ctx): CameraPose

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

Compute the raw desired pose for this frame given the current context.

Parameters​

ctx​

CameraContext

Returns​

CameraPose