The Matter.Mouse module contains methods for creating and manipulating mouse inputs.

Hierarchy

  • default

Constructors

Methods

  • Gets the mouse position relative to an element given a screen pixel ratio.

    Parameters

    Returns IVector

    The mouse position

    Method

    _getRelativeMousePosition

  • Clears all captured source events.

    Parameters

    Returns void

    Method

    clearSourceEvents

  • Creates a mouse input.

    Parameters

    • Optional element: HTMLElement

    Returns IMouse

    A new mouse

    Method

    create

  • Sets the element the mouse is bound to (and relative to).

    Parameters

    • mouse: IMouse
    • element: HTMLElement

    Returns void

    Method

    setElement

Generated using TypeDoc