瀏覽代碼

Add Extrudematerial and material as options again in extrudeGeometry

gero3 8 年之前
父節點
當前提交
728e219b6e
共有 1 個文件被更改,包括 6 次插入2 次删除
  1. 6 2
      src/geometries/ExtrudeGeometry.js

+ 6 - 2
src/geometries/ExtrudeGeometry.js

@@ -618,7 +618,7 @@ ExtrudeBufferGeometry.prototype.addShape = function ( shape, options ) {
 
 		}
 		
-		scope.addGroup( start, verticesArray.length/3 -start, 0);
+		scope.addGroup( start, verticesArray.length/3 -start, options.material !== undefined ? options.material : 0);
 
 	}
 
@@ -641,7 +641,11 @@ ExtrudeBufferGeometry.prototype.addShape = function ( shape, options ) {
 
 		}
 		
-		scope.addGroup( start, verticesArray.length/3 -start, 1);
+		if (options.extrudeMaterial !== undefined){
+			
+			scope.addGroup( start, verticesArray.length/3 -start, options.extrudeMaterial !== undefined ? options.extrudeMaterial : 1);
+			
+		}
 
 	}