phetsims / natural-selection

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

Properties for public query parameters #340

Closed pixelzoom closed 1 year ago

pixelzoom commented 1 year ago

A relatively recent PhET convention is to have a Property for each public query parameter. This is a convenience, so that instructional designers can make all customizations via Studio.

We should review the public query parameters for this sim.

pixelzoom commented 1 year ago

Discussed with @arouinfar, recording our decisions here for posterity.

This sim has 5 public query parameters, see NaturalSelectionQueryParameters.ts.

We could add an associated Property for allelesVisible. But it's not something that should be added to Preferences, there's no reason to change it once the sim is running, and the development cost to do so would be significant. So we are going to wait until someone asks for an associated Property.

The other 4 query parameters (introMutations, introPopulation, labMutations, labPopulation) are used to set the initial population of bunnies. It makes no sense to dynamically change these, or to have associated Properties. Having associated Properties would be a big design/development expense, would add no useful functionality, and would in fact create significant problems (like how to prevent the Properties from being changed after the sim has started).

pixelzoom commented 1 year ago

In the above commit, I added documentation to the source code that references this issue.

Closing.