Merge pull request #19434 from auzmartist/master

Add Missing mat4.getScaling() Function Declaration to @types/gl-matrix
This commit is contained in:
Nathan Shively-Sanders
2017-09-06 14:12:46 -07:00
committed by GitHub
2 changed files with 18 additions and 4 deletions

View File

@@ -294,8 +294,9 @@ outMat4 = mat4.fromXRotation(outMat4, Math.PI);
outMat4 = mat4.fromYRotation(outMat4, Math.PI);
outMat4 = mat4.fromZRotation(outMat4, Math.PI);
outMat4 = mat4.fromRotationTranslation(outMat4, quatA, vec3A);
outVec3 = mat4.getTranslation(outVec3, mat4A)
outQuat = mat4.getRotation(outQuat, mat4A)
outVec3 = mat4.getTranslation(outVec3, mat4A);
outVec3 = mat4.getScaling(outVec3, mat4A);
outQuat = mat4.getRotation(outQuat, mat4A);
outMat4 = mat4.fromRotationTranslationScale(outMat4, quatA, vec3A, vec3B);
outMat4 = mat4.fromRotationTranslationScaleOrigin(outMat4, quatA, vec3A, vec3B, vec3A);
outMat4 = mat4.fromQuat(outMat4, quatB);
@@ -643,8 +644,9 @@ outMat4 = _mat4.fromXRotation(outMat4, Math.PI);
outMat4 = _mat4.fromYRotation(outMat4, Math.PI);
outMat4 = _mat4.fromZRotation(outMat4, Math.PI);
outMat4 = _mat4.fromRotationTranslation(outMat4, quatA, vec3A);
outVec3 = _mat4.getTranslation(outVec3, mat4A)
outQuat = _mat4.getRotation(outQuat, mat4A)
outVec3 = _mat4.getTranslation(outVec3, mat4A);
outVec3 = _mat4.getScaling(outVec3, mat4A);
outQuat = _mat4.getRotation(outQuat, mat4A);
outMat4 = _mat4.fromRotationTranslationScale(outMat4, quatA, vec3A, vec3B);
outMat4 = _mat4.fromRotationTranslationScaleOrigin(outMat4, quatA, vec3A, vec3B, vec3A);
outMat4 = _mat4.fromQuat(outMat4, quatB);

View File

@@ -1,6 +1,7 @@
// Type definitions for gl-matrix 2.2.2
// Project: https://github.com/toji/gl-matrix
// Definitions by: Mattijs Kneppers <https://github.com/mattijskneppers>, based on definitions by Tat <https://github.com/tatchx>
// Austin Martin <https://github.com/auzmartist>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare module 'gl-matrix' {
@@ -2450,6 +2451,17 @@ declare module 'gl-matrix' {
*/
public static getTranslation(out: vec3, mat: mat4): vec3;
/**
* Returns the scaling factor component of a transformation matrix.
* If a matrix is built with fromRotationTranslationScale with a
* normalized Quaternion parameter, the returned vector will be
* the same as the scaling vector originally supplied.
* @param {vec3} out Vector to receive scaling factor component
* @param {mat4} mat Matrix to be decomposed (input)
* @return {vec3} out
*/
public static getScaling(out: vec3, mat: mat4): vec3;
/**
* Returns a quaternion representing the rotational component
* of a transformation matrix. If a matrix is built with