code: function updateFieldColorBuffer(lut, fieldData, buf) {
    // var buf = new Float32Array(fieldData.length * 3);
    for (let i = 0; i < fieldData.length; ++i) {
      const idx = i * 3,
        color = lut.getColor(fieldData[i]);
      buf[idx] = color[0];
      buf[idx + 1] = color[1];
      buf[idx + 2] = color[2];
    }
    return buf;
  }
docs: ******************************************************************** * Convenience function to generate colors from scalar array and LUT *******************************************************************