فهرست منبع

GLTFExporter: Fixed supported material check.

Mr.doob 4 سال پیش
والد
کامیت
1435180dcf
2فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 1 1
      examples/js/exporters/GLTFExporter.js
  2. 1 1
      examples/jsm/exporters/GLTFExporter.js

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

@@ -1105,7 +1105,7 @@ THREE.GLTFExporter = ( function () {
 			// @QUESTION Should we avoid including any attribute that has the default value?
 			var materialDef = {	pbrMetallicRoughness: {} };
 
-			if ( ! material.isMeshStandardMaterial || ! material.isMeshBasicMaterial ) {
+			if ( material.isMeshStandardMaterial !== true && material.isMeshBasicMaterial !== true ) {
 
 				console.warn( 'GLTFExporter: Use MeshStandardMaterial or MeshBasicMaterial for best results.' );
 

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

@@ -1128,7 +1128,7 @@ var GLTFExporter = ( function () {
 			// @QUESTION Should we avoid including any attribute that has the default value?
 			var materialDef = {	pbrMetallicRoughness: {} };
 
-			if ( ! material.isMeshStandardMaterial || ! material.isMeshBasicMaterial ) {
+			if ( material.isMeshStandardMaterial !== true && material.isMeshBasicMaterial !== true ) {
 
 				console.warn( 'GLTFExporter: Use MeshStandardMaterial or MeshBasicMaterial for best results.' );