From 13e2155e043990170a05f57bf7aad63d23120ecf Mon Sep 17 00:00:00 2001 From: hwc487 Date: Wed, 13 Jun 2012 15:50:04 -0700 Subject: Fixes for runtime Taper material --- js/lib/rdge/materials/taper-material.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'js/lib/rdge') diff --git a/js/lib/rdge/materials/taper-material.js b/js/lib/rdge/materials/taper-material.js index a44314b6..0ae039f7 100644 --- a/js/lib/rdge/materials/taper-material.js +++ b/js/lib/rdge/materials/taper-material.js @@ -32,6 +32,7 @@ var TaperMaterial = function TaperMaterial() this.isAnimated = function () { return true; }; this.getShaderDef = function() { return taperShaderDef; }; + this.getTechniqueName = function() { return 'colorMe' }; this.hasVertexDeformation = function () { return this._hasVertexDeformation; }; this._hasVertexDeformation = true; @@ -50,12 +51,12 @@ var TaperMaterial = function TaperMaterial() // set up the material node this._materialNode = RDGE.createMaterialNode("taperMaterial" + "_" + world.generateUniqueNodeID()); + this._materialNode.setShader(this._shader); this._time = 0; if (this._shader && this._shader['default']) { this._shader['default'].u_time.set([this._time]); } - this._materialNode.setShader(this._shader); // initialize the taper properties this.setShaderValues(); @@ -133,7 +134,8 @@ taperShaderDef = { 'u_minVal': { 'type': 'float' }, 'u_maxVal': { 'type': 'float' }, 'u_center': { 'type': 'float' }, - 'u_taperAmount': { 'type': 'float' } + 'u_taperAmount': { 'type': 'float' }, + 'u_speed': { 'type': 'float' } } } ] -- cgit v1.2.3