aboutsummaryrefslogtreecommitdiff
path: root/js/tools
diff options
context:
space:
mode:
authorNivesh Rajbhandari2012-04-04 11:17:50 -0700
committerNivesh Rajbhandari2012-04-04 11:17:50 -0700
commit8b60a68f0152c609ad94a931472680f313678d8d (patch)
treeb99be03e0f7293eb6c74ff6b25746c338f10d153 /js/tools
parentb9032fb0f656a6c029ef0c71c490bb5d5cd10d94 (diff)
downloadninja-8b60a68f0152c609ad94a931472680f313678d8d.tar.gz
We should require VecUtils instead of referring to the global reference since we will eventually remove that from the window object.
Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com>
Diffstat (limited to 'js/tools')
-rwxr-xr-xjs/tools/TranslateObject3DTool.js6
-rwxr-xr-xjs/tools/modifier-tool-base.js6
2 files changed, 6 insertions, 6 deletions
diff --git a/js/tools/TranslateObject3DTool.js b/js/tools/TranslateObject3DTool.js
index 7163f005..9fa49229 100755
--- a/js/tools/TranslateObject3DTool.js
+++ b/js/tools/TranslateObject3DTool.js
@@ -5,7 +5,7 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot
5</copyright> */ 5</copyright> */
6 6
7var Translate3DToolBase = require("js/tools/Translate3DToolBase").Translate3DToolBase, 7var Translate3DToolBase = require("js/tools/Translate3DToolBase").Translate3DToolBase,
8 drawUtils = require("js/helper-classes/3D/draw-utils").DrawUtils, 8 vecUtils = require("js/helper-classes/3D/vec-utils").VecUtils,
9 viewUtils = require("js/helper-classes/3D/view-utils").ViewUtils, 9 viewUtils = require("js/helper-classes/3D/view-utils").ViewUtils,
10 snapManager = require("js/helper-classes/3D/snap-manager").SnapManager; 10 snapManager = require("js/helper-classes/3D/snap-manager").SnapManager;
11 11
@@ -16,7 +16,7 @@ exports.TranslateObject3DTool = Object.create(Translate3DToolBase, {
16 initializeSnapping : { 16 initializeSnapping : {
17 value : function(event) 17 value : function(event)
18 { 18 {
19 console.log( "initializeSnapping" ); 19// console.log( "initializeSnapping" );
20 20
21 this._mouseDownHitRec = null; 21 this._mouseDownHitRec = null;
22 this._mouseUpHitRec = null; 22 this._mouseUpHitRec = null;
@@ -128,7 +128,7 @@ exports.TranslateObject3DTool = Object.create(Translate3DToolBase, {
128 128
129 // only do quadrant snapping if the 4 corners of the element are in the drag plane 129 // only do quadrant snapping if the 4 corners of the element are in the drag plane
130 130
131 var sign = MathUtils.fpSign( VecUtils.vecDot(3,this._dragPlane,[0,0,1]) + this._dragPlane[3] - 1.0); 131 var sign = MathUtils.fpSign( vecUtils.vecDot(3,this._dragPlane,[0,0,1]) + this._dragPlane[3] - 1.0);
132 this._shouldUseQuadPt = (sign == 0); 132 this._shouldUseQuadPt = (sign == 0);
133 133
134 var wpHitRec = hitRec.convertToWorkingPlane( this._dragPlane ); 134 var wpHitRec = hitRec.convertToWorkingPlane( this._dragPlane );
diff --git a/js/tools/modifier-tool-base.js b/js/tools/modifier-tool-base.js
index 5f2d29be..064f8b4b 100755
--- a/js/tools/modifier-tool-base.js
+++ b/js/tools/modifier-tool-base.js
@@ -9,8 +9,8 @@ var Montage = require("montage/core/core").Montage,
9 snapManager = require("js/helper-classes/3D/snap-manager").SnapManager, 9 snapManager = require("js/helper-classes/3D/snap-manager").SnapManager,
10 viewUtils = require("js/helper-classes/3D/view-utils").ViewUtils, 10 viewUtils = require("js/helper-classes/3D/view-utils").ViewUtils,
11 vecUtils = require("js/helper-classes/3D/vec-utils").VecUtils, 11 vecUtils = require("js/helper-classes/3D/vec-utils").VecUtils,
12 drawUtils = require("js/helper-classes/3D/draw-utils").DrawUtils, 12 drawUtils = require("js/helper-classes/3D/draw-utils").DrawUtils;
13 Properties3D = ("js/models/properties-3d").Properties3D; 13// Properties3D = ("js/models/properties-3d").Properties3D;
14 14
15exports.ModifierToolBase = Montage.create(DrawingTool, { 15exports.ModifierToolBase = Montage.create(DrawingTool, {
16 16
@@ -177,7 +177,7 @@ exports.ModifierToolBase = Montage.create(DrawingTool, {
177 } 177 }
178 178
179 // only do quadrant snapping if the 4 corners of the element are in the drag plane 179 // only do quadrant snapping if the 4 corners of the element are in the drag plane
180 var sign = MathUtils.fpSign( VecUtils.vecDot(3,this._dragPlane,[0,0,1]) + this._dragPlane[3] - 1.0); 180 var sign = MathUtils.fpSign( vecUtils.vecDot(3,this._dragPlane,[0,0,1]) + this._dragPlane[3] - 1.0);
181 this._shouldUseQuadPt = (sign == 0) 181 this._shouldUseQuadPt = (sign == 0)
182 182
183 var wpHitRec = hitRec.convertToWorkingPlane( this._dragPlane ); 183 var wpHitRec = hitRec.convertToWorkingPlane( this._dragPlane );