aboutsummaryrefslogtreecommitdiff
path: root/js/lib/rdge/materials/relief-tunnel-material.js
diff options
context:
space:
mode:
authorhwc4872012-03-27 10:39:34 -0700
committerhwc4872012-03-27 10:39:34 -0700
commit2acd77dac475a5197cb67b0257c758c357dfd443 (patch)
tree417a00605631977b6310f96a4f4e5eba63b548bb /js/lib/rdge/materials/relief-tunnel-material.js
parentd7269673dc1f5caf6df3765c6b669d3d1a93bdb1 (diff)
downloadninja-2acd77dac475a5197cb67b0257c758c357dfd443.tar.gz
texture abstraction integration
Diffstat (limited to 'js/lib/rdge/materials/relief-tunnel-material.js')
-rw-r--r--js/lib/rdge/materials/relief-tunnel-material.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/js/lib/rdge/materials/relief-tunnel-material.js b/js/lib/rdge/materials/relief-tunnel-material.js
index 52c40543..24fc885f 100644
--- a/js/lib/rdge/materials/relief-tunnel-material.js
+++ b/js/lib/rdge/materials/relief-tunnel-material.js
@@ -6,8 +6,10 @@
6 6
7 7
8var PulseMaterial = require("js/lib/rdge/materials/pulse-material").PulseMaterial; 8var PulseMaterial = require("js/lib/rdge/materials/pulse-material").PulseMaterial;
9var Texture = require("js/lib/rdge/texture").Texture;
9 10
10var ReliefTunnelMaterial = function ReliefTunnelMaterial() { 11var ReliefTunnelMaterial = function ReliefTunnelMaterial()
12{
11 /////////////////////////////////////////////////////////////////////// 13 ///////////////////////////////////////////////////////////////////////
12 // Instance variables 14 // Instance variables
13 /////////////////////////////////////////////////////////////////////// 15 ///////////////////////////////////////////////////////////////////////
@@ -62,6 +64,9 @@ var ReliefTunnelMaterial = function ReliefTunnelMaterial() {
62 this._shader['default'].u_time.set( [this._time] ); 64 this._shader['default'].u_time.set( [this._time] );
63 } 65 }
64 66
67 var texMapName = this._propValues[this._propNames[0]];
68 this._glTex = new Texture( world, texMapName );
69
65 // set the shader values in the shader 70 // set the shader values in the shader
66 this.updateTexture(); 71 this.updateTexture();
67 this.setResolution( [world.getViewportWidth(),world.getViewportHeight()] ); 72 this.setResolution( [world.getViewportWidth(),world.getViewportHeight()] );