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.
Files changed (51) hide show
  1. package/CHANGELOG.md +233 -0
  2. package/README.md +29 -13
  3. package/dist/docs/assets/js/paper.js +788 -365
  4. package/dist/docs/classes/Color.html +63 -47
  5. package/dist/docs/classes/CompoundPath.html +162 -59
  6. package/dist/docs/classes/Curve.html +9 -7
  7. package/dist/docs/classes/CurveLocation.html +1 -1
  8. package/dist/docs/classes/Event.html +1 -1
  9. package/dist/docs/classes/Gradient.html +1 -1
  10. package/dist/docs/classes/GradientStop.html +1 -1
  11. package/dist/docs/classes/Group.html +63 -24
  12. package/dist/docs/classes/HitResult.html +1 -1
  13. package/dist/docs/classes/Item.html +63 -24
  14. package/dist/docs/classes/Key.html +1 -1
  15. package/dist/docs/classes/KeyEvent.html +1 -1
  16. package/dist/docs/classes/Layer.html +63 -24
  17. package/dist/docs/classes/Matrix.html +1 -1
  18. package/dist/docs/classes/MouseEvent.html +1 -1
  19. package/dist/docs/classes/PaperScope.html +87 -1
  20. package/dist/docs/classes/PaperScript.html +1 -1
  21. package/dist/docs/classes/Path.html +174 -68
  22. package/dist/docs/classes/PathItem.html +280 -177
  23. package/dist/docs/classes/Point.html +143 -21
  24. package/dist/docs/classes/PointText.html +94 -24
  25. package/dist/docs/classes/Project.html +14 -8
  26. package/dist/docs/classes/Raster.html +93 -35
  27. package/dist/docs/classes/Rectangle.html +12 -11
  28. package/dist/docs/classes/Segment.html +1 -1
  29. package/dist/docs/classes/Shape.html +63 -24
  30. package/dist/docs/classes/Size.html +81 -21
  31. package/dist/docs/classes/Style.html +34 -2
  32. package/dist/docs/classes/SymbolDefinition.html +1 -1
  33. package/dist/docs/classes/SymbolItem.html +64 -25
  34. package/dist/docs/classes/TextItem.html +94 -24
  35. package/dist/docs/classes/Tool.html +2 -1
  36. package/dist/docs/classes/ToolEvent.html +27 -1
  37. package/dist/docs/classes/Tween.html +1 -1
  38. package/dist/docs/classes/View.html +203 -10
  39. package/dist/docs/classes/global.html +1 -1
  40. package/dist/docs/classes/index.html +2 -2
  41. package/dist/docs/index.html +1 -1
  42. package/dist/node/canvas.js +1 -1
  43. package/dist/node/self.js +4 -3
  44. package/dist/paper-core.js +769 -354
  45. package/dist/paper-core.min.js +3 -3
  46. package/dist/paper-full.js +788 -365
  47. package/dist/paper-full.min.js +3 -3
  48. package/dist/paper.d.ts +324 -73
  49. package/examples/Rasters/Smoothing.html +1 -1
  50. package/package.json +1 -8
  51. package/dist/node/xml.js +0 -40
@@ -554,7 +554,7 @@ path.fillColor = gradientColor;
554
554
 
555
555
 
556
556
  <div class="member-text">
557
- <p>Returns the addition of the supplied value to both coordinates of the color as a new color. The object itself is not modified!</p>
557
+ <p>Returns the addition of the supplied value to all components of the color as a new color. The object itself is not modified!</p>
558
558
 
559
559
  <ul class="member-list">
560
560
  <h4>Parameters:</h4>
@@ -585,9 +585,10 @@ path.fillColor = gradientColor;
585
585
  <h4>Example:</h4>
586
586
 
587
587
 
588
- <pre><code>var color = new Color(0.5, 1, 1);
589
- var result = color + 1;
590
- console.log(result); // { red: 1, blue: 1, green: 1 }</code></pre>
588
+ <pre><code>var color = new Color(0.5, 0.25, 0);
589
+ var result = color + 0.25; // PaperScript
590
+ var result = color.add(0.25); // JavaScript
591
+ console.log(result); // { red: 0.75, green: 0.5, blue: 0.25 }</code></pre>
591
592
 
592
593
  </div>
593
594
 
@@ -627,8 +628,9 @@ console.log(result); // { red: 1, blue: 1, green: 1 }</code></pre>
627
628
 
628
629
  <pre><code>var color1 = new Color(0, 1, 1);
629
630
  var color2 = new Color(1, 0, 0);
630
- var result = color1 + color2;
631
- console.log(result); // { red: 1, blue: 1, green: 1 }</code></pre>
631
+ var result = color1 + color2; // PaperScript
632
+ var result = color1.add(color2); // JavaScript
633
+ console.log(result); // { red: 1, green: 1, blue: 1 }</code></pre>
632
634
 
633
635
  </div>
634
636
 
@@ -645,7 +647,7 @@ console.log(result); // { red: 1, blue: 1, green: 1 }</code></pre>
645
647
 
646
648
 
647
649
  <div class="member-text">
648
- <p>Returns the subtraction of the supplied value to both coordinates of the color as a new color. The object itself is not modified!</p>
650
+ <p>Returns the subtraction of the supplied value to all components of the color as a new color. The object itself is not modified!</p>
649
651
 
650
652
  <ul class="member-list">
651
653
  <h4>Parameters:</h4>
@@ -677,8 +679,9 @@ console.log(result); // { red: 1, blue: 1, green: 1 }</code></pre>
677
679
 
678
680
 
679
681
  <pre><code>var color = new Color(0.5, 1, 1);
680
- var result = color - 1;
681
- console.log(result); // { red: 0, blue: 0, green: 0 }</code></pre>
682
+ var result = color - 0.5; // PaperScript
683
+ var result = color.subtract(0.5); // JavaScript
684
+ console.log(result); // { red: 0, green: 0.5, blue: 0.5 }</code></pre>
682
685
 
683
686
  </div>
684
687
 
@@ -716,10 +719,11 @@ console.log(result); // { red: 0, blue: 0, green: 0 }</code></pre>
716
719
  <h4>Example:</h4>
717
720
 
718
721
 
719
- <pre><code>var color1 = new Color(0, 1, 1);
722
+ <pre><code>var color1 = new Color(1, 1, 1);
720
723
  var color2 = new Color(1, 0, 0);
721
- var result = color1 - color2;
722
- console.log(result); // { red: 0, blue: 1, green: 1 }</code></pre>
724
+ var result = color1 - color2; // PaperScript
725
+ var result = color1.subtract(color2); // JavaScript
726
+ console.log(result); // { red: 0, green: 1, blue: 1 }</code></pre>
723
727
 
724
728
  </div>
725
729
 
@@ -736,7 +740,7 @@ console.log(result); // { red: 0, blue: 1, green: 1 }</code></pre>
736
740
 
737
741
 
738
742
  <div class="member-text">
739
- <p>Returns the multiplication of the supplied value to both coordinates of the color as a new color. The object itself is not modified!</p>
743
+ <p>Returns the multiplication of the supplied value to all components of the color as a new color. The object itself is not modified!</p>
740
744
 
741
745
  <ul class="member-list">
742
746
  <h4>Parameters:</h4>
@@ -768,8 +772,9 @@ console.log(result); // { red: 0, blue: 1, green: 1 }</code></pre>
768
772
 
769
773
 
770
774
  <pre><code>var color = new Color(0.5, 1, 1);
771
- var result = color * 0.5;
772
- console.log(result); // { red: 0.25, blue: 0.5, green: 0.5 }</code></pre>
775
+ var result = color * 0.5; // PaperScript
776
+ var result = color.multiply(0.5); // JavaScript
777
+ console.log(result); // { red: 0.25, green: 0.5, blue: 0.5 }</code></pre>
773
778
 
774
779
  </div>
775
780
 
@@ -809,8 +814,9 @@ console.log(result); // { red: 0.25, blue: 0.5, green: 0.5 }</code></pre>
809
814
 
810
815
  <pre><code>var color1 = new Color(0, 1, 1);
811
816
  var color2 = new Color(0.5, 0, 0.5);
812
- var result = color1 * color2;
813
- console.log(result); // { red: 0, blue: 0, green: 0.5 }</code></pre>
817
+ var result = color1 * color2; // PaperScript
818
+ var result = color1.multiply(color2); // JavaScript
819
+ console.log(result); // { red: 0, green: 0, blue: 0.5 }</code></pre>
814
820
 
815
821
  </div>
816
822
 
@@ -827,7 +833,7 @@ console.log(result); // { red: 0, blue: 0, green: 0.5 }</code></pre>
827
833
 
828
834
 
829
835
  <div class="member-text">
830
- <p>Returns the division of the supplied value to both coordinates of the color as a new color. The object itself is not modified!</p>
836
+ <p>Returns the division of the supplied value to all components of the color as a new color. The object itself is not modified!</p>
831
837
 
832
838
  <ul class="member-list">
833
839
  <h4>Parameters:</h4>
@@ -859,8 +865,9 @@ console.log(result); // { red: 0, blue: 0, green: 0.5 }</code></pre>
859
865
 
860
866
 
861
867
  <pre><code>var color = new Color(0.5, 1, 1);
862
- var result = color / 2;
863
- console.log(result); // { red: 0.25, blue: 0.5, green: 0.5 }</code></pre>
868
+ var result = color / 2; // PaperScript
869
+ var result = color.divide(2); // JavaScript
870
+ console.log(result); // { red: 0.25, green: 0.5, blue: 0.5 }</code></pre>
864
871
 
865
872
  </div>
866
873
 
@@ -899,9 +906,10 @@ console.log(result); // { red: 0.25, blue: 0.5, green: 0.5 }</code></pre>
899
906
 
900
907
 
901
908
  <pre><code>var color1 = new Color(0, 1, 1);
902
- var color2 = new Color(0.5, 0, 0.5);
903
- var result = color1 / color2;
904
- console.log(result); // { red: 0, blue: 0, green: 1 }</code></pre>
909
+ var color2 = new Color(0.5, 1, 2);
910
+ var result = color1 / color2; // PaperScript
911
+ var result = color1.divide(color2); // JavaScript
912
+ console.log(result); // { red: 0, green: 1, blue: 0.5 }</code></pre>
905
913
 
906
914
  </div>
907
915
 
@@ -1737,7 +1745,7 @@ function onMouseMove(event) {
1737
1745
  </div>
1738
1746
  <div class="member-description hidden">
1739
1747
  <div class="member-text">
1740
- <p>Returns the addition of the supplied value to both coordinates of the color as a new color. The object itself is not modified!</p>
1748
+ <p>Returns the addition of the supplied value to all components of the color as a new color. The object itself is not modified!</p>
1741
1749
 
1742
1750
 
1743
1751
  <ul class="member-list">
@@ -1769,9 +1777,10 @@ function onMouseMove(event) {
1769
1777
  <h4>Example:</h4>
1770
1778
 
1771
1779
 
1772
- <pre><code>var color = new Color(0.5, 1, 1);
1773
- var result = color + 1;
1774
- console.log(result); // { red: 1, blue: 1, green: 1 }</code></pre>
1780
+ <pre><code>var color = new Color(0.5, 0.25, 0);
1781
+ var result = color + 0.25; // PaperScript
1782
+ var result = color.add(0.25); // JavaScript
1783
+ console.log(result); // { red: 0.75, green: 0.5, blue: 0.25 }</code></pre>
1775
1784
 
1776
1785
  </div>
1777
1786
  </div>
@@ -1818,8 +1827,9 @@ console.log(result); // { red: 1, blue: 1, green: 1 }</code></pre>
1818
1827
 
1819
1828
  <pre><code>var color1 = new Color(0, 1, 1);
1820
1829
  var color2 = new Color(1, 0, 0);
1821
- var result = color1 + color2;
1822
- console.log(result); // { red: 1, blue: 1, green: 1 }</code></pre>
1830
+ var result = color1 + color2; // PaperScript
1831
+ var result = color1.add(color2); // JavaScript
1832
+ console.log(result); // { red: 1, green: 1, blue: 1 }</code></pre>
1823
1833
 
1824
1834
  </div>
1825
1835
  </div>
@@ -1835,7 +1845,7 @@ console.log(result); // { red: 1, blue: 1, green: 1 }</code></pre>
1835
1845
  </div>
1836
1846
  <div class="member-description hidden">
1837
1847
  <div class="member-text">
1838
- <p>Returns the subtraction of the supplied value to both coordinates of the color as a new color. The object itself is not modified!</p>
1848
+ <p>Returns the subtraction of the supplied value to all components of the color as a new color. The object itself is not modified!</p>
1839
1849
 
1840
1850
 
1841
1851
  <ul class="member-list">
@@ -1868,8 +1878,9 @@ console.log(result); // { red: 1, blue: 1, green: 1 }</code></pre>
1868
1878
 
1869
1879
 
1870
1880
  <pre><code>var color = new Color(0.5, 1, 1);
1871
- var result = color - 1;
1872
- console.log(result); // { red: 0, blue: 0, green: 0 }</code></pre>
1881
+ var result = color - 0.5; // PaperScript
1882
+ var result = color.subtract(0.5); // JavaScript
1883
+ console.log(result); // { red: 0, green: 0.5, blue: 0.5 }</code></pre>
1873
1884
 
1874
1885
  </div>
1875
1886
  </div>
@@ -1914,10 +1925,11 @@ console.log(result); // { red: 0, blue: 0, green: 0 }</code></pre>
1914
1925
  <h4>Example:</h4>
1915
1926
 
1916
1927
 
1917
- <pre><code>var color1 = new Color(0, 1, 1);
1928
+ <pre><code>var color1 = new Color(1, 1, 1);
1918
1929
  var color2 = new Color(1, 0, 0);
1919
- var result = color1 - color2;
1920
- console.log(result); // { red: 0, blue: 1, green: 1 }</code></pre>
1930
+ var result = color1 - color2; // PaperScript
1931
+ var result = color1.subtract(color2); // JavaScript
1932
+ console.log(result); // { red: 0, green: 1, blue: 1 }</code></pre>
1921
1933
 
1922
1934
  </div>
1923
1935
  </div>
@@ -1933,7 +1945,7 @@ console.log(result); // { red: 0, blue: 1, green: 1 }</code></pre>
1933
1945
  </div>
1934
1946
  <div class="member-description hidden">
1935
1947
  <div class="member-text">
1936
- <p>Returns the multiplication of the supplied value to both coordinates of the color as a new color. The object itself is not modified!</p>
1948
+ <p>Returns the multiplication of the supplied value to all components of the color as a new color. The object itself is not modified!</p>
1937
1949
 
1938
1950
 
1939
1951
  <ul class="member-list">
@@ -1966,8 +1978,9 @@ console.log(result); // { red: 0, blue: 1, green: 1 }</code></pre>
1966
1978
 
1967
1979
 
1968
1980
  <pre><code>var color = new Color(0.5, 1, 1);
1969
- var result = color * 0.5;
1970
- console.log(result); // { red: 0.25, blue: 0.5, green: 0.5 }</code></pre>
1981
+ var result = color * 0.5; // PaperScript
1982
+ var result = color.multiply(0.5); // JavaScript
1983
+ console.log(result); // { red: 0.25, green: 0.5, blue: 0.5 }</code></pre>
1971
1984
 
1972
1985
  </div>
1973
1986
  </div>
@@ -2014,8 +2027,9 @@ console.log(result); // { red: 0.25, blue: 0.5, green: 0.5 }</code></pre>
2014
2027
 
2015
2028
  <pre><code>var color1 = new Color(0, 1, 1);
2016
2029
  var color2 = new Color(0.5, 0, 0.5);
2017
- var result = color1 * color2;
2018
- console.log(result); // { red: 0, blue: 0, green: 0.5 }</code></pre>
2030
+ var result = color1 * color2; // PaperScript
2031
+ var result = color1.multiply(color2); // JavaScript
2032
+ console.log(result); // { red: 0, green: 0, blue: 0.5 }</code></pre>
2019
2033
 
2020
2034
  </div>
2021
2035
  </div>
@@ -2031,7 +2045,7 @@ console.log(result); // { red: 0, blue: 0, green: 0.5 }</code></pre>
2031
2045
  </div>
2032
2046
  <div class="member-description hidden">
2033
2047
  <div class="member-text">
2034
- <p>Returns the division of the supplied value to both coordinates of the color as a new color. The object itself is not modified!</p>
2048
+ <p>Returns the division of the supplied value to all components of the color as a new color. The object itself is not modified!</p>
2035
2049
 
2036
2050
 
2037
2051
  <ul class="member-list">
@@ -2064,8 +2078,9 @@ console.log(result); // { red: 0, blue: 0, green: 0.5 }</code></pre>
2064
2078
 
2065
2079
 
2066
2080
  <pre><code>var color = new Color(0.5, 1, 1);
2067
- var result = color / 2;
2068
- console.log(result); // { red: 0.25, blue: 0.5, green: 0.5 }</code></pre>
2081
+ var result = color / 2; // PaperScript
2082
+ var result = color.divide(2); // JavaScript
2083
+ console.log(result); // { red: 0.25, green: 0.5, blue: 0.5 }</code></pre>
2069
2084
 
2070
2085
  </div>
2071
2086
  </div>
@@ -2111,9 +2126,10 @@ console.log(result); // { red: 0.25, blue: 0.5, green: 0.5 }</code></pre>
2111
2126
 
2112
2127
 
2113
2128
  <pre><code>var color1 = new Color(0, 1, 1);
2114
- var color2 = new Color(0.5, 0, 0.5);
2115
- var result = color1 / color2;
2116
- console.log(result); // { red: 0, blue: 0, green: 1 }</code></pre>
2129
+ var color2 = new Color(0.5, 1, 2);
2130
+ var result = color1 / color2; // PaperScript
2131
+ var result = color1.divide(color2); // JavaScript
2132
+ console.log(result); // { red: 0, green: 1, blue: 0.5 }</code></pre>
2117
2133
 
2118
2134
  </div>
2119
2135
  </div>
@@ -2179,7 +2195,7 @@ circle.fillColor = Color.random();
2179
2195
 
2180
2196
  <!-- =========================== copyright notice ========================== -->
2181
2197
  <p class="footer">
2182
- Paper.js v0.12.20<br>
2198
+ Paper.js v0.13.0<br>
2183
2199
  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
2200
  <div class="content-end"></div>
2185
2201