FORGE. Pointer

new Pointer(displayObject)

Pointer input management, work with mouse and touch screen (using Hammer.js)
Parameters:
Name Type Description
displayObject FORGE.DisplayObject The display object on which you want to listen to pointer events
Source:
To Do:
  • prevent event binding if not supported (ex: prevent pinch if not touch screen)

Extends

Members

(static, constant) cursors :Object

Type:
  • Object
Source:

(static, constant) events :Object

Type:
  • Object
Source:

(static, constant) listenerTypes :Object

Type:
  • Object
Source:

(readonly) alive :boolean

Get the alive flag value of the object.
Type:
  • boolean
Inherited From:
Source:

(readonly) className :string

Get the class name of the object.
Type:
  • string
Inherited From:
Source:

cursor :string

Get or set the cursor value.
Use the constant FORGE.Pointer.cursors to set a valid cursor.
Type:
  • string
Source:

data :*

Get and set any custom data you want to associate to this object.
Type:
  • *
Inherited From:
Source:

debug :boolean

Get and set the debug flag.
Type:
  • boolean
Inherited From:
Source:

enabled :boolean

Get or set the enabled flag.
Type:
  • boolean
Source:

onClick :FORGE.EventDispatcher

Gets the onClick FORGE.EventDispatcher.
The FORGE.EventDispatcher is created only if you ask for it.
This is an alias for onTap.
Type:
Source:

(readonly) onDestroy :FORGE.EventDispatcher

Get the onDestroy FORGE.EventDispatcher, this event is emitted at the end of the destroy sequence.
Type:
Inherited From:
Source:

onDisable :FORGE.EventDispatcher

Gets the onDisable FORGE.EventDispatcher.
The FORGE.EventDispatcher is created only if you ask for it.
Type:
Source:

onDoubleClick :FORGE.EventDispatcher

Gets the onDoubleClick FORGE.EventDispatcher.
The FORGE.EventDispatcher is created only if you ask for it.
This is an alias for onDoubleTap.
Type:
Source:

onDoubleTap :FORGE.EventDispatcher

Gets the onDoubleTap FORGE.EventDispatcher.
The FORGE.EventDispatcher is created only if you ask for it.
Type:
Source:

onDown :FORGE.EventDispatcher

Gets the onDown FORGE.EventDispatcher.
The FORGE.EventDispatcher is created only if you ask for it.
This is an alias for onPressStart.
Type:
Source:

onEnable :FORGE.EventDispatcher

Gets the onEnable FORGE.EventDispatcher.
The FORGE.EventDispatcher is created only if you ask for it.
Type:
Source:

onEnter :FORGE.EventDispatcher

Gets the onEnter FORGE.EventDispatcher.
The FORGE.EventDispatcher is created only if you ask for it.
Type:
Source:

onLeave :FORGE.EventDispatcher

Gets the onLeave FORGE.EventDispatcher.
The FORGE.EventDispatcher is created only if you ask for it.
Type:
Source:

onMove :FORGE.EventDispatcher

Gets the onMove FORGE.EventDispatcher.
The FORGE.EventDispatcher is created only if you ask for it.
Type:
Source:

onOut :FORGE.EventDispatcher

Gets the onOut FORGE.EventDispatcher.
The FORGE.EventDispatcher is created only if you ask for it.
Type:
Source:

onOver :FORGE.EventDispatcher

Gets the onOver FORGE.EventDispatcher.
The FORGE.EventDispatcher is created only if you ask for it.
Type:
Source:

onPanEnd :FORGE.EventDispatcher

Gets the onPanEnd FORGE.EventDispatcher.
The FORGE.EventDispatcher is created only if you ask for it.
Type:
Source:

onPanMove :FORGE.EventDispatcher

Gets the onPanMove FORGE.EventDispatcher.
The FORGE.EventDispatcher is created only if you ask for it.
Type:
Source:

onPanStart :FORGE.EventDispatcher

Gets the onPanStart FORGE.EventDispatcher.
The FORGE.EventDispatcher is created only if you ask for it.
Type:
Source:

onPinchEnd :FORGE.EventDispatcher

Gets the onPinchEnd FORGE.EventDispatcher.
The FORGE.EventDispatcher is created only if you ask for it.
Type:
Source:

onPinchMove :FORGE.EventDispatcher

Gets the onPinchMove FORGE.EventDispatcher.
The FORGE.EventDispatcher is created only if you ask for it.
Type:
Source:

onPinchStart :FORGE.EventDispatcher

Gets the onPinchStart FORGE.EventDispatcher.
The FORGE.EventDispatcher is created only if you ask for it.
Type:
Source:

onPressEnd :FORGE.EventDispatcher

Gets the onPressEnd FORGE.EventDispatcher.
The FORGE.EventDispatcher is created only if you ask for it.
Type:
Source:

onPressStart :FORGE.EventDispatcher

Gets the onPressStart FORGE.EventDispatcher.
The FORGE.EventDispatcher is created only if you ask for it.
Type:
Source:

onRotateEnd :FORGE.EventDispatcher

Gets the onRotateEnd FORGE.EventDispatcher.
The FORGE.EventDispatcher is created only if you ask for it.
Type:
Source:

onRotateMove :FORGE.EventDispatcher

Gets the onRotateMove FORGE.EventDispatcher.
The FORGE.EventDispatcher is created only if you ask for it.
Type:
Source:

onRotateStart :FORGE.EventDispatcher

Gets the onRotateStart FORGE.EventDispatcher.
The FORGE.EventDispatcher is created only if you ask for it.
Type:
Source:

onSwipe :FORGE.EventDispatcher

Gets the onSwipe FORGE.EventDispatcher.
The FORGE.EventDispatcher is created only if you ask for it.
Type:
Source:

onTap :FORGE.EventDispatcher

Gets the onTap FORGE.EventDispatcher.
The FORGE.EventDispatcher is created only if you ask for it.
Type:
Source:

onUp :FORGE.EventDispatcher

Gets the onUp FORGE.EventDispatcher.
The FORGE.EventDispatcher is created only if you ask for it.
This is an alias for onPressEnd.
Type:
Source:

onWheel :FORGE.EventDispatcher

Gets the onWheel FORGE.EventDispatcher.
The FORGE.EventDispatcher is created only if you ask for it.
Type:
Source:

(readonly) tags :Array

Get the tags associated to this object.
Type:
  • Array
Inherited From:
Source:

(readonly) uid :string

Get the uid of the object.
Type:
  • string
Inherited From:
Source:

warning :boolean

Get and set the warning flag.
Type:
  • boolean
Inherited From:
Source:

Methods

(static) getRelativeMousePosition(event) → {THREE.Vector2}

Get the relative mouse position inside the target element of a mouse event
Parameters:
Name Type Description
event MouseEvent The mouse event
Source:
Returns:
Type
THREE.Vector2

destroy()

Destroy sequence
Overrides:
Source:

disable()

Disable the pointer module
Source:

enable()

Enable the pointer module
Source:

log(value)

Basic log method, log a string in the console if debug is enabled.
Parameters:
Name Type Description
value * The value you want to log in the console.
Inherited From:
Source:

warn(valuenullable)

Basic warn method, log a warn string in the console if warning is enabled.
Parameters:
Name Type Attributes Description
value string | Object <nullable>
The value you want to warn in the console.
Inherited From:
Source:

FORGE. Pointer

Members
Methods