• 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;
    =new Uint8ClampedArray([0, 1, 255])

    One day I'll test this code, I think the effect will be nice.


Avatar for maze1980 @maze1980 started