q5 2.10.7 → 2.10.8

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 (69) hide show
  1. package/deno.json +35 -0
  2. package/package.json +3 -6
  3. package/q5-deno-server.js +38 -0
  4. package/q5-server.js +3 -3
  5. package/q5.js +14 -8
  6. package/q5.min.js +1 -1
  7. package/src/q5-canvas.js +14 -8
  8. package/test/core.test.js +33 -0
  9. package/test/readme.md +5 -0
  10. package/.vscode/launch.json +0 -26
  11. package/.vscode/settings.json +0 -3
  12. package/bun.lockb +0 -0
  13. package/p5-tests/js/chai_helpers.js +0 -20
  14. package/p5-tests/js/mocha_setup.js +0 -2
  15. package/p5-tests/js/modernizr.js +0 -5
  16. package/p5-tests/js/p5_helpers.js +0 -135
  17. package/p5-tests/js/sinon.js +0 -5949
  18. package/p5-tests/mocha.css +0 -289
  19. package/p5-tests/test.html +0 -71
  20. package/p5-tests/unit/color/color_conversion.js +0 -68
  21. package/p5-tests/unit/color/creating_reading.js +0 -217
  22. package/p5-tests/unit/color/p5.Color.js +0 -1000
  23. package/p5-tests/unit/color/setting.js +0 -289
  24. package/p5-tests/unit/core/2d_primitives.js +0 -490
  25. package/p5-tests/unit/core/attributes.js +0 -115
  26. package/p5-tests/unit/core/curves.js +0 -139
  27. package/p5-tests/unit/core/environment.js +0 -248
  28. package/p5-tests/unit/core/error_helpers.js +0 -1158
  29. package/p5-tests/unit/core/main.js +0 -340
  30. package/p5-tests/unit/core/p5.Element.js +0 -773
  31. package/p5-tests/unit/core/p5.Graphics.js +0 -179
  32. package/p5-tests/unit/core/preload.js +0 -285
  33. package/p5-tests/unit/core/rendering.js +0 -116
  34. package/p5-tests/unit/core/structure.js +0 -293
  35. package/p5-tests/unit/core/transform.js +0 -144
  36. package/p5-tests/unit/core/version.js +0 -28
  37. package/p5-tests/unit/core/vertex.js +0 -137
  38. package/p5-tests/unit/dom/dom.js +0 -2146
  39. package/p5-tests/unit/events/acceleration.js +0 -213
  40. package/p5-tests/unit/events/keyboard.js +0 -179
  41. package/p5-tests/unit/events/mouse.js +0 -487
  42. package/p5-tests/unit/events/touch.js +0 -180
  43. package/p5-tests/unit/image/downloading.js +0 -379
  44. package/p5-tests/unit/image/filters.js +0 -92
  45. package/p5-tests/unit/image/loading.js +0 -413
  46. package/p5-tests/unit/image/p5.Image.js +0 -201
  47. package/p5-tests/unit/image/pixels.js +0 -234
  48. package/p5-tests/unit/io/files.js +0 -378
  49. package/p5-tests/unit/io/loadBytes.js +0 -149
  50. package/p5-tests/unit/io/loadImage.js +0 -123
  51. package/p5-tests/unit/io/loadJSON.js +0 -185
  52. package/p5-tests/unit/io/loadModel.js +0 -215
  53. package/p5-tests/unit/io/loadShader.js +0 -176
  54. package/p5-tests/unit/io/loadStrings.js +0 -140
  55. package/p5-tests/unit/io/loadTable.js +0 -183
  56. package/p5-tests/unit/io/loadXML.js +0 -127
  57. package/p5-tests/unit/io/saveModel.js +0 -113
  58. package/p5-tests/unit/io/saveTable.js +0 -142
  59. package/p5-tests/unit/math/calculation.js +0 -452
  60. package/p5-tests/unit/math/noise.js +0 -66
  61. package/p5-tests/unit/math/p5.Vector.js +0 -1886
  62. package/p5-tests/unit/math/random.js +0 -177
  63. package/p5-tests/unit/math/trigonometry.js +0 -144
  64. package/p5-tests/unit/spec.js +0 -50
  65. package/p5-tests/unit/typography/attributes.js +0 -120
  66. package/p5-tests/unit/typography/loadFont.js +0 -162
  67. package/p5-tests/unit/typography/p5.Font.js +0 -63
  68. package/p5-tests/unit/utilities/conversion.js +0 -329
  69. package/p5-tests/unit/utilities/time_date.js +0 -133
@@ -1,66 +0,0 @@
1
- suite('Noise', function() {
2
- var myp5;
3
-
4
- setup(function(done) {
5
- new p5(function(p) {
6
- p.setup = function() {
7
- myp5 = p;
8
- done();
9
- };
10
- });
11
- });
12
-
13
- teardown(function() {
14
- myp5.remove();
15
- });
16
-
17
- // This could use some better testing!
18
- // Just checking that we get an actual number now
19
- // 1D noise only
20
- // ALso need test for noiseSeed and noiseDetail
21
- var result;
22
- var results = [];
23
-
24
- suite('p5.prototype.noise', function() {
25
- setup(function() {
26
- result = myp5.noise(0);
27
- });
28
- test('should return a number', function() {
29
- assert.typeOf(result, 'number');
30
- });
31
- test('should return a number 0 < n < 1', function() {
32
- assert.isTrue(result > 0);
33
- assert.isTrue(result < 1);
34
- });
35
- });
36
-
37
- // Test for noiseSeed
38
- suite('p5.prototype.noiseSeed', function() {
39
- setup(function() {
40
- myp5.noiseSeed(99);
41
- var t = 0;
42
- for (var i = 0; i < 5; i++) {
43
- results[i] = myp5.noise(t);
44
- t += 0.01;
45
- }
46
- myp5.noiseSeed(99);
47
- t = 0;
48
- for (i = 5; i < 10; i++) {
49
- results[i] = myp5.noise(t);
50
- t += 0.01;
51
- }
52
- });
53
- test('should return a number 0 < n < 1', function() {
54
- for (var i = 0; i < results.length; i++) {
55
- assert.typeOf(results[i], 'number');
56
- assert.isTrue(results[i] > 0);
57
- assert.isTrue(results[i] < 1);
58
- }
59
- });
60
- test('should return same sequence of numbers', function() {
61
- for (var i = 0; i < 5; i++) {
62
- assert.isTrue(results[i] === results[i + 5]);
63
- }
64
- });
65
- });
66
- });