davidson16807 / tectonics.js

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

Year counter broken in master (offline) version? #46

Closed Wr15 closed 4 years ago

Wr15 commented 4 years ago

Hello,

So after some time with the version of the tool at Tectonics.js, I decided to try the most recent version for a more detailed map resolution, which was produced with great results (Albiet rather slowly - though, my gut feeling tells me that there probably isn't all that much to be done about that).

However, there is now a new problem I have encountered in that the counter for the simulation's year no longer appears to do very much at all. Ftr I've tested a few variables already: this problem turns up at both 10K and 40K cells, so I don't this is related to the cell count, and the year number still appears in the filename when saved as an object, so the year is still being counted in the program somewhere - but not when I try to save a screenshot (I get 'undefinedundefined' instead). So, this seems to be an issue with the display primarily? It does sometimes show a little way in, but will almost inevitably freeze very shortly after starting, save for one outlier that got to 12 million years (though I never did see the counter move-it while I was in the menus...).

Could you please investigate this bug?

EDIT: Forgot to mention, I'm currently using the current firefox browser, and am on W10 OS.

davidson16807 commented 4 years ago

This is fixed by commit 705a2d7c550df73a4b413fd99af713c8b5d6a911. It's a one line fix: I just mistook the data type for a variable. Try it out and let me know if that fixes it.

A lot of the user interface has been overhauled in the most recent version and I still have yet to gain enough confidence to publish it. I really appreciate you reporting the bugs you see, and if you find anymore then please don't hesitate to post them.

Wr15 commented 4 years ago

Hi, thank you for the response!

I've just tested that version and I don't think it's working - timer still isn't updating, screenshots are still 'undefinedundefined'. I did, however, find one specific condition under which the timer updates: whenever a new world is randomised, the timer will update to the total time the sim has been running and stick at that level until it's randomised again. Do you envisage an explanation for that?

Well darn it, I've downloaded the wrong version, I'll be back shortly.

Wr15 commented 4 years ago

OK, got the newest version. Screenshot titles are working good in this one, though the on-screen timer is still the way it was.

And for reference, I noted the following in the abover strikethrough:

'...I did, however, find one specific condition under which the timer updates: whenever a new world is randomised, the timer will update to the total time the sim has been running and stick at that level until it's randomised again. Do you envisage an explanation for that?'

davidson16807 commented 4 years ago

Ack, sorry! I forgot you mentioned that in the first post.

Looks like the issue with elapsed time was introduced during a recent refactor. The function that updated elapsed time was supposed to stop when a new simulation was loaded, then start up again when loading was complete. Instead, it only got called once when loading was complete. That's why the "randomize" button was able to update the elapsed time, since it was treated as loading up a new simulation.

davidson16807 commented 4 years ago

Commit 5cca79fa556ef471503ec9fcb53f36dd829324b6 should fix the issue. Let me know what you think!

Wr15 commented 4 years ago

Yes, it does seem to be working rather well now.

davidson16807 commented 4 years ago

Awesome! Thanks for letting me know.