Show
Destroy
An entry
Get it down. Make it good. Share it.
Title
Text
I ran into a recent issue using SceneExporter(), as referenced in older Three.js tutorials. THREE.SceneExporter() has been deprecated. Fortunately, Three.js offers other ways to import and export files. GLTF is the currently recommended Exporter to use. But, for local development purposes, I wanted a basic .json format, and fortunately, it is quite easy to get started with. ``` function save() { var result = scene.toJSON(); localStorage.savedScene = JSON.stringify(result); } ``` ``` function load() { var json = JSON.parse(localStorage.savedScene); var loader=new THREE.ObjectLoader(); loader.parse(json, function(e) { // Set the Scene as the loaded Object scene = e; }); } ```
Status
idea
draft
release
personal
Series
Part of a Series?
Bitcoin
On Work
Phoenix Trello Tutorial
Civics
Re Email Address
Tags
threejs
×
json
×
+
Slug
Url
Image 1
Image 2
Image 3
Visible
Date