mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-03-15 17:29:52 -04:00
parent
17d000266f
commit
d89995a781
1 changed files with 5 additions and 2 deletions
|
@ -401,14 +401,17 @@ PathItem.inject(new function() {
|
||||||
// the ray. This essentially is not a crossing.
|
// the ray. This essentially is not a crossing.
|
||||||
if (Numerical.isZero(slope)
|
if (Numerical.isZero(slope)
|
||||||
&& !Curve.isStraight(values)
|
&& !Curve.isStraight(values)
|
||||||
|
// NOTE: We include 0 in the checks, since
|
||||||
|
// even following a horizontal tangent is a
|
||||||
|
// tip that is only touched, not crossed.
|
||||||
// Does the slope over the beginning change?
|
// Does the slope over the beginning change?
|
||||||
|| t < tMin && prevCurve
|
|| t < tMin && prevCurve
|
||||||
&& slope * Curve.getTangent(
|
&& slope * Curve.getTangent(
|
||||||
prevCurve.values, 1).y < 0
|
prevCurve.values, 1).y <= 0
|
||||||
// Does the slope over the end change?
|
// Does the slope over the end change?
|
||||||
|| t > tMax && nextCurve
|
|| t > tMax && nextCurve
|
||||||
&& slope * Curve.getTangent(
|
&& slope * Curve.getTangent(
|
||||||
nextCurve.values, 0).y < 0) {
|
nextCurve.values, 0).y <= 0) {
|
||||||
if (x > xBefore && x < xAfter) {
|
if (x > xBefore && x < xAfter) {
|
||||||
++windLeft;
|
++windLeft;
|
||||||
++windRight;
|
++windRight;
|
||||||
|
|
Loading…
Reference in a new issue