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.

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i flip-pixels

      Weekly Downloads

      37,686

      Version

      1.0.2

      License

      MIT

      Unpacked Size

      3.65 kB

      Total Files

      6

      Last publish

      Collaborators

      • dfcreative
      • dy