p5 2.2.3-rc.0 → 2.2.3

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.
Files changed (97) hide show
  1. package/README.md +4 -5
  2. package/dist/accessibility/color_namer.js +5 -5
  3. package/dist/accessibility/index.js +5 -5
  4. package/dist/app.js +5 -5
  5. package/dist/color/color_conversion.js +5 -5
  6. package/dist/color/index.js +1 -1
  7. package/dist/color/setting.js +1 -1
  8. package/dist/{constants-D3ryGa0m.js → constants-BdTiYOQI.js} +1 -1
  9. package/dist/core/constants.js +1 -1
  10. package/dist/core/environment.js +1 -1
  11. package/dist/core/filterShaders.js +1 -1
  12. package/dist/core/friendly_errors/fes_core.js +1 -1
  13. package/dist/core/friendly_errors/file_errors.js +1 -1
  14. package/dist/core/friendly_errors/index.js +1 -1
  15. package/dist/core/friendly_errors/param_validator.js +1 -1
  16. package/dist/core/friendly_errors/sketch_verifier.js +1 -1
  17. package/dist/core/helpers.js +1 -1
  18. package/dist/core/init.js +5 -5
  19. package/dist/core/internationalization.js +1 -1
  20. package/dist/core/legacy.js +5 -5
  21. package/dist/core/main.js +5 -5
  22. package/dist/core/p5.Graphics.js +3 -3
  23. package/dist/core/p5.Renderer.js +2 -2
  24. package/dist/core/p5.Renderer2D.js +5 -5
  25. package/dist/core/p5.Renderer3D.js +3 -3
  26. package/dist/core/rendering.js +3 -3
  27. package/dist/data/local_storage.js +13 -9
  28. package/dist/dom/dom.js +30 -29
  29. package/dist/dom/index.js +1 -1
  30. package/dist/dom/p5.Element.js +3 -3
  31. package/dist/dom/p5.MediaElement.js +4 -5
  32. package/dist/events/pointer.js +1 -1
  33. package/dist/image/const.js +1 -1
  34. package/dist/image/filterRenderer2D.js +4 -4
  35. package/dist/image/image.js +3 -3
  36. package/dist/image/index.js +3 -3
  37. package/dist/image/loading_displaying.js +3 -3
  38. package/dist/image/p5.Image.js +2 -2
  39. package/dist/io/files.js +3 -3
  40. package/dist/io/index.js +3 -3
  41. package/dist/io/p5.XML.js +8 -8
  42. package/dist/{ir_builders-DMfaOLIL.js → ir_builders-Cd6rU9Vm.js} +0 -6
  43. package/dist/{main-CGwYa9-f.js → main-H_nu4eDs.js} +3 -3
  44. package/dist/math/Matrices/Matrix.js +1 -1
  45. package/dist/math/Matrices/MatrixNumjs.js +1 -1
  46. package/dist/math/index.js +1 -1
  47. package/dist/math/p5.Matrix.js +1 -1
  48. package/dist/math/p5.Vector.js +1 -1
  49. package/dist/math/trigonometry.js +1 -1
  50. package/dist/{p5.Renderer-C0e0XesC.js → p5.Renderer-BmD2P6Wv.js} +4 -3
  51. package/dist/{rendering-4Z2qdE_W.js → rendering-CC8JNTwG.js} +21 -58
  52. package/dist/shape/2d_primitives.js +1 -1
  53. package/dist/shape/attributes.js +1 -1
  54. package/dist/shape/custom_shapes.js +1 -1
  55. package/dist/shape/index.js +1 -1
  56. package/dist/strands/ir_builders.js +1 -1
  57. package/dist/strands/p5.strands.js +10 -34
  58. package/dist/strands/strands_api.js +1 -2
  59. package/dist/strands/strands_codegen.js +0 -12
  60. package/dist/strands/strands_conditionals.js +1 -1
  61. package/dist/strands/strands_for.js +1 -1
  62. package/dist/strands/strands_node.js +1 -1
  63. package/dist/type/index.js +2 -2
  64. package/dist/type/p5.Font.js +2 -2
  65. package/dist/type/textCore.js +2 -2
  66. package/dist/webgl/3d_primitives.js +3 -3
  67. package/dist/webgl/GeometryBuilder.js +1 -1
  68. package/dist/webgl/ShapeBuilder.js +1 -1
  69. package/dist/webgl/enums.js +1 -1
  70. package/dist/webgl/index.js +4 -4
  71. package/dist/webgl/interaction.js +1 -1
  72. package/dist/webgl/light.js +3 -3
  73. package/dist/webgl/loading.js +4 -6
  74. package/dist/webgl/material.js +3 -3
  75. package/dist/webgl/p5.Camera.js +3 -3
  76. package/dist/webgl/p5.Framebuffer.js +3 -3
  77. package/dist/webgl/p5.Geometry.js +1 -1
  78. package/dist/webgl/p5.Quat.js +1 -1
  79. package/dist/webgl/p5.RendererGL.js +4 -4
  80. package/dist/webgl/p5.Shader.js +14 -6
  81. package/dist/webgl/p5.Texture.js +3 -3
  82. package/dist/webgl/strands_glslBackend.js +1 -1
  83. package/dist/webgl/text.js +3 -3
  84. package/dist/webgl/utils.js +3 -3
  85. package/dist/webgpu/index.js +2 -2
  86. package/dist/webgpu/p5.RendererWebGPU.js +2 -2
  87. package/dist/webgpu/strands_wgslBackend.js +1 -1
  88. package/lib/p5.esm.js +104 -173
  89. package/lib/p5.esm.min.js +1 -1
  90. package/lib/p5.js +104 -173
  91. package/lib/p5.min.js +1 -1
  92. package/lib/p5.webgpu.esm.js +1 -7
  93. package/lib/p5.webgpu.js +1 -7
  94. package/lib/p5.webgpu.min.js +1 -1
  95. package/package.json +1 -1
  96. package/types/global.d.ts +1170 -1210
  97. package/types/p5.d.ts +645 -658
package/dist/dom/dom.js CHANGED
@@ -4,7 +4,7 @@ import { File } from './p5.File.js';
4
4
  import '../creating_reading-C7hu6sg1.js';
5
5
  import 'colorjs.io/fn';
6
6
  import '../color/color_spaces/hsb.js';
7
- import '../constants-D3ryGa0m.js';
7
+ import '../constants-BdTiYOQI.js';
8
8
  import '../io/p5.XML.js';
9
9
 
10
10
  /**
@@ -377,16 +377,16 @@ function dom(p5, fn){
377
377
  }
378
378
 
379
379
  /**
380
- * Creates a `<div></div>` element.
380
+ * Creates a `<div></div>` element.
381
381
  *
382
- * `&lt;div&gt;&lt;/div&gt;` elements are commonly used as containers for
382
+ * `<div></div>` elements are commonly used as containers for
383
383
  * other elements.
384
384
  *
385
385
  * The parameter `html` is optional. It accepts a string that sets the
386
- * inner HTML of the new `&lt;div&gt;&lt;/div&gt;`.
386
+ * inner HTML of the new `<div></div>`.
387
387
  *
388
388
  * @method createDiv
389
- * @param {String} [html] inner HTML for the new `&lt;div&gt;&lt;/div&gt;` element.
389
+ * @param {String} [html] inner HTML for the new `<div></div>` element.
390
390
  * @return {p5.Element} new <a href="#/p5.Element">p5.Element</a> object.
391
391
  *
392
392
  * @example
@@ -424,13 +424,13 @@ function dom(p5, fn){
424
424
  /**
425
425
  * Creates a paragraph element.
426
426
  *
427
- * `&lt;p&gt;&lt;/p&gt;` elements are commonly used for paragraph-length text.
427
+ * `<p></p>` elements are commonly used for paragraph-length text.
428
428
  *
429
429
  * The parameter `html` is optional. It accepts a string that sets the
430
- * inner HTML of the new `&lt;p&gt;&lt;/p&gt;`.
430
+ * inner HTML of the new `<p></p>`.
431
431
  *
432
432
  * @method createP
433
- * @param {String} [html] inner HTML for the new `&lt;p&gt;&lt;/p&gt;` element.
433
+ * @param {String} [html] inner HTML for the new `<p></p>` element.
434
434
  * @return {p5.Element} new <a href="#/p5.Element">p5.Element</a> object.
435
435
  *
436
436
  * @example
@@ -453,18 +453,18 @@ function dom(p5, fn){
453
453
  };
454
454
 
455
455
  /**
456
- * Creates a `&lt;span&gt;&lt;/span&gt;` element.
456
+ * Creates a `<span></span>` element.
457
457
  *
458
- * `&lt;span&gt;&lt;/span&gt;` elements are commonly used as containers
459
- * for inline elements. For example, a `&lt;span&gt;&lt;/span&gt;`
458
+ * `<span></span>` elements are commonly used as containers
459
+ * for inline elements. For example, a `<span></span>`
460
460
  * can hold part of a sentence that's a
461
461
  * <span style="color: deeppink;">different</span> style.
462
462
  *
463
463
  * The parameter `html` is optional. It accepts a string that sets the
464
- * inner HTML of the new `&lt;span&gt;&lt;/span&gt;`.
464
+ * inner HTML of the new `<span></span>`.
465
465
  *
466
466
  * @method createSpan
467
- * @param {String} [html] inner HTML for the new `&lt;span&gt;&lt;/span&gt;` element.
467
+ * @param {String} [html] inner HTML for the new `<span></span>` element.
468
468
  * @return {p5.Element} new <a href="#/p5.Element">p5.Element</a> object.
469
469
  *
470
470
  * @example
@@ -517,7 +517,7 @@ function dom(p5, fn){
517
517
  };
518
518
 
519
519
  /**
520
- * Creates an `&lt;img&gt;` element that can appear outside of the canvas.
520
+ * Creates an `<img>` element that can appear outside of the canvas.
521
521
  *
522
522
  * The first parameter, `src`, is a string with the path to the image file.
523
523
  * `src` should be a relative path, as in `'assets/image.png'`, or a URL, as
@@ -588,7 +588,7 @@ function dom(p5, fn){
588
588
  };
589
589
 
590
590
  /**
591
- * Creates an `&lt;a&gt;&lt;/a&gt;` element that links to another web page.
591
+ * Creates an `<a></a>` element that links to another web page.
592
592
  *
593
593
  * The first parmeter, `href`, is a string that sets the URL of the linked
594
594
  * page.
@@ -645,7 +645,7 @@ function dom(p5, fn){
645
645
 
646
646
  /* INPUT */
647
647
  /**
648
- * Creates a slider `&lt;input&gt;&lt;/input&gt;` element.
648
+ * Creates a slider `<input></input>` element.
649
649
  *
650
650
  * Range sliders are useful for quickly selecting numbers from a given range.
651
651
  *
@@ -767,7 +767,7 @@ function dom(p5, fn){
767
767
  };
768
768
 
769
769
  /**
770
- * Creates a `&lt;button&gt;&lt;/button&gt;` element.
770
+ * Creates a `<button></button>` element.
771
771
  *
772
772
  * The first parameter, `label`, is a string that sets the label displayed on
773
773
  * the button.
@@ -844,7 +844,7 @@ function dom(p5, fn){
844
844
  };
845
845
 
846
846
  /**
847
- * Creates a checkbox `&lt;input&gt;&lt;/input&gt;` element.
847
+ * Creates a checkbox `<input></input>` element.
848
848
  *
849
849
  * Checkboxes extend the <a href="#/p5.Element">p5.Element</a> class with a
850
850
  * `checked()` method. Calling `myBox.checked()` returns `true` if it the box
@@ -985,11 +985,11 @@ function dom(p5, fn){
985
985
  };
986
986
 
987
987
  /**
988
- * Creates a dropdown menu `&lt;select&gt;&lt;/select&gt;` element.
988
+ * Creates a dropdown menu `<select></select>` element.
989
989
  *
990
990
  * The parameter is optional. If `true` is passed, as in
991
991
  * `let mySelect = createSelect(true)`, then the dropdown will support
992
- * multiple selections. If an existing `&lt;select&gt;&lt;/select&gt;` element
992
+ * multiple selections. If an existing `<select></select>` element
993
993
  * is passed, as in `let mySelect = createSelect(otherSelect)`, the existing
994
994
  * element will be wrapped in a new <a href="#/p5.Element">p5.Element</a>
995
995
  * object.
@@ -1256,8 +1256,8 @@ function dom(p5, fn){
1256
1256
  *
1257
1257
  * The parameter is optional. If a string is passed, as in
1258
1258
  * `let myRadio = createSelect('food')`, then each radio option will
1259
- * have `"food"` as its `name` parameter: `&lt;input name="food"&gt;&lt;/input&gt;`.
1260
- * If an existing `&lt;div&gt;&lt;/div&gt;` or `&lt;span&gt;&lt;/span&gt;`
1259
+ * have `"food"` as its `name` parameter: `<input name="food"></input>`.
1260
+ * If an existing `<div></div>` or `<span></span>`
1261
1261
  * element is passed, as in `let myRadio = createSelect(container)`, it will
1262
1262
  * become the radio button's parent element.
1263
1263
  *
@@ -1270,8 +1270,8 @@ function dom(p5, fn){
1270
1270
  * - `myRadio.disable(shouldDisable)` enables the entire radio button if `true` is passed and disables it if `false` is passed.
1271
1271
  *
1272
1272
  * @method createRadio
1273
- * @param {Object} [containerElement] container HTML Element, either a `&lt;div&gt;&lt;/div&gt;`
1274
- * or `&lt;span&gt;&lt;/span&gt;`.
1273
+ * @param {Object} [containerElement] container HTML Element, either a `<div></div>`
1274
+ * or `<span></span>`.
1275
1275
  * @return {p5.Element} new <a href="#/p5.Element">p5.Element</a> object.
1276
1276
  *
1277
1277
  * @example
@@ -1390,7 +1390,7 @@ function dom(p5, fn){
1390
1390
  */
1391
1391
  /**
1392
1392
  * @method createRadio
1393
- * @param {String} [name] name parameter assigned to each option's `&lt;input&gt;&lt;/input&gt;` element.
1393
+ * @param {String} [name] name parameter assigned to each option's `<input></input>` element.
1394
1394
  * @return {p5.Element} new <a href="#/p5.Element">p5.Element</a> object.
1395
1395
  */
1396
1396
  /**
@@ -1657,7 +1657,7 @@ function dom(p5, fn){
1657
1657
  };
1658
1658
 
1659
1659
  /**
1660
- * Creates a text `&lt;input&gt;&lt;/input&gt;` element.
1660
+ * Creates a text `<input></input>` element.
1661
1661
  *
1662
1662
  * Call `myInput.size()` to set the length of the text box.
1663
1663
  *
@@ -1733,7 +1733,7 @@ function dom(p5, fn){
1733
1733
  };
1734
1734
 
1735
1735
  /**
1736
- * Creates an `&lt;input&gt;&lt;/input&gt;` element of type `'file'`.
1736
+ * Creates an `<input></input>` element of type `'file'`.
1737
1737
  *
1738
1738
  * `createFileInput()` allows users to select local files for use in a sketch.
1739
1739
  * It returns a <a href="#/p5.File">p5.File</a> object.
@@ -1838,8 +1838,9 @@ function dom(p5, fn){
1838
1838
 
1839
1839
  // If File API's are not supported, throw Error
1840
1840
  if (!(window.File && window.FileReader && window.FileList && window.Blob)) {
1841
- console.log(
1842
- 'The File APIs are not fully supported in this browser. Cannot create element.'
1841
+ p5._friendlyError(
1842
+ 'The File APIs are not fully supported in this browser. Cannot create element.',
1843
+ 'createFileInput'
1843
1844
  );
1844
1845
  return;
1845
1846
  }
package/dist/dom/index.js CHANGED
@@ -5,7 +5,7 @@ import file from './p5.File.js';
5
5
  import '../creating_reading-C7hu6sg1.js';
6
6
  import 'colorjs.io/fn';
7
7
  import '../color/color_spaces/hsb.js';
8
- import '../constants-D3ryGa0m.js';
8
+ import '../constants-BdTiYOQI.js';
9
9
  import '../io/p5.XML.js';
10
10
 
11
11
  function dom(p5){
@@ -1,6 +1,6 @@
1
1
  import { File } from './p5.File.js';
2
2
  import { C as Color } from '../creating_reading-C7hu6sg1.js';
3
- import { a4 as AUTO } from '../constants-D3ryGa0m.js';
3
+ import { a4 as AUTO } from '../constants-BdTiYOQI.js';
4
4
  import '../io/p5.XML.js';
5
5
  import 'colorjs.io/fn';
6
6
  import '../color/color_spaces/hsb.js';
@@ -96,9 +96,9 @@ class Element {
96
96
  /**
97
97
  * Attaches the element to a parent element.
98
98
  *
99
- * For example, a `&lt;div&gt;&lt;/div&gt;` element may be used as a box to
99
+ * For example, a `<div></div>` element may be used as a box to
100
100
  * hold two pieces of text, a header and a paragraph. The
101
- * `&lt;div&gt;&lt;/div&gt;` is the parent element of both the header and
101
+ * `<div></div>` is the parent element of both the header and
102
102
  * paragraph.
103
103
  *
104
104
  * The parameter `parent` can have one of three types. `parent` can be a
@@ -4,7 +4,7 @@ import '../io/p5.XML.js';
4
4
  import '../creating_reading-C7hu6sg1.js';
5
5
  import 'colorjs.io/fn';
6
6
  import '../color/color_spaces/hsb.js';
7
- import '../constants-D3ryGa0m.js';
7
+ import '../constants-BdTiYOQI.js';
8
8
 
9
9
  /**
10
10
  * @module DOM
@@ -1177,7 +1177,6 @@ class MediaElement extends Element {
1177
1177
  removeCue(id) {
1178
1178
  for (let i = 0; i < this._cues.length; i++) {
1179
1179
  if (this._cues[i].id === id) {
1180
- console.log(id);
1181
1180
  this._cues.splice(i, 1);
1182
1181
  }
1183
1182
  }
@@ -1327,7 +1326,7 @@ function media(p5, fn){
1327
1326
  }
1328
1327
 
1329
1328
  /**
1330
- * Creates a `&lt;video&gt;` element for simple audio/video playback.
1329
+ * Creates a `<video>` element for simple audio/video playback.
1331
1330
  *
1332
1331
  * `createVideo()` returns a new
1333
1332
  * <a href="#/p5.MediaElement">p5.MediaElement</a> object. Videos are shown by
@@ -1415,7 +1414,7 @@ function media(p5, fn){
1415
1414
  /* AUDIO STUFF */
1416
1415
 
1417
1416
  /**
1418
- * Creates a hidden `&lt;audio&gt;` element for simple audio playback.
1417
+ * Creates a hidden `<audio>` element for simple audio playback.
1419
1418
  *
1420
1419
  * `createAudio()` returns a new
1421
1420
  * <a href="#/p5.MediaElement">p5.MediaElement</a> object.
@@ -1492,7 +1491,7 @@ function media(p5, fn){
1492
1491
  }
1493
1492
 
1494
1493
  /**
1495
- * Creates a `&lt;video&gt;` element that "captures" the audio/video stream from
1494
+ * Creates a `<video>` element that "captures" the audio/video stream from
1496
1495
  * the webcam and microphone.
1497
1496
  *
1498
1497
  * `createCapture()` returns a new
@@ -1861,7 +1861,7 @@ function pointer(p5, fn, lifecycles){
1861
1861
  canvas.requestPointerLock =
1862
1862
  canvas.requestPointerLock || canvas.mozRequestPointerLock;
1863
1863
  if (!canvas.requestPointerLock) {
1864
- console.log('requestPointerLock is not implemented in this browser');
1864
+ p5._friendlyError('requestPointerLock is not implemented in this browser', 'requestPointerLock');
1865
1865
  return false;
1866
1866
  }
1867
1867
  canvas.requestPointerLock();
@@ -1,4 +1,4 @@
1
- import { ae as THRESHOLD, af as POSTERIZE, ab as BLUR } from '../constants-D3ryGa0m.js';
1
+ import { ae as THRESHOLD, af as POSTERIZE, ab as BLUR } from '../constants-BdTiYOQI.js';
2
2
 
3
3
  const filterParamDefaults = {
4
4
  [BLUR]: 3,
@@ -1,7 +1,7 @@
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-4Z2qdE_W.js';
3
- import { I as Image } from '../p5.Renderer-C0e0XesC.js';
4
- import { C as CLAMP, aa as WEBGL2, p as CORNER, B as BLEND, ab as BLUR, ac as WEBGL } from '../constants-D3ryGa0m.js';
2
+ import { s as setWebGLUniformValue, e as setWebGLTextureParams, g as getWebGLUniformMetadata, h as getWebGLShaderAttributes, j as populateGLSLHooks, T as Texture } from '../rendering-CC8JNTwG.js';
3
+ import { I as Image } from '../p5.Renderer-BmD2P6Wv.js';
4
+ import { C as CLAMP, aa as WEBGL2, p as CORNER, B as BLEND, ab as BLUR, ac as WEBGL } from '../constants-BdTiYOQI.js';
5
5
  import { filterParamDefaults } from './const.js';
6
6
  import { w as webgl2CompatibilityShader, f as filterBaseVert, a as filterBaseFrag, n as noiseGLSL } from '../noise3DGLSL-Bwrdi4gi.js';
7
7
  import { glslBackend } from '../webgl/strands_glslBackend.js';
@@ -47,7 +47,7 @@ import '../math/trigonometry.js';
47
47
  import '../strands/ir_types.js';
48
48
  import '../strands/ir_dag.js';
49
49
  import '../strands/strands_FES.js';
50
- import '../ir_builders-DMfaOLIL.js';
50
+ import '../ir_builders-Cd6rU9Vm.js';
51
51
  import '../strands/ir_cfg.js';
52
52
  import '../strands/strands_builtins.js';
53
53
 
@@ -1,13 +1,13 @@
1
1
  import 'omggif';
2
2
  import '../dom/p5.Element.js';
3
- export { i as default } from '../rendering-4Z2qdE_W.js';
3
+ export { i as default } from '../rendering-CC8JNTwG.js';
4
4
  import '../dom/p5.File.js';
5
5
  import '../io/p5.XML.js';
6
6
  import '../creating_reading-C7hu6sg1.js';
7
7
  import 'colorjs.io/fn';
8
8
  import '../color/color_spaces/hsb.js';
9
- import '../constants-D3ryGa0m.js';
10
- import '../p5.Renderer-C0e0XesC.js';
9
+ import '../constants-BdTiYOQI.js';
10
+ import '../p5.Renderer-BmD2P6Wv.js';
11
11
  import './filters.js';
12
12
  import '../math/p5.Vector.js';
13
13
  import '../shape/custom_shapes.js';
@@ -1,8 +1,8 @@
1
- import { i as image$1, b as loadingDisplaying, t as texture } from '../rendering-4Z2qdE_W.js';
2
- import { i as image$2 } from '../p5.Renderer-C0e0XesC.js';
1
+ import { i as image$1, b as loadingDisplaying, t as texture } from '../rendering-CC8JNTwG.js';
2
+ import { i as image$2 } from '../p5.Renderer-BmD2P6Wv.js';
3
3
  import pixels from './pixels.js';
4
4
  import shader from '../webgl/p5.Shader.js';
5
- import '../constants-D3ryGa0m.js';
5
+ import '../constants-BdTiYOQI.js';
6
6
  import '../creating_reading-C7hu6sg1.js';
7
7
  import 'colorjs.io/fn';
8
8
  import '../color/color_spaces/hsb.js';
@@ -1,6 +1,6 @@
1
1
  import '../core/helpers.js';
2
- import '../constants-D3ryGa0m.js';
3
- export { b as default } from '../rendering-4Z2qdE_W.js';
2
+ import '../constants-BdTiYOQI.js';
3
+ export { b as default } from '../rendering-CC8JNTwG.js';
4
4
  import 'omggif';
5
5
  import 'gifenc';
6
6
  import '../creating_reading-C7hu6sg1.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-C0e0XesC.js';
12
+ import '../p5.Renderer-BmD2P6Wv.js';
13
13
  import './filters.js';
14
14
  import '../math/p5.Vector.js';
15
15
  import '../shape/custom_shapes.js';
@@ -1,10 +1,10 @@
1
1
  import './filters.js';
2
- export { I as Image, i as default } from '../p5.Renderer-C0e0XesC.js';
2
+ export { I as Image, i as default } from '../p5.Renderer-BmD2P6Wv.js';
3
3
  import '../io/utilities.js';
4
4
  import '../creating_reading-C7hu6sg1.js';
5
5
  import 'colorjs.io/fn';
6
6
  import '../color/color_spaces/hsb.js';
7
- import '../constants-D3ryGa0m.js';
7
+ import '../constants-BdTiYOQI.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-C0e0XesC.js';
2
- export { d as default, a as request } from '../rendering-4Z2qdE_W.js';
1
+ import '../p5.Renderer-BmD2P6Wv.js';
2
+ export { d as default, a as request } from '../rendering-CC8JNTwG.js';
3
3
  import './csv.js';
4
4
  import './utilities.js';
5
5
  import '../creating_reading-C7hu6sg1.js';
6
6
  import 'colorjs.io/fn';
7
7
  import '../color/color_spaces/hsb.js';
8
- import '../constants-D3ryGa0m.js';
8
+ import '../constants-BdTiYOQI.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,14 +1,14 @@
1
- import { d as files } from '../rendering-4Z2qdE_W.js';
1
+ import { d as files } from '../rendering-CC8JNTwG.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-D3ryGa0m.js';
5
+ import '../constants-BdTiYOQI.js';
6
6
  import '../creating_reading-C7hu6sg1.js';
7
7
  import 'colorjs.io/fn';
8
8
  import '../color/color_spaces/hsb.js';
9
9
  import '../dom/p5.Element.js';
10
10
  import '../dom/p5.File.js';
11
- import '../p5.Renderer-C0e0XesC.js';
11
+ import '../p5.Renderer-BmD2P6Wv.js';
12
12
  import '../image/filters.js';
13
13
  import '../math/p5.Vector.js';
14
14
  import '../shape/custom_shapes.js';
package/dist/io/p5.XML.js CHANGED
@@ -62,7 +62,7 @@ class XML {
62
62
  * Returns the element's name as a `String`.
63
63
  *
64
64
  * An XML element's name is given by its tag. For example, the element
65
- * `&lt;language&gt;JavaScript&lt;/language&gt;` has the name `language`.
65
+ * `<language>JavaScript</language>` has the name `language`.
66
66
  *
67
67
  * @return {String} name of the element.
68
68
  *
@@ -105,11 +105,11 @@ class XML {
105
105
  * Sets the element's tag name.
106
106
  *
107
107
  * An XML element's name is given by its tag. For example, the element
108
- * `&lt;language&gt;JavaScript&lt;/language&gt;` has the name `language`.
108
+ * `<language>JavaScript</language>` has the name `language`.
109
109
  *
110
110
  * The parameter, `name`, is the element's new name as a string. For example,
111
111
  * calling `myXML.setName('planet')` will make the element's new tag name
112
- * `&lt;planet&gt;&lt;/planet&gt;`.
112
+ * `<planet></planet>`.
113
113
  *
114
114
  * @param {String} name new tag name of the element.
115
115
  *
@@ -251,7 +251,7 @@ class XML {
251
251
  *
252
252
  * The parameter, `name`, is optional. If a string is passed, as in
253
253
  * `myXML.getChildren('cat')`, then the method will only return child elements
254
- * with the tag `&lt;cat&gt;`.
254
+ * with the tag `<cat>`.
255
255
  *
256
256
  * @param {String} [name] name of the elements to return.
257
257
  * @return {p5.XML[]} child elements.
@@ -345,7 +345,7 @@ class XML {
345
345
  *
346
346
  * The parameter, `name`, is optional. If a string is passed, as in
347
347
  * `myXML.getChild('cat')`, then the first child element with the tag
348
- * `&lt;cat&gt;` will be returned. If a number is passed, as in
348
+ * `<cat>` will be returned. If a number is passed, as in
349
349
  * `myXML.getChild(1)`, then the child element at that index will be returned.
350
350
  *
351
351
  * @param {String|Integer} name element name or index.
@@ -478,7 +478,7 @@ class XML {
478
478
  *
479
479
  * The parameter, `name`, is the child element to remove. If a string is
480
480
  * passed, as in `myXML.removeChild('cat')`, then the first child element
481
- * with the tag `&lt;cat&gt;` will be removed. If a number is passed, as in
481
+ * with the tag `<cat>` will be removed. If a number is passed, as in
482
482
  * `myXML.removeChild(1)`, then the child element at that index will be
483
483
  * removed.
484
484
  *
@@ -1032,7 +1032,7 @@ class XML {
1032
1032
  * Sets the element's content.
1033
1033
  *
1034
1034
  * An element's content is the text between its tags. For example, the element
1035
- * `&lt;language&gt;JavaScript&lt;/language&gt;` has the content `JavaScript`.
1035
+ * `<language>JavaScript</language>` has the content `JavaScript`.
1036
1036
  *
1037
1037
  * The parameter, `content`, is a string with the element's new content.
1038
1038
  *
@@ -1150,7 +1150,7 @@ function xml(p5, fn){
1150
1150
  * (<a href="https://developer.mozilla.org/en-US/docs/Web/XML/XML_introduction" target="_blank">XML</a>)
1151
1151
  * is a standard format for sending data between applications. Like HTML, the
1152
1152
  * XML format is based on tags and attributes, as in
1153
- * `&lt;time units="s"&gt;1234&lt;/time&gt;`.
1153
+ * `<time units="s">1234</time>`.
1154
1154
  *
1155
1155
  * Note: Use <a href="#/p5/loadXML">loadXML()</a> to load external XML files.
1156
1156
  *
@@ -71,9 +71,6 @@ class StrandsNode {
71
71
  const assignmentID = getOrCreateNode(dag, assignmentNode);
72
72
  recordInBasicBlock(cfg, cfg.currentBlock, assignmentID);
73
73
 
74
- // Track for global assignments processing
75
- this.strandsContext.globalAssignments.push(assignmentID);
76
-
77
74
  // Simply update this node to be a variable node with the identifier
78
75
  // This ensures it always generates the variable name in expressions
79
76
  const variableNodeData = createNodeData({
@@ -137,9 +134,6 @@ class StrandsNode {
137
134
  const assignmentID = getOrCreateNode(dag, assignmentNode);
138
135
  recordInBasicBlock(cfg, cfg.currentBlock, assignmentID);
139
136
 
140
- // Track for global assignments processing in the current hook context
141
- this.strandsContext.globalAssignments.push(assignmentID);
142
-
143
137
  // Simply update this node to be a variable node with the identifier
144
138
  // This ensures it always generates the variable name in expressions
145
139
  const variableNodeData = createNodeData({
@@ -1,9 +1,9 @@
1
- import { P as P2D, ac as WEBGL, B as BLEND, al as _DEFAULT_FILL, am as _DEFAULT_STROKE, w as ROUND, b as REMOVE, S as SUBTRACT, D as DARKEST, L as LIGHTEST, an as DIFFERENCE, M as MULTIPLY, E as EXCLUSION, a as SCREEN, R as REPLACE, ao as OVERLAY, ap as HARD_LIGHT, aq as SOFT_LIGHT, ar as DODGE, as as BURN, A as ADD, at as PIE, au as CHORD, q as TWO_PI, x as SQUARE, y as PROJECT, z as BEVEL, I as MITER, a9 as RIGHT, v as CENTER, av as LEFT, aw as BOTTOM, ax as BASELINE, ay as TOP, Q as OPEN, az as VERSION, a3 as constants } from './constants-D3ryGa0m.js';
1
+ import { P as P2D, ac as WEBGL, B as BLEND, al as _DEFAULT_FILL, am as _DEFAULT_STROKE, w as ROUND, b as REMOVE, S as SUBTRACT, D as DARKEST, L as LIGHTEST, an as DIFFERENCE, M as MULTIPLY, E as EXCLUSION, a as SCREEN, R as REPLACE, ao as OVERLAY, ap as HARD_LIGHT, aq as SOFT_LIGHT, ar as DODGE, as as BURN, A as ADD, at as PIE, au as CHORD, q as TWO_PI, x as SQUARE, y as PROJECT, z as BEVEL, I as MITER, a9 as RIGHT, v as CENTER, av as LEFT, aw as BOTTOM, ax as BASELINE, ay as TOP, Q as OPEN, az as VERSION, a3 as constants } from './constants-BdTiYOQI.js';
2
2
  import transform from './core/transform.js';
3
3
  import structure from './core/structure.js';
4
4
  import environment from './core/environment.js';
5
- import { G as Graphics, k as rendering, n as graphics } from './rendering-4Z2qdE_W.js';
6
- import { R as Renderer, I as Image, r as renderer } from './p5.Renderer-C0e0XesC.js';
5
+ import { G as Graphics, k as rendering, n as graphics } from './rendering-CC8JNTwG.js';
6
+ import { R as Renderer, I as Image, r as renderer } from './p5.Renderer-BmD2P6Wv.js';
7
7
  import { Element } from './dom/p5.Element.js';
8
8
  import { MediaElement } from './dom/p5.MediaElement.js';
9
9
  import { b as RGBHDR } from './creating_reading-C7hu6sg1.js';
@@ -1,6 +1,6 @@
1
1
  import { Vector } from '../p5.Vector.js';
2
2
  import { MatrixInterface } from './MatrixInterface.js';
3
- import '../../constants-D3ryGa0m.js';
3
+ import '../../constants-BdTiYOQI.js';
4
4
 
5
5
  /**
6
6
  * @module Math
@@ -1,7 +1,7 @@
1
1
  import nj from '@d4c/numjs/build/module/numjs.min.js';
2
2
  import { Vector } from '../p5.Vector.js';
3
3
  import { MatrixInterface } from './MatrixInterface.js';
4
- import '../../constants-D3ryGa0m.js';
4
+ import '../../constants-BdTiYOQI.js';
5
5
 
6
6
  let isMatrixArray = x => Array.isArray(x);
7
7
  if (typeof Float32Array !== 'undefined') {
@@ -4,7 +4,7 @@ import random from './random.js';
4
4
  import trigonometry from './trigonometry.js';
5
5
  import math$1 from './math.js';
6
6
  import vector from './p5.Vector.js';
7
- import '../constants-D3ryGa0m.js';
7
+ import '../constants-BdTiYOQI.js';
8
8
 
9
9
  function math(p5){
10
10
  p5.registerAddon(calculation);
@@ -1,6 +1,6 @@
1
1
  import { Matrix } from './Matrices/Matrix.js';
2
2
  import './p5.Vector.js';
3
- import '../constants-D3ryGa0m.js';
3
+ import '../constants-BdTiYOQI.js';
4
4
  import './Matrices/MatrixInterface.js';
5
5
 
6
6
  /**
@@ -1,4 +1,4 @@
1
- import { q as TWO_PI } from '../constants-D3ryGa0m.js';
1
+ import { q as TWO_PI } from '../constants-BdTiYOQI.js';
2
2
 
3
3
  /**
4
4
  * @module Math
@@ -1,4 +1,4 @@
1
- import { a5 as RAD_TO_DEG, a6 as DEG_TO_RAD } from '../constants-D3ryGa0m.js';
1
+ import { a5 as RAD_TO_DEG, a6 as DEG_TO_RAD } from '../constants-BdTiYOQI.js';
2
2
 
3
3
  /**
4
4
  * @module Math
@@ -1,5 +1,5 @@
1
1
  import { C as Color } from './creating_reading-C7hu6sg1.js';
2
- import { a2 as NORMAL, aA as WORD, ax as BASELINE, av as LEFT, v as CENTER, p as CORNER, J as INCLUDE } from './constants-D3ryGa0m.js';
2
+ import { a2 as NORMAL, aA as WORD, ax as BASELINE, av as LEFT, v as CENTER, p as CORNER, J as INCLUDE } from './constants-BdTiYOQI.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';
@@ -1601,8 +1601,9 @@ class Image {
1601
1601
  props.displayIndex = index;
1602
1602
  this.drawingContext.putImageData(props.frames[index].image, 0, 0);
1603
1603
  } else {
1604
- console.log(
1605
- 'Cannot set GIF to a frame number that is higher than total number of frames or below zero.'
1604
+ p5._friendlyError(
1605
+ 'Cannot set GIF to a frame number that is higher than total number of frames or below zero.',
1606
+ 'setFrame'
1606
1607
  );
1607
1608
  }
1608
1609
  }