From 3e82beb51fe3f596147e9d7f1c405d9a8c4df63b Mon Sep 17 00:00:00 2001 From: hwc487 Date: Tue, 8 May 2012 16:15:49 -0700 Subject: code cleanup for linear gradients. --- js/lib/rdge/materials/linear-gradient-material.js | 41 ----------------------- 1 file changed, 41 deletions(-) (limited to 'js/lib/rdge/materials') diff --git a/js/lib/rdge/materials/linear-gradient-material.js b/js/lib/rdge/materials/linear-gradient-material.js index 0df9511e..79f323db 100755 --- a/js/lib/rdge/materials/linear-gradient-material.js +++ b/js/lib/rdge/materials/linear-gradient-material.js @@ -133,12 +133,6 @@ var LinearGradientMaterial = function LinearGradientMaterial() { } }; - // this.getColorCount = function() { return this._colorCount; }; - // this.setColorCount = function(c) { this._colorCount = c; - // if (this._shader && this._shader['default']) - // this._shader['default'].u_colorCount.set([c]); - // }; - this.getAngle = function () { return this._angle; }; @@ -251,41 +245,6 @@ var LinearGradientMaterial = function LinearGradientMaterial() { } }; - this.fitToPrimitive = function( prim ) - { - /* - var bounds = ShapePrimitive.getBounds( prim ); - if (bounds) - { - var dx = Math.abs( bounds[3] - bounds[0] ), - dy = Math.abs( bounds[4] - bounds[1] ); - if (dy == 0) dy = 1.0; - if (dx == 0) dx = 1.0; - var xScale = 2.0, yScale = 2.0; - if (dx > dy) - yScale *= dy/dx; - else - xScale *= dx/dy; - - // build the matrix - the translation to the origin, the scale, - // and the translation back to the center (hard coded at (0.5, 0.5) for now). - // the matrix is build directly instead of with matrix multiplications - // for efficiency, not to mention that the multiplication function does - // not exist for mat3's. - // the matrix as laid out below looks transposed - order is columnwise. - var xCtr = 0.5, yCtr = 0.5; - this._textureTransform = [ - xScale, 0.0, 0.0, - 0.0, yScale, 0.0, - 0.0, 0.0, 1.0 - ]; - - if (this._shader && this._shader['default']) - this._shader['default'].u_texTransform.set( this._textureTransform ); - } - */ - }; - this.exportJSON = function () { var jObj = { -- cgit v1.2.3