aboutsummaryrefslogtreecommitdiff
path: root/js/lib/rdge/materials/pulse-material.js
diff options
context:
space:
mode:
authorJose Antonio Marquez Russo2012-03-08 10:49:06 -0800
committerJose Antonio Marquez Russo2012-03-08 10:49:06 -0800
commit85f21e020ac281e8e545df1cf269034de99a00b1 (patch)
tree441834fa8b02b1cc2a970210020d27e06d2c99be /js/lib/rdge/materials/pulse-material.js
parentd9813946dc28d8c28033a68b68300b9d9eda115c (diff)
parent11a6f18e274d7232cdbb8f6e9e65e0a5ab756451 (diff)
downloadninja-85f21e020ac281e8e545df1cf269034de99a00b1.tar.gz
Merge pull request #29 from ericmueller/integration
Integration
Diffstat (limited to 'js/lib/rdge/materials/pulse-material.js')
-rw-r--r--js/lib/rdge/materials/pulse-material.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/js/lib/rdge/materials/pulse-material.js b/js/lib/rdge/materials/pulse-material.js
index 63cab2f4..1e3137eb 100644
--- a/js/lib/rdge/materials/pulse-material.js
+++ b/js/lib/rdge/materials/pulse-material.js
@@ -101,7 +101,7 @@ var PulseMaterial = function PulseMaterial() {
101 this._shader.init(); 101 this._shader.init();
102 102
103 // set up the material node 103 // set up the material node
104 this._materialNode = createMaterialNode("pulseMaterial"); 104 this._materialNode = createMaterialNode("pulseMaterial" + "_" + world.generateUniqueNodeID());
105 this._materialNode.setShader(this._shader); 105 this._materialNode.setShader(this._shader);
106 106
107 this._time = 0; 107 this._time = 0;
@@ -178,6 +178,9 @@ var PulseMaterial = function PulseMaterial() {
178 // every material needs the base type and instance name 178 // every material needs the base type and instance name
179 var exportStr = "material: " + this.getShaderName() + "\n"; 179 var exportStr = "material: " + this.getShaderName() + "\n";
180 exportStr += "name: " + this.getName() + "\n"; 180 exportStr += "name: " + this.getName() + "\n";
181
182 var texMapName = this._propValues[this._propNames[0]];
183 exportStr += "texture: " + texMapName + "\n";
181 184
182 // every material needs to terminate like this 185 // every material needs to terminate like this
183 exportStr += "endMaterial\n"; 186 exportStr += "endMaterial\n";
@@ -193,6 +196,8 @@ var PulseMaterial = function PulseMaterial() {
193 196
194 var rtnStr; 197 var rtnStr;
195 try { 198 try {
199 this._propValues[this._propNames[0]] = pu.nextValue( "texture: " );
200
196 var endKey = "endMaterial\n"; 201 var endKey = "endMaterial\n";
197 var index = importStr.indexOf( endKey ); 202 var index = importStr.indexOf( endKey );
198 index += endKey.length; 203 index += endKey.length;