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.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.2
    100,256
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.2
    100,256
  • 1.0.1
    0
  • 1.0.0
    0

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