@babylonjs/core 6.34.0 → 6.34.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 (133) hide show
  1. package/Animations/animation.js +1 -1
  2. package/Animations/animation.js.map +1 -1
  3. package/Buffers/storageBuffer.d.ts +2 -1
  4. package/Buffers/storageBuffer.js +3 -2
  5. package/Buffers/storageBuffer.js.map +1 -1
  6. package/Cameras/Inputs/followCameraMouseWheelInput.js +12 -9
  7. package/Cameras/Inputs/followCameraMouseWheelInput.js.map +1 -1
  8. package/Cameras/Inputs/followCameraPointersInput.js +28 -9
  9. package/Cameras/Inputs/followCameraPointersInput.js.map +1 -1
  10. package/Cameras/arcRotateCamera.js +1 -1
  11. package/Cameras/arcRotateCamera.js.map +1 -1
  12. package/Cameras/followCameraInputsManager.js +2 -1
  13. package/Cameras/followCameraInputsManager.js.map +1 -1
  14. package/Debug/skeletonViewer.js +2 -1
  15. package/Debug/skeletonViewer.js.map +1 -1
  16. package/Engines/Extensions/engine.storageBuffer.d.ts +2 -1
  17. package/Engines/Extensions/engine.storageBuffer.js.map +1 -1
  18. package/Engines/Processors/shaderCodeInliner.js +15 -14
  19. package/Engines/Processors/shaderCodeInliner.js.map +1 -1
  20. package/Engines/WebGPU/Extensions/engine.computeShader.js +3 -2
  21. package/Engines/WebGPU/Extensions/engine.computeShader.js.map +1 -1
  22. package/Engines/WebGPU/Extensions/engine.storageBuffer.js +14 -5
  23. package/Engines/WebGPU/Extensions/engine.storageBuffer.js.map +1 -1
  24. package/Engines/WebGPU/webgpuShaderProcessor.js +2 -1
  25. package/Engines/WebGPU/webgpuShaderProcessor.js.map +1 -1
  26. package/Engines/WebGPU/webgpuTintWASM.js +3 -2
  27. package/Engines/WebGPU/webgpuTintWASM.js.map +1 -1
  28. package/Engines/engine.d.ts +2 -4
  29. package/Engines/engine.js.map +1 -1
  30. package/Engines/nativeEngine.js +4 -2
  31. package/Engines/nativeEngine.js.map +1 -1
  32. package/Engines/thinEngine.js +4 -4
  33. package/Engines/thinEngine.js.map +1 -1
  34. package/Engines/webgpuEngine.js +75 -46
  35. package/Engines/webgpuEngine.js.map +1 -1
  36. package/FlowGraph/Blocks/Execution/flowGraphConsoleLogBlock.js +2 -1
  37. package/FlowGraph/Blocks/Execution/flowGraphConsoleLogBlock.js.map +1 -1
  38. package/FlowGraph/flowGraphBlock.js +1 -21
  39. package/FlowGraph/flowGraphBlock.js.map +1 -1
  40. package/FlowGraph/flowGraphExecutionBlock.d.ts +1 -0
  41. package/FlowGraph/flowGraphExecutionBlock.js +20 -0
  42. package/FlowGraph/flowGraphExecutionBlock.js.map +1 -1
  43. package/Gizmos/axisScaleGizmo.d.ts +1 -0
  44. package/Gizmos/axisScaleGizmo.js +12 -0
  45. package/Gizmos/axisScaleGizmo.js.map +1 -1
  46. package/Gizmos/lightGizmo.js +2 -1
  47. package/Gizmos/lightGizmo.js.map +1 -1
  48. package/Gizmos/rotationGizmo.js +1 -1
  49. package/Gizmos/rotationGizmo.js.map +1 -1
  50. package/Lights/Shadows/cascadedShadowGenerator.js +1 -1
  51. package/Lights/Shadows/cascadedShadowGenerator.js.map +1 -1
  52. package/Materials/Node/Blocks/Dual/lightBlock.js +2 -1
  53. package/Materials/Node/Blocks/Dual/lightBlock.js.map +1 -1
  54. package/Materials/Node/Blocks/Dual/reflectionTextureBlock.js +3 -2
  55. package/Materials/Node/Blocks/Dual/reflectionTextureBlock.js.map +1 -1
  56. package/Materials/Node/Blocks/Fragment/fragDepthBlock.js +2 -1
  57. package/Materials/Node/Blocks/Fragment/fragDepthBlock.js.map +1 -1
  58. package/Materials/Node/Blocks/Fragment/heightToNormalBlock.js +2 -1
  59. package/Materials/Node/Blocks/Fragment/heightToNormalBlock.js.map +1 -1
  60. package/Materials/Node/Blocks/PBR/anisotropyBlock.js +2 -1
  61. package/Materials/Node/Blocks/PBR/anisotropyBlock.js.map +1 -1
  62. package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.js +3 -2
  63. package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.js.map +1 -1
  64. package/Materials/Node/Blocks/PBR/reflectionBlock.js +2 -1
  65. package/Materials/Node/Blocks/PBR/reflectionBlock.js.map +1 -1
  66. package/Materials/Node/nodeMaterial.js +9 -8
  67. package/Materials/Node/nodeMaterial.js.map +1 -1
  68. package/Materials/Node/nodeMaterialBlock.js +2 -1
  69. package/Materials/Node/nodeMaterialBlock.js.map +1 -1
  70. package/Materials/Textures/renderTargetTexture.js +1 -2
  71. package/Materials/Textures/renderTargetTexture.js.map +1 -1
  72. package/Meshes/Builders/groundBuilder.d.ts +7 -1
  73. package/Meshes/Builders/groundBuilder.js +17 -8
  74. package/Meshes/Builders/groundBuilder.js.map +1 -1
  75. package/Meshes/Compression/dracoCompression.js.map +1 -1
  76. package/Meshes/Node/nodeGeometryBlock.js +2 -1
  77. package/Meshes/Node/nodeGeometryBlock.js.map +1 -1
  78. package/Meshes/mesh.d.ts +2 -1
  79. package/Meshes/mesh.js +3 -2
  80. package/Meshes/mesh.js.map +1 -1
  81. package/Misc/assetsManager.js +2 -2
  82. package/Misc/assetsManager.js.map +1 -1
  83. package/Misc/dds.js +1 -1
  84. package/Misc/dds.js.map +1 -1
  85. package/Misc/fileTools.js +4 -0
  86. package/Misc/fileTools.js.map +1 -1
  87. package/Misc/logger.d.ts +3 -3
  88. package/Misc/logger.js +8 -4
  89. package/Misc/logger.js.map +1 -1
  90. package/Misc/sceneSerializer.js +2 -1
  91. package/Misc/sceneSerializer.js.map +1 -1
  92. package/Misc/tools.d.ts +2 -7
  93. package/Misc/tools.js.map +1 -1
  94. package/Navigation/Plugins/recastJSPlugin.js +3 -3
  95. package/Navigation/Plugins/recastJSPlugin.js.map +1 -1
  96. package/Physics/v2/Plugins/havokPlugin.js +1 -1
  97. package/Physics/v2/Plugins/havokPlugin.js.map +1 -1
  98. package/Physics/v2/index.d.ts +1 -0
  99. package/Physics/v2/index.js +1 -0
  100. package/Physics/v2/index.js.map +1 -1
  101. package/Physics/v2/physicsBody.d.ts +5 -0
  102. package/Physics/v2/physicsBody.js +7 -0
  103. package/Physics/v2/physicsBody.js.map +1 -1
  104. package/Physics/v2/ragdoll.d.ts +102 -0
  105. package/Physics/v2/ragdoll.js +221 -0
  106. package/Physics/v2/ragdoll.js.map +1 -0
  107. package/PostProcesses/RenderPipeline/Pipelines/ssao2RenderingPipeline.js +2 -2
  108. package/PostProcesses/RenderPipeline/Pipelines/ssao2RenderingPipeline.js.map +1 -1
  109. package/PostProcesses/RenderPipeline/Pipelines/ssrRenderingPipeline.js +3 -2
  110. package/PostProcesses/RenderPipeline/Pipelines/ssrRenderingPipeline.js.map +1 -1
  111. package/PostProcesses/screenSpaceCurvaturePostProcess.js +1 -1
  112. package/PostProcesses/screenSpaceCurvaturePostProcess.js.map +1 -1
  113. package/PostProcesses/screenSpaceReflectionPostProcess.js +3 -2
  114. package/PostProcesses/screenSpaceReflectionPostProcess.js.map +1 -1
  115. package/Rendering/GaussianSplatting/gaussianSplatting.js.map +1 -1
  116. package/Shaders/ShadersInclude/pbrBlockSubSurface.js +3 -2
  117. package/Shaders/ShadersInclude/pbrBlockSubSurface.js.map +1 -1
  118. package/XR/features/WebXRControllerPhysics.js +2 -2
  119. package/XR/features/WebXRControllerPhysics.js.map +1 -1
  120. package/XR/features/WebXRMeshDetector.js +2 -1
  121. package/XR/features/WebXRMeshDetector.js.map +1 -1
  122. package/XR/features/WebXRWalkingLocomotion.js +1 -1
  123. package/XR/features/WebXRWalkingLocomotion.js.map +1 -1
  124. package/XR/motionController/webXRMotionControllerManager.js +1 -1
  125. package/XR/motionController/webXRMotionControllerManager.js.map +1 -1
  126. package/XR/webXRExperienceHelper.js +2 -2
  127. package/XR/webXRExperienceHelper.js.map +1 -1
  128. package/assetContainer.js +2 -2
  129. package/assetContainer.js.map +1 -1
  130. package/package.json +1 -1
  131. package/scene.d.ts +2 -4
  132. package/scene.js +2 -1
  133. package/scene.js.map +1 -1
@@ -433,7 +433,7 @@ export class WebGPUEngine extends Engine {
433
433
  if (this.dbgVerboseLogsForFirstFrames) {
434
434
  if (this._count === undefined) {
435
435
  this._count = 0;
436
- console.log("%c frame #" + this._count + " - begin", "background: #ffff00");
436
+ Logger.Log(["%c frame #" + this._count + " - begin", "background: #ffff00"]);
437
437
  }
438
438
  }
439
439
  this._uploadEncoder = this._device.createCommandEncoder(this._uploadEncoderDescriptor);
@@ -458,11 +458,11 @@ export class WebGPUEngine extends Engine {
458
458
  this.resize();
459
459
  })
460
460
  .catch((e) => {
461
+ var _a;
461
462
  Logger.Error("Can not create WebGPU Device and/or context.");
462
463
  Logger.Error(e);
463
- if (console.trace) {
464
- console.trace();
465
- }
464
+ // eslint-disable-next-line no-console
465
+ (_a = console === null || console === void 0 ? void 0 : console.trace) === null || _a === void 0 ? void 0 : _a.call(console);
466
466
  });
467
467
  }
468
468
  _initGlslang(glslangOptions) {
@@ -692,7 +692,7 @@ export class WebGPUEngine extends Engine {
692
692
  this._count = 0;
693
693
  }
694
694
  if (!this._count || this._count < this.dbgVerboseLogsNumFrames) {
695
- console.log("frame #" + this._count + " - setSize -", width, height);
695
+ Logger.Log(["frame #" + this._count + " - setSize -", width, height]);
696
696
  }
697
697
  }
698
698
  this._initializeMainAttachments();
@@ -817,7 +817,14 @@ export class WebGPUEngine extends Engine {
817
817
  this._count = 0;
818
818
  }
819
819
  if (!this._count || this._count < this.dbgVerboseLogsNumFrames) {
820
- console.log("frame #" + this._count + " - viewport applied - (", this._viewportCached.x, this._viewportCached.y, this._viewportCached.z, this._viewportCached.w, ") current pass is main pass=" + this._currentPassIsMainPass());
820
+ Logger.Log([
821
+ "frame #" + this._count + " - viewport applied - (",
822
+ this._viewportCached.x,
823
+ this._viewportCached.y,
824
+ this._viewportCached.z,
825
+ this._viewportCached.w,
826
+ ") current pass is main pass=" + this._currentPassIsMainPass(),
827
+ ]);
821
828
  }
822
829
  }
823
830
  }
@@ -854,7 +861,14 @@ export class WebGPUEngine extends Engine {
854
861
  this._count = 0;
855
862
  }
856
863
  if (!this._count || this._count < this.dbgVerboseLogsNumFrames) {
857
- console.log("frame #" + this._count + " - scissor applied - (", this._scissorCached.x, this._scissorCached.y, this._scissorCached.z, this._scissorCached.w, ") current pass is main pass=" + this._currentPassIsMainPass());
864
+ Logger.Log([
865
+ "frame #" + this._count + " - scissor applied - (",
866
+ this._scissorCached.x,
867
+ this._scissorCached.y,
868
+ this._scissorCached.z,
869
+ this._scissorCached.w,
870
+ ") current pass is main pass=" + this._currentPassIsMainPass(),
871
+ ]);
858
872
  }
859
873
  }
860
874
  }
@@ -933,7 +947,7 @@ export class WebGPUEngine extends Engine {
933
947
  this._count = 0;
934
948
  }
935
949
  if (!this._count || this._count < this.dbgVerboseLogsNumFrames) {
936
- console.log("frame #" + this._count + " - clear - backBuffer=", backBuffer, " depth=", depth, " stencil=", stencil, " scissor is active=", hasScissor);
950
+ Logger.Log(["frame #" + this._count + " - clear - backBuffer=", backBuffer, " depth=", depth, " stencil=", stencil, " scissor is active=", hasScissor]);
937
951
  }
938
952
  }
939
953
  // We need to recreate the render pass so that the new parameters for clear color / depth / stencil are taken into account
@@ -1257,10 +1271,10 @@ export class WebGPUEngine extends Engine {
1257
1271
  const webGpuContext = pipelineContext;
1258
1272
  const shaderLanguage = webGpuContext.shaderProcessingContext.shaderLanguage;
1259
1273
  if (this.dbgShowShaderCode) {
1260
- console.log(defines);
1261
- console.log(vertexSourceCode);
1262
- console.log(fragmentSourceCode);
1263
- console.log("***********************************************");
1274
+ Logger.Log(["defines", defines]);
1275
+ Logger.Log(vertexSourceCode);
1276
+ Logger.Log(fragmentSourceCode);
1277
+ Logger.Log("***********************************************");
1264
1278
  }
1265
1279
  webGpuContext.sources = {
1266
1280
  fragment: fragmentSourceCode,
@@ -1319,7 +1333,7 @@ export class WebGPUEngine extends Engine {
1319
1333
  effect.drawContext === this._currentDrawContext &&
1320
1334
  !this._forceEnableEffect)) {
1321
1335
  if (!effect.effect && this.dbgShowEmptyEnableEffectCalls) {
1322
- console.error("drawWrapper=", effect);
1336
+ Logger.Log(["drawWrapper=", effect]);
1323
1337
  throw "Invalid call to enableEffect: the effect property is empty!";
1324
1338
  }
1325
1339
  return;
@@ -1331,7 +1345,7 @@ export class WebGPUEngine extends Engine {
1331
1345
  this._currentDrawContext = effect.drawContext;
1332
1346
  this._counters.numEnableDrawWrapper++;
1333
1347
  if (!this._currentMaterialContext) {
1334
- console.error("drawWrapper=", effect);
1348
+ Logger.Log(["drawWrapper=", effect]);
1335
1349
  throw `Invalid call to enableEffect: the materialContext property is empty!`;
1336
1350
  }
1337
1351
  }
@@ -1708,7 +1722,7 @@ export class WebGPUEngine extends Engine {
1708
1722
  this._count = 0;
1709
1723
  }
1710
1724
  if (!this._count || this._count < this.dbgVerboseLogsNumFrames) {
1711
- console.log("frame #" + this._count + " - _setTexture called with a null _currentEffect! texture=", texture);
1725
+ Logger.Log(["frame #" + this._count + " - _setTexture called with a null _currentEffect! texture=", texture]);
1712
1726
  }
1713
1727
  }
1714
1728
  }
@@ -1758,7 +1772,7 @@ export class WebGPUEngine extends Engine {
1758
1772
  this._count = 0;
1759
1773
  }
1760
1774
  if (!this._count || this._count < this.dbgVerboseLogsNumFrames) {
1761
- console.log("frame #" +
1775
+ Logger.Log("frame #" +
1762
1776
  this._count +
1763
1777
  " - generate mipmaps - width=" +
1764
1778
  texture.width +
@@ -1911,7 +1925,7 @@ export class WebGPUEngine extends Engine {
1911
1925
  for (const name in UniformBuffer._UpdatedUbosInFrame) {
1912
1926
  list.push(name + ":" + UniformBuffer._UpdatedUbosInFrame[name]);
1913
1927
  }
1914
- console.log("frame #" + this._count + " - updated ubos -", list.join(", "));
1928
+ Logger.Log(["frame #" + this._count + " - updated ubos -", list.join(", ")]);
1915
1929
  }
1916
1930
  }
1917
1931
  UniformBuffer._UpdatedUbosInFrame = {};
@@ -1933,12 +1947,12 @@ export class WebGPUEngine extends Engine {
1933
1947
  this._count = 0;
1934
1948
  }
1935
1949
  if (this._count < this.dbgVerboseLogsNumFrames) {
1936
- console.log("%c frame #" + this._count + " - end", "background: #ffff00");
1950
+ Logger.Log(["%c frame #" + this._count + " - end", "background: #ffff00"]);
1937
1951
  }
1938
1952
  if (this._count < this.dbgVerboseLogsNumFrames) {
1939
1953
  this._count++;
1940
1954
  if (this._count !== this.dbgVerboseLogsNumFrames) {
1941
- console.log("%c frame #" + this._count + " - begin", "background: #ffff00");
1955
+ Logger.Log(["%c frame #" + this._count + " - begin", "background: #ffff00"]);
1942
1956
  }
1943
1957
  }
1944
1958
  }
@@ -2071,18 +2085,22 @@ export class WebGPUEngine extends Engine {
2071
2085
  }
2072
2086
  if (!this._count || this._count < this.dbgVerboseLogsNumFrames) {
2073
2087
  const internalTexture = rtWrapper.texture;
2074
- console.log("frame #" +
2075
- this._count +
2076
- " - render target begin pass - rtt name=" +
2077
- renderTargetWrapper.label +
2078
- ", internalTexture.uniqueId=" +
2079
- internalTexture.uniqueId +
2080
- ", width=" +
2081
- internalTexture.width +
2082
- ", height=" +
2083
- internalTexture.height +
2084
- ", setClearStates=" +
2085
- setClearStates, "renderPassDescriptor=", this._rttRenderPassWrapper.renderPassDescriptor);
2088
+ Logger.Log([
2089
+ "frame #" +
2090
+ this._count +
2091
+ " - render target begin pass - rtt name=" +
2092
+ renderTargetWrapper.label +
2093
+ ", internalTexture.uniqueId=" +
2094
+ internalTexture.uniqueId +
2095
+ ", width=" +
2096
+ internalTexture.width +
2097
+ ", height=" +
2098
+ internalTexture.height +
2099
+ ", setClearStates=" +
2100
+ setClearStates,
2101
+ "renderPassDescriptor=",
2102
+ this._rttRenderPassWrapper.renderPassDescriptor,
2103
+ ]);
2086
2104
  }
2087
2105
  }
2088
2106
  (_h = this._debugFlushPendingCommands) === null || _h === void 0 ? void 0 : _h.call(this);
@@ -2131,7 +2149,12 @@ export class WebGPUEngine extends Engine {
2131
2149
  this._count = 0;
2132
2150
  }
2133
2151
  if (!this._count || this._count < this.dbgVerboseLogsNumFrames) {
2134
- console.log("frame #" + this._count + " - main begin pass - texture width=" + this._mainTextureExtends.width, " height=" + this._mainTextureExtends.height + ", setClearStates=" + setClearStates, "renderPassDescriptor=", this._mainRenderPassWrapper.renderPassDescriptor);
2152
+ Logger.Log([
2153
+ "frame #" + this._count + " - main begin pass - texture width=" + this._mainTextureExtends.width,
2154
+ " height=" + this._mainTextureExtends.height + ", setClearStates=" + setClearStates,
2155
+ "renderPassDescriptor=",
2156
+ this._mainRenderPassWrapper.renderPassDescriptor,
2157
+ ]);
2135
2158
  }
2136
2159
  }
2137
2160
  (_b = this._debugPushGroup) === null || _b === void 0 ? void 0 : _b.call(this, "main pass", 0);
@@ -2161,7 +2184,7 @@ export class WebGPUEngine extends Engine {
2161
2184
  this._count = 0;
2162
2185
  }
2163
2186
  if (!this._count || this._count < this.dbgVerboseLogsNumFrames) {
2164
- console.log("frame #" +
2187
+ Logger.Log("frame #" +
2165
2188
  this._count +
2166
2189
  " - " +
2167
2190
  (currentPassIndex === 2 ? "main" : "render target") +
@@ -2222,18 +2245,24 @@ export class WebGPUEngine extends Engine {
2222
2245
  this._count = 0;
2223
2246
  }
2224
2247
  if (!this._count || this._count < this.dbgVerboseLogsNumFrames) {
2225
- console.log("frame #" +
2226
- this._count +
2227
- " - bindFramebuffer - rtt name=" +
2228
- texture.label +
2229
- ", internalTexture.uniqueId=" +
2230
- ((_b = texture.texture) === null || _b === void 0 ? void 0 : _b.uniqueId) +
2231
- ", face=" +
2232
- faceIndex +
2233
- ", lodLevel=" +
2234
- lodLevel +
2235
- ", layer=" +
2236
- layer, "colorAttachmentViewDescriptor=", this._rttRenderPassWrapper.colorAttachmentViewDescriptor, "depthAttachmentViewDescriptor=", this._rttRenderPassWrapper.depthAttachmentViewDescriptor);
2248
+ Logger.Log([
2249
+ "frame #" +
2250
+ this._count +
2251
+ " - bindFramebuffer - rtt name=" +
2252
+ texture.label +
2253
+ ", internalTexture.uniqueId=" +
2254
+ ((_b = texture.texture) === null || _b === void 0 ? void 0 : _b.uniqueId) +
2255
+ ", face=" +
2256
+ faceIndex +
2257
+ ", lodLevel=" +
2258
+ lodLevel +
2259
+ ", layer=" +
2260
+ layer,
2261
+ "colorAttachmentViewDescriptor=",
2262
+ this._rttRenderPassWrapper.colorAttachmentViewDescriptor,
2263
+ "depthAttachmentViewDescriptor=",
2264
+ this._rttRenderPassWrapper.depthAttachmentViewDescriptor,
2265
+ ]);
2237
2266
  }
2238
2267
  }
2239
2268
  // We don't create the render pass just now, we do a lazy creation of the render pass, hoping the render pass will be created by a call to clear()...
@@ -2281,7 +2310,7 @@ export class WebGPUEngine extends Engine {
2281
2310
  this._count = 0;
2282
2311
  }
2283
2312
  if (!this._count || this._count < this.dbgVerboseLogsNumFrames) {
2284
- console.log("frame #" + this._count + " - unBindFramebuffer - rtt name=" + texture.label + ", internalTexture.uniqueId=", (_b = texture.texture) === null || _b === void 0 ? void 0 : _b.uniqueId);
2313
+ Logger.Log("frame #" + this._count + " - unBindFramebuffer - rtt name=" + texture.label + ", internalTexture.uniqueId=", (_b = texture.texture) === null || _b === void 0 ? void 0 : _b.uniqueId);
2285
2314
  }
2286
2315
  }
2287
2316
  this._mrtAttachments = [];