Cannot read property 'extractUrlBase' of undefined at FBXLoader.load

Viewed 596

I am trying to load fbx file in web browser using three.js .

My loader code is :

const objs = [];
const loader = new THREE.FBXLoader();
loader.load('/models/fbx/Handgun.fbx', model => {
    // model is a THREE.Group (THREE.Object3D)                              
    const mixer = new THREE.AnimationMixer(model);
    // animations is a list of THREE.AnimationClip                          
    mixer.clipAction(model.animations[0]).play();
    scene.add(model);
    objs.push({model, mixer});
});

the code is throwing constant error of :

Uncaught TypeError: Cannot read property 'extractUrlBase' of undefined at FBXLoader.load (FBXLoader.js:43)

0 Answers
Related