new GLTFObject(model, pos3D)gltf.js:261Make the object and its parts, model.createObject is the usual way
const door = model.createObject(vec3(0, 0, 5));
door.play('open', false); // once, holding the last poseGLTFObject - A model as an object with a child per part, which plays the model's animations
Extends EngineObject3D
new GLTFObject(model, pos3D)gltf.js:261Make the object and its parts, model.createObject is the usual way
const door = model.createObject(vec3(0, 0, 5));
door.play('open', false); // once, holding the last poseanimation : GLTFAnimation|undefinedgltf.js:277The animation playing, or the last one, undefined for none
animationLoop : booleangltf.js:283Start again at the end, or stop there and hold the last pose
animationPlaying : booleangltf.js:285Whether it is moving through the animation now
animationSpeed : numbergltf.js:281How fast it plays, 1 is as made, negative plays it backward
animationTime : numbergltf.js:279Seconds into the animation
blendFrom : {animation?: GLTFAnimation, time?: number, speed?: number, loop?: boolean, nodes?: Map<number, Object>}|undefinedgltf.js:288model : GLTFModelgltf.js:274The model it shows
parts : Array<EngineObject3D>gltf.js:301The child that draws each of the model's parts, in the order of model.parts, which an animation poses; one destroyed or taken off the object is left alone
poseNodes : Map<number, Object>|undefinedgltf.js:294poseWorldOf : (function(number): Matrix4)|undefinedgltf.js:297destroy(immediate)gltf.js:330Destroy the object and its parts, and free the meshes its skinned parts bend, which are its own
immediate boolean optionalgetJointMatrix(name) → Matrix4|undefinedgltf.js:442A node's matrix in the world as the model is posed now, by its name in the file, to hang something on a joint, a sword on a hand or a hat on a head; undefined when the model has no node of that name
name stringplay(animation, loop, speed, blend)gltf.js:345Play an animation from its start, at once or cross-faded from the pose it is in
animation string|number|GLTFAnimation optional, default 0Its name, its number in model.animations, or itself
loop boolean optional, default trueStart again at the end, or stop there
speed number optional, default 11 is as made, negative plays it backward from its end
blend number optional, default 0Seconds to cross-fade from the pose it is in, 0 to switch at once; the animation it comes from goes on through the fade, and a fade started during another fades from the mix there
setAnimationTime(time)gltf.js:378Put the parts where the animation has them at a time, playing or not
time numberSeconds into the animation
stop()gltf.js:374Stop the animation where it is, the parts hold that pose; a cross-fade going on stops too, holding the mix
update()gltf.js:415Move through the animation, and a cross-fade into it, called automatically each frame