Creates a new Specular 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_specular
adjusts the strength of the specular reflection in the dielectric BRDF.KHRMaterialsSpecular is a better alternative to the older KHR_materials_pbrSpecularGlossiness extension, and provides specular information while remaining within a metal/rough PBR workflow. A value of zero disables the specular reflection, resulting in a pure diffuse material.
Properties:
Example
The
KHRMaterialsSpecular
class provides a single ExtensionProperty type,Specular
, which may be attached to any Material instance. For example:import { KHRMaterialsSpecular, Specular } from '@gltf-transform/extensions'; // Create an Extension attached to the Document. const specularExtension = document.createExtension(KHRMaterialsSpecular); // Create a Specular property. const specular = specularExtension.createSpecular() .setSpecularFactor(1.0); // Attach the property to a Material. material.setExtension('KHR_materials_specular', specular);