@3dsource/metabox-modular-configurator-api
    Preparing search index...

    Type Alias MaterialCommandEnvelope

    MaterialCommandEnvelope:
        | {
            action: typeof setComponentMaterialById;
            payload: { componentId: string; materialId: string; slotId: string };
        }
        | {
            action: typeof setEnvironmentMaterialById;
            payload: { materialId: string; slotId: string };
        }

    One entry of a SetMaterials batch — the full envelope of a single material command, so each entry stays self-describing about which target it applies to.

    Union of the material command envelopes accepted inside a batch. Carries the target kind in its action field, so one array can mix component and environment materials.

    The wire shape of SetMaterials. You normally never build these by hand — pass SetComponentMaterial and SetEnvironmentMaterial instances to SetMaterials and it assembles the array.

    Reference this type when parsing or logging raw postMessage traffic, or when reconstructing a saved configuration. Discriminate on action to tell the targets apart.