mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-07 13:22:07 -05:00
Prebuilt module for commit 3177c7ac46
This commit is contained in:
parent
6468e75480
commit
84bcc8cb51
7 changed files with 106 additions and 99 deletions
|
@ -13,6 +13,7 @@
|
|||
- Do not ignore `Group#clipItem.matrix` in `Group#internalBounds` (#1427).
|
||||
- Correctly calculate bounds with nested empty items (#1467).
|
||||
- Fix color change propagation on groups (#1152).
|
||||
- Fix `Path#arcTo()` where `from` and `to` points are equal (#1613).
|
||||
- SVG Export: Fix error when `Item#matrix` is not invertible (#1580).
|
||||
- SVG Export: Include missing viewBox attribute (#1576).
|
||||
- SVG Import: Use correct default values for gradients (#1632, #1661).
|
||||
|
|
64
dist/docs/assets/js/paper.js
vendored
64
dist/docs/assets/js/paper.js
vendored
|
@ -9,7 +9,7 @@
|
|||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Date: Sun Jun 9 23:35:33 2019 +0200
|
||||
* Date: Fri Nov 23 11:04:45 2018 +0100
|
||||
*
|
||||
***
|
||||
*
|
||||
|
@ -9320,7 +9320,7 @@ new function() {
|
|||
} else if (Base.remain(arguments) <= 2) {
|
||||
through = to;
|
||||
to = Point.read(arguments);
|
||||
} else {
|
||||
} else if (!from.equals(to)) {
|
||||
var radius = Size.read(arguments),
|
||||
isZero = Numerical.isZero;
|
||||
if (isZero(radius.width) || isZero(radius.height))
|
||||
|
@ -9387,39 +9387,41 @@ new function() {
|
|||
extent += extent < 0 ? 360 : -360;
|
||||
}
|
||||
}
|
||||
var epsilon = 1e-7,
|
||||
ext = abs(extent),
|
||||
count = ext >= 360 ? 4 : Math.ceil((ext - epsilon) / 90),
|
||||
inc = extent / count,
|
||||
half = inc * Math.PI / 360,
|
||||
z = 4 / 3 * Math.sin(half) / (1 + Math.cos(half)),
|
||||
segments = [];
|
||||
for (var i = 0; i <= count; i++) {
|
||||
var pt = to,
|
||||
out = null;
|
||||
if (i < count) {
|
||||
out = vector.rotate(90).multiply(z);
|
||||
if (matrix) {
|
||||
pt = matrix._transformPoint(vector);
|
||||
out = matrix._transformPoint(vector.add(out))
|
||||
.subtract(pt);
|
||||
if (extent) {
|
||||
var epsilon = 1e-7,
|
||||
ext = abs(extent),
|
||||
count = ext >= 360 ? 4 : Math.ceil((ext - epsilon) / 90),
|
||||
inc = extent / count,
|
||||
half = inc * Math.PI / 360,
|
||||
z = 4 / 3 * Math.sin(half) / (1 + Math.cos(half)),
|
||||
segments = [];
|
||||
for (var i = 0; i <= count; i++) {
|
||||
var pt = to,
|
||||
out = null;
|
||||
if (i < count) {
|
||||
out = vector.rotate(90).multiply(z);
|
||||
if (matrix) {
|
||||
pt = matrix._transformPoint(vector);
|
||||
out = matrix._transformPoint(vector.add(out))
|
||||
.subtract(pt);
|
||||
} else {
|
||||
pt = center.add(vector);
|
||||
}
|
||||
}
|
||||
if (!i) {
|
||||
current.setHandleOut(out);
|
||||
} else {
|
||||
pt = center.add(vector);
|
||||
var _in = vector.rotate(-90).multiply(z);
|
||||
if (matrix) {
|
||||
_in = matrix._transformPoint(vector.add(_in))
|
||||
.subtract(pt);
|
||||
}
|
||||
segments.push(new Segment(pt, _in, out));
|
||||
}
|
||||
vector = vector.rotate(inc);
|
||||
}
|
||||
if (!i) {
|
||||
current.setHandleOut(out);
|
||||
} else {
|
||||
var _in = vector.rotate(-90).multiply(z);
|
||||
if (matrix) {
|
||||
_in = matrix._transformPoint(vector.add(_in))
|
||||
.subtract(pt);
|
||||
}
|
||||
segments.push(new Segment(pt, _in, out));
|
||||
}
|
||||
vector = vector.rotate(inc);
|
||||
this._add(segments);
|
||||
}
|
||||
this._add(segments);
|
||||
},
|
||||
|
||||
lineBy: function() {
|
||||
|
|
64
dist/paper-core.js
vendored
64
dist/paper-core.js
vendored
|
@ -9,7 +9,7 @@
|
|||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Date: Sun Jun 9 23:35:33 2019 +0200
|
||||
* Date: Fri Nov 23 11:04:45 2018 +0100
|
||||
*
|
||||
***
|
||||
*
|
||||
|
@ -9317,7 +9317,7 @@ new function() {
|
|||
} else if (Base.remain(arguments) <= 2) {
|
||||
through = to;
|
||||
to = Point.read(arguments);
|
||||
} else {
|
||||
} else if (!from.equals(to)) {
|
||||
var radius = Size.read(arguments),
|
||||
isZero = Numerical.isZero;
|
||||
if (isZero(radius.width) || isZero(radius.height))
|
||||
|
@ -9384,39 +9384,41 @@ new function() {
|
|||
extent += extent < 0 ? 360 : -360;
|
||||
}
|
||||
}
|
||||
var epsilon = 1e-7,
|
||||
ext = abs(extent),
|
||||
count = ext >= 360 ? 4 : Math.ceil((ext - epsilon) / 90),
|
||||
inc = extent / count,
|
||||
half = inc * Math.PI / 360,
|
||||
z = 4 / 3 * Math.sin(half) / (1 + Math.cos(half)),
|
||||
segments = [];
|
||||
for (var i = 0; i <= count; i++) {
|
||||
var pt = to,
|
||||
out = null;
|
||||
if (i < count) {
|
||||
out = vector.rotate(90).multiply(z);
|
||||
if (matrix) {
|
||||
pt = matrix._transformPoint(vector);
|
||||
out = matrix._transformPoint(vector.add(out))
|
||||
.subtract(pt);
|
||||
if (extent) {
|
||||
var epsilon = 1e-7,
|
||||
ext = abs(extent),
|
||||
count = ext >= 360 ? 4 : Math.ceil((ext - epsilon) / 90),
|
||||
inc = extent / count,
|
||||
half = inc * Math.PI / 360,
|
||||
z = 4 / 3 * Math.sin(half) / (1 + Math.cos(half)),
|
||||
segments = [];
|
||||
for (var i = 0; i <= count; i++) {
|
||||
var pt = to,
|
||||
out = null;
|
||||
if (i < count) {
|
||||
out = vector.rotate(90).multiply(z);
|
||||
if (matrix) {
|
||||
pt = matrix._transformPoint(vector);
|
||||
out = matrix._transformPoint(vector.add(out))
|
||||
.subtract(pt);
|
||||
} else {
|
||||
pt = center.add(vector);
|
||||
}
|
||||
}
|
||||
if (!i) {
|
||||
current.setHandleOut(out);
|
||||
} else {
|
||||
pt = center.add(vector);
|
||||
var _in = vector.rotate(-90).multiply(z);
|
||||
if (matrix) {
|
||||
_in = matrix._transformPoint(vector.add(_in))
|
||||
.subtract(pt);
|
||||
}
|
||||
segments.push(new Segment(pt, _in, out));
|
||||
}
|
||||
vector = vector.rotate(inc);
|
||||
}
|
||||
if (!i) {
|
||||
current.setHandleOut(out);
|
||||
} else {
|
||||
var _in = vector.rotate(-90).multiply(z);
|
||||
if (matrix) {
|
||||
_in = matrix._transformPoint(vector.add(_in))
|
||||
.subtract(pt);
|
||||
}
|
||||
segments.push(new Segment(pt, _in, out));
|
||||
}
|
||||
vector = vector.rotate(inc);
|
||||
this._add(segments);
|
||||
}
|
||||
this._add(segments);
|
||||
},
|
||||
|
||||
lineBy: function() {
|
||||
|
|
4
dist/paper-core.min.js
vendored
4
dist/paper-core.min.js
vendored
File diff suppressed because one or more lines are too long
64
dist/paper-full.js
vendored
64
dist/paper-full.js
vendored
|
@ -9,7 +9,7 @@
|
|||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Date: Sun Jun 9 23:35:33 2019 +0200
|
||||
* Date: Fri Nov 23 11:04:45 2018 +0100
|
||||
*
|
||||
***
|
||||
*
|
||||
|
@ -9320,7 +9320,7 @@ new function() {
|
|||
} else if (Base.remain(arguments) <= 2) {
|
||||
through = to;
|
||||
to = Point.read(arguments);
|
||||
} else {
|
||||
} else if (!from.equals(to)) {
|
||||
var radius = Size.read(arguments),
|
||||
isZero = Numerical.isZero;
|
||||
if (isZero(radius.width) || isZero(radius.height))
|
||||
|
@ -9387,39 +9387,41 @@ new function() {
|
|||
extent += extent < 0 ? 360 : -360;
|
||||
}
|
||||
}
|
||||
var epsilon = 1e-7,
|
||||
ext = abs(extent),
|
||||
count = ext >= 360 ? 4 : Math.ceil((ext - epsilon) / 90),
|
||||
inc = extent / count,
|
||||
half = inc * Math.PI / 360,
|
||||
z = 4 / 3 * Math.sin(half) / (1 + Math.cos(half)),
|
||||
segments = [];
|
||||
for (var i = 0; i <= count; i++) {
|
||||
var pt = to,
|
||||
out = null;
|
||||
if (i < count) {
|
||||
out = vector.rotate(90).multiply(z);
|
||||
if (matrix) {
|
||||
pt = matrix._transformPoint(vector);
|
||||
out = matrix._transformPoint(vector.add(out))
|
||||
.subtract(pt);
|
||||
if (extent) {
|
||||
var epsilon = 1e-7,
|
||||
ext = abs(extent),
|
||||
count = ext >= 360 ? 4 : Math.ceil((ext - epsilon) / 90),
|
||||
inc = extent / count,
|
||||
half = inc * Math.PI / 360,
|
||||
z = 4 / 3 * Math.sin(half) / (1 + Math.cos(half)),
|
||||
segments = [];
|
||||
for (var i = 0; i <= count; i++) {
|
||||
var pt = to,
|
||||
out = null;
|
||||
if (i < count) {
|
||||
out = vector.rotate(90).multiply(z);
|
||||
if (matrix) {
|
||||
pt = matrix._transformPoint(vector);
|
||||
out = matrix._transformPoint(vector.add(out))
|
||||
.subtract(pt);
|
||||
} else {
|
||||
pt = center.add(vector);
|
||||
}
|
||||
}
|
||||
if (!i) {
|
||||
current.setHandleOut(out);
|
||||
} else {
|
||||
pt = center.add(vector);
|
||||
var _in = vector.rotate(-90).multiply(z);
|
||||
if (matrix) {
|
||||
_in = matrix._transformPoint(vector.add(_in))
|
||||
.subtract(pt);
|
||||
}
|
||||
segments.push(new Segment(pt, _in, out));
|
||||
}
|
||||
vector = vector.rotate(inc);
|
||||
}
|
||||
if (!i) {
|
||||
current.setHandleOut(out);
|
||||
} else {
|
||||
var _in = vector.rotate(-90).multiply(z);
|
||||
if (matrix) {
|
||||
_in = matrix._transformPoint(vector.add(_in))
|
||||
.subtract(pt);
|
||||
}
|
||||
segments.push(new Segment(pt, _in, out));
|
||||
}
|
||||
vector = vector.rotate(inc);
|
||||
this._add(segments);
|
||||
}
|
||||
this._add(segments);
|
||||
},
|
||||
|
||||
lineBy: function() {
|
||||
|
|
6
dist/paper-full.min.js
vendored
6
dist/paper-full.min.js
vendored
File diff suppressed because one or more lines are too long
2
dist/paper.d.ts
vendored
2
dist/paper.d.ts
vendored
|
@ -9,7 +9,7 @@
|
|||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Date: Sun Jun 9 23:35:33 2019 +0200
|
||||
* Date: Fri Nov 23 11:04:45 2018 +0100
|
||||
*
|
||||
* This is an auto-generated type definition.
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue