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.
Files changed (57) hide show
  1. package/CHANGELOG.md +252 -0
  2. package/README.md +3 -1
  3. package/dist/docs/assets/js/paper.js +6997 -1658
  4. package/dist/docs/classes/AreaText.html +8658 -0
  5. package/dist/docs/classes/ChangeFlag.html +2 -1
  6. package/dist/docs/classes/Color.html +2 -1
  7. package/dist/docs/classes/CompoundPath.html +152 -67
  8. package/dist/docs/classes/Curve.html +2 -1
  9. package/dist/docs/classes/CurveLocation.html +2 -1
  10. package/dist/docs/classes/Event.html +5 -4
  11. package/dist/docs/classes/Gradient.html +2 -1
  12. package/dist/docs/classes/GradientStop.html +2 -1
  13. package/dist/docs/classes/Group.html +117 -15
  14. package/dist/docs/classes/HitResult.html +2 -1
  15. package/dist/docs/classes/HostItem.html +80 -15
  16. package/dist/docs/classes/Item.html +137 -15
  17. package/dist/docs/classes/Key.html +2 -1
  18. package/dist/docs/classes/KeyEvent.html +5 -4
  19. package/dist/docs/classes/Layer.html +114 -15
  20. package/dist/docs/classes/Matrix.html +2 -1
  21. package/dist/docs/classes/MouseEvent.html +5 -4
  22. package/dist/docs/classes/PaperScope.html +4 -2
  23. package/dist/docs/classes/PaperScript.html +5 -2
  24. package/dist/docs/classes/Path.html +126 -67
  25. package/dist/docs/classes/PathItem.html +270 -185
  26. package/dist/docs/classes/PathText.html +8528 -0
  27. package/dist/docs/classes/Point.html +13 -2
  28. package/dist/docs/classes/PointText.html +1346 -59
  29. package/dist/docs/classes/Project.html +40 -7
  30. package/dist/docs/classes/Raster.html +80 -15
  31. package/dist/docs/classes/Rectangle.html +3 -2
  32. package/dist/docs/classes/Segment.html +2 -1
  33. package/dist/docs/classes/Shape.html +80 -15
  34. package/dist/docs/classes/Size.html +4 -2
  35. package/dist/docs/classes/Style.html +767 -14
  36. package/dist/docs/classes/SymbolDefinition.html +2 -1
  37. package/dist/docs/classes/SymbolItem.html +80 -15
  38. package/dist/docs/classes/TextItem.html +1469 -179
  39. package/dist/docs/classes/TextRange.html +186 -0
  40. package/dist/docs/classes/TextStory.html +355 -0
  41. package/dist/docs/classes/Tool.html +2 -1
  42. package/dist/docs/classes/ToolEvent.html +57 -4
  43. package/dist/docs/classes/Tween.html +17 -1
  44. package/dist/docs/classes/View.html +9 -8
  45. package/dist/docs/classes/global.html +2 -1
  46. package/dist/docs/classes/index.html +2 -2
  47. package/dist/docs/index.html +1 -1
  48. package/dist/paper-core.js +6832 -1637
  49. package/dist/paper-core.min.js +3 -3
  50. package/dist/paper-full.js +6997 -1658
  51. package/dist/paper-full.min.js +3 -3
  52. package/dist/{paper-sourced.js → paper-hosted.js} +7109 -1682
  53. package/dist/paper.d.ts +1727 -163
  54. package/examples/Scripts/AreaText.html +65 -0
  55. package/examples/Scripts/PathText.html +48 -0
  56. package/examples/Scripts/TextRanges.html +51 -0
  57. 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&rsquo;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&rsquo;s mouse events: the active tool&rsquo;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>&#39;mousedrag&#39;</code>, <code>&#39;click&#39;</code>, <code>&#39;doubleclick&#39;</code>, <code>&#39;mouseenter&#39;</code> and <code>&#39;mouseleave&#39;</code>.</p>
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&rsquo;s mouse events: the active tool&rsquo;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>&#39;mousedrag&#39;</code>, <code>&#39;click&#39;</code>, <code>&#39;doubleclick&#39;</code>, <code>&#39;mouseenter&#39;</code> and <code>&#39;mouseleave&#39;</code>. Points outside the view&rsquo;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> &mdash; the mouse button &mdash;&nbsp;default: <tt>0</tt></li>
1991
- <li><tt>options.timeStamp: <tt>Number</tt></tt> &mdash; the time stamp &mdash;&nbsp;default: <tt>Date.now()</tt></li>
1990
+ <li><tt>options.time: <tt>Number</tt></tt> &mdash; the time of the event in seconds, see <a href="../classes/Event.html#time"><tt>event.time</tt></a> &mdash;&nbsp;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, and keyup the character of its keydown</li>
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.timeStamp: <tt>Number</tt></tt> &mdash; the time stamp &mdash;&nbsp;default: <tt>Date.now()</tt></li>
2055
+ <li><tt>options.time: <tt>Number</tt></tt> &mdash; the time of the event in seconds, see <a href="../classes/Event.html#time"><tt>event.time</tt></a> &mdash;&nbsp;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.14.0<br>
2102
+ Paper.js v0.15.0<br>
2102
2103
  Copyright &#169; 2011—2026 <a href="http://www.lehni.org" target="_blank">J&uuml;rg Lehni</a> &amp; <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&rsquo;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.14.0<br>
420
+ Paper.js v0.15.0<br>
420
421
  Copyright &#169; 2011—2026 <a href="http://www.lehni.org" target="_blank">J&uuml;rg Lehni</a> &amp; <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.14.0</title>
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.14.0</span></h1>
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>
@@ -2,7 +2,7 @@
2
2
  <html>
3
3
  <head>
4
4
  <meta charset="UTF-8">
5
- <title>Paper.js v0.14.0</title>
5
+ <title>Paper.js v0.15.0</title>
6
6
  </head>
7
7
  <frameset cols="230,*">
8
8
  <frame src="classes/index.html" name="packageListFrame" title="All Packages">