Register a callback in the engine start event. This happens at the beginning of each frame
The callback to be called. Optionally return a function that will be called when the onStart callback is removed again
Optional
A function that can be called to unregister the callback
onStart((ctx : Context) => { // do something console.log("Needle Engine: onStart registered") // optional to cleanup: return () => { console.log("OnStart removed") }} Copy
onStart((ctx : Context) => { // do something console.log("Needle Engine: onStart registered") // optional to cleanup: return () => { console.log("OnStart removed") }}
Register a callback in the engine start event.
This happens at the beginning of each frame