aboutsummaryrefslogtreecommitdiff
path: root/js/lib/geom
diff options
context:
space:
mode:
Diffstat (limited to 'js/lib/geom')
-rwxr-xr-xjs/lib/geom/anchor-point.js12
-rwxr-xr-xjs/lib/geom/brush-stroke.js6
-rwxr-xr-xjs/lib/geom/circle.js2
-rwxr-xr-xjs/lib/geom/geom-obj.js2
-rw-r--r--js/lib/geom/shape-primitive.js2
-rwxr-xr-xjs/lib/geom/sub-path.js4
6 files changed, 14 insertions, 14 deletions
diff --git a/js/lib/geom/anchor-point.js b/js/lib/geom/anchor-point.js
index a1fcfc0d..72eebd0d 100755
--- a/js/lib/geom/anchor-point.js
+++ b/js/lib/geom/anchor-point.js
@@ -30,14 +30,14 @@ POSSIBILITY OF SUCH DAMAGE.
30 30
31///////////////////////////////////////////// 31/////////////////////////////////////////////
32// Class GLAnchorPoint 32// Class GLAnchorPoint
33// GL representation of a point clicked 33// GL representation of a point clicked
34// and dragged during pen tool 34// and dragged during pen tool
35// 35//
36// 36//
37///////////////////////////////////////////// 37/////////////////////////////////////////////
38var GLAnchorPoint = function GLAnchorPoint() { 38var GLAnchorPoint = function GLAnchorPoint() {
39 ///////////////////////////////////////// 39 /////////////////////////////////////////
40 // Instance variables 40 // Instance variables
41 ///////////////////////////////////////// 41 /////////////////////////////////////////
42 this._x = 0.0; 42 this._x = 0.0;
43 this._y = 0.0; 43 this._y = 0.0;
@@ -99,7 +99,7 @@ GLAnchorPoint.prototype.translateNextFromPrev = function (tx, ty, tz) {
99 if (totalTransSq < 0.0000001) { 99 if (totalTransSq < 0.0000001) {
100 return; 100 return;
101 } 101 }
102 102
103 // *** compute the rotation of the prev vector *** 103 // *** compute the rotation of the prev vector ***
104 var oldP = [this._prevX + tx - this._x, this._prevY + ty - this._y, this._prevZ + tz - this._z]; 104 var oldP = [this._prevX + tx - this._x, this._prevY + ty - this._y, this._prevZ + tz - this._z];
105 var newP = [this._prevX - this._x, this._prevY - this._y, this._prevZ - this._z]; 105 var newP = [this._prevX - this._x, this._prevY - this._y, this._prevZ - this._z];
@@ -133,7 +133,7 @@ GLAnchorPoint.prototype.translatePrevFromNext = function (tx, ty, tz) {
133 if (totalTransSq < 0.0000001) { 133 if (totalTransSq < 0.0000001) {
134 return; 134 return;
135 } 135 }
136 136
137 // *** compute the rotation of the next vector *** 137 // *** compute the rotation of the next vector ***
138 var oldN = [this._nextX + tx - this._x, this._nextY + ty - this._y, this._nextZ + tz - this._z]; 138 var oldN = [this._nextX + tx - this._x, this._nextY + ty - this._y, this._nextZ + tz - this._z];
139 var newN = [this._nextX - this._x, this._nextY - this._y, this._nextZ - this._z]; 139 var newN = [this._nextX - this._x, this._nextY - this._y, this._nextZ - this._z];
diff --git a/js/lib/geom/brush-stroke.js b/js/lib/geom/brush-stroke.js
index e553a1c6..6365d14c 100755
--- a/js/lib/geom/brush-stroke.js
+++ b/js/lib/geom/brush-stroke.js
@@ -52,7 +52,7 @@ var BrushStroke = function GLBrushStroke() {
52 this._BBoxMax = [0, 0, 0]; 52 this._BBoxMax = [0, 0, 0];
53 this._isDirty = true; 53 this._isDirty = true;
54 this._isInit = false; 54 this._isInit = false;
55 55
56 //the HTML5 canvas that holds this brush stroke 56 //the HTML5 canvas that holds this brush stroke
57 this._canvas = null; 57 this._canvas = null;
58 //flag indicating whether or not to freeze the size and position of canvas 58 //flag indicating whether or not to freeze the size and position of canvas
@@ -312,7 +312,7 @@ BrushStroke.prototype.setWidth = function (newW) {
312 } 312 }
313 var minWidth = 1+this._strokeWidth; 313 var minWidth = 1+this._strokeWidth;
314 if (newW<minWidth) { 314 if (newW<minWidth) {
315 newW=minWidth; 315 newW=minWidth;
316 } 316 }
317 317
318 if (oldCanvasWidth<minWidth) { 318 if (oldCanvasWidth<minWidth) {
@@ -731,7 +731,7 @@ BrushStroke.prototype.drawToContext = function(ctx, drawStageWorldPts, stageWorl
731 w = world.getViewportWidth(); 731 w = world.getViewportWidth();
732 h = world.getViewportHeight(); 732 h = world.getViewportHeight();
733 } 733 }
734 734
735 if (this._strokeUseCalligraphic) { 735 if (this._strokeUseCalligraphic) {
736 //build the stamp for the brush stroke 736 //build the stamp for the brush stroke
737 var t=0; 737 var t=0;
diff --git a/js/lib/geom/circle.js b/js/lib/geom/circle.js
index a06355eb..e691f458 100755
--- a/js/lib/geom/circle.js
+++ b/js/lib/geom/circle.js
@@ -861,7 +861,7 @@ exports.Circle = Object.create(GeomObj, {
861 var ivrt = 0, iuv = 0; 861 var ivrt = 0, iuv = 0;
862 var uMin = 1.e8, uMax = -1.e8, 862 var uMin = 1.e8, uMax = -1.e8,
863 vMin = 1.e8, vMax = -1.e8; 863 vMin = 1.e8, vMax = -1.e8;
864 864
865 var i, index = 3; 865 var i, index = 3;
866 var xMin = vrts[0], xMax = vrts[0], 866 var xMin = vrts[0], xMax = vrts[0],
867 yMin = vrts[1], yMax = vrts[1]; 867 yMin = vrts[1], yMax = vrts[1];
diff --git a/js/lib/geom/geom-obj.js b/js/lib/geom/geom-obj.js
index c0c7504f..fda071ee 100755
--- a/js/lib/geom/geom-obj.js
+++ b/js/lib/geom/geom-obj.js
@@ -332,7 +332,7 @@ exports.GeomObj = Object.create(Object.prototype, {
332 332
333 this._materialArray.push(fillMaterial); 333 this._materialArray.push(fillMaterial);
334 this._materialTypeArray.push("fill"); 334 this._materialTypeArray.push("fill");
335 335
336 // don't set the value here. The material editor may set a color directly 336 // don't set the value here. The material editor may set a color directly
337 // to the material without setting this value in the obj. The following 337 // to the material without setting this value in the obj. The following
338 // lines of code will clobber the value in the material 338 // lines of code will clobber the value in the material
diff --git a/js/lib/geom/shape-primitive.js b/js/lib/geom/shape-primitive.js
index acb03920..340d00d5 100644
--- a/js/lib/geom/shape-primitive.js
+++ b/js/lib/geom/shape-primitive.js
@@ -183,7 +183,7 @@ ShapePrimitive.refineMesh = function( verts, norms, uvs, indices, nVertices, pa
183 var x0 = verts[iPt0], y0 = verts[iPt0+1], z0 = verts[iPt0+2], 183 var x0 = verts[iPt0], y0 = verts[iPt0+1], z0 = verts[iPt0+2],
184 x1 = verts[iPt1], y1 = verts[iPt1+1], z1 = verts[iPt1+2], 184 x1 = verts[iPt1], y1 = verts[iPt1+1], z1 = verts[iPt1+2],
185 x2 = verts[iPt2], y2 = verts[iPt2+1], z2 = verts[iPt2+2]; 185 x2 = verts[iPt2], y2 = verts[iPt2+1], z2 = verts[iPt2+2];
186 186
187 // calculate the midpoints of the edges 187 // calculate the midpoints of the edges
188 var xA = (x0 + x1)/2.0, yA = (y0 + y1)/2.0, zA = (z0 + z1)/2.0, 188 var xA = (x0 + x1)/2.0, yA = (y0 + y1)/2.0, zA = (z0 + z1)/2.0,
189 xB = (x1 + x2)/2.0, yB = (y1 + y2)/2.0, zB = (z1 + z2)/2.0, 189 xB = (x1 + x2)/2.0, yB = (y1 + y2)/2.0, zB = (z1 + z2)/2.0,
diff --git a/js/lib/geom/sub-path.js b/js/lib/geom/sub-path.js
index f047224d..bda9f317 100755
--- a/js/lib/geom/sub-path.js
+++ b/js/lib/geom/sub-path.js
@@ -78,7 +78,7 @@ var GLSubpath = function GLSubpath() {
78 //drawing context 78 //drawing context
79 this._world = null; 79 this._world = null;
80 this._canvas = null; //todo this might be unnecessary (but faster) since we can get it from the world 80 this._canvas = null; //todo this might be unnecessary (but faster) since we can get it from the world
81 81
82 //tool that owns this subpath 82 //tool that owns this subpath
83 this._drawingTool = null; 83 this._drawingTool = null;
84 84
@@ -380,7 +380,7 @@ GLSubpath.prototype.removeAnchor = function (index) {
380 retAnchor = this._Anchors.splice(index, 1); 380 retAnchor = this._Anchors.splice(index, 1);
381 } 381 }
382 this.makeDirty(); 382 this.makeDirty();
383 383
384 } 384 }
385 //deselect any selected anchor point 385 //deselect any selected anchor point
386 this.deselectAnchorPoint(); 386 this.deselectAnchorPoint();