CameraBinding
Defined in: renderer/src/CameraComponent.ts:69
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). - Dampened zoom, still upright:
rotateRatio: 0, scaleRatio: 0.3.
A ratio below 1 scales the layer by less than the camera does while the
layer still translates by the full camera offset, so content drifts away
from the world position it should sit on as the zoom leaves 1. For UI
that must track a world point at constant size, use ScreenFollow, which
projects the point through the camera every frame.
Properties
Section titled “Properties”layer:
string
Defined in: renderer/src/CameraComponent.ts:71
Layer name to transform.
rotateRatio?
Section titled “rotateRatio?”
optionalrotateRatio?:number
Defined in: renderer/src/CameraComponent.ts:75
Rotation follow factor. 0 = stay upright, 1 = full camera rotation. Default: 1.
scaleRatio?
Section titled “scaleRatio?”
optionalscaleRatio?:number
Defined in: renderer/src/CameraComponent.ts:77
Zoom follow factor. 0 = constant size, 1 = full camera zoom. Default: 1.
translateRatio?
Section titled “translateRatio?”
optionaltranslateRatio?:number
Defined in: renderer/src/CameraComponent.ts:73
Translation follow factor. 0 = stay at world origin, 1 = full. Default: 1.
Coding agents: fetch https://yage.dev/llms.txt first and prefer the Markdown references it links over these HTML pages. This page's Markdown counterpart is /llms/packages/renderer.md.