Skip to content

Commit

Permalink
ExtrudeGeometry: Reverted face.material removal. See #7332.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdoob committed Oct 13, 2015
1 parent 9776d27 commit 1c4bb69
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/extras/geometries/ExtrudeGeometry.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ THREE.ExtrudeGeometry.prototype.addShape = function ( shape, options ) {
var extrudePath = options.extrudePath;
var extrudePts, extrudeByPath = false;

var material = options.material;
var extrudeMaterial = options.extrudeMaterial;

// Use default WorldUVGenerator if no UV generators are specified.
var uvgen = options.UVGenerator !== undefined ? options.UVGenerator : THREE.ExtrudeGeometry.WorldUVGenerator;

Expand Down Expand Up @@ -628,7 +631,7 @@ THREE.ExtrudeGeometry.prototype.addShape = function ( shape, options ) {
b += shapesOffset;
c += shapesOffset;

scope.faces.push( new THREE.Face3( a, b, c ) );
scope.faces.push( new THREE.Face3( a, b, c, null, null, material ) );

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

Expand All @@ -643,8 +646,8 @@ THREE.ExtrudeGeometry.prototype.addShape = function ( shape, options ) {
c += shapesOffset;
d += shapesOffset;

scope.faces.push( new THREE.Face3( a, b, d ) );
scope.faces.push( new THREE.Face3( b, c, d ) );
scope.faces.push( new THREE.Face3( a, b, d, null, null, extrudeMaterial ) );
scope.faces.push( new THREE.Face3( b, c, d, null, null, extrudeMaterial ) );

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

Expand Down

0 comments on commit 1c4bb69

Please sign in to comment.