phetsims/collision-lab

Path experiences glitchy behavior when ball is moved and other ball has left screen

Closed this issue · 8 comments

Test device

Windows 10 Laptop

Operating System

Windows 10 1909

Browser

Firefox 84.0.2 (64-bit)

Problem description

For phetsims/qa#599

The path seems to have some frequent visual glitches when the ball is moved about after an initial movement. There is a straight line usually which connects the previous path to the new path. This can occur on both firefox and chrome.

Steps to reproduce

  1. Navigate to the Explore 2D screen
  2. Check the Path checkbox
  3. Uncheck the Reflecting Border checkbox
  4. Unpause the simulation and allow one ball to leave the screen
  5. Move the last ball about, placing it down and unpausing the sim, this may take a few tries, but it should start working consistently after about 2-3

Visuals

2021-01-21CollLabFirefoxPathglitch

Troubleshooting information:
!!!!! DO NOT EDIT !!!!!
Name: ‪Collision Lab‬
URL: https://phet-dev.colorado.edu/html/collision-lab/1.1.0-rc.1/phet/collision-lab_en_phet.html
Version: 1.1.0-rc.1 2021-01-20 01:05:28 UTC
Features missing: touch
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:84.0) Gecko/20100101 Firefox/84.0
Language: en-US
Window: 1920x966
Pixel Ratio: 1/1
WebGL: WebGL 1.0
GLSL: WebGL GLSL ES 1.0
Vendor: Mozilla (Mozilla)
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 desired path behavior:

  • Clipped so that it never appears outside of the grid area, regardless of state of Reflecting Border
  • Dragging a ball should clear its path, even if the sim is paused at the time.

Should be handled by both commits above. @arouinfar does this look good?

The behavior looks good in master @jonathanolson

This looks good in rc.2. Tested it out in the Explore 2D and Inelastic sections of the sim. Closing

Reopening for phetsims/qa#607 due to a potentially odd behavior. Feel free to close again if this is not an issue.
When dragging on of the balls while paused (or while playing), the grabbed ball will have its path disappear, but any other paths remain until the ball is released.
othersstillthere

I don't have a strong opinion on this @jonathanolson. Feel free to leave it as-is, or clear all paths simultaneously.

It's a bit less risky to leave as-is. Also notably because the removal of OTHER paths happens because of state saving, it does NOT clear the "other" path if it's outside of the play area (which seems slightly useful):

image

@arouinfar is leaving that fine, given that extra information? Otherwise we can close this issue.

Let's leave it as-is, thanks @KatieWoe @jonathanolson.