FORGE. AxisBinding

new AxisBinding(viewer, axis, changeopt, nullable, contextopt, nameopt)

Axis binding object that handles axis event for a list of axes. To use an axis binding, you have to add ti to a FORGE.Gamepad.
Parameters:
Name Type Attributes Description
viewer FORGE.Viewer the viewer reference
axis number the axis code associated to this binding
change function | string | Array.<string> <optional>
<nullable>
the callback function that will be called on an axis changement
context Object <optional>
the context in which you want the callbacks to be executed
name string <optional>
the name of the binding
Source:

Extends

Members

(readonly) alive :boolean

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

(readonly) axis :number

Gets the axis associated to this binding.
Type:
  • number
Source:

(readonly) className :string

Get the class name of the object.
Type:
  • string
Inherited From:
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:

(readonly) name :string

Gets the name of this BaseBinding.
Type:
  • string
Inherited From:
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:

(readonly) tags :Array

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

(readonly) type :string

Gets the type of this BaseBinding.
Type:
  • string
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

_boot()

Boot sequence
Source:

change(value)

This method is called by the input associated when an axis is changed. This triggers the change callbacks associated to this binding.
Parameters:
Name Type Description
value number the value of the axis
Source:

destroy()

Destroy sequence.
Overrides:
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. AxisBinding

Members
Methods