Closed KatieWoe closed 5 years ago
@samreid on slack:
Please assign to Jesse, but let him know he can reach out to me for help if desired.
Also related to https://github.com/phetsims/energy-skate-park-basics/issues/307. The thermal and total energy bar have showSmallValuesAsZero false
if ( showSmallValuesAsZero ) {
answer = result > 1 ? Math.floor( result ) :
result < 1 ? 0 :
1;
}
else {
answer = result > 1 ? Math.floor( result ) :
result < 1E-6 ? 0 :
1;
}
The skater doesn't actually stop, continues to oscillate forever and all of the energy is very small, but this code is keeping thermal and total energies visible.
Maybe we could totally stop the skater in this case? Or we could adjust 1E-6 as the cutoff? Or maybe this is pedagogically useful?
Code comment says
For thermal and total energy, make sure they are big enough to be visible, see #307. For kinetic and potential, they must go to zero at the endpoints to reach learning goals like "The kinetic energy is zero at the top of the trajectory (turning point)
Here is a comment about why the thresholding is added for thermal and total, but not potential and kinetic https://github.com/phetsims/energy-skate-park-basics/issues/307#issuecomment-62442189
Skater has this Property:
// @public - Enable the "Clear Thermal" buttons but only if the thermal energy exceeds a tiny threshold, so there aren't visual "false positives", see #306
this.allowClearingThermalEnergyProperty
And the threshold is 1E-2.
So also related to https://github.com/phetsims/energy-skate-park-basics/issues/306
Ah, so for thermal energy to be visible on the graph the value / 30 needs to be larger than 1E-6. For the button to be enabled, thermal energy needs to be larger than 1E-2. If these match, then the button will be enabled when thermal energy is visible.
The threshold for enabling the clear thermal energy button now matches the threshold for showing the thermal energy in the bar graph. @KatieWoe can you please make sure this is fixed in master?
@jessegreenberg unable to see energy in the bar graph when button in on. However, I think I'm still seeing something very tiny in the pie chart.
Thanks @KatieWoe, handled for both the PieChartNode and WebGLPieChartNode. Can this issue be closed?
Looks good on master now.
Thanks!
Device Dell Laptop OS Win 10 Browser Chrome Problem Description Found during https://github.com/phetsims/QA/issues/197 (both versions) and may be related to https://github.com/phetsims/energy-skate-park-basics/issues/281 It is possible to see a tiny amount of thermal energy in the bar graph and pie chart, but not be able to click the clear thermal energy button. Steps to Reproduce
Screenshots![thermal](https://user-images.githubusercontent.com/41024075/46229104-aa1a7d80-c321-11e8-8943-24c5715d847d.PNG)