diff options
author | hwc487 | 2012-06-06 16:34:41 -0700 |
---|---|---|
committer | hwc487 | 2012-06-06 16:34:41 -0700 |
commit | 6c994c4b90023cecf4fd0caafb404b859fe28f54 (patch) | |
tree | 75a4d813441ca6a3eb529dc88a749776459bb76e /js/lib/geom/geom-obj.js | |
parent | 920436977433ea55c01ce1e73895d1db0a6abac1 (diff) | |
download | ninja-6c994c4b90023cecf4fd0caafb404b859fe28f54.tar.gz |
material cleanup and rearchitecture
Diffstat (limited to 'js/lib/geom/geom-obj.js')
-rwxr-xr-x | js/lib/geom/geom-obj.js | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/js/lib/geom/geom-obj.js b/js/lib/geom/geom-obj.js index 417c8731..3a7a5619 100755 --- a/js/lib/geom/geom-obj.js +++ b/js/lib/geom/geom-obj.js | |||
@@ -281,9 +281,11 @@ exports.GeomObj = Object.create(Object.prototype, { | |||
281 | this._materialArray.push(strokeMaterial); | 281 | this._materialArray.push(strokeMaterial); |
282 | this._materialTypeArray.push("stroke"); | 282 | this._materialTypeArray.push("stroke"); |
283 | 283 | ||
284 | if (this._strokeColor) { | 284 | // don't set the value here. The material editor may set a color directly |
285 | this.setStrokeColor(this._strokeColor); | 285 | // to the material without setting this value in the obj. The following |
286 | } | 286 | // lines of code will clobber the value in the material |
287 | //if (this._strokeColor) | ||
288 | // this.setStrokeColor(this._strokeColor); | ||
287 | 289 | ||
288 | this._strokeMaterial = strokeMaterial; | 290 | this._strokeMaterial = strokeMaterial; |
289 | 291 | ||
@@ -306,12 +308,14 @@ exports.GeomObj = Object.create(Object.prototype, { | |||
306 | 308 | ||
307 | this._materialArray.push(fillMaterial); | 309 | this._materialArray.push(fillMaterial); |
308 | this._materialTypeArray.push("fill"); | 310 | this._materialTypeArray.push("fill"); |
311 | |||
312 | // don't set the value here. The material editor may set a color directly | ||
313 | // to the material without setting this value in the obj. The following | ||
314 | // lines of code will clobber the value in the material | ||
315 | //if (this._fillColor) | ||
316 | // this.setFillColor(this._fillColor); | ||
309 | 317 | ||
310 | if (this._fillColor) { | 318 | this._fillMaterial = fillMaterial; |
311 | this.setFillColor(this._fillColor); | ||
312 | } | ||
313 | |||
314 | this._fillMaterial = fillMaterial; | ||
315 | 319 | ||
316 | return fillMaterial; | 320 | return fillMaterial; |
317 | } | 321 | } |
@@ -389,6 +393,7 @@ exports.GeomObj = Object.create(Object.prototype, { | |||
389 | case "radialBlur": | 393 | case "radialBlur": |
390 | case "pulse": | 394 | case "pulse": |
391 | case "twistVert": | 395 | case "twistVert": |
396 | case "taper": | ||
392 | mat = MaterialsModel.getMaterialByShader(shaderName); | 397 | mat = MaterialsModel.getMaterialByShader(shaderName); |
393 | if (mat) mat = mat.dup(); | 398 | if (mat) mat = mat.dup(); |
394 | break; | 399 | break; |