Extension

Base class for all Extensions.

Extensions enhance a glTF Document with additional features and schema, beyond the core glTF specification. Common extensions may be imported from the @gltf-transform/extensions package, or custom extensions may be created by extending this base class.

An extension is added to a Document by calling Document.createExtension with the extension constructor. The extension object may then be used to construct ExtensionProperty instances, which are attached to properties throughout the Document as prescribed by the extension itself.

For more information on available extensions and their usage, see Extensions.

Reference:

Constructor

Static properties

EXTENSION_NAME: string

Official name of the extension.

Properties

extensionName: string

Official name of the extension.

Methods

  • dispose(): void
  • isRequired(): boolean
  • 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.

  • listProperties(): ExtensionProperty[]
  • 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.

Function symbol, where the argument and output are a box labeled 'glTF'.

Made by Don McCurdy. Documentation built with greendoc and published under Creative Commons Attribution 3.0.