Facile_Princeps
New Coder
//gltf-object
const loader = new GLTFLoader();
loader.load('stegosaurs_SStenops.glb', (gltf) => {
gltf.scene.position.set(0, 40, 130);
gltf.scene.visible = true;
scene.add(gltf.scene);
// Animation;
let mixer = new AnimationMixer(gltf.scene);
mixer = new AnimationMixer(gltf.scene);
let action = mixer.clipAction(gltf.animations[0]);
action.play();
} );
let clock = new Clock();
// inside the render lopp ...
function update () {
mixer.update(clock.getDelta());
}
The objects displays but the animations never runs on the screen.
const loader = new GLTFLoader();
loader.load('stegosaurs_SStenops.glb', (gltf) => {
gltf.scene.position.set(0, 40, 130);
gltf.scene.visible = true;
scene.add(gltf.scene);
// Animation;
let mixer = new AnimationMixer(gltf.scene);
mixer = new AnimationMixer(gltf.scene);
let action = mixer.clipAction(gltf.animations[0]);
action.play();
} );
let clock = new Clock();
// inside the render lopp ...
function update () {
mixer.update(clock.getDelta());
}
The objects displays but the animations never runs on the screen.