Reference·JavaScript · @bimworks/viewercommonJavaScript

TransitionCameraProjection

Interface in @bimworks/viewercommon.

API catalogue · @bimworks/viewercommon · Interface

TypeScript#
interface TransitionCameraProjection

A camera change of a TransitionStep: the projection alone. The camera stays where it is and what it looks at keeps its size. Only viewers that animate transitions apply it; a view in 2D mode ignores it

JavaScript#
// To orthographic in 800 ms, then back to a 60° perspective
osm.transition([{camera: {projection: "orthographic"}, duration: 800}, {camera: {fov: 60}, duration: 800}]);

Inheritance and interfaces#

Members#

Member Kind Description
duration Property Milliseconds; default the step's duration
fov Property A perspective's vertical field of view in degrees, above 0 and below 180; alone it means "perspective" inheritedFrom: TransitionCameraProjectionChange.fov
projection Property "orthographic", or "perspective" with fov (default the camera's own perspective field of view) inheritedFrom: TransitionCameraProjectionChange.projection

duration#

TypeScript#
duration?: number

Milliseconds; default the step's duration

fov#

TypeScript#
fov?: number

A perspective's vertical field of view in degrees, above 0 and below 180; alone it means "perspective"

inheritedFrom: TransitionCameraProjectionChange.fov

projection#

TypeScript#
projection?: "perspective" | "orthographic"

"orthographic", or "perspective" with fov (default the camera's own perspective field of view)

inheritedFrom: TransitionCameraProjectionChange.projection