phetsims / curve-fitting

"Curve Fitting" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
6 stars 3 forks source link

Add a snap-to-grid feature through a query parameter for QA team. #106

Closed veillette closed 7 years ago

veillette commented 7 years ago

In order to uncover bugs very early on in the development process, it would useful to add a query parameter for the quality assurance team. Many sims that deal with graphs, (e.g: charges and fields, curve fitting, least-squares-regression) have many subtle bugs when two point, charges, etc, share the same position. (see https://github.com/phetsims/curve-fitting/issues/105 for an example).

However, it takes quite a bit of skills to put two points on top of another. As a result, it takes a while to ferret out theses bugs. It would be useful to add a query parameter to some of these sims (eg. snap=TRUE), that would force points to take only integer value.

For instance #105 was found by adding

     end: function() {
        point.position = new Vector2( Util.roundSymmetric( point.position.x ), Util.roundSymmetric( point.position.y ) ); // force integer values
        point.dragging = false;
      }

so that the QA could uncover them in a more systematic way.

The phet team has changed how query parameters are added and I am not up to date on how to implement so I will not assigned this issue to me but @phet-steele can chime in if he thinks that would be useful.

phet-steele commented 7 years ago

@phet-steele can chime in if he thinks that would be useful.

I sure think this would be great!

veillette commented 7 years ago

the query parameter , snapToGrid, was added. Closing