Creates a new instance of the controls.
Optional config: Partial<Config>Private activeAn array of pointers that are currently active on the canvas.
Private cameraThe THREE.Camera used to render the scene.
Private configThe Config used by this instance. Will respect the defaults set in DefaultConfig.
Private domThe HTMLElement used to listen for mouse / touch events. This must be passed in the constructor; changing it here will not set up new event listeners.
When set to false, the controls will not respond to user input.
true
Private ignores
This variable can be set by a third party to prevent the pointer up event from being triggered.
For example, the TransformControl has higher "access" and will set this to true when it is active.
This object contains references to the mouse actions used by the controls.
Private objectObjects that can be selected.
Private onPrivate onPrivate onPrivate onPrivate proxyA proxy object that is used by the transform controls.
The THREE.Scene used to render the transform controls.
Private selectedThe objects that are currently selected.
Private stateThe current state of the control.
This object contains references to the touch actions used by the controls.
Private transformThe TransformControls used to transform selected objects.
This is only available if useTransformControls is set to true in the constructor.
Fire an event type.
DispatcherEvent
Presence of the specified event listener.
event name
handler function
Removes the specified event listener
event name
handler function
Private _onPrivate _onHandle transform state. On pointer down, we store the initial state of the selected objects. On pointer up, we calculate the new state of the selected objects and dispatch the appropriate events.
Store the initial state of the selected objects if true.
Private _onPrivate _onPrivate _onActivates the controls.
Private attachPrivate detachProtected findProtected findPrivate handleUpdates the configuration of the controls.
The new configuration.
Private updatePrivate updateStatic installGenerated using TypeDoc
A class for selecting objects in a scene.
Example
Here's some boilerplate to setup the
three-multi-select.Example
Objects are now selectable. But nothing will happen. We can listen to
selecrtanddeselectevents like this:);