brepjs API Reference
    Preparing search index...

    Type Alias MaterialFn

    MaterialFn: (face: GltfFace) => GltfMaterial | undefined

    Per-face material selector. Called once per face group; return a material to paint that face, or undefined to leave it at the glTF default. Consumed by tooling (e.g. brepjs-cad's export const materials) that has the mesh and builds the faceId→material map passed to GltfExportOptions.materials.

    Type Declaration