瀏覽代碼

GLTFExporter: Apply alphaCutoff just if alphaMode = MASK

Fernando Serrano 8 年之前
父節點
當前提交
f2db6b75c8
共有 1 個文件被更改,包括 5 次插入1 次删除
  1. 5 1
      examples/js/loaders/GLTFLoader.js

+ 5 - 1
examples/js/loaders/GLTFLoader.js

@@ -1603,7 +1603,11 @@ THREE.GLTFLoader = ( function () {
 
 				materialParams.transparent = true;
 
-				materialParams.alphaTest = material.alphaCutoff || 0.5;
+				if ( alphaMode === ALPHA_MODES.MASK ) {
+
+				  materialParams.alphaTest = material.alphaCutoff || 0.5;
+
+				}
 
 			} else {