Protected
_Protected
_Protected
_Protected
Optional
_Protected
_Animate the material change when applying a variation.
Duration of the animation when applying a variation in ms
Apply all variations(by selected index or first item) when a config is loaded
Static
Optional
Readonly
OldStatic
PluginProtected
_Protected
_Protected
_Protected
_Optional
prefix: stringApply a material variation based on index or uuid.
Optional
setSelectedIndex: booleandefault true, to be used with animation
Optional
time: AnimateTime & { from?: string | number }optional data to animate(lerp) from current value to the target material.
Optional
variationKey: stringOptional
mapping: stringOptional
meta: anyGet the preview for a material variation Should be called from preFrame ideally. (or preRender but set viewerSetDirty = false)
Material or index of the material in the variation.
Type of preview. Could be generate:sphere, generate:cube, color, map, emissive, etc.
call viewer.setDirty() after setting the preview. So that the preview is cleared from the canvas.
Reapply all selected variations again.
Useful when a model or config is loaded or changed and the variations are not applied in the model.
It is automatically called when the config is loaded if applyOnLoad
is true.
Refreshes the UI in the next frame
Optional
setOptional
meta: SerializationMetaType
Material Configurator Plugin (Basic UI) This plugin allows you to create variations of materials mapped to material names or uuids in the scene. These variations can be applied to the materials in the scene. (This copies the properties to the same material instances instead of assigning new materials) The plugin interfaces with the picking plugin and also provides uiConfig to show and edit the variations. This functionality is inherited from
MaterialConfiguratorBasePlugin
Additionally, this plugin adds a Grid UI using GridItemListPlugin in the DOM over the viewer canvas to show various material variations and allow the user to apply them. The UI can also be used in the editor to edit the variations and apply them.