Luxar Viewer API Documentation - v2026.9.22
    Preparing search index...
    • Apply a colormap texture (or null to disable) to a material.

      Delegates the uniform / define mutation to the material's setColormapTexture setter; reports the enabled-state transition so callers can apply side effects on a flip.

      Materials that don't implement ColormapAwareMaterial are silently ignored — callers can pass any THREE.ShaderMaterial and the helper falls through. The enabled-state check still uses material.defines.USE_COLORMAP because that's the canonical source of truth (see setColormapTexture).

      Parameters

      • material: Material

        The shader material to mutate.

      • texture: DataTexture | null

        The LUT texture to bind, or null to disable.

      Returns { wasEnabled: boolean; nowEnabled: boolean }

      { wasEnabled, nowEnabled } so callers can detect a transition.