phetsims / build-a-nucleus

"Build a Nucleus" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
0 stars 5 forks source link

Move addNucleonImmediatelyToAtom and populateAtom from BANScreenView to BANModel #136

Closed Luisav1 closed 1 year ago

Luisav1 commented 1 year ago

From #112. These functions contain only model components and should be in BANModel instead of BANScreenView.

zepumph commented 1 year ago

While I was here, I also made moveAllToDestination. @Luisav1 now we don't have animations when we use the starting particle count query parameters for the chart screen. Can you please review. I feel a bit like I'm missing something.

It is a bit weird because on the particleNucleus, the animations are all done from reconfigureNucleus so it seems much easier just cancel out the animation after adding h particles than to try to sprinkle through a parameter like shouldAnimate into addParticle -> reconfigureNucleus -> reconfigureNucleus override. Let me know if you don't like the above commits.

Luisav1 commented 1 year ago

I like the above commits and I agree that it's much simpler / straightforward than still sticking with using reconfigureNucleus and passing in shouldAnimate. Thanks, closing.