brepjs API Reference
    Preparing search index...

    Interface GltfExportOptions

    Options for glTF/GLB export.

    When materials is provided, faces are grouped into separate glTF primitives by material, enabling per-face coloring.

    interface GltfExportOptions {
        materials?: Map<number, GltfMaterial>;
        upAxis?: "Y" | "Z";
    }
    Index

    Properties

    Properties

    materials?: Map<number, GltfMaterial>

    Map of faceId → material. FaceIds come from ShapeMesh.faceGroups[].faceId.

    upAxis?: "Y" | "Z"

    Up-axis of the emitted document. brepjs geometry is Z-up (CAD convention), but glTF 2.0 mandates Y-up. With 'Y' (the default) a root node carrying a −90° rotation about X is emitted so the part stands upright in standard glTF viewers (three.js, model-viewer, Blender); vertex data stays Z-up, matching the STEP/STL exports. Use 'Z' to emit raw Z-up coordinates with no root node.