Events

viewer3d.viewpoint

Invoked when the Viewpoint changes.

The Viewpoint simulates the position of a camera looking at the scene.

Example



Usage

JS
jQuery


Parameters

onViewpointChange

JS
jQuery

Function called when the Viewpoint changes.

Type

(event: Object) => Void

event

Name

Type

Description

viewpoint

Object

The current viewpoint

Orthogonal Viewpoint

Name

Type

Description

aspectRatio

Number

Aspect ratio of the scene

direction

Vector3

Direction of the camera

location

Vector3

Location of the camera

type

String

Value is orthogonal

up

Vector3

Normalized vector describing the camera orientation

viewToWorldScale

Number

The scale factor between the camera and the scene

Perspective Viewpoint

Name

Type

Description

aspectRatio

Number

Aspect ratio of the scene

direction

@vector3

Direction of the camera

fov

Number

Field of view of the camera

location

Vector3

Location of the camera

type

String

Value is perspective

up

Vector3

Normalized vector describing the camera orientation