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

Add Trajectory.projectileCountProperty #241

Closed zepumph closed 3 years ago

zepumph commented 3 years ago

From a design meeting with @arouinfar and @kathy-phet. Please note parent issue in https://github.com/phetsims/projectile-motion/issues/244.

This count should be the total number of projectiles that have been launched on this trajectory. Note that Trajectory.projectileObjects.lengthProperty is only an implementation detail, and it only tracks the current objects.

zepumph commented 3 years ago

Added above, you can test with something like projectileMotion.introScreen.model.trajectoryGroup.trajectory_0.projectileCountProperty

arouinfar commented 3 years ago

Looks good, thanks!