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

    Module rendering/mesh-geometry

    Build and update the THREE.BufferGeometry for a Mesh node.

    Mesh is the only geometry type that draws a plain indexed BufferGeometry + THREE.Mesh. The other three build an InstancedBufferGeometry of quads and push per-element attributes through an RGBA32F element texture, because they render per-element sprites whose size and orientation are computed in the shader. A triangle is already geometry — there is nothing to instance and no per-element extent to encode — so the instanced-quad/element-texture stack is not a gap here, it is the wrong shape.

    A direct consequence: mesh buffers are not recycled by the GPU buffer pool (gpu-buffer-pool/pool-stats.ts lists the three instanced types only). Their resident bytes are still counted there. Mesh's color/aScalar data goes to vertex attributes rather than a texture, which is why the dtype rules below exist.

    MeshGeometryConfig
    createMeshColorAttribute
    createMeshDefaultColorAttribute
    createMeshIndexAttribute
    rotateMeshIndexTriples
    enableFirstVertexMeshPickFallback
    applyMeshIndices
    computeMeshBounds
    createMeshGeometry
    createEmptyMeshGeometry
    updateMeshGeometry