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

    Interface ThreeMouseEventMap<T>Internal

    Event map interface used internally by ButtonInteractionHandler for EventEmitter3 type safety.

    This interface defines the event types that ButtonInteractionHandler can emit. It is used as the generic parameter for EventEmitter3 to provide compile-time type checking for event names and handler signatures. Not intended for direct user inheritance.

    Pointer Support: All events work with mouse, touch, and pen input devices through the PointerEvent API, providing consistent behavior across input methods.

    // Used internally by ButtonInteractionHandler:
    // class ButtonInteractionHandler<Value> extends EventEmitter<ThreeMouseEventMap<Value>>

    // Users interact with events through the handler, not this interface directly:
    import { ClickableMesh } from '@masatomakino/threejs-interactive-object';

    const clickableMesh = new ClickableMesh();
    clickableMesh.interactionHandler.on('click', (e) => {
    console.log('Clicked!', e.interactionHandler?.value);
    });

    This interface is primarily for internal type system use

    interface ThreeMouseEventMap<T = unknown> {
        click: (e: ThreeMouseEvent<T>) => void;
        down: (e: ThreeMouseEvent<T>) => void;
        out: (e: ThreeMouseEvent<T>) => void;
        over: (e: ThreeMouseEvent<T>) => void;
        select: (e: ThreeMouseEvent<T>) => void;
        up: (e: ThreeMouseEvent<T>) => void;
    }

    Type Parameters

    • T = unknown

      The type of value associated with the interactive object

    Index

    Properties

    Properties

    click: (e: ThreeMouseEvent<T>) => void

    Fired when the object is clicked/tapped (after pointerdown and pointerup sequence)

    down: (e: ThreeMouseEvent<T>) => void

    Fired when a pointer button/finger is pressed down over the object

    out: (e: ThreeMouseEvent<T>) => void

    Fired when the pointer leaves the object bounds

    over: (e: ThreeMouseEvent<T>) => void

    Fired when the pointer enters the object bounds (mouse hover, touch proximity)

    select: (e: ThreeMouseEvent<T>) => void

    Fired when the object's selection state changes (checkboxes, radio buttons)

    up: (e: ThreeMouseEvent<T>) => void

    Fired when a pointer button/finger is released over the object