aboutsummaryrefslogtreecommitdiff
path: root/js/helper-classes/RDGE/GLLine.js
diff options
context:
space:
mode:
authorPushkar Joshi2012-02-08 15:42:40 -0800
committerPushkar Joshi2012-02-08 15:42:40 -0800
commit18243deb66ab14a014756bfb0be1a52648c7771a (patch)
treec64660f7f69840cac5186fd730221335bd0a67af /js/helper-classes/RDGE/GLLine.js
parent802e92eb70b00849dadacf2c6590d27edbe65d99 (diff)
parent0537f8f29e7b8dd48fd08f20b1533fbe92a54c4b (diff)
downloadninja-18243deb66ab14a014756bfb0be1a52648c7771a.tar.gz
Merge branch 'master' into pentool
Conflicts: js/helper-classes/RDGE/GLWorld.js js/helper-classes/RDGE/MaterialsLibrary.js
Diffstat (limited to 'js/helper-classes/RDGE/GLLine.js')
-rw-r--r--js/helper-classes/RDGE/GLLine.js27
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 }