aboutsummaryrefslogtreecommitdiff
path: root/js/lib/rdge/materials/taper-material.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/lib/rdge/materials/taper-material.js')
-rw-r--r--js/lib/rdge/materials/taper-material.js56
1 files changed, 28 insertions, 28 deletions
diff --git a/js/lib/rdge/materials/taper-material.js b/js/lib/rdge/materials/taper-material.js
index 2dc3e120..d88b1e9e 100644
--- a/js/lib/rdge/materials/taper-material.js
+++ b/js/lib/rdge/materials/taper-material.js
@@ -38,7 +38,7 @@ var Texture = require("js/lib/rdge/texture").Texture;
38var TaperMaterial = function TaperMaterial() 38var TaperMaterial = function TaperMaterial()
39{ 39{
40 // initialize the inherited members 40 // initialize the inherited members
41 this.inheritedFrom = Material; 41 this.inheritedFrom = Material;
42 this.inheritedFrom(); 42 this.inheritedFrom();
43 43
44 /////////////////////////////////////////////////////////////////////// 44 ///////////////////////////////////////////////////////////////////////
@@ -55,8 +55,8 @@ var TaperMaterial = function TaperMaterial()
55 this.getShaderName = function () { return this._shaderName; }; 55 this.getShaderName = function () { return this._shaderName; };
56 56
57 this.isAnimated = function () { return true; }; 57 this.isAnimated = function () { return true; };
58 this.getShaderDef = function() { return taperShaderDef; }; 58 this.getShaderDef = function() { return taperShaderDef; };
59 this.getTechniqueName = function() { return 'colorMe' }; 59 this.getTechniqueName = function() { return 'colorMe' };
60 60
61 this.hasVertexDeformation = function () { return this._hasVertexDeformation; }; 61 this.hasVertexDeformation = function () { return this._hasVertexDeformation; };
62 this._hasVertexDeformation = true; 62 this._hasVertexDeformation = true;
@@ -117,7 +117,7 @@ var TaperMaterial = function TaperMaterial()
117 } 117 }
118 118
119 var t1 = this._propValues["u_limit1"] - this._deltaTime, 119 var t1 = this._propValues["u_limit1"] - this._deltaTime,
120 t2 = this._propValues["u_limit2"] - this._deltaTime; 120 t2 = this._propValues["u_limit2"] - this._deltaTime;
121 121
122 122
123 this._shader.colorMe["u_limit1"].set([t1]); 123 this._shader.colorMe["u_limit1"].set([t1]);
@@ -138,31 +138,31 @@ taperShaderDef = {
138 }, 138 },
139 'techniques': { // rendering control 139 'techniques': { // rendering control
140 'colorMe': [ // simple color pass 140 'colorMe': [ // simple color pass
141 { 141 {
142 'vshader': 'defaultVShader', 142 'vshader': 'defaultVShader',
143 'fshader': 'defaultFShader', 143 'fshader': 'defaultFShader',
144 144
145 // attributes 145 // attributes
146 'attributes': 146 'attributes':
147 { 147 {
148 'vert': { 'type': 'vec3' }, 148 'vert': { 'type': 'vec3' },
149 'normal': { 'type': 'vec3' }, 149 'normal': { 'type': 'vec3' },
150 'texcoord': { 'type': 'vec2' } 150 'texcoord': { 'type': 'vec2' }
151 }, 151 },
152 // attributes 152 // attributes
153 'params': 153 'params':
154 { 154 {
155 'u_limit1': { 'type': 'float' }, 155 'u_limit1': { 'type': 'float' },
156 'u_limit2': { 'type': 'float' }, 156 'u_limit2': { 'type': 'float' },
157 'u_limit3': { 'type': 'float' }, 157 'u_limit3': { 'type': 'float' },
158 'u_minVal': { 'type': 'float' }, 158 'u_minVal': { 'type': 'float' },
159 'u_maxVal': { 'type': 'float' }, 159 'u_maxVal': { 'type': 'float' },
160 'u_center': { 'type': 'float' }, 160 'u_center': { 'type': 'float' },
161 'u_taperAmount': { 'type': 'float' }, 161 'u_taperAmount': { 'type': 'float' },
162 'u_speed': { 'type': 'float' } 162 'u_speed': { 'type': 'float' }
163 } 163 }
164 } 164 }
165 ] 165 ]
166 } 166 }
167}; 167};
168 168