Procházet zdrojové kódy

GLTFExporter: Avoid writing default alphaCutoff.

Don McCurdy před 7 roky
rodič
revize
727ce2e932
1 změnil soubory, kde provedl 2 přidání a 1 odebrání
  1. 2 1
      examples/js/exporters/GLTFExporter.js

+ 2 - 1
examples/js/exporters/GLTFExporter.js

@@ -600,7 +600,8 @@ THREE.GLTFExporter.prototype = {
 
 				gltfMaterial.alphaMode = material.opacity < 1.0 ? 'BLEND' : 'MASK';
 
-				if ( material.alphaTest > 0.0 ) {
+				// Write alphaCutoff if it's non-zero and different from the default (0.5).
+				if ( material.alphaTest > 0.0 && material.alphaTest !== 0.5 ) {
 
 					gltfMaterial.alphaCutoff = material.alphaTest;