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_accessor_float16enables support for IEEE-754 binary16 ("half-precision" or "float16") Accessors, in all contexts where the base glTF 2.0 specification already allows binary32 ("single-precision" or "float32") Accessors. This extension must be marked as required; implementations that do not support float16 Accessors will be unable to parse the Document correctly.Example
import {Accessor} from '@gltf-transform/core'; import {KHRAccessorFloat16} from '@gltf-transform/extensions'; // Create an Extension attached to the Document. document.createExtension(KHRAccessorFloat16).setRequired(true); // Store Float16Array instances in one or more Accessors. const mesh = document.getRoot().listMeshes() .find((mesh) => mesh.getName() === 'MyMesh'); for (const prim of mesh.listPrimitives()) { const position = document.createAccessor() .setType('VEC3') .setArray(new Float16Array([...])); prim.setAttribute('POSITION', position); }