new ControllerManager(viewer)
Parameters:
Name | Type | Description |
---|---|---|
viewer |
FORGE.Viewer | viewer reference. |
- Source:
Extends
Members
(static, constant) DEFAULT_CONFIG
Controllers default configuration
- Source:
(readonly) active :boolean
know if any of the controllers is currently in use
Type:
- boolean
- 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:
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 global enabled flag.
Type:
- boolean
- Source:
(readonly) onControlEnd :FORGE.EventDispatcher
Get the "onControlEnd" FORGE.EventDispatcher of the camera controller.
Type:
- Source:
(readonly) onControlStart :FORGE.EventDispatcher
Get the "onControlStart" FORGE.EventDispatcher of the camera controller.
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:
(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
addConfig(config)
Add a config to the manager.
Parameters:
Name | Type | Description |
---|---|---|
config |
ControllersConfig | The config you want to add. |
- Source:
destroy()
Destroy method.
- Overrides:
- Source:
getByType(type) → (nullable) {FORGE.ControllerBase}
Get a controller by its type.
Parameters:
Name | Type | Description |
---|---|---|
type |
string | The type of the controller you want to get. |
- Source:
Returns:
return the desired type controller, null if not found
- Type
- FORGE.ControllerBase
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:
notifyControlEnd(controller)
Controllers will call this method to notify the manager that a controller ends.
Parameters:
Name | Type | Description |
---|---|---|
controller |
FORGE.ControllerBase | The controller that notifies the manager. |
- Source:
notifyControlStart(controller)
Controllers will call this method to notify the manager that a control start.
Parameters:
Name | Type | Description |
---|---|---|
controller |
FORGE.ControllerBase | The controller that notifies the manager. |
- Source:
update()
Controllers update routine
- 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: