Just looked at the code, and I think there are still options for improvement: All the clamping and rounding for TemperatureMap values can be omitted:
>let foo = new Uint8ClampedArray(3); =new Uint8ClampedArray(3) >foo[0] = -0.5; foo[1] = 1.5; foo[2] = 255.5; =undefined >foo =new Uint8ClampedArray([0, 1, 255])
One day I'll test this code, I think the effect will be nice.
@maze1980 started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Just looked at the code, and I think there are still options for improvement: All the clamping and rounding for TemperatureMap values can be omitted:
One day I'll test this code, I think the effect will be nice.