浏览代码

GLTFExporter: replace forcePowerOfTwoTexture => forcePowerOfTwoTextures

Fernando Serrano 7 年之前
父节点
当前提交
4616af2888
共有 3 个文件被更改,包括 5 次插入5 次删除
  1. 2 2
      editor/js/Menubar.File.js
  2. 2 2
      examples/js/exporters/GLTFExporter.js
  3. 1 1
      examples/misc_exporter_gltf.html

+ 2 - 2
editor/js/Menubar.File.js

@@ -197,9 +197,9 @@ Menubar.File = function ( editor ) {
 
 
 			saveArrayBuffer( result, 'scene.glb' );
 			saveArrayBuffer( result, 'scene.glb' );
 
 
-			// forceIndices: true, forcePowerOfTwoTexture: true
+			// forceIndices: true, forcePowerOfTwoTextures: true
 			// to allow compatibility with facebook
 			// to allow compatibility with facebook
-		}, { binary: true, forceIndices: true, forcePowerOfTwoTexture: true } );
+		}, { binary: true, forceIndices: true, forcePowerOfTwoTextures: true } );
 		
 		
 	} );
 	} );
 	options.add( option );
 	options.add( option );

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

@@ -70,7 +70,7 @@ THREE.GLTFExporter.prototype = {
 			embedImages: true,
 			embedImages: true,
 			animations: [],
 			animations: [],
 			forceIndices: false,
 			forceIndices: false,
-			forcePowerOfTwoTexture: false
+			forcePowerOfTwoTextures: false
 		};
 		};
 
 
 		options = Object.assign( {}, DEFAULT_OPTIONS, options );
 		options = Object.assign( {}, DEFAULT_OPTIONS, options );
@@ -480,7 +480,7 @@ THREE.GLTFExporter.prototype = {
 				canvas.width = map.image.width;
 				canvas.width = map.image.width;
 				canvas.height = map.image.height;
 				canvas.height = map.image.height;
 
 
-				if ( options.forcePowerOfTwoTexture && ! isPowerOfTwo( map.image ) ) {
+				if ( options.forcePowerOfTwoTextures && ! isPowerOfTwo( map.image ) ) {
 
 
 					console.warn( 'GLTFExporter: Resized non-power-of-two image.', map.image );
 					console.warn( 'GLTFExporter: Resized non-power-of-two image.', map.image );
 
 

+ 1 - 1
examples/misc_exporter_gltf.html

@@ -56,7 +56,7 @@
 					truncateDrawRange: document.getElementById('option_drawrange').checked,
 					truncateDrawRange: document.getElementById('option_drawrange').checked,
 					binary: document.getElementById('option_binary').checked,
 					binary: document.getElementById('option_binary').checked,
 					forceIndices: document.getElementById('option_forceindices').checked,
 					forceIndices: document.getElementById('option_forceindices').checked,
-					forcePowerOfTwoTexture: document.getElementById('option_forcepot').checked
+					forcePowerOfTwoTextures: document.getElementById('option_forcepot').checked
 				};
 				};
 				gltfExporter.parse( input, function( result ) {
 				gltfExporter.parse( input, function( result ) {