p5 2.0.0 → 2.0.1

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 (188) hide show
  1. package/{src → dist}/accessibility/color_namer.js +48 -3
  2. package/{src → dist}/accessibility/describe.js +2 -2
  3. package/{src → dist}/accessibility/gridOutput.js +2 -2
  4. package/dist/accessibility/index.js +60 -0
  5. package/{src → dist}/accessibility/outputs.js +2 -2
  6. package/{src → dist}/accessibility/textOutput.js +2 -2
  7. package/dist/app.js +120 -0
  8. package/{src → dist}/color/color_conversion.js +48 -10
  9. package/{src → dist}/color/color_spaces/hsb.js +3 -1
  10. package/dist/color/creating_reading.js +3 -0
  11. package/dist/color/index.js +13 -0
  12. package/dist/color/p5.Color.culori.js +1 -0
  13. package/dist/color/p5.Color.js +3 -0
  14. package/{src → dist}/color/setting.js +9 -6
  15. package/{src/core/constants.js → dist/constants-C-g_eAdC.js} +266 -130
  16. package/{src → dist}/core/States.js +3 -1
  17. package/dist/core/constants.js +1 -0
  18. package/{src → dist}/core/environment.js +7 -6
  19. package/{src → dist}/core/friendly_errors/browser_errors.js +1 -1
  20. package/{src → dist}/core/friendly_errors/fes_core.js +14 -44
  21. package/{src → dist}/core/friendly_errors/file_errors.js +6 -3
  22. package/dist/core/friendly_errors/index.js +23 -0
  23. package/dist/core/friendly_errors/param_validator.js +5455 -0
  24. package/{src → dist}/core/friendly_errors/sketch_reader.js +50 -4
  25. package/{src → dist}/core/friendly_errors/sketch_verifier.js +6 -6
  26. package/{src → dist}/core/friendly_errors/stacktrace.js +3 -5
  27. package/{src → dist}/core/friendly_errors/validate_params.js +50 -41
  28. package/{src → dist}/core/helpers.js +9 -6
  29. package/dist/core/init.js +105 -0
  30. package/dist/core/internationalization.js +302 -0
  31. package/dist/core/legacy.js +73 -0
  32. package/dist/core/main.js +44 -0
  33. package/dist/core/noop.js +3 -0
  34. package/dist/core/p5.Graphics.js +40 -0
  35. package/dist/core/p5.Renderer.js +11 -0
  36. package/dist/core/p5.Renderer2D.js +44 -0
  37. package/dist/core/reference.js +1 -0
  38. package/dist/core/rendering.js +40 -0
  39. package/{src → dist}/core/structure.js +3 -3
  40. package/{src → dist}/core/transform.js +2 -2
  41. package/{src/color/creating_reading.js → dist/creating_reading-D4AAKRbx.js} +841 -13
  42. package/{src → dist}/data/index.js +3 -1
  43. package/{src → dist}/data/local_storage.js +2 -8
  44. package/{src → dist}/dom/dom.js +11 -5
  45. package/dist/dom/index.js +18 -0
  46. package/{src → dist}/dom/p5.Element.js +14 -12
  47. package/{src → dist}/dom/p5.File.js +4 -4
  48. package/{src → dist}/dom/p5.MediaElement.js +10 -4
  49. package/{src → dist}/events/acceleration.js +2 -2
  50. package/{src → dist}/events/index.js +3 -1
  51. package/{src → dist}/events/keyboard.js +14 -11
  52. package/{src → dist}/events/pointer.js +16 -17
  53. package/dist/image/const.js +9 -0
  54. package/{src → dist}/image/filterRenderer2D.js +57 -37
  55. package/{src → dist}/image/filters.js +1 -3
  56. package/dist/image/image.js +40 -0
  57. package/dist/image/index.js +51 -0
  58. package/dist/image/loading_displaying.js +40 -0
  59. package/dist/image/p5.Image.js +11 -0
  60. package/{src → dist}/image/pixels.js +4 -3
  61. package/{src → dist}/io/csv.js +72 -70
  62. package/dist/io/files.js +40 -0
  63. package/dist/io/index.js +51 -0
  64. package/{src → dist}/io/p5.Table.js +6 -6
  65. package/{src → dist}/io/p5.TableRow.js +3 -4
  66. package/{src → dist}/io/p5.XML.js +2 -5
  67. package/{src → dist}/io/utilities.js +1 -1
  68. package/{src/core/p5.Renderer2D.js → dist/main-s72KWcUy.js} +735 -57
  69. package/{src → dist}/math/Matrices/Matrix.js +10 -8
  70. package/{src → dist}/math/Matrices/MatrixInterface.js +5 -3
  71. package/{src → dist}/math/Matrices/MatrixNumjs.js +12 -26
  72. package/{src → dist}/math/calculation.js +2 -2
  73. package/{src → dist}/math/index.js +6 -3
  74. package/{src → dist}/math/math.js +2 -2
  75. package/{src → dist}/math/noise.js +2 -2
  76. package/{src → dist}/math/p5.Matrix.js +7 -4
  77. package/{src → dist}/math/p5.Vector.js +6 -6
  78. package/{src → dist}/math/random.js +2 -2
  79. package/{src → dist}/math/trigonometry.js +16 -15
  80. package/{src/image/p5.Image.js → dist/p5.Renderer-CwAYZOC2.js} +390 -19
  81. package/dist/rendering--aAe5aq3.js +24925 -0
  82. package/{src → dist}/shape/2d_primitives.js +18 -17
  83. package/{src → dist}/shape/attributes.js +18 -17
  84. package/{src → dist}/shape/curves.js +2 -2
  85. package/{src → dist}/shape/custom_shapes.js +44 -64
  86. package/{src → dist}/shape/index.js +10 -2
  87. package/{src → dist}/shape/vertex.js +2 -3
  88. package/dist/type/index.js +25 -0
  89. package/{src → dist}/type/lib/Typr.js +76 -94
  90. package/{src → dist}/type/p5.Font.js +37 -61
  91. package/{src → dist}/type/textCore.js +34 -57
  92. package/{src → dist}/type/unicodeRanges.js +3 -1
  93. package/{src → dist}/utilities/conversion.js +2 -2
  94. package/{src → dist}/utilities/index.js +3 -1
  95. package/{src → dist}/utilities/time_date.js +6 -7
  96. package/{src → dist}/utilities/utility_functions.js +2 -2
  97. package/dist/webgl/3d_primitives.js +40 -0
  98. package/{src → dist}/webgl/GeometryBufferCache.js +3 -1
  99. package/{src → dist}/webgl/GeometryBuilder.js +12 -8
  100. package/{src → dist}/webgl/ShaderGenerator.js +79 -82
  101. package/{src → dist}/webgl/ShapeBuilder.js +26 -23
  102. package/dist/webgl/index.js +76 -0
  103. package/{src → dist}/webgl/interaction.js +7 -6
  104. package/dist/webgl/light.js +40 -0
  105. package/{src → dist}/webgl/loading.js +45 -12
  106. package/dist/webgl/material.js +40 -0
  107. package/dist/webgl/p5.Camera.js +40 -0
  108. package/{src → dist}/webgl/p5.DataArray.js +3 -5
  109. package/dist/webgl/p5.Framebuffer.js +40 -0
  110. package/{src → dist}/webgl/p5.Geometry.js +12 -15
  111. package/{src → dist}/webgl/p5.Quat.js +5 -4
  112. package/{src → dist}/webgl/p5.RenderBuffer.js +2 -3
  113. package/dist/webgl/p5.RendererGL.js +40 -0
  114. package/dist/webgl/p5.Shader.js +40 -0
  115. package/dist/webgl/p5.Texture.js +40 -0
  116. package/{src → dist}/webgl/text.js +51 -9
  117. package/lib/p5.esm.js +102 -48
  118. package/lib/p5.js +102 -48
  119. package/lib/p5.min.js +1 -1
  120. package/package.json +17 -16
  121. package/translations/dev.js +6 -6
  122. package/translations/index.js +1 -1
  123. package/src/README.md +0 -27
  124. package/src/accessibility/index.js +0 -13
  125. package/src/app.js +0 -61
  126. package/src/color/index.js +0 -9
  127. package/src/color/p5.Color.culori.js +0 -66
  128. package/src/color/p5.Color.js +0 -851
  129. package/src/core/README.md +0 -91
  130. package/src/core/friendly_errors/index.js +0 -13
  131. package/src/core/friendly_errors/param_validator.js +0 -561
  132. package/src/core/init.js +0 -58
  133. package/src/core/internationalization.js +0 -195
  134. package/src/core/legacy.js +0 -29
  135. package/src/core/main.js +0 -689
  136. package/src/core/noop.js +0 -1
  137. package/src/core/p5.Graphics.js +0 -696
  138. package/src/core/p5.Renderer.js +0 -408
  139. package/src/core/reference.js +0 -2060
  140. package/src/core/rendering.js +0 -697
  141. package/src/dom/index.js +0 -11
  142. package/src/image/const.js +0 -6
  143. package/src/image/image.js +0 -731
  144. package/src/image/index.js +0 -15
  145. package/src/image/loading_displaying.js +0 -1431
  146. package/src/io/files.js +0 -2210
  147. package/src/io/index.js +0 -11
  148. package/src/math/README.md +0 -40
  149. package/src/type/index.js +0 -9
  150. package/src/webgl/3d_primitives.js +0 -2741
  151. package/src/webgl/index.js +0 -37
  152. package/src/webgl/light.js +0 -1851
  153. package/src/webgl/material.js +0 -3854
  154. package/src/webgl/p5.Camera.js +0 -4010
  155. package/src/webgl/p5.Framebuffer.js +0 -1865
  156. package/src/webgl/p5.RendererGL.js +0 -2867
  157. package/src/webgl/p5.Shader.js +0 -1505
  158. package/src/webgl/p5.Texture.js +0 -541
  159. package/src/webgl/shaders/basic.frag +0 -6
  160. package/src/webgl/shaders/filters/base.frag +0 -22
  161. package/src/webgl/shaders/filters/base.vert +0 -19
  162. package/src/webgl/shaders/filters/blur.frag +0 -60
  163. package/src/webgl/shaders/filters/default.vert +0 -18
  164. package/src/webgl/shaders/filters/dilate.frag +0 -39
  165. package/src/webgl/shaders/filters/erode.frag +0 -39
  166. package/src/webgl/shaders/filters/gray.frag +0 -16
  167. package/src/webgl/shaders/filters/invert.frag +0 -15
  168. package/src/webgl/shaders/filters/opaque.frag +0 -12
  169. package/src/webgl/shaders/filters/posterize.frag +0 -29
  170. package/src/webgl/shaders/filters/threshold.frag +0 -23
  171. package/src/webgl/shaders/font.frag +0 -216
  172. package/src/webgl/shaders/font.vert +0 -44
  173. package/src/webgl/shaders/imageLight.vert +0 -33
  174. package/src/webgl/shaders/imageLightDiffused.frag +0 -82
  175. package/src/webgl/shaders/imageLightSpecular.frag +0 -134
  176. package/src/webgl/shaders/light.vert +0 -37
  177. package/src/webgl/shaders/light_texture.frag +0 -26
  178. package/src/webgl/shaders/lighting.glsl +0 -227
  179. package/src/webgl/shaders/line.frag +0 -74
  180. package/src/webgl/shaders/line.vert +0 -294
  181. package/src/webgl/shaders/normal.frag +0 -6
  182. package/src/webgl/shaders/normal.vert +0 -72
  183. package/src/webgl/shaders/phong.frag +0 -84
  184. package/src/webgl/shaders/phong.vert +0 -87
  185. package/src/webgl/shaders/point.frag +0 -29
  186. package/src/webgl/shaders/point.vert +0 -19
  187. package/src/webgl/shaders/sphereMapping.frag +0 -26
  188. package/src/webgl/shaders/webgl2Compatibility.glsl +0 -34
@@ -0,0 +1,76 @@
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--aAe5aq3.js';
2
+ import interaction from './interaction.js';
3
+ import loading from './loading.js';
4
+ import text from './text.js';
5
+ import renderBuffer from './p5.RenderBuffer.js';
6
+ import quat from './p5.Quat.js';
7
+ import matrix from '../math/p5.Matrix.js';
8
+ import geometry from './p5.Geometry.js';
9
+ import dataArray from './p5.DataArray.js';
10
+ import shadergenerator from './ShaderGenerator.js';
11
+ import '../constants-C-g_eAdC.js';
12
+ import '../creating_reading-D4AAKRbx.js';
13
+ import 'colorjs.io/fn';
14
+ import '../color/color_spaces/hsb.js';
15
+ import '../dom/p5.Element.js';
16
+ import '../dom/p5.File.js';
17
+ import '../io/p5.XML.js';
18
+ import '../p5.Renderer-CwAYZOC2.js';
19
+ import '../image/filters.js';
20
+ import '../math/p5.Vector.js';
21
+ import '../shape/custom_shapes.js';
22
+ import '../core/States.js';
23
+ import '../io/utilities.js';
24
+ import 'file-saver';
25
+ import '../dom/p5.MediaElement.js';
26
+ import '../shape/2d_primitives.js';
27
+ import '../core/helpers.js';
28
+ import '../shape/attributes.js';
29
+ import '../shape/curves.js';
30
+ import '../shape/vertex.js';
31
+ import '../color/setting.js';
32
+ import 'omggif';
33
+ import '../io/csv.js';
34
+ import 'gifenc';
35
+ import '../image/pixels.js';
36
+ import '../core/transform.js';
37
+ import './GeometryBuilder.js';
38
+ import '../math/Matrices/Matrix.js';
39
+ import '../math/Matrices/MatrixInterface.js';
40
+ import './ShapeBuilder.js';
41
+ import 'libtess';
42
+ import './GeometryBufferCache.js';
43
+ import '../image/const.js';
44
+ import '../math/trigonometry.js';
45
+ import '../type/p5.Font.js';
46
+ import '../type/textCore.js';
47
+ import '@japont/unicode-range';
48
+ import '../type/unicodeRanges.js';
49
+ import '../type/lib/Typr.js';
50
+ import 'pako';
51
+ import '@davepagurek/bezier-path';
52
+ import 'acorn';
53
+ import 'acorn-walk';
54
+ import 'escodegen';
55
+
56
+ function webgl(p5){
57
+ rendererGL(p5, p5.prototype);
58
+ primitives3D(p5, p5.prototype);
59
+ interaction(p5, p5.prototype);
60
+ light(p5, p5.prototype);
61
+ loading(p5, p5.prototype);
62
+ material(p5, p5.prototype);
63
+ text(p5, p5.prototype);
64
+ renderBuffer(p5, p5.prototype);
65
+ quat(p5, p5.prototype);
66
+ matrix(p5, p5.prototype);
67
+ geometry(p5, p5.prototype);
68
+ camera(p5, p5.prototype);
69
+ framebuffer(p5, p5.prototype);
70
+ dataArray(p5, p5.prototype);
71
+ shader(p5, p5.prototype);
72
+ texture(p5, p5.prototype);
73
+ shadergenerator(p5, p5.prototype);
74
+ }
75
+
76
+ export { webgl as default };
@@ -1,3 +1,6 @@
1
+ import { G as GRID, A as AXES } from '../constants-C-g_eAdC.js';
2
+ import { Vector } from '../math/p5.Vector.js';
3
+
1
4
  /**
2
5
  * @module 3D
3
6
  * @submodule Interaction
@@ -5,8 +8,6 @@
5
8
  * @requires core
6
9
  */
7
10
 
8
- import * as constants from '../core/constants';
9
- import { Vector } from '../math/p5.Vector';
10
11
 
11
12
  function interaction(p5, fn){
12
13
  /**
@@ -702,11 +703,11 @@ function interaction(p5, fn){
702
703
  }
703
704
 
704
705
  // then add new debugMode functions according to the argument list
705
- if (args[0] === constants.GRID) {
706
+ if (args[0] === GRID) {
706
707
  p5.lifecycleHooks.postdraw.push(
707
708
  this._grid(args[1], args[2], args[3], args[4], args[5])
708
709
  );
709
- } else if (args[0] === constants.AXES) {
710
+ } else if (args[0] === AXES) {
710
711
  p5.lifecycleHooks.postdraw.push(
711
712
  this._axesIcon(args[1], args[2], args[3], args[4])
712
713
  );
@@ -886,8 +887,8 @@ function interaction(p5, fn){
886
887
  };
887
888
  }
888
889
 
889
- export default interaction;
890
-
891
890
  if(typeof p5 !== 'undefined'){
892
891
  interaction(p5, p5.prototype);
893
892
  }
893
+
894
+ export { interaction as default };
@@ -0,0 +1,40 @@
1
+ export { l as default } from '../rendering--aAe5aq3.js';
2
+ import '../math/p5.Vector.js';
3
+ import '../creating_reading-D4AAKRbx.js';
4
+ import '../constants-C-g_eAdC.js';
5
+ import '../dom/p5.Element.js';
6
+ import '../dom/p5.File.js';
7
+ import '../io/p5.XML.js';
8
+ import 'colorjs.io/fn';
9
+ import '../color/color_spaces/hsb.js';
10
+ import '../p5.Renderer-CwAYZOC2.js';
11
+ import '../image/filters.js';
12
+ import '../shape/custom_shapes.js';
13
+ import '../core/States.js';
14
+ import '../io/utilities.js';
15
+ import 'file-saver';
16
+ import '../dom/p5.MediaElement.js';
17
+ import '../shape/2d_primitives.js';
18
+ import '../core/helpers.js';
19
+ import '../shape/attributes.js';
20
+ import '../shape/curves.js';
21
+ import '../shape/vertex.js';
22
+ import '../color/setting.js';
23
+ import 'omggif';
24
+ import '../io/csv.js';
25
+ import 'gifenc';
26
+ import '../image/pixels.js';
27
+ import '../core/transform.js';
28
+ import './GeometryBuilder.js';
29
+ import '../math/p5.Matrix.js';
30
+ import '../math/Matrices/Matrix.js';
31
+ import '../math/Matrices/MatrixInterface.js';
32
+ import './p5.Geometry.js';
33
+ import './p5.DataArray.js';
34
+ import './p5.Quat.js';
35
+ import './p5.RenderBuffer.js';
36
+ import './ShapeBuilder.js';
37
+ import 'libtess';
38
+ import './GeometryBufferCache.js';
39
+ import '../image/const.js';
40
+ import '../math/trigonometry.js';
@@ -1,3 +1,44 @@
1
+ import { Geometry } from './p5.Geometry.js';
2
+ import { Vector } from '../math/p5.Vector.js';
3
+ import { a as request } from '../rendering--aAe5aq3.js';
4
+ import '../constants-C-g_eAdC.js';
5
+ import './p5.DataArray.js';
6
+ import '../creating_reading-D4AAKRbx.js';
7
+ import 'colorjs.io/fn';
8
+ import '../color/color_spaces/hsb.js';
9
+ import '../dom/p5.Element.js';
10
+ import '../dom/p5.File.js';
11
+ import '../io/p5.XML.js';
12
+ import '../p5.Renderer-CwAYZOC2.js';
13
+ import '../image/filters.js';
14
+ import '../shape/custom_shapes.js';
15
+ import '../core/States.js';
16
+ import '../io/utilities.js';
17
+ import 'file-saver';
18
+ import '../dom/p5.MediaElement.js';
19
+ import '../shape/2d_primitives.js';
20
+ import '../core/helpers.js';
21
+ import '../shape/attributes.js';
22
+ import '../shape/curves.js';
23
+ import '../shape/vertex.js';
24
+ import '../color/setting.js';
25
+ import 'omggif';
26
+ import '../io/csv.js';
27
+ import 'gifenc';
28
+ import '../image/pixels.js';
29
+ import '../core/transform.js';
30
+ import './GeometryBuilder.js';
31
+ import '../math/p5.Matrix.js';
32
+ import '../math/Matrices/Matrix.js';
33
+ import '../math/Matrices/MatrixInterface.js';
34
+ import './p5.Quat.js';
35
+ import './p5.RenderBuffer.js';
36
+ import './ShapeBuilder.js';
37
+ import 'libtess';
38
+ import './GeometryBufferCache.js';
39
+ import '../image/const.js';
40
+ import '../math/trigonometry.js';
41
+
1
42
  /**
2
43
  * @module Shape
3
44
  * @submodule 3D Models
@@ -6,9 +47,6 @@
6
47
  * @requires p5.Geometry
7
48
  */
8
49
 
9
- import { Geometry } from './p5.Geometry';
10
- import { Vector } from '../math/p5.Vector';
11
- import { request } from '../io/files';
12
50
 
13
51
  async function fileExists(url) {
14
52
  try {
@@ -359,7 +397,7 @@ function loading(p5, fn){
359
397
  if(typeof arguments[arguments.length-2] === 'function'){
360
398
  successCallback = arguments[arguments.length-2];
361
399
  failureCallback = arguments[arguments.length-1];
362
- }else{
400
+ }else {
363
401
  successCallback = arguments[arguments.length-1];
364
402
  }
365
403
  }
@@ -821,9 +859,6 @@ function loading(p5, fn){
821
859
  model.faces.push([3 * face, 3 * face + 1, 3 * face + 2]);
822
860
  model.uvs.push([0, 0], [0, 0], [0, 0]);
823
861
  }
824
- if (hasColors) {
825
- // add support for colors here.
826
- }
827
862
  return model;
828
863
  }
829
864
 
@@ -941,9 +976,7 @@ function loading(p5, fn){
941
976
  break;
942
977
 
943
978
  case 'endfacet':
944
- if (parts[0] === 'endsolid') {
945
- // End of solid
946
- } else if (parts[0] === 'facet' && parts[1] === 'normal') {
979
+ if (parts[0] === 'endsolid') ; else if (parts[0] === 'facet' && parts[1] === 'normal') {
947
980
  // Next face
948
981
  newNormal = new Vector(
949
982
  parseFloat(parts[2]),
@@ -1274,8 +1307,8 @@ function loading(p5, fn){
1274
1307
  };
1275
1308
  }
1276
1309
 
1277
- export default loading;
1278
-
1279
1310
  if(typeof p5 !== 'undefined'){
1280
1311
  loading(p5, p5.prototype);
1281
1312
  }
1313
+
1314
+ export { loading as default };
@@ -0,0 +1,40 @@
1
+ import '../constants-C-g_eAdC.js';
2
+ export { m as default } from '../rendering--aAe5aq3.js';
3
+ import '../creating_reading-D4AAKRbx.js';
4
+ import '../dom/p5.Element.js';
5
+ import '../dom/p5.File.js';
6
+ import '../io/p5.XML.js';
7
+ import 'colorjs.io/fn';
8
+ import '../color/color_spaces/hsb.js';
9
+ import '../p5.Renderer-CwAYZOC2.js';
10
+ import '../image/filters.js';
11
+ import '../math/p5.Vector.js';
12
+ import '../shape/custom_shapes.js';
13
+ import '../core/States.js';
14
+ import '../io/utilities.js';
15
+ import 'file-saver';
16
+ import '../dom/p5.MediaElement.js';
17
+ import '../shape/2d_primitives.js';
18
+ import '../core/helpers.js';
19
+ import '../shape/attributes.js';
20
+ import '../shape/curves.js';
21
+ import '../shape/vertex.js';
22
+ import '../color/setting.js';
23
+ import 'omggif';
24
+ import '../io/csv.js';
25
+ import 'gifenc';
26
+ import '../image/pixels.js';
27
+ import '../core/transform.js';
28
+ import './GeometryBuilder.js';
29
+ import '../math/p5.Matrix.js';
30
+ import '../math/Matrices/Matrix.js';
31
+ import '../math/Matrices/MatrixInterface.js';
32
+ import './p5.Geometry.js';
33
+ import './p5.DataArray.js';
34
+ import './p5.Quat.js';
35
+ import './p5.RenderBuffer.js';
36
+ import './ShapeBuilder.js';
37
+ import 'libtess';
38
+ import './GeometryBufferCache.js';
39
+ import '../image/const.js';
40
+ import '../math/trigonometry.js';
@@ -0,0 +1,40 @@
1
+ import '../math/p5.Matrix.js';
2
+ import '../math/p5.Vector.js';
3
+ import './p5.Quat.js';
4
+ export { C as Camera, c as default } from '../rendering--aAe5aq3.js';
5
+ import '../math/Matrices/Matrix.js';
6
+ import '../constants-C-g_eAdC.js';
7
+ import '../math/Matrices/MatrixInterface.js';
8
+ import '../creating_reading-D4AAKRbx.js';
9
+ import 'colorjs.io/fn';
10
+ import '../color/color_spaces/hsb.js';
11
+ import '../dom/p5.Element.js';
12
+ import '../dom/p5.File.js';
13
+ import '../io/p5.XML.js';
14
+ import '../p5.Renderer-CwAYZOC2.js';
15
+ import '../image/filters.js';
16
+ import '../shape/custom_shapes.js';
17
+ import '../core/States.js';
18
+ import '../io/utilities.js';
19
+ import 'file-saver';
20
+ import '../dom/p5.MediaElement.js';
21
+ import '../shape/2d_primitives.js';
22
+ import '../core/helpers.js';
23
+ import '../shape/attributes.js';
24
+ import '../shape/curves.js';
25
+ import '../shape/vertex.js';
26
+ import '../color/setting.js';
27
+ import 'omggif';
28
+ import '../io/csv.js';
29
+ import 'gifenc';
30
+ import '../image/pixels.js';
31
+ import '../core/transform.js';
32
+ import './GeometryBuilder.js';
33
+ import './p5.Geometry.js';
34
+ import './p5.DataArray.js';
35
+ import './p5.RenderBuffer.js';
36
+ import './ShapeBuilder.js';
37
+ import 'libtess';
38
+ import './GeometryBufferCache.js';
39
+ import '../image/const.js';
40
+ import '../math/trigonometry.js';
@@ -78,8 +78,7 @@ class DataArray {
78
78
  this.data = newData;
79
79
  }
80
80
  }
81
- };
82
-
81
+ }
83
82
  function dataArray(p5, fn){
84
83
  /**
85
84
  * An internal class to store data that will be sent to a p5.RenderBuffer.
@@ -109,9 +108,8 @@ function dataArray(p5, fn){
109
108
  p5.DataArray = DataArray;
110
109
  }
111
110
 
112
- export default dataArray;
113
- export { DataArray }
114
-
115
111
  if(typeof p5 !== 'undefined'){
116
112
  dataArray(p5, p5.prototype);
117
113
  }
114
+
115
+ export { DataArray, dataArray as default };
@@ -0,0 +1,40 @@
1
+ import '../constants-C-g_eAdC.js';
2
+ import '../creating_reading-D4AAKRbx.js';
3
+ export { H as Framebuffer, E as FramebufferCamera, F as FramebufferTexture, f as default } from '../rendering--aAe5aq3.js';
4
+ import '../p5.Renderer-CwAYZOC2.js';
5
+ import 'colorjs.io/fn';
6
+ import '../color/color_spaces/hsb.js';
7
+ import '../dom/p5.Element.js';
8
+ import '../dom/p5.File.js';
9
+ import '../io/p5.XML.js';
10
+ import '../dom/p5.MediaElement.js';
11
+ import '../shape/2d_primitives.js';
12
+ import '../core/helpers.js';
13
+ import '../shape/attributes.js';
14
+ import '../shape/curves.js';
15
+ import '../shape/vertex.js';
16
+ import '../color/setting.js';
17
+ import 'omggif';
18
+ import '../io/csv.js';
19
+ import '../io/utilities.js';
20
+ import 'file-saver';
21
+ import 'gifenc';
22
+ import '../image/pixels.js';
23
+ import '../image/filters.js';
24
+ import '../core/transform.js';
25
+ import './GeometryBuilder.js';
26
+ import '../math/p5.Matrix.js';
27
+ import '../math/Matrices/Matrix.js';
28
+ import '../math/p5.Vector.js';
29
+ import '../math/Matrices/MatrixInterface.js';
30
+ import './p5.Geometry.js';
31
+ import './p5.DataArray.js';
32
+ import './p5.Quat.js';
33
+ import './p5.RenderBuffer.js';
34
+ import './ShapeBuilder.js';
35
+ import 'libtess';
36
+ import './GeometryBufferCache.js';
37
+ import '../image/const.js';
38
+ import '../shape/custom_shapes.js';
39
+ import '../math/trigonometry.js';
40
+ import '../core/States.js';
@@ -1,3 +1,7 @@
1
+ import { F as FLAT, y as SMOOTH } from '../constants-C-g_eAdC.js';
2
+ import { DataArray } from './p5.DataArray.js';
3
+ import { Vector } from '../math/p5.Vector.js';
4
+
1
5
  /**
2
6
  * @module Shape
3
7
  * @submodule 3D Primitives
@@ -6,11 +10,6 @@
6
10
  * @requires p5.Geometry
7
11
  */
8
12
 
9
- //some of the functions are adjusted from Three.js(http://threejs.org)
10
-
11
- import * as constants from '../core/constants';
12
- import { DataArray } from './p5.DataArray';
13
- import { Vector } from '../math/p5.Vector';
14
13
 
15
14
  class Geometry {
16
15
  constructor(detailX, detailY, callback, renderer) {
@@ -1196,13 +1195,13 @@ class Geometry {
1196
1195
  * </code>
1197
1196
  * </div>
1198
1197
  */
1199
- computeNormals(shadingType = constants.FLAT, { roundToPrecision = 3 } = {}) {
1198
+ computeNormals(shadingType = FLAT, { roundToPrecision = 3 } = {}) {
1200
1199
  const vertexNormals = this.vertexNormals;
1201
1200
  let vertices = this.vertices;
1202
1201
  const faces = this.faces;
1203
1202
  let iv;
1204
1203
 
1205
- if (shadingType === constants.SMOOTH) {
1204
+ if (shadingType === SMOOTH) {
1206
1205
  const vertexIndices = {};
1207
1206
  const uniqueVertices = [];
1208
1207
 
@@ -1848,7 +1847,7 @@ class Geometry {
1848
1847
  prop = this.userVertexProperties[propertyName];
1849
1848
  if (size){
1850
1849
  prop.pushDirect(data);
1851
- } else{
1850
+ } else {
1852
1851
  prop.setCurrentData(data);
1853
1852
  prop.pushCurrentData();
1854
1853
  }
@@ -1887,7 +1886,7 @@ class Geometry {
1887
1886
  },
1888
1887
  //Setters
1889
1888
  setCurrentData(data) {
1890
- const size = data.length ? data.length : 1;
1889
+ data.length ? data.length : 1;
1891
1890
  // if (size != this.getDataSize()){
1892
1891
  // p5._friendlyError(`Custom vertex property '${this.name}' has been set with various data sizes. You can change it's name, or if it was an accident, set '${this.name}' to have the same number of inputs each time!`, 'vertexProperty()');
1893
1892
  // }
@@ -1901,7 +1900,7 @@ class Geometry {
1901
1900
  pushDirect(data) {
1902
1901
  if (data.length){
1903
1902
  this.getSrcArray().push(...data);
1904
- } else{
1903
+ } else {
1905
1904
  this.getSrcArray().push(data);
1906
1905
  }
1907
1906
  },
@@ -1917,8 +1916,7 @@ class Geometry {
1917
1916
  this[prop.getSrcName()] = [];
1918
1917
  return this.userVertexProperties[propertyName];
1919
1918
  }
1920
- };
1921
-
1919
+ }
1922
1920
  /**
1923
1921
  * Keeps track of how many custom geometry objects have been made so that each
1924
1922
  * can be assigned a unique ID.
@@ -2551,9 +2549,8 @@ function geometry(p5, fn){
2551
2549
  */
2552
2550
  }
2553
2551
 
2554
- export default geometry;
2555
- export { Geometry };
2556
-
2557
2552
  if(typeof p5 !== 'undefined'){
2558
2553
  geometry(p5, p5.prototype);
2559
2554
  }
2555
+
2556
+ export { Geometry, geometry as default };
@@ -1,9 +1,11 @@
1
+ import { Vector } from '../math/p5.Vector.js';
2
+ import '../constants-C-g_eAdC.js';
3
+
1
4
  /**
2
5
  * @module Math
3
6
  * @submodule Quaternion
4
7
  */
5
8
 
6
- import { Vector } from '../math/p5.Vector';
7
9
 
8
10
  class Quat {
9
11
  constructor(w, x, y, z) {
@@ -96,9 +98,8 @@ function quat(p5, fn){
96
98
  p5.Quat = Quat;
97
99
  }
98
100
 
99
- export default quat;
100
- export { Quat };
101
-
102
101
  if(typeof p5 !== 'undefined'){
103
102
  quat(p5, p5.prototype);
104
103
  }
104
+
105
+ export { Quat, quat as default };
@@ -67,9 +67,8 @@ function renderBuffer(p5, fn) {
67
67
  p5.RenderBuffer = RenderBuffer;
68
68
  }
69
69
 
70
- export default renderBuffer;
71
- export { RenderBuffer };
72
-
73
70
  if (typeof p5 !== "undefined") {
74
71
  renderBuffer(p5, p5.prototype);
75
72
  }
73
+
74
+ export { RenderBuffer, renderBuffer as default };
@@ -0,0 +1,40 @@
1
+ import '../constants-C-g_eAdC.js';
2
+ import './GeometryBuilder.js';
3
+ import '../p5.Renderer-CwAYZOC2.js';
4
+ import '../math/p5.Matrix.js';
5
+ export { R as RendererGL, r as default, B as readPixelWebGL, A as readPixelsWebGL } from '../rendering--aAe5aq3.js';
6
+ import '../math/p5.Vector.js';
7
+ import './p5.RenderBuffer.js';
8
+ import './p5.DataArray.js';
9
+ import '../dom/p5.Element.js';
10
+ import './ShapeBuilder.js';
11
+ import './GeometryBufferCache.js';
12
+ import '../image/const.js';
13
+ import '../shape/custom_shapes.js';
14
+ import '../creating_reading-D4AAKRbx.js';
15
+ import '../math/Matrices/Matrix.js';
16
+ import './p5.Geometry.js';
17
+ import '../math/Matrices/MatrixInterface.js';
18
+ import '../image/filters.js';
19
+ import '../core/States.js';
20
+ import '../io/utilities.js';
21
+ import 'file-saver';
22
+ import '../dom/p5.MediaElement.js';
23
+ import '../dom/p5.File.js';
24
+ import '../io/p5.XML.js';
25
+ import 'colorjs.io/fn';
26
+ import '../color/color_spaces/hsb.js';
27
+ import '../shape/2d_primitives.js';
28
+ import '../core/helpers.js';
29
+ import '../shape/attributes.js';
30
+ import '../shape/curves.js';
31
+ import '../shape/vertex.js';
32
+ import '../color/setting.js';
33
+ import 'omggif';
34
+ import '../io/csv.js';
35
+ import 'gifenc';
36
+ import '../image/pixels.js';
37
+ import '../core/transform.js';
38
+ import './p5.Quat.js';
39
+ import '../math/trigonometry.js';
40
+ import 'libtess';
@@ -0,0 +1,40 @@
1
+ export { S as Shader, s as default } from '../rendering--aAe5aq3.js';
2
+ import '../constants-C-g_eAdC.js';
3
+ import '../creating_reading-D4AAKRbx.js';
4
+ import 'colorjs.io/fn';
5
+ import '../color/color_spaces/hsb.js';
6
+ import '../dom/p5.Element.js';
7
+ import '../dom/p5.File.js';
8
+ import '../io/p5.XML.js';
9
+ import '../p5.Renderer-CwAYZOC2.js';
10
+ import '../image/filters.js';
11
+ import '../math/p5.Vector.js';
12
+ import '../shape/custom_shapes.js';
13
+ import '../core/States.js';
14
+ import '../io/utilities.js';
15
+ import 'file-saver';
16
+ import '../dom/p5.MediaElement.js';
17
+ import '../shape/2d_primitives.js';
18
+ import '../core/helpers.js';
19
+ import '../shape/attributes.js';
20
+ import '../shape/curves.js';
21
+ import '../shape/vertex.js';
22
+ import '../color/setting.js';
23
+ import 'omggif';
24
+ import '../io/csv.js';
25
+ import 'gifenc';
26
+ import '../image/pixels.js';
27
+ import '../core/transform.js';
28
+ import './GeometryBuilder.js';
29
+ import '../math/p5.Matrix.js';
30
+ import '../math/Matrices/Matrix.js';
31
+ import '../math/Matrices/MatrixInterface.js';
32
+ import './p5.Geometry.js';
33
+ import './p5.DataArray.js';
34
+ import './p5.Quat.js';
35
+ import './p5.RenderBuffer.js';
36
+ import './ShapeBuilder.js';
37
+ import 'libtess';
38
+ import './GeometryBufferCache.js';
39
+ import '../image/const.js';
40
+ import '../math/trigonometry.js';
@@ -0,0 +1,40 @@
1
+ import '../constants-C-g_eAdC.js';
2
+ import '../dom/p5.Element.js';
3
+ import '../p5.Renderer-CwAYZOC2.js';
4
+ import '../dom/p5.MediaElement.js';
5
+ export { M as MipmapTexture, T as Texture, D as checkWebGLCapabilities, t as default } from '../rendering--aAe5aq3.js';
6
+ import '../dom/p5.File.js';
7
+ import '../io/p5.XML.js';
8
+ import '../creating_reading-D4AAKRbx.js';
9
+ import 'colorjs.io/fn';
10
+ import '../color/color_spaces/hsb.js';
11
+ import '../image/filters.js';
12
+ import '../math/p5.Vector.js';
13
+ import '../shape/custom_shapes.js';
14
+ import '../core/States.js';
15
+ import '../io/utilities.js';
16
+ import 'file-saver';
17
+ import '../shape/2d_primitives.js';
18
+ import '../core/helpers.js';
19
+ import '../shape/attributes.js';
20
+ import '../shape/curves.js';
21
+ import '../shape/vertex.js';
22
+ import '../color/setting.js';
23
+ import 'omggif';
24
+ import '../io/csv.js';
25
+ import 'gifenc';
26
+ import '../image/pixels.js';
27
+ import '../core/transform.js';
28
+ import './GeometryBuilder.js';
29
+ import '../math/p5.Matrix.js';
30
+ import '../math/Matrices/Matrix.js';
31
+ import '../math/Matrices/MatrixInterface.js';
32
+ import './p5.Geometry.js';
33
+ import './p5.DataArray.js';
34
+ import './p5.Quat.js';
35
+ import './p5.RenderBuffer.js';
36
+ import './ShapeBuilder.js';
37
+ import 'libtess';
38
+ import './GeometryBufferCache.js';
39
+ import '../image/const.js';
40
+ import '../math/trigonometry.js';