p5 2.2.3-rc.1 → 2.2.3

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 (86) hide show
  1. package/README.md +4 -5
  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/color/color_conversion.js +4 -4
  6. package/dist/color/index.js +1 -1
  7. package/dist/color/setting.js +1 -1
  8. package/dist/{constants-BUwWryrh.js → constants-BdTiYOQI.js} +1 -1
  9. package/dist/core/constants.js +1 -1
  10. package/dist/core/environment.js +1 -1
  11. package/dist/core/filterShaders.js +1 -1
  12. package/dist/core/friendly_errors/fes_core.js +1 -1
  13. package/dist/core/friendly_errors/file_errors.js +1 -1
  14. package/dist/core/friendly_errors/index.js +1 -1
  15. package/dist/core/friendly_errors/param_validator.js +1 -1
  16. package/dist/core/friendly_errors/sketch_verifier.js +1 -1
  17. package/dist/core/helpers.js +1 -1
  18. package/dist/core/init.js +4 -4
  19. package/dist/core/internationalization.js +1 -1
  20. package/dist/core/legacy.js +4 -4
  21. package/dist/core/main.js +4 -4
  22. package/dist/core/p5.Graphics.js +3 -3
  23. package/dist/core/p5.Renderer.js +2 -2
  24. package/dist/core/p5.Renderer2D.js +4 -4
  25. package/dist/core/p5.Renderer3D.js +3 -3
  26. package/dist/core/rendering.js +3 -3
  27. package/dist/data/local_storage.js +13 -9
  28. package/dist/dom/dom.js +30 -29
  29. package/dist/dom/index.js +1 -1
  30. package/dist/dom/p5.Element.js +3 -3
  31. package/dist/dom/p5.MediaElement.js +4 -5
  32. package/dist/events/pointer.js +1 -1
  33. package/dist/image/const.js +1 -1
  34. package/dist/image/filterRenderer2D.js +3 -3
  35. package/dist/image/image.js +3 -3
  36. package/dist/image/index.js +3 -3
  37. package/dist/image/loading_displaying.js +3 -3
  38. package/dist/image/p5.Image.js +2 -2
  39. package/dist/io/files.js +3 -3
  40. package/dist/io/index.js +3 -3
  41. package/dist/io/p5.XML.js +8 -8
  42. package/dist/{main-DFpoFdvM.js → main-H_nu4eDs.js} +3 -3
  43. package/dist/math/Matrices/Matrix.js +1 -1
  44. package/dist/math/Matrices/MatrixNumjs.js +1 -1
  45. package/dist/math/index.js +1 -1
  46. package/dist/math/p5.Matrix.js +1 -1
  47. package/dist/math/p5.Vector.js +1 -1
  48. package/dist/math/trigonometry.js +1 -1
  49. package/dist/{p5.Renderer-D-EuAodU.js → p5.Renderer-BmD2P6Wv.js} +4 -3
  50. package/dist/{rendering-DE9-Hl7Y.js → rendering-CC8JNTwG.js} +8 -35
  51. package/dist/shape/2d_primitives.js +1 -1
  52. package/dist/shape/attributes.js +1 -1
  53. package/dist/shape/custom_shapes.js +1 -1
  54. package/dist/shape/index.js +1 -1
  55. package/dist/type/index.js +2 -2
  56. package/dist/type/p5.Font.js +2 -2
  57. package/dist/type/textCore.js +2 -2
  58. package/dist/webgl/3d_primitives.js +3 -3
  59. package/dist/webgl/GeometryBuilder.js +1 -1
  60. package/dist/webgl/ShapeBuilder.js +1 -1
  61. package/dist/webgl/enums.js +1 -1
  62. package/dist/webgl/index.js +3 -3
  63. package/dist/webgl/interaction.js +1 -1
  64. package/dist/webgl/light.js +3 -3
  65. package/dist/webgl/loading.js +4 -6
  66. package/dist/webgl/material.js +3 -3
  67. package/dist/webgl/p5.Camera.js +3 -3
  68. package/dist/webgl/p5.Framebuffer.js +3 -3
  69. package/dist/webgl/p5.Geometry.js +1 -1
  70. package/dist/webgl/p5.Quat.js +1 -1
  71. package/dist/webgl/p5.RendererGL.js +3 -3
  72. package/dist/webgl/p5.Texture.js +3 -3
  73. package/dist/webgl/text.js +3 -3
  74. package/dist/webgl/utils.js +3 -3
  75. package/dist/webgpu/index.js +1 -1
  76. package/dist/webgpu/p5.RendererWebGPU.js +1 -1
  77. package/lib/p5.esm.js +68 -92
  78. package/lib/p5.esm.min.js +1 -1
  79. package/lib/p5.js +68 -92
  80. package/lib/p5.min.js +1 -1
  81. package/lib/p5.webgpu.esm.js +1 -1
  82. package/lib/p5.webgpu.js +1 -1
  83. package/lib/p5.webgpu.min.js +1 -1
  84. package/package.json +1 -1
  85. package/types/global.d.ts +601 -623
  86. package/types/p5.d.ts +297 -308
package/README.md CHANGED
@@ -32,7 +32,7 @@ function draw() {
32
32
  </tr>
33
33
  </table>
34
34
 
35
- [Get Started](https://p5js.org/tutorials/get-started/) — [Reference](https://p5js.org/reference) — [Tutorials](https://p5js.org/tutorials) — [Examples](https://p5js.org/examples/) — [Libraries](https://p5js.org/libraries) — [Forum](https://discourse.processing.org/c/p5js) — [Discord](https://discord.gg/SHQ8dH25r9)
35
+ [Get Started](https://p5js.org/tutorials/get-started/) — [Reference](https://p5js.org/reference) — [Tutorials](https://p5js.org/tutorials) — [Examples](https://p5js.org/examples/) — [Libraries](https://p5js.org/libraries) — [Forum](https://discourse.processing.org/c/p5js) — [Discord](https://discord.p5js.org)
36
36
 
37
37
  ## About
38
38
 
@@ -80,7 +80,7 @@ Stewards are contributors who are particularly involved, familiar, or responsive
80
80
 
81
81
  Anyone interested can volunteer to be a steward! There are no specific requirements for expertise, just an interest in actively learning and participating. If you’re familiar with or interested in actively learning and participating in some of the p5.js areas below, please reply to [this issue](https://github.com/processing/p5.js/issues/5719) mentioning which area(s) you are interested in volunteering as a steward! 👋👋👋
82
82
 
83
- p5.js was created by [Lauren Lee McCarthy](https://github.com/lmccart) in 2013 as a new interpretation of Processing for the context of the web. Since then we have allowed ourselves space to deviate and grow, while drawing inspiration from Processing and our shared community. p5.js is sustained by a community of contributors, with support from the Processing Foundation. p5.js follows a rotating leadership model started in 2020, and [Qianqian Ye](https://github.com/qianqianye) has been leading p5.js since 2021. Learn more about the [people](https://p5js.org/people/) behind p5.js.
83
+ p5.js was created by [Lauren Lee McCarthy](https://github.com/lmccart) in 2013 as a new interpretation of Processing for the context of the web. Since then we have allowed ourselves space to deviate and grow, while drawing inspiration from Processing and our shared community. p5.js is sustained by a community of contributors, with support from the Processing Foundation. p5.js follows a rotating leadership model started in 2020. Learn more about the [people](https://p5js.org/people/) behind p5.js.
84
84
 
85
85
  Current Lead/Mentor
86
86
  * [@ksen0](https://github.com/ksen0) - p5.js Lead,2024-present
@@ -88,15 +88,14 @@ Current Lead/Mentor
88
88
 
89
89
  Lead/Mentor Alumni
90
90
  * [@lmccart](https://github.com/lmccart) - p5.js Creator
91
- * [@qianqianye](https://github.com/qianqianye) - p5.js Lead,2021-present (on leave)
91
+ * [@qianqianye](https://github.com/qianqianye) - p5.js Lead,2021-2025
92
92
  * [@outofambit](https://github.com/outofambit) - p5.js Co-Lead 2021-22, Mentor 2022-2023
93
93
  * [@mcturner1995](https://github.com/mcturner1995) - p5.js Lead 2020
94
94
 
95
-
96
95
  <!-- STEWARDS-LIST:START - Do not remove or modify this section -->
97
96
  | Area | Steward(s) |
98
97
  |------|-------------|
99
- | Maintainers | [@davepagurek](https://github.com/davepagurek), [@ksen0](https://github.com/ksen0), [@limzykenneth](https://github.com/limzykenneth), [@perminder-17](https://github.com/perminder-17), [@qianqianye](https://github.com/qianqianye) |
98
+ | Maintainers | [@davepagurek](https://github.com/davepagurek), [@doradocodes](https://github.com/doradocodes), [@ksen0](https://github.com/ksen0), [@limzykenneth](https://github.com/limzykenneth), [@perminder-17](https://github.com/perminder-17), [@qianqianye](https://github.com/qianqianye) |
100
99
  | Accessibility | [@calebfoss](https://github.com/calebfoss) |
101
100
  | Accessibility (p5.js-website) | [@coseeian](https://github.com/coseeian) |
102
101
  | Color | [@limzykenneth](https://github.com/limzykenneth) |
@@ -1,17 +1,17 @@
1
1
  import color_conversion from '../color/color_conversion.js';
2
- import '../main-DFpoFdvM.js';
3
- import '../constants-BUwWryrh.js';
2
+ import '../main-H_nu4eDs.js';
3
+ import '../constants-BdTiYOQI.js';
4
4
  import '../core/transform.js';
5
5
  import '../core/structure.js';
6
6
  import '../core/environment.js';
7
- import '../rendering-DE9-Hl7Y.js';
7
+ import '../rendering-CC8JNTwG.js';
8
8
  import '../creating_reading-C7hu6sg1.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-D-EuAodU.js';
14
+ import '../p5.Renderer-BmD2P6Wv.js';
15
15
  import '../image/filters.js';
16
16
  import '../math/p5.Vector.js';
17
17
  import '../shape/custom_shapes.js';
@@ -4,19 +4,19 @@ 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-DFpoFdvM.js';
8
- import '../constants-BUwWryrh.js';
7
+ import '../main-H_nu4eDs.js';
8
+ import '../constants-BdTiYOQI.js';
9
9
  import '../core/transform.js';
10
10
  import '../core/structure.js';
11
11
  import '../core/environment.js';
12
- import '../rendering-DE9-Hl7Y.js';
12
+ import '../rendering-CC8JNTwG.js';
13
13
  import '../creating_reading-C7hu6sg1.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-D-EuAodU.js';
19
+ import '../p5.Renderer-BmD2P6Wv.js';
20
20
  import '../image/filters.js';
21
21
  import '../math/p5.Vector.js';
22
22
  import '../shape/custom_shapes.js';
package/dist/app.js CHANGED
@@ -1,4 +1,4 @@
1
- import { p as p5 } from './main-DFpoFdvM.js';
1
+ import { p as p5 } from './main-H_nu4eDs.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,18 +15,18 @@ 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-BUwWryrh.js';
18
+ import './constants-BdTiYOQI.js';
19
19
  import './core/transform.js';
20
20
  import './core/structure.js';
21
21
  import './core/environment.js';
22
- import './rendering-DE9-Hl7Y.js';
22
+ import './rendering-CC8JNTwG.js';
23
23
  import './creating_reading-C7hu6sg1.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-D-EuAodU.js';
29
+ import './p5.Renderer-BmD2P6Wv.js';
30
30
  import './image/filters.js';
31
31
  import './math/p5.Vector.js';
32
32
  import './shape/custom_shapes.js';
@@ -1,16 +1,16 @@
1
- import { p as p5 } from '../main-DFpoFdvM.js';
2
- import '../constants-BUwWryrh.js';
1
+ import { p as p5 } from '../main-H_nu4eDs.js';
2
+ import '../constants-BdTiYOQI.js';
3
3
  import '../core/transform.js';
4
4
  import '../core/structure.js';
5
5
  import '../core/environment.js';
6
- import '../rendering-DE9-Hl7Y.js';
6
+ import '../rendering-CC8JNTwG.js';
7
7
  import '../creating_reading-C7hu6sg1.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-D-EuAodU.js';
13
+ import '../p5.Renderer-BmD2P6Wv.js';
14
14
  import '../image/filters.js';
15
15
  import '../math/p5.Vector.js';
16
16
  import '../shape/custom_shapes.js';
@@ -2,7 +2,7 @@ import { c as creatingReading, a as color$1 } from '../creating_reading-C7hu6sg1
2
2
  import setting from './setting.js';
3
3
  import 'colorjs.io/fn';
4
4
  import './color_spaces/hsb.js';
5
- import '../constants-BUwWryrh.js';
5
+ import '../constants-BdTiYOQI.js';
6
6
 
7
7
  function color(p5){
8
8
  p5.registerAddon(creatingReading);
@@ -1,4 +1,4 @@
1
- import { a2 as NORMAL, B as BLEND } from '../constants-BUwWryrh.js';
1
+ import { a2 as NORMAL, B as BLEND } from '../constants-BdTiYOQI.js';
2
2
  import { R as RGB, b as RGBHDR, H as HSB, d as HSL, e as HWB, L as LAB, f as LCH, O as OKLAB, g as OKLCH } from '../creating_reading-C7hu6sg1.js';
3
3
  import 'colorjs.io/fn';
4
4
  import './color_spaces/hsb.js';
@@ -11,7 +11,7 @@ const _PI = Math.PI;
11
11
  * @property {String} VERSION
12
12
  * @final
13
13
  */
14
- const VERSION = '2.2.3-rc.1';
14
+ const VERSION = '2.2.3';
15
15
 
16
16
  // GRAPHICS RENDERER
17
17
  /**
@@ -1 +1 @@
1
- export { A as ADD, aN as ALT, j as ARROW, a4 as AUTO, i as AXES, aO as BACKSPACE, ax as BASELINE, z as BEVEL, b7 as BEZIER, B as BLEND, ab as BLUR, b0 as BOLD, b1 as BOLDITALIC, aw as BOTTOM, as as BURN, v as CENTER, b2 as CHAR, au as CHORD, C as CLAMP, V as CLOSE, aC as CONTAIN, aP as CONTROL, p as CORNER, t as CORNERS, aB as COVER, k as CROSS, b8 as CURVE, D as DARKEST, a6 as DEG_TO_RAD, aQ as DELETE, an as DIFFERENCE, ah as DILATE, ar as DODGE, aR as DOWN_ARROW, O as EMPTY_PATH, aS as ENTER, ai as ERODE, aT as ESCAPE, a0 as EXCLUDE, E as EXCLUSION, be as FALLBACK, aD as FILL, a7 as FLAT, F as FLOAT, aF as FULL, ak as GRAY, G as GRID, H as HALF_FLOAT, r as HALF_PI, l as HAND, ap as HARD_LIGHT, ad as IMAGE, ba as IMMEDIATE, J as INCLUDE, aj as INVERT, a$ as ITALIC, a1 as JOIN, bd as LABEL, bb as LANDSCAPE, av as LEFT, aU as LEFT_ARROW, L as LIGHTEST, g as LINEAR, aG as LINEAR_MIPMAP, Y as LINES, aL as LINE_LOOP, aK as LINE_STRIP, e as MIRROR, I as MITER, m as MOVE, M as MULTIPLY, N as NEAREST, a2 as NORMAL, ag as OPAQUE, Q as OPEN, aV as OPTION, ao as OVERLAY, P as P2D, aH as P2DHDR, K as PATH, s as PI, at as PIE, X as POINTS, bc as PORTRAIT, af as POSTERIZE, y as PROJECT, b6 as QUADRATIC, Z as QUADS, $ as QUAD_STRIP, aI as QUARTER_PI, u as RADIUS, a5 as RAD_TO_DEG, b as REMOVE, f as REPEAT, R as REPLACE, aW as RETURN, a9 as RIGHT, aX as RIGHT_ARROW, w as ROUND, a as SCREEN, aY as SHIFT, aE as SIMPLE, a8 as SMOOTH, aq as SOFT_LIGHT, x as SQUARE, b9 as STROKE, S as SUBTRACT, aZ as TAB, aJ as TAU, aM as TESS, n as TEXT, h as TEXTURE, ae as THRESHOLD, ay as TOP, c as TRIANGLES, _ as TRIANGLE_FAN, T as TRIANGLE_STRIP, q as TWO_PI, U as UNSIGNED_BYTE, d as UNSIGNED_INT, a_ as UP_ARROW, az as VERSION, o as WAIT, ac as WEBGL, aa as WEBGL2, W as WEBGPU, aA as WORD, b5 as _CTX_MIDDLE, al as _DEFAULT_FILL, b4 as _DEFAULT_LEADMULT, am as _DEFAULT_STROKE, b3 as _DEFAULT_TEXT_FILL } from '../constants-BUwWryrh.js';
1
+ export { A as ADD, aN as ALT, j as ARROW, a4 as AUTO, i as AXES, aO as BACKSPACE, ax as BASELINE, z as BEVEL, b7 as BEZIER, B as BLEND, ab as BLUR, b0 as BOLD, b1 as BOLDITALIC, aw as BOTTOM, as as BURN, v as CENTER, b2 as CHAR, au as CHORD, C as CLAMP, V as CLOSE, aC as CONTAIN, aP as CONTROL, p as CORNER, t as CORNERS, aB as COVER, k as CROSS, b8 as CURVE, D as DARKEST, a6 as DEG_TO_RAD, aQ as DELETE, an as DIFFERENCE, ah as DILATE, ar as DODGE, aR as DOWN_ARROW, O as EMPTY_PATH, aS as ENTER, ai as ERODE, aT as ESCAPE, a0 as EXCLUDE, E as EXCLUSION, be as FALLBACK, aD as FILL, a7 as FLAT, F as FLOAT, aF as FULL, ak as GRAY, G as GRID, H as HALF_FLOAT, r as HALF_PI, l as HAND, ap as HARD_LIGHT, ad as IMAGE, ba as IMMEDIATE, J as INCLUDE, aj as INVERT, a$ as ITALIC, a1 as JOIN, bd as LABEL, bb as LANDSCAPE, av as LEFT, aU as LEFT_ARROW, L as LIGHTEST, g as LINEAR, aG as LINEAR_MIPMAP, Y as LINES, aL as LINE_LOOP, aK as LINE_STRIP, e as MIRROR, I as MITER, m as MOVE, M as MULTIPLY, N as NEAREST, a2 as NORMAL, ag as OPAQUE, Q as OPEN, aV as OPTION, ao as OVERLAY, P as P2D, aH as P2DHDR, K as PATH, s as PI, at as PIE, X as POINTS, bc as PORTRAIT, af as POSTERIZE, y as PROJECT, b6 as QUADRATIC, Z as QUADS, $ as QUAD_STRIP, aI as QUARTER_PI, u as RADIUS, a5 as RAD_TO_DEG, b as REMOVE, f as REPEAT, R as REPLACE, aW as RETURN, a9 as RIGHT, aX as RIGHT_ARROW, w as ROUND, a as SCREEN, aY as SHIFT, aE as SIMPLE, a8 as SMOOTH, aq as SOFT_LIGHT, x as SQUARE, b9 as STROKE, S as SUBTRACT, aZ as TAB, aJ as TAU, aM as TESS, n as TEXT, h as TEXTURE, ae as THRESHOLD, ay as TOP, c as TRIANGLES, _ as TRIANGLE_FAN, T as TRIANGLE_STRIP, q as TWO_PI, U as UNSIGNED_BYTE, d as UNSIGNED_INT, a_ as UP_ARROW, az as VERSION, o as WAIT, ac as WEBGL, aa as WEBGL2, W as WEBGPU, aA as WORD, b5 as _CTX_MIDDLE, al as _DEFAULT_FILL, b4 as _DEFAULT_LEADMULT, am as _DEFAULT_STROKE, b3 as _DEFAULT_TEXT_FILL } from '../constants-BdTiYOQI.js';
@@ -1,4 +1,4 @@
1
- import { j as ARROW, k as CROSS, l as HAND, m as MOVE, n as TEXT, o as WAIT, P as P2D } from '../constants-BUwWryrh.js';
1
+ import { j as ARROW, k as CROSS, l as HAND, m as MOVE, n as TEXT, o as WAIT, P as P2D } from '../constants-BdTiYOQI.js';
2
2
 
3
3
  /**
4
4
  * @module Environment
@@ -1,4 +1,4 @@
1
- import { ag as OPAQUE, ah as DILATE, ai as ERODE, ab as BLUR, af as POSTERIZE, ae as THRESHOLD, aj as INVERT, ak as GRAY } from '../constants-BUwWryrh.js';
1
+ import { ag as OPAQUE, ah as DILATE, ai as ERODE, ab as BLUR, af as POSTERIZE, ae as THRESHOLD, aj as INVERT, ak as GRAY } from '../constants-BdTiYOQI.js';
2
2
 
3
3
  /*
4
4
  * Creates p5.strands filter shaders for cross-platform compatibility.
@@ -1,6 +1,6 @@
1
1
  import { translator } from '../internationalization.js';
2
2
  import strings from './browser_errors.js';
3
- import { a3 as constants } from '../../constants-BUwWryrh.js';
3
+ import { a3 as constants } from '../../constants-BdTiYOQI.js';
4
4
  import 'i18next';
5
5
  import 'i18next-browser-languagedetector';
6
6
 
@@ -1,7 +1,7 @@
1
1
  import { translator } from '../internationalization.js';
2
2
  import 'i18next';
3
3
  import 'i18next-browser-languagedetector';
4
- import '../../constants-BUwWryrh.js';
4
+ import '../../constants-BdTiYOQI.js';
5
5
 
6
6
  /**
7
7
  * @for p5
@@ -6,7 +6,7 @@ import fileErrors from './file_errors.js';
6
6
  import '../internationalization.js';
7
7
  import 'i18next';
8
8
  import 'i18next-browser-languagedetector';
9
- import '../../constants-BUwWryrh.js';
9
+ import '../../constants-BdTiYOQI.js';
10
10
  import './browser_errors.js';
11
11
  import 'zod/v4';
12
12
  import 'acorn';
@@ -1,4 +1,4 @@
1
- import { a3 as constants } from '../../constants-BUwWryrh.js';
1
+ import { a3 as constants } from '../../constants-BdTiYOQI.js';
2
2
  import { z } from 'zod/v4';
3
3
 
4
4
  var p5$1 = {
@@ -1,6 +1,6 @@
1
1
  import { parse } from 'acorn';
2
2
  import { simple } from 'acorn-walk';
3
- import { a3 as constants } from '../../constants-BUwWryrh.js';
3
+ import { a3 as constants } from '../../constants-BdTiYOQI.js';
4
4
 
5
5
  // List of functions to ignore as they either are meant to be re-defined or
6
6
  // generate false positive outputs.
@@ -1,4 +1,4 @@
1
- import { p as CORNER, t as CORNERS, u as RADIUS, v as CENTER } from '../constants-BUwWryrh.js';
1
+ import { p as CORNER, t as CORNERS, u as RADIUS, v as CENTER } from '../constants-BdTiYOQI.js';
2
2
 
3
3
  /**
4
4
  * @requires constants
package/dist/core/init.js CHANGED
@@ -1,17 +1,17 @@
1
- import { p as p5 } from '../main-DFpoFdvM.js';
1
+ import { p as p5 } from '../main-H_nu4eDs.js';
2
2
  import { initialize } from './internationalization.js';
3
- import '../constants-BUwWryrh.js';
3
+ import '../constants-BdTiYOQI.js';
4
4
  import './transform.js';
5
5
  import './structure.js';
6
6
  import './environment.js';
7
- import '../rendering-DE9-Hl7Y.js';
7
+ import '../rendering-CC8JNTwG.js';
8
8
  import '../creating_reading-C7hu6sg1.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-D-EuAodU.js';
14
+ import '../p5.Renderer-BmD2P6Wv.js';
15
15
  import '../image/filters.js';
16
16
  import '../math/p5.Vector.js';
17
17
  import '../shape/custom_shapes.js';
@@ -1,6 +1,6 @@
1
1
  import i18next from 'i18next';
2
2
  import LanguageDetector from 'i18next-browser-languagedetector';
3
- import { az as VERSION } from '../constants-BUwWryrh.js';
3
+ import { az as VERSION } from '../constants-BdTiYOQI.js';
4
4
 
5
5
  var fes = {
6
6
  autoplay: "The media that tried to play (with '{{src}}') wasn't allowed to by this browser, most likely due to the browser's autoplay policy.\n\n+ More info: {{url}}",
@@ -1,16 +1,16 @@
1
- import { p as p5 } from '../main-DFpoFdvM.js';
2
- import '../constants-BUwWryrh.js';
1
+ import { p as p5 } from '../main-H_nu4eDs.js';
2
+ import '../constants-BdTiYOQI.js';
3
3
  import './transform.js';
4
4
  import './structure.js';
5
5
  import './environment.js';
6
- import '../rendering-DE9-Hl7Y.js';
6
+ import '../rendering-CC8JNTwG.js';
7
7
  import '../creating_reading-C7hu6sg1.js';
8
8
  import 'colorjs.io/fn';
9
9
  import '../color/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-D-EuAodU.js';
13
+ import '../p5.Renderer-BmD2P6Wv.js';
14
14
  import '../image/filters.js';
15
15
  import '../math/p5.Vector.js';
16
16
  import '../shape/custom_shapes.js';
package/dist/core/main.js CHANGED
@@ -1,10 +1,10 @@
1
- import '../constants-BUwWryrh.js';
1
+ import '../constants-BdTiYOQI.js';
2
2
  import './transform.js';
3
3
  import './structure.js';
4
4
  import './environment.js';
5
- import '../rendering-DE9-Hl7Y.js';
6
- import '../p5.Renderer-D-EuAodU.js';
7
- export { p as default } from '../main-DFpoFdvM.js';
5
+ import '../rendering-CC8JNTwG.js';
6
+ import '../p5.Renderer-BmD2P6Wv.js';
7
+ export { p as default } from '../main-H_nu4eDs.js';
8
8
  import '../creating_reading-C7hu6sg1.js';
9
9
  import 'colorjs.io/fn';
10
10
  import '../color/color_spaces/hsb.js';
@@ -1,10 +1,10 @@
1
- import '../constants-BUwWryrh.js';
1
+ import '../constants-BdTiYOQI.js';
2
2
  import '../shape/2d_primitives.js';
3
3
  import '../shape/attributes.js';
4
4
  import '../shape/curves.js';
5
5
  import '../shape/vertex.js';
6
6
  import '../color/setting.js';
7
- export { G as Graphics, n as default } from '../rendering-DE9-Hl7Y.js';
7
+ export { G as Graphics, n as default } from '../rendering-CC8JNTwG.js';
8
8
  import '../image/pixels.js';
9
9
  import './transform.js';
10
10
  import '../creating_reading-C7hu6sg1.js';
@@ -16,7 +16,7 @@ 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-D-EuAodU.js';
19
+ import '../p5.Renderer-BmD2P6Wv.js';
20
20
  import '../image/filters.js';
21
21
  import '../math/p5.Vector.js';
22
22
  import './States.js';
@@ -1,6 +1,6 @@
1
1
  import '../creating_reading-C7hu6sg1.js';
2
- import '../constants-BUwWryrh.js';
3
- export { R as Renderer, r as default } from '../p5.Renderer-D-EuAodU.js';
2
+ import '../constants-BdTiYOQI.js';
3
+ export { R as Renderer, r as default } from '../p5.Renderer-BmD2P6Wv.js';
4
4
  import '../math/p5.Vector.js';
5
5
  import '../shape/custom_shapes.js';
6
6
  import './States.js';
@@ -1,7 +1,7 @@
1
- import '../constants-BUwWryrh.js';
2
- export { R as Renderer2D, r as default } from '../main-DFpoFdvM.js';
3
- import '../p5.Renderer-D-EuAodU.js';
4
- import '../rendering-DE9-Hl7Y.js';
1
+ import '../constants-BdTiYOQI.js';
2
+ export { R as Renderer2D, r as default } from '../main-H_nu4eDs.js';
3
+ import '../p5.Renderer-BmD2P6Wv.js';
4
+ import '../rendering-CC8JNTwG.js';
5
5
  import '../dom/p5.Element.js';
6
6
  import '../dom/p5.MediaElement.js';
7
7
  import '../creating_reading-C7hu6sg1.js';
@@ -1,6 +1,6 @@
1
- import '../constants-BUwWryrh.js';
2
- export { R as Renderer3D, r as default } from '../rendering-DE9-Hl7Y.js';
3
- import '../p5.Renderer-D-EuAodU.js';
1
+ import '../constants-BdTiYOQI.js';
2
+ export { R as Renderer3D, r as default } from '../rendering-CC8JNTwG.js';
3
+ import '../p5.Renderer-BmD2P6Wv.js';
4
4
  import '../webgl/GeometryBuilder.js';
5
5
  import '../math/p5.Matrix.js';
6
6
  import '../math/p5.Vector.js';
@@ -1,12 +1,12 @@
1
- import '../constants-BUwWryrh.js';
2
- export { k as default, x as renderers } from '../rendering-DE9-Hl7Y.js';
1
+ import '../constants-BdTiYOQI.js';
2
+ export { k as default, x as renderers } from '../rendering-CC8JNTwG.js';
3
3
  import '../creating_reading-C7hu6sg1.js';
4
4
  import 'colorjs.io/fn';
5
5
  import '../color/color_spaces/hsb.js';
6
6
  import '../dom/p5.Element.js';
7
7
  import '../dom/p5.File.js';
8
8
  import '../io/p5.XML.js';
9
- import '../p5.Renderer-D-EuAodU.js';
9
+ import '../p5.Renderer-BmD2P6Wv.js';
10
10
  import '../image/filters.js';
11
11
  import '../math/p5.Vector.js';
12
12
  import '../shape/custom_shapes.js';
@@ -114,18 +114,20 @@ function storage(p5, fn){
114
114
  */
115
115
  fn.storeItem = function(key, value) {
116
116
  if (typeof key !== 'string') {
117
- console.log(
118
- `The argument that you passed to storeItem() - ${key} is not a string.`
117
+ p5._friendlyError(
118
+ `The argument that you passed to storeItem() - ${key} is not a string.`,
119
+ 'storeItem'
119
120
  );
120
121
  }
121
122
  if (key.endsWith('p5TypeID')) {
122
- console.log(
123
- `The argument that you passed to storeItem() - ${key} must not end with 'p5TypeID'.`
123
+ p5._friendlyError(
124
+ `The argument that you passed to storeItem() - ${key} must not end with 'p5TypeID'.`,
125
+ 'storeItem'
124
126
  );
125
127
  }
126
128
 
127
129
  if (typeof value === 'undefined') {
128
- console.log('You cannot store undefined variables using storeItem().');
130
+ p5._friendlyError('You cannot store undefined variables using storeItem().', 'storeItem');
129
131
  }
130
132
  let type = typeof value;
131
133
  switch (type) {
@@ -260,8 +262,9 @@ function storage(p5, fn){
260
262
  let value = localStorage.getItem(key);
261
263
  const type = localStorage.getItem(`${key}p5TypeID`);
262
264
  if (typeof type === 'undefined') {
263
- console.log(
264
- `Unable to determine type of item stored under ${key}in local storage. Did you save the item with something other than setItem()?`
265
+ p5._friendlyError(
266
+ `Unable to determine type of item stored under ${key}in local storage. Did you save the item with something other than setItem()?`,
267
+ 'getItem'
265
268
  );
266
269
  } else if (value !== null) {
267
270
  switch (type) {
@@ -412,8 +415,9 @@ function storage(p5, fn){
412
415
  */
413
416
  fn.removeItem = function(key) {
414
417
  if (typeof key !== 'string') {
415
- console.log(
416
- `The argument that you passed to removeItem() - ${key} is not a string.`
418
+ p5._friendlyError(
419
+ `The argument that you passed to removeItem() - ${key} is not a string.`,
420
+ 'removeItem'
417
421
  );
418
422
  }
419
423
  localStorage.removeItem(key);
package/dist/dom/dom.js CHANGED
@@ -4,7 +4,7 @@ import { File } from './p5.File.js';
4
4
  import '../creating_reading-C7hu6sg1.js';
5
5
  import 'colorjs.io/fn';
6
6
  import '../color/color_spaces/hsb.js';
7
- import '../constants-BUwWryrh.js';
7
+ import '../constants-BdTiYOQI.js';
8
8
  import '../io/p5.XML.js';
9
9
 
10
10
  /**
@@ -377,16 +377,16 @@ function dom(p5, fn){
377
377
  }
378
378
 
379
379
  /**
380
- * Creates a `&lt;div&gt;&lt;/div&gt;` element.
380
+ * Creates a `<div></div>` element.
381
381
  *
382
- * `&lt;div&gt;&lt;/div&gt;` elements are commonly used as containers for
382
+ * `<div></div>` elements are commonly used as containers for
383
383
  * other elements.
384
384
  *
385
385
  * The parameter `html` is optional. It accepts a string that sets the
386
- * inner HTML of the new `&lt;div&gt;&lt;/div&gt;`.
386
+ * inner HTML of the new `<div></div>`.
387
387
  *
388
388
  * @method createDiv
389
- * @param {String} [html] inner HTML for the new `&lt;div&gt;&lt;/div&gt;` element.
389
+ * @param {String} [html] inner HTML for the new `<div></div>` element.
390
390
  * @return {p5.Element} new <a href="#/p5.Element">p5.Element</a> object.
391
391
  *
392
392
  * @example
@@ -424,13 +424,13 @@ function dom(p5, fn){
424
424
  /**
425
425
  * Creates a paragraph element.
426
426
  *
427
- * `&lt;p&gt;&lt;/p&gt;` elements are commonly used for paragraph-length text.
427
+ * `<p></p>` elements are commonly used for paragraph-length text.
428
428
  *
429
429
  * The parameter `html` is optional. It accepts a string that sets the
430
- * inner HTML of the new `&lt;p&gt;&lt;/p&gt;`.
430
+ * inner HTML of the new `<p></p>`.
431
431
  *
432
432
  * @method createP
433
- * @param {String} [html] inner HTML for the new `&lt;p&gt;&lt;/p&gt;` element.
433
+ * @param {String} [html] inner HTML for the new `<p></p>` element.
434
434
  * @return {p5.Element} new <a href="#/p5.Element">p5.Element</a> object.
435
435
  *
436
436
  * @example
@@ -453,18 +453,18 @@ function dom(p5, fn){
453
453
  };
454
454
 
455
455
  /**
456
- * Creates a `&lt;span&gt;&lt;/span&gt;` element.
456
+ * Creates a `<span></span>` element.
457
457
  *
458
- * `&lt;span&gt;&lt;/span&gt;` elements are commonly used as containers
459
- * for inline elements. For example, a `&lt;span&gt;&lt;/span&gt;`
458
+ * `<span></span>` elements are commonly used as containers
459
+ * for inline elements. For example, a `<span></span>`
460
460
  * can hold part of a sentence that's a
461
461
  * <span style="color: deeppink;">different</span> style.
462
462
  *
463
463
  * The parameter `html` is optional. It accepts a string that sets the
464
- * inner HTML of the new `&lt;span&gt;&lt;/span&gt;`.
464
+ * inner HTML of the new `<span></span>`.
465
465
  *
466
466
  * @method createSpan
467
- * @param {String} [html] inner HTML for the new `&lt;span&gt;&lt;/span&gt;` element.
467
+ * @param {String} [html] inner HTML for the new `<span></span>` element.
468
468
  * @return {p5.Element} new <a href="#/p5.Element">p5.Element</a> object.
469
469
  *
470
470
  * @example
@@ -517,7 +517,7 @@ function dom(p5, fn){
517
517
  };
518
518
 
519
519
  /**
520
- * Creates an `&lt;img&gt;` element that can appear outside of the canvas.
520
+ * Creates an `<img>` element that can appear outside of the canvas.
521
521
  *
522
522
  * The first parameter, `src`, is a string with the path to the image file.
523
523
  * `src` should be a relative path, as in `'assets/image.png'`, or a URL, as
@@ -588,7 +588,7 @@ function dom(p5, fn){
588
588
  };
589
589
 
590
590
  /**
591
- * Creates an `&lt;a&gt;&lt;/a&gt;` element that links to another web page.
591
+ * Creates an `<a></a>` element that links to another web page.
592
592
  *
593
593
  * The first parmeter, `href`, is a string that sets the URL of the linked
594
594
  * page.
@@ -645,7 +645,7 @@ function dom(p5, fn){
645
645
 
646
646
  /* INPUT */
647
647
  /**
648
- * Creates a slider `&lt;input&gt;&lt;/input&gt;` element.
648
+ * Creates a slider `<input></input>` element.
649
649
  *
650
650
  * Range sliders are useful for quickly selecting numbers from a given range.
651
651
  *
@@ -767,7 +767,7 @@ function dom(p5, fn){
767
767
  };
768
768
 
769
769
  /**
770
- * Creates a `&lt;button&gt;&lt;/button&gt;` element.
770
+ * Creates a `<button></button>` element.
771
771
  *
772
772
  * The first parameter, `label`, is a string that sets the label displayed on
773
773
  * the button.
@@ -844,7 +844,7 @@ function dom(p5, fn){
844
844
  };
845
845
 
846
846
  /**
847
- * Creates a checkbox `&lt;input&gt;&lt;/input&gt;` element.
847
+ * Creates a checkbox `<input></input>` element.
848
848
  *
849
849
  * Checkboxes extend the <a href="#/p5.Element">p5.Element</a> class with a
850
850
  * `checked()` method. Calling `myBox.checked()` returns `true` if it the box
@@ -985,11 +985,11 @@ function dom(p5, fn){
985
985
  };
986
986
 
987
987
  /**
988
- * Creates a dropdown menu `&lt;select&gt;&lt;/select&gt;` element.
988
+ * Creates a dropdown menu `<select></select>` element.
989
989
  *
990
990
  * The parameter is optional. If `true` is passed, as in
991
991
  * `let mySelect = createSelect(true)`, then the dropdown will support
992
- * multiple selections. If an existing `&lt;select&gt;&lt;/select&gt;` element
992
+ * multiple selections. If an existing `<select></select>` element
993
993
  * is passed, as in `let mySelect = createSelect(otherSelect)`, the existing
994
994
  * element will be wrapped in a new <a href="#/p5.Element">p5.Element</a>
995
995
  * object.
@@ -1256,8 +1256,8 @@ function dom(p5, fn){
1256
1256
  *
1257
1257
  * The parameter is optional. If a string is passed, as in
1258
1258
  * `let myRadio = createSelect('food')`, then each radio option will
1259
- * have `"food"` as its `name` parameter: `&lt;input name="food"&gt;&lt;/input&gt;`.
1260
- * If an existing `&lt;div&gt;&lt;/div&gt;` or `&lt;span&gt;&lt;/span&gt;`
1259
+ * have `"food"` as its `name` parameter: `<input name="food"></input>`.
1260
+ * If an existing `<div></div>` or `<span></span>`
1261
1261
  * element is passed, as in `let myRadio = createSelect(container)`, it will
1262
1262
  * become the radio button's parent element.
1263
1263
  *
@@ -1270,8 +1270,8 @@ function dom(p5, fn){
1270
1270
  * - `myRadio.disable(shouldDisable)` enables the entire radio button if `true` is passed and disables it if `false` is passed.
1271
1271
  *
1272
1272
  * @method createRadio
1273
- * @param {Object} [containerElement] container HTML Element, either a `&lt;div&gt;&lt;/div&gt;`
1274
- * or `&lt;span&gt;&lt;/span&gt;`.
1273
+ * @param {Object} [containerElement] container HTML Element, either a `<div></div>`
1274
+ * or `<span></span>`.
1275
1275
  * @return {p5.Element} new <a href="#/p5.Element">p5.Element</a> object.
1276
1276
  *
1277
1277
  * @example
@@ -1390,7 +1390,7 @@ function dom(p5, fn){
1390
1390
  */
1391
1391
  /**
1392
1392
  * @method createRadio
1393
- * @param {String} [name] name parameter assigned to each option's `&lt;input&gt;&lt;/input&gt;` element.
1393
+ * @param {String} [name] name parameter assigned to each option's `<input></input>` element.
1394
1394
  * @return {p5.Element} new <a href="#/p5.Element">p5.Element</a> object.
1395
1395
  */
1396
1396
  /**
@@ -1657,7 +1657,7 @@ function dom(p5, fn){
1657
1657
  };
1658
1658
 
1659
1659
  /**
1660
- * Creates a text `&lt;input&gt;&lt;/input&gt;` element.
1660
+ * Creates a text `<input></input>` element.
1661
1661
  *
1662
1662
  * Call `myInput.size()` to set the length of the text box.
1663
1663
  *
@@ -1733,7 +1733,7 @@ function dom(p5, fn){
1733
1733
  };
1734
1734
 
1735
1735
  /**
1736
- * Creates an `&lt;input&gt;&lt;/input&gt;` element of type `'file'`.
1736
+ * Creates an `<input></input>` element of type `'file'`.
1737
1737
  *
1738
1738
  * `createFileInput()` allows users to select local files for use in a sketch.
1739
1739
  * It returns a <a href="#/p5.File">p5.File</a> object.
@@ -1838,8 +1838,9 @@ function dom(p5, fn){
1838
1838
 
1839
1839
  // If File API's are not supported, throw Error
1840
1840
  if (!(window.File && window.FileReader && window.FileList && window.Blob)) {
1841
- console.log(
1842
- 'The File APIs are not fully supported in this browser. Cannot create element.'
1841
+ p5._friendlyError(
1842
+ 'The File APIs are not fully supported in this browser. Cannot create element.',
1843
+ 'createFileInput'
1843
1844
  );
1844
1845
  return;
1845
1846
  }