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/rectangle.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/rectangle.js')
-rwxr-xr-x | js/lib/geom/rectangle.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/js/lib/geom/rectangle.js b/js/lib/geom/rectangle.js index 00c40eb9..91b1d426 100755 --- a/js/lib/geom/rectangle.js +++ b/js/lib/geom/rectangle.js | |||
@@ -231,6 +231,21 @@ var Rectangle = function GLRectangle() { | |||
231 | this._strokeStyle = jObj.strokeStyle; | 231 | this._strokeStyle = jObj.strokeStyle; |
232 | var strokeMaterialName = jObj.strokeMat; | 232 | var strokeMaterialName = jObj.strokeMat; |
233 | var fillMaterialName = jObj.fillMat; | 233 | var fillMaterialName = jObj.fillMat; |
234 | |||
235 | var strokeMat = MaterialsModel.getMaterial( strokeMaterialName ); | ||
236 | if (!strokeMat) { | ||
237 | console.log( "object material not found in library: " + strokeMaterialName ); | ||
238 | strokeMat = MaterialsModel.getMaterial( MaterialsModel.getDefaultMaterialName() ); | ||
239 | } | ||
240 | this._strokeMaterial = strokeMat; | ||
241 | |||
242 | var fillMat = MaterialsModel.getMaterial( fillMaterialName ); | ||
243 | if (!fillMat) { | ||
244 | console.log( "object material not found in library: " + fillMaterialName ); | ||
245 | fillMat = MaterialsModel.getMaterial( MaterialsModel.getDefaultMaterialName() ); | ||
246 | } | ||
247 | this._fillMaterial = fillMat; | ||
248 | |||
234 | this.importMaterialsJSON( jObj.materials ); | 249 | this.importMaterialsJSON( jObj.materials ); |
235 | }; | 250 | }; |
236 | 251 | ||