mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-08 05:42: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).
|
- Do not ignore `Group#clipItem.matrix` in `Group#internalBounds` (#1427).
|
||||||
- Correctly calculate bounds with nested empty items (#1467).
|
- Correctly calculate bounds with nested empty items (#1467).
|
||||||
- Fix color change propagation on groups (#1152).
|
- 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: Fix error when `Item#matrix` is not invertible (#1580).
|
||||||
- SVG Export: Include missing viewBox attribute (#1576).
|
- SVG Export: Include missing viewBox attribute (#1576).
|
||||||
- SVG Import: Use correct default values for gradients (#1632, #1661).
|
- 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.
|
* 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) {
|
} else if (Base.remain(arguments) <= 2) {
|
||||||
through = to;
|
through = to;
|
||||||
to = Point.read(arguments);
|
to = Point.read(arguments);
|
||||||
} else {
|
} else if (!from.equals(to)) {
|
||||||
var radius = Size.read(arguments),
|
var radius = Size.read(arguments),
|
||||||
isZero = Numerical.isZero;
|
isZero = Numerical.isZero;
|
||||||
if (isZero(radius.width) || isZero(radius.height))
|
if (isZero(radius.width) || isZero(radius.height))
|
||||||
|
@ -9387,39 +9387,41 @@ new function() {
|
||||||
extent += extent < 0 ? 360 : -360;
|
extent += extent < 0 ? 360 : -360;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var epsilon = 1e-7,
|
if (extent) {
|
||||||
ext = abs(extent),
|
var epsilon = 1e-7,
|
||||||
count = ext >= 360 ? 4 : Math.ceil((ext - epsilon) / 90),
|
ext = abs(extent),
|
||||||
inc = extent / count,
|
count = ext >= 360 ? 4 : Math.ceil((ext - epsilon) / 90),
|
||||||
half = inc * Math.PI / 360,
|
inc = extent / count,
|
||||||
z = 4 / 3 * Math.sin(half) / (1 + Math.cos(half)),
|
half = inc * Math.PI / 360,
|
||||||
segments = [];
|
z = 4 / 3 * Math.sin(half) / (1 + Math.cos(half)),
|
||||||
for (var i = 0; i <= count; i++) {
|
segments = [];
|
||||||
var pt = to,
|
for (var i = 0; i <= count; i++) {
|
||||||
out = null;
|
var pt = to,
|
||||||
if (i < count) {
|
out = null;
|
||||||
out = vector.rotate(90).multiply(z);
|
if (i < count) {
|
||||||
if (matrix) {
|
out = vector.rotate(90).multiply(z);
|
||||||
pt = matrix._transformPoint(vector);
|
if (matrix) {
|
||||||
out = matrix._transformPoint(vector.add(out))
|
pt = matrix._transformPoint(vector);
|
||||||
.subtract(pt);
|
out = matrix._transformPoint(vector.add(out))
|
||||||
|
.subtract(pt);
|
||||||
|
} else {
|
||||||
|
pt = center.add(vector);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!i) {
|
||||||
|
current.setHandleOut(out);
|
||||||
} else {
|
} 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) {
|
this._add(segments);
|
||||||
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);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
lineBy: function() {
|
lineBy: function() {
|
||||||
|
|
64
dist/paper-core.js
vendored
64
dist/paper-core.js
vendored
|
@ -9,7 +9,7 @@
|
||||||
*
|
*
|
||||||
* All rights reserved.
|
* 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) {
|
} else if (Base.remain(arguments) <= 2) {
|
||||||
through = to;
|
through = to;
|
||||||
to = Point.read(arguments);
|
to = Point.read(arguments);
|
||||||
} else {
|
} else if (!from.equals(to)) {
|
||||||
var radius = Size.read(arguments),
|
var radius = Size.read(arguments),
|
||||||
isZero = Numerical.isZero;
|
isZero = Numerical.isZero;
|
||||||
if (isZero(radius.width) || isZero(radius.height))
|
if (isZero(radius.width) || isZero(radius.height))
|
||||||
|
@ -9384,39 +9384,41 @@ new function() {
|
||||||
extent += extent < 0 ? 360 : -360;
|
extent += extent < 0 ? 360 : -360;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var epsilon = 1e-7,
|
if (extent) {
|
||||||
ext = abs(extent),
|
var epsilon = 1e-7,
|
||||||
count = ext >= 360 ? 4 : Math.ceil((ext - epsilon) / 90),
|
ext = abs(extent),
|
||||||
inc = extent / count,
|
count = ext >= 360 ? 4 : Math.ceil((ext - epsilon) / 90),
|
||||||
half = inc * Math.PI / 360,
|
inc = extent / count,
|
||||||
z = 4 / 3 * Math.sin(half) / (1 + Math.cos(half)),
|
half = inc * Math.PI / 360,
|
||||||
segments = [];
|
z = 4 / 3 * Math.sin(half) / (1 + Math.cos(half)),
|
||||||
for (var i = 0; i <= count; i++) {
|
segments = [];
|
||||||
var pt = to,
|
for (var i = 0; i <= count; i++) {
|
||||||
out = null;
|
var pt = to,
|
||||||
if (i < count) {
|
out = null;
|
||||||
out = vector.rotate(90).multiply(z);
|
if (i < count) {
|
||||||
if (matrix) {
|
out = vector.rotate(90).multiply(z);
|
||||||
pt = matrix._transformPoint(vector);
|
if (matrix) {
|
||||||
out = matrix._transformPoint(vector.add(out))
|
pt = matrix._transformPoint(vector);
|
||||||
.subtract(pt);
|
out = matrix._transformPoint(vector.add(out))
|
||||||
|
.subtract(pt);
|
||||||
|
} else {
|
||||||
|
pt = center.add(vector);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!i) {
|
||||||
|
current.setHandleOut(out);
|
||||||
} else {
|
} 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) {
|
this._add(segments);
|
||||||
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);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
lineBy: function() {
|
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.
|
* 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) {
|
} else if (Base.remain(arguments) <= 2) {
|
||||||
through = to;
|
through = to;
|
||||||
to = Point.read(arguments);
|
to = Point.read(arguments);
|
||||||
} else {
|
} else if (!from.equals(to)) {
|
||||||
var radius = Size.read(arguments),
|
var radius = Size.read(arguments),
|
||||||
isZero = Numerical.isZero;
|
isZero = Numerical.isZero;
|
||||||
if (isZero(radius.width) || isZero(radius.height))
|
if (isZero(radius.width) || isZero(radius.height))
|
||||||
|
@ -9387,39 +9387,41 @@ new function() {
|
||||||
extent += extent < 0 ? 360 : -360;
|
extent += extent < 0 ? 360 : -360;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var epsilon = 1e-7,
|
if (extent) {
|
||||||
ext = abs(extent),
|
var epsilon = 1e-7,
|
||||||
count = ext >= 360 ? 4 : Math.ceil((ext - epsilon) / 90),
|
ext = abs(extent),
|
||||||
inc = extent / count,
|
count = ext >= 360 ? 4 : Math.ceil((ext - epsilon) / 90),
|
||||||
half = inc * Math.PI / 360,
|
inc = extent / count,
|
||||||
z = 4 / 3 * Math.sin(half) / (1 + Math.cos(half)),
|
half = inc * Math.PI / 360,
|
||||||
segments = [];
|
z = 4 / 3 * Math.sin(half) / (1 + Math.cos(half)),
|
||||||
for (var i = 0; i <= count; i++) {
|
segments = [];
|
||||||
var pt = to,
|
for (var i = 0; i <= count; i++) {
|
||||||
out = null;
|
var pt = to,
|
||||||
if (i < count) {
|
out = null;
|
||||||
out = vector.rotate(90).multiply(z);
|
if (i < count) {
|
||||||
if (matrix) {
|
out = vector.rotate(90).multiply(z);
|
||||||
pt = matrix._transformPoint(vector);
|
if (matrix) {
|
||||||
out = matrix._transformPoint(vector.add(out))
|
pt = matrix._transformPoint(vector);
|
||||||
.subtract(pt);
|
out = matrix._transformPoint(vector.add(out))
|
||||||
|
.subtract(pt);
|
||||||
|
} else {
|
||||||
|
pt = center.add(vector);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!i) {
|
||||||
|
current.setHandleOut(out);
|
||||||
} else {
|
} 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) {
|
this._add(segments);
|
||||||
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);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
lineBy: function() {
|
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.
|
* 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.
|
* This is an auto-generated type definition.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in a new issue