Camera
Overview
Camera is a class in Aspose.3d for Typescript.
Inherits from: Camera, Entity.
Camera objects let developers set projection parameters such as near/far planes, aspect ratio, orthographic height and up direction.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
name | string | Read | Stores the camera’s identifier string |
parentNodes | any[] | Read | Holds an array of parent nodes containing this camera |
excluded | boolean | Read | Indicates whether the camera is excluded from rendering |
parentNode | any | Read | References the immediate parent node of the camera |
rotationMode | any | Read | Defines how the camera rotation is applied |
nearPlane | number | Read | Specifies the distance to the near clipping plane |
farPlane | number | Read | Specifies the distance to the far clipping plane |
aspect | number | Read | Defines the aspect ratio used for perspective projection |
orthoHeight | number | Read | Sets the height of the orthographic view volume |
up | any | Read | Defines the up direction vector for the camera |
lookAt | any | Read | Defines the point the camera is looking at |
direction | any | Read | Defines the forward direction vector of the camera |
target | any | Read | Defines the target point for the camera’s focus |
apertureMode | any | Read | Specifies the aperture behavior mode |
fieldOfView | number | Read | Defines the vertical field of view angle in degrees |
fieldOfViewX | number | Read | Defines the horizontal field of view angle |
fieldOfViewY | number | Read | Defines the vertical field of view angle |
width | number | Read | Defines the viewport width in pixels |
height | number | Read | |
aspectRatio | number | Read | Defines the ratio of width to height for the viewport |
magnification | any | Read | Defines the camera’s magnification factor |
projectionType | string | Read | Indicates the type of projection (e.g., perspective or orthographic) |
Methods
| Signature | Description |
|---|---|
constructor(name: string | null, projectionType: any) | Creates a new Camera with optional name and specified projection type |
moveForward(_distance: number) | Moves the camera forward by the given distance |
getBoundingBox() → any | Returns the camera’s bounding box |
getEntityRendererKey() → any | Returns a key used for rendering the camera entity |
removeProperty(_prop: Property | string) → boolean | Removes a property (by object or name) from the camera and returns success |
getProperty(_property: string) → any | Retrieves the value of a named property from the camera |
setProperty(_property: string, _value: any) | Assigns a value to a named property on the camera |
findProperty(_property: string) → Property | null | Searches for a property by name and returns the Property object or null |