Start the game loop with update and draw callbacks.
Object with optional update and draw functions called each frame
update
draw
sg.run({ update(sg) { /* game logic */ }, draw(sg) { sg.clear(0, 0, 0); sg.drawAll(); },}); Copy
sg.run({ update(sg) { /* game logic */ }, draw(sg) { sg.clear(0, 0, 0); sg.drawAll(); },});
Start the game loop with update and draw callbacks.