Import
InteractionManager is an addon, and must be imported explicitly, see Installation#Addons.
import { InteractionManager } from 'three/addons/interaction/InteractionManager.js';
Properties
.element : HTMLCanvasElement
The canvas element.
Default is null.
Methods
.add( …objects : Object3D ) : this
Adds one or more objects to the manager.
| objects |
The objects to add. |
.connect( renderer : WebGPURenderer | WebGLRenderer, camera : Camera )
Stores the renderer and camera needed for computing element transforms.
| renderer |
The renderer. |
| camera |
The camera. |
.disconnect()
Disconnects this manager, clearing the renderer and camera references.
.remove( …objects : Object3D ) : this
Removes one or more objects from the manager.
| objects |
The objects to remove. |
.update()
Updates the element transforms for all registered objects. Call this once per frame in the animation loop.