diff options
Diffstat (limited to 'js/lib/rdge/materials/square-tunnel-material.js')
-rw-r--r-- | js/lib/rdge/materials/square-tunnel-material.js | 84 |
1 files changed, 42 insertions, 42 deletions
diff --git a/js/lib/rdge/materials/square-tunnel-material.js b/js/lib/rdge/materials/square-tunnel-material.js index 833ca1c2..36714aa8 100644 --- a/js/lib/rdge/materials/square-tunnel-material.js +++ b/js/lib/rdge/materials/square-tunnel-material.js | |||
@@ -49,19 +49,19 @@ var SquareTunnelMaterial = function SquareTunnelMaterial() { | |||
49 | /////////////////////////////////////////////////////////////////////// | 49 | /////////////////////////////////////////////////////////////////////// |
50 | // Material Property Accessors | 50 | // Material Property Accessors |
51 | /////////////////////////////////////////////////////////////////////// | 51 | /////////////////////////////////////////////////////////////////////// |
52 | var u_tex0_index = 0, u_speed_index = 1; | 52 | var u_tex0_index = 0, u_speed_index = 1; |
53 | this._propNames = ["u_tex0", "u_speed" ]; | 53 | this._propNames = ["u_tex0", "u_speed" ]; |
54 | this._propLabels = ["Texture map", "Speed" ]; | 54 | this._propLabels = ["Texture map", "Speed" ]; |
55 | this._propTypes = ["file", "float" ]; | 55 | this._propTypes = ["file", "float" ]; |
56 | this._propValues = []; | 56 | this._propValues = []; |
57 | this._propValues[this._propNames[u_tex0_index]] = this._defaultTexMap.slice(0); | 57 | this._propValues[this._propNames[u_tex0_index]] = this._defaultTexMap.slice(0); |
58 | this._propValues[this._propNames[u_speed_index]] = 1.0; | 58 | this._propValues[this._propNames[u_speed_index]] = 1.0; |
59 | 59 | ||
60 | /////////////////////////////////////////////////////////////////////// | 60 | /////////////////////////////////////////////////////////////////////// |
61 | // Material Property Accessors | 61 | // Material Property Accessors |
62 | /////////////////////////////////////////////////////////////////////// | 62 | /////////////////////////////////////////////////////////////////////// |
63 | this.isAnimated = function() { return true; }; | 63 | this.isAnimated = function() { return true; }; |
64 | this.getShaderDef = function() { return squareTunnelMaterialDef; }; | 64 | this.getShaderDef = function() { return squareTunnelMaterialDef; }; |
65 | 65 | ||
66 | /////////////////////////////////////////////////////////////////////// | 66 | /////////////////////////////////////////////////////////////////////// |
67 | // Methods | 67 | // Methods |
@@ -97,42 +97,42 @@ var SquareTunnelMaterial = function SquareTunnelMaterial() { | |||
97 | // shader spec (can also be loaded from a .JSON file, or constructed at runtime) | 97 | // shader spec (can also be loaded from a .JSON file, or constructed at runtime) |
98 | var squareTunnelMaterialDef = | 98 | var squareTunnelMaterialDef = |
99 | { 'shaders': | 99 | { 'shaders': |
100 | { | 100 | { |
101 | 'defaultVShader': "assets/shaders/Basic.vert.glsl", | 101 | 'defaultVShader': "assets/shaders/Basic.vert.glsl", |
102 | 'defaultFShader': "assets/shaders/SquareTunnel.frag.glsl" | 102 | 'defaultFShader': "assets/shaders/SquareTunnel.frag.glsl" |
103 | }, | 103 | }, |
104 | 'techniques': | 104 | 'techniques': |
105 | { | 105 | { |
106 | 'default': | 106 | 'default': |
107 | [ | 107 | [ |
108 | { | 108 | { |
109 | 'vshader': 'defaultVShader', | 109 | 'vshader': 'defaultVShader', |
110 | 'fshader': 'defaultFShader', | 110 | 'fshader': 'defaultFShader', |
111 | // attributes | 111 | // attributes |
112 | 'attributes': | 112 | 'attributes': |
113 | { | 113 | { |
114 | 'vert': { 'type': 'vec3' }, | 114 | 'vert': { 'type': 'vec3' }, |
115 | 'normal': { 'type': 'vec3' }, | 115 | 'normal': { 'type': 'vec3' }, |
116 | 'texcoord': { 'type': 'vec2' } | 116 | 'texcoord': { 'type': 'vec2' } |
117 | }, | 117 | }, |
118 | // parameters | 118 | // parameters |
119 | 'params': | 119 | 'params': |
120 | { | 120 | { |
121 | 'u_tex0': { 'type': 'tex2d' }, | 121 | 'u_tex0': { 'type': 'tex2d' }, |
122 | 'u_time': { 'type': 'float' }, | 122 | 'u_time': { 'type': 'float' }, |
123 | 'u_speed': { 'type': 'float' }, | 123 | 'u_speed': { 'type': 'float' }, |
124 | 'u_resolution': { 'type': 'vec2' } | 124 | 'u_resolution': { 'type': 'vec2' } |
125 | }, | 125 | }, |
126 | 126 | ||
127 | // render states | 127 | // render states |
128 | 'states': | 128 | 'states': |
129 | { | 129 | { |
130 | 'depthEnable': true, | 130 | 'depthEnable': true, |
131 | 'offset': [1.0, 0.1] | 131 | 'offset': [1.0, 0.1] |
132 | } | 132 | } |
133 | } | 133 | } |
134 | ] | 134 | ] |
135 | } | 135 | } |
136 | }; | 136 | }; |
137 | 137 | ||
138 | SquareTunnelMaterial.prototype = new PulseMaterial(); | 138 | SquareTunnelMaterial.prototype = new PulseMaterial(); |