diff options
Diffstat (limited to 'js/lib/geom/rectangle.js')
-rwxr-xr-x | js/lib/geom/rectangle.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/js/lib/geom/rectangle.js b/js/lib/geom/rectangle.js index 6abaef2f..a47295e0 100755 --- a/js/lib/geom/rectangle.js +++ b/js/lib/geom/rectangle.js | |||
@@ -79,6 +79,8 @@ var Rectangle = function GLRectangle() { | |||
79 | } else { | 79 | } else { |
80 | this._fillMaterial = MaterialsModel.exportFlatMaterial(); | 80 | this._fillMaterial = MaterialsModel.exportFlatMaterial(); |
81 | } | 81 | } |
82 | |||
83 | this.exportMaterials(); | ||
82 | }; | 84 | }; |
83 | 85 | ||
84 | /////////////////////////////////////////////////////////////////////// | 86 | /////////////////////////////////////////////////////////////////////// |
@@ -230,7 +232,6 @@ var Rectangle = function GLRectangle() { | |||
230 | } else { | 232 | } else { |
231 | rtnStr += "flatMaterial"; | 233 | rtnStr += "flatMaterial"; |
232 | } | 234 | } |
233 | |||
234 | rtnStr += "\n"; | 235 | rtnStr += "\n"; |
235 | 236 | ||
236 | rtnStr += "fillMat: "; | 237 | rtnStr += "fillMat: "; |
@@ -239,9 +240,10 @@ var Rectangle = function GLRectangle() { | |||
239 | } else { | 240 | } else { |
240 | rtnStr += "flatMaterial"; | 241 | rtnStr += "flatMaterial"; |
241 | } | 242 | } |
242 | |||
243 | rtnStr += "\n"; | 243 | rtnStr += "\n"; |
244 | 244 | ||
245 | rtnStr += this.exportMaterials(); | ||
246 | |||
245 | return rtnStr; | 247 | return rtnStr; |
246 | }; | 248 | }; |
247 | 249 | ||
@@ -292,8 +294,9 @@ var Rectangle = function GLRectangle() { | |||
292 | console.log( "object material not found in library: " + fillMaterialName ); | 294 | console.log( "object material not found in library: " + fillMaterialName ); |
293 | fillMat = MaterialsModel.exportFlatMaterial(); | 295 | fillMat = MaterialsModel.exportFlatMaterial(); |
294 | } | 296 | } |
295 | |||
296 | this._fillMaterial = fillMat; | 297 | this._fillMaterial = fillMat; |
298 | |||
299 | this.importMaterials( importStr ); | ||
297 | }; | 300 | }; |
298 | 301 | ||
299 | this.buildBuffers = function() { | 302 | this.buildBuffers = function() { |