@babylonjs/core 7.25.2 → 7.26.1

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 (167) hide show
  1. package/Engines/Extensions/engine.prefilteredCubeTexture.d.ts +0 -1
  2. package/Engines/Extensions/engine.prefilteredCubeTexture.js +0 -1
  3. package/Engines/Extensions/engine.prefilteredCubeTexture.js.map +1 -1
  4. package/Engines/Extensions/engine.readTexture.d.ts +2 -9
  5. package/Engines/Extensions/engine.readTexture.js +3 -76
  6. package/Engines/Extensions/engine.readTexture.js.map +1 -1
  7. package/Engines/WebGPU/Extensions/engine.alpha.js +3 -3
  8. package/Engines/WebGPU/Extensions/engine.alpha.js.map +1 -1
  9. package/Engines/WebGPU/Extensions/engine.cubeTexture.js +5 -5
  10. package/Engines/WebGPU/Extensions/engine.cubeTexture.js.map +1 -1
  11. package/Engines/WebGPU/Extensions/engine.rawTexture.js +10 -10
  12. package/Engines/WebGPU/Extensions/engine.rawTexture.js.map +1 -1
  13. package/Engines/WebGPU/Extensions/engine.readTexture.js +3 -3
  14. package/Engines/WebGPU/Extensions/engine.readTexture.js.map +1 -1
  15. package/Engines/WebGPU/Extensions/engine.renderTarget.js +6 -6
  16. package/Engines/WebGPU/Extensions/engine.renderTarget.js.map +1 -1
  17. package/Engines/WebGPU/Extensions/engine.renderTargetCube.js +2 -2
  18. package/Engines/WebGPU/Extensions/engine.renderTargetCube.js.map +1 -1
  19. package/Engines/WebGPU/Extensions/engine.renderTargetTexture.js +2 -2
  20. package/Engines/WebGPU/Extensions/engine.renderTargetTexture.js.map +1 -1
  21. package/Engines/WebGPU/webgpuBufferManager.js +1 -1
  22. package/Engines/WebGPU/webgpuBufferManager.js.map +1 -1
  23. package/Engines/WebGPU/webgpuRenderTargetWrapper.d.ts +2 -2
  24. package/Engines/WebGPU/webgpuRenderTargetWrapper.js.map +1 -1
  25. package/Engines/abstractEngine.d.ts +2 -0
  26. package/Engines/abstractEngine.functions.d.ts +9 -0
  27. package/Engines/abstractEngine.functions.js +76 -0
  28. package/Engines/abstractEngine.functions.js.map +1 -1
  29. package/Engines/abstractEngine.js +2 -2
  30. package/Engines/abstractEngine.js.map +1 -1
  31. package/Engines/engine.d.ts +7 -5
  32. package/Engines/engine.js +7 -0
  33. package/Engines/engine.js.map +1 -1
  34. package/Engines/thinWebGPUEngine.d.ts +66 -0
  35. package/Engines/thinWebGPUEngine.js +120 -0
  36. package/Engines/thinWebGPUEngine.js.map +1 -0
  37. package/Engines/webgpuEngine.d.ts +9 -58
  38. package/Engines/webgpuEngine.js +9 -108
  39. package/Engines/webgpuEngine.js.map +1 -1
  40. package/Materials/Node/Blocks/Dual/imageSourceBlock.d.ts +4 -0
  41. package/Materials/Node/Blocks/Dual/imageSourceBlock.js +17 -0
  42. package/Materials/Node/Blocks/Dual/imageSourceBlock.js.map +1 -1
  43. package/Materials/Node/Blocks/Dual/textureBlock.d.ts +2 -0
  44. package/Materials/Node/Blocks/Dual/textureBlock.js +30 -23
  45. package/Materials/Node/Blocks/Dual/textureBlock.js.map +1 -1
  46. package/Materials/Node/Blocks/colorConverterBlock.d.ts +36 -0
  47. package/Materials/Node/Blocks/colorConverterBlock.js +192 -0
  48. package/Materials/Node/Blocks/colorConverterBlock.js.map +1 -0
  49. package/Materials/Node/Blocks/index.d.ts +4 -0
  50. package/Materials/Node/Blocks/index.js +4 -0
  51. package/Materials/Node/Blocks/index.js.map +1 -1
  52. package/Materials/Node/Blocks/loopBlock.d.ts +49 -0
  53. package/Materials/Node/Blocks/loopBlock.js +110 -0
  54. package/Materials/Node/Blocks/loopBlock.js.map +1 -0
  55. package/Materials/Node/Blocks/storageReadBlock.d.ts +27 -0
  56. package/Materials/Node/Blocks/storageReadBlock.js +52 -0
  57. package/Materials/Node/Blocks/storageReadBlock.js.map +1 -0
  58. package/Materials/Node/Blocks/storageWriteBlock.d.ts +31 -0
  59. package/Materials/Node/Blocks/storageWriteBlock.js +62 -0
  60. package/Materials/Node/Blocks/storageWriteBlock.js.map +1 -0
  61. package/Materials/Node/nodeMaterial.d.ts +1 -0
  62. package/Materials/Node/nodeMaterial.js +44 -12
  63. package/Materials/Node/nodeMaterial.js.map +1 -1
  64. package/Materials/Node/nodeMaterialBlock.d.ts +6 -0
  65. package/Materials/Node/nodeMaterialBlock.js +46 -3
  66. package/Materials/Node/nodeMaterialBlock.js.map +1 -1
  67. package/Materials/Node/nodeMaterialBlockConnectionPoint.d.ts +6 -0
  68. package/Materials/Node/nodeMaterialBlockConnectionPoint.js +9 -0
  69. package/Materials/Node/nodeMaterialBlockConnectionPoint.js.map +1 -1
  70. package/Materials/Node/nodeMaterialBuildState.d.ts +4 -1
  71. package/Materials/Node/nodeMaterialBuildState.js +2 -0
  72. package/Materials/Node/nodeMaterialBuildState.js.map +1 -1
  73. package/Materials/Textures/Filtering/hdrFiltering.d.ts +0 -1
  74. package/Materials/Textures/Filtering/hdrFiltering.js +0 -1
  75. package/Materials/Textures/Filtering/hdrFiltering.js.map +1 -1
  76. package/Materials/Textures/Loaders/basisTextureLoader.d.ts +0 -1
  77. package/Materials/Textures/Loaders/basisTextureLoader.js +0 -1
  78. package/Materials/Textures/Loaders/basisTextureLoader.js.map +1 -1
  79. package/Materials/Textures/Loaders/ddsTextureLoader.d.ts +0 -1
  80. package/Materials/Textures/Loaders/ddsTextureLoader.js +0 -1
  81. package/Materials/Textures/Loaders/ddsTextureLoader.js.map +1 -1
  82. package/Materials/Textures/Loaders/ktxTextureLoader.d.ts +0 -1
  83. package/Materials/Textures/Loaders/ktxTextureLoader.js +0 -1
  84. package/Materials/Textures/Loaders/ktxTextureLoader.js.map +1 -1
  85. package/Materials/Textures/Procedurals/proceduralTexture.d.ts +0 -2
  86. package/Materials/Textures/Procedurals/proceduralTexture.js +0 -2
  87. package/Materials/Textures/Procedurals/proceduralTexture.js.map +1 -1
  88. package/Materials/Textures/baseTexture.d.ts +0 -1
  89. package/Materials/Textures/baseTexture.js +0 -1
  90. package/Materials/Textures/baseTexture.js.map +1 -1
  91. package/Materials/Textures/colorGradingTexture.d.ts +0 -1
  92. package/Materials/Textures/colorGradingTexture.js +0 -2
  93. package/Materials/Textures/colorGradingTexture.js.map +1 -1
  94. package/Materials/Textures/cubeTexture.d.ts +0 -2
  95. package/Materials/Textures/cubeTexture.js +0 -2
  96. package/Materials/Textures/cubeTexture.js.map +1 -1
  97. package/Materials/Textures/equiRectangularCubeTexture.d.ts +0 -1
  98. package/Materials/Textures/equiRectangularCubeTexture.js +0 -1
  99. package/Materials/Textures/equiRectangularCubeTexture.js.map +1 -1
  100. package/Materials/Textures/hdrCubeTexture.d.ts +0 -1
  101. package/Materials/Textures/hdrCubeTexture.js +0 -1
  102. package/Materials/Textures/hdrCubeTexture.js.map +1 -1
  103. package/Materials/Textures/rawCubeTexture.d.ts +0 -1
  104. package/Materials/Textures/rawCubeTexture.js +0 -1
  105. package/Materials/Textures/rawCubeTexture.js.map +1 -1
  106. package/Materials/Textures/rawTexture.d.ts +0 -1
  107. package/Materials/Textures/rawTexture.js +0 -1
  108. package/Materials/Textures/rawTexture.js.map +1 -1
  109. package/Materials/Textures/rawTexture2DArray.d.ts +0 -1
  110. package/Materials/Textures/rawTexture2DArray.js +0 -1
  111. package/Materials/Textures/rawTexture2DArray.js.map +1 -1
  112. package/Materials/Textures/rawTexture3D.d.ts +0 -1
  113. package/Materials/Textures/rawTexture3D.js +0 -1
  114. package/Materials/Textures/rawTexture3D.js.map +1 -1
  115. package/Materials/Textures/renderTargetTexture.d.ts +2 -3
  116. package/Materials/Textures/renderTargetTexture.js +13 -5
  117. package/Materials/Textures/renderTargetTexture.js.map +1 -1
  118. package/Materials/effectRenderer.d.ts +0 -1
  119. package/Materials/effectRenderer.js +0 -2
  120. package/Materials/effectRenderer.js.map +1 -1
  121. package/Materials/material.detailMapConfiguration.d.ts +2 -2
  122. package/Materials/material.detailMapConfiguration.js.map +1 -1
  123. package/Materials/uniformBuffer.d.ts +0 -1
  124. package/Materials/uniformBuffer.js +0 -1
  125. package/Materials/uniformBuffer.js.map +1 -1
  126. package/Meshes/GaussianSplatting/gaussianSplattingMesh.d.ts +3 -1
  127. package/Meshes/GaussianSplatting/gaussianSplattingMesh.js +19 -8
  128. package/Meshes/GaussianSplatting/gaussianSplattingMesh.js.map +1 -1
  129. package/Misc/basis.d.ts +3 -3
  130. package/Misc/basis.js.map +1 -1
  131. package/Misc/dds.d.ts +0 -1
  132. package/Misc/dds.js +0 -1
  133. package/Misc/dds.js.map +1 -1
  134. package/Misc/dumpTools.js +103 -82
  135. package/Misc/dumpTools.js.map +1 -1
  136. package/Misc/environmentTextureTools.d.ts +0 -2
  137. package/Misc/environmentTextureTools.js +0 -2
  138. package/Misc/environmentTextureTools.js.map +1 -1
  139. package/Misc/index.d.ts +2 -0
  140. package/Misc/index.js +3 -0
  141. package/Misc/index.js.map +1 -1
  142. package/Misc/minMaxReducer.d.ts +0 -1
  143. package/Misc/minMaxReducer.js +0 -1
  144. package/Misc/minMaxReducer.js.map +1 -1
  145. package/Misc/rgbdTextureTools.d.ts +0 -2
  146. package/Misc/rgbdTextureTools.js +5 -10
  147. package/Misc/rgbdTextureTools.js.map +1 -1
  148. package/Misc/screenshotTools.d.ts +0 -1
  149. package/Misc/screenshotTools.js +0 -1
  150. package/Misc/screenshotTools.js.map +1 -1
  151. package/Misc/textureTools.d.ts +0 -2
  152. package/Misc/textureTools.js +11 -2
  153. package/Misc/textureTools.js.map +1 -1
  154. package/Particles/particleSystem.js.map +1 -1
  155. package/Particles/thinParticleSystem.js.map +1 -1
  156. package/PostProcesses/anaglyphPostProcess.d.ts +2 -2
  157. package/PostProcesses/anaglyphPostProcess.js.map +1 -1
  158. package/PostProcesses/highlightsPostProcess.d.ts +2 -2
  159. package/PostProcesses/highlightsPostProcess.js.map +1 -1
  160. package/PostProcesses/postProcess.d.ts +0 -2
  161. package/PostProcesses/postProcess.js +0 -2
  162. package/PostProcesses/postProcess.js.map +1 -1
  163. package/PostProcesses/stereoscopicInterlacePostProcess.d.ts +3 -3
  164. package/PostProcesses/stereoscopicInterlacePostProcess.js.map +1 -1
  165. package/PostProcesses/tonemapPostProcess.d.ts +2 -2
  166. package/PostProcesses/tonemapPostProcess.js.map +1 -1
  167. package/package.json +1 -1
@@ -530,12 +530,7 @@ export class NodeMaterial extends PushMaterial {
530
530
  }
531
531
  this._initializeBlock(block, state, nodesToProcessForOtherBuildState, autoConfigure);
532
532
  }
533
- _initializeBlock(node, state, nodesToProcessForOtherBuildState, autoConfigure = true) {
534
- node.initialize(state);
535
- if (autoConfigure) {
536
- node.autoConfigure(this);
537
- }
538
- node._preparationId = this._buildId;
533
+ _attachBlock(node) {
539
534
  if (this.attachedBlocks.indexOf(node) === -1) {
540
535
  if (node.isUnique) {
541
536
  const className = node.getClassName();
@@ -548,18 +543,41 @@ export class NodeMaterial extends PushMaterial {
548
543
  }
549
544
  this.attachedBlocks.push(node);
550
545
  }
546
+ }
547
+ _initializeBlock(node, state, nodesToProcessForOtherBuildState, autoConfigure = true) {
548
+ node.initialize(state);
549
+ if (autoConfigure) {
550
+ node.autoConfigure(this);
551
+ }
552
+ node._preparationId = this._buildId;
553
+ this._attachBlock(node);
551
554
  for (const input of node.inputs) {
552
555
  input.associatedVariableName = "";
553
556
  const connectedPoint = input.connectedPoint;
554
- if (connectedPoint) {
557
+ if (connectedPoint && !connectedPoint._preventBubbleUp) {
555
558
  const block = connectedPoint.ownerBlock;
556
559
  if (block !== node) {
557
560
  this._processInitializeOnLink(block, state, nodesToProcessForOtherBuildState, autoConfigure);
558
561
  }
559
562
  }
560
563
  }
561
- // Teleportation
562
- if (node.isTeleportOut) {
564
+ // Loop
565
+ if (node.isLoop) {
566
+ // We need to keep the storage write block in the active blocks
567
+ const loopBlock = node;
568
+ if (loopBlock.loopID.hasEndpoints) {
569
+ for (const endpoint of loopBlock.loopID.endpoints) {
570
+ const block = endpoint.ownerBlock;
571
+ if (block.outputs.length !== 0) {
572
+ continue;
573
+ }
574
+ state._terminalBlocks.add(block); // Attach the storage write only
575
+ this._processInitializeOnLink(block, state, nodesToProcessForOtherBuildState, autoConfigure);
576
+ }
577
+ }
578
+ }
579
+ else if (node.isTeleportOut) {
580
+ // Teleportation
563
581
  const teleport = node;
564
582
  if (teleport.entryPoint) {
565
583
  this._processInitializeOnLink(teleport.entryPoint, state, nodesToProcessForOtherBuildState, autoConfigure);
@@ -573,9 +591,9 @@ export class NodeMaterial extends PushMaterial {
573
591
  if (node.target === NodeMaterialBlockTargets.VertexAndFragment) {
574
592
  node.buildId = id;
575
593
  }
576
- for (const inputs of node.inputs) {
577
- const connectedPoint = inputs.connectedPoint;
578
- if (connectedPoint) {
594
+ for (const input of node.inputs) {
595
+ const connectedPoint = input.connectedPoint;
596
+ if (connectedPoint && !connectedPoint._preventBubbleUp) {
579
597
  const block = connectedPoint.ownerBlock;
580
598
  if (block !== node) {
581
599
  this._resetDualBlocks(block, id);
@@ -589,6 +607,19 @@ export class NodeMaterial extends PushMaterial {
589
607
  this._resetDualBlocks(teleportOut.entryPoint, id);
590
608
  }
591
609
  }
610
+ else if (node.isLoop) {
611
+ // Loop
612
+ const loopBlock = node;
613
+ if (loopBlock.loopID.hasEndpoints) {
614
+ for (const endpoint of loopBlock.loopID.endpoints) {
615
+ const block = endpoint.ownerBlock;
616
+ if (block.outputs.length !== 0) {
617
+ continue;
618
+ }
619
+ this._resetDualBlocks(block, id);
620
+ }
621
+ }
622
+ }
592
623
  }
593
624
  /**
594
625
  * Remove a block from the current node material
@@ -1416,6 +1447,7 @@ export class NodeMaterial extends PushMaterial {
1416
1447
  this._vertexOutputNodes.length = 0;
1417
1448
  this._fragmentOutputNodes.length = 0;
1418
1449
  this.attachedBlocks.length = 0;
1450
+ this._buildIsInProgress = false;
1419
1451
  }
1420
1452
  /**
1421
1453
  * Clear the current material and set it to a default state