Class: CameraManager
Defined in: render/camera.ts:5
Constructors
Constructor
new CameraManager(): CameraManager;
Returns
CameraManager
Methods
Create()
static Create(entity): boolean;
Defined in: render/camera.ts:11
Create a Camera component and attach it to the specified entity
Parameters
| Parameter | Type | Description |
|---|---|---|
entity | number | The entity to attach the camera to |
Returns
boolean
boolean indicating success
Destroy()
static Destroy(entity): boolean;
Defined in: render/camera.ts:20
Destroy the Camera component from the specified entity
Parameters
| Parameter | Type | Description |
|---|---|---|
entity | number | The entity to remove the camera from |
Returns
boolean
boolean indicating success
HasComponent()
static HasComponent(entity): boolean;
Defined in: render/camera.ts:29
Check if the entity has a Camera component
Parameters
| Parameter | Type | Description |
|---|---|---|
entity | number | The entity to check |
Returns
boolean
boolean indicating if camera component exists
LookAt()
static LookAt(
entity,
targetX,
targetY,
targetZ,
upX,
upY,
upZ,
worldUpX,
worldUpY,
worldUpZ): boolean;
Defined in: render/camera.ts:112
Make the camera look at a target point
Parameters
| Parameter | Type | Description |
|---|---|---|
entity | number | The entity with the camera component |
targetX | number | Target X coordinate |
targetY | number | Target Y coordinate |
targetZ | number | Target Z coordinate |
upX | number | Up vector X |
upY | number | Up vector Y |
upZ | number | Up vector Z |
worldUpX | number | World up X |
worldUpY | number | World up Y |
worldUpZ | number | World up Z |
Returns
boolean
boolean indicating success
SetCullingMask()
static SetCullingMask(entity, mask): boolean;
Defined in: render/camera.ts:146
Set the culling mask for the camera
Parameters
| Parameter | Type | Description |
|---|---|---|
entity | number | The entity with the camera component |
mask | number | The culling mask |
Returns
boolean
boolean indicating success
SetOrthographic()
static SetOrthographic(
entity,
left,
right,
bottom,
top,
near,
far): boolean;
Defined in: render/camera.ts:76
Set orthographic projection parameters
Parameters
| Parameter | Type | Description |
|---|---|---|
entity | number | The entity with the camera component |
left | number | Left plane |
right | number | Right plane |
bottom | number | Bottom plane |
top | number | Top plane |
near | number | Near plane |
far | number | Far plane |
Returns
boolean
boolean indicating success
SetProjection()
static SetProjection(
entity,
projectionType,
fov,
aspect,
near,
far): boolean;
Defined in: render/camera.ts:45
Set the projection parameters for the camera
Parameters
| Parameter | Type | Description |
|---|---|---|
entity | number | The entity with the camera component |
projectionType | number | Type of projection |
fov | number | Field of view |
aspect | number | Aspect ratio |
near | number | Near plane |
far | number | Far plane |
Returns
boolean
boolean indicating success
SetRenderTexture()
static SetRenderTexture(entity, textureHandle): boolean;
Defined in: render/camera.ts:161
Set the render texture for the camera
Parameters
| Parameter | Type | Description |
|---|---|---|
entity | number | The entity with the camera component |
textureHandle | number | The render texture handle |
Returns
boolean
boolean indicating success