aboutsummaryrefslogtreecommitdiff
path: root/js/lib/rdge/materials/bump-metal-material.js
diff options
context:
space:
mode:
authorJose Antonio Marquez2012-03-09 10:13:59 -0800
committerJose Antonio Marquez2012-03-09 10:13:59 -0800
commitd549383abf18a0dc54a990983fb4296602b66120 (patch)
treeac107d3823abb846c1afae3d03abce0f6aae2c98 /js/lib/rdge/materials/bump-metal-material.js
parent3bcdfaa322ac53609b66ecedbace1872048fd310 (diff)
parent7b6e8194b91168abdeb94702eb350d14f147858b (diff)
downloadninja-d549383abf18a0dc54a990983fb4296602b66120.tar.gz
Merge branch 'refs/heads/integration' into FileIO-Integration
Conflicts: js/document/html-document.js
Diffstat (limited to 'js/lib/rdge/materials/bump-metal-material.js')
-rwxr-xr-xjs/lib/rdge/materials/bump-metal-material.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/js/lib/rdge/materials/bump-metal-material.js b/js/lib/rdge/materials/bump-metal-material.js
index 67b16371..70873885 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: " + world.cleansePath(this.getDiffuseTexture()) + "\n";
163 exportStr += "specularTexture: " + this.getSpecularTexture() + "\n"; 167 exportStr += "specularTexture: " + world.cleansePath(this.getSpecularTexture()) + "\n";
164 exportStr += "normalMap: " + this.getNormalTexture() + "\n"; 168 exportStr += "normalMap: " + world.cleansePath(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";