setViewpoint
Sets the Viewpoint.
The Viewpoint simulates the position of a camera looking at the scene.
Named Viewpoint
Orthogonal Viewpoint
Perspective Viewpoint
The viewpoint to set.
Type | Required |
---|---|
String or Object | Yes |
Named Viewpoint
Valid values are:
- home
- front
- back
- left
- right
- top
- bottom
Orthogonal Viewpoint
Name | Type | Required | Description |
---|---|---|---|
aspectRatio | Number | No | Aspect ratio of the camera |
direction | Vector3 | No | Direction of the camera |
location | Vector3 | Yes | Location of the camera |
type | String | Yes | Value must be orthogonal |
up | Vector3 | No | Normalized vector describing the camera orientation |
viewToWorldScale | Number | No | The scale factor between the camera and the scene |
Perspective Viewpoint
Name | Type | Required | Description |
---|---|---|---|
aspectRatio | Number | No | Aspect ratio of the camera |
direction | Vector3 | No | Direction of the camera |
fov | Number | No | Field of view of the camera |
location | Vector3 | Yes | Location of the camera |
type | String | Yes | Value must be perspective |
up | Vector3 | No | Normalized vector describing the camera orientation |