diff --git a/types/gl-matrix/gl-matrix-tests.ts b/types/gl-matrix/gl-matrix-tests.ts index 505bbcbb26..765f871e30 100644 --- a/types/gl-matrix/gl-matrix-tests.ts +++ b/types/gl-matrix/gl-matrix-tests.ts @@ -267,6 +267,7 @@ outMat3 = mat3.multiplyScalar (outMat3, mat3A, 2); outMat3 = mat3.multiplyScalarAndAdd (outMat3, mat3A, mat3B, 2); outBool = mat3.exactEquals(mat3A, mat3B); outBool = mat3.equals(mat3A, mat3B); +outMat3 = mat3.projection(outMat3, 100, 100); //mat4 outMat4 = mat4.create(); diff --git a/types/gl-matrix/index.d.ts b/types/gl-matrix/index.d.ts index d39496e20d..1ce2ea5d58 100644 --- a/types/gl-matrix/index.d.ts +++ b/types/gl-matrix/index.d.ts @@ -1950,6 +1950,16 @@ declare module 'gl-matrix' { * @returns out */ public static transpose(out: mat3, a: mat3): mat3; + + /** + * Generates a 2D projection matrix with the given bounds + * + * @param out the receiving matrix + * @param width width of your gl context + * @param height height of gl context + * @returns out + */ + public static projection(out: mat3, width: number, height: number): mat3; /** * Inverts a mat3