I am currently attempting to import a .fbx file using the FBXLoader from three.js with the following code block:
var fbxLoader = new THREE.FBXLoader();
fbxLoader.load('assets/item2.fbx', function (object){
object.position.y = -100;
scene.add(object);
console.log("Object inserted.");
fitCameraToObject(camera, object, 2, controls);
controls.update();
animate();
},
function (xhr) {
console.log((xhr.loaded / xhr.total * 100) + '% loaded');
},
function (err)
{
console.error(err);
}
);
(Lines 122-138)
Upon loading my webpage, I encountered an error in webGLLoader.js as follows:
8.514530412006819% loaded
webGLLoader.js:132 100% loaded
FBXLoader.js:3252 THREE.FBXLoader: FBX binary version: 7400
webGLLoader.js:136 TypeError: node.applyMatrix4 is not a function
at FBXLoader.js:827
at Mesh.traverse (three.js:5686)
at Group.traverse (three.js:5692)
at FBXTreeParser.parseScene (FBXLoader.js:819)
at FBXTreeParser.parse (FBXLoader.js:130)
at FBXLoader.parse (FBXLoader.js:102)
at Object.onLoad (FBXLoader.js:54)
at XMLHttpRequest.<anonymous> (three.js:35758)
(anonymous) @ webGLLoader.js:136
(anonymous) @ FBXLoader.js:60
setTimeout (async)
(anonymous) @ FBXLoader.js:58
(anonymous) @ three.js:35758
load (async)
load @ three.js:35736
load @ FBXLoader.js:50
(anonymous) @ webGLLoader.js:123