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

    A pick material that tracks the visual material's whole per-epoch appearance state, not just a single boolean. Implemented by both mesh pick wrappers, and by nothing else — the two members below are the two things a mesh pick pass must copy from its visual twin that the sibling pick materials do not.

    Hierarchy

    • NodeMaterial
      • MeshPickingTSLMaterial

    Implements

    Index
    uniforms: Record<string, THREE.IUniform>
    tslNodes: {
        uNodeId: any;
        uOpacity: any;
        uAlphaCutoff: any;
        uAlphaCutout: any;
        uSurfaceDepth: any;
        uNearCull: any;
        uBaseColorTex?: any;
    }
    • Install the real base-colour texture once the data has arrived.

      Rebuilds the graph rather than writing a uniform, and that is not optional here: texture() captures its THREE.Texture at construction, so the value held in uniforms.uBaseColorTex is only a record of what is bound — the graph reads the captured node. Writing the uniform alone would leave the pick pass sampling the blank placeholder, which has alpha 0 everywhere and would make the whole mesh unpickable.

      A no-op when the node has no texture (the sampler is not in this variant's graph) and when the texture is unchanged, so the steady state after the first commit costs nothing.

      Parameters

      • tex: Texture<unknown, TextureEventMap> | null

      Returns void

    • Parameters

      • _resolution: Vector2
      • _isOrtho: boolean = false
      • OptionalnearCull: number
      • Optional_pixelRatio: number

      Returns void

      MeshPickingMaterial.updateCameraParams — _resolution / _isOrtho ignored, nearCull consumed. It is a runtime uniform, so there is nothing to rebuild (this wrapper has no rebuild path at all).

    • Clone this picking material. Mirrors the GLSL wrapper's explicit clone: the inherited Material.clone() calls the constructor with no config, and NodeMaterial.copy would alias the source's node graph instead of giving the clone its own uniform nodes.

      No graph rebuild is needed after copying the values — every one of them is a runtime uniform.

      Returns this