Constructor
new Controls()
Methods
addMethodGroup(groupId, methodIds)
Create a method group, which can be used to more conveniently enable or disable several control methods at once
Parameters:
Name | Type | Description |
---|---|---|
groupId |
String | |
methodIds |
Array.<String> |
attach(renderLoop)
Attaches the controls to a RenderLoop. The RenderLoop will be woken up when the controls are activated
Parameters:
Name | Type | Description |
---|---|---|
renderLoop |
RenderLoop |
attached()
Parameters:
Type | Description |
---|---|
Boolean |
destroy()
Destructor.
detach()
Detaches the controls
disable()
Disables the controls
disableMethod(id)
Parameters:
Name | Type | Description |
---|---|---|
id |
String |
disableMethodGroup(groupId)
Disables all the control methods in the group
Parameters:
Name | Type | Description |
---|---|---|
groupId |
String |
enable()
Enables the controls
enabled() → {Boolean}
Returns:
- Type
- Boolean
enableMethod(id)
Parameters:
Name | Type | Description |
---|---|---|
id |
String |
enableMethodGroup(groupId)
Enables all the control methods in the group
Parameters:
Name | Type | Description |
---|---|---|
groupId |
String |
method(id) → {ControlMethod}
Parameters:
Name | Type | Description |
---|---|---|
id |
String |
Returns:
- Type
- ControlMethod
methodGroups() → {Array.<ControlMethodGroup>}
Returns:
List of control method groups
- Type
- Array.<ControlMethodGroup>
methods() → {Array.<ControlMethod>}
Returns:
List of registered @{link ControlMethod instances}
- Type
- Array.<ControlMethod>
registerMethod(id, instance, enableopt)
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
id |
String | |||
instance |
ControlMethod | |||
enable |
Boolean |
<optional> |
false |
removeMethodGroup(groupId)
Parameters:
Name | Type | Description |
---|---|---|
groupId |
String |
unregisterMethod(id)
Parameters:
Name | Type | Description |
---|---|---|
id |
String |