How can I save and load workspace in threejs?

Hi everyone, I am building my own 3d model editor with threejs.
I can create a new 3d object or import existing models in the type of gltf, obj, ifc, etc.
And I am going to save workspace in a json format or something else.
I tried with toJSON, gltf exporter but none of them was helpful.
How can I solve this problem?

What do you mean with “not helpful”? In general, the JSON format of three.js is ideal for such a use case. It is also used by the three.js editor.

1 Like

Thanks for quick reply.
Here is what I did with toJSON and ObjectLoader.

var sceneData = this.scene.toJSON();

var loader = new THREE.ObjectLoader();
function (scene) {
self.scene = scene;
function (xhr) {
console.log((xhr.loaded / * 100) + ‘% loaded’);
function (err) {
console.error(‘An error happened’);

And I could get this result with unexpected error.

Origin object:

Loaded object:


Hi Zap, I am new to threejs myself and I am not a programer… But I do have 20+ years of modeling experience in Maya, 3DSmax, ZBrush, and Blender… If you ever need a beta tester let me know! Good luck with Save and Load…

Sure things. :slight_smile: