import type { IndexedMeshoptFetch, IndexedMeshoptTrackDecoderDiagnostics, IndexedMeshoptTrackDescriptor, MeshoptVertexDecoderLike } from '../MotionTracks/IndexedMeshoptTrack.js'; import type { VAVNumericalTrack } from './VAVManifest.js'; /** Availability surface used by the VAV playback scheduler. */ export interface VAVMeshoptStream { manifest: { totalFrames: number; width: number; height: number; }; availableFrames: () => number; bufferedFrames: () => number; whenFrameAvailable: (frame?: number) => Promise; dispose: () => void; } /** Decoded atlas sink. The receiver may retain the newly allocated frame bytes. */ export type VAVMeshoptProcess = (planes: Uint8Array, id: number) => void; export interface VAVMeshoptDecoderOptions { kind: 'geometry' | 'appearance'; vertexCount: number; meshoptDecoder: MeshoptVertexDecoderLike; resolveFile?: (file: string) => string; fetchImpl?: IndexedMeshoptFetch; process?: VAVMeshoptProcess; } export interface VAVMeshoptDiagnostics { backend: 'indexed-meshopt'; track: 'geometry' | 'appearance'; requestedFrames: number; publishedFrames: number; atlasBytesWritten: number; suspended: boolean; decoder: Readonly | null; disposed: boolean; } /** * Adapt canonical VAV lanes from UTSBM blocks back into the two-slot R8 plane-atlas layout. * * The adapter retains no decoded frame beyond the transport's bounded block residency. * `request()` publishes one newly allocated atlas at a time, while the VAV mesh owns exactly * two presented texture slots. */ export declare class VAVMeshoptDecoder { #private; readonly descriptor: IndexedMeshoptTrackDescriptor; readonly track: Pick; readonly kind: 'geometry' | 'appearance'; readonly vertexCount: number; readonly stream: VAVMeshoptStream; readonly loading: Promise; lastDecodeMs: number; constructor(descriptor: IndexedMeshoptTrackDescriptor, track: Pick, { kind, vertexCount, meshoptDecoder, resolveFile, fetchImpl, process, }: VAVMeshoptDecoderOptions); request(frames: Iterable): Promise; setFrame(index: number): Promise; suspend(): void; resume(): void; getDiagnostics(): Readonly; dispose(): void; }