|
@@ -38,7 +38,7 @@ THREE.PolyhedronGeometry = function ( vertices, indices, radius, detail ) {
|
|
|
var v2 = p[ indices[ i + 1 ] ];
|
|
|
var v3 = p[ indices[ i + 2 ] ];
|
|
|
|
|
|
- faces[ j ] = new THREE.Face3( v1.index, v2.index, v3.index, [ v1.clone(), v2.clone(), v3.clone() ], undefined, j );
|
|
|
+ faces[ j ] = new THREE.Face3( v1.index, v2.index, v3.index, [ v1.clone(), v2.clone(), v3.clone() ] );
|
|
|
|
|
|
}
|
|
|
|
|
@@ -115,9 +115,9 @@ THREE.PolyhedronGeometry = function ( vertices, indices, radius, detail ) {
|
|
|
|
|
|
// Approximate a curved face with recursively sub-divided triangles.
|
|
|
|
|
|
- function make( v1, v2, v3, materialIndex ) {
|
|
|
+ function make( v1, v2, v3 ) {
|
|
|
|
|
|
- var face = new THREE.Face3( v1.index, v2.index, v3.index, [ v1.clone(), v2.clone(), v3.clone() ], undefined, materialIndex );
|
|
|
+ var face = new THREE.Face3( v1.index, v2.index, v3.index, [ v1.clone(), v2.clone(), v3.clone() ] );
|
|
|
that.faces.push( face );
|
|
|
|
|
|
centroid.copy( v1 ).add( v2 ).add( v3 ).divideScalar( 3 );
|
|
@@ -143,8 +143,6 @@ THREE.PolyhedronGeometry = function ( vertices, indices, radius, detail ) {
|
|
|
var c = prepare( that.vertices[ face.c ] );
|
|
|
var v = [];
|
|
|
|
|
|
- var materialIndex = face.materialIndex;
|
|
|
-
|
|
|
// Construct all of the vertices for this subdivision.
|
|
|
|
|
|
for ( var i = 0 ; i <= cols; i ++ ) {
|
|
@@ -184,8 +182,7 @@ THREE.PolyhedronGeometry = function ( vertices, indices, radius, detail ) {
|
|
|
make(
|
|
|
v[ i ][ k + 1 ],
|
|
|
v[ i + 1 ][ k ],
|
|
|
- v[ i ][ k ],
|
|
|
- materialIndex
|
|
|
+ v[ i ][ k ]
|
|
|
);
|
|
|
|
|
|
} else {
|
|
@@ -193,8 +190,7 @@ THREE.PolyhedronGeometry = function ( vertices, indices, radius, detail ) {
|
|
|
make(
|
|
|
v[ i ][ k + 1 ],
|
|
|
v[ i + 1 ][ k + 1 ],
|
|
|
- v[ i + 1 ][ k ],
|
|
|
- materialIndex
|
|
|
+ v[ i + 1 ][ k ]
|
|
|
);
|
|
|
|
|
|
}
|