diff options
author | Ananya Sen | 2012-04-17 18:11:55 -0700 |
---|---|---|
committer | Ananya Sen | 2012-04-17 18:11:55 -0700 |
commit | 35abad196cc9feb76ef50c1b63032a38233a6d51 (patch) | |
tree | 914689c66d4ab6c6e088b571eade0a0e35082916 /js/lib/geom/brush-stroke.js | |
parent | 1f891c58bad0b7746659aa4138001b5ee76d9a0e (diff) | |
parent | 616a8532099fec2a15855eac97cd85cb60c4451c (diff) | |
download | ninja-35abad196cc9feb76ef50c1b63032a38233a6d51.tar.gz |
Merge branch 'refs/heads/ninja-internal-master' into Codeview-improvements
Diffstat (limited to 'js/lib/geom/brush-stroke.js')
-rwxr-xr-x | js/lib/geom/brush-stroke.js | 15 |
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; |