mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
More quality related tweaks in getWinding()
This commit is contained in:
parent
fb4a0b1fe0
commit
7fc029d98b
1 changed files with 3 additions and 5 deletions
|
@ -535,11 +535,8 @@ PathItem.inject(new function() {
|
|||
// quality with every crossing of the ray very close to the
|
||||
// path. This means that if the point is on or near multiple
|
||||
// curves, the quality becomes less than 0.5.
|
||||
if (a > pa - qualityEpsilon && a < pa + qualityEpsilon) {
|
||||
// TODO: Set quality depending on distance
|
||||
// quality *= Math.min(1, (100 * epsilon * Math.abs(a - pa) + 0.5));
|
||||
if (a > pa - qualityEpsilon && a < pa + qualityEpsilon)
|
||||
quality /= 2;
|
||||
}
|
||||
} else {
|
||||
if (winding !== windingPrev) {
|
||||
// Curve is crossed at starting point and winding changes
|
||||
|
@ -561,7 +558,8 @@ PathItem.inject(new function() {
|
|||
}
|
||||
onPath = true;
|
||||
}
|
||||
// TODO:
|
||||
// TODO: Determine how to handle quality when curve is crossed
|
||||
// at starting point. Do we always need to set to 0?
|
||||
quality = 0;
|
||||
}
|
||||
vPrev = v;
|
||||
|
|
Loading…
Reference in a new issue