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 81b385b3..370bb257 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 | /////////////////////////////////////////////////////////////////////// |
@@ -218,7 +220,6 @@ var Rectangle = function GLRectangle() { | |||
218 | } else { | 220 | } else { |
219 | rtnStr += "flatMaterial"; | 221 | rtnStr += "flatMaterial"; |
220 | } | 222 | } |
221 | |||
222 | rtnStr += "\n"; | 223 | rtnStr += "\n"; |
223 | 224 | ||
224 | rtnStr += "fillMat: "; | 225 | rtnStr += "fillMat: "; |
@@ -227,9 +228,10 @@ var Rectangle = function GLRectangle() { | |||
227 | } else { | 228 | } else { |
228 | rtnStr += "flatMaterial"; | 229 | rtnStr += "flatMaterial"; |
229 | } | 230 | } |
230 | |||
231 | rtnStr += "\n"; | 231 | rtnStr += "\n"; |
232 | 232 | ||
233 | rtnStr += this.exportMaterials(); | ||
234 | |||
233 | return rtnStr; | 235 | return rtnStr; |
234 | }; | 236 | }; |
235 | 237 | ||
@@ -264,8 +266,9 @@ var Rectangle = function GLRectangle() { | |||
264 | console.log( "object material not found in library: " + fillMaterialName ); | 266 | console.log( "object material not found in library: " + fillMaterialName ); |
265 | fillMat = MaterialsModel.exportFlatMaterial(); | 267 | fillMat = MaterialsModel.exportFlatMaterial(); |
266 | } | 268 | } |
267 | |||
268 | this._fillMaterial = fillMat; | 269 | this._fillMaterial = fillMat; |
270 | |||
271 | this.importMaterials( importStr ); | ||
269 | }; | 272 | }; |
270 | 273 | ||
271 | this.buildBuffers = function() { | 274 | this.buildBuffers = function() { |