Type of value associated with the radio button
Creates a RadioButtonObject instance (deprecated).
Configuration parameters for the radio button handler
Protected
Internal
_Internal alpha multiplier for opacity control.
Protected
Internal
_Internal state tracking enabled/disabled status.
Protected
_Protected
_Protected
Optional
Internal
_Internal reference to the material set.
Protected
Internal
hoverSet of pointer IDs currently hovering over the object.
Controls whether this object is scannable by MouseEventManager during interaction detection.
Protected
Internal
pressSet of pointer IDs currently in pressed state.
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 multiplier value (minimum 0.0 for transparency, no maximum limit)
Controls the overall opacity of the interactive object by setting an alpha multiplier that is applied to all materials in the material set. This allows for fade effects while preserving the relative opacity differences between different interaction states.
Values above 1.0 are permitted to allow compensation for materials with low base opacity (e.g., alpha=5.0 with material opacity=0.2 results in final opacity=1.0). Negative values are clamped to 0.0 to prevent invalid opacity states.
Indicates whether the object is currently enabled for interactions.
True if the object is enabled, false if disabled
This getter provides read-only access to the internal enabled state. When enabled, the object can respond to pointer interactions; when disabled, the object becomes non-interactive and displays in disabled visual state.
Temporarily prevents interaction handling while maintaining current visual state.
Gets the current exclusive selection state of the radio button.
True if the radio button is exclusively selected (non-interactive), false otherwise
Returns the exclusive selection state that prevents re-selection of already selected radio buttons. This state is controlled externally by RadioButtonManager to maintain exclusive selection behavior in radio button groups. When a radio button is exclusively selected, it becomes non-interactive to prevent re-selection of the same option.
Gets the current frozen state of the radio button.
True if the radio button is frozen (selected and non-interactive), false otherwise
Use isExclusivelySelected
instead. This property will be removed in the next minor version.
Legacy property for backward compatibility. Use isExclusivelySelected
for better clarity
about the RadioButtonManager's exclusive selection behavior.
isExclusivelySelected - Recommended replacement property
Indicates whether any pointer is currently hovering over the object.
True if one or more pointers are over the object, false otherwise
Indicates whether any pointer is currently pressed down on the object.
True if one or more pointers are 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
Gets the current selection state of the checkbox.
True if the checkbox is currently selected, false otherwise
Internal
Forces selection state change for exclusive radio button group management.
True to select the radio button, false to deselect
Internal method specifically designed for RadioButtonManager to force selection state changes during exclusive group management. This method ensures predictable visual behavior in radio button groups:
Optional
context: anyProtected
calculateProtected
Calculates the appropriate interaction state based on current conditions.
The calculated interaction state
Protected
checkProtected
Checks if the radio button can respond to pointer interactions.
True if the radio button is enabled and not exclusively selected, false otherwise
Overrides the base checkActivity to include exclusive selection state consideration. Radio buttons become exclusively selected when chosen to prevent re-selection, implementing the exclusive selection behavior required for radio button groups.
Activity status depends on both:
_enable
state (inherited from ButtonInteractionHandler)_isExclusivelySelected
state (RadioButton-specific, controlled by RadioButtonManager)The exclusive selection state is managed externally by RadioButtonManager, not by the radio button itself. When a radio button is selected, RadioButtonManager sets isExclusivelySelected=true to prevent further interactions.
RadioButtonManager.select - External method that controls exclusive selection state
Disables the interactive object, preventing response to pointer interactions.
Calls each of the listeners registered for a given event.
Enables the interactive object, allowing it to respond to pointer interactions.
Sets the object to an enabled state, making it responsive to pointer interactions
and updating the interaction state based on current pointer conditions ("over" or "normal").
This is equivalent to calling switchEnable(true)
and, on enable, clears pressed-pointer
state while preserving hover state.
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 click interactions by toggling selection state and emitting select events.
Overrides base onMouseClick to implement checkbox toggle behavior. Toggles internal selection state, emits select event, and updates material for visual feedback. Respects activity state via checkActivity to ensure API consistency.
Handles 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 with multi-touch suppression.
The pointer up event containing interaction details
Processes pointer up events by checking for same-pointer-ID press state, removing the pointer from the pressed set, determining the next visual state based on hover status, and emitting the up event. Click events are only triggered when the same pointer ID was previously pressed down (same-ID click detection).
Multi-touch Click Suppression: When a click is triggered, all remaining pressed pointers are cleared to prevent subsequent click events. This matches native browser behavior where multi-touch gestures suppress synthetic click events.
Browser behavior investigation on iPad revealed that multi-touch interactions naturally suppress click events. This implementation replicates that behavior by clearing the press map after the first successful click, preventing additional pointers from triggering subsequent clicks during the same multi-touch interaction.
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
Changes the enabled state of the interactive object and immediately updates the interaction state and material. When disabled, all pointer states are cleared to prevent stale multitouch interactions. When enabled, only press states are cleared while hover states are preserved to maintain visual feedback.
Protected
updateProtected
Updates the display object's material based on current interaction and selection state.
Protected
updateProtected
Updates the current interaction state and refreshes the visual representation.
The new interaction state to apply
Legacy alias for RadioButtonInteractionHandler.
Deprecated
Use RadioButtonInteractionHandler instead. This class will be removed in next minor version.
Description
This class exists solely for backward compatibility. All functionality is identical to RadioButtonInteractionHandler. See ClickableObject for details on the renaming rationale.
Example
See
RadioButtonInteractionHandler - The recommended replacement class