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

    Interface BlendingState

    Material-level blending state for a given high-level blending mode.

    The viewer exposes five named blending modes that map onto specific THREE.js blending + depth + transparency combinations. Pulling the mapping into a pure function makes the truth table explicit and testable, and lets the caller decide how to apply it (e.g. set on a material, or compose into a snapshot).

    blendEquation is part of the total state — every mode reports it (even non-max modes report THREE.AddEquation, the default). That way switching from 'max' back to 'additive' resets the equation instead of stranding MaxEquation on the material from a previous selection.

    interface BlendingState {
        blending: Blending;
        depthTest: boolean;
        depthWrite: boolean;
        transparent: boolean;
        blendEquation: BlendingEquation;
        blendSrc?: BlendingSrcFactor;
        blendDst?: BlendingDstFactor;
    }
    Index
    blending: Blending
    depthTest: boolean
    depthWrite: boolean
    transparent: boolean
    blendEquation: BlendingEquation
    blendSrc?: BlendingSrcFactor

    blend factors needed for max-mode parity with creation-time state.

    blendDst?: BlendingDstFactor