https://github.com/mrdoob/three.js/blob/master/utils/exporters/convert_obj_three.py
it shuld be pretty easy to adap this one to your desired json format.
--
Nicolas Garcia Belmonte - http://philogb.github.com/
And/ or is there another converter available since last September?
--
You received this message because you are subscribed to the Google Groups "PhiloGL" group.
To unsubscribe from this group and stop receiving emails from it, send an email to philogl+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
new PhiloGL.IO.XHR({url: 'heart.obj',
onSuccess: function(url) {
p3d = new P3D url
//(p3d) -> for chunk, i in p3d.chunks
//console.log "loading #{p3d.filename} chunk ##{i}";
heart = new PhiloGL.O3D.Model();
heart[attr] = p3d[attr] for attr in ["vertices", "normals", "indices"];
//var json = JSON.parse(text);
//json.colors = [1, 1, 1, 1];
//json.textures = 'heart_Diffuse.jpg';
//var heart = new PhiloGL.O3D.Model(json);
animateObject(heart);
}
}).send();
My file follows example file #14 from philoJS's lessons. And in this example PhiloGL.IO.XHR is created to load the json. When using P3D, do I not need to do this b/c I will be loading just the obj?
url = "./my-obj-url.obj"new P3D(url, function(p3d) {
heart = new PhiloGL.O3D.Model();heart[attr] = p3d[attr] for attr in ["vertices", "normals", "indices"];
animateObject(heart);
});