phetsims / pendulum-lab

"Pendulum Lab" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
4 stars 10 forks source link

Pendulum mass touch areas #117

Closed jonathanolson closed 8 years ago

jonathanolson commented 8 years ago

Should they be increased? Sometimes hard to grab, but adding touch areas could allow them to overlap (so you might get mass 1 when trying to drag mass 2 accidentally).

Thoughts?

arouinfar commented 8 years ago

@jonathanolson, I haven't used this sim much on an iPad. I'll be able to try it out tomorrow to see how it feels, and then I'll let you know.

arouinfar commented 8 years ago

I played around with the sim today for a bit on an iPad. In general, the touch areas seem pretty good. I had some trouble grabbing the masses while they were moving at normal speed, but that's true even in mouse environments.

I didn't experience any trouble grabbing the masses while at rest or while moving in slow motion, even at the minimum size. @amyh-phet also gave it a try, and had a similar experience.

We could bump up the touch areas so they extend beyond the boundary of the mass a little bit, if you think it's necessary @jonathanolson. I think we had a similar issue with overlapping touch areas in Charges & Fields. I remember that Martin had a solution for this, but I don't remember what he ultimately ended up doing.

jonathanolson commented 8 years ago

I think I recall helping with the solution in Charges and Fields. Basically if their touch misses everything (hits the background), we can check to see if it's close to a pendulum (and choose the closest), and if so trigger it on the pendulum.

That sidesteps the "front pendulum touch area overlaps back pendulum" issue, at the cost of more code complexity.

jonathanolson commented 8 years ago

Should be done, will publish a dev version for testing.

ariel-phet commented 8 years ago

@arouinfar please test in this link

http://www.colorado.edu/physics/phet/dev/html/pendulum-lab/1.0.0-dev.8/pendulum-lab_en.htm

arouinfar commented 8 years ago

@jonathanolson everything feels good on my end, though ?showPointerAreas doesn't reveal the touch areas of the masses.

@phet-steele can you take a look at this issue while dev testing? If the touch areas seem appropriate, and you don't run into any issues with overlapping masses, please close this issue.

phet-steele commented 8 years ago

@arouinfar heck yea, it's sweet and totally works!