export type mat4 = number[]; type quat4 = number[]; type vec3 = number[]; /** * Calculates the adjugate of a mat4 * * @param {mat4} out the receiving matrix * @param {mat4} a the source matrix * @returns {mat4} out */ export declare const adjoint: (out: mat4, a: mat4) => mat4; /** * Creates a new mat4 initialized with values from an existing matrix * * @param {mat4} a matrix to clone * @returns {mat4} a new 4x4 matrix */ export declare const clone: (a: mat4) => mat4; /** * Copy the values from one mat4 to another * * @param {mat4} out the receiving matrix * @param {mat4} a the source matrix * @returns {mat4} out */ export declare const copy: (out: mat4, a: mat4) => mat4; /** * Creates a new identity mat4 * * @returns {mat4} a new 4x4 matrix */ export declare const create: () => mat4; /** * Calculates the determinant of a mat4 * * @param {mat4} a the source matrix * @returns {Number} determinant of a */ export declare const determinant: (a: mat4) => number; /** * Creates a matrix from a quaternion rotation. * * @param {mat4} out mat4 receiving operation result * @param {quat4} q Rotation quaternion * @returns {mat4} out */ export declare const fromQuat: (out: mat4, q: quat4) => mat4; /** * Creates a matrix from a given angle around a given axis * This is equivalent to (but much faster than): * * mat4.identity(dest) * mat4.rotate(dest, dest, rad, axis) * * @param {mat4} out mat4 receiving operation result * @param {Number} rad the angle to rotate the matrix by * @param {vec3} axis the axis to rotate around * @returns {mat4} out */ export declare const fromRotation: (out: quat4, rad: number, axis: vec3) => quat4 | null; /** * Creates a matrix from a quaternion rotation and vector translation * This is equivalent to (but much faster than): * * mat4.identity(dest); * mat4.translate(dest, vec); * let quatMat = mat4.create(); * quat4.toMat4(quat, quatMat); * mat4.multiply(dest, quatMat); * * @param {mat4} out mat4 receiving operation result * @param {quat4} q Rotation quaternion * @param {vec3} v Translation vector * @returns {mat4} out */ export declare const fromRotationTranslation: (out: mat4, q: quat4, v: vec3) => mat4; /** * Creates a matrix from a vector scaling * This is equivalent to (but much faster than): * * mat4.identity(dest) * mat4.scale(dest, dest, vec) * * @param {mat4} out mat4 receiving operation result * @param {vec3} v Scaling vector * @returns {mat4} out */ export declare const fromScaling: (out: mat4, v: vec3) => mat4; /** * Creates a matrix from a vector translation * This is equivalent to (but much faster than): * * mat4.identity(dest) * mat4.translate(dest, dest, vec) * * @param {mat4} out mat4 receiving operation result * @param {vec3} v Translation vector * @returns {mat4} out */ export declare const fromTranslation: (out: mat4, v: vec3) => mat4; /** * Creates a matrix from the given angle around the X axis * This is equivalent to (but much faster than): * * mat4.identity(dest) * mat4.rotateX(dest, dest, rad) * * @param {mat4} out mat4 receiving operation result * @param {Number} rad the angle to rotate the matrix by * @returns {mat4} out */ export declare const fromXRotation: (out: mat4, rad: number) => mat4; /** * Creates a matrix from the given angle around the Y axis * This is equivalent to (but much faster than): * * mat4.identity(dest) * mat4.rotateY(dest, dest, rad) * * @param {mat4} out mat4 receiving operation result * @param {Number} rad the angle to rotate the matrix by * @returns {mat4} out */ export declare const fromYRotation: (out: mat4, rad: number) => mat4; /** * Creates a matrix from the given angle around the Z axis * This is equivalent to (but much faster than): * * mat4.identity(dest) * mat4.rotateZ(dest, dest, rad) * * @param {mat4} out mat4 receiving operation result * @param {Number} rad the angle to rotate the matrix by * @returns {mat4} out */ export declare const fromZRotation: (out: mat4, rad: number) => mat4; /** * Generates a frustum matrix with the given bounds * * @param {mat4} out mat4 frustum matrix will be written into * @param {Number} left Left bound of the frustum * @param {Number} right Right bound of the frustum * @param {Number} bottom Bottom bound of the frustum * @param {Number} top Top bound of the frustum * @param {Number} near Near bound of the frustum * @param {Number} far Far bound of the frustum * @returns {mat4} out */ export declare const frustum: (out: mat4, left: number, right: number, bottom: number, top: number, near: number, far: number) => mat4; /** * Set a mat4 to the identity matrix * * @param {mat4} out the receiving matrix * @returns {mat4} out */ export declare const identity: (out: mat4) => mat4; /** * Inverts a mat4 * * @param {mat4} out the receiving matrix * @param {mat4} a the source matrix * @returns {mat4} out */ export declare const invert: (out: mat4, a: mat4) => mat4 | null; /** * Generates a look-at matrix with the given eye position, focal point, and up axis * * @param {mat4} out mat4 frustum matrix will be written into * @param {vec3} eye Position of the viewer * @param {vec3} center Point the viewer is looking at * @param {vec3} up vec3 pointing up * @returns {mat4} out */ export declare const lookAt: (out: mat4, eye: vec3, center: vec3, up: vec3) => mat4; /** * Multiplies two mat4's * * @param {mat4} out the receiving matrix * @param {mat4} a the first operand * @param {mat4} b the second operand * @returns {mat4} out */ export declare const multiply: (out: mat4, a: mat4, b: mat4) => mat4; /** * Generates a orthogonal projection matrix with the given bounds * * @param {mat4} out mat4 frustum matrix will be written into * @param {number} left Left bound of the frustum * @param {number} right Right bound of the frustum * @param {number} bottom Bottom bound of the frustum * @param {number} top Top bound of the frustum * @param {number} near Near bound of the frustum * @param {number} far Far bound of the frustum * @returns {mat4} out */ export declare const ortho: (out: mat4, left: number, right: number, bottom: number, top: number, near: number, far: number) => mat4; /** * Generates a perspective projection matrix with the given bounds * * @param {mat4} out mat4 frustum matrix will be written into * @param {number} fovy Vertical field of view in radians * @param {number} aspect Aspect ratio. typically viewport width/height * @param {number} near Near bound of the frustum * @param {number} far Far bound of the frustum * @returns {mat4} out */ export declare const perspective: (out: mat4, fovy: number, aspect: number, near: number, far: number) => mat4; /** * Generates a perspective projection matrix with the given field of view. * This is primarily useful for generating projection matrices to be used * with the still experiemental WebVR API. * * @param {mat4} out mat4 frustum matrix will be written into * @param {object} fov Object containing the following values: upDegrees, downDegrees, leftDegrees, rightDegrees * @param {number} near Near bound of the frustum * @param {number} far Far bound of the frustum * @returns {mat4} out */ export declare const perspectiveFromFieldOfView: (out: mat4, fov: { upDegrees: number; downDegrees: number; leftDegrees: number; rightDegrees: number; }, near: number, far: number) => mat4; /** * Rotates a mat4 by the given angle * * @param {mat4} out the receiving matrix * @param {mat4} a the matrix to rotate * @param {Number} rad the angle to rotate the matrix by * @param {vec3} axis the axis to rotate around * @returns {mat4} out */ export declare const rotate: (out: mat4, a: mat4, rad: number, axis: vec3) => mat4 | null; /** * Rotates a matrix by the given angle around the X axis * * @param {mat4} out the receiving matrix * @param {mat4} a the matrix to rotate * @param {Number} rad the angle to rotate the matrix by * @returns {mat4} out */ export declare const rotateX: (out: mat4, a: mat4, rad: number) => mat4; /** * Rotates a matrix by the given angle around the Y axis * * @param {mat4} out the receiving matrix * @param {mat4} a the matrix to rotate * @param {Number} rad the angle to rotate the matrix by * @returns {mat4} out */ export declare const rotateY: (out: mat4, a: mat4, rad: number) => mat4; /** * Rotates a matrix by the given angle around the Z axis * * @param {mat4} out the receiving matrix * @param {mat4} a the matrix to rotate * @param {Number} rad the angle to rotate the matrix by * @returns {mat4} out */ export declare const rotateZ: (out: mat4, a: mat4, rad: number) => mat4; /** * Scales the mat4 by the dimensions in the given vec3 * * @param {mat4} out the receiving matrix * @param {mat4} a the matrix to scale * @param {vec3} v the vec3 to scale the matrix by * @returns {mat4} out **/ export declare const scale: (out: mat4, a: mat4, v: vec3) => mat4; /** * Returns a string representation of a mat4 * * @param {mat4} mat matrix to represent as a string * @returns {String} string representation of the matrix */ export declare const str: (a: mat4) => string; /** * Translate a mat4 by the given vector * * @param {mat4} out the receiving matrix * @param {mat4} a the matrix to translate * @param {vec3} v vector to translate by * @returns {mat4} out */ export declare const translate: (out: mat4, a: mat4, v: vec3) => mat4; /** * Transpose the values of a mat4 * * @param {mat4} out the receiving matrix * @param {mat4} a the source matrix * @returns {mat4} out */ export declare const transpose: (out: mat4, a: mat4) => mat4; export {}; //# sourceMappingURL=mat4.d.ts.map