diff options
Diffstat (limited to 'js/lib/rdge/materials/relief-tunnel-material.js')
-rw-r--r-- | js/lib/rdge/materials/relief-tunnel-material.js | 84 |
1 files changed, 42 insertions, 42 deletions
diff --git a/js/lib/rdge/materials/relief-tunnel-material.js b/js/lib/rdge/materials/relief-tunnel-material.js index 5776e6e2..7e193a25 100644 --- a/js/lib/rdge/materials/relief-tunnel-material.js +++ b/js/lib/rdge/materials/relief-tunnel-material.js | |||
@@ -51,19 +51,19 @@ var ReliefTunnelMaterial = function ReliefTunnelMaterial() | |||
51 | /////////////////////////////////////////////////////////////////////// | 51 | /////////////////////////////////////////////////////////////////////// |
52 | // Material Property Accessors | 52 | // Material Property Accessors |
53 | /////////////////////////////////////////////////////////////////////// | 53 | /////////////////////////////////////////////////////////////////////// |
54 | var u_tex0_index = 0, u_speed_index = 1; | 54 | var u_tex0_index = 0, u_speed_index = 1; |
55 | this._propNames = ["u_tex0", "u_speed" ]; | 55 | this._propNames = ["u_tex0", "u_speed" ]; |
56 | this._propLabels = ["Texture map", "Speed" ]; | 56 | this._propLabels = ["Texture map", "Speed" ]; |
57 | this._propTypes = ["file", "float" ]; | 57 | this._propTypes = ["file", "float" ]; |
58 | this._propValues = []; | 58 | this._propValues = []; |
59 | this._propValues[this._propNames[u_tex0_index]] = this._defaultTexMap.slice(0); | 59 | this._propValues[this._propNames[u_tex0_index]] = this._defaultTexMap.slice(0); |
60 | this._propValues[this._propNames[u_speed_index]] = 1.0; | 60 | this._propValues[this._propNames[u_speed_index]] = 1.0; |
61 | 61 | ||
62 | /////////////////////////////////////////////////////////////////////// | 62 | /////////////////////////////////////////////////////////////////////// |
63 | // Material Property Accessors | 63 | // Material Property Accessors |
64 | /////////////////////////////////////////////////////////////////////// | 64 | /////////////////////////////////////////////////////////////////////// |
65 | this.isAnimated = function() { return true; }; | 65 | this.isAnimated = function() { return true; }; |
66 | this.getShaderDef = function() { return reliefTunnelMaterialDef; }; | 66 | this.getShaderDef = function() { return reliefTunnelMaterialDef; }; |
67 | 67 | ||
68 | /////////////////////////////////////////////////////////////////////// | 68 | /////////////////////////////////////////////////////////////////////// |
69 | // Methods | 69 | // Methods |
@@ -109,42 +109,42 @@ var ReliefTunnelMaterial = function ReliefTunnelMaterial() | |||
109 | // shader spec (can also be loaded from a .JSON file, or constructed at runtime) | 109 | // shader spec (can also be loaded from a .JSON file, or constructed at runtime) |
110 | var reliefTunnelMaterialDef = | 110 | var reliefTunnelMaterialDef = |
111 | { 'shaders': | 111 | { 'shaders': |
112 | { | 112 | { |
113 | 'defaultVShader': "assets/shaders/Basic.vert.glsl", | 113 | 'defaultVShader': "assets/shaders/Basic.vert.glsl", |
114 | 'defaultFShader': "assets/shaders/ReliefTunnel.frag.glsl" | 114 | 'defaultFShader': "assets/shaders/ReliefTunnel.frag.glsl" |
115 | }, | 115 | }, |
116 | 'techniques': | 116 | 'techniques': |
117 | { | 117 | { |
118 | 'default': | 118 | 'default': |
119 | [ | 119 | [ |
120 | { | 120 | { |
121 | 'vshader': 'defaultVShader', | 121 | 'vshader': 'defaultVShader', |
122 | 'fshader': 'defaultFShader', | 122 | 'fshader': 'defaultFShader', |
123 | // attributes | 123 | // attributes |
124 | 'attributes': | 124 | 'attributes': |
125 | { | 125 | { |
126 | 'vert': { 'type': 'vec3' }, | 126 | 'vert': { 'type': 'vec3' }, |
127 | 'normal': { 'type': 'vec3' }, | 127 | 'normal': { 'type': 'vec3' }, |
128 | 'texcoord': { 'type': 'vec2' } | 128 | 'texcoord': { 'type': 'vec2' } |
129 | }, | 129 | }, |
130 | // parameters | 130 | // parameters |
131 | 'params': | 131 | 'params': |
132 | { | 132 | { |
133 | 'u_tex0': { 'type': 'tex2d' }, | 133 | 'u_tex0': { 'type': 'tex2d' }, |
134 | 'u_time': { 'type': 'float' }, | 134 | 'u_time': { 'type': 'float' }, |
135 | 'u_speed': { 'type': 'float' }, | 135 | 'u_speed': { 'type': 'float' }, |
136 | 'u_resolution': { 'type': 'vec2' } | 136 | 'u_resolution': { 'type': 'vec2' } |
137 | }, | 137 | }, |
138 | 138 | ||
139 | // render states | 139 | // render states |
140 | 'states': | 140 | 'states': |
141 | { | 141 | { |
142 | 'depthEnable': true, | 142 | 'depthEnable': true, |
143 | 'offset': [1.0, 0.1] | 143 | 'offset': [1.0, 0.1] |
144 | } | 144 | } |
145 | } | 145 | } |
146 | ] | 146 | ] |
147 | } | 147 | } |
148 | }; | 148 | }; |
149 | 149 | ||
150 | ReliefTunnelMaterial.prototype = new PulseMaterial(); | 150 | ReliefTunnelMaterial.prototype = new PulseMaterial(); |