Skip to content

CameraBinding

Defined in: renderer/src/CameraComponent.ts:46

Binding that associates a camera with a named render layer.

Each ratio is a linear blend from identity (0) to full camera effect (1), applied independently per axis. Defaults are all 1, giving the classic “this layer follows the camera” behavior.

Common recipes:

  • Parallax: translateRatio: 0.5 (half the camera’s translation).
  • Billboard (upright, constant size, follows position): rotateRatio: 0, scaleRatio: 0.
  • Partial-depth billboard (dampened zoom, still upright): rotateRatio: 0, scaleRatio: 0.3.

layer: string

Defined in: renderer/src/CameraComponent.ts:48

Layer name to transform.


optional rotateRatio?: number

Defined in: renderer/src/CameraComponent.ts:52

Rotation follow factor. 0 = stay upright, 1 = full camera rotation. Default: 1.


optional scaleRatio?: number

Defined in: renderer/src/CameraComponent.ts:54

Zoom follow factor. 0 = constant size, 1 = full camera zoom. Default: 1.


optional translateRatio?: number

Defined in: renderer/src/CameraComponent.ts:50

Translation follow factor. 0 = stay at world origin, 1 = full. Default: 1.