phetsims / collision-lab

"Collision Lab" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
6 stars 4 forks source link

Changing elasticity should save state #190

Closed arouinfar closed 3 years ago

arouinfar commented 3 years ago

Discovered when reviewing #183.

Currently, changing the mass, velocity, or position of a ball will save the state. However, changing the elasticity does NOT save the state, which seems really odd to me. This means that a user can set up some experiment, but if the elasticity was manipulated last, it will not be properly restored.

@jonathanolson how complicated would it be to include changes in elasticity to the conditions for saving a new state? I think for this to work, we would need to pause the sim while elasticity is changed, similar to what happens when changing the mass with the slider.

jonathanolson commented 3 years ago

I believe this should be handled above. It was setting the time correctly, but NOT resetting ball states. That should be fixed. Can you verify?

arouinfar commented 3 years ago

Looks good in master, @jonathanolson!