Introduction

Let's ask ourselves this simple question:

Why do we need to save the scene?

Let's say that we have a large file. Assume that it takes >1min to parse the file. Now, let's assume that we want to view the result many times. We might even turn off our computer in-between viewings.

How can we view the file, without re-parsing it?

One might suggest using localStorage (read more here). However, localStorage is limited to about 5MB and can contain only strings and is not accessible from Web Workers (1).

I suggest using IndexedDB instead. IndexedDB is a way for you to persistently store data inside a user's browser (2). Read more here.

Last updated