davidson16807 / tectonics.js

3d plate tectonics in your web browser
http://davidson16807.github.io/tectonics.js/
Creative Commons Attribution 4.0 International
205 stars 28 forks source link

Rewinding the clock #66

Closed Aisede closed 1 year ago

Aisede commented 1 year ago

I've noticed there's only a 'play' button and no rewind button. Is this intentional? What if I want to go back, see what my map looked like before what it has become?

davidson16807 commented 1 year ago

This is a duplicate of #16. The problem here is that, despite being a physics model, and the physics being deterministic, there are some operations that model the physics that simply cannot be reversed. Even if we could reverse them, that's not to say we wouldn't want to add other subsystems that aren't reversible, and we don't want to limit ourselves in what subsystems we represent (by "subsystem", I mean important things, like fluid simulations for climate, ocean, mantle, etc) so the only way to make this work is to cache the state of the model every few frames for some amount of time, but we're already running up against the limits of javascript as to how much can be represented on typical machines, caching the entire state of the model every few frames will simply multiply what we're doing now. The obvious workaround is to cache at a much lower resolution and not allow the user to play forward from anytime they go back to (lest they get stuck working with the low resolution) This is basically the approach that sim earth took. I agree that it can be done in this form, but this is a lot of work for something that I don't see offers much benefit to the user. I think the user would be better suited having some for of video capture, which is something they can easily get using third party tools.