Interface: CameraEcsComponent
Defined in: rendering/components/camera-component.ts:84
Fields of CameraEcsComponent with a sensible default; callers may omit these.
Extends
Properties
clearColor
clearColor:
Color
Defined in: rendering/components/camera-component.ts:72
The clear color
Inherited from
CameraDefaultedOptions.clearColor
cullingMask
cullingMask:
number
Defined in: rendering/components/camera-component.ts:57
A bitmask matched against each sprite's Renderable.category
(matchesMask) to decide whether this camera draws it. Defaults to
0xffffffff (every category) in addCameraComponent.
Inherited from
CameraDefaultedOptions.cullingMask
isStatic
isStatic:
boolean
Defined in: rendering/components/camera-component.ts:50
When true, this camera ignores zoomInput and panInput entirely
(createCameraEcsSystem returns early for it). Use for cameras whose
position and zoom are driven by other means, or that should never move.
Inherited from
CameraDefaultedOptions.isStatic
layer
layer:
number
Defined in: rendering/components/camera-component.ts:67
The draw-order layer for this camera's renderTarget, relative to other
cameras presented in the same frame: lower layers are presented (and
thus drawn onto the canvas) first, so higher layers appear on top. Only
meaningful between cameras with different render targets; has no
effect on cameras that share one (they're already composited together
before presenting) or that render straight to the canvas.
Inherited from
maxZoom
maxZoom:
number
Defined in: rendering/components/camera-component.ts:43
The upper bound zoom is clamped to.
Inherited from
CameraDefaultedOptions.maxZoom
minZoom
minZoom:
number
Defined in: rendering/components/camera-component.ts:38
The lower bound zoom is clamped to.
Inherited from
CameraDefaultedOptions.minZoom
panInput?
optionalpanInput?:Axis2dAction
Defined in: rendering/components/camera-component.ts:101
The 2D input action that drives panning (the camera's local position),
if any. Ignored while isStatic is true.
panSensitivity
panSensitivity:
number
Defined in: rendering/components/camera-component.ts:33
How strongly panInput moves the camera's position. Scaled by the
inverse of the current zoom, so panning covers the same apparent
distance on screen at any zoom level.
Inherited from
CameraDefaultedOptions.panSensitivity
renderTarget?
optionalrenderTarget?:RenderTarget
Defined in: rendering/components/camera-component.ts:108
When set, this camera renders into the given off-screen render target instead of directly onto the canvas. A present pass is then responsible for drawing the target's color texture onto the canvas.
scissorRect?
optionalscissorRect?:Rect
Defined in: rendering/components/camera-component.ts:89
When set, restricts this camera's draw output to the given rectangular region instead of its full destination.
verticalWorldUnits
verticalWorldUnits:
number
Defined in: rendering/components/camera-component.ts:81
The total height, in world units, this camera's view spans vertically.
Horizontal extent follows automatically from the destination's aspect
ratio, so the same verticalWorldUnits shows the same amount of the
world vertically regardless of window size/shape (see
calculatePixelsPerUnit). Defaults to 10.
Inherited from
CameraDefaultedOptions.verticalWorldUnits
zoom
zoom:
number
Defined in: rendering/components/camera-component.ts:19
The current zoom level. Higher values zoom in (the view covers less of
the world); lower values zoom out. Adjusted by zoomInput (via
zoomSensitivity) when the camera isn't isStatic, and clamped to
[minZoom, maxZoom].
Inherited from
zoomInput?
optionalzoomInput?:Axis1dAction
Defined in: rendering/components/camera-component.ts:95
The 1D input action that drives zoom changes, if any. Ignored while
isStatic is true.
zoomSensitivity
zoomSensitivity:
number
Defined in: rendering/components/camera-component.ts:26
How strongly zoomInput changes zoom. Applied exponentially (see
createCameraEcsSystem) so scrolling has a consistent relative effect
regardless of the current zoom level.