Material - a builder for a GLTF material object

Hierarchy

  • default<
        {
            alphaCutoff: number;
            alphaMode: AlphaMode;
            doubleSided: boolean;
            emissiveFactor: Vec3;
            pbrMetallicRoughness: MetallicRoughness;
        },
    >
    • Material

Properties

metallicRoughness: (pbrMetallicRoughness: MetallicRoughness) => Material

Type declaration

    • (pbrMetallicRoughness: MetallicRoughness): Material
    • pbrMetallicRoughness - Sets values used to define the metallic-roughness material model from Physically-Based Rendering (PBR) methodology.

      Parameters

      Returns Material

      this

Accessors

  • get AlphaModes(): { BLEND: "BLEND"; MASK: "MASK"; OPAQUE: "OPAQUE" }
  • Returns { BLEND: "BLEND"; MASK: "MASK"; OPAQUE: "OPAQUE" }

Methods

  • alphaCutoff - sets the alpha cutoff of the material when alphaMode is set to Material.alphaMode.MASK

    Parameters

    • alphaCutoff: number

      a number in the range [0, 1]

    Returns Material

    this

  • alphaMode - sets the alpha mode of the material

    Parameters

    • alphaMode: "OPAQUE" | "MASK" | "BLEND"

      one of the valid alpha modes

    Returns Material

    this

  • doubleSided - sets whether the material is double sided.

    Parameters

    • doubleSided: boolean

    Returns Material

    this

  • emissiveFactor - sets the emissive colour of the material

    Parameters

    • emissiveFactor: Vec3

      emissive colour

    Returns Material

    this

  • pbrMetallicRoughness - Sets values used to define the metallic-roughness material model from Physically-Based Rendering (PBR) methodology.

    Parameters

    Returns Material

    this