I recently got into three js and have been experimenting with creating a world and some some character movement stuff. The problem is that when I try to animate my 3d character, nothing happens. The model loads in T-pose, but doesn’t seem to have access to it’s other animations. Each animation is saved as an individual fbx file. I tried peering into the console and all I got were these errors:
- FBXLoader: Image type “fbm” is not supported.
- FBXLoader.js:3312 THREE.FBXLoader: FBX binary version: 7700
- GET http://127.0.0.1:5500/assets/moves/Emi.fbm 404 (Not Found)
I’m running the js on a local live server using VS code’s liveserver addon.
Here’s my import FBXLoader line:
import { FBXLoader } from 'https://cdn.jsdelivr.net/npm/three@0.118.1/examples/jsm/loaders/FBXLoader.js';
And this is my animation function for the 3d model:
LoadAnima() {
const loader = new FBXLoader();
loader.setPath('assets/moves/');
loader.load('Emi.fbx', (fbx) => {
fbx.scale.setScalar(0.1);
fbx.traverse(c => {
c.castShadow = true;
});
const anim = new FBXLoader();
anim.setPath('assets/moves/');
anim.load('Idle.fbx', (anim) => {
this.mixer = new THREE.AnimationMixer(fbx);
const idle = this.mixer.clipAction(anim.animations[0]);
idle.play();
});
this.scene.add(fbx);
});
}
This is my first time posting on this site, so I don’t really know how this is going to turn out, but any help is appreciated