Luxar Viewer API Documentation - v2026.10.19
    Preparing search index...
    interface GraphSharingSpec<M extends KeyedMaterial> {
        make: (config?: Record<string, unknown>) => M;
        valueConfigs: readonly [Record<string, unknown>, Record<string, unknown>];
        variants: readonly [string, Record<string, unknown>][];
        bindElementTexture?: (m: M, tex: DataTexture) => void;
        bindColormap?: (m: M, tex: DataTexture) => void;
        runtimeFlag?: {
            config: Record<string, unknown>;
            set: (m: M) => void;
            unset: (m: M) => void;
        };
    }

    Type Parameters

    Index
    make: (config?: Record<string, unknown>) => M

    Build a material from a config.

    valueConfigs: readonly [Record<string, unknown>, Record<string, unknown>]

    Configs that differ only in per-object VALUES (must share).

    variants: readonly [string, Record<string, unknown>][]

    Configs whose flags select different code (must not share with {} or each other).

    bindElementTexture?: (m: M, tex: DataTexture) => void

    Rebind the element data texture, when the material has one.

    bindColormap?: (m: M, tex: DataTexture) => void

    Swap the colormap texture, when the material has one.

    runtimeFlag?: {
        config: Record<string, unknown>;
        set: (m: M) => void;
        unset: (m: M) => void;
    }

    A runtime flag flip and its constructor equivalent.