p5 2.3.0-rc.5 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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-CdA3y5zC.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-BNYJV9Kd.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 +76 -51
- package/dist/math/patch-vector.js +20 -8
- package/dist/math/trigonometry.js +1 -1
- package/dist/{p5.Renderer-BfhR0QHl.js → p5.Renderer-XOvhEbJn.js} +1 -1
- package/dist/{rendering-mbOOQwHM.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 +96 -59
- package/lib/p5.esm.min.js +1 -1
- package/lib/p5.js +96 -59
- 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/global.d.ts +14 -14
- package/types/p5.d.ts +24 -31
package/dist/math/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import trigonometry from './trigonometry.js';
|
|
|
5
5
|
import math$1 from './math.js';
|
|
6
6
|
import vector from './p5.Vector.js';
|
|
7
7
|
import vectorValidation from './patch-vector.js';
|
|
8
|
-
import '../constants-
|
|
8
|
+
import '../constants-Dv6ZqA6s.js';
|
|
9
9
|
|
|
10
10
|
function math(p5){
|
|
11
11
|
p5.registerAddon(calculation);
|
package/dist/math/p5.Matrix.js
CHANGED
package/dist/math/p5.Vector.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { o as TWO_PI } from '../constants-
|
|
1
|
+
import { o as TWO_PI } from '../constants-Dv6ZqA6s.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* @module Math
|
|
@@ -10,8 +10,14 @@ import { o as TWO_PI } from '../constants-CdA3y5zC.js';
|
|
|
10
10
|
* This function is used by binary vector operations to prioritize shorter vectors,
|
|
11
11
|
* and to emit a warning when lengths do not match.
|
|
12
12
|
*/
|
|
13
|
-
const prioritizeSmallerDimension = function(currentVectorDimension, args) {
|
|
14
|
-
|
|
13
|
+
const prioritizeSmallerDimension = function (currentVectorDimension, args) {
|
|
14
|
+
const resultDimension = Math.min(currentVectorDimension, args.length);
|
|
15
|
+
if (Array.isArray(args) && currentVectorDimension !== args.length) {
|
|
16
|
+
console.warn(
|
|
17
|
+
'When working with two vectors of different sizes, the smaller dimension is used. In this operation, both vector will be treated as ' + resultDimension + 'D vectors, and any additional values of the linger vector will be ignored.'
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
return resultDimension;
|
|
15
21
|
};
|
|
16
22
|
|
|
17
23
|
/**
|
|
@@ -305,17 +311,12 @@ class Vector {
|
|
|
305
311
|
}
|
|
306
312
|
|
|
307
313
|
/**
|
|
308
|
-
* Sets the vector
|
|
314
|
+
* Sets the the vector to a new value.
|
|
309
315
|
*
|
|
310
316
|
* `set()` can use separate numbers, as in `v.set(1, 2, 3)`, a
|
|
311
317
|
* <a href="#/p5.Vector">p5.Vector</a> object, as in `v.set(v2)`, or an
|
|
312
318
|
* array of numbers, as in `v.set([1, 2, 3])`.
|
|
313
319
|
*
|
|
314
|
-
* If a value isn't provided for a component, it will be set to 0. For
|
|
315
|
-
* example, `v.set(4, 5)` sets `v.x` to 4, `v.y` to 5, and `v.z` to 0.
|
|
316
|
-
* Calling `set()` with no arguments, as in `v.set()`, sets all the vector's
|
|
317
|
-
* components to 0.
|
|
318
|
-
*
|
|
319
320
|
* @param {Number} [x] x component of the vector.
|
|
320
321
|
* @param {Number} [y] y component of the vector.
|
|
321
322
|
* @param {Number} [z] z component of the vector.
|
|
@@ -400,8 +401,6 @@ class Vector {
|
|
|
400
401
|
}
|
|
401
402
|
}
|
|
402
403
|
|
|
403
|
-
|
|
404
|
-
|
|
405
404
|
/**
|
|
406
405
|
* Adds to a vector's components.
|
|
407
406
|
*
|
|
@@ -409,11 +408,10 @@ class Vector {
|
|
|
409
408
|
* another <a href="#/p5.Vector">p5.Vector</a> object, as in `v.add(v2)`, or
|
|
410
409
|
* an array of numbers, as in `v.add([1, 2, 3])`.
|
|
411
410
|
*
|
|
412
|
-
*
|
|
413
|
-
*
|
|
414
|
-
*
|
|
415
|
-
*
|
|
416
|
-
* For example, adding `[1, 2, 3]` and `[4, 5]` will result in `[5, 7]`.
|
|
411
|
+
* You should add vectors only when they are the same size. When two vectors
|
|
412
|
+
* of different sizes are added, the smaller dimension will be used, any
|
|
413
|
+
* additional values of the longer vector will be ignored. For example,
|
|
414
|
+
* adding `[1, 2, 3]` and `[4, 5]` will result in `[5, 7]`.
|
|
417
415
|
*
|
|
418
416
|
* Calling `add()` with no arguments, as in `v.add()`, has no effect.
|
|
419
417
|
*
|
|
@@ -530,7 +528,7 @@ class Vector {
|
|
|
530
528
|
* @param {p5.Vector|Number[]} value The vector to add
|
|
531
529
|
* @chainable
|
|
532
530
|
*/
|
|
533
|
-
add(
|
|
531
|
+
add(args) {
|
|
534
532
|
const minDimension = prioritizeSmallerDimension(this.dimensions, args);
|
|
535
533
|
shrinkToDimension(this.values, minDimension);
|
|
536
534
|
|
|
@@ -541,11 +539,8 @@ class Vector {
|
|
|
541
539
|
return this;
|
|
542
540
|
}
|
|
543
541
|
|
|
544
|
-
|
|
545
|
-
|
|
546
542
|
/**
|
|
547
|
-
* Performs modulo (remainder) division with a vector's
|
|
548
|
-
* components.
|
|
543
|
+
* Performs modulo (remainder) division with a vector's components.
|
|
549
544
|
*
|
|
550
545
|
* `rem()` can use separate numbers, as in `v.rem(1, 2, 3)`,
|
|
551
546
|
* another <a href="#/p5.Vector">p5.Vector</a> object, as in `v.rem(v2)`, or
|
|
@@ -555,8 +550,8 @@ class Vector {
|
|
|
555
550
|
* will be set to their values modulo 2. Calling `rem()` with no
|
|
556
551
|
* arguments, as in `v.rem()`, has no effect.
|
|
557
552
|
*
|
|
558
|
-
*
|
|
559
|
-
*
|
|
553
|
+
* You should modulo vectors only when they are the same size. When two
|
|
554
|
+
* vectors of different sizes are used, the smaller dimension will be
|
|
560
555
|
* used, any additional values of the longer vector will be ignored.
|
|
561
556
|
* For example, taking `[3, 6, 9]` modulo `[2, 4]` will result in `[1, 2]`.
|
|
562
557
|
*
|
|
@@ -654,13 +649,20 @@ class Vector {
|
|
|
654
649
|
* @param {p5.Vector | Number[]} value divisor vector.
|
|
655
650
|
* @chainable
|
|
656
651
|
*/
|
|
657
|
-
rem(
|
|
652
|
+
rem(args) {
|
|
658
653
|
const minDimension = prioritizeSmallerDimension(this.dimensions, args);
|
|
659
654
|
|
|
660
655
|
shrinkToDimension(this.values, minDimension);
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
656
|
+
|
|
657
|
+
if(Array.isArray(args)){
|
|
658
|
+
for (let i = 0; i < this.values.length; i++) {
|
|
659
|
+
if (args[i] > 0) {
|
|
660
|
+
this.values[i] = this.values[i] % args[i];
|
|
661
|
+
}
|
|
662
|
+
}
|
|
663
|
+
} else if(args > 0) {
|
|
664
|
+
for (let i = 0; i < this.values.length; i++) {
|
|
665
|
+
this.values[i] = this.values[i] % args;
|
|
664
666
|
}
|
|
665
667
|
}
|
|
666
668
|
|
|
@@ -668,7 +670,7 @@ class Vector {
|
|
|
668
670
|
}
|
|
669
671
|
|
|
670
672
|
/**
|
|
671
|
-
* Subtracts from a vector's
|
|
673
|
+
* Subtracts from a vector's components.
|
|
672
674
|
*
|
|
673
675
|
* `sub()` can use separate numbers, as in `v.sub(1, 2, 3)`, another
|
|
674
676
|
* <a href="#/p5.Vector">p5.Vector</a> object, as in `v.sub(v2)`, or an array
|
|
@@ -676,8 +678,8 @@ class Vector {
|
|
|
676
678
|
*
|
|
677
679
|
* Calling `sub()` with no arguments, as in `v.sub()`, has no effect.
|
|
678
680
|
*
|
|
679
|
-
*
|
|
680
|
-
*
|
|
681
|
+
* You should subtract vectors only when they are the same size. When two
|
|
682
|
+
* vectors of different sizes are used, the smaller dimension will be
|
|
681
683
|
* used, any additional values of the longer vector will be ignored.
|
|
682
684
|
* For example, subtracting `[1, 2]` from `[3, 5, 7]` will result in `[2, 3]`.
|
|
683
685
|
*
|
|
@@ -789,7 +791,7 @@ class Vector {
|
|
|
789
791
|
* @param {p5.Vector|Number[]} value the vector to subtract
|
|
790
792
|
* @chainable
|
|
791
793
|
*/
|
|
792
|
-
sub(
|
|
794
|
+
sub(args) {
|
|
793
795
|
const minDimension = prioritizeSmallerDimension(this.dimensions, args);
|
|
794
796
|
shrinkToDimension(this.values, minDimension);
|
|
795
797
|
|
|
@@ -801,7 +803,7 @@ class Vector {
|
|
|
801
803
|
}
|
|
802
804
|
|
|
803
805
|
/**
|
|
804
|
-
* Multiplies a vector's
|
|
806
|
+
* Multiplies a vector's components.
|
|
805
807
|
*
|
|
806
808
|
* `mult()` can use separate numbers, as in `v.mult(1, 2, 3)`, another
|
|
807
809
|
* <a href="#/p5.Vector">p5.Vector</a> object, as in `v.mult(v2)`, or an array
|
|
@@ -811,8 +813,8 @@ class Vector {
|
|
|
811
813
|
* will be multiplied by 2. Calling `mult()` with no arguments, as in `v.mult()`, has
|
|
812
814
|
* no effect.
|
|
813
815
|
*
|
|
814
|
-
*
|
|
815
|
-
*
|
|
816
|
+
* You should multiply vectors only when they are the same size. When two
|
|
817
|
+
* vectors of different sizes are multiplied, the smaller dimension will be
|
|
816
818
|
* used, any additional values of the longer vector will be ignored.
|
|
817
819
|
* For example, multiplying `[1, 2, 3]` by `[4, 5]` will result in `[4, 10]`.
|
|
818
820
|
*
|
|
@@ -977,19 +979,25 @@ class Vector {
|
|
|
977
979
|
* @param {p5.Vector} v vector to multiply with the components of the original vector.
|
|
978
980
|
* @chainable
|
|
979
981
|
*/
|
|
980
|
-
mult(
|
|
982
|
+
mult(args) {
|
|
981
983
|
const minDimension = prioritizeSmallerDimension(this.dimensions, args);
|
|
982
984
|
shrinkToDimension(this.values, minDimension);
|
|
983
985
|
|
|
984
|
-
|
|
985
|
-
this.values
|
|
986
|
+
if(Array.isArray(args)){
|
|
987
|
+
for (let i = 0; i < this.values.length; i++) {
|
|
988
|
+
this.values[i] *= args[i];
|
|
989
|
+
}
|
|
990
|
+
} else {
|
|
991
|
+
for (let i = 0; i < this.values.length; i++) {
|
|
992
|
+
this.values[i] *= args;
|
|
993
|
+
}
|
|
986
994
|
}
|
|
987
995
|
|
|
988
996
|
return this;
|
|
989
997
|
}
|
|
990
998
|
|
|
991
999
|
/**
|
|
992
|
-
* Divides a vector's
|
|
1000
|
+
* Divides a vector's components.
|
|
993
1001
|
*
|
|
994
1002
|
* `div()` can use separate numbers, as in `v.div(1, 2, 3)`, another
|
|
995
1003
|
* <a href="#/p5.Vector">p5.Vector</a> object, as in `v.div(v2)`, or an array
|
|
@@ -999,8 +1007,8 @@ class Vector {
|
|
|
999
1007
|
* will be divided by 2. Calling `div()` with no arguments, as in `v.div()`, has
|
|
1000
1008
|
* no effect.
|
|
1001
1009
|
*
|
|
1002
|
-
*
|
|
1003
|
-
*
|
|
1010
|
+
* You should divide vectors only when they are the same size. When two
|
|
1011
|
+
* vectors of different sizes are divided, the smaller dimension will be
|
|
1004
1012
|
* used, any additional values of the longer vector will be ignored.
|
|
1005
1013
|
* For example, dividing `[8, 12, 21]` by `[2, 3]` will result in `[4, 4]`.
|
|
1006
1014
|
*
|
|
@@ -1166,24 +1174,41 @@ class Vector {
|
|
|
1166
1174
|
* @param {p5.Vector} v vector to divide the components of the original vector by.
|
|
1167
1175
|
* @chainable
|
|
1168
1176
|
*/
|
|
1169
|
-
div(
|
|
1177
|
+
div(args) {
|
|
1170
1178
|
const minDimension = prioritizeSmallerDimension(this.dimensions, args);
|
|
1171
1179
|
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
if (
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1180
|
+
if (Array.isArray(args)) {
|
|
1181
|
+
for (let i = 0; i < minDimension; i++) {
|
|
1182
|
+
if ((typeof args[i] !== 'number' || args[i] === 0)) {
|
|
1183
|
+
if (!this.friendlyErrorsDisabled()) {
|
|
1184
|
+
console.warn(
|
|
1185
|
+
'p5.Vector.prototype.div',
|
|
1186
|
+
'Arguments contain components that are 0'
|
|
1187
|
+
);
|
|
1188
|
+
}
|
|
1189
|
+
return this;
|
|
1179
1190
|
}
|
|
1180
|
-
return this;
|
|
1181
1191
|
}
|
|
1192
|
+
} else if(typeof args !== 'number' || args === 0) {
|
|
1193
|
+
if (!this.friendlyErrorsDisabled()) {
|
|
1194
|
+
console.warn(
|
|
1195
|
+
'p5.Vector.prototype.div',
|
|
1196
|
+
'Arguments contain components that are 0'
|
|
1197
|
+
);
|
|
1198
|
+
}
|
|
1199
|
+
return this;
|
|
1182
1200
|
}
|
|
1183
1201
|
|
|
1184
1202
|
shrinkToDimension(this.values, minDimension);
|
|
1185
|
-
|
|
1186
|
-
|
|
1203
|
+
|
|
1204
|
+
if(Array.isArray(args)){
|
|
1205
|
+
for (let i = 0; i < this.values.length; i++) {
|
|
1206
|
+
this.values[i] /= args[i];
|
|
1207
|
+
}
|
|
1208
|
+
} else {
|
|
1209
|
+
for (let i = 0; i < this.values.length; i++) {
|
|
1210
|
+
this.values[i] /= args;
|
|
1211
|
+
}
|
|
1187
1212
|
}
|
|
1188
1213
|
|
|
1189
1214
|
return this;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Vector } from './p5.Vector.js';
|
|
2
|
-
import '../constants-
|
|
2
|
+
import '../constants-Dv6ZqA6s.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* @private
|
|
@@ -8,7 +8,7 @@ import '../constants-CdA3y5zC.js';
|
|
|
8
8
|
function _defaultEmptyVector(target){
|
|
9
9
|
return function(...args){
|
|
10
10
|
if(args.length === 0){
|
|
11
|
-
this._friendlyError(
|
|
11
|
+
this.constructor._friendlyError(
|
|
12
12
|
'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.',
|
|
13
13
|
'p5.createVector'
|
|
14
14
|
);
|
|
@@ -29,7 +29,7 @@ function _defaultEmptyVector(target){
|
|
|
29
29
|
*/
|
|
30
30
|
function _validatedVectorOperation(expectsSoloNumberArgument){
|
|
31
31
|
return function(target){
|
|
32
|
-
return function(...args){
|
|
32
|
+
return function (...args) {
|
|
33
33
|
if (args.length === 0) {
|
|
34
34
|
// No arguments? No action
|
|
35
35
|
return this;
|
|
@@ -39,16 +39,18 @@ function _validatedVectorOperation(expectsSoloNumberArgument){
|
|
|
39
39
|
} else if (Array.isArray(args[0])) {
|
|
40
40
|
// First argument is an array? Great, keep it!
|
|
41
41
|
args = args[0];
|
|
42
|
-
} else if (
|
|
42
|
+
} else if (args.length === 1){
|
|
43
43
|
// Special case for a solo numeric arguments only applies sometimes
|
|
44
|
-
|
|
44
|
+
if (expectsSoloNumberArgument) {
|
|
45
|
+
args = args[0];
|
|
46
|
+
}
|
|
45
47
|
}
|
|
46
48
|
|
|
47
|
-
if
|
|
49
|
+
if(Array.isArray(args)){
|
|
48
50
|
for (let i = 0; i < args.length; i++) {
|
|
49
51
|
const v = args[i];
|
|
50
52
|
if (typeof v !== 'number' || !Number.isFinite(v)) {
|
|
51
|
-
if (!
|
|
53
|
+
if (!this.friendlyErrorsDisabled()) {
|
|
52
54
|
this._friendlyError(
|
|
53
55
|
'Arguments contain non-finite numbers',
|
|
54
56
|
'p5.Vector'
|
|
@@ -57,9 +59,19 @@ function _validatedVectorOperation(expectsSoloNumberArgument){
|
|
|
57
59
|
return this;
|
|
58
60
|
}
|
|
59
61
|
}
|
|
62
|
+
} else {
|
|
63
|
+
if (typeof args !== 'number' || !Number.isFinite(args)) {
|
|
64
|
+
if (!this.friendlyErrorsDisabled()) {
|
|
65
|
+
this._friendlyError(
|
|
66
|
+
'Arguments contain non-finite numbers',
|
|
67
|
+
'p5.Vector'
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
return this;
|
|
71
|
+
}
|
|
60
72
|
}
|
|
61
73
|
|
|
62
|
-
return target.call(this,
|
|
74
|
+
return target.call(this, args);
|
|
63
75
|
};
|
|
64
76
|
};
|
|
65
77
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { C as Color } from './creating_reading-DLkHH80h.js';
|
|
2
|
-
import { a1 as NORMAL, aA as WORD, ax as BASELINE, av as LEFT, t as CENTER, n as CORNER, I as INCLUDE } from './constants-
|
|
2
|
+
import { a1 as NORMAL, aA as WORD, ax as BASELINE, av as LEFT, t as CENTER, n as CORNER, I as INCLUDE } from './constants-Dv6ZqA6s.js';
|
|
3
3
|
import Filters from './image/filters.js';
|
|
4
4
|
import { Vector } from './math/p5.Vector.js';
|
|
5
5
|
import { Shape } from './shape/custom_shapes.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { n as CORNER, r as CORNERS, t as CENTER, aB as COVER, aC as CONTAIN, aa as RIGHT, aw as BOTTOM, B as BLEND, aD as FILL, ae as IMAGE, C as CLAMP, u as ROUND, Q as LINES, K as POINTS, c as TRIANGLES, ac as BLUR, D as DARKEST, L as LIGHTEST, A as ADD, S as SUBTRACT, a as SCREEN, E as EXCLUSION, R as REPLACE, M as MULTIPLY, b as REMOVE, au as BURN, aq as OVERLAY, ar as HARD_LIGHT, as as SOFT_LIGHT, at as DODGE, d as UNSIGNED_INT, U as UNSIGNED_BYTE, av as LEFT, ax as BASELINE, ay as TOP, aE as SIMPLE, aF as FULL, o as TWO_PI, O as OPEN, a1 as NORMAL, J as CLOSE, a0 as PIE, $ as CHORD, a7 as TEXTURE, P as P2D, g as LINEAR, ab as WEBGL2, N as NEAREST, aG as LINEAR_MIPMAP, f as REPEAT, e as MIRROR, F as FLOAT, ad as WEBGL, H as HALF_FLOAT, W as WEBGPU } from './constants-
|
|
1
|
+
import { n as CORNER, r as CORNERS, t as CENTER, aB as COVER, aC as CONTAIN, aa as RIGHT, aw as BOTTOM, B as BLEND, aD as FILL, ae as IMAGE, C as CLAMP, u as ROUND, Q as LINES, K as POINTS, c as TRIANGLES, ac as BLUR, D as DARKEST, L as LIGHTEST, A as ADD, S as SUBTRACT, a as SCREEN, E as EXCLUSION, R as REPLACE, M as MULTIPLY, b as REMOVE, au as BURN, aq as OVERLAY, ar as HARD_LIGHT, as as SOFT_LIGHT, at as DODGE, d as UNSIGNED_INT, U as UNSIGNED_BYTE, av as LEFT, ax as BASELINE, ay as TOP, aE as SIMPLE, aF as FULL, o as TWO_PI, O as OPEN, a1 as NORMAL, J as CLOSE, a0 as PIE, $ as CHORD, a7 as TEXTURE, P as P2D, g as LINEAR, ab as WEBGL2, N as NEAREST, aG as LINEAR_MIPMAP, f as REPEAT, e as MIRROR, F as FLOAT, ad as WEBGL, H as HALF_FLOAT, W as WEBGPU } from './constants-Dv6ZqA6s.js';
|
|
2
2
|
import { C as Color, c as creatingReading, h as RGBA, R as RGB } from './creating_reading-DLkHH80h.js';
|
|
3
3
|
import './strands/ir_types.js';
|
|
4
4
|
import { Element } from './dom/p5.Element.js';
|
|
5
|
-
import { R as Renderer, I as Image } from './p5.Renderer-
|
|
5
|
+
import { R as Renderer, I as Image } from './p5.Renderer-XOvhEbJn.js';
|
|
6
6
|
import { MediaElement } from './dom/p5.MediaElement.js';
|
|
7
7
|
import primitives from './shape/2d_primitives.js';
|
|
8
8
|
import attributes from './shape/attributes.js';
|
package/dist/shape/attributes.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as CORNER, r as CORNERS, s as RADIUS, t as CENTER, u as ROUND, v as SQUARE, w as PROJECT, x as BEVEL, y as MITER } from '../constants-
|
|
1
|
+
import { n as CORNER, r as CORNERS, s as RADIUS, t as CENTER, u as ROUND, v as SQUARE, w as PROJECT, x as BEVEL, y as MITER } from '../constants-Dv6ZqA6s.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* @module Shape
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { C as Color } from '../creating_reading-DLkHH80h.js';
|
|
2
2
|
import { Vector } from '../math/p5.Vector.js';
|
|
3
|
-
import { I as INCLUDE, z as PATH, G as EMPTY_PATH, O as OPEN, J as CLOSE, K as POINTS, Q as LINES, c as TRIANGLES, V as QUADS, X as TRIANGLE_FAN, T as TRIANGLE_STRIP, Y as QUAD_STRIP, Z as EXCLUDE, _ as JOIN, $ as CHORD, a0 as PIE } from '../constants-
|
|
3
|
+
import { I as INCLUDE, z as PATH, G as EMPTY_PATH, O as OPEN, J as CLOSE, K as POINTS, Q as LINES, c as TRIANGLES, V as QUADS, X as TRIANGLE_FAN, T as TRIANGLE_STRIP, Y as QUAD_STRIP, Z as EXCLUDE, _ as JOIN, $ as CHORD, a0 as PIE } from '../constants-Dv6ZqA6s.js';
|
|
4
4
|
import 'colorjs.io/fn';
|
|
5
5
|
import '../color/color_spaces/hsb.js';
|
|
6
6
|
|
package/dist/shape/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import attributes from './attributes.js';
|
|
|
3
3
|
import curves from './curves.js';
|
|
4
4
|
import vertex from './vertex.js';
|
|
5
5
|
import customShapes from './custom_shapes.js';
|
|
6
|
-
import '../constants-
|
|
6
|
+
import '../constants-Dv6ZqA6s.js';
|
|
7
7
|
import '../core/helpers.js';
|
|
8
8
|
import '../creating_reading-DLkHH80h.js';
|
|
9
9
|
import 'colorjs.io/fn';
|
package/dist/type/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import textCore from './textCore.js';
|
|
2
2
|
import font from './p5.Font.js';
|
|
3
|
-
import '../p5.Renderer-
|
|
3
|
+
import '../p5.Renderer-XOvhEbJn.js';
|
|
4
4
|
import '../creating_reading-DLkHH80h.js';
|
|
5
5
|
import 'colorjs.io/fn';
|
|
6
6
|
import '../color/color_spaces/hsb.js';
|
|
7
|
-
import '../constants-
|
|
7
|
+
import '../constants-Dv6ZqA6s.js';
|
|
8
8
|
import '../image/filters.js';
|
|
9
9
|
import '../math/p5.Vector.js';
|
|
10
10
|
import '../shape/custom_shapes.js';
|
package/dist/type/p5.Font.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { textCoreConstants } from './textCore.js';
|
|
2
|
-
import { t as CENTER, aa as RIGHT, s as RADIUS } from '../constants-
|
|
2
|
+
import { t as CENTER, aa as RIGHT, s as RADIUS } from '../constants-Dv6ZqA6s.js';
|
|
3
3
|
import { UnicodeRange } from '@japont/unicode-range';
|
|
4
4
|
import { unicodeRanges } from './unicodeRanges.js';
|
|
5
5
|
import { Vector } from '../math/p5.Vector.js';
|
|
6
6
|
import Typr from './lib/Typr.js';
|
|
7
7
|
import { createFromCommands } from '@davepagurek/bezier-path';
|
|
8
|
-
import '../p5.Renderer-
|
|
8
|
+
import '../p5.Renderer-XOvhEbJn.js';
|
|
9
9
|
import '../creating_reading-DLkHH80h.js';
|
|
10
10
|
import 'colorjs.io/fn';
|
|
11
11
|
import '../color/color_spaces/hsb.js';
|
package/dist/type/textCore.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { R as Renderer } from '../p5.Renderer-
|
|
1
|
+
import { R as Renderer } from '../p5.Renderer-XOvhEbJn.js';
|
|
2
2
|
import '../creating_reading-DLkHH80h.js';
|
|
3
3
|
import 'colorjs.io/fn';
|
|
4
4
|
import '../color/color_spaces/hsb.js';
|
|
5
|
-
import '../constants-
|
|
5
|
+
import '../constants-Dv6ZqA6s.js';
|
|
6
6
|
import '../image/filters.js';
|
|
7
7
|
import '../math/p5.Vector.js';
|
|
8
8
|
import '../shape/custom_shapes.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import '../constants-
|
|
2
|
-
export { p as default } from '../rendering-
|
|
1
|
+
import '../constants-Dv6ZqA6s.js';
|
|
2
|
+
export { p as default } from '../rendering-C5lX6zKm.js';
|
|
3
3
|
import '../math/p5.Vector.js';
|
|
4
4
|
import './p5.Geometry.js';
|
|
5
5
|
import '../math/p5.Matrix.js';
|
|
@@ -11,7 +11,7 @@ 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-
|
|
14
|
+
import '../p5.Renderer-XOvhEbJn.js';
|
|
15
15
|
import '../image/filters.js';
|
|
16
16
|
import '../shape/custom_shapes.js';
|
|
17
17
|
import '../core/States.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { T as TRIANGLE_STRIP, Y as QUAD_STRIP, X as TRIANGLE_FAN, c as TRIANGLES } from '../constants-
|
|
1
|
+
import { T as TRIANGLE_STRIP, Y as QUAD_STRIP, X as TRIANGLE_FAN, c as TRIANGLES } from '../constants-Dv6ZqA6s.js';
|
|
2
2
|
import '../math/p5.Matrix.js';
|
|
3
3
|
import { Geometry } from './p5.Geometry.js';
|
|
4
4
|
import { Matrix } from '../math/Matrices/Matrix.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { z as PATH, V as QUADS, Y as QUAD_STRIP, T as TRIANGLE_STRIP, c as TRIANGLES, ae as IMAGE, Q as LINES, X as TRIANGLE_FAN } from '../constants-
|
|
1
|
+
import { z as PATH, V as QUADS, Y as QUAD_STRIP, T as TRIANGLE_STRIP, c as TRIANGLES, ae as IMAGE, Q as LINES, X as TRIANGLE_FAN } from '../constants-Dv6ZqA6s.js';
|
|
2
2
|
import { Geometry } from './p5.Geometry.js';
|
|
3
3
|
import libtess from 'libtess';
|
|
4
4
|
import { Vector } from '../math/p5.Vector.js';
|
package/dist/webgl/enums.js
CHANGED
package/dist/webgl/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as renderer3D, p as primitives3D, a as light, m as material, c as camera, b as framebuffer, t as texture } from '../rendering-
|
|
1
|
+
import { r as renderer3D, p as primitives3D, a as light, m as material, c as camera, b as framebuffer, t as texture } from '../rendering-C5lX6zKm.js';
|
|
2
2
|
import interaction from './interaction.js';
|
|
3
3
|
import loading from './loading.js';
|
|
4
4
|
import text from './text.js';
|
|
@@ -8,7 +8,7 @@ import matrix from '../math/p5.Matrix.js';
|
|
|
8
8
|
import geometry from './p5.Geometry.js';
|
|
9
9
|
import dataArray from './p5.DataArray.js';
|
|
10
10
|
import rendererGL from './p5.RendererGL.js';
|
|
11
|
-
import '../constants-
|
|
11
|
+
import '../constants-Dv6ZqA6s.js';
|
|
12
12
|
import '../creating_reading-DLkHH80h.js';
|
|
13
13
|
import 'colorjs.io/fn';
|
|
14
14
|
import '../color/color_spaces/hsb.js';
|
|
@@ -16,7 +16,7 @@ import '../strands/ir_types.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-
|
|
19
|
+
import '../p5.Renderer-XOvhEbJn.js';
|
|
20
20
|
import '../image/filters.js';
|
|
21
21
|
import '../math/p5.Vector.js';
|
|
22
22
|
import '../shape/custom_shapes.js';
|
package/dist/webgl/light.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
export { a as default } from '../rendering-
|
|
1
|
+
export { a as default } from '../rendering-C5lX6zKm.js';
|
|
2
2
|
import '../math/p5.Vector.js';
|
|
3
3
|
import '../creating_reading-DLkHH80h.js';
|
|
4
|
-
import '../constants-
|
|
4
|
+
import '../constants-Dv6ZqA6s.js';
|
|
5
5
|
import '../strands/ir_types.js';
|
|
6
6
|
import '../dom/p5.Element.js';
|
|
7
7
|
import '../dom/p5.File.js';
|
|
8
8
|
import '../io/p5.XML.js';
|
|
9
9
|
import 'colorjs.io/fn';
|
|
10
10
|
import '../color/color_spaces/hsb.js';
|
|
11
|
-
import '../p5.Renderer-
|
|
11
|
+
import '../p5.Renderer-XOvhEbJn.js';
|
|
12
12
|
import '../image/filters.js';
|
|
13
13
|
import '../shape/custom_shapes.js';
|
|
14
14
|
import '../core/States.js';
|
package/dist/webgl/loading.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Geometry } from './p5.Geometry.js';
|
|
2
2
|
import { Vector } from '../math/p5.Vector.js';
|
|
3
|
-
import { d as request } from '../rendering-
|
|
4
|
-
import '../constants-
|
|
3
|
+
import { d as request } from '../rendering-C5lX6zKm.js';
|
|
4
|
+
import '../constants-Dv6ZqA6s.js';
|
|
5
5
|
import './p5.DataArray.js';
|
|
6
6
|
import '../io/utilities.js';
|
|
7
7
|
import '../creating_reading-DLkHH80h.js';
|
|
@@ -11,7 +11,7 @@ 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-
|
|
14
|
+
import '../p5.Renderer-XOvhEbJn.js';
|
|
15
15
|
import '../image/filters.js';
|
|
16
16
|
import '../shape/custom_shapes.js';
|
|
17
17
|
import '../core/States.js';
|
package/dist/webgl/material.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import '../constants-
|
|
2
|
-
export { m as default } from '../rendering-
|
|
1
|
+
import '../constants-Dv6ZqA6s.js';
|
|
2
|
+
export { m as default } from '../rendering-C5lX6zKm.js';
|
|
3
3
|
import './p5.Shader.js';
|
|
4
4
|
import '../creating_reading-DLkHH80h.js';
|
|
5
5
|
import '../strands/ir_types.js';
|
|
@@ -8,7 +8,7 @@ import '../dom/p5.File.js';
|
|
|
8
8
|
import '../io/p5.XML.js';
|
|
9
9
|
import 'colorjs.io/fn';
|
|
10
10
|
import '../color/color_spaces/hsb.js';
|
|
11
|
-
import '../p5.Renderer-
|
|
11
|
+
import '../p5.Renderer-XOvhEbJn.js';
|
|
12
12
|
import '../image/filters.js';
|
|
13
13
|
import '../math/p5.Vector.js';
|
|
14
14
|
import '../shape/custom_shapes.js';
|
package/dist/webgl/p5.Camera.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import '../math/p5.Matrix.js';
|
|
2
2
|
import '../math/p5.Vector.js';
|
|
3
3
|
import './p5.Quat.js';
|
|
4
|
-
export { C as Camera, c as default } from '../rendering-
|
|
4
|
+
export { C as Camera, c as default } from '../rendering-C5lX6zKm.js';
|
|
5
5
|
import '../math/Matrices/Matrix.js';
|
|
6
|
-
import '../constants-
|
|
6
|
+
import '../constants-Dv6ZqA6s.js';
|
|
7
7
|
import '../math/Matrices/MatrixInterface.js';
|
|
8
8
|
import '../creating_reading-DLkHH80h.js';
|
|
9
9
|
import 'colorjs.io/fn';
|
|
@@ -12,7 +12,7 @@ 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-
|
|
15
|
+
import '../p5.Renderer-XOvhEbJn.js';
|
|
16
16
|
import '../image/filters.js';
|
|
17
17
|
import '../shape/custom_shapes.js';
|
|
18
18
|
import '../core/States.js';
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import '../constants-
|
|
1
|
+
import '../constants-Dv6ZqA6s.js';
|
|
2
2
|
import '../creating_reading-DLkHH80h.js';
|
|
3
|
-
export { w as Framebuffer, v as FramebufferCamera, F as FramebufferTexture, b as default } from '../rendering-
|
|
3
|
+
export { w as Framebuffer, v as FramebufferCamera, F as FramebufferTexture, b as default } from '../rendering-C5lX6zKm.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-
|
|
10
|
+
import '../p5.Renderer-XOvhEbJn.js';
|
|
11
11
|
import '../image/filters.js';
|
|
12
12
|
import '../math/p5.Vector.js';
|
|
13
13
|
import '../shape/custom_shapes.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a8 as FLAT, a9 as SMOOTH } from '../constants-
|
|
1
|
+
import { a8 as FLAT, a9 as SMOOTH } from '../constants-Dv6ZqA6s.js';
|
|
2
2
|
import { DataArray } from './p5.DataArray.js';
|
|
3
3
|
import { Vector } from '../math/p5.Vector.js';
|
|
4
4
|
import { downloadFile } from '../io/utilities.js';
|
package/dist/webgl/p5.Quat.js
CHANGED