new ViewAngles()
Creates a new view angles instance.
Members
-
:number
altitude
-
The altitude angle of the camera relative to the view target, in degrees (-90 to 90).
The altitude angle is measure vertically above the horizontal plane.
Type
- number
-
:number
azimuth
-
The azimuth angle of the camera relative to the view target, in degrees (-180 to 180).
The azimuth angle is measured in an anti-clockwise direction from the positive X axis.
Type
- number
-
:THREE.Vector3
cameraPos
-
The position of the camera in model space.
Type
- THREE.Vector3
-
:number
fov
-
The field of view angle of the camera, in degrees (0.1 to 160).
Type
- number
-
:boolean
isViewAngles <readonly>
-
A flag identifying this object as a view angles instance.
Type
- boolean
-
:boolean
lockCamera
-
Maintain relative camera/target vector when moving the target position.
Type
- boolean
-
:THREE.Vector3
targetPos
-
The position of the look-at point in model space.
Type
- THREE.Vector3
-
:number
zoom
-
Stores the relative view zoom as a multiplier factor.
Type
- number
Methods
-
copyViewAnglesFrom(data)
-
Copies data from the given instance to this instance.
Parameters:
Name Type Description dataPD.ViewAngles | object The view state instance to copy data from.
Returns:
Returns this view angles instance to support method chaining.
- Type
- PD.ViewAngles
-
copyViewAnglesTo(data)
-
Copies data from this instance to another given instance.
Parameters:
Name Type Description dataPD.ViewAngles | object The object instance to copy data to.
Returns:
Returns this view angles instance to support method chaining.
- Type
- PD.ViewAngles
-
fromJSON(data)
-
Safely copy properties from a source object.
See the
PD.Base#fromJSONmethod for more details.Parameters:
Name Type Description dataobject The source object containing data to copy.
Returns:
Returns this instance to support method chaining.
- Type
- PD.View
-
toJSON( [data])
-
Converts the object instance to a simple POJO for JSON storage.
This method is used to copy, store and save the data for ths object, so the returned object must have all the properties required be able to rebuild this instance in its entirety when passed to the class constructor.
See the
PD.Base#toJSONmethod for more details.Parameters:
Name Type Argument Description dataobject <optional>
An optional parent object to append this data to.
Returns:
Returns a JSON object.
- Type
- object