aboutsummaryrefslogtreecommitdiff
path: root/js/lib/rdge/materials/bump-metal-material.js
diff options
context:
space:
mode:
authorJose Antonio Marquez2012-03-10 16:30:45 -0800
committerJose Antonio Marquez2012-03-10 16:30:45 -0800
commit7d4d8651d059a91d29142d7f07d3122eb64532fa (patch)
tree6f180ddb9f631b49271670771144759c39f3c919 /js/lib/rdge/materials/bump-metal-material.js
parent94ddbc239965cb39431708e78dde5127c64b0060 (diff)
parent615be47750fb86c07acd9354da12a76abe6c24e0 (diff)
downloadninja-7d4d8651d059a91d29142d7f07d3122eb64532fa.tar.gz
Merge branch 'refs/heads/FileIO-Integration' into FileIO-Build-Candidate
Diffstat (limited to 'js/lib/rdge/materials/bump-metal-material.js')
-rwxr-xr-xjs/lib/rdge/materials/bump-metal-material.js6
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";