Class: CameraSetup#
Hierarchy#
Handle<camerasetup>
↳ CameraSetup
Constructors#
constructor#
new CameraSetup(): CameraSetupCreates a new CameraSetup object.
Returns: CameraSetup
Defined in: handles/camera.ts:240
Properties#
handle#
• Readonly handle: camerasetup
Defined in: handles/handle.ts:6
Accessors#
destPoint#
destPoint(): PointReturns the target Point of a CameraSetup.
Returns: Point
Defined in: handles/camera.ts:251
destX#
destX(): numberReturns the target x-coordinate of a CameraSetup.
Returns: number
Defined in: handles/camera.ts:258
destX(x: number): voidSets the target x-coordinate of a CameraSetup.
Parameters:#
| Name | Type |
|---|---|
x | number |
Returns: void
Defined in: handles/camera.ts:265
destY#
destY(): numberReturns the target y-coordinate of a CameraSetup.
Returns: number
Defined in: handles/camera.ts:272
destY(y: number): voidSets the target y-coordinate of a CameraSetup.
Parameters:#
| Name | Type |
|---|---|
y | number |
Returns: void
Defined in: handles/camera.ts:279
id#
id(): numberGet 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
label#
label(): stringGets the label of a CameraSetup.
Returns: string
Defined in: handles/camera.ts:293
label(label: string): voidSets the label of a CameraSetup.
Parameters:#
| Name | Type |
|---|---|
label | string |
Returns: void
Defined in: handles/camera.ts:286
Methods#
apply#
apply(doPan: boolean, panTimed: boolean): voidApplies 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
applyForceDuration#
applyForceDuration(doPan: boolean, forceDuration: number): voidApplies 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
applyForceDurationSmooth#
applyForceDurationSmooth(doPan: boolean, forcedDuration: number, easeInDuration: number, easeOutDuration: number, smoothFactor: number): voidParameters:#
| 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
applyForceDurationZ#
applyForceDurationZ(zDestOffset: number, forceDuration: number): voidApplies 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
applyZ#
applyZ(zDestOffset: number): voidApplies 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
getField#
getField(whichField: camerafield): numberReturns 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
setDestPos#
setDestPos(x: number, y: number, duration: number): voidSets 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
setField#
setField(whichField: camerafield, value: number, duration: number): voidAssigns 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
fromHandle#
static fromHandle(handle: camerasetup): camerasetupParameters:#
| Name | Type |
|---|---|
handle | camerasetup |
Returns: camerasetup
Defined in: handles/camera.ts:386