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

    Function updateInstancedLinesMesh

    • Update an existing instanced lines mesh with new segment data.

      Mirrors the non-pool points commit path (texture-storage era):

      • Same count: in-place fused texel write into the existing line texture (zero GPU re-allocation; ranged upload) + identity ordering reset.
      • Different count: build a FRESH geometry (the non-pool storage is exact-size) and dispose the old one — never rebind new storage onto a rendered geometry, which strands the old GPU resources in the renderer caches (freed only at GC mercy on classic WebGL; pinned FOREVER by the WebGPU renderer's strong Info.memoryMap).
      • Colormap toggles no longer rebuild anything: the fixed 6-texel layout always carries the scalar slots.
      • Always: recompute bounding box/sphere + refresh the scalar presence stamp.

      Parameters

      • mesh: Mesh

        Existing mesh to update (must have InstancedBufferGeometry)

      • meshConfig: InstancedLinesMeshConfig

        New segment data

      Returns boolean

      true when the geometry was REBUILT (size change) — the caller must then evict Three's cached RenderObject (see invalidate-render-object.ts); false for the in-place write.