Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • KHR_materials_variants

Implements

Index

Properties

enabled: boolean

Defines whether this extension is enabled.

name: "KHR_materials_variants" = "KHR_materials_variants"

The name of this extension.

Methods

  • getAvailableVariants(rootMesh: Mesh): string[]
  • Gets the list of available variant names for this asset.

    Parameters

    • rootMesh: Mesh

      The glTF root mesh

    Returns string[]

    the list of all the variant names for this model

  • getLastSelectedVariant(rootMesh: Mesh): Nullable<string | string[]>
  • Gets the last selected variant name(s) or null if original.

    Parameters

    • rootMesh: Mesh

      The glTF root mesh

    Returns Nullable<string | string[]>

    The selected variant name(s).

  • reset(rootMesh: Mesh): void
  • Reset back to the original before selecting a variant.

    Parameters

    • rootMesh: Mesh

      The glTF root mesh

    Returns void

  • selectVariant(rootMesh: Mesh, variantName: string | string[]): void
  • Select a variant given a variant name or a list of variant names.

    Parameters

    • rootMesh: Mesh

      The glTF root mesh

    • variantName: string | string[]

      The variant name(s) to select.

    Returns void

  • GetAvailableVariants(rootMesh: Mesh): string[]
  • Gets the list of available variant names for this asset.

    Parameters

    • rootMesh: Mesh

      The glTF root mesh

    Returns string[]

    the list of all the variant names for this model

  • GetLastSelectedVariant(rootMesh: Mesh): Nullable<string | string[]>
  • Gets the last selected variant name(s) or null if original.

    Parameters

    • rootMesh: Mesh

      The glTF root mesh

    Returns Nullable<string | string[]>

    The selected variant name(s).

  • Reset(rootMesh: Mesh): void
  • Reset back to the original before selecting a variant.

    Parameters

    • rootMesh: Mesh

      The glTF root mesh

    Returns void

  • SelectVariant(rootMesh: Mesh, variantName: string | string[]): void
  • Select a variant given a variant name or a list of variant names.

    Parameters

    • rootMesh: Mesh

      The glTF root mesh

    • variantName: string | string[]

      The variant name(s) to select.

    Returns void

Legend

  • Constructor
  • Property
  • Method
  • Property
  • Method
  • Inherited constructor
  • Static method

Settings

Theme