mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-05 20:32:00 -05:00
Merge remote-tracking branch 'origin/master' into solve-cubic
This commit is contained in:
commit
41c0584f35
1 changed files with 7 additions and 2 deletions
|
@ -1076,7 +1076,12 @@ new function() { // Scope for methods that require numerical integration
|
|||
tMin, tMax, uMin, uMax, oldTDiff, reverse, recursion) {
|
||||
/*#*/ if (__options.fatlineClipping) {
|
||||
// Avoid deeper recursion.
|
||||
if (recursion > 20)
|
||||
// NOTE: @iconexperience determined that more than 20 recursions are
|
||||
// needed sometimes, depending on the tDiff threshold values further
|
||||
// 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)
|
||||
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],
|
||||
|
@ -1127,7 +1132,7 @@ new function() { // Scope for methods that require numerical integration
|
|||
tMaxNew = tMax * tMaxClip + tMin * (1 - tMaxClip);
|
||||
}
|
||||
// Check if we need to subdivide the curves
|
||||
if (oldTDiff > 0.8 && tDiff > 0.8) {
|
||||
if (oldTDiff > 0.5 && tDiff > 0.5) {
|
||||
// Subdivide the curve which has converged the least.
|
||||
if (tMaxNew - tMinNew > uMax - uMin) {
|
||||
var parts = Curve.subdivide(v1, 0.5),
|
||||
|
|
Loading…
Reference in a new issue