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

    Function createInstancedLinesMesh

    • Create an instanced mesh for lines rendering.

      Sets up the instanced geometry with the texture-backed per-segment storage pair (RGBA32F line texture + aSortedIndex) attached to a shared unit-quad base.

      Note: We use THREE.Mesh instead of THREE.InstancedMesh because:

      • InstancedMesh adds instanceMatrix (mat4 = 4 attribute locations)
      • Our shader computes positions from custom attributes, not matrices
      • This avoids exceeding WebGL's 16 attribute location limit
      • InstancedBufferGeometry with Mesh still uses instanced drawing

      Parameters

      • meshConfig: InstancedLinesMeshConfig

        Configuration with all segment data

      • material: Material

        LineMaterial to use for rendering

      Returns Mesh

      THREE.Mesh with InstancedBufferGeometry ready for scene addition