Skip to content

Shapemetry API


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?

optional sourceId?: string

Defined in: types.ts:259


baseColor

baseColor: Color

Defined in: types.ts:261


baseTextureId?

optional baseTextureId?: string

Defined in: types.ts:262


opacity

opacity: number

Defined in: types.ts:264


opacityTextureId?

optional opacityTextureId?: string

Defined in: types.ts:265


roughness

roughness: number

Defined in: types.ts:267


roughnessTextureId?

optional roughnessTextureId?: string

Defined in: types.ts:268


metallic

metallic: number

Defined in: types.ts:270


metallicTextureId?

optional metallicTextureId?: string

Defined in: types.ts:271


normalScale

normalScale: number

Defined in: types.ts:273


normalTextureId?

optional normalTextureId?: string

Defined in: types.ts:274


emissiveColor

emissiveColor: Color

Defined in: types.ts:276


emissiveTextureId?

optional emissiveTextureId?: string

Defined in: types.ts:277