Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Touch

The touch point class

Hierarchy

  • Touch

Index

Constructors

constructor

  • newTouch(x: number, y: number, id?: number): Touch

Properties

Private _id

_id: number = 0

Private _lastModified

_lastModified: number = 0

Private _point

_point: Vec2 = new Vec2()

Private _prevPoint

_prevPoint: Vec2 = new Vec2()

Private _startPoint

_startPoint: Vec2 = new Vec2()

Private _startPointCaptured

_startPointCaptured: boolean = false

Accessors

lastModified

  • get lastModified(): number

Methods

getDelta

getID

  • getID(): number

getLocation

getLocationInView

getLocationX

  • getLocationX(): number

getLocationY

  • getLocationY(): number

getPreviousLocation

getPreviousLocationInView

  • getPreviousLocationInView(out?: Vec2): Vec2

getStartLocation

getStartLocationInView

  • getStartLocationInView(out?: Vec2): Vec2

getUIDelta

getUILocation

getUILocationX

  • getUILocationX(): number

getUILocationY

  • getUILocationY(): number

getUIPreviousLocation

  • getUIPreviousLocation(out?: Vec2): Vec2

getUIStartLocation

setPoint

  • setPoint(point: Vec2): void
  • setPoint(x: number, y: number): void

setPrevPoint

  • setPrevPoint(point: Vec2): void
  • setPrevPoint(x: number, y: number): void

setTouchInfo

  • setTouchInfo(id?: number, x?: undefined | number, y?: undefined | number): void
  • Resets touch point information.

    Parameters

    • Default value id: number = 0

      The id of the touch point

    • Optional x: undefined | number

      x position of the touch point

    • Optional y: undefined | number

      y position of the touch point

    Returns void

Generated using TypeDoc