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
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-BowMW0pZ.js';
|
|
2
2
|
import interaction from './interaction.js';
|
|
3
3
|
import loading from './loading.js';
|
|
4
4
|
import text from './text.js';
|
|
@@ -8,15 +8,15 @@ 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-
|
|
12
|
-
import '../creating_reading-
|
|
11
|
+
import '../constants-DkQDfqzw.js';
|
|
12
|
+
import '../creating_reading-Dyt2y-6S.js';
|
|
13
13
|
import 'colorjs.io/fn';
|
|
14
14
|
import '../color/color_spaces/hsb.js';
|
|
15
15
|
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-Bf-YLpi6.js';
|
|
20
20
|
import '../image/filters.js';
|
|
21
21
|
import '../math/p5.Vector.js';
|
|
22
22
|
import '../shape/custom_shapes.js';
|
|
@@ -51,10 +51,10 @@ import '../type/unicodeRanges.js';
|
|
|
51
51
|
import '../type/lib/Typr.js';
|
|
52
52
|
import 'pako';
|
|
53
53
|
import '@davepagurek/bezier-path';
|
|
54
|
-
import '../strands_glslBackend-
|
|
54
|
+
import '../strands_glslBackend-DMhOnoGl.js';
|
|
55
55
|
import '../strands/ir_dag.js';
|
|
56
56
|
import '../strands/strands_FES.js';
|
|
57
|
-
import '../ir_builders-
|
|
57
|
+
import '../ir_builders-CMXkjMoV.js';
|
|
58
58
|
import '../strands/ir_cfg.js';
|
|
59
59
|
import '../strands/strands_builtins.js';
|
|
60
60
|
import './shaderHookUtils.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-BowMW0pZ.js';
|
|
2
2
|
import '../math/p5.Vector.js';
|
|
3
|
-
import '../creating_reading-
|
|
4
|
-
import '../constants-
|
|
3
|
+
import '../creating_reading-Dyt2y-6S.js';
|
|
4
|
+
import '../constants-DkQDfqzw.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-Bf-YLpi6.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,17 +1,17 @@
|
|
|
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-BowMW0pZ.js';
|
|
4
|
+
import '../constants-DkQDfqzw.js';
|
|
5
5
|
import './p5.DataArray.js';
|
|
6
6
|
import '../io/utilities.js';
|
|
7
|
-
import '../creating_reading-
|
|
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 '../shape/custom_shapes.js';
|
|
17
17
|
import '../core/States.js';
|
package/dist/webgl/material.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import '../constants-
|
|
2
|
-
export { m as default } from '../rendering-
|
|
1
|
+
import '../constants-DkQDfqzw.js';
|
|
2
|
+
export { m as default } from '../rendering-BowMW0pZ.js';
|
|
3
3
|
import './p5.Shader.js';
|
|
4
|
-
import '../creating_reading-
|
|
4
|
+
import '../creating_reading-Dyt2y-6S.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-Bf-YLpi6.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,18 +1,18 @@
|
|
|
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-BowMW0pZ.js';
|
|
5
5
|
import '../math/Matrices/Matrix.js';
|
|
6
|
-
import '../constants-
|
|
6
|
+
import '../constants-DkQDfqzw.js';
|
|
7
7
|
import '../math/Matrices/MatrixInterface.js';
|
|
8
|
-
import '../creating_reading-
|
|
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 '../shape/custom_shapes.js';
|
|
18
18
|
import '../core/States.js';
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import '../constants-
|
|
2
|
-
import '../creating_reading-
|
|
3
|
-
export { w as Framebuffer, v as FramebufferCamera, F as FramebufferTexture, b as default } from '../rendering-
|
|
1
|
+
import '../constants-DkQDfqzw.js';
|
|
2
|
+
import '../creating_reading-Dyt2y-6S.js';
|
|
3
|
+
export { w as Framebuffer, v as FramebufferCamera, F as FramebufferTexture, b as default } from '../rendering-BowMW0pZ.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';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a8 as FLAT, a9 as SMOOTH } from '../constants-
|
|
1
|
+
import { a8 as FLAT, a9 as SMOOTH } from '../constants-DkQDfqzw.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,10 +1,10 @@
|
|
|
1
|
-
import { ad as WEBGL, ab as WEBGL2, L as LIGHTEST, D as DARKEST, S as SUBTRACT, R as REPLACE, E as EXCLUSION, a as SCREEN, M as MULTIPLY, b as REMOVE, A as ADD, B as BLEND, c as TRIANGLES, n as CORNER, U as UNSIGNED_BYTE, g as LINEAR, aG as LINEAR_MIPMAP, a7 as TEXTURE, F as FLOAT, d as UNSIGNED_INT, H as HALF_FLOAT } from '../constants-
|
|
2
|
-
import { R as Renderer3D, o as readPixelWebGL, q as readPixelsWebGL, M as MipmapTexture, h as getWebGLShaderAttributes, g as getWebGLUniformMetadata, s as setWebGLUniformValue, e as setWebGLTextureParams, j as populateGLSLHooks, u as checkWebGLCapabilities } from '../rendering-
|
|
1
|
+
import { ad as WEBGL, ab as WEBGL2, L as LIGHTEST, D as DARKEST, S as SUBTRACT, R as REPLACE, E as EXCLUSION, a as SCREEN, M as MULTIPLY, b as REMOVE, A as ADD, B as BLEND, c as TRIANGLES, X as TRIANGLE_FAN, n as CORNER, U as UNSIGNED_BYTE, g as LINEAR, aG as LINEAR_MIPMAP, a7 as TEXTURE, F as FLOAT, d as UNSIGNED_INT, H as HALF_FLOAT } from '../constants-DkQDfqzw.js';
|
|
2
|
+
import { R as Renderer3D, o as readPixelWebGL, q as readPixelsWebGL, M as MipmapTexture, h as getWebGLShaderAttributes, g as getWebGLUniformMetadata, s as setWebGLUniformValue, e as setWebGLTextureParams, j as populateGLSLHooks, u as checkWebGLCapabilities } from '../rendering-BowMW0pZ.js';
|
|
3
3
|
import { getStrokeDefs } from './enums.js';
|
|
4
4
|
import { Shader } from './p5.Shader.js';
|
|
5
|
-
import { R as RGB, h as RGBA } from '../creating_reading-
|
|
6
|
-
import { I as Image } from '../p5.Renderer-
|
|
7
|
-
import { g as glslBackend } from '../strands_glslBackend-
|
|
5
|
+
import { R as RGB, h as RGBA } from '../creating_reading-Dyt2y-6S.js';
|
|
6
|
+
import { I as Image } from '../p5.Renderer-Bf-YLpi6.js';
|
|
7
|
+
import { g as glslBackend } from '../strands_glslBackend-DMhOnoGl.js';
|
|
8
8
|
import '../strands/ir_types.js';
|
|
9
9
|
import { getShaderHookTypes } from './shaderHookUtils.js';
|
|
10
10
|
import { f as filterBaseVert, a as filterBaseFrag, w as webgl2CompatibilityShader } from '../webgl2Compatibility-DA7DLMuq.js';
|
|
@@ -46,7 +46,7 @@ import '../core/filterShaders.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
|
|
|
@@ -338,7 +338,14 @@ class RendererGL extends Renderer3D {
|
|
|
338
338
|
}
|
|
339
339
|
}
|
|
340
340
|
} else {
|
|
341
|
-
|
|
341
|
+
let glMode;
|
|
342
|
+
if (mode === TRIANGLES) {
|
|
343
|
+
glMode = gl.TRIANGLES;
|
|
344
|
+
} else if (mode === TRIANGLE_FAN) {
|
|
345
|
+
glMode = gl.TRIANGLE_FAN;
|
|
346
|
+
} else {
|
|
347
|
+
glMode = gl.TRIANGLE_STRIP;
|
|
348
|
+
}
|
|
342
349
|
if (count === 1) {
|
|
343
350
|
gl.drawArrays(glMode, 0, geometry.vertices.length);
|
|
344
351
|
} else {
|
|
@@ -482,14 +489,14 @@ class RendererGL extends Renderer3D {
|
|
|
482
489
|
return gl.getParameter(gl.MAX_TEXTURE_SIZE);
|
|
483
490
|
}
|
|
484
491
|
|
|
485
|
-
_adjustDimensions(width, height) {
|
|
492
|
+
_adjustDimensions(width, height, density = this._pixelDensity) {
|
|
486
493
|
if (!this._maxTextureSize) {
|
|
487
494
|
this._maxTextureSize = this._getMaxTextureSize();
|
|
488
495
|
}
|
|
489
496
|
let maxTextureSize = this._maxTextureSize;
|
|
490
497
|
|
|
491
498
|
let maxAllowedPixelDimensions = Math.floor(
|
|
492
|
-
maxTextureSize /
|
|
499
|
+
maxTextureSize / density
|
|
493
500
|
);
|
|
494
501
|
let adjustedWidth = Math.min(width, maxAllowedPixelDimensions);
|
|
495
502
|
let adjustedHeight = Math.min(height, maxAllowedPixelDimensions);
|
|
@@ -636,6 +643,10 @@ class RendererGL extends Renderer3D {
|
|
|
636
643
|
return 10;
|
|
637
644
|
}
|
|
638
645
|
|
|
646
|
+
supportsTriangleFan() {
|
|
647
|
+
return true;
|
|
648
|
+
}
|
|
649
|
+
|
|
639
650
|
viewport(w, h) {
|
|
640
651
|
this._viewport = [0, 0, w, h];
|
|
641
652
|
this.GL.viewport(0, 0, w, h);
|
package/dist/webgl/p5.Shader.js
CHANGED
|
@@ -99,7 +99,7 @@ class Shader {
|
|
|
99
99
|
* @returns {String} The GLSL version used by the shader.
|
|
100
100
|
*/
|
|
101
101
|
version() {
|
|
102
|
-
const match = /#version (.+)
|
|
102
|
+
const match = /#version (.+)$/m.exec(this.vertSrc());
|
|
103
103
|
if (match) {
|
|
104
104
|
return match[1];
|
|
105
105
|
} else {
|
|
@@ -1103,6 +1103,10 @@ class Shader {
|
|
|
1103
1103
|
return;
|
|
1104
1104
|
}
|
|
1105
1105
|
|
|
1106
|
+
if (uniformName === 'uSampler' && !this._renderer._settingFillUniforms) {
|
|
1107
|
+
this._userSetSampler = true;
|
|
1108
|
+
}
|
|
1109
|
+
|
|
1106
1110
|
// In p5.strands-related code, where some of the code may be in
|
|
1107
1111
|
// p5.webgpu.js instead of the main p5.js build, we generally use
|
|
1108
1112
|
// duck typing instead of instanceof to avoid accidentally importing
|
package/dist/webgl/p5.Texture.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import '../constants-
|
|
1
|
+
import '../constants-DkQDfqzw.js';
|
|
2
2
|
import '../dom/p5.Element.js';
|
|
3
|
-
import '../p5.Renderer-
|
|
3
|
+
import '../p5.Renderer-Bf-YLpi6.js';
|
|
4
4
|
import '../dom/p5.MediaElement.js';
|
|
5
|
-
export { M as MipmapTexture, T as Texture, t as default } from '../rendering-
|
|
5
|
+
export { M as MipmapTexture, T as Texture, t as default } from '../rendering-BowMW0pZ.js';
|
|
6
6
|
import '../dom/p5.File.js';
|
|
7
7
|
import '../io/p5.XML.js';
|
|
8
|
-
import '../creating_reading-
|
|
8
|
+
import '../creating_reading-Dyt2y-6S.js';
|
|
9
9
|
import 'colorjs.io/fn';
|
|
10
10
|
import '../color/color_spaces/hsb.js';
|
|
11
11
|
import '../image/filters.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { g as glslBackend } from '../strands_glslBackend-
|
|
1
|
+
export { g as glslBackend } from '../strands_glslBackend-DMhOnoGl.js';
|
|
2
2
|
import '../strands/ir_types.js';
|
|
3
3
|
import '../strands/ir_dag.js';
|
|
4
4
|
import '../strands/strands_FES.js';
|
|
5
|
-
import '../ir_builders-
|
|
5
|
+
import '../ir_builders-CMXkjMoV.js';
|
|
6
6
|
import '../strands/ir_cfg.js';
|
|
7
7
|
import '../strands/strands_builtins.js';
|
package/dist/webgl/text.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { a7 as TEXTURE, c as TRIANGLES } from '../constants-
|
|
2
|
-
import { R as Renderer3D } from '../rendering-
|
|
1
|
+
import { a7 as TEXTURE, c as TRIANGLES } from '../constants-DkQDfqzw.js';
|
|
2
|
+
import { R as Renderer3D } from '../rendering-BowMW0pZ.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';
|
|
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
9
|
import '../strands/ir_types.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-Bf-YLpi6.js';
|
|
14
14
|
import '../image/filters.js';
|
|
15
15
|
import '../shape/custom_shapes.js';
|
|
16
16
|
import '../core/States.js';
|
package/dist/webgl/utils.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import '../constants-
|
|
1
|
+
import '../constants-DkQDfqzw.js';
|
|
2
2
|
import '../strands/ir_types.js';
|
|
3
|
-
export { u as checkWebGLCapabilities, h as getWebGLShaderAttributes, g as getWebGLUniformMetadata, j as populateGLSLHooks, o as readPixelWebGL, q as readPixelsWebGL, e as setWebGLTextureParams, s as setWebGLUniformValue } from '../rendering-
|
|
4
|
-
import '../creating_reading-
|
|
3
|
+
export { u as checkWebGLCapabilities, h as getWebGLShaderAttributes, g as getWebGLUniformMetadata, j as populateGLSLHooks, o as readPixelWebGL, q as readPixelsWebGL, e as setWebGLTextureParams, s as setWebGLUniformValue } from '../rendering-BowMW0pZ.js';
|
|
4
|
+
import '../creating_reading-Dyt2y-6S.js';
|
|
5
5
|
import 'colorjs.io/fn';
|
|
6
6
|
import '../color/color_spaces/hsb.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';
|
package/dist/webgpu/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import rendererWebGPU from './p5.RendererWebGPU.js';
|
|
2
|
-
import '../constants-
|
|
2
|
+
import '../constants-DkQDfqzw.js';
|
|
3
3
|
import '../webgl/enums.js';
|
|
4
4
|
import '../strands/ir_types.js';
|
|
5
5
|
import './shaders/color.js';
|
|
@@ -14,7 +14,7 @@ import './shaders/functions/randomVertWGSL.js';
|
|
|
14
14
|
import './shaders/functions/randomComputeWGSL.js';
|
|
15
15
|
import '../strands/ir_dag.js';
|
|
16
16
|
import '../strands/strands_FES.js';
|
|
17
|
-
import '../ir_builders-
|
|
17
|
+
import '../ir_builders-CMXkjMoV.js';
|
|
18
18
|
import '../strands/ir_cfg.js';
|
|
19
19
|
import '../strands/strands_builtins.js';
|
|
20
20
|
import './shaders/filters/base.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { W as WEBGPU, T as TRIANGLE_STRIP, L as LIGHTEST, D as DARKEST, S as SUBTRACT, R as REPLACE, E as EXCLUSION, a as SCREEN, M as MULTIPLY, b as REMOVE, A as ADD, B as BLEND, c as TRIANGLES, U as UNSIGNED_BYTE, F as FLOAT, H as HALF_FLOAT, d as UNSIGNED_INT, e as MIRROR, f as REPEAT, C as CLAMP, g as LINEAR, N as NEAREST } from '../constants-
|
|
1
|
+
import { W as WEBGPU, T as TRIANGLE_STRIP, L as LIGHTEST, D as DARKEST, S as SUBTRACT, R as REPLACE, E as EXCLUSION, a as SCREEN, M as MULTIPLY, b as REMOVE, A as ADD, B as BLEND, c as TRIANGLES, U as UNSIGNED_BYTE, F as FLOAT, H as HALF_FLOAT, d as UNSIGNED_INT, e as MIRROR, f as REPEAT, C as CLAMP, g as LINEAR, N as NEAREST } from '../constants-DkQDfqzw.js';
|
|
2
2
|
import { getStrokeDefs } from '../webgl/enums.js';
|
|
3
3
|
import { DataType } from '../strands/ir_types.js';
|
|
4
4
|
import { colorVertexShader, colorFragmentShader } from './shaders/color.js';
|
|
@@ -16,7 +16,7 @@ import './shaders/functions/randomVertWGSL.js';
|
|
|
16
16
|
import './shaders/functions/randomComputeWGSL.js';
|
|
17
17
|
import '../strands/ir_dag.js';
|
|
18
18
|
import '../strands/strands_FES.js';
|
|
19
|
-
import '../ir_builders-
|
|
19
|
+
import '../ir_builders-CMXkjMoV.js';
|
|
20
20
|
import '../strands/ir_cfg.js';
|
|
21
21
|
import '../strands/strands_builtins.js';
|
|
22
22
|
|
|
@@ -1333,6 +1333,10 @@ function rendererWebGPU(p5, fn) {
|
|
|
1333
1333
|
);
|
|
1334
1334
|
}
|
|
1335
1335
|
|
|
1336
|
+
supportsTriangleFan() {
|
|
1337
|
+
return false;
|
|
1338
|
+
}
|
|
1339
|
+
|
|
1336
1340
|
viewport() {}
|
|
1337
1341
|
|
|
1338
1342
|
zClipRange() {
|
|
@@ -5,7 +5,7 @@ import randomComputeWGSL from './shaders/functions/randomComputeWGSL.js';
|
|
|
5
5
|
import { INSTANCE_ID_VARYING_NAME, BaseType, DataType, NodeTypeToName, NodeType, OpCode, OpCodeToSymbol, isStructType, StatementType, HOOK_PARAM_PREFIX, BlockType } from '../strands/ir_types.js';
|
|
6
6
|
import { getNodeDataFromID, extractNodeTypeInfo } from '../strands/ir_dag.js';
|
|
7
7
|
import { internalError } from '../strands/strands_FES.js';
|
|
8
|
-
import { v as variableNode, c as createStrandsNode, s as scalarLiteralNode, f as functionCallNode } from '../ir_builders-
|
|
8
|
+
import { v as variableNode, c as createStrandsNode, s as scalarLiteralNode, f as functionCallNode } from '../ir_builders-CMXkjMoV.js';
|
|
9
9
|
import '../strands/ir_cfg.js';
|
|
10
10
|
import '../strands/strands_builtins.js';
|
|
11
11
|
|
|
@@ -412,7 +412,7 @@ const wgslBackend = {
|
|
|
412
412
|
}
|
|
413
413
|
const dag = strandsContext.dag;
|
|
414
414
|
const rootNode = getNodeDataFromID(dag, rootNodeID);
|
|
415
|
-
if (isStructType(returnType)) {
|
|
415
|
+
if (isStructType(returnType) && rootNode.identifier) {
|
|
416
416
|
const structTypeInfo = returnType;
|
|
417
417
|
for (let i = 0; i < structTypeInfo.properties.length; i++) {
|
|
418
418
|
const prop = structTypeInfo.properties[i];
|