/// import { PAGView as NativePAGView } from '../pag-view'; import type { PAGComposition } from '../pag-composition'; export interface PAGViewOptions { /** * Render first frame when pag view init. default true. */ firstFrame?: boolean; } export declare type wxCanvas = (HTMLCanvasElement | OffscreenCanvas) & { requestAnimationFrame: (callback: () => void) => number; cancelAnimationFrame: (requestID: number) => void; }; export declare class PAGView extends NativePAGView { /** * Create pag view. * @param file pag file. * @param canvas target render canvas. * @param initOptions pag view options * @returns */ static init(file: PAGComposition, canvas: HTMLCanvasElement | OffscreenCanvas, initOptions?: PAGViewOptions): Promise; protected pagViewOptions: PAGViewOptions; /** * Update size when changed canvas size. */ updateSize(): void; protected flushLoop(): Promise; protected flushNextFrame(): Promise; protected getNowTime(): number; protected clearTimer(): void; protected resetSize(): void; }