mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-31 03:02:04 +08:00
Merge pull request #19434 from auzmartist/master
Add Missing mat4.getScaling() Function Declaration to @types/gl-matrix
This commit is contained in:
@@ -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);
|
||||
|
||||
12
types/gl-matrix/index.d.ts
vendored
12
types/gl-matrix/index.d.ts
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user