aboutsummaryrefslogtreecommitdiff
path: root/js/tools
diff options
context:
space:
mode:
authorhwc4872012-04-02 16:28:09 -0700
committerhwc4872012-04-02 16:28:09 -0700
commit8423cceac4f45f3d08d92ae969d17d488674717f (patch)
tree3658f1d0f01ac32882b4506f02738242ee003b67 /js/tools
parentdc9650af5760b1f93d6e93a383eabceacfdc0ad8 (diff)
downloadninja-8423cceac4f45f3d08d92ae969d17d488674717f.tar.gz
Translate 3D fix for multi-selection Z translation
Diffstat (limited to 'js/tools')
-rwxr-xr-xjs/tools/Translate3DToolBase.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/js/tools/Translate3DToolBase.js b/js/tools/Translate3DToolBase.js
index 18e2b610..bd2b3af1 100755
--- a/js/tools/Translate3DToolBase.js
+++ b/js/tools/Translate3DToolBase.js
@@ -147,8 +147,8 @@ exports.Translate3DToolBase = Montage.create(ModifierToolBase,
147 147
148 _translateGlobally: { 148 _translateGlobally: {
149 value: function (transMat) { 149 value: function (transMat) {
150 //console.log( "_translateGlobally, startMat: " + this._startMat + ", transMat: " + transMat );
151 //console.log( "_translateGlobally, transMat: " + transMat ); 150 //console.log( "_translateGlobally, transMat: " + transMat );
151 //console.log( "_translateGlobally, startMat: " + this._startMat + ", transMat: " + transMat );
152 var len = this._targets.length, 152 var len = this._targets.length,
153 i = 0, 153 i = 0,
154 item, 154 item,
@@ -160,6 +160,7 @@ exports.Translate3DToolBase = Montage.create(ModifierToolBase,
160 160
161 if (this._mode === 1) 161 if (this._mode === 1)
162 { 162 {
163 if (len > 1) curMat = this._targets[0].mat.slice();
163 var curInv = glmat4.inverse( curMat, [] ); 164 var curInv = glmat4.inverse( curMat, [] );
164 transMat = glmat4.multiply( nMat, curInv, [] ); 165 transMat = glmat4.multiply( nMat, curInv, [] );
165 } 166 }