phetsims / buoyancy-basics

"Buoyancy: Basics" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
0 stars 0 forks source link

Compare Screen: Depth lines should change color as density changes #8

Closed zepumph closed 4 months ago

zepumph commented 5 months ago

From https://github.com/phetsims/buoyancy-basics/issues/5#issuecomment-2096690650:

  • Also, the color of depth lines is not changing to white when the block's material gets dark:

image

samreid commented 4 months ago

I'm confused about this issue, since I see the depth lines change color when changing the density of a custom material:

image image

The supporting code was committed in https://github.com/phetsims/density-buoyancy-common/commit/12db36882efb7521833ee9ab173c2219fba01400. What remains to be done for this issue?

zepumph commented 4 months ago

Here is where we are creating colors of materials for the compare screen,

https://github.com/phetsims/density-buoyancy-common/blob/552498deb280f47bd6b59a568936a381b706cc1c/js/common/model/CompareBlockSetModel.ts#L249-L254

AgustinVallejo commented 4 months ago

Added the same logic of the custom block, please review @DianaTavares

DianaTavares commented 4 months ago

I love that now the lines change with the density! But I think it does a little late. Currently, the change to white is in density 1.17 kg/L image

Look, these blocks have a density of 0.35 kg/L and I think that iut should be the moment to change! I edited the picture to change the lines to white and they have better contrast.

image

AgustinVallejo commented 4 months ago

Please review the new threhold

DianaTavares commented 4 months ago

Amazing!!

zepumph commented 4 months ago

Just noting here that this threshold changes for all screens. I looked at the lab screen and the contrast looks really good.