I'm trying to import a 3d model from Blender to a Three.js project, but I still get this error: Uncaught TypeError: Cannot read property 'x' of undefined. This is the piece of code that creates the problem:
var loader= new THREE.JSONLoader();
loader.load('http://localhost/js/map.json', function(geometry) {
mesh= new THREE.Mesh(geometry);
scene.add(mesh);
});
And here you can find the json of the 3d model that was provided to me: http://s000.tinyupload.com/index.php?file_id=14990264909497963783
Any help to understand what does not work will be greatly appreciated.
glTF
and useGLTFLoader
for loading. Read the following guide for more information: threejs.org/docs/index.html#manual/en/introduction/… – Mugen87