From 9b7dac9215fbd7c0fe7a80d3e8f1ff378332fec3 Mon Sep 17 00:00:00 2001 From: Pushkar Joshi Date: Fri, 23 Mar 2012 14:32:46 -0700 Subject: Almost working version of brush tool that uses only local coordinates to store the brush stroke points. Current version does not yet update the width and height of the brush stroke canvas upon changing the brush stroke through the PI. Also, current version does not obtain 3D position of points properly from the drawing tool base (see BrushTool _getUnsnappedPosition) --- js/lib/geom/sub-path.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/lib/geom/sub-path.js') diff --git a/js/lib/geom/sub-path.js b/js/lib/geom/sub-path.js index e95be0e7..7046673e 100755 --- a/js/lib/geom/sub-path.js +++ b/js/lib/geom/sub-path.js @@ -1203,7 +1203,7 @@ GLSubpath.prototype.getNearVertex = function( eyePt, dir ){ bboxDim[1] = 0.5 * (this._BBoxMax[1] - this._BBoxMin[1]); bboxMid[1] = 0.5 * (this._BBoxMax[1] + this._BBoxMin[1]); bboxDim[2] = 0.5 * (this._BBoxMax[2] - this._BBoxMin[2]); - bboxMid[3] = 0.5 * (this._BBoxMax[2] + this._BBoxMin[2]); + bboxMid[2] = 0.5 * (this._BBoxMax[2] + this._BBoxMin[2]); // convert the stroke vertices into normalized device coordinates var world = this.getWorld(); -- cgit v1.2.3