@tsparticles/plugin-sounds 4.0.0-beta.1 → 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.
- package/414.min.js +2 -2
- package/browser/SoundsPlugin.js +1 -0
- package/browser/index.js +2 -1
- package/cjs/SoundsPlugin.js +1 -0
- package/cjs/index.js +2 -1
- package/dist_browser_SoundsPluginInstance_js.js +1 -1
- package/dist_browser_SoundsPlugin_js.js +2 -2
- package/esm/SoundsPlugin.js +1 -0
- package/esm/index.js +2 -1
- package/package.json +3 -4
- package/report.html +1 -1
- package/tsparticles.plugin.sounds.js +2 -2
- package/tsparticles.plugin.sounds.min.js +1 -1
- package/umd/Options/Classes/Sounds.js +0 -54
- package/umd/Options/Classes/SoundsAudio.js +0 -39
- package/umd/Options/Classes/SoundsEvent.js +0 -75
- package/umd/Options/Classes/SoundsIcon.js +0 -44
- package/umd/Options/Classes/SoundsIcons.js +0 -78
- package/umd/Options/Classes/SoundsMelody.js +0 -48
- package/umd/Options/Classes/SoundsNote.js +0 -34
- package/umd/Options/Classes/SoundsVolume.js +0 -49
- package/umd/Options/Interfaces/ISounds.js +0 -12
- package/umd/Options/Interfaces/ISoundsAudio.js +0 -12
- package/umd/Options/Interfaces/ISoundsEvent.js +0 -12
- package/umd/Options/Interfaces/ISoundsIcon.js +0 -12
- package/umd/Options/Interfaces/ISoundsIcons.js +0 -12
- package/umd/Options/Interfaces/ISoundsMelody.js +0 -12
- package/umd/Options/Interfaces/ISoundsNote.js +0 -12
- package/umd/Options/Interfaces/ISoundsVolume.js +0 -12
- package/umd/SoundsPlugin.js +0 -86
- package/umd/SoundsPluginInstance.js +0 -451
- package/umd/constants.js +0 -14
- package/umd/enums.js +0 -23
- package/umd/index.js +0 -54
- package/umd/types.js +0 -12
- package/umd/utils.js +0 -48
package/414.min.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(this.webpackChunk_tsparticles_plugin_sounds=this.webpackChunk_tsparticles_plugin_sounds||[]).push([[414],{414(e,t,s){s.d(t,{SoundsPlugin:()=>m});var i=s(
|
|
1
|
+
"use strict";(this.webpackChunk_tsparticles_plugin_sounds=this.webpackChunk_tsparticles_plugin_sounds||[]).push([[414],{414(e,t,s){s.d(t,{SoundsPlugin:()=>m});var i=s(303),l=s(699);class o{loop;source;constructor(){this.loop=!1,this.source=""}load(e){(0,i.isNull)(e)||((0,i.isObject)(e)?(void 0!==e.loop&&(this.loop=e.loop),void 0!==e.source&&(this.source=e.source)):this.source=e)}}class n{duration;value;constructor(){this.duration=500,this.value=[]}load(e){(0,i.isNull)(e)||(void 0!==e.duration&&(this.duration=e.duration),void 0!==e.value&&(this.value=e.value))}}class a{loop;melodies;notes;constructor(){this.loop=!1,this.melodies=[],this.notes=[]}load(e){(0,i.isNull)(e)||(void 0!==e.loop&&(this.loop=e.loop),void 0!==e.melodies&&(this.melodies=e.melodies.map(e=>{let t=new a;return t.load(e),t})),void 0!==e.notes&&(this.notes=e.notes.map(e=>{let t=new n;return t.load(e),t})))}}class c{audio;event;filter;melodies;notes;constructor(){this.event=[],this.notes=[]}load(e){if(!(0,i.isNull)(e)&&(void 0!==e.event&&(this.event=e.event),void 0!==e.audio&&((0,i.isArray)(e.audio)?this.audio=e.audio.map(e=>{let t=new o;return t.load(e),t}):(this.audio=new o,this.audio.load(e.audio))),void 0!==e.notes&&(this.notes=e.notes.map(e=>{let t=new n;return t.load(e),t})),void 0!==e.melodies&&(this.melodies=e.melodies.map(e=>{let t=new a;return t.load(e),t})),e.filter))if((0,i.isString)(e.filter)){let t=globalThis[e.filter];(0,i.isFunction)(t)&&(this.filter=t)}else this.filter=e.filter}}class h{height;path;style;svg;width;constructor(){this.width=24,this.height=24,this.style=""}load(e){(0,i.isNull)(e)||(void 0!==e.path&&(this.path=e.path),void 0!==e.svg&&(this.svg=e.svg),void 0!==e.width&&(this.width=e.width),void 0!==e.height&&(this.height=e.height))}}class u{enable;mute;unmute;volumeDown;volumeUp;constructor(){this.mute=new h,this.unmute=new h,this.volumeDown=new h,this.volumeUp=new h,this.enable=!1,this.mute.svg=`<?xml version="1.0"?>
|
|
2
2
|
<svg baseProfile="tiny" height="24px" version="1.2" viewBox="0 0 24 24" width="24px"
|
|
3
3
|
xml:space="preserve" xmlns="http://www.w3.org/2000/svg"
|
|
4
4
|
xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
@@ -30,4 +30,4 @@
|
|
|
30
30
|
<path fill="#fff" d="M20.706,6.292c-0.391-0.389-1.023-0.39-1.414,0.002c-0.39,0.391-0.39,1.024,0.002,1.414c1.412,1.409,2.191,3.285,2.192,5.284c0.002,2.002-0.777,3.885-2.193,5.301c-0.391,0.391-0.391,1.023,0,1.414C19.488,19.902,19.744,20,20,20s0.512-0.098,0.707-0.293c1.794-1.794,2.781-4.18,2.779-6.717C23.485,10.457,22.497,8.078,20.706,6.292z"/>
|
|
31
31
|
<path fill="#fff" d="M12.138,5.824c-0.449,0-0.905,0.152-1.356,0.453L8.109,8.059C7.357,8.561,5.904,9,5,9c-1.654,0-3,1.346-3,3v2c0,1.654,1.346,3,3,3c0.904,0,2.357,0.439,3.109,0.941l2.672,1.781c0.451,0.301,0.907,0.453,1.356,0.453C13.035,20.176,14,19.495,14,18V8C14,6.505,13.035,5.824,12.138,5.824z M5,15c-0.552,0-1-0.448-1-1v-2c0-0.552,0.448-1,1-1c1.211,0,2.907-0.495,4-1.146v6.293C7.907,15.495,6.211,15,5,15z M12,18c0,0.046-0.002,0.086-0.006,0.12c-0.03-0.016-0.065-0.036-0.104-0.062L10,16.798V9.202l1.891-1.261c0.038-0.025,0.073-0.046,0.104-0.062C11.998,7.914,12,7.954,12,8V18z"/>
|
|
32
32
|
</g>
|
|
33
|
-
</svg>`}load(e){(0,
|
|
33
|
+
</svg>`}load(e){(0,i.isNull)(e)||(void 0!==e.enable&&(this.enable=e.enable),this.mute.load(e.mute),this.unmute.load(e.unmute),this.volumeDown.load(e.volumeDown),this.volumeUp.load(e.volumeUp))}}class v{max;min;step;value;constructor(){this.value=100,this.max=100,this.min=0,this.step=10}load(e){(0,i.isNull)(e)||((0,i.isObject)(e)?(void 0!==e.max&&(this.max=e.max),void 0!==e.min&&(this.min=e.min),void 0!==e.step&&(this.step=e.step),void 0!==e.value&&(this.value=e.value)):this.value=e)}}class d{autoPlay;enable;events;icons;volume;constructor(){this.autoPlay=!0,this.enable=!1,this.events=[],this.icons=new u,this.volume=new v}load(e){(0,i.isNull)(e)||(void 0!==e.autoPlay&&(this.autoPlay=e.autoPlay),void 0!==e.enable&&(this.enable=e.enable),void 0!==e.events&&(this.events=e.events.map(e=>{let t=new c;return t.load(e),t})),this.icons.load(e.icons),void 0!==e.volume&&this.volume.load(e.volume))}}var r=s(763);let p=()=>{removeEventListener(l.m,p),removeEventListener(l.s,p),(0,r.XK)()};class m{id="sounds";_engine;constructor(e){this._engine=e;const t={capture:!0,once:!0};addEventListener(l.m,p,t),addEventListener(l.s,p,t)}async getPlugin(e){let{SoundsPluginInstance:t}=await s.e(4).then(s.bind(s,4));return new t(e,this._engine)}loadOptions(e,t,s){if(!this.needsPlugin(t)&&!this.needsPlugin(s))return;let i=t.sounds;i?.load===void 0&&(t.sounds=i=new d),i.load(s?.sounds)}needsPlugin(e){return e?.sounds?.enable??!1}}},699(e,t,s){s.d(t,{m:()=>i,s:()=>l});let i="pointerdown",l="touchstart"},763(e,t,s){s.d(t,{E3:()=>n,XK:()=>a,jE:()=>l});let i=new Map;function l(e){let t=/(([A-G]b?)(\d))|pause/i.exec(e);if(!t?.length)return;let s=t[2]??t[0],l=i.get(s);if(l)return l[parseInt(t[3]??"0")]}i.set("C",[16.35,32.7,65.41,130.81,261.63,523.25,1046.5,2093,4186.01]),i.set("Db",[17.32,34.65,69.3,138.59,277.18,554.37,1108.73,2217.46,4434.92]),i.set("D",[18.35,36.71,73.42,146.83,293.66,587.33,1174.66,2349.32,4698.63]),i.set("Eb",[19.45,38.89,77.78,155.56,311.13,622.25,1244.51,2489.02,4978.03]),i.set("E",[20.6,41.2,82.41,164.81,329.63,659.25,1318.51,2637.02,5274.04]),i.set("F",[21.83,43.65,87.31,174.61,349.23,698.46,1396.91,2793.83,5587.65]),i.set("Gb",[23.12,46.25,92.5,185,369.99,739.99,1479.98,2959.96,5919.91]),i.set("G",[24.5,49,98,196,392,783.99,1567.98,3135.96,6271.93]),i.set("Ab",[25.96,51.91,103.83,207.65,415.3,830.61,1661.22,3322.44,6644.88]),i.set("A",[27.5,55,110,220,440,880,1760,3520,7040]),i.set("Bb",[29.14,58.27,116.54,233.08,466.16,932.33,1864.66,3729.31,7458.62]),i.set("B",[30.87,61.74,123.47,246.94,493.88,987.77,1975.53,3951.07,7902.13]),i.set("pause",[0]);let o=!0,n=()=>o,a=()=>{o=!1}}}]);
|
package/browser/SoundsPlugin.js
CHANGED
package/browser/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import {} from "@tsparticles/engine";
|
|
1
2
|
export async function loadSoundsPlugin(engine) {
|
|
2
|
-
engine.checkVersion("4.0.0-beta.
|
|
3
|
+
engine.checkVersion("4.0.0-beta.2");
|
|
3
4
|
await engine.pluginManager.register(async (e) => {
|
|
4
5
|
const { SoundsPlugin } = await import("./SoundsPlugin.js");
|
|
5
6
|
e.pluginManager.addPlugin(new SoundsPlugin(e));
|
package/cjs/SoundsPlugin.js
CHANGED
package/cjs/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import {} from "@tsparticles/engine";
|
|
1
2
|
export async function loadSoundsPlugin(engine) {
|
|
2
|
-
engine.checkVersion("4.0.0-beta.
|
|
3
|
+
engine.checkVersion("4.0.0-beta.2");
|
|
3
4
|
await engine.pluginManager.register(async (e) => {
|
|
4
5
|
const { SoundsPlugin } = await import("./SoundsPlugin.js");
|
|
5
6
|
e.pluginManager.addPlugin(new SoundsPlugin(e));
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Demo / Generator : https://particles.js.org/
|
|
5
5
|
* GitHub : https://www.github.com/matteobruni/tsparticles
|
|
6
6
|
* How to use? : Check the GitHub README
|
|
7
|
-
* v4.0.0-beta.
|
|
7
|
+
* v4.0.0-beta.2
|
|
8
8
|
*/
|
|
9
9
|
"use strict";
|
|
10
10
|
/*
|
|
@@ -103,7 +103,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
103
103
|
\**************************************/
|
|
104
104
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
105
105
|
|
|
106
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ SoundsPlugin: () => (/* binding */ SoundsPlugin)\n/* harmony export */ });\n/* harmony import */ var
|
|
106
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ SoundsPlugin: () => (/* binding */ SoundsPlugin)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constants.js */ \"./dist/browser/constants.js\");\n/* harmony import */ var _Options_Classes_Sounds_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Options/Classes/Sounds.js */ \"./dist/browser/Options/Classes/Sounds.js\");\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils.js */ \"./dist/browser/utils.js\");\n\n\n\n\nconst generalFirstClickHandler = ()=>{\n removeEventListener(_constants_js__WEBPACK_IMPORTED_MODULE_1__.mouseDownEvent, generalFirstClickHandler);\n removeEventListener(_constants_js__WEBPACK_IMPORTED_MODULE_1__.touchStartEvent, generalFirstClickHandler);\n (0,_utils_js__WEBPACK_IMPORTED_MODULE_3__.unmuteWindow)();\n};\nclass SoundsPlugin {\n id = \"sounds\";\n _engine;\n constructor(engine){\n this._engine = engine;\n const listenerOptions = {\n capture: true,\n once: true\n };\n addEventListener(_constants_js__WEBPACK_IMPORTED_MODULE_1__.mouseDownEvent, generalFirstClickHandler, listenerOptions);\n addEventListener(_constants_js__WEBPACK_IMPORTED_MODULE_1__.touchStartEvent, generalFirstClickHandler, listenerOptions);\n }\n async getPlugin(container) {\n const { SoundsPluginInstance } = await __webpack_require__.e(/*! import() */ \"dist_browser_SoundsPluginInstance_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./SoundsPluginInstance.js */ \"./dist/browser/SoundsPluginInstance.js\"));\n return new SoundsPluginInstance(container, this._engine);\n }\n loadOptions(_container, options, source) {\n if (!this.needsPlugin(options) && !this.needsPlugin(source)) {\n return;\n }\n let soundsOptions = options.sounds;\n if (soundsOptions?.load === undefined) {\n options.sounds = soundsOptions = new _Options_Classes_Sounds_js__WEBPACK_IMPORTED_MODULE_2__.Sounds();\n }\n soundsOptions.load(source?.sounds);\n }\n needsPlugin(options) {\n return options?.sounds?.enable ?? false;\n }\n}\n\n\n//# sourceURL=webpack://@tsparticles/plugin-sounds/./dist/browser/SoundsPlugin.js?\n}");
|
|
107
107
|
|
|
108
108
|
/***/ },
|
|
109
109
|
|
package/esm/SoundsPlugin.js
CHANGED
package/esm/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import {} from "@tsparticles/engine";
|
|
1
2
|
export async function loadSoundsPlugin(engine) {
|
|
2
|
-
engine.checkVersion("4.0.0-beta.
|
|
3
|
+
engine.checkVersion("4.0.0-beta.2");
|
|
3
4
|
await engine.pluginManager.register(async (e) => {
|
|
4
5
|
const { SoundsPlugin } = await import("./SoundsPlugin.js");
|
|
5
6
|
e.pluginManager.addPlugin(new SoundsPlugin(e));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsparticles/plugin-sounds",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.2",
|
|
4
4
|
"description": "tsParticles sounds plugin",
|
|
5
5
|
"homepage": "https://particles.js.org",
|
|
6
6
|
"repository": {
|
|
@@ -80,12 +80,11 @@
|
|
|
80
80
|
"browser": "./browser/index.js",
|
|
81
81
|
"import": "./esm/index.js",
|
|
82
82
|
"require": "./cjs/index.js",
|
|
83
|
-
"
|
|
84
|
-
"default": "./cjs/index.js"
|
|
83
|
+
"default": "./esm/index.js"
|
|
85
84
|
},
|
|
86
85
|
"./package.json": "./package.json"
|
|
87
86
|
},
|
|
88
|
-
"
|
|
87
|
+
"peerDependencies": {
|
|
89
88
|
"@tsparticles/engine": "4.0.0-beta.1"
|
|
90
89
|
},
|
|
91
90
|
"publishConfig": {
|
package/report.html
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
|
-
<title>@tsparticles/plugin-sounds [
|
|
6
|
+
<title>@tsparticles/plugin-sounds [2 Apr 2026 at 07:40]</title>
|
|
7
7
|
<link
|
|
8
8
|
rel="shortcut icon"
|
|
9
9
|
href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAABrVBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////+O1foceMD///+J0/qK1Pr7/v8Xdr/9///W8P4UdL7L7P0Scr2r4Pyj3vwad8D5/f/2/f+55f3E6f34+/2H0/ojfMKpzOd0rNgQcb3F3O/j9f7c8v6g3Pz0/P/w+v/q+P7n9v6T1/uQ1vuE0vqLut/y+v+Z2fvt+f+15Pzv9fuc2/vR7v2V2Pvd6/bg9P7I6/285/2y4/yp3/zp8vk8i8kqgMT7/P31+fyv4vxGkcz6/P6/6P3j7vfS5PNnpNUxhcbO7f7F6v3O4vHK3/DA2u631Ouy0eqXweKJud5wqthfoNMMbLvY8f73+v2dxeR8sNtTmdDx9/zX6PSjyeaCtd1YnNGX2PuQveCGt95Nls42h8dLlM3F4vBtAAAAM3RSTlMAAyOx0/sKBvik8opWGBMOAe3l1snDm2E9LSb06eHcu5JpHbarfHZCN9CBb08zzkdNS0kYaptYAAAFV0lEQVRYw92X51/aYBDHHS2O2qqttVbrqNq9m+TJIAYIShBkWwqIiCgoWvfeq7Z2/s29hyQNyUcR7LveGwVyXy6XH8/9rqxglLfUPLxVduUor3h0rfp2TYvpivk37929TkG037hffoX0+peVtZQc1589rigVUdXS/ABSAyEmGIO/1XfvldSK8vs3OqB6u3m0nxmIrvgB0dj7rr7Y9IbuF68hnfFaiHA/sxqm0wciIG43P60qKv9WXWc1RXGh/mFESFABTSBi0sNAKzqet17eCtOb3kZIDwxEEU0oAIJGYxNBDhBND29e0rtXXbcpuPmED9IhEAAQ/AXEaF8EPmnrrKsv0LvWR3fg5sWDNAFZOgAgaKvZDogHNU9MFwnnYROkc56RD5CjAbQX9Ow4g7upCsvYu55aSI/Nj0H1akgKQEUM94dwK65hYRmFU9MIcH/fqJYOZYcnuJSU/waKDgTOEVaVKhwrTRP5XzgSpAITYzom7UvkhFX5VutmxeNnWDjjswTKTyfgluNDGbUpWissXhF3s7mlSml+czWkg3D0l1nNjGNjz3myOQOa1KM/jOS6ebdbAVTCi4gljHSFrviza7tOgRWcS0MOUX9zdNgag5w7rRqA44Lzw0hr1WqES36dFliSJFlh2rXIae3FFcDDgKdxrUIDePr8jGcSClV1u7A9xeN0ModY/pHMxmR1EzRh8TJiwqsHmKW0l4FCEZI+jHio+JdPPE9qwQtTRxku2D8sIeRL2LnxWSllANCQGOIiqVHAz2ye2JR0DcH+HoxDkaADLjgxjKQ+AwCX/g0+DNgdG0ukYCONAe+dbc2IAc6fwt1ARoDSezNHxV2Cmzwv3O6lDMV55edBGwGK9n1+x2F8EDfAGCxug8MhpsMEcTEAWf3rx2vZhe/LAmtIn/6apE6PN0ULKgywD9mmdxbmFl3OvD5AS5fW5zLbv/YHmcsBTjf/afDz3MaZTVCfAP9z6/Bw6ycv8EUBWJIn9zYcoAWWlW9+OzO3vkTy8H+RANLmdrpOuYWdZYEXpo+TlCJrW5EARb7fF+bWdqf3hhyZI1nWJQHgznErZhbjoEsWqi8dQNoE294aldzFurwSABL2XXMf9+H1VQGke9exw5P/AnA5Pv5ngMul7LOvO922iwACu8WkCwLCafvM4CeWPxfA8lNHcWZSoi8EwMAIciKX2Z4SWCMAa3snCZ/G4EA8D6CMLNFsGQhkkz/gQNEBbPCbWsxGUpYVu3z8IyNAknwJkfPMEhLyrdi5RTyUVACkw4GSFRNWJNEW+fgPGwHD8/JxnRuLabN4CGNRkAE23na2+VmEAUmrYymSGjMAYqH84YUIyzgzs3XC7gNgH36Vcc4zKY9o9fgPBXUAiHHwVboBHGLiX6Zcjp1f2wu4tvzZKo0ecPnDtQYDQvJXaBeNzce45Fp28ZQLrEZVuFqgBwOalArKXnW1UzlnSusQKJqKYNuz4tOnI6sZG4zanpemv+7ySU2jbA9h6uhcgpfy6G2PahirDZ6zvq6zDduMVFTKvzw8wgyEdelwY9in3XkEPs3osJuwRQ4qTkfzifndg9Gfc4pdsu82+tTnHZTBa2EAMrqr2t43pguc8tNm7JQVQ2S0ukj2d22dhXYP0/veWtwKrCkNoNimAN5+Xr/oLrxswKbVJjteWrX7eR63o4j9q0GxnaBdWgGA5VStpanIjQmEhV0/nVt5VOFUvix6awJhPcAaTEShgrG+iGyvb5a0Ndb1YGHFPEwoqAinoaykaID1o1pdPNu7XsnCKQ3R+hwWIIhGvORcJUBYXe3Xa3vq/mF/N9V13ugufMkfXn+KHsRD0B8AAAAASUVORK5CYII="
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Demo / Generator : https://particles.js.org/
|
|
5
5
|
* GitHub : https://www.github.com/matteobruni/tsparticles
|
|
6
6
|
* How to use? : Check the GitHub README
|
|
7
|
-
* v4.0.0-beta.
|
|
7
|
+
* v4.0.0-beta.2
|
|
8
8
|
*/
|
|
9
9
|
/*
|
|
10
10
|
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
|
|
@@ -44,7 +44,7 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_engine__;
|
|
|
44
44
|
\*******************************/
|
|
45
45
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
46
46
|
|
|
47
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ loadSoundsPlugin: () => (/* binding */ loadSoundsPlugin)\n/* harmony export */ });\nasync function loadSoundsPlugin(engine) {\n engine.checkVersion(\"4.0.0-beta.
|
|
47
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ loadSoundsPlugin: () => (/* binding */ loadSoundsPlugin)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n\nasync function loadSoundsPlugin(engine) {\n engine.checkVersion(\"4.0.0-beta.2\");\n await engine.pluginManager.register(async (e)=>{\n const { SoundsPlugin } = await __webpack_require__.e(/*! import() */ \"dist_browser_SoundsPlugin_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./SoundsPlugin.js */ \"./dist/browser/SoundsPlugin.js\"));\n e.pluginManager.addPlugin(new SoundsPlugin(e));\n });\n}\n\n\n//# sourceURL=webpack://@tsparticles/plugin-sounds/./dist/browser/index.js?\n}");
|
|
48
48
|
|
|
49
49
|
/***/ }
|
|
50
50
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@tsparticles/engine"));else if("function"==typeof define&&define.amd)define(["@tsparticles/engine"],t);else{var r="object"==typeof exports?t(require("@tsparticles/engine")):t(e.window);for(var o in r)("object"==typeof exports?exports:e)[o]=r[o]}}(this,e=>(()=>{"use strict";var t,r,o,n={303(t){t.exports=e}},i={};function a(e){var t=i[e];if(void 0!==t)return t.exports;var r=i[e]={exports:{}};return n[e](r,r.exports,a),r.exports}a.m=n,a.d=(e,t)=>{for(var r in t)a.o(t,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},a.f={},a.e=e=>Promise.all(Object.keys(a.f).reduce((t,r)=>(a.f[r](e,t),t),[])),a.u=e=>""+e+".min.js",a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),s={},a.l=(e,t,r,o)=>{if(s[e])return void s[e].push(t);if(void 0!==r)for(var n,i,u=document.getElementsByTagName("script"),l=0;l<u.length;l++){var p=u[l];if(p.getAttribute("src")==e||p.getAttribute("data-webpack")=="@tsparticles/plugin-sounds:"+r){n=p;break}}n||(i=!0,(n=document.createElement("script")).charset="utf-8",a.nc&&n.setAttribute("nonce",a.nc),n.setAttribute("data-webpack","@tsparticles/plugin-sounds:"+r),n.src=e),s[e]=[t];var c=(t,r)=>{n.onerror=n.onload=null,clearTimeout(d);var o=s[e];if(delete s[e],n.parentNode&&n.parentNode.removeChild(n),o&&o.forEach(e=>e(r)),t)return t(r)},d=setTimeout(c.bind(null,void 0,{type:"timeout",target:n}),12e4);n.onerror=c.bind(null,n.onerror),n.onload=c.bind(null,n.onload),i&&document.head.appendChild(n)},a.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.g.importScripts&&(u=a.g.location+"");var s,u,l=a.g.document;if(!u&&l&&(l.currentScript&&"SCRIPT"===l.currentScript.tagName.toUpperCase()&&(u=l.currentScript.src),!u)){var p=l.getElementsByTagName("script");if(p.length)for(var c=p.length-1;c>-1&&(!u||!/^http(s?):/.test(u));)u=p[c--].src}if(!u)throw Error("Automatic publicPath is not supported in this browser");a.p=u=u.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),t={848:0},a.f.j=(e,r)=>{var o=a.o(t,e)?t[e]:void 0;if(0!==o)if(o)r.push(o[2]);else{var n=new Promise((r,n)=>o=t[e]=[r,n]);r.push(o[2]=n);var i=a.p+a.u(e),s=Error();a.l(i,r=>{if(a.o(t,e)&&(0!==(o=t[e])&&(t[e]=void 0),o)){var n=r&&("load"===r.type?"missing":r.type),i=r&&r.target&&r.target.src;s.message="Loading chunk "+e+` failed.
|
|
2
|
-
(`+n+": "+i+")",s.name="ChunkLoadError",s.type=n,s.request=i,o[1](s)}},"chunk-"+e,e)}},r=(e,r)=>{var o,n,[i,s,u]=r,l=0;if(i.some(e=>0!==t[e])){for(o in s)a.o(s,o)&&(a.m[o]=s[o]);u&&u(a)}for(e&&e(r);l<i.length;l++)n=i[l],a.o(t,n)&&t[n]&&t[n][0](),t[n]=0},(o=this.webpackChunk_tsparticles_plugin_sounds=this.webpackChunk_tsparticles_plugin_sounds||[]).forEach(r.bind(null,0)),o.push=r.bind(null,o.push.bind(o));var d={};async function f(e){e.checkVersion("4.0.0-beta.
|
|
2
|
+
(`+n+": "+i+")",s.name="ChunkLoadError",s.type=n,s.request=i,o[1](s)}},"chunk-"+e,e)}},r=(e,r)=>{var o,n,[i,s,u]=r,l=0;if(i.some(e=>0!==t[e])){for(o in s)a.o(s,o)&&(a.m[o]=s[o]);u&&u(a)}for(e&&e(r);l<i.length;l++)n=i[l],a.o(t,n)&&t[n]&&t[n][0](),t[n]=0},(o=this.webpackChunk_tsparticles_plugin_sounds=this.webpackChunk_tsparticles_plugin_sounds||[]).forEach(r.bind(null,0)),o.push=r.bind(null,o.push.bind(o));var d={};async function f(e){e.checkVersion("4.0.0-beta.2"),await e.pluginManager.register(async e=>{let{SoundsPlugin:t}=await a.e(414).then(a.bind(a,414));e.pluginManager.addPlugin(new t(e))})}return a.r(d),a.d(d,{loadSoundsPlugin:()=>f}),a(303),d})());
|
|
@@ -1,54 +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", "@tsparticles/engine", "./SoundsEvent.js", "./SoundsIcons.js", "./SoundsVolume.js"], factory);
|
|
8
|
-
}
|
|
9
|
-
})(function (require, exports) {
|
|
10
|
-
"use strict";
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.Sounds = void 0;
|
|
13
|
-
const engine_1 = require("@tsparticles/engine");
|
|
14
|
-
const SoundsEvent_js_1 = require("./SoundsEvent.js");
|
|
15
|
-
const SoundsIcons_js_1 = require("./SoundsIcons.js");
|
|
16
|
-
const SoundsVolume_js_1 = require("./SoundsVolume.js");
|
|
17
|
-
class Sounds {
|
|
18
|
-
autoPlay;
|
|
19
|
-
enable;
|
|
20
|
-
events;
|
|
21
|
-
icons;
|
|
22
|
-
volume;
|
|
23
|
-
constructor() {
|
|
24
|
-
this.autoPlay = true;
|
|
25
|
-
this.enable = false;
|
|
26
|
-
this.events = [];
|
|
27
|
-
this.icons = new SoundsIcons_js_1.SoundsIcons();
|
|
28
|
-
this.volume = new SoundsVolume_js_1.SoundsVolume();
|
|
29
|
-
}
|
|
30
|
-
load(data) {
|
|
31
|
-
if ((0, engine_1.isNull)(data)) {
|
|
32
|
-
return;
|
|
33
|
-
}
|
|
34
|
-
if (data.autoPlay !== undefined) {
|
|
35
|
-
this.autoPlay = data.autoPlay;
|
|
36
|
-
}
|
|
37
|
-
if (data.enable !== undefined) {
|
|
38
|
-
this.enable = data.enable;
|
|
39
|
-
}
|
|
40
|
-
if (data.events !== undefined) {
|
|
41
|
-
this.events = data.events.map(t => {
|
|
42
|
-
const event = new SoundsEvent_js_1.SoundsEvent();
|
|
43
|
-
event.load(t);
|
|
44
|
-
return event;
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
this.icons.load(data.icons);
|
|
48
|
-
if (data.volume !== undefined) {
|
|
49
|
-
this.volume.load(data.volume);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
exports.Sounds = Sounds;
|
|
54
|
-
});
|
|
@@ -1,39 +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", "@tsparticles/engine"], factory);
|
|
8
|
-
}
|
|
9
|
-
})(function (require, exports) {
|
|
10
|
-
"use strict";
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.SoundsAudio = void 0;
|
|
13
|
-
const engine_1 = require("@tsparticles/engine");
|
|
14
|
-
class SoundsAudio {
|
|
15
|
-
loop;
|
|
16
|
-
source;
|
|
17
|
-
constructor() {
|
|
18
|
-
this.loop = false;
|
|
19
|
-
this.source = "";
|
|
20
|
-
}
|
|
21
|
-
load(data) {
|
|
22
|
-
if ((0, engine_1.isNull)(data)) {
|
|
23
|
-
return;
|
|
24
|
-
}
|
|
25
|
-
if ((0, engine_1.isObject)(data)) {
|
|
26
|
-
if (data.loop !== undefined) {
|
|
27
|
-
this.loop = data.loop;
|
|
28
|
-
}
|
|
29
|
-
if (data.source !== undefined) {
|
|
30
|
-
this.source = data.source;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
else {
|
|
34
|
-
this.source = data;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
exports.SoundsAudio = SoundsAudio;
|
|
39
|
-
});
|
|
@@ -1,75 +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", "@tsparticles/engine", "./SoundsAudio.js", "./SoundsMelody.js", "./SoundsNote.js"], factory);
|
|
8
|
-
}
|
|
9
|
-
})(function (require, exports) {
|
|
10
|
-
"use strict";
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.SoundsEvent = void 0;
|
|
13
|
-
const engine_1 = require("@tsparticles/engine");
|
|
14
|
-
const SoundsAudio_js_1 = require("./SoundsAudio.js");
|
|
15
|
-
const SoundsMelody_js_1 = require("./SoundsMelody.js");
|
|
16
|
-
const SoundsNote_js_1 = require("./SoundsNote.js");
|
|
17
|
-
class SoundsEvent {
|
|
18
|
-
audio;
|
|
19
|
-
event;
|
|
20
|
-
filter;
|
|
21
|
-
melodies;
|
|
22
|
-
notes;
|
|
23
|
-
constructor() {
|
|
24
|
-
this.event = [];
|
|
25
|
-
this.notes = [];
|
|
26
|
-
}
|
|
27
|
-
load(data) {
|
|
28
|
-
if ((0, engine_1.isNull)(data)) {
|
|
29
|
-
return;
|
|
30
|
-
}
|
|
31
|
-
if (data.event !== undefined) {
|
|
32
|
-
this.event = data.event;
|
|
33
|
-
}
|
|
34
|
-
if (data.audio !== undefined) {
|
|
35
|
-
if ((0, engine_1.isArray)(data.audio)) {
|
|
36
|
-
this.audio = data.audio.map(s => {
|
|
37
|
-
const tmp = new SoundsAudio_js_1.SoundsAudio();
|
|
38
|
-
tmp.load(s);
|
|
39
|
-
return tmp;
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
else {
|
|
43
|
-
this.audio = new SoundsAudio_js_1.SoundsAudio();
|
|
44
|
-
this.audio.load(data.audio);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
if (data.notes !== undefined) {
|
|
48
|
-
this.notes = data.notes.map(t => {
|
|
49
|
-
const tmp = new SoundsNote_js_1.SoundsNote();
|
|
50
|
-
tmp.load(t);
|
|
51
|
-
return tmp;
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
if (data.melodies !== undefined) {
|
|
55
|
-
this.melodies = data.melodies.map(t => {
|
|
56
|
-
const tmp = new SoundsMelody_js_1.SoundsMelody();
|
|
57
|
-
tmp.load(t);
|
|
58
|
-
return tmp;
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
if (data.filter) {
|
|
62
|
-
if ((0, engine_1.isString)(data.filter)) {
|
|
63
|
-
const filterFunc = globalThis[data.filter];
|
|
64
|
-
if ((0, engine_1.isFunction)(filterFunc)) {
|
|
65
|
-
this.filter = filterFunc;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
else {
|
|
69
|
-
this.filter = data.filter;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
exports.SoundsEvent = SoundsEvent;
|
|
75
|
-
});
|
|
@@ -1,44 +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", "@tsparticles/engine"], factory);
|
|
8
|
-
}
|
|
9
|
-
})(function (require, exports) {
|
|
10
|
-
"use strict";
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.SoundsIcon = void 0;
|
|
13
|
-
const engine_1 = require("@tsparticles/engine");
|
|
14
|
-
class SoundsIcon {
|
|
15
|
-
height;
|
|
16
|
-
path;
|
|
17
|
-
style;
|
|
18
|
-
svg;
|
|
19
|
-
width;
|
|
20
|
-
constructor() {
|
|
21
|
-
this.width = 24;
|
|
22
|
-
this.height = 24;
|
|
23
|
-
this.style = "";
|
|
24
|
-
}
|
|
25
|
-
load(data) {
|
|
26
|
-
if ((0, engine_1.isNull)(data)) {
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
|
-
if (data.path !== undefined) {
|
|
30
|
-
this.path = data.path;
|
|
31
|
-
}
|
|
32
|
-
if (data.svg !== undefined) {
|
|
33
|
-
this.svg = data.svg;
|
|
34
|
-
}
|
|
35
|
-
if (data.width !== undefined) {
|
|
36
|
-
this.width = data.width;
|
|
37
|
-
}
|
|
38
|
-
if (data.height !== undefined) {
|
|
39
|
-
this.height = data.height;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
exports.SoundsIcon = SoundsIcon;
|
|
44
|
-
});
|
|
@@ -1,78 +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", "@tsparticles/engine", "./SoundsIcon.js"], factory);
|
|
8
|
-
}
|
|
9
|
-
})(function (require, exports) {
|
|
10
|
-
"use strict";
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.SoundsIcons = void 0;
|
|
13
|
-
const engine_1 = require("@tsparticles/engine");
|
|
14
|
-
const SoundsIcon_js_1 = require("./SoundsIcon.js");
|
|
15
|
-
class SoundsIcons {
|
|
16
|
-
enable;
|
|
17
|
-
mute;
|
|
18
|
-
unmute;
|
|
19
|
-
volumeDown;
|
|
20
|
-
volumeUp;
|
|
21
|
-
constructor() {
|
|
22
|
-
this.mute = new SoundsIcon_js_1.SoundsIcon();
|
|
23
|
-
this.unmute = new SoundsIcon_js_1.SoundsIcon();
|
|
24
|
-
this.volumeDown = new SoundsIcon_js_1.SoundsIcon();
|
|
25
|
-
this.volumeUp = new SoundsIcon_js_1.SoundsIcon();
|
|
26
|
-
this.enable = false;
|
|
27
|
-
this.mute.svg = `<?xml version="1.0"?>
|
|
28
|
-
<svg baseProfile="tiny" height="24px" version="1.2" viewBox="0 0 24 24" width="24px"
|
|
29
|
-
xml:space="preserve" xmlns="http://www.w3.org/2000/svg"
|
|
30
|
-
xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
31
|
-
<g id="Layer_1">
|
|
32
|
-
<path fill="#fff" d="M19.707,5.293c-0.391-0.391-1.023-0.391-1.414,0l-1.551,1.551c-0.345-0.688-0.987-1.02-1.604-1.02c-0.449,0-0.905,0.152-1.356,0.453l-2.672,1.781C10.357,8.561,8.904,9,8,9c-1.654,0-3,1.346-3,3v2c0,1.237,0.754,2.302,1.826,2.76l-1.533,1.533c-0.391,0.391-0.391,1.023,0,1.414C5.488,19.902,5.744,20,6,20s0.512-0.098,0.707-0.293l2.527-2.527c0.697,0.174,1.416,0.455,1.875,0.762l2.672,1.781c0.451,0.301,0.907,0.453,1.356,0.453C16.035,20.176,17,19.495,17,18V9.414l2.707-2.707C20.098,6.316,20.098,5.684,19.707,5.293z M14.891,7.941c0.038-0.025,0.073-0.046,0.104-0.062C14.998,7.914,15,7.954,15,8v1.293l-2,2V9.202L14.891,7.941z M7,12c0-0.552,0.448-1,1-1c1.211,0,2.907-0.495,4-1.146v2.439l-2.83,2.83C8.757,15.046,8.356,15,8,15c-0.552,0-1-0.448-1-1V12z M10.301,15.406L12,13.707v2.439C11.519,15.859,10.925,15.604,10.301,15.406z M14.994,18.12c-0.03-0.016-0.065-0.036-0.104-0.062L13,16.798v-4.091l2-2V18C15,18.046,14.998,18.086,14.994,18.12z"/>
|
|
33
|
-
</g>
|
|
34
|
-
</svg>`;
|
|
35
|
-
this.unmute.svg = `<?xml version="1.0"?>
|
|
36
|
-
<svg baseProfile="tiny" height="24px" version="1.2" viewBox="0 0 24 24" width="24px"
|
|
37
|
-
xml:space="preserve" xmlns="http://www.w3.org/2000/svg"
|
|
38
|
-
xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
39
|
-
<g id="Layer_1">
|
|
40
|
-
<path fill="#fff" d="M17.138,5.824c-0.449,0-0.905,0.152-1.356,0.453l-2.672,1.781C12.357,8.561,10.904,9,10,9c-1.654,0-3,1.346-3,3v2c0,1.654,1.346,3,3,3c0.904,0,2.357,0.439,3.109,0.941l2.672,1.781c0.451,0.301,0.907,0.453,1.356,0.453C18.035,20.176,19,19.495,19,18V8C19,6.505,18.035,5.824,17.138,5.824z M14,16.146C12.907,15.495,11.211,15,10,15c-0.552,0-1-0.448-1-1v-2c0-0.552,0.448-1,1-1c1.211,0,2.907-0.495,4-1.146V16.146z M17,18c0,0.046-0.002,0.086-0.006,0.12c-0.03-0.016-0.065-0.036-0.104-0.062L15,16.798V9.202l1.891-1.261c0.038-0.025,0.073-0.046,0.104-0.062C16.998,7.914,17,7.954,17,8V18z"/>
|
|
41
|
-
</g>
|
|
42
|
-
</svg>`;
|
|
43
|
-
this.volumeDown.svg = `<?xml version="1.0"?>
|
|
44
|
-
<svg baseProfile="tiny" height="24px" version="1.2" viewBox="0 0 24 24" width="24px"
|
|
45
|
-
xml:space="preserve" xmlns="http://www.w3.org/2000/svg"
|
|
46
|
-
xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
47
|
-
<g id="Layer_1">
|
|
48
|
-
<path fill="#fff" d="M15.138,5.824c-0.449,0-0.905,0.152-1.356,0.453l-2.672,1.781C10.357,8.561,8.904,9,8,9c-1.654,0-3,1.346-3,3v2c0,1.654,1.346,3,3,3c0.904,0,2.357,0.439,3.109,0.941l2.672,1.781c0.451,0.301,0.907,0.453,1.356,0.453C16.035,20.176,17,19.495,17,18V8C17,6.505,16.035,5.824,15.138,5.824z M8,15c-0.552,0-1-0.448-1-1v-2c0-0.552,0.448-1,1-1c1.211,0,2.907-0.495,4-1.146v6.293C10.907,15.495,9.211,15,8,15z M15,18c0,0.046-0.002,0.086-0.006,0.12c-0.03-0.016-0.065-0.036-0.104-0.062L13,16.798V9.202l1.891-1.261c0.038-0.025,0.073-0.046,0.104-0.062C14.998,7.914,15,7.954,15,8V18z"/>
|
|
49
|
-
<path fill="#fff" d="M18.292,10.294c-0.39,0.391-0.39,1.023,0.002,1.414c0.345,0.345,0.535,0.803,0.535,1.291c0,0.489-0.19,0.948-0.536,1.294c-0.391,0.39-0.391,1.023,0,1.414C18.488,15.902,18.744,16,19,16s0.512-0.098,0.707-0.293c0.724-0.723,1.122-1.685,1.122-2.708s-0.398-1.984-1.123-2.707C19.317,9.903,18.683,9.901,18.292,10.294z"/>
|
|
50
|
-
</g>
|
|
51
|
-
</svg>`;
|
|
52
|
-
this.volumeUp.svg = `<?xml version="1.0"?>
|
|
53
|
-
<svg baseProfile="tiny" height="24px" version="1.2" viewBox="0 0 24 24" width="24px"
|
|
54
|
-
xml:space="preserve" xmlns="http://www.w3.org/2000/svg"
|
|
55
|
-
xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
56
|
-
<g id="Layer_1">
|
|
57
|
-
<path fill="#fff" d="M16.706,10.292c-0.389-0.389-1.023-0.391-1.414,0.002c-0.39,0.391-0.39,1.023,0.002,1.414c0.345,0.345,0.535,0.803,0.535,1.291c0,0.489-0.19,0.948-0.536,1.294c-0.391,0.39-0.391,1.023,0,1.414C15.488,15.902,15.744,16,16,16s0.512-0.098,0.707-0.293c0.724-0.723,1.122-1.685,1.122-2.708S17.431,11.015,16.706,10.292z"/>
|
|
58
|
-
<path fill="#fff" d="M18.706,8.292c-0.391-0.389-1.023-0.39-1.414,0.002c-0.39,0.391-0.39,1.024,0.002,1.414c0.879,0.877,1.363,2.044,1.364,3.287c0.001,1.246-0.484,2.417-1.365,3.298c-0.391,0.391-0.391,1.023,0,1.414C17.488,17.902,17.744,18,18,18s0.512-0.098,0.707-0.293c1.259-1.259,1.952-2.933,1.951-4.713C20.657,11.217,19.964,9.547,18.706,8.292z"/>
|
|
59
|
-
<path fill="#fff" d="M20.706,6.292c-0.391-0.389-1.023-0.39-1.414,0.002c-0.39,0.391-0.39,1.024,0.002,1.414c1.412,1.409,2.191,3.285,2.192,5.284c0.002,2.002-0.777,3.885-2.193,5.301c-0.391,0.391-0.391,1.023,0,1.414C19.488,19.902,19.744,20,20,20s0.512-0.098,0.707-0.293c1.794-1.794,2.781-4.18,2.779-6.717C23.485,10.457,22.497,8.078,20.706,6.292z"/>
|
|
60
|
-
<path fill="#fff" d="M12.138,5.824c-0.449,0-0.905,0.152-1.356,0.453L8.109,8.059C7.357,8.561,5.904,9,5,9c-1.654,0-3,1.346-3,3v2c0,1.654,1.346,3,3,3c0.904,0,2.357,0.439,3.109,0.941l2.672,1.781c0.451,0.301,0.907,0.453,1.356,0.453C13.035,20.176,14,19.495,14,18V8C14,6.505,13.035,5.824,12.138,5.824z M5,15c-0.552,0-1-0.448-1-1v-2c0-0.552,0.448-1,1-1c1.211,0,2.907-0.495,4-1.146v6.293C7.907,15.495,6.211,15,5,15z M12,18c0,0.046-0.002,0.086-0.006,0.12c-0.03-0.016-0.065-0.036-0.104-0.062L10,16.798V9.202l1.891-1.261c0.038-0.025,0.073-0.046,0.104-0.062C11.998,7.914,12,7.954,12,8V18z"/>
|
|
61
|
-
</g>
|
|
62
|
-
</svg>`;
|
|
63
|
-
}
|
|
64
|
-
load(data) {
|
|
65
|
-
if ((0, engine_1.isNull)(data)) {
|
|
66
|
-
return;
|
|
67
|
-
}
|
|
68
|
-
if (data.enable !== undefined) {
|
|
69
|
-
this.enable = data.enable;
|
|
70
|
-
}
|
|
71
|
-
this.mute.load(data.mute);
|
|
72
|
-
this.unmute.load(data.unmute);
|
|
73
|
-
this.volumeDown.load(data.volumeDown);
|
|
74
|
-
this.volumeUp.load(data.volumeUp);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
exports.SoundsIcons = SoundsIcons;
|
|
78
|
-
});
|
|
@@ -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", "@tsparticles/engine", "./SoundsNote.js"], factory);
|
|
8
|
-
}
|
|
9
|
-
})(function (require, exports) {
|
|
10
|
-
"use strict";
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.SoundsMelody = void 0;
|
|
13
|
-
const engine_1 = require("@tsparticles/engine");
|
|
14
|
-
const SoundsNote_js_1 = require("./SoundsNote.js");
|
|
15
|
-
class SoundsMelody {
|
|
16
|
-
loop;
|
|
17
|
-
melodies;
|
|
18
|
-
notes;
|
|
19
|
-
constructor() {
|
|
20
|
-
this.loop = false;
|
|
21
|
-
this.melodies = [];
|
|
22
|
-
this.notes = [];
|
|
23
|
-
}
|
|
24
|
-
load(data) {
|
|
25
|
-
if ((0, engine_1.isNull)(data)) {
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
if (data.loop !== undefined) {
|
|
29
|
-
this.loop = data.loop;
|
|
30
|
-
}
|
|
31
|
-
if (data.melodies !== undefined) {
|
|
32
|
-
this.melodies = data.melodies.map(s => {
|
|
33
|
-
const tmp = new SoundsMelody();
|
|
34
|
-
tmp.load(s);
|
|
35
|
-
return tmp;
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
if (data.notes !== undefined) {
|
|
39
|
-
this.notes = data.notes.map(s => {
|
|
40
|
-
const tmp = new SoundsNote_js_1.SoundsNote();
|
|
41
|
-
tmp.load(s);
|
|
42
|
-
return tmp;
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
exports.SoundsMelody = SoundsMelody;
|
|
48
|
-
});
|
|
@@ -1,34 +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", "@tsparticles/engine"], factory);
|
|
8
|
-
}
|
|
9
|
-
})(function (require, exports) {
|
|
10
|
-
"use strict";
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.SoundsNote = void 0;
|
|
13
|
-
const engine_1 = require("@tsparticles/engine");
|
|
14
|
-
class SoundsNote {
|
|
15
|
-
duration;
|
|
16
|
-
value;
|
|
17
|
-
constructor() {
|
|
18
|
-
this.duration = 500;
|
|
19
|
-
this.value = [];
|
|
20
|
-
}
|
|
21
|
-
load(data) {
|
|
22
|
-
if ((0, engine_1.isNull)(data)) {
|
|
23
|
-
return;
|
|
24
|
-
}
|
|
25
|
-
if (data.duration !== undefined) {
|
|
26
|
-
this.duration = data.duration;
|
|
27
|
-
}
|
|
28
|
-
if (data.value !== undefined) {
|
|
29
|
-
this.value = data.value;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
exports.SoundsNote = SoundsNote;
|
|
34
|
-
});
|
|
@@ -1,49 +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", "@tsparticles/engine"], factory);
|
|
8
|
-
}
|
|
9
|
-
})(function (require, exports) {
|
|
10
|
-
"use strict";
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.SoundsVolume = void 0;
|
|
13
|
-
const engine_1 = require("@tsparticles/engine");
|
|
14
|
-
class SoundsVolume {
|
|
15
|
-
max;
|
|
16
|
-
min;
|
|
17
|
-
step;
|
|
18
|
-
value;
|
|
19
|
-
constructor() {
|
|
20
|
-
this.value = 100;
|
|
21
|
-
this.max = 100;
|
|
22
|
-
this.min = 0;
|
|
23
|
-
this.step = 10;
|
|
24
|
-
}
|
|
25
|
-
load(data) {
|
|
26
|
-
if ((0, engine_1.isNull)(data)) {
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
|
-
if ((0, engine_1.isObject)(data)) {
|
|
30
|
-
if (data.max !== undefined) {
|
|
31
|
-
this.max = data.max;
|
|
32
|
-
}
|
|
33
|
-
if (data.min !== undefined) {
|
|
34
|
-
this.min = data.min;
|
|
35
|
-
}
|
|
36
|
-
if (data.step !== undefined) {
|
|
37
|
-
this.step = data.step;
|
|
38
|
-
}
|
|
39
|
-
if (data.value !== undefined) {
|
|
40
|
-
this.value = data.value;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
else {
|
|
44
|
-
this.value = data;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
exports.SoundsVolume = SoundsVolume;
|
|
49
|
-
});
|
|
@@ -1,12 +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
|
-
});
|