paper 0.12.20 → 0.13.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 +233 -0
- package/README.md +29 -13
- package/dist/docs/assets/js/paper.js +788 -365
- package/dist/docs/classes/Color.html +63 -47
- package/dist/docs/classes/CompoundPath.html +162 -59
- package/dist/docs/classes/Curve.html +9 -7
- package/dist/docs/classes/CurveLocation.html +1 -1
- package/dist/docs/classes/Event.html +1 -1
- package/dist/docs/classes/Gradient.html +1 -1
- package/dist/docs/classes/GradientStop.html +1 -1
- package/dist/docs/classes/Group.html +63 -24
- package/dist/docs/classes/HitResult.html +1 -1
- package/dist/docs/classes/Item.html +63 -24
- package/dist/docs/classes/Key.html +1 -1
- package/dist/docs/classes/KeyEvent.html +1 -1
- package/dist/docs/classes/Layer.html +63 -24
- package/dist/docs/classes/Matrix.html +1 -1
- package/dist/docs/classes/MouseEvent.html +1 -1
- package/dist/docs/classes/PaperScope.html +87 -1
- package/dist/docs/classes/PaperScript.html +1 -1
- package/dist/docs/classes/Path.html +174 -68
- package/dist/docs/classes/PathItem.html +280 -177
- package/dist/docs/classes/Point.html +143 -21
- package/dist/docs/classes/PointText.html +94 -24
- package/dist/docs/classes/Project.html +14 -8
- package/dist/docs/classes/Raster.html +93 -35
- package/dist/docs/classes/Rectangle.html +12 -11
- package/dist/docs/classes/Segment.html +1 -1
- package/dist/docs/classes/Shape.html +63 -24
- package/dist/docs/classes/Size.html +81 -21
- package/dist/docs/classes/Style.html +34 -2
- package/dist/docs/classes/SymbolDefinition.html +1 -1
- package/dist/docs/classes/SymbolItem.html +64 -25
- package/dist/docs/classes/TextItem.html +94 -24
- package/dist/docs/classes/Tool.html +2 -1
- package/dist/docs/classes/ToolEvent.html +27 -1
- package/dist/docs/classes/Tween.html +1 -1
- package/dist/docs/classes/View.html +203 -10
- package/dist/docs/classes/global.html +1 -1
- package/dist/docs/classes/index.html +2 -2
- package/dist/docs/index.html +1 -1
- package/dist/node/canvas.js +1 -1
- package/dist/node/self.js +4 -3
- package/dist/paper-core.js +769 -354
- package/dist/paper-core.min.js +3 -3
- package/dist/paper-full.js +788 -365
- package/dist/paper-full.min.js +3 -3
- package/dist/paper.d.ts +324 -73
- package/examples/Rasters/Smoothing.html +1 -1
- package/package.json +1 -8
- package/dist/node/xml.js +0 -40
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
<p> Extends <b><a href="../classes/Item.html"><tt>Item</tt></a></b></p>
|
|
19
19
|
|
|
20
|
-
<p>A symbol item represents an instance of a symbol which has been placed in a Paper.js project.</p>
|
|
20
|
+
<p>A symbol item represents an instance of a symbol which has been placed in a Paper.js project. All instances share the symbol’s definition, which they draw as it is: styles set on a symbol item don’t reach the items of the definition, unlike <code><use></code> elements in SVG.</p>
|
|
21
21
|
|
|
22
22
|
</div>
|
|
23
23
|
|
|
@@ -281,6 +281,7 @@ group.children['example'].fillColor = 'red';
|
|
|
281
281
|
|
|
282
282
|
<div class="member-text">
|
|
283
283
|
<p>The path style of the item.</p>
|
|
284
|
+
<p>Styles set on a <a href="../classes/Group.html"><tt>Group</tt></a> or <a href="../classes/Layer.html"><tt>Layer</tt></a> are applied to the children that it contains at that moment. Items added to it later do not receive them.</p>
|
|
284
285
|
|
|
285
286
|
|
|
286
287
|
|
|
@@ -623,6 +624,37 @@ circle2.opacity = 0.5;
|
|
|
623
624
|
</div>
|
|
624
625
|
|
|
625
626
|
|
|
627
|
+
</div>
|
|
628
|
+
|
|
629
|
+
</div>
|
|
630
|
+
</div>
|
|
631
|
+
|
|
632
|
+
|
|
633
|
+
<div id="guide" class="member">
|
|
634
|
+
<div class="member-link">
|
|
635
|
+
<a name="guide" href="#guide"><tt><b>guide</b></tt></a>
|
|
636
|
+
</div>
|
|
637
|
+
<div class="member-description hidden">
|
|
638
|
+
|
|
639
|
+
<div class="member-text">
|
|
640
|
+
<p>Specifies whether the item functions as a guide. When set to <code>true</code>, the item is drawn as usual, but left out of hit-tests and mouse interactions. Hit-tests only find guides when <code>options.guides</code> is set, and then only them, see <a href="../classes/Item.html#hittest-point"><tt>hitTest(point[, options])</tt></a>.</p>
|
|
641
|
+
|
|
642
|
+
|
|
643
|
+
|
|
644
|
+
<ul class="member-list">
|
|
645
|
+
<h4>Default:</h4>
|
|
646
|
+
<li><tt>false</tt></li>
|
|
647
|
+
</ul>
|
|
648
|
+
|
|
649
|
+
<ul class="member-list">
|
|
650
|
+
<h4>Type:</h4>
|
|
651
|
+
<li>
|
|
652
|
+
<tt>Boolean</tt>
|
|
653
|
+
</li>
|
|
654
|
+
</ul>
|
|
655
|
+
|
|
656
|
+
|
|
657
|
+
|
|
626
658
|
</div>
|
|
627
659
|
|
|
628
660
|
</div>
|
|
@@ -1326,6 +1358,7 @@ console.log(group.children[0] == path); // true</code></pre>
|
|
|
1326
1358
|
|
|
1327
1359
|
<div class="member-text">
|
|
1328
1360
|
<p>The children items contained within this item. Items that define a <a href="../classes/Item.html#name"><tt>name</tt></a> can also be accessed by name.</p>
|
|
1361
|
+
<p>Only <a href="../classes/Group.html"><tt>Group</tt></a>, <a href="../classes/Layer.html"><tt>Layer</tt></a> and <a href="../classes/CompoundPath.html"><tt>CompoundPath</tt></a> items can have children. On all other items, such as <a href="../classes/Path.html"><tt>Path</tt></a>, <a href="../classes/Shape.html"><tt>Shape</tt></a>, <a href="../classes/Raster.html"><tt>Raster</tt></a>, <a href="../classes/SymbolItem.html"><tt>SymbolItem</tt></a> and <a href="../classes/PointText.html"><tt>PointText</tt></a>, <code>children</code> is <code>undefined</code>.</p>
|
|
1329
1362
|
<p><b>Please note:</b> The children array should not be modified directly using array functions. To remove single items from the children list, use <a href="../classes/Item.html#remove"><tt>item.remove</tt></a>(), to remove all items from the children list, use <a href="../classes/Item.html#removechildren"><tt>item.removeChildren</tt></a>(). To add items to the children list, use <a href="../classes/Item.html#addchild-item"><tt>item.addChild(item)</tt></a> or <a href="../classes/Item.html#insertchild-index-item"><tt>item.insertChild(index, item)</tt></a>.</p>
|
|
1330
1363
|
|
|
1331
1364
|
|
|
@@ -3266,22 +3299,22 @@ function onMouseDown(event) {
|
|
|
3266
3299
|
<div class="member-description hidden">
|
|
3267
3300
|
<div class="member-text">
|
|
3268
3301
|
<p>Performs a hit-test on the item and its children (if it is a <a href="../classes/Group.html"><tt>Group</tt></a> or <a href="../classes/Layer.html"><tt>Layer</tt></a>) at the location of the specified point, returning the first found hit.</p>
|
|
3269
|
-
<p>The options object allows you to control the specifics of the hit-
|
|
3302
|
+
<p>The options object allows you to control the specifics of the hit-test. Without options, <code>fill</code>, <code>stroke</code> and <code>segments</code> are hit-tested. As soon as an options object is passed, only the hit-tests that it sets to <code>true</code> are performed. It may contain a combination of the following values:</p>
|
|
3270
3303
|
<ul class="member-list">
|
|
3271
3304
|
<h4>Options:</h4>
|
|
3272
|
-
<li><tt>options.tolerance: <tt>Number</tt></tt> — the tolerance of the hit-test — default: <tt><a href="../classes/PaperScope.html#settings"><tt>paperScope.settings</tt></a>.hitTolerance</tt></li>
|
|
3305
|
+
<li><tt>options.tolerance: <tt>Number</tt></tt> — the tolerance of the hit-test, in project coordinates — default: <tt><a href="../classes/PaperScope.html#settings"><tt>paperScope.settings</tt></a>.hitTolerance</tt></li>
|
|
3273
3306
|
<li><tt>options.class: <tt>Function</tt></tt> — only hit-test against a specific item class, or any of its sub-classes, by providing the constructor function against which an <code>instanceof</code> check is performed: <tt>Group</tt>, <tt>Layer</tt>, <tt>Path</tt>, <tt>CompoundPath</tt>, <tt>Shape</tt>, <tt>Raster</tt>, <tt>SymbolItem</tt>, <tt>PointText</tt>, …</li>
|
|
3274
3307
|
<li><tt>options.match: <tt>Function</tt></tt> — a match function to be called for each found hit result: Return <code>true</code> to return the result, <code>false</code> to keep searching</li>
|
|
3275
|
-
<li><tt>options.fill: <tt>Boolean</tt></tt> — hit-test the fill of items
|
|
3276
|
-
<li><tt>options.stroke: <tt>Boolean</tt></tt> — hit-test the stroke of path
|
|
3277
|
-
<li><tt>options.segments: <tt>Boolean</tt></tt> — hit-test for <a href="../classes/Segment.html#point"><tt>segment.point</tt></a> of
|
|
3308
|
+
<li><tt>options.fill: <tt>Boolean</tt></tt> — hit-test the fill of items</li>
|
|
3309
|
+
<li><tt>options.stroke: <tt>Boolean</tt></tt> — hit-test the stroke of path items, taking into account the setting of stroke color and width</li>
|
|
3310
|
+
<li><tt>options.segments: <tt>Boolean</tt></tt> — hit-test for <a href="../classes/Segment.html#point"><tt>segment.point</tt></a> of <a href="../classes/Path.html"><tt>Path</tt></a> items</li>
|
|
3278
3311
|
<li><tt>options.curves: <tt>Boolean</tt></tt> — hit-test the curves of path items, without taking the stroke color or width into account</li>
|
|
3279
3312
|
<li><tt>options.handles: <tt>Boolean</tt></tt> — hit-test for the handles (<a href="../classes/Segment.html#handlein"><tt>segment.handleIn</tt></a> / <a href="../classes/Segment.html#handleout"><tt>segment.handleOut</tt></a>) of path segments.</li>
|
|
3280
3313
|
<li><tt>options.ends: <tt>Boolean</tt></tt> — only hit-test for the first or last segment points of open path items</li>
|
|
3281
3314
|
<li><tt>options.position: <tt>Boolean</tt></tt> — hit-test the <a href="../classes/Item.html#position"><tt>item.position</tt></a> of of items, which depends on the setting of <a href="../classes/Item.html#pivot"><tt>item.pivot</tt></a></li>
|
|
3282
3315
|
<li><tt>options.center: <tt>Boolean</tt></tt> — hit-test the <a href="../classes/Rectangle.html#center"><tt>rectangle.center</tt></a> of the bounding rectangle of items (<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>)</li>
|
|
3283
3316
|
<li><tt>options.bounds: <tt>Boolean</tt></tt> — hit-test the corners and side-centers of the bounding rectangle of items (<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>)</li>
|
|
3284
|
-
<li><tt>options.guides: <tt>Boolean</tt></tt> — hit-test items that have <
|
|
3317
|
+
<li><tt>options.guides: <tt>Boolean</tt></tt> — only hit-test items that have <a href="../classes/Item.html#guide"><tt>item.guide</tt></a> set to <code>true</code></li>
|
|
3285
3318
|
<li><tt>options.selected: <tt>Boolean</tt></tt> — only hit selected items</li>
|
|
3286
3319
|
</ul>
|
|
3287
3320
|
|
|
@@ -3520,7 +3553,7 @@ function onMouseDown(event) {
|
|
|
3520
3553
|
<h4>Returns:</h4>
|
|
3521
3554
|
|
|
3522
3555
|
<li>
|
|
3523
|
-
<tt>Array of <a href="../classes/Item.html"><tt>Item</tt></a> objects</tt> — the list of matching descendant items
|
|
3556
|
+
<tt>Array of <a href="../classes/Item.html"><tt>Item</tt></a> objects</tt> — the list of matching descendant items, in their stacking order from bottom to top, with each item listed before its own descendants
|
|
3524
3557
|
</li>
|
|
3525
3558
|
|
|
3526
3559
|
|
|
@@ -3693,6 +3726,8 @@ function onMouseDown(event) {
|
|
|
3693
3726
|
<li><tt>options.precision: <tt>Number</tt></tt> — the amount of fractional digits in numbers used in SVG data — default: <tt>5</tt></li>
|
|
3694
3727
|
<li><tt>options.matchShapes: <tt>Boolean</tt></tt> — whether path items should tried to be converted to SVG shape items (rect, circle, ellipse, line, polyline, polygon), if their geometries match — default: <tt>false</tt></li>
|
|
3695
3728
|
<li><tt>options.embedImages: <tt>Boolean</tt></tt> — whether raster images should be embedded as base64 data inlined in the xlink:href attribute, or kept as a link to their external URL. — default: <tt>true</tt></li>
|
|
3729
|
+
<li><tt>options.reuseImages: <tt>Boolean</tt></tt> — whether raster images with the same content should only be exported once into the <code><defs></code> element, and placed through <code><use></code> elements referencing it — default: <tt>false</tt></li>
|
|
3730
|
+
<li><tt>options.idPrefix: <tt>String</tt></tt> — a prefix for the ids generated for definitions such as gradients, clip paths and symbols, to keep them unique when several exported SVGs are placed in one document — default: <tt>’’</tt></li>
|
|
3696
3731
|
<li><tt>options.reduceAttributes: <tt>Boolean</tt></tt> — wether to only include style attributes in the SVG output that differ from their parents, or to always include them (much faster but leading to redundancies). — default: <tt>true</tt></li>
|
|
3697
3732
|
</ul>
|
|
3698
3733
|
|
|
@@ -3735,9 +3770,13 @@ function onMouseDown(event) {
|
|
|
3735
3770
|
<div class="member-description hidden">
|
|
3736
3771
|
<div class="member-text">
|
|
3737
3772
|
<p>Converts the provided SVG content into Paper.js items and adds them to the this item’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>
|
|
3773
|
+
<p><code><symbol></code> elements are imported as <a href="../classes/SymbolDefinition.html"><tt>SymbolDefinition</tt></a> items, and the <code><use></code> elements that place them as <a href="../classes/SymbolItem.html"><tt>SymbolItem</tt></a> items. The styles that <code><use></code> elements inherit don’t reach the symbols’ content.</p>
|
|
3738
3774
|
<ul class="member-list">
|
|
3739
3775
|
<h4>Options:</h4>
|
|
3740
3776
|
<li><tt>options.expandShapes: <tt>Boolean</tt></tt> — whether imported shape items should be expanded to path items — default: <tt>false</tt></li>
|
|
3777
|
+
<li>[options.crossOrigin] {String} the {@link Raster#crossOrigin}
|
|
3778
|
+
value of the rasters created for `<image>` elements, to load their
|
|
3779
|
+
images with CORS</li>
|
|
3741
3780
|
<li><tt>options.onLoad: <tt>Function</tt></tt> — the callback function to call once the SVG content is loaded from the given URL receiving two arguments: the converted <code>item</code> and the original <code>svg</code> data as a string. Only required when loading from external resources.</li>
|
|
3742
3781
|
<li><tt>options.onError: <tt>Function</tt></tt> — the callback function to call if an error occurs during loading. Only required when loading from external resources.</li>
|
|
3743
3782
|
<li><tt>options.insert: <tt>Boolean</tt></tt> — whether the imported items should be added to the item that <code>importSVG()</code> is called on — default: <tt>true</tt></li>
|
|
@@ -4213,9 +4252,9 @@ Array of <a href="../classes/Item.html"><tt>Item</tt></a> objects
|
|
|
4213
4252
|
</div>
|
|
4214
4253
|
|
|
4215
4254
|
|
|
4216
|
-
<div id="reduce
|
|
4255
|
+
<div id="reduce" class="member">
|
|
4217
4256
|
<div class="member-link">
|
|
4218
|
-
<a name="reduce
|
|
4257
|
+
<a name="reduce" href="#reduce"><tt><b>reduce</b>([options])</tt></a>
|
|
4219
4258
|
</div>
|
|
4220
4259
|
<div class="member-description hidden">
|
|
4221
4260
|
<div class="member-text">
|
|
@@ -4227,9 +4266,9 @@ Array of <a href="../classes/Item.html"><tt>Item</tt></a> objects
|
|
|
4227
4266
|
|
|
4228
4267
|
<li>
|
|
4229
4268
|
<tt>options:</tt>
|
|
4230
|
-
|
|
4231
|
-
|
|
4232
|
-
|
|
4269
|
+
<tt>Object</tt>
|
|
4270
|
+
— the options passed on to <a href="../classes/Path.html#reduce-options"><tt>path.reduce(options)</tt></a>
|
|
4271
|
+
— optional
|
|
4233
4272
|
</li>
|
|
4234
4273
|
|
|
4235
4274
|
</ul>
|
|
@@ -4618,7 +4657,7 @@ Array of <a href="../classes/Item.html"><tt>Item</tt></a> objects
|
|
|
4618
4657
|
</div>
|
|
4619
4658
|
<div class="member-description hidden">
|
|
4620
4659
|
<div class="member-text">
|
|
4621
|
-
<p>Checks if this item is above the specified item in the stacking order of the project.</p>
|
|
4660
|
+
<p>Checks if this item is above the specified item in the stacking order of the project. If one item is a descendant of the other, neither is above the other and <code>false</code> is returned.</p>
|
|
4622
4661
|
|
|
4623
4662
|
|
|
4624
4663
|
<ul class="member-list">
|
|
@@ -4659,7 +4698,7 @@ Array of <a href="../classes/Item.html"><tt>Item</tt></a> objects
|
|
|
4659
4698
|
</div>
|
|
4660
4699
|
<div class="member-description hidden">
|
|
4661
4700
|
<div class="member-text">
|
|
4662
|
-
<p>Checks if the item is below the specified item in the stacking order of the project.</p>
|
|
4701
|
+
<p>Checks if the item is below the specified item in the stacking order of the project. If one item is a descendant of the other, neither is below the other and <code>false</code> is returned.</p>
|
|
4663
4702
|
|
|
4664
4703
|
|
|
4665
4704
|
<ul class="member-list">
|
|
@@ -5617,11 +5656,11 @@ circle.scale(3, 1);
|
|
|
5617
5656
|
|
|
5618
5657
|
<div id="fitbounds-rectangle" class="member">
|
|
5619
5658
|
<div class="member-link">
|
|
5620
|
-
<a name="fitbounds-rectangle" href="#fitbounds-rectangle"><tt><b>fitBounds</b>(rectangle[,
|
|
5659
|
+
<a name="fitbounds-rectangle" href="#fitbounds-rectangle"><tt><b>fitBounds</b>(rectangle[, fit])</tt></a>
|
|
5621
5660
|
</div>
|
|
5622
5661
|
<div class="member-description hidden">
|
|
5623
5662
|
<div class="member-text">
|
|
5624
|
-
<p>Transform the item so that its <a href="../classes/Item.html#bounds"><tt>bounds</tt></a>
|
|
5663
|
+
<p>Transform the item so that its <a href="../classes/Item.html#bounds"><tt>bounds</tt></a> are centered in the specified rectangle and fitted to it as described by <code>fit</code>.</p>
|
|
5625
5664
|
|
|
5626
5665
|
|
|
5627
5666
|
<ul class="member-list">
|
|
@@ -5635,10 +5674,10 @@ circle.scale(3, 1);
|
|
|
5635
5674
|
</li>
|
|
5636
5675
|
|
|
5637
5676
|
<li>
|
|
5638
|
-
<tt>
|
|
5639
|
-
<tt>Boolean</tt>
|
|
5640
|
-
|
|
5641
|
-
— optional, default: <tt
|
|
5677
|
+
<tt>fit:</tt>
|
|
5678
|
+
<tt>String</tt>⟋<tt>Boolean</tt>
|
|
5679
|
+
— how to fit the item, as in CSS’s <code>object-fit</code>: <code>'contain'</code> fits all of it within the rectangle, <code>'cover'</code> makes it cover the whole rectangle, and <code>'fill'</code> stretches it to the rectangle, changing its aspect ratio. The deprecated <code>true</code> and <code>false</code> stand for <code>'cover'</code> and <code>'contain'</code>.
|
|
5680
|
+
— optional, default: <tt>‘contain’</tt>
|
|
5642
5681
|
</li>
|
|
5643
5682
|
|
|
5644
5683
|
</ul>
|
|
@@ -5680,7 +5719,7 @@ circlePath.fitBounds(path.bounds);
|
|
|
5680
5719
|
</div>
|
|
5681
5720
|
|
|
5682
5721
|
|
|
5683
|
-
<h4>Example:<span class="description">Fitting an item to the bounding rectangle of another item's bounding rectangle
|
|
5722
|
+
<h4>Example:<span class="description">Fitting an item to the bounding rectangle of another item's bounding rectangle, covering all of it:</span></h4>
|
|
5684
5723
|
|
|
5685
5724
|
<div class="paperscript split">
|
|
5686
5725
|
|
|
@@ -5707,7 +5746,7 @@ var circlePath = new Path.Circle({
|
|
|
5707
5746
|
|
|
5708
5747
|
// Fit the circlePath to the bounding rectangle of
|
|
5709
5748
|
// the rectangular path:
|
|
5710
|
-
circlePath.fitBounds(path.bounds,
|
|
5749
|
+
circlePath.fitBounds(path.bounds, 'cover');
|
|
5711
5750
|
</script>
|
|
5712
5751
|
<div class="canvas"><canvas width="516" height="100" id="canvas-45"></canvas></div>
|
|
5713
5752
|
</div>
|
|
@@ -6357,7 +6396,7 @@ function onMouseDown(event) {
|
|
|
6357
6396
|
<ul class="member-list">
|
|
6358
6397
|
<h4>Options:</h4>
|
|
6359
6398
|
<li><tt>options.duration: <tt>Number</tt></tt> — the duration of the tweening</li>
|
|
6360
|
-
<li><tt>options.easing: <tt>Function</tt>⟋<tt>String</tt></tt> — an easing function or the type of the easing: <tt>‘linear’ ‘easeInQuad’ ‘easeOutQuad’ ‘easeInOutQuad’ ‘easeInCubic’ ‘easeOutCubic’ ‘easeInOutCubic’ ‘easeInQuart’ ‘easeOutQuart’ ‘easeInOutQuart’ ‘easeInQuint’ ‘easeOutQuint’ ‘easeInOutQuint’</tt> — default: <tt>‘linear’</tt></li>
|
|
6399
|
+
<li><tt>options.easing: <tt>Function</tt>⟋<tt>String</tt></tt> — an easing function or the type of the easing: <tt>‘linear’ ‘easeInQuad’ ‘easeOutQuad’ ‘easeInOutQuad’ ‘easeInCubic’ ‘easeOutCubic’ ‘easeInOutCubic’ ‘easeInQuart’ ‘easeOutQuart’ ‘easeInOutQuart’ ‘easeInQuint’ ‘easeOutQuint’ ‘easeInOutQuint’ ‘easeInSine’ ‘easeOutSine’ ‘easeInOutSine’ ‘easeInExpo’ ‘easeOutExpo’ ‘easeInOutExpo’ ‘easeInCirc’ ‘easeOutCirc’ ‘easeInOutCirc’</tt> — default: <tt>‘linear’</tt></li>
|
|
6361
6400
|
<li><tt>options.start: <tt>Boolean</tt></tt> — whether to start tweening automatically — default: <tt>true</tt></li>
|
|
6362
6401
|
</ul>
|
|
6363
6402
|
|
|
@@ -6745,7 +6784,7 @@ path.tweenFrom({ fillColor: 'red' }, { duration: 1000 });
|
|
|
6745
6784
|
|
|
6746
6785
|
<!-- =========================== copyright notice ========================== -->
|
|
6747
6786
|
<p class="footer">
|
|
6748
|
-
Paper.js v0.
|
|
6787
|
+
Paper.js v0.13.0<br>
|
|
6749
6788
|
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
6789
|
<div class="content-end"></div>
|
|
6751
6790
|
|
|
@@ -220,6 +220,37 @@ function onMouseMove(event) {
|
|
|
220
220
|
|
|
221
221
|
|
|
222
222
|
|
|
223
|
+
</div>
|
|
224
|
+
|
|
225
|
+
</div>
|
|
226
|
+
</div>
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
<div id="tracking" class="member">
|
|
230
|
+
<div class="member-link">
|
|
231
|
+
<a name="tracking" href="#tracking"><tt><b>tracking</b></tt></a>
|
|
232
|
+
</div>
|
|
233
|
+
<div class="member-description hidden">
|
|
234
|
+
|
|
235
|
+
<div class="member-text">
|
|
236
|
+
<p>The tracking of text content: the space added after each character, in thousandths of an em, as in Adobe Illustrator and InDesign. A tracking of 100 adds a tenth of the font size.</p>
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
<ul class="member-list">
|
|
241
|
+
<h4>Default:</h4>
|
|
242
|
+
<li><tt>0</tt></li>
|
|
243
|
+
</ul>
|
|
244
|
+
|
|
245
|
+
<ul class="member-list">
|
|
246
|
+
<h4>Type:</h4>
|
|
247
|
+
<li>
|
|
248
|
+
<tt>Number</tt>
|
|
249
|
+
</li>
|
|
250
|
+
</ul>
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
|
|
223
254
|
</div>
|
|
224
255
|
|
|
225
256
|
</div>
|
|
@@ -395,6 +426,7 @@ group.children['example'].fillColor = 'red';
|
|
|
395
426
|
|
|
396
427
|
<div class="member-text">
|
|
397
428
|
<p>The path style of the item.</p>
|
|
429
|
+
<p>Styles set on a <a href="../classes/Group.html"><tt>Group</tt></a> or <a href="../classes/Layer.html"><tt>Layer</tt></a> are applied to the children that it contains at that moment. Items added to it later do not receive them.</p>
|
|
398
430
|
|
|
399
431
|
|
|
400
432
|
|
|
@@ -737,6 +769,37 @@ circle2.opacity = 0.5;
|
|
|
737
769
|
</div>
|
|
738
770
|
|
|
739
771
|
|
|
772
|
+
</div>
|
|
773
|
+
|
|
774
|
+
</div>
|
|
775
|
+
</div>
|
|
776
|
+
|
|
777
|
+
|
|
778
|
+
<div id="guide" class="member">
|
|
779
|
+
<div class="member-link">
|
|
780
|
+
<a name="guide" href="#guide"><tt><b>guide</b></tt></a>
|
|
781
|
+
</div>
|
|
782
|
+
<div class="member-description hidden">
|
|
783
|
+
|
|
784
|
+
<div class="member-text">
|
|
785
|
+
<p>Specifies whether the item functions as a guide. When set to <code>true</code>, the item is drawn as usual, but left out of hit-tests and mouse interactions. Hit-tests only find guides when <code>options.guides</code> is set, and then only them, see <a href="../classes/Item.html#hittest-point"><tt>hitTest(point[, options])</tt></a>.</p>
|
|
786
|
+
|
|
787
|
+
|
|
788
|
+
|
|
789
|
+
<ul class="member-list">
|
|
790
|
+
<h4>Default:</h4>
|
|
791
|
+
<li><tt>false</tt></li>
|
|
792
|
+
</ul>
|
|
793
|
+
|
|
794
|
+
<ul class="member-list">
|
|
795
|
+
<h4>Type:</h4>
|
|
796
|
+
<li>
|
|
797
|
+
<tt>Boolean</tt>
|
|
798
|
+
</li>
|
|
799
|
+
</ul>
|
|
800
|
+
|
|
801
|
+
|
|
802
|
+
|
|
740
803
|
</div>
|
|
741
804
|
|
|
742
805
|
</div>
|
|
@@ -1440,6 +1503,7 @@ console.log(group.children[0] == path); // true</code></pre>
|
|
|
1440
1503
|
|
|
1441
1504
|
<div class="member-text">
|
|
1442
1505
|
<p>The children items contained within this item. Items that define a <a href="../classes/Item.html#name"><tt>name</tt></a> can also be accessed by name.</p>
|
|
1506
|
+
<p>Only <a href="../classes/Group.html"><tt>Group</tt></a>, <a href="../classes/Layer.html"><tt>Layer</tt></a> and <a href="../classes/CompoundPath.html"><tt>CompoundPath</tt></a> items can have children. On all other items, such as <a href="../classes/Path.html"><tt>Path</tt></a>, <a href="../classes/Shape.html"><tt>Shape</tt></a>, <a href="../classes/Raster.html"><tt>Raster</tt></a>, <a href="../classes/SymbolItem.html"><tt>SymbolItem</tt></a> and <a href="../classes/PointText.html"><tt>PointText</tt></a>, <code>children</code> is <code>undefined</code>.</p>
|
|
1443
1507
|
<p><b>Please note:</b> The children array should not be modified directly using array functions. To remove single items from the children list, use <a href="../classes/Item.html#remove"><tt>item.remove</tt></a>(), to remove all items from the children list, use <a href="../classes/Item.html#removechildren"><tt>item.removeChildren</tt></a>(). To add items to the children list, use <a href="../classes/Item.html#addchild-item"><tt>item.addChild(item)</tt></a> or <a href="../classes/Item.html#insertchild-index-item"><tt>item.insertChild(index, item)</tt></a>.</p>
|
|
1444
1508
|
|
|
1445
1509
|
|
|
@@ -3380,22 +3444,22 @@ function onMouseDown(event) {
|
|
|
3380
3444
|
<div class="member-description hidden">
|
|
3381
3445
|
<div class="member-text">
|
|
3382
3446
|
<p>Performs a hit-test on the item and its children (if it is a <a href="../classes/Group.html"><tt>Group</tt></a> or <a href="../classes/Layer.html"><tt>Layer</tt></a>) at the location of the specified point, returning the first found hit.</p>
|
|
3383
|
-
<p>The options object allows you to control the specifics of the hit-
|
|
3447
|
+
<p>The options object allows you to control the specifics of the hit-test. Without options, <code>fill</code>, <code>stroke</code> and <code>segments</code> are hit-tested. As soon as an options object is passed, only the hit-tests that it sets to <code>true</code> are performed. It may contain a combination of the following values:</p>
|
|
3384
3448
|
<ul class="member-list">
|
|
3385
3449
|
<h4>Options:</h4>
|
|
3386
|
-
<li><tt>options.tolerance: <tt>Number</tt></tt> — the tolerance of the hit-test — default: <tt><a href="../classes/PaperScope.html#settings"><tt>paperScope.settings</tt></a>.hitTolerance</tt></li>
|
|
3450
|
+
<li><tt>options.tolerance: <tt>Number</tt></tt> — the tolerance of the hit-test, in project coordinates — default: <tt><a href="../classes/PaperScope.html#settings"><tt>paperScope.settings</tt></a>.hitTolerance</tt></li>
|
|
3387
3451
|
<li><tt>options.class: <tt>Function</tt></tt> — only hit-test against a specific item class, or any of its sub-classes, by providing the constructor function against which an <code>instanceof</code> check is performed: <tt>Group</tt>, <tt>Layer</tt>, <tt>Path</tt>, <tt>CompoundPath</tt>, <tt>Shape</tt>, <tt>Raster</tt>, <tt>SymbolItem</tt>, <tt>PointText</tt>, …</li>
|
|
3388
3452
|
<li><tt>options.match: <tt>Function</tt></tt> — a match function to be called for each found hit result: Return <code>true</code> to return the result, <code>false</code> to keep searching</li>
|
|
3389
|
-
<li><tt>options.fill: <tt>Boolean</tt></tt> — hit-test the fill of items
|
|
3390
|
-
<li><tt>options.stroke: <tt>Boolean</tt></tt> — hit-test the stroke of path
|
|
3391
|
-
<li><tt>options.segments: <tt>Boolean</tt></tt> — hit-test for <a href="../classes/Segment.html#point"><tt>segment.point</tt></a> of
|
|
3453
|
+
<li><tt>options.fill: <tt>Boolean</tt></tt> — hit-test the fill of items</li>
|
|
3454
|
+
<li><tt>options.stroke: <tt>Boolean</tt></tt> — hit-test the stroke of path items, taking into account the setting of stroke color and width</li>
|
|
3455
|
+
<li><tt>options.segments: <tt>Boolean</tt></tt> — hit-test for <a href="../classes/Segment.html#point"><tt>segment.point</tt></a> of <a href="../classes/Path.html"><tt>Path</tt></a> items</li>
|
|
3392
3456
|
<li><tt>options.curves: <tt>Boolean</tt></tt> — hit-test the curves of path items, without taking the stroke color or width into account</li>
|
|
3393
3457
|
<li><tt>options.handles: <tt>Boolean</tt></tt> — hit-test for the handles (<a href="../classes/Segment.html#handlein"><tt>segment.handleIn</tt></a> / <a href="../classes/Segment.html#handleout"><tt>segment.handleOut</tt></a>) of path segments.</li>
|
|
3394
3458
|
<li><tt>options.ends: <tt>Boolean</tt></tt> — only hit-test for the first or last segment points of open path items</li>
|
|
3395
3459
|
<li><tt>options.position: <tt>Boolean</tt></tt> — hit-test the <a href="../classes/Item.html#position"><tt>item.position</tt></a> of of items, which depends on the setting of <a href="../classes/Item.html#pivot"><tt>item.pivot</tt></a></li>
|
|
3396
3460
|
<li><tt>options.center: <tt>Boolean</tt></tt> — hit-test the <a href="../classes/Rectangle.html#center"><tt>rectangle.center</tt></a> of the bounding rectangle of items (<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>)</li>
|
|
3397
3461
|
<li><tt>options.bounds: <tt>Boolean</tt></tt> — hit-test the corners and side-centers of the bounding rectangle of items (<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>)</li>
|
|
3398
|
-
<li><tt>options.guides: <tt>Boolean</tt></tt> — hit-test items that have <
|
|
3462
|
+
<li><tt>options.guides: <tt>Boolean</tt></tt> — only hit-test items that have <a href="../classes/Item.html#guide"><tt>item.guide</tt></a> set to <code>true</code></li>
|
|
3399
3463
|
<li><tt>options.selected: <tt>Boolean</tt></tt> — only hit selected items</li>
|
|
3400
3464
|
</ul>
|
|
3401
3465
|
|
|
@@ -3634,7 +3698,7 @@ function onMouseDown(event) {
|
|
|
3634
3698
|
<h4>Returns:</h4>
|
|
3635
3699
|
|
|
3636
3700
|
<li>
|
|
3637
|
-
<tt>Array of <a href="../classes/Item.html"><tt>Item</tt></a> objects</tt> — the list of matching descendant items
|
|
3701
|
+
<tt>Array of <a href="../classes/Item.html"><tt>Item</tt></a> objects</tt> — the list of matching descendant items, in their stacking order from bottom to top, with each item listed before its own descendants
|
|
3638
3702
|
</li>
|
|
3639
3703
|
|
|
3640
3704
|
|
|
@@ -3807,6 +3871,8 @@ function onMouseDown(event) {
|
|
|
3807
3871
|
<li><tt>options.precision: <tt>Number</tt></tt> — the amount of fractional digits in numbers used in SVG data — default: <tt>5</tt></li>
|
|
3808
3872
|
<li><tt>options.matchShapes: <tt>Boolean</tt></tt> — whether path items should tried to be converted to SVG shape items (rect, circle, ellipse, line, polyline, polygon), if their geometries match — default: <tt>false</tt></li>
|
|
3809
3873
|
<li><tt>options.embedImages: <tt>Boolean</tt></tt> — whether raster images should be embedded as base64 data inlined in the xlink:href attribute, or kept as a link to their external URL. — default: <tt>true</tt></li>
|
|
3874
|
+
<li><tt>options.reuseImages: <tt>Boolean</tt></tt> — whether raster images with the same content should only be exported once into the <code><defs></code> element, and placed through <code><use></code> elements referencing it — default: <tt>false</tt></li>
|
|
3875
|
+
<li><tt>options.idPrefix: <tt>String</tt></tt> — a prefix for the ids generated for definitions such as gradients, clip paths and symbols, to keep them unique when several exported SVGs are placed in one document — default: <tt>’’</tt></li>
|
|
3810
3876
|
<li><tt>options.reduceAttributes: <tt>Boolean</tt></tt> — wether to only include style attributes in the SVG output that differ from their parents, or to always include them (much faster but leading to redundancies). — default: <tt>true</tt></li>
|
|
3811
3877
|
</ul>
|
|
3812
3878
|
|
|
@@ -3849,9 +3915,13 @@ function onMouseDown(event) {
|
|
|
3849
3915
|
<div class="member-description hidden">
|
|
3850
3916
|
<div class="member-text">
|
|
3851
3917
|
<p>Converts the provided SVG content into Paper.js items and adds them to the this item’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>
|
|
3918
|
+
<p><code><symbol></code> elements are imported as <a href="../classes/SymbolDefinition.html"><tt>SymbolDefinition</tt></a> items, and the <code><use></code> elements that place them as <a href="../classes/SymbolItem.html"><tt>SymbolItem</tt></a> items. The styles that <code><use></code> elements inherit don’t reach the symbols’ content.</p>
|
|
3852
3919
|
<ul class="member-list">
|
|
3853
3920
|
<h4>Options:</h4>
|
|
3854
3921
|
<li><tt>options.expandShapes: <tt>Boolean</tt></tt> — whether imported shape items should be expanded to path items — default: <tt>false</tt></li>
|
|
3922
|
+
<li>[options.crossOrigin] {String} the {@link Raster#crossOrigin}
|
|
3923
|
+
value of the rasters created for `<image>` elements, to load their
|
|
3924
|
+
images with CORS</li>
|
|
3855
3925
|
<li><tt>options.onLoad: <tt>Function</tt></tt> — the callback function to call once the SVG content is loaded from the given URL receiving two arguments: the converted <code>item</code> and the original <code>svg</code> data as a string. Only required when loading from external resources.</li>
|
|
3856
3926
|
<li><tt>options.onError: <tt>Function</tt></tt> — the callback function to call if an error occurs during loading. Only required when loading from external resources.</li>
|
|
3857
3927
|
<li><tt>options.insert: <tt>Boolean</tt></tt> — whether the imported items should be added to the item that <code>importSVG()</code> is called on — default: <tt>true</tt></li>
|
|
@@ -4327,9 +4397,9 @@ Array of <a href="../classes/Item.html"><tt>Item</tt></a> objects
|
|
|
4327
4397
|
</div>
|
|
4328
4398
|
|
|
4329
4399
|
|
|
4330
|
-
<div id="reduce
|
|
4400
|
+
<div id="reduce" class="member">
|
|
4331
4401
|
<div class="member-link">
|
|
4332
|
-
<a name="reduce
|
|
4402
|
+
<a name="reduce" href="#reduce"><tt><b>reduce</b>([options])</tt></a>
|
|
4333
4403
|
</div>
|
|
4334
4404
|
<div class="member-description hidden">
|
|
4335
4405
|
<div class="member-text">
|
|
@@ -4341,9 +4411,9 @@ Array of <a href="../classes/Item.html"><tt>Item</tt></a> objects
|
|
|
4341
4411
|
|
|
4342
4412
|
<li>
|
|
4343
4413
|
<tt>options:</tt>
|
|
4344
|
-
|
|
4345
|
-
|
|
4346
|
-
|
|
4414
|
+
<tt>Object</tt>
|
|
4415
|
+
— the options passed on to <a href="../classes/Path.html#reduce-options"><tt>path.reduce(options)</tt></a>
|
|
4416
|
+
— optional
|
|
4347
4417
|
</li>
|
|
4348
4418
|
|
|
4349
4419
|
</ul>
|
|
@@ -4732,7 +4802,7 @@ Array of <a href="../classes/Item.html"><tt>Item</tt></a> objects
|
|
|
4732
4802
|
</div>
|
|
4733
4803
|
<div class="member-description hidden">
|
|
4734
4804
|
<div class="member-text">
|
|
4735
|
-
<p>Checks if this item is above the specified item in the stacking order of the project.</p>
|
|
4805
|
+
<p>Checks if this item is above the specified item in the stacking order of the project. If one item is a descendant of the other, neither is above the other and <code>false</code> is returned.</p>
|
|
4736
4806
|
|
|
4737
4807
|
|
|
4738
4808
|
<ul class="member-list">
|
|
@@ -4773,7 +4843,7 @@ Array of <a href="../classes/Item.html"><tt>Item</tt></a> objects
|
|
|
4773
4843
|
</div>
|
|
4774
4844
|
<div class="member-description hidden">
|
|
4775
4845
|
<div class="member-text">
|
|
4776
|
-
<p>Checks if the item is below the specified item in the stacking order of the project.</p>
|
|
4846
|
+
<p>Checks if the item is below the specified item in the stacking order of the project. If one item is a descendant of the other, neither is below the other and <code>false</code> is returned.</p>
|
|
4777
4847
|
|
|
4778
4848
|
|
|
4779
4849
|
<ul class="member-list">
|
|
@@ -5731,11 +5801,11 @@ circle.scale(3, 1);
|
|
|
5731
5801
|
|
|
5732
5802
|
<div id="fitbounds-rectangle" class="member">
|
|
5733
5803
|
<div class="member-link">
|
|
5734
|
-
<a name="fitbounds-rectangle" href="#fitbounds-rectangle"><tt><b>fitBounds</b>(rectangle[,
|
|
5804
|
+
<a name="fitbounds-rectangle" href="#fitbounds-rectangle"><tt><b>fitBounds</b>(rectangle[, fit])</tt></a>
|
|
5735
5805
|
</div>
|
|
5736
5806
|
<div class="member-description hidden">
|
|
5737
5807
|
<div class="member-text">
|
|
5738
|
-
<p>Transform the item so that its <a href="../classes/Item.html#bounds"><tt>bounds</tt></a>
|
|
5808
|
+
<p>Transform the item so that its <a href="../classes/Item.html#bounds"><tt>bounds</tt></a> are centered in the specified rectangle and fitted to it as described by <code>fit</code>.</p>
|
|
5739
5809
|
|
|
5740
5810
|
|
|
5741
5811
|
<ul class="member-list">
|
|
@@ -5749,10 +5819,10 @@ circle.scale(3, 1);
|
|
|
5749
5819
|
</li>
|
|
5750
5820
|
|
|
5751
5821
|
<li>
|
|
5752
|
-
<tt>
|
|
5753
|
-
<tt>Boolean</tt>
|
|
5754
|
-
|
|
5755
|
-
— optional, default: <tt
|
|
5822
|
+
<tt>fit:</tt>
|
|
5823
|
+
<tt>String</tt>⟋<tt>Boolean</tt>
|
|
5824
|
+
— how to fit the item, as in CSS’s <code>object-fit</code>: <code>'contain'</code> fits all of it within the rectangle, <code>'cover'</code> makes it cover the whole rectangle, and <code>'fill'</code> stretches it to the rectangle, changing its aspect ratio. The deprecated <code>true</code> and <code>false</code> stand for <code>'cover'</code> and <code>'contain'</code>.
|
|
5825
|
+
— optional, default: <tt>‘contain’</tt>
|
|
5756
5826
|
</li>
|
|
5757
5827
|
|
|
5758
5828
|
</ul>
|
|
@@ -5794,7 +5864,7 @@ circlePath.fitBounds(path.bounds);
|
|
|
5794
5864
|
</div>
|
|
5795
5865
|
|
|
5796
5866
|
|
|
5797
|
-
<h4>Example:<span class="description">Fitting an item to the bounding rectangle of another item's bounding rectangle
|
|
5867
|
+
<h4>Example:<span class="description">Fitting an item to the bounding rectangle of another item's bounding rectangle, covering all of it:</span></h4>
|
|
5798
5868
|
|
|
5799
5869
|
<div class="paperscript split">
|
|
5800
5870
|
|
|
@@ -5821,7 +5891,7 @@ var circlePath = new Path.Circle({
|
|
|
5821
5891
|
|
|
5822
5892
|
// Fit the circlePath to the bounding rectangle of
|
|
5823
5893
|
// the rectangular path:
|
|
5824
|
-
circlePath.fitBounds(path.bounds,
|
|
5894
|
+
circlePath.fitBounds(path.bounds, 'cover');
|
|
5825
5895
|
</script>
|
|
5826
5896
|
<div class="canvas"><canvas width="516" height="100" id="canvas-46"></canvas></div>
|
|
5827
5897
|
</div>
|
|
@@ -6471,7 +6541,7 @@ function onMouseDown(event) {
|
|
|
6471
6541
|
<ul class="member-list">
|
|
6472
6542
|
<h4>Options:</h4>
|
|
6473
6543
|
<li><tt>options.duration: <tt>Number</tt></tt> — the duration of the tweening</li>
|
|
6474
|
-
<li><tt>options.easing: <tt>Function</tt>⟋<tt>String</tt></tt> — an easing function or the type of the easing: <tt>‘linear’ ‘easeInQuad’ ‘easeOutQuad’ ‘easeInOutQuad’ ‘easeInCubic’ ‘easeOutCubic’ ‘easeInOutCubic’ ‘easeInQuart’ ‘easeOutQuart’ ‘easeInOutQuart’ ‘easeInQuint’ ‘easeOutQuint’ ‘easeInOutQuint’</tt> — default: <tt>‘linear’</tt></li>
|
|
6544
|
+
<li><tt>options.easing: <tt>Function</tt>⟋<tt>String</tt></tt> — an easing function or the type of the easing: <tt>‘linear’ ‘easeInQuad’ ‘easeOutQuad’ ‘easeInOutQuad’ ‘easeInCubic’ ‘easeOutCubic’ ‘easeInOutCubic’ ‘easeInQuart’ ‘easeOutQuart’ ‘easeInOutQuart’ ‘easeInQuint’ ‘easeOutQuint’ ‘easeInOutQuint’ ‘easeInSine’ ‘easeOutSine’ ‘easeInOutSine’ ‘easeInExpo’ ‘easeOutExpo’ ‘easeInOutExpo’ ‘easeInCirc’ ‘easeOutCirc’ ‘easeInOutCirc’</tt> — default: <tt>‘linear’</tt></li>
|
|
6475
6545
|
<li><tt>options.start: <tt>Boolean</tt></tt> — whether to start tweening automatically — default: <tt>true</tt></li>
|
|
6476
6546
|
</ul>
|
|
6477
6547
|
|
|
@@ -6859,7 +6929,7 @@ path.tweenFrom({ fillColor: 'red' }, { duration: 1000 });
|
|
|
6859
6929
|
|
|
6860
6930
|
<!-- =========================== copyright notice ========================== -->
|
|
6861
6931
|
<p class="footer">
|
|
6862
|
-
Paper.js v0.
|
|
6932
|
+
Paper.js v0.13.0<br>
|
|
6863
6933
|
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
6934
|
<div class="content-end"></div>
|
|
6865
6935
|
|
|
@@ -243,6 +243,7 @@ tool.onMouseDrag = function(event) {
|
|
|
243
243
|
|
|
244
244
|
<div class="member-text">
|
|
245
245
|
<p>The function to be called the mouse moves within the project view. The function receives a <a href="../classes/ToolEvent.html"><tt>ToolEvent</tt></a> object which contains information about the tool event.</p>
|
|
246
|
+
<p>While the mouse button is held down, the tool calls <a href="../classes/Tool.html#onmousedrag"><tt>onMouseDrag</tt></a> instead, if it defines one, and <code>onMouseMove</code> only otherwise.</p>
|
|
246
247
|
|
|
247
248
|
|
|
248
249
|
|
|
@@ -752,7 +753,7 @@ tool.onKeyDown = function(event) {
|
|
|
752
753
|
|
|
753
754
|
<!-- =========================== copyright notice ========================== -->
|
|
754
755
|
<p class="footer">
|
|
755
|
-
Paper.js v0.
|
|
756
|
+
Paper.js v0.13.0<br>
|
|
756
757
|
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
758
|
<div class="content-end"></div>
|
|
758
759
|
|
|
@@ -55,6 +55,32 @@
|
|
|
55
55
|
|
|
56
56
|
|
|
57
57
|
|
|
58
|
+
</div>
|
|
59
|
+
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
<div id="tool" class="member">
|
|
65
|
+
<div class="member-link">
|
|
66
|
+
<a name="tool" href="#tool"><tt><b>tool</b></tt></a>
|
|
67
|
+
</div>
|
|
68
|
+
<div class="member-description hidden">
|
|
69
|
+
|
|
70
|
+
<div class="member-text">
|
|
71
|
+
<p>The tool that fired the event.</p>
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
<ul class="member-list">
|
|
76
|
+
<h4>Type:</h4>
|
|
77
|
+
<li>
|
|
78
|
+
<a href="../classes/Tool.html"><tt>Tool</tt></a>
|
|
79
|
+
</li>
|
|
80
|
+
</ul>
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
|
|
58
84
|
</div>
|
|
59
85
|
|
|
60
86
|
</div>
|
|
@@ -437,7 +463,7 @@ function onMouseUp(event) {
|
|
|
437
463
|
|
|
438
464
|
<!-- =========================== copyright notice ========================== -->
|
|
439
465
|
<p class="footer">
|
|
440
|
-
Paper.js v0.
|
|
466
|
+
Paper.js v0.13.0<br>
|
|
441
467
|
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
468
|
<div class="content-end"></div>
|
|
443
469
|
|
|
@@ -365,7 +365,7 @@ setTimeout(function(){
|
|
|
365
365
|
|
|
366
366
|
<!-- =========================== copyright notice ========================== -->
|
|
367
367
|
<p class="footer">
|
|
368
|
-
Paper.js v0.
|
|
368
|
+
Paper.js v0.13.0<br>
|
|
369
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
|
|