From 0a114b75efb90b08f7242fb9098c4b3f2f4d4020 Mon Sep 17 00:00:00 2001 From: flagstone78 Date: Tue, 26 Jul 2016 09:27:26 -0500 Subject: [PATCH] Update ExtrudeGeometry.js Changed the bevel so that it is elliptical instead of sinusoidal. Formatted both areas the same with the linear option in the comments. --- src/extras/geometries/ExtrudeGeometry.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/extras/geometries/ExtrudeGeometry.js b/src/extras/geometries/ExtrudeGeometry.js index 6b415103f9017..6c75976f31e24 100644 --- a/src/extras/geometries/ExtrudeGeometry.js +++ b/src/extras/geometries/ExtrudeGeometry.js @@ -361,10 +361,10 @@ ExtrudeGeometry.prototype.addShape = function ( shape, options ) { //for ( b = bevelSegments; b > 0; b -- ) { t = b / bevelSegments; - z = bevelThickness * ( 1 - t ); + z = bevelThickness * Math.cos ( t * Math.PI / 2 ); // curved + //z = bevelThickness * ( 1 - t ); //linear - //z = bevelThickness * t; - bs = bevelSize * ( Math.sin ( t * Math.PI / 2 ) ); // curved + bs = bevelSize * Math.sin ( t * Math.PI / 2 ); // curved //bs = bevelSize * t; // linear // contract shape @@ -462,9 +462,11 @@ ExtrudeGeometry.prototype.addShape = function ( shape, options ) { for ( b = bevelSegments - 1; b >= 0; b -- ) { t = b / bevelSegments; - z = bevelThickness * ( 1 - t ); - //bs = bevelSize * ( 1-Math.sin ( ( 1 - t ) * Math.PI/2 ) ); + z = bevelThickness * Math.cos ( t * Math.PI / 2 ); // curved + //z = bevelThickness * ( 1 - t ); //linear + bs = bevelSize * Math.sin ( t * Math.PI / 2 ); + //bs = bevelSize * t; // linear // contract shape