phetsims / projectile-motion

"Projectile Motion" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
15 stars 13 forks source link

companionlessObjectType name is unclear #254

Closed arouinfar closed 3 years ago

arouinfar commented 3 years ago

For #244

@zepumph described the companionlessObjectType in https://github.com/phetsims/projectile-motion/issues/219#issuecomment-591732871:

These objectTypes work much like Solutes in ph-scale, where they are basically just constants that have data about how an instance of that type would behave. So if you know that the model's selectedProjectileObjectTypeProperty is cannonball, I know what the defaults will be by looking at the initialState of projectileMotion.global.model.projectileObjectTypes.cannonball:

{
 "name": "‪Cannonball‬",
 "mass": 17.6,
   "diameter": 0.18,
   "dragCoefficient": 0.47,
   "benchmark": "cannonball",
   "rotates": false,
   "massRange": {
     "min": 1,
     "max": 31
   },
   "massRound": 0.01,
   "diameterRange": {
     "min": 0.1,
     "max": 1
   },
   "diameterRound": 0.01,
   "dragCoefficientRange": {
     "min": 0.04,
     "max": 1
   }
 }

UPDATE: the companionless one is used in vectors/drag screens where you can't choose different types. That is the only (companionless) projectile type you can fire projectiles of.

"Companionless" isn't a particularly friendly/intuitive name. We would like to something clearer like genericObjectType or generalObjectType. (I don't have a preference between generic and general.)

@zepumph would this be relatively straightforward to change? Any objections?

zepumph commented 3 years ago

I like that a lot! Good name

image

arouinfar commented 3 years ago

Looks good, thanks!