UNPKG

three-virtual-geometry

Version:

Virtual geometry for three.js WebGPU: automatic cluster LOD and GPU-driven culling for billions of triangles. Independent implementation, not affiliated with Epic Games.

15 lines (14 loc) • 823 B
export interface AggregateResult { /** Triangles of the simplified group. Vertex ids >= `firstNewVertex` refer to `newVertices`. */ indices: Uint32Array; error: number; /** Widened copies of thinned pieces: positions, and the source vertex each copy takes its other attributes from. */ newPositions: Float32Array; newSources: Uint32Array; firstNewVertex: number; } /** * Simplifies a group of aggregate geometry toward `targetTriangles`. `owner[weld[v]]` is the group using welded * vertex v (or -2 when several groups do); `group` is this group's id. Returns null when it cannot remove anything. */ export declare function simplifyAggregate(indices: Uint32Array, positions: Float32Array, weld: Uint32Array, owner: Int32Array, group: number, targetTriangles: number): AggregateResult | null;