aboutsummaryrefslogtreecommitdiff
path: root/js/lib/rdge/materials/pulse-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/pulse-material.js
parent2ab7fbef0df37f0c2bb6a4447f03993b9d50b5d0 (diff)
downloadninja-947bad893335e1023bcbe177ff8db454c27c4bf8.tar.gz
converted materials to new texture structure
Diffstat (limited to 'js/lib/rdge/materials/pulse-material.js')
-rw-r--r--js/lib/rdge/materials/pulse-material.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/js/lib/rdge/materials/pulse-material.js b/js/lib/rdge/materials/pulse-material.js
index b12e9dd5..f7f6c7ae 100644
--- a/js/lib/rdge/materials/pulse-material.js
+++ b/js/lib/rdge/materials/pulse-material.js
@@ -4,8 +4,9 @@
4 (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. 4 (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
5 </copyright> */ 5 </copyright> */
6 6
7var Texture = require("js/lib/rdge/texture").Texture;
8var Material = require("js/lib/rdge/materials/material").Material; 7var Material = require("js/lib/rdge/materials/material").Material;
8var Texture = require("js/lib/rdge/texture").Texture;
9
9/////////////////////////////////////////////////////////////////////// 10///////////////////////////////////////////////////////////////////////
10// Class GLMaterial 11// Class GLMaterial
11// RDGE representation of a material. 12// RDGE representation of a material.
@@ -24,8 +25,8 @@ var PulseMaterial = function PulseMaterial()
24 this._name = "PulseMaterial"; 25 this._name = "PulseMaterial";
25 this._shaderName = "pulse"; 26 this._shaderName = "pulse";
26 27
27 this._texMap = 'assets/images/cubelight.png'; 28 //this._texMap = 'assets/images/cubelight.png';
28 //this._texMap = 'texture'; 29 this._texMap = 'texture';
29 30
30 this._time = 0.0; 31 this._time = 0.0;
31 this._dTime = 0.01; 32 this._dTime = 0.01;
@@ -117,6 +118,7 @@ var PulseMaterial = function PulseMaterial()
117 this._shader['default'].u_time.set( [this._time] ); 118 this._shader['default'].u_time.set( [this._time] );
118 } 119 }
119 120
121 // set up the texture
120 var texMapName = this._propValues[this._propNames[0]]; 122 var texMapName = this._propValues[this._propNames[0]];
121 this._glTex = new Texture( world, texMapName ); 123 this._glTex = new Texture( world, texMapName );
122 124