Constructor
new KeyControlMethod(keyCode, parameter, velocity, friction, elementopt)
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
keyCode |
number | Key which activates the method when pressed |
||
parameter |
string | The parameter to be controlled (e.g. |
||
velocity |
number | Velocity at which the parameter changes. Use a negative number for opposite direction |
||
friction |
number | Friction at which the parameter stops |
||
element |
Element |
<optional> |
document | DOM element where the key events are listened to |
- Implements:
Methods
destroy()
Destructor.