p5 1.11.2 → 2.0.0-beta.2
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.
- package/README.md +10 -4
- package/lib/README.txt +66 -0
- package/lib/p5.esm.js +114392 -0
- package/lib/p5.js +111812 -144655
- package/lib/p5.min.js +1 -2
- package/package.json +68 -107
- package/src/README.md +27 -0
- package/src/accessibility/color_namer.js +720 -0
- package/src/accessibility/describe.js +505 -0
- package/src/accessibility/gridOutput.js +159 -0
- package/src/accessibility/index.js +13 -0
- package/src/accessibility/outputs.js +693 -0
- package/src/accessibility/textOutput.js +126 -0
- package/src/app.js +61 -0
- package/src/color/color_conversion.js +270 -0
- package/src/color/color_spaces/hsb.js +142 -0
- package/src/color/creating_reading.js +1591 -0
- package/src/color/index.js +9 -0
- package/src/color/p5.Color.culori.js +66 -0
- package/src/color/p5.Color.js +736 -0
- package/src/color/setting.js +2203 -0
- package/src/core/README.md +91 -0
- package/src/core/constants.js +1375 -0
- package/src/core/environment.js +1415 -0
- package/src/core/friendly_errors/browser_errors.js +129 -0
- package/src/core/friendly_errors/fes_core.js +1109 -0
- package/src/core/friendly_errors/file_errors.js +98 -0
- package/src/core/friendly_errors/index.js +13 -0
- package/src/core/friendly_errors/param_validator.js +535 -0
- package/src/core/friendly_errors/sketch_reader.js +408 -0
- package/src/core/friendly_errors/sketch_verifier.js +237 -0
- package/src/core/friendly_errors/stacktrace.js +252 -0
- package/src/core/friendly_errors/validate_params.js +777 -0
- package/src/core/helpers.js +71 -0
- package/src/core/init.js +58 -0
- package/src/core/internationalization.js +195 -0
- package/src/core/legacy.js +29 -0
- package/src/core/main.js +677 -0
- package/src/core/noop.js +1 -0
- package/src/core/p5.Graphics.js +699 -0
- package/src/core/p5.Renderer.js +728 -0
- package/src/core/p5.Renderer2D.js +1183 -0
- package/src/core/preload.js +250 -0
- package/src/core/reference.js +2060 -0
- package/src/core/rendering.js +697 -0
- package/src/core/structure.js +586 -0
- package/src/core/transform.js +1971 -0
- package/src/data/index.js +7 -0
- package/src/data/local_storage.js +460 -0
- package/src/data/p5.TypedDict.js +628 -0
- package/src/dom/dom.js +1982 -0
- package/src/dom/index.js +11 -0
- package/src/dom/p5.Element.js +2675 -0
- package/src/dom/p5.File.js +388 -0
- package/src/dom/p5.MediaElement.js +1825 -0
- package/src/events/acceleration.js +747 -0
- package/src/events/index.js +9 -0
- package/src/events/keyboard.js +944 -0
- package/src/events/pointer.js +2070 -0
- package/src/image/const.js +6 -0
- package/src/image/filterRenderer2D.js +258 -0
- package/src/image/filters.js +664 -0
- package/src/image/image.js +733 -0
- package/src/image/index.js +15 -0
- package/src/image/loading_displaying.js +1463 -0
- package/src/image/p5.Image.js +2160 -0
- package/src/image/pixels.js +1164 -0
- package/src/io/csv.js +211 -0
- package/src/io/files.js +2190 -0
- package/src/io/index.js +11 -0
- package/src/io/p5.Table.js +1323 -0
- package/src/io/p5.TableRow.js +334 -0
- package/src/io/p5.XML.js +1346 -0
- package/src/math/Matrices/Matrix.js +1322 -0
- package/src/math/Matrices/MatrixInterface.js +53 -0
- package/src/math/Matrices/MatrixNumjs.js +966 -0
- package/src/math/README.md +40 -0
- package/src/math/calculation.js +1122 -0
- package/src/math/index.js +15 -0
- package/src/math/math.js +139 -0
- package/src/math/noise.js +486 -0
- package/src/math/p5.Matrix.js +30 -0
- package/src/math/p5.Vector.js +3936 -0
- package/src/math/random.js +379 -0
- package/src/math/trigonometry.js +836 -0
- package/src/shape/2d_primitives.js +1452 -0
- package/src/shape/attributes.js +607 -0
- package/src/shape/curves.js +1014 -0
- package/src/shape/custom_shapes.js +2116 -0
- package/src/shape/index.js +13 -0
- package/src/shape/vertex.js +1866 -0
- package/src/type/index.js +9 -0
- package/src/type/lib/Typr.js +2962 -0
- package/src/type/p5.Font.js +795 -0
- package/src/type/text2d.js +1282 -0
- package/src/utilities/array_functions.js +421 -0
- package/src/utilities/conversion.js +1050 -0
- package/src/utilities/index.js +11 -0
- package/src/utilities/string_functions.js +996 -0
- package/src/utilities/time_date.js +349 -0
- package/src/webgl/3d_primitives.js +2766 -0
- package/src/webgl/GeometryBufferCache.js +109 -0
- package/src/webgl/GeometryBuilder.js +164 -0
- package/src/webgl/ShapeBuilder.js +484 -0
- package/src/webgl/index.js +35 -0
- package/src/webgl/interaction.js +894 -0
- package/src/webgl/light.js +1845 -0
- package/src/webgl/loading.js +1272 -0
- package/src/webgl/material.js +3819 -0
- package/src/webgl/p5.Camera.js +3927 -0
- package/src/webgl/p5.DataArray.js +117 -0
- package/src/webgl/p5.Framebuffer.js +1866 -0
- package/src/webgl/p5.Geometry.js +2507 -0
- package/src/webgl/p5.Quat.js +104 -0
- package/src/webgl/p5.RenderBuffer.js +75 -0
- package/src/webgl/p5.RendererGL.js +2754 -0
- package/src/webgl/p5.Shader.js +1422 -0
- package/src/webgl/p5.Texture.js +540 -0
- package/src/webgl/shaders/basic.frag +6 -0
- package/src/webgl/shaders/filters/blur.frag +60 -0
- package/src/webgl/shaders/filters/default.vert +18 -0
- package/src/webgl/shaders/filters/dilate.frag +39 -0
- package/src/webgl/shaders/filters/erode.frag +39 -0
- package/src/webgl/shaders/filters/gray.frag +16 -0
- package/src/webgl/shaders/filters/invert.frag +15 -0
- package/src/webgl/shaders/filters/opaque.frag +12 -0
- package/src/webgl/shaders/filters/posterize.frag +29 -0
- package/src/webgl/shaders/filters/threshold.frag +23 -0
- package/src/webgl/shaders/font.frag +216 -0
- package/src/webgl/shaders/font.vert +44 -0
- package/src/webgl/shaders/imageLight.vert +33 -0
- package/src/webgl/shaders/imageLightDiffused.frag +82 -0
- package/src/webgl/shaders/imageLightSpecular.frag +134 -0
- package/src/webgl/shaders/light.vert +37 -0
- package/src/webgl/shaders/light_texture.frag +26 -0
- package/src/webgl/shaders/lighting.glsl +227 -0
- package/src/webgl/shaders/line.frag +74 -0
- package/src/webgl/shaders/line.vert +294 -0
- package/src/webgl/shaders/normal.frag +6 -0
- package/src/webgl/shaders/normal.vert +72 -0
- package/src/webgl/shaders/phong.frag +84 -0
- package/src/webgl/shaders/phong.vert +87 -0
- package/src/webgl/shaders/point.frag +29 -0
- package/src/webgl/shaders/point.vert +19 -0
- package/src/webgl/shaders/sphereMapping.frag +27 -0
- package/src/webgl/shaders/webgl2Compatibility.glsl +26 -0
- package/src/webgl/text.js +776 -0
- package/translations/dev.js +1 -1
- package/translations/index.js +3 -2
- package/lib/addons/p5.sound.js +0 -12268
- package/lib/addons/p5.sound.min.js +0 -3
package/README.md
CHANGED
|
@@ -36,7 +36,7 @@ function draw() {
|
|
|
36
36
|
|
|
37
37
|
## About
|
|
38
38
|
|
|
39
|
-
p5.js is built and organized to prioritize [accessibility, inclusivity, community, and joy](https://p5js.org/community). Similar to sketching, p5.js has a full set of tools to draw. It also supports creating audio-visual, interactive, experimental, and generative works for the web. p5.js enables thinking of a web page as your sketch. p5.js is accessible in multiple languages and has an expansive [documentation](https://p5js.org/reference/) with visual examples. You can find [tutorials](https://p5js.org/
|
|
39
|
+
p5.js is built and organized to prioritize [accessibility, inclusivity, community, and joy](https://p5js.org/community). Similar to sketching, p5.js has a full set of tools to draw. It also supports creating audio-visual, interactive, experimental, and generative works for the web. p5.js enables thinking of a web page as your sketch. p5.js is accessible in multiple languages and has an expansive [documentation](https://p5js.org/reference/) with visual examples. You can find [tutorials](https://p5js.org/tutorials/) on the p5.js website and start coding right now in the [p5.js web editor](https://editor.p5js.org/). You can extend p5.js with many community-created [libraries](https://p5js.org/libraries/) that bring different capabilities. Its community provides endless inspiration and support for creators.
|
|
40
40
|
|
|
41
41
|
p5.js encourages iterative and exploratory code for creative expression. Its friendly, diverse community shares art, code, and learning resources to help elevate all voices. We share our values in open source and access for all, to learn, create, imagine, design, share and code freely.
|
|
42
42
|
|
|
@@ -71,17 +71,18 @@ Anyone interested can volunteer to be a steward! There are no specific requireme
|
|
|
71
71
|
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.
|
|
72
72
|
|
|
73
73
|
Current Lead/Mentor
|
|
74
|
-
* [@
|
|
74
|
+
* [@ksen0](https://github.com/ksen0) - p5.js Lead,2024-present
|
|
75
75
|
* [@limzykenneth](https://github.com/limzykenneth) - p5.js Mentor,2023-present
|
|
76
76
|
|
|
77
77
|
Lead/Mentor Alumni
|
|
78
78
|
* [@lmccart](https://github.com/lmccart)- p5.js Creator
|
|
79
|
+
* [@qianqianye](https://github.com/qianqianye) - p5.js Lead,2021-2024
|
|
79
80
|
* [@outofambit](https://github.com/outofambit) - p5.js Co-Lead 2021-22, Mentor 2022-2023
|
|
80
81
|
* [@mcturner1995](https://github.com/mcturner1995) - p5.js Lead 2020
|
|
81
82
|
|
|
82
83
|
| Area | Steward(s) |
|
|
83
84
|
| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ |
|
|
84
|
-
| Overall | [@
|
|
85
|
+
| Overall | [@ksen0](https://github.com/ksen0) |
|
|
85
86
|
| [Accessibility](https://github.com/processing/p5.js/tree/main/src/accessibility) | [@calebfoss](https://github.com/calebfoss), [@cosmicbhejafry](https://github.com/cosmicbhejafry), [@apoorva-a98](https://github.com/apoorva-a98), [@tedkmburu](https://github.com/tedkmburu), [@Zarkv](https://github.com/Zarkv), [@SkylerW99](https://github.com/SkylerW99), [@itsjoopark](https://github.com/itsjoopark), [@hannahvy](https://github.com/hannahvy), [@nhasalajoshi](https://github.com/nhasalajoshi)|
|
|
86
87
|
| [Color](https://github.com/processing/p5.js/tree/main/src/color) | [@paulaxisabel](https://github.com/paulaxisabel), [@SoundaryaKoutharapu](https://github.com/SoundaryaKoutharapu), [@mrbrack](https://github.com/mrbrack), [@TJ723](https://github.com/TJ723), [@Zarkv](https://github.com/Zarkv), [@SkylerW99](https://github.com/SkylerW99), [@ramya202000](https://github.com/ramya202000), [@hannahvy](https://github.com/hannahvy), [@robin-haxx](https://github.com/robin-haxx), [@hiddenenigma](https://github.com/hiddenenigma) |
|
|
87
88
|
| [Core](https://github.com/processing/p5.js/tree/main/src/core)/Environment/Rendering | [@limzykenneth](https://github.com/limzykenneth), [@davepagurek](https://github.com/davepagurek), [@ChihYungChang](https://github.com/ChihYungChang), [@teragramgius](https://github.com/teragramgius), [@tuminzee](https://github.com/tuminzee), [@Zarkv](https://github.com/Zarkv), [@robin-haxx](https://github.com/robin-haxx), [@Gaurav-1306](https://github.com/Gaurav-1306) |
|
|
@@ -1016,7 +1017,7 @@ We recognize all types of contributions. This project follows the [all-contribut
|
|
|
1016
1017
|
<tr>
|
|
1017
1018
|
<td align="center" valign="top" width="16.66%"><a href="https://piyushs-folio-c8b8.onrender.com/"><img src="https://avatars.githubusercontent.com/u/47579287?v=4?s=120" width="120px;" alt="PiyushChandra17"/><br /><sub><b>PiyushChandra17</b></sub></a><br /><a href="https://github.com/processing/p5.js/commits?author=PiyushChandra17" title="Code">💻</a> <a href="https://github.com/processing/p5.js/issues?q=author%3APiyushChandra17" title="Bug reports">🐛</a> <a href="https://github.com/processing/p5.js/pulls?q=is%3Apr+reviewed-by%3APiyushChandra17" title="Reviewed Pull Requests">👀</a></td>
|
|
1018
1019
|
<td align="center" valign="top" width="16.66%"><a href="https://github.com/dgrantham01"><img src="https://avatars.githubusercontent.com/u/71230430?v=4?s=120" width="120px;" alt="Daniel Grantham"/><br /><sub><b>Daniel Grantham</b></sub></a><br /><a href="https://github.com/processing/p5.js/commits?author=dgrantham01" title="Code">💻</a></td>
|
|
1019
|
-
<td align="center" valign="top" width="16.66%"><a href="https://aboutmonica.com"><img src="https://avatars.githubusercontent.com/u/6998954?v=4?s=120" width="120px;" alt="Monica Powell"/><br /><sub><b>Monica Powell</b></sub></a><br /><a href="#talk-m0nica" title="Talks">📢</a> <a href="#example-m0nica" title="Examples">💡</a></td>
|
|
1020
|
+
<td align="center" valign="top" width="16.66%"><a href="https://aboutmonica.com"><img src="https://avatars.githubusercontent.com/u/6998954?v=4?s=120" width="120px;" alt="Monica Powell"/><br /><sub><b>Monica Powell</b></sub></a><br /><a href="#talk-m0nica" title="Talks">📢</a> <a href="#example-m0nica" title="Examples">💡</a> <a href="https://github.com/processing/p5.js/commits?author=m0nica" title="Documentation">📖</a> <a href="https://github.com/processing/p5.js/issues?q=author%3Am0nica" title="Bug reports">🐛</a></td>
|
|
1020
1021
|
<td align="center" valign="top" width="16.66%"><a href="https://github.com/rohanjulka19"><img src="https://avatars.githubusercontent.com/u/19673968?v=4?s=120" width="120px;" alt="Rohan Julka"/><br /><sub><b>Rohan Julka</b></sub></a><br /><a href="https://github.com/processing/p5.js/commits?author=rohanjulka19" title="Code">💻</a></td>
|
|
1021
1022
|
<td align="center" valign="top" width="16.66%"><a href="https://github.com/ravixalgorithm"><img src="https://avatars.githubusercontent.com/u/148683640?v=4?s=120" width="120px;" alt="Mr. Algorithm"/><br /><sub><b>Mr. Algorithm</b></sub></a><br /><a href="https://github.com/processing/p5.js/commits?author=ravixalgorithm" title="Documentation">📖</a></td>
|
|
1022
1023
|
<td align="center" valign="top" width="16.66%"><a href="https://github.com/sambensim"><img src="https://avatars.githubusercontent.com/u/28797947?v=4?s=120" width="120px;" alt="sambensim"/><br /><sub><b>sambensim</b></sub></a><br /><a href="https://github.com/processing/p5.js/commits?author=sambensim" title="Documentation">📖</a></td>
|
|
@@ -1074,6 +1075,11 @@ We recognize all types of contributions. This project follows the [all-contribut
|
|
|
1074
1075
|
<td align="center" valign="top" width="16.66%"><a href="http://alexhennings.dev"><img src="https://avatars.githubusercontent.com/u/31355456?v=4?s=120" width="120px;" alt="blackboxlogic"/><br /><sub><b>blackboxlogic</b></sub></a><br /><a href="https://github.com/processing/p5.js/commits?author=blackboxlogic" title="Documentation">📖</a></td>
|
|
1075
1076
|
<td align="center" valign="top" width="16.66%"><a href="https://github.com/zs-5"><img src="https://avatars.githubusercontent.com/u/177980470?v=4?s=120" width="120px;" alt="ℤ"/><br /><sub><b>ℤ</b></sub></a><br /><a href="https://github.com/processing/p5.js/commits?author=zs-5" title="Documentation">📖</a></td>
|
|
1076
1077
|
<td align="center" valign="top" width="16.66%"><a href="https://github.com/Dhanush111"><img src="https://avatars.githubusercontent.com/u/51503598?v=4?s=120" width="120px;" alt="dhanush"/><br /><sub><b>dhanush</b></sub></a><br /><a href="https://github.com/processing/p5.js/commits?author=Dhanush111" title="Documentation">📖</a></td>
|
|
1078
|
+
<td align="center" valign="top" width="16.66%"><a href="http://caad.xyz"><img src="https://avatars.githubusercontent.com/u/5458532?v=4?s=120" width="120px;" alt="ma haidong"/><br /><sub><b>ma haidong</b></sub></a><br /><a href="https://github.com/processing/p5.js/issues?q=author%3Amahaidong" title="Bug reports">🐛</a> <a href="https://github.com/processing/p5.js/commits?author=mahaidong" title="Code">💻</a></td>
|
|
1079
|
+
<td align="center" valign="top" width="16.66%"><a href="https://github.com/Rishab87"><img src="https://avatars.githubusercontent.com/u/138858208?v=4?s=120" width="120px;" alt="Rishab Kumar Jha"/><br /><sub><b>Rishab Kumar Jha</b></sub></a><br /><a href="https://github.com/processing/p5.js/issues?q=author%3ARishab87" title="Bug reports">🐛</a> <a href="https://github.com/processing/p5.js/commits?author=Rishab87" title="Code">💻</a></td>
|
|
1080
|
+
</tr>
|
|
1081
|
+
<tr>
|
|
1082
|
+
<td align="center" valign="top" width="16.66%"><a href="https://github.com/ImRAJAS-SAMSE"><img src="https://avatars.githubusercontent.com/u/122066293?v=4?s=120" width="120px;" alt="Rajas Samse"/><br /><sub><b>Rajas Samse</b></sub></a><br /><a href="https://github.com/processing/p5.js/commits?author=ImRAJAS-SAMSE" title="Code">💻</a> <a href="https://github.com/processing/p5.js/commits?author=ImRAJAS-SAMSE" title="Documentation">📖</a></td>
|
|
1077
1083
|
</tr>
|
|
1078
1084
|
</tbody>
|
|
1079
1085
|
</table>
|
package/lib/README.txt
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Welcome to p5.js
|
|
2
|
+
|
|
3
|
+
You have downloaded the complete p5.js library ZIP file, yay!
|
|
4
|
+
|
|
5
|
+
# Contents of the p5 folder
|
|
6
|
+
|
|
7
|
+
* p5.js file
|
|
8
|
+
* p5.min.js file
|
|
9
|
+
* addons folder
|
|
10
|
+
* p5.sound.js
|
|
11
|
+
* p5.sound.min.js
|
|
12
|
+
* empty-example folder
|
|
13
|
+
* index.html
|
|
14
|
+
* p5.js
|
|
15
|
+
* p5.sound.js
|
|
16
|
+
* sketch.js
|
|
17
|
+
|
|
18
|
+
## p5.js
|
|
19
|
+
|
|
20
|
+
This file stores the complete p5.js library. It is easy to read by humans, so feel free to open it and explore its contents. It also has a friendly error system, which helps new programmers with common user errors.
|
|
21
|
+
|
|
22
|
+
## p5.min.js
|
|
23
|
+
|
|
24
|
+
This file is a minified version of the p5.js file. It is a lighter version, with the same functionalities, but smaller file size. This minified version is harder to read for humans, and does not include the friendly error system.
|
|
25
|
+
|
|
26
|
+
## addons folder
|
|
27
|
+
|
|
28
|
+
The addons folder includes additional p5.js related libraries, in both original versions and minified versions.
|
|
29
|
+
|
|
30
|
+
### p5.sound.js, p5.sound.min.js
|
|
31
|
+
|
|
32
|
+
p5.sound extends p5.js with Web Audio functionality including audio input, playback, analysis, and synthesis.
|
|
33
|
+
|
|
34
|
+
## empty-example folder
|
|
35
|
+
|
|
36
|
+
This is an empty example of a website. The folder includes the file for the website, index.html, the p5.js library, other related p5.js libraries, and a template starting point for your p5.js sketch, called sketch.js.
|
|
37
|
+
|
|
38
|
+
### index.html
|
|
39
|
+
|
|
40
|
+
index.html is a template for an HTML file. This index.html first imports the libraries included in the folder (p5.js, p5.sound.js) then loads and executes the file sketch.js which is where you can write your own code.
|
|
41
|
+
|
|
42
|
+
### sketch.js
|
|
43
|
+
|
|
44
|
+
The sketch.js is a template for the p5.js sketch, with the functions setup() and draw() that you can complete.
|
|
45
|
+
|
|
46
|
+
## README.txt
|
|
47
|
+
|
|
48
|
+
This README file formatted with Markdown :)
|
|
49
|
+
|
|
50
|
+
# What's next?
|
|
51
|
+
|
|
52
|
+
If you need more information to help get you started, please refer to our website:
|
|
53
|
+
https://p5js.org/tutorials/get-started/ and https://p5js.org/tutorials/
|
|
54
|
+
|
|
55
|
+
An online reference to the p5.js library is available here:
|
|
56
|
+
https://p5js.org/reference/
|
|
57
|
+
|
|
58
|
+
In order to run your website (including the empty-example), you need to enable a local server, please see this tutorial in our wiki:
|
|
59
|
+
https://github.com/processing/p5.js/wiki/Local-server
|
|
60
|
+
|
|
61
|
+
p5.js is a community and p5.js is built by contributions. If you want to learn more about us, visit:
|
|
62
|
+
https://p5js.org/community/
|
|
63
|
+
|
|
64
|
+
# License
|
|
65
|
+
|
|
66
|
+
The p5.js library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, version 2.1.
|