Skip to content

@relu-interactives/spatial-ecs


@relu-interactives/spatial-ecs / components / CameraComponent

Class: CameraComponent

Defined in: components/Camera.ts:160

Camera entity state. Supports perspective and orthographic projections, a 3d or ar runtime type, and an isDefault flag for the camera that the preview/editor renders through. Field-of-view, near/far, ortho frustum, and zoom are persisted; the live THREE.Camera is recreated when the project loads.

Extends

Constructors

Constructor

ts
new CameraComponent(payload?): CameraComponent;

Defined in: components/Camera.ts:186

Parameters

ParameterType
payloadCameraComponentOptions

Returns

CameraComponent

Overrides

Component.constructor

Properties

PropertyTypeDescriptionDefined in
cameraCameraLive three.js camera. Recreated when the project loads to match projection.components/Camera.ts:162
typeCameraRuntimeTypeRuntime camera mode (3d or ar).components/Camera.ts:164
isDefaultbooleanWhen true, this is the active rendering camera. Only one camera per scene should be the default.components/Camera.ts:166
projectionCameraProjectionActive projection model (perspective or orthographic).components/Camera.ts:168
fovnumberVertical field of view in degrees. Used when projection is perspective.components/Camera.ts:170
nearnumberNear clip plane in world units.components/Camera.ts:172
farnumberFar clip plane in world units.components/Camera.ts:174
leftnumberLeft edge of the orthographic frustum (orthographic only).components/Camera.ts:176
rightnumberRight edge of the orthographic frustum (orthographic only).components/Camera.ts:178
topnumberTop edge of the orthographic frustum (orthographic only).components/Camera.ts:180
bottomnumberBottom edge of the orthographic frustum (orthographic only).components/Camera.ts:182
zoomnumberZoom multiplier applied to the projection.components/Camera.ts:184