• Register a callback in the engine onBeforeRender event
    This is called every frame before the main camera renders

    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

    onBeforeRender((ctx : Context) => {
    // do something
    }

Generated using TypeDoc