hwsd
hwsd

Reputation: 13

Three.js is not an instance of THREE.Object3D

I need your help. Here is the code for

c9:

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

and git:

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

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
  1. it looks so that I can not reload 3d object but why? :(

  2. If you manage to load August 3d object whether it is the ability to move an object to a place in which you hit?

I will add the export objects in bledner to Three.js or .obj because I tried different ways, even used a export objects from here: (http://) threejs.org/editor/


edit

Upvotes: 1

Views: 4644

Answers (1)

2pha
2pha

Reputation: 10155

I think the callback for JSONLoader get a geometry object, so you need to create a mesh.

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

    scene.add(new THREE.Mesh(obj));

});

I have not tested this though.

Upvotes: 2

Related Questions