p5 2.3.0-rc.5 → 2.3.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 (85) hide show
  1. package/README.md +7 -11
  2. package/dist/accessibility/color_namer.js +4 -4
  3. package/dist/accessibility/index.js +4 -4
  4. package/dist/app.js +4 -4
  5. package/dist/app.node.js +4 -4
  6. package/dist/color/color_conversion.js +4 -4
  7. package/dist/color/index.js +1 -1
  8. package/dist/color/setting.js +1 -1
  9. package/dist/{constants-CdA3y5zC.js → constants-Dv6ZqA6s.js} +1 -1
  10. package/dist/core/constants.js +1 -1
  11. package/dist/core/environment.js +1 -1
  12. package/dist/core/filterShaders.js +1 -1
  13. package/dist/core/friendly_errors/fes_core.js +1 -1
  14. package/dist/core/friendly_errors/file_errors.js +1 -1
  15. package/dist/core/friendly_errors/index.js +1 -1
  16. package/dist/core/friendly_errors/param_validator.js +1 -1
  17. package/dist/core/friendly_errors/sketch_verifier.js +1 -1
  18. package/dist/core/helpers.js +1 -1
  19. package/dist/core/init.js +4 -4
  20. package/dist/core/internationalization.js +1 -1
  21. package/dist/core/legacy.js +4 -4
  22. package/dist/core/main.js +4 -4
  23. package/dist/core/p5.Graphics.js +3 -3
  24. package/dist/core/p5.Renderer.js +2 -2
  25. package/dist/core/p5.Renderer2D.js +4 -4
  26. package/dist/core/p5.Renderer3D.js +3 -3
  27. package/dist/core/rendering.js +3 -3
  28. package/dist/dom/dom.js +1 -1
  29. package/dist/dom/index.js +1 -1
  30. package/dist/dom/p5.Element.js +1 -1
  31. package/dist/dom/p5.MediaElement.js +1 -1
  32. package/dist/image/const.js +1 -1
  33. package/dist/image/filterRenderer2D.js +3 -3
  34. package/dist/image/image.js +3 -3
  35. package/dist/image/index.js +3 -3
  36. package/dist/image/loading_displaying.js +3 -3
  37. package/dist/image/p5.Image.js +2 -2
  38. package/dist/io/files.js +3 -3
  39. package/dist/io/index.js +3 -3
  40. package/dist/{main-BNYJV9Kd.js → main-BR2ALC_6.js} +3 -3
  41. package/dist/math/Matrices/Matrix.js +1 -1
  42. package/dist/math/Matrices/MatrixNumjs.js +1 -1
  43. package/dist/math/index.js +1 -1
  44. package/dist/math/p5.Matrix.js +1 -1
  45. package/dist/math/p5.Vector.js +76 -51
  46. package/dist/math/patch-vector.js +20 -8
  47. package/dist/math/trigonometry.js +1 -1
  48. package/dist/{p5.Renderer-BfhR0QHl.js → p5.Renderer-XOvhEbJn.js} +1 -1
  49. package/dist/{rendering-mbOOQwHM.js → rendering-C5lX6zKm.js} +2 -2
  50. package/dist/shape/2d_primitives.js +1 -1
  51. package/dist/shape/attributes.js +1 -1
  52. package/dist/shape/custom_shapes.js +1 -1
  53. package/dist/shape/index.js +1 -1
  54. package/dist/type/index.js +2 -2
  55. package/dist/type/p5.Font.js +2 -2
  56. package/dist/type/textCore.js +2 -2
  57. package/dist/webgl/3d_primitives.js +3 -3
  58. package/dist/webgl/GeometryBuilder.js +1 -1
  59. package/dist/webgl/ShapeBuilder.js +1 -1
  60. package/dist/webgl/enums.js +1 -1
  61. package/dist/webgl/index.js +3 -3
  62. package/dist/webgl/interaction.js +1 -1
  63. package/dist/webgl/light.js +3 -3
  64. package/dist/webgl/loading.js +3 -3
  65. package/dist/webgl/material.js +3 -3
  66. package/dist/webgl/p5.Camera.js +3 -3
  67. package/dist/webgl/p5.Framebuffer.js +3 -3
  68. package/dist/webgl/p5.Geometry.js +1 -1
  69. package/dist/webgl/p5.Quat.js +1 -1
  70. package/dist/webgl/p5.RendererGL.js +3 -3
  71. package/dist/webgl/p5.Texture.js +3 -3
  72. package/dist/webgl/text.js +3 -3
  73. package/dist/webgl/utils.js +3 -3
  74. package/dist/webgpu/index.js +1 -1
  75. package/dist/webgpu/p5.RendererWebGPU.js +1 -1
  76. package/lib/p5.esm.js +96 -59
  77. package/lib/p5.esm.min.js +1 -1
  78. package/lib/p5.js +96 -59
  79. package/lib/p5.min.js +1 -1
  80. package/lib/p5.webgpu.esm.js +1 -1
  81. package/lib/p5.webgpu.js +1 -1
  82. package/lib/p5.webgpu.min.js +1 -1
  83. package/package.json +1 -1
  84. package/types/global.d.ts +14 -14
  85. package/types/p5.d.ts +24 -31
package/package.json CHANGED
@@ -20,7 +20,7 @@
20
20
  "test/**/*.js": "eslint",
21
21
  "utils/**/*.{js,mjs}": "eslint"
22
22
  },
23
- "version": "2.3.0-rc.5",
23
+ "version": "2.3.0",
24
24
  "dependencies": {
25
25
  "@davepagurek/bezier-path": "^0.0.7",
26
26
  "@japont/unicode-range": "^1.0.0",
package/types/global.d.ts CHANGED
@@ -1322,13 +1322,6 @@ index: typeof P5.index;
1322
1322
  */
1323
1323
  hour(): number;
1324
1324
 
1325
- /**
1326
- * Each of the following decorators validates the data on vector operations.
1327
- * These ensure that the arguments are consistently formatted, and that
1328
- * pre-conditions are met.
1329
- */
1330
- vectorValidation(): void;
1331
-
1332
1325
  /**
1333
1326
  * Sets the seed value for the <a href="#/p5/random">random()</a> and
1334
1327
  * <a href="#/p5/randomGaussian">randomGaussian()</a> functions.
@@ -1380,6 +1373,13 @@ index: typeof P5.index;
1380
1373
  */
1381
1374
  ceil(n: number): number;
1382
1375
 
1376
+ /**
1377
+ * Each of the following decorators validates the data on vector operations.
1378
+ * These ensure that the arguments are consistently formatted, and that
1379
+ * pre-conditions are met.
1380
+ */
1381
+ vectorValidation(): void;
1382
+
1383
1383
  /**
1384
1384
  * Changes where ellipses, circles, and arcs are drawn.
1385
1385
  *
@@ -14102,13 +14102,6 @@ function print(data: string | number | any[]): void;
14102
14102
  */
14103
14103
  function hour(): number;
14104
14104
 
14105
- /**
14106
- * Each of the following decorators validates the data on vector operations.
14107
- * These ensure that the arguments are consistently formatted, and that
14108
- * pre-conditions are met.
14109
- */
14110
- function vectorValidation(): void;
14111
-
14112
14105
  /**
14113
14106
  * Sets the seed value for the <a href="#/p5/random">random()</a> and
14114
14107
  * <a href="#/p5/randomGaussian">randomGaussian()</a> functions.
@@ -14160,6 +14153,13 @@ function rotateBy(axesQuat?: P5.Quat): void;
14160
14153
  */
14161
14154
  function ceil(n: number): number;
14162
14155
 
14156
+ /**
14157
+ * Each of the following decorators validates the data on vector operations.
14158
+ * These ensure that the arguments are consistently formatted, and that
14159
+ * pre-conditions are met.
14160
+ */
14161
+ function vectorValidation(): void;
14162
+
14163
14163
  /**
14164
14164
  * Changes where ellipses, circles, and arcs are drawn.
14165
14165
  *
package/types/p5.d.ts CHANGED
@@ -1752,13 +1752,6 @@ declare class p5 {
1752
1752
  */
1753
1753
  hour(): number;
1754
1754
 
1755
- /**
1756
- * Each of the following decorators validates the data on vector operations.
1757
- * These ensure that the arguments are consistently formatted, and that
1758
- * pre-conditions are met.
1759
- */
1760
- vectorValidation(): void;
1761
-
1762
1755
  /**
1763
1756
  * Sets the seed value for the <a href="#/p5/random">random()</a> and
1764
1757
  * <a href="#/p5/randomGaussian">randomGaussian()</a> functions.
@@ -1810,6 +1803,13 @@ declare class p5 {
1810
1803
  */
1811
1804
  ceil(n: number): number;
1812
1805
 
1806
+ /**
1807
+ * Each of the following decorators validates the data on vector operations.
1808
+ * These ensure that the arguments are consistently formatted, and that
1809
+ * pre-conditions are met.
1810
+ */
1811
+ vectorValidation(): void;
1812
+
1813
1813
  /**
1814
1814
  * Changes where ellipses, circles, and arcs are drawn.
1815
1815
  *
@@ -17161,16 +17161,11 @@ const index: typeof __index;
17161
17161
  toString(): string;
17162
17162
 
17163
17163
  /**
17164
- * Sets the vector's `x`, `y`, and `z` components.
17164
+ * Sets the the vector to a new value.
17165
17165
  *
17166
17166
  * `set()` can use separate numbers, as in `v.set(1, 2, 3)`, a
17167
17167
  * <a href="#/p5.Vector">p5.Vector</a> object, as in `v.set(v2)`, or an
17168
17168
  * array of numbers, as in `v.set([1, 2, 3])`.
17169
- *
17170
- * If a value isn't provided for a component, it will be set to 0. For
17171
- * example, `v.set(4, 5)` sets `v.x` to 4, `v.y` to 5, and `v.z` to 0.
17172
- * Calling `set()` with no arguments, as in `v.set()`, sets all the vector's
17173
- * components to 0.
17174
17169
  * @param x x component of the vector.
17175
17170
  * @param y y component of the vector.
17176
17171
  * @param z z component of the vector.
@@ -17191,11 +17186,10 @@ const index: typeof __index;
17191
17186
  * another <a href="#/p5.Vector">p5.Vector</a> object, as in `v.add(v2)`, or
17192
17187
  * an array of numbers, as in `v.add([1, 2, 3])`.
17193
17188
  *
17194
- * Add vectors only when they are the same size: both 2-dimensional, or
17195
- * both 3-dimensional. When two vectors of different sizes are added, the
17196
- * smaller dimension will be used, any additional values of the longer
17197
- * vector will be ignored.
17198
- * For example, adding `[1, 2, 3]` and `[4, 5]` will result in `[5, 7]`.
17189
+ * You should add vectors only when they are the same size. When two vectors
17190
+ * of different sizes are added, the smaller dimension will be used, any
17191
+ * additional values of the longer vector will be ignored. For example,
17192
+ * adding `[1, 2, 3]` and `[4, 5]` will result in `[5, 7]`.
17199
17193
  *
17200
17194
  * Calling `add()` with no arguments, as in `v.add()`, has no effect.
17201
17195
  *
@@ -17212,8 +17206,7 @@ const index: typeof __index;
17212
17206
  add(value: Vector | number[]): Vector;
17213
17207
 
17214
17208
  /**
17215
- * Performs modulo (remainder) division with a vector's `x`, `y`, and `z`
17216
- * components.
17209
+ * Performs modulo (remainder) division with a vector's components.
17217
17210
  *
17218
17211
  * `rem()` can use separate numbers, as in `v.rem(1, 2, 3)`,
17219
17212
  * another <a href="#/p5.Vector">p5.Vector</a> object, as in `v.rem(v2)`, or
@@ -17223,8 +17216,8 @@ const index: typeof __index;
17223
17216
  * will be set to their values modulo 2. Calling `rem()` with no
17224
17217
  * arguments, as in `v.rem()`, has no effect.
17225
17218
  *
17226
- * Modulo vectors only when they are the same size: both 2D, or both 3D.
17227
- * When two vectors of different sizes are used, the smaller dimension will be
17219
+ * You should modulo vectors only when they are the same size. When two
17220
+ * vectors of different sizes are used, the smaller dimension will be
17228
17221
  * used, any additional values of the longer vector will be ignored.
17229
17222
  * For example, taking `[3, 6, 9]` modulo `[2, 4]` will result in `[1, 2]`.
17230
17223
  *
@@ -17239,7 +17232,7 @@ const index: typeof __index;
17239
17232
  rem(value: Vector | number[]): Vector;
17240
17233
 
17241
17234
  /**
17242
- * Subtracts from a vector's `x`, `y`, and `z` components.
17235
+ * Subtracts from a vector's components.
17243
17236
  *
17244
17237
  * `sub()` can use separate numbers, as in `v.sub(1, 2, 3)`, another
17245
17238
  * <a href="#/p5.Vector">p5.Vector</a> object, as in `v.sub(v2)`, or an array
@@ -17247,8 +17240,8 @@ const index: typeof __index;
17247
17240
  *
17248
17241
  * Calling `sub()` with no arguments, as in `v.sub()`, has no effect.
17249
17242
  *
17250
- * Subtract vectors only when they are the same size: both 2D, or both 3D.
17251
- * When two vectors of different sizes are used, the smaller dimension will be
17243
+ * You should subtract vectors only when they are the same size. When two
17244
+ * vectors of different sizes are used, the smaller dimension will be
17252
17245
  * used, any additional values of the longer vector will be ignored.
17253
17246
  * For example, subtracting `[1, 2]` from `[3, 5, 7]` will result in `[2, 3]`.
17254
17247
  *
@@ -17263,7 +17256,7 @@ const index: typeof __index;
17263
17256
  sub(value: Vector | number[]): Vector;
17264
17257
 
17265
17258
  /**
17266
- * Multiplies a vector's `x`, `y`, and `z` components.
17259
+ * Multiplies a vector's components.
17267
17260
  *
17268
17261
  * `mult()` can use separate numbers, as in `v.mult(1, 2, 3)`, another
17269
17262
  * <a href="#/p5.Vector">p5.Vector</a> object, as in `v.mult(v2)`, or an array
@@ -17273,8 +17266,8 @@ const index: typeof __index;
17273
17266
  * will be multiplied by 2. Calling `mult()` with no arguments, as in `v.mult()`, has
17274
17267
  * no effect.
17275
17268
  *
17276
- * Multiply vectors only when they are the same size: both 2D, or both 3D.
17277
- * When two vectors of different sizes are multiplied, the smaller dimension will be
17269
+ * You should multiply vectors only when they are the same size. When two
17270
+ * vectors of different sizes are multiplied, the smaller dimension will be
17278
17271
  * used, any additional values of the longer vector will be ignored.
17279
17272
  * For example, multiplying `[1, 2, 3]` by `[4, 5]` will result in `[4, 10]`.
17280
17273
  *
@@ -17289,7 +17282,7 @@ const index: typeof __index;
17289
17282
  mult(v: Vector): Vector;
17290
17283
 
17291
17284
  /**
17292
- * Divides a vector's `x`, `y`, and `z` components.
17285
+ * Divides a vector's components.
17293
17286
  *
17294
17287
  * `div()` can use separate numbers, as in `v.div(1, 2, 3)`, another
17295
17288
  * <a href="#/p5.Vector">p5.Vector</a> object, as in `v.div(v2)`, or an array
@@ -17299,8 +17292,8 @@ const index: typeof __index;
17299
17292
  * will be divided by 2. Calling `div()` with no arguments, as in `v.div()`, has
17300
17293
  * no effect.
17301
17294
  *
17302
- * Divide vectors only when they are the same size: both 2D, or both 3D.
17303
- * When two vectors of different sizes are divided, the smaller dimension will be
17295
+ * You should divide vectors only when they are the same size. When two
17296
+ * vectors of different sizes are divided, the smaller dimension will be
17304
17297
  * used, any additional values of the longer vector will be ignored.
17305
17298
  * For example, dividing `[8, 12, 21]` by `[2, 3]` will result in `[4, 4]`.
17306
17299
  *