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.
EXT_mesh_featuresdefines a means of assigning identifiers to geometry and subcomponents of geometry within a glTF 2.0 asset.Properties:
Example
// Create an Extension attached to the Document. const meshFeaturesExt = document.createExtension(EXTMeshFeatures); // Define per-vertex Feature IDs. const idArray = new Int16Array([12, 23, 34, 45, 56, 78, 78, 89, 90]); const idAttribute = document.createAccessor() .setBuffer(document.listBuffers()[0]) .setType(Accessor.Type.SCALAR) .setArray(idArray); const featureID = meshFeaturesExt.createFeatureID() .setFeatureCount(idArray.length) .setAttribute(0); // _FEATURE_ID_0 // Primitives reference a set of >=1 FeatureID properties. Each property // defines a mapping from a part of the Primitive to an ID. const features = meshFeaturesExt.createMeshFeatures() .addFeatureID(featureID); // Assign FeatureID properties to the Primitive. primitive .setAttribute(`_FEATURE_ID_0`, idAttribute) .setExtension("EXT_mesh_features", features);