@babylonjs/core 7.54.0 → 7.54.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (175) hide show
  1. package/AudioV2/abstractAudio/abstractAudioBus.d.ts +2 -3
  2. package/AudioV2/abstractAudio/abstractAudioBus.js.map +1 -1
  3. package/AudioV2/abstractAudio/abstractSound.d.ts +2 -3
  4. package/AudioV2/abstractAudio/abstractSound.js.map +1 -1
  5. package/AudioV2/abstractAudio/staticSound.d.ts +11 -14
  6. package/AudioV2/abstractAudio/staticSound.js +6 -8
  7. package/AudioV2/abstractAudio/staticSound.js.map +1 -1
  8. package/AudioV2/abstractAudio/subNodes/spatialAudioSubNode.d.ts +1 -1
  9. package/AudioV2/abstractAudio/subNodes/spatialAudioSubNode.js.map +1 -1
  10. package/AudioV2/webAudio/subNodes/spatialWebAudioSubNode.d.ts +2 -2
  11. package/AudioV2/webAudio/subNodes/spatialWebAudioSubNode.js +7 -7
  12. package/AudioV2/webAudio/subNodes/spatialWebAudioSubNode.js.map +1 -1
  13. package/AudioV2/webAudio/subNodes/stereoWebAudioSubNode.d.ts +2 -2
  14. package/AudioV2/webAudio/subNodes/stereoWebAudioSubNode.js +7 -7
  15. package/AudioV2/webAudio/subNodes/stereoWebAudioSubNode.js.map +1 -1
  16. package/AudioV2/webAudio/subNodes/volumeWebAudioSubNode.d.ts +2 -2
  17. package/AudioV2/webAudio/subNodes/volumeWebAudioSubNode.js +7 -7
  18. package/AudioV2/webAudio/subNodes/volumeWebAudioSubNode.js.map +1 -1
  19. package/AudioV2/webAudio/subNodes/webAudioAnalyzerSubNode.d.ts +1 -1
  20. package/AudioV2/webAudio/subNodes/webAudioAnalyzerSubNode.js +2 -2
  21. package/AudioV2/webAudio/subNodes/webAudioAnalyzerSubNode.js.map +1 -1
  22. package/AudioV2/webAudio/subNodes/webAudioBaseSubGraph.d.ts +3 -3
  23. package/AudioV2/webAudio/subNodes/webAudioBaseSubGraph.js +9 -9
  24. package/AudioV2/webAudio/subNodes/webAudioBaseSubGraph.js.map +1 -1
  25. package/AudioV2/webAudio/subNodes/webAudioBusAndSoundSubGraph.d.ts +2 -2
  26. package/AudioV2/webAudio/subNodes/webAudioBusAndSoundSubGraph.js +11 -11
  27. package/AudioV2/webAudio/subNodes/webAudioBusAndSoundSubGraph.js.map +1 -1
  28. package/AudioV2/webAudio/subProperties/spatialWebAudioListener.js +1 -1
  29. package/AudioV2/webAudio/subProperties/spatialWebAudioListener.js.map +1 -1
  30. package/AudioV2/webAudio/webAudioBus.d.ts +6 -6
  31. package/AudioV2/webAudio/webAudioBus.js +27 -8
  32. package/AudioV2/webAudio/webAudioBus.js.map +1 -1
  33. package/AudioV2/webAudio/webAudioEngine.d.ts +9 -9
  34. package/AudioV2/webAudio/webAudioEngine.js +27 -27
  35. package/AudioV2/webAudio/webAudioEngine.js.map +1 -1
  36. package/AudioV2/webAudio/webAudioMainBus.d.ts +3 -5
  37. package/AudioV2/webAudio/webAudioMainBus.js +11 -12
  38. package/AudioV2/webAudio/webAudioMainBus.js.map +1 -1
  39. package/AudioV2/webAudio/webAudioMainOut.d.ts +1 -1
  40. package/AudioV2/webAudio/webAudioMainOut.js +2 -2
  41. package/AudioV2/webAudio/webAudioMainOut.js.map +1 -1
  42. package/AudioV2/webAudio/webAudioNode.d.ts +2 -2
  43. package/AudioV2/webAudio/webAudioNode.js.map +1 -1
  44. package/AudioV2/webAudio/webAudioStaticSound.d.ts +7 -7
  45. package/AudioV2/webAudio/webAudioStaticSound.js +29 -37
  46. package/AudioV2/webAudio/webAudioStaticSound.js.map +1 -1
  47. package/AudioV2/webAudio/webAudioStreamingSound.d.ts +6 -6
  48. package/AudioV2/webAudio/webAudioStreamingSound.js +27 -27
  49. package/AudioV2/webAudio/webAudioStreamingSound.js.map +1 -1
  50. package/AudioV2/webAudio/webAudioUnmuteUI.js +3 -2
  51. package/AudioV2/webAudio/webAudioUnmuteUI.js.map +1 -1
  52. package/Cameras/arcRotateCamera.js +1 -1
  53. package/Cameras/arcRotateCamera.js.map +1 -1
  54. package/Debug/debugLayer.d.ts +1 -1
  55. package/Debug/debugLayer.js.map +1 -1
  56. package/Engines/abstractEngine.js +5 -11
  57. package/Engines/abstractEngine.js.map +1 -1
  58. package/Engines/constants.d.ts +5 -1
  59. package/Engines/constants.js +5 -1
  60. package/Engines/constants.js.map +1 -1
  61. package/FlowGraph/Blocks/Event/flowGraphReceiveCustomEventBlock.js +6 -0
  62. package/FlowGraph/Blocks/Event/flowGraphReceiveCustomEventBlock.js.map +1 -1
  63. package/FlowGraph/Blocks/Execution/flowGraphConsoleLogBlock.js +1 -1
  64. package/FlowGraph/Blocks/Execution/flowGraphConsoleLogBlock.js.map +1 -1
  65. package/FlowGraph/Blocks/Execution/flowGraphSetVariableBlock.d.ts +6 -6
  66. package/FlowGraph/Blocks/Execution/flowGraphSetVariableBlock.js +31 -4
  67. package/FlowGraph/Blocks/Execution/flowGraphSetVariableBlock.js.map +1 -1
  68. package/FlowGraph/flowGraphCoordinator.d.ts +21 -1
  69. package/FlowGraph/flowGraphCoordinator.js +51 -2
  70. package/FlowGraph/flowGraphCoordinator.js.map +1 -1
  71. package/FlowGraph/flowGraphParser.js +3 -0
  72. package/FlowGraph/flowGraphParser.js.map +1 -1
  73. package/FrameGraph/Node/Blocks/Rendering/baseObjectRendererBlock.d.ts +3 -0
  74. package/FrameGraph/Node/Blocks/Rendering/baseObjectRendererBlock.js +13 -0
  75. package/FrameGraph/Node/Blocks/Rendering/baseObjectRendererBlock.js.map +1 -1
  76. package/FrameGraph/Node/Blocks/Rendering/geometryRendererBlock.js +16 -0
  77. package/FrameGraph/Node/Blocks/Rendering/geometryRendererBlock.js.map +1 -1
  78. package/FrameGraph/Node/Blocks/Rendering/objectRendererBlock.d.ts +0 -3
  79. package/FrameGraph/Node/Blocks/Rendering/objectRendererBlock.js +8 -14
  80. package/FrameGraph/Node/Blocks/Rendering/objectRendererBlock.js.map +1 -1
  81. package/FrameGraph/Node/Blocks/Textures/clearBlock.d.ts +3 -0
  82. package/FrameGraph/Node/Blocks/Textures/clearBlock.js +13 -0
  83. package/FrameGraph/Node/Blocks/Textures/clearBlock.js.map +1 -1
  84. package/FrameGraph/Node/nodeRenderGraph.js +2 -1
  85. package/FrameGraph/Node/nodeRenderGraph.js.map +1 -1
  86. package/FrameGraph/Tasks/Rendering/objectRendererTask.d.ts +4 -0
  87. package/FrameGraph/Tasks/Rendering/objectRendererTask.js +6 -0
  88. package/FrameGraph/Tasks/Rendering/objectRendererTask.js.map +1 -1
  89. package/FrameGraph/Tasks/Rendering/taaObjectRendererTask.js +1 -0
  90. package/FrameGraph/Tasks/Rendering/taaObjectRendererTask.js.map +1 -1
  91. package/FrameGraph/Tasks/Texture/clearTextureTask.d.ts +4 -0
  92. package/FrameGraph/Tasks/Texture/clearTextureTask.js +11 -2
  93. package/FrameGraph/Tasks/Texture/clearTextureTask.js.map +1 -1
  94. package/FrameGraph/frameGraph.d.ts +18 -2
  95. package/FrameGraph/frameGraph.js +26 -1
  96. package/FrameGraph/frameGraph.js.map +1 -1
  97. package/Loading/Plugins/babylonFileLoader.js +4 -0
  98. package/Loading/Plugins/babylonFileLoader.js.map +1 -1
  99. package/Materials/GreasedLine/greasedLineSimpleMaterial.js +5 -4
  100. package/Materials/GreasedLine/greasedLineSimpleMaterial.js.map +1 -1
  101. package/Materials/Node/Blocks/Dual/reflectionTextureBaseBlock.js +4 -3
  102. package/Materials/Node/Blocks/Dual/reflectionTextureBaseBlock.js.map +1 -1
  103. package/Materials/Node/Blocks/Fragment/perturbNormalBlock.js +26 -17
  104. package/Materials/Node/Blocks/Fragment/perturbNormalBlock.js.map +1 -1
  105. package/Materials/Node/Blocks/Fragment/shadowMapBlock.js +8 -0
  106. package/Materials/Node/Blocks/Fragment/shadowMapBlock.js.map +1 -1
  107. package/Materials/Node/Blocks/Input/inputBlock.js +1 -1
  108. package/Materials/Node/Blocks/Input/inputBlock.js.map +1 -1
  109. package/Materials/Node/Blocks/PBR/clearCoatBlock.d.ts +2 -0
  110. package/Materials/Node/Blocks/PBR/clearCoatBlock.js +14 -7
  111. package/Materials/Node/Blocks/PBR/clearCoatBlock.js.map +1 -1
  112. package/Materials/Node/Blocks/PBR/index.d.ts +1 -0
  113. package/Materials/Node/Blocks/PBR/index.js +1 -0
  114. package/Materials/Node/Blocks/PBR/index.js.map +1 -1
  115. package/Materials/Node/Blocks/PBR/iridescenceBlock.js +2 -1
  116. package/Materials/Node/Blocks/PBR/iridescenceBlock.js.map +1 -1
  117. package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.js +3 -1
  118. package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.js.map +1 -1
  119. package/Materials/Node/nodeMaterial.d.ts +2 -0
  120. package/Materials/Node/nodeMaterial.js +6 -1
  121. package/Materials/Node/nodeMaterial.js.map +1 -1
  122. package/Materials/Node/nodeMaterialBlock.js +11 -2
  123. package/Materials/Node/nodeMaterialBlock.js.map +1 -1
  124. package/Materials/Node/nodeMaterialBuildState.js +41 -13
  125. package/Materials/Node/nodeMaterialBuildState.js.map +1 -1
  126. package/Materials/Node/nodeMaterialBuildStateSharedData.d.ts +11 -1
  127. package/Materials/Node/nodeMaterialBuildStateSharedData.js +11 -1
  128. package/Materials/Node/nodeMaterialBuildStateSharedData.js.map +1 -1
  129. package/Materials/PBR/pbrBaseMaterial.js +1 -1
  130. package/Materials/PBR/pbrBaseMaterial.js.map +1 -1
  131. package/Materials/Textures/renderTargetTexture.d.ts +5 -0
  132. package/Materials/Textures/renderTargetTexture.js +9 -0
  133. package/Materials/Textures/renderTargetTexture.js.map +1 -1
  134. package/Materials/effect.js +1 -1
  135. package/Materials/material.d.ts +5 -1
  136. package/Materials/material.js +9 -2
  137. package/Materials/material.js.map +1 -1
  138. package/Materials/materialPluginBase.js +1 -1
  139. package/Maths/math.vector.d.ts +7 -0
  140. package/Maths/math.vector.js +17 -0
  141. package/Maths/math.vector.js.map +1 -1
  142. package/Misc/sceneSerializer.js +2 -0
  143. package/Misc/sceneSerializer.js.map +1 -1
  144. package/Rendering/depthPeelingSceneComponent.js +1 -1
  145. package/Rendering/objectRenderer.d.ts +7 -0
  146. package/Rendering/objectRenderer.js +19 -0
  147. package/Rendering/objectRenderer.js.map +1 -1
  148. package/Shaders/ShadersInclude/pbrBlockIridescence.js +1 -0
  149. package/Shaders/ShadersInclude/pbrBlockIridescence.js.map +1 -1
  150. package/Shaders/ShadersInclude/pbrBlockReflection.js +1 -1
  151. package/Shaders/ShadersInclude/pbrBlockReflection.js.map +1 -1
  152. package/Shaders/imageProcessing.fragment.js +1 -1
  153. package/Shaders/imageProcessing.fragment.js.map +1 -1
  154. package/Shaders/motionBlur.fragment.js +1 -1
  155. package/Shaders/motionBlur.fragment.js.map +1 -1
  156. package/Shaders/pbr.fragment.js +1 -0
  157. package/Shaders/pbr.fragment.js.map +1 -1
  158. package/Shaders/screenSpaceReflection2.fragment.js +1 -1
  159. package/Shaders/screenSpaceReflection2.fragment.js.map +1 -1
  160. package/ShadersWGSL/ShadersInclude/pbrBlockIridescence.js +3 -2
  161. package/ShadersWGSL/ShadersInclude/pbrBlockIridescence.js.map +1 -1
  162. package/ShadersWGSL/imageProcessing.fragment.js +1 -1
  163. package/ShadersWGSL/imageProcessing.fragment.js.map +1 -1
  164. package/ShadersWGSL/motionBlur.fragment.js +1 -1
  165. package/ShadersWGSL/motionBlur.fragment.js.map +1 -1
  166. package/ShadersWGSL/pbr.fragment.js +1 -0
  167. package/ShadersWGSL/pbr.fragment.js.map +1 -1
  168. package/ShadersWGSL/screenSpaceReflection2.fragment.js +1 -1
  169. package/ShadersWGSL/screenSpaceReflection2.fragment.js.map +1 -1
  170. package/Sprites/spriteManager.js +1 -1
  171. package/Sprites/spriteManager.js.map +1 -1
  172. package/package.json +1 -1
  173. package/scene.d.ts +19 -2
  174. package/scene.js +27 -3
  175. package/scene.js.map +1 -1
@@ -35,8 +35,8 @@ export class _WebAudioStaticSound extends StaticSound {
35
35
  this._subGraph = new _WebAudioStaticSound._SubGraph(this);
36
36
  }
37
37
  /** @internal */
38
- async init(source, options) {
39
- this.audioContext = this.engine.audioContext;
38
+ async _init(source, options) {
39
+ this._audioContext = this.engine._audioContext;
40
40
  if (source instanceof _WebAudioStaticSoundBuffer) {
41
41
  this._buffer = source;
42
42
  }
@@ -57,19 +57,19 @@ export class _WebAudioStaticSound extends StaticSound {
57
57
  if (options.autoplay) {
58
58
  this.play();
59
59
  }
60
- this.engine.addNode(this);
60
+ this.engine._addNode(this);
61
61
  }
62
62
  /** @internal */
63
63
  get buffer() {
64
64
  return this._buffer;
65
65
  }
66
66
  /** @internal */
67
- get inNode() {
68
- return this._subGraph.inNode;
67
+ get _inNode() {
68
+ return this._subGraph._inNode;
69
69
  }
70
70
  /** @internal */
71
- get outNode() {
72
- return this._subGraph.outNode;
71
+ get _outNode() {
72
+ return this._subGraph._outNode;
73
73
  }
74
74
  /** @internal */
75
75
  get spatial() {
@@ -89,7 +89,7 @@ export class _WebAudioStaticSound extends StaticSound {
89
89
  this._spatial = null;
90
90
  this._stereo = null;
91
91
  this._subGraph.dispose();
92
- this.engine.removeNode(this);
92
+ this.engine._removeNode(this);
93
93
  }
94
94
  /** @internal */
95
95
  getClassName() {
@@ -104,8 +104,8 @@ export class _WebAudioStaticSound extends StaticSound {
104
104
  return false;
105
105
  }
106
106
  // If the wrapped node is not available now, it will be connected later by the subgraph.
107
- if (node.inNode) {
108
- this.outNode?.connect(node.inNode);
107
+ if (node._inNode) {
108
+ this._outNode?.connect(node._inNode);
109
109
  }
110
110
  return true;
111
111
  }
@@ -114,8 +114,8 @@ export class _WebAudioStaticSound extends StaticSound {
114
114
  if (!disconnected) {
115
115
  return false;
116
116
  }
117
- if (node.inNode) {
118
- this.outNode?.disconnect(node.inNode);
117
+ if (node._inNode) {
118
+ this._outNode?.disconnect(node._inNode);
119
119
  }
120
120
  return true;
121
121
  }
@@ -140,9 +140,9 @@ export class _WebAudioStaticSoundBuffer extends StaticSoundBuffer {
140
140
  constructor(engine) {
141
141
  super(engine);
142
142
  }
143
- async init(source, options) {
143
+ async _init(source, options) {
144
144
  if (source instanceof AudioBuffer) {
145
- this.audioBuffer = source;
145
+ this._audioBuffer = source;
146
146
  }
147
147
  else if (typeof source === "string") {
148
148
  await this._initFromUrl(source);
@@ -156,22 +156,22 @@ export class _WebAudioStaticSoundBuffer extends StaticSoundBuffer {
156
156
  }
157
157
  /** @internal */
158
158
  get channelCount() {
159
- return this.audioBuffer.numberOfChannels;
159
+ return this._audioBuffer.numberOfChannels;
160
160
  }
161
161
  /** @internal */
162
162
  get duration() {
163
- return this.audioBuffer.duration;
163
+ return this._audioBuffer.duration;
164
164
  }
165
165
  /** @internal */
166
166
  get length() {
167
- return this.audioBuffer.length;
167
+ return this._audioBuffer.length;
168
168
  }
169
169
  /** @internal */
170
170
  get sampleRate() {
171
- return this.audioBuffer.sampleRate;
171
+ return this._audioBuffer.sampleRate;
172
172
  }
173
173
  async _initFromArrayBuffer(arrayBuffer) {
174
- this.audioBuffer = await this.engine.audioContext.decodeAudioData(arrayBuffer);
174
+ this._audioBuffer = await this.engine._audioContext.decodeAudioData(arrayBuffer);
175
175
  }
176
176
  async _initFromUrl(url) {
177
177
  url = _CleanUrl(url);
@@ -196,7 +196,7 @@ export class _WebAudioStaticSoundBuffer extends StaticSoundBuffer {
196
196
  }
197
197
  }
198
198
  }
199
- if (this.audioBuffer) {
199
+ if (this._audioBuffer) {
200
200
  break;
201
201
  }
202
202
  }
@@ -224,7 +224,7 @@ class _WebAudioStaticSoundInstance extends _StaticSoundInstance {
224
224
  this.engine.stateChangedObservable.removeCallback(this._onEngineStateChanged);
225
225
  };
226
226
  this._options = options;
227
- this._volumeNode = new GainNode(sound.audioContext);
227
+ this._volumeNode = new GainNode(sound._audioContext);
228
228
  this._initSourceNode();
229
229
  }
230
230
  /** @internal */
@@ -246,19 +246,17 @@ class _WebAudioStaticSoundInstance extends _StaticSoundInstance {
246
246
  this.play();
247
247
  }
248
248
  }
249
- get outNode() {
249
+ get _outNode() {
250
250
  return this._volumeNode;
251
251
  }
252
252
  /** @internal */
253
253
  set pitch(value) {
254
- this._options.pitch = value;
255
254
  if (this._sourceNode) {
256
255
  this.engine._setAudioParam(this._sourceNode.detune, value);
257
256
  }
258
257
  }
259
258
  /** @internal */
260
259
  set playbackRate(value) {
261
- this._options.playbackRate = value;
262
260
  if (this._sourceNode) {
263
261
  this.engine._setAudioParam(this._sourceNode.playbackRate, value);
264
262
  }
@@ -299,12 +297,6 @@ class _WebAudioStaticSoundInstance extends _StaticSoundInstance {
299
297
  if (options.loopEnd !== undefined) {
300
298
  this._options.loopEnd = options.loopEnd;
301
299
  }
302
- if (options.pitch !== undefined) {
303
- this._options.pitch = options.pitch;
304
- }
305
- if (options.playbackRate !== undefined) {
306
- this._options.playbackRate = options.playbackRate;
307
- }
308
300
  if (options.startOffset !== undefined) {
309
301
  this._options.startOffset = options.startOffset;
310
302
  }
@@ -357,8 +349,8 @@ class _WebAudioStaticSoundInstance extends _StaticSoundInstance {
357
349
  return false;
358
350
  }
359
351
  // If the wrapped node is not available now, it will be connected later by the sound's subgraph.
360
- if (node instanceof _WebAudioStaticSound && node.inNode) {
361
- this.outNode?.connect(node.inNode);
352
+ if (node instanceof _WebAudioStaticSound && node._inNode) {
353
+ this._outNode?.connect(node._inNode);
362
354
  }
363
355
  return true;
364
356
  }
@@ -367,8 +359,8 @@ class _WebAudioStaticSoundInstance extends _StaticSoundInstance {
367
359
  if (!disconnected) {
368
360
  return false;
369
361
  }
370
- if (node instanceof _WebAudioStaticSound && node.inNode) {
371
- this.outNode?.disconnect(node.inNode);
362
+ if (node instanceof _WebAudioStaticSound && node._inNode) {
363
+ this._outNode?.disconnect(node._inNode);
372
364
  }
373
365
  return true;
374
366
  }
@@ -385,7 +377,7 @@ class _WebAudioStaticSoundInstance extends _StaticSoundInstance {
385
377
  }
386
378
  _initSourceNode() {
387
379
  if (!this._sourceNode) {
388
- this._sourceNode = new AudioBufferSourceNode(this._sound.audioContext, { buffer: this._sound.buffer.audioBuffer });
380
+ this._sourceNode = new AudioBufferSourceNode(this._sound._audioContext, { buffer: this._sound.buffer._audioBuffer });
389
381
  this._sourceNode.addEventListener("ended", this._onEnded, { once: true });
390
382
  this._sourceNode.connect(this._volumeNode);
391
383
  if (!this._connect(this._sound)) {
@@ -393,11 +385,11 @@ class _WebAudioStaticSoundInstance extends _StaticSoundInstance {
393
385
  }
394
386
  }
395
387
  const node = this._sourceNode;
396
- node.detune.value = this._options.pitch;
388
+ node.detune.value = this._sound.pitch;
397
389
  node.loop = this._options.loop;
398
390
  node.loopEnd = this._options.loopEnd;
399
391
  node.loopStart = this._options.loopStart;
400
- node.playbackRate.value = this._options.playbackRate;
392
+ node.playbackRate.value = this._sound.playbackRate;
401
393
  }
402
394
  }
403
395
  //# sourceMappingURL=webAudioStaticSound.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"webAudioStaticSound.js","sourceRoot":"","sources":["../../../../../dev/core/src/AudioV2/webAudio/webAudioStaticSound.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAE3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AAEvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,EAAE,uBAAuB,EAAE,MAAM,qDAAqD,CAAC;AAE9F,OAAO,EAAE,YAAY,EAAE,MAAM,4CAA4C,CAAC;AAC1E,OAAO,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAE/D,OAAO,EAAE,4BAA4B,EAAE,MAAM,wCAAwC,CAAC;AACtF,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAMnE,gBAAgB;AAChB,MAAM,OAAO,oBAAqB,SAAQ,WAAW;IAgBjD,gBAAgB;IAChB,YAAmB,IAAY,EAAE,MAAuB,EAAE,OAAqC;QAC3F,KAAK,CAA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AC,IAAI,CAAC,WAAW,EAAE,CAAC;YACpB,IAAI,CAAC,WAAW,GAAG,IAAI,qBAAqB,CAAC,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC;YAEnH,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,OAAO,EAAE,IAAI,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;YAC1E,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YAE3C,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;gBAC9B,MAAM,IAAI,KAAK,CAAC,gBAAgB,CAAC,CAAC;YACtC,CAAC;QACL,CAAC;QAED,MAAM,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC;QAC9B,IAAI,CAAC,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC;QACxC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;QAC/B,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;QACrC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC;QACzC,IAAI,CAAC,YAAY,CAAC,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC;IACzD,CAAC;CAaJ","sourcesContent":["import type { Nullable } from \"../../types\";\nimport type { AbstractAudioNode } from \"../abstractAudio/abstractAudioNode\";\nimport type { IStaticSoundOptions, IStaticSoundPlayOptions, IStaticSoundStopOptions, IStaticSoundStoredOptions } from \"../abstractAudio/staticSound\";\nimport { StaticSound } from \"../abstractAudio/staticSound\";\nimport type { IStaticSoundBufferOptions } from \"../abstractAudio/staticSoundBuffer\";\nimport { StaticSoundBuffer } from \"../abstractAudio/staticSoundBuffer\";\nimport type { IStaticSoundInstanceOptions } from \"../abstractAudio/staticSoundInstance\";\nimport { _StaticSoundInstance } from \"../abstractAudio/staticSoundInstance\";\nimport { _HasSpatialAudioOptions } from \"../abstractAudio/subProperties/abstractSpatialAudio\";\nimport type { _SpatialAudio } from \"../abstractAudio/subProperties/spatialAudio\";\nimport { _StereoAudio } from \"../abstractAudio/subProperties/stereoAudio\";\nimport { _CleanUrl, _FileExtensionRegex } from \"../audioUtils\";\nimport { SoundState } from \"../soundState\";\nimport { _WebAudioBusAndSoundSubGraph } from \"./subNodes/webAudioBusAndSoundSubGraph\";\nimport { _SpatialWebAudio } from \"./subProperties/spatialWebAudio\";\nimport type { _WebAudioEngine } from \"./webAudioEngine\";\nimport type { IWebAudioInNode, IWebAudioOutNode, IWebAudioSuperNode } from \"./webAudioNode\";\n\ntype StaticSoundSourceType = ArrayBuffer | AudioBuffer | StaticSoundBuffer | string | string[];\n\n/** @internal */\nexport class _WebAudioStaticSound extends StaticSound implements IWebAudioSuperNode {\n private _buffer: _WebAudioStaticSoundBuffer;\n private _spatial: Nullable<_SpatialWebAudio> = null;\n private readonly _spatialAutoUpdate: boolean = true;\n private readonly _spatialMinUpdateTime: number = 0;\n private _stereo: Nullable<_StereoAudio> = null;\n\n protected override readonly _options: IStaticSoundStoredOptions;\n protected _subGraph: _WebAudioBusAndSoundSubGraph;\n\n /** @internal */\n public audioContext: AudioContext | OfflineAudioContext;\n\n /** @internal */\n public override readonly engine: _WebAudioEngine;\n\n /** @internal */\n public constructor(name: string, engine: _WebAudioEngine, options: Partial<IStaticSoundOptions>) {\n super(name, engine);\n\n if (typeof options.spatialAutoUpdate === \"boolean\") {\n this._spatialAutoUpdate = options.spatialAutoUpdate;\n }\n\n if (typeof options.spatialMinUpdateTime === \"number\") {\n this._spatialMinUpdateTime = options.spatialMinUpdateTime;\n }\n\n this._options = {\n autoplay: options.autoplay ?? false,\n duration: options.duration ?? 0,\n loop: options.loop ?? false,\n loopEnd: options.loopEnd ?? 0,\n loopStart: options.loopStart ?? 0,\n maxInstances: options.maxInstances ?? Infinity,\n pitch: options.pitch ?? 0,\n playbackRate: options.playbackRate ?? 1,\n startOffset: options.startOffset ?? 0,\n };\n\n this._subGraph = new _WebAudioStaticSound._SubGraph(this);\n }\n\n /** @internal */\n public async init(source: StaticSoundSourceType, options: Partial<IStaticSoundOptions>): Promise<void> {\n this.audioContext = this.engine.audioContext;\n\n if (source instanceof _WebAudioStaticSoundBuffer) {\n this._buffer = source as _WebAudioStaticSoundBuffer;\n } else if (typeof source === \"string\" || Array.isArray(source) || source instanceof ArrayBuffer || source instanceof AudioBuffer) {\n this._buffer = (await this.engine.createSoundBufferAsync(source, options)) as _WebAudioStaticSoundBuffer;\n }\n\n if (options.outBus) {\n this.outBus = options.outBus;\n } else {\n await this.engine.isReadyPromise;\n this.outBus = this.engine.defaultMainBus;\n }\n\n await this._subGraph.init(options);\n\n if (_HasSpatialAudioOptions(options)) {\n this._initSpatialProperty();\n }\n\n if (options.autoplay) {\n this.play();\n }\n\n this.engine.addNode(this);\n }\n\n /** @internal */\n public get buffer(): _WebAudioStaticSoundBuffer {\n return this._buffer;\n }\n\n /** @internal */\n public get inNode() {\n return this._subGraph.inNode;\n }\n\n /** @internal */\n public get outNode() {\n return this._subGraph.outNode;\n }\n\n /** @internal */\n public override get spatial(): _SpatialAudio {\n if (this._spatial) {\n return this._spatial;\n }\n return this._initSpatialProperty();\n }\n\n /** @internal */\n public override get stereo(): _StereoAudio {\n return this._stereo ?? (this._stereo = new _StereoAudio(this._subGraph));\n }\n\n /** @internal */\n public override dispose(): void {\n super.dispose();\n\n this._spatial?.dispose();\n this._spatial = null;\n\n this._stereo = null;\n\n this._subGraph.dispose();\n\n this.engine.removeNode(this);\n }\n\n /** @internal */\n public getClassName(): string {\n return \"_WebAudioStaticSound\";\n }\n\n protected _createInstance(): _WebAudioStaticSoundInstance {\n return new _WebAudioStaticSoundInstance(this, this._options);\n }\n\n protected override _connect(node: IWebAudioInNode): boolean {\n const connected = super._connect(node);\n\n if (!connected) {\n return false;\n }\n\n // If the wrapped node is not available now, it will be connected later by the subgraph.\n if (node.inNode) {\n this.outNode?.connect(node.inNode);\n }\n\n return true;\n }\n\n protected override _disconnect(node: IWebAudioInNode): boolean {\n const disconnected = super._disconnect(node);\n\n if (!disconnected) {\n return false;\n }\n\n if (node.inNode) {\n this.outNode?.disconnect(node.inNode);\n }\n\n return true;\n }\n\n private _initSpatialProperty(): _SpatialAudio {\n if (!this._spatial) {\n this._spatial = new _SpatialWebAudio(this._subGraph, this._spatialAutoUpdate, this._spatialMinUpdateTime);\n }\n\n return this._spatial;\n }\n\n private static _SubGraph = class extends _WebAudioBusAndSoundSubGraph {\n protected override _owner: _WebAudioStaticSound;\n\n protected get _downstreamNodes(): Nullable<Set<AbstractAudioNode>> {\n return this._owner._downstreamNodes ?? null;\n }\n\n protected get _upstreamNodes(): Nullable<Set<AbstractAudioNode>> {\n return this._owner._upstreamNodes ?? null;\n }\n };\n}\n\n/** @internal */\nexport class _WebAudioStaticSoundBuffer extends StaticSoundBuffer {\n /** @internal */\n public audioBuffer: AudioBuffer;\n\n /** @internal */\n public override readonly engine: _WebAudioEngine;\n\n /** @internal */\n public constructor(engine: _WebAudioEngine) {\n super(engine);\n }\n\n public async init(source: StaticSoundSourceType, options: Partial<IStaticSoundBufferOptions>): Promise<void> {\n if (source instanceof AudioBuffer) {\n this.audioBuffer = source;\n } else if (typeof source === \"string\") {\n await this._initFromUrl(source);\n } else if (Array.isArray(source)) {\n await this._initFromUrls(source, options.skipCodecCheck ?? false);\n } else if (source instanceof ArrayBuffer) {\n await this._initFromArrayBuffer(source);\n }\n }\n\n /** @internal */\n public get channelCount(): number {\n return this.audioBuffer.numberOfChannels;\n }\n\n /** @internal */\n public get duration(): number {\n return this.audioBuffer.duration;\n }\n\n /** @internal */\n public get length(): number {\n return this.audioBuffer.length;\n }\n\n /** @internal */\n public get sampleRate(): number {\n return this.audioBuffer.sampleRate;\n }\n\n private async _initFromArrayBuffer(arrayBuffer: ArrayBuffer): Promise<void> {\n this.audioBuffer = await this.engine.audioContext.decodeAudioData(arrayBuffer);\n }\n\n private async _initFromUrl(url: string): Promise<void> {\n url = _CleanUrl(url);\n await this._initFromArrayBuffer(await (await fetch(url)).arrayBuffer());\n }\n\n private async _initFromUrls(urls: string[], skipCodecCheck: boolean): Promise<void> {\n for (const url of urls) {\n if (skipCodecCheck) {\n await this._initFromUrl(url);\n } else {\n const matches = url.match(_FileExtensionRegex);\n const format = matches?.at(1);\n if (format && this.engine.isFormatValid(format)) {\n try {\n await this._initFromUrl(url);\n } catch (e) {\n if (format && 0 < format.length) {\n this.engine.flagInvalidFormat(format);\n }\n }\n }\n }\n\n if (this.audioBuffer) {\n break;\n }\n }\n }\n}\n\n/** @internal */\nclass _WebAudioStaticSoundInstance extends _StaticSoundInstance implements IWebAudioOutNode {\n private _enginePlayTime: number = 0;\n private _enginePauseTime: number = 0;\n private _sourceNode: Nullable<AudioBufferSourceNode> = null;\n private _volumeNode: GainNode;\n\n protected override readonly _options: IStaticSoundInstanceOptions;\n protected override _sound: _WebAudioStaticSound;\n\n /** @internal */\n public override readonly engine: _WebAudioEngine;\n\n public constructor(sound: _WebAudioStaticSound, options: IStaticSoundInstanceOptions) {\n super(sound);\n\n this._options = options;\n\n this._volumeNode = new GainNode(sound.audioContext);\n this._initSourceNode();\n }\n\n /** @internal */\n public get currentTime(): number {\n if (this._state === SoundState.Stopped) {\n return 0;\n }\n\n const timeSinceLastStart = this._state === SoundState.Paused ? 0 : this.engine.currentTime - this._enginePlayTime;\n return this._enginePauseTime + timeSinceLastStart + this._options.startOffset;\n }\n\n public set currentTime(value: number) {\n const restart = this._state === SoundState.Starting || this._state === SoundState.Started;\n\n if (restart) {\n this.stop();\n this._deinitSourceNode();\n }\n\n this._options.startOffset = value;\n\n if (restart) {\n this.play();\n }\n }\n\n public get outNode(): Nullable<AudioNode> {\n return this._volumeNode;\n }\n\n /** @internal */\n public set pitch(value: number) {\n this._options.pitch = value;\n if (this._sourceNode) {\n this.engine._setAudioParam(this._sourceNode.detune, value);\n }\n }\n\n /** @internal */\n public set playbackRate(value: number) {\n this._options.playbackRate = value;\n if (this._sourceNode) {\n this.engine._setAudioParam(this._sourceNode.playbackRate, value);\n }\n }\n\n /** @internal */\n public get startTime(): number {\n if (this._state === SoundState.Stopped) {\n return 0;\n }\n\n return this._enginePlayTime;\n }\n\n /** @internal */\n public override dispose(): void {\n super.dispose();\n\n this._sourceNode = null;\n\n this.stop();\n\n this._deinitSourceNode();\n\n this.engine.stateChangedObservable.removeCallback(this._onEngineStateChanged);\n }\n\n /** @internal */\n public getClassName(): string {\n return \"_WebAudioStaticSoundInstance\";\n }\n\n /** @internal */\n public play(options: Partial<IStaticSoundPlayOptions> = {}): void {\n if (this._state === SoundState.Started) {\n return;\n }\n\n if (options.duration !== undefined) {\n this._options.duration = options.duration;\n }\n if (options.loop !== undefined) {\n this._options.loop = options.loop;\n }\n if (options.loopStart !== undefined) {\n this._options.loopStart = options.loopStart;\n }\n if (options.loopEnd !== undefined) {\n this._options.loopEnd = options.loopEnd;\n }\n if (options.pitch !== undefined) {\n this._options.pitch = options.pitch;\n }\n if (options.playbackRate !== undefined) {\n this._options.playbackRate = options.playbackRate;\n }\n if (options.startOffset !== undefined) {\n this._options.startOffset = options.startOffset;\n }\n\n let startOffset = this._options.startOffset;\n\n if (this._state === SoundState.Paused) {\n startOffset += this.currentTime;\n startOffset %= this._sound.buffer.duration;\n }\n\n this._enginePlayTime = this.engine.currentTime + (options.waitTime ?? 0);\n\n this._volumeNode.gain.value = options.volume ?? 1;\n\n this._initSourceNode();\n\n if (this.engine.state === \"running\") {\n this._setState(SoundState.Started);\n this._sourceNode?.start(this._enginePlayTime, startOffset, this._options.duration > 0 ? this._options.duration : undefined);\n } else if (this._options.loop) {\n this._setState(SoundState.Starting);\n this.engine.stateChangedObservable.add(this._onEngineStateChanged);\n }\n }\n\n /** @internal */\n public pause(): void {\n if (this._state === SoundState.Paused) {\n return;\n }\n\n this._setState(SoundState.Paused);\n this._enginePauseTime += this.engine.currentTime - this._enginePlayTime;\n\n this._sourceNode?.stop();\n this._deinitSourceNode();\n }\n\n /** @internal */\n public resume(): void {\n if (this._state === SoundState.Paused) {\n this.play();\n }\n }\n\n /** @internal */\n public stop(options: Partial<IStaticSoundStopOptions> = {}): void {\n if (this._state === SoundState.Stopped) {\n return;\n }\n\n this._setState(SoundState.Stopped);\n\n const engineStopTime = this.engine.currentTime + (options.waitTime ?? 0);\n this._sourceNode?.stop(engineStopTime);\n\n this.engine.stateChangedObservable.removeCallback(this._onEngineStateChanged);\n }\n\n protected override _connect(node: AbstractAudioNode): boolean {\n const connected = super._connect(node);\n\n if (!connected) {\n return false;\n }\n\n // If the wrapped node is not available now, it will be connected later by the sound's subgraph.\n if (node instanceof _WebAudioStaticSound && node.inNode) {\n this.outNode?.connect(node.inNode);\n }\n\n return true;\n }\n\n protected override _disconnect(node: AbstractAudioNode): boolean {\n const disconnected = super._disconnect(node);\n\n if (!disconnected) {\n return false;\n }\n\n if (node instanceof _WebAudioStaticSound && node.inNode) {\n this.outNode?.disconnect(node.inNode);\n }\n\n return true;\n }\n\n protected _onEnded = () => {\n this._enginePlayTime = 0;\n\n this.onEndedObservable.notifyObservers(this);\n this._deinitSourceNode();\n };\n\n private _deinitSourceNode(): void {\n if (!this._sourceNode) {\n return;\n }\n\n if (!this._disconnect(this._sound)) {\n throw new Error(\"Disconnect failed\");\n }\n\n this._sourceNode.disconnect(this._volumeNode);\n this._sourceNode.removeEventListener(\"ended\", this._onEnded);\n\n this._sourceNode = null;\n }\n\n private _initSourceNode(): void {\n if (!this._sourceNode) {\n this._sourceNode = new AudioBufferSourceNode(this._sound.audioContext, { buffer: this._sound.buffer.audioBuffer });\n\n this._sourceNode.addEventListener(\"ended\", this._onEnded, { once: true });\n this._sourceNode.connect(this._volumeNode);\n\n if (!this._connect(this._sound)) {\n throw new Error(\"Connect failed\");\n }\n }\n\n const node = this._sourceNode;\n node.detune.value = this._options.pitch;\n node.loop = this._options.loop;\n node.loopEnd = this._options.loopEnd;\n node.loopStart = this._options.loopStart;\n node.playbackRate.value = this._options.playbackRate;\n }\n\n private _onEngineStateChanged = () => {\n if (this.engine.state !== \"running\") {\n return;\n }\n\n if (this._options.loop && this.state === SoundState.Starting) {\n this.play();\n }\n\n this.engine.stateChangedObservable.removeCallback(this._onEngineStateChanged);\n };\n}\n"]}
1
+ {"version":3,"file":"webAudioStaticSound.js","sourceRoot":"","sources":["../../../../../dev/core/src/AudioV2/webAudio/webAudioStaticSound.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAE3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AAEvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,EAAE,uBAAuB,EAAE,MAAM,qDAAqD,CAAC;AAE9F,OAAO,EAAE,YAAY,EAAE,MAAM,4CAA4C,CAAC;AAC1E,OAAO,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAE/D,OAAO,EAAE,4BAA4B,EAAE,MAAM,wCAAwC,CAAC;AACtF,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAMnE,gBAAgB;AAChB,MAAM,OAAO,oBAAqB,SAAQ,WAAW;IAgBjD,gBAAgB;IAChB,YAAmB,IAAY,EAAE,MAAuB,EAAE,OAAqC;QAC3F,KAAK,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QAhBhB,aAAQ,GAA+B,IAAI,CAAC;QACnC,uBAAkB,GAAY,IAAI,CAAC;QACnC,0BAAqB,GAAW,CAAC,CAAC;QAC3C,YAAO,GAA2B,IAAI,CAAC;QAe3C,IAAI,OAAO,OAAO,CAAC,iBAAiB,KAAK,SAAS,EAAE,CAAC;YACjD,IAAI,CAAC,k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C,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC;QACtC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;QAC/B,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;QACrC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC;QACzC,IAAI,CAAC,YAAY,CAAC,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC;IACvD,CAAC;CAaJ","sourcesContent":["import type { Nullable } from \"../../types\";\nimport type { AbstractAudioNode } from \"../abstractAudio/abstractAudioNode\";\nimport type { IStaticSoundOptions, IStaticSoundPlayOptions, IStaticSoundStopOptions, IStaticSoundStoredOptions } from \"../abstractAudio/staticSound\";\nimport { StaticSound } from \"../abstractAudio/staticSound\";\nimport type { IStaticSoundBufferOptions } from \"../abstractAudio/staticSoundBuffer\";\nimport { StaticSoundBuffer } from \"../abstractAudio/staticSoundBuffer\";\nimport type { IStaticSoundInstanceOptions } from \"../abstractAudio/staticSoundInstance\";\nimport { _StaticSoundInstance } from \"../abstractAudio/staticSoundInstance\";\nimport { _HasSpatialAudioOptions } from \"../abstractAudio/subProperties/abstractSpatialAudio\";\nimport type { _SpatialAudio } from \"../abstractAudio/subProperties/spatialAudio\";\nimport { _StereoAudio } from \"../abstractAudio/subProperties/stereoAudio\";\nimport { _CleanUrl, _FileExtensionRegex } from \"../audioUtils\";\nimport { SoundState } from \"../soundState\";\nimport { _WebAudioBusAndSoundSubGraph } from \"./subNodes/webAudioBusAndSoundSubGraph\";\nimport { _SpatialWebAudio } from \"./subProperties/spatialWebAudio\";\nimport type { _WebAudioEngine } from \"./webAudioEngine\";\nimport type { IWebAudioInNode, IWebAudioOutNode, IWebAudioSuperNode } from \"./webAudioNode\";\n\ntype StaticSoundSourceType = ArrayBuffer | AudioBuffer | StaticSoundBuffer | string | string[];\n\n/** @internal */\nexport class _WebAudioStaticSound extends StaticSound implements IWebAudioSuperNode {\n private _buffer: _WebAudioStaticSoundBuffer;\n private _spatial: Nullable<_SpatialWebAudio> = null;\n private readonly _spatialAutoUpdate: boolean = true;\n private readonly _spatialMinUpdateTime: number = 0;\n private _stereo: Nullable<_StereoAudio> = null;\n\n protected override readonly _options: IStaticSoundStoredOptions;\n protected _subGraph: _WebAudioBusAndSoundSubGraph;\n\n /** @internal */\n public _audioContext: AudioContext | OfflineAudioContext;\n\n /** @internal */\n public override readonly engine: _WebAudioEngine;\n\n /** @internal */\n public constructor(name: string, engine: _WebAudioEngine, options: Partial<IStaticSoundOptions>) {\n super(name, engine);\n\n if (typeof options.spatialAutoUpdate === \"boolean\") {\n this._spatialAutoUpdate = options.spatialAutoUpdate;\n }\n\n if (typeof options.spatialMinUpdateTime === \"number\") {\n this._spatialMinUpdateTime = options.spatialMinUpdateTime;\n }\n\n this._options = {\n autoplay: options.autoplay ?? false,\n duration: options.duration ?? 0,\n loop: options.loop ?? false,\n loopEnd: options.loopEnd ?? 0,\n loopStart: options.loopStart ?? 0,\n maxInstances: options.maxInstances ?? Infinity,\n pitch: options.pitch ?? 0,\n playbackRate: options.playbackRate ?? 1,\n startOffset: options.startOffset ?? 0,\n };\n\n this._subGraph = new _WebAudioStaticSound._SubGraph(this);\n }\n\n /** @internal */\n public async _init(source: StaticSoundSourceType, options: Partial<IStaticSoundOptions>): Promise<void> {\n this._audioContext = this.engine._audioContext;\n\n if (source instanceof _WebAudioStaticSoundBuffer) {\n this._buffer = source as _WebAudioStaticSoundBuffer;\n } else if (typeof source === \"string\" || Array.isArray(source) || source instanceof ArrayBuffer || source instanceof AudioBuffer) {\n this._buffer = (await this.engine.createSoundBufferAsync(source, options)) as _WebAudioStaticSoundBuffer;\n }\n\n if (options.outBus) {\n this.outBus = options.outBus;\n } else {\n await this.engine.isReadyPromise;\n this.outBus = this.engine.defaultMainBus;\n }\n\n await this._subGraph.init(options);\n\n if (_HasSpatialAudioOptions(options)) {\n this._initSpatialProperty();\n }\n\n if (options.autoplay) {\n this.play();\n }\n\n this.engine._addNode(this);\n }\n\n /** @internal */\n public get buffer(): _WebAudioStaticSoundBuffer {\n return this._buffer;\n }\n\n /** @internal */\n public get _inNode() {\n return this._subGraph._inNode;\n }\n\n /** @internal */\n public get _outNode() {\n return this._subGraph._outNode;\n }\n\n /** @internal */\n public override get spatial(): _SpatialAudio {\n if (this._spatial) {\n return this._spatial;\n }\n return this._initSpatialProperty();\n }\n\n /** @internal */\n public override get stereo(): _StereoAudio {\n return this._stereo ?? (this._stereo = new _StereoAudio(this._subGraph));\n }\n\n /** @internal */\n public override dispose(): void {\n super.dispose();\n\n this._spatial?.dispose();\n this._spatial = null;\n\n this._stereo = null;\n\n this._subGraph.dispose();\n\n this.engine._removeNode(this);\n }\n\n /** @internal */\n public getClassName(): string {\n return \"_WebAudioStaticSound\";\n }\n\n protected _createInstance(): _WebAudioStaticSoundInstance {\n return new _WebAudioStaticSoundInstance(this, this._options);\n }\n\n protected override _connect(node: IWebAudioInNode): boolean {\n const connected = super._connect(node);\n\n if (!connected) {\n return false;\n }\n\n // If the wrapped node is not available now, it will be connected later by the subgraph.\n if (node._inNode) {\n this._outNode?.connect(node._inNode);\n }\n\n return true;\n }\n\n protected override _disconnect(node: IWebAudioInNode): boolean {\n const disconnected = super._disconnect(node);\n\n if (!disconnected) {\n return false;\n }\n\n if (node._inNode) {\n this._outNode?.disconnect(node._inNode);\n }\n\n return true;\n }\n\n private _initSpatialProperty(): _SpatialAudio {\n if (!this._spatial) {\n this._spatial = new _SpatialWebAudio(this._subGraph, this._spatialAutoUpdate, this._spatialMinUpdateTime);\n }\n\n return this._spatial;\n }\n\n private static _SubGraph = class extends _WebAudioBusAndSoundSubGraph {\n protected override _owner: _WebAudioStaticSound;\n\n protected get _downstreamNodes(): Nullable<Set<AbstractAudioNode>> {\n return this._owner._downstreamNodes ?? null;\n }\n\n protected get _upstreamNodes(): Nullable<Set<AbstractAudioNode>> {\n return this._owner._upstreamNodes ?? null;\n }\n };\n}\n\n/** @internal */\nexport class _WebAudioStaticSoundBuffer extends StaticSoundBuffer {\n /** @internal */\n public _audioBuffer: AudioBuffer;\n\n /** @internal */\n public override readonly engine: _WebAudioEngine;\n\n /** @internal */\n public constructor(engine: _WebAudioEngine) {\n super(engine);\n }\n\n public async _init(source: StaticSoundSourceType, options: Partial<IStaticSoundBufferOptions>): Promise<void> {\n if (source instanceof AudioBuffer) {\n this._audioBuffer = source;\n } else if (typeof source === \"string\") {\n await this._initFromUrl(source);\n } else if (Array.isArray(source)) {\n await this._initFromUrls(source, options.skipCodecCheck ?? false);\n } else if (source instanceof ArrayBuffer) {\n await this._initFromArrayBuffer(source);\n }\n }\n\n /** @internal */\n public get channelCount(): number {\n return this._audioBuffer.numberOfChannels;\n }\n\n /** @internal */\n public get duration(): number {\n return this._audioBuffer.duration;\n }\n\n /** @internal */\n public get length(): number {\n return this._audioBuffer.length;\n }\n\n /** @internal */\n public get sampleRate(): number {\n return this._audioBuffer.sampleRate;\n }\n\n private async _initFromArrayBuffer(arrayBuffer: ArrayBuffer): Promise<void> {\n this._audioBuffer = await this.engine._audioContext.decodeAudioData(arrayBuffer);\n }\n\n private async _initFromUrl(url: string): Promise<void> {\n url = _CleanUrl(url);\n await this._initFromArrayBuffer(await (await fetch(url)).arrayBuffer());\n }\n\n private async _initFromUrls(urls: string[], skipCodecCheck: boolean): Promise<void> {\n for (const url of urls) {\n if (skipCodecCheck) {\n await this._initFromUrl(url);\n } else {\n const matches = url.match(_FileExtensionRegex);\n const format = matches?.at(1);\n if (format && this.engine.isFormatValid(format)) {\n try {\n await this._initFromUrl(url);\n } catch (e) {\n if (format && 0 < format.length) {\n this.engine.flagInvalidFormat(format);\n }\n }\n }\n }\n\n if (this._audioBuffer) {\n break;\n }\n }\n }\n}\n\n/** @internal */\nclass _WebAudioStaticSoundInstance extends _StaticSoundInstance implements IWebAudioOutNode {\n private _enginePlayTime: number = 0;\n private _enginePauseTime: number = 0;\n private _sourceNode: Nullable<AudioBufferSourceNode> = null;\n private _volumeNode: GainNode;\n\n protected override readonly _options: IStaticSoundInstanceOptions;\n protected override _sound: _WebAudioStaticSound;\n\n /** @internal */\n public override readonly engine: _WebAudioEngine;\n\n public constructor(sound: _WebAudioStaticSound, options: IStaticSoundInstanceOptions) {\n super(sound);\n\n this._options = options;\n\n this._volumeNode = new GainNode(sound._audioContext);\n this._initSourceNode();\n }\n\n /** @internal */\n public get currentTime(): number {\n if (this._state === SoundState.Stopped) {\n return 0;\n }\n\n const timeSinceLastStart = this._state === SoundState.Paused ? 0 : this.engine.currentTime - this._enginePlayTime;\n return this._enginePauseTime + timeSinceLastStart + this._options.startOffset;\n }\n\n public set currentTime(value: number) {\n const restart = this._state === SoundState.Starting || this._state === SoundState.Started;\n\n if (restart) {\n this.stop();\n this._deinitSourceNode();\n }\n\n this._options.startOffset = value;\n\n if (restart) {\n this.play();\n }\n }\n\n public get _outNode(): Nullable<AudioNode> {\n return this._volumeNode;\n }\n\n /** @internal */\n public set pitch(value: number) {\n if (this._sourceNode) {\n this.engine._setAudioParam(this._sourceNode.detune, value);\n }\n }\n\n /** @internal */\n public set playbackRate(value: number) {\n if (this._sourceNode) {\n this.engine._setAudioParam(this._sourceNode.playbackRate, value);\n }\n }\n\n /** @internal */\n public get startTime(): number {\n if (this._state === SoundState.Stopped) {\n return 0;\n }\n\n return this._enginePlayTime;\n }\n\n /** @internal */\n public override dispose(): void {\n super.dispose();\n\n this._sourceNode = null;\n\n this.stop();\n\n this._deinitSourceNode();\n\n this.engine.stateChangedObservable.removeCallback(this._onEngineStateChanged);\n }\n\n /** @internal */\n public getClassName(): string {\n return \"_WebAudioStaticSoundInstance\";\n }\n\n /** @internal */\n public play(options: Partial<IStaticSoundPlayOptions> = {}): void {\n if (this._state === SoundState.Started) {\n return;\n }\n\n if (options.duration !== undefined) {\n this._options.duration = options.duration;\n }\n if (options.loop !== undefined) {\n this._options.loop = options.loop;\n }\n if (options.loopStart !== undefined) {\n this._options.loopStart = options.loopStart;\n }\n if (options.loopEnd !== undefined) {\n this._options.loopEnd = options.loopEnd;\n }\n if (options.startOffset !== undefined) {\n this._options.startOffset = options.startOffset;\n }\n\n let startOffset = this._options.startOffset;\n\n if (this._state === SoundState.Paused) {\n startOffset += this.currentTime;\n startOffset %= this._sound.buffer.duration;\n }\n\n this._enginePlayTime = this.engine.currentTime + (options.waitTime ?? 0);\n\n this._volumeNode.gain.value = options.volume ?? 1;\n\n this._initSourceNode();\n\n if (this.engine.state === \"running\") {\n this._setState(SoundState.Started);\n this._sourceNode?.start(this._enginePlayTime, startOffset, this._options.duration > 0 ? this._options.duration : undefined);\n } else if (this._options.loop) {\n this._setState(SoundState.Starting);\n this.engine.stateChangedObservable.add(this._onEngineStateChanged);\n }\n }\n\n /** @internal */\n public pause(): void {\n if (this._state === SoundState.Paused) {\n return;\n }\n\n this._setState(SoundState.Paused);\n this._enginePauseTime += this.engine.currentTime - this._enginePlayTime;\n\n this._sourceNode?.stop();\n this._deinitSourceNode();\n }\n\n /** @internal */\n public resume(): void {\n if (this._state === SoundState.Paused) {\n this.play();\n }\n }\n\n /** @internal */\n public stop(options: Partial<IStaticSoundStopOptions> = {}): void {\n if (this._state === SoundState.Stopped) {\n return;\n }\n\n this._setState(SoundState.Stopped);\n\n const engineStopTime = this.engine.currentTime + (options.waitTime ?? 0);\n this._sourceNode?.stop(engineStopTime);\n\n this.engine.stateChangedObservable.removeCallback(this._onEngineStateChanged);\n }\n\n protected override _connect(node: AbstractAudioNode): boolean {\n const connected = super._connect(node);\n\n if (!connected) {\n return false;\n }\n\n // If the wrapped node is not available now, it will be connected later by the sound's subgraph.\n if (node instanceof _WebAudioStaticSound && node._inNode) {\n this._outNode?.connect(node._inNode);\n }\n\n return true;\n }\n\n protected override _disconnect(node: AbstractAudioNode): boolean {\n const disconnected = super._disconnect(node);\n\n if (!disconnected) {\n return false;\n }\n\n if (node instanceof _WebAudioStaticSound && node._inNode) {\n this._outNode?.disconnect(node._inNode);\n }\n\n return true;\n }\n\n protected _onEnded = () => {\n this._enginePlayTime = 0;\n\n this.onEndedObservable.notifyObservers(this);\n this._deinitSourceNode();\n };\n\n private _deinitSourceNode(): void {\n if (!this._sourceNode) {\n return;\n }\n\n if (!this._disconnect(this._sound)) {\n throw new Error(\"Disconnect failed\");\n }\n\n this._sourceNode.disconnect(this._volumeNode);\n this._sourceNode.removeEventListener(\"ended\", this._onEnded);\n\n this._sourceNode = null;\n }\n\n private _initSourceNode(): void {\n if (!this._sourceNode) {\n this._sourceNode = new AudioBufferSourceNode(this._sound._audioContext, { buffer: this._sound.buffer._audioBuffer });\n\n this._sourceNode.addEventListener(\"ended\", this._onEnded, { once: true });\n this._sourceNode.connect(this._volumeNode);\n\n if (!this._connect(this._sound)) {\n throw new Error(\"Connect failed\");\n }\n }\n\n const node = this._sourceNode;\n node.detune.value = this._sound.pitch;\n node.loop = this._options.loop;\n node.loopEnd = this._options.loopEnd;\n node.loopStart = this._options.loopStart;\n node.playbackRate.value = this._sound.playbackRate;\n }\n\n private _onEngineStateChanged = () => {\n if (this.engine.state !== \"running\") {\n return;\n }\n\n if (this._options.loop && this.state === SoundState.Starting) {\n this.play();\n }\n\n this.engine.stateChangedObservable.removeCallback(this._onEngineStateChanged);\n };\n}\n"]}
@@ -18,19 +18,19 @@ export declare class _WebAudioStreamingSound extends StreamingSound implements I
18
18
  protected readonly _options: IStreamingSoundStoredOptions;
19
19
  protected _subGraph: _WebAudioBusAndSoundSubGraph;
20
20
  /** @internal */
21
- audioContext: AudioContext;
21
+ _audioContext: AudioContext;
22
22
  /** @internal */
23
23
  readonly engine: _WebAudioEngine;
24
24
  /** @internal */
25
- source: StreamingSoundSourceType;
25
+ _source: StreamingSoundSourceType;
26
26
  /** @internal */
27
27
  constructor(name: string, engine: _WebAudioEngine, options: Partial<IStreamingSoundOptions>);
28
28
  /** @internal */
29
- init(source: StreamingSoundSourceType, options: Partial<IStreamingSoundOptions>): Promise<void>;
29
+ _init(source: StreamingSoundSourceType, options: Partial<IStreamingSoundOptions>): Promise<void>;
30
30
  /** @internal */
31
- get inNode(): Nullable<AudioNode>;
31
+ get _inNode(): Nullable<AudioNode>;
32
32
  /** @internal */
33
- get outNode(): Nullable<AudioNode>;
33
+ get _outNode(): Nullable<AudioNode>;
34
34
  /** @internal */
35
35
  get spatial(): _SpatialAudio;
36
36
  /** @internal */
@@ -63,7 +63,7 @@ declare class _WebAudioStreamingSoundInstance extends _StreamingSoundInstance im
63
63
  /** @internal */
64
64
  get currentTime(): number;
65
65
  set currentTime(value: number);
66
- get outNode(): Nullable<AudioNode>;
66
+ get _outNode(): Nullable<AudioNode>;
67
67
  /** @internal */
68
68
  get startTime(): number;
69
69
  /** @internal */
@@ -32,13 +32,13 @@ export class _WebAudioStreamingSound extends StreamingSound {
32
32
  this._subGraph = new _WebAudioStreamingSound._SubGraph(this);
33
33
  }
34
34
  /** @internal */
35
- async init(source, options) {
36
- const audioContext = this.engine.audioContext;
35
+ async _init(source, options) {
36
+ const audioContext = this.engine._audioContext;
37
37
  if (!(audioContext instanceof AudioContext)) {
38
38
  throw new Error("Unsupported audio context type.");
39
39
  }
40
- this.audioContext = audioContext;
41
- this.source = source;
40
+ this._audioContext = audioContext;
41
+ this._source = source;
42
42
  if (options.outBus) {
43
43
  this.outBus = options.outBus;
44
44
  }
@@ -56,15 +56,15 @@ export class _WebAudioStreamingSound extends StreamingSound {
56
56
  if (options.autoplay) {
57
57
  this.play(options);
58
58
  }
59
- this.engine.addNode(this);
59
+ this.engine._addNode(this);
60
60
  }
61
61
  /** @internal */
62
- get inNode() {
63
- return this._subGraph.inNode;
62
+ get _inNode() {
63
+ return this._subGraph._inNode;
64
64
  }
65
65
  /** @internal */
66
- get outNode() {
67
- return this._subGraph.outNode;
66
+ get _outNode() {
67
+ return this._subGraph._outNode;
68
68
  }
69
69
  /** @internal */
70
70
  get spatial() {
@@ -83,7 +83,7 @@ export class _WebAudioStreamingSound extends StreamingSound {
83
83
  this._spatial = null;
84
84
  this._stereo = null;
85
85
  this._subGraph.dispose();
86
- this.engine.removeNode(this);
86
+ this.engine._removeNode(this);
87
87
  }
88
88
  /** @internal */
89
89
  getClassName() {
@@ -98,8 +98,8 @@ export class _WebAudioStreamingSound extends StreamingSound {
98
98
  return false;
99
99
  }
100
100
  // If the wrapped node is not available now, it will be connected later by the subgraph.
101
- if (node.inNode) {
102
- this.outNode?.connect(node.inNode);
101
+ if (node._inNode) {
102
+ this._outNode?.connect(node._inNode);
103
103
  }
104
104
  return true;
105
105
  }
@@ -108,8 +108,8 @@ export class _WebAudioStreamingSound extends StreamingSound {
108
108
  if (!disconnected) {
109
109
  return false;
110
110
  }
111
- if (node.inNode) {
112
- this.outNode?.disconnect(node.inNode);
111
+ if (node._inNode) {
112
+ this._outNode?.disconnect(node._inNode);
113
113
  }
114
114
  return true;
115
115
  }
@@ -168,15 +168,15 @@ class _WebAudioStreamingSoundInstance extends _StreamingSoundInstance {
168
168
  this.play();
169
169
  };
170
170
  this._options = options;
171
- this._volumeNode = new GainNode(sound.audioContext);
172
- if (typeof sound.source === "string") {
173
- this._initFromUrl(sound.source);
171
+ this._volumeNode = new GainNode(sound._audioContext);
172
+ if (typeof sound._source === "string") {
173
+ this._initFromUrl(sound._source);
174
174
  }
175
- else if (Array.isArray(sound.source)) {
176
- this._initFromUrls(sound.source);
175
+ else if (Array.isArray(sound._source)) {
176
+ this._initFromUrls(sound._source);
177
177
  }
178
- else if (sound.source instanceof HTMLMediaElement) {
179
- this._initFromMediaElement(sound.source);
178
+ else if (sound._source instanceof HTMLMediaElement) {
179
+ this._initFromMediaElement(sound._source);
180
180
  }
181
181
  }
182
182
  /** @internal */
@@ -201,7 +201,7 @@ class _WebAudioStreamingSoundInstance extends _StreamingSoundInstance {
201
201
  this._currentTimeChangedWhilePaused = true;
202
202
  }
203
203
  }
204
- get outNode() {
204
+ get _outNode() {
205
205
  return this._volumeNode;
206
206
  }
207
207
  /** @internal */
@@ -284,8 +284,8 @@ class _WebAudioStreamingSoundInstance extends _StreamingSoundInstance {
284
284
  return false;
285
285
  }
286
286
  // If the wrapped node is not available now, it will be connected later by the sound's subgraph.
287
- if (node instanceof _WebAudioStreamingSound && node.inNode) {
288
- this.outNode?.connect(node.inNode);
287
+ if (node instanceof _WebAudioStreamingSound && node._inNode) {
288
+ this._outNode?.connect(node._inNode);
289
289
  }
290
290
  return true;
291
291
  }
@@ -294,8 +294,8 @@ class _WebAudioStreamingSoundInstance extends _StreamingSoundInstance {
294
294
  if (!disconnected) {
295
295
  return false;
296
296
  }
297
- if (node instanceof _WebAudioStreamingSound && node.inNode) {
298
- this.outNode?.disconnect(node.inNode);
297
+ if (node instanceof _WebAudioStreamingSound && node._inNode) {
298
+ this._outNode?.disconnect(node._inNode);
299
299
  }
300
300
  return true;
301
301
  }
@@ -308,7 +308,7 @@ class _WebAudioStreamingSoundInstance extends _StreamingSoundInstance {
308
308
  mediaElement.addEventListener("ended", this._onEnded, { once: true });
309
309
  mediaElement.addEventListener("error", this._onError, { once: true });
310
310
  mediaElement.load();
311
- this._sourceNode = new MediaElementAudioSourceNode(this._sound.audioContext, { mediaElement: mediaElement });
311
+ this._sourceNode = new MediaElementAudioSourceNode(this._sound._audioContext, { mediaElement: mediaElement });
312
312
  this._sourceNode.connect(this._volumeNode);
313
313
  if (!this._connect(this._sound)) {
314
314
  throw new Error("Connect failed");