ReadonlynameThe glTF extension name this plugin handles, e.g. "KHR_lights_punctual". Also written
into the document's extensionsUsed array when this plugin's writeNode actually emits
something for at least one node.
OptionalapplyApply this extension's data as plain fields onto an already-constructed node (e.g.
SW_prefab_instance setting obj.prefabSource) -- called for every node, after its class
has already been decided.
OptionaldecodeOptional hook to decode geometry for a mesh primitive (e.g. KHR_draco_mesh_compression).
Return decoded GeometryDataInterface or undefined / null to defer to the next plugin
or the default accessor parser.
OptionalfinalizeFlush any root-level data accumulated in ctx.state during writeNode (e.g.
KHR_lights_punctual's lights[] array) into ctx.doc.extensions once, after the whole
tree has been written.
OptionalprepareOptional root-level pre-pass over the whole document, run once before any node is
constructed -- e.g. indexing KHR_lights_punctual.lights[] by node so readNode doesn't
need to re-scan the root extension data for every node.
OptionalreadDecide the concrete Object3D subclass for a node from this extension's data, e.g. a
PointLight for KHR_lights_punctual or a StageZoneMarker for SW_stage_zone. Return
undefined to defer to the next plugin (or the plain Object3D fallback) -- plugins are
tried in registration order and the first non-undefined result wins.
OptionalresolveOptional hook to resolve a texture definition into a Small World Texture (e.g. KHR_texture_basisu).
Return resolved Texture or undefined / null to defer to standard texture resolution.
OptionalwriteMutate node.extensions for obj during WorldWriter's node tree walk, if relevant.
A single glTF vendor/community extension's read+write behavior, registered via
registerGltfExtension()(seeGltfExtensionRegistry.ts) instead of being hardcoded as an if/else branch insideGltfLoader/WorldWriter-- see ADR 0017. All hooks are optional; a plugin implements only the ones its extension actually needs (e.g.SW_prefab_instanceonly ever sets a plain field, so it has noprepareRead/finalizeWrite).