Skip to content

Camera settings

These options control the camera behavior and settings for the 3D viewer.

OptionTypeDefaultDescription
camera.typeString"orthographic"Camera projection type: orthographic (parallel projection, the crystallographic convention) or perspective (uses camera.fov).
camera.minDistanceNumber1Minimum camera distance when zooming.
camera.maxDistanceNumber100Maximum camera distance when zooming.
camera.wheelZoomSpeedNumber0.0008Speed of zooming when using the mouse wheel.
camera.pinchZoomSpeedNumber0.001Speed of zooming when using pinch gestures on touch devices.
camera.initialPositionArray[0, 0, 10]Initial camera position as [x, y, z] coordinates.
camera.fovNumber45Field of view in degrees.
camera.nearNumber0.1Near clipping plane distance.
camera.farNumber1000Far clipping plane distance.