aboutsummaryrefslogtreecommitdiff
path: root/js/lib/geom/rectangle.js
diff options
context:
space:
mode:
authorValerio Virgillito2012-03-13 11:15:34 -0700
committerValerio Virgillito2012-03-13 11:15:34 -0700
commitf6b958360d82854bdaf51848e7fd715d1f633179 (patch)
tree80f6c08bb730089bdd3f26310df8d2363f9ba863 /js/lib/geom/rectangle.js
parentc24f58c10231c30d3a8a4c9fb9a4f395dd746180 (diff)
parent4d7b86f55c504ee4e8c2460cf6b60cb9a2cf18f0 (diff)
downloadninja-f6b958360d82854bdaf51848e7fd715d1f633179.tar.gz
Merge pull request #105 from joseeight/FileIO-Build-Candidate
File I/O adding webGL/canvas data functionality
Diffstat (limited to 'js/lib/geom/rectangle.js')
-rwxr-xr-xjs/lib/geom/rectangle.js9
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() {