demos/assets/g2.js
function projection(out, width, height) {
  out[0] = 2 / width;
  out[1] = 0;
  out[2] = 0;
  out[3] = 0;
  out[4] = -2 / height;
  out[5] = 0;
  out[6] = -1;
  out[7] = 1;
  out[8] = 1;
  return out;
}
function projection(out, width, height) {
  out[0] = 2 / width;
  out[1] = 0;
  out[2] = 0;
  out[3] = 0;
  out[4] = -2 / height;
  out[5] = 0;
  out[6] = -1;
  out[7] = 1;
  out[8] = 1;
  return out;
}
function projection ( out , width , height ) { out [ 0 ] = 2 / width ; out [ 1 ] = 0 ; out [ 2 ] = 0 ; out [ 3 ] = 0 ; out [ 4 ] = - 2 / height ; out [ 5 ] = 0 ; out [ 6 ] = - 1 ; out [ 7 ] = 1 ; out [ 8 ] = 1 ; return out ; }
Generates a 2D projection matrix with the given bounds

@param {mat3} out mat3 frustum matrix will be written into
@param {number} width Width of your gl context
@param {number} height Height of gl context
@returns {mat3} out
Generates a 2D projection matrix with the given bounds