@skewedaspect/sage 0.9.0-beta.2 → 0.9.0-beta.3

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 (26) hide show
  1. package/dist/{abstractAudioBus-C4O1vkCH.js → abstractAudioBus-50ESgr5J.js} +2 -2
  2. package/dist/{abstractAudioBus-C4O1vkCH.js.map → abstractAudioBus-50ESgr5J.js.map} +1 -1
  3. package/dist/{abstractSoundInstance-Ojv9HUsA.js → abstractSoundInstance-BoTeF1F6.js} +3 -3
  4. package/dist/{abstractSoundInstance-Ojv9HUsA.js.map → abstractSoundInstance-BoTeF1F6.js.map} +1 -1
  5. package/dist/{abstractSoundSource-B4K-9snf.js → abstractSoundSource-BWm5ACOK.js} +2 -2
  6. package/dist/{abstractSoundSource-B4K-9snf.js.map → abstractSoundSource-BWm5ACOK.js.map} +1 -1
  7. package/dist/{sage-xiX6P4Dl.js → sage-Bwhok4u0.js} +117 -113
  8. package/dist/{sage-xiX6P4Dl.js.map → sage-Bwhok4u0.js.map} +1 -1
  9. package/dist/sage.es.js +1 -1
  10. package/dist/sage.umd.js +2 -2
  11. package/dist/sage.umd.js.map +1 -1
  12. package/dist/{spatialWebAudio-CUPyGUDC.js → spatialWebAudio-Cp_oAUwR.js} +3 -3
  13. package/dist/{spatialWebAudio-CUPyGUDC.js.map → spatialWebAudio-Cp_oAUwR.js.map} +1 -1
  14. package/dist/{webAudioBaseSubGraph-KtziJf_K.js → webAudioBaseSubGraph-DAVqsPvl.js} +2 -2
  15. package/dist/{webAudioBaseSubGraph-KtziJf_K.js.map → webAudioBaseSubGraph-DAVqsPvl.js.map} +1 -1
  16. package/dist/{webAudioBus-BO_GcV0u.js → webAudioBus-DV93-yHU.js} +3 -3
  17. package/dist/{webAudioBus-BO_GcV0u.js.map → webAudioBus-DV93-yHU.js.map} +1 -1
  18. package/dist/{webAudioMainBus-DR3wyocY.js → webAudioMainBus-QijE0Exs.js} +3 -3
  19. package/dist/{webAudioMainBus-DR3wyocY.js.map → webAudioMainBus-QijE0Exs.js.map} +1 -1
  20. package/dist/{webAudioSoundSource-DBhSP5-M.js → webAudioSoundSource-W4Yf9w6S.js} +3 -3
  21. package/dist/{webAudioSoundSource-DBhSP5-M.js.map → webAudioSoundSource-W4Yf9w6S.js.map} +1 -1
  22. package/dist/{webAudioStaticSound-CEj-2W9T.js → webAudioStaticSound-CItyvBZz.js} +4 -4
  23. package/dist/{webAudioStaticSound-CEj-2W9T.js.map → webAudioStaticSound-CItyvBZz.js.map} +1 -1
  24. package/dist/{webAudioStreamingSound-DaKxJI43.js → webAudioStreamingSound-CE56gpkx.js} +4 -4
  25. package/dist/{webAudioStreamingSound-DaKxJI43.js.map → webAudioStreamingSound-CE56gpkx.js.map} +1 -1
  26. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { A as o } from "./webAudioBaseSubGraph-KtziJf_K.js";
1
+ import { A as o } from "./webAudioBaseSubGraph-DAVqsPvl.js";
2
2
  class A extends o {
3
3
  constructor(s, t) {
4
4
  super(
@@ -12,4 +12,4 @@ class A extends o {
12
12
  export {
13
13
  A
14
14
  };
15
- //# sourceMappingURL=abstractAudioBus-C4O1vkCH.js.map
15
+ //# sourceMappingURL=abstractAudioBus-50ESgr5J.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"abstractAudioBus-C4O1vkCH.js","sources":["../node_modules/@babylonjs/core/AudioV2/abstractAudio/abstractAudioBus.js"],"sourcesContent":["import { AbstractAudioOutNode } from \"./abstractAudioOutNode.js\";\n/**\n * Abstract class representing an audio bus with volume control.\n *\n * An audio bus is a node in the audio graph that can have multiple inputs and outputs. It is typically used to group\n * sounds together and apply effects to them.\n */\nexport class AbstractAudioBus extends AbstractAudioOutNode {\n constructor(name, engine) {\n super(name, engine, 3 /* AudioNodeType.HAS_INPUTS_AND_OUTPUTS */);\n }\n}\n//# sourceMappingURL=abstractAudioBus.js.map"],"names":["AbstractAudioBus","AbstractAudioOutNode","name","engine"],"mappings":";AAOO,MAAMA,UAAyBC,EAAqB;AAAA,EACvD,YAAYC,GAAMC,GAAQ;AACtB;AAAA,MAAMD;AAAA,MAAMC;AAAA,MAAQ;AAAA;AAAA,IAAC;AAAA,EACzB;AACJ;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"abstractAudioBus-50ESgr5J.js","sources":["../node_modules/@babylonjs/core/AudioV2/abstractAudio/abstractAudioBus.js"],"sourcesContent":["import { AbstractAudioOutNode } from \"./abstractAudioOutNode.js\";\n/**\n * Abstract class representing an audio bus with volume control.\n *\n * An audio bus is a node in the audio graph that can have multiple inputs and outputs. It is typically used to group\n * sounds together and apply effects to them.\n */\nexport class AbstractAudioBus extends AbstractAudioOutNode {\n constructor(name, engine) {\n super(name, engine, 3 /* AudioNodeType.HAS_INPUTS_AND_OUTPUTS */);\n }\n}\n//# sourceMappingURL=abstractAudioBus.js.map"],"names":["AbstractAudioBus","AbstractAudioOutNode","name","engine"],"mappings":";AAOO,MAAMA,UAAyBC,EAAqB;AAAA,EACvD,YAAYC,GAAMC,GAAQ;AACtB;AAAA,MAAMD;AAAA,MAAMC;AAAA,MAAQ;AAAA;AAAA,IAAC;AAAA,EACzB;AACJ;","x_google_ignoreList":[0]}
@@ -1,5 +1,5 @@
1
- import { O as i, A as r } from "./sage-xiX6P4Dl.js";
2
- import { A as o } from "./abstractSoundSource-B4K-9snf.js";
1
+ import { O as i, A as r } from "./sage-Bwhok4u0.js";
2
+ import { A as o } from "./abstractSoundSource-BWm5ACOK.js";
3
3
  class _ extends o {
4
4
  constructor(t, s, e) {
5
5
  super(
@@ -153,4 +153,4 @@ export {
153
153
  _ as A,
154
154
  l as _
155
155
  };
156
- //# sourceMappingURL=abstractSoundInstance-Ojv9HUsA.js.map
156
+ //# sourceMappingURL=abstractSoundInstance-BoTeF1F6.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"abstractSoundInstance-Ojv9HUsA.js","sources":["../node_modules/@babylonjs/core/AudioV2/abstractAudio/abstractSound.js","../node_modules/@babylonjs/core/AudioV2/abstractAudio/abstractSoundInstance.js"],"sourcesContent":["import { Observable } from \"../../Misc/observable.js\";\nimport { AbstractSoundSource } from \"./abstractSoundSource.js\";\n/**\n * Abstract class representing a sound in the audio engine.\n */\nexport class AbstractSound extends AbstractSoundSource {\n constructor(name, engine, options) {\n super(name, engine, options, 3 /* AudioNodeType.HAS_INPUTS_AND_OUTPUTS */); // Inputs are for instances.\n this._newestInstance = null;\n this._privateInstances = new Set();\n this._state = 1 /* SoundState.Stopped */;\n this._instances = this._privateInstances;\n /**\n * Observable for when the sound stops playing.\n */\n this.onEndedObservable = new Observable();\n this._onInstanceEnded = (instance) => {\n if (this._newestInstance === instance) {\n this._newestInstance = null;\n }\n this._privateInstances.delete(instance);\n if (this._instances.size === 0) {\n this._state = 1 /* SoundState.Stopped */;\n this.onEndedObservable.notifyObservers(this);\n }\n instance.dispose();\n };\n }\n /**\n * The number of active instances of the sound that are currently playing.\n */\n get activeInstancesCount() {\n return this._instances.size;\n }\n /**\n * Whether the sound should start playing automatically. Defaults to `false`.\n */\n get autoplay() {\n return this._options.autoplay;\n }\n /**\n * The current playback time of the sound, in seconds.\n */\n get currentTime() {\n const instance = this._getNewestInstance();\n return instance ? instance.currentTime : 0;\n }\n set currentTime(value) {\n this.startOffset = value;\n const instance = this._getNewestInstance();\n if (instance) {\n instance.currentTime = value;\n }\n }\n /**\n * Whether the sound should loop. Defaults to `false`.\n */\n get loop() {\n return this._options.loop;\n }\n set loop(value) {\n this._options.loop = value;\n }\n /**\n * The maximum number of instances that can play at the same time. Defaults to `Infinity`.\n */\n get maxInstances() {\n return this._options.maxInstances;\n }\n set maxInstances(value) {\n this._options.maxInstances = value;\n }\n /**\n * The time within the sound buffer to start playing at, in seconds. Defaults to `0`.\n */\n get startOffset() {\n return this._options.startOffset;\n }\n set startOffset(value) {\n this._options.startOffset = value;\n }\n /**\n * The state of the sound.\n */\n get state() {\n return this._state;\n }\n /**\n * Releases associated resources.\n */\n dispose() {\n super.dispose();\n this.stop();\n this._newestInstance = null;\n this._privateInstances.clear();\n this.onEndedObservable.clear();\n }\n /**\n * Pauses the sound.\n */\n pause() {\n const it = this._instances.values();\n for (let next = it.next(); !next.done; next = it.next()) {\n next.value.pause();\n }\n this._state = 5 /* SoundState.Paused */;\n }\n /**\n * Resumes the sound.\n */\n resume() {\n if (this._state !== 5 /* SoundState.Paused */) {\n return;\n }\n const it = this._instances.values();\n for (let next = it.next(); !next.done; next = it.next()) {\n next.value.resume();\n }\n this._state = 3 /* SoundState.Started */;\n }\n _beforePlay(instance) {\n if (this.state === 5 /* SoundState.Paused */ && this._instances.size > 0) {\n this.resume();\n return;\n }\n instance.onEndedObservable.addOnce(this._onInstanceEnded);\n this._privateInstances.add(instance);\n this._newestInstance = instance;\n }\n _afterPlay(instance) {\n this._state = instance.state;\n }\n _getNewestInstance() {\n if (this._instances.size === 0) {\n return null;\n }\n if (!this._newestInstance) {\n const it = this._instances.values();\n for (let next = it.next(); !next.done; next = it.next()) {\n this._newestInstance = next.value;\n }\n }\n return this._newestInstance;\n }\n _setState(state) {\n this._state = state;\n }\n _stopExcessInstances() {\n if (this.maxInstances < Infinity) {\n const numberOfInstancesToStop = Array.from(this._instances).filter((instance) => instance.state === 3 /* SoundState.Started */).length - this.maxInstances;\n const it = this._instances.values();\n for (let i = 0; i < numberOfInstancesToStop; i++) {\n const instance = it.next().value;\n instance.stop();\n }\n }\n }\n}\n//# sourceMappingURL=abstractSound.js.map","import { Observable } from \"../../Misc/observable.js\";\nimport { AbstractAudioNode } from \"./abstractAudioNode.js\";\n/** @internal */\nexport class _AbstractSoundInstance extends AbstractAudioNode {\n constructor(sound) {\n super(sound.engine, 2 /* AudioNodeType.HAS_OUTPUTS */);\n this._state = 1 /* SoundState.Stopped */;\n /** Observable triggered when the sound instance's playback ends */\n this.onEndedObservable = new Observable();\n /** Observable triggered if the sound instance encounters an error and can not be played */\n this.onErrorObservable = new Observable();\n /** Observable triggered when the sound instance's state changes */\n this.onStateChangedObservable = new Observable();\n this._sound = sound;\n }\n /** The playback state of the sound instance */\n get state() {\n return this._state;\n }\n /** @internal */\n dispose() {\n super.dispose();\n this.stop();\n this.onEndedObservable.clear();\n this.onStateChangedObservable.clear();\n }\n _setState(value) {\n if (this._state === value) {\n return;\n }\n this._state = value;\n this.onStateChangedObservable.notifyObservers(this);\n if (this._state === 1 /* SoundState.Stopped */) {\n this.onEndedObservable.notifyObservers(this);\n }\n }\n}\n//# sourceMappingURL=abstractSoundInstance.js.map"],"names":["AbstractSound","AbstractSoundSource","name","engine","options","Observable","instance","value","it","next","state","numberOfInstancesToStop","i","_AbstractSoundInstance","AbstractAudioNode","sound"],"mappings":";;AAKO,MAAMA,UAAsBC,EAAoB;AAAA,EACnD,YAAYC,GAAMC,GAAQC,GAAS;AAC/B;AAAA,MAAMF;AAAA,MAAMC;AAAA,MAAQC;AAAA,MAAS;AAAA;AAAA,IAAC,GAC9B,KAAK,kBAAkB,MACvB,KAAK,oBAAoB,oBAAI,IAAG,GAChC,KAAK,SAAS,GACd,KAAK,aAAa,KAAK,mBAIvB,KAAK,oBAAoB,IAAIC,EAAU,GACvC,KAAK,mBAAmB,CAACC,MAAa;AAClC,MAAI,KAAK,oBAAoBA,MACzB,KAAK,kBAAkB,OAE3B,KAAK,kBAAkB,OAAOA,CAAQ,GAClC,KAAK,WAAW,SAAS,MACzB,KAAK,SAAS,GACd,KAAK,kBAAkB,gBAAgB,IAAI,IAE/CA,EAAS,QAAO;AAAA,IACpB;AAAA,EACJ;AAAA;AAAA;AAAA;AAAA,EAIA,IAAI,uBAAuB;AACvB,WAAO,KAAK,WAAW;AAAA,EAC3B;AAAA;AAAA;AAAA;AAAA,EAIA,IAAI,WAAW;AACX,WAAO,KAAK,SAAS;AAAA,EACzB;AAAA;AAAA;AAAA;AAAA,EAIA,IAAI,cAAc;AACd,UAAMA,IAAW,KAAK,mBAAkB;AACxC,WAAOA,IAAWA,EAAS,cAAc;AAAA,EAC7C;AAAA,EACA,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A,EAChB;AAAA;AAAA,EAEA,UAAU;AACN,UAAM,QAAO,GACb,KAAK,KAAI,GACT,KAAK,kBAAkB,MAAK,GAC5B,KAAK,yBAAyB,MAAK;AAAA,EACvC;AAAA,EACA,UAAUR,GAAO;AACb,IAAI,KAAK,WAAWA,MAGpB,KAAK,SAASA,GACd,KAAK,yBAAyB,gBAAgB,IAAI,GAC9C,KAAK,WAAW,KAChB,KAAK,kBAAkB,gBAAgB,IAAI;AAAA,EAEnD;AACJ;","x_google_ignoreList":[0,1]}
1
+ {"version":3,"file":"abstractSoundInstance-BoTeF1F6.js","sources":["../node_modules/@babylonjs/core/AudioV2/abstractAudio/abstractSound.js","../node_modules/@babylonjs/core/AudioV2/abstractAudio/abstractSoundInstance.js"],"sourcesContent":["import { Observable } from \"../../Misc/observable.js\";\nimport { AbstractSoundSource } from \"./abstractSoundSource.js\";\n/**\n * Abstract class representing a sound in the audio engine.\n */\nexport class AbstractSound extends AbstractSoundSource {\n constructor(name, engine, options) {\n super(name, engine, options, 3 /* AudioNodeType.HAS_INPUTS_AND_OUTPUTS */); // Inputs are for instances.\n this._newestInstance = null;\n this._privateInstances = new Set();\n this._state = 1 /* SoundState.Stopped */;\n this._instances = this._privateInstances;\n /**\n * Observable for when the sound stops playing.\n */\n this.onEndedObservable = new Observable();\n this._onInstanceEnded = (instance) => {\n if (this._newestInstance === instance) {\n this._newestInstance = null;\n }\n this._privateInstances.delete(instance);\n if (this._instances.size === 0) {\n this._state = 1 /* SoundState.Stopped */;\n this.onEndedObservable.notifyObservers(this);\n }\n instance.dispose();\n };\n }\n /**\n * The number of active instances of the sound that are currently playing.\n */\n get activeInstancesCount() {\n return this._instances.size;\n }\n /**\n * Whether the sound should start playing automatically. Defaults to `false`.\n */\n get autoplay() {\n return this._options.autoplay;\n }\n /**\n * The current playback time of the sound, in seconds.\n */\n get currentTime() {\n const instance = this._getNewestInstance();\n return instance ? instance.currentTime : 0;\n }\n set currentTime(value) {\n this.startOffset = value;\n const instance = this._getNewestInstance();\n if (instance) {\n instance.currentTime = value;\n }\n }\n /**\n * Whether the sound should loop. Defaults to `false`.\n */\n get loop() {\n return this._options.loop;\n }\n set loop(value) {\n this._options.loop = value;\n }\n /**\n * The maximum number of instances that can play at the same time. Defaults to `Infinity`.\n */\n get maxInstances() {\n return this._options.maxInstances;\n }\n set maxInstances(value) {\n this._options.maxInstances = value;\n }\n /**\n * The time within the sound buffer to start playing at, in seconds. Defaults to `0`.\n */\n get startOffset() {\n return this._options.startOffset;\n }\n set startOffset(value) {\n this._options.startOffset = value;\n }\n /**\n * The state of the sound.\n */\n get state() {\n return this._state;\n }\n /**\n * Releases associated resources.\n */\n dispose() {\n super.dispose();\n this.stop();\n this._newestInstance = null;\n this._privateInstances.clear();\n this.onEndedObservable.clear();\n }\n /**\n * Pauses the sound.\n */\n pause() {\n const it = this._instances.values();\n for (let next = it.next(); !next.done; next = it.next()) {\n next.value.pause();\n }\n this._state = 5 /* SoundState.Paused */;\n }\n /**\n * Resumes the sound.\n */\n resume() {\n if (this._state !== 5 /* SoundState.Paused */) {\n return;\n }\n const it = this._instances.values();\n for (let next = it.next(); !next.done; next = it.next()) {\n next.value.resume();\n }\n this._state = 3 /* SoundState.Started */;\n }\n _beforePlay(instance) {\n if (this.state === 5 /* SoundState.Paused */ && this._instances.size > 0) {\n this.resume();\n return;\n }\n instance.onEndedObservable.addOnce(this._onInstanceEnded);\n this._privateInstances.add(instance);\n this._newestInstance = instance;\n }\n _afterPlay(instance) {\n this._state = instance.state;\n }\n _getNewestInstance() {\n if (this._instances.size === 0) {\n return null;\n }\n if (!this._newestInstance) {\n const it = this._instances.values();\n for (let next = it.next(); !next.done; next = it.next()) {\n this._newestInstance = next.value;\n }\n }\n return this._newestInstance;\n }\n _setState(state) {\n this._state = state;\n }\n _stopExcessInstances() {\n if (this.maxInstances < Infinity) {\n const numberOfInstancesToStop = Array.from(this._instances).filter((instance) => instance.state === 3 /* SoundState.Started */).length - this.maxInstances;\n const it = this._instances.values();\n for (let i = 0; i < numberOfInstancesToStop; i++) {\n const instance = it.next().value;\n instance.stop();\n }\n }\n }\n}\n//# sourceMappingURL=abstractSound.js.map","import { Observable } from \"../../Misc/observable.js\";\nimport { AbstractAudioNode } from \"./abstractAudioNode.js\";\n/** @internal */\nexport class _AbstractSoundInstance extends AbstractAudioNode {\n constructor(sound) {\n super(sound.engine, 2 /* AudioNodeType.HAS_OUTPUTS */);\n this._state = 1 /* SoundState.Stopped */;\n /** Observable triggered when the sound instance's playback ends */\n this.onEndedObservable = new Observable();\n /** Observable triggered if the sound instance encounters an error and can not be played */\n this.onErrorObservable = new Observable();\n /** Observable triggered when the sound instance's state changes */\n this.onStateChangedObservable = new Observable();\n this._sound = sound;\n }\n /** The playback state of the sound instance */\n get state() {\n return this._state;\n }\n /** @internal */\n dispose() {\n super.dispose();\n this.stop();\n this.onEndedObservable.clear();\n this.onStateChangedObservable.clear();\n }\n _setState(value) {\n if (this._state === value) {\n return;\n }\n this._state = value;\n this.onStateChangedObservable.notifyObservers(this);\n if (this._state === 1 /* SoundState.Stopped */) {\n this.onEndedObservable.notifyObservers(this);\n }\n }\n}\n//# sourceMappingURL=abstractSoundInstance.js.map"],"names":["AbstractSound","AbstractSoundSource","name","engine","options","Observable","instance","value","it","next","state","numberOfInstancesToStop","i","_AbstractSoundInstance","AbstractAudioNode","sound"],"mappings":";;AAKO,MAAMA,UAAsBC,EAAoB;AAAA,EACnD,YAAYC,GAAMC,GAAQC,GAAS;AAC/B;AAAA,MAAMF;AAAA,MAAMC;AAAA,MAAQC;AAAA,MAAS;AAAA;AAAA,IAAC,GAC9B,KAAK,kBAAkB,MACvB,KAAK,oBAAoB,oBAAI,IAAG,GAChC,KAAK,SAAS,GACd,KAAK,aAAa,KAAK,mBAIvB,KAAK,oBAAoB,IAAIC,EAAU,GACvC,KAAK,mBAAmB,CAACC,MAAa;AAClC,MAAI,KAAK,oBAAoBA,MACzB,KAAK,kBAAkB,OAE3B,KAAK,kBAAkB,OAAOA,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AI,GAAGA,IAAID,GAAyBC;AAEzC,QADiBJ,EAAG,KAAI,EAAG,MAClB,KAAI;AAAA,IAErB;AAAA,EACJ;AACJ;AC1JO,MAAMK,UAA+BC,EAAkB;AAAA,EAC1D,YAAYC,GAAO;AACf;AAAA,MAAMA,EAAM;AAAA,MAAQ;AAAA;AAAA,IAAC,GACrB,KAAK,SAAS,GAEd,KAAK,oBAAoB,IAAIV,EAAU,GAEvC,KAAK,oBAAoB,IAAIA,EAAU,GAEvC,KAAK,2BAA2B,IAAIA,EAAU,GAC9C,KAAK,SAASU;AAAA,EAClB;AAAA;AAAA,EAEA,IAAI,QAAQ;AACR,WAAO,KAAK;AAAA,EAChB;AAAA;AAAA,EAEA,UAAU;AACN,UAAM,QAAO,GACb,KAAK,KAAI,GACT,KAAK,kBAAkB,MAAK,GAC5B,KAAK,yBAAyB,MAAK;AAAA,EACvC;AAAA,EACA,UAAUR,GAAO;AACb,IAAI,KAAK,WAAWA,MAGpB,KAAK,SAASA,GACd,KAAK,yBAAyB,gBAAgB,IAAI,GAC9C,KAAK,WAAW,KAChB,KAAK,kBAAkB,gBAAgB,IAAI;AAAA,EAEnD;AACJ;","x_google_ignoreList":[0,1]}
@@ -1,4 +1,4 @@
1
- import { A as e } from "./webAudioBaseSubGraph-KtziJf_K.js";
1
+ import { A as e } from "./webAudioBaseSubGraph-DAVqsPvl.js";
2
2
  class p extends e {
3
3
  constructor(t, i, s, a = 2) {
4
4
  super(t, i, a), this._spatialAutoUpdate = !0, this._spatialMinUpdateTime = 0, this._outBus = null, this._spatial = null, this._onOutBusDisposed = null, typeof s.spatialAutoUpdate == "boolean" && (this._spatialAutoUpdate = s.spatialAutoUpdate), typeof s.spatialMinUpdateTime == "number" && (this._spatialMinUpdateTime = s.spatialMinUpdateTime);
@@ -46,4 +46,4 @@ class p extends e {
46
46
  export {
47
47
  p as A
48
48
  };
49
- //# sourceMappingURL=abstractSoundSource-B4K-9snf.js.map
49
+ //# sourceMappingURL=abstractSoundSource-BWm5ACOK.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"abstractSoundSource-B4K-9snf.js","sources":["../node_modules/@babylonjs/core/AudioV2/abstractAudio/abstractSoundSource.js"],"sourcesContent":["import { AbstractAudioOutNode } from \"./abstractAudioOutNode.js\";\n/**\n * Abstract class representing a sound in the audio engine.\n */\nexport class AbstractSoundSource extends AbstractAudioOutNode {\n constructor(name, engine, options, nodeType = 2 /* AudioNodeType.HAS_OUTPUTS */) {\n super(name, engine, nodeType);\n this._spatialAutoUpdate = true;\n this._spatialMinUpdateTime = 0;\n this._outBus = null;\n this._spatial = null;\n this._onOutBusDisposed = null;\n if (typeof options.spatialAutoUpdate === \"boolean\") {\n this._spatialAutoUpdate = options.spatialAutoUpdate;\n }\n if (typeof options.spatialMinUpdateTime === \"number\") {\n this._spatialMinUpdateTime = options.spatialMinUpdateTime;\n }\n }\n /**\n * The output bus for the sound.\n * @see {@link AudioEngineV2.defaultMainBus}\n */\n get outBus() {\n return this._outBus;\n }\n set outBus(outBus) {\n if (this._outBus === outBus) {\n return;\n }\n if (this._outBus) {\n if (this._onOutBusDisposed) {\n this._outBus.onDisposeObservable.removeCallback(this._onOutBusDisposed);\n this._onOutBusDisposed = null;\n }\n if (!this._disconnect(this._outBus)) {\n throw new Error(\"Disconnect failed\");\n }\n }\n this._outBus = outBus;\n if (this._outBus) {\n this._onOutBusDisposed = () => {\n this._outBus = null;\n };\n this._outBus.onDisposeObservable.add(this._onOutBusDisposed);\n if (!this._connect(this._outBus)) {\n throw new Error(\"Connect failed\");\n }\n }\n }\n /**\n * The spatial audio features.\n */\n get spatial() {\n if (this._spatial) {\n return this._spatial;\n }\n return this._initSpatialProperty();\n }\n /**\n * Releases associated resources.\n */\n dispose() {\n super.dispose();\n this._spatial?.dispose();\n this._spatial = null;\n if (this._outBus && this._onOutBusDisposed) {\n this._outBus.onDisposeObservable.removeCallback(this._onOutBusDisposed);\n this._onOutBusDisposed = null;\n }\n this._outBus = null;\n }\n _initSpatialProperty() {\n return (this._spatial = this._createSpatialProperty(this._spatialAutoUpdate, this._spatialMinUpdateTime));\n }\n /** @internal */\n get _isSpatial() {\n return this._spatial !== null;\n }\n set _isSpatial(value) {\n if (value && !this._spatial) {\n this._initSpatialProperty();\n }\n else if (!value && this._spatial) {\n this._spatial.dispose();\n this._spatial = null;\n }\n }\n}\n//# sourceMappingURL=abstractSoundSource.js.map"],"names":["AbstractSoundSource","AbstractAudioOutNode","name","engine","options","nodeType","outBus","value"],"mappings":";AAIO,MAAMA,UAA4BC,EAAqB;AAAA,EAC1D,YAAYC,GAAMC,GAAQC,GAASC,IAAW,GAAmC;AAC7E,UAAMH,GAAMC,GAAQE,CAAQ,GAC5B,KAAK,qBAAqB,IAC1B,KAAK,wBAAwB,GAC7B,KAAK,UAAU,MACf,KAAK,WAAW,MAChB,KAAK,oBAAoB,MACrB,OAAOD,EAAQ,qBAAsB,cACrC,KAAK,qBAAqBA,EAAQ,oBAElC,OAAOA,EAAQ,wBAAyB,aACxC,KAAK,wBAAwBA,EAAQ;AAAA,EAE7C;AAAA;AAAA;AAAA;AAAA;AAAA,EAKA,IAAI,SAAS;AACT,WAAO,KAAK;AAAA,EAChB;AAAA,EACA,IAAI,OAAOE,GAAQ;AACf,QAAI,KAAK,YAAYA,GAGrB;AAAA,UAAI,KAAK,YACD,KAAK,sBACL,KAAK,QAAQ,oBAAoB,eAAe,KAAK,iBAAiB,GACtE,KAAK,oBAAoB,OAEzB,CAAC,KAAK,YAAY,KAAK,OAAO;AAC9B,cAAM,IAAI,MAAM,mBAAmB;AAI3C,UADA,KAAK,UAAUA,GACX,KAAK,YACL,KAAK,oBAAoB,MAAM;AAC3B,aAAK,UAAU;AAAA,MACnB,GACA,KAAK,QAAQ,oBAAoB,IAAI,KAAK,iBAAiB,GACvD,CAAC,KAAK,SAAS,KAAK,OAAO;AAC3B,cAAM,IAAI,MAAM,gBAAgB;AAAA;AAAA,EAG5C;AAAA;AAAA;AAAA;AAAA,EAIA,IAAI,UAAU;AACV,WAAI,KAAK,WACE,KAAK,WAET,KAAK,qBAAoB;AAAA,EACpC;AAAA;AAAA;AAAA;AAAA,EAIA,UAAU;AACN,UAAM,QAAO,GACb,KAAK,UAAU,QAAO,GACtB,KAAK,WAAW,MACZ,KAAK,WAAW,KAAK,sBACrB,KAAK,QAAQ,oBAAoB,eAAe,KAAK,iBAAiB,GACtE,KAAK,oBAAoB,OAE7B,KAAK,UAAU;AAAA,EACnB;AAAA,EACA,uBAAuB;AACnB,WAAQ,KAAK,WAAW,KAAK,uBAAuB,KAAK,oBAAoB,KAAK,qBAAqB;AAAA,EAC3G;AAAA;AAAA,EAEA,IAAI,aAAa;AACb,WAAO,KAAK,aAAa;AAAA,EAC7B;AAAA,EACA,IAAI,WAAWC,GAAO;AAClB,IAAIA,KAAS,CAAC,KAAK,WACf,KAAK,qBAAoB,IAEpB,CAACA,KAAS,KAAK,aACpB,KAAK,SAAS,QAAO,GACrB,KAAK,WAAW;AAAA,EAExB;AACJ;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"abstractSoundSource-BWm5ACOK.js","sources":["../node_modules/@babylonjs/core/AudioV2/abstractAudio/abstractSoundSource.js"],"sourcesContent":["import { AbstractAudioOutNode } from \"./abstractAudioOutNode.js\";\n/**\n * Abstract class representing a sound in the audio engine.\n */\nexport class AbstractSoundSource extends AbstractAudioOutNode {\n constructor(name, engine, options, nodeType = 2 /* AudioNodeType.HAS_OUTPUTS */) {\n super(name, engine, nodeType);\n this._spatialAutoUpdate = true;\n this._spatialMinUpdateTime = 0;\n this._outBus = null;\n this._spatial = null;\n this._onOutBusDisposed = null;\n if (typeof options.spatialAutoUpdate === \"boolean\") {\n this._spatialAutoUpdate = options.spatialAutoUpdate;\n }\n if (typeof options.spatialMinUpdateTime === \"number\") {\n this._spatialMinUpdateTime = options.spatialMinUpdateTime;\n }\n }\n /**\n * The output bus for the sound.\n * @see {@link AudioEngineV2.defaultMainBus}\n */\n get outBus() {\n return this._outBus;\n }\n set outBus(outBus) {\n if (this._outBus === outBus) {\n return;\n }\n if (this._outBus) {\n if (this._onOutBusDisposed) {\n this._outBus.onDisposeObservable.removeCallback(this._onOutBusDisposed);\n this._onOutBusDisposed = null;\n }\n if (!this._disconnect(this._outBus)) {\n throw new Error(\"Disconnect failed\");\n }\n }\n this._outBus = outBus;\n if (this._outBus) {\n this._onOutBusDisposed = () => {\n this._outBus = null;\n };\n this._outBus.onDisposeObservable.add(this._onOutBusDisposed);\n if (!this._connect(this._outBus)) {\n throw new Error(\"Connect failed\");\n }\n }\n }\n /**\n * The spatial audio features.\n */\n get spatial() {\n if (this._spatial) {\n return this._spatial;\n }\n return this._initSpatialProperty();\n }\n /**\n * Releases associated resources.\n */\n dispose() {\n super.dispose();\n this._spatial?.dispose();\n this._spatial = null;\n if (this._outBus && this._onOutBusDisposed) {\n this._outBus.onDisposeObservable.removeCallback(this._onOutBusDisposed);\n this._onOutBusDisposed = null;\n }\n this._outBus = null;\n }\n _initSpatialProperty() {\n return (this._spatial = this._createSpatialProperty(this._spatialAutoUpdate, this._spatialMinUpdateTime));\n }\n /** @internal */\n get _isSpatial() {\n return this._spatial !== null;\n }\n set _isSpatial(value) {\n if (value && !this._spatial) {\n this._initSpatialProperty();\n }\n else if (!value && this._spatial) {\n this._spatial.dispose();\n this._spatial = null;\n }\n }\n}\n//# sourceMappingURL=abstractSoundSource.js.map"],"names":["AbstractSoundSource","AbstractAudioOutNode","name","engine","options","nodeType","outBus","value"],"mappings":";AAIO,MAAMA,UAA4BC,EAAqB;AAAA,EAC1D,YAAYC,GAAMC,GAAQC,GAASC,IAAW,GAAmC;AAC7E,UAAMH,GAAMC,GAAQE,CAAQ,GAC5B,KAAK,qBAAqB,IAC1B,KAAK,wBAAwB,GAC7B,KAAK,UAAU,MACf,KAAK,WAAW,MAChB,KAAK,oBAAoB,MACrB,OAAOD,EAAQ,qBAAsB,cACrC,KAAK,qBAAqBA,EAAQ,oBAElC,OAAOA,EAAQ,wBAAyB,aACxC,KAA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reList":[0]}
@@ -1,6 +1,6 @@
1
1
  import { Scene as _e, Vector3 as mt, HavokPlugin as qt, FreeCamera as me, HemisphericLight as ge, DirectionalLight as fe, PointLight as ye, SpotLight as pe, MeshBuilder as it, PhysicsAggregate as Yt, LoadAssetContainerAsync as we, ImportMeshAsync as xe, ImageProcessingConfiguration as ht, DefaultRenderingPipeline as be, Color4 as ve, SSAO2RenderingPipeline as Re, TransformNode as Te, PBRMaterial as ze, Color3 as dt, StandardMaterial as Me, NullEngine as Ae, WebGPUEngine as Ce, Engine as Se, SoundState as Fe, Mesh as lt, PhysicsShapeType as gt, AbstractMesh as Kt, ActionManager as zt, ExecuteCodeAction as Ee } from "@babylonjs/core";
2
2
  import $e from "@babylonjs/havok";
3
- const ft = "0.9.0-beta.2";
3
+ const ft = "0.9.0-beta.3";
4
4
  class De {
5
5
  canvas;
6
6
  renderEngine;
@@ -871,18 +871,18 @@ class Xt {
871
871
  }
872
872
  Xt._UpdateFlagSeed = 0;
873
873
  function Ze(c, t, e, s = 0) {
874
- const i = c.asArray(), n = t.asArray(), o = i[0], r = i[1], a = i[2], h = i[3], l = i[4], u = i[5], m = i[6], y = i[7], f = i[8], b = i[9], M = i[10], A = i[11], w = i[12], C = i[13], T = i[14], $ = i[15], z = n[0], D = n[1], I = n[2], Z = n[3], H = n[4], q = n[5], L = n[6], P = n[7], S = n[8], X = n[9], Y = n[10], et = n[11], G = n[12], W = n[13], K = n[14], V = n[15];
875
- e[s] = o * z + r * H + a * S + h * G, e[s + 1] = o * D + r * q + a * X + h * W, e[s + 2] = o * I + r * L + a * Y + h * K, e[s + 3] = o * Z + r * P + a * et + h * V, e[s + 4] = l * z + u * H + m * S + y * G, e[s + 5] = l * D + u * q + m * X + y * W, e[s + 6] = l * I + u * L + m * Y + y * K, e[s + 7] = l * Z + u * P + m * et + y * V, e[s + 8] = f * z + b * H + M * S + A * G, e[s + 9] = f * D + b * q + M * X + A * W, e[s + 10] = f * I + b * L + M * Y + A * K, e[s + 11] = f * Z + b * P + M * et + A * V, e[s + 12] = w * z + C * H + T * S + $ * G, e[s + 13] = w * D + C * q + T * X + $ * W, e[s + 14] = w * I + C * L + T * Y + $ * K, e[s + 15] = w * Z + C * P + T * et + $ * V;
874
+ const i = c.asArray(), n = t.asArray(), o = i[0], r = i[1], a = i[2], h = i[3], l = i[4], u = i[5], m = i[6], y = i[7], f = i[8], x = i[9], A = i[10], z = i[11], w = i[12], $ = i[13], T = i[14], D = i[15], M = n[0], C = n[1], I = n[2], Z = n[3], H = n[4], q = n[5], L = n[6], P = n[7], S = n[8], X = n[9], Y = n[10], et = n[11], G = n[12], W = n[13], K = n[14], V = n[15];
875
+ e[s] = o * M + r * H + a * S + h * G, e[s + 1] = o * C + r * q + a * X + h * W, e[s + 2] = o * I + r * L + a * Y + h * K, e[s + 3] = o * Z + r * P + a * et + h * V, e[s + 4] = l * M + u * H + m * S + y * G, e[s + 5] = l * C + u * q + m * X + y * W, e[s + 6] = l * I + u * L + m * Y + y * K, e[s + 7] = l * Z + u * P + m * et + y * V, e[s + 8] = f * M + x * H + A * S + z * G, e[s + 9] = f * C + x * q + A * X + z * W, e[s + 10] = f * I + x * L + A * Y + z * K, e[s + 11] = f * Z + x * P + A * et + z * V, e[s + 12] = w * M + $ * H + T * S + D * G, e[s + 13] = w * C + $ * q + T * X + D * W, e[s + 14] = w * I + $ * L + T * Y + D * K, e[s + 15] = w * Z + $ * P + T * et + D * V;
876
876
  }
877
877
  function qe(c, t, e = 0) {
878
878
  const s = c.asArray();
879
879
  t[e] = s[0], t[e + 1] = s[1], t[e + 2] = s[2], t[e + 3] = s[3], t[e + 4] = s[4], t[e + 5] = s[5], t[e + 6] = s[6], t[e + 7] = s[7], t[e + 8] = s[8], t[e + 9] = s[9], t[e + 10] = s[10], t[e + 11] = s[11], t[e + 12] = s[12], t[e + 13] = s[13], t[e + 14] = s[14], t[e + 15] = s[15];
880
880
  }
881
881
  function Ye(c, t) {
882
- const e = c.asArray(), s = e[0], i = e[1], n = e[2], o = e[3], r = e[4], a = e[5], h = e[6], l = e[7], u = e[8], m = e[9], y = e[10], f = e[11], b = e[12], M = e[13], A = e[14], w = e[15], C = y * w - A * f, T = m * w - M * f, $ = m * A - M * y, z = u * w - b * f, D = u * A - y * b, I = u * M - b * m, Z = +(a * C - h * T + l * $), H = -(r * C - h * z + l * D), q = +(r * T - a * z + l * I), L = -(r * $ - a * D + h * I), P = s * Z + i * H + n * q + o * L;
882
+ const e = c.asArray(), s = e[0], i = e[1], n = e[2], o = e[3], r = e[4], a = e[5], h = e[6], l = e[7], u = e[8], m = e[9], y = e[10], f = e[11], x = e[12], A = e[13], z = e[14], w = e[15], $ = y * w - z * f, T = m * w - A * f, D = m * z - A * y, M = u * w - x * f, C = u * z - y * x, I = u * A - x * m, Z = +(a * $ - h * T + l * D), H = -(r * $ - h * M + l * C), q = +(r * T - a * M + l * I), L = -(r * D - a * C + h * I), P = s * Z + i * H + n * q + o * L;
883
883
  if (P === 0)
884
884
  return !1;
885
- const S = 1 / P, X = h * w - A * l, Y = a * w - M * l, et = a * A - M * h, G = r * w - b * l, W = r * A - b * h, K = r * M - b * a, V = h * f - y * l, st = a * f - m * l, at = a * y - m * h, Et = r * f - u * l, $t = r * y - u * h, Dt = r * m - u * a, ee = -(i * C - n * T + o * $), se = +(s * C - n * z + o * D), ie = -(s * T - i * z + o * I), ne = +(s * $ - i * D + n * I), oe = +(i * X - n * Y + o * et), re = -(s * X - n * G + o * W), ae = +(s * Y - i * G + o * K), he = -(s * et - i * W + n * K), ce = -(i * V - n * st + o * at), le = +(s * V - n * Et + o * $t), de = -(s * st - i * Et + o * Dt), ue = +(s * at - i * $t + n * Dt);
885
+ const S = 1 / P, X = h * w - z * l, Y = a * w - A * l, et = a * z - A * h, G = r * w - x * l, W = r * z - x * h, K = r * A - x * a, V = h * f - y * l, st = a * f - m * l, at = a * y - m * h, Et = r * f - u * l, $t = r * y - u * h, Dt = r * m - u * a, ee = -(i * $ - n * T + o * D), se = +(s * $ - n * M + o * C), ie = -(s * T - i * M + o * I), ne = +(s * D - i * C + n * I), oe = +(i * X - n * Y + o * et), re = -(s * X - n * G + o * W), ae = +(s * Y - i * G + o * K), he = -(s * et - i * W + n * K), ce = -(i * V - n * st + o * at), le = +(s * V - n * Et + o * $t), de = -(s * st - i * Et + o * Dt), ue = +(s * at - i * $t + n * Dt);
886
886
  return t[0] = Z * S, t[1] = ee * S, t[2] = oe * S, t[3] = ce * S, t[4] = H * S, t[5] = se * S, t[6] = re * S, t[7] = le * S, t[8] = q * S, t[9] = ie * S, t[10] = ae * S, t[11] = de * S, t[12] = L * S, t[13] = ne * S, t[14] = he * S, t[15] = ue * S, !0;
887
887
  }
888
888
  const U = (c) => parseInt(c.toString().replace(/\W/g, ""));
@@ -3135,27 +3135,27 @@ class d {
3135
3135
  if (f < N)
3136
3136
  return n.copyFrom(e), d.Distance(t, e);
3137
3137
  h.normalizeFromLength(f);
3138
- let b = l.length();
3139
- if (b < N)
3138
+ let x = l.length();
3139
+ if (x < N)
3140
3140
  return n.copyFrom(e), 0;
3141
- l.normalizeFromLength(b);
3142
- const M = d.Dot(h, l), A = g.Vector3[5], w = g.Vector3[6];
3143
- A.copyFrom(h).scaleInPlace(-b * M), w.copyFrom(t).addInPlace(A);
3144
- const C = g.Vector3[4], T = g.Vector3[5], $ = g.Vector3[7], z = g.Vector3[8];
3145
- C.copyFrom(o).scaleInPlace(1 / u), z.copyFrom(r).scaleInPlace(1 / m), C.addInPlace(z).scaleInPlace(-1), T.copyFrom(o).scaleInPlace(-1 / u), z.copyFrom(a).scaleInPlace(1 / y), T.addInPlace(z).scaleInPlace(-1), $.copyFrom(a).scaleInPlace(-1 / y), z.copyFrom(r).scaleInPlace(-1 / m), $.addInPlace(z).scaleInPlace(-1);
3146
- const D = g.Vector3[9];
3141
+ l.normalizeFromLength(x);
3142
+ const A = d.Dot(h, l), z = g.Vector3[5], w = g.Vector3[6];
3143
+ z.copyFrom(h).scaleInPlace(-x * A), w.copyFrom(t).addInPlace(z);
3144
+ const $ = g.Vector3[4], T = g.Vector3[5], D = g.Vector3[7], M = g.Vector3[8];
3145
+ $.copyFrom(o).scaleInPlace(1 / u), M.copyFrom(r).scaleInPlace(1 / m), $.addInPlace(M).scaleInPlace(-1), T.copyFrom(o).scaleInPlace(-1 / u), M.copyFrom(a).scaleInPlace(1 / y), T.addInPlace(M).scaleInPlace(-1), D.copyFrom(a).scaleInPlace(-1 / y), M.copyFrom(r).scaleInPlace(-1 / m), D.addInPlace(M).scaleInPlace(-1);
3146
+ const C = g.Vector3[9];
3147
3147
  let I;
3148
- D.copyFrom(w).subtractInPlace(e), d.CrossToRef(C, D, z), I = d.Dot(z, h);
3148
+ C.copyFrom(w).subtractInPlace(e), d.CrossToRef($, C, M), I = d.Dot(M, h);
3149
3149
  const Z = I;
3150
- D.copyFrom(w).subtractInPlace(s), d.CrossToRef(T, D, z), I = d.Dot(z, h);
3150
+ C.copyFrom(w).subtractInPlace(s), d.CrossToRef(T, C, M), I = d.Dot(M, h);
3151
3151
  const H = I;
3152
- D.copyFrom(w).subtractInPlace(i), d.CrossToRef($, D, z), I = d.Dot(z, h);
3152
+ C.copyFrom(w).subtractInPlace(i), d.CrossToRef(D, C, M), I = d.Dot(M, h);
3153
3153
  const q = I, L = g.Vector3[10];
3154
3154
  let P, S;
3155
3155
  Z > 0 && H < 0 ? (L.copyFrom(o), P = e, S = s) : H > 0 && q < 0 ? (L.copyFrom(a), P = s, S = i) : (L.copyFrom(r).scaleInPlace(-1), P = i, S = e);
3156
3156
  const X = g.Vector3[9], Y = g.Vector3[4];
3157
- if (P.subtractToRef(w, z), S.subtractToRef(w, X), d.CrossToRef(z, X, Y), !(d.Dot(Y, h) < 0))
3158
- return n.copyFrom(w), Math.abs(b * M);
3157
+ if (P.subtractToRef(w, M), S.subtractToRef(w, X), d.CrossToRef(M, X, Y), !(d.Dot(Y, h) < 0))
3158
+ return n.copyFrom(w), Math.abs(x * A);
3159
3159
  const G = g.Vector3[5];
3160
3160
  d.CrossToRef(L, Y, G), G.normalize();
3161
3161
  const W = g.Vector3[9];
@@ -3165,9 +3165,9 @@ class d {
3165
3165
  return n.copyFrom(P), d.Distance(t, P);
3166
3166
  W.normalizeFromLength(K);
3167
3167
  const V = d.Dot(G, W), st = g.Vector3[7];
3168
- st.copyFrom(w).addInPlace(G.scaleInPlace(K * V)), z.copyFrom(st).subtractInPlace(P), b = L.length(), L.normalizeFromLength(b);
3169
- let at = d.Dot(z, L) / Math.max(b, N);
3170
- return at = B(at, 0, 1), st.copyFrom(P).addInPlace(L.scaleInPlace(at * b)), n.copyFrom(st), d.Distance(t, st);
3168
+ st.copyFrom(w).addInPlace(G.scaleInPlace(K * V)), M.copyFrom(st).subtractInPlace(P), x = L.length(), L.normalizeFromLength(x);
3169
+ let at = d.Dot(M, L) / Math.max(x, N);
3170
+ return at = B(at, 0, 1), st.copyFrom(P).addInPlace(L.scaleInPlace(at * x)), n.copyFrom(st), d.Distance(t, st);
3171
3171
  }
3172
3172
  /**
3173
3173
  * Returns a new Vector3 located at the center between "value1" and "value2"
@@ -4947,8 +4947,8 @@ class p {
4947
4947
  * @returns the new interpolated quaternion
4948
4948
  */
4949
4949
  static Hermite(t, e, s, i, n) {
4950
- const o = n * n, r = n * o, a = 2 * r - 3 * o + 1, h = -2 * r + 3 * o, l = r - 2 * o + n, u = r - o, m = t._x * a + s._x * h + e._x * l + i._x * u, y = t._y * a + s._y * h + e._y * l + i._y * u, f = t._z * a + s._z * h + e._z * l + i._z * u, b = t._w * a + s._w * h + e._w * l + i._w * u;
4951
- return new p(m, y, f, b);
4950
+ const o = n * n, r = n * o, a = 2 * r - 3 * o + 1, h = -2 * r + 3 * o, l = r - 2 * o + n, u = r - o, m = t._x * a + s._x * h + e._x * l + i._x * u, y = t._y * a + s._y * h + e._y * l + i._y * u, f = t._z * a + s._z * h + e._z * l + i._z * u, x = t._w * a + s._w * h + e._w * l + i._w * u;
4951
+ return new p(m, y, f, x);
4952
4952
  }
4953
4953
  /**
4954
4954
  * Returns a new Quaternion which is the 1st derivative of the Hermite spline defined by the quaternions "value1", "value2", "tangent1", "tangent2".
@@ -5156,7 +5156,7 @@ class _ {
5156
5156
  determinant() {
5157
5157
  if (this._isIdentity === !0)
5158
5158
  return 1;
5159
- const t = this._m, e = t[0], s = t[1], i = t[2], n = t[3], o = t[4], r = t[5], a = t[6], h = t[7], l = t[8], u = t[9], m = t[10], y = t[11], f = t[12], b = t[13], M = t[14], A = t[15], w = m * A - M * y, C = u * A - b * y, T = u * M - b * m, $ = l * A - f * y, z = l * M - m * f, D = l * b - f * u, I = +(r * w - a * C + h * T), Z = -(o * w - a * $ + h * z), H = +(o * C - r * $ + h * D), q = -(o * T - r * z + a * D);
5159
+ const t = this._m, e = t[0], s = t[1], i = t[2], n = t[3], o = t[4], r = t[5], a = t[6], h = t[7], l = t[8], u = t[9], m = t[10], y = t[11], f = t[12], x = t[13], A = t[14], z = t[15], w = m * z - A * y, $ = u * z - x * y, T = u * A - x * m, D = l * z - f * y, M = l * A - m * f, C = l * x - f * u, I = +(r * w - a * $ + h * T), Z = -(o * w - a * D + h * M), H = +(o * $ - r * D + h * C), q = -(o * T - r * M + a * C);
5160
5160
  return e * I + s * Z + i * H + n * q;
5161
5161
  }
5162
5162
  // Methods
@@ -5843,9 +5843,9 @@ ${this.m[12]}, ${this.m[13]}, ${this.m[14]}, ${this.m[15]}}`;
5843
5843
  * @param initialM44 defines 4th value of 4th row
5844
5844
  * @param result defines the target matrix
5845
5845
  */
5846
- static FromValuesToRef(t, e, s, i, n, o, r, a, h, l, u, m, y, f, b, M, A) {
5847
- const w = A._m;
5848
- w[0] = t, w[1] = e, w[2] = s, w[3] = i, w[4] = n, w[5] = o, w[6] = r, w[7] = a, w[8] = h, w[9] = l, w[10] = u, w[11] = m, w[12] = y, w[13] = f, w[14] = b, w[15] = M, A.markAsUpdated();
5846
+ static FromValuesToRef(t, e, s, i, n, o, r, a, h, l, u, m, y, f, x, A, z) {
5847
+ const w = z._m;
5848
+ w[0] = t, w[1] = e, w[2] = s, w[3] = i, w[4] = n, w[5] = o, w[6] = r, w[7] = a, w[8] = h, w[9] = l, w[10] = u, w[11] = m, w[12] = y, w[13] = f, w[14] = x, w[15] = A, z.markAsUpdated();
5849
5849
  }
5850
5850
  /**
5851
5851
  * Creates new matrix from a list of values (16)
@@ -5867,9 +5867,9 @@ ${this.m[12]}, ${this.m[13]}, ${this.m[14]}, ${this.m[15]}}`;
5867
5867
  * @param initialM44 defines 4th value of 4th row
5868
5868
  * @returns the new matrix
5869
5869
  */
5870
- static FromValues(t, e, s, i, n, o, r, a, h, l, u, m, y, f, b, M) {
5871
- const A = new _(), w = A._m;
5872
- return w[0] = t, w[1] = e, w[2] = s, w[3] = i, w[4] = n, w[5] = o, w[6] = r, w[7] = a, w[8] = h, w[9] = l, w[10] = u, w[11] = m, w[12] = y, w[13] = f, w[14] = b, w[15] = M, A.markAsUpdated(), A;
5870
+ static FromValues(t, e, s, i, n, o, r, a, h, l, u, m, y, f, x, A) {
5871
+ const z = new _(), w = z._m;
5872
+ return w[0] = t, w[1] = e, w[2] = s, w[3] = i, w[4] = n, w[5] = o, w[6] = r, w[7] = a, w[8] = h, w[9] = l, w[10] = u, w[11] = m, w[12] = y, w[13] = f, w[14] = x, w[15] = A, z.markAsUpdated(), z;
5873
5873
  }
5874
5874
  /**
5875
5875
  * Creates a new matrix composed by merging scale (vector3), rotation (quaternion) and translation (vector3)
@@ -5893,8 +5893,8 @@ ${this.m[12]}, ${this.m[13]}, ${this.m[14]}, ${this.m[15]}}`;
5893
5893
  * @returns result input
5894
5894
  */
5895
5895
  static ComposeToRef(t, e, s, i) {
5896
- const n = i._m, o = e._x, r = e._y, a = e._z, h = e._w, l = o + o, u = r + r, m = a + a, y = o * l, f = o * u, b = o * m, M = r * u, A = r * m, w = a * m, C = h * l, T = h * u, $ = h * m, z = t._x, D = t._y, I = t._z;
5897
- return n[0] = (1 - (M + w)) * z, n[1] = (f + $) * z, n[2] = (b - T) * z, n[3] = 0, n[4] = (f - $) * D, n[5] = (1 - (y + w)) * D, n[6] = (A + C) * D, n[7] = 0, n[8] = (b + T) * I, n[9] = (A - C) * I, n[10] = (1 - (y + M)) * I, n[11] = 0, n[12] = s._x, n[13] = s._y, n[14] = s._z, n[15] = 1, i.markAsUpdated(), i;
5896
+ const n = i._m, o = e._x, r = e._y, a = e._z, h = e._w, l = o + o, u = r + r, m = a + a, y = o * l, f = o * u, x = o * m, A = r * u, z = r * m, w = a * m, $ = h * l, T = h * u, D = h * m, M = t._x, C = t._y, I = t._z;
5897
+ return n[0] = (1 - (A + w)) * M, n[1] = (f + D) * M, n[2] = (x - T) * M, n[3] = 0, n[4] = (f - D) * C, n[5] = (1 - (y + w)) * C, n[6] = (z + $) * C, n[7] = 0, n[8] = (x + T) * I, n[9] = (z - $) * I, n[10] = (1 - (y + A)) * I, n[11] = 0, n[12] = s._x, n[13] = s._y, n[14] = s._z, n[15] = 1, i.markAsUpdated(), i;
5898
5898
  }
5899
5899
  /**
5900
5900
  * Creates a new identity matrix
@@ -6356,8 +6356,8 @@ ${this.m[12]}, ${this.m[13]}, ${this.m[14]}, ${this.m[15]}}`;
6356
6356
  * @returns result input
6357
6357
  */
6358
6358
  static OrthoOffCenterLHToRef(t, e, s, i, n, o, r, a) {
6359
- const h = n, l = o, u = 2 / (e - t), m = 2 / (i - s), y = 2 / (l - h), f = -(l + h) / (l - h), b = (t + e) / (t - e), M = (i + s) / (s - i);
6360
- return _.FromValuesToRef(u, 0, 0, 0, 0, m, 0, 0, 0, 0, y, 0, b, M, f, 1, r), a && r.multiplyToRef(rt, r), r.markAsUpdated(), r;
6359
+ const h = n, l = o, u = 2 / (e - t), m = 2 / (i - s), y = 2 / (l - h), f = -(l + h) / (l - h), x = (t + e) / (t - e), A = (i + s) / (s - i);
6360
+ return _.FromValuesToRef(u, 0, 0, 0, 0, m, 0, 0, 0, 0, y, 0, x, A, f, 1, r), a && r.multiplyToRef(rt, r), r.markAsUpdated(), r;
6361
6361
  }
6362
6362
  /**
6363
6363
  * Stores a left-handed oblique projection into a given matrix
@@ -6475,8 +6475,8 @@ ${this.m[12]}, ${this.m[13]}, ${this.m[14]}, ${this.m[15]}}`;
6475
6475
  * @returns result input
6476
6476
  */
6477
6477
  static PerspectiveFovLHToRef(t, e, s, i, n, o = !0, r, a = 0, h = !1) {
6478
- const l = s, u = i, m = 1 / Math.tan(t * 0.5), y = o ? m / e : m, f = o ? m : m * e, b = h && l === 0 ? -1 : u !== 0 ? (u + l) / (u - l) : 1, M = h && l === 0 ? 2 * u : u !== 0 ? -2 * u * l / (u - l) : -2 * l, A = Math.tan(a);
6479
- return _.FromValuesToRef(y, 0, 0, 0, 0, f, 0, A, 0, 0, b, 1, 0, 0, M, 0, n), r && n.multiplyToRef(rt, n), n._updateIdentityStatus(!1), n;
6478
+ const l = s, u = i, m = 1 / Math.tan(t * 0.5), y = o ? m / e : m, f = o ? m : m * e, x = h && l === 0 ? -1 : u !== 0 ? (u + l) / (u - l) : 1, A = h && l === 0 ? 2 * u : u !== 0 ? -2 * u * l / (u - l) : -2 * l, z = Math.tan(a);
6479
+ return _.FromValuesToRef(y, 0, 0, 0, 0, f, 0, z, 0, 0, x, 1, 0, 0, A, 0, n), r && n.multiplyToRef(rt, n), n._updateIdentityStatus(!1), n;
6480
6480
  }
6481
6481
  /**
6482
6482
  * Stores a left-handed perspective projection into a given matrix with depth reversed
@@ -6526,8 +6526,8 @@ ${this.m[12]}, ${this.m[13]}, ${this.m[14]}, ${this.m[15]}}`;
6526
6526
  * @returns result input
6527
6527
  */
6528
6528
  static PerspectiveFovRHToRef(t, e, s, i, n, o = !0, r, a = 0, h = !1) {
6529
- const l = s, u = i, m = 1 / Math.tan(t * 0.5), y = o ? m / e : m, f = o ? m : m * e, b = h && l === 0 ? 1 : u !== 0 ? -(u + l) / (u - l) : -1, M = h && l === 0 ? 2 * u : u !== 0 ? -2 * u * l / (u - l) : -2 * l, A = Math.tan(a);
6530
- return _.FromValuesToRef(y, 0, 0, 0, 0, f, 0, A, 0, 0, b, -1, 0, 0, M, 0, n), r && n.multiplyToRef(rt, n), n._updateIdentityStatus(!1), n;
6529
+ const l = s, u = i, m = 1 / Math.tan(t * 0.5), y = o ? m / e : m, f = o ? m : m * e, x = h && l === 0 ? 1 : u !== 0 ? -(u + l) / (u - l) : -1, A = h && l === 0 ? 2 * u : u !== 0 ? -2 * u * l / (u - l) : -2 * l, z = Math.tan(a);
6530
+ return _.FromValuesToRef(y, 0, 0, 0, 0, f, 0, z, 0, 0, x, -1, 0, 0, A, 0, n), r && n.multiplyToRef(rt, n), n._updateIdentityStatus(!1), n;
6531
6531
  }
6532
6532
  /**
6533
6533
  * Stores a right-handed perspective projection into a given matrix
@@ -6597,8 +6597,8 @@ ${this.m[12]}, ${this.m[13]}, ${this.m[14]}, ${this.m[15]}}`;
6597
6597
  * @returns result input
6598
6598
  */
6599
6599
  static TransposeToRef(t, e) {
6600
- const s = t.m, i = s[0], n = s[4], o = s[8], r = s[12], a = s[1], h = s[5], l = s[9], u = s[13], m = s[2], y = s[6], f = s[10], b = s[14], M = s[3], A = s[7], w = s[11], C = s[15], T = e._m;
6601
- return T[0] = i, T[1] = n, T[2] = o, T[3] = r, T[4] = a, T[5] = h, T[6] = l, T[7] = u, T[8] = m, T[9] = y, T[10] = f, T[11] = b, T[12] = M, T[13] = A, T[14] = w, T[15] = C, e.markAsUpdated(), e._updateIdentityStatus(t._isIdentity, t._isIdentityDirty), e;
6600
+ const s = t.m, i = s[0], n = s[4], o = s[8], r = s[12], a = s[1], h = s[5], l = s[9], u = s[13], m = s[2], y = s[6], f = s[10], x = s[14], A = s[3], z = s[7], w = s[11], $ = s[15], T = e._m;
6601
+ return T[0] = i, T[1] = n, T[2] = o, T[3] = r, T[4] = a, T[5] = h, T[6] = l, T[7] = u, T[8] = m, T[9] = y, T[10] = f, T[11] = x, T[12] = A, T[13] = z, T[14] = w, T[15] = $, e.markAsUpdated(), e._updateIdentityStatus(t._isIdentity, t._isIdentityDirty), e;
6602
6602
  }
6603
6603
  /**
6604
6604
  * Computes a reflection matrix from a plane
@@ -6795,20 +6795,20 @@ class ts {
6795
6795
  this._autoUpdate = !1;
6796
6796
  }
6797
6797
  }
6798
- class x {
6798
+ class b {
6799
6799
  static _CheckLimit(t, e) {
6800
- let s = x._LogLimitOutputs[t];
6801
- return s ? s.current++ : (s = { limit: e, current: 1 }, x._LogLimitOutputs[t] = s), s.current <= s.limit;
6800
+ let s = b._LogLimitOutputs[t];
6801
+ return s ? s.current++ : (s = { limit: e, current: 1 }, b._LogLimitOutputs[t] = s), s.current <= s.limit;
6802
6802
  }
6803
6803
  static _GenerateLimitMessage(t, e = 1) {
6804
- const s = x._LogLimitOutputs[t];
6805
- if (!s || !x.MessageLimitReached)
6804
+ const s = b._LogLimitOutputs[t];
6805
+ if (!s || !b.MessageLimitReached)
6806
6806
  return;
6807
6807
  const i = this._Levels[e];
6808
- s.current === s.limit && x[i.name](x.MessageLimitReached.replace(/%LIMIT%/g, "" + s.limit).replace(/%TYPE%/g, i.name ?? ""));
6808
+ s.current === s.limit && b[i.name](b.MessageLimitReached.replace(/%LIMIT%/g, "" + s.limit).replace(/%TYPE%/g, i.name ?? ""));
6809
6809
  }
6810
6810
  static _AddLogEntry(t) {
6811
- x._LogCache = t + x._LogCache, x.OnNewCacheEntry && x.OnNewCacheEntry(t);
6811
+ b._LogCache = t + b._LogCache, b.OnNewCacheEntry && b.OnNewCacheEntry(t);
6812
6812
  }
6813
6813
  static _FormatMessage(t) {
6814
6814
  const e = (i) => i < 10 ? "0" + i : "" + i, s = /* @__PURE__ */ new Date();
@@ -6819,58 +6819,58 @@ class x {
6819
6819
  }
6820
6820
  static _LogEnabled(t = 1, e, s) {
6821
6821
  const i = Array.isArray(e) ? e[0] : e;
6822
- if (s !== void 0 && !x._CheckLimit(i, s))
6822
+ if (s !== void 0 && !b._CheckLimit(i, s))
6823
6823
  return;
6824
- const n = x._FormatMessage(i), o = this._Levels[t], r = Array.isArray(e) ? e.slice(1) : [];
6824
+ const n = b._FormatMessage(i), o = this._Levels[t], r = Array.isArray(e) ? e.slice(1) : [];
6825
6825
  o.logFunc && o.logFunc("BJS - " + n, ...r);
6826
6826
  const a = `<div style='color:${o.color}'>${n}</div><br>`;
6827
- x._AddLogEntry(a), x._GenerateLimitMessage(i, t);
6827
+ b._AddLogEntry(a), b._GenerateLimitMessage(i, t);
6828
6828
  }
6829
6829
  /**
6830
6830
  * Gets current log cache (list of logs)
6831
6831
  */
6832
6832
  static get LogCache() {
6833
- return x._LogCache;
6833
+ return b._LogCache;
6834
6834
  }
6835
6835
  /**
6836
6836
  * Clears the log cache
6837
6837
  */
6838
6838
  static ClearLogCache() {
6839
- x._LogCache = "", x._LogLimitOutputs = {}, x.errorsCount = 0;
6839
+ b._LogCache = "", b._LogLimitOutputs = {}, b.errorsCount = 0;
6840
6840
  }
6841
6841
  /**
6842
6842
  * Sets the current log level. This property is a bit field, allowing you to combine different levels (MessageLogLevel / WarningLogLevel / ErrorLogLevel).
6843
6843
  * Use NoneLogLevel to disable logging and AllLogLevel for a quick way to enable all levels.
6844
6844
  */
6845
6845
  static set LogLevels(t) {
6846
- x.Log = x._LogDisabled, x.Warn = x._LogDisabled, x.Error = x._LogDisabled;
6847
- const e = [x.MessageLogLevel, x.WarningLogLevel, x.ErrorLogLevel];
6846
+ b.Log = b._LogDisabled, b.Warn = b._LogDisabled, b.Error = b._LogDisabled;
6847
+ const e = [b.MessageLogLevel, b.WarningLogLevel, b.ErrorLogLevel];
6848
6848
  for (const s of e)
6849
6849
  if ((t & s) === s) {
6850
6850
  const i = this._Levels[s];
6851
- x[i.name] = x._LogEnabled.bind(x, s);
6851
+ b[i.name] = b._LogEnabled.bind(b, s);
6852
6852
  }
6853
6853
  }
6854
6854
  }
6855
- x.NoneLogLevel = 0;
6856
- x.MessageLogLevel = 1;
6857
- x.WarningLogLevel = 2;
6858
- x.ErrorLogLevel = 4;
6859
- x.AllLogLevel = 7;
6860
- x.MessageLimitReached = "Too many %TYPE%s (%LIMIT%), no more %TYPE%s will be reported for this message.";
6861
- x._LogCache = "";
6862
- x._LogLimitOutputs = {};
6863
- x._Levels = [
6855
+ b.NoneLogLevel = 0;
6856
+ b.MessageLogLevel = 1;
6857
+ b.WarningLogLevel = 2;
6858
+ b.ErrorLogLevel = 4;
6859
+ b.AllLogLevel = 7;
6860
+ b.MessageLimitReached = "Too many %TYPE%s (%LIMIT%), no more %TYPE%s will be reported for this message.";
6861
+ b._LogCache = "";
6862
+ b._LogLimitOutputs = {};
6863
+ b._Levels = [
6864
6864
  {},
6865
6865
  { color: "white", logFunc: console.log, name: "Log" },
6866
6866
  { color: "orange", logFunc: console.warn, name: "Warn" },
6867
6867
  {},
6868
6868
  { color: "red", logFunc: console.error, name: "Error" }
6869
6869
  ];
6870
- x.errorsCount = 0;
6871
- x.Log = x._LogEnabled.bind(x, x.MessageLogLevel);
6872
- x.Warn = x._LogEnabled.bind(x, x.WarningLogLevel);
6873
- x.Error = x._LogEnabled.bind(x, x.ErrorLogLevel);
6870
+ b.errorsCount = 0;
6871
+ b.Log = b._LogEnabled.bind(b, b.MessageLogLevel);
6872
+ b.Warn = b._LogEnabled.bind(b, b.WarningLogLevel);
6873
+ b.Error = b._LogEnabled.bind(b, b.ErrorLogLevel);
6874
6874
  const ni = new RegExp("\\.(\\w{3,4})($|\\?)"), Q = 100, wt = new Float32Array([0, 0]);
6875
6875
  let ct = null, ut = null, _t = null;
6876
6876
  function es() {
@@ -6951,7 +6951,7 @@ class J {
6951
6951
  */
6952
6952
  setTargetValue(t, e = null) {
6953
6953
  if (!Number.isFinite(t)) {
6954
- x.Warn(`Attempted to set audio parameter to non-finite value: ${t}`);
6954
+ b.Warn(`Attempted to set audio parameter to non-finite value: ${t}`);
6955
6955
  return;
6956
6956
  }
6957
6957
  this._param.cancelScheduledValues(0);
@@ -6968,7 +6968,7 @@ class J {
6968
6968
  try {
6969
6969
  this._param.setValueCurveAtTime(is(s, Number.isFinite(this._param.value) ? this._param.value : 0, t), i, n), this._rampEndTime = i + n;
6970
6970
  } catch (o) {
6971
- kt && (x.Warn(`Audio parameter ramping failed: ${o.message}`), kt = !1);
6971
+ kt && (b.Warn(`Audio parameter ramping failed: ${o.message}`), kt = !1);
6972
6972
  }
6973
6973
  }
6974
6974
  }
@@ -7293,12 +7293,12 @@ class us extends Ue {
7293
7293
  }
7294
7294
  /** @internal */
7295
7295
  async createBusAsync(t, e = {}) {
7296
- const s = await import("./webAudioBus-BO_GcV0u.js"), i = new s._WebAudioBus(t, this, e);
7296
+ const s = await import("./webAudioBus-DV93-yHU.js"), i = new s._WebAudioBus(t, this, e);
7297
7297
  return await i._initAsync(e), i;
7298
7298
  }
7299
7299
  /** @internal */
7300
7300
  async createMainBusAsync(t, e = {}) {
7301
- const s = await import("./webAudioMainBus-DR3wyocY.js"), i = new s._WebAudioMainBus(t, this);
7301
+ const s = await import("./webAudioMainBus-QijE0Exs.js"), i = new s._WebAudioMainBus(t, this);
7302
7302
  return await i._initAsync(e), i;
7303
7303
  }
7304
7304
  /** @internal */
@@ -7316,22 +7316,22 @@ class us extends Ue {
7316
7316
  }
7317
7317
  /** @internal */
7318
7318
  async createSoundAsync(t, e, s = {}) {
7319
- const i = await import("./webAudioStaticSound-CEj-2W9T.js"), n = new i._WebAudioStaticSound(t, this, s);
7319
+ const i = await import("./webAudioStaticSound-CItyvBZz.js"), n = new i._WebAudioStaticSound(t, this, s);
7320
7320
  return await n._initAsync(e, s), n;
7321
7321
  }
7322
7322
  /** @internal */
7323
7323
  async createSoundBufferAsync(t, e = {}) {
7324
- const s = await import("./webAudioStaticSound-CEj-2W9T.js"), i = new s._WebAudioStaticSoundBuffer(this);
7324
+ const s = await import("./webAudioStaticSound-CItyvBZz.js"), i = new s._WebAudioStaticSoundBuffer(this);
7325
7325
  return await i._initAsync(t, e), i;
7326
7326
  }
7327
7327
  /** @internal */
7328
7328
  async createSoundSourceAsync(t, e, s = {}) {
7329
- const i = await import("./webAudioSoundSource-DBhSP5-M.js"), n = new i._WebAudioSoundSource(t, e, this, s);
7329
+ const i = await import("./webAudioSoundSource-W4Yf9w6S.js"), n = new i._WebAudioSoundSource(t, e, this, s);
7330
7330
  return await n._initAsync(s), n;
7331
7331
  }
7332
7332
  /** @internal */
7333
7333
  async createStreamingSoundAsync(t, e, s = {}) {
7334
- const i = await import("./webAudioStreamingSound-DaKxJI43.js"), n = new i._WebAudioStreamingSound(t, this, s);
7334
+ const i = await import("./webAudioStreamingSound-CE56gpkx.js"), n = new i._WebAudioStreamingSound(t, this, s);
7335
7335
  return await n._initAsync(e, s), n;
7336
7336
  }
7337
7337
  /** @internal */
@@ -10925,8 +10925,8 @@ class ks {
10925
10925
  value: u.value
10926
10926
  };
10927
10927
  r[y] = f;
10928
- const b = n[y];
10929
- (!b || b.pressed !== f.pressed || b.touched !== f.touched || b.value !== f.value) && (a = !0);
10928
+ const x = n[y];
10929
+ (!x || x.pressed !== f.pressed || x.touched !== f.touched || x.value !== f.value) && (a = !0);
10930
10930
  });
10931
10931
  const h = {};
10932
10932
  let l = !1;
@@ -11751,10 +11751,10 @@ function Xs(c) {
11751
11751
  spatialMaxDistance: u,
11752
11752
  spatialDistanceModel: "linear"
11753
11753
  }
11754
- ).then((b) => {
11755
- l && b.spatial.attach(t);
11756
- }).catch((b) => {
11757
- Gt.error(`Failed to create sound for node "${t.name}": ${b}`);
11754
+ ).then((x) => {
11755
+ l && x.spatial.attach(t);
11756
+ }).catch((x) => {
11757
+ Gt.error(`Failed to create sound for node "${t.name}": ${x}`);
11758
11758
  });
11759
11759
  });
11760
11760
  }
@@ -11816,53 +11816,57 @@ function _i(c) {
11816
11816
  async function mi(c, t, e = {}) {
11817
11817
  const s = new Pe(e.logLevel || "debug"), i = s.getLogger("SAGE");
11818
11818
  i.info(`Initializing SAGE Game Engine v${ft}...`), i.debug("Creating rendering engine...");
11819
- const n = await Bs(c, e.renderOptions || {});
11819
+ const n = {
11820
+ antialias: !0,
11821
+ adaptToDeviceRatio: !0,
11822
+ ...e.renderOptions
11823
+ }, o = await Bs(c, n);
11820
11824
  i.debug("Creating physics engine...");
11821
- const o = await Os(), r = Ns(o);
11825
+ const r = await Os(), a = Ns(r);
11822
11826
  i.debug("Creating event bus...");
11823
- const a = new Le(s);
11827
+ const h = new Le(s);
11824
11828
  i.debug("Creating scene engine...");
11825
- const h = new ms(c, n, o, s);
11829
+ const l = new ms(c, o, r, s);
11826
11830
  i.debug("Creating managers...");
11827
- const l = new gs(a, h, s), u = new Ps(a, c, s), m = new xs(a, s), y = new zs(a, s, m), f = new Fs(a, s), b = new $s(y, f, s), M = new bs(n, a, y, u, f, s);
11831
+ const u = new gs(h, l, s), m = new Ps(h, c, s), y = new xs(h, s), f = new zs(h, s, y), x = new Fs(h, s), A = new $s(f, x, s), z = new bs(o, h, f, m, x, s);
11828
11832
  i.debug("Creating raycast helper...");
11829
- const A = new Us(y);
11833
+ const w = new Us(f);
11830
11834
  i.debug("Creating game timer...");
11831
- const w = new Hs();
11832
- M.registerFrameCallback((z) => w.tick(z * 1e3));
11833
- let C, T;
11834
- e.audioChannels && e.audioChannels.length > 0 && (i.debug("Creating audio engine..."), C = new _s(s), await C.initialize(), i.debug("Creating audio manager..."), T = new Es(C, s), await T.initialize(e.audioChannels)), i.info(`SAGE Game Engine v${ft} initialized successfully.`), i.debug("Loading entities...");
11835
- for (const z of t)
11836
- y.registerEntityDefinition(z);
11835
+ const $ = new Hs();
11836
+ z.registerFrameCallback((C) => $.tick(C * 1e3));
11837
+ let T, D;
11838
+ e.audioChannels && e.audioChannels.length > 0 && (i.debug("Creating audio engine..."), T = new _s(s), await T.initialize(), i.debug("Creating audio manager..."), D = new Es(T, s), await D.initialize(e.audioChannels)), i.info(`SAGE Game Engine v${ft} initialized successfully.`), i.debug("Loading entities...");
11839
+ for (const C of t)
11840
+ f.registerEntityDefinition(C);
11837
11841
  if (i.debug("Registering default input bindings..."), e.bindings)
11838
- for (const z of e.bindings)
11839
- m.registerBinding(z);
11840
- const $ = new De(
11842
+ for (const C of e.bindings)
11843
+ y.registerBinding(C);
11844
+ const M = new De(
11841
11845
  c,
11842
- n,
11843
- r,
11846
+ o,
11844
11847
  a,
11848
+ h,
11845
11849
  s,
11846
- A,
11847
11850
  w,
11851
+ $,
11848
11852
  // Engines
11849
11853
  {
11850
- sceneEngine: h,
11851
- audioEngine: C
11854
+ sceneEngine: l,
11855
+ audioEngine: T
11852
11856
  },
11853
11857
  // Managers
11854
11858
  {
11855
- assetManager: l,
11856
- bindingManager: m,
11857
- entityManager: y,
11858
- gameManager: M,
11859
- inputManager: u,
11860
- levelManager: f,
11861
- saveManager: b,
11862
- audioManager: T
11859
+ assetManager: u,
11860
+ bindingManager: y,
11861
+ entityManager: f,
11862
+ gameManager: z,
11863
+ inputManager: m,
11864
+ levelManager: x,
11865
+ saveManager: A,
11866
+ audioManager: D
11863
11867
  }
11864
11868
  );
11865
- return y.$setGameEngine($), f.$setGameEngine($), $;
11869
+ return f.$setGameEngine(M), x.$setGameEngine(M), M;
11866
11870
  }
11867
11871
  export {
11868
11872
  Js as $,
@@ -11877,7 +11881,7 @@ export {
11877
11881
  Ve as I,
11878
11882
  li as J,
11879
11883
  hi as K,
11880
- x as L,
11884
+ b as L,
11881
11885
  _ as M,
11882
11886
  ke as N,
11883
11887
  tt as O,
@@ -11922,4 +11926,4 @@ export {
11922
11926
  ft as y,
11923
11927
  As as z
11924
11928
  };
11925
- //# sourceMappingURL=sage-xiX6P4Dl.js.map
11929
+ //# sourceMappingURL=sage-Bwhok4u0.js.map