OptionalbaseURL that relative uris of buffers and images are resolved against.
loadGltf defaults it to the file's own URL; parseGltf has no
default, so relative URIs are passed to fetch as they are.
OptionaldracoDecoder for KHR_draco_mesh_compression, required only if the file
uses the extension; magic-pixels never bundles a decoder. Either an
already-initialized DracoDecoderModule - the result of
createDecoderModule() from draco3d, or the DracoDecoderModule
global of the CDN build - decoded synchronously on the main thread, or
DracoWorkerOptions to decode in a pool of Web Workers instead.
Optionalfetchfetch implementation for buffers and images; the global one by default
OptionalloadDecode an image into something a Texture accepts. Called with a
Blob for images embedded in a buffer or a data URI, and with the
resolved URL otherwise. The default fetches URLs and decodes with
createImageBitmap; tests inject a stub so Node needs no DOM.
OptionalmeshoptDecoder for EXT_meshopt_compression, required only if the file uses
the extension; magic-pixels never bundles a decoder. Either an
already-initialized MeshoptDecoder - exactly the shape of the
meshoptimizer package's export - decoded on the main thread, or
MeshoptWorkerOptions to decode in a pool of Web Workers
instead.
Options of loadGltf and parseGltf. Everything is optional; the defaults load a file from the network in a browser.