the asset name
the parsed scene descriptor, or null if none is
loaded under that name
await loader.preload([
{ name: "diorama", type: "glb", src: "scenes/diorama.glb" },
]);
// load the whole scene into the world (view it under a Camera3d)
level.load("diorama", { scale: 32 });
// ...or inspect the raw descriptor for custom framing
const { min, max } = loader.getGLTF("diorama").bounds;
Get a loaded glTF/GLB scene (a
"gltf"or"glb"asset), parsed.The descriptor is
{ nodes, cameras, lights, bounds, graph, animations }:nodes— one entry per mesh primitive, each carrying its accumulatedworldtransform (16 floats, column-major),vertices,normals,uvs,indices,vertexCount, a decoded baseColorimage(ornull), and adoubleSidedflag.cameras— glTF cameras, each with itsworldtransform + perspective parameters.lights— parsedKHR_lights_punctuallights (type,color,intensity,range, spot cone angles, world-spacedirection/position,name); empty without the extension. The level director instantiates directional, point and spot lights automatically (see level.load options).bounds— world-space{ min, max }(glTF units), handy for framing.Most code never needs this: a loaded glTF/GLB registers with the level director, so the whole scene loads into a container in one call,
level.load(name), exactly like a Tiled map. Reach forgetGLTFonly to inspect the raw descriptor (to frame aCamera3dfrom the embedded camera, say).