new GLTFModel(parts)gltf.js:129Make a model from its parts, as the loader does
partsArray<GLTFPart>@param {Array
} [animations] @param {Object} [nodeTree]
GLTFModel - A loaded model: its parts, and everything as one mesh
new GLTFModel(parts)gltf.js:129Make a model from its parts, as the loader does
parts Array<GLTFPart>@param {Array
animations : Array<GLTFAnimation>gltf.js:139The animations, play one through createObject's GLTFObject
bounds : Object|undefinedgltf.js:156mesh : Meshgltf.js:146Every part combined, each tinted with its material color; the texture is textureInfo, and blending and unlit stay with the parts, which createObject draws
nodeTree : Object|undefinedgltf.js:142parts : Array<GLTFPart>gltf.js:136One per primitive of every node that has a mesh
textureInfo : TextureInfo|undefinedgltf.js:154The texture to draw mesh with, when every part uses the same one
center() → GLTFModelgltf.js:169Move every part so the center of the model's bounds is on the origin, like Mesh.center
createObject(pos3D) → GLTFObjectgltf.js:246Make an object at a position with a child per part, so each keeps its own texture, color and blending, and the model's animations can play on it; the way to show a model with windows or other see through parts, which the combined mesh draws solid, or one that moves
pos3D Vector3 optionaldispose()gltf.js:232Free the GPU buffers of every part's mesh and of the combined mesh, and the textures, for a model that is done with, like a level's models when the next level loads
fit(size) → GLTFModelgltf.js:178Scale every part evenly so the model's largest extent is a size, like Mesh.fit, for models of unknown units
size number optional, default 1getAnimation(animation) → GLTFAnimation|undefinedgltf.js:201Find an animation by name or number
animation string|number|GLTFAnimationgetBounds() → Objectgltf.js:161The box around every part, measured once and again after transform, so change the model through that
getPose(animation, time) → Array<Matrix4>gltf.js:212How far each part has moved from its resting place at a time in an animation, one matrix per part
animation GLTFAnimationtime numberSeconds into it
transform(matrix) → GLTFModelgltf.js:187Move, turn or scale every part and the combined mesh together