@relu-interactives/spatial-ecs
@relu-interactives/spatial-ecs / components / CameraComponent
Class: CameraComponent ​
Defined in: components/Camera.ts:164
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:190
Parameters ​
| Parameter | Type |
|---|---|
payload | CameraComponentOptions |
Returns ​
CameraComponent
Overrides ​
Properties ​
| Property | Type | Description | Defined in |
|---|---|---|---|
camera | Camera | Live three.js camera. Recreated when the project loads to match projection. | components/Camera.ts:166 |
type | CameraRuntimeType | Runtime camera mode (3d or ar). | components/Camera.ts:168 |
isDefault | boolean | When true, this is the active rendering camera. Only one camera per scene should be the default. | components/Camera.ts:170 |
projection | CameraProjection | Active projection model (perspective or orthographic). | components/Camera.ts:172 |
fov | number | Vertical field of view in degrees. Used when projection is perspective. | components/Camera.ts:174 |
near | number | Near clip plane in world units. | components/Camera.ts:176 |
far | number | Far clip plane in world units. | components/Camera.ts:178 |
left | number | Left edge of the orthographic frustum (orthographic only). | components/Camera.ts:180 |
right | number | Right edge of the orthographic frustum (orthographic only). | components/Camera.ts:182 |
top | number | Top edge of the orthographic frustum (orthographic only). | components/Camera.ts:184 |
bottom | number | Bottom edge of the orthographic frustum (orthographic only). | components/Camera.ts:186 |
zoom | number | Zoom multiplier applied to the projection. | components/Camera.ts:188 |

