Prebuilt module for commit 41aca10112

This commit is contained in:
Paper.js Bot 2016-02-03 12:02:48 +00:00
parent 198d467e2b
commit a5354d6223
5 changed files with 31 additions and 28 deletions

View file

@ -9,7 +9,7 @@
* *
* All rights reserved. * All rights reserved.
* *
* Date: Wed Feb 3 09:47:49 2016 +0100 * Date: Wed Feb 3 12:54:54 2016 +0100
* *
*** ***
* *
@ -9408,6 +9408,7 @@ PathItem.inject(new function() {
py = point.y, py = point.y,
windLeft = 0, windLeft = 0,
windRight = 0, windRight = 0,
isOnCurve = false,
length = curves.length, length = curves.length,
roots = [], roots = [],
abs = Math.abs; abs = Math.abs;
@ -9457,16 +9458,16 @@ PathItem.inject(new function() {
? Curve.getPoint(values, roots[0]).x ? Curve.getPoint(values, roots[0]).x
: null; : null;
if (x != null) { if (x != null) {
var isWindingChange = winding === -prevWinding; var isOnHorizontal =
if (py !== yStart || isWindingChange py === yStart && (px - x) * (px - prevXEnd) < 0;
|| (x - px) * (prevXEnd - px) < 0) { if ((x >= xBefore && x <= xAfter) || isOnHorizontal)
isOnCurve = true;
if (py != yEnd
&& (py != yStart || winding === prevWinding)) {
if (x < xBefore) { if (x < xBefore) {
windLeft += winding; windLeft += winding;
} else if (x > xAfter) { } else if (x > xAfter) {
windRight += winding; windRight += winding;
} else if (py === yStart && isWindingChange) {
++windLeft;
++windRight;
} }
} }
} }
@ -9475,7 +9476,7 @@ PathItem.inject(new function() {
} }
} }
} }
return Math.max(abs(windLeft), abs(windRight)); return Math.max(abs(windLeft), abs(windRight)) | (isOnCurve ? 1 : 0 );
} }
function propagateWinding(segment, path1, path2, monoCurves, operator) { function propagateWinding(segment, path1, path2, monoCurves, operator) {

17
dist/paper-core.js vendored
View file

@ -9,7 +9,7 @@
* *
* All rights reserved. * All rights reserved.
* *
* Date: Wed Feb 3 09:47:49 2016 +0100 * Date: Wed Feb 3 12:54:54 2016 +0100
* *
*** ***
* *
@ -9408,6 +9408,7 @@ PathItem.inject(new function() {
py = point.y, py = point.y,
windLeft = 0, windLeft = 0,
windRight = 0, windRight = 0,
isOnCurve = false,
length = curves.length, length = curves.length,
roots = [], roots = [],
abs = Math.abs; abs = Math.abs;
@ -9457,16 +9458,16 @@ PathItem.inject(new function() {
? Curve.getPoint(values, roots[0]).x ? Curve.getPoint(values, roots[0]).x
: null; : null;
if (x != null) { if (x != null) {
var isWindingChange = winding === -prevWinding; var isOnHorizontal =
if (py !== yStart || isWindingChange py === yStart && (px - x) * (px - prevXEnd) < 0;
|| (x - px) * (prevXEnd - px) < 0) { if ((x >= xBefore && x <= xAfter) || isOnHorizontal)
isOnCurve = true;
if (py != yEnd
&& (py != yStart || winding === prevWinding)) {
if (x < xBefore) { if (x < xBefore) {
windLeft += winding; windLeft += winding;
} else if (x > xAfter) { } else if (x > xAfter) {
windRight += winding; windRight += winding;
} else if (py === yStart && isWindingChange) {
++windLeft;
++windRight;
} }
} }
} }
@ -9475,7 +9476,7 @@ PathItem.inject(new function() {
} }
} }
} }
return Math.max(abs(windLeft), abs(windRight)); return Math.max(abs(windLeft), abs(windRight)) | (isOnCurve ? 1 : 0 );
} }
function propagateWinding(segment, path1, path2, monoCurves, operator) { function propagateWinding(segment, path1, path2, monoCurves, operator) {

File diff suppressed because one or more lines are too long

17
dist/paper-full.js vendored
View file

@ -9,7 +9,7 @@
* *
* All rights reserved. * All rights reserved.
* *
* Date: Wed Feb 3 09:47:49 2016 +0100 * Date: Wed Feb 3 12:54:54 2016 +0100
* *
*** ***
* *
@ -9408,6 +9408,7 @@ PathItem.inject(new function() {
py = point.y, py = point.y,
windLeft = 0, windLeft = 0,
windRight = 0, windRight = 0,
isOnCurve = false,
length = curves.length, length = curves.length,
roots = [], roots = [],
abs = Math.abs; abs = Math.abs;
@ -9457,16 +9458,16 @@ PathItem.inject(new function() {
? Curve.getPoint(values, roots[0]).x ? Curve.getPoint(values, roots[0]).x
: null; : null;
if (x != null) { if (x != null) {
var isWindingChange = winding === -prevWinding; var isOnHorizontal =
if (py !== yStart || isWindingChange py === yStart && (px - x) * (px - prevXEnd) < 0;
|| (x - px) * (prevXEnd - px) < 0) { if ((x >= xBefore && x <= xAfter) || isOnHorizontal)
isOnCurve = true;
if (py != yEnd
&& (py != yStart || winding === prevWinding)) {
if (x < xBefore) { if (x < xBefore) {
windLeft += winding; windLeft += winding;
} else if (x > xAfter) { } else if (x > xAfter) {
windRight += winding; windRight += winding;
} else if (py === yStart && isWindingChange) {
++windLeft;
++windRight;
} }
} }
} }
@ -9475,7 +9476,7 @@ PathItem.inject(new function() {
} }
} }
} }
return Math.max(abs(windLeft), abs(windRight)); return Math.max(abs(windLeft), abs(windRight)) | (isOnCurve ? 1 : 0 );
} }
function propagateWinding(segment, path1, path2, monoCurves, operator) { function propagateWinding(segment, path1, path2, monoCurves, operator) {

File diff suppressed because one or more lines are too long