Browse Source

GLTFExporter: replace forcePowerOfTwoTexture => forcePowerOfTwoTextures

Fernando Serrano 7 years ago
parent
commit
4616af2888

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

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

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

@@ -70,7 +70,7 @@ THREE.GLTFExporter.prototype = {
 			embedImages: true,
 			animations: [],
 			forceIndices: false,
-			forcePowerOfTwoTexture: false
+			forcePowerOfTwoTextures: false
 		};
 
 		options = Object.assign( {}, DEFAULT_OPTIONS, options );
@@ -480,7 +480,7 @@ THREE.GLTFExporter.prototype = {
 				canvas.width = map.image.width;
 				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 );
 

+ 1 - 1
examples/misc_exporter_gltf.html

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