mikaxyz/elm-gltf/3.0.0

NOTE: the latest version is 5.0.0

Gltf.Material

A material as defined in the glTF specification.

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

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

type Index
= Index Int

The index of the material.

type alias TextureIndex =
TextureIndex

Use this to get a textureWithIndex

= Opaque
| Mask Float
| Blend

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

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

The Material PBR Metallic Roughness of the material.