From 09030b2230631961e972bd3ee8537239741b243d Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Thu, 9 Feb 2012 08:50:42 -0800 Subject: Reversed the orientation of one of the triangles for WebGL rendering. Signed-off-by: Nivesh Rajbhandari --- js/helper-classes/RDGE/GLLine.js | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) (limited to 'js/helper-classes/RDGE') diff --git a/js/helper-classes/RDGE/GLLine.js b/js/helper-classes/RDGE/GLLine.js index bd3cbc26..67379b52 100644 --- a/js/helper-classes/RDGE/GLLine.js +++ b/js/helper-classes/RDGE/GLLine.js @@ -77,11 +77,16 @@ function GLLine( world, xOffset, yOffset, width, height, slope, strokeSize, stro this.getStrokeMaterial = function() { return this._strokeMaterial; } this.setStrokeMaterial = function(m) { this._strokeMaterial = m; } - this.getStrokeColor = function() { return this._strokeColor; } + this.getStrokeColor = function() { return this._strokeColor; } //this.setStrokeColor = function(c) { this._strokeColor = c; } - this.getStrokeStyle = function() { return this._strokeStyle; } - this.setStrokeStyle = function(s) { this._strokeStyle = s; } + this.getStrokeStyle = function() { return this._strokeStyle; } + this.setStrokeStyle = function(s) { this._strokeStyle = s; } + + this.getFillMaterial = function() { return null; } + + this.setStrokeMaterial = function(m) { this._strokeMaterial = m; } + this.getStrokeMaterial = function() { return this._strokeMaterial; } this.getWidth = function() { return this._width; } this.setWidth = function(w) { this._width = w; } @@ -184,9 +189,9 @@ function GLLine( world, xOffset, yOffset, width, height, slope, strokeSize, stro xFill+x, yFill+y, 0.0, -xFill+x, -yFill+y, 0.0, - xFill+x, yFill+y, 0.0, + xFill+x, -yFill+y, 0.0, -xFill+x, -yFill+y, 0.0, - xFill+x, -yFill+y, 0.0 + xFill+x, yFill+y, 0.0 ]; } else if(this._slope === "horizontal") @@ -199,10 +204,10 @@ function GLLine( world, xOffset, yOffset, width, height, slope, strokeSize, stro xFill+x, yFill+y, 0.0, -xFill+x, -yFill+y, 0.0, - xFill+x, yFill+y, 0.0, + xFill+x, -yFill+y, 0.0, -xFill+x, -yFill+y, 0.0, - xFill+x, -yFill+y, 0.0 - ]; + xFill+x, yFill+y, 0.0 + ]; } else if(this._slope > 0) { @@ -212,9 +217,9 @@ function GLLine( world, xOffset, yOffset, width, height, slope, strokeSize, stro -xFill+2*xAdj+x, yFill+y, 0.0, xFill-2*xAdj+x, -yFill+y, 0.0, - -xFill+2*xAdj+x, yFill+y, 0.0, + xFill+x, -yFill+2*yAdj+y, 0.0, xFill-2*xAdj+x, -yFill+y, 0.0, - xFill+x, -yFill+2*yAdj+y, 0.0 + -xFill+2*xAdj+x, yFill+y, 0.0 ]; } else @@ -225,9 +230,9 @@ function GLLine( world, xOffset, yOffset, width, height, slope, strokeSize, stro -xFill+2*xAdj+x, -yFill+y, 0.0, xFill-2*xAdj+x, yFill+y, 0.0, - -xFill+2*xAdj+x, -yFill+y, 0.0, + xFill+x, yFill-2*yAdj+y, 0.0, xFill-2*xAdj+x, yFill+y, 0.0, - xFill+x, yFill-2*yAdj+y, 0.0 + -xFill+2*xAdj+x, -yFill+y, 0.0 ]; } } -- cgit v1.2.3