Taos API Reference
    Preparing search index...

    Class MouseInput

    Held-button + position tracker for mouse-driven controllers, mirroring KeyboardInput. Tracks the cursor position (CSS pixels, relative to the page), which buttons are held (0 = left, 1 = middle, 2 = right), and an accumulating wheel delta that callers drain each frame.

    Like the keyboard tracker it recovers from missed mouseups (window blur / tab hidden) by clearing held buttons, so a button can't stick "down" after focus leaves the page.

    Index

    Constructors

    Properties

    Accessors

    Methods

    Constructors

    Properties

    position: { x: number; y: number } = ...

    Cursor position in CSS pixels (clientX/clientY of the last move).

    Accessors

    Methods

    • True while mouse button is held (0 = left, 1 = middle, 2 = right).

      Parameters

      • button: number

      Returns boolean