.new Loop(func, useClockopt)
- Source:
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
func |
function
|
|
function to execute on each animation frame |
|
useClock |
Boolean
|
<optional> |
true
|
passes a Clock to the function when called, if true |
Methods
.start(worldopt)
Starts this loop, clock if it has one. Won't do anything if loop enabled already.
- Source:
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
world |
Component
|
<optional> |
app to add this loop to, if provided. |
.stop(worldopt)
Stops this loop and its clock if it has one, won't do anything if this loop is not enabled)
- Source:
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
world |
Component
|
<optional> |
app to remove this loop from, if provided. |