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/io/system/ninjalibrary.json | 2 +- js/lib/rdge/materials/taper-material.js | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'js') diff --git a/js/io/system/ninjalibrary.json b/js/io/system/ninjalibrary.json index fb108937..f8e61ca5 100644 --- a/js/io/system/ninjalibrary.json +++ b/js/io/system/ninjalibrary.json @@ -1,6 +1,6 @@ { "libraries": [ {"name": "Montage", "path": "/node_modules/descriptor.json", "version": "0.10.1.0"}, - {"name": "RDGE", "path": "/assets/descriptor.json", "version": "0.6.0.0"} + {"name": "RDGE", "path": "/assets/descriptor.json", "version": "0.6.0.1"} ] } \ No newline at end of file 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