diff options
author | Jose Antonio Marquez | 2012-02-08 13:14:29 -0800 |
---|---|---|
committer | Jose Antonio Marquez | 2012-02-08 13:14:29 -0800 |
commit | 9b45b897949bf934c8bf2c90ee2ff78f8713cb12 (patch) | |
tree | e7c276a3934c823cab894f46ee7dc5d3eda9ca83 /js/helper-classes/RDGE/GLLine.js | |
parent | aa01c1210f3a4d9fd55a771b9de2c58ee3fa4bb6 (diff) | |
parent | 10cdeb52403f16d5d4be43a516e8cdfbc866a2a2 (diff) | |
download | ninja-9b45b897949bf934c8bf2c90ee2ff78f8713cb12.tar.gz |
Merge branch 'refs/heads/NinjaInternal' into Color
Conflicts:
js/controllers/elements/shapes-controller.js
js/data/pi/pi-data.js
js/panels/properties/content.reel/content.js
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 | } |