flip-pixels

1.0.2 • Public • Published

Build Status

Flip pixels after gl.readTexture:

var flip = require('flip-pixels')
 
var w = gl.drawingBufferWidth;
var h = gl.drawingBufferHeight
var pixels = new Uint8Array(* 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.

Dependents (2)

Package Sidebar

Install

npm i flip-pixels

Weekly Downloads

100,256

Version

1.0.2

License

MIT

Unpacked Size

3.65 kB

Total Files

6

Last publish

Collaborators

  • dfcreative
  • dy