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

Pauses before collisions #211

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/620. Seen during testing for https://github.com/phetsims/collision-lab/issues/184, and I thought it was related, but since I still see it, making an issue here. Seems to happen more often when elasticity is low.

Sometimes before a collision, especially if it is the last collision and elasticity is low, the balls pause before the collision. If it occurs, it happens consistently with that set up. No console error seems to happen.

Visuals freezebeforehit

Troubleshooting information:

!!!!! DO NOT EDIT !!!!! Name: ‪Collision Lab‬ URL: https://phet-dev.colorado.edu/html/collision-lab/1.1.0-rc.4/phet/collision-lab_all_phet.html Version: 1.1.0-rc.4 2021-03-04 23:24:10 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/89.0.4389.82 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: {}
brooklynlash commented 3 years ago

It is also very visible in the iframe and xhtml for both Chrome and Firefox

jonathanolson commented 3 years ago

@arouinfar thoughts on this? I did increase a threshold to prevent buggy behavior which can cause more iterations of the model to run in these low-elasticity cases.

The way I'd attack this would be performance optimization of the current way things are handled. Should I look into that?

arouinfar commented 3 years ago

@jonathanolson I played with rc.4 a bit, and I'm only seeing this effect in the Explore 1D screen (not saying that it doesn't occur elsewhere, but it seems more unlikely). At worst, it's a slight stutter when the ball comes to rest, and it's noticeable because the the 5th ball's velocity is so large.

stutter

It'd be nice to get @kathy-phet's feedback to see what she recommends.

arouinfar commented 3 years ago

@kathy-phet said over Slack:

If you are good with it, I am inclined to mark as will not fix. It seems pretty corner case, and not really incorrect. I was playing with it some to see how it was working when you wrote. Then we can declare victory and publish too...

@jonathanolson I'm going to close this as wont-fix, please proceed with publication. 🎉