@tsparticles/plugin-sounds 4.0.0-beta.0 → 4.0.0-beta.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.
Files changed (41) hide show
  1. package/4.min.js +1 -0
  2. package/{30.min.js → 414.min.js} +2 -2
  3. package/browser/SoundsPlugin.js +1 -0
  4. package/browser/SoundsPluginInstance.js +2 -2
  5. package/browser/index.js +4 -3
  6. package/cjs/SoundsPlugin.js +1 -0
  7. package/cjs/SoundsPluginInstance.js +2 -2
  8. package/cjs/index.js +4 -3
  9. package/dist_browser_SoundsPluginInstance_js.js +2 -2
  10. package/dist_browser_SoundsPlugin_js.js +2 -2
  11. package/esm/SoundsPlugin.js +1 -0
  12. package/esm/SoundsPluginInstance.js +2 -2
  13. package/esm/index.js +4 -3
  14. package/package.json +4 -5
  15. package/report.html +84 -29
  16. package/tsparticles.plugin.sounds.js +2 -2
  17. package/tsparticles.plugin.sounds.min.js +2 -2
  18. package/915.min.js +0 -1
  19. package/umd/Options/Classes/Sounds.js +0 -54
  20. package/umd/Options/Classes/SoundsAudio.js +0 -39
  21. package/umd/Options/Classes/SoundsEvent.js +0 -75
  22. package/umd/Options/Classes/SoundsIcon.js +0 -44
  23. package/umd/Options/Classes/SoundsIcons.js +0 -78
  24. package/umd/Options/Classes/SoundsMelody.js +0 -48
  25. package/umd/Options/Classes/SoundsNote.js +0 -34
  26. package/umd/Options/Classes/SoundsVolume.js +0 -49
  27. package/umd/Options/Interfaces/ISounds.js +0 -12
  28. package/umd/Options/Interfaces/ISoundsAudio.js +0 -12
  29. package/umd/Options/Interfaces/ISoundsEvent.js +0 -12
  30. package/umd/Options/Interfaces/ISoundsIcon.js +0 -12
  31. package/umd/Options/Interfaces/ISoundsIcons.js +0 -12
  32. package/umd/Options/Interfaces/ISoundsMelody.js +0 -12
  33. package/umd/Options/Interfaces/ISoundsNote.js +0 -12
  34. package/umd/Options/Interfaces/ISoundsVolume.js +0 -12
  35. package/umd/SoundsPlugin.js +0 -86
  36. package/umd/SoundsPluginInstance.js +0 -451
  37. package/umd/constants.js +0 -14
  38. package/umd/enums.js +0 -23
  39. package/umd/index.js +0 -54
  40. package/umd/types.js +0 -12
  41. package/umd/utils.js +0 -48
package/umd/utils.js DELETED
@@ -1,48 +0,0 @@
1
- (function (factory) {
2
- if (typeof module === "object" && typeof module.exports === "object") {
3
- var v = factory(require, exports);
4
- if (v !== undefined) module.exports = v;
5
- }
6
- else if (typeof define === "function" && define.amd) {
7
- define(["require", "exports"], factory);
8
- }
9
- })(function (require, exports) {
10
- "use strict";
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.unmuteWindow = exports.isWindowMuted = void 0;
13
- exports.getNoteFrequency = getNoteFrequency;
14
- const notes = new Map();
15
- notes.set("C", [16.35, 32.7, 65.41, 130.81, 261.63, 523.25, 1046.5, 2093.0, 4186.01]);
16
- notes.set("Db", [17.32, 34.65, 69.3, 138.59, 277.18, 554.37, 1108.73, 2217.46, 4434.92]);
17
- notes.set("D", [18.35, 36.71, 73.42, 146.83, 293.66, 587.33, 1174.66, 2349.32, 4698.63]);
18
- notes.set("Eb", [19.45, 38.89, 77.78, 155.56, 311.13, 622.25, 1244.51, 2489.02, 4978.03]);
19
- notes.set("E", [20.6, 41.2, 82.41, 164.81, 329.63, 659.25, 1318.51, 2637.02, 5274.04]);
20
- notes.set("F", [21.83, 43.65, 87.31, 174.61, 349.23, 698.46, 1396.91, 2793.83, 5587.65]);
21
- notes.set("Gb", [23.12, 46.25, 92.5, 185.0, 369.99, 739.99, 1479.98, 2959.96, 5919.91]);
22
- notes.set("G", [24.5, 49.0, 98.0, 196.0, 392.0, 783.99, 1567.98, 3135.96, 6271.93]);
23
- notes.set("Ab", [25.96, 51.91, 103.83, 207.65, 415.3, 830.61, 1661.22, 3322.44, 6644.88]);
24
- notes.set("A", [27.5, 55.0, 110.0, 220.0, 440.0, 880.0, 1760.0, 3520.0, 7040.0]);
25
- notes.set("Bb", [29.14, 58.27, 116.54, 233.08, 466.16, 932.33, 1864.66, 3729.31, 7458.62]);
26
- notes.set("B", [30.87, 61.74, 123.47, 246.94, 493.88, 987.77, 1975.53, 3951.07, 7902.13]);
27
- notes.set("pause", [0]);
28
- function getNoteFrequency(note) {
29
- const regex = /(([A-G]b?)(\d))|pause/i, result = regex.exec(note), groupKey = 2, defaultMatchKey = 0, innerGroupKey = 3;
30
- if (!result?.length) {
31
- return;
32
- }
33
- const noteKey = result[groupKey] ?? result[defaultMatchKey], noteItem = notes.get(noteKey);
34
- if (!noteItem) {
35
- return;
36
- }
37
- return noteItem[parseInt(result[innerGroupKey] ?? "0")];
38
- }
39
- let muted = true;
40
- const isWindowMuted = () => {
41
- return muted;
42
- };
43
- exports.isWindowMuted = isWindowMuted;
44
- const unmuteWindow = () => {
45
- muted = false;
46
- };
47
- exports.unmuteWindow = unmuteWindow;
48
- });