paper 0.12.17 → 0.12.19

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 (46) hide show
  1. package/CHANGELOG.md +44 -1
  2. package/dist/docs/assets/js/paper.js +107 -61
  3. package/dist/docs/classes/Color.html +2 -2
  4. package/dist/docs/classes/CompoundPath.html +3 -4
  5. package/dist/docs/classes/Curve.html +2 -2
  6. package/dist/docs/classes/CurveLocation.html +2 -2
  7. package/dist/docs/classes/Event.html +2 -2
  8. package/dist/docs/classes/Gradient.html +2 -2
  9. package/dist/docs/classes/GradientStop.html +2 -2
  10. package/dist/docs/classes/Group.html +3 -4
  11. package/dist/docs/classes/HitResult.html +2 -2
  12. package/dist/docs/classes/Item.html +3 -4
  13. package/dist/docs/classes/Key.html +2 -2
  14. package/dist/docs/classes/KeyEvent.html +2 -2
  15. package/dist/docs/classes/Layer.html +3 -4
  16. package/dist/docs/classes/Matrix.html +2 -2
  17. package/dist/docs/classes/MouseEvent.html +2 -2
  18. package/dist/docs/classes/PaperScope.html +2 -2
  19. package/dist/docs/classes/PaperScript.html +2 -2
  20. package/dist/docs/classes/Path.html +3 -4
  21. package/dist/docs/classes/PathItem.html +3 -4
  22. package/dist/docs/classes/Point.html +2 -2
  23. package/dist/docs/classes/PointText.html +3 -4
  24. package/dist/docs/classes/Project.html +3 -2
  25. package/dist/docs/classes/Raster.html +3 -4
  26. package/dist/docs/classes/Rectangle.html +2 -2
  27. package/dist/docs/classes/Segment.html +2 -2
  28. package/dist/docs/classes/Shape.html +3 -4
  29. package/dist/docs/classes/Size.html +2 -2
  30. package/dist/docs/classes/Style.html +2 -2
  31. package/dist/docs/classes/SymbolDefinition.html +2 -2
  32. package/dist/docs/classes/SymbolItem.html +3 -4
  33. package/dist/docs/classes/TextItem.html +3 -4
  34. package/dist/docs/classes/Tool.html +2 -2
  35. package/dist/docs/classes/ToolEvent.html +2 -2
  36. package/dist/docs/classes/Tween.html +2 -2
  37. package/dist/docs/classes/View.html +3 -3
  38. package/dist/docs/classes/global.html +2 -2
  39. package/dist/docs/classes/index.html +2 -2
  40. package/dist/docs/index.html +1 -1
  41. package/dist/paper-core.js +106 -60
  42. package/dist/paper-core.min.js +3 -3
  43. package/dist/paper-full.js +107 -61
  44. package/dist/paper-full.min.js +3 -3
  45. package/dist/paper.d.ts +10 -4
  46. package/package.json +8 -5
package/CHANGELOG.md CHANGED
@@ -1,5 +1,48 @@
1
1
  # Change Log
2
2
 
3
+ ## `0.12.19`
4
+
5
+ ### Security
6
+
7
+ - Fix XSS in `#importSVG()`: imported SVG is now attached to a sandboxed iframe
8
+ instead of the page while its styles are computed, so it can't run scripts or
9
+ load resources (#2100).
10
+
11
+ ### Changed
12
+
13
+ - `#importSVG()` is no longer affected by the page's style sheets. Style sheets
14
+ inside the imported SVG still apply.
15
+
16
+ ### Fixed
17
+
18
+ - Restore `settings.applyMatrix` and `settings.insertItems` when `#importSVG()`
19
+ fails.
20
+ - Fix `new Path.Rectangle(rectangle, radius)`, `new Shape.Rectangle(rectangle,
21
+ radius)` and `Item#fitBounds(rectangle, fill)` when the rectangle is given as
22
+ an array or object literal.
23
+ - Fix `new Raster(source, position)` ignoring the position.
24
+ - Fix `new Path.Arc()` handling of `insert`: `{ insert: false }` shadowed
25
+ `Path#insert()`, and `{ insert: true }` was ignored.
26
+ - Fix tweening of points, colors and relative values in `paper-core`, which
27
+ relied on PaperScript.
28
+ - Fix setting `ToolEvent#count`, which had no effect.
29
+ - Fix `new Shape({ type: 'circle', radius })` without a size, which threw.
30
+ - Fix `View#getPixelSize()` returning `NaN` for views without an element, as in
31
+ web workers, which broke `leading` for font sizes in units other than pixels.
32
+ - Only publish the intended files to npm, removing an accidental copy of the
33
+ whole distribution from the package (12.3 MB → 6.2 MB unpacked).
34
+
35
+ ## `0.12.18`
36
+
37
+ ### Fixed
38
+
39
+ - Fix transformation in SvgImport (#1926).
40
+
41
+ ### Added
42
+
43
+ - Implement `options.reduceAttributes` option for SVG export (#1895).
44
+ - Add setter for item.index (#1908).
45
+
3
46
  ## `0.12.17`
4
47
 
5
48
  - Properly warning in Chrome Console by providing `{ willReadFrequently: true }`
@@ -13,7 +56,7 @@
13
56
  - Fix new warning in Chrome Console by providing `{ willReadFrequently: true }`
14
57
  canvas context option where needed (#1999, #2000, #2003).
15
58
  - Fix `Path.*` constructor properties handling when passing `{ insert: true }`
16
- -
59
+
17
60
  ### Changed
18
61
 
19
62
  - Rename `Raster#setImageData()` to `#putImageData()`.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Paper.js v0.12.17 - The Swiss Army Knife of Vector Graphics Scripting.
2
+ * Paper.js v0.12.19 - The Swiss Army Knife of Vector Graphics Scripting.
3
3
  * http://paperjs.org/
4
4
  *
5
5
  * Copyright (c) 2011 - 2020, Jürg Lehni & Jonathan Puckey
@@ -9,7 +9,7 @@
9
9
  *
10
10
  * All rights reserved.
11
11
  *
12
- * Date: Thu Nov 3 21:15:36 2022 +0100
12
+ * Date: Sun Oct 18 13:05:31 2026 +0200
13
13
  *
14
14
  ***
15
15
  *
@@ -821,7 +821,7 @@ var PaperScope = Base.extend({
821
821
  }
822
822
  },
823
823
 
824
- version: "0.12.17",
824
+ version: "0.12.19",
825
825
 
826
826
  getView: function() {
827
827
  var project = this.project;
@@ -1919,7 +1919,9 @@ var Rectangle = Base.extend({
1919
1919
  } else if (type === 'undefined' || arg0 === null) {
1920
1920
  this._set(0, 0, 0, 0);
1921
1921
  read = arg0 === null ? 1 : 0;
1922
- } else if (args.length === 1) {
1922
+ } else if (args.length === 1
1923
+ || Array.isArray(arg0) && arg0.length === 4
1924
+ || arg0.x !== undefined && arg0.width !== undefined) {
1923
1925
  if (Array.isArray(arg0)) {
1924
1926
  this._set.apply(this, arg0);
1925
1927
  read = 1;
@@ -3819,6 +3821,15 @@ new function() {
3819
3821
  return this._index;
3820
3822
  },
3821
3823
 
3824
+ setIndex: function(index) {
3825
+ var parent = this._parent,
3826
+ children = parent && parent._children;
3827
+ if (children) {
3828
+ parent.insertChildren(index in children ? index : undefined,
3829
+ [this]);
3830
+ }
3831
+ },
3832
+
3822
3833
  equals: function(item) {
3823
3834
  return item === this || item && this._class === item._class
3824
3835
  && this._style.equals(item._style)
@@ -4638,6 +4649,7 @@ new function() {
4638
4649
 
4639
4650
  fitBounds: function(rectangle, fill) {
4640
4651
  rectangle = Rectangle.read(arguments);
4652
+ fill = Base.read(arguments);
4641
4653
  var bounds = this.getBounds(),
4642
4654
  itemRatio = bounds.height / bounds.width,
4643
4655
  rectRatio = rectangle.height / rectangle.width,
@@ -5093,7 +5105,11 @@ var Shape = Item.extend({
5093
5105
  return;
5094
5106
  var size = radius * 2;
5095
5107
  this._radius = radius;
5096
- this._size._set(size, size);
5108
+ if (this._size) {
5109
+ this._size._set(size, size);
5110
+ } else {
5111
+ this._size = new Size(size, size);
5112
+ }
5097
5113
  } else {
5098
5114
  radius = Size.read(arguments);
5099
5115
  if (!this._radius) {
@@ -5370,7 +5386,7 @@ var Raster = Item.extend({
5370
5386
 
5371
5387
  initialize: function Raster(source, position) {
5372
5388
  if (!this._initialize(source,
5373
- position !== undefined && Point.read(arguments))) {
5389
+ position !== undefined && Point.read([position]))) {
5374
5390
  var image,
5375
5391
  type = typeof source,
5376
5392
  object = type === 'string'
@@ -10077,12 +10093,10 @@ Path.inject({ statics: new function() {
10077
10093
  from = Point.readNamed(args, 'from'),
10078
10094
  through = Point.readNamed(args, 'through'),
10079
10095
  to = Point.readNamed(args, 'to'),
10080
- props = Base.getNamed(args),
10081
- path = new Path(props && props.insert == false
10082
- && Item.NO_INSERT);
10083
- path.moveTo(from);
10084
- path.arcTo(through, to);
10085
- return path.set(props);
10096
+ arc = new Path(Item.NO_INSERT);
10097
+ arc.moveTo(from);
10098
+ arc.arcTo(through, to);
10099
+ return createPath(arc._segments, false, args);
10086
10100
  },
10087
10101
 
10088
10102
  RegularPolygon: function() {
@@ -13102,7 +13116,7 @@ var View = Base.extend(Emitter, {
13102
13116
  pixels = parseFloat(DomElement.getStyles(temp).fontSize);
13103
13117
  parent.removeChild(temp);
13104
13118
  } else {
13105
- pixels = parseFloat(pixels);
13119
+ pixels = parseFloat(size);
13106
13120
  }
13107
13121
  return pixels;
13108
13122
  },
@@ -13926,8 +13940,8 @@ var ToolEvent = Event.extend({
13926
13940
  },
13927
13941
 
13928
13942
  setCount: function(count) {
13929
- this.tool[/^mouse(down|up)$/.test(this.type) ? 'downCount' : 'count']
13930
- = count;
13943
+ this.tool[/^mouse(down|up)$/.test(this.type)
13944
+ ? '_downCount' : '_moveCount'] = count;
13931
13945
  },
13932
13946
 
13933
13947
  getItem: function() {
@@ -14013,8 +14027,6 @@ var Tool = PaperScopeItem.extend({
14013
14027
  type = 'mousemove';
14014
14028
  var move = mouse.move || mouse.drag,
14015
14029
  responds = this.responds(type),
14016
- minDistance = this.minDistance,
14017
- maxDistance = this.maxDistance,
14018
14030
  called = false,
14019
14031
  tool = this;
14020
14032
  function update(minDistance, maxDistance) {
@@ -14057,10 +14069,10 @@ var Tool = PaperScopeItem.extend({
14057
14069
  update();
14058
14070
  emit();
14059
14071
  } else if (mouse.up) {
14060
- update(null, maxDistance);
14072
+ update(null, this._maxDistance);
14061
14073
  emit();
14062
14074
  } else if (responds) {
14063
- while (update(minDistance, maxDistance))
14075
+ while (update(this._minDistance, this._maxDistance))
14064
14076
  emit();
14065
14077
  }
14066
14078
  return called;
@@ -14194,8 +14206,8 @@ var Tween = Base.extend(Emitter, {
14194
14206
  var key = keys[i],
14195
14207
  from = getValue(this._from[key]),
14196
14208
  to = getValue(this._to[key]),
14197
- value = (from && to && from.__add && to.__add)
14198
- ? to.__subtract(from).__multiply(factor).__add(from)
14209
+ value = (from && to && from.multiply && to.multiply)
14210
+ ? to.subtract(from).multiply(factor).add(from)
14199
14211
  : ((to - from) * factor) + from;
14200
14212
  this._setProperty(this._parsedKeys[key], value);
14201
14213
  }
@@ -14276,7 +14288,16 @@ var Tween = Base.extend(Emitter, {
14276
14288
  },
14277
14289
 
14278
14290
  _calculate: function(left, operator, right) {
14279
- return paper.PaperScript.calculateBinary(left, operator, right);
14291
+ var name = { '+': 'add', '-': 'subtract', '*': 'multiply',
14292
+ '/': 'divide' }[operator];
14293
+ if (left && left[name])
14294
+ return left[name](right);
14295
+ switch (operator) {
14296
+ case '+': return left + right;
14297
+ case '-': return left - right;
14298
+ case '*': return left * right;
14299
+ case '/': return left / right;
14300
+ }
14280
14301
  },
14281
14302
 
14282
14303
  _parseKeys: function(keys) {
@@ -14975,7 +14996,7 @@ new function() {
14975
14996
  PointText: exportText
14976
14997
  };
14977
14998
 
14978
- function applyStyle(item, node, isRoot) {
14999
+ function applyStyle(item, node, options, isRoot) {
14979
15000
  var attrs = {},
14980
15001
  parent = !isRoot && item.getParent(),
14981
15002
  style = [];
@@ -14989,7 +15010,8 @@ new function() {
14989
15010
  value = item[get]();
14990
15011
  if (entry.exportFilter
14991
15012
  ? entry.exportFilter(item, value)
14992
- : !parent || !Base.equals(parent[get](), value)) {
15013
+ : options.reduceAttributes == false
15014
+ || !parent || !Base.equals(parent[get](), value)) {
14993
15015
  if (type === 'color' && value != null) {
14994
15016
  var alpha = value.getAlpha();
14995
15017
  if (alpha < 1)
@@ -15071,7 +15093,7 @@ new function() {
15071
15093
  if (data && data !== '{}' && data !== 'null')
15072
15094
  node.setAttribute('data-paper-data', data);
15073
15095
  }
15074
- return node && applyStyle(item, node, isRoot);
15096
+ return node && applyStyle(item, node, options, isRoot);
15075
15097
  }
15076
15098
 
15077
15099
  function setOptions(options) {
@@ -15361,7 +15383,7 @@ new function() {
15361
15383
  if (!transform)
15362
15384
  break;
15363
15385
  var parts = transform.split(/\(\s*/),
15364
- command = parts[0],
15386
+ command = parts[0].trim(),
15365
15387
  v = parts[1].split(/[\s,]+/g);
15366
15388
  for (var j = 0, m = v.length; j < m; j++)
15367
15389
  v[j] = parseFloat(v[j]);
@@ -15537,10 +15559,27 @@ new function() {
15537
15559
  return res;
15538
15560
  }
15539
15561
 
15562
+ var sandbox;
15563
+
15564
+ function getSandbox() {
15565
+ if (!(sandbox && sandbox.contentDocument)) {
15566
+ sandbox = document.createElement('iframe');
15567
+ sandbox.setAttribute('sandbox', 'allow-same-origin');
15568
+ sandbox.style.cssText = 'position: absolute; visibility: hidden;'
15569
+ + ' width: 0; height: 0; border: 0';
15570
+ document.body.appendChild(sandbox);
15571
+ var doc = sandbox.contentDocument,
15572
+ meta = doc.createElement('meta');
15573
+ meta.httpEquiv = 'Content-Security-Policy';
15574
+ meta.content = "default-src 'none'; style-src 'unsafe-inline'";
15575
+ doc.head.appendChild(meta);
15576
+ }
15577
+ return sandbox.contentDocument.body;
15578
+ }
15579
+
15540
15580
  function importNode(node, options, isRoot) {
15541
15581
  var type = node.nodeName.toLowerCase(),
15542
15582
  isElement = type !== '#document',
15543
- body = document.body,
15544
15583
  container,
15545
15584
  parent,
15546
15585
  next;
@@ -15553,46 +15592,53 @@ new function() {
15553
15592
  parent = node.parentNode;
15554
15593
  next = node.nextSibling;
15555
15594
  container.appendChild(node);
15556
- body.appendChild(container);
15595
+ getSandbox().appendChild(container);
15557
15596
  }
15558
15597
  var settings = paper.settings,
15559
15598
  applyMatrix = settings.applyMatrix,
15560
- insertItems = settings.insertItems;
15561
- settings.applyMatrix = false;
15562
- settings.insertItems = false;
15563
- var importer = importers[type],
15564
- item = importer && importer(node, type, options, isRoot) || null;
15565
- settings.insertItems = insertItems;
15566
- settings.applyMatrix = applyMatrix;
15567
- if (item) {
15568
- if (isElement && !(item instanceof Group))
15569
- item = applyAttributes(item, node, isRoot);
15570
- var onImport = options.onImport,
15571
- data = isElement && node.getAttribute('data-paper-data');
15572
- if (onImport)
15573
- item = onImport(node, item, options) || item;
15574
- if (options.expandShapes && item instanceof Shape) {
15575
- item.remove();
15576
- item = item.toPath();
15577
- }
15578
- if (data)
15579
- item._data = JSON.parse(data);
15580
- }
15581
- if (container) {
15582
- body.removeChild(container);
15583
- if (parent) {
15584
- if (next) {
15585
- parent.insertBefore(node, next);
15586
- } else {
15587
- parent.appendChild(node);
15599
+ insertItems = settings.insertItems,
15600
+ item;
15601
+ try {
15602
+ settings.applyMatrix = false;
15603
+ settings.insertItems = false;
15604
+ try {
15605
+ var importer = importers[type];
15606
+ item = importer && importer(node, type, options, isRoot)
15607
+ || null;
15608
+ } finally {
15609
+ settings.insertItems = insertItems;
15610
+ settings.applyMatrix = applyMatrix;
15611
+ }
15612
+ if (item) {
15613
+ if (isElement && !(item instanceof Group))
15614
+ item = applyAttributes(item, node, isRoot);
15615
+ var onImport = options.onImport,
15616
+ data = isElement && node.getAttribute('data-paper-data');
15617
+ if (onImport)
15618
+ item = onImport(node, item, options) || item;
15619
+ if (options.expandShapes && item instanceof Shape) {
15620
+ item.remove();
15621
+ item = item.toPath();
15622
+ }
15623
+ if (data)
15624
+ item._data = JSON.parse(data);
15625
+ }
15626
+ } finally {
15627
+ if (container) {
15628
+ container.parentNode.removeChild(container);
15629
+ if (parent) {
15630
+ if (next) {
15631
+ parent.insertBefore(node, next);
15632
+ } else {
15633
+ parent.appendChild(node);
15634
+ }
15588
15635
  }
15589
15636
  }
15637
+ if (isRoot)
15638
+ definitions = {};
15590
15639
  }
15591
- if (isRoot) {
15592
- definitions = {};
15593
- if (item && Base.pick(options.applyMatrix, applyMatrix))
15594
- item.matrix.apply(true, true);
15595
- }
15640
+ if (isRoot && item && Base.pick(options.applyMatrix, applyMatrix))
15641
+ item.matrix.apply(true, true);
15596
15642
  return item;
15597
15643
  }
15598
15644
 
@@ -2179,8 +2179,8 @@ circle.fillColor = Color.random();
2179
2179
 
2180
2180
  <!-- =========================== copyright notice ========================== -->
2181
2181
  <p class="footer">
2182
- Paper.js v0.12.17<br>
2183
- Copyright &#169; 2011—2022 <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>
2182
+ Paper.js v0.12.19<br>
2183
+ 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>
2184
2184
  <div class="content-end"></div>
2185
2185
 
2186
2186
 
@@ -1782,8 +1782,6 @@ group.firstChild.fillColor = 'green';
1782
1782
  <div class="member-text">
1783
1783
  <p>The index of this item within the list of its parent&rsquo;s children.</p>
1784
1784
 
1785
- <p>Read only.</p>
1786
-
1787
1785
 
1788
1786
 
1789
1787
  <ul class="member-list">
@@ -3936,6 +3934,7 @@ function onMouseDown(event) {
3936
3934
  <li><tt>options.precision: <tt>Number</tt></tt> &mdash; the amount of fractional digits in numbers used in SVG data &mdash;&nbsp;default: <tt>5</tt></li>
3937
3935
  <li><tt>options.matchShapes: <tt>Boolean</tt></tt> &mdash; whether path items should tried to be converted to SVG shape items (rect, circle, ellipse, line, polyline, polygon), if their geometries match &mdash;&nbsp;default: <tt>false</tt></li>
3938
3936
  <li><tt>options.embedImages: <tt>Boolean</tt></tt> &mdash; whether raster images should be embedded as base64 data inlined in the xlink:href attribute, or kept as a link to their external URL. &mdash;&nbsp;default: <tt>true</tt></li>
3937
+ <li><tt>options.reduceAttributes: <tt>Boolean</tt></tt> &mdash; 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). &mdash;&nbsp;default: <tt>true</tt></li>
3939
3938
  </ul>
3940
3939
 
3941
3940
  <ul class="member-list">
@@ -8868,8 +8867,8 @@ path.smooth();
8868
8867
 
8869
8868
  <!-- =========================== copyright notice ========================== -->
8870
8869
  <p class="footer">
8871
- Paper.js v0.12.17<br>
8872
- Copyright &#169; 2011—2022 <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>
8870
+ Paper.js v0.12.19<br>
8871
+ 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>
8873
8872
  <div class="content-end"></div>
8874
8873
 
8875
8874
 
@@ -2314,8 +2314,8 @@
2314
2314
 
2315
2315
  <!-- =========================== copyright notice ========================== -->
2316
2316
  <p class="footer">
2317
- Paper.js v0.12.17<br>
2318
- Copyright &#169; 2011—2022 <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>
2317
+ Paper.js v0.12.19<br>
2318
+ 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>
2319
2319
  <div class="content-end"></div>
2320
2320
 
2321
2321
 
@@ -663,8 +663,8 @@
663
663
 
664
664
  <!-- =========================== copyright notice ========================== -->
665
665
  <p class="footer">
666
- Paper.js v0.12.17<br>
667
- Copyright &#169; 2011—2022 <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>
666
+ Paper.js v0.12.19<br>
667
+ 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
668
  <div class="content-end"></div>
669
669
 
670
670
 
@@ -167,8 +167,8 @@
167
167
 
168
168
  <!-- =========================== copyright notice ========================== -->
169
169
  <p class="footer">
170
- Paper.js v0.12.17<br>
171
- Copyright &#169; 2011—2022 <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>
170
+ Paper.js v0.12.19<br>
171
+ 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
172
  <div class="content-end"></div>
173
173
 
174
174
 
@@ -231,8 +231,8 @@ path.fillColor = {
231
231
 
232
232
  <!-- =========================== copyright notice ========================== -->
233
233
  <p class="footer">
234
- Paper.js v0.12.17<br>
235
- Copyright &#169; 2011—2022 <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>
234
+ Paper.js v0.12.19<br>
235
+ 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
236
  <div class="content-end"></div>
237
237
 
238
238
 
@@ -264,8 +264,8 @@ function onFrame(event) {
264
264
 
265
265
  <!-- =========================== copyright notice ========================== -->
266
266
  <p class="footer">
267
- Paper.js v0.12.17<br>
268
- Copyright &#169; 2011—2022 <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>
267
+ Paper.js v0.12.19<br>
268
+ 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
269
  <div class="content-end"></div>
270
270
 
271
271
 
@@ -1650,8 +1650,6 @@ group.firstChild.fillColor = 'green';
1650
1650
  <div class="member-text">
1651
1651
  <p>The index of this item within the list of its parent&rsquo;s children.</p>
1652
1652
 
1653
- <p>Read only.</p>
1654
-
1655
1653
 
1656
1654
 
1657
1655
  <ul class="member-list">
@@ -3804,6 +3802,7 @@ function onMouseDown(event) {
3804
3802
  <li><tt>options.precision: <tt>Number</tt></tt> &mdash; the amount of fractional digits in numbers used in SVG data &mdash;&nbsp;default: <tt>5</tt></li>
3805
3803
  <li><tt>options.matchShapes: <tt>Boolean</tt></tt> &mdash; whether path items should tried to be converted to SVG shape items (rect, circle, ellipse, line, polyline, polygon), if their geometries match &mdash;&nbsp;default: <tt>false</tt></li>
3806
3804
  <li><tt>options.embedImages: <tt>Boolean</tt></tt> &mdash; whether raster images should be embedded as base64 data inlined in the xlink:href attribute, or kept as a link to their external URL. &mdash;&nbsp;default: <tt>true</tt></li>
3805
+ <li><tt>options.reduceAttributes: <tt>Boolean</tt></tt> &mdash; 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). &mdash;&nbsp;default: <tt>true</tt></li>
3807
3806
  </ul>
3808
3807
 
3809
3808
  <ul class="member-list">
@@ -6855,8 +6854,8 @@ path.tweenFrom({ fillColor: 'red' }, { duration: 1000 });
6855
6854
 
6856
6855
  <!-- =========================== copyright notice ========================== -->
6857
6856
  <p class="footer">
6858
- Paper.js v0.12.17<br>
6859
- Copyright &#169; 2011—2022 <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>
6857
+ Paper.js v0.12.19<br>
6858
+ 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>
6860
6859
  <div class="content-end"></div>
6861
6860
 
6862
6861
 
@@ -230,8 +230,8 @@
230
230
 
231
231
  <!-- =========================== copyright notice ========================== -->
232
232
  <p class="footer">
233
- Paper.js v0.12.17<br>
234
- Copyright &#169; 2011—2022 <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>
233
+ Paper.js v0.12.19<br>
234
+ 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
235
  <div class="content-end"></div>
236
236
 
237
237
 
@@ -1407,8 +1407,6 @@ group.firstChild.fillColor = 'green';
1407
1407
  <div class="member-text">
1408
1408
  <p>The index of this item within the list of its parent&rsquo;s children.</p>
1409
1409
 
1410
- <p>Read only.</p>
1411
-
1412
1410
 
1413
1411
 
1414
1412
  <ul class="member-list">
@@ -3565,6 +3563,7 @@ function onMouseDown(event) {
3565
3563
  <li><tt>options.precision: <tt>Number</tt></tt> &mdash; the amount of fractional digits in numbers used in SVG data &mdash;&nbsp;default: <tt>5</tt></li>
3566
3564
  <li><tt>options.matchShapes: <tt>Boolean</tt></tt> &mdash; whether path items should tried to be converted to SVG shape items (rect, circle, ellipse, line, polyline, polygon), if their geometries match &mdash;&nbsp;default: <tt>false</tt></li>
3567
3565
  <li><tt>options.embedImages: <tt>Boolean</tt></tt> &mdash; whether raster images should be embedded as base64 data inlined in the xlink:href attribute, or kept as a link to their external URL. &mdash;&nbsp;default: <tt>true</tt></li>
3566
+ <li><tt>options.reduceAttributes: <tt>Boolean</tt></tt> &mdash; 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). &mdash;&nbsp;default: <tt>true</tt></li>
3568
3567
  </ul>
3569
3568
 
3570
3569
  <ul class="member-list">
@@ -6619,8 +6618,8 @@ path.tweenFrom({ fillColor: 'red' }, { duration: 1000 });
6619
6618
 
6620
6619
  <!-- =========================== copyright notice ========================== -->
6621
6620
  <p class="footer">
6622
- Paper.js v0.12.17<br>
6623
- Copyright &#169; 2011—2022 <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>
6621
+ Paper.js v0.12.19<br>
6622
+ 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>
6624
6623
  <div class="content-end"></div>
6625
6624
 
6626
6625
 
@@ -130,8 +130,8 @@
130
130
 
131
131
  <!-- =========================== copyright notice ========================== -->
132
132
  <p class="footer">
133
- Paper.js v0.12.17<br>
134
- Copyright &#169; 2011—2022 <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>
133
+ Paper.js v0.12.19<br>
134
+ 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>
135
135
  <div class="content-end"></div>
136
136
 
137
137
 
@@ -299,8 +299,8 @@
299
299
 
300
300
  <!-- =========================== copyright notice ========================== -->
301
301
  <p class="footer">
302
- Paper.js v0.12.17<br>
303
- Copyright &#169; 2011—2022 <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>
302
+ Paper.js v0.12.19<br>
303
+ 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>
304
304
  <div class="content-end"></div>
305
305
 
306
306
 
@@ -1566,8 +1566,6 @@ group.firstChild.fillColor = 'green';
1566
1566
  <div class="member-text">
1567
1567
  <p>The index of this item within the list of its parent&rsquo;s children.</p>
1568
1568
 
1569
- <p>Read only.</p>
1570
-
1571
1569
 
1572
1570
 
1573
1571
  <ul class="member-list">
@@ -3720,6 +3718,7 @@ function onMouseDown(event) {
3720
3718
  <li><tt>options.precision: <tt>Number</tt></tt> &mdash; the amount of fractional digits in numbers used in SVG data &mdash;&nbsp;default: <tt>5</tt></li>
3721
3719
  <li><tt>options.matchShapes: <tt>Boolean</tt></tt> &mdash; whether path items should tried to be converted to SVG shape items (rect, circle, ellipse, line, polyline, polygon), if their geometries match &mdash;&nbsp;default: <tt>false</tt></li>
3722
3720
  <li><tt>options.embedImages: <tt>Boolean</tt></tt> &mdash; whether raster images should be embedded as base64 data inlined in the xlink:href attribute, or kept as a link to their external URL. &mdash;&nbsp;default: <tt>true</tt></li>
3721
+ <li><tt>options.reduceAttributes: <tt>Boolean</tt></tt> &mdash; 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). &mdash;&nbsp;default: <tt>true</tt></li>
3723
3722
  </ul>
3724
3723
 
3725
3724
  <ul class="member-list">
@@ -6841,8 +6840,8 @@ function onFrame(event) {
6841
6840
 
6842
6841
  <!-- =========================== copyright notice ========================== -->
6843
6842
  <p class="footer">
6844
- Paper.js v0.12.17<br>
6845
- Copyright &#169; 2011—2022 <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>
6843
+ Paper.js v0.12.19<br>
6844
+ 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>
6846
6845
  <div class="content-end"></div>
6847
6846
 
6848
6847
 
@@ -1735,8 +1735,8 @@ Array of <tt>Numbers</tt>
1735
1735
 
1736
1736
  <!-- =========================== copyright notice ========================== -->
1737
1737
  <p class="footer">
1738
- Paper.js v0.12.17<br>
1739
- Copyright &#169; 2011—2022 <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>
1738
+ Paper.js v0.12.19<br>
1739
+ 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>
1740
1740
  <div class="content-end"></div>
1741
1741
 
1742
1742
 
@@ -346,8 +346,8 @@
346
346
 
347
347
  <!-- =========================== copyright notice ========================== -->
348
348
  <p class="footer">
349
- Paper.js v0.12.17<br>
350
- Copyright &#169; 2011—2022 <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>
349
+ Paper.js v0.12.19<br>
350
+ 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>
351
351
  <div class="content-end"></div>
352
352
 
353
353
 
@@ -450,8 +450,8 @@
450
450
 
451
451
  <!-- =========================== copyright notice ========================== -->
452
452
  <p class="footer">
453
- Paper.js v0.12.17<br>
454
- Copyright &#169; 2011—2022 <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>
453
+ Paper.js v0.12.19<br>
454
+ 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>
455
455
  <div class="content-end"></div>
456
456
 
457
457