diff options
author | Jose Antonio Marquez | 2012-03-14 15:17:01 -0700 |
---|---|---|
committer | Jose Antonio Marquez | 2012-03-14 15:17:01 -0700 |
commit | e7e18f02870a0cfe06e550acf8ffef6eab945231 (patch) | |
tree | c940a63fd47e60f121c42b1823194522c8c2820f /js/lib/rdge/materials/bump-metal-material.js | |
parent | ef601b13a2529c207eb782942e918212e5a0805e (diff) | |
parent | 089534a80c64226bf7d124ab9147afce386fdb5c (diff) | |
download | ninja-e7e18f02870a0cfe06e550acf8ffef6eab945231.tar.gz |
Merge branch 'refs/heads/Ninja-Internal' into Document
Diffstat (limited to 'js/lib/rdge/materials/bump-metal-material.js')
-rwxr-xr-x | js/lib/rdge/materials/bump-metal-material.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/js/lib/rdge/materials/bump-metal-material.js b/js/lib/rdge/materials/bump-metal-material.js index 67b16371..fa6f5300 100755 --- a/js/lib/rdge/materials/bump-metal-material.js +++ b/js/lib/rdge/materials/bump-metal-material.js | |||
@@ -158,10 +158,14 @@ var BumpMetalMaterial = function BumpMetalMaterial() { | |||
158 | var exportStr = "material: " + this.getShaderName() + "\n"; | 158 | var exportStr = "material: " + this.getShaderName() + "\n"; |
159 | exportStr += "name: " + this.getName() + "\n"; | 159 | exportStr += "name: " + this.getName() + "\n"; |
160 | 160 | ||
161 | var world = this.getWorld(); | ||
162 | if (!world) | ||
163 | throw new Error( "no world in material.export, " + this.getName() ); | ||
164 | |||
161 | exportStr += "lightDiff: " + this.getLightDiff() + "\n"; | 165 | exportStr += "lightDiff: " + this.getLightDiff() + "\n"; |
162 | exportStr += "diffuseTexture: " + this.getDiffuseTexture() + "\n"; | 166 | exportStr += "diffuseTexture: " + this.getDiffuseTexture() + "\n"; |
163 | exportStr += "specularTexture: " + this.getSpecularTexture() + "\n"; | 167 | exportStr += "specularTexture: " + this.getSpecularTexture() + "\n"; |
164 | exportStr += "normalMap: " + this.getNormalTexture() + "\n"; | 168 | exportStr += "normalMap: " + this.getNormalTexture() + "\n"; |
165 | 169 | ||
166 | // every material needs to terminate like this | 170 | // every material needs to terminate like this |
167 | exportStr += "endMaterial\n"; | 171 | exportStr += "endMaterial\n"; |