/** * PLY (Stanford Polygon) reader — point clouds only. * * Supports `format ascii 1.0`, `format binary_little_endian 1.0`, and * `format binary_big_endian 1.0`. Reads the `vertex` element exclusively; * `face` and other elements are skipped (they're meaningful for surface * meshes but not for the scan-style files this viewer ingests). * * Position fields (x/y/z) are required. RGB (r/g/b or red/green/blue, * uchar) and intensity (intensity, uchar/ushort/float) are optional and * surfaced when present. Returns a single `DecodedPointChunk` — large * .ply files (>25M points) get bounded by `streamPointCloud`'s memory * cap which downsamples upstream. */ import type { DecodedPointChunk } from '../types.js'; interface PropertyDecl { name: string; type: string; size: number; /** Byte offset within a single vertex record (binary mode only). */ offset: number; } interface ElementDecl { name: string; count: number; properties: PropertyDecl[]; /** Bytes per record (binary mode); unused for ascii. */ recordSize: number; /** * The element declares at least one `property list`. Lists are variable * length, so `recordSize`/`properties` no longer describe the full record — * fine for skipped elements (faces), fatal for the vertex element the * decoders walk with a fixed stride. */ hasListProperty: boolean; } export interface PlyHeader { format: 'ascii' | 'binary_little_endian' | 'binary_big_endian'; version: string; elements: ElementDecl[]; /** Byte offset where the body data starts. */ bodyOffset: number; } export declare function parsePlyHeader(buffer: Uint8Array): PlyHeader; export declare function decodePly(buffer: Uint8Array): DecodedPointChunk; export {}; //# sourceMappingURL=ply.d.ts.map