Register a callback in the engine onAfterRender event
This is called every frame after the main camera has rendered
Parameters
cb: LifecycleMethod
The callback to be called
Optionalopts: LifecycleMethodOptions
Returns (() => void)
A function that can be called to unregister the callback
(): void
Returns void
Example
constunsubscribe = onAfterRender((ctx : Context) => { // do something... console.log("After render"); // if you want to unsubscribe after the first call: unsubscribe(); });
Register a callback in the engine onAfterRender event This is called every frame after the main camera has rendered