phetsims / color-vision

"Color Vision" is an educational simulation in HTML5, by PhET Interactive Simulations.
http://phet.colorado.edu/en/simulation/color-vision
GNU General Public License v3.0
1 stars 7 forks source link

Investigate why `PercivedColorProperty` is sending change notifications but not changing in some situations #142

Closed jbphet closed 1 year ago

jbphet commented 1 year ago

While working on #139, I noticed that in some situations the model property that represents the color being perceived by the subject is sending change notifications, but the value is not changing. Here is a screenshot of the sim where this issue is occurring and I have debug code in place to output the changes to the Property.

image

jbphet commented 1 year ago

The problem here was being caused to some adjustments in photon intensity based on whether the photon was white. This was causing comparisons to fail based on the alpha values. I've adjusted the code, and unfortunately the original author is long gone from PhET, so there isn't really anyone to review it. So, I'll just close this and keep an eye out for any odd behavior.