August 2018
Intermediate to advanced
528 pages
10h 58m
English
To demonstrate saving and loading, we created a simple example based on THREE.TorusKnotGeometry. With this example, you can create a torus knot, just as we did in Chapter 5, Learning to Work with Geometries, and, using the Save button from the Save & Load menu, you can save the current geometry. For this example, we save using the HTML5 local storage API. This API allows us to easily store persistent information in the client's browser and retrieve it at a later time (even after the browser has been shut down and restarted).
We will look at the 03-load-save-json-object.html example. This example is demonstrated in the following screenshot:
Exporting in JSON from Three.js is very easy and doesn't require you ...
Read now
Unlock full access