From 04343eda8c2f870b0da55cfdc8003c99fe1cc4de Mon Sep 17 00:00:00 2001 From: Kris Kowal Date: Fri, 6 Jul 2012 11:53:10 -0700 Subject: Remove trailing spaces --- js/helper-classes/3D/Rectangle.js | 2 +- js/helper-classes/3D/draw-utils.js | 6 ++--- js/helper-classes/3D/hit-record.js | 2 +- js/helper-classes/3D/math-utils.js | 6 ++--- js/helper-classes/3D/snap-2d-record.js | 4 ++-- js/helper-classes/3D/snap-manager.js | 40 +++++++++++++++++----------------- js/helper-classes/3D/vec-utils.js | 4 ++-- js/helper-classes/3D/view-utils.js | 18 +++++++-------- 8 files changed, 41 insertions(+), 41 deletions(-) (limited to 'js/helper-classes/3D') diff --git a/js/helper-classes/3D/Rectangle.js b/js/helper-classes/3D/Rectangle.js index fb6127ed..15f812ab 100755 --- a/js/helper-classes/3D/Rectangle.js +++ b/js/helper-classes/3D/Rectangle.js @@ -220,7 +220,7 @@ var Rectangle = exports.Rectangle = Object.create(Object.prototype, { this.setTop( yMin ); this.setHeight( yMax - yMin ); } }, - + translate: { value: function( dx, dy ) diff --git a/js/helper-classes/3D/draw-utils.js b/js/helper-classes/3D/draw-utils.js index 6f4c287d..65a2647e 100755 --- a/js/helper-classes/3D/draw-utils.js +++ b/js/helper-classes/3D/draw-utils.js @@ -869,7 +869,7 @@ var DrawUtils = exports.DrawUtils = Montage.create(Component, { tmpPt, ssMat, elt; - + if (len === 0) return; var context = this._drawingContext; if (!context) return; @@ -910,7 +910,7 @@ var DrawUtils = exports.DrawUtils = Montage.create(Component, { this._selectionCtr = MathUtils.getCenterFromBounds(3, bounds3D); // console.log("selection center, single elt case - ", this._selectionCtr); - + this.viewUtils.popViewportObj(); } else @@ -1328,7 +1328,7 @@ var DrawUtils = exports.DrawUtils = Montage.create(Component, { var arrowSize = 50 / zoomFactor; var xAxis = [arrowSize,0,0,1]; //var rO = resMat.multiply(origin); - var rO = glmat4.multiplyVec3( resMat, origin, []); + var rO = glmat4.multiplyVec3( resMat, origin, []); //var xO = resMat.multiply(xAxis); var xO = glmat4.multiplyVec3( resMat, xAxis, []); diff --git a/js/helper-classes/3D/hit-record.js b/js/helper-classes/3D/hit-record.js index 4c1a71b0..7e39bb50 100755 --- a/js/helper-classes/3D/hit-record.js +++ b/js/helper-classes/3D/hit-record.js @@ -60,7 +60,7 @@ var HitRecord = exports.HitRecord = Object.create(Object.prototype, SNAP_TYPE_ELEMENT_CENTER: { value: 11, writable: true }, SNAP_TYPE_CONTAINED_ELEMENT: { value: 12, writable: true }, SNAP_TYPE_UNDEFINED: { value: null, writable: -1 }, - + /////////////////////////////////////////////////////////////////////// // Instance variables /////////////////////////////////////////////////////////////////////// diff --git a/js/helper-classes/3D/math-utils.js b/js/helper-classes/3D/math-utils.js index 3c981d0d..191b02bd 100755 --- a/js/helper-classes/3D/math-utils.js +++ b/js/helper-classes/3D/math-utils.js @@ -41,7 +41,7 @@ var MathUtilsClass = exports.MathUtilsClass = Object.create(Object.prototype, { // Instance variables /////////////////////////////////////////////////////////////////////// // VecUtils: { value: null, writable: true }, - + EPSILON: { value: 1.e-5, writable: true }, // these are used in containment tests @@ -616,7 +616,7 @@ var MathUtilsClass = exports.MathUtilsClass = Object.create(Object.prototype, { // test 1. Overall bounding box test if ((xMaxElt < xMin) || (xMinElt > xMax) || (yMaxElt < yMin) || (yMinElt > yMax)) return false; - + // test 2. See if any of the corners of the element are contained in the rectangle var rect = Object.create(Rectangle, {}); rect.set( pt[0], pt[1], width, height ); @@ -939,7 +939,7 @@ var MathUtilsClass = exports.MathUtilsClass = Object.create(Object.prototype, { }, /////////////////////////////////////////////////////////////////////// - // Utility method to calculate angle between two 3D vectors + // Utility method to calculate angle between two 3D vectors /////////////////////////////////////////////////////////////////////// getAxisAngleBetween3DVectors: { value: function (vec1, vec2, axis) { diff --git a/js/helper-classes/3D/snap-2d-record.js b/js/helper-classes/3D/snap-2d-record.js index 59fa4b77..5119ae6f 100755 --- a/js/helper-classes/3D/snap-2d-record.js +++ b/js/helper-classes/3D/snap-2d-record.js @@ -39,14 +39,14 @@ var Snap2DRecord = exports.Snap2DRecord = Object.create(Object.prototype, /////////////////////////////////////////////////////////////////////// // Constant definitions /////////////////////////////////////////////////////////////////////// - + /////////////////////////////////////////////////////////////////////// // Instance variables /////////////////////////////////////////////////////////////////////// _elt : { value: null , writable: true}, // the four boundary points for the element in global screen space _screenPtArray : { value: null , writable: true}, // snap point in global screen space _alignPtArray : { value: null , writable: true}, // points for snap-align. Kept in working plane space - + _localToGlobalMat : { value: null, writable: true }, _globalToLocalMat : { value: null, writable: true }, diff --git a/js/helper-classes/3D/snap-manager.js b/js/helper-classes/3D/snap-manager.js index 2289f963..e5044e09 100755 --- a/js/helper-classes/3D/snap-manager.js +++ b/js/helper-classes/3D/snap-manager.js @@ -210,7 +210,7 @@ var SnapManager = exports.SnapManager = Montage.create(Component, { }, snap : { - value: function (xScreen, yScreen, snap3D, quadPt) + value: function (xScreen, yScreen, snap3D, quadPt) { // force a 3D snap if a 2D snap is requested but the 2D cache has not been initialized if (!snap3D && !this._elementCache) snap3D = true; @@ -282,7 +282,7 @@ var SnapManager = exports.SnapManager = Montage.create(Component, { this.deactivateDragPlane(); this.setLastHit( rtnHit ); - + //rtnHit.test(); // DEBUG CODE. REMOVE THIS return rtnHit; } @@ -305,7 +305,7 @@ var SnapManager = exports.SnapManager = Montage.create(Component, { var stageWorldPt0 = viewUtils.localToStageWorld( localPt0, stage ), stageWorldPt1 = viewUtils.localToStageWorld( localPt1, stage ); var vec = vecUtils.vecSubtract( 3, stageWorldPt1, stageWorldPt0 ); - + var ptOnWorkingPlane = MathUtils.vecIntersectPlane(stageWorldPt0, vec, workingPlane); var wpMat = drawUtils.getPlaneToWorldMatrix(workingPlane, MathUtils.getPointOnPlane(workingPlane)), @@ -1023,7 +1023,7 @@ var SnapManager = exports.SnapManager = Montage.create(Component, { } }, - hSnapToElements : + hSnapToElements : { value: function( elt, hitRecs, depth, globalScrPt ) { @@ -1081,9 +1081,9 @@ var SnapManager = exports.SnapManager = Montage.create(Component, { } }, - snapToElement : + snapToElement : { - value: function( elt, globalScrPt ) + value: function( elt, globalScrPt ) { if (this.isAvoidedElement(elt) ) return null; @@ -1096,7 +1096,7 @@ var SnapManager = exports.SnapManager = Montage.create(Component, { var eltMat = viewUtils.getLocalToGlobalMatrix( elt ); for (var i=0; i<4; i++) bounds3D[i] = viewUtils.localToGlobal2(bounds[i], eltMat); - + var hitRec = this.snapToScreenBounds( elt, globalScrPt, bounds, bounds3D ); // see if we can snap to a contained geometry object @@ -1117,9 +1117,9 @@ var SnapManager = exports.SnapManager = Montage.create(Component, { } }, - snapToScreenBounds : + snapToScreenBounds : { - value: function( elt, scrPt, bounds, bounds3D ) + value: function( elt, scrPt, bounds, bounds3D ) { // push the element as the current viewport element viewUtils.pushViewportObj( elt ); @@ -1328,9 +1328,9 @@ var SnapManager = exports.SnapManager = Montage.create(Component, { } }, - hSnapToContainedElements : + hSnapToContainedElements : { - value: function( eyePt, dir, glObj, hitRec, targetScrPt ) + value: function( eyePt, dir, glObj, hitRec, targetScrPt ) { if (!glObj) return false; @@ -1345,7 +1345,7 @@ var SnapManager = exports.SnapManager = Montage.create(Component, { doSnapToContainedElement: { - value: function( eyePt, dir, glObj, hitRec, targetScrPt ) + value: function( eyePt, dir, glObj, hitRec, targetScrPt ) { var rtnVal = false; @@ -1443,9 +1443,9 @@ var SnapManager = exports.SnapManager = Montage.create(Component, { } }, - snapToContainedElement : + snapToContainedElement : { - value: function( eyePt, dir, glObj, hitRec, targetScrPt ) + value: function( eyePt, dir, glObj, hitRec, targetScrPt ) { var rtnVal = false; var elt = hitRec.getElement(); @@ -1466,10 +1466,10 @@ var SnapManager = exports.SnapManager = Montage.create(Component, { case glObj.GEOM_TYPE_PATH: // Snapping not implemented for these type, but don't throw an error... break; - + case glObj.GEOM_TYPE_BRUSH_STROKE: break; //don't throw error because snapping not yet implemented - + case glObj.GEOM_TYPE_CUBIC_BEZIER: rtnVal = this.doSnapToContainedElement( eyePt, dir, glObj, hitRec, targetScrPt ); break; @@ -1519,7 +1519,7 @@ var SnapManager = exports.SnapManager = Montage.create(Component, { // add the projection matrix var projMat = world.makePerspectiveMatrix(); //var projInv = projMat.inverse(); - var projInv = glmat4.inverse(projMat, []); + var projInv = glmat4.inverse(projMat, []); var camInv = world.getCameraMatInverse(); //var glToNDC = projMat.multiply( camInv ); var glToNDC = glmat4.multiply( projMat, camInv, [] ); @@ -1569,9 +1569,9 @@ var SnapManager = exports.SnapManager = Montage.create(Component, { } }, - GLToView : + GLToView : { - value: function( glPt, world ) + value: function( glPt, world ) { var projMat = world.makePerspectiveMatrix(); //var mat = projMat.multiply( world.getCameraMatInverse() ); @@ -2134,7 +2134,7 @@ var SnapManager = exports.SnapManager = Montage.create(Component, { drawHit : { - value: function( hitRec ) + value: function( hitRec ) { if (hitRec) { diff --git a/js/helper-classes/3D/vec-utils.js b/js/helper-classes/3D/vec-utils.js index 31f6cdd1..4575c3d7 100755 --- a/js/helper-classes/3D/vec-utils.js +++ b/js/helper-classes/3D/vec-utils.js @@ -249,8 +249,8 @@ var VecUtils = exports.VecUtils = Object.create(Object.prototype, mat[index] = 1.0; index += dimen + 1; } - - return mat; + + return mat; } }, diff --git a/js/helper-classes/3D/view-utils.js b/js/helper-classes/3D/view-utils.js index 1973d254..b7070840 100755 --- a/js/helper-classes/3D/view-utils.js +++ b/js/helper-classes/3D/view-utils.js @@ -158,7 +158,7 @@ exports.ViewUtils = Montage.create(Component, { var stageMat = this.getMatrixFromElement(stage); var mat = glmat4.multiply( stageMat, objMat, [] ); - + var viewDir; if (localMode) { @@ -183,7 +183,7 @@ exports.ViewUtils = Montage.create(Component, { else plane = vecUtils.vecCross( 3, yVec, xVec ); break; - + case 1: xDot = Math.abs(vecUtils.vecDot(3, yVec, viewDir)); zDot = Math.abs(vecUtils.vecDot(3, zVec, viewDir)); @@ -571,7 +571,7 @@ exports.ViewUtils = Montage.create(Component, { return localPlane; } }, - + parentToChild: { value: function( parentPt, child, passthrough ) { var pt = parentPt.slice(0); @@ -620,7 +620,7 @@ exports.ViewUtils = Montage.create(Component, { return childPt; } }, - + parentToChildWorld: { value: function( parentPt, child ) { var pt = parentPt.slice(0); @@ -694,7 +694,7 @@ exports.ViewUtils = Montage.create(Component, { return vec; } }, - + getElementBounds: { value: function( elt, localSpace ) { // optional argument localSpace, if true, puts the top left at (0,0). @@ -876,7 +876,7 @@ exports.ViewUtils = Montage.create(Component, { } }, - + unproject: { value: function( pt ) { if(!this._perspectiveDist) @@ -968,7 +968,7 @@ exports.ViewUtils = Montage.create(Component, { return viewPt; } }, - + globalScreenToLocalWorld: { value: function( globalPt, elt ) { var objPt = this.globalToLocal( globalPt, elt ); @@ -1341,7 +1341,7 @@ exports.ViewUtils = Montage.create(Component, { // drawLayoutModule // // STAGE ACCESSORS: -// activeDocument: this.application.ninja.currentDocument +// activeDocument: this.application.ninja.currentDocument // userContent (stage): this.application.ninja.currentDocument.model.documentRoot // stageManager: this.application.ninja.stage // MainApp\js\stage\stage.reel\stage.js // stageManager._canvas: this.application.ninja.stage.canvas @@ -1490,6 +1490,6 @@ exports.ViewUtils = Montage.create(Component, { } /////////////////////////////////////////////////////////////////////////////////// - + }); -- cgit v1.2.3