phetsims / density

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

Mystery mass phet-io customization #101

Closed jonathanolson closed 3 years ago

jonathanolson commented 3 years ago

For just masses in the Mystery screen:

jonathanolson commented 3 years ago

I'm curious how it's looking now. I've enabled a few things on cubes in general, and some things on mystery cubes:

  1. All cubes will now have a volumeProperty that can be set by phet-io, and will adjust their size in a cubical manner.
  2. Mystery cubes (or anywhere I pass the flag on creation) can have their massProperty be set by phet-io, and will adjust their size in a cubical manner (to match the density and desired mass)
  3. Mystery cubes (or anywhere I pass the flag on creation) will have materialEnumProperty, customDensityProperty and customColorProperty. The materialEnum will determine what material type (and has CUSTOM). If it's custom, the density and color are applied.

I could ALSO set up a densityProperty, however this would NEED to switch things off of e.g. "wood" if the density changes, so it might be a bit more confusing (but let me know). This could potentially replace or live along-side customDensityProperty.

@arouinfar I'm curious about your feedback on the current situation, happy to discuss over zoom.

arouinfar commented 3 years ago

Thanks @jonathanolson. As we discussed, please hide the PhET-iO Studio control for all instances of massProperty and volumeProperty since it is possible to crash the simulation or create problematic situations with the sliders. Everything else looks good!

jonathanolson commented 3 years ago

Implemented, can you verify?

arouinfar commented 3 years ago

Looks good, thanks @jonathanolson!