CameraEntityParams
Defined in: renderer/src/CameraEntity.ts:33
Properties
Section titled “Properties”autoBind?
Section titled “autoBind?”
optionalautoBind?:boolean
Defined in: renderer/src/CameraEntity.ts:66
Bind every world-space layer at full strength before applying
bindings. Default: true. false binds exactly what bindings
names, and nothing else.
bindings?
Section titled “bindings?”
optionalbindings?:CameraBinding[]
Defined in: renderer/src/CameraEntity.ts:60
Per-layer bindings applied on top of the auto-bound world layers. An entry replaces the binding for the layer it names; an entry naming a screen-space layer adds it.
bounds?
Section titled “bounds?”
optionalbounds?:CameraBounds
Defined in: renderer/src/CameraEntity.ts:52
Camera bounds for position clamping.
deadzone?
Section titled “deadzone?”
optionaldeadzone?:object
Defined in: renderer/src/CameraEntity.ts:43
Follow deadzone.
halfHeight
Section titled “halfHeight”halfHeight:
number
halfWidth
Section titled “halfWidth”halfWidth:
number
fitTo?
Section titled “fitTo?”
optionalfitTo?:CameraFitToRect
Defined in: renderer/src/CameraEntity.ts:81
Frame an axis-aligned world rectangle: position the camera on the
rect’s centre and zoom so the entire rect fits inside the viewport
(contain semantics — zoom = min(viewportW / rect.w, viewportH / rect.h)). Wins over position and zoom when supplied. Applied
once at setup against the current renderer viewport — for fixed
cameras where the framed area is known up front (puzzle boards,
arcade levels, dialog-scene insets). For runtime re-framing, set
position + zoom directly on the camera.
follow?
Section titled “follow?”
optionalfollow?:FollowTarget
Defined in: renderer/src/CameraEntity.ts:37
Follow target — an Entity, a Transform, a world point, or a function returning one.
optionalname?:string
Defined in: renderer/src/CameraEntity.ts:70
Camera name (for multi-camera lookup).
offset?
Section titled “offset?”
optionaloffset?:Vec2Like
Defined in: renderer/src/CameraEntity.ts:41
Follow offset.
position?
Section titled “position?”
optionalposition?:Vec2
Defined in: renderer/src/CameraEntity.ts:35
Initial position.
priority?
Section titled “priority?”
optionalpriority?:number
Defined in: renderer/src/CameraEntity.ts:68
Camera priority (lower = processed first). Default: 0.
smoothing?
Section titled “smoothing?”
optionalsmoothing?:number
Defined in: renderer/src/CameraEntity.ts:39
Follow smoothing factor 0..1. Default: 1 (instant).
optionalsnap?:boolean
Defined in: renderer/src/CameraEntity.ts:50
Start on the follow target instead of easing in from position. Without
it a smoothed camera glides in from wherever it spawned — the world
origin, unless position or fitTo places it elsewhere. Ignored when no
follow target is given.
optionalzoom?:number
Defined in: renderer/src/CameraEntity.ts:54
Initial zoom level. 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.