aboutsummaryrefslogtreecommitdiff
path: root/js/lib/rdge/materials/pulse-material.js
diff options
context:
space:
mode:
authorJose Antonio Marquez2012-03-14 15:17:01 -0700
committerJose Antonio Marquez2012-03-14 15:17:01 -0700
commite7e18f02870a0cfe06e550acf8ffef6eab945231 (patch)
treec940a63fd47e60f121c42b1823194522c8c2820f /js/lib/rdge/materials/pulse-material.js
parentef601b13a2529c207eb782942e918212e5a0805e (diff)
parent089534a80c64226bf7d124ab9147afce386fdb5c (diff)
downloadninja-e7e18f02870a0cfe06e550acf8ffef6eab945231.tar.gz
Merge branch 'refs/heads/Ninja-Internal' into Document
Diffstat (limited to 'js/lib/rdge/materials/pulse-material.js')
-rw-r--r--js/lib/rdge/materials/pulse-material.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/js/lib/rdge/materials/pulse-material.js b/js/lib/rdge/materials/pulse-material.js
index 1e3137eb..81db36c6 100644
--- a/js/lib/rdge/materials/pulse-material.js
+++ b/js/lib/rdge/materials/pulse-material.js
@@ -179,8 +179,12 @@ var PulseMaterial = function PulseMaterial() {
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 181
182 var texMapName = this._propValues[this._propNames[0]]; 182 var world = this.getWorld();
183 exportStr += "texture: " + texMapName + "\n"; 183 if (!world)
184 throw new Error( "no world in material.export, " + this.getName() );
185
186 var texMapName = this._propValues[this._propNames[0]];
187 exportStr += "texture: " +texMapName + "\n";
184 188
185 // every material needs to terminate like this 189 // every material needs to terminate like this
186 exportStr += "endMaterial\n"; 190 exportStr += "endMaterial\n";