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

    Interface LayerInfo

    Information about a single layer in the Layers panel

    interface LayerInfo {
        path: string;
        name: string;
        type: LayerType;
        kind?: NodeKind;
        visible: boolean;
        opacity: number;
        absorption: number;
        ambient: number;
        shadeExponent: number;
        specular: number;
        shininess: number;
        shading: MeshShadingMode;
        material?: MeshMaterialKind;
        physicalKnobs?: PhysicalKnobValues;
        alphaCutoff: number;
        displayMin: number;
        displayMax: number;
        dataMin: number;
        dataMax: number;
        gamma: number;
        blendingMode: BlendingModeName;
        blendingModeExplicit: boolean;
        layerOrder?: number;
        inheritedLayerOrder?: number;
        layerOrderExplicit: boolean;
        selected: boolean;
        sound?: SoundLayerInfo;
        colormap?: string;
        supportsColormap: boolean;
        labelVocabulary?: { id: string; name: string }[];
        colorByLabel: boolean;
        labelFilterId?: string;
        scalarDataRange?: [number, number];
        colorDataRange?: [number, number];
        scalarWindow: boolean;
        lodGroupChildCount?: number;
        partCount?: number;
        nestedLodGroupPaths?: string[];
        nestedLodMaxChildCount?: number;
    }
    Index
    path: string

    Zarr path (e.g. "group/channel_gfp") — used as unique key

    name: string

    Display name (last segment of path)

    type: LayerType

    Geometry type the user sees this layer as. For specialized groups (kind=lod / kind=partition), this is the resolved display_type attr from disk — not 'group'.

    kind?: NodeKind

    Specialized-group kind, if the underlying scene-graph node is a kind=lod or kind=partition Group. Drives the layer-header badge and the inline LOD-level dropdown.

    visible: boolean

    Whether the layer is visible in the scene

    opacity: number

    Opacity (0–1)

    absorption: number

    Absorption coefficient κ (≥ 0; only meaningful in volumetric mode)

    ambient: number

    Mesh shade floor (0–1) — the §6.2 wrapped-diffuse ambient. Only meaningful on a mesh layer, where it is what keeps a silhouette readable rather than black; 1.0 removes the diffuse gradient; specular remains independently controlled.

    shadeExponent: number

    Mesh wrapped-diffuse falloff exponent (> 0) — the §6.2 shade_exponent. 1.0 is the plain linear wrap. Mesh-only, like the three around it.

    specular: number

    Mesh additive specular strength (0–1).

    shininess: number

    Mesh specular highlight exponent (> 0).

    Mesh shading capability for the layer controls. Only none is authoritative; smooth versus flat ignores the material's view-dependent normal-frame check.

    material?: MeshMaterialKind

    Which material family a mesh layer renders with. 'luxar' (the house shader, and what every non-mesh layer carries) shows the shading sliders; 'physical' hides them and shows the physicalKnobs sliders instead.

    physicalKnobs?: PhysicalKnobValues

    The LIVE physical knobs in material space, seeded from the authored attrs and knob defaults. Slider mapping is presentation-only, so values beyond a finite track remain intact. Absent for every non-physical layer.

    alphaCutoff: number

    Mesh opaque-mode cutout threshold (0–1) — the §6.2 alpha_cutoff.

    Only meaningful in opaque, which is a NARROWER condition than the other four (they apply in every blending mode when shading is lit), so the panel gates its slider on the mode as well as the type — the same shape as absorption's volumetric gate.

    displayMin: number

    Current display-range minimum (maps to intensity+offset in shader)

    displayMax: number

    Current display-range maximum

    dataMin: number

    Slider lower bound. Wide enough to reach every window the layer can usefully take: the mode's default (scalar range / identity), the authored intensity/offset window, and — for a direct-colour layer — its color_data_range, so "stretch these colours" stays one drag away.

    dataMax: number

    Slider upper bound (see LayerInfo.dataMin).

    gamma: number

    Gamma correction value

    blendingMode: BlendingModeName

    Blending mode

    blendingModeExplicit: boolean

    Whether this layer OWNS a blend mode — authored on the node ITSELF on disk, or chosen by the user via the panel. When false, blendingMode is merely the inherited/defaulted value shown in the dropdown, and the layer must not act as a blending_mode SETTER: liveLayerAttrs emits the attr only when this is true (a plain group layer would otherwise push its additive placeholder onto a mesh leaf and bury the mesh's own opaque default — #1272), and composeEffective's subtree-drop fires only when this is true (a wrapper owning no mode has no control value to impose, so it must not suppress a descendant's authored mode — #1275).

    Deliberately the node's OWN attr, not the composed ancestry: a layer that merely INHERITS an ancestor's mode must not re-emit it as its own setter — the panel snapshot would go stale the moment the ancestor layer's live pick diverges from disk, and the re-emitted copy (being nearer the leaf) would shadow the ancestor's newer choice.

    layerOrder?: number

    Effective cross-layer draw order (LAYER_ORDER_SPEC.md), including an inherited value, or undefined when the ancestry states none. Higher = nearer the camera = drawn later.

    inheritedLayerOrder?: number

    Effective order inherited from ancestors when this layer owns none.

    layerOrderExplicit: boolean

    Whether the level is EXPLICIT — the node's OWN attr, or a user pick in the panel — as opposed to inherited or absent. Same reasoning as blendingModeExplicit: re-emitting an inherited level as this layer's own would change which node owns the setter and make clearing the ancestor no longer restore auto here.

    selected: boolean

    Whether this layer is selected in the list

    Present on type === 'sound' layers only.

    colormap?: string

    Active colormap name (undefined = direct RGB colors)

    supportsColormap: boolean

    Whether this node supports colormap (has scalars or amplitudes)

    labelVocabulary?: { id: string; name: string }[]

    Exact categorical vocabulary exposed by gsplat label_ids.

    colorByLabel: boolean

    Render deterministic categorical colours instead of authored RGB.

    labelFilterId?: string

    Exact class id selection; undefined shows all classes.

    scalarDataRange?: [number, number]

    Scalar data range for colormap normalization

    colorDataRange?: [number, number]

    Authored RGB spread (color_data_range). Never the starting window — see LayerInfo.dataMin — but kept so a colormap toggle can restore the direct-colour slider bounds, symmetric with LayerInfo.scalarDataRange.

    scalarWindow: boolean

    Whether the current display window is a SCALAR window (a colormap is in play for the layer — on the node or a descendant) rather than an authored-RGB one. LayerApplyEngine.applyComposed routes on this per leaf: a leaf the C1 guard keeps on direct colour must NOT receive the scalar window as a colour gain (a mixed group layer contains both kinds). Follows the colormap toggle via LayerStateManager.setColormapWindow.

    lodGroupChildCount?: number

    For kind === 'lod' layers: number of child levels. Drives the "Active level" dropdown's option count and the "N LODs" badge. Absent for non-LOD layers.

    partCount?: number

    For kind === 'partition' layers: number of BSP child parts. Drives the "N parts" badge on the layer header. Absent for non-Partition layers.

    nestedLodGroupPaths?: string[]

    For kind === 'partition' layers that wrap kind=lod descendants: absolute paths of every nested lod_group in the subtree. The "Active level" dropdown on the wrapper broadcasts to every path (clamped per-group by LODGroupRegistry.setSelectorMode on ragged ladders). Absent for non-Partition layers and for Partition layers with no nested LODs.

    Also used to compute the [N parts × M LODs] combined badge: when this list is non-empty, M is the maximum child count across nested groups (matches the dropdown's "highest level offered" affordance).

    nestedLodMaxChildCount?: number

    Maximum LOD child count across the layer's nested lod_groups. Used by the dropdown to size its option list and by the combined badge. Absent unless nestedLodGroupPaths is non-empty.