Hierarchy

Constructors

Properties

position: default = Vector2.ZERO

The current position of the mouse.

Accessors

  • get target(): null | default<HTMLElement>
  • The component the mouse is currently hovering over. null if the hovered element has no associated component.

    Returns null | default<HTMLElement>

  • get targetElement(): undefined | HTMLElement
  • The element the mouse is currently hovering over.

    Returns undefined | HTMLElement

Methods

  • Returns whether the mouse is currently within the given component, element, or selector.

    Type Parameters

    • W extends undefined | string | Element | default<HTMLElement>

    Parameters

    • Optional what: W

      A component, element, or selector.

    • recalcTarget: boolean = false

      Whether to recalculate the target before this operation. Defaults to false

    Returns undefined | (W extends default<HTMLElement> ? W : HTMLElement)

  • Returns whether the mouse is currently within the given component, element, or selector, or its descendants.

    Type Parameters

    • W extends undefined | string | Element | default<HTMLElement>

    Parameters

    • Optional what: W

      A component, element, or selector.

    • recalcTarget: boolean = false

      Whether to recalculate the target before this operation. Defaults to false

    Returns undefined | (W extends default<HTMLElement> ? W : HTMLElement)

  • Parameters

    • evt: Event & Partial<MouseEvent> & Partial<TouchEvent>

    Returns void

  • Forces a target update. Use as much as you want now ;)

    Parameters

    • force: boolean = false

    Returns void

  • Returns void

Generated using TypeDoc