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

    Hierarchy

    • NodeMaterial
      • LineTSLMaterial

    Implements

    Index
    uniforms: Record<string, THREE.IUniform>

    Public uniforms table, same shape as LineMaterial.uniforms.

    tslNodes: LineMaterialTSLNodeTable
    _explicitDepthTest?: boolean

    Explicit depthTest / transparent overrides from the constructor config. Every rebuildGraph() re-applies the factory tail's MODE-DERIVED blending state (depthTest/transparent included), so an override honored only once in the constructor tail would silently revert on the first later rebuild (e.g. the guaranteed placeholder→real updateLineTexture rebuild at first commit). The GLSL twin never rebuilds, so its constructor-tail overrides stick; persisting them here and re-applying at the end of rebuildGraph keeps the two backends contract-identical. An explicit later applyBlendingMode() call CLEARS both (a runtime mode switch takes full ownership of the blending state — matching the GLSL twin, where applyBlendingStateToMaterial overwrites both fields unconditionally). Mirrors PointTSLMaterial.

    _explicitTransparent?: boolean
    • Refresh the colormap TSL nodes so they bind to the current this.uniforms.uColormap*.value. TextureNode is bound to a specific Texture instance at construction; a texture swap requires a fresh node, hence this lives in rebuildGraph().

      Parameters

      • useColormap: boolean

      Returns void

    • Re-run the TSL factory and attach the resulting nodes + blending state to ourselves. useColormap reads defines.USE_COLORMAP, not the IUniform presence (mirrors GSplatTSLMaterial / PointTSLMaterial).

      Returns void

    • Rebind the line data texture. TSL texture() captures the THREE.Texture at factory time, so an identity change needs a fresh node + graph rebuild (exact mirror of PointTSLMaterial.updatePointTexture and the colormap texture lifecycle). No-op when the texture is unchanged — the common per-commit case.

      Parameters

      • tex: DataTexture | null

      Returns void

    • Update camera-dependent uniforms (viewport, projection kind, near cull).

      Push again after a resize, a projection-kind flip, a near-cull change or a pixel-ratio change. An FOV or ortho-zoom change needs no push.

      Parameters

      • resolution: Vector2

        Viewport resolution in pixels

      • isOrtho: boolean = false

        Whether camera is orthographic (default false)

      • OptionalnearCull: number

        Near-fade start distance in world units (consumed by all four geometry materials via the shared perspectiveNearFade)

      • pixelRatio: number = 1

        Physical render-target pixels per CSS pixel; screen-space appearance constants scale with it above 1×

      Returns void

    • Update the volumetric absorption coefficient κ (composed node attr). Plain uniform write through the proxy — no rebuild needed (the node identity is stable). Mirrors PointTSLMaterial.updateAbsorption.

      Parameters

      • absorption: number

      Returns void

    • Flag whether the committed colors carry a real per-endpoint alpha column (RGBA). Deliberately a uniform, not a define — toggling it never rebuilds the graph. Mirrors PointTSLMaterial.updateHasElementAlpha.

      Parameters

      • hasAlpha: boolean

      Returns void

    • Bind a colormap LUT texture (or null to disable colormap mode).

      When texture is non-null, the USE_COLORMAP define is added and the uniforms (uColormapTex, uScalarMin, uScalarScale) are allocated with neutral defaults if they don't exist yet. When texture is null, the define is removed and the uniform values are cleared so a subsequent clone() doesn't resurrect a stale colormap.

      No-op when called on a material whose shader path doesn't include USE_COLORMAP-guarded uniforms.

      Parameters

      • tex: DataTexture | null

      Returns void

    • Update the scalar range [min, max] the colormap maps over. Encoded as uScalarMin = min and uScalarScale = 1/max(1e-10, max-min) for the shader. No-op when colormap mode is not active (uniforms are absent until setColormapTexture has been called once).

      Parameters

      • min: number
      • max: number

      Returns void