G-code Preview — API Reference
    Preparing search index...

    Triangle mesh geometry (three-free). Positions are required; normals/indices/colors are optional.

    interface MeshGeometry {
        colors?: Float32Array<ArrayBufferLike>;
        indices?: Uint32Array<ArrayBufferLike>;
        normals?: Float32Array<ArrayBufferLike>;
        positions: Float32Array;
    }
    Index

    Properties

    colors?: Float32Array<ArrayBufferLike>

    Optional flat per-vertex linear RGB colors (length = positions.length), for a single mesh that carries multiple colors (per-triangle material assignment in 3MF). When present the renderer uses vertex colors; when absent the object's ModelObject.material (or the neutral default) applies.

    indices?: Uint32Array<ArrayBufferLike>

    Optional triangle indices; non-indexed (soup) when absent.

    normals?: Float32Array<ArrayBufferLike>

    Optional flat XYZ normals (same length as positions); recomputed if absent.

    positions: Float32Array

    Flat XYZ positions, length = 3·vertexCount.