diff options
author | Jose Antonio Marquez | 2012-04-10 11:24:21 -0700 |
---|---|---|
committer | Jose Antonio Marquez | 2012-04-10 11:24:21 -0700 |
commit | d14f78b06d37aa469885f2ecf84419bcb7e3e613 (patch) | |
tree | 91b95c6c9aef779a743b710105546a8ae74bff12 /js/lib/geom/circle.js | |
parent | a9bcc403df76ad2cb7c31ff7fdd42a85c35cf424 (diff) | |
parent | bd43ce383b050d03b0f92cc923c517febc66ca28 (diff) | |
download | ninja-d14f78b06d37aa469885f2ecf84419bcb7e3e613.tar.gz |
Merge branch 'refs/heads/Ninja-Internal' into FileIO
Diffstat (limited to 'js/lib/geom/circle.js')
-rwxr-xr-x | js/lib/geom/circle.js | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/js/lib/geom/circle.js b/js/lib/geom/circle.js index 7fa78b12..1073c2db 100755 --- a/js/lib/geom/circle.js +++ b/js/lib/geom/circle.js | |||
@@ -42,8 +42,8 @@ var Circle = function GLCircle() { | |||
42 | 42 | ||
43 | this._strokeWidth = strokeSize; | 43 | this._strokeWidth = strokeSize; |
44 | this._innerRadius = innerRadius; | 44 | this._innerRadius = innerRadius; |
45 | if (strokeColor) this._strokeColor = strokeColor; | 45 | this._strokeColor = strokeColor; |
46 | if (fillColor) this._fillColor = fillColor; | 46 | this._fillColor = fillColor; |
47 | 47 | ||
48 | this._strokeStyle = strokeStyle; | 48 | this._strokeStyle = strokeStyle; |
49 | } | 49 | } |
@@ -631,6 +631,21 @@ var Circle = function GLCircle() { | |||
631 | this._strokeStyle = jObj.strokeStyle; | 631 | this._strokeStyle = jObj.strokeStyle; |
632 | var strokeMaterialName = jObj.strokeMat; | 632 | var strokeMaterialName = jObj.strokeMat; |
633 | var fillMaterialName = jObj.fillMat; | 633 | var fillMaterialName = jObj.fillMat; |
634 | |||
635 | var strokeMat = MaterialsModel.getMaterial( strokeMaterialName ); | ||
636 | if (!strokeMat) { | ||
637 | console.log( "object material not found in library: " + strokeMaterialName ); | ||
638 | strokeMat = MaterialsModel.getMaterial( MaterialsModel.getDefaultMaterialName() ); | ||
639 | } | ||
640 | this._strokeMaterial = strokeMat; | ||
641 | |||
642 | var fillMat = MaterialsModel.getMaterial( fillMaterialName ); | ||
643 | if (!fillMat) { | ||
644 | console.log( "object material not found in library: " + fillMaterialName ); | ||
645 | fillMat = MaterialsModel.getMaterial( MaterialsModel.getDefaultMaterialName() ); | ||
646 | } | ||
647 | this._fillMaterial = fillMat; | ||
648 | |||
634 | this.importMaterialsJSON( jObj.materials ); | 649 | this.importMaterialsJSON( jObj.materials ); |
635 | }; | 650 | }; |
636 | 651 | ||