Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/444.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript Three.js不是Three.Object3D的实例_Javascript_Three.js - Fatal编程技术网

Javascript Three.js不是Three.Object3D的实例

Javascript Three.js不是Three.Object3D的实例,javascript,three.js,Javascript,Three.js,我需要你的帮助。这是你的密码 c9: 或者(http://)zixxus-github-io-zixxus.c9.io/ 和吉特: Myconsole: "THREE.WebGLRenderer" "69" three.js:17679 "THREE.WebGLRenderer: .setClearColorHex() is being removed. Use .setClearColor() instead." three.js:18158 "THREE.Object3D.add:" Ob

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

c9:

或者(http://)zixxus-github-io-zixxus.c9.io/

和吉特:

Myconsole:

"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
  • 看起来我无法重新加载3d对象,但原因是:(

  • 如果您成功加载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));
    
    });
    

    但是我还没有测试过它。

    “THREE.WebGLRenderer”“69”THREE.js:17679“THREE.WebGLRenderer:.setClearColorHex()正在被删除。请改用.setClearColor()。“THREE.js:18158这并不是阻止它工作的原因。没有其他错误吗?没有其他错误,在转换bledner->json时可能有任何错误?