A canonical material represents the internal material type we pass around and support wiring up to gltf like properties.

interface CanonicalMaterial {
    baseColor: ColorRGBA;
    blend: BlendMode;
    doubleSided: boolean;
    ior?: number;
    legacyColor: ColorRGBA;
    metalness?: number;
    name: string;
    roughness?: number;
    specular?: ColorRGBA;
}

Properties

baseColor: ColorRGBA

The base color of this material (in PBR terms)

blend: BlendMode

The blend mode for this surface (should probably be opaque).

doubleSided: boolean

Is this material double sided or is it back face culled?

ior?: number

The index of refraction of this surface.

legacyColor: ColorRGBA

Legacy color to match web-ifc display

metalness?: number

How metallic is this surface? 0 for dialletric, 1 for metal.

name: string

The name of this material, which may be procedurally generated.

roughness?: number

How rough is this surface vs how shiny (1 for maximum rougness, 0 for full specular)

specular?: ColorRGBA

The specular color of this surface (F0, overrides the F0 that would be produced by baseColor, metalness and index of refraction).