I'm new on three.js and I don't understand what does it mean?
I want to show .dae object.
Anybody can help w/ this case?
I'm new on three.js and I don't understand what does it mean?
I want to show .dae object.
Anybody can help w/ this case?
Not related, but please note that uuid
has changed their declare, this one works for me:
import { v4 as uuidv4 } from 'uuid';
uuidv4(); // ⇨ '9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d'
Hope this helps.
This is not a three.js error, this is a JavaScript error.
As the error states Cannot read property 'uuid' of undefined
javascript can not read a property of an undefined variable.
Thus, your clipObject
is undefined
.
You may need to read the JavaScript checking for null vs. undefined and difference between == and ===
The error was in the following line
var action = mixer.clipAction( animations[ 0 ] ).play();
I used code from example from threejs website and the example was a moving example of a stormtrooper from star wars. But in my example the object is static. So I just removed the line.
To fix error, you need to comment few lines like below (object have`t anim):
const loader = new FBXLoader(); loader.load ( 'files/models/fbx/ContainerBox_05/ContainerBox_05.fbx', function (object) { //mixer = new THREE.AnimationMixer(object); <-- COMMENT THIS
//const <-- COMMENT THIS
//action = mixer.clipAction(object.animations[0]); <-- COMMENT THIS
//action.play(); <-- COMMENT THIS