三.js不是三的实例.对象3D



我需要你的帮助。这是代码

c9:

https://ide.c9.io/zixxus/zixxus_github_io 或 (http://) zixxus-github-io-zixxus.c9.io/

和 git:

https://github.com/zixxus/zixxus.github.io.git

我的控制台:

"THREE.WebGLRenderer" "69" three.js:17679
"THREE.WebGLRenderer: .setClearColorHex() is being removed. Use .setClearColor() instead." three.js:18158
"THREE.Object3D.add:" Object { uuid: "648CCB0D-90E4-4E8B-A464-26AA086638FF", name: "", type: "Geometry", vertices: Array[8], colors: Array[0], faces: Array[12], faceVertexUvs: Array[1], morphTargets: Array[0], morphColors: Array[0], morphNormals: Array[0], 19 more… } "is not an instance of THREE.Object3D." three.js:7562
  1. 看起来我无法重新加载 3d 对象,但为什么? :(

  2. 如果您设法加载 August 3d 对象,是否可以将对象移动到您击中的地方?

我将 bledner 中的导出对象添加到 Three.js 或 .obj 中,因为我尝试了不同的方法,甚至使用了此处的导出对象:(http://) threejs.org/editor/


编辑

我认为 JSONLoader 的回调会得到一个几何对象,所以你需要创建一个网格。

var lod = new THREE.JSONLoader();
lod.load('js/model/untitled.json',function(obj){
    scene.add(new THREE.Mesh(obj));
});

不过我还没有测试过这个。

最新更新