#
Class: CameraSetup#
HierarchyHandle<camerasetup>
↳ CameraSetup
#
Constructors#
constructornew CameraSetup(): CameraSetup
Creates a new CameraSetup object.
Returns: CameraSetup
Defined in: handles/camera.ts:240
#
Properties#
handle• Readonly
handle: camerasetup
Defined in: handles/handle.ts:6
#
Accessors#
destPointdestPoint(): Point
Returns the target Point of a CameraSetup.
Returns: Point
Defined in: handles/camera.ts:251
#
destXdestX(): number
Returns the target x-coordinate of a CameraSetup.
Returns: number
Defined in: handles/camera.ts:258
destX(x: number): void
Sets the target x-coordinate of a CameraSetup.
#
Parameters:Name | Type |
---|---|
x | number |
Returns: void
Defined in: handles/camera.ts:265
#
destYdestY(): number
Returns the target y-coordinate of a CameraSetup.
Returns: number
Defined in: handles/camera.ts:272
destY(y: number): void
Sets the target y-coordinate of a CameraSetup.
#
Parameters:Name | Type |
---|---|
y | number |
Returns: void
Defined in: handles/camera.ts:279
#
idid(): number
Get the unique ID of the handle. The ID is recycled once you destroy the object.
Returns: number
The unique ID of a handle object.
Defined in: handles/handle.ts:18
#
labellabel(): string
Gets the label of a CameraSetup.
Returns: string
Defined in: handles/camera.ts:293
label(label: string): void
Sets the label of a CameraSetup.
#
Parameters:Name | Type |
---|---|
label | string |
Returns: void
Defined in: handles/camera.ts:286
#
Methods#
applyapply(doPan: boolean, panTimed: boolean): void
Applies the CameraSetup, altering the current camera's fields to match those of the camera setup.
#
Parameters:Name | Type | Description |
---|---|---|
doPan | boolean | If set to true, it will move the current camera's target coordinates to the camera setup's target coordinates. If false, the camera will not move coordinates, but will still apply the other fields. |
panTimed | boolean | If set to true, then it will change the camera's properties over the times specified in CameraSetup.setField . |
Returns: void
Defined in: handles/camera.ts:304
#
applyForceDurationapplyForceDuration(doPan: boolean, forceDuration: number): void
Applies the camerasetup over a certain duration, altering the current camera's fields to match those of the camera setup.
#
Parameters:Name | Type | Description |
---|---|---|
doPan | boolean | If set to true, it will move the current camera's target coordinates to the camera setup's target coordinates. If false, the camera will not move coordinates, but will still apply the other fields. |
forceDuration | number | The duration it will take to apply all the camera fields. It will ignore the times set by CameraSetup.setField . |
Returns: void
Defined in: handles/camera.ts:315
#
applyForceDurationSmoothapplyForceDurationSmooth(doPan: boolean, forcedDuration: number, easeInDuration: number, easeOutDuration: number, smoothFactor: number): void
#
Parameters:Name | Type | Description |
---|---|---|
doPan | boolean | If set to true, it will move the current camera's target coordinates to the camera setup's target coordinates. If false, the camera will not move coordinates, but will still apply the other fields. |
forcedDuration | number | The duration it will take to apply all the camera fields. It will ignore the times set by CameraSetup.setField . |
easeInDuration | number | |
easeOutDuration | number | |
smoothFactor | number |
Returns: void
Defined in: handles/camera.ts:329
#
applyForceDurationZapplyForceDurationZ(zDestOffset: number, forceDuration: number): void
Applies the CameraSetup over a certain duration with a custom z-offset value,
altering the current camera's fields to match those of the camera setup.
The z-offset input will override the z-offset specified by CameraSetup.setField
.
#
Parameters:Name | Type | Description |
---|---|---|
zDestOffset | number | The camera's z-offset will gradually change to this value over the specified duration. |
forceDuration | number | The duration it will take to apply all the camera fields. It will ignore the times set by CameraSetup.setField . |
Returns: void
Defined in: handles/camera.ts:340
#
applyZapplyZ(zDestOffset: number): void
Applies the CameraSetup with a custom z-offset, altering the current camera's
fields to match those of the camera setup. The z-offset input will override
the z-offset specified by the CameraSetup through CameraSetup.setField
.
bug
If a player pauses the game after the CameraSetup has been applied, the z-offset of the game camera will change to the z-offset of the CameraSetup for that player.
#
Parameters:Name | Type | Description |
---|---|---|
zDestOffset | number | The camera's z-offset will gradually change to this value over the specified duration. |
Returns: void
Defined in: handles/camera.ts:351
#
getFieldgetField(whichField: camerafield): number
Returns the value of the specified field for a CameraSetup. The angle of attack,
field of view, roll, and rotation are all returned in degrees, unlike Camera.getField
.
note
The angle of attack, field of view, roll, and rotation are all returned in degrees.
#
Parameters:Name | Type | Description |
---|---|---|
whichField | camerafield | The field of the CameraSetup. |
Returns: number
Defined in: handles/camera.ts:361
#
setDestPossetDestPos(x: number, y: number, duration: number): void
Sets the target coordinates for a CameraSetup over a duration. The coordinate
change will only be applied when CameraSetup.apply
(or some other variant) is ran.
#
Parameters:Name | Type | Description |
---|---|---|
x | number | The target x-coordinate. |
y | number | The target y-coordinate. |
duration | number | The coordinates will be applied over this duration once the camera setup is applied. |
Returns: void
Defined in: handles/camera.ts:372
#
setFieldsetField(whichField: camerafield, value: number, duration: number): void
Assigns a value to the specified field for a CameraSetup. The input angles should be in degrees.
#
Parameters:Name | Type | Description |
---|---|---|
whichField | camerafield | The field of the CameraSetup. |
value | number | The value to assign to the field. |
duration | number | The duration over which the field will be set. If the duration is greater than 0, the changes will be made gradually once the camera setup is applied. |
Returns: void
Defined in: handles/camera.ts:382
#
fromHandlestatic fromHandle(handle: camerasetup): camerasetup
#
Parameters:Name | Type |
---|---|
handle | camerasetup |
Returns: camerasetup
Defined in: handles/camera.ts:386