Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sound of moving electrons continues when holding down keyboard nav control of balloon #547

Closed
Tracked by #731
KatieWoe opened this issue Oct 20, 2021 · 3 comments
Closed
Tracked by #731
Labels

Comments

@KatieWoe
Copy link
Contributor

Test device
Dell
Operating System
Win 11
Browser
Chrome
Problem description
For phetsims/qa#721.
When moving the balloon with keyboard nav, the moving electron noise will play continuously, even if electrons aren't moving. This happens when holding the down, up, or right arrow keys against the wall.
Steps to reproduce

  1. Make sure Show All Charges is selected
  2. Use keyboard nav to rub balloon on sweater
  3. Move balloon against wall
  4. Use keyboard nav and hold down arrow continuously

Visuals

Image.from.iOS.3.MOV
Image.from.iOS.2.MOV

Troubleshooting information:

!!!!! DO NOT EDIT !!!!!
Name: ‪Balloons and Static Electricity‬
URL: https://phet-dev.colorado.edu/html/balloons-and-static-electricity/1.5.0-rc.2/phet/balloons-and-static-electricity_all_phet.html
Version: 1.5.0-rc.2 2021-10-11 21:55:48 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/95.0.4638.54 Safari/537.36
Language: en-US
Window: 1280x649
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: {}

@jbphet
Copy link
Contributor

jbphet commented Oct 21, 2021

This does indeed seem incorrect. The comments in the code (which I wrote) indicate that sound should only be played when the charges move, and I recall that being the intent, but it seems like sounds are being played on keyboard drag regardless of whether the charges have moved, and that shouldn't happen. I'll investigate and fix.

@jbphet
Copy link
Contributor

jbphet commented Oct 25, 2021

This was due to some confusion about how the models of point charges work. I've logged a separate bug about it because I think the design of these model elements is likely to cause other developers problems too if not addressed, see #557. I've addressed the immediate issue in ChargeDeflectionSoundGenerator by using the correct attribute when comparing charge positions.

@Nancy-Salpepi
Copy link

This is fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants