You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
sigonasr2
0785506fad
|
4 years ago | |
---|---|---|
.. | ||
.eslintrc.json | 4 years ago | |
.travis.yml | 4 years ago | |
index.js | 4 years ago | |
package.json | 4 years ago | |
readme.md | 4 years ago | |
test.js | 4 years ago |
readme.md
Flip pixels after gl.readTexture
:
var flip = require('flip-pixels')
var w = gl.drawingBufferWidth;
var h = gl.drawingBufferHeight
var pixels = new Uint8Array(w * h * 4);
gl.readPixels(0, 0, w, h, gl.RGBA, gl.UNSIGNED_BYTE, pixels);
flip(pixels, w, h)
Based on this question.
See also clip-pixels.