natiny.backend.loop
natiny.backend.loop(callback)
Starts the main application loop. The callback is called once per frame.
Parameters
| Name | Type | Description |
|---|---|---|
callback |
function |
Function called every frame with delta time in seconds |
Example
natiny.backend.loop(function(dt)
update(dt)
end)
Notes
- On web this uses
requestAnimationFrame.