mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-06 04:42:15 -05:00
Prebuilt module for commit 45f5bf84e8
This commit is contained in:
parent
bfe225c080
commit
6bcddd6372
5 changed files with 72 additions and 69 deletions
39
dist/docs/assets/js/paper.js
vendored
39
dist/docs/assets/js/paper.js
vendored
|
@ -9,7 +9,7 @@
|
|||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Date: Sat Feb 11 21:25:42 2017 +0100
|
||||
* Date: Sun Feb 12 12:15:59 2017 +0100
|
||||
*
|
||||
***
|
||||
*
|
||||
|
@ -5867,6 +5867,7 @@ var SegmentPoint = Point.extend({
|
|||
|
||||
var Curve = Base.extend({
|
||||
_class: 'Curve',
|
||||
beans: true,
|
||||
|
||||
initialize: function Curve(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) {
|
||||
var count = arguments.length,
|
||||
|
@ -6049,8 +6050,8 @@ var Curve = Base.extend({
|
|||
for (var i = 0; i < 8; i += 2)
|
||||
points.push(new Point(coords[i], coords[i + 1]));
|
||||
return points;
|
||||
},
|
||||
|
||||
}
|
||||
}, {
|
||||
getLength: function() {
|
||||
if (this._length == null)
|
||||
this._length = Curve.getLength(this.getValues(), 0, 1);
|
||||
|
@ -7126,12 +7127,6 @@ new function() {
|
|||
}
|
||||
|
||||
function getOverlaps(v1, v2) {
|
||||
var abs = Math.abs,
|
||||
timeEpsilon = 1e-8,
|
||||
geomEpsilon = 1e-7,
|
||||
straight1 = Curve.isStraight(v1),
|
||||
straight2 = Curve.isStraight(v2),
|
||||
straightBoth = straight1 && straight2;
|
||||
|
||||
function getSquaredLineLength(v) {
|
||||
var x = v[6] - v[0],
|
||||
|
@ -7139,19 +7134,25 @@ new function() {
|
|||
return x * x + y * y;
|
||||
}
|
||||
|
||||
var flip = getSquaredLineLength(v1) < getSquaredLineLength(v2),
|
||||
var abs = Math.abs,
|
||||
getDistance = Line.getDistance,
|
||||
timeEpsilon = 1e-8,
|
||||
geomEpsilon = 1e-7,
|
||||
straight1 = Curve.isStraight(v1),
|
||||
straight2 = Curve.isStraight(v2),
|
||||
straightBoth = straight1 && straight2,
|
||||
flip = getSquaredLineLength(v1) < getSquaredLineLength(v2),
|
||||
l1 = flip ? v2 : v1,
|
||||
l2 = flip ? v1 : v2,
|
||||
x1 = l1[0], y1 = l1[1],
|
||||
x2 = l1[6], y2 = l1[7],
|
||||
getDistance = Line.getDistance;
|
||||
if (getDistance(x1, y1, x2, y2, l2[0], l2[1]) < geomEpsilon &&
|
||||
getDistance(x1, y1, x2, y2, l2[6], l2[7]) < geomEpsilon) {
|
||||
px = l1[0], py = l1[1],
|
||||
vx = l1[6] - px, vy = l1[7] - py;
|
||||
if (getDistance(px, py, vx, vy, l2[0], l2[1], true) < geomEpsilon &&
|
||||
getDistance(px, py, vx, vy, l2[6], l2[7], true) < geomEpsilon) {
|
||||
if (!straightBoth &&
|
||||
getDistance(x1, y1, x2, y2, l1[2], l1[3]) < geomEpsilon &&
|
||||
getDistance(x1, y1, x2, y2, l1[4], l1[5]) < geomEpsilon &&
|
||||
getDistance(x1, y1, x2, y2, l2[2], l2[3]) < geomEpsilon &&
|
||||
getDistance(x1, y1, x2, y2, l2[4], l2[5]) < geomEpsilon) {
|
||||
getDistance(px, py, vx, vy, l1[2], l1[3], true) < geomEpsilon &&
|
||||
getDistance(px, py, vx, vy, l1[4], l1[5], true) < geomEpsilon &&
|
||||
getDistance(px, py, vx, vy, l2[2], l2[3], true) < geomEpsilon &&
|
||||
getDistance(px, py, vx, vy, l2[4], l2[5], true) < geomEpsilon) {
|
||||
straight1 = straight2 = straightBoth = true;
|
||||
}
|
||||
} else if (straightBoth) {
|
||||
|
|
39
dist/paper-core.js
vendored
39
dist/paper-core.js
vendored
|
@ -9,7 +9,7 @@
|
|||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Date: Sat Feb 11 21:25:42 2017 +0100
|
||||
* Date: Sun Feb 12 12:15:59 2017 +0100
|
||||
*
|
||||
***
|
||||
*
|
||||
|
@ -5867,6 +5867,7 @@ var SegmentPoint = Point.extend({
|
|||
|
||||
var Curve = Base.extend({
|
||||
_class: 'Curve',
|
||||
beans: true,
|
||||
|
||||
initialize: function Curve(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) {
|
||||
var count = arguments.length,
|
||||
|
@ -6049,8 +6050,8 @@ var Curve = Base.extend({
|
|||
for (var i = 0; i < 8; i += 2)
|
||||
points.push(new Point(coords[i], coords[i + 1]));
|
||||
return points;
|
||||
},
|
||||
|
||||
}
|
||||
}, {
|
||||
getLength: function() {
|
||||
if (this._length == null)
|
||||
this._length = Curve.getLength(this.getValues(), 0, 1);
|
||||
|
@ -7126,12 +7127,6 @@ new function() {
|
|||
}
|
||||
|
||||
function getOverlaps(v1, v2) {
|
||||
var abs = Math.abs,
|
||||
timeEpsilon = 1e-8,
|
||||
geomEpsilon = 1e-7,
|
||||
straight1 = Curve.isStraight(v1),
|
||||
straight2 = Curve.isStraight(v2),
|
||||
straightBoth = straight1 && straight2;
|
||||
|
||||
function getSquaredLineLength(v) {
|
||||
var x = v[6] - v[0],
|
||||
|
@ -7139,19 +7134,25 @@ new function() {
|
|||
return x * x + y * y;
|
||||
}
|
||||
|
||||
var flip = getSquaredLineLength(v1) < getSquaredLineLength(v2),
|
||||
var abs = Math.abs,
|
||||
getDistance = Line.getDistance,
|
||||
timeEpsilon = 1e-8,
|
||||
geomEpsilon = 1e-7,
|
||||
straight1 = Curve.isStraight(v1),
|
||||
straight2 = Curve.isStraight(v2),
|
||||
straightBoth = straight1 && straight2,
|
||||
flip = getSquaredLineLength(v1) < getSquaredLineLength(v2),
|
||||
l1 = flip ? v2 : v1,
|
||||
l2 = flip ? v1 : v2,
|
||||
x1 = l1[0], y1 = l1[1],
|
||||
x2 = l1[6], y2 = l1[7],
|
||||
getDistance = Line.getDistance;
|
||||
if (getDistance(x1, y1, x2, y2, l2[0], l2[1]) < geomEpsilon &&
|
||||
getDistance(x1, y1, x2, y2, l2[6], l2[7]) < geomEpsilon) {
|
||||
px = l1[0], py = l1[1],
|
||||
vx = l1[6] - px, vy = l1[7] - py;
|
||||
if (getDistance(px, py, vx, vy, l2[0], l2[1], true) < geomEpsilon &&
|
||||
getDistance(px, py, vx, vy, l2[6], l2[7], true) < geomEpsilon) {
|
||||
if (!straightBoth &&
|
||||
getDistance(x1, y1, x2, y2, l1[2], l1[3]) < geomEpsilon &&
|
||||
getDistance(x1, y1, x2, y2, l1[4], l1[5]) < geomEpsilon &&
|
||||
getDistance(x1, y1, x2, y2, l2[2], l2[3]) < geomEpsilon &&
|
||||
getDistance(x1, y1, x2, y2, l2[4], l2[5]) < geomEpsilon) {
|
||||
getDistance(px, py, vx, vy, l1[2], l1[3], true) < geomEpsilon &&
|
||||
getDistance(px, py, vx, vy, l1[4], l1[5], true) < geomEpsilon &&
|
||||
getDistance(px, py, vx, vy, l2[2], l2[3], true) < geomEpsilon &&
|
||||
getDistance(px, py, vx, vy, l2[4], l2[5], true) < geomEpsilon) {
|
||||
straight1 = straight2 = straightBoth = true;
|
||||
}
|
||||
} else if (straightBoth) {
|
||||
|
|
12
dist/paper-core.min.js
vendored
12
dist/paper-core.min.js
vendored
File diff suppressed because one or more lines are too long
39
dist/paper-full.js
vendored
39
dist/paper-full.js
vendored
|
@ -9,7 +9,7 @@
|
|||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Date: Sat Feb 11 21:25:42 2017 +0100
|
||||
* Date: Sun Feb 12 12:15:59 2017 +0100
|
||||
*
|
||||
***
|
||||
*
|
||||
|
@ -5867,6 +5867,7 @@ var SegmentPoint = Point.extend({
|
|||
|
||||
var Curve = Base.extend({
|
||||
_class: 'Curve',
|
||||
beans: true,
|
||||
|
||||
initialize: function Curve(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) {
|
||||
var count = arguments.length,
|
||||
|
@ -6049,8 +6050,8 @@ var Curve = Base.extend({
|
|||
for (var i = 0; i < 8; i += 2)
|
||||
points.push(new Point(coords[i], coords[i + 1]));
|
||||
return points;
|
||||
},
|
||||
|
||||
}
|
||||
}, {
|
||||
getLength: function() {
|
||||
if (this._length == null)
|
||||
this._length = Curve.getLength(this.getValues(), 0, 1);
|
||||
|
@ -7126,12 +7127,6 @@ new function() {
|
|||
}
|
||||
|
||||
function getOverlaps(v1, v2) {
|
||||
var abs = Math.abs,
|
||||
timeEpsilon = 1e-8,
|
||||
geomEpsilon = 1e-7,
|
||||
straight1 = Curve.isStraight(v1),
|
||||
straight2 = Curve.isStraight(v2),
|
||||
straightBoth = straight1 && straight2;
|
||||
|
||||
function getSquaredLineLength(v) {
|
||||
var x = v[6] - v[0],
|
||||
|
@ -7139,19 +7134,25 @@ new function() {
|
|||
return x * x + y * y;
|
||||
}
|
||||
|
||||
var flip = getSquaredLineLength(v1) < getSquaredLineLength(v2),
|
||||
var abs = Math.abs,
|
||||
getDistance = Line.getDistance,
|
||||
timeEpsilon = 1e-8,
|
||||
geomEpsilon = 1e-7,
|
||||
straight1 = Curve.isStraight(v1),
|
||||
straight2 = Curve.isStraight(v2),
|
||||
straightBoth = straight1 && straight2,
|
||||
flip = getSquaredLineLength(v1) < getSquaredLineLength(v2),
|
||||
l1 = flip ? v2 : v1,
|
||||
l2 = flip ? v1 : v2,
|
||||
x1 = l1[0], y1 = l1[1],
|
||||
x2 = l1[6], y2 = l1[7],
|
||||
getDistance = Line.getDistance;
|
||||
if (getDistance(x1, y1, x2, y2, l2[0], l2[1]) < geomEpsilon &&
|
||||
getDistance(x1, y1, x2, y2, l2[6], l2[7]) < geomEpsilon) {
|
||||
px = l1[0], py = l1[1],
|
||||
vx = l1[6] - px, vy = l1[7] - py;
|
||||
if (getDistance(px, py, vx, vy, l2[0], l2[1], true) < geomEpsilon &&
|
||||
getDistance(px, py, vx, vy, l2[6], l2[7], true) < geomEpsilon) {
|
||||
if (!straightBoth &&
|
||||
getDistance(x1, y1, x2, y2, l1[2], l1[3]) < geomEpsilon &&
|
||||
getDistance(x1, y1, x2, y2, l1[4], l1[5]) < geomEpsilon &&
|
||||
getDistance(x1, y1, x2, y2, l2[2], l2[3]) < geomEpsilon &&
|
||||
getDistance(x1, y1, x2, y2, l2[4], l2[5]) < geomEpsilon) {
|
||||
getDistance(px, py, vx, vy, l1[2], l1[3], true) < geomEpsilon &&
|
||||
getDistance(px, py, vx, vy, l1[4], l1[5], true) < geomEpsilon &&
|
||||
getDistance(px, py, vx, vy, l2[2], l2[3], true) < geomEpsilon &&
|
||||
getDistance(px, py, vx, vy, l2[4], l2[5], true) < geomEpsilon) {
|
||||
straight1 = straight2 = straightBoth = true;
|
||||
}
|
||||
} else if (straightBoth) {
|
||||
|
|
12
dist/paper-full.min.js
vendored
12
dist/paper-full.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue