diff options
author | Jonathan Duran | 2012-06-19 08:40:26 -0700 |
---|---|---|
committer | Jonathan Duran | 2012-06-19 08:40:26 -0700 |
commit | 6f25a2e70079de6bcbb8c3411ddef88c2ed1ea39 (patch) | |
tree | 253e5f6dd5923218e3155f78fa67ff3e43de0ebc /js/lib/math/matrix.js | |
parent | b51c9448bc187f9bfa3ab39c366657ec2bb9e2fb (diff) | |
parent | 483ad57efcd6475776f580c3af5b60e6deeaf781 (diff) | |
download | ninja-6f25a2e70079de6bcbb8c3411ddef88c2ed1ea39.tar.gz |
Merge branch 'refs/heads/NINJAmaster' into TimelineUber
Diffstat (limited to 'js/lib/math/matrix.js')
-rwxr-xr-x | js/lib/math/matrix.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/js/lib/math/matrix.js b/js/lib/math/matrix.js index 77a0966d..3a5a8215 100755 --- a/js/lib/math/matrix.js +++ b/js/lib/math/matrix.js | |||
@@ -67,6 +67,15 @@ Matrix.Rotation = function(angle, axis) { | |||
67 | return mat; | 67 | return mat; |
68 | }; | 68 | }; |
69 | 69 | ||
70 | Matrix.Scale = function( scaleVec ) { | ||
71 | var mat = Matrix.I(4); | ||
72 | mat[ 0] = scaleVec[0]; | ||
73 | mat[ 5] = scaleVec[1]; | ||
74 | mat[10] = scaleVec[2]; | ||
75 | |||
76 | return mat; | ||
77 | }; | ||
78 | |||
70 | Matrix.flatten = function (mat) { | 79 | Matrix.flatten = function (mat) { |
71 | var result = []; | 80 | var result = []; |
72 | if (this.elements.length == 0) { | 81 | if (this.elements.length == 0) { |