Class: Camera
Contains methods relating to the active camera for the specified player.
Constructors
new Camera()
private
new Camera():Camera
Returns
Methods
clear()
clear():
void
Returns
void
Remarks
Clears the active camera for the specified player. Causes the specified players to end any in-progress camera perspectives, including any eased camera motions, and return to their normal perspective.
This function can't be called in read-only mode.
Throws
This function can throw errors.
fade()
fade(
fadeCameraOptions
?):void
Parameters
Parameter | Type | Description |
---|---|---|
fadeCameraOptions ? | CameraFadeOptions | Additional options around camera fade operations. |
Returns
void
Remarks
Begins a camera fade transition. A fade transition is a full-screen color that fades-in, holds, and then fades-out.
This function can't be called in read-only mode.
Throws
This function can throw errors.
setCamera()
setCamera(
cameraPreset
,setOptions
?):void
Parameters
Parameter | Type | Description |
---|---|---|
cameraPreset | string | Identifier of a camera preset file defined within JSON. |
setOptions ? | CameraDefaultOptions | CameraSetFacingOptions | CameraSetLocationOptions | CameraSetPosOptions | CameraSetRotOptions | Additional options for the camera. |
Returns
void
Remarks
Sets the current active camera for the specified player.
This function can't be called in read-only mode.
Throws
This function can throw errors.