phetsims / keplers-laws

"Kepler's Laws" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
1 stars 1 forks source link

use `valueComparsionStrategy:'equalsFunction'` instead of `internalPropertyMutation` #264

Closed zepumph closed 7 months ago

zepumph commented 7 months ago

While working on a queue-based reentrant notification strategy over in https://github.com/phetsims/axon/issues/447, @AgustinVallejo and I found that the infinite loop was based on reference equality with Vector2Properties, so when constraining Properties in enforce...() functions, we just kept re-setting to the same value but a new Vector2 instance. I would like to see if this could be used to get rid of all usages of internalPropertyMutation. Good luck us!

zepumph commented 7 months ago

@AgustinVallejo and I read through https://github.com/phetsims/keplers-laws/issues/213#issuecomment-1828670954 and we do not think that valueComparisonStrategy is a good fit for replacing internalPropertyMutation. Closing

zepumph commented 7 months ago

no cherry picks needed