Browse Source

Merge branch 'dev' of https://github.com/mrdoob/three.js into dev

Mr.doob 11 years ago
parent
commit
5af0b9c53b
1 changed files with 10 additions and 5 deletions
  1. 10 5
      utils/exporters/max/ThreeJSExporter.ms

+ 10 - 5
utils/exporters/max/ThreeJSExporter.ms

@@ -484,11 +484,11 @@ rollout ThreeJSExporter "ThreeJSExporter"
 				DumpColor mat.ambient  "colorAmbient"
 				DumpColor mat.specular "colorSpecular"
 
-				t = mat.opacity / 100
-				s = mat.glossiness
+				transparency = mat.opacity / 100
 
-				Format "\"transparency\"  : %,\n" t to:ostream
-				Format "\"specularCoef\"  : %,\n" s to:ostream
+				Format "\"transparency\"  : %,\n" transparency to:ostream
+				Format "\"specularCoef\"  : %,\n" mat.specularLevel to:ostream
+				Format "\"shininess\"  : %,\n" mat.glossiness to:ostream
 
 				-- maps
 
@@ -497,6 +497,11 @@ rollout ThreeJSExporter "ThreeJSExporter"
 				DumpMap mat.specularMap "mapSpecular"
 				DumpMap mat.bumpMap 	"mapBump"
 				DumpMap mat.opacityMap 	"mapAlpha"
+				
+				if mat.shaderByName == "Phong" then
+				(
+					Format "\"shading\" : \"phong\",\n" to:ostream
+				)
 
 			)
 			else
@@ -1071,4 +1076,4 @@ rollout ThreeJSExporter "ThreeJSExporter"
 	)
 
 )
-createDialog ThreeJSExporter width:300
+createDialog ThreeJSExporter width:300