import { ConwayGeometry } from "../../dependencies/conway-geom/index.js"; import { NativeVectorGeometryCollection, NativeVectorMaterial } from "./native_types.js"; import { WalkableScene } from "./scene.js"; export interface GeometryAggregatorOptions { /** * The maximum aggregate total geometry size that will be passed * through as a chunk (total allocation) on output. The aggregator * will break into chunks by size. Chunks will be output in material * order, but in the case where all the components in a particular * element don't fit in a chunk size, be broken up. * * Individual geometry components will not be broken below this size, but will effectively stand * alone. */ maxGeometrySize?: number; outputSpaces?: boolean; } export interface GeometryChunk { offset: number; count: number; } export interface AggregatedNativeGeometry { geometry: NativeVectorGeometryCollection; materials: NativeVectorMaterial; chunks: GeometryChunk[]; } /** * Aggregates scene geometry and then allows incremental batches * of geometry output to be fed to a convertor. */ export default class GeometryAggregator { private readonly wasmModule; readonly options: Readonly; private readonly materialGeometry; /** * Construct this with a wasm module. * * @param wasmModule The current wasm module. * @param options */ constructor(wasmModule: ConwayGeometry, options: Readonly); /** * Add a scene to this aggregator's batch geometry. * * @param scene * @return {void} */ append(scene: WalkableScene): void; /** * Aggregate this into a set of native/wasm objects to be passed to conway-geom, * and also partition the aggregate into chunks based on the max data size. * * @return {AggregatedNativeGeometry} The aggregated & chunked geometry. */ aggregateNative(): AggregatedNativeGeometry; } //# sourceMappingURL=geometry_aggregator.d.ts.map