Focus operation consist of positioning the point of interest in front of the camera and a slightly zoom in
The point of interest
Scale factor
Amount of operation to be completed (used for focus animations, default is complete full operation)
Calculate the cursor position inside the canvas x/y coordinates with the origin being in the center of the canvas
Cursor position inside the canvas
The canvas where the renderer draws its output
Return the operation associated to a mouse/keyboard combination
The operation if it has been found, null otherwise
A mouse button (0, 1, 2) or 'WHEEL' for wheel notches
The keyboard modifier ('CTRL', 'SHIFT') or null if key is not needed
Get the operation associated to mouse and key combination and returns the corresponding FSA state
The FSA state obtained from the operation associated to mouse/keyboard combination
Mouse button
Keyboard modifier
Perform animation for focus operation
Instant in which this function is called as performance.now()
Point of interest for focus operation
Camera matrix
Gizmos matrix
Perform pan operation moving camera between two points
Initial point
Ending point
If movement should be adjusted considering camera distance (Perspective only)
Rotate the camera around an axis passing by trackball's center
Object with 'camera' field containing transformation matrix resulting from the operation to be applied to the camera
Rotation axis
Angle in radians
Perform uniform scale operation around a given point
Object with 'camera' and 'gizmo' fields containing transformation matrices resulting from the operation to be applied to the camera and gizmos
Scale factor
Point around which scale
If gizmos should be scaled (Perspective only)
Set a new mouse action by specifying the operation to be performed and a mouse/key combination. In case of conflict, replaces the existing one
True if the mouse action has been successfully added, false otherwise
The operation to be performed ('PAN', 'ROTATE', 'ZOOM', 'FOV)
A mouse button (0, 1, 2) or 'WHEEL' for wheel notches
The keyboard modifier ('CTRL', 'SHIFT') or null if key is not needed
Unproject the cursor on the plane passing through the center of the trackball orthogonal to the camera
The unprojected point on the trackball plane
The virtual camera
Cursor horizontal coordinate on screen
Cursor vertical coordinate on screen
The canvas where the renderer draws its output
If initial distance between camera and gizmos should be used for calculations instead of current (Perspective only)
Unproject the cursor on the trackball surface
The unprojected point on the trackball surface
The virtual camera
Cursor horizontal coordinate on screen
Cursor vertical coordinate on screen
The canvas where the renderer draws its output
The trackball radius
Remove a mouse action by specifying its mouse/key combination
True if the operation has been succesfully removed, false otherwise
A mouse button (0, 1, 2) or 'WHEEL' for wheel notches
The keyboard modifier ('CTRL', 'SHIFT') or null if key is not needed
Rotate camera around its direction axis passing by a given point by a given angle
The computed transormation matix
The point where the rotation axis is passing trough
Angle in radians
Generated using TypeDoc
Param
Virtual camera used in the scene
Param
Renderer's dom element
Param
The scene to be rendered