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:

Hierarchy

  • Extension

Properties

extensionName: string = ''

Official name of the extension.

EXTENSION_NAME: 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.

  • 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, f(📦) → 📦, where the argument and output are a box labeled 'glTF'.

Made by Don McCurdy TypeDoc documentation Copyright 2021 under MIT license