glTF extensions can be present in glTF files, and will be present in the parsed JSON. glTF extensions can supported by applications by inspecting the extensions
fields inside glTF objects, and it is up to each application to handle or ignore them.
loaders.gl aims to provide support for glTF extensions that can be handled completely or partially during loading, and article describes glTF extensions that are fully or partially processed by the @loaders.gl/gltf
classes.
Note that many glTF extensions affect aspects that are firmly outside of the scope of loaders.gl (e.g. rendering), and no attempt is made to process those extensions in loaders.gl.
Extension | Description |
---|---|
KHR_draco_mesh_compression | |
KHR_lights_punctual | |
KHR_materials_unlit |
Supports compression of mesh attributes (geometry).
Specification: KHR_draco_mesh_compression.
Parsing Support:
decompress: true
options to the GLTFParser
any decompressed by the GLTFParser
.Encoding Support:
GLTFBuilder
.Supports specification of point light sources and addition of such sources to the scenegraph node.
Specification: KHR_lights_punctual
Parsing Support:
KHR_lights_punctual
extension will get a light
field with value containing a light definition object with properties defining the light (this object will be resolved by index from the global KHR_lights_punctual
extension object's lights
array) .KHR_lights_punctual
extensions will be removed from all nodes.KHR_lights_punctual
extension (including its light list)) will be removed.Encoding Support:
Specifies that a material should not be affected by light. Useful for pre-lit materials (e.g. photogrammetry).
Specification: Similar to KHR_draco_mesh_compression
, but supports point clouds (draw mode 0). Also does not support any fallback or non-compressed accessors/attributes.
Parsing support:
Encoding support:
GLTFBuilder
and decompressed by the GLTFParser
.