Skip to main content

Camera

Camera can operate the camera of the scene. All properties are applied to single camera of the scene.

Note: Following code is not recommended as occur extra rendering steps:

<Viewer>
<Scene>
<Globe>
<Camera>
<Entity />
</Camera>
</Globe>
</Scene>
</Viewer>

Camera component's role is just changing fields of Viewer#scene#camera, so following code is recommended.

<Viewer>
<Scene />
<Globe />
<Camera />
<Entity />
</Viewer>

For details, refer to "Component location" chapter in Guide.

Availability

Camera can be mounted insideViewer or CesiumWidget components. It can not be mounted more than once for each Viewer or CesiumWidget.

Properties

Cesium properties

PropertyTypeDescription
positionCartesian3
directionCartesian3
upCartesian3
rightCartesian3
frustumPerspectiveFrustum | PerspectiveOffCenterFrustum | OrthographicFrustum
defaultMoveAmountnumber
defaultLookAmountnumber
defaultRotateAmountnumber
defaultZoomAmountnumber
constrainedAxisCartesian3
maximumZoomFactornumber
percentageChangednumber

Cesium read-only properties

N/A

Cesium events

PropertyTypeDescription
onChange(areaPercentage: number) => void
onMoveEnd() => void
onMoveStart() => void

Other properties

N/A