Interface SchemaMaterialsPanelParams

interface SchemaMaterialsPanelParams {
    container?: HTMLElement;
    data?: Data;
    dataModel?: DataModel;
    focusSceneModel?: SceneModel;
    initialAssignments?: Record<string, string>;
    palette?: MaterialsPalette;
    scene?: Scene;
    sceneModel?: SceneModel;
    storageKey?: string;
    visible?: boolean;
}

Properties

container?: HTMLElement

DOM container; defaults to document.body.

data?: Data

Data graph containing the DataModels that pair with the Scene's SceneModels. Looked up by id (data.models[sceneModel.id]). Required unless dataModel is given (its .data is used). SceneModels without a matching DataModel render an "unknown" tab — the body explains that materials need a DataModel to group types by schema.

dataModel?: DataModel

Single-model legacy entry point — equivalent to passing data = dataModel.data. Kept so existing single-model call sites don't need to change.

focusSceneModel?: SceneModel

Optional initial focus. When supplied, the panel opens with this SceneModel selected in the tab strip. Defaults to the first alive SceneModel in the Scene.

initialAssignments?: Record<string, string>

Initial type → painterId assignments for the focused SceneModel, applied to the dropdowns on first render before the defaults derived from DEFAULT_IFC_PAINTERS.

Catalog of painters offered in each row's dropdown. Defaults to a freshly-constructed MaterialsPalette (every applicable procgen/paintMaterials painter pre-registered).

scene?: Scene

Scene the panel is bound to. The panel manages every SceneModel in this Scene; new SceneModels appear in the tab strip automatically as they're created. Required unless focusSceneModel is given (its .scene is used).

sceneModel?: SceneModel

Single-model legacy entry point — equivalent to passing scene = sceneModel.scene and focusSceneModel = sceneModel. Kept so existing single-model call sites don't need to change.

storageKey?: string

localStorage key for persisting drag position + closed state. Defaults to "xkt-smp-panel".

visible?: boolean

Show on construction (default true).