new GLTFObject(model, pos3D)gltf.js:272Make 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:272Make 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:288The animation playing, or the last one, undefined for none
animationLoop : booleangltf.js:294Start again at the end, or stop there and hold the last pose
animationPlaying : booleangltf.js:296Whether it is moving through the animation now
animationSpeed : numbergltf.js:292How fast it plays, 1 is as made, negative plays it backward
animationTime : numbergltf.js:290Seconds into the animation
blendFrom : {animation?: GLTFAnimation, time?: number, speed?: number, loop?: boolean, nodes?: Map<number, Object>}|undefinedgltf.js:299model : GLTFModelgltf.js:285The model it shows
parts : Array<EngineObject3D>gltf.js:312The 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:305poseWorldOf : (function(number): Matrix4)|undefinedgltf.js:308destroy(immediate)gltf.js:341Destroy the object and its parts, and free the meshes its skinned parts bend, which are its own
immediate boolean optionalgetJointMatrix(name) → Matrix4|undefinedgltf.js:453A 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:356Play 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:389Put the parts where the animation has them at a time, playing or not
time numberSeconds into the animation
stop()gltf.js:385Stop the animation where it is, the parts hold that pose; a cross-fade going on stops too, holding the mix
update()gltf.js:426Move through the animation, and a cross-fade into it, called automatically each frame