p5 2.3.0-rc.6 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -11
- package/dist/accessibility/color_namer.js +4 -4
- package/dist/accessibility/index.js +4 -4
- package/dist/app.js +4 -4
- package/dist/app.node.js +4 -4
- package/dist/color/color_conversion.js +4 -4
- package/dist/color/index.js +1 -1
- package/dist/color/setting.js +1 -1
- package/dist/{constants-DFRExFht.js → constants-Dv6ZqA6s.js} +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/environment.js +1 -1
- package/dist/core/filterShaders.js +1 -1
- package/dist/core/friendly_errors/fes_core.js +1 -1
- package/dist/core/friendly_errors/file_errors.js +1 -1
- package/dist/core/friendly_errors/index.js +1 -1
- package/dist/core/friendly_errors/param_validator.js +1 -1
- package/dist/core/friendly_errors/sketch_verifier.js +1 -1
- package/dist/core/helpers.js +1 -1
- package/dist/core/init.js +4 -4
- package/dist/core/internationalization.js +1 -1
- package/dist/core/legacy.js +4 -4
- package/dist/core/main.js +4 -4
- package/dist/core/p5.Graphics.js +3 -3
- package/dist/core/p5.Renderer.js +2 -2
- package/dist/core/p5.Renderer2D.js +4 -4
- package/dist/core/p5.Renderer3D.js +3 -3
- package/dist/core/rendering.js +3 -3
- package/dist/dom/dom.js +1 -1
- package/dist/dom/index.js +1 -1
- package/dist/dom/p5.Element.js +1 -1
- package/dist/dom/p5.MediaElement.js +1 -1
- package/dist/image/const.js +1 -1
- package/dist/image/filterRenderer2D.js +3 -3
- package/dist/image/image.js +3 -3
- package/dist/image/index.js +3 -3
- package/dist/image/loading_displaying.js +3 -3
- package/dist/image/p5.Image.js +2 -2
- package/dist/io/files.js +3 -3
- package/dist/io/index.js +3 -3
- package/dist/{main-rlHd-IO2.js → main-BR2ALC_6.js} +3 -3
- package/dist/math/Matrices/Matrix.js +1 -1
- package/dist/math/Matrices/MatrixNumjs.js +1 -1
- package/dist/math/index.js +1 -1
- package/dist/math/p5.Matrix.js +1 -1
- package/dist/math/p5.Vector.js +2 -7
- package/dist/math/patch-vector.js +4 -4
- package/dist/math/trigonometry.js +1 -1
- package/dist/{p5.Renderer-Dh1sXxDM.js → p5.Renderer-XOvhEbJn.js} +1 -1
- package/dist/{rendering-D5Svpe1O.js → rendering-C5lX6zKm.js} +2 -2
- package/dist/shape/2d_primitives.js +1 -1
- package/dist/shape/attributes.js +1 -1
- package/dist/shape/custom_shapes.js +1 -1
- package/dist/shape/index.js +1 -1
- package/dist/type/index.js +2 -2
- package/dist/type/p5.Font.js +2 -2
- package/dist/type/textCore.js +2 -2
- package/dist/webgl/3d_primitives.js +3 -3
- package/dist/webgl/GeometryBuilder.js +1 -1
- package/dist/webgl/ShapeBuilder.js +1 -1
- package/dist/webgl/enums.js +1 -1
- package/dist/webgl/index.js +3 -3
- package/dist/webgl/interaction.js +1 -1
- package/dist/webgl/light.js +3 -3
- package/dist/webgl/loading.js +3 -3
- package/dist/webgl/material.js +3 -3
- package/dist/webgl/p5.Camera.js +3 -3
- package/dist/webgl/p5.Framebuffer.js +3 -3
- package/dist/webgl/p5.Geometry.js +1 -1
- package/dist/webgl/p5.Quat.js +1 -1
- package/dist/webgl/p5.RendererGL.js +3 -3
- package/dist/webgl/p5.Texture.js +3 -3
- package/dist/webgl/text.js +3 -3
- package/dist/webgl/utils.js +3 -3
- package/dist/webgpu/index.js +1 -1
- package/dist/webgpu/p5.RendererWebGPU.js +1 -1
- package/lib/p5.esm.js +6 -11
- package/lib/p5.esm.min.js +1 -1
- package/lib/p5.js +6 -11
- package/lib/p5.min.js +1 -1
- package/lib/p5.webgpu.esm.js +1 -1
- package/lib/p5.webgpu.js +1 -1
- package/lib/p5.webgpu.min.js +1 -1
- package/package.json +1 -1
- package/types/p5.d.ts +1 -6
package/lib/p5.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! p5.js v2.3.0
|
|
1
|
+
/*! p5.js v2.3.0 May 28, 2026 */
|
|
2
2
|
var p5 = (function () {
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
@@ -15,7 +15,7 @@ var p5 = (function () {
|
|
|
15
15
|
* @property {String} VERSION
|
|
16
16
|
* @final
|
|
17
17
|
*/
|
|
18
|
-
const VERSION = '2.3.0
|
|
18
|
+
const VERSION = '2.3.0';
|
|
19
19
|
|
|
20
20
|
// GRAPHICS RENDERER
|
|
21
21
|
/**
|
|
@@ -20095,17 +20095,12 @@ var p5 = (function () {
|
|
|
20095
20095
|
}
|
|
20096
20096
|
|
|
20097
20097
|
/**
|
|
20098
|
-
* Sets the vector
|
|
20098
|
+
* Sets the the vector to a new value.
|
|
20099
20099
|
*
|
|
20100
20100
|
* `set()` can use separate numbers, as in `v.set(1, 2, 3)`, a
|
|
20101
20101
|
* <a href="#/p5.Vector">p5.Vector</a> object, as in `v.set(v2)`, or an
|
|
20102
20102
|
* array of numbers, as in `v.set([1, 2, 3])`.
|
|
20103
20103
|
*
|
|
20104
|
-
* If a value isn't provided for a component, it will be set to 0. For
|
|
20105
|
-
* example, `v.set(4, 5)` sets `v.x` to 4, `v.y` to 5, and `v.z` to 0.
|
|
20106
|
-
* Calling `set()` with no arguments, as in `v.set()`, sets all the vector's
|
|
20107
|
-
* components to 0.
|
|
20108
|
-
*
|
|
20109
20104
|
* @param {Number} [x] x component of the vector.
|
|
20110
20105
|
* @param {Number} [y] y component of the vector.
|
|
20111
20106
|
* @param {Number} [z] z component of the vector.
|
|
@@ -108391,7 +108386,7 @@ var p5 = (function () {
|
|
|
108391
108386
|
function _defaultEmptyVector(target){
|
|
108392
108387
|
return function(...args){
|
|
108393
108388
|
if(args.length === 0){
|
|
108394
|
-
this._friendlyError(
|
|
108389
|
+
this.constructor._friendlyError(
|
|
108395
108390
|
'In 1.x, createVector() was a shortcut for createVector(0, 0, 0). In 2.x, p5.js has vectors of any dimension, so you must provide your desired number of zeros. Use createVector(0, 0) for a 2D vector and createVector(0, 0, 0) for a 3D vector.',
|
|
108396
108391
|
'p5.createVector'
|
|
108397
108392
|
);
|
|
@@ -108433,7 +108428,7 @@ var p5 = (function () {
|
|
|
108433
108428
|
for (let i = 0; i < args.length; i++) {
|
|
108434
108429
|
const v = args[i];
|
|
108435
108430
|
if (typeof v !== 'number' || !Number.isFinite(v)) {
|
|
108436
|
-
if (!
|
|
108431
|
+
if (!this.friendlyErrorsDisabled()) {
|
|
108437
108432
|
this._friendlyError(
|
|
108438
108433
|
'Arguments contain non-finite numbers',
|
|
108439
108434
|
'p5.Vector'
|
|
@@ -108444,7 +108439,7 @@ var p5 = (function () {
|
|
|
108444
108439
|
}
|
|
108445
108440
|
} else {
|
|
108446
108441
|
if (typeof args !== 'number' || !Number.isFinite(args)) {
|
|
108447
|
-
if (!
|
|
108442
|
+
if (!this.friendlyErrorsDisabled()) {
|
|
108448
108443
|
this._friendlyError(
|
|
108449
108444
|
'Arguments contain non-finite numbers',
|
|
108450
108445
|
'p5.Vector'
|