vircadia-web
vircadia-web copied to clipboard
Cache current environment in `IndexedDB` in case of disconnects to prevent reloading the entire world's content files every time.
Delete this cache upon navigating away from a world explicitly (or leaving the app and coming back, explicitly).
Doc references:
- https://doc.babylonjs.com/features/featuresDeepDive/scene/optimizeCached
- https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API
One issue we'll run into is measuring the cache against the actual world state to see if anything changed. Does the entity tree of a crude "lastChanged" value I wonder? The best ideal would be where world state is stored in Git so you can replay and unwind world changes live.