Skip to content

Commit 661ce3a

Browse files
committed
ExtrudeGeometry: Force materialIndex to 0 and 1.
1 parent 7fecc50 commit 661ce3a

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/extras/geometries/ExtrudeGeometry.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,6 @@ THREE.ExtrudeGeometry.prototype.addShape = function ( shape, options ) {
8484
var extrudePath = options.extrudePath;
8585
var extrudePts, extrudeByPath = false;
8686

87-
var material = options.material;
88-
var extrudeMaterial = options.extrudeMaterial;
89-
9087
// Use default WorldUVGenerator if no UV generators are specified.
9188
var uvgen = options.UVGenerator !== undefined ? options.UVGenerator : THREE.ExtrudeGeometry.WorldUVGenerator;
9289

@@ -629,7 +626,7 @@ THREE.ExtrudeGeometry.prototype.addShape = function ( shape, options ) {
629626
b += shapesOffset;
630627
c += shapesOffset;
631628

632-
scope.faces.push( new THREE.Face3( a, b, c, null, null, material ) );
629+
scope.faces.push( new THREE.Face3( a, b, c, null, null, 0 ) );
633630

634631
var uvs = uvgen.generateTopUV( scope, a, b, c );
635632

@@ -644,8 +641,8 @@ THREE.ExtrudeGeometry.prototype.addShape = function ( shape, options ) {
644641
c += shapesOffset;
645642
d += shapesOffset;
646643

647-
scope.faces.push( new THREE.Face3( a, b, d, null, null, extrudeMaterial ) );
648-
scope.faces.push( new THREE.Face3( b, c, d, null, null, extrudeMaterial ) );
644+
scope.faces.push( new THREE.Face3( a, b, d, null, null, 1 ) );
645+
scope.faces.push( new THREE.Face3( b, c, d, null, null, 1 ) );
649646

650647
var uvs = uvgen.generateSideWallUV( scope, a, b, c, d );
651648

0 commit comments

Comments
 (0)