p5 2.0.4 → 2.0.5
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 +1 -1
- package/dist/accessibility/color_namer.js +4 -4
- package/dist/accessibility/index.js +4 -4
- package/dist/accessibility/outputs.js +1 -1
- package/dist/app.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-C2DVjshm.js → constants-8IpwyBct.js} +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/environment.js +1 -1
- package/dist/core/friendly_errors/fes_core.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/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/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-rEhlsQtb.js → main-B3Z63C6j.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 +1 -1
- package/dist/math/trigonometry.js +1 -1
- package/dist/{p5.Renderer-DO9wIL55.js → p5.Renderer-DoDzbpcT.js} +1 -1
- package/dist/{rendering-CpHn8PfG.js → rendering-BELwvfI6.js} +3 -3
- package/dist/shape/2d_primitives.js +1 -1
- package/dist/shape/attributes.js +1 -1
- package/dist/shape/curves.js +143 -74
- package/dist/shape/custom_shapes.js +261 -277
- 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/ShaderGenerator.js +10 -7
- package/dist/webgl/ShapeBuilder.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.Shader.js +3 -3
- package/dist/webgl/p5.Texture.js +3 -3
- package/dist/webgl/text.js +3 -3
- package/lib/p5.esm.js +414 -358
- package/lib/p5.esm.min.js +1 -1
- package/lib/p5.js +414 -358
- package/lib/p5.min.js +1 -1
- package/package.json +1 -1
- package/types/core/main.d.ts +87 -71
- package/types/global.d.ts +87 -71
- package/types/p5.d.ts +87 -71
- package/types/shape/curves.d.ts +130 -56
- package/types/shape/custom_shapes.d.ts +188 -252
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-DoDzbpcT.js';
|
|
2
2
|
import '../creating_reading-BdolPjuO.js';
|
|
3
3
|
import 'colorjs.io/fn';
|
|
4
4
|
import '../color/color_spaces/hsb.js';
|
|
5
|
-
import '../constants-
|
|
5
|
+
import '../constants-8IpwyBct.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-8IpwyBct.js';
|
|
2
|
+
export { p as default } from '../rendering-BELwvfI6.js';
|
|
3
3
|
import '../math/p5.Vector.js';
|
|
4
4
|
import './p5.Geometry.js';
|
|
5
5
|
import '../math/p5.Matrix.js';
|
|
@@ -10,7 +10,7 @@ import '../color/color_spaces/hsb.js';
|
|
|
10
10
|
import '../dom/p5.Element.js';
|
|
11
11
|
import '../dom/p5.File.js';
|
|
12
12
|
import '../io/p5.XML.js';
|
|
13
|
-
import '../p5.Renderer-
|
|
13
|
+
import '../p5.Renderer-DoDzbpcT.js';
|
|
14
14
|
import '../image/filters.js';
|
|
15
15
|
import '../shape/custom_shapes.js';
|
|
16
16
|
import '../core/States.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as TRIANGLE_STRIP, s as QUAD_STRIP, q as TRIANGLE_FAN } from '../constants-
|
|
1
|
+
import { r as TRIANGLE_STRIP, s as QUAD_STRIP, q as TRIANGLE_FAN } from '../constants-8IpwyBct.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';
|
|
@@ -35,7 +35,11 @@ function shadergenerator(p5, fn) {
|
|
|
35
35
|
const transpiledSource = escodegen.generate(ast);
|
|
36
36
|
const scopeKeys = Object.keys(scope);
|
|
37
37
|
const internalGeneratorFunction = new Function(
|
|
38
|
-
|
|
38
|
+
// Create a parameter called __p5, not just p5, because users of instance mode
|
|
39
|
+
// may pass in a variable called p5 as a scope variable. If we rely on a variable called
|
|
40
|
+
// p5, then the scope variable called p5 might accidentally override internal function
|
|
41
|
+
// calls to p5 static methods.
|
|
42
|
+
'__p5',
|
|
39
43
|
...scopeKeys,
|
|
40
44
|
transpiledSource
|
|
41
45
|
.slice(
|
|
@@ -100,7 +104,7 @@ function shadergenerator(p5, fn) {
|
|
|
100
104
|
node.type = 'CallExpression';
|
|
101
105
|
node.callee = {
|
|
102
106
|
type: 'Identifier',
|
|
103
|
-
name: '
|
|
107
|
+
name: '__p5.unaryNode',
|
|
104
108
|
};
|
|
105
109
|
node.arguments = [node.argument, signNode];
|
|
106
110
|
};
|
|
@@ -123,7 +127,7 @@ function shadergenerator(p5, fn) {
|
|
|
123
127
|
type: 'CallExpression',
|
|
124
128
|
callee: {
|
|
125
129
|
type: 'Identifier',
|
|
126
|
-
name: '
|
|
130
|
+
name: '__p5.unaryNode'
|
|
127
131
|
},
|
|
128
132
|
arguments: [node.argument.object, signNode],
|
|
129
133
|
};
|
|
@@ -188,7 +192,7 @@ function shadergenerator(p5, fn) {
|
|
|
188
192
|
node.type = 'CallExpression';
|
|
189
193
|
node.callee = {
|
|
190
194
|
type: 'Identifier',
|
|
191
|
-
name: '
|
|
195
|
+
name: '__p5.dynamicNode',
|
|
192
196
|
};
|
|
193
197
|
node.arguments = [original];
|
|
194
198
|
},
|
|
@@ -242,7 +246,7 @@ function shadergenerator(p5, fn) {
|
|
|
242
246
|
type: 'CallExpression',
|
|
243
247
|
callee: {
|
|
244
248
|
type: 'Identifier',
|
|
245
|
-
name: '
|
|
249
|
+
name: '__p5.dynamicNode',
|
|
246
250
|
},
|
|
247
251
|
arguments: [node.left]
|
|
248
252
|
};
|
|
@@ -1604,7 +1608,6 @@ function shadergenerator(p5, fn) {
|
|
|
1604
1608
|
],
|
|
1605
1609
|
'sqrt': { args: ['genType'], returnType: 'genType', isp5Function: true},
|
|
1606
1610
|
'step': { args: ['genType', 'genType'], returnType: 'genType', isp5Function: false},
|
|
1607
|
-
'noise': { args: ['vec2'], returnType: 'float', isp5Function: false },
|
|
1608
1611
|
'trunc': { args: ['genType'], returnType: 'genType', isp5Function: false},
|
|
1609
1612
|
|
|
1610
1613
|
////////// Vector //////////
|
|
@@ -1671,7 +1674,7 @@ function shadergenerator(p5, fn) {
|
|
|
1671
1674
|
} else {
|
|
1672
1675
|
nodeArgs = args;
|
|
1673
1676
|
}
|
|
1674
|
-
|
|
1677
|
+
|
|
1675
1678
|
return fnNodeConstructor('noise', nodeArgs, {
|
|
1676
1679
|
args: ['vec2'],
|
|
1677
1680
|
returnType: 'float'
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { m as PATH, Q as QUADS, s as QUAD_STRIP, r as TRIANGLE_STRIP, p as TRIANGLES, a1 as IMAGE, L as LINES, q as TRIANGLE_FAN } from '../constants-
|
|
1
|
+
import { m as PATH, Q as QUADS, s as QUAD_STRIP, r as TRIANGLE_STRIP, p as TRIANGLES, a1 as IMAGE, L as LINES, q as TRIANGLE_FAN } from '../constants-8IpwyBct.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/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as rendererGL, p as primitives3D, l as light, m as material, c as camera, f as framebuffer, s as shader, t as texture } from '../rendering-
|
|
1
|
+
import { r as rendererGL, p as primitives3D, l as light, m as material, c as camera, f as framebuffer, s as shader, t as texture } from '../rendering-BELwvfI6.js';
|
|
2
2
|
import interaction from './interaction.js';
|
|
3
3
|
import loading from './loading.js';
|
|
4
4
|
import text from './text.js';
|
|
@@ -8,14 +8,14 @@ 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 shadergenerator from './ShaderGenerator.js';
|
|
11
|
-
import '../constants-
|
|
11
|
+
import '../constants-8IpwyBct.js';
|
|
12
12
|
import '../creating_reading-BdolPjuO.js';
|
|
13
13
|
import 'colorjs.io/fn';
|
|
14
14
|
import '../color/color_spaces/hsb.js';
|
|
15
15
|
import '../dom/p5.Element.js';
|
|
16
16
|
import '../dom/p5.File.js';
|
|
17
17
|
import '../io/p5.XML.js';
|
|
18
|
-
import '../p5.Renderer-
|
|
18
|
+
import '../p5.Renderer-DoDzbpcT.js';
|
|
19
19
|
import '../image/filters.js';
|
|
20
20
|
import '../math/p5.Vector.js';
|
|
21
21
|
import '../shape/custom_shapes.js';
|
package/dist/webgl/light.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
export { l as default } from '../rendering-
|
|
1
|
+
export { l as default } from '../rendering-BELwvfI6.js';
|
|
2
2
|
import '../math/p5.Vector.js';
|
|
3
3
|
import '../creating_reading-BdolPjuO.js';
|
|
4
|
-
import '../constants-
|
|
4
|
+
import '../constants-8IpwyBct.js';
|
|
5
5
|
import '../dom/p5.Element.js';
|
|
6
6
|
import '../dom/p5.File.js';
|
|
7
7
|
import '../io/p5.XML.js';
|
|
8
8
|
import 'colorjs.io/fn';
|
|
9
9
|
import '../color/color_spaces/hsb.js';
|
|
10
|
-
import '../p5.Renderer-
|
|
10
|
+
import '../p5.Renderer-DoDzbpcT.js';
|
|
11
11
|
import '../image/filters.js';
|
|
12
12
|
import '../shape/custom_shapes.js';
|
|
13
13
|
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 { a as request } from '../rendering-
|
|
4
|
-
import '../constants-
|
|
3
|
+
import { a as request } from '../rendering-BELwvfI6.js';
|
|
4
|
+
import '../constants-8IpwyBct.js';
|
|
5
5
|
import './p5.DataArray.js';
|
|
6
6
|
import '../io/utilities.js';
|
|
7
7
|
import 'file-saver';
|
|
@@ -11,7 +11,7 @@ import '../color/color_spaces/hsb.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-DoDzbpcT.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,12 +1,12 @@
|
|
|
1
|
-
import '../constants-
|
|
2
|
-
export { m as default } from '../rendering-
|
|
1
|
+
import '../constants-8IpwyBct.js';
|
|
2
|
+
export { m as default } from '../rendering-BELwvfI6.js';
|
|
3
3
|
import '../creating_reading-BdolPjuO.js';
|
|
4
4
|
import '../dom/p5.Element.js';
|
|
5
5
|
import '../dom/p5.File.js';
|
|
6
6
|
import '../io/p5.XML.js';
|
|
7
7
|
import 'colorjs.io/fn';
|
|
8
8
|
import '../color/color_spaces/hsb.js';
|
|
9
|
-
import '../p5.Renderer-
|
|
9
|
+
import '../p5.Renderer-DoDzbpcT.js';
|
|
10
10
|
import '../image/filters.js';
|
|
11
11
|
import '../math/p5.Vector.js';
|
|
12
12
|
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-BELwvfI6.js';
|
|
5
5
|
import '../math/Matrices/Matrix.js';
|
|
6
|
-
import '../constants-
|
|
6
|
+
import '../constants-8IpwyBct.js';
|
|
7
7
|
import '../math/Matrices/MatrixInterface.js';
|
|
8
8
|
import '../creating_reading-BdolPjuO.js';
|
|
9
9
|
import 'colorjs.io/fn';
|
|
@@ -11,7 +11,7 @@ import '../color/color_spaces/hsb.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-DoDzbpcT.js';
|
|
15
15
|
import '../image/filters.js';
|
|
16
16
|
import '../shape/custom_shapes.js';
|
|
17
17
|
import '../core/States.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import '../constants-
|
|
1
|
+
import '../constants-8IpwyBct.js';
|
|
2
2
|
import '../creating_reading-BdolPjuO.js';
|
|
3
|
-
export { H as Framebuffer, E as FramebufferCamera, F as FramebufferTexture, f as default } from '../rendering-
|
|
4
|
-
import '../p5.Renderer-
|
|
3
|
+
export { H as Framebuffer, E as FramebufferCamera, F as FramebufferTexture, f as default } from '../rendering-BELwvfI6.js';
|
|
4
|
+
import '../p5.Renderer-DoDzbpcT.js';
|
|
5
5
|
import 'colorjs.io/fn';
|
|
6
6
|
import '../color/color_spaces/hsb.js';
|
|
7
7
|
import '../dom/p5.Element.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as FLAT, y as SMOOTH } from '../constants-
|
|
1
|
+
import { F as FLAT, y as SMOOTH } from '../constants-8IpwyBct.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
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import '../constants-
|
|
1
|
+
import '../constants-8IpwyBct.js';
|
|
2
2
|
import './GeometryBuilder.js';
|
|
3
|
-
import '../p5.Renderer-
|
|
3
|
+
import '../p5.Renderer-DoDzbpcT.js';
|
|
4
4
|
import '../math/p5.Matrix.js';
|
|
5
|
-
export { R as RendererGL, r as default, B as readPixelWebGL, A as readPixelsWebGL } from '../rendering-
|
|
5
|
+
export { R as RendererGL, r as default, B as readPixelWebGL, A as readPixelsWebGL } from '../rendering-BELwvfI6.js';
|
|
6
6
|
import '../math/p5.Vector.js';
|
|
7
7
|
import './p5.RenderBuffer.js';
|
|
8
8
|
import './p5.DataArray.js';
|
package/dist/webgl/p5.Shader.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export { S as Shader, s as default } from '../rendering-
|
|
2
|
-
import '../constants-
|
|
1
|
+
export { S as Shader, s as default } from '../rendering-BELwvfI6.js';
|
|
2
|
+
import '../constants-8IpwyBct.js';
|
|
3
3
|
import '../creating_reading-BdolPjuO.js';
|
|
4
4
|
import 'colorjs.io/fn';
|
|
5
5
|
import '../color/color_spaces/hsb.js';
|
|
6
6
|
import '../dom/p5.Element.js';
|
|
7
7
|
import '../dom/p5.File.js';
|
|
8
8
|
import '../io/p5.XML.js';
|
|
9
|
-
import '../p5.Renderer-
|
|
9
|
+
import '../p5.Renderer-DoDzbpcT.js';
|
|
10
10
|
import '../image/filters.js';
|
|
11
11
|
import '../math/p5.Vector.js';
|
|
12
12
|
import '../shape/custom_shapes.js';
|
package/dist/webgl/p5.Texture.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import '../constants-
|
|
1
|
+
import '../constants-8IpwyBct.js';
|
|
2
2
|
import '../dom/p5.Element.js';
|
|
3
|
-
import '../p5.Renderer-
|
|
3
|
+
import '../p5.Renderer-DoDzbpcT.js';
|
|
4
4
|
import '../dom/p5.MediaElement.js';
|
|
5
|
-
export { M as MipmapTexture, T as Texture, D as checkWebGLCapabilities, t as default } from '../rendering-
|
|
5
|
+
export { M as MipmapTexture, T as Texture, D as checkWebGLCapabilities, t as default } from '../rendering-BELwvfI6.js';
|
|
6
6
|
import '../dom/p5.File.js';
|
|
7
7
|
import '../io/p5.XML.js';
|
|
8
8
|
import '../creating_reading-BdolPjuO.js';
|
package/dist/webgl/text.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { T as TEXTURE } from '../constants-
|
|
2
|
-
import { R as RendererGL } from '../rendering-
|
|
1
|
+
import { T as TEXTURE } from '../constants-8IpwyBct.js';
|
|
2
|
+
import { R as RendererGL } from '../rendering-BELwvfI6.js';
|
|
3
3
|
import { Vector } from '../math/p5.Vector.js';
|
|
4
4
|
import { Geometry } from './p5.Geometry.js';
|
|
5
5
|
import { Font, arrayCommandsToObjects } from '../type/p5.Font.js';
|
|
@@ -9,7 +9,7 @@ import '../color/color_spaces/hsb.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-DoDzbpcT.js';
|
|
13
13
|
import '../image/filters.js';
|
|
14
14
|
import '../shape/custom_shapes.js';
|
|
15
15
|
import '../core/States.js';
|