A light is a class that represents a light object in the world.
Properties
type |
Gets or sets a string representing the type of camera, either "projection" or "ortho". |
fovHorizontal |
The horizontal field of view of the camera in degrees if type="projection" or in units if type="ortho". |
fovVertical |
The vertical field of view of the camera in degrees if type="projection" or in units if type="ortho". |
orthoZoom |
Depricated. A zoom factor used when the camera is of type "ortho". Use fovVertical/fovHorizontal instead. |
lodDistanceScale |
Scales all of the camera distances in the scene by this factor when calculating LOD. |
listenerMPU |
The meters-per-unit of the scene (defaults to 1.0 meaning 1 meter=1 unit) for the purposes of 3D sound. |
listenerRolloffFactor |
3D sound property determining how distance affects sound. |
listenerDopplerFactor |
3D sound property determining how velocity affects sound. |
followMode |
A boolean that when set to true indicates the camera is in follow mode and will move to follow the target. |
followDistance |
A floating point value for the desired distance to be away from the target. |
followHeading |
A floating point heading in degrees to be facing when tracking the target. |
followAddObjectHeading |
A boolean that when true will add on the object's heading to the followHeading to keep the camera looking where the target is looking. |
followElevation |
A floating point value determining the elevation to look up/down in. |
followCatchupPeriod |
A floating point value determining how quickly the camera moves to the target position - smaller values mean a faster transition. |
polyCount |
Returns an integer count of the number of object based polygons being drawn by this camera. |
dofEnable |
A boolean that when set to true enables the depth of field system on this camera. |
dofDistance |
The centre point of the distance from the camera at which the camera is in focus. |
dofRange |
The spread around the depth of field centre point (dofDistance) which is still in focus. |
dofBlur |
A float determining the size of the maximum circle of confusion (blur radius) for out of focus points. Defaults to 8. |
targetMode |
A boolean that when set to true indicates the target will track the targetPos or targetObjectId. |
targetType |
A string determining the type of targeting to use. Possible values are 'point', 'box' or 'object'. |
targetPos |
A Vector point to track when targetType='point'. |
targetObjectId |
A string identifier of the object to track when targetType='object'. |
targetOffset |
A Vector offset on the target to move the tracking by (i.e. for a person you might want to move the target up to follow the head). |
targetBoxMin |
A Vector representing the lowest x/y/z of a bounding box to view when targetType='box'. |
targetBoxMax |
A Vector representing the highest x/y/z of a bounding box to view when targetType='box'. |
targetTransitionPeriod |
A floating point value that determines how quickly the camera should transition to a new target. 0 is instant. |
targetAdjustFOV |
A boolean value that when true will adjust the field of view of the camera so the target fills the screen. |
targetAdjustFOVScale |
A floating point value that scales the field of view calculated. Defaults to 1. |
targetAdjustDOF |
A boolean value that when true will adjust the depth of field according to the target distance. |
targetAdjustDOFScale |
A floating point value that scales the depth of field calculated. Defaults to 1. |
Examples
object.camera.fovHorizontal=60; // 60 degree horizontal field of view
Remarks
Use the orthoZoom property to zoom the camera when camera.type="ortho".
See Also


