From 86a801c057fc3b0580d6130be5740c2ee503444f Mon Sep 17 00:00:00 2001 From: hwc487 Date: Fri, 27 Jan 2012 15:52:36 -0800 Subject: updated from old repo --- js/helper-classes/RDGE/GLRectangle.js | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'js/helper-classes/RDGE/GLRectangle.js') 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() this._materialSpecular = [0.4, 0.4, 0.4, 1.0]; if(strokeMaterial) - { this._strokeMaterial = strokeMaterial; - } + else + this._strokeMaterial = new FlatMaterial(); + if(fillMaterial) - { this._fillMaterial = fillMaterial; - } + else + this._fillMaterial = new FlatMaterial(); } /////////////////////////////////////////////////////////////////////// @@ -278,10 +279,10 @@ function GLRectangle() brRadius = -z*(r-l)/(2.0*zn)*brRadiusNDC; // stroke - var strokeMaterial = this.makeStrokeMaterial(); - prim = this.createStroke([x,y], 2*xFill, 2*yFill, strokeSize, tlRadius, blRadius, brRadius, trRadius, strokeMaterial) - this._primArray.push( prim ); - this._materialNodeArray.push( strokeMaterial.getMaterialNode() ); +// var strokeMaterial = this.makeStrokeMaterial(); +// prim = this.createStroke([x,y], 2*xFill, 2*yFill, strokeSize, tlRadius, blRadius, brRadius, trRadius, strokeMaterial) +// this._primArray.push( prim ); +// this._materialNodeArray.push( strokeMaterial.getMaterialNode() ); // fill tlRadius -= strokeSize; if (tlRadius < 0) tlRadius = 0.0; -- cgit v1.2.3 From b2ce8b819cc85a558d862c04965b7e65a6ce8640 Mon Sep 17 00:00:00 2001 From: hwc487 Date: Wed, 1 Feb 2012 13:05:32 -0800 Subject: changes to allow minimal rendering ofnon-animated materials. --- js/helper-classes/RDGE/GLRectangle.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'js/helper-classes/RDGE/GLRectangle.js') diff --git a/js/helper-classes/RDGE/GLRectangle.js b/js/helper-classes/RDGE/GLRectangle.js index bc3b1478..1bb4bcac 100644 --- a/js/helper-classes/RDGE/GLRectangle.js +++ b/js/helper-classes/RDGE/GLRectangle.js @@ -279,10 +279,10 @@ function GLRectangle() brRadius = -z*(r-l)/(2.0*zn)*brRadiusNDC; // stroke -// var strokeMaterial = this.makeStrokeMaterial(); -// prim = this.createStroke([x,y], 2*xFill, 2*yFill, strokeSize, tlRadius, blRadius, brRadius, trRadius, strokeMaterial) -// this._primArray.push( prim ); -// this._materialNodeArray.push( strokeMaterial.getMaterialNode() ); + var strokeMaterial = this.makeStrokeMaterial(); + prim = this.createStroke([x,y], 2*xFill, 2*yFill, strokeSize, tlRadius, blRadius, brRadius, trRadius, strokeMaterial) + this._primArray.push( prim ); + this._materialNodeArray.push( strokeMaterial.getMaterialNode() ); // fill tlRadius -= strokeSize; if (tlRadius < 0) tlRadius = 0.0; -- cgit v1.2.3