gameplate - v2.2.0
    Preparing search index...

    Interface Pointer

    Normalized pointer (mouse/touch/pen) state.

    interface Pointer {
        x: () => number;
        y: () => number;
        isDown: () => boolean;
        onMove: (handler: (state: PointerState) => void) => Unsubscribe;
        onDown: (handler: (state: PointerState) => void) => Unsubscribe;
        onUp: (handler: (state: PointerState) => void) => Unsubscribe;
        destroy: () => void;
    }
    Index

    Properties

    x: () => number

    Last seen X coordinate.

    y: () => number

    Last seen Y coordinate.

    isDown: () => boolean

    true while a primary button is held.

    onMove: (handler: (state: PointerState) => void) => Unsubscribe

    Fires on every pointermove.

    onDown: (handler: (state: PointerState) => void) => Unsubscribe

    Fires on pointerdown.

    onUp: (handler: (state: PointerState) => void) => Unsubscribe

    Fires on pointerup.

    destroy: () => void

    Remove listeners and detach. Idempotent.