I recently delved into the world of three.js and decided to follow a helpful tutorial on loading GLTF Models using Three.js. Excited to further my skills, I wanted to experiment by utilizing the FBX loader to import and animate models from Mixamo.
The tutorial easily incorporated CDNs for the three.min.js and GLTFLoader files. In an attempt to do the same with the FBXLoader, I encountered persistent errors when trying to call the FBXLoader from my main.js file.
In my HTML setup, I have:
Within my main.js script, I attempted to call the loader in two ways:
const loader = new THREE.FBXLoader();
and
const loader = new FBXLoader();
However, both approaches resulted in respective errors:
Uncaught TypeError: THREE.FBXLoader is not a constructor
Uncaught ReferenceError: FBXLoader is not defined
Despite my efforts to troubleshoot by adjusting 'module' types and file extensions, no successful workaround has emerged (not to mention encountering a deprecation warning). As someone still learning about importing plugins from three.js, any guidance or clarification would be greatly appreciated.
Addtionally, considering that GLTF stands as the preferred format for Three.js, should I convert my FBX model and animations from Mixamo to GLTF through Blender?
Your insight on this matter would be highly valued. Thank you.