B2G/gecko/browser/devtools/tilt/TiltGL.jsm
/**
   * Sets a default perspective projection, with the near frustum rectangle
   * mapped to the canvas width and height bounds.
   */
Sets a default perspective projection, with the near frustum rectangle
mapped to the canvas width and height bounds.
Sets a default perspective projection with the near frustum rectangle mapped to the canvas width and height bounds .
function TGLR_perspective()
  {
    let fov = 45;
    let w = this.width;
    let h = this.height;
    let x = w / 2;
    let y = h / 2;
    let z = y / Math.tan(TiltMath.radians(fov) / 2);
    let aspect = w / h;
    let znear = z / 10;
    let zfar = z * 10;
    mat4.perspective(fov, aspect, znear, zfar, this.projMatrix, -1);
    mat4.translate(this.projMatrix, [-x, -y, -z]);
    mat4.identity(this.mvMatrix);
  }
function TGLR_perspective ( ) { let fov = 45 ; let w = this . width ; let h = this . height ; let x = w / 2 ; let y = h / 2 ; let z = y / Math . tan ( TiltMath . radians ( fov ) / 2 ) ; let aspect = w / h ; let znear = z / 10 ; let zfar = z * 10 ; mat4 . perspective ( fov , aspect , znear , zfar , this . projMatrix , - 1 ) ; mat4 . translate ( this . projMatrix , [ - x , - y , - z ] ) ; mat4 . identity ( this . mvMatrix ) ; }
Sets a default perspective projection, with the near frustum rectangle
 mapped to the canvas width and height bounds.
Sets a default perspective projection with the near frustum rectangle mapped to the canvas width and height bounds .