export type Mat4 = Float32Array; export type Vec3A = [number, number, number]; export interface Vec2 { x: number; y: number; } export interface Vec3 extends Vec2 { z: number; } export interface Vec4 extends Vec3 { w: number; } /** Returns an identity matrix */ export declare function mat4(): Mat4; /** Transforms to an identity matrix */ export declare function mat4i(m: Mat4, out?: Float32Array): Mat4; /** Prints the matrix in a readable format to the console */ export declare function mat4log(m: Mat4): void; /** Translates matrix by a vector (object) */ export declare function mat4tv(m: Mat4, v: Partial, out?: Float32Array): Mat4; /** Translates the matrix by a vector (relative) */ export declare function mat4t(m: Mat4, t: Partial, out?: Float32Array): Mat4; /** decomposes a matrix into its components */ export declare function mat4dec(m: Mat4, p: Vec3, s: Vec3, r: Vec3, q: Vec4): void; /** inverses the matrix */ export declare function mat4inv(m: Mat4, out?: Float32Array): Mat4; /** multiply two matrices and output the transformed one */ export declare function mat4m(m1: Mat4, m2: Mat4, out?: Float32Array): Mat4; /** euler to quaternion */ export declare function etq(r: Vec3, q: Vec4): Vec4; /** mat4 scale, rotate (quaternion) and translate */ export declare function mat4srqt(m: Mat4, s: Vec3, q: Vec4, t: Vec3, out?: Float32Array): Mat4; export declare function mat4ToQuat(m: Mat4, out: Vec4): void; export declare function quatToEuler(q: Vec4, out: Vec3): void; /** * Creates a perspective projection matrix. * * https://github.com/toji/gl-matrix/blob/master/src/mat4.js#L1537-L1563 */ export declare function mat4p(fovY: number, asp: number, near: number, far?: number, out?: Float32Array): Float32Array; /** * Creates a perspective projection matrix. * * https://github.com/toji/gl-matrix/blob/master/src/mat4.js#L1664C2-L1686C1 */ export declare function mat4o(left: number, right: number, bottom: number, top: number, near: number, far: number, out?: Mat4): Float32Array;