aboutsummaryrefslogtreecommitdiff
path: root/js/lib/math
diff options
context:
space:
mode:
authorValerio Virgillito2012-06-20 11:17:47 -0700
committerValerio Virgillito2012-06-20 11:17:47 -0700
commit3f5aa43b5b545cd551c5585ef5f2d478c2d49cad (patch)
treefe5beec45a8d7f45a90659e95c4f13a679ae35d5 /js/lib/math
parent5c4ff40d7950282a179dcfd49c5ea9234e0a8185 (diff)
parentfcb6309915161d16a74a4385b905742f35b7d62d (diff)
downloadninja-3f5aa43b5b545cd551c5585ef5f2d478c2d49cad.tar.gz
Merge branch 'refs/heads/master' into montage-v11-integration
Conflicts: js/io/system/ninjalibrary.json Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'js/lib/math')
-rwxr-xr-xjs/lib/math/matrix.js9
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
70Matrix.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
70Matrix.flatten = function (mat) { 79Matrix.flatten = function (mat) {
71 var result = []; 80 var result = [];
72 if (this.elements.length == 0) { 81 if (this.elements.length == 0) {