我使用convert-to-threejs.py将FBX模型转换为JSON,但我无法获取three.js(r58)加载它。它说:“Uncaught TypeError:不能读取未定义的属性”长度“。错误是在9930线在three.js哪一行是for (i = 0; i < json.uvs.length; i++) ...
无法使用THREE.JSONLoader加载从FBX转换为JSON模型
这是转换后的JSON:http://pastebin.com/86ZGvKnW。您会看到它实际上不具有uvs
属性。
convert-to-threejs.py过期了吗?如果是这样,另一种方法是什么?如果没有,我怎样才能让这个模型加载?
这里是我的代码:
window.loader = new THREE.JSONLoader();
loader.load('jet.json', function(geometry) {
// Never gets to here; error is thrown first
console.log(geometry);
});
更新Python脚本是在https://github.com/zfedoran/convert-to-threejs-json – gaitat