The current fov (field of view)
Set the fov (field of view). Whenever a fov of 0 is set, the camera wil switch to orthographic view. Whenever the fov is set to any positive value below 120 it will switch to perspective view.
The new fov
The current projection matrix: view space to clip space as in WebGL2, z −1 at the near plane to +1 at the far plane (not reversed, no infinite far plane), with the finite near and far the camera uses: the nearPlane setting or the automatic one. Perspective or orthographic (fov 0). Conventions as viewMatrix
The current view matrix: render frame to view space. The camera matrices keep the WebGL2 conventions whatever the
viewer renders with (Viewer3D-Next/docs/plan.md §3.13): gl-matrix mat4 values (Float64Array, 16 numbers,
column-major), a right-handed view space with the camera looking down −z and y up. They are the camera's own
arrays, updated when it moves: read them, copy what you keep
The current view-projection matrix, projMatrix × viewMatrix: render frame to clip space, for example to place DOM elements over the canvas. Un-projecting a canvas point with its inverse at z −1 and +1 gives the point on the near and on the far plane. Conventions as viewMatrix and projMatrix
The size of one viewer pixel (Viewer3d.getHeight) in mm: the same everywhere in an orthographic view; in a perspective view at the depth of point (render frame, default the target); 0 before the viewer has a size
Optionalpoint: vec3Moves the camera to a new eye and target (render frame, mm), animated over animationTimeMs. An eye below the camera's eye floor (the lowest height the eye may have, if one is set) is lifted onto it with the target
Optionaloptions: { orthoHalfHeight?: number; pivot?: vec3; up?: vec3 }pivot: the orbit pivot at the end (render frame), the current one when absent; up: the up direction at the end, derived from the current one when absent; orthoHalfHeight: in orthographic mode, the half height of the view window at the end in mm, the current one when absent
Whether the camera stands still: no animation, drag or navigation key in progress
Rotates the eye around the target, about the up direction
Optionaloptions: { animate?: boolean }Set the current viewpoint, make sure to wait for this call to finish
The ViewPoint to set. When no fov has been set on the ViewPoint, the fov will be unchanged
The time to animate in ms, the default is 0 and indicates no animation at all
Fits the camera on a box
aabb: the box (render frame), for example from Viewer3d.getFocusAabb, the camera's scene bounds when absent; box: the same box as a plain value {min, max} (render frame, mm), used when aabb is absent, for example a box computed from points with Viewer3d.measurementToRenderCoordinates; margin, animate, animationTimeMs, updatePivot (make the box's centre the orbit pivot), viewDirection and target as in @bimworks/viewercommon!ViewFitOptions; fov: change the field of view first
The point the camera orbits around (the pivot), in viewer coordinates