aboutsummaryrefslogtreecommitdiff
path: root/js/lib/rdge/materials
diff options
context:
space:
mode:
Diffstat (limited to 'js/lib/rdge/materials')
-rw-r--r--js/lib/rdge/materials/taper-material.js6
1 files changed, 4 insertions, 2 deletions
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()
32 32
33 this.isAnimated = function () { return true; }; 33 this.isAnimated = function () { return true; };
34 this.getShaderDef = function() { return taperShaderDef; }; 34 this.getShaderDef = function() { return taperShaderDef; };
35 this.getTechniqueName = function() { return 'colorMe' };
35 36
36 this.hasVertexDeformation = function () { return this._hasVertexDeformation; }; 37 this.hasVertexDeformation = function () { return this._hasVertexDeformation; };
37 this._hasVertexDeformation = true; 38 this._hasVertexDeformation = true;
@@ -50,12 +51,12 @@ var TaperMaterial = function TaperMaterial()
50 51
51 // set up the material node 52 // set up the material node
52 this._materialNode = RDGE.createMaterialNode("taperMaterial" + "_" + world.generateUniqueNodeID()); 53 this._materialNode = RDGE.createMaterialNode("taperMaterial" + "_" + world.generateUniqueNodeID());
54 this._materialNode.setShader(this._shader);
53 55
54 this._time = 0; 56 this._time = 0;
55 if (this._shader && this._shader['default']) { 57 if (this._shader && this._shader['default']) {
56 this._shader['default'].u_time.set([this._time]); 58 this._shader['default'].u_time.set([this._time]);
57 } 59 }
58 this._materialNode.setShader(this._shader);
59 60
60 // initialize the taper properties 61 // initialize the taper properties
61 this.setShaderValues(); 62 this.setShaderValues();
@@ -133,7 +134,8 @@ taperShaderDef = {
133 'u_minVal': { 'type': 'float' }, 134 'u_minVal': { 'type': 'float' },
134 'u_maxVal': { 'type': 'float' }, 135 'u_maxVal': { 'type': 'float' },
135 'u_center': { 'type': 'float' }, 136 'u_center': { 'type': 'float' },
136 'u_taperAmount': { 'type': 'float' } 137 'u_taperAmount': { 'type': 'float' },
138 'u_speed': { 'type': 'float' }
137 } 139 }
138 } 140 }
139 ] 141 ]