Options
All
  • Public
  • Public/Protected
  • All
Menu

Class TouchInput

Hierarchy

  • TouchInput

Index

Constructors

Protected constructor

Properties

Static _date

_date: number

Static _mousePressed

_mousePressed: boolean

Static _pressedTime

_pressedTime: number

Static _screenPressed

_screenPressed: boolean

Static _x

_x: number

Static _y

_y: number

Static date

date: number

[read-only] The time of the last input in milliseconds.

static
property

date

Static keyRepeatInterval

keyRepeatInterval: Frames

The interval of the pseudo key repeat in frames.

static
property

keyRepeatInterval

Static keyRepeatWait

keyRepeatWait: Frames

The wait time of the pseudo key repeat in frames.

static
property

keyRepeatWait

Static wheelX

wheelX: number

[read-only] The horizontal scroll amount.

static
property

wheelX

Static wheelY

wheelY: number

[read-only] The vertical scroll amount.

static
property

wheelY

Static x

x: number

[read-only] The x coordinate on the canvas area of the latest touch event.

static
property

x

Static y

y: number

[read-only] The y coordinate on the canvas area of the latest touch event.

static
property

y

Methods

Static clear

  • clear(): void

Static initialize

  • initialize(): void

Static isCancelled

  • isCancelled(): boolean
  • Checks whether the right mouse button is just pressed.

    static
    method

    isCancelled

    Returns boolean

    True if the right mouse button is just pressed

Static isLongPressed

  • isLongPressed(): boolean
  • Checks whether the left mouse button or touchscreen is kept depressed.

    static
    method

    isLongPressed

    Returns boolean

    True if the left mouse button or touchscreen is long-pressed

Static isMoved

  • isMoved(): boolean
  • Checks whether the mouse or a finger on the touchscreen is moved.

    static
    method

    isMoved

    Returns boolean

    True if the mouse or a finger on the touchscreen is moved

Static isPressed

  • isPressed(): boolean
  • Checks whether the mouse button or touchscreen is currently pressed down.

    static
    method

    isPressed

    Returns boolean

    True if the mouse button or touchscreen is pressed

Static isReleased

  • isReleased(): boolean
  • Checks whether the left mouse button or touchscreen is released.

    static
    method

    isReleased

    Returns boolean

    True if the mouse button or touchscreen is released

Static isRepeated

  • isRepeated(): boolean
  • Checks whether the left mouse button or touchscreen is just pressed or a pseudo key repeat occurred.

    static
    method

    isRepeated

    Returns boolean

    True if the mouse button or touchscreen is repeated

Static isTriggered

  • isTriggered(): boolean
  • Checks whether the left mouse button or touchscreen is just pressed.

    static
    method

    isTriggered

    Returns boolean

    True if the mouse button or touchscreen is triggered

Static update

  • update(): void

Generated using TypeDoc