Constructor
new ProcessInterval(optionsopt)
Create a new ProcessInterval.
Parameters:
Name | Type | Attributes | Default | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options | object | <optional> | {} | Options of the process. Properties
|
- Source
Members
fps :number
Frame rate per second of the process.
Type:
- number
- Source
pause :boolean
If true, the process is paused and ProcessIntervalTickRequesters are not called.
Type:
- boolean
- Source
tickRequesters :Array.<ProcessIntervalTickRequester>
Buffer of ProcessIntervalTickRequesters.
Type:
- Array.<ProcessIntervalTickRequester>
- Source
Methods
addtickRequester(cb)
Add a new ProcessIntervalTickRequester to the list.
Parameters:
Name | Type | Description |
---|---|---|
cb | ProcessIntervalTickRequester | The ProcessIntervalTickRequester to add. |
- Source
setPause(value)
Pause or resume the process.
Parameters:
Name | Type | Description |
---|---|---|
value | boolean | The new pause state of the process. |
- Source
start(requesteropt)
Start the process and call the tick function on each interval.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
requester | ProcessIntervalTickRequester | <optional> | Optional default ProcessIntervalTickRequester. |
- Source
stop()
Stop the process and clear all tick requesters.
- Source