Creates a new Mapping property.
Creates a new MappingList property.
Creates a new Variant property.
Disables and removes the extension from the Document.
Indicates to the client whether it is OK to load the asset when this extension is not recognized. Optional extensions are generally preferred, if there is not a good reason to require a client to completely fail when an extension isn't known.
Lists all Variants on the current Document.
Indicates to the client whether it is OK to load the asset when this extension is not recognized. Optional extensions are generally preferred, if there is not a good reason to require a client to completely fail when an extension isn't known.
Made by Don McCurdy • TypeDoc documentation • Copyright 2021 under MIT license
MaterialsVariants
KHR_materials_variants
defines alternate Material states for any Primitive in the scene.Uses include product configurators, night/day states, healthy/damaged states, etc. The
MaterialsVariants
class provides three ExtensionProperty types:Variant
,Mapping
, andMappingList
. When attached to Primitive properties, these offer flexible ways of defining the variants available to an application. Triggering a variant is out of scope of this extension, but could be handled in the application with a UI dropdown, particular game states, and so on.Mesh geometry cannot be changed by this extension, although another extension (tentative:
KHR_mesh_variants
) is under consideration by the Khronos Group, for that purpose.Properties:
Example
A few notes about this extension:
.gltf
, instead of an embedded.glb
, viewers will have the option of downloading only textures associated with the default state, and lazy-loading any textures for inactive Variants only when they are needed.