The input system is responsible for handling all input events like pointer events (mouse, touch, xr controllers) and keyboard events.

Implements

  • IInput

Accessors

  • get mouseClick(): boolean
  • Returns boolean

  • get mouseDoubleClick(): boolean
  • Returns boolean

  • get mouseDown(): boolean
  • Returns boolean

  • get mousePressed(): boolean
  • Returns boolean

  • get mouseUp(): boolean
  • Returns boolean

  • get mouseWheelChanged(): boolean
  • Returns boolean

Methods

  • Adds an event listener for the specified event type. The callback will be called when the event is triggered.

    Parameters

    • type: InputEvents | InputEventNames

      The event type to listen for

    • callback: InputEventListener

      The callback to call when the event is triggered

    • Optional options: EventListenerOptions

      The options for adding the event listener

    Returns void

  • Returns void

  • Type Parameters

    • T extends unknown

    Parameters

    • vec2: T

    Returns T

  • Parameters

    Returns void

  • Returns void

  • Parameters

    • Optional pointerType: string | string[] | PointerType[]

    Returns Generator<number, any, unknown>

  • the first button that was down and is currently pressed

    Parameters

    • pointerId: number

    Returns number

  • Parameters

    • i: number

    Returns boolean

  • Check if a pointer id is currently used.

    Parameters

    • pointerId: number

    Returns boolean

  • Parameters

    • i: number

    Returns boolean

  • Returns string

  • Returns string

  • the last (most recent) button that was down and is currently pressed

    Parameters

    • pointerId: number

    Returns number

  • Parameters

    • i: number = 0

    Returns boolean

  • Parameters

    • i: number = 0

    Returns number

  • Parameters

    • i: number

    Returns boolean

  • Parameters

    • i: number

    Returns boolean

  • Parameters

    • i: number

    Returns boolean

  • Parameters

    • i: number

    Returns number

  • Parameters

    • i: number

    Returns Event

  • Parameters

    • i: number

    Returns boolean

  • Parameters

    • i: number

    Returns any

  • Parameters

    • i: number

    Returns any

  • Parameters

    • i: number

    Returns any

  • Parameters

    • i: number

    Returns any

  • Parameters

    • i: number

    Returns boolean

  • how many pointers are currently pressed

    Returns number

  • Parameters

    • i: number

    Returns boolean

  • Parameters

    • i: number

    Returns number

  • Returns number

  • Parameters

    • keyCode: string

    Returns boolean

  • Parameters

    • keyCode: string

    Returns boolean

  • Parameters

    • keyCode: string

    Returns boolean

  • Removes the event listener from the specified event type. If no queue is specified the listener will be removed from all queues.

    Parameters

    • type: InputEvents | InputEventNames

      The event type to remove the listener from

    • callback: InputEventListener

      The callback to remove

    • Optional options: EventListenerOptions

      The options for removing the event listener

    Returns void

  • Returns void

  • Returns void

  • Returns void

Generated using TypeDoc