wasm-spatial-core
    Preparing search index...

    Function pointCloudStats

    • Compute comprehensive statistics for a point cloud.

      Returns a JSON string with:

      • pointCount: Number of points
      • bounds: { minX, minY, minZ, maxX, maxY, maxZ }
      • centroid: [cx, cy, cz]
      • averagePointSpacing: Average nearest-neighbor distance (sampled)
      • density: Points per cubic meter

      For large point clouds (>100K points), nearest-neighbor computation is sampled to keep performance reasonable.

      Parameters

      • positions: Float32Array

      Returns string