/// import type { NgtState } from '../types'; declare type GlobalRenderCallback = (timeStamp: number) => void; /** * Adds a global render callback which is called each frame. */ export declare function addCallback(callback: GlobalRenderCallback): () => void; /** * Adds a global after-render callback which is called each frame. */ export declare function addAfterCallback(callback: GlobalRenderCallback): () => void; /** * Adds a global callback which is called when rendering stops. */ export declare function addTail(callback: GlobalRenderCallback): () => void; export declare function render(timestamp: number, state: () => NgtState, frame?: XRFrame): number; export declare function createLoop(rootStateMap: Map NgtState>): { loop: (timestamp: number) => void; /** * Invalidates the view, requesting a frame to be rendered. Will globally invalidate unless passed a root's state. */ invalidate: (state?: () => NgtState, frames?: number) => void; /** * Advances the frameloop and runs render effects, useful for when manually rendering via `frameloop="never"`. */ advance: (timestamp: number, runGlobalEffects?: boolean, state?: () => NgtState, frame?: XRFrame) => void; }; export {};