Classes
Methods
(static) FrameRate(framerate) → {LoopMode}
Create a loop mode that uses setTimeout at the specified frame rate.
The framerate is specified at frames per second.
Parameters:
Name | Type | Description |
---|---|---|
framerate |
number | the framerate the app should run at. |
Returns:
- Type
- LoopMode
(static) NTimes(nTimes) → {LoopMode}
Create a loop mode that loops a specific number of times and
the stops the app.
Parameters:
Name | Type | Description |
---|---|---|
nTimes |
number | the number of times that app should loop |
Returns:
- Type
- LoopMode
(static) Once() → {LoopMode}
Create a loop mode that loops the app once and then stops the app.
This is a shorthand for calling NTimes(1).
Returns:
- Type
- LoopMode
(static) RefreshSync() → {LoopMode}
Create a loop mode that uses requestAnimationFrame()
Returns:
- Type
- LoopMode