@masatomakino/threejs-interactive-object
    Preparing search index...

    Class ButtonInteractionHandler<Value>

    The ButtonInteractionHandler class is responsible for managing the interactions with button-like objects. Each button-like object can be represented as a ClickableMesh, ClickableSprite, or ClickableGroup, and can have an associated value. The ButtonInteractionHandler class handle the interaction events and update the state of the button-like object accordingly.

    The generic parameter Value represents the type of the value property associated with this button.

    Type Parameters

    • Value

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    _alpha: number = 1.0
    _enable: boolean = true
    _isOver: boolean = false
    _isPress: boolean = false
    _materialSet?: StateMaterialSet
    frozen: boolean = false
    mouseEnabled: boolean = true
    state: ClickableState = "normal"
    value: undefined | Value

    The value property represents an arbitrary value associated with this button. This value can be used by classes listening to events from multiple buttons to differentiate the operations based on this value.

    prefixed: string | boolean

    Accessors

    Methods

    • Return an array listing the events for which the emitter has registered listeners.

      Returns (keyof ThreeMouseEventMap<Value>)[]

    • Return the number of listeners listening to a given event.

      Parameters

      Returns number

    • Remove all listeners, or those of the specified event.

      Parameters

      • Optionalevent: keyof ThreeMouseEventMap<Value>

      Returns this

    • Remove the listeners of a given event.

      Type Parameters

      Parameters

      Returns this