justPressed(duration) → {boolean}
Returns the "just pressed" state of this button.
Just pressed is considered true if the button was pressed down within the duration given (default 250ms).
Parameters
Name | Type | Argument | Default | Description |
---|---|---|---|---|
duration | number | <optional> | 250 | The duration in ms below which the button is considered as being just pressed. |
Returns
boolean -
True if the button is just pressed otherwise false.
- Source code: input/DeviceButton.js (Line 228)
Please login to continue.