UNPKG

278 BJavaScriptView Raw
1"use strict";
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6exports.default = readPixel;
7function readPixel(gl, x, y) {
8 var pixel = new Uint8Array(4);
9 gl.readPixels(x, y, 1, 1, gl.RGBA, gl.UNSIGNED_BYTE, pixel);
10 return [pixel[0], pixel[1], pixel[2]];
11}
\No newline at end of file