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

Slightly inconsistent blue reset behavior #209

Closed KatieWoe closed 3 years ago

KatieWoe commented 3 years ago

Test device Dell Operating System Win 10 Browser Chrome Problem description For https://github.com/phetsims/QA/issues/615. Similar to https://github.com/phetsims/collision-lab/issues/199, but some things seem a bit different, especially now that some behaviors such as changing aspects bouncing balls back into the play area have changed in https://github.com/phetsims/collision-lab/issues/206. When a ball is outside the play area due to the reflecting border being gone, changes in state are not meant to be saved so that when you press the blue reset scene button you are returned to a point with all the available balls. However, some things change back to the state being restored to, and some do not and instead keep changes that weren't saved to state. Changes that remain even after resetting scene:

  1. Elasticity
  2. Number of balls
  3. Constant size

Changes that do not remain:

  1. Mass
  2. Velocity

Visuals massdoesreset numbernotreset consizenotreset elasticitynotreset

Troubleshooting information:

!!!!! DO NOT EDIT !!!!! Name: ‪Collision Lab‬ URL: https://phet-dev.colorado.edu/html/collision-lab/1.1.0-rc.3/phet/collision-lab_all_phet.html Version: 1.1.0-rc.3 2021-02-24 17:20:08 UTC Features missing: applicationcache, applicationcache, touch Flags: pixelRatioScaling User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.190 Safari/537.36 Language: en-US Window: 1280x658 Pixel Ratio: 1.5/1 WebGL: WebGL 1.0 (OpenGL ES 2.0 Chromium) GLSL: WebGL GLSL ES 1.0 (OpenGL ES GLSL ES 1.0 Chromium) Vendor: WebKit (WebKit WebGL) Vertex: attribs: 16 varying: 30 uniform: 4096 Texture: size: 16384 imageUnits: 16 (vertex: 16, combined: 32) Max viewport: 32767x32767 OES_texture_float: true Dependencies JSON: {}
jonathanolson commented 3 years ago

I've looked this over again, and I'm not sure what the preferred behavior should be. @arouinfar thoughts?

arouinfar commented 3 years ago

@KatieWoe thank you for documenting these cases. Changing things about the system when a ball is off-screen is definitely an edge case, which is why things can be a bit odd. It's important to test these situations, but I don't think we necessarily want to design a bunch of special cases to handle them all.

If all balls are in the play area, changes to any of the following will override the state that is recalled by the blue reset button.

The sim behaves differently if any ball is off-screen when one of the above properties is edited. In this situation, the blue reset button is a means to return the balls to the play area rather than restore a specific state. For continuity, it's important that things like the number of balls, elasticity, and the state of the constant size checkbox aren't changed by pressing the blue reset button. The trade-off is that you end up with a partially-restored state where position/velocity/mass are reverted if they were changed after a ball is off-screen.

@jonathanolson we don't need to make any changes here, so closing.