phetsims / balloons-and-static-electricity

"Balloons and Static Electricity" is an educational simulation in HTML5, by PhET Interactive Simulations.
http://phet.colorado.edu/en/simulation/balloons-and-static-electricity
GNU General Public License v3.0
6 stars 10 forks source link

Negative charges in wall are incorrectly rendered #482

Closed jbphet closed 3 years ago

jbphet commented 3 years ago

On master, the charges on the wall look like this:

image

They should look like this:

image

I did some digging, and I think the problem started with this commit to scenery: https://github.com/phetsims/scenery/commit/3b738ccdde323627a6846ea3156772f6e03af67d. I reverted my local copy of scenery to the previous commit (https://github.com/phetsims/scenery/commit/4b032f5b97d71818393499d9ea41cf8f748cf67c) and the problem went away.

@jonathanolson - this looks related to some work you were doing. Can you please take a look?

jonathanolson commented 3 years ago

Looking into it!

jonathanolson commented 3 years ago

Was a bit tricky to track down, as it was actually rasterizing an already-rasterized node that made the bug apparent!

I neglected to handle rasterization scale properly in my change, and it should be fixed above. @jbphet can you verify?

jbphet commented 3 years ago

Yep, the charges look great now. Thanks, closing.