/// import { Device, DeviceProps } from '@luma.gl/api'; import { Timeline, AnimationProps } from '@luma.gl/engine'; import { Stats, Stat } from '@probe.gl/stats'; import { default as Query } from '../classic/query'; import { default as Framebuffer } from '../classic/framebuffer'; declare type ContextProps = DeviceProps; /** * Classic Animation Props. * Contain a number of deprecated fields * @deprecated Use new AnimationLoop in `@luma.gl/engine` */ export declare type ClassicAnimationProps = AnimationProps & { animationLoop: ClassicAnimationLoop; /** @deprecated Use .device */ stop: () => ClassicAnimationLoop; /** @deprecated Use .device */ gl: WebGLRenderingContext; /** @deprecated Will be removed */ framebuffer: Framebuffer; /** @deprecated Use .timeline */ _timeline: Timeline; /** @deprecated Use .animationLoop */ _loop: ClassicAnimationLoop; /** @deprecated Use .animationLoop */ _animationLoop: ClassicAnimationLoop; }; /** ClassicAnimationLoop properties */ export declare type ClassicAnimationLoopProps = { onCreateDevice?: (props: DeviceProps) => Promise; onCreateContext?: (props: ContextProps) => WebGLRenderingContext; onAddHTML?: (div: HTMLDivElement) => string; onInitialize?: (animationProps: ClassicAnimationProps) => {} | void; onRender?: (animationProps: ClassicAnimationProps) => void; onFinalize?: (animationProps: ClassicAnimationProps) => void; onError?: (reason: any) => void; stats?: Stats; device?: Device; glOptions?: ContextProps; autoResizeViewport?: boolean; autoResizeDrawingBuffer?: boolean; useDevicePixels?: number | boolean; /** @deprecated Use .device */ gl?: WebGLRenderingContext; /** @deprecated Will be removed */ createFramebuffer?: boolean; }; /** * Convenient animation loop * @deprecated Use `@luma.gl/engine` AnimationLoop */ export default class ClassicAnimationLoop { device: Device; canvas?: HTMLCanvasElement | OffscreenCanvas; props: Required; animationProps: ClassicAnimationProps; framebuffer: Framebuffer; timeline: Timeline; stats: Stats; cpuTime: Stat; gpuTime: Stat; frameRate: Stat; display: any; needsRedraw: string | null; _initialized: boolean; _running: boolean; _animationFrameId: any; _pageLoadPromise: Promise<{}> | null; _nextFramePromise: Promise | null; _resolveNextFrame: ((loop: ClassicAnimationLoop) => void) | null; _cpuStartTime: number; _gpuTimeQuery: Query | null; /** @deprecated */ gl: WebGLRenderingContext; constructor(props?: ClassicAnimationLoopProps); destroy(): void; /** @deprecated Use .destroy() */ delete(): void; setNeedsRedraw(reason: string): this; setProps(props: ClassicAnimationLoopProps): this; start(opts?: {}): this; /** Starts a render loop if not already running */ _start(props: any): Promise; /** Explicitly draw a frame */ redraw(): this; stop(): this; attachTimeline(timeline: Timeline): Timeline; detachTimeline(): void; waitForRender(): Promise; toDataURL(): Promise; isContextLost(): boolean; onCreateDevice(deviceProps: DeviceProps): Promise; onInitialize(animationProps: ClassicAnimationProps): {} | void; onRender(animationProps: ClassicAnimationProps): void; onFinalize(animationProps: ClassicAnimationProps): void; /** @deprecated Use .onCreateDevice() */ onCreateContext(props: ContextProps): WebGLRenderingContext; /** @deprecated */ getHTMLControlValue(id: any, defaultValue?: number): number; _initialize(props: ClassicAnimationLoopProps): void; _getPageLoadPromise(): Promise<{}>; _setDisplay(display: any): void; _requestAnimationFrame(): void; _cancelAnimationFrame(): void; _animationFrame(): void; _renderFrame(props: ClassicAnimationProps): void; _clearNeedsRedraw(): void; _setupFrame(): void; _initializeCallbackData(): void; _updateCallbackData(): void; _finalizeCallbackData(): void; /** Add application's data to the app context object */ _addCallbackData(appContext: any): void; /** Either uses supplied or existing context, or calls provided callback to create one */ _createDevice(props: DeviceProps): Promise; _createInfoDiv(): void; _getSizeAndAspect(): { width: number; height: number; aspect: number; }; /** Default viewport setup */ _resizeViewport(): void; /** * Resize the render buffer of the canvas to match canvas client size * Optionally multiplying with devicePixel ratio */ _resizeCanvasDrawingBuffer(): void; _beginTimers(): void; _endTimers(): void; _startEventHandling(): void; _onMousemove(e: any): void; _onMouseleave(e: any): void; /** @deprecated */ _createFramebuffer(): void; /** @deprecated */ _resizeFramebuffer(): void; } export {}; //# sourceMappingURL=classic-animation-loop.d.ts.map