Creates a new PBRSpecularGlossiness 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 • Documented with greendoc • © 2023 MIT License
KHRMaterialsPBRSpecularGlossiness
KHR_materials_pbrSpecularGlossiness
converts a PBR material from the default metal/rough workflow to a spec/gloss workflow.Properties:
Example
import { KHRMaterialsPBRSpecularGlossiness } from '@gltf-transform/extensions'; // Create an Extension attached to the Document. const specGlossExtension = document.createExtension(KHRMaterialsPBRSpecularGlossiness); // Create a PBRSpecularGlossiness property. const specGloss = specGlossExtension.createPBRSpecularGlossiness() .setSpecularFactor(1.0); // // Assign to a Material. material.setExtension('KHR_materials_pbrSpecularGlossiness', specGloss);