p5 2.3.0 → 2.3.1-rc.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 (103) hide show
  1. package/README.md +3 -11
  2. package/dist/accessibility/color_namer.js +7 -7
  3. package/dist/accessibility/index.js +7 -7
  4. package/dist/app.js +7 -7
  5. package/dist/app.node.js +7 -7
  6. package/dist/color/color_conversion.js +7 -7
  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 +2 -2
  11. package/dist/{constants-Dv6ZqA6s.js → constants-Bx3_xAam.js} +1 -1
  12. package/dist/core/constants.js +1 -1
  13. package/dist/core/environment.js +1 -1
  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 +7 -7
  22. package/dist/core/internationalization.js +1 -1
  23. package/dist/core/legacy.js +7 -7
  24. package/dist/core/main.js +7 -7
  25. package/dist/core/p5.Graphics.js +4 -4
  26. package/dist/core/p5.Renderer.js +3 -3
  27. package/dist/core/p5.Renderer2D.js +7 -7
  28. package/dist/core/p5.Renderer3D.js +4 -4
  29. package/dist/core/rendering.js +4 -4
  30. package/dist/{creating_reading-DLkHH80h.js → creating_reading-YUSK33h8.js} +8 -0
  31. package/dist/dom/dom.js +2 -2
  32. package/dist/dom/index.js +2 -2
  33. package/dist/dom/p5.Element.js +2 -2
  34. package/dist/dom/p5.MediaElement.js +2 -2
  35. package/dist/events/pointer.js +15 -0
  36. package/dist/image/const.js +1 -1
  37. package/dist/image/filterRenderer2D.js +6 -6
  38. package/dist/image/image.js +4 -4
  39. package/dist/image/index.js +4 -4
  40. package/dist/image/loading_displaying.js +4 -4
  41. package/dist/image/p5.Image.js +3 -3
  42. package/dist/io/files.js +4 -4
  43. package/dist/io/index.js +4 -4
  44. package/dist/{ir_builders-C8mrXj5z.js → ir_builders-CMXkjMoV.js} +34 -24
  45. package/dist/{main-BR2ALC_6.js → main-BpW7VbDr.js} +39 -208
  46. package/dist/math/Matrices/Matrix.js +1 -1
  47. package/dist/math/Matrices/MatrixNumjs.js +1 -1
  48. package/dist/math/calculation.js +669 -84
  49. package/dist/math/index.js +1 -1
  50. package/dist/math/p5.Matrix.js +1 -1
  51. package/dist/math/p5.Vector.js +9 -1
  52. package/dist/math/patch-vector.js +3 -1
  53. package/dist/math/trigonometry.js +399 -48
  54. package/dist/{p5.Renderer-XOvhEbJn.js → p5.Renderer-op0Y1WO6.js} +2 -2
  55. package/dist/{rendering-C5lX6zKm.js → rendering-SZ71KIDM.js} +24 -9
  56. package/dist/shape/2d_primitives.js +1 -1
  57. package/dist/shape/attributes.js +4 -3
  58. package/dist/shape/custom_shapes.js +205 -3
  59. package/dist/shape/index.js +2 -2
  60. package/dist/strands/ir_builders.js +1 -1
  61. package/dist/strands/p5.strands.js +26 -9
  62. package/dist/strands/strands_FES.js +8 -1
  63. package/dist/strands/strands_api.js +316 -21
  64. package/dist/strands/strands_conditionals.js +1 -1
  65. package/dist/strands/strands_for.js +1 -1
  66. package/dist/strands/strands_node.js +1 -1
  67. package/dist/strands/strands_ternary.js +1 -1
  68. package/dist/{strands_glslBackend-D6G3UyCs.js → strands_glslBackend-DMhOnoGl.js} +2 -2
  69. package/dist/type/index.js +3 -3
  70. package/dist/type/p5.Font.js +13 -4
  71. package/dist/type/textCore.js +3 -3
  72. package/dist/webgl/3d_primitives.js +4 -4
  73. package/dist/webgl/GeometryBuilder.js +1 -1
  74. package/dist/webgl/ShapeBuilder.js +1 -1
  75. package/dist/webgl/enums.js +1 -1
  76. package/dist/webgl/index.js +6 -6
  77. package/dist/webgl/interaction.js +1 -1
  78. package/dist/webgl/light.js +4 -4
  79. package/dist/webgl/loading.js +4 -4
  80. package/dist/webgl/material.js +4 -4
  81. package/dist/webgl/p5.Camera.js +4 -4
  82. package/dist/webgl/p5.Framebuffer.js +4 -4
  83. package/dist/webgl/p5.Geometry.js +1 -1
  84. package/dist/webgl/p5.Quat.js +1 -1
  85. package/dist/webgl/p5.RendererGL.js +6 -6
  86. package/dist/webgl/p5.Shader.js +5 -1
  87. package/dist/webgl/p5.Texture.js +4 -4
  88. package/dist/webgl/strands_glslBackend.js +2 -2
  89. package/dist/webgl/text.js +4 -4
  90. package/dist/webgl/utils.js +4 -4
  91. package/dist/webgpu/index.js +2 -2
  92. package/dist/webgpu/p5.RendererWebGPU.js +2 -2
  93. package/dist/webgpu/strands_wgslBackend.js +2 -2
  94. package/lib/p5.esm.js +1765 -405
  95. package/lib/p5.esm.min.js +1 -1
  96. package/lib/p5.js +1765 -405
  97. package/lib/p5.min.js +1 -1
  98. package/lib/p5.webgpu.esm.js +34 -3
  99. package/lib/p5.webgpu.js +34 -3
  100. package/lib/p5.webgpu.min.js +1 -1
  101. package/package.json +1 -1
  102. package/types/global.d.ts +5539 -2604
  103. package/types/p5.d.ts +2917 -1432
package/README.md CHANGED
@@ -46,15 +46,6 @@ The p5.js community shares an interest in exploring the creation of art and desi
46
46
 
47
47
  Learn more about [our community](https://p5js.org/community/) and read our community statement and [code of conduct](https://github.com/processing/p5.js/blob/main/CODE_OF_CONDUCT.md). You can directly support our work with p5.js by donating to [the Processing Foundation](https://processingfoundation.org/support).
48
48
 
49
- ## 🌼 p5.js 2.0 Now Available for Community Testing & Development!
50
-
51
- We are releasing p5.js 2.0 to the community for testing and development! Here’s what you need to know.
52
-
53
- * For **reference**: p5.js 1.x reference will stay on [https://p5js.org/](https://p5js.org/), and p5.js 2.x documentation will be on [https://beta.p5js.org/](https://beta.p5js.org/)
54
- * In the p5.js Editor: the **default will continue to be 1.x** until at least August 2026 - more information and discussion on timeline can be found on [this Discourse thread](https://discourse.processing.org/t/dev-updates-p5-js-2-0-you-are-here/46130) or [this GitHub thread](https://github.com/processing/p5.js/issues/7488)
55
- * For updating sketches and add-on libraries: check out [the compatibility add-on libraries and guides](https://github.com/processing/p5.js-compatibility)
56
- * For **contribution**: `npm latest` will default to 2.x, but the git branches are still separated with `main` on 1.x and `dev-2.0` on 2.x. We will switch the branches when we have updated all automations (including deploying updated documentation to the website). Want to contribute ideas or implementation? Check the [2.x project board](https://github.com/orgs/processing/projects/21/views/8) for an overview of what still needs discussion, and what’s ready for work!
57
-
58
49
  ## Issues
59
50
 
60
51
  If you have found a bug in the p5.js library or want to request new features, feel free to file an issue! See our [contributor guidelines](https://p5js.org/contribute/contributor_guidelines) for a full reference of our contribution process. A set of templates for reporting issues and requesting features are provided to assist you (and us!). Different parts of p5.js are in different repositories. You can open an issue on each of them through these links:
@@ -100,9 +91,10 @@ Lead/Mentor Alumni
100
91
  | Accessibility (p5.js-website) | [@coseeian](https://github.com/coseeian) |
101
92
  | Color | [@limzykenneth](https://github.com/limzykenneth) |
102
93
  | Core | [@davepagurek](https://github.com/davepagurek) |
103
- | DevOps | [@limzykenneth](https://github.com/limzykenneth), [@lirenjie95](https://github.com/lirenjie95) |
94
+ | DevOps | [@Vaivaswat2244](https://github.com/Vaivaswat2244), [@limzykenneth](https://github.com/limzykenneth), [@lirenjie95](https://github.com/lirenjie95) |
104
95
  | Documentation | [@limzykenneth](https://github.com/limzykenneth), [@perminder-17](https://github.com/perminder-17) |
105
- | Graphics (WebGL) | [@davepagurek](https://github.com/davepagurek), [@perminder-17](https://github.com/perminder-17) |
96
+ | Graphics (WebGL) | [@RandomGamingDev](https://github.com/RandomGamingDev), [@davepagurek](https://github.com/davepagurek), [@perminder-17](https://github.com/perminder-17) |
97
+ | Graphics (WebGPU) | [@aashu2006](https://github.com/aashu2006), [@davepagurek](https://github.com/davepagurek), [@perminder-17](https://github.com/perminder-17) |
106
98
  | i18n (es) | [@marioguzzzman](https://github.com/marioguzzzman) |
107
99
  | i18n (hi) | [@Divyansh013](https://github.com/Divyansh013) |
108
100
  | i18n (ko) | [@eupthere](https://github.com/eupthere) |
@@ -1,18 +1,18 @@
1
1
  import color_conversion from '../color/color_conversion.js';
2
- import '../main-BR2ALC_6.js';
3
- import '../constants-Dv6ZqA6s.js';
2
+ import '../main-BpW7VbDr.js';
3
+ import '../constants-Bx3_xAam.js';
4
4
  import '../core/transform.js';
5
5
  import '../core/structure.js';
6
6
  import '../core/environment.js';
7
- import '../rendering-C5lX6zKm.js';
8
- import '../creating_reading-DLkHH80h.js';
7
+ import '../rendering-SZ71KIDM.js';
8
+ import '../creating_reading-YUSK33h8.js';
9
9
  import 'colorjs.io/fn';
10
10
  import '../color/color_spaces/hsb.js';
11
11
  import '../strands/ir_types.js';
12
12
  import '../dom/p5.Element.js';
13
13
  import '../dom/p5.File.js';
14
14
  import '../io/p5.XML.js';
15
- import '../p5.Renderer-XOvhEbJn.js';
15
+ import '../p5.Renderer-op0Y1WO6.js';
16
16
  import '../image/filters.js';
17
17
  import '../math/p5.Vector.js';
18
18
  import '../shape/custom_shapes.js';
@@ -47,10 +47,10 @@ import '../webgl/p5.Shader.js';
47
47
  import '../math/trigonometry.js';
48
48
  import '../image/filterRenderer2D.js';
49
49
  import '../webgl2Compatibility-DA7DLMuq.js';
50
- import '../strands_glslBackend-D6G3UyCs.js';
50
+ import '../strands_glslBackend-DMhOnoGl.js';
51
51
  import '../strands/ir_dag.js';
52
52
  import '../strands/strands_FES.js';
53
- import '../ir_builders-C8mrXj5z.js';
53
+ import '../ir_builders-CMXkjMoV.js';
54
54
  import '../strands/ir_cfg.js';
55
55
  import '../strands/strands_builtins.js';
56
56
  import '../webgl/shaderHookUtils.js';
@@ -4,20 +4,20 @@ 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-BR2ALC_6.js';
8
- import '../constants-Dv6ZqA6s.js';
7
+ import '../main-BpW7VbDr.js';
8
+ import '../constants-Bx3_xAam.js';
9
9
  import '../core/transform.js';
10
10
  import '../core/structure.js';
11
11
  import '../core/environment.js';
12
- import '../rendering-C5lX6zKm.js';
13
- import '../creating_reading-DLkHH80h.js';
12
+ import '../rendering-SZ71KIDM.js';
13
+ import '../creating_reading-YUSK33h8.js';
14
14
  import 'colorjs.io/fn';
15
15
  import '../color/color_spaces/hsb.js';
16
16
  import '../strands/ir_types.js';
17
17
  import '../dom/p5.Element.js';
18
18
  import '../dom/p5.File.js';
19
19
  import '../io/p5.XML.js';
20
- import '../p5.Renderer-XOvhEbJn.js';
20
+ import '../p5.Renderer-op0Y1WO6.js';
21
21
  import '../image/filters.js';
22
22
  import '../math/p5.Vector.js';
23
23
  import '../shape/custom_shapes.js';
@@ -52,10 +52,10 @@ import '../webgl/p5.Shader.js';
52
52
  import '../math/trigonometry.js';
53
53
  import '../image/filterRenderer2D.js';
54
54
  import '../webgl2Compatibility-DA7DLMuq.js';
55
- import '../strands_glslBackend-D6G3UyCs.js';
55
+ import '../strands_glslBackend-DMhOnoGl.js';
56
56
  import '../strands/ir_dag.js';
57
57
  import '../strands/strands_FES.js';
58
- import '../ir_builders-C8mrXj5z.js';
58
+ import '../ir_builders-CMXkjMoV.js';
59
59
  import '../strands/ir_cfg.js';
60
60
  import '../strands/strands_builtins.js';
61
61
  import '../webgl/shaderHookUtils.js';
package/dist/app.js CHANGED
@@ -1,4 +1,4 @@
1
- import { p as p5 } from './main-BR2ALC_6.js';
1
+ import { p as p5 } from './main-BpW7VbDr.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,19 +15,19 @@ 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-Dv6ZqA6s.js';
18
+ import './constants-Bx3_xAam.js';
19
19
  import './core/transform.js';
20
20
  import './core/structure.js';
21
21
  import './core/environment.js';
22
- import './rendering-C5lX6zKm.js';
23
- import './creating_reading-DLkHH80h.js';
22
+ import './rendering-SZ71KIDM.js';
23
+ import './creating_reading-YUSK33h8.js';
24
24
  import 'colorjs.io/fn';
25
25
  import './color/color_spaces/hsb.js';
26
26
  import './strands/ir_types.js';
27
27
  import './dom/p5.Element.js';
28
28
  import './dom/p5.File.js';
29
29
  import './io/p5.XML.js';
30
- import './p5.Renderer-XOvhEbJn.js';
30
+ import './p5.Renderer-op0Y1WO6.js';
31
31
  import './image/filters.js';
32
32
  import './math/p5.Vector.js';
33
33
  import './shape/custom_shapes.js';
@@ -61,10 +61,10 @@ import './webgl/enums.js';
61
61
  import './math/trigonometry.js';
62
62
  import './image/filterRenderer2D.js';
63
63
  import './webgl2Compatibility-DA7DLMuq.js';
64
- import './strands_glslBackend-D6G3UyCs.js';
64
+ import './strands_glslBackend-DMhOnoGl.js';
65
65
  import './strands/ir_dag.js';
66
66
  import './strands/strands_FES.js';
67
- import './ir_builders-C8mrXj5z.js';
67
+ import './ir_builders-CMXkjMoV.js';
68
68
  import './strands/ir_cfg.js';
69
69
  import './strands/strands_builtins.js';
70
70
  import './webgl/shaderHookUtils.js';
package/dist/app.node.js CHANGED
@@ -1,4 +1,4 @@
1
- import { p as p5 } from './main-BR2ALC_6.js';
1
+ import { p as p5 } from './main-BpW7VbDr.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';
@@ -12,19 +12,19 @@ import webgl from './webgl/index.js';
12
12
  import type from './type/index.js';
13
13
  import shader from './webgl/p5.Shader.js';
14
14
  import strands from './strands/p5.strands.js';
15
- import './constants-Dv6ZqA6s.js';
15
+ import './constants-Bx3_xAam.js';
16
16
  import './core/transform.js';
17
17
  import './core/structure.js';
18
18
  import './core/environment.js';
19
- import './rendering-C5lX6zKm.js';
20
- import './creating_reading-DLkHH80h.js';
19
+ import './rendering-SZ71KIDM.js';
20
+ import './creating_reading-YUSK33h8.js';
21
21
  import 'colorjs.io/fn';
22
22
  import './color/color_spaces/hsb.js';
23
23
  import './strands/ir_types.js';
24
24
  import './dom/p5.Element.js';
25
25
  import './dom/p5.File.js';
26
26
  import './io/p5.XML.js';
27
- import './p5.Renderer-XOvhEbJn.js';
27
+ import './p5.Renderer-op0Y1WO6.js';
28
28
  import './image/filters.js';
29
29
  import './math/p5.Vector.js';
30
30
  import './shape/custom_shapes.js';
@@ -58,10 +58,10 @@ import './webgl/enums.js';
58
58
  import './math/trigonometry.js';
59
59
  import './image/filterRenderer2D.js';
60
60
  import './webgl2Compatibility-DA7DLMuq.js';
61
- import './strands_glslBackend-D6G3UyCs.js';
61
+ import './strands_glslBackend-DMhOnoGl.js';
62
62
  import './strands/ir_dag.js';
63
63
  import './strands/strands_FES.js';
64
- import './ir_builders-C8mrXj5z.js';
64
+ import './ir_builders-CMXkjMoV.js';
65
65
  import './strands/ir_cfg.js';
66
66
  import './strands/strands_builtins.js';
67
67
  import './webgl/shaderHookUtils.js';
@@ -1,17 +1,17 @@
1
- import { p as p5 } from '../main-BR2ALC_6.js';
2
- import '../constants-Dv6ZqA6s.js';
1
+ import { p as p5 } from '../main-BpW7VbDr.js';
2
+ import '../constants-Bx3_xAam.js';
3
3
  import '../core/transform.js';
4
4
  import '../core/structure.js';
5
5
  import '../core/environment.js';
6
- import '../rendering-C5lX6zKm.js';
7
- import '../creating_reading-DLkHH80h.js';
6
+ import '../rendering-SZ71KIDM.js';
7
+ import '../creating_reading-YUSK33h8.js';
8
8
  import 'colorjs.io/fn';
9
9
  import './color_spaces/hsb.js';
10
10
  import '../strands/ir_types.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-XOvhEbJn.js';
14
+ import '../p5.Renderer-op0Y1WO6.js';
15
15
  import '../image/filters.js';
16
16
  import '../math/p5.Vector.js';
17
17
  import '../shape/custom_shapes.js';
@@ -46,10 +46,10 @@ import '../webgl/p5.Shader.js';
46
46
  import '../math/trigonometry.js';
47
47
  import '../image/filterRenderer2D.js';
48
48
  import '../webgl2Compatibility-DA7DLMuq.js';
49
- import '../strands_glslBackend-D6G3UyCs.js';
49
+ import '../strands_glslBackend-DMhOnoGl.js';
50
50
  import '../strands/ir_dag.js';
51
51
  import '../strands/strands_FES.js';
52
- import '../ir_builders-C8mrXj5z.js';
52
+ import '../ir_builders-CMXkjMoV.js';
53
53
  import '../strands/ir_cfg.js';
54
54
  import '../strands/strands_builtins.js';
55
55
  import '../webgl/shaderHookUtils.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-DLkHH80h.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-YUSK33h8.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-DLkHH80h.js';
1
+ import { c as creatingReading, a as color$1 } from '../creating_reading-YUSK33h8.js';
2
2
  import setting from './setting.js';
3
3
  import 'colorjs.io/fn';
4
4
  import './color_spaces/hsb.js';
5
- import '../constants-Dv6ZqA6s.js';
5
+ import '../constants-Bx3_xAam.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-DLkHH80h.js';
1
+ export { C as Color, a as default } from '../creating_reading-YUSK33h8.js';
2
2
  import 'colorjs.io/fn';
3
3
  import './color_spaces/hsb.js';
@@ -1,5 +1,5 @@
1
- import { a1 as NORMAL, B as BLEND } from '../constants-Dv6ZqA6s.js';
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-DLkHH80h.js';
1
+ import { a1 as NORMAL, B as BLEND } from '../constants-Bx3_xAam.js';
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-YUSK33h8.js';
3
3
  import 'colorjs.io/fn';
4
4
  import './color_spaces/hsb.js';
5
5
 
@@ -11,7 +11,7 @@ const _PI = Math.PI;
11
11
  * @property {String} VERSION
12
12
  * @final
13
13
  */
14
- const VERSION = '2.3.0';
14
+ const VERSION = '2.3.1-rc.1';
15
15
 
16
16
  // GRAPHICS RENDERER
17
17
  /**
@@ -1 +1 @@
1
- export { A as ADD, aN as ALT, h as ARROW, a2 as AUTO, a6 as AXES, aO as BACKSPACE, ax as BASELINE, x as BEVEL, b7 as BEZIER, B as BLEND, ac as BLUR, b0 as BOLD, b1 as BOLDITALIC, aw as BOTTOM, au as BURN, t as CENTER, b2 as CHAR, $ as CHORD, C as CLAMP, J as CLOSE, aC as CONTAIN, aP as CONTROL, n as CORNER, r as CORNERS, aB as COVER, i as CROSS, b8 as CURVE, D as DARKEST, a4 as DEG_TO_RAD, aQ as DELETE, ap as DIFFERENCE, ai as DILATE, at as DODGE, aR as DOWN_ARROW, G as EMPTY_PATH, aS as ENTER, aj as ERODE, aT as ESCAPE, Z as EXCLUDE, E as EXCLUSION, be as FALLBACK, aD as FILL, a8 as FLAT, F as FLOAT, aF as FULL, al as GRAY, a5 as GRID, H as HALF_FLOAT, p as HALF_PI, j as HAND, ar as HARD_LIGHT, ae as IMAGE, ba as IMMEDIATE, I as INCLUDE, ak as INVERT, a$ as ITALIC, _ 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, Q as LINES, aL as LINE_LOOP, aK as LINE_STRIP, e as MIRROR, y as MITER, k as MOVE, M as MULTIPLY, N as NEAREST, a1 as NORMAL, ah as OPAQUE, O as OPEN, aV as OPTION, aq as OVERLAY, P as P2D, aH as P2DHDR, z as PATH, q as PI, a0 as PIE, K as POINTS, bc as PORTRAIT, ag as POSTERIZE, w as PROJECT, b6 as QUADRATIC, V as QUADS, Y as QUAD_STRIP, aI as QUARTER_PI, s as RADIUS, a3 as RAD_TO_DEG, b as REMOVE, f as REPEAT, R as REPLACE, aW as RETURN, aa as RIGHT, aX as RIGHT_ARROW, u as ROUND, a as SCREEN, aY as SHIFT, aE as SIMPLE, a9 as SMOOTH, as as SOFT_LIGHT, v as SQUARE, b9 as STROKE, S as SUBTRACT, aZ as TAB, aJ as TAU, aM as TESS, l as TEXT, a7 as TEXTURE, af as THRESHOLD, ay as TOP, c as TRIANGLES, X as TRIANGLE_FAN, T as TRIANGLE_STRIP, o as TWO_PI, U as UNSIGNED_BYTE, d as UNSIGNED_INT, a_ as UP_ARROW, az as VERSION, m as WAIT, ad as WEBGL, ab as WEBGL2, W as WEBGPU, aA as WORD, b5 as _CTX_MIDDLE, an as _DEFAULT_FILL, b4 as _DEFAULT_LEADMULT, ao as _DEFAULT_STROKE, b3 as _DEFAULT_TEXT_FILL } from '../constants-Dv6ZqA6s.js';
1
+ export { A as ADD, aN as ALT, h as ARROW, a2 as AUTO, a6 as AXES, aO as BACKSPACE, ax as BASELINE, x as BEVEL, b7 as BEZIER, B as BLEND, ac as BLUR, b0 as BOLD, b1 as BOLDITALIC, aw as BOTTOM, au as BURN, t as CENTER, b2 as CHAR, $ as CHORD, C as CLAMP, J as CLOSE, aC as CONTAIN, aP as CONTROL, n as CORNER, r as CORNERS, aB as COVER, i as CROSS, b8 as CURVE, D as DARKEST, a4 as DEG_TO_RAD, aQ as DELETE, ap as DIFFERENCE, ai as DILATE, at as DODGE, aR as DOWN_ARROW, G as EMPTY_PATH, aS as ENTER, aj as ERODE, aT as ESCAPE, Z as EXCLUDE, E as EXCLUSION, be as FALLBACK, aD as FILL, a8 as FLAT, F as FLOAT, aF as FULL, al as GRAY, a5 as GRID, H as HALF_FLOAT, p as HALF_PI, j as HAND, ar as HARD_LIGHT, ae as IMAGE, ba as IMMEDIATE, I as INCLUDE, ak as INVERT, a$ as ITALIC, _ 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, Q as LINES, aL as LINE_LOOP, aK as LINE_STRIP, e as MIRROR, y as MITER, k as MOVE, M as MULTIPLY, N as NEAREST, a1 as NORMAL, ah as OPAQUE, O as OPEN, aV as OPTION, aq as OVERLAY, P as P2D, aH as P2DHDR, z as PATH, q as PI, a0 as PIE, K as POINTS, bc as PORTRAIT, ag as POSTERIZE, w as PROJECT, b6 as QUADRATIC, V as QUADS, Y as QUAD_STRIP, aI as QUARTER_PI, s as RADIUS, a3 as RAD_TO_DEG, b as REMOVE, f as REPEAT, R as REPLACE, aW as RETURN, aa as RIGHT, aX as RIGHT_ARROW, u as ROUND, a as SCREEN, aY as SHIFT, aE as SIMPLE, a9 as SMOOTH, as as SOFT_LIGHT, v as SQUARE, b9 as STROKE, S as SUBTRACT, aZ as TAB, aJ as TAU, aM as TESS, l as TEXT, a7 as TEXTURE, af as THRESHOLD, ay as TOP, c as TRIANGLES, X as TRIANGLE_FAN, T as TRIANGLE_STRIP, o as TWO_PI, U as UNSIGNED_BYTE, d as UNSIGNED_INT, a_ as UP_ARROW, az as VERSION, m as WAIT, ad as WEBGL, ab as WEBGL2, W as WEBGPU, aA as WORD, b5 as _CTX_MIDDLE, an as _DEFAULT_FILL, b4 as _DEFAULT_LEADMULT, ao as _DEFAULT_STROKE, b3 as _DEFAULT_TEXT_FILL } from '../constants-Bx3_xAam.js';
@@ -1,4 +1,4 @@
1
- import { h as ARROW, i as CROSS, j as HAND, k as MOVE, l as TEXT, m as WAIT, P as P2D } from '../constants-Dv6ZqA6s.js';
1
+ import { h as ARROW, i as CROSS, j as HAND, k as MOVE, l as TEXT, m as WAIT, P as P2D } from '../constants-Bx3_xAam.js';
2
2
 
3
3
  /**
4
4
  * @module Environment
@@ -1,4 +1,4 @@
1
- import { ah as OPAQUE, ai as DILATE, aj as ERODE, ac as BLUR, ag as POSTERIZE, af as THRESHOLD, ak as INVERT, al as GRAY } from '../constants-Dv6ZqA6s.js';
1
+ import { ah as OPAQUE, ai as DILATE, aj as ERODE, ac as BLUR, ag as POSTERIZE, af as THRESHOLD, ak as INVERT, al as GRAY } from '../constants-Bx3_xAam.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 { am as constants } from '../../constants-Dv6ZqA6s.js';
3
+ import { am as constants } from '../../constants-Bx3_xAam.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-Dv6ZqA6s.js';
4
+ import '../../constants-Bx3_xAam.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-Dv6ZqA6s.js';
9
+ import '../../constants-Bx3_xAam.js';
10
10
  import './browser_errors.js';
11
11
  import 'zod/v4';
12
12
  import 'acorn';
@@ -1,4 +1,4 @@
1
- import { am as constants } from '../../constants-Dv6ZqA6s.js';
1
+ import { am as constants } from '../../constants-Bx3_xAam.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 { am as constants } from '../../constants-Dv6ZqA6s.js';
3
+ import { am as constants } from '../../constants-Bx3_xAam.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 { n as CORNER, r as CORNERS, s as RADIUS, t as CENTER } from '../constants-Dv6ZqA6s.js';
1
+ import { n as CORNER, r as CORNERS, s as RADIUS, t as CENTER } from '../constants-Bx3_xAam.js';
2
2
 
3
3
  /**
4
4
  */
package/dist/core/init.js CHANGED
@@ -1,18 +1,18 @@
1
- import { p as p5 } from '../main-BR2ALC_6.js';
1
+ import { p as p5 } from '../main-BpW7VbDr.js';
2
2
  import { initialize } from './internationalization.js';
3
- import '../constants-Dv6ZqA6s.js';
3
+ import '../constants-Bx3_xAam.js';
4
4
  import './transform.js';
5
5
  import './structure.js';
6
6
  import './environment.js';
7
- import '../rendering-C5lX6zKm.js';
8
- import '../creating_reading-DLkHH80h.js';
7
+ import '../rendering-SZ71KIDM.js';
8
+ import '../creating_reading-YUSK33h8.js';
9
9
  import 'colorjs.io/fn';
10
10
  import '../color/color_spaces/hsb.js';
11
11
  import '../strands/ir_types.js';
12
12
  import '../dom/p5.Element.js';
13
13
  import '../dom/p5.File.js';
14
14
  import '../io/p5.XML.js';
15
- import '../p5.Renderer-XOvhEbJn.js';
15
+ import '../p5.Renderer-op0Y1WO6.js';
16
16
  import '../image/filters.js';
17
17
  import '../math/p5.Vector.js';
18
18
  import '../shape/custom_shapes.js';
@@ -47,10 +47,10 @@ import '../webgl/p5.Shader.js';
47
47
  import '../math/trigonometry.js';
48
48
  import '../image/filterRenderer2D.js';
49
49
  import '../webgl2Compatibility-DA7DLMuq.js';
50
- import '../strands_glslBackend-D6G3UyCs.js';
50
+ import '../strands_glslBackend-DMhOnoGl.js';
51
51
  import '../strands/ir_dag.js';
52
52
  import '../strands/strands_FES.js';
53
- import '../ir_builders-C8mrXj5z.js';
53
+ import '../ir_builders-CMXkjMoV.js';
54
54
  import '../strands/ir_cfg.js';
55
55
  import '../strands/strands_builtins.js';
56
56
  import '../webgl/shaderHookUtils.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-Dv6ZqA6s.js';
3
+ import { az as VERSION } from '../constants-Bx3_xAam.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,17 +1,17 @@
1
- import { p as p5 } from '../main-BR2ALC_6.js';
2
- import '../constants-Dv6ZqA6s.js';
1
+ import { p as p5 } from '../main-BpW7VbDr.js';
2
+ import '../constants-Bx3_xAam.js';
3
3
  import './transform.js';
4
4
  import './structure.js';
5
5
  import './environment.js';
6
- import '../rendering-C5lX6zKm.js';
7
- import '../creating_reading-DLkHH80h.js';
6
+ import '../rendering-SZ71KIDM.js';
7
+ import '../creating_reading-YUSK33h8.js';
8
8
  import 'colorjs.io/fn';
9
9
  import '../color/color_spaces/hsb.js';
10
10
  import '../strands/ir_types.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-XOvhEbJn.js';
14
+ import '../p5.Renderer-op0Y1WO6.js';
15
15
  import '../image/filters.js';
16
16
  import '../math/p5.Vector.js';
17
17
  import '../shape/custom_shapes.js';
@@ -46,10 +46,10 @@ import '../webgl/p5.Shader.js';
46
46
  import '../math/trigonometry.js';
47
47
  import '../image/filterRenderer2D.js';
48
48
  import '../webgl2Compatibility-DA7DLMuq.js';
49
- import '../strands_glslBackend-D6G3UyCs.js';
49
+ import '../strands_glslBackend-DMhOnoGl.js';
50
50
  import '../strands/ir_dag.js';
51
51
  import '../strands/strands_FES.js';
52
- import '../ir_builders-C8mrXj5z.js';
52
+ import '../ir_builders-CMXkjMoV.js';
53
53
  import '../strands/ir_cfg.js';
54
54
  import '../strands/strands_builtins.js';
55
55
  import '../webgl/shaderHookUtils.js';
package/dist/core/main.js CHANGED
@@ -1,11 +1,11 @@
1
- import '../constants-Dv6ZqA6s.js';
1
+ import '../constants-Bx3_xAam.js';
2
2
  import './transform.js';
3
3
  import './structure.js';
4
4
  import './environment.js';
5
- import '../rendering-C5lX6zKm.js';
6
- import '../p5.Renderer-XOvhEbJn.js';
7
- export { p as default } from '../main-BR2ALC_6.js';
8
- import '../creating_reading-DLkHH80h.js';
5
+ import '../rendering-SZ71KIDM.js';
6
+ import '../p5.Renderer-op0Y1WO6.js';
7
+ export { p as default } from '../main-BpW7VbDr.js';
8
+ import '../creating_reading-YUSK33h8.js';
9
9
  import 'colorjs.io/fn';
10
10
  import '../color/color_spaces/hsb.js';
11
11
  import '../strands/ir_types.js';
@@ -46,10 +46,10 @@ import '../webgl/p5.Shader.js';
46
46
  import '../math/trigonometry.js';
47
47
  import '../image/filterRenderer2D.js';
48
48
  import '../webgl2Compatibility-DA7DLMuq.js';
49
- import '../strands_glslBackend-D6G3UyCs.js';
49
+ import '../strands_glslBackend-DMhOnoGl.js';
50
50
  import '../strands/ir_dag.js';
51
51
  import '../strands/strands_FES.js';
52
- import '../ir_builders-C8mrXj5z.js';
52
+ import '../ir_builders-CMXkjMoV.js';
53
53
  import '../strands/ir_cfg.js';
54
54
  import '../strands/strands_builtins.js';
55
55
  import '../webgl/shaderHookUtils.js';
@@ -1,13 +1,13 @@
1
- import '../constants-Dv6ZqA6s.js';
1
+ import '../constants-Bx3_xAam.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-C5lX6zKm.js';
7
+ export { G as Graphics, n as default } from '../rendering-SZ71KIDM.js';
8
8
  import '../image/pixels.js';
9
9
  import './transform.js';
10
- import '../creating_reading-DLkHH80h.js';
10
+ import '../creating_reading-YUSK33h8.js';
11
11
  import '../math/trigonometry.js';
12
12
  import '../shape/custom_shapes.js';
13
13
  import './helpers.js';
@@ -17,7 +17,7 @@ import '../strands/ir_types.js';
17
17
  import '../dom/p5.Element.js';
18
18
  import '../dom/p5.File.js';
19
19
  import '../io/p5.XML.js';
20
- import '../p5.Renderer-XOvhEbJn.js';
20
+ import '../p5.Renderer-op0Y1WO6.js';
21
21
  import '../image/filters.js';
22
22
  import '../math/p5.Vector.js';
23
23
  import './States.js';
@@ -1,6 +1,6 @@
1
- import '../creating_reading-DLkHH80h.js';
2
- import '../constants-Dv6ZqA6s.js';
3
- export { R as Renderer, r as default } from '../p5.Renderer-XOvhEbJn.js';
1
+ import '../creating_reading-YUSK33h8.js';
2
+ import '../constants-Bx3_xAam.js';
3
+ export { R as Renderer, r as default } from '../p5.Renderer-op0Y1WO6.js';
4
4
  import '../math/p5.Vector.js';
5
5
  import '../shape/custom_shapes.js';
6
6
  import './States.js';
@@ -1,10 +1,10 @@
1
- import '../constants-Dv6ZqA6s.js';
2
- export { R as Renderer2D, r as default } from '../main-BR2ALC_6.js';
3
- import '../p5.Renderer-XOvhEbJn.js';
4
- import '../rendering-C5lX6zKm.js';
1
+ import '../constants-Bx3_xAam.js';
2
+ export { R as Renderer2D, r as default } from '../main-BpW7VbDr.js';
3
+ import '../p5.Renderer-op0Y1WO6.js';
4
+ import '../rendering-SZ71KIDM.js';
5
5
  import '../dom/p5.Element.js';
6
6
  import '../dom/p5.MediaElement.js';
7
- import '../creating_reading-DLkHH80h.js';
7
+ import '../creating_reading-YUSK33h8.js';
8
8
  import '../image/filterRenderer2D.js';
9
9
  import '../math/p5.Matrix.js';
10
10
  import '../shape/custom_shapes.js';
@@ -46,10 +46,10 @@ import '../math/trigonometry.js';
46
46
  import '../dom/p5.File.js';
47
47
  import '../io/p5.XML.js';
48
48
  import '../webgl2Compatibility-DA7DLMuq.js';
49
- import '../strands_glslBackend-D6G3UyCs.js';
49
+ import '../strands_glslBackend-DMhOnoGl.js';
50
50
  import '../strands/ir_dag.js';
51
51
  import '../strands/strands_FES.js';
52
- import '../ir_builders-C8mrXj5z.js';
52
+ import '../ir_builders-CMXkjMoV.js';
53
53
  import '../strands/ir_cfg.js';
54
54
  import '../strands/strands_builtins.js';
55
55
  import '../webgl/shaderHookUtils.js';
@@ -1,6 +1,6 @@
1
- import '../constants-Dv6ZqA6s.js';
2
- export { R as Renderer3D, r as default } from '../rendering-C5lX6zKm.js';
3
- import '../p5.Renderer-XOvhEbJn.js';
1
+ import '../constants-Bx3_xAam.js';
2
+ export { R as Renderer3D, r as default } from '../rendering-SZ71KIDM.js';
3
+ import '../p5.Renderer-op0Y1WO6.js';
4
4
  import '../webgl/GeometryBuilder.js';
5
5
  import '../math/p5.Matrix.js';
6
6
  import '../math/p5.Vector.js';
@@ -8,7 +8,7 @@ import '../webgl/ShapeBuilder.js';
8
8
  import '../webgl/GeometryBufferCache.js';
9
9
  import '../image/const.js';
10
10
  import '../shape/custom_shapes.js';
11
- import '../creating_reading-DLkHH80h.js';
11
+ import '../creating_reading-YUSK33h8.js';
12
12
  import '../dom/p5.Element.js';
13
13
  import '../webgl/p5.DataArray.js';
14
14
  import '../type/textCore.js';
@@ -1,13 +1,13 @@
1
- import '../constants-Dv6ZqA6s.js';
2
- export { k as default, x as renderers } from '../rendering-C5lX6zKm.js';
3
- import '../creating_reading-DLkHH80h.js';
1
+ import '../constants-Bx3_xAam.js';
2
+ export { k as default, x as renderers } from '../rendering-SZ71KIDM.js';
3
+ import '../creating_reading-YUSK33h8.js';
4
4
  import 'colorjs.io/fn';
5
5
  import '../color/color_spaces/hsb.js';
6
6
  import '../strands/ir_types.js';
7
7
  import '../dom/p5.Element.js';
8
8
  import '../dom/p5.File.js';
9
9
  import '../io/p5.XML.js';
10
- import '../p5.Renderer-XOvhEbJn.js';
10
+ import '../p5.Renderer-op0Y1WO6.js';
11
11
  import '../image/filters.js';
12
12
  import '../math/p5.Vector.js';
13
13
  import '../shape/custom_shapes.js';
@@ -1224,6 +1224,14 @@ function creatingReading(p5, fn){
1224
1224
  * The version of `color()` with four parameters interprets them as RGBA, HSBA,
1225
1225
  * or HSLA colors, depending on the current `colorMode()`. The last parameter
1226
1226
  * sets the alpha (transparency) value.
1227
+ * In p5.strands shader callbacks, `color()` accepts the same input
1228
+ * formats but returns a `vec4` instead of a `p5.Color` object, with
1229
+ * RGBA components normalized to the 0–1 range. All colors in strands
1230
+ * are RGB-based; `colorMode()` has no effect inside shader callbacks.
1231
+ * Color utility functions such as `red()`, `green()`, `blue()`,
1232
+ * `alpha()`, `hue()`, `saturation()`, `brightness()`, and
1233
+ * `lightness()` also return values in the 0–1 range when used in
1234
+ * strands.
1227
1235
  *
1228
1236
  * @method color
1229
1237
  * @param {Number} gray number specifying value between white and black.
package/dist/dom/dom.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import { Element } from './p5.Element.js';
2
2
  import { MediaElement } from './p5.MediaElement.js';
3
3
  import { File } from './p5.File.js';
4
- import '../creating_reading-DLkHH80h.js';
4
+ import '../creating_reading-YUSK33h8.js';
5
5
  import 'colorjs.io/fn';
6
6
  import '../color/color_spaces/hsb.js';
7
- import '../constants-Dv6ZqA6s.js';
7
+ import '../constants-Bx3_xAam.js';
8
8
  import '../io/p5.XML.js';
9
9
 
10
10
  /**
package/dist/dom/index.js CHANGED
@@ -2,10 +2,10 @@ import dom$1 from './dom.js';
2
2
  import element from './p5.Element.js';
3
3
  import media from './p5.MediaElement.js';
4
4
  import file from './p5.File.js';
5
- import '../creating_reading-DLkHH80h.js';
5
+ import '../creating_reading-YUSK33h8.js';
6
6
  import 'colorjs.io/fn';
7
7
  import '../color/color_spaces/hsb.js';
8
- import '../constants-Dv6ZqA6s.js';
8
+ import '../constants-Bx3_xAam.js';
9
9
  import '../io/p5.XML.js';
10
10
 
11
11
  function dom(p5){