import type { WebGPUContext } from './WebGPUContext.js'; import type { GaussianSplatSorter, CameraState } from './GaussianSplatSorter.js'; import type { INeuralSplatPacket } from '@holoscript/core'; export interface ExtractorOptions { /** Maximum splats to extract */ maxSplats: number; } /** * Extracts raw GPU sorted data from a GaussianSplatSorter. * Uses GPUBuffer.mapAsync to read back the `compressedSplatBuffer` and `sortValuesA` buffers * which contain the natively sorted WebGPU output. * * Mitigation for mapAsync stalls: We use double buffering to pipeline the readbacks. */ export declare class GaussianSplatExtractor { private context; private device; private options; private readbackBuffersA; private readbackBuffersB; private isUsingA; private ongoingReadback; private frameCounter; constructor(context: WebGPUContext, options: ExtractorOptions); private initializeBuffers; private createReadbackBuffer; /** * Captures the sorted state of the GaussianSplatSorter. * Internally pipelines the GPU readback to avoid stalling the main render loop. */ extractFrame(sorter: GaussianSplatSorter, camera: CameraState, compressedSource: GPUBuffer, indicesSource: GPUBuffer): Promise; } //# sourceMappingURL=GaussianSplatExtractor.d.ts.map