Skip to content
Please note that GitHub no longer supports Internet Explorer.

We recommend upgrading to the latest Microsoft Edge, Google Chrome, or Firefox.

Learn more
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time. Cannot retrieve contributors at this time
5 lines (5 sloc) 183 Bytes
export default function readPixel (gl, x, y) {
var pixel = new Uint8Array(4)
gl.readPixels(x, y, 1, 1, gl.RGBA, gl.UNSIGNED_BYTE, pixel)
return [pixel[0], pixel[1], pixel[2]]
}
You can’t perform that action at this time.