p5 2.3.0 → 2.3.1-rc.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 +3 -11
- package/dist/accessibility/color_namer.js +7 -7
- package/dist/accessibility/index.js +7 -7
- package/dist/app.js +7 -7
- package/dist/app.node.js +7 -7
- package/dist/color/color_conversion.js +7 -7
- package/dist/color/creating_reading.js +1 -1
- package/dist/color/index.js +2 -2
- package/dist/color/p5.Color.js +1 -1
- package/dist/color/setting.js +10 -10
- package/dist/{constants-Dv6ZqA6s.js → constants-DkQDfqzw.js} +8 -8
- package/dist/core/constants.js +1 -1
- package/dist/core/environment.js +3 -3
- 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 +489 -466
- package/dist/core/friendly_errors/sketch_verifier.js +1 -1
- package/dist/core/helpers.js +1 -1
- package/dist/core/init.js +7 -7
- package/dist/core/internationalization.js +1 -1
- package/dist/core/legacy.js +7 -7
- package/dist/core/main.js +7 -7
- package/dist/core/p5.Graphics.js +4 -4
- package/dist/core/p5.Renderer.js +3 -3
- package/dist/core/p5.Renderer2D.js +7 -7
- package/dist/core/p5.Renderer3D.js +4 -4
- package/dist/core/rendering.js +4 -4
- package/dist/{creating_reading-DLkHH80h.js → creating_reading-Dyt2y-6S.js} +25 -17
- package/dist/dom/dom.js +2 -2
- package/dist/dom/index.js +2 -2
- package/dist/dom/p5.Element.js +2 -2
- package/dist/dom/p5.MediaElement.js +2 -2
- package/dist/events/pointer.js +15 -0
- package/dist/image/const.js +1 -1
- package/dist/image/filterRenderer2D.js +6 -6
- package/dist/image/image.js +4 -4
- package/dist/image/index.js +4 -4
- package/dist/image/loading_displaying.js +4 -4
- package/dist/image/p5.Image.js +3 -3
- package/dist/io/files.js +4 -4
- package/dist/io/index.js +4 -4
- package/dist/{ir_builders-C8mrXj5z.js → ir_builders-CMXkjMoV.js} +34 -24
- package/dist/{main-BR2ALC_6.js → main-CAqj0AHr.js} +41 -210
- package/dist/math/Matrices/Matrix.js +1 -1
- package/dist/math/Matrices/MatrixNumjs.js +1 -1
- package/dist/math/calculation.js +669 -84
- package/dist/math/index.js +1 -1
- package/dist/math/p5.Matrix.js +1 -1
- package/dist/math/p5.Vector.js +9 -1
- package/dist/math/patch-vector.js +3 -1
- package/dist/math/trigonometry.js +399 -48
- package/dist/{p5.Renderer-XOvhEbJn.js → p5.Renderer-Bf-YLpi6.js} +2 -2
- package/dist/{rendering-C5lX6zKm.js → rendering-BowMW0pZ.js} +32 -13
- package/dist/shape/2d_primitives.js +1 -1
- package/dist/shape/attributes.js +4 -3
- package/dist/shape/custom_shapes.js +205 -3
- package/dist/shape/index.js +2 -2
- package/dist/strands/ir_builders.js +1 -1
- package/dist/strands/p5.strands.js +26 -9
- package/dist/strands/strands_FES.js +8 -1
- package/dist/strands/strands_api.js +316 -21
- package/dist/strands/strands_conditionals.js +1 -1
- package/dist/strands/strands_for.js +1 -1
- package/dist/strands/strands_node.js +1 -1
- package/dist/strands/strands_ternary.js +1 -1
- package/dist/{strands_glslBackend-D6G3UyCs.js → strands_glslBackend-DMhOnoGl.js} +2 -2
- package/dist/type/index.js +3 -3
- package/dist/type/p5.Font.js +13 -4
- package/dist/type/textCore.js +3 -3
- package/dist/webgl/3d_primitives.js +4 -4
- package/dist/webgl/GeometryBuilder.js +1 -1
- package/dist/webgl/ShapeBuilder.js +50 -1
- package/dist/webgl/enums.js +1 -1
- package/dist/webgl/index.js +6 -6
- package/dist/webgl/interaction.js +1 -1
- package/dist/webgl/light.js +4 -4
- package/dist/webgl/loading.js +4 -4
- package/dist/webgl/material.js +4 -4
- package/dist/webgl/p5.Camera.js +4 -4
- package/dist/webgl/p5.Framebuffer.js +4 -4
- package/dist/webgl/p5.Geometry.js +1 -1
- package/dist/webgl/p5.Quat.js +1 -1
- package/dist/webgl/p5.RendererGL.js +20 -9
- package/dist/webgl/p5.Shader.js +5 -1
- package/dist/webgl/p5.Texture.js +4 -4
- package/dist/webgl/strands_glslBackend.js +2 -2
- package/dist/webgl/text.js +4 -4
- package/dist/webgl/utils.js +4 -4
- package/dist/webgpu/index.js +2 -2
- package/dist/webgpu/p5.RendererWebGPU.js +6 -2
- package/dist/webgpu/strands_wgslBackend.js +2 -2
- package/lib/p5.esm.js +2358 -911
- package/lib/p5.esm.min.js +1 -1
- package/lib/p5.js +2358 -911
- package/lib/p5.min.js +1 -1
- package/lib/p5.webgpu.esm.js +44 -9
- package/lib/p5.webgpu.js +44 -9
- package/lib/p5.webgpu.min.js +1 -1
- package/package.json +1 -1
- package/types/global.d.ts +5785 -2850
- package/types/p5.d.ts +3016 -1531
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { parse } from 'acorn';
|
|
2
2
|
import { simple } from 'acorn-walk';
|
|
3
|
-
import { am as constants } from '../../constants-
|
|
3
|
+
import { am as constants } from '../../constants-DkQDfqzw.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.
|
package/dist/core/helpers.js
CHANGED
package/dist/core/init.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { p as p5 } from '../main-
|
|
1
|
+
import { p as p5 } from '../main-CAqj0AHr.js';
|
|
2
2
|
import { initialize } from './internationalization.js';
|
|
3
|
-
import '../constants-
|
|
3
|
+
import '../constants-DkQDfqzw.js';
|
|
4
4
|
import './transform.js';
|
|
5
5
|
import './structure.js';
|
|
6
6
|
import './environment.js';
|
|
7
|
-
import '../rendering-
|
|
8
|
-
import '../creating_reading-
|
|
7
|
+
import '../rendering-BowMW0pZ.js';
|
|
8
|
+
import '../creating_reading-Dyt2y-6S.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-
|
|
15
|
+
import '../p5.Renderer-Bf-YLpi6.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-
|
|
50
|
+
import '../strands_glslBackend-DMhOnoGl.js';
|
|
51
51
|
import '../strands/ir_dag.js';
|
|
52
52
|
import '../strands/strands_FES.js';
|
|
53
|
-
import '../ir_builders-
|
|
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-
|
|
3
|
+
import { az as VERSION } from '../constants-DkQDfqzw.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}}",
|
package/dist/core/legacy.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { p as p5 } from '../main-
|
|
2
|
-
import '../constants-
|
|
1
|
+
import { p as p5 } from '../main-CAqj0AHr.js';
|
|
2
|
+
import '../constants-DkQDfqzw.js';
|
|
3
3
|
import './transform.js';
|
|
4
4
|
import './structure.js';
|
|
5
5
|
import './environment.js';
|
|
6
|
-
import '../rendering-
|
|
7
|
-
import '../creating_reading-
|
|
6
|
+
import '../rendering-BowMW0pZ.js';
|
|
7
|
+
import '../creating_reading-Dyt2y-6S.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-
|
|
14
|
+
import '../p5.Renderer-Bf-YLpi6.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-
|
|
49
|
+
import '../strands_glslBackend-DMhOnoGl.js';
|
|
50
50
|
import '../strands/ir_dag.js';
|
|
51
51
|
import '../strands/strands_FES.js';
|
|
52
|
-
import '../ir_builders-
|
|
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-
|
|
1
|
+
import '../constants-DkQDfqzw.js';
|
|
2
2
|
import './transform.js';
|
|
3
3
|
import './structure.js';
|
|
4
4
|
import './environment.js';
|
|
5
|
-
import '../rendering-
|
|
6
|
-
import '../p5.Renderer-
|
|
7
|
-
export { p as default } from '../main-
|
|
8
|
-
import '../creating_reading-
|
|
5
|
+
import '../rendering-BowMW0pZ.js';
|
|
6
|
+
import '../p5.Renderer-Bf-YLpi6.js';
|
|
7
|
+
export { p as default } from '../main-CAqj0AHr.js';
|
|
8
|
+
import '../creating_reading-Dyt2y-6S.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-
|
|
49
|
+
import '../strands_glslBackend-DMhOnoGl.js';
|
|
50
50
|
import '../strands/ir_dag.js';
|
|
51
51
|
import '../strands/strands_FES.js';
|
|
52
|
-
import '../ir_builders-
|
|
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/p5.Graphics.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import '../constants-
|
|
1
|
+
import '../constants-DkQDfqzw.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-
|
|
7
|
+
export { G as Graphics, n as default } from '../rendering-BowMW0pZ.js';
|
|
8
8
|
import '../image/pixels.js';
|
|
9
9
|
import './transform.js';
|
|
10
|
-
import '../creating_reading-
|
|
10
|
+
import '../creating_reading-Dyt2y-6S.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-
|
|
20
|
+
import '../p5.Renderer-Bf-YLpi6.js';
|
|
21
21
|
import '../image/filters.js';
|
|
22
22
|
import '../math/p5.Vector.js';
|
|
23
23
|
import './States.js';
|
package/dist/core/p5.Renderer.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import '../creating_reading-
|
|
2
|
-
import '../constants-
|
|
3
|
-
export { R as Renderer, r as default } from '../p5.Renderer-
|
|
1
|
+
import '../creating_reading-Dyt2y-6S.js';
|
|
2
|
+
import '../constants-DkQDfqzw.js';
|
|
3
|
+
export { R as Renderer, r as default } from '../p5.Renderer-Bf-YLpi6.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-
|
|
2
|
-
export { R as Renderer2D, r as default } from '../main-
|
|
3
|
-
import '../p5.Renderer-
|
|
4
|
-
import '../rendering-
|
|
1
|
+
import '../constants-DkQDfqzw.js';
|
|
2
|
+
export { R as Renderer2D, r as default } from '../main-CAqj0AHr.js';
|
|
3
|
+
import '../p5.Renderer-Bf-YLpi6.js';
|
|
4
|
+
import '../rendering-BowMW0pZ.js';
|
|
5
5
|
import '../dom/p5.Element.js';
|
|
6
6
|
import '../dom/p5.MediaElement.js';
|
|
7
|
-
import '../creating_reading-
|
|
7
|
+
import '../creating_reading-Dyt2y-6S.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-
|
|
49
|
+
import '../strands_glslBackend-DMhOnoGl.js';
|
|
50
50
|
import '../strands/ir_dag.js';
|
|
51
51
|
import '../strands/strands_FES.js';
|
|
52
|
-
import '../ir_builders-
|
|
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-
|
|
2
|
-
export { R as Renderer3D, r as default } from '../rendering-
|
|
3
|
-
import '../p5.Renderer-
|
|
1
|
+
import '../constants-DkQDfqzw.js';
|
|
2
|
+
export { R as Renderer3D, r as default } from '../rendering-BowMW0pZ.js';
|
|
3
|
+
import '../p5.Renderer-Bf-YLpi6.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-
|
|
11
|
+
import '../creating_reading-Dyt2y-6S.js';
|
|
12
12
|
import '../dom/p5.Element.js';
|
|
13
13
|
import '../webgl/p5.DataArray.js';
|
|
14
14
|
import '../type/textCore.js';
|
package/dist/core/rendering.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import '../constants-
|
|
2
|
-
export { k as default, x as renderers } from '../rendering-
|
|
3
|
-
import '../creating_reading-
|
|
1
|
+
import '../constants-DkQDfqzw.js';
|
|
2
|
+
export { k as default, x as renderers } from '../rendering-BowMW0pZ.js';
|
|
3
|
+
import '../creating_reading-Dyt2y-6S.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-Bf-YLpi6.js';
|
|
11
11
|
import '../image/filters.js';
|
|
12
12
|
import '../math/p5.Vector.js';
|
|
13
13
|
import '../shape/custom_shapes.js';
|
|
@@ -534,7 +534,7 @@ class Color {
|
|
|
534
534
|
const colorjsMax = Color.#colorjsMaxes[RGB][0];
|
|
535
535
|
const newval = map(new_red, max[0], max[1], colorjsMax[0], colorjsMax[1]);
|
|
536
536
|
|
|
537
|
-
if(this.mode === RGB || this.mode ===
|
|
537
|
+
if(this.mode === RGB || this.mode === RGBP3){
|
|
538
538
|
this._color.coords[0] = newval;
|
|
539
539
|
}else {
|
|
540
540
|
// Will do an imprecise conversion to 'srgb', not recommended
|
|
@@ -586,7 +586,7 @@ class Color {
|
|
|
586
586
|
const colorjsMax = Color.#colorjsMaxes[RGB][1];
|
|
587
587
|
const newval = map(new_green, max[0], max[1], colorjsMax[0], colorjsMax[1]);
|
|
588
588
|
|
|
589
|
-
if(this.mode === RGB || this.mode ===
|
|
589
|
+
if(this.mode === RGB || this.mode === RGBP3){
|
|
590
590
|
this._color.coords[1] = newval;
|
|
591
591
|
}else {
|
|
592
592
|
// Will do an imprecise conversion to 'srgb', not recommended
|
|
@@ -638,7 +638,7 @@ class Color {
|
|
|
638
638
|
const colorjsMax = Color.#colorjsMaxes[RGB][2];
|
|
639
639
|
const newval = map(new_blue, max[0], max[1], colorjsMax[0], colorjsMax[1]);
|
|
640
640
|
|
|
641
|
-
if(this.mode === RGB || this.mode ===
|
|
641
|
+
if(this.mode === RGB || this.mode === RGBP3){
|
|
642
642
|
this._color.coords[2] = newval;
|
|
643
643
|
}else {
|
|
644
644
|
// Will do an imprecise conversion to 'srgb', not recommended
|
|
@@ -730,7 +730,7 @@ class Color {
|
|
|
730
730
|
max = [0, max];
|
|
731
731
|
}
|
|
732
732
|
|
|
733
|
-
if(this.mode === RGB || this.mode ===
|
|
733
|
+
if(this.mode === RGB || this.mode === RGBP3){
|
|
734
734
|
const colorjsMax = Color.#colorjsMaxes[this.mode][0];
|
|
735
735
|
return map(
|
|
736
736
|
this._color.coords[0],
|
|
@@ -754,7 +754,7 @@ class Color {
|
|
|
754
754
|
max = [0, max];
|
|
755
755
|
}
|
|
756
756
|
|
|
757
|
-
if(this.mode === RGB || this.mode ===
|
|
757
|
+
if(this.mode === RGB || this.mode === RGBP3){
|
|
758
758
|
const colorjsMax = Color.#colorjsMaxes[this.mode][1];
|
|
759
759
|
return map(
|
|
760
760
|
this._color.coords[1],
|
|
@@ -773,7 +773,7 @@ class Color {
|
|
|
773
773
|
max = [0, max];
|
|
774
774
|
}
|
|
775
775
|
|
|
776
|
-
if(this.mode === RGB || this.mode ===
|
|
776
|
+
if(this.mode === RGB || this.mode === RGBP3){
|
|
777
777
|
const colorjsMax = Color.#colorjsMaxes[this.mode][2];
|
|
778
778
|
return map(
|
|
779
779
|
this._color.coords[2],
|
|
@@ -999,7 +999,7 @@ function color(p5, fn, lifecycles){
|
|
|
999
999
|
|
|
1000
1000
|
// Register color modes and initialize Color maxes to what p5 has set for itself
|
|
1001
1001
|
p5.Color.addColorMode(RGB, sRGB);
|
|
1002
|
-
p5.Color.addColorMode(
|
|
1002
|
+
p5.Color.addColorMode(RGBP3, P3);
|
|
1003
1003
|
p5.Color.addColorMode(HSB, HSBSpace);
|
|
1004
1004
|
p5.Color.addColorMode(HSL, HSL$1);
|
|
1005
1005
|
p5.Color.addColorMode(HWB, HWB$1);
|
|
@@ -1045,19 +1045,19 @@ function color(p5, fn, lifecycles){
|
|
|
1045
1045
|
|
|
1046
1046
|
decorateGet('Red', {
|
|
1047
1047
|
[RGB]: 0,
|
|
1048
|
-
[
|
|
1048
|
+
[RGBP3]: 0
|
|
1049
1049
|
});
|
|
1050
1050
|
decorateGet('Green', {
|
|
1051
1051
|
[RGB]: 1,
|
|
1052
|
-
[
|
|
1052
|
+
[RGBP3]: 1
|
|
1053
1053
|
});
|
|
1054
1054
|
decorateGet('Blue', {
|
|
1055
1055
|
[RGB]: 2,
|
|
1056
|
-
[
|
|
1056
|
+
[RGBP3]: 2
|
|
1057
1057
|
});
|
|
1058
1058
|
decorateGet('Alpha', {
|
|
1059
1059
|
[RGB]: 3,
|
|
1060
|
-
[
|
|
1060
|
+
[RGBP3]: 3,
|
|
1061
1061
|
[HSB]: 3,
|
|
1062
1062
|
[HSL]: 3,
|
|
1063
1063
|
[HWB]: 3,
|
|
@@ -1105,11 +1105,11 @@ if(typeof p5 !== 'undefined'){
|
|
|
1105
1105
|
*/
|
|
1106
1106
|
const RGB = 'rgb';
|
|
1107
1107
|
/**
|
|
1108
|
-
* @typedef {'
|
|
1109
|
-
* @property {
|
|
1108
|
+
* @typedef {'rgbp3'} RGBP3
|
|
1109
|
+
* @property {RGBP3} RGBP3
|
|
1110
1110
|
* @final
|
|
1111
1111
|
*/
|
|
1112
|
-
const
|
|
1112
|
+
const RGBP3 = 'rgbp3';
|
|
1113
1113
|
/**
|
|
1114
1114
|
* HSB (hue, saturation, brightness) is a type of color model.
|
|
1115
1115
|
* You can learn more about it at
|
|
@@ -1165,7 +1165,7 @@ const RGBA = 'rgba';
|
|
|
1165
1165
|
|
|
1166
1166
|
function creatingReading(p5, fn){
|
|
1167
1167
|
fn.RGB = RGB;
|
|
1168
|
-
fn.
|
|
1168
|
+
fn.RGBP3 = RGBP3;
|
|
1169
1169
|
fn.HSB = HSB;
|
|
1170
1170
|
fn.HSL = HSL;
|
|
1171
1171
|
fn.HWB = HWB;
|
|
@@ -1182,7 +1182,7 @@ function creatingReading(p5, fn){
|
|
|
1182
1182
|
p5.Renderer.states.colorMode = RGB;
|
|
1183
1183
|
p5.Renderer.states.colorMaxes = {
|
|
1184
1184
|
[RGB]: [255, 255, 255, 255],
|
|
1185
|
-
[
|
|
1185
|
+
[RGBP3]: [255, 255, 255, 255],
|
|
1186
1186
|
[HSB]: [360, 100, 100, 1],
|
|
1187
1187
|
[HSL]: [360, 100, 100, 1],
|
|
1188
1188
|
[HWB]: [360, 100, 100, 1],
|
|
@@ -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.
|
|
@@ -2583,4 +2591,4 @@ if(typeof p5 !== 'undefined'){
|
|
|
2583
2591
|
creatingReading(p5, p5.prototype);
|
|
2584
2592
|
}
|
|
2585
2593
|
|
|
2586
|
-
export { Color as C, HSB as H, LAB as L, OKLAB as O, RGB as R, color as a,
|
|
2594
|
+
export { Color as C, HSB as H, LAB as L, OKLAB as O, RGB as R, color as a, RGBP3 as b, creatingReading as c, HSL as d, HWB as e, LCH as f, OKLCH as g, RGBA as h };
|
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-
|
|
4
|
+
import '../creating_reading-Dyt2y-6S.js';
|
|
5
5
|
import 'colorjs.io/fn';
|
|
6
6
|
import '../color/color_spaces/hsb.js';
|
|
7
|
-
import '../constants-
|
|
7
|
+
import '../constants-DkQDfqzw.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-
|
|
5
|
+
import '../creating_reading-Dyt2y-6S.js';
|
|
6
6
|
import 'colorjs.io/fn';
|
|
7
7
|
import '../color/color_spaces/hsb.js';
|
|
8
|
-
import '../constants-
|
|
8
|
+
import '../constants-DkQDfqzw.js';
|
|
9
9
|
import '../io/p5.XML.js';
|
|
10
10
|
|
|
11
11
|
function dom(p5){
|
package/dist/dom/p5.Element.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { File } from './p5.File.js';
|
|
2
|
-
import { C as Color } from '../creating_reading-
|
|
3
|
-
import { a2 as AUTO } from '../constants-
|
|
2
|
+
import { C as Color } from '../creating_reading-Dyt2y-6S.js';
|
|
3
|
+
import { a2 as AUTO } from '../constants-DkQDfqzw.js';
|
|
4
4
|
import '../io/p5.XML.js';
|
|
5
5
|
import 'colorjs.io/fn';
|
|
6
6
|
import '../color/color_spaces/hsb.js';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Element } from './p5.Element.js';
|
|
2
2
|
import './p5.File.js';
|
|
3
3
|
import '../io/p5.XML.js';
|
|
4
|
-
import '../creating_reading-
|
|
4
|
+
import '../creating_reading-Dyt2y-6S.js';
|
|
5
5
|
import 'colorjs.io/fn';
|
|
6
6
|
import '../color/color_spaces/hsb.js';
|
|
7
|
-
import '../constants-
|
|
7
|
+
import '../constants-DkQDfqzw.js';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* @module DOM
|
package/dist/events/pointer.js
CHANGED
|
@@ -9,6 +9,7 @@ function pointer(p5, fn, lifecycles){
|
|
|
9
9
|
const events = [
|
|
10
10
|
'pointerdown',
|
|
11
11
|
'pointerup',
|
|
12
|
+
'pointercancel',
|
|
12
13
|
'pointermove',
|
|
13
14
|
'dragend',
|
|
14
15
|
'dragover',
|
|
@@ -1068,6 +1069,10 @@ function pointer(p5, fn, lifecycles){
|
|
|
1068
1069
|
this._activePointers.set(e.pointerId, e);
|
|
1069
1070
|
this._setMouseButton(e);
|
|
1070
1071
|
|
|
1072
|
+
if (this.mouseIsPressed && e.buttons === 0) {
|
|
1073
|
+
this._onpointerup(e);
|
|
1074
|
+
}
|
|
1075
|
+
|
|
1071
1076
|
if (
|
|
1072
1077
|
!this.mouseIsPressed &&
|
|
1073
1078
|
typeof this._customActions.mouseMoved === 'function'
|
|
@@ -1394,6 +1399,16 @@ function pointer(p5, fn, lifecycles){
|
|
|
1394
1399
|
fn._ondragend = fn._onpointerup;
|
|
1395
1400
|
fn._ondragover = fn._onpointermove;
|
|
1396
1401
|
|
|
1402
|
+
fn._onpointercancel = function(e) {
|
|
1403
|
+
this._activePointers.delete(e.pointerId);
|
|
1404
|
+
this._setMouseButton(e);
|
|
1405
|
+
this._updatePointerCoords(e);
|
|
1406
|
+
|
|
1407
|
+
if (this._activePointers.size === 0) {
|
|
1408
|
+
this.mouseIsPressed = false;
|
|
1409
|
+
}
|
|
1410
|
+
};
|
|
1411
|
+
|
|
1397
1412
|
/**
|
|
1398
1413
|
* A function that's called once after a mouse button is pressed and released.
|
|
1399
1414
|
*
|
package/dist/image/const.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Shader } from '../webgl/p5.Shader.js';
|
|
2
|
-
import { s as setWebGLUniformValue, e as setWebGLTextureParams, g as getWebGLUniformMetadata, h as getWebGLShaderAttributes, j as populateGLSLHooks, T as Texture } from '../rendering-
|
|
3
|
-
import { I as Image } from '../p5.Renderer-
|
|
4
|
-
import { C as CLAMP, ab as WEBGL2, n as CORNER, B as BLEND, ac as BLUR, ad as WEBGL } from '../constants-
|
|
2
|
+
import { s as setWebGLUniformValue, e as setWebGLTextureParams, g as getWebGLUniformMetadata, h as getWebGLShaderAttributes, j as populateGLSLHooks, T as Texture } from '../rendering-BowMW0pZ.js';
|
|
3
|
+
import { I as Image } from '../p5.Renderer-Bf-YLpi6.js';
|
|
4
|
+
import { C as CLAMP, ab as WEBGL2, n as CORNER, B as BLEND, ac as BLUR, ad as WEBGL } from '../constants-DkQDfqzw.js';
|
|
5
5
|
import { filterParamDefaults } from './const.js';
|
|
6
6
|
import { w as webgl2CompatibilityShader, f as filterBaseVert, a as filterBaseFrag } from '../webgl2Compatibility-DA7DLMuq.js';
|
|
7
|
-
import { g as glslBackend, r as randomGLSL, a as randomVertGLSL } from '../strands_glslBackend-
|
|
7
|
+
import { g as glslBackend, r as randomGLSL, a as randomVertGLSL } from '../strands_glslBackend-DMhOnoGl.js';
|
|
8
8
|
import { getShaderHookTypes } from '../webgl/shaderHookUtils.js';
|
|
9
9
|
import { makeFilterShader } from '../core/filterShaders.js';
|
|
10
|
-
import '../creating_reading-
|
|
10
|
+
import '../creating_reading-Dyt2y-6S.js';
|
|
11
11
|
import 'colorjs.io/fn';
|
|
12
12
|
import '../color/color_spaces/hsb.js';
|
|
13
13
|
import '../strands/ir_types.js';
|
|
@@ -46,7 +46,7 @@ import '../webgl/enums.js';
|
|
|
46
46
|
import '../math/trigonometry.js';
|
|
47
47
|
import '../strands/ir_dag.js';
|
|
48
48
|
import '../strands/strands_FES.js';
|
|
49
|
-
import '../ir_builders-
|
|
49
|
+
import '../ir_builders-CMXkjMoV.js';
|
|
50
50
|
import '../strands/ir_cfg.js';
|
|
51
51
|
import '../strands/strands_builtins.js';
|
|
52
52
|
|
package/dist/image/image.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import 'omggif';
|
|
2
2
|
import '../dom/p5.Element.js';
|
|
3
|
-
export { i as default } from '../rendering-
|
|
3
|
+
export { i as default } from '../rendering-BowMW0pZ.js';
|
|
4
4
|
import '../dom/p5.File.js';
|
|
5
5
|
import '../io/p5.XML.js';
|
|
6
|
-
import '../creating_reading-
|
|
6
|
+
import '../creating_reading-Dyt2y-6S.js';
|
|
7
7
|
import 'colorjs.io/fn';
|
|
8
8
|
import '../color/color_spaces/hsb.js';
|
|
9
|
-
import '../constants-
|
|
9
|
+
import '../constants-DkQDfqzw.js';
|
|
10
10
|
import '../strands/ir_types.js';
|
|
11
|
-
import '../p5.Renderer-
|
|
11
|
+
import '../p5.Renderer-Bf-YLpi6.js';
|
|
12
12
|
import './filters.js';
|
|
13
13
|
import '../math/p5.Vector.js';
|
|
14
14
|
import '../shape/custom_shapes.js';
|
package/dist/image/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { i as image$1, l as loadingDisplaying, t as texture } from '../rendering-
|
|
2
|
-
import { i as image$2 } from '../p5.Renderer-
|
|
1
|
+
import { i as image$1, l as loadingDisplaying, t as texture } from '../rendering-BowMW0pZ.js';
|
|
2
|
+
import { i as image$2 } from '../p5.Renderer-Bf-YLpi6.js';
|
|
3
3
|
import pixels from './pixels.js';
|
|
4
4
|
import shader from '../webgl/p5.Shader.js';
|
|
5
|
-
import '../constants-
|
|
6
|
-
import '../creating_reading-
|
|
5
|
+
import '../constants-DkQDfqzw.js';
|
|
6
|
+
import '../creating_reading-Dyt2y-6S.js';
|
|
7
7
|
import 'colorjs.io/fn';
|
|
8
8
|
import '../color/color_spaces/hsb.js';
|
|
9
9
|
import '../strands/ir_types.js';
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import '../core/helpers.js';
|
|
2
|
-
import '../constants-
|
|
3
|
-
export { l as default } from '../rendering-
|
|
2
|
+
import '../constants-DkQDfqzw.js';
|
|
3
|
+
export { l as default } from '../rendering-BowMW0pZ.js';
|
|
4
4
|
import 'omggif';
|
|
5
|
-
import '../creating_reading-
|
|
5
|
+
import '../creating_reading-Dyt2y-6S.js';
|
|
6
6
|
import 'colorjs.io/fn';
|
|
7
7
|
import '../color/color_spaces/hsb.js';
|
|
8
8
|
import '../strands/ir_types.js';
|
|
9
9
|
import '../dom/p5.Element.js';
|
|
10
10
|
import '../dom/p5.File.js';
|
|
11
11
|
import '../io/p5.XML.js';
|
|
12
|
-
import '../p5.Renderer-
|
|
12
|
+
import '../p5.Renderer-Bf-YLpi6.js';
|
|
13
13
|
import './filters.js';
|
|
14
14
|
import '../math/p5.Vector.js';
|
|
15
15
|
import '../shape/custom_shapes.js';
|
package/dist/image/p5.Image.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import './filters.js';
|
|
2
|
-
export { I as Image, i as default } from '../p5.Renderer-
|
|
2
|
+
export { I as Image, i as default } from '../p5.Renderer-Bf-YLpi6.js';
|
|
3
3
|
import '../io/utilities.js';
|
|
4
|
-
import '../creating_reading-
|
|
4
|
+
import '../creating_reading-Dyt2y-6S.js';
|
|
5
5
|
import 'colorjs.io/fn';
|
|
6
6
|
import '../color/color_spaces/hsb.js';
|
|
7
|
-
import '../constants-
|
|
7
|
+
import '../constants-DkQDfqzw.js';
|
|
8
8
|
import '../math/p5.Vector.js';
|
|
9
9
|
import '../shape/custom_shapes.js';
|
|
10
10
|
import '../core/States.js';
|
package/dist/io/files.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import '../p5.Renderer-
|
|
2
|
-
export { f as default, d as request } from '../rendering-
|
|
1
|
+
import '../p5.Renderer-Bf-YLpi6.js';
|
|
2
|
+
export { f as default, d as request } from '../rendering-BowMW0pZ.js';
|
|
3
3
|
import './csv.js';
|
|
4
4
|
import './utilities.js';
|
|
5
|
-
import '../creating_reading-
|
|
5
|
+
import '../creating_reading-Dyt2y-6S.js';
|
|
6
6
|
import 'colorjs.io/fn';
|
|
7
7
|
import '../color/color_spaces/hsb.js';
|
|
8
|
-
import '../constants-
|
|
8
|
+
import '../constants-DkQDfqzw.js';
|
|
9
9
|
import '../image/filters.js';
|
|
10
10
|
import '../math/p5.Vector.js';
|
|
11
11
|
import '../shape/custom_shapes.js';
|
package/dist/io/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { f as files } from '../rendering-
|
|
1
|
+
import { f as files } from '../rendering-BowMW0pZ.js';
|
|
2
2
|
import table from './p5.Table.js';
|
|
3
3
|
import tableRow from './p5.TableRow.js';
|
|
4
4
|
import xml from './p5.XML.js';
|
|
5
|
-
import '../constants-
|
|
6
|
-
import '../creating_reading-
|
|
5
|
+
import '../constants-DkQDfqzw.js';
|
|
6
|
+
import '../creating_reading-Dyt2y-6S.js';
|
|
7
7
|
import 'colorjs.io/fn';
|
|
8
8
|
import '../color/color_spaces/hsb.js';
|
|
9
9
|
import '../strands/ir_types.js';
|
|
10
10
|
import '../dom/p5.Element.js';
|
|
11
11
|
import '../dom/p5.File.js';
|
|
12
|
-
import '../p5.Renderer-
|
|
12
|
+
import '../p5.Renderer-Bf-YLpi6.js';
|
|
13
13
|
import '../image/filters.js';
|
|
14
14
|
import '../math/p5.Vector.js';
|
|
15
15
|
import '../shape/custom_shapes.js';
|