mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-03-13 16:33:28 -04:00
Reduce maximum recursion again in addCurveIntersections()
32 has lead to many deadlocks.
This commit is contained in:
parent
da43953828
commit
5dac7e9d29
1 changed files with 3 additions and 2 deletions
|
@ -1456,7 +1456,7 @@ new function() { // Scope for intersection using bezier fat-line clipping
|
|||
// below when determining which curve converges the least. He also
|
||||
// recommended a threshold of 0.5 instead of the initial 0.8
|
||||
// See: https://github.com/paperjs/paper.js/issues/565
|
||||
if (++recursion >= 32)
|
||||
if (++recursion >= 24)
|
||||
return;
|
||||
// Let P be the first curve and Q be the second
|
||||
var q0x = v2[0], q0y = v2[1], q3x = v2[6], q3y = v2[7],
|
||||
|
@ -1743,7 +1743,8 @@ new function() { // Scope for intersection using bezier fat-line clipping
|
|||
straight2 = Curve.isStraight(v2),
|
||||
straight = straight1 && straight2,
|
||||
// NOTE: Use smaller Numerical.EPSILON to compare beginnings and
|
||||
// end points to avoid matching them on almost collinear lines.
|
||||
// end points to avoid matching them on almost collinear lines,
|
||||
// see: https://github.com/paperjs/paper.js/issues/777
|
||||
epsilon = /*#=*/Numerical.EPSILON,
|
||||
before = locations.length;
|
||||
// Determine the correct intersection method based on whether one or
|
||||
|
|
Loading…
Reference in a new issue