MaterialSpec ​

Contract 2.0.0 · package sha256 a857eca95b35921109faf997094bb4192f12527d9d0fcd4be7e97f06425bad6e · generated from configurator-runtime.d.ts by services/onsite-scripter/scripts/build-contract-docs.mjs; edit the source, not this file.

Interface · import type { MaterialSpec } from '@holostep-configurators/runtime-client/contract'; · stable · since 2.0.0 · section 8. Materials and textures

glTF 2.0 and KHR names. As a stored MaterialNode, or a partial over a part, omitted fields keep the underlying values (a map slot that brings an image: TextureSpec); on a new mesh, the defaults below apply.

Members ​

Member Kind Summary
$schema? property The JSON Schema id, for editors and validate('material').
name? property Shown in exports and problems.
baseColor? property The base colour (glTF baseColorFactor): it multiplies the baseColor map the slot wears under it, the GLB's own, a selected finish's or a rule's, so a colour over a textured finish tints it, and how dark it goes…
alpha? property 0..1.
alphaMode? property 'mask' cuts holes (also in the shadow) below alphaCutoff.
alphaCutoff? property 0..1, for alphaMode: 'mask'.
metallic? property 0..1.
roughness? property 0..1.
emissive? property The colour the surface gives off, unlit by the scene (glTF emissiveFactor); it multiplies the emissive map, and emissiveStrength scales it.
emissiveStrength? property KHR_materials_emissive_strength; 0 or more.
normalScale? property Strength of the normal map.
occlusionStrength? property Strength of the occlusion map, 0..1.
ior? property KHR_materials_ior.
specular? property KHR_materials_specular.
sheen? property KHR_materials_sheen plus intensity.
clearcoat? property KHR_materials_clearcoat.
transmission? property KHR_materials_transmission and volume.
side? property Which faces draw: 'front' culls the back faces, as glTF's single-sided; 'double' draws both, for open shells and thin sheets seen from both sides (glTF doubleSided); 'back' only the back ones.
lighting? property 'unlit' skips lighting (KHR_materials_unlit).
exactColor? property Lit, but skips exposure and the tone curve, so white stays white (backdrop walls).
variant? property · labs A KHR_materials_variants variant of the GLB the mesh comes from (AssetManifest.variants): the base this rule's fields merge over is that variant's material for the mesh instead of the one it wears, so …
maps? property Per slot.
labs? property · labs Labs fields: they may change in a minor.

Declaration ​

ts
export interface MaterialSpec {
  $schema?: 'holostep.material/1';
  name?: string;
  baseColor?: ColorValue;
  alpha?: number;
  alphaMode?: 'opaque' | 'mask' | 'blend';
  alphaCutoff?: number;
  metallic?: number;
  roughness?: number;
  emissive?: ColorValue;
  emissiveStrength?: number;
  normalScale?: number;
  occlusionStrength?: number;
  ior?: number;
  specular?: {
    enabled?: boolean;
    factor?: number;
    color?: ColorValue;
  };
  sheen?: {
    enabled?: boolean;
    intensity?: number;
    color?: ColorValue;
    roughness?: number;
  };
  clearcoat?: {
    factor?: number;
    roughness?: number;
    normalScale?: number;
  };
  transmission?: {
    factor?: number;
    thickness?: number;
    attenuationColor?: ColorValue;
    attenuationDistance?: number;
  };
  side?: 'front' | 'back' | 'double';
  lighting?: 'lit' | 'unlit';
  exactColor?: boolean;
  variant?: string;
  maps?: Partial<Record<MapSlot, TextureSlot>>;
  labs?: {
    drawOrder?: number;
    depthPrepass?: boolean;
    envIntensity?: number;
    shading?: Shading;
  };
}

Generic-API test (spec 3.1) ​

Rule Result
1. Neutral name pass: MaterialSpec names no product
2. A precedent pass: glTF 2.0 metallic-roughness material (row K10); glTF KHR_materials_sheen (row K10); glTF KHR_materials_transmission (row K10); glTF KHR_materials_unlit (row K10)
3. Two apps, or labs pass: 28 apps (ledger: app-04c2774145, app-0c773a4ee3, app-37356bf09f, app-378d190f1b, app-4762caacdc, app-4f16d2f6da, app-4fd23bc869, app-510d750508 and 20 more; fleet cross-check: app-fc07850558)
4. The cheaper fix first decided per need in Appendix B: rows K10 at tier stable (a member only where no rule, data, asset or app code serves the need)