p5 2.2.1-rc.0 → 2.2.1

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 (117) hide show
  1. package/dist/accessibility/color_namer.js +5 -6
  2. package/dist/accessibility/describe.js +4 -26
  3. package/dist/accessibility/index.js +5 -6
  4. package/dist/accessibility/outputs.js +6 -38
  5. package/dist/app.js +5 -6
  6. package/dist/color/color_conversion.js +5 -6
  7. package/dist/color/creating_reading.js +1 -1
  8. package/dist/color/index.js +2 -2
  9. package/dist/color/p5.Color.js +1 -1
  10. package/dist/color/setting.js +59 -357
  11. package/dist/{constants-DEJVKr9Z.js → constants-DQyACdzq.js} +11 -61
  12. package/dist/core/constants.js +1 -1
  13. package/dist/core/environment.js +26 -158
  14. package/dist/core/filterShaders.js +1 -1
  15. package/dist/core/friendly_errors/fes_core.js +1 -1
  16. package/dist/core/friendly_errors/file_errors.js +1 -1
  17. package/dist/core/friendly_errors/index.js +1 -1
  18. package/dist/core/friendly_errors/param_validator.js +1 -1
  19. package/dist/core/friendly_errors/sketch_verifier.js +1 -1
  20. package/dist/core/helpers.js +1 -1
  21. package/dist/core/init.js +5 -6
  22. package/dist/core/internationalization.js +1 -1
  23. package/dist/core/legacy.js +5 -6
  24. package/dist/core/main.js +5 -6
  25. package/dist/core/p5.Graphics.js +4 -5
  26. package/dist/core/p5.Renderer.js +3 -4
  27. package/dist/core/p5.Renderer2D.js +5 -6
  28. package/dist/core/p5.Renderer3D.js +4 -5
  29. package/dist/core/rendering.js +4 -5
  30. package/dist/core/structure.js +13 -52
  31. package/dist/core/transform.js +32 -176
  32. package/dist/{creating_reading-CgHCHxqN.js → creating_reading-ZXzcZEsb.js} +3 -196
  33. package/dist/data/local_storage.js +4 -30
  34. package/dist/dom/dom.js +24 -159
  35. package/dist/dom/index.js +2 -2
  36. package/dist/dom/p5.Element.js +31 -208
  37. package/dist/dom/p5.File.js +1 -32
  38. package/dist/dom/p5.MediaElement.js +10 -113
  39. package/dist/events/acceleration.js +11 -64
  40. package/dist/events/keyboard.js +13 -81
  41. package/dist/events/pointer.js +18 -160
  42. package/dist/image/const.js +1 -1
  43. package/dist/image/filterRenderer2D.js +4 -5
  44. package/dist/image/image.js +4 -5
  45. package/dist/image/index.js +4 -5
  46. package/dist/image/loading_displaying.js +4 -5
  47. package/dist/image/p5.Image.js +3 -4
  48. package/dist/image/pixels.js +17 -100
  49. package/dist/io/files.js +4 -5
  50. package/dist/io/index.js +4 -5
  51. package/dist/io/p5.Table.js +66 -158
  52. package/dist/io/p5.TableRow.js +48 -71
  53. package/dist/io/p5.XML.js +6 -99
  54. package/dist/io/utilities.js +8 -3
  55. package/dist/{main-_RXV5Lx8.js → main-DvN69W3f.js} +13 -42
  56. package/dist/math/Matrices/Matrix.js +87 -126
  57. package/dist/math/Matrices/MatrixNumjs.js +1 -5
  58. package/dist/math/calculation.js +10 -112
  59. package/dist/math/index.js +1 -1
  60. package/dist/math/math.js +2 -12
  61. package/dist/math/noise.js +5 -32
  62. package/dist/math/p5.Matrix.js +3 -3
  63. package/dist/math/p5.Vector.js +104 -345
  64. package/dist/math/random.js +5 -32
  65. package/dist/math/trigonometry.js +15 -105
  66. package/dist/{p5.Renderer-QoFcvj3f.js → p5.Renderer-D-5LdCRz.js} +25 -178
  67. package/dist/{rendering-CsICjEXA.js → rendering-h9unX5K0.js} +254 -1156
  68. package/dist/shape/2d_primitives.js +33 -194
  69. package/dist/shape/attributes.js +12 -73
  70. package/dist/shape/curves.js +30 -95
  71. package/dist/shape/custom_shapes.js +63 -144
  72. package/dist/shape/index.js +2 -2
  73. package/dist/shape/vertex.js +21 -106
  74. package/dist/strands/p5.strands.js +248 -46
  75. package/dist/type/index.js +3 -4
  76. package/dist/type/p5.Font.js +4 -49
  77. package/dist/type/textCore.js +5 -158
  78. package/dist/utilities/conversion.js +17 -104
  79. package/dist/utilities/time_date.js +3 -40
  80. package/dist/utilities/utility_functions.js +6 -48
  81. package/dist/webgl/3d_primitives.js +4 -5
  82. package/dist/webgl/GeometryBuilder.js +1 -2
  83. package/dist/webgl/ShapeBuilder.js +22 -2
  84. package/dist/webgl/enums.js +1 -1
  85. package/dist/webgl/index.js +4 -5
  86. package/dist/webgl/interaction.js +6 -33
  87. package/dist/webgl/light.js +4 -5
  88. package/dist/webgl/loading.js +12 -46
  89. package/dist/webgl/material.js +4 -5
  90. package/dist/webgl/p5.Camera.js +4 -5
  91. package/dist/webgl/p5.DataArray.js +0 -4
  92. package/dist/webgl/p5.Framebuffer.js +4 -5
  93. package/dist/webgl/p5.Geometry.js +12 -106
  94. package/dist/webgl/p5.Quat.js +1 -1
  95. package/dist/webgl/p5.RendererGL.js +7 -18
  96. package/dist/webgl/p5.Shader.js +12 -36
  97. package/dist/webgl/p5.Texture.js +4 -5
  98. package/dist/webgl/text.js +4 -5
  99. package/dist/webgl/utils.js +4 -5
  100. package/dist/webgpu/index.js +1 -1
  101. package/dist/webgpu/p5.RendererWebGPU.js +529 -208
  102. package/dist/webgpu/shaders/color.js +32 -17
  103. package/dist/webgpu/shaders/filters/base.js +18 -7
  104. package/dist/webgpu/shaders/font.js +52 -40
  105. package/dist/webgpu/shaders/line.js +50 -36
  106. package/dist/webgpu/shaders/material.js +90 -83
  107. package/dist/webgpu/strands_wgslBackend.js +5 -2
  108. package/lib/p5.esm.js +5576 -7811
  109. package/lib/p5.esm.min.js +1 -1
  110. package/lib/p5.js +5576 -7811
  111. package/lib/p5.min.js +1 -1
  112. package/lib/p5.webgpu.esm.js +786 -453
  113. package/lib/p5.webgpu.js +786 -453
  114. package/lib/p5.webgpu.min.js +1 -1
  115. package/package.json +13 -13
  116. package/types/global.d.ts +16905 -16783
  117. package/types/p5.d.ts +11142 -11081
@@ -1,23 +1,22 @@
1
1
  import color_conversion from '../color/color_conversion.js';
2
- import '../main-_RXV5Lx8.js';
3
- import '../constants-DEJVKr9Z.js';
2
+ import '../main-DvN69W3f.js';
3
+ import '../constants-DQyACdzq.js';
4
4
  import '../core/transform.js';
5
5
  import '../core/structure.js';
6
6
  import '../core/environment.js';
7
- import '../rendering-CsICjEXA.js';
8
- import '../creating_reading-CgHCHxqN.js';
7
+ import '../rendering-h9unX5K0.js';
8
+ import '../creating_reading-ZXzcZEsb.js';
9
9
  import 'colorjs.io/fn';
10
10
  import '../color/color_spaces/hsb.js';
11
11
  import '../dom/p5.Element.js';
12
12
  import '../dom/p5.File.js';
13
13
  import '../io/p5.XML.js';
14
- import '../p5.Renderer-QoFcvj3f.js';
14
+ import '../p5.Renderer-D-5LdCRz.js';
15
15
  import '../image/filters.js';
16
16
  import '../math/p5.Vector.js';
17
17
  import '../shape/custom_shapes.js';
18
18
  import '../core/States.js';
19
19
  import '../io/utilities.js';
20
- import 'file-saver';
21
20
  import '../dom/p5.MediaElement.js';
22
21
  import '../shape/2d_primitives.js';
23
22
  import '../core/helpers.js';
@@ -36,8 +36,6 @@ function describe(p5, fn){
36
36
  * @param {(FALLBACK|LABEL)} [display] either LABEL or FALLBACK.
37
37
  *
38
38
  * @example
39
- * <div>
40
- * <code>
41
39
  * function setup() {
42
40
  * background('pink');
43
41
  *
@@ -51,11 +49,8 @@ function describe(p5, fn){
51
49
  * // Add a general description of the canvas.
52
50
  * describe('A pink square with a red heart in the bottom-right corner.');
53
51
  * }
54
- * </code>
55
- * </div>
56
52
  *
57
- * <div>
58
- * <code>
53
+ * @example
59
54
  * function setup() {
60
55
  * background('pink');
61
56
  *
@@ -70,12 +65,8 @@ function describe(p5, fn){
70
65
  * // and display it for debugging.
71
66
  * describe('A pink square with a red heart in the bottom-right corner.', LABEL);
72
67
  * }
73
- * </code>
74
- * </div>
75
- *
76
- * <div>
77
- * <code>
78
68
  *
69
+ * @example
79
70
  * function setup(){
80
71
  * createCanvas(100, 100);
81
72
  * };
@@ -96,12 +87,8 @@ function describe(p5, fn){
96
87
  * // Add a general description of the canvas.
97
88
  * describe(`A green circle at (${x}, 50) moves from left to right on a gray square.`);
98
89
  * }
99
- * </code>
100
- * </div>
101
- *
102
- * <div>
103
- * <code>
104
90
  *
91
+ * @example
105
92
  * function setup(){
106
93
  * createCanvas(100, 100);
107
94
  * }
@@ -123,8 +110,6 @@ function describe(p5, fn){
123
110
  * // and display it for debugging.
124
111
  * describe(`A green circle at (${x}, 50) moves from left to right on a gray square.`, LABEL);
125
112
  * }
126
- * </code>
127
- * </div>
128
113
  */
129
114
  fn.describe = function(text, display) {
130
115
  // p5._validateParameters('describe', arguments);
@@ -197,8 +182,6 @@ function describe(p5, fn){
197
182
  * @param {(FALLBACK|LABEL)} [display] either LABEL or FALLBACK.
198
183
  *
199
184
  * @example
200
- * <div>
201
- * <code>
202
185
  * function setup() {
203
186
  * background('pink');
204
187
  *
@@ -220,11 +203,8 @@ function describe(p5, fn){
220
203
  * // Add a general description of the canvas.
221
204
  * describe('A red heart and yellow circle over a pink background.');
222
205
  * }
223
- * </code>
224
- * </div>
225
206
  *
226
- * <div>
227
- * <code>
207
+ * @example
228
208
  * function setup() {
229
209
  * background('pink');
230
210
  *
@@ -248,8 +228,6 @@ function describe(p5, fn){
248
228
  * // Add a general description of the canvas.
249
229
  * describe('A red heart and yellow circle over a pink background.');
250
230
  * }
251
- * </code>
252
- * </div>
253
231
  */
254
232
 
255
233
  fn.describeElement = function(name, text, display) {
@@ -4,25 +4,24 @@ import textOutput from './textOutput.js';
4
4
  import outputs from './outputs.js';
5
5
  import colorNamer from './color_namer.js';
6
6
  import '../color/color_conversion.js';
7
- import '../main-_RXV5Lx8.js';
8
- import '../constants-DEJVKr9Z.js';
7
+ import '../main-DvN69W3f.js';
8
+ import '../constants-DQyACdzq.js';
9
9
  import '../core/transform.js';
10
10
  import '../core/structure.js';
11
11
  import '../core/environment.js';
12
- import '../rendering-CsICjEXA.js';
13
- import '../creating_reading-CgHCHxqN.js';
12
+ import '../rendering-h9unX5K0.js';
13
+ import '../creating_reading-ZXzcZEsb.js';
14
14
  import 'colorjs.io/fn';
15
15
  import '../color/color_spaces/hsb.js';
16
16
  import '../dom/p5.Element.js';
17
17
  import '../dom/p5.File.js';
18
18
  import '../io/p5.XML.js';
19
- import '../p5.Renderer-QoFcvj3f.js';
19
+ import '../p5.Renderer-D-5LdCRz.js';
20
20
  import '../image/filters.js';
21
21
  import '../math/p5.Vector.js';
22
22
  import '../shape/custom_shapes.js';
23
23
  import '../core/States.js';
24
24
  import '../io/utilities.js';
25
- import 'file-saver';
26
25
  import '../dom/p5.MediaElement.js';
27
26
  import '../shape/2d_primitives.js';
28
27
  import '../core/helpers.js';
@@ -40,8 +40,6 @@ function outputs(p5, fn){
40
40
  * @param {(FALLBACK|LABEL)} [display] either FALLBACK or LABEL.
41
41
  *
42
42
  * @example
43
- * <div>
44
- * <code>
45
43
  * function setup() {
46
44
  * // Add the text description.
47
45
  * textOutput();
@@ -56,11 +54,8 @@ function outputs(p5, fn){
56
54
  * // Add a general description of the canvas.
57
55
  * describe('A red circle and a blue square on a gray background.');
58
56
  * }
59
- * </code>
60
- * </div>
61
57
  *
62
- * <div>
63
- * <code>
58
+ * @example
64
59
  * function setup() {
65
60
  * // Add the text description and
66
61
  * // display it for debugging.
@@ -76,12 +71,8 @@ function outputs(p5, fn){
76
71
  * // Add a general description of the canvas.
77
72
  * describe('A red circle and a blue square on a gray background.');
78
73
  * }
79
- * </code>
80
- * </div>
81
- *
82
- * <div>
83
- * <code>
84
74
  *
75
+ * @example
85
76
  * function setup(){
86
77
  * createCanvas(100, 100);
87
78
  * }
@@ -101,12 +92,8 @@ function outputs(p5, fn){
101
92
  * // Add a general description of the canvas.
102
93
  * describe('A red circle moves from left to right above a blue square.');
103
94
  * }
104
- * </code>
105
- * </div>
106
- *
107
- * <div>
108
- * <code>
109
95
  *
96
+ * @example
110
97
  * function setup(){
111
98
  * createCanvas(100, 100);
112
99
  * }
@@ -127,8 +114,6 @@ function outputs(p5, fn){
127
114
  * // Add a general description of the canvas.
128
115
  * describe('A red circle moves from left to right above a blue square.');
129
116
  * }
130
- * </code>
131
- * </div>
132
117
  */
133
118
  fn.textOutput = function(display) {
134
119
  // p5._validateParameters('textOutput', arguments);
@@ -184,8 +169,6 @@ function outputs(p5, fn){
184
169
  * @param {(FALLBACK|LABEL)} [display] either FALLBACK or LABEL.
185
170
  *
186
171
  * @example
187
- * <div>
188
- * <code>
189
172
  * function setup() {
190
173
  * // Add the grid description.
191
174
  * gridOutput();
@@ -200,11 +183,8 @@ function outputs(p5, fn){
200
183
  * // Add a general description of the canvas.
201
184
  * describe('A red circle and a blue square on a gray background.');
202
185
  * }
203
- * </code>
204
- * </div>
205
186
  *
206
- * <div>
207
- * <code>
187
+ * @example
208
188
  * function setup() {
209
189
  * // Add the grid description and
210
190
  * // display it for debugging.
@@ -220,12 +200,8 @@ function outputs(p5, fn){
220
200
  * // Add a general description of the canvas.
221
201
  * describe('A red circle and a blue square on a gray background.');
222
202
  * }
223
- * </code>
224
- * </div>
225
- *
226
- * <div>
227
- * <code>
228
203
  *
204
+ * @example
229
205
  * function setup() {
230
206
  * createCanvas(100, 100);
231
207
  * }
@@ -245,12 +221,8 @@ function outputs(p5, fn){
245
221
  * // Add a general description of the canvas.
246
222
  * describe('A red circle moves from left to right above a blue square.');
247
223
  * }
248
- * </code>
249
- * </div>
250
- *
251
- * <div>
252
- * <code>
253
224
  *
225
+ * @example
254
226
  * function setup(){
255
227
  * createCanvas(100, 100);
256
228
  * }
@@ -271,11 +243,7 @@ function outputs(p5, fn){
271
243
  * // Add a general description of the canvas.
272
244
  * describe('A red circle moves from left to right above a blue square.');
273
245
  * }
274
- * </code>
275
- * </div>
276
246
  */
277
-
278
-
279
247
  fn.gridOutput = function(display) {
280
248
  // p5._validateParameters('gridOutput', arguments);
281
249
  //if gridOutput is already true
package/dist/app.js CHANGED
@@ -1,4 +1,4 @@
1
- import { p as p5 } from './main-_RXV5Lx8.js';
1
+ import { p as p5 } from './main-DvN69W3f.js';
2
2
  import shape from './shape/index.js';
3
3
  import accessibility from './accessibility/index.js';
4
4
  import color from './color/index.js';
@@ -15,24 +15,23 @@ import type from './type/index.js';
15
15
  import shader from './webgl/p5.Shader.js';
16
16
  import strands from './strands/p5.strands.js';
17
17
  import { waitForDocumentReady, waitingForTranslator, _globalInit } from './core/init.js';
18
- import './constants-DEJVKr9Z.js';
18
+ import './constants-DQyACdzq.js';
19
19
  import './core/transform.js';
20
20
  import './core/structure.js';
21
21
  import './core/environment.js';
22
- import './rendering-CsICjEXA.js';
23
- import './creating_reading-CgHCHxqN.js';
22
+ import './rendering-h9unX5K0.js';
23
+ import './creating_reading-ZXzcZEsb.js';
24
24
  import 'colorjs.io/fn';
25
25
  import './color/color_spaces/hsb.js';
26
26
  import './dom/p5.Element.js';
27
27
  import './dom/p5.File.js';
28
28
  import './io/p5.XML.js';
29
- import './p5.Renderer-QoFcvj3f.js';
29
+ import './p5.Renderer-D-5LdCRz.js';
30
30
  import './image/filters.js';
31
31
  import './math/p5.Vector.js';
32
32
  import './shape/custom_shapes.js';
33
33
  import './core/States.js';
34
34
  import './io/utilities.js';
35
- import 'file-saver';
36
35
  import './dom/p5.MediaElement.js';
37
36
  import './shape/2d_primitives.js';
38
37
  import './core/helpers.js';
@@ -1,22 +1,21 @@
1
- import { p as p5 } from '../main-_RXV5Lx8.js';
2
- import '../constants-DEJVKr9Z.js';
1
+ import { p as p5 } from '../main-DvN69W3f.js';
2
+ import '../constants-DQyACdzq.js';
3
3
  import '../core/transform.js';
4
4
  import '../core/structure.js';
5
5
  import '../core/environment.js';
6
- import '../rendering-CsICjEXA.js';
7
- import '../creating_reading-CgHCHxqN.js';
6
+ import '../rendering-h9unX5K0.js';
7
+ import '../creating_reading-ZXzcZEsb.js';
8
8
  import 'colorjs.io/fn';
9
9
  import './color_spaces/hsb.js';
10
10
  import '../dom/p5.Element.js';
11
11
  import '../dom/p5.File.js';
12
12
  import '../io/p5.XML.js';
13
- import '../p5.Renderer-QoFcvj3f.js';
13
+ import '../p5.Renderer-D-5LdCRz.js';
14
14
  import '../image/filters.js';
15
15
  import '../math/p5.Vector.js';
16
16
  import '../shape/custom_shapes.js';
17
17
  import '../core/States.js';
18
18
  import '../io/utilities.js';
19
- import 'file-saver';
20
19
  import '../dom/p5.MediaElement.js';
21
20
  import '../shape/2d_primitives.js';
22
21
  import '../core/helpers.js';
@@ -1,3 +1,3 @@
1
- export { H as HSB, d as HSL, e as HWB, L as LAB, f as LCH, O as OKLAB, g as OKLCH, R as RGB, h as RGBA, b as RGBHDR, c as default } from '../creating_reading-CgHCHxqN.js';
1
+ export { H as HSB, d as HSL, e as HWB, L as LAB, f as LCH, O as OKLAB, g as OKLCH, R as RGB, h as RGBA, b as RGBHDR, c as default } from '../creating_reading-ZXzcZEsb.js';
2
2
  import 'colorjs.io/fn';
3
3
  import './color_spaces/hsb.js';
@@ -1,8 +1,8 @@
1
- import { c as creatingReading, a as color$1 } from '../creating_reading-CgHCHxqN.js';
1
+ import { c as creatingReading, a as color$1 } from '../creating_reading-ZXzcZEsb.js';
2
2
  import setting from './setting.js';
3
3
  import 'colorjs.io/fn';
4
4
  import './color_spaces/hsb.js';
5
- import '../constants-DEJVKr9Z.js';
5
+ import '../constants-DQyACdzq.js';
6
6
 
7
7
  function color(p5){
8
8
  p5.registerAddon(creatingReading);
@@ -1,3 +1,3 @@
1
- export { C as Color, a as default } from '../creating_reading-CgHCHxqN.js';
1
+ export { C as Color, a as default } from '../creating_reading-ZXzcZEsb.js';
2
2
  import 'colorjs.io/fn';
3
3
  import './color_spaces/hsb.js';