diff options
Diffstat (limited to 'js/lib/rdge/materials/tunnel-material.js')
-rw-r--r-- | js/lib/rdge/materials/tunnel-material.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/js/lib/rdge/materials/tunnel-material.js b/js/lib/rdge/materials/tunnel-material.js index fe0fbd51..aa93d5ba 100644 --- a/js/lib/rdge/materials/tunnel-material.js +++ b/js/lib/rdge/materials/tunnel-material.js | |||
@@ -6,6 +6,7 @@ | |||
6 | 6 | ||
7 | 7 | ||
8 | var PulseMaterial = require("js/lib/rdge/materials/pulse-material").PulseMaterial; | 8 | var PulseMaterial = require("js/lib/rdge/materials/pulse-material").PulseMaterial; |
9 | var Texture = require("js/lib/rdge/texture").Texture; | ||
9 | 10 | ||
10 | var TunnelMaterial = function TunnelMaterial() { | 11 | var TunnelMaterial = function TunnelMaterial() { |
11 | /////////////////////////////////////////////////////////////////////// | 12 | /////////////////////////////////////////////////////////////////////// |
@@ -64,6 +65,10 @@ var TunnelMaterial = function TunnelMaterial() { | |||
64 | this._shader['default'].u_time.set( [this._time] ); | 65 | this._shader['default'].u_time.set( [this._time] ); |
65 | } | 66 | } |
66 | 67 | ||
68 | // set up the texture | ||
69 | var texMapName = this._propValues[this._propNames[0]]; | ||
70 | this._glTex = new Texture( world, texMapName ); | ||
71 | |||
67 | // set the shader values in the shader | 72 | // set the shader values in the shader |
68 | this.updateTexture(); | 73 | this.updateTexture(); |
69 | this.setResolution( [world.getViewportWidth(),world.getViewportHeight()] ); | 74 | this.setResolution( [world.getViewportWidth(),world.getViewportHeight()] ); |