• 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

    • Optional opts: LifecycleMethodOptions

    Returns (() => void)

    A function that can be called to unregister the callback

      • (): void
      • Returns void

    Example

    const unsubscribe = onAfterRender((ctx : Context) => {
    // do something...
    console.log("After render");
    // if you want to unsubscribe after the first call:
    unsubscribe();
    });

Generated using TypeDoc