Type of value associated with the interactive object
Creates a ClickableObject instance (deprecated).
Configuration parameters for the handler
Protected
Internal
_Internal alpha multiplier for opacity control.
Protected
Internal
_Internal state tracking enabled/disabled status.
Protected
Internal
_Internal state tracking pointer hover status.
Protected
Internal
_Internal state tracking pointer press status.
Protected
Optional
Internal
_Internal reference to the material set.
Temporarily prevents interaction handling while maintaining current visual state.
Controls whether the object responds to pointer interactions.
Current visual interaction state of the object.
Arbitrary data associated with this interactive object.
Readonly
viewThe display object being managed by this interaction handler.
Static
prefixedSets the opacity alpha multiplier for the material set.
Alpha value between 0.0 (transparent) and 1.0 (opaque)
Indicates whether the pointer is currently hovering over the object.
True if pointer is over the object, false otherwise
Indicates whether the pointer is currently pressed down on the object.
True if pointer is pressed down, false otherwise
Gets the current StateMaterialSet managing visual states.
The current material set, or undefined if none is assigned
Sets the StateMaterialSet for managing visual states.
The material set to assign, or undefined to remove
Optional
context: anyProtected
checkProtected
Checks if the object is currently active and can respond to interactions.
True if the object is enabled and not frozen, false otherwise
Calls each of the listeners registered for a given event.
Return an array listing the events for which the emitter has registered listeners.
Return the number of listeners listening to a given event.
Return the listeners registered for a given event.
Optional
fn: (Optional
context: anyOptional
once: booleanAdd a listener for a given event.
Optional
context: anyAdd a one-time listener for a given event.
Optional
context: anyHandles pointer down events and transitions to pressed state.
The pointer down event containing interaction details
Handles pointer out events.
The pointer out event containing interaction details
Handles pointer over events.
The pointer over event containing interaction details
Handles pointer up events and manages click detection logic.
The pointer up event containing interaction details
Remove all listeners, or those of the specified event.
Optional
event: keyof ThreeMouseEventMap<Value>Remove the listeners of a given event.
Optional
fn: (Optional
context: anyOptional
once: booleanSwitches the interactive object between enabled and disabled states.
True to enable, false to disable
Protected
updateProtected
Updates the display object's material based on current state and settings.
Protected
updateProtected
Updates the current interaction state and refreshes the visual representation.
The new interaction state to apply
Legacy alias for ButtonInteractionHandler.
Deprecated
Use ButtonInteractionHandler instead. This class will be removed in next minor version.
Description
This class exists solely for backward compatibility with existing codebases that may be using the old ClickableObject class name. All functionality is identical to ButtonInteractionHandler, but the class emits a console warning when instantiated to encourage migration to the new class name.
The class was renamed to improve clarity about its purpose. The original "Object" suffix was ambiguous in the Three.js ecosystem where Object3D serves as the base class for display objects. The "InteractionHandler" suffix clearly indicates that this class specializes in pointer event handling and state management rather than being a display object itself.
Example