File: ArcballControls.md | Updated: 11/15/2025
Arcball controls allow the camera to be controlled by a virtual trackball with full touch support and advanced navigation functionality. Cursor/finger positions and movements are mapped over a virtual trackball surface represented by a gizmo and mapped in intuitive and consistent camera movements. Dragging cursor/fingers will cause camera to orbit around the center of the trackball in a conservative way (returning to the starting point will make the camera return to its starting orientation).
In addition to supporting pan, zoom and pinch gestures, Arcball controls provide focus< functionality with a double click/tap for intuitively moving the object's point of interest in the center of the virtual trackball. Focus allows a much better inspection and navigation in complex environment. Moreover Arcball controls allow FOV manipulation (in a vertigo-style method) and z-rotation. Saving and restoring of Camera State is supported also through clipboard (use ctrl+c and ctrl+v shortcuts for copy and paste the state).
Unlike OrbitControls and TrackballControls, ArcballControls doesn't require update() to be called externally in an animation loop when animations are on.
ArcballControls is an addon, and must be imported explicitly, see Installation#Addons.
import { ArcballControls } from 'three/addons/controls/ArcballControls.js';
Constructs a new controls instance.
camera | The camera to be controlled. The camera must not be a child of another object, unless that object is the scene itself.
---|---
domElement | The HTML element used for event listeners. Default is null.
scene | The scene rendered by the camera. If not given, gizmos cannot be shown. Default is null.
If set to true, the camera's near and far values will be adjusted every time zoom is performed trying to maintain the same visible portion given by initial near and far values. Only works with perspective cameras.
Default is false.
Set to true to make zoom become cursor centered.
Default is false.
The damping inertia used if 'enableAnimationsis set totrue`.
Default is 25.
Set to true to enable animations for rotation (damping) and focus operation.
Default is true.
Enable or disable camera focusing on double-tap (or click) operations.
Default is true.
Enable or disable gizmos.
Default is true.
If set to true, a grid will appear when panning operation is being performed (desktop interaction only).
Default is false.
Enable or disable camera panning.
Default is true.
Enable or disable camera rotation.
Default is true.
Enable or disable camera zoom.
Default is true.
Duration of focus animations in ms.
Default is 500.
How far you can dolly out. For perspective cameras only.
Default is Infinity.
The maximum FOV in degrees.
Default is 90.
How far you can zoom out. For orthographic cameras only.
Default is Infinity.
How far you can dolly in. For perspective cameras only.
Default is 0.
The minimum FOV in degrees.
Default is 5.
How far you can zoom in. For orthographic cameras only.
Default is 0.
Holds the mouse actions of this controls. This property is maintained by the methods setMouseAction() and unsetMouseAction().
The size of the gizmo relative to the screen width and height.
Default is 0.67.
Speed of rotation.
Default is 1.
The scaling factor used when performing zoom operation.
Default is 1.1.
The scene rendered by the camera. If not given, gizmos cannot be shown.
Default is null.
The control's focus point.
Maximum angular velocity allowed on rotation animation start.
Default is 20.
Makes rotation gizmos more or less visible.
isActive | If set to true, gizmos are more visible.
---|---
Copy the current state to clipboard (as a readable JSON text).
Removes the grid from the scene.
Returns the raycaster that is used for user interaction. This object is shared between all instances of ArcballControls.
Returns: The internal raycaster.
Set the controls state from the clipboard, assumes that the clipboard stores a JSON text as saved from copyState().
Resets the controls.
Saves the current state of the control. This can later be recover with reset().
Sets the camera to be controlled. Must be called in order to set a new camera to be controlled.
camera | The camera to be controlled.
---|---
Sets gizmos visibility.
value | Value of gizmos visibility.
---|---
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.
operation | The operation to be performed ('PAN', 'ROTATE', 'ZOOM', 'FOV').
---|---
mouse | A mouse button (0, 1, 2) or 'WHEEL' for wheel notches.
key | The keyboard modifier ('CTRL', 'SHIFT') or null if key is not needed. Default is null.
Returns: true if the mouse action has been successfully added, false otherwise.
Sets gizmos radius factor and redraws gizmos.
value | Value of radius factor.
---|---
Remove a mouse action by specifying its mouse/key combination.
mouse | A mouse button (0, 1, 2) or 'WHEEL' for wheel notches.
---|---
key | The keyboard modifier ('CTRL', 'SHIFT') or null if key is not needed. Default is null.
Returns: true if the operation has been successfully removed, false otherwise.
Fires when the camera has been transformed by the controls.
Fires when an interaction has finished.
Fires when an interaction was initiated.