getPixelsByteArray({ gl, width, height }) {
    const byteArray = new Uint8Array(width * height * 4);
    gl.readPixels(0, 0, width, height, gl.RGBA, gl.UNSIGNED_BYTE, byteArray);
    return byteArray;
  }
GLUtil - A OpenGl tool function library

####Example:



@object