import * as THREE from 'three/webgpu'; interface GaussianSplatsHelperCPUResource { readPositionsCPU?: () => Float32Array | null; readScalesCPU?: () => Float32Array | null; readRotationsCPU?: () => Float32Array | null; } export interface GaussianSplatsHelperBuffers { positionsScales?: unknown; rotationsColors?: unknown; } export interface GaussianSplatsHelperTarget extends THREE.Object3D { count: number; maxSplats: number; readonly buffers: GaussianSplatsHelperBuffers | null; _sourceResource: GaussianSplatsHelperCPUResource | null; _coordTransform: THREE.Matrix4 | null; } export interface GaussianSplatsHelperOptions { showBoundingBox?: boolean | undefined; showPerInstanceBoundingBoxes?: boolean | undefined; boxColor?: THREE.ColorRepresentation | undefined; boxOpacity?: number | undefined; perInstanceBoxColor?: THREE.ColorRepresentation | undefined; } /** * Debug helper for visualizing Gaussian Splat bounding boxes. * * Helps debug splat placement by showing: * - Overall bounding box of the entire model * - Per-instance oriented 3D wireframe boxes showing individual splat extents * * For point cloud visualization, use GaussianSplatsPoints instead. * * @class GaussianSplatsHelper * @extends THREE.Object3D * @short Visualizes model bounding box and per-instance wireframe boxes. * @category Helpers * @tags WebGPU */ export declare class GaussianSplatsHelper extends THREE.Object3D { /** Runtime type guard that is always `true` for this helper. */ readonly isGaussianSplatsHelper: true; _splats: GaussianSplatsHelperTarget | null; _showBoundingBox: boolean; _showPerInstanceBoundingBoxes: boolean; _boxColor: THREE.Color; _boxOpacity: number; _perInstanceBoxColor: THREE.Color; _boundingBox: THREE.LineSegments | null; _perInstanceBoxes: THREE.LineSegments | null; /** Stable helper type name. */ static get type(): string; /** * Create a GaussianSplatsHelper. * * @param {GaussianSplats} splats The GaussianSplats instance to visualize. * @param {Object} [options={}] Options. * @param {boolean} [options.showBoundingBox=true] Enable overall model bounding box visualization. * @param {boolean} [options.showPerInstanceBoundingBoxes=false] Enable per-splat oriented 3D wireframe box visualization. * @param {number} [options.boxColor=0x00ff00] Overall bounding box wireframe color. * @param {number} [options.boxOpacity=0.8] Overall bounding box line opacity. * @param {number} [options.perInstanceBoxColor=0xff0000] Per-instance wireframe box color. */ constructor(splats: GaussianSplatsHelperTarget, options?: GaussianSplatsHelperOptions); /** * Create the overall model bounding box visualization. * @private */ _createBoundingBox(): void; /** * Compute bounding box vertices from min/max bounds. * @private */ _computeBoundingBoxVertices(outVertices: Float32Array, minX: number, minY: number, minZ: number, maxX: number, maxY: number, maxZ: number): void; /** * Create the per-instance oriented 2D wireframe plane visualization. * Uses 2D planes oriented by splat rotation, since Gaussian splats are 2D ellipses. * @private */ _createPerInstanceBoxes(): void; /** * Compute transformed 2D plane vertices for all splats. * Uses 2D planes scaled by X and Y dimensions (splats are 2D ellipses). * @private */ _computePerInstancePlaneVertices(outVertices: Float32Array, positions: Float32Array, scales: Float32Array, rotations: Float32Array, count: number, coordTransform: THREE.Matrix4 | null, worldMatrix: THREE.Matrix4): void; /** * Extract array from various buffer formats. * @private */ _getBufferArray(buffer: unknown, fallbackSize: number): Float32Array; /** * Extract positions from packed positionsScales buffer. * Layout: [pos0.xyz, –, scale0.xyz, –, pos1.xyz, ...] * 8 floats per splat (2 vec4 slots; w is padding). * @private */ _getPositions(count: number): Float32Array; /** * Extract scales from packed positionsScales buffer. * Layout: [pos0.xyz, –, scale0.xyz, –, pos1.xyz, ...] * 8 floats per splat (2 vec4 slots; w is padding). * @private */ _getScales(count: number): Float32Array; /** * Extract rotations from packed rotationsColors buffer. * Layout: [rot0.xyzw, color0.rgba, rot1.xyzw, color1.rgba, ...] * @private */ _getRotations(count: number): Float32Array; /** * Update visualizations when splat data changes. */ update(): void; /** * Dispose of helper resources. */ dispose(): void; } export {};