From 2d4da18a778471b02e188ad668752e331ee76127 Mon Sep 17 00:00:00 2001 From: hwc487 Date: Tue, 7 Feb 2012 14:35:55 -0800 Subject: test code for deformation shader --- js/helper-classes/RDGE/Materials/FlatMaterial.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'js/helper-classes/RDGE/Materials') diff --git a/js/helper-classes/RDGE/Materials/FlatMaterial.js b/js/helper-classes/RDGE/Materials/FlatMaterial.js index c8eb3b6c..de039231 100644 --- a/js/helper-classes/RDGE/Materials/FlatMaterial.js +++ b/js/helper-classes/RDGE/Materials/FlatMaterial.js @@ -26,10 +26,13 @@ function FlatMaterial() /////////////////////////////////////////////////////////////////////// // Property Accessors /////////////////////////////////////////////////////////////////////// - this.getColor = function() { return this._color; } - this.getShaderName = function() { return this._shaderName; } + this.getColor = function() { return this._color; } + this.getShaderName = function() { return this._shaderName; } - this.isAnimated = function() { return false; } + this.isAnimated = function() { return false; } + this.hasVertexDeformation = function() { return true; } + this._hasVertexDeformation = true; + this._vertexDeformationTolerance = 0.2; //////////////////////////////////s///////////////////////////////////// // Methods @@ -55,6 +58,7 @@ function FlatMaterial() // this._shader.colorMe.u_limit1.set( [0.25] ); // this._shader.colorMe.u_limit2.set( [0.5] ); // this._shader.colorMe.u_limit3.set( [0.75] ); +// this._shader.colorMe.u_center.set( [0.0] ); // this._shader.colorMe.u_taperAmount.set( [0.5] ); } @@ -146,6 +150,7 @@ flatShaderDef = //'u_limit1': { 'type': 'float' }, //'u_limit2': { 'type': 'float' }, //'u_limit3': { 'type': 'float' }, + //'u_center': { 'type': 'float' }, //'u_taperAmount': { 'type': 'float' } }, }, -- cgit v1.2.3