Shapemetry API / MaterialJSON
Type Alias: MaterialJSON
MaterialJSON =
object
Defined in: types.ts:256
PBR material descriptor (Physically Based Rendering). id is the lookup key referenced from PolygonMeshJSON.faces[i].material / MeshJSON.materials[i]; sourceId (when present) ties this material back to a producer-side original.
Scalar fields are required to keep consumers from branching on missing values — pick canonical defaults at the producer (e.g. roughness = 1, metallic = 0, emissiveColor = [0, 0, 0]). Each *TextureId references a TextureAssetJSON in the parent mesh's texture palette.
Properties
id
id:
string
Defined in: types.ts:257
name
name:
string
Defined in: types.ts:258
sourceId?
optionalsourceId?:string
Defined in: types.ts:259
baseColor
baseColor:
Color
Defined in: types.ts:261
baseTextureId?
optionalbaseTextureId?:string
Defined in: types.ts:262
opacity
opacity:
number
Defined in: types.ts:264
opacityTextureId?
optionalopacityTextureId?:string
Defined in: types.ts:265
roughness
roughness:
number
Defined in: types.ts:267
roughnessTextureId?
optionalroughnessTextureId?:string
Defined in: types.ts:268
metallic
metallic:
number
Defined in: types.ts:270
metallicTextureId?
optionalmetallicTextureId?:string
Defined in: types.ts:271
normalScale
normalScale:
number
Defined in: types.ts:273
normalTextureId?
optionalnormalTextureId?:string
Defined in: types.ts:274
emissiveColor
emissiveColor:
Color
Defined in: types.ts:276
emissiveTextureId?
optionalemissiveTextureId?:string
Defined in: types.ts:277