API Documentation

for 0.0.1
Show:

PointerObject Class

PointerObject is a thin layer that unify all inputs to simplify UI interactions

Constructor

PointerObject

(
  • x
  • y
  • state
  • type
)

Parameters:

  • x Number
  • y Number
  • state Number
  • type Number

Methods

getComponent

() Object

get the component

Returns:

Object:

component

getDeltaX

() Object

Get the x coordinate

Returns:

Object:

x

getDeltaY

() Object

Get the y coordinate

Returns:

Object:

y

getState!~YUIDOC_LINE~!return state

()

Get the state

getType!~YUIDOC_LINE~!return type

()

Get the type

getX

() Object

Get the x coordinate

Returns:

Object:

x

getY

() Object

Get the y coordinate

Returns:

Object:

y

setComponent

(
  • component
)

Set the component

Parameters:

  • component Object

setDeltaX

(
  • x
)

Set the x coordinate

Parameters:

  • x Object

setDeltaY

(
  • y
)

Set the y delta coordinate

Parameters:

  • y Object

setState

(
  • state
)

Set the state

Parameters:

  • state Boolean

setType!~YUIDOC_LINE~!return type

()

Set the type

setX

(
  • x
)

Set the x coordinate

Parameters:

  • x Object

setY

(
  • y
)

Set the y coordinate

Parameters:

  • y Object

Events

moved

Fired when a pointer moved

off

Fired when a pointer is off (released or erased)

on

Fired when a pointer is on (pressed or down)