aboutsummaryrefslogtreecommitdiff
path: root/js/lib/rdge/materials/twist-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/twist-material.js
parent2ab7fbef0df37f0c2bb6a4447f03993b9d50b5d0 (diff)
downloadninja-947bad893335e1023bcbe177ff8db454c27c4bf8.tar.gz
converted materials to new texture structure
Diffstat (limited to 'js/lib/rdge/materials/twist-material.js')
-rw-r--r--js/lib/rdge/materials/twist-material.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/js/lib/rdge/materials/twist-material.js b/js/lib/rdge/materials/twist-material.js
index 163c8a77..d0a2d8c4 100644
--- a/js/lib/rdge/materials/twist-material.js
+++ b/js/lib/rdge/materials/twist-material.js
@@ -6,6 +6,7 @@
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
10/////////////////////////////////////////////////////////////////////// 11///////////////////////////////////////////////////////////////////////
11var TwistMaterial = function TwistMaterial() { 12var TwistMaterial = function TwistMaterial() {
@@ -64,6 +65,10 @@ var TwistMaterial = function TwistMaterial() {
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()] );