paper 0.13.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 +337 -0
  2. package/README.md +19 -14
  3. package/dist/docs/assets/js/paper.js +7351 -1706
  4. package/dist/docs/classes/AreaText.html +8658 -0
  5. package/dist/docs/classes/ChangeFlag.html +385 -0
  6. package/dist/docs/classes/Color.html +2 -1
  7. package/dist/docs/classes/CompoundPath.html +208 -69
  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 +204 -17
  14. package/dist/docs/classes/HitResult.html +4 -2
  15. package/dist/docs/classes/HostItem.html +6786 -0
  16. package/dist/docs/classes/Item.html +193 -17
  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 +201 -17
  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 +5 -2
  23. package/dist/docs/classes/PaperScript.html +6 -2
  24. package/dist/docs/classes/Path.html +183 -70
  25. package/dist/docs/classes/PathItem.html +326 -187
  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 +1404 -63
  29. package/dist/docs/classes/Project.html +221 -1
  30. package/dist/docs/classes/Raster.html +136 -17
  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 +136 -17
  34. package/dist/docs/classes/Size.html +4 -2
  35. package/dist/docs/classes/Style.html +768 -15
  36. package/dist/docs/classes/SymbolDefinition.html +2 -1
  37. package/dist/docs/classes/SymbolItem.html +136 -17
  38. package/dist/docs/classes/TextItem.html +1566 -222
  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 +127 -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 +148 -5
  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 +7160 -1663
  49. package/dist/paper-core.min.js +3 -3
  50. package/dist/paper-full.js +7351 -1706
  51. package/dist/paper-full.min.js +3 -3
  52. package/dist/paper-hosted.js +24058 -0
  53. package/dist/paper.d.ts +1996 -155
  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 +8 -11
@@ -18,6 +18,7 @@
18
18
  <p>The Curve object represents the parts of a path that are connected by two following <a href="../classes/Segment.html"><tt>Segment</tt></a> objects. The curves of a path can be accessed through its <a href="../classes/Path.html#curves"><tt>path.curves</tt></a> array.</p>
19
19
  <p>While a segment describe the anchor point and its incoming and outgoing handles, a Curve object describes the curve passing between two such segments. Curves and segments represent two different ways of looking at the same thing, but focusing on different aspects. Curves for example offer many convenient ways to work with parts of the path, finding lengths, positions or tangents at given offsets.</p>
20
20
 
21
+
21
22
  </div>
22
23
 
23
24
  <!-- =============================== constructors ========================== -->
@@ -2316,7 +2317,7 @@
2316
2317
 
2317
2318
  <!-- =========================== copyright notice ========================== -->
2318
2319
  <p class="footer">
2319
- Paper.js v0.13.0<br>
2320
+ Paper.js v0.15.0<br>
2320
2321
  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>
2321
2322
  <div class="content-end"></div>
2322
2323
 
@@ -18,6 +18,7 @@
18
18
  <p>CurveLocation objects describe a location on <a href="../classes/Curve.html"><tt>Curve</tt></a> objects, as defined by the curve-time <a href="../classes/CurveLocation.html#time"><tt>time</tt></a>, a value between <code>0</code> (beginning of the curve) and <code>1</code> (end of the curve). If the curve is part of a <a href="../classes/Path.html"><tt>Path</tt></a> item, its <a href="../classes/CurveLocation.html#index"><tt>index</tt></a> inside the <a href="../classes/Path.html#curves"><tt>path.curves</tt></a> array is also provided.</p>
19
19
  <p>The class is in use in many places, such as <a href="../classes/Path.html#getlocationat-offset"><tt>path.getLocationAt(offset)</tt></a>, <a href="../classes/Path.html#getlocationof-point"><tt>path.getLocationOf(point)</tt></a>, <a href="../classes/PathItem.html#getnearestlocation-point"><tt>pathItem.getNearestLocation(point)</tt></a>, <a href="../classes/PathItem.html#getintersections-path"><tt>pathItem.getIntersections(path)</tt></a>, etc.</p>
20
20
 
21
+
21
22
  </div>
22
23
 
23
24
  <!-- =============================== constructors ========================== -->
@@ -663,7 +664,7 @@
663
664
 
664
665
  <!-- =========================== copyright notice ========================== -->
665
666
  <p class="footer">
666
- Paper.js v0.13.0<br>
667
+ Paper.js v0.15.0<br>
667
668
  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>
668
669
  <div class="content-end"></div>
669
670
 
@@ -17,6 +17,7 @@
17
17
 
18
18
  <p>The Event object is the base class for any of the other event types, such as <a href="../classes/MouseEvent.html"><tt>MouseEvent</tt></a>, <a href="../classes/ToolEvent.html"><tt>ToolEvent</tt></a> and <a href="../classes/KeyEvent.html"><tt>KeyEvent</tt></a>.</p>
19
19
 
20
+
20
21
  </div>
21
22
 
22
23
 
@@ -28,14 +29,14 @@
28
29
  <h2>Properties</h2>
29
30
 
30
31
 
31
- <div id="timestamp" class="member">
32
+ <div id="time" class="member">
32
33
  <div class="member-link">
33
- <a name="timestamp" href="#timestamp"><tt><b>timeStamp</b></tt></a>
34
+ <a name="time" href="#time"><tt><b>time</b></tt></a>
34
35
  </div>
35
36
  <div class="member-description hidden">
36
37
 
37
38
  <div class="member-text">
38
- <p>The time at which the event was created, in milliseconds since the epoch.</p>
39
+ <p>The time at which the event was created, in seconds, as the times of frame events are. Browsers count from the page&rsquo;s time origin, as <code>performance.now()</code> does, while <a href="../classes/View.html#dispatchmouseevent-type-point"><tt>view.dispatchMouseEvent(type, point[, options])</tt></a> and <a href="../classes/View.html#dispatchkeyevent-type-key"><tt>view.dispatchKeyEvent(type, key[, options])</tt></a> use <code>Date.now()</code> unless the host passes a time, so only compare the times of events from the same source.</p>
39
40
 
40
41
  <p>Read only.</p>
41
42
 
@@ -167,7 +168,7 @@
167
168
 
168
169
  <!-- =========================== copyright notice ========================== -->
169
170
  <p class="footer">
170
- Paper.js v0.13.0<br>
171
+ Paper.js v0.15.0<br>
171
172
  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>
172
173
  <div class="content-end"></div>
173
174
 
@@ -80,6 +80,7 @@ path.fillColor = {
80
80
  </div>
81
81
 
82
82
 
83
+
83
84
  </div>
84
85
 
85
86
 
@@ -231,7 +232,7 @@ path.fillColor = {
231
232
 
232
233
  <!-- =========================== copyright notice ========================== -->
233
234
  <p class="footer">
234
- Paper.js v0.13.0<br>
235
+ Paper.js v0.15.0<br>
235
236
  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>
236
237
  <div class="content-end"></div>
237
238
 
@@ -17,6 +17,7 @@
17
17
 
18
18
  <p>The GradientStop object.</p>
19
19
 
20
+
20
21
  </div>
21
22
 
22
23
  <!-- =============================== constructors ========================== -->
@@ -264,7 +265,7 @@ function onFrame(event) {
264
265
 
265
266
  <!-- =========================== copyright notice ========================== -->
266
267
  <p class="footer">
267
- Paper.js v0.13.0<br>
268
+ Paper.js v0.15.0<br>
268
269
  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>
269
270
  <div class="content-end"></div>
270
271
 
@@ -19,6 +19,7 @@
19
19
 
20
20
  <p>A Group is a collection of items. When you transform a Group, its children are treated as a single unit without changing their relative positions.</p>
21
21
 
22
+
22
23
  </div>
23
24
 
24
25
  <!-- =============================== constructors ========================== -->
@@ -253,6 +254,37 @@ function onFrame(event) {
253
254
  </div>
254
255
 
255
256
 
257
+ </div>
258
+
259
+ </div>
260
+ </div>
261
+
262
+
263
+ <div id="isolated" class="member">
264
+ <div class="member-link">
265
+ <a name="isolated" href="#isolated"><tt><b>isolated</b></tt></a>
266
+ </div>
267
+ <div class="member-description hidden">
268
+
269
+ <div class="member-text">
270
+ <p>Specifies whether the group is isolated, drawn through a temporary canvas, so that the blend modes of its children only apply within it, like CSS&rsquo;s <code>isolation: isolate</code>. Without it, a compositing mode such as <code>&#39;destination-out&#39;</code> affects everything drawn below the group, also in other layers. Groups with an <a href="../classes/Item.html#opacity"><tt>item.opacity</tt></a> below 1 or a <a href="../classes/Item.html#blendmode"><tt>item.blendMode</tt></a> are isolated anyway.</p>
271
+
272
+
273
+
274
+ <ul class="member-list">
275
+ <h4>Default:</h4>
276
+ <li><tt>false</tt></li>
277
+ </ul>
278
+
279
+ <ul class="member-list">
280
+ <h4>Type:</h4>
281
+ <li>
282
+ <tt>Boolean</tt>
283
+ </li>
284
+ </ul>
285
+
286
+
287
+
256
288
  </div>
257
289
 
258
290
  </div>
@@ -264,6 +296,43 @@ function onFrame(event) {
264
296
 
265
297
 
266
298
 
299
+ <!-- ============================== methods ================================ -->
300
+ <div class="reference-members">
301
+ <h2>Methods</h2>
302
+
303
+
304
+ <div id="ungroup" class="member">
305
+ <div class="member-link">
306
+ <a name="ungroup" href="#ungroup"><tt><b>ungroup</b>()</tt></a>
307
+ </div>
308
+ <div class="member-description hidden">
309
+ <div class="member-text">
310
+ <p>Replaces the group with its children, which keep their appearance: the group&rsquo;s matrix is applied to them, and its clipping mask is released.</p>
311
+
312
+
313
+
314
+ <ul class="member-list">
315
+ <h4>Returns:</h4>
316
+
317
+ <li>
318
+ <tt>Array of <a href="../classes/Item.html"><tt>Item</tt></a> objects</tt>&nbsp;&mdash;&nbsp;the children, or <code>null</code> if the group has no parent
319
+ </li>
320
+
321
+
322
+ </ul>
323
+
324
+
325
+
326
+
327
+
328
+ </div>
329
+ </div>
330
+ </div>
331
+
332
+
333
+
334
+ </div>
335
+
267
336
 
268
337
 
269
338
 
@@ -271,6 +340,32 @@ function onFrame(event) {
271
340
  <div class="reference-members"><h2>Properties inherited from <a href="../classes/Item.html"><tt>Item</tt></a></h2>
272
341
 
273
342
 
343
+ <div id="key" class="member">
344
+ <div class="member-link">
345
+ <a name="key" href="#key"><tt><b>key</b></tt></a>
346
+ </div>
347
+ <div class="member-description hidden">
348
+
349
+ <div class="member-text">
350
+ <p>The key of the host&rsquo;s node that the item represents, in a project backed by a host document, see <a href="../classes/Project.html#host"><tt>project.host</tt></a>. It can only be set once, on an item created by a script, to register the key that the host gave its new node.</p>
351
+
352
+
353
+
354
+ <ul class="member-list">
355
+ <h4>Type:</h4>
356
+ <li>
357
+ <tt>Number</tt>
358
+ </li>
359
+ </ul>
360
+
361
+
362
+
363
+ </div>
364
+
365
+ </div>
366
+ </div>
367
+
368
+
274
369
  <div id="id" class="member">
275
370
  <div class="member-link">
276
371
  <a name="id" href="#id"><tt><b>id</b></tt></a>
@@ -617,7 +712,7 @@ path.visible = false;
617
712
  <div class="member-description hidden">
618
713
 
619
714
  <div class="member-text">
620
- <p>The blend mode with which the item is composited onto the canvas. Both the standard canvas compositing modes, as well as the new CSS blend modes are supported. If blend-modes cannot be rendered natively, they are emulated. Be aware that emulation can have an impact on performance.</p>
715
+ <p>The blend mode with which the item is composited onto the canvas. Both the standard canvas compositing modes, as well as the new CSS blend modes are supported. Where the canvas doesn&rsquo;t support a CSS blend mode natively, it draws as <code>&#39;normal&#39;</code>. Paper.js&rsquo;s own modes <code>&#39;add&#39;</code>, <code>&#39;subtract&#39;</code>, <code>&#39;average&#39;</code>, <code>&#39;pin-light&#39;</code> and <code>&#39;negation&#39;</code> are emulated, which can have an impact on performance.</p>
621
716
 
622
717
 
623
718
  <ul class="member-list">
@@ -770,6 +865,42 @@ circle2.opacity = 0.5;
770
865
  </div>
771
866
 
772
867
 
868
+ <div id="textwrap" class="member">
869
+ <div class="member-link">
870
+ <a name="textwrap" href="#textwrap"><tt><b>textWrap</b></tt></a>
871
+ </div>
872
+ <div class="member-description hidden">
873
+
874
+ <div class="member-text">
875
+ <p>Specifies whether, and how, the item pushes aside the text of the <a href="../classes/AreaText.html"><tt>AreaText</tt></a> items below it in its layer: <code>null</code>, or an object with <code>offset</code>, the space kept between them, and <code>invert</code>, to let the text flow inside it instead. <code>true</code> sets the defaults.</p>
876
+
877
+
878
+
879
+ <ul class="member-list">
880
+ <h4>Default:</h4>
881
+ <li><tt>null</tt></li>
882
+ </ul>
883
+
884
+ <ul class="member-list">
885
+ <h4>Type:</h4>
886
+ <li>
887
+ <tt>Object</tt>
888
+ </li>
889
+ </ul>
890
+
891
+
892
+ <h4>Example:</h4>
893
+
894
+
895
+ <pre><code>var circle = new Path.Circle({ center: [100, 100], radius: 40 });
896
+ circle.textWrap = { offset: 10 };</code></pre>
897
+
898
+ </div>
899
+
900
+ </div>
901
+ </div>
902
+
903
+
773
904
  <div id="selected" class="member">
774
905
  <div class="member-link">
775
906
  <a name="selected" href="#selected"><tt><b>selected</b></tt></a>
@@ -827,6 +958,32 @@ path.selected = true; // Select the path
827
958
  </div>
828
959
 
829
960
 
961
+ </div>
962
+
963
+ </div>
964
+ </div>
965
+
966
+
967
+ <div id="fullyselected" class="member">
968
+ <div class="member-link">
969
+ <a name="fullyselected" href="#fullyselected"><tt><b>fullySelected</b></tt></a>
970
+ </div>
971
+ <div class="member-description hidden">
972
+
973
+ <div class="member-text">
974
+ <p>Specifies whether the item and all its descendants are selected. Setting it selects or deselects them all.</p>
975
+
976
+
977
+
978
+ <ul class="member-list">
979
+ <h4>Type:</h4>
980
+ <li>
981
+ <tt>Boolean</tt>
982
+ </li>
983
+ </ul>
984
+
985
+
986
+
830
987
  </div>
831
988
 
832
989
  </div>
@@ -1066,6 +1223,7 @@ circle.position.x += 100;
1066
1223
 
1067
1224
  <div class="member-text">
1068
1225
  <p>The bounding rectangle of the item including stroke width.</p>
1226
+ <p>Setting it fits the item&rsquo;s <a href="../classes/Item.html#bounds"><tt>bounds</tt></a> into the given rectangle minus the extent of the stroke on each side, also where this extent changes with the item&rsquo;s proportions, as with miters. A rectangle smaller than the stroke itself shrinks the bounds to its center.</p>
1069
1227
 
1070
1228
 
1071
1229
 
@@ -1354,6 +1512,34 @@ circle.position.x += 100;
1354
1512
 
1355
1513
 
1356
1514
 
1515
+ </div>
1516
+
1517
+ </div>
1518
+ </div>
1519
+
1520
+
1521
+ <div id="scope" class="member">
1522
+ <div class="member-link">
1523
+ <a name="scope" href="#scope"><tt><b>scope</b></tt></a>
1524
+ </div>
1525
+ <div class="member-description hidden">
1526
+
1527
+ <div class="member-text">
1528
+ <p>The scope that this item belongs to, through its project.</p>
1529
+
1530
+ <p>Read only.</p>
1531
+
1532
+
1533
+
1534
+ <ul class="member-list">
1535
+ <h4>Type:</h4>
1536
+ <li>
1537
+ <a href="../classes/PaperScope.html"><tt>PaperScope</tt></a>
1538
+ </li>
1539
+ </ul>
1540
+
1541
+
1542
+
1357
1543
  </div>
1358
1544
 
1359
1545
  </div>
@@ -1969,7 +2155,7 @@ path3.strokeJoin = 'bevel';
1969
2155
  <div class="member-description hidden">
1970
2156
 
1971
2157
  <div class="member-text">
1972
- <p>Specifies whether the stroke is to be drawn taking the current affine transformation into account (the default behavior), or whether it should appear as a non-scaling stroke.</p>
2158
+ <p>Specifies whether the stroke is to be drawn taking the current affine transformation into account (the default behavior), or whether it should appear as a non-scaling stroke. On text, non-scaling strokes are exact for uniform scaling only, as the glyphs are always stroked through the transformation.</p>
1973
2159
 
1974
2160
 
1975
2161
 
@@ -3177,9 +3363,9 @@ for (var i = 0; i < 20; i++) {
3177
3363
  <p>Rasterizes the item into a newly created Raster object. The item itself is not removed after rasterization.</p>
3178
3364
  <ul class="member-list">
3179
3365
  <h4>Options:</h4>
3180
- <li><tt>resolution: <tt>Number</tt></tt> &mdash; the desired resolution to be used when rasterizing, in pixels per inch (DPI). If not specified, the value of <code>view.resolution</code> is used by default. &mdash;&nbsp;default: <tt>view.resolution</tt></li>
3181
- <li><tt>raster: <a href="../classes/Raster.html"><tt>Raster</tt></a></tt> &mdash; specifies a raster to be reused when rasterizing. If the raster has the desired size already, then the underlying canvas is reused and no new memory needs to be allocated. If no raster is provided, a new raster item is created and returned instead. &mdash;&nbsp;default: <tt>null</tt></li>
3182
- <li><tt>insert: <tt>Boolean</tt></tt> &mdash; specifies whether the raster should be inserted into the scene graph. When set to <code>true</code>, it is inserted above the rasterized item. &mdash;&nbsp;default: <tt>true</tt></li>
3366
+ <li><tt>options.resolution: <tt>Number</tt></tt> &mdash; the desired resolution to be used when rasterizing, in pixels per inch (DPI). If not specified, the value of <code>view.resolution</code> is used by default. &mdash;&nbsp;default: <tt>view.resolution</tt></li>
3367
+ <li><tt>options.raster: <a href="../classes/Raster.html"><tt>Raster</tt></a></tt> &mdash; specifies a raster to be reused when rasterizing. If the raster has the desired size already, then the underlying canvas is reused and no new memory needs to be allocated. If no raster is provided, a new raster item is created and returned instead. &mdash;&nbsp;default: <tt>null</tt></li>
3368
+ <li><tt>options.insert: <tt>Boolean</tt></tt> &mdash; specifies whether the raster should be inserted into the scene graph. When set to <code>true</code>, it is inserted above the rasterized item. &mdash;&nbsp;default: <tt>true</tt></li>
3183
3369
  </ul>
3184
3370
 
3185
3371
  <ul class="member-list">
@@ -3364,7 +3550,7 @@ function onMouseDown(event) {
3364
3550
  </div>
3365
3551
  <div class="member-description hidden">
3366
3552
  <div class="member-text">
3367
-
3553
+ <p>Checks whether the item overlaps with the given item: whether their outlines cross, or one contains the other, as <a href="../classes/Rectangle.html#intersects-rect"><tt>rectangle.intersects(rect)</tt></a> does for rectangles. Items other than paths and shapes are checked through their bounds. To only check whether outlines cross, use <a href="../classes/PathItem.html#getintersections-path"><tt>pathItem.getIntersections(path)</tt></a>.</p>
3368
3554
 
3369
3555
 
3370
3556
  <ul class="member-list">
@@ -3384,7 +3570,7 @@ function onMouseDown(event) {
3384
3570
  <h4>Returns:</h4>
3385
3571
 
3386
3572
  <li>
3387
- <tt><tt>Boolean</tt></tt>
3573
+ <tt><tt>Boolean</tt></tt>&nbsp;&mdash;&nbsp;<tt>true</tt> if the items overlap, <tt>false</tt> otherwise
3388
3574
  </li>
3389
3575
 
3390
3576
 
@@ -3880,6 +4066,7 @@ function onMouseDown(event) {
3880
4066
  <div class="member-text">
3881
4067
  <p>Converts the provided SVG content into Paper.js items and adds them to the this item&rsquo;s children list. Note that the item is not cleared first. You can call <a href="../classes/Item.html#removechildren"><tt>item.removeChildren</tt></a>() to do so.</p>
3882
4068
  <p><code>&lt;symbol&gt;</code> elements are imported as <a href="../classes/SymbolDefinition.html"><tt>SymbolDefinition</tt></a> items, and the <code>&lt;use&gt;</code> elements that place them as <a href="../classes/SymbolItem.html"><tt>SymbolItem</tt></a> items. The styles that <code>&lt;use&gt;</code> elements inherit don&rsquo;t reach the symbols&rsquo; content.</p>
4069
+ <p>URLs are fetched as they are, so validate URLs that come from untrusted sources first, especially on servers, where they could reach internal addresses.</p>
3883
4070
  <ul class="member-list">
3884
4071
  <h4>Options:</h4>
3885
4072
  <li><tt>options.expandShapes: <tt>Boolean</tt></tt> &mdash; whether imported shape items should be expanded to path items &mdash;&nbsp;default: <tt>false</tt></li>
@@ -4433,11 +4620,11 @@ Array of <a href="../classes/Item.html"><tt>Item</tt></a> objects
4433
4620
 
4434
4621
  <div id="replacewith-item" class="member">
4435
4622
  <div class="member-link">
4436
- <a name="replacewith-item" href="#replacewith-item"><tt><b>replaceWith</b>(item)</tt></a>
4623
+ <a name="replacewith-item" href="#replacewith-item"><tt><b>replaceWith</b>(...item)</tt></a>
4437
4624
  </div>
4438
4625
  <div class="member-description hidden">
4439
4626
  <div class="member-text">
4440
- <p>Replaces this item with the provided new item which will takes its place in the project hierarchy instead.</p>
4627
+ <p>Replaces this item with the provided new items which will take its place in the project hierarchy instead, in the given order. This also ungroups a group, e.g. <code>group.replaceWith(…group.children)</code>, but note that the items keep their own matrices, see <a href="../classes/Group.html#ungroup"><tt>group.ungroup</tt></a>().</p>
4441
4628
 
4442
4629
 
4443
4630
  <ul class="member-list">
@@ -4446,7 +4633,7 @@ Array of <a href="../classes/Item.html"><tt>Item</tt></a> objects
4446
4633
  <li>
4447
4634
  <tt>item:</tt>
4448
4635
  <a href="../classes/Item.html"><tt>Item</tt></a>
4449
- &mdash;&nbsp;the item that will replace this item
4636
+ &mdash;&nbsp;the items that will replace this item
4450
4637
 
4451
4638
  </li>
4452
4639
 
@@ -4619,7 +4806,7 @@ Array of <a href="../classes/Item.html"><tt>Item</tt></a> objects
4619
4806
  </div>
4620
4807
  <div class="member-description hidden">
4621
4808
  <div class="member-text">
4622
- <p>Checks whether the item has a fill.</p>
4809
+ <p>Checks whether the item has a visible fill, a fill color with an alpha above 0. Hit-tests also hit transparent fills, see <a href="../classes/Item.html#hittest"><tt>hitTest</tt></a>.</p>
4623
4810
 
4624
4811
 
4625
4812
 
@@ -4627,7 +4814,7 @@ Array of <a href="../classes/Item.html"><tt>Item</tt></a> objects
4627
4814
  <h4>Returns:</h4>
4628
4815
 
4629
4816
  <li>
4630
- <tt><tt>Boolean</tt></tt>&nbsp;&mdash;&nbsp;<tt>true</tt> if the item has a fill, <tt>false</tt> otherwise
4817
+ <tt><tt>Boolean</tt></tt>&nbsp;&mdash;&nbsp;<tt>true</tt> if the item has a visible fill, <tt>false</tt> otherwise
4631
4818
  </li>
4632
4819
 
4633
4820
 
@@ -6261,10 +6448,10 @@ function onMouseDown(event) {
6261
6448
  <p>Removes the item when the events specified in the passed options object occur.</p>
6262
6449
  <ul class="member-list">
6263
6450
  <h4>Options:</h4>
6264
- <li><tt>options.move: undefined</tt> &mdash; {Boolean) remove the item when the next <a href="../classes/Tool.html#onmousemove"><tt>tool.onMouseMove</tt></a> event is fired.</li>
6265
- <li><tt>options.drag: undefined</tt> &mdash; {Boolena) remove the item when the next <a href="../classes/Tool.html#onmousedrag"><tt>tool.onMouseDrag</tt></a> event is fired.</li>
6266
- <li><tt>options.down: undefined</tt> &mdash; {Boolean) remove the item when the next <a href="../classes/Tool.html#onmousedown"><tt>tool.onMouseDown</tt></a> event is fired.</li>
6267
- <li><tt>options.up: undefined</tt> &mdash; {Boolean) remove the item when the next <a href="../classes/Tool.html#onmouseup"><tt>tool.onMouseUp</tt></a> event is fired.</li>
6451
+ <li><tt>options.move: <tt>Boolean</tt></tt> &mdash; remove the item when the next <a href="../classes/Tool.html#onmousemove"><tt>tool.onMouseMove</tt></a> event is fired.</li>
6452
+ <li><tt>options.drag: <tt>Boolean</tt></tt> &mdash; remove the item when the next <a href="../classes/Tool.html#onmousedrag"><tt>tool.onMouseDrag</tt></a> event is fired.</li>
6453
+ <li><tt>options.down: <tt>Boolean</tt></tt> &mdash; remove the item when the next <a href="../classes/Tool.html#onmousedown"><tt>tool.onMouseDown</tt></a> event is fired.</li>
6454
+ <li><tt>options.up: <tt>Boolean</tt></tt> &mdash; remove the item when the next <a href="../classes/Tool.html#onmouseup"><tt>tool.onMouseUp</tt></a> event is fired.</li>
6268
6455
  </ul>
6269
6456
 
6270
6457
  <ul class="member-list">
@@ -6893,7 +7080,7 @@ path.tweenFrom({ fillColor: 'red' }, { duration: 1000 });
6893
7080
 
6894
7081
  <!-- =========================== copyright notice ========================== -->
6895
7082
  <p class="footer">
6896
- Paper.js v0.13.0<br>
7083
+ Paper.js v0.15.0<br>
6897
7084
  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>
6898
7085
  <div class="content-end"></div>
6899
7086
 
@@ -17,6 +17,7 @@
17
17
 
18
18
  <p>A HitResult object contains information about the results of a hit test. It is returned by <a href="../classes/Item.html#hittest-point"><tt>item.hitTest(point)</tt></a> and <a href="../classes/Project.html#hittest-point"><tt>project.hitTest(point)</tt></a>.</p>
19
19
 
20
+
20
21
  </div>
21
22
 
22
23
 
@@ -67,11 +68,12 @@
67
68
 
68
69
  <div class="member-text">
69
70
  <p>If the HitResult has a <a href="../classes/HitResult.html#type"><tt>hitResult.type</tt></a> of <code>&#39;bounds&#39;</code>, this property describes which corner of the bounding rectangle was hit.</p>
71
+ <p>The names refer to the item&rsquo;s own bounding rectangle, transformed by its <a href="../classes/Item.html#matrix"><tt>item.matrix</tt></a>, which is the rectangle that the item&rsquo;s selection draws. On mirrored or rotated items, a handle can therefore appear elsewhere on screen than its name says, while its opposite handle and the rectangle&rsquo;s axes stay the ones to transform the item by. To choose a cursor, use the direction from the rectangle&rsquo;s center to <a href="../classes/HitResult.html#point"><tt>hitResult.point</tt></a>, both in project coordinates.</p>
70
72
 
71
73
 
72
74
  <ul class="member-list">
73
75
  <h4>Values:</h4>
74
- <li><tt>'top-left'</tt>, <tt>'top-right'</tt>, <tt>'bottom-left'</tt>, <tt>'bottom-right'</tt>, <tt>'left-center'</tt>, <tt>'top-center'</tt>, <tt>'right-center'</tt>, <tt>'bottom- center'</tt></li>
76
+ <li><tt>'top-left'</tt>, <tt>'top-right'</tt>, <tt>'bottom-left'</tt>, <tt>'bottom-right'</tt>, <tt>'left-center'</tt>, <tt>'top-center'</tt>, <tt>'right-center'</tt>, <tt>'bottom-center'</tt></li>
75
77
  </ul>
76
78
 
77
79
 
@@ -230,7 +232,7 @@
230
232
 
231
233
  <!-- =========================== copyright notice ========================== -->
232
234
  <p class="footer">
233
- Paper.js v0.13.0<br>
235
+ Paper.js v0.15.0<br>
234
236
  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>
235
237
  <div class="content-end"></div>
236
238