Creates a new Iridescence property for use on a Material.
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 ExtensionProperty instances associated with, or created by, this extension. Includes only instances that are attached to the Document's graph; detached instances will be excluded.
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. Documentation built with greendoc and published under Creative Commons Attribution 3.0.
KHR_materials_iridescence
defines iridescence (thin film interference) on a PBR material.Iridescence describes an effect where hue varies depending on the viewing angle and illumination angle: A thin-film of a semi-transparent layer results in inter-reflections and due to thin-film interference, certain wavelengths get absorbed or amplified. Iridescence can be seen on soap bubbles, oil films, or on the wings of many insects. With this extension, thickness and index of refraction (IOR) of the thin-film can be specified, enabling iridescent materials.
Properties:
Example
The
KHRMaterialsIridescence
class provides a single ExtensionProperty type,Iridescence
, which may be attached to any Material instance. For example:import { KHRMaterialsIridescence, Iridescence } from '@gltf-transform/extensions'; // Create an Extension attached to the Document. const iridescenceExtension = document.createExtension(KHRMaterialsIridescence); // Create an Iridescence property. const iridescence = iridescenceExtension.createIridescence() .setIridescenceFactor(1.0) .setIridescenceIOR(1.8); // Attach the property to a Material. material.setExtension('KHR_materials_iridescence', iridescence);