paper 0.14.0 → 0.15.0
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 +252 -0
- package/README.md +3 -1
- package/dist/docs/assets/js/paper.js +6997 -1658
- package/dist/docs/classes/AreaText.html +8658 -0
- package/dist/docs/classes/ChangeFlag.html +2 -1
- package/dist/docs/classes/Color.html +2 -1
- package/dist/docs/classes/CompoundPath.html +152 -67
- package/dist/docs/classes/Curve.html +2 -1
- package/dist/docs/classes/CurveLocation.html +2 -1
- package/dist/docs/classes/Event.html +5 -4
- package/dist/docs/classes/Gradient.html +2 -1
- package/dist/docs/classes/GradientStop.html +2 -1
- package/dist/docs/classes/Group.html +117 -15
- package/dist/docs/classes/HitResult.html +2 -1
- package/dist/docs/classes/HostItem.html +80 -15
- package/dist/docs/classes/Item.html +137 -15
- package/dist/docs/classes/Key.html +2 -1
- package/dist/docs/classes/KeyEvent.html +5 -4
- package/dist/docs/classes/Layer.html +114 -15
- package/dist/docs/classes/Matrix.html +2 -1
- package/dist/docs/classes/MouseEvent.html +5 -4
- package/dist/docs/classes/PaperScope.html +4 -2
- package/dist/docs/classes/PaperScript.html +5 -2
- package/dist/docs/classes/Path.html +126 -67
- package/dist/docs/classes/PathItem.html +270 -185
- package/dist/docs/classes/PathText.html +8528 -0
- package/dist/docs/classes/Point.html +13 -2
- package/dist/docs/classes/PointText.html +1346 -59
- package/dist/docs/classes/Project.html +40 -7
- package/dist/docs/classes/Raster.html +80 -15
- package/dist/docs/classes/Rectangle.html +3 -2
- package/dist/docs/classes/Segment.html +2 -1
- package/dist/docs/classes/Shape.html +80 -15
- package/dist/docs/classes/Size.html +4 -2
- package/dist/docs/classes/Style.html +767 -14
- package/dist/docs/classes/SymbolDefinition.html +2 -1
- package/dist/docs/classes/SymbolItem.html +80 -15
- package/dist/docs/classes/TextItem.html +1469 -179
- package/dist/docs/classes/TextRange.html +186 -0
- package/dist/docs/classes/TextStory.html +355 -0
- package/dist/docs/classes/Tool.html +2 -1
- package/dist/docs/classes/ToolEvent.html +57 -4
- package/dist/docs/classes/Tween.html +17 -1
- package/dist/docs/classes/View.html +9 -8
- package/dist/docs/classes/global.html +2 -1
- package/dist/docs/classes/index.html +2 -2
- package/dist/docs/index.html +1 -1
- package/dist/paper-core.js +6832 -1637
- package/dist/paper-core.min.js +3 -3
- package/dist/paper-full.js +6997 -1658
- package/dist/paper-full.min.js +3 -3
- package/dist/{paper-sourced.js → paper-hosted.js} +7109 -1682
- package/dist/paper.d.ts +1727 -163
- package/examples/Scripts/AreaText.html +65 -0
- package/examples/Scripts/PathText.html +48 -0
- package/examples/Scripts/TextRanges.html +51 -0
- package/package.json +3 -2
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
<p>If the canvas element has a <code>resize</code> or <code>data-paper-resize</code> attribute, the view adjusts its size to the size of the element whenever the window is resized. The element itself needs to be sized through CSS, e.g. with <code>html, body { height: 100%; }</code> and <code>canvas[resize] { width: 100%; height:
|
|
20
20
|
100%; }</code> for a canvas that fills the window. Without such CSS, the view does not follow the window, and on HiDPI screens it grows with each resize. Without the attribute, the view sets the element’s CSS width and height to its own size, see <a href="../classes/View.html#viewsize"><tt>viewSize</tt></a>.</p>
|
|
21
21
|
|
|
22
|
+
|
|
22
23
|
</div>
|
|
23
24
|
|
|
24
25
|
|
|
@@ -229,9 +230,7 @@
|
|
|
229
230
|
<div class="member-description hidden">
|
|
230
231
|
|
|
231
232
|
<div class="member-text">
|
|
232
|
-
<p>The bounds of the currently visible area in project coordinates.</p>
|
|
233
|
-
|
|
234
|
-
<p>Read only.</p>
|
|
233
|
+
<p>The bounds of the currently visible area in project coordinates. Setting them fits the view to the given rectangle, as <a href="../classes/View.html#fitbounds-rectangle"><tt>fitBounds(rectangle)</tt></a> does. Since the view keeps its aspect ratio, the bounds read back can be larger than the rectangle in one direction.</p>
|
|
235
234
|
|
|
236
235
|
|
|
237
236
|
|
|
@@ -1982,13 +1981,13 @@ function onMouseDown(event) {
|
|
|
1982
1981
|
</div>
|
|
1983
1982
|
<div class="member-description hidden">
|
|
1984
1983
|
<div class="member-text">
|
|
1985
|
-
<p>Handles a mouse event that the host provides, for hosts without a DOM, such as workers, or with their own event source. It runs the same handling as the DOM’s mouse events: the active tool’s handlers, with <a href="../classes/Tool.html#mindistance"><tt>tool.minDistance</tt></a> and the like, then those of the items under the point and of the view, including the events that Paper.js derives itself: <code>'mousedrag'</code>, <code>'click'</code>, <code>'doubleclick'</code>, <code>'mouseenter'</code> and <code>'mouseleave'</code
|
|
1984
|
+
<p>Handles a mouse event that the host provides, for hosts without a DOM, such as workers, or with their own event source. It runs the same handling as the DOM’s mouse events: the active tool’s handlers, with <a href="../classes/Tool.html#mindistance"><tt>tool.minDistance</tt></a> and the like, then those of the items under the point and of the view, including the events that Paper.js derives itself: <code>'mousedrag'</code>, <code>'click'</code>, <code>'doubleclick'</code>, <code>'mouseenter'</code> and <code>'mouseleave'</code>. Points outside the view’s bounds are handled too, since the host decides which events belong to its drawing surface.</p>
|
|
1986
1985
|
<ul class="member-list">
|
|
1987
1986
|
<h4>Options:</h4>
|
|
1988
1987
|
<li>[options.modifiers] {Object} the state of the modifier keys,
|
|
1989
1988
|
see {@link Key#modifiers}</li>
|
|
1990
1989
|
<li><tt>options.button: <tt>Number</tt></tt> — the mouse button — default: <tt>0</tt></li>
|
|
1991
|
-
<li><tt>options.
|
|
1990
|
+
<li><tt>options.time: <tt>Number</tt></tt> — the time of the event in seconds, see <a href="../classes/Event.html#time"><tt>event.time</tt></a> — default: <tt>Date.now() / 1000</tt></li>
|
|
1992
1991
|
</ul>
|
|
1993
1992
|
|
|
1994
1993
|
<ul class="member-list">
|
|
@@ -2048,10 +2047,12 @@ function onMouseDown(event) {
|
|
|
2048
2047
|
<h4>Options:</h4>
|
|
2049
2048
|
<li>[options.character] {String} the character that the key
|
|
2050
2049
|
produces. By default, keydown takes the key itself if it is a
|
|
2051
|
-
single character,
|
|
2050
|
+
single character, the space, carriage return and tab characters
|
|
2051
|
+
for 'space', 'enter' and 'tab', and keyup the character of its
|
|
2052
|
+
keydown</li>
|
|
2052
2053
|
<li>[options.modifiers] {Object} the state of the modifier keys,
|
|
2053
2054
|
see {@link Key#modifiers}</li>
|
|
2054
|
-
<li><tt>options.
|
|
2055
|
+
<li><tt>options.time: <tt>Number</tt></tt> — the time of the event in seconds, see <a href="../classes/Event.html#time"><tt>event.time</tt></a> — default: <tt>Date.now() / 1000</tt></li>
|
|
2055
2056
|
</ul>
|
|
2056
2057
|
|
|
2057
2058
|
<ul class="member-list">
|
|
@@ -2098,7 +2099,7 @@ function onMouseDown(event) {
|
|
|
2098
2099
|
|
|
2099
2100
|
<!-- =========================== copyright notice ========================== -->
|
|
2100
2101
|
<p class="footer">
|
|
2101
|
-
Paper.js v0.
|
|
2102
|
+
Paper.js v0.15.0<br>
|
|
2102
2103
|
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>
|
|
2103
2104
|
<div class="content-end"></div>
|
|
2104
2105
|
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
<p>When code is executed as PaperScript, the script’s scope is populated with all fields of the currently active <a href="../classes/PaperScope.html"><tt>PaperScope</tt></a> object, which within the script appear to be global.</p>
|
|
19
19
|
<p>In a JavaScript context, only the <a href="../classes/global.html#paper"><tt>paper</tt></a> variable is added to the global scope, referencing the currently active <a href="../classes/PaperScope.html"><tt>PaperScope</tt></a> object, through which all properties and Paper.js classes can be accessed.</p>
|
|
20
20
|
|
|
21
|
+
|
|
21
22
|
</div>
|
|
22
23
|
|
|
23
24
|
|
|
@@ -416,7 +417,7 @@
|
|
|
416
417
|
|
|
417
418
|
<!-- =========================== copyright notice ========================== -->
|
|
418
419
|
<p class="footer">
|
|
419
|
-
Paper.js v0.
|
|
420
|
+
Paper.js v0.15.0<br>
|
|
420
421
|
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
422
|
<div class="content-end"></div>
|
|
422
423
|
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
<html>
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="UTF-8">
|
|
5
|
-
<title>Paper.js v0.
|
|
5
|
+
<title>Paper.js v0.15.0</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.
|
|
11
|
+
<h1>Paper.js<span class="version">0.15.0</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>
|