diff options
author | Eric Guzman | 2012-02-08 14:41:56 -0800 |
---|---|---|
committer | Eric Guzman | 2012-02-08 14:41:56 -0800 |
commit | 637db74743ac1397ade7edec3da3ae1c1cdaa82a (patch) | |
tree | bc16578a5368098956d39f16ddd48737a9bb355c /js/helper-classes/RDGE/GLLine.js | |
parent | 40622aa97d31837254996b718b0a6feca2bcd0ce (diff) | |
parent | ab12be4e9a0d9fee4450795077b0107983b5682e (diff) | |
download | ninja-637db74743ac1397ade7edec3da3ae1c1cdaa82a.tar.gz |
Merge branch 'refs/heads/master' into StylesControllerUpdates
Diffstat (limited to 'js/helper-classes/RDGE/GLLine.js')
-rw-r--r-- | js/helper-classes/RDGE/GLLine.js | 27 |
1 files changed, 3 insertions, 24 deletions
diff --git a/js/helper-classes/RDGE/GLLine.js b/js/helper-classes/RDGE/GLLine.js index 9eaa69d1..bd3cbc26 100644 --- a/js/helper-classes/RDGE/GLLine.js +++ b/js/helper-classes/RDGE/GLLine.js | |||
@@ -27,12 +27,6 @@ function GLLine( world, xOffset, yOffset, width, height, slope, strokeSize, stro | |||
27 | 27 | ||
28 | this._strokeWidth = 0.25; | 28 | this._strokeWidth = 0.25; |
29 | 29 | ||
30 | // stroke colors | ||
31 | this._strokeColor = [0.4, 0.4, 0.4, 1.0]; | ||
32 | |||
33 | // stroke materials | ||
34 | this._strokeMaterial; | ||
35 | |||
36 | this._strokeStyle = "Solid"; | 30 | this._strokeStyle = "Solid"; |
37 | 31 | ||
38 | if (arguments.length > 0) | 32 | if (arguments.length > 0) |
@@ -267,26 +261,11 @@ function GLLine( world, xOffset, yOffset, width, height, slope, strokeSize, stro | |||
267 | } | 261 | } |
268 | 262 | ||
269 | var prim = ShapePrimitive.create(strokeVertices, strokeNormals, strokeTextures, indices, g_Engine.getContext().renderer.TRIANGLES, indices.length); | 263 | var prim = ShapePrimitive.create(strokeVertices, strokeNormals, strokeTextures, indices, g_Engine.getContext().renderer.TRIANGLES, indices.length); |
270 | this._primArray.push( prim ); | ||
271 | 264 | ||
272 | var strokeMaterial; | 265 | var strokeMaterial = this.makeStrokeMaterial(); |
273 | if (this.getStrokeMaterial()) | ||
274 | strokeMaterial = this.getStrokeMaterial().dup(); | ||
275 | else | ||
276 | strokeMaterial = new FlatMaterial(); | ||
277 | 266 | ||
278 | if (strokeMaterial) | 267 | this._primArray.push( prim ); |
279 | { | 268 | this._materialNodeArray.push( strokeMaterial.getMaterialNode() ); |
280 | strokeMaterial.init( this.getWorld() ); | ||
281 | if(!this.getStrokeMaterial() && this._strokeColor) | ||
282 | { | ||
283 | strokeMaterial.setProperty("color", this._strokeColor); | ||
284 | } | ||
285 | } | ||
286 | |||
287 | this._materialArray.push( strokeMaterial ); | ||
288 | this._materialTypeArray.push( "stroke" ); | ||
289 | this._materialNodeArray.push( strokeMaterial.getMaterialNode() ); | ||
290 | 269 | ||
291 | world.updateObject(this); | 270 | world.updateObject(this); |
292 | } | 271 | } |