@@ -84,6 +84,9 @@ THREE.ExtrudeGeometry.prototype.addShape = function ( shape, options ) {
84
84
var extrudePath = options . extrudePath ;
85
85
var extrudePts , extrudeByPath = false ;
86
86
87
+ var material = options . material ;
88
+ var extrudeMaterial = options . extrudeMaterial ;
89
+
87
90
// Use default WorldUVGenerator if no UV generators are specified.
88
91
var uvgen = options . UVGenerator !== undefined ? options . UVGenerator : THREE . ExtrudeGeometry . WorldUVGenerator ;
89
92
@@ -628,7 +631,7 @@ THREE.ExtrudeGeometry.prototype.addShape = function ( shape, options ) {
628
631
b += shapesOffset ;
629
632
c += shapesOffset ;
630
633
631
- scope . faces . push ( new THREE . Face3 ( a , b , c ) ) ;
634
+ scope . faces . push ( new THREE . Face3 ( a , b , c , null , null , material ) ) ;
632
635
633
636
var uvs = uvgen . generateTopUV ( scope , a , b , c ) ;
634
637
@@ -643,8 +646,8 @@ THREE.ExtrudeGeometry.prototype.addShape = function ( shape, options ) {
643
646
c += shapesOffset ;
644
647
d += shapesOffset ;
645
648
646
- scope . faces . push ( new THREE . Face3 ( a , b , d ) ) ;
647
- scope . faces . push ( new THREE . Face3 ( b , c , d ) ) ;
649
+ scope . faces . push ( new THREE . Face3 ( a , b , d , null , null , extrudeMaterial ) ) ;
650
+ scope . faces . push ( new THREE . Face3 ( b , c , d , null , null , extrudeMaterial ) ) ;
648
651
649
652
var uvs = uvgen . generateSideWallUV ( scope , a , b , c , d ) ;
650
653
0 commit comments