You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// @public {Property.<Vector2>} mass current displacement (from the equilibrium position)this.displacementProperty=newVector2Property(newVector2(0,0),{tandem: tandem.createTandem('displacementProperty')});// @public {Property.<Vector2>} mass initial displacementthis.initialDisplacementProperty=newVector2Property(newVector2(0,0),{tandem: tandem.createTandem('initialDisplacementProperty')});// @public {Property.<Vector2>} mass current velocitythis.velocityProperty=newVector2Property(newVector2(0,0),{tandem: tandem.createTandem('velocityProperty')});// @public {Property.<Vector2>} mass initial velocitythis.initialVelocityProperty=newVector2Property(newVector2(0,0),{tandem: tandem.createTandem('initialVelocityProperty')});
Every Property stores it's initial value, and the initial value can be restored by calling reset. So I wonder if this.initialDisplacementProperty and this.initialVelocityProperty are really necessary.
On the other hand, I see initialDisplacementProperty.set and this.initialVelocityProperty called, but don't understand why:
Related to #2 (code review).
In Mass.js:
Every Property stores it's initial value, and the initial value can be restored by calling
reset
. So I wonder ifthis.initialDisplacementProperty
andthis.initialVelocityProperty
are really necessary.On the other hand, I see
initialDisplacementProperty.set
andthis.initialVelocityProperty
called, but don't understand why:Recommended to:
initialDisplacementProperty
andinitialVelocityProperty
are really needed.The text was updated successfully, but these errors were encountered: