paper 0.12.18 → 0.12.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +49 -0
- package/README.md +5 -14
- package/dist/docs/assets/js/paper.js +94 -54
- package/dist/docs/classes/Color.html +2 -2
- package/dist/docs/classes/CompoundPath.html +2 -2
- package/dist/docs/classes/Curve.html +2 -2
- package/dist/docs/classes/CurveLocation.html +2 -2
- package/dist/docs/classes/Event.html +2 -2
- package/dist/docs/classes/Gradient.html +2 -2
- package/dist/docs/classes/GradientStop.html +2 -2
- package/dist/docs/classes/Group.html +2 -2
- package/dist/docs/classes/HitResult.html +2 -2
- package/dist/docs/classes/Item.html +2 -2
- package/dist/docs/classes/Key.html +2 -2
- package/dist/docs/classes/KeyEvent.html +2 -2
- package/dist/docs/classes/Layer.html +2 -2
- package/dist/docs/classes/Matrix.html +2 -2
- package/dist/docs/classes/MouseEvent.html +2 -2
- package/dist/docs/classes/PaperScope.html +2 -2
- package/dist/docs/classes/PaperScript.html +2 -2
- package/dist/docs/classes/Path.html +2 -2
- package/dist/docs/classes/PathItem.html +2 -2
- package/dist/docs/classes/Point.html +2 -2
- package/dist/docs/classes/PointText.html +2 -2
- package/dist/docs/classes/Project.html +2 -2
- package/dist/docs/classes/Raster.html +2 -2
- package/dist/docs/classes/Rectangle.html +2 -2
- package/dist/docs/classes/Segment.html +2 -2
- package/dist/docs/classes/Shape.html +2 -2
- package/dist/docs/classes/Size.html +2 -2
- package/dist/docs/classes/Style.html +2 -2
- package/dist/docs/classes/SymbolDefinition.html +2 -2
- package/dist/docs/classes/SymbolItem.html +2 -2
- package/dist/docs/classes/TextItem.html +2 -2
- package/dist/docs/classes/Tool.html +2 -2
- package/dist/docs/classes/ToolEvent.html +2 -2
- package/dist/docs/classes/Tween.html +2 -2
- package/dist/docs/classes/View.html +2 -2
- package/dist/docs/classes/global.html +2 -2
- package/dist/docs/classes/index.html +2 -2
- package/dist/docs/index.html +1 -1
- package/dist/node/canvas.js +9 -7
- package/dist/node/self.js +9 -1
- package/dist/paper-core.js +93 -53
- package/dist/paper-core.min.js +3 -3
- package/dist/paper-full.js +94 -54
- package/dist/paper-full.min.js +3 -3
- package/dist/paper.d.ts +2 -2
- package/package.json +11 -7
- package/dist/paperjs/LICENSE.txt +0 -23
- package/dist/paperjs/dist/node/canvas.js +0 -66
- package/dist/paperjs/dist/node/extend.js +0 -156
- package/dist/paperjs/dist/node/self.js +0 -58
- package/dist/paperjs/dist/node/xml.js +0 -40
- package/dist/paperjs/dist/paper-core.d.ts +0 -1
- package/dist/paperjs/dist/paper-core.js +0 -15703
- package/dist/paperjs/dist/paper-core.min.js +0 -32
- package/dist/paperjs/dist/paper-full.js +0 -17472
- package/dist/paperjs/dist/paper-full.min.js +0 -32
- package/dist/paperjs/dist/paper.d.ts +0 -7394
- package/dist/paperjs/docs/assets/css/docs.css +0 -414
- package/dist/paperjs/docs/assets/js/codemirror.js +0 -4
- package/dist/paperjs/docs/assets/js/docs.js +0 -493
- package/dist/paperjs/docs/assets/js/jquery.js +0 -6
- package/dist/paperjs/docs/assets/js/paper.js +0 -17472
- package/dist/paperjs/docs/classes/Color.html +0 -2188
- package/dist/paperjs/docs/classes/CompoundPath.html +0 -8877
- package/dist/paperjs/docs/classes/Curve.html +0 -2323
- package/dist/paperjs/docs/classes/CurveLocation.html +0 -672
- package/dist/paperjs/docs/classes/Event.html +0 -176
- package/dist/paperjs/docs/classes/Gradient.html +0 -240
- package/dist/paperjs/docs/classes/GradientStop.html +0 -273
- package/dist/paperjs/docs/classes/Group.html +0 -6864
- package/dist/paperjs/docs/classes/HitResult.html +0 -239
- package/dist/paperjs/docs/classes/Item.html +0 -6628
- package/dist/paperjs/docs/classes/Key.html +0 -139
- package/dist/paperjs/docs/classes/KeyEvent.html +0 -308
- package/dist/paperjs/docs/classes/Layer.html +0 -6850
- package/dist/paperjs/docs/classes/Matrix.html +0 -1744
- package/dist/paperjs/docs/classes/MouseEvent.html +0 -355
- package/dist/paperjs/docs/classes/PaperScope.html +0 -459
- package/dist/paperjs/docs/classes/PaperScript.html +0 -198
- package/dist/paperjs/docs/classes/Path.html +0 -11775
- package/dist/paperjs/docs/classes/PathItem.html +0 -8639
- package/dist/paperjs/docs/classes/Point.html +0 -2699
- package/dist/paperjs/docs/classes/PointText.html +0 -7029
- package/dist/paperjs/docs/classes/Project.html +0 -1305
- package/dist/paperjs/docs/classes/Raster.html +0 -7843
- package/dist/paperjs/docs/classes/Rectangle.html +0 -1654
- package/dist/paperjs/docs/classes/Segment.html +0 -939
- package/dist/paperjs/docs/classes/Shape.html +0 -7363
- package/dist/paperjs/docs/classes/Size.html +0 -1825
- package/dist/paperjs/docs/classes/Style.html +0 -919
- package/dist/paperjs/docs/classes/SymbolDefinition.html +0 -311
- package/dist/paperjs/docs/classes/SymbolItem.html +0 -6755
- package/dist/paperjs/docs/classes/TextItem.html +0 -6869
- package/dist/paperjs/docs/classes/Tool.html +0 -761
- package/dist/paperjs/docs/classes/ToolEvent.html +0 -446
- package/dist/paperjs/docs/classes/Tween.html +0 -374
- package/dist/paperjs/docs/classes/View.html +0 -1772
- package/dist/paperjs/docs/classes/global.html +0 -425
- package/dist/paperjs/docs/classes/index.html +0 -88
- package/dist/paperjs/docs/index.html +0 -11
- package/dist/paperjs/examples/Animated/AnimatedStar.html +0 -53
- package/dist/paperjs/examples/Animated/BooleanOperations.html +0 -115
- package/dist/paperjs/examples/Animated/CandyCrash.html +0 -151
- package/dist/paperjs/examples/Animated/Extruded.html +0 -50
- package/dist/paperjs/examples/Animated/Lines.html +0 -53
- package/dist/paperjs/examples/Animated/Smoothing.html +0 -70
- package/dist/paperjs/examples/Animated/Space.html +0 -86
- package/dist/paperjs/examples/Animated/SpaceUsingShapes.html +0 -79
- package/dist/paperjs/examples/Games/Paperoids.html +0 -569
- package/dist/paperjs/examples/JSON/Circle Testing.html +0 -34
- package/dist/paperjs/examples/JSON/Compound Path.html +0 -25
- package/dist/paperjs/examples/JSON/Empty Path Testing.html +0 -31
- package/dist/paperjs/examples/JSON/Gradients.html +0 -34
- package/dist/paperjs/examples/JSON/Group Transform.html +0 -28
- package/dist/paperjs/examples/JSON/Line Testing.html +0 -44
- package/dist/paperjs/examples/JSON/Random Path Testing.html +0 -42
- package/dist/paperjs/examples/JSON/Raster.html +0 -29
- package/dist/paperjs/examples/JSON/Rect and Attribute Testing.html +0 -56
- package/dist/paperjs/examples/JSON/Rotated Primitives.html +0 -55
- package/dist/paperjs/examples/JSON/Selection.html +0 -43
- package/dist/paperjs/examples/JSON/Shapes.html +0 -54
- package/dist/paperjs/examples/JSON/Symbols.html +0 -30
- package/dist/paperjs/examples/JSON/Text Testing.html +0 -38
- package/dist/paperjs/examples/JSON/Tiger.html +0 -19
- package/dist/paperjs/examples/JSON/Transform Test 1.html +0 -32
- package/dist/paperjs/examples/JSON/Transform Test 2.html +0 -30
- package/dist/paperjs/examples/Node.js/AnimatedStar.js +0 -52
- package/dist/paperjs/examples/Node.js/BooleanOperations.js +0 -36
- package/dist/paperjs/examples/Node.js/JSONtoPDF.js +0 -20
- package/dist/paperjs/examples/Node.js/Raster.js +0 -32
- package/dist/paperjs/examples/Node.js/RasterRemote.js +0 -33
- package/dist/paperjs/examples/Node.js/SvgExport.js +0 -52
- package/dist/paperjs/examples/Node.js/SvgImport.js +0 -23
- package/dist/paperjs/examples/Node.js/Tadpoles.js +0 -16
- package/dist/paperjs/examples/Node.js/Tadpoles.pjs +0 -278
- package/dist/paperjs/examples/Node.js/in.json +0 -1
- package/dist/paperjs/examples/Node.js/in.svg +0 -16
- package/dist/paperjs/examples/Paperjs.org/BooleanOperattions.html +0 -115
- package/dist/paperjs/examples/Paperjs.org/BouncingBalls.html +0 -103
- package/dist/paperjs/examples/Paperjs.org/Chain.html +0 -54
- package/dist/paperjs/examples/Paperjs.org/DivisionRaster.html +0 -72
- package/dist/paperjs/examples/Paperjs.org/FutureSplash.html +0 -122
- package/dist/paperjs/examples/Paperjs.org/HitTesting.html +0 -103
- package/dist/paperjs/examples/Paperjs.org/InteractiveTiger.html +0 -777
- package/dist/paperjs/examples/Paperjs.org/MetaBalls.html +0 -132
- package/dist/paperjs/examples/Paperjs.org/NyanRainbow.html +0 -202
- package/dist/paperjs/examples/Paperjs.org/PathIntersections.html +0 -76
- package/dist/paperjs/examples/Paperjs.org/Qbertify.html +0 -146
- package/dist/paperjs/examples/Paperjs.org/RadialRainbows.html +0 -80
- package/dist/paperjs/examples/Paperjs.org/RoundedRectangles.html +0 -41
- package/dist/paperjs/examples/Paperjs.org/SatieLikedToDraw.html +0 -140
- package/dist/paperjs/examples/Paperjs.org/Simplify.html +0 -63
- package/dist/paperjs/examples/Paperjs.org/SpiralRaster.html +0 -120
- package/dist/paperjs/examples/Paperjs.org/Tadpoles.html +0 -283
- package/dist/paperjs/examples/Paperjs.org/Voronoi.html +0 -134
- package/dist/paperjs/examples/Rasters/PhyllotaxisRaster.html +0 -96
- package/dist/paperjs/examples/Rasters/Raster.html +0 -34
- package/dist/paperjs/examples/Rasters/RotationRaster.html +0 -44
- package/dist/paperjs/examples/Rasters/Smoothing.html +0 -36
- package/dist/paperjs/examples/SVG Export/Circle Testing.html +0 -32
- package/dist/paperjs/examples/SVG Export/Clipping.html +0 -17
- package/dist/paperjs/examples/SVG Export/Compound Path.html +0 -22
- package/dist/paperjs/examples/SVG Export/Empty Path Testing.html +0 -28
- package/dist/paperjs/examples/SVG Export/Gradients.html +0 -52
- package/dist/paperjs/examples/SVG Export/Group Transform.html +0 -25
- package/dist/paperjs/examples/SVG Export/Line Testing.html +0 -41
- package/dist/paperjs/examples/SVG Export/Random Path Testing.html +0 -39
- package/dist/paperjs/examples/SVG Export/Raster.html +0 -21
- package/dist/paperjs/examples/SVG Export/Rect and Attribute Testing.html +0 -53
- package/dist/paperjs/examples/SVG Export/Rotated Primitives.html +0 -80
- package/dist/paperjs/examples/SVG Export/Shapes.html +0 -58
- package/dist/paperjs/examples/SVG Export/Symbols.html +0 -27
- package/dist/paperjs/examples/SVG Export/Text Testing.html +0 -45
- package/dist/paperjs/examples/SVG Export/Tiger.html +0 -23
- package/dist/paperjs/examples/SVG Export/Transform Test 1.html +0 -29
- package/dist/paperjs/examples/SVG Export/Transform Test 2.html +0 -27
- package/dist/paperjs/examples/SVG Import/Arcs.html +0 -78
- package/dist/paperjs/examples/SVG Import/Butterfly.html +0 -223
- package/dist/paperjs/examples/SVG Import/Circle and Ellipse Testing.html +0 -26
- package/dist/paperjs/examples/SVG Import/Clipping.html +0 -100
- package/dist/paperjs/examples/SVG Import/From File.html +0 -30
- package/dist/paperjs/examples/SVG Import/Gradient.html +0 -138
- package/dist/paperjs/examples/SVG Import/Gradients.html +0 -30
- package/dist/paperjs/examples/SVG Import/Inkscape Pivot.html +0 -52
- package/dist/paperjs/examples/SVG Import/Inkscape.html +0 -88
- package/dist/paperjs/examples/SVG Import/Line Testing.html +0 -24
- package/dist/paperjs/examples/SVG Import/MoreGradients.html +0 -107
- package/dist/paperjs/examples/SVG Import/Multiple Paths Test 1.html +0 -42
- package/dist/paperjs/examples/SVG Import/Multiple Paths Test 2.html +0 -33
- package/dist/paperjs/examples/SVG Import/Nested Groups Test.html +0 -78
- package/dist/paperjs/examples/SVG Import/Polybezier.html +0 -43
- package/dist/paperjs/examples/SVG Import/Rect Testing.html +0 -25
- package/dist/paperjs/examples/SVG Import/Symbols.html +0 -24
- package/dist/paperjs/examples/SVG Import/Testing.html +0 -40
- package/dist/paperjs/examples/SVG Import/Text Testing.html +0 -19
- package/dist/paperjs/examples/SVG Import/Tiger.html +0 -742
- package/dist/paperjs/examples/SVG Import/Transform Testing.html +0 -22
- package/dist/paperjs/examples/SVG Import/Viewbox.html +0 -38
- package/dist/paperjs/examples/Scripts/Arcs.html +0 -39
- package/dist/paperjs/examples/Scripts/BlendModes.html +0 -77
- package/dist/paperjs/examples/Scripts/BooleanOperations.html +0 -937
- package/dist/paperjs/examples/Scripts/CompoundPath.html +0 -19
- package/dist/paperjs/examples/Scripts/CurveTimeParameterization.html +0 -61
- package/dist/paperjs/examples/Scripts/HslColor.html +0 -53
- package/dist/paperjs/examples/Scripts/PathStructure.html +0 -82
- package/dist/paperjs/examples/Scripts/PathTangents.html +0 -73
- package/dist/paperjs/examples/Scripts/Resize.html +0 -42
- package/dist/paperjs/examples/Scripts/RoundRectangle.html +0 -28
- package/dist/paperjs/examples/Scripts/Shapes.html +0 -54
- package/dist/paperjs/examples/Scripts/StrokeBounds.html +0 -101
- package/dist/paperjs/examples/Scripts/StrokeScaling.html +0 -65
- package/dist/paperjs/examples/Tools/BezierTool.html +0 -90
- package/dist/paperjs/examples/Tools/Circles.html +0 -28
- package/dist/paperjs/examples/Tools/Clouds.html +0 -35
- package/dist/paperjs/examples/Tools/DrippingBrush.html +0 -73
- package/dist/paperjs/examples/Tools/FancyBrush.html +0 -82
- package/dist/paperjs/examples/Tools/Grid.html +0 -44
- package/dist/paperjs/examples/Tools/MultiLines.html +0 -44
- package/dist/paperjs/examples/Tools/MultipleTools.html +0 -44
- package/dist/paperjs/examples/Tools/PathEditing.html +0 -95
- package/dist/paperjs/examples/Tools/SquareRounded.html +0 -76
- package/dist/paperjs/examples/Tools/Stars.html +0 -38
- package/dist/paperjs/examples/Tools/Vektor.html +0 -200
- package/dist/paperjs/examples/Tools/Wave.html +0 -50
- package/dist/paperjs/examples/Tools/WormFarm.html +0 -88
- package/dist/paperjs/examples/Worker/Main.html +0 -53
- package/dist/paperjs/examples/Worker/Worker.js +0 -14
- package/dist/paperjs/examples/css/style.css +0 -12
|
@@ -1297,8 +1297,8 @@ for (var i = 0; i < items.length; i++) {
|
|
|
1297
1297
|
|
|
1298
1298
|
<!-- =========================== copyright notice ========================== -->
|
|
1299
1299
|
<p class="footer">
|
|
1300
|
-
Paper.js v0.12.
|
|
1301
|
-
Copyright © 2011—
|
|
1300
|
+
Paper.js v0.12.20<br>
|
|
1301
|
+
Copyright © 2011—2026 <a href="http://www.lehni.org" target="_blank">Jürg Lehni</a> & <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
|
|
1302
1302
|
<div class="content-end"></div>
|
|
1303
1303
|
|
|
1304
1304
|
|
|
@@ -7833,8 +7833,8 @@ path.tweenFrom({ fillColor: 'red' }, { duration: 1000 });
|
|
|
7833
7833
|
|
|
7834
7834
|
<!-- =========================== copyright notice ========================== -->
|
|
7835
7835
|
<p class="footer">
|
|
7836
|
-
Paper.js v0.12.
|
|
7837
|
-
Copyright © 2011—
|
|
7836
|
+
Paper.js v0.12.20<br>
|
|
7837
|
+
Copyright © 2011—2026 <a href="http://www.lehni.org" target="_blank">Jürg Lehni</a> & <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
|
|
7838
7838
|
<div class="content-end"></div>
|
|
7839
7839
|
|
|
7840
7840
|
|
|
@@ -1645,8 +1645,8 @@ intersectionPath.fillColor = 'red';
|
|
|
1645
1645
|
|
|
1646
1646
|
<!-- =========================== copyright notice ========================== -->
|
|
1647
1647
|
<p class="footer">
|
|
1648
|
-
Paper.js v0.12.
|
|
1649
|
-
Copyright © 2011—
|
|
1648
|
+
Paper.js v0.12.20<br>
|
|
1649
|
+
Copyright © 2011—2026 <a href="http://www.lehni.org" target="_blank">Jürg Lehni</a> & <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
|
|
1650
1650
|
<div class="content-end"></div>
|
|
1651
1651
|
|
|
1652
1652
|
|
|
@@ -930,8 +930,8 @@ path.segments[2].selected = true;
|
|
|
930
930
|
|
|
931
931
|
<!-- =========================== copyright notice ========================== -->
|
|
932
932
|
<p class="footer">
|
|
933
|
-
Paper.js v0.12.
|
|
934
|
-
Copyright © 2011—
|
|
933
|
+
Paper.js v0.12.20<br>
|
|
934
|
+
Copyright © 2011—2026 <a href="http://www.lehni.org" target="_blank">Jürg Lehni</a> & <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
|
|
935
935
|
<div class="content-end"></div>
|
|
936
936
|
|
|
937
937
|
|
|
@@ -7353,8 +7353,8 @@ path.tweenFrom({ fillColor: 'red' }, { duration: 1000 });
|
|
|
7353
7353
|
|
|
7354
7354
|
<!-- =========================== copyright notice ========================== -->
|
|
7355
7355
|
<p class="footer">
|
|
7356
|
-
Paper.js v0.12.
|
|
7357
|
-
Copyright © 2011—
|
|
7356
|
+
Paper.js v0.12.20<br>
|
|
7357
|
+
Copyright © 2011—2026 <a href="http://www.lehni.org" target="_blank">Jürg Lehni</a> & <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
|
|
7358
7358
|
<div class="content-end"></div>
|
|
7359
7359
|
|
|
7360
7360
|
|
|
@@ -1816,8 +1816,8 @@ var size = maxSize * randomSize;</code></pre>
|
|
|
1816
1816
|
|
|
1817
1817
|
<!-- =========================== copyright notice ========================== -->
|
|
1818
1818
|
<p class="footer">
|
|
1819
|
-
Paper.js v0.12.
|
|
1820
|
-
Copyright © 2011—
|
|
1819
|
+
Paper.js v0.12.20<br>
|
|
1820
|
+
Copyright © 2011—2026 <a href="http://www.lehni.org" target="_blank">Jürg Lehni</a> & <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
|
|
1821
1821
|
<div class="content-end"></div>
|
|
1822
1822
|
|
|
1823
1823
|
|
|
@@ -910,8 +910,8 @@ var circle = new Path.Circle({
|
|
|
910
910
|
|
|
911
911
|
<!-- =========================== copyright notice ========================== -->
|
|
912
912
|
<p class="footer">
|
|
913
|
-
Paper.js v0.12.
|
|
914
|
-
Copyright © 2011—
|
|
913
|
+
Paper.js v0.12.20<br>
|
|
914
|
+
Copyright © 2011—2026 <a href="http://www.lehni.org" target="_blank">Jürg Lehni</a> & <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
|
|
915
915
|
<div class="content-end"></div>
|
|
916
916
|
|
|
917
917
|
|
|
@@ -302,8 +302,8 @@ for (var i = 0; i < 100; i++) {
|
|
|
302
302
|
|
|
303
303
|
<!-- =========================== copyright notice ========================== -->
|
|
304
304
|
<p class="footer">
|
|
305
|
-
Paper.js v0.12.
|
|
306
|
-
Copyright © 2011—
|
|
305
|
+
Paper.js v0.12.20<br>
|
|
306
|
+
Copyright © 2011—2026 <a href="http://www.lehni.org" target="_blank">Jürg Lehni</a> & <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
|
|
307
307
|
<div class="content-end"></div>
|
|
308
308
|
|
|
309
309
|
|
|
@@ -6745,8 +6745,8 @@ path.tweenFrom({ fillColor: 'red' }, { duration: 1000 });
|
|
|
6745
6745
|
|
|
6746
6746
|
<!-- =========================== copyright notice ========================== -->
|
|
6747
6747
|
<p class="footer">
|
|
6748
|
-
Paper.js v0.12.
|
|
6749
|
-
Copyright © 2011—
|
|
6748
|
+
Paper.js v0.12.20<br>
|
|
6749
|
+
Copyright © 2011—2026 <a href="http://www.lehni.org" target="_blank">Jürg Lehni</a> & <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
|
|
6750
6750
|
<div class="content-end"></div>
|
|
6751
6751
|
|
|
6752
6752
|
|
|
@@ -6859,8 +6859,8 @@ path.tweenFrom({ fillColor: 'red' }, { duration: 1000 });
|
|
|
6859
6859
|
|
|
6860
6860
|
<!-- =========================== copyright notice ========================== -->
|
|
6861
6861
|
<p class="footer">
|
|
6862
|
-
Paper.js v0.12.
|
|
6863
|
-
Copyright © 2011—
|
|
6862
|
+
Paper.js v0.12.20<br>
|
|
6863
|
+
Copyright © 2011—2026 <a href="http://www.lehni.org" target="_blank">Jürg Lehni</a> & <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
|
|
6864
6864
|
<div class="content-end"></div>
|
|
6865
6865
|
|
|
6866
6866
|
|
|
@@ -752,8 +752,8 @@ tool.onKeyDown = function(event) {
|
|
|
752
752
|
|
|
753
753
|
<!-- =========================== copyright notice ========================== -->
|
|
754
754
|
<p class="footer">
|
|
755
|
-
Paper.js v0.12.
|
|
756
|
-
Copyright © 2011—
|
|
755
|
+
Paper.js v0.12.20<br>
|
|
756
|
+
Copyright © 2011—2026 <a href="http://www.lehni.org" target="_blank">Jürg Lehni</a> & <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
|
|
757
757
|
<div class="content-end"></div>
|
|
758
758
|
|
|
759
759
|
|
|
@@ -437,8 +437,8 @@ function onMouseUp(event) {
|
|
|
437
437
|
|
|
438
438
|
<!-- =========================== copyright notice ========================== -->
|
|
439
439
|
<p class="footer">
|
|
440
|
-
Paper.js v0.12.
|
|
441
|
-
Copyright © 2011—
|
|
440
|
+
Paper.js v0.12.20<br>
|
|
441
|
+
Copyright © 2011—2026 <a href="http://www.lehni.org" target="_blank">Jürg Lehni</a> & <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
|
|
442
442
|
<div class="content-end"></div>
|
|
443
443
|
|
|
444
444
|
|
|
@@ -365,8 +365,8 @@ setTimeout(function(){
|
|
|
365
365
|
|
|
366
366
|
<!-- =========================== copyright notice ========================== -->
|
|
367
367
|
<p class="footer">
|
|
368
|
-
Paper.js v0.12.
|
|
369
|
-
Copyright © 2011—
|
|
368
|
+
Paper.js v0.12.20<br>
|
|
369
|
+
Copyright © 2011—2026 <a href="http://www.lehni.org" target="_blank">Jürg Lehni</a> & <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
|
|
370
370
|
<div class="content-end"></div>
|
|
371
371
|
|
|
372
372
|
|
|
@@ -1763,8 +1763,8 @@ function onMouseDown(event) {
|
|
|
1763
1763
|
|
|
1764
1764
|
<!-- =========================== copyright notice ========================== -->
|
|
1765
1765
|
<p class="footer">
|
|
1766
|
-
Paper.js v0.12.
|
|
1767
|
-
Copyright © 2011—
|
|
1766
|
+
Paper.js v0.12.20<br>
|
|
1767
|
+
Copyright © 2011—2026 <a href="http://www.lehni.org" target="_blank">Jürg Lehni</a> & <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
|
|
1768
1768
|
<div class="content-end"></div>
|
|
1769
1769
|
|
|
1770
1770
|
|
|
@@ -416,8 +416,8 @@
|
|
|
416
416
|
|
|
417
417
|
<!-- =========================== copyright notice ========================== -->
|
|
418
418
|
<p class="footer">
|
|
419
|
-
Paper.js v0.12.
|
|
420
|
-
Copyright © 2011—
|
|
419
|
+
Paper.js v0.12.20<br>
|
|
420
|
+
Copyright © 2011—2026 <a href="http://www.lehni.org" target="_blank">Jürg Lehni</a> & <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
|
|
421
421
|
<div class="content-end"></div>
|
|
422
422
|
|
|
423
423
|
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
<html>
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="UTF-8">
|
|
5
|
-
<title>Paper.js v0.12.
|
|
5
|
+
<title>Paper.js v0.12.20</title>
|
|
6
6
|
<base target="class-frame">
|
|
7
7
|
<link href="../assets/css/docs.css" rel="stylesheet" type="text/css">
|
|
8
8
|
</head>
|
|
9
9
|
<body class="reference">
|
|
10
10
|
<div class="reference-index">
|
|
11
|
-
<h1>Paper.js<span class="version">0.12.
|
|
11
|
+
<h1>Paper.js<span class="version">0.12.20</span></h1>
|
|
12
12
|
<ul class="reference-classes"><li><a href="../classes/global.html">Global Scope</a></li>
|
|
13
13
|
<li>
|
|
14
14
|
<h2>Basic Types</h2>
|
package/dist/docs/index.html
CHANGED
package/dist/node/canvas.js
CHANGED
|
@@ -14,28 +14,29 @@
|
|
|
14
14
|
// - HTMLCanvasElement#type, so we can switch to a PDF canvas
|
|
15
15
|
// - Various Node-Canvas methods, routed through from HTMLCanvasElement:
|
|
16
16
|
// toBuffer, pngStream, createPNGStream, jpegStream, createJPEGStream
|
|
17
|
+
// Returns false if the canvas module is missing or not working.
|
|
17
18
|
|
|
18
19
|
module.exports = function(self, requireName) {
|
|
19
20
|
var Canvas;
|
|
20
21
|
try {
|
|
21
22
|
Canvas = require('canvas').Canvas;
|
|
22
23
|
} catch(error) {
|
|
23
|
-
// Remove `self.window`, so we still have the global `self` reference,
|
|
24
|
-
// but no `window` object:
|
|
25
|
-
// - On the browser, this corresponds to a worker context.
|
|
26
|
-
// - On Node.js, it basically means the canvas is missing or not working
|
|
27
|
-
// which can be treated the same way.
|
|
28
|
-
delete self.window;
|
|
29
24
|
// Check the required module's name to see if it contains canvas, and
|
|
30
25
|
// only complain about its lack if the module requires it.
|
|
31
26
|
if (/\bcanvas\b/.test(requireName)) {
|
|
32
27
|
throw new Error('Unable to load canvas module.');
|
|
33
28
|
}
|
|
34
|
-
return;
|
|
29
|
+
return false;
|
|
35
30
|
}
|
|
36
31
|
|
|
37
32
|
var HTMLCanvasElement = self.HTMLCanvasElement,
|
|
33
|
+
idlUtils;
|
|
34
|
+
try {
|
|
35
|
+
idlUtils = require('jsdom/lib/generated/idl/utils');
|
|
36
|
+
} catch(error) {
|
|
37
|
+
// jsdom < 28 keeps its generated utils in a different place:
|
|
38
38
|
idlUtils = require('jsdom/lib/jsdom/living/generated/utils');
|
|
39
|
+
}
|
|
39
40
|
|
|
40
41
|
// Add fake HTMLCanvasElement#type property:
|
|
41
42
|
Object.defineProperty(HTMLCanvasElement.prototype, 'type', {
|
|
@@ -63,4 +64,5 @@ module.exports = function(self, requireName) {
|
|
|
63
64
|
return canvas[key].apply(canvas, arguments);
|
|
64
65
|
};
|
|
65
66
|
});
|
|
67
|
+
return true;
|
|
66
68
|
};
|
package/dist/node/self.js
CHANGED
|
@@ -44,7 +44,15 @@ if (jsdom) {
|
|
|
44
44
|
resources: 'usable'
|
|
45
45
|
});
|
|
46
46
|
self = document.window;
|
|
47
|
-
require('./canvas.js')(self, requireName)
|
|
47
|
+
if (!require('./canvas.js')(self, requireName)) {
|
|
48
|
+
// Hide `self.window`, so we still have the global `self` reference,
|
|
49
|
+
// but no `window` object:
|
|
50
|
+
// - On the browser, this corresponds to a worker context.
|
|
51
|
+
// - On Node.js, it basically means the canvas is missing or not working
|
|
52
|
+
// which can be treated the same way.
|
|
53
|
+
// jsdom's window can't be removed from itself, so inherit from it:
|
|
54
|
+
self = Object.create(self, { window: { value: null } });
|
|
55
|
+
}
|
|
48
56
|
require('./xml.js')(self);
|
|
49
57
|
} else {
|
|
50
58
|
self = {
|
package/dist/paper-core.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Paper.js v0.12.
|
|
2
|
+
* Paper.js v0.12.20 - The Swiss Army Knife of Vector Graphics Scripting.
|
|
3
3
|
* http://paperjs.org/
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2011 - 2020, Jürg Lehni & Jonathan Puckey
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*
|
|
10
10
|
* All rights reserved.
|
|
11
11
|
*
|
|
12
|
-
* Date:
|
|
12
|
+
* Date: Sun Oct 18 17:04:58 2026 +0200
|
|
13
13
|
*
|
|
14
14
|
***
|
|
15
15
|
*
|
|
@@ -821,7 +821,7 @@ var PaperScope = Base.extend({
|
|
|
821
821
|
}
|
|
822
822
|
},
|
|
823
823
|
|
|
824
|
-
version: "0.12.
|
|
824
|
+
version: "0.12.20",
|
|
825
825
|
|
|
826
826
|
getView: function() {
|
|
827
827
|
var project = this.project;
|
|
@@ -1916,7 +1916,9 @@ var Rectangle = Base.extend({
|
|
|
1916
1916
|
} else if (type === 'undefined' || arg0 === null) {
|
|
1917
1917
|
this._set(0, 0, 0, 0);
|
|
1918
1918
|
read = arg0 === null ? 1 : 0;
|
|
1919
|
-
} else if (args.length === 1
|
|
1919
|
+
} else if (args.length === 1
|
|
1920
|
+
|| Array.isArray(arg0) && arg0.length === 4
|
|
1921
|
+
|| arg0.x !== undefined && arg0.width !== undefined) {
|
|
1920
1922
|
if (Array.isArray(arg0)) {
|
|
1921
1923
|
this._set.apply(this, arg0);
|
|
1922
1924
|
read = 1;
|
|
@@ -4644,6 +4646,7 @@ new function() {
|
|
|
4644
4646
|
|
|
4645
4647
|
fitBounds: function(rectangle, fill) {
|
|
4646
4648
|
rectangle = Rectangle.read(arguments);
|
|
4649
|
+
fill = Base.read(arguments);
|
|
4647
4650
|
var bounds = this.getBounds(),
|
|
4648
4651
|
itemRatio = bounds.height / bounds.width,
|
|
4649
4652
|
rectRatio = rectangle.height / rectangle.width,
|
|
@@ -5099,7 +5102,11 @@ var Shape = Item.extend({
|
|
|
5099
5102
|
return;
|
|
5100
5103
|
var size = radius * 2;
|
|
5101
5104
|
this._radius = radius;
|
|
5102
|
-
this._size
|
|
5105
|
+
if (this._size) {
|
|
5106
|
+
this._size._set(size, size);
|
|
5107
|
+
} else {
|
|
5108
|
+
this._size = new Size(size, size);
|
|
5109
|
+
}
|
|
5103
5110
|
} else {
|
|
5104
5111
|
radius = Size.read(arguments);
|
|
5105
5112
|
if (!this._radius) {
|
|
@@ -5376,7 +5383,7 @@ var Raster = Item.extend({
|
|
|
5376
5383
|
|
|
5377
5384
|
initialize: function Raster(source, position) {
|
|
5378
5385
|
if (!this._initialize(source,
|
|
5379
|
-
position !== undefined && Point.read(
|
|
5386
|
+
position !== undefined && Point.read([position]))) {
|
|
5380
5387
|
var image,
|
|
5381
5388
|
type = typeof source,
|
|
5382
5389
|
object = type === 'string'
|
|
@@ -10083,12 +10090,10 @@ Path.inject({ statics: new function() {
|
|
|
10083
10090
|
from = Point.readNamed(args, 'from'),
|
|
10084
10091
|
through = Point.readNamed(args, 'through'),
|
|
10085
10092
|
to = Point.readNamed(args, 'to'),
|
|
10086
|
-
|
|
10087
|
-
|
|
10088
|
-
|
|
10089
|
-
|
|
10090
|
-
path.arcTo(through, to);
|
|
10091
|
-
return path.set(props);
|
|
10093
|
+
arc = new Path(Item.NO_INSERT);
|
|
10094
|
+
arc.moveTo(from);
|
|
10095
|
+
arc.arcTo(through, to);
|
|
10096
|
+
return createPath(arc._segments, false, args);
|
|
10092
10097
|
},
|
|
10093
10098
|
|
|
10094
10099
|
RegularPolygon: function() {
|
|
@@ -13108,7 +13113,7 @@ var View = Base.extend(Emitter, {
|
|
|
13108
13113
|
pixels = parseFloat(DomElement.getStyles(temp).fontSize);
|
|
13109
13114
|
parent.removeChild(temp);
|
|
13110
13115
|
} else {
|
|
13111
|
-
pixels = parseFloat(
|
|
13116
|
+
pixels = parseFloat(size);
|
|
13112
13117
|
}
|
|
13113
13118
|
return pixels;
|
|
13114
13119
|
},
|
|
@@ -13932,8 +13937,8 @@ var ToolEvent = Event.extend({
|
|
|
13932
13937
|
},
|
|
13933
13938
|
|
|
13934
13939
|
setCount: function(count) {
|
|
13935
|
-
this.tool[/^mouse(down|up)$/.test(this.type)
|
|
13936
|
-
|
|
13940
|
+
this.tool[/^mouse(down|up)$/.test(this.type)
|
|
13941
|
+
? '_downCount' : '_moveCount'] = count;
|
|
13937
13942
|
},
|
|
13938
13943
|
|
|
13939
13944
|
getItem: function() {
|
|
@@ -14198,8 +14203,8 @@ var Tween = Base.extend(Emitter, {
|
|
|
14198
14203
|
var key = keys[i],
|
|
14199
14204
|
from = getValue(this._from[key]),
|
|
14200
14205
|
to = getValue(this._to[key]),
|
|
14201
|
-
value = (from && to && from.
|
|
14202
|
-
? to.
|
|
14206
|
+
value = (from && to && from.multiply && to.multiply)
|
|
14207
|
+
? to.subtract(from).multiply(factor).add(from)
|
|
14203
14208
|
: ((to - from) * factor) + from;
|
|
14204
14209
|
this._setProperty(this._parsedKeys[key], value);
|
|
14205
14210
|
}
|
|
@@ -14280,7 +14285,16 @@ var Tween = Base.extend(Emitter, {
|
|
|
14280
14285
|
},
|
|
14281
14286
|
|
|
14282
14287
|
_calculate: function(left, operator, right) {
|
|
14283
|
-
|
|
14288
|
+
var name = { '+': 'add', '-': 'subtract', '*': 'multiply',
|
|
14289
|
+
'/': 'divide' }[operator];
|
|
14290
|
+
if (left && left[name])
|
|
14291
|
+
return left[name](right);
|
|
14292
|
+
switch (operator) {
|
|
14293
|
+
case '+': return left + right;
|
|
14294
|
+
case '-': return left - right;
|
|
14295
|
+
case '*': return left * right;
|
|
14296
|
+
case '/': return left / right;
|
|
14297
|
+
}
|
|
14284
14298
|
},
|
|
14285
14299
|
|
|
14286
14300
|
_parseKeys: function(keys) {
|
|
@@ -15542,10 +15556,27 @@ new function() {
|
|
|
15542
15556
|
return res;
|
|
15543
15557
|
}
|
|
15544
15558
|
|
|
15559
|
+
var sandbox;
|
|
15560
|
+
|
|
15561
|
+
function getSandbox() {
|
|
15562
|
+
if (!(sandbox && sandbox.contentDocument)) {
|
|
15563
|
+
sandbox = document.createElement('iframe');
|
|
15564
|
+
sandbox.setAttribute('sandbox', 'allow-same-origin');
|
|
15565
|
+
sandbox.style.cssText = 'position: absolute; visibility: hidden;'
|
|
15566
|
+
+ ' width: 0; height: 0; border: 0';
|
|
15567
|
+
document.body.appendChild(sandbox);
|
|
15568
|
+
var doc = sandbox.contentDocument,
|
|
15569
|
+
meta = doc.createElement('meta');
|
|
15570
|
+
meta.httpEquiv = 'Content-Security-Policy';
|
|
15571
|
+
meta.content = "default-src 'none'; style-src 'unsafe-inline'";
|
|
15572
|
+
doc.head.appendChild(meta);
|
|
15573
|
+
}
|
|
15574
|
+
return sandbox.contentDocument.body;
|
|
15575
|
+
}
|
|
15576
|
+
|
|
15545
15577
|
function importNode(node, options, isRoot) {
|
|
15546
15578
|
var type = node.nodeName.toLowerCase(),
|
|
15547
15579
|
isElement = type !== '#document',
|
|
15548
|
-
body = document.body,
|
|
15549
15580
|
container,
|
|
15550
15581
|
parent,
|
|
15551
15582
|
next;
|
|
@@ -15558,46 +15589,53 @@ new function() {
|
|
|
15558
15589
|
parent = node.parentNode;
|
|
15559
15590
|
next = node.nextSibling;
|
|
15560
15591
|
container.appendChild(node);
|
|
15561
|
-
|
|
15592
|
+
getSandbox().appendChild(container);
|
|
15562
15593
|
}
|
|
15563
15594
|
var settings = paper.settings,
|
|
15564
15595
|
applyMatrix = settings.applyMatrix,
|
|
15565
|
-
insertItems = settings.insertItems
|
|
15566
|
-
|
|
15567
|
-
|
|
15568
|
-
|
|
15569
|
-
|
|
15570
|
-
|
|
15571
|
-
|
|
15572
|
-
|
|
15573
|
-
|
|
15574
|
-
|
|
15575
|
-
|
|
15576
|
-
|
|
15577
|
-
|
|
15578
|
-
|
|
15579
|
-
|
|
15580
|
-
|
|
15581
|
-
|
|
15596
|
+
insertItems = settings.insertItems,
|
|
15597
|
+
item;
|
|
15598
|
+
try {
|
|
15599
|
+
settings.applyMatrix = false;
|
|
15600
|
+
settings.insertItems = false;
|
|
15601
|
+
try {
|
|
15602
|
+
var importer = importers[type];
|
|
15603
|
+
item = importer && importer(node, type, options, isRoot)
|
|
15604
|
+
|| null;
|
|
15605
|
+
} finally {
|
|
15606
|
+
settings.insertItems = insertItems;
|
|
15607
|
+
settings.applyMatrix = applyMatrix;
|
|
15608
|
+
}
|
|
15609
|
+
if (item) {
|
|
15610
|
+
if (isElement && !(item instanceof Group))
|
|
15611
|
+
item = applyAttributes(item, node, isRoot);
|
|
15612
|
+
var onImport = options.onImport,
|
|
15613
|
+
data = isElement && node.getAttribute('data-paper-data');
|
|
15614
|
+
if (onImport)
|
|
15615
|
+
item = onImport(node, item, options) || item;
|
|
15616
|
+
if (options.expandShapes && item instanceof Shape) {
|
|
15617
|
+
item.remove();
|
|
15618
|
+
item = item.toPath();
|
|
15619
|
+
}
|
|
15620
|
+
if (data)
|
|
15621
|
+
item._data = JSON.parse(data);
|
|
15582
15622
|
}
|
|
15583
|
-
|
|
15584
|
-
|
|
15585
|
-
|
|
15586
|
-
|
|
15587
|
-
|
|
15588
|
-
|
|
15589
|
-
|
|
15590
|
-
|
|
15591
|
-
|
|
15592
|
-
parent.appendChild(node);
|
|
15623
|
+
} finally {
|
|
15624
|
+
if (container) {
|
|
15625
|
+
container.parentNode.removeChild(container);
|
|
15626
|
+
if (parent) {
|
|
15627
|
+
if (next) {
|
|
15628
|
+
parent.insertBefore(node, next);
|
|
15629
|
+
} else {
|
|
15630
|
+
parent.appendChild(node);
|
|
15631
|
+
}
|
|
15593
15632
|
}
|
|
15594
15633
|
}
|
|
15634
|
+
if (isRoot)
|
|
15635
|
+
definitions = {};
|
|
15595
15636
|
}
|
|
15596
|
-
if (isRoot)
|
|
15597
|
-
|
|
15598
|
-
if (item && Base.pick(options.applyMatrix, applyMatrix))
|
|
15599
|
-
item.matrix.apply(true, true);
|
|
15600
|
-
}
|
|
15637
|
+
if (isRoot && item && Base.pick(options.applyMatrix, applyMatrix))
|
|
15638
|
+
item.matrix.apply(true, true);
|
|
15601
15639
|
return item;
|
|
15602
15640
|
}
|
|
15603
15641
|
|
|
@@ -15693,8 +15731,10 @@ var paper = new (PaperScope.inject(Base.exports, {
|
|
|
15693
15731
|
DomElement: DomElement,
|
|
15694
15732
|
document: document,
|
|
15695
15733
|
window: window,
|
|
15696
|
-
Symbol: SymbolDefinition,
|
|
15697
15734
|
PlacedSymbol: SymbolItem
|
|
15735
|
+
}).inject({
|
|
15736
|
+
enumerable: false,
|
|
15737
|
+
Symbol: SymbolDefinition
|
|
15698
15738
|
}))();
|
|
15699
15739
|
|
|
15700
15740
|
if (paper.agent.node) {
|