|
@@ -197,7 +197,9 @@ THREE.ExtrudeGeometry.prototype.addShape = function ( shape, options ) {
|
|
|
|
|
|
|
|
|
function getBevelVec( inPt, inPrev, inNext ) {
|
|
|
+
|
|
|
var EPSILON = 0.0000000001;
|
|
|
+ var sign = THREE.Math.sign;
|
|
|
|
|
|
// computes for inPt the corresponding point inPt' on a new contour
|
|
|
// shiftet by 1 unit (length of normalized vector) to the left
|
|
@@ -256,8 +258,8 @@ THREE.ExtrudeGeometry.prototype.addShape = function ( shape, options ) {
|
|
|
|
|
|
} else { // handle special case of colinear edges
|
|
|
|
|
|
- if ( ( ( v_prev_x != 0 ) && ( Math.sign(v_prev_x) != Math.sign(v_next_x) ) ) ||
|
|
|
- ( ( v_prev_x == 0 ) && ( Math.sign(v_prev_y) != Math.sign(v_next_y) ) ) ) {
|
|
|
+ if ( ( ( v_prev_x != 0 ) && ( sign(v_prev_x) != sign(v_next_x) ) ) ||
|
|
|
+ ( ( v_prev_x == 0 ) && ( sign(v_prev_y) != sign(v_next_y) ) ) ) {
|
|
|
// console.log("Warning: lines are a straight spike");
|
|
|
v_trans_x = v_prev_x;
|
|
|
v_trans_y = v_prev_y;
|