diff options
author | hwc487 | 2012-01-27 15:52:36 -0800 |
---|---|---|
committer | hwc487 | 2012-01-27 15:52:36 -0800 |
commit | 86a801c057fc3b0580d6130be5740c2ee503444f (patch) | |
tree | 8b014e981273464afde4e0603cdf70c6e90eee48 /js/helper-classes/RDGE/GLRectangle.js | |
parent | 302e3eb01037ff550bc93547cb8d5d0a0780b312 (diff) | |
download | ninja-86a801c057fc3b0580d6130be5740c2ee503444f.tar.gz |
updated from old repo
Diffstat (limited to 'js/helper-classes/RDGE/GLRectangle.js')
-rw-r--r-- | js/helper-classes/RDGE/GLRectangle.js | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/js/helper-classes/RDGE/GLRectangle.js b/js/helper-classes/RDGE/GLRectangle.js index 1334d7e6..bc3b1478 100644 --- a/js/helper-classes/RDGE/GLRectangle.js +++ b/js/helper-classes/RDGE/GLRectangle.js | |||
@@ -80,13 +80,14 @@ function GLRectangle() | |||
80 | this._materialSpecular = [0.4, 0.4, 0.4, 1.0]; | 80 | this._materialSpecular = [0.4, 0.4, 0.4, 1.0]; |
81 | 81 | ||
82 | if(strokeMaterial) | 82 | if(strokeMaterial) |
83 | { | ||
84 | this._strokeMaterial = strokeMaterial; | 83 | this._strokeMaterial = strokeMaterial; |
85 | } | 84 | else |
85 | this._strokeMaterial = new FlatMaterial(); | ||
86 | |||
86 | if(fillMaterial) | 87 | if(fillMaterial) |
87 | { | ||
88 | this._fillMaterial = fillMaterial; | 88 | this._fillMaterial = fillMaterial; |
89 | } | 89 | else |
90 | this._fillMaterial = new FlatMaterial(); | ||
90 | } | 91 | } |
91 | 92 | ||
92 | /////////////////////////////////////////////////////////////////////// | 93 | /////////////////////////////////////////////////////////////////////// |
@@ -278,10 +279,10 @@ function GLRectangle() | |||
278 | brRadius = -z*(r-l)/(2.0*zn)*brRadiusNDC; | 279 | brRadius = -z*(r-l)/(2.0*zn)*brRadiusNDC; |
279 | 280 | ||
280 | // stroke | 281 | // stroke |
281 | var strokeMaterial = this.makeStrokeMaterial(); | 282 | // var strokeMaterial = this.makeStrokeMaterial(); |
282 | prim = this.createStroke([x,y], 2*xFill, 2*yFill, strokeSize, tlRadius, blRadius, brRadius, trRadius, strokeMaterial) | 283 | // prim = this.createStroke([x,y], 2*xFill, 2*yFill, strokeSize, tlRadius, blRadius, brRadius, trRadius, strokeMaterial) |
283 | this._primArray.push( prim ); | 284 | // this._primArray.push( prim ); |
284 | this._materialNodeArray.push( strokeMaterial.getMaterialNode() ); | 285 | // this._materialNodeArray.push( strokeMaterial.getMaterialNode() ); |
285 | 286 | ||
286 | // fill | 287 | // fill |
287 | tlRadius -= strokeSize; if (tlRadius < 0) tlRadius = 0.0; | 288 | tlRadius -= strokeSize; if (tlRadius < 0) tlRadius = 0.0; |