aboutsummaryrefslogtreecommitdiff
path: root/js/lib/rdge/materials/square-tunnel-material.js
diff options
context:
space:
mode:
authorhwc4872012-03-30 06:23:53 -0700
committerhwc4872012-03-30 06:23:53 -0700
commit947bad893335e1023bcbe177ff8db454c27c4bf8 (patch)
tree8e4ab2a709e638f21b50f55b6e1842699b46accc /js/lib/rdge/materials/square-tunnel-material.js
parent2ab7fbef0df37f0c2bb6a4447f03993b9d50b5d0 (diff)
downloadninja-947bad893335e1023bcbe177ff8db454c27c4bf8.tar.gz
converted materials to new texture structure
Diffstat (limited to 'js/lib/rdge/materials/square-tunnel-material.js')
-rw-r--r--js/lib/rdge/materials/square-tunnel-material.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/js/lib/rdge/materials/square-tunnel-material.js b/js/lib/rdge/materials/square-tunnel-material.js
index 9264872f..6e987fdc 100644
--- a/js/lib/rdge/materials/square-tunnel-material.js
+++ b/js/lib/rdge/materials/square-tunnel-material.js
@@ -5,6 +5,7 @@
5 </copyright> */ 5 </copyright> */
6 6
7var PulseMaterial = require("js/lib/rdge/materials/pulse-material").PulseMaterial; 7var PulseMaterial = require("js/lib/rdge/materials/pulse-material").PulseMaterial;
8var Texture = require("js/lib/rdge/texture").Texture;
8 9
9var SquareTunnelMaterial = function SquareTunnelMaterial() { 10var SquareTunnelMaterial = function SquareTunnelMaterial() {
10 /////////////////////////////////////////////////////////////////////// 11 ///////////////////////////////////////////////////////////////////////
@@ -63,6 +64,10 @@ var SquareTunnelMaterial = function SquareTunnelMaterial() {
63 this._shader['default'].u_time.set( [this._time] ); 64 this._shader['default'].u_time.set( [this._time] );
64 } 65 }
65 66
67 // set up the texture
68 var texMapName = this._propValues[this._propNames[0]];
69 this._glTex = new Texture( world, texMapName );
70
66 // set the shader values in the shader 71 // set the shader values in the shader
67 this.updateTexture(); 72 this.updateTexture();
68 this.setResolution( [world.getViewportWidth(),world.getViewportHeight()] ); 73 this.setResolution( [world.getViewportWidth(),world.getViewportHeight()] );