#How can i get the json text code from just models in scene, no cameras
7 messages · Page 1 of 1 (latest)
i don't know what the scene you're trying to export has in it, but I'm guessing it's more than just a single geometry with no materials?
if so it might help to explain more of you're trying to do ... there's not just one right way to export, and JSON can contain whatever you want to put in it, so one JSON file isn't necessarily interchangeable for another
but if you want to export a three.js scene exactly, and you are only going to load that scene back into three.js (not into Blender or Unity or something) then you'd usually do scene.toJSON() and use THREE.ObjectLoader when loading it back in.
i don't know what this code is doing. it looks like it was written for custom JSON data, or maybe a much older version of three.js
Personally i would not want to try to reverse-engineer someone else's data format
scene.toJSON() dumps everything in the scene into JSON, that's the only official way to do that.