Ver código fonte

condense uvgen as suggested by @AnthorNet in #1811

zz85 13 anos atrás
pai
commit
d9379fc8a5
1 arquivos alterados com 4 adições e 4 exclusões
  1. 4 4
      src/extras/geometries/ExtrudeGeometry.js

+ 4 - 4
src/extras/geometries/ExtrudeGeometry.js

@@ -88,7 +88,9 @@ THREE.ExtrudeGeometry.prototype.addShape = function( shape, options ) {
 
 
 	var material = options.material;
 	var material = options.material;
 	var extrudeMaterial = options.extrudeMaterial;
 	var extrudeMaterial = options.extrudeMaterial;
-	var uvGenerator = options.uvGenerator || null;
+
+	// Use default WorldUVGenerator if no UV generators are specified.
+	var uvgen = options.UVGenerator !== undefined ? options.UVGenerator : THREE.ExtrudeGeometry.WorldUVGenerator;
 
 
 	var shapebb = this.shapebb;
 	var shapebb = this.shapebb;
 	//shapebb = shape.getBoundingBox();
 	//shapebb = shape.getBoundingBox();
@@ -525,9 +527,7 @@ THREE.ExtrudeGeometry.prototype.addShape = function( shape, options ) {
 
 
 	}
 	}
 
 
-	// choose UV generator
-	var uvgen = uvGenerator /* specified */ ||
-	            THREE.ExtrudeGeometry.WorldUVGenerator; /* default */
+
 
 
 	////
 	////
 	///   Handle Faces
 	///   Handle Faces