|
@@ -392,13 +392,8 @@ function ExtrudeBufferGeometry( shapes, options ) {
|
|
|
|
|
|
t = b / bevelSegments;
|
|
|
z = bevelThickness * Math.cos( t * Math.PI / 2 );
|
|
|
- bs = Math.abs( bevelSize ) * Math.sin( t * Math.PI / 2 );
|
|
|
-
|
|
|
- if ( bevelSize < 0 ) {
|
|
|
-
|
|
|
- bs += bevelSize;
|
|
|
-
|
|
|
- }
|
|
|
+ var s = Math.sin( t * Math.PI / 2 );
|
|
|
+ bs = ( bevelSize > 0 ) ? bevelSize * s : bevelSize * ( 1 - s );
|
|
|
|
|
|
// contract shape
|
|
|
|
|
@@ -429,7 +424,10 @@ function ExtrudeBufferGeometry( shapes, options ) {
|
|
|
|
|
|
}
|
|
|
|
|
|
- bs = ( bevelSize < 0 ? 0 : bevelSize );
|
|
|
+ // Special case of
|
|
|
+ // bs = ( bevelSize > 0 ) ? bevelSize * s : bevelSize * ( 1 - s );
|
|
|
+ // with s = 1
|
|
|
+ bs = ( bevelSize > 0 ? bevelSize : 0 );
|
|
|
|
|
|
// Back facing vertices
|
|
|
|
|
@@ -496,13 +494,8 @@ function ExtrudeBufferGeometry( shapes, options ) {
|
|
|
|
|
|
t = b / bevelSegments;
|
|
|
z = bevelThickness * Math.cos( t * Math.PI / 2 );
|
|
|
- bs = Math.abs( bevelSize ) * Math.sin( t * Math.PI / 2 );
|
|
|
-
|
|
|
- if ( bevelSize < 0 ) {
|
|
|
-
|
|
|
- bs += bevelSize;
|
|
|
-
|
|
|
- }
|
|
|
+ var s = Math.sin( t * Math.PI / 2 );
|
|
|
+ bs = ( bevelSize > 0 ) ? bevelSize * s : bevelSize * ( 1 - s );
|
|
|
|
|
|
// contract shape
|
|
|
|