Interface MouseEventReceiverInterface

Mouse and touch events

interface MouseEventReceiverInterface {
    onClick?(pos, instanceId?): boolean;
    onDoubleClick?(pos, instanceId?): boolean;
    onDrag?(position, viewport, instanceId?): void;
    onDragCancel?(instanceId?): void;
    onDragEnd?(position, viewport, instanceId?): void;
    onDragStart?(position, viewport, instanceId?): boolean;
    onHold?(pos, instanceId?): boolean;
    onMouseMove?(pos, viewport, instanceId?): void;
    onMouseOut?(pos, viewport, instanceId?): void;
    onMouseOver?(pos, viewport, instanceId?): void;
    onMouseWheel?(pos, delta, instanceId?): boolean;
}

Methods

  • Called for mouse clicks and taps

    Parameters

    Returns boolean

    Return true to consume the event, false to pass it on

  • Called for double clicks and double taps

    Parameters

    Returns boolean

    Return true to consume the event, false to pass it on

  • Called during dragging

    Parameters

    Returns void

  • Called when the user cancels dragging by pressing the escape key

    Parameters

    • Optional instanceId: number

      The index of the instance if the event occurred on an InstancedMesh.

    Returns void

  • Called when the user releases the mouse button after dragging

    Parameters

    Returns void

  • Called when the user starts dragging the target

    Parameters

    Returns boolean

  • Called for click-and-hold and touch-and-hold

    Parameters

    Returns boolean

    Return true to consume the event, false to pass it on

  • Called when the mouse is moved

    Parameters

    Returns void

  • Called when the mouse pointer leaves the target

    Parameters

    Returns void

  • Called when the mouse is hovered on the target

    Parameters

    Returns void

  • Called when the mouse wheel is turned

    Parameters

    • pos: MouseEventCoordinatesInterface

      Mouse position

    • delta: number

      Mouse wheel delta

    • Optional instanceId: number

      The index of the instance if the event occurred on an InstancedMesh.

    Returns boolean

Generated using TypeDoc