Name | Type | Description |
---|---|---|
cameraProperties |
SystemCameraProperties | The system camera properties |
target |
MapObject | The camera target |
Properties:
Name | Type | Description |
---|---|---|
threeCamera |
THREE.PerspectiveCamera | The three.js camera |
distance |
number | The distance between the camera and the target |
height |
number | The y distance between the camera and the target |
horizontalAngle |
number | The horizontal angle of the camera |
verticalAngle |
number | The vertical angle of the camera |
verticalRight |
boolean | Used to loop the horizontal and vertical angle |
target |
MapObject | The camera target |
targetPosition |
THREE.Vector3 | The camera target position |
targetOffset |
THREE.Vector3 | The target offset position |
Methods
-
getMapOrientation ()Orientation
-
Get the map orientation according to the camera
Returns:
Type Description Orientation -
Get the distance according to vertical angle
Returns:
Type Description number -
Get the height according to vertical angle
Returns:
Type Description number -
Get the horizontal angle between two positions
Name Type Description p1
THREE.Vector3 The first position p2
THREE.Vector3 The second position Returns:
Type Description number -
Get the vertical angle between two positions
Name Type Description p1
THREE.Vector3 The first position p2
THREE.Vector3 The second position Returns:
Type Description number -
Add an angle to the vertical angle
Name Type Description a
THREE.Vector3 The angle to add -
Update the target position according to target and target offset
-
Update the three.js camera position
-
Update target offset position
-
Update horizontal and vertical angles
-
Update the distance
-
Update the three.js camera view
-
Update all the parameters