Luxar Viewer API Documentation - v2026.9.22
    Preparing search index...

    Function createMeshGeometry

    • Build a fresh geometry for a mesh node.

      The attribute SET is decided here, once, and never changes afterwards — updateMeshGeometry only replaces contents. That is deliberate: changing a drawn geometry's attribute set is silently broken on the WebGPU backend, where attribute identity is baked into the render pipeline.

      normal and aScalar join the set here — never later — which is why the placeholder factory passes 1-vertex stubs for them whenever the node's METADATA says the arrays exist. Their presence is a per-node constant (has_normals / has_scalars), so the set stays fixed for the geometry's whole life even though whether the shader reads normal varies per displayDims epoch.

      Parameters

      Returns BufferGeometry