Skip to content

Commit f68b64d

Browse files
WestLangleymrdoob
authored andcommitted
Revert support for materialIndex (mrdoob#9112)
1 parent 59a43f7 commit f68b64d

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

src/extras/geometries/PolyhedronGeometry.js

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ THREE.PolyhedronGeometry = function ( vertices, indices, radius, detail ) {
3838
var v2 = p[ indices[ i + 1 ] ];
3939
var v3 = p[ indices[ i + 2 ] ];
4040

41-
faces[ j ] = new THREE.Face3( v1.index, v2.index, v3.index, [ v1.clone(), v2.clone(), v3.clone() ], undefined, j );
41+
faces[ j ] = new THREE.Face3( v1.index, v2.index, v3.index, [ v1.clone(), v2.clone(), v3.clone() ] );
4242

4343
}
4444

@@ -115,9 +115,9 @@ THREE.PolyhedronGeometry = function ( vertices, indices, radius, detail ) {
115115

116116
// Approximate a curved face with recursively sub-divided triangles.
117117

118-
function make( v1, v2, v3, materialIndex ) {
118+
function make( v1, v2, v3 ) {
119119

120-
var face = new THREE.Face3( v1.index, v2.index, v3.index, [ v1.clone(), v2.clone(), v3.clone() ], undefined, materialIndex );
120+
var face = new THREE.Face3( v1.index, v2.index, v3.index, [ v1.clone(), v2.clone(), v3.clone() ] );
121121
that.faces.push( face );
122122

123123
centroid.copy( v1 ).add( v2 ).add( v3 ).divideScalar( 3 );
@@ -143,8 +143,6 @@ THREE.PolyhedronGeometry = function ( vertices, indices, radius, detail ) {
143143
var c = prepare( that.vertices[ face.c ] );
144144
var v = [];
145145

146-
var materialIndex = face.materialIndex;
147-
148146
// Construct all of the vertices for this subdivision.
149147

150148
for ( var i = 0 ; i <= cols; i ++ ) {
@@ -184,17 +182,15 @@ THREE.PolyhedronGeometry = function ( vertices, indices, radius, detail ) {
184182
make(
185183
v[ i ][ k + 1 ],
186184
v[ i + 1 ][ k ],
187-
v[ i ][ k ],
188-
materialIndex
185+
v[ i ][ k ]
189186
);
190187

191188
} else {
192189

193190
make(
194191
v[ i ][ k + 1 ],
195192
v[ i + 1 ][ k + 1 ],
196-
v[ i + 1 ][ k ],
197-
materialIndex
193+
v[ i + 1 ][ k ]
198194
);
199195

200196
}

0 commit comments

Comments
 (0)