ReadonlyanimationsAnimation clips keyed by name; an unnamed clip is keyed anim_<index>
Whether Scene3DSource#destroy has run
ReadonlygeometriesEvery mesh's geometries, by its index in the file: one per primitive of the mesh
ReadonlygeometryThe geometry of each mesh the file names, keyed by mesh name
A mesh with several primitives maps to its first; Scene3DSource#geometries has them all.
ReadonlymaterialThe materials the file names, keyed by name
ReadonlymaterialsEvery material, by its index in the file
Unlit materials load as FlatMaterial, the rest as Material3D. When a mesh
primitive names no material, the glTF default material, a white Material3D with metallic and
roughness at 1, is added after the file's own.
ReadonlysceneThe scenes the file names, keyed by name
Pass a name as Model3DOptions#scene to spawn that scene instead of the default one.
ReadonlytextureThe textures the file names, keyed by name
ReadonlytexturesEvery texture, by its index in the file
Textures in the file that use the same image share one Texture and its style, so an entry can
repeat. The file's samplers set the style, and glTF's defaults (repeat wrapping, linear
filtering, mipmaps) fill whatever a sampler leaves out.
Destroys every geometry, material and texture the source holds; a second call does nothing
Every Model3D spawned from this source draws these resources, so destroy or stop
rendering those models first. For a source from Assets.load, call Assets.unload(url)
instead. It destroys the source and also unloads every image the file referenced from the
loader's cache, even when another loaded asset still uses one.
The geometries, materials, textures and animations loaded from a glTF or GLB file
A source is a template: add
new Model3D(source)to a view, never the source itself. Every model spawned from one source shares its geometries, materials and textures, so a change to a source material shows on every model that draws it. Model3D#materials gives one model materials of its own.The plural lists (
textures,materials,geometries) hold everything, by index in the file. The singular records (texture,material,geometry) hold only what the file named.loadGltf lists the texture formats a file can use and the imports they need.
Example