name of the glTF/GLB file (as specified in the preload list)
the parsed scene descriptor, or null if not found
me.loader.preload(
[{ name: "diorama", type: "glb", src: "scenes/diorama.glb" }],
() => {
// load the whole scene into the world (view under a Camera3d)
me.level.load("diorama", { scale: 32 });
// ...or inspect the raw descriptor for custom framing
const scene = me.loader.getGLTF("diorama");
const { min, max } = scene.bounds;
},
);
return the parsed glTF/GLB scene descriptor for the given asset name.
The descriptor is
{ nodes, cameras, lights, bounds }: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, world-spacedirection/position); empty without the extension. The level director instantiates directional ones automatically.bounds— world-space{ min, max }(glTF units), handy for framing.Most code never needs this: a preloaded glTF/GLB auto-registers with the level director, so the whole scene loads into a container in one call via
me.level.load(name)— exactly like a Tiled map. Reach forgetGLTFonly when you want to inspect the raw descriptor (e.g. to frame aCamera3dfrom the embedded camera).