aboutsummaryrefslogtreecommitdiff
path: root/js/helper-classes/RDGE/GLLine.js
diff options
context:
space:
mode:
authorhwc4872012-02-07 14:42:51 -0800
committerhwc4872012-02-07 14:42:51 -0800
commit6173fe8440152b1e4c63834a6b4dc7573d532339 (patch)
treed23449204ae7f23cb9bab09836d126e90c30484b /js/helper-classes/RDGE/GLLine.js
parent2d4da18a778471b02e188ad668752e331ee76127 (diff)
parentaec849d91e4b697d496b9ede28b5d89cf2283781 (diff)
downloadninja-6173fe8440152b1e4c63834a6b4dc7573d532339.tar.gz
Merge branch 'ToolFixes' of github.com:mqg734/ninja-internal into working
Conflicts: js/helper-classes/RDGE/GLRectangle.js 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 }