aboutsummaryrefslogtreecommitdiff
path: root/js/lib/geom/brush-stroke.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/lib/geom/brush-stroke.js')
-rwxr-xr-xjs/lib/geom/brush-stroke.js15
1 files changed, 3 insertions, 12 deletions
diff --git a/js/lib/geom/brush-stroke.js b/js/lib/geom/brush-stroke.js
index 22209815..743dab85 100755
--- a/js/lib/geom/brush-stroke.js
+++ b/js/lib/geom/brush-stroke.js
@@ -44,6 +44,9 @@ var BrushStroke = function GLBrushStroke() {
44 this._strokeAngle = 0; 44 this._strokeAngle = 0;
45 this._strokeAmountSmoothing = 0; 45 this._strokeAmountSmoothing = 0;
46 46
47 // currently, brush does not support a fill region
48 this.canFill = false;
49
47 //threshold that tells us whether two samples are too far apart 50 //threshold that tells us whether two samples are too far apart
48 this._MAX_SAMPLE_DISTANCE_THRESHOLD = 5; 51 this._MAX_SAMPLE_DISTANCE_THRESHOLD = 5;
49 52
@@ -711,18 +714,6 @@ var BrushStroke = function GLBrushStroke() {
711 this.update(); //after this, the stroke is ready to be rendered 714 this.update(); //after this, the stroke is ready to be rendered
712 }; 715 };
713 716
714
715 this.export = function() {
716 var jsonObject = this.exportJSON();
717 var stringified = JSON.stringify(jsonObject);
718 return "type: " + this.geomType() + "\n" + stringified;
719 };
720
721 this.import = function( importStr ) {
722 var jsonObject = JSON.parse(importStr);
723 this.importJSON(jsonObject);
724 }
725
726 this.collidesWithPoint = function (x, y, z) { 717 this.collidesWithPoint = function (x, y, z) {
727 if (x < this._BBoxMin[0]) return false; 718 if (x < this._BBoxMin[0]) return false;
728 if (x > this._BBoxMax[0]) return false; 719 if (x > this._BBoxMax[0]) return false;