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

Clip Ball Values NumberDisplays? #98

Closed brandonLi8 closed 4 years ago

brandonLi8 commented 4 years ago

Currently, the Ball Values NumberDisplays are never clipped.

With values on, the number displays can be seen when the ball is way outside of the pool table. This also applies to the center of mass. image

Should these be clipped by the bounds of the Pool Table? Or we could make them invisible if the ball's center exits the pool table, similar to how the velocity/momentum vectors and the change in momentum vectors are clipped.

brandonLi8 commented 4 years ago

Also, from looking at the ss above, should the center of mass 'x' be clipped as well?

arouinfar commented 4 years ago

Should these be clipped by the bounds of the Pool Table? Or we could make them invisible if the ball's center exits the pool table, similar to how the velocity/momentum vectors and the change in momentum vectors are clipped.

@brandonLi8 I think either of these options would work, but I prefer the latter for a few reasons

brandonLi8 commented 4 years ago

Done in the commit above. Closing.