natiny.backend.stop

Lua
natiny.backend.stop()

Ends natiny.backend.loop once the frame it is called from has finished.

Example

Lua
local elapsed = 0

natiny.backend.loop(function(dt)
    elapsed = elapsed + dt
    if elapsed >= 10 then
        natiny.backend.stop()
    end
end)

natiny.backend.shutdown()