mikaxyz/elm-gltf/5.0.0

Gltf.Material

A material as defined in the glTF specification.

= Material
{ name : Maybe String
, index : Index
, pbrMetallicRoughness : PbrMetallicRoughness
, normalTexture : Maybe Texture
, normalTextureScale : Float
, occlusionTexture : Maybe Texture
, occlusionTextureStrength : Float
, emissiveTexture : Maybe Texture
, emissiveFactor : Vec3
, doubleSided : Bool
, alphaMode : AlphaMode
, extensions : Maybe Extensions
}

A material assigned to a Mesh contained in a Node. Use the properties/textures in the material to render it.

Material extensions are available in Extensions.

type Index
= Index Int

The index of the material.

= Opaque
| Mask Float
| Blend

AlphaMode of the material to convert to a WebGL.Settings.Setting)

{ baseColorFactor : Vec4
, baseColorTexture : Maybe Texture
, metallicFactor : Float
, roughnessFactor : Float
, metallicRoughnessTexture : Maybe Texture
}

The Material PBR Metallic Roughness of the material.