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

Odd sound occurs when both hands are dragged against boundary at the same time #290

Closed
KatieWoe opened this issue Dec 14, 2020 · 6 comments
Assignees

Comments

@KatieWoe
Copy link
Contributor

Test device
Dell
Operating System
Win 10
Browser
Chrome
Problem description
For phetsims/qa#582
Only seems to be a multitouch issue, and fairly minor. Feel free to close if not an issue.
When both hands are dragged against the boundary at the same time (either works but the top is easier to hear) the sound that indicates you've hit the barrier plays longer as a staccato. This doesn't seem to happen with keyboard nav or when only one hand is being dragged.
Steps to reproduce

  1. Use a touch device
  2. Go to the second screen
  3. Grab one hand with one finger and the other with another finger
  4. Drag both to the top of the screen, against the barrier

Visuals
https://drive.google.com/file/d/1uxdJejjOp4x8H88deU3Anhed3cZmsYeu/view?usp=sharing

Troubleshooting information:

!!!!! DO NOT EDIT !!!!!
Name: ‪Ratio and Proportion‬
URL: https://phet-dev.colorado.edu/html/ratio-and-proportion/1.0.0-dev.77/phet/ratio-and-proportion_all_phet.html
Version: 1.0.0-dev.77 2020-12-08 00:32: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/87.0.4280.88 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: {}

@KatieWoe KatieWoe added type:bug Something isn't working type:multitouch labels Dec 14, 2020
@zepumph
Copy link
Member

zepumph commented Dec 22, 2020

I think this is because I'm using a single instance of BoundarySoundClip to control the boundary sounds of both hands, so comparing "last position" is altering back and forth between the two. I'll take a look.

@zepumph
Copy link
Member

zepumph commented Dec 22, 2020

To fix this:

  1. Either have each ratio half keep track of previous values and pass them in to onInteract, so that BoundaryClipSound isn't responsible for storing the last value.
  2. OR, somehow create a BoundarySoundClip for each instance.

@KatieWoe
Copy link
Contributor Author

I think this actually also happens when dragging against the sides.

@zepumph
Copy link
Member

zepumph commented Dec 22, 2020

I think this actually also happens when dragging against the sides.

That makes sense since the same algorithm is used to keep track of the last horizontal position too.

@zepumph
Copy link
Member

zepumph commented Dec 22, 2020

I went ahead and just instantiated a single instance per interaction (one per ratio half, and another for both-hands). This fixed the problem as far as I can tell. @KatieWoe can you please confirm on master and feel free to close.

@KatieWoe
Copy link
Contributor Author

Looks fixed on master

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

No branches or pull requests

2 participants