Closed hilariousppp closed 5 years ago
I'll check it out.
Looks like an error gets thrown in the console when this happens:
BufferGeometryUtils.js:23 Uncaught TypeError: Cannot read property 'length' of undefined at Object.geometryToBufferGeometry [as fromGeometry] (BufferGeometryUtils.js:23) at create_mesh (RealisticWorldView.js:14) at RealisticWorldView.updateScene (RealisticWorldView.js:68) at GlobeProjectionView.updateScene (GlobeProjectionView.js:15) at View.update (View.js:40) at update (index.html:541)
more sleuthing needed.
Alright, this is an issue with Grid object serialization. Grid objects are initialized from Three.js geometries, however this isn't a strict requirement. They can also be initialized from json objects, which is what happens when loading save files. The Three.js geometries have properties that the json objects don't have, so if ever the model relies on them, it breaks.
The fix is simple enough: don't use the properties.
In an effort to keep this issue from reoccurring, I now convert the Three.js geometries to a json object on startup. This should make any bugs much easier to spot in the future.
The fix is out in prod. Go check it out. If there are no other related issues I'll close this out.
Everything works properly with saves made after the update. Thank you!
When I try to change views after loading a saved simulation, the planet disappears completely. This occurs in both Firefox and Chrome.