@tsparticles/plugin-sounds 4.0.0-alpha.18 → 4.0.0-alpha.20

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.
@@ -1 +1 @@
1
- "use strict";(this.webpackChunk_tsparticles_plugin_sounds=this.webpackChunk_tsparticles_plugin_sounds||[]).push([[434],{434(t,e,i){i.d(e,{SoundsPluginInstance:()=>m});var n,s,a,o,u=i(303);(n=a||(a={})).mute="soundsMuted",n.unmute="soundsUnmuted",(s=o||(o={})).Block="block",s.None="none";var l=i(838),r=i(878);function c(t){var e,i,n,s,a,o,l,r;let c=(0,u.safeDocument)().createElement("img"),{clickCb:d,container:m,display:h,iconOptions:_,margin:p,options:g,pos:f,rightOffsets:v}=t,{width:y,path:w,style:O,svg:S}=_;return e=c,i=f.top+p,n=f.right-(p*(v.length+1)+y+v.reduce((t,e)=>t+e,0)),s=h,a=g.fullScreen.zIndex+1,o=y,l=p,r=O,e.style.userSelect="none",e.style.position="absolute",e.style.top=`${(i+l).toString()}px`,e.style.left=`${(n-l-o).toString()}px`,e.style.display=s,e.style.zIndex=(a+1).toString(),e.style.cssText+=r,c.src=w??(S?`data:image/svg+xml;base64,${btoa(S)}`:""),(m.canvas.element?.parentNode??(0,u.safeDocument)().body).append(c),c.addEventListener("click",()=>{d()}),c}function d(t){t&&t.remove()}class m{_audioMap;_audioSources;_container;_engine;_gain;_muteImg;_unmuteImg;_volume;_volumeDownImg;_volumeUpImg;constructor(t,e){this._container=t,this._engine=e,this._volume=0,this._audioSources=[],this._audioMap=new Map}async init(){let t=this._container.actualOptions.sounds;if(!t?.enable)return;if(t.autoPlay&&(0,l.E3)()){let t=()=>{removeEventListener(r.m,t),removeEventListener(r.s,t),(0,l.XK)(),this.unmute()},e={capture:!0,once:!0};addEventListener(r.m,t,e),addEventListener(r.s,t,e)}this._volume=t.volume.value;let e=t.events;for(let t of(this._audioMap=new Map,e)){if(!t.audio)continue;let e=(0,u.executeOnSingleOrMultiple)(t.audio,async t=>{let e=await fetch(t.source);if(!e.ok)return;let i=await e.arrayBuffer(),n=this._getAudioContext(),s=await n.decodeAudioData(i);this._audioMap.set(t.source,s)});e instanceof Promise?await e:await Promise.allSettled(e)}}async mute(){this._container.muted||await this.toggleMute()}async start(){let t=this._container,e=t.actualOptions,i=e.sounds;if(!i?.enable||!t.canvas.element)return;t.muted=!0;let n=t.canvas.element,s={top:n.offsetTop,right:n.offsetLeft+n.offsetWidth},{mute:a,unmute:u,volumeDown:r,volumeUp:d}=i.icons,m=async()=>{await this.toggleMute()},h=i.icons.enable?o.Block:o.None;this._muteImg=c({container:t,options:e,pos:s,display:h,iconOptions:a,margin:10,rightOffsets:[r.width,d.width],clickCb:m}),this._unmuteImg=c({container:t,options:e,pos:s,display:o.None,iconOptions:u,margin:10,rightOffsets:[r.width,d.width],clickCb:m}),this._volumeDownImg=c({container:t,options:e,pos:s,display:h,iconOptions:r,margin:10,rightOffsets:[d.width],clickCb:async()=>{await this.volumeDown()}}),this._volumeUpImg=c({container:t,options:e,pos:s,display:h,iconOptions:d,margin:10,rightOffsets:[],clickCb:async()=>{await this.volumeUp()}}),!(0,l.E3)()&&i.autoPlay&&await this.unmute()}stop(){this._container.muted=!0,(async()=>{await this._mute(),d(this._muteImg),d(this._unmuteImg),d(this._volumeDownImg),d(this._volumeUpImg)})()}async toggleMute(){let t=this._container;t.muted=!t.muted,this._updateMuteIcons(),await this._updateMuteStatus()}async unmute(){this._container.muted&&await this.toggleMute()}async volumeDown(){let t=this._container,e=t.actualOptions.sounds;e?.enable&&(t.muted&&(this._volume=0),this._volume-=e.volume.step,await this._updateVolume())}async volumeUp(){let t=this._container.actualOptions.sounds;t?.enable&&(this._volume+=t.volume.step,await this._updateVolume())}_addBuffer=t=>{let e=t.createBufferSource();return this._audioSources.push(e),e};_addOscillator=t=>{let e=t.createOscillator();return this._audioSources.push(e),e};_getAudioContext(){let t=this._container;return t.audioContext??=new AudioContext,t.audioContext}_initEvents=()=>{let t=this._container,e=t.actualOptions.sounds;if(e?.enable&&t.canvas.element)for(let t of e.events){let e=i=>{i&&(async()=>{let n=t.filter&&!t.filter(i);if(this._container===i.container){if(this._container.muted||this._container.destroyed)return(0,u.executeOnSingleOrMultiple)(t.event,t=>{this._engine.removeEventListener(t,e)});if(!n){if(t.audio){let e=(0,u.itemFromSingleOrMultiple)(t.audio);if(!e)return;this._playBuffer(e)}else if(t.melodies){let e=(0,u.itemFromArray)(t.melodies);if(!e)return;e.melodies.length?await Promise.allSettled(e.melodies.map(t=>this._playNote(t.notes,0,e.loop))):await this._playNote(e.notes,0,e.loop)}else if(t.notes){let e=(0,u.itemFromArray)(t.notes);if(!e)return;await this._playNote([e],0,!1)}}}})()};(0,u.executeOnSingleOrMultiple)(t.event,t=>{this._engine.addEventListener(t,e)})}};_mute=async()=>{let t=this._container,e=this._getAudioContext();for(let t of this._audioSources)this._removeAudioSource(t);this._gain&&this._gain.disconnect(),await e.close(),t.audioContext=void 0,this._engine.dispatchEvent(a.mute,{container:this._container})};_playBuffer=t=>{let e=this._audioMap.get(t.source);if(!e)return;let i=this._container.audioContext;if(!i)return;let n=this._addBuffer(i);n.loop=t.loop,n.buffer=e,n.connect(this._gain??i.destination),n.start()};_playFrequency=async(t,e)=>{if(!this._gain||this._container.muted)return;let i=this._getAudioContext(),n=this._addOscillator(i);return n.connect(this._gain),n.type="sine",n.frequency.value=t,n.start(),new Promise(t=>{setTimeout(()=>{this._removeAudioSource(n),t()},e)})};_playMuteSound=()=>{if(this._container.muted)return;let t=this._getAudioContext(),e=t.createGain();e.connect(t.destination),e.gain.value=0;let i=t.createOscillator();i.connect(e),i.type="sine",i.frequency.value=1,i.start(),setTimeout(()=>{i.stop(),i.disconnect(),e.disconnect()})};_playNote=async(t,e,i)=>{if(this._container.muted)return;let n=t[e];if(!n)return;let s=n.value,a=(0,u.executeOnSingleOrMultiple)(s,async(i,n)=>this._playNoteValue(t,e,n));await ((0,u.isArray)(a)?Promise.allSettled(a):a);let o=e+1;i&&o>=t.length&&(o%=t.length),await this._playNote(t,o,i)};_playNoteValue=async(t,e,i)=>{let n=t[e];if(!n)return;let s=(0,u.itemFromSingleOrMultiple)(n.value,i,!0);if(s)try{let t=(0,l.jE)(s);if(!(0,u.isNumber)(t))return;await this._playFrequency(t,n.duration)}catch(t){(0,u.getLogger)().error(t)}};_removeAudioSource=t=>{t.stop(),t.disconnect(),this._audioSources.splice(this._audioSources.indexOf(t),1)};_unmute=()=>{let t=this._container.actualOptions.sounds;if(!t)return;let e=this._getAudioContext(),i=e.createGain();i.connect(e.destination),i.gain.value=t.volume.value/u.percentDenominator,this._gain=i,this._initEvents(),this._engine.dispatchEvent(a.unmute,{container:this._container})};_updateMuteIcons=()=>{let t=this._container,e=t.actualOptions.sounds;if(!e?.enable||!e.icons.enable)return;let i=this._muteImg,n=this._unmuteImg;i&&(i.style.display=t.muted?"block":"none"),n&&(n.style.display=t.muted?"none":"block")};_updateMuteStatus=async()=>{let t=this._container,e=this._getAudioContext();t.muted?(await e.suspend(),await this._mute()):(await e.resume(),this._unmute(),this._playMuteSound())};_updateVolume=async()=>{let t=this._container,e=t.actualOptions.sounds;if(!e?.enable)return;(0,u.clamp)(this._volume,e.volume.min,e.volume.max);let i=!1;this._volume<=0&&!t.muted?(this._volume=0,t.muted=!0,i=!0):this._volume>0&&t.muted&&(t.muted=!1,i=!0),i&&(this._updateMuteIcons(),await this._updateMuteStatus()),this._gain?.gain&&(this._gain.gain.value=this._volume/u.percentDenominator)}}}}]);
1
+ "use strict";(this.webpackChunk_tsparticles_plugin_sounds=this.webpackChunk_tsparticles_plugin_sounds||[]).push([[249],{249(t,e,i){i.d(e,{SoundsPluginInstance:()=>m});var n,s,a,o,u=i(303);(n=a||(a={})).mute="soundsMuted",n.unmute="soundsUnmuted",(s=o||(o={})).Block="block",s.None="none";var l=i(946),r=i(794);function c(t){var e,i,n,s,a,o,l,r;let c=(0,u.safeDocument)().createElement("img"),{clickCb:d,container:m,display:h,iconOptions:_,margin:p,options:g,pos:f,rightOffsets:v}=t,{width:y,path:w,style:O,svg:S}=_;return e=c,i=f.top+p,n=f.right-(p*(v.length+1)+y+v.reduce((t,e)=>t+e,0)),s=h,a=g.fullScreen.zIndex+1,o=y,l=p,r=O,e.style.userSelect="none",e.style.position="absolute",e.style.top=`${(i+l).toString()}px`,e.style.left=`${(n-l-o).toString()}px`,e.style.display=s,e.style.zIndex=(a+1).toString(),e.style.cssText+=r,c.src=w??(S?`data:image/svg+xml;base64,${btoa(S)}`:""),(m.canvas.element?.parentNode??(0,u.safeDocument)().body).append(c),c.addEventListener("click",()=>{d()}),c}function d(t){t&&t.remove()}class m{_audioMap;_audioSources;_container;_engine;_gain;_muteImg;_unmuteImg;_volume;_volumeDownImg;_volumeUpImg;constructor(t,e){this._container=t,this._engine=e,this._volume=0,this._audioSources=[],this._audioMap=new Map}async init(){let t=this._container.actualOptions.sounds;if(!t?.enable)return;if(t.autoPlay&&(0,l.E3)()){let t=()=>{removeEventListener(r.m,t),removeEventListener(r.s,t),(0,l.XK)(),this.unmute()},e={capture:!0,once:!0};addEventListener(r.m,t,e),addEventListener(r.s,t,e)}this._volume=t.volume.value;let e=t.events;for(let t of(this._audioMap=new Map,e)){if(!t.audio)continue;let e=(0,u.executeOnSingleOrMultiple)(t.audio,async t=>{let e=await fetch(t.source);if(!e.ok)return;let i=await e.arrayBuffer(),n=this._getAudioContext(),s=await n.decodeAudioData(i);this._audioMap.set(t.source,s)});e instanceof Promise?await e:await Promise.allSettled(e)}}async mute(){this._container.muted||await this.toggleMute()}async start(){let t=this._container,e=t.actualOptions,i=e.sounds;if(!i?.enable||!t.canvas.element)return;t.muted=!0;let n=t.canvas.element,s={top:n.offsetTop,right:n.offsetLeft+n.offsetWidth},{mute:a,unmute:u,volumeDown:r,volumeUp:d}=i.icons,m=async()=>{await this.toggleMute()},h=i.icons.enable?o.Block:o.None;this._muteImg=c({container:t,options:e,pos:s,display:h,iconOptions:a,margin:10,rightOffsets:[r.width,d.width],clickCb:m}),this._unmuteImg=c({container:t,options:e,pos:s,display:o.None,iconOptions:u,margin:10,rightOffsets:[r.width,d.width],clickCb:m}),this._volumeDownImg=c({container:t,options:e,pos:s,display:h,iconOptions:r,margin:10,rightOffsets:[d.width],clickCb:async()=>{await this.volumeDown()}}),this._volumeUpImg=c({container:t,options:e,pos:s,display:h,iconOptions:d,margin:10,rightOffsets:[],clickCb:async()=>{await this.volumeUp()}}),!(0,l.E3)()&&i.autoPlay&&await this.unmute()}stop(){this._container.muted=!0,(async()=>{await this._mute(),d(this._muteImg),d(this._unmuteImg),d(this._volumeDownImg),d(this._volumeUpImg)})()}async toggleMute(){let t=this._container;t.muted=!t.muted,this._updateMuteIcons(),await this._updateMuteStatus()}async unmute(){this._container.muted&&await this.toggleMute()}async volumeDown(){let t=this._container,e=t.actualOptions.sounds;e?.enable&&(t.muted&&(this._volume=0),this._volume-=e.volume.step,await this._updateVolume())}async volumeUp(){let t=this._container.actualOptions.sounds;t?.enable&&(this._volume+=t.volume.step,await this._updateVolume())}_addBuffer=t=>{let e=t.createBufferSource();return this._audioSources.push(e),e};_addOscillator=t=>{let e=t.createOscillator();return this._audioSources.push(e),e};_getAudioContext(){let t=this._container;return t.audioContext??=new AudioContext,t.audioContext}_initEvents=()=>{let t=this._container,e=t.actualOptions.sounds;if(e?.enable&&t.canvas.element)for(let t of e.events){let e=i=>{i&&(async()=>{let n=t.filter&&!t.filter(i);if(this._container===i.container){if(this._container.muted||this._container.destroyed)return(0,u.executeOnSingleOrMultiple)(t.event,t=>{this._engine.removeEventListener(t,e)});if(!n){if(t.audio){let e=(0,u.itemFromSingleOrMultiple)(t.audio);if(!e)return;this._playBuffer(e)}else if(t.melodies){let e=(0,u.itemFromArray)(t.melodies);if(!e)return;e.melodies.length?await Promise.allSettled(e.melodies.map(t=>this._playNote(t.notes,0,e.loop))):await this._playNote(e.notes,0,e.loop)}else if(t.notes){let e=(0,u.itemFromArray)(t.notes);if(!e)return;await this._playNote([e],0,!1)}}}})()};(0,u.executeOnSingleOrMultiple)(t.event,t=>{this._engine.addEventListener(t,e)})}};_mute=async()=>{let t=this._container,e=this._getAudioContext();for(let t of this._audioSources)this._removeAudioSource(t);this._gain&&this._gain.disconnect(),await e.close(),t.audioContext=void 0,this._engine.dispatchEvent(a.mute,{container:this._container})};_playBuffer=t=>{let e=this._audioMap.get(t.source);if(!e)return;let i=this._container.audioContext;if(!i)return;let n=this._addBuffer(i);n.loop=t.loop,n.buffer=e,n.connect(this._gain??i.destination),n.start()};_playFrequency=async(t,e)=>{if(!this._gain||this._container.muted)return;let i=this._getAudioContext(),n=this._addOscillator(i);return n.connect(this._gain),n.type="sine",n.frequency.value=t,n.start(),new Promise(t=>{setTimeout(()=>{this._removeAudioSource(n),t()},e)})};_playMuteSound=()=>{if(this._container.muted)return;let t=this._getAudioContext(),e=t.createGain();e.connect(t.destination),e.gain.value=0;let i=t.createOscillator();i.connect(e),i.type="sine",i.frequency.value=1,i.start(),setTimeout(()=>{i.stop(),i.disconnect(),e.disconnect()})};_playNote=async(t,e,i)=>{if(this._container.muted)return;let n=t[e];if(!n)return;let s=n.value,a=(0,u.executeOnSingleOrMultiple)(s,async(i,n)=>this._playNoteValue(t,e,n));await ((0,u.isArray)(a)?Promise.allSettled(a):a);let o=e+1;i&&o>=t.length&&(o%=t.length),await this._playNote(t,o,i)};_playNoteValue=async(t,e,i)=>{let n=t[e];if(!n)return;let s=(0,u.itemFromSingleOrMultiple)(n.value,i,!0);if(s)try{let t=(0,l.jE)(s);if(!(0,u.isNumber)(t))return;await this._playFrequency(t,n.duration)}catch(t){(0,u.getLogger)().error(t)}};_removeAudioSource=t=>{t.stop(),t.disconnect(),this._audioSources.splice(this._audioSources.indexOf(t),1)};_unmute=()=>{let t=this._container.actualOptions.sounds;if(!t)return;let e=this._getAudioContext(),i=e.createGain();i.connect(e.destination),i.gain.value=t.volume.value/u.percentDenominator,this._gain=i,this._initEvents(),this._engine.dispatchEvent(a.unmute,{container:this._container})};_updateMuteIcons=()=>{let t=this._container,e=t.actualOptions.sounds;if(!e?.enable||!e.icons.enable)return;let i=this._muteImg,n=this._unmuteImg;i&&(i.style.display=t.muted?"block":"none"),n&&(n.style.display=t.muted?"none":"block")};_updateMuteStatus=async()=>{let t=this._container,e=this._getAudioContext();t.muted?(await e.suspend(),await this._mute()):(await e.resume(),this._unmute(),this._playMuteSound())};_updateVolume=async()=>{let t=this._container,e=t.actualOptions.sounds;if(!e?.enable)return;(0,u.clamp)(this._volume,e.volume.min,e.volume.max);let i=!1;this._volume<=0&&!t.muted?(this._volume=0,t.muted=!0,i=!0):this._volume>0&&t.muted&&(t.muted=!1,i=!0),i&&(this._updateMuteIcons(),await this._updateMuteStatus()),this._gain?.gain&&(this._gain.gain.value=this._volume/u.percentDenominator)}}}}]);
@@ -1,4 +1,4 @@
1
- "use strict";(this.webpackChunk_tsparticles_plugin_sounds=this.webpackChunk_tsparticles_plugin_sounds||[]).push([[760],{760(e,t,s){s.d(t,{SoundsPlugin:()=>m});var i=s(878),l=s(303);class o{loop;source;constructor(){this.loop=!1,this.source=""}load(e){(0,l.isNull)(e)||((0,l.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,l.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,l.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,l.isNull)(e)&&(void 0!==e.event&&(this.event=e.event),void 0!==e.audio&&((0,l.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,l.isString)(e.filter)){let t=globalThis[e.filter];(0,l.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,l.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"?>
1
+ "use strict";(this.webpackChunk_tsparticles_plugin_sounds=this.webpackChunk_tsparticles_plugin_sounds||[]).push([[807],{807(e,t,s){s.d(t,{SoundsPlugin:()=>m});var i=s(794),l=s(303);class o{loop;source;constructor(){this.loop=!1,this.source=""}load(e){(0,l.isNull)(e)||((0,l.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,l.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,l.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,l.isNull)(e)&&(void 0!==e.event&&(this.event=e.event),void 0!==e.audio&&((0,l.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,l.isString)(e.filter)){let t=globalThis[e.filter];(0,l.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,l.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,l.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,l.isNull)(e)||((0,l.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,l.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(838);let p=()=>{removeEventListener(i.m,p),removeEventListener(i.s,p),(0,r.XK)()};class m{id="sounds";_engine;constructor(e){this._engine=e;const t={capture:!0,once:!0};addEventListener(i.m,p,t),addEventListener(i.s,p,t)}async getPlugin(e){let{SoundsPluginInstance:t}=await s.e(434).then(s.bind(s,434));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}}},838(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}},878(e,t,s){s.d(t,{m:()=>i,s:()=>l});let i="pointerdown",l="touchstart"}}]);
33
+ </svg>`}load(e){(0,l.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,l.isNull)(e)||((0,l.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,l.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(946);let p=()=>{removeEventListener(i.m,p),removeEventListener(i.s,p),(0,r.XK)()};class m{id="sounds";_engine;constructor(e){this._engine=e;const t={capture:!0,once:!0};addEventListener(i.m,p,t),addEventListener(i.s,p,t)}async getPlugin(e){let{SoundsPluginInstance:t}=await s.e(249).then(s.bind(s,249));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}}},794(e,t,s){s.d(t,{m:()=>i,s:()=>l});let i="pointerdown",l="touchstart"},946(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/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export async function loadSoundsPlugin(engine) {
2
- engine.checkVersion("4.0.0-alpha.18");
2
+ engine.checkVersion("4.0.0-alpha.20");
3
3
  await engine.register(async (e) => {
4
4
  const { SoundsPlugin } = await import("./SoundsPlugin.js");
5
5
  e.addPlugin(new SoundsPlugin(engine));
package/cjs/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export async function loadSoundsPlugin(engine) {
2
- engine.checkVersion("4.0.0-alpha.18");
2
+ engine.checkVersion("4.0.0-alpha.20");
3
3
  await engine.register(async (e) => {
4
4
  const { SoundsPlugin } = await import("./SoundsPlugin.js");
5
5
  e.addPlugin(new SoundsPlugin(engine));
@@ -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-alpha.18
7
+ * v4.0.0-alpha.20
8
8
  */
9
9
  "use strict";
10
10
  /*
@@ -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-alpha.18
7
+ * v4.0.0-alpha.20
8
8
  */
9
9
  "use strict";
10
10
  /*
package/esm/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export async function loadSoundsPlugin(engine) {
2
- engine.checkVersion("4.0.0-alpha.18");
2
+ engine.checkVersion("4.0.0-alpha.20");
3
3
  await engine.register(async (e) => {
4
4
  const { SoundsPlugin } = await import("./SoundsPlugin.js");
5
5
  e.addPlugin(new SoundsPlugin(engine));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsparticles/plugin-sounds",
3
- "version": "4.0.0-alpha.18",
3
+ "version": "4.0.0-alpha.20",
4
4
  "description": "tsParticles sounds plugin",
5
5
  "homepage": "https://particles.js.org",
6
6
  "repository": {
@@ -86,7 +86,7 @@
86
86
  "./package.json": "./package.json"
87
87
  },
88
88
  "dependencies": {
89
- "@tsparticles/engine": "4.0.0-alpha.18"
89
+ "@tsparticles/engine": "4.0.0-alpha.20"
90
90
  },
91
91
  "publishConfig": {
92
92
  "access": "public"
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 [4 Feb 2026 at 09:20]</title>
6
+ <title>@tsparticles/plugin-sounds [4 Feb 2026 at 15:38]</title>
7
7
  <link rel="shortcut icon" 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=" type="image/x-icon" />
8
8
 
9
9
  <script>
@@ -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-alpha.18
7
+ * v4.0.0-alpha.20
8
8
  */
9
9
  /*
10
10
  * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
@@ -28,16 +28,6 @@ return /******/ (() => { // webpackBootstrap
28
28
  /******/ "use strict";
29
29
  /******/ var __webpack_modules__ = ({
30
30
 
31
- /***/ "./dist/browser/index.js"
32
- /*!*******************************!*\
33
- !*** ./dist/browser/index.js ***!
34
- \*******************************/
35
- (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
36
-
37
- 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-alpha.18\");\n await engine.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.addPlugin(new SoundsPlugin(engine));\n });\n}\n\n\n//# sourceURL=webpack://@tsparticles/plugin-sounds/./dist/browser/index.js?\n}");
38
-
39
- /***/ },
40
-
41
31
  /***/ "@tsparticles/engine"
42
32
  /*!*********************************************************************************************************************************!*\
43
33
  !*** external {"commonjs":"@tsparticles/engine","commonjs2":"@tsparticles/engine","amd":"@tsparticles/engine","root":"window"} ***!
@@ -46,6 +36,16 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
46
36
 
47
37
  module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_engine__;
48
38
 
39
+ /***/ },
40
+
41
+ /***/ "./dist/browser/index.js"
42
+ /*!*******************************!*\
43
+ !*** ./dist/browser/index.js ***!
44
+ \*******************************/
45
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
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-alpha.20\");\n await engine.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.addPlugin(new SoundsPlugin(engine));\n });\n}\n\n\n//# sourceURL=webpack://@tsparticles/plugin-sounds/./dist/browser/index.js?\n}");
48
+
49
49
  /***/ }
50
50
 
51
51
  /******/ });
@@ -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 c=u[l];if(c.getAttribute("src")==e||c.getAttribute("data-webpack")=="@tsparticles/plugin-sounds:"+r){n=c;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 p=(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(p.bind(null,void 0,{type:"timeout",target:n}),12e4);n.onerror=p.bind(null,n.onerror),n.onload=p.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 c=l.getElementsByTagName("script");if(c.length)for(var p=c.length-1;p>-1&&(!u||!/^http(s?):/.test(u));)u=c[p--].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-alpha.18"),await e.register(async t=>{let{SoundsPlugin:r}=await a.e(760).then(a.bind(a,760));t.addPlugin(new r(e))})}return a.r(d),a.d(d,{loadSoundsPlugin:()=>f}),d})());
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-alpha.20"),await e.register(async t=>{let{SoundsPlugin:r}=await a.e(807).then(a.bind(a,807));t.addPlugin(new r(e))})}return a.r(d),a.d(d,{loadSoundsPlugin:()=>f}),d})());
package/umd/index.js CHANGED
@@ -45,7 +45,7 @@ var __importStar = (this && this.__importStar) || (function () {
45
45
  Object.defineProperty(exports, "__esModule", { value: true });
46
46
  exports.loadSoundsPlugin = loadSoundsPlugin;
47
47
  async function loadSoundsPlugin(engine) {
48
- engine.checkVersion("4.0.0-alpha.18");
48
+ engine.checkVersion("4.0.0-alpha.20");
49
49
  await engine.register(async (e) => {
50
50
  const { SoundsPlugin } = await (__syncRequire ? Promise.resolve().then(() => __importStar(require("./SoundsPlugin.js"))) : new Promise((resolve_1, reject_1) => { require(["./SoundsPlugin.js"], resolve_1, reject_1); }).then(__importStar));
51
51
  e.addPlugin(new SoundsPlugin(engine));