build/browser/index.js
/**
     * Computes the matrix for the viewing transformation.
     * @param fov The angle subtended at the apex of the viewing pyramid.
     * @param aspect The ratio of width / height of the viewing pyramid.
     * @param near The distance from the camera eye point to the near plane.
     * @param far The distance from the camera eye point to the far plane.
     * @hidden
     */
Computes the matrix for the viewing transformation.
@param fov The angle subtended at the apex of the viewing pyramid.
@param aspect The ratio of width / height of the viewing pyramid.
@param near The distance from the camera eye point to the near plane.
@param far The distance from the camera eye point to the far plane.
@hidden
Computes the matrix for the viewing transformation . @param fov The angle subtended at the apex of the viewing pyramid . @param aspect The ratio of width / height of the viewing pyramid . @param near The distance from the camera eye point to the near plane . @param far The distance from the camera eye point to the far plane . @hidden
function perspectiveArray(fov, aspect, near, far, matrix) {
        mustBeNumber('fov', fov);
        mustBeNumber('aspect', aspect);
        mustBeNumber('near', near);
        mustBeNumber('far', far);
        var ymax = near * Math.tan(fov * 0.5); 
        var ymin = -ymax; 
        var xmin = ymin * aspect; 
        var xmax = ymax * aspect; 
        return frustumMatrix(xmin, xmax, ymin, ymax, near, far, matrix);
    }
function perspectiveArray ( fov , aspect , near , far , matrix ) { mustBeNumber ( 'fov' , fov ) ; mustBeNumber ( 'aspect' , aspect ) ; mustBeNumber ( 'near' , near ) ; mustBeNumber ( 'far' , far ) ; var ymax = near * Math . tan ( fov * 0.5 ) ; var ymin = - ymax ; var xmin = ymin * aspect ; var xmax = ymax * aspect ; return frustumMatrix ( xmin , xmax , ymin , ymax , near , far , matrix ) ; }
Computes the matrix for the viewing transformation.
Computes the matrix for the viewing transformation .
// We can leverage the frustum function, although technically the // symmetry in this perspective transformation should reduce the amount // of computation required. // top // bottom // left // right