@onerjs/core 8.32.7 → 8.32.8

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 (88) hide show
  1. package/AudioV2/abstractAudio/abstractSoundSource.js +12 -4
  2. package/AudioV2/abstractAudio/abstractSoundSource.js.map +1 -1
  3. package/Engines/abstractEngine.js +2 -2
  4. package/Engines/abstractEngine.js.map +1 -1
  5. package/FrameGraph/Node/Blocks/PostProcesses/baseWithPropertiesPostProcessBlock.js +1 -1
  6. package/FrameGraph/Node/Blocks/PostProcesses/baseWithPropertiesPostProcessBlock.js.map +1 -1
  7. package/FrameGraph/Node/Blocks/Rendering/baseObjectRendererBlock.d.ts +18 -0
  8. package/FrameGraph/Node/Blocks/Rendering/baseObjectRendererBlock.js +105 -15
  9. package/FrameGraph/Node/Blocks/Rendering/baseObjectRendererBlock.js.map +1 -1
  10. package/FrameGraph/Node/Blocks/Rendering/geometryRendererBlock.js +7 -7
  11. package/FrameGraph/Node/Blocks/Rendering/geometryRendererBlock.js.map +1 -1
  12. package/FrameGraph/Node/Blocks/Textures/copyTextureBlock.js +1 -1
  13. package/FrameGraph/Node/Blocks/Textures/copyTextureBlock.js.map +1 -1
  14. package/FrameGraph/Passes/pass.d.ts +11 -2
  15. package/FrameGraph/Passes/pass.js +14 -2
  16. package/FrameGraph/Passes/pass.js.map +1 -1
  17. package/FrameGraph/Passes/renderPass.d.ts +4 -2
  18. package/FrameGraph/Passes/renderPass.js +5 -2
  19. package/FrameGraph/Passes/renderPass.js.map +1 -1
  20. package/FrameGraph/Tasks/Layers/baseLayerTask.js +27 -31
  21. package/FrameGraph/Tasks/Layers/baseLayerTask.js.map +1 -1
  22. package/FrameGraph/Tasks/Rendering/objectRendererTask.d.ts +41 -1
  23. package/FrameGraph/Tasks/Rendering/objectRendererTask.js +122 -0
  24. package/FrameGraph/Tasks/Rendering/objectRendererTask.js.map +1 -1
  25. package/FrameGraph/Tasks/Texture/clearTextureTask.js +6 -4
  26. package/FrameGraph/Tasks/Texture/clearTextureTask.js.map +1 -1
  27. package/FrameGraph/frameGraph.js +3 -0
  28. package/FrameGraph/frameGraph.js.map +1 -1
  29. package/FrameGraph/frameGraphRenderTarget.js +1 -0
  30. package/FrameGraph/frameGraphRenderTarget.js.map +1 -1
  31. package/FrameGraph/frameGraphTask.d.ts +2 -0
  32. package/FrameGraph/frameGraphTask.js +11 -0
  33. package/FrameGraph/frameGraphTask.js.map +1 -1
  34. package/FrameGraph/frameGraphTypes.d.ts +8 -0
  35. package/FrameGraph/frameGraphTypes.js.map +1 -1
  36. package/Materials/GaussianSplatting/gaussianSplattingMaterial.d.ts +9 -0
  37. package/Materials/GaussianSplatting/gaussianSplattingMaterial.js +66 -22
  38. package/Materials/GaussianSplatting/gaussianSplattingMaterial.js.map +1 -1
  39. package/Materials/Node/Blocks/GaussianSplatting/gaussianSplattingBlock.js +3 -6
  40. package/Materials/Node/Blocks/GaussianSplatting/gaussianSplattingBlock.js.map +1 -1
  41. package/Meshes/GaussianSplatting/gaussianSplattingMesh.d.ts +10 -5
  42. package/Meshes/GaussianSplatting/gaussianSplattingMesh.js +17 -16
  43. package/Meshes/GaussianSplatting/gaussianSplattingMesh.js.map +1 -1
  44. package/Rendering/depthPeelingRenderer.d.ts +7 -78
  45. package/Rendering/depthPeelingRenderer.js +12 -398
  46. package/Rendering/depthPeelingRenderer.js.map +1 -1
  47. package/Rendering/depthPeelingSceneComponent.d.ts +3 -3
  48. package/Rendering/depthPeelingSceneComponent.js.map +1 -1
  49. package/Rendering/depthRenderer.js +9 -1
  50. package/Rendering/depthRenderer.js.map +1 -1
  51. package/Rendering/index.d.ts +1 -0
  52. package/Rendering/index.js +1 -0
  53. package/Rendering/index.js.map +1 -1
  54. package/Rendering/objectRenderer.d.ts +20 -0
  55. package/Rendering/objectRenderer.js +17 -1
  56. package/Rendering/objectRenderer.js.map +1 -1
  57. package/Rendering/renderingGroup.d.ts +10 -3
  58. package/Rendering/renderingGroup.js +24 -13
  59. package/Rendering/renderingGroup.js.map +1 -1
  60. package/Rendering/renderingManager.d.ts +6 -2
  61. package/Rendering/renderingManager.js +8 -2
  62. package/Rendering/renderingManager.js.map +1 -1
  63. package/Rendering/thinDepthPeelingRenderer.d.ts +120 -0
  64. package/Rendering/thinDepthPeelingRenderer.js +469 -0
  65. package/Rendering/thinDepthPeelingRenderer.js.map +1 -0
  66. package/Shaders/ShadersInclude/gaussianSplatting.js +1 -1
  67. package/Shaders/ShadersInclude/gaussianSplatting.js.map +1 -1
  68. package/Shaders/gaussianSplatting.vertex.js +2 -2
  69. package/Shaders/gaussianSplatting.vertex.js.map +1 -1
  70. package/Shaders/gaussianSplattingDepth.fragment.js +9 -2
  71. package/Shaders/gaussianSplattingDepth.fragment.js.map +1 -1
  72. package/Shaders/gaussianSplattingDepth.vertex.js +13 -2
  73. package/Shaders/gaussianSplattingDepth.vertex.js.map +1 -1
  74. package/Shaders/oitFinalSimpleBlend.fragment.d.ts +5 -0
  75. package/Shaders/oitFinalSimpleBlend.fragment.js +12 -0
  76. package/Shaders/oitFinalSimpleBlend.fragment.js.map +1 -0
  77. package/ShadersWGSL/ShadersInclude/gaussianSplatting.js +1 -5
  78. package/ShadersWGSL/ShadersInclude/gaussianSplatting.js.map +1 -1
  79. package/ShadersWGSL/gaussianSplatting.vertex.js +2 -2
  80. package/ShadersWGSL/gaussianSplatting.vertex.js.map +1 -1
  81. package/ShadersWGSL/gaussianSplattingDepth.fragment.js +12 -3
  82. package/ShadersWGSL/gaussianSplattingDepth.fragment.js.map +1 -1
  83. package/ShadersWGSL/gaussianSplattingDepth.vertex.js +13 -2
  84. package/ShadersWGSL/gaussianSplattingDepth.vertex.js.map +1 -1
  85. package/ShadersWGSL/oitFinalSimpleBlend.fragment.d.ts +5 -0
  86. package/ShadersWGSL/oitFinalSimpleBlend.fragment.js +13 -0
  87. package/ShadersWGSL/oitFinalSimpleBlend.fragment.js.map +1 -0
  88. package/package.json +1 -1
@@ -9,9 +9,7 @@ export class AbstractSoundSource extends AbstractAudioOutNode {
9
9
  this._spatialMinUpdateTime = 0;
10
10
  this._outBus = null;
11
11
  this._spatial = null;
12
- this._onOutBusDisposed = () => {
13
- this._outBus = null;
14
- };
12
+ this._onOutBusDisposed = null;
15
13
  if (typeof options.spatialAutoUpdate === "boolean") {
16
14
  this._spatialAutoUpdate = options.spatialAutoUpdate;
17
15
  }
@@ -31,13 +29,19 @@ export class AbstractSoundSource extends AbstractAudioOutNode {
31
29
  return;
32
30
  }
33
31
  if (this._outBus) {
34
- this._outBus.onDisposeObservable.removeCallback(this._onOutBusDisposed);
32
+ if (this._onOutBusDisposed) {
33
+ this._outBus.onDisposeObservable.removeCallback(this._onOutBusDisposed);
34
+ this._onOutBusDisposed = null;
35
+ }
35
36
  if (!this._disconnect(this._outBus)) {
36
37
  throw new Error("Disconnect failed");
37
38
  }
38
39
  }
39
40
  this._outBus = outBus;
40
41
  if (this._outBus) {
42
+ this._onOutBusDisposed = () => {
43
+ this._outBus = null;
44
+ };
41
45
  this._outBus.onDisposeObservable.add(this._onOutBusDisposed);
42
46
  if (!this._connect(this._outBus)) {
43
47
  throw new Error("Connect failed");
@@ -60,6 +64,10 @@ export class AbstractSoundSource extends AbstractAudioOutNode {
60
64
  super.dispose();
61
65
  this._spatial?.dispose();
62
66
  this._spatial = null;
67
+ if (this._outBus && this._onOutBusDisposed) {
68
+ this._outBus.onDisposeObservable.removeCallback(this._onOutBusDisposed);
69
+ this._onOutBusDisposed = null;
70
+ }
63
71
  this._outBus = null;
64
72
  }
65
73
  _initSpatialProperty() {
@@ -1 +1 @@
1
- {"version":3,"file":"abstractSoundSource.js","sourceRoot":"","sources":["../../../../../dev/core/src/AudioV2/abstractAudio/abstractSoundSource.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAuB9D;;GAEG;AACH,MAAM,OAAgB,mBAAoB,SAAQ,oBAAoB;IAMlE,YAAsB,IAAY,EAAE,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,CAAC,CAAC;YAC7D,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;gBAC/B,MAAM,IAAI,KAAK,CAAC,gBAAgB,CAAC,CAAC;YACtC,CAAC;QACL,CAAC;IACL,CAAC;IAED;;OAEG;IACH,IAAW,OAAO;QACd,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAChB,OAAO,IAAI,CAAC,QAAQ,CAAC;QACzB,CAAC;QACD,OAAO,IAAI,CAAC,oBAAoB,EAAE,CAAC;IACvC,CAAC;IAOD;;OAEG;IACa,OAAO;QACnB,KAAK,CAAC,OAAO,EAAE,CAAC;QAEhB,IAAI,CAAC,QAAQ,EAAE,OAAO,EAAE,CAAC;QACzB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;QAErB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;IACxB,CAAC;IAIS,oBAAoB;QAC1B,OAAO,CAAC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,sBAAsB,CAAC,IAAI,CAAC,kBAAkB,EAAE,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC;IAC9G,CAAC;IAMD,gBAAgB;IAChB,IAAW,UAAU;QACjB,OAAO,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC;IAClC,CAAC;IAED,IAAW,UAAU,CAAC,KAAc;QAChC,IAAI,KAAK,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;YAC1B,IAAI,CAAC,oBAAoB,EAAE,CAAC;QAChC,CAAC;aAAM,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YACjC,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC;YACxB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;QACzB,CAAC;IACL,CAAC;CACJ","sourcesContent":["import type { Nullable } from \"../../types\";\nimport { AudioNodeType } from \"./abstractAudioNode\";\nimport type { IAbstractAudioOutNodeOptions } from \"./abstractAudioOutNode\";\nimport { AbstractAudioOutNode } from \"./abstractAudioOutNode\";\nimport type { PrimaryAudioBus } from \"./audioBus\";\nimport type { AudioEngineV2 } from \"./audioEngineV2\";\nimport type { AbstractSpatialAudio, ISpatialAudioOptions } from \"./subProperties/abstractSpatialAudio\";\nimport type { AbstractStereoAudio, IStereoAudioOptions } from \"./subProperties/abstractStereoAudio\";\n\n/**\n * Options for creating a sound source.\n */\nexport interface ISoundSourceOptions extends IAbstractAudioOutNodeOptions, ISpatialAudioOptions, IStereoAudioOptions {\n /**\n * The output bus for the sound source. Defaults to `null`.\n * - If not set or `null`, and `outBusAutoDefault` is `true`, then the sound source is automatically connected to the audio engine's default main bus.\n * @see {@link AudioEngineV2.defaultMainBus}\n */\n outBus: Nullable<PrimaryAudioBus>;\n\n /**\n * Whether the sound's `outBus` should default to the audio engine's main bus. Defaults to `true` for all sound sources except microphones.\n */\n outBusAutoDefault: boolean;\n}\n\n/**\n * Abstract class representing a sound in the audio engine.\n */\nexport abstract class AbstractSoundSource extends AbstractAudioOutNode {\n private readonly _spatialAutoUpdate: boolean = true;\n private readonly _spatialMinUpdateTime: number = 0;\n private _outBus: Nullable<PrimaryAudioBus> = null;\n private _spatial: Nullable<AbstractSpatialAudio> = null;\n\n protected constructor(name: string, engine: AudioEngineV2, options: Partial<ISoundSourceOptions>, nodeType: AudioNodeType = AudioNodeType.HAS_OUTPUTS) {\n super(name, engine, nodeType);\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\n /**\n * The output bus for the sound.\n * @see {@link AudioEngineV2.defaultMainBus}\n */\n public get outBus(): Nullable<PrimaryAudioBus> {\n return this._outBus;\n }\n\n public set outBus(outBus: Nullable<PrimaryAudioBus>) {\n if (this._outBus === outBus) {\n return;\n }\n\n if (this._outBus) {\n this._outBus.onDisposeObservable.removeCallback(this._onOutBusDisposed);\n if (!this._disconnect(this._outBus)) {\n throw new Error(\"Disconnect failed\");\n }\n }\n\n this._outBus = outBus;\n\n if (this._outBus) {\n this._outBus.onDisposeObservable.add(this._onOutBusDisposed);\n if (!this._connect(this._outBus)) {\n throw new Error(\"Connect failed\");\n }\n }\n }\n\n /**\n * The spatial audio features.\n */\n public get spatial(): AbstractSpatialAudio {\n if (this._spatial) {\n return this._spatial;\n }\n return this._initSpatialProperty();\n }\n\n /**\n * The stereo features of the sound.\n */\n public abstract stereo: AbstractStereoAudio;\n\n /**\n * Releases associated resources.\n */\n public override dispose(): void {\n super.dispose();\n\n this._spatial?.dispose();\n this._spatial = null;\n\n this._outBus = null;\n }\n\n protected abstract _createSpatialProperty(autoUpdate: boolean, minUpdateTime: number): AbstractSpatialAudio;\n\n protected _initSpatialProperty(): AbstractSpatialAudio {\n return (this._spatial = this._createSpatialProperty(this._spatialAutoUpdate, this._spatialMinUpdateTime));\n }\n\n private _onOutBusDisposed = () => {\n this._outBus = null;\n };\n\n /** @internal */\n public get _isSpatial(): boolean {\n return this._spatial !== null;\n }\n\n public set _isSpatial(value: boolean) {\n if (value && !this._spatial) {\n this._initSpatialProperty();\n } else if (!value && this._spatial) {\n this._spatial.dispose();\n this._spatial = null;\n }\n }\n}\n"]}
1
+ {"version":3,"file":"abstractSoundSource.js","sourceRoot":"","sources":["../../../../../dev/core/src/AudioV2/abstractAudio/abstractSoundSource.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAuB9D;;GAEG;AACH,MAAM,OAAgB,mBAAoB,SAAQ,oBAAoB;IAMlE,YAAsB,IAAY,EAAE,MAAqB,EAAE,OAAqC,EAAE,4CAAmD;QACjJ,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC;QANjB,uBAAkB,GAAY,IAAI,CAAC;QACnC,0BAAqB,GAAW,CAAC,CAAC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AAI,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC;YACxB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;QACzB,CAAC;IACL,CAAC;CACJ","sourcesContent":["import type { Nullable } from \"../../types\";\nimport { AudioNodeType } from \"./abstractAudioNode\";\nimport type { IAbstractAudioOutNodeOptions } from \"./abstractAudioOutNode\";\nimport { AbstractAudioOutNode } from \"./abstractAudioOutNode\";\nimport type { PrimaryAudioBus } from \"./audioBus\";\nimport type { AudioEngineV2 } from \"./audioEngineV2\";\nimport type { AbstractSpatialAudio, ISpatialAudioOptions } from \"./subProperties/abstractSpatialAudio\";\nimport type { AbstractStereoAudio, IStereoAudioOptions } from \"./subProperties/abstractStereoAudio\";\n\n/**\n * Options for creating a sound source.\n */\nexport interface ISoundSourceOptions extends IAbstractAudioOutNodeOptions, ISpatialAudioOptions, IStereoAudioOptions {\n /**\n * The output bus for the sound source. Defaults to `null`.\n * - If not set or `null`, and `outBusAutoDefault` is `true`, then the sound source is automatically connected to the audio engine's default main bus.\n * @see {@link AudioEngineV2.defaultMainBus}\n */\n outBus: Nullable<PrimaryAudioBus>;\n\n /**\n * Whether the sound's `outBus` should default to the audio engine's main bus. Defaults to `true` for all sound sources except microphones.\n */\n outBusAutoDefault: boolean;\n}\n\n/**\n * Abstract class representing a sound in the audio engine.\n */\nexport abstract class AbstractSoundSource extends AbstractAudioOutNode {\n private readonly _spatialAutoUpdate: boolean = true;\n private readonly _spatialMinUpdateTime: number = 0;\n private _outBus: Nullable<PrimaryAudioBus> = null;\n private _spatial: Nullable<AbstractSpatialAudio> = null;\n\n protected constructor(name: string, engine: AudioEngineV2, options: Partial<ISoundSourceOptions>, nodeType: AudioNodeType = AudioNodeType.HAS_OUTPUTS) {\n super(name, engine, nodeType);\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\n /**\n * The output bus for the sound.\n * @see {@link AudioEngineV2.defaultMainBus}\n */\n public get outBus(): Nullable<PrimaryAudioBus> {\n return this._outBus;\n }\n\n public set outBus(outBus: Nullable<PrimaryAudioBus>) {\n if (this._outBus === outBus) {\n return;\n }\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\n this._outBus = outBus;\n\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 /**\n * The spatial audio features.\n */\n public get spatial(): AbstractSpatialAudio {\n if (this._spatial) {\n return this._spatial;\n }\n return this._initSpatialProperty();\n }\n\n /**\n * The stereo features of the sound.\n */\n public abstract stereo: AbstractStereoAudio;\n\n /**\n * Releases associated resources.\n */\n public override dispose(): void {\n super.dispose();\n\n this._spatial?.dispose();\n this._spatial = null;\n\n if (this._outBus && this._onOutBusDisposed) {\n this._outBus.onDisposeObservable.removeCallback(this._onOutBusDisposed);\n this._onOutBusDisposed = null;\n }\n this._outBus = null;\n }\n\n protected abstract _createSpatialProperty(autoUpdate: boolean, minUpdateTime: number): AbstractSpatialAudio;\n\n protected _initSpatialProperty(): AbstractSpatialAudio {\n return (this._spatial = this._createSpatialProperty(this._spatialAutoUpdate, this._spatialMinUpdateTime));\n }\n\n private _onOutBusDisposed: Nullable<() => void> = null;\n\n /** @internal */\n public get _isSpatial(): boolean {\n return this._spatial !== null;\n }\n\n public set _isSpatial(value: boolean) {\n if (value && !this._spatial) {\n this._initSpatialProperty();\n } else if (!value && this._spatial) {\n this._spatial.dispose();\n this._spatial = null;\n }\n }\n}\n"]}
@@ -794,13 +794,13 @@ export class AbstractEngine {
794
794
  */
795
795
  // Not mixed with Version for tooling purpose.
796
796
  static get NpmPackage() {
797
- return "babylonjs@8.41.1";
797
+ return "babylonjs@8.41.2";
798
798
  }
799
799
  /**
800
800
  * Returns the current version of the framework
801
801
  */
802
802
  static get Version() {
803
- return "8.41.1";
803
+ return "8.41.2";
804
804
  }
805
805
  /**
806
806
  * Gets the HTML canvas attached with the current webGL context