• joinPrimitives(prims: Primitive[], options?: JoinPrimitiveOptions): Primitive
  • Given a list of compatible Mesh Primitives, returns new Primitive containing their vertex data. Compatibility requires that all Primitives share the same Materials, draw mode, and vertex attribute types. Primitives using morph targets cannot currently be joined.


    import { joinPrimitives } from '@gltf-transform/functions';
    // Succeeds if Primitives are compatible, or throws an error.
    const result = joinPrimitives(mesh.listPrimitives());
    for (const prim of mesh.listPrimitives()) {
Function symbol, where the argument and output are a box labeled 'glTF'.

Made by Don McCurdy Documented with greendoc © 2023 MIT License