Class KHR_materials_variants
Implements
Index
Properties
enabled
Defines whether this extension is enabled.
Readonlyname
The name of this extension.
Methods
get Available Variants
-
Gets the list of available variant names for this asset.
Parameters
- rootNode: TransformNode
The glTF root node
Returns string[]
the list of all the variant names for this model
- rootNode: TransformNode
get Last Selected Variant
-
Gets the last selected variant name(s) or null if original.
Parameters
- rootNode: TransformNode
The glTF root node
Returns Nullable<string | string[]>
The selected variant name(s).
- rootNode: TransformNode
reset
-
Reset back to the original before selecting a variant.
Parameters
- rootNode: TransformNode
The glTF root node
Returns void
- rootNode: TransformNode
select Variant
-
Select a variant given a variant name or a list of variant names.
Parameters
- rootNode: TransformNode
The glTF root node
- variantName: string | string[]
The variant name(s) to select.
Returns void
- rootNode: TransformNode
StaticGet Available Variants
-
Gets the list of available variant names for this asset.
Parameters
- rootNode: TransformNode
The glTF root node
Returns string[]
the list of all the variant names for this model
- rootNode: TransformNode
StaticGet Last Selected Variant
-
Gets the last selected variant name(s) or null if original.
Parameters
- rootNode: TransformNode
The glTF root node
Returns Nullable<string | string[]>
The selected variant name(s).
- rootNode: TransformNode
StaticReset
-
Reset back to the original before selecting a variant.
Parameters
- rootNode: TransformNode
The glTF root node
Returns void
- rootNode: TransformNode
StaticSelect Variant
-
Select a variant given a variant name or a list of variant names.
Parameters
- rootNode: TransformNode
The glTF root node
- variantName: string | string[]
The variant name(s) to select.
Returns void
- rootNode: TransformNode
Specification