Function: addCameraComponent()
addCameraComponent(
world,entity,options?):CameraEcsComponent
Defined in: rendering/components/camera-component.ts:135
Attaches a CameraEcsComponent to entity. A camera also needs a
PositionEcsComponent (see addPositionComponent) for createCameraEcsSystem to
pan it; use createCamera to get both on a fresh entity in one call.
Parameters
world
The ECS world entity belongs to.
entity
number
The entity to attach the component to.
options?
Partial<CameraEcsComponent> = {}
Options for configuring the camera.
Returns
The attached component, for further tuning or runtime changes.