diff --git a/src/geometries/PolyhedronGeometry.js b/src/geometries/PolyhedronGeometry.js index 03b6a8b8a0bb3b45a6a9066b6f4f830f29cdc2aa..d294654c08617a0711189e4ced2c5ebeff20e84c 100644 --- a/src/geometries/PolyhedronGeometry.js +++ b/src/geometries/PolyhedronGeometry.js @@ -74,7 +74,16 @@ function PolyhedronBufferGeometry( vertices, indices, radius, detail ) { this.addAttribute( 'position', new Float32BufferAttribute( vertexBuffer, 3 ) ); this.addAttribute( 'normal', new Float32BufferAttribute( vertexBuffer.slice(), 3 ) ); this.addAttribute( 'uv', new Float32BufferAttribute( uvBuffer, 2 ) ); - this.normalizeNormals(); + + if ( detail === 0 ) { + + BufferGeometry.prototype.computeVertexNormals.call( this ); // flat normals + + } else { + + this.normalizeNormals(); // smooth normals + + } // helper functions