@babylonjs/core 7.2.2 → 7.3.0

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 (620) hide show
  1. package/Animations/runtimeAnimation.d.ts +1 -0
  2. package/Animations/runtimeAnimation.js +12 -3
  3. package/Animations/runtimeAnimation.js.map +1 -1
  4. package/Audio/audioEngine.js +2 -2
  5. package/Audio/audioEngine.js.map +1 -1
  6. package/Bones/boneLookController.js +3 -0
  7. package/Bones/boneLookController.js.map +1 -1
  8. package/Buffers/buffer.d.ts +5 -5
  9. package/Buffers/buffer.js.map +1 -1
  10. package/Buffers/storageBuffer.d.ts +2 -2
  11. package/Buffers/storageBuffer.js.map +1 -1
  12. package/Cameras/Inputs/arcRotateCameraKeyboardMoveInput.js.map +1 -1
  13. package/Cameras/Inputs/flyCameraKeyboardInput.js.map +1 -1
  14. package/Cameras/Inputs/followCameraKeyboardMoveInput.js.map +1 -1
  15. package/Cameras/Inputs/freeCameraKeyboardMoveInput.js.map +1 -1
  16. package/Compute/computeEffect.d.ts +3 -3
  17. package/Compute/computeEffect.js.map +1 -1
  18. package/Compute/computeShader.d.ts +10 -2
  19. package/Compute/computeShader.js +53 -35
  20. package/Compute/computeShader.js.map +1 -1
  21. package/DeviceInput/InputDevices/deviceSourceManager.d.ts +2 -2
  22. package/DeviceInput/InputDevices/deviceSourceManager.js.map +1 -1
  23. package/DeviceInput/internalDeviceSourceManager.d.ts +4 -4
  24. package/DeviceInput/internalDeviceSourceManager.js.map +1 -1
  25. package/DeviceInput/webDeviceInputSystem.d.ts +2 -2
  26. package/DeviceInput/webDeviceInputSystem.js.map +1 -1
  27. package/Engines/AbstractEngine/abstractEngine.alpha.d.ts +10 -0
  28. package/Engines/AbstractEngine/abstractEngine.alpha.js +29 -0
  29. package/Engines/AbstractEngine/abstractEngine.alpha.js.map +1 -0
  30. package/Engines/AbstractEngine/abstractEngine.cubeTexture.d.ts +17 -0
  31. package/Engines/AbstractEngine/abstractEngine.cubeTexture.js +138 -0
  32. package/Engines/AbstractEngine/abstractEngine.cubeTexture.js.map +1 -0
  33. package/Engines/AbstractEngine/abstractEngine.dom.d.ts +61 -0
  34. package/Engines/AbstractEngine/abstractEngine.dom.js +27 -0
  35. package/Engines/AbstractEngine/abstractEngine.dom.js.map +1 -0
  36. package/Engines/AbstractEngine/abstractEngine.loadingScreen.d.ts +30 -0
  37. package/Engines/AbstractEngine/abstractEngine.loadingScreen.js +48 -0
  38. package/Engines/AbstractEngine/abstractEngine.loadingScreen.js.map +1 -0
  39. package/Engines/AbstractEngine/abstractEngine.query.d.ts +122 -0
  40. package/Engines/AbstractEngine/abstractEngine.query.js +175 -0
  41. package/Engines/AbstractEngine/abstractEngine.query.js.map +1 -0
  42. package/Engines/AbstractEngine/abstractEngine.renderPass.d.ts +26 -0
  43. package/Engines/AbstractEngine/abstractEngine.renderPass.js +29 -0
  44. package/Engines/AbstractEngine/abstractEngine.renderPass.js.map +1 -0
  45. package/Engines/AbstractEngine/abstractEngine.states.d.ts +162 -0
  46. package/Engines/AbstractEngine/abstractEngine.states.js +105 -0
  47. package/Engines/AbstractEngine/abstractEngine.states.js.map +1 -0
  48. package/Engines/AbstractEngine/abstractEngine.texture.d.ts +16 -0
  49. package/Engines/AbstractEngine/abstractEngine.texture.js +11 -0
  50. package/Engines/AbstractEngine/abstractEngine.texture.js.map +1 -0
  51. package/Engines/AbstractEngine/index.d.ts +8 -0
  52. package/Engines/AbstractEngine/index.js +10 -0
  53. package/Engines/AbstractEngine/index.js.map +1 -0
  54. package/Engines/Extensions/engine.alpha.d.ts +0 -24
  55. package/Engines/Extensions/engine.alpha.js +0 -35
  56. package/Engines/Extensions/engine.alpha.js.map +1 -1
  57. package/Engines/Extensions/engine.computeShader.d.ts +15 -2
  58. package/Engines/Extensions/engine.computeShader.js +5 -1
  59. package/Engines/Extensions/engine.computeShader.js.map +1 -1
  60. package/Engines/Extensions/engine.cubeTexture.d.ts +0 -8
  61. package/Engines/Extensions/engine.cubeTexture.js +2 -135
  62. package/Engines/Extensions/engine.cubeTexture.js.map +1 -1
  63. package/Engines/Extensions/engine.debugging.d.ts +2 -2
  64. package/Engines/Extensions/engine.debugging.js +5 -5
  65. package/Engines/Extensions/engine.debugging.js.map +1 -1
  66. package/Engines/Extensions/engine.dynamicTexture.js +3 -2
  67. package/Engines/Extensions/engine.dynamicTexture.js.map +1 -1
  68. package/Engines/Extensions/engine.multiview.js.map +1 -1
  69. package/Engines/Extensions/engine.query.d.ts +5 -120
  70. package/Engines/Extensions/engine.query.js +14 -150
  71. package/Engines/Extensions/engine.query.js.map +1 -1
  72. package/Engines/Extensions/engine.renderTarget.js +0 -9
  73. package/Engines/Extensions/engine.renderTarget.js.map +1 -1
  74. package/Engines/Extensions/engine.views.d.ts +3 -2
  75. package/Engines/Extensions/engine.views.js.map +1 -1
  76. package/Engines/Processors/iShaderProcessor.d.ts +2 -2
  77. package/Engines/Processors/iShaderProcessor.js.map +1 -1
  78. package/Engines/Processors/shaderProcessor.d.ts +3 -3
  79. package/Engines/Processors/shaderProcessor.js.map +1 -1
  80. package/Engines/WebGL/webGLRenderTargetWrapper.js +12 -9
  81. package/Engines/WebGL/webGLRenderTargetWrapper.js.map +1 -1
  82. package/Engines/WebGL/webGLShaderProcessors.d.ts +2 -2
  83. package/Engines/WebGL/webGLShaderProcessors.js.map +1 -1
  84. package/Engines/WebGPU/Extensions/engine.alpha.d.ts +35 -0
  85. package/Engines/WebGPU/Extensions/engine.alpha.js +4 -4
  86. package/Engines/WebGPU/Extensions/engine.alpha.js.map +1 -1
  87. package/Engines/WebGPU/Extensions/engine.computeShader.d.ts +9 -0
  88. package/Engines/WebGPU/Extensions/engine.computeShader.js +13 -2
  89. package/Engines/WebGPU/Extensions/engine.computeShader.js.map +1 -1
  90. package/Engines/WebGPU/Extensions/engine.cubeTexture.d.ts +78 -1
  91. package/Engines/WebGPU/Extensions/engine.cubeTexture.js.map +1 -1
  92. package/Engines/WebGPU/Extensions/engine.dynamicTexture.d.ts +27 -1
  93. package/Engines/WebGPU/Extensions/engine.dynamicTexture.js +3 -3
  94. package/Engines/WebGPU/Extensions/engine.dynamicTexture.js.map +1 -1
  95. package/Engines/WebGPU/Extensions/engine.externalTexture.d.ts +16 -0
  96. package/Engines/WebGPU/Extensions/engine.externalTexture.js.map +1 -1
  97. package/Engines/WebGPU/Extensions/engine.multiRender.d.ts +55 -1
  98. package/Engines/WebGPU/Extensions/engine.multiRender.js.map +1 -1
  99. package/Engines/WebGPU/Extensions/engine.query.d.ts +1 -1
  100. package/Engines/WebGPU/Extensions/engine.query.js +1 -0
  101. package/Engines/WebGPU/Extensions/engine.query.js.map +1 -1
  102. package/Engines/WebGPU/Extensions/engine.rawTexture.d.ts +185 -1
  103. package/Engines/WebGPU/Extensions/engine.rawTexture.js.map +1 -1
  104. package/Engines/WebGPU/Extensions/engine.readTexture.d.ts +10 -1
  105. package/Engines/WebGPU/Extensions/engine.readTexture.js.map +1 -1
  106. package/Engines/WebGPU/Extensions/engine.renderTarget.d.ts +38 -1
  107. package/Engines/WebGPU/Extensions/engine.renderTarget.js.map +1 -1
  108. package/Engines/WebGPU/Extensions/engine.renderTargetCube.d.ts +13 -1
  109. package/Engines/WebGPU/Extensions/engine.renderTargetCube.js.map +1 -1
  110. package/Engines/WebGPU/Extensions/engine.storageBuffer.d.ts +38 -1
  111. package/Engines/WebGPU/Extensions/engine.storageBuffer.js.map +1 -1
  112. package/Engines/WebGPU/Extensions/engine.textureSampler.d.ts +10 -0
  113. package/Engines/WebGPU/Extensions/engine.textureSampler.js.map +1 -1
  114. package/Engines/WebGPU/Extensions/engine.videoTexture.d.ts +14 -1
  115. package/Engines/WebGPU/Extensions/engine.videoTexture.js.map +1 -1
  116. package/Engines/WebGPU/webgpuShaderProcessorsGLSL.d.ts +2 -2
  117. package/Engines/WebGPU/webgpuShaderProcessorsGLSL.js.map +1 -1
  118. package/Engines/WebGPU/webgpuShaderProcessorsWGSL.d.ts +2 -0
  119. package/Engines/WebGPU/webgpuShaderProcessorsWGSL.js +2 -0
  120. package/Engines/WebGPU/webgpuShaderProcessorsWGSL.js.map +1 -1
  121. package/Engines/abstractEngine.d.ts +1695 -0
  122. package/Engines/abstractEngine.js +1362 -0
  123. package/Engines/abstractEngine.js.map +1 -0
  124. package/Engines/engine.common.d.ts +39 -0
  125. package/Engines/engine.common.js +226 -0
  126. package/Engines/engine.common.js.map +1 -0
  127. package/Engines/engine.d.ts +40 -447
  128. package/Engines/engine.js +64 -810
  129. package/Engines/engine.js.map +1 -1
  130. package/Engines/engineFactory.d.ts +2 -2
  131. package/Engines/engineFactory.js.map +1 -1
  132. package/Engines/engineStore.d.ts +4 -4
  133. package/Engines/engineStore.js.map +1 -1
  134. package/Engines/index.d.ts +3 -0
  135. package/Engines/index.js +3 -0
  136. package/Engines/index.js.map +1 -1
  137. package/Engines/nativeEngine.d.ts +1 -1
  138. package/Engines/nativeEngine.js +2 -1
  139. package/Engines/nativeEngine.js.map +1 -1
  140. package/Engines/nullEngine.d.ts +2 -2
  141. package/Engines/nullEngine.js +2 -3
  142. package/Engines/nullEngine.js.map +1 -1
  143. package/Engines/renderTargetWrapper.d.ts +3 -3
  144. package/Engines/renderTargetWrapper.js.map +1 -1
  145. package/Engines/thinEngine.d.ts +34 -597
  146. package/Engines/thinEngine.js +85 -1143
  147. package/Engines/thinEngine.js.map +1 -1
  148. package/Engines/webgpuEngine.d.ts +147 -109
  149. package/Engines/webgpuEngine.js +249 -162
  150. package/Engines/webgpuEngine.js.map +1 -1
  151. package/Instrumentation/engineInstrumentation.d.ts +5 -4
  152. package/Instrumentation/engineInstrumentation.js.map +1 -1
  153. package/Layers/effectLayer.d.ts +2 -2
  154. package/Layers/effectLayer.js +3 -3
  155. package/Layers/effectLayer.js.map +1 -1
  156. package/Layers/effectLayerSceneComponent.js.map +1 -1
  157. package/Layers/glowLayer.js +3 -3
  158. package/Layers/glowLayer.js.map +1 -1
  159. package/Layers/highlightLayer.js +3 -3
  160. package/Layers/highlightLayer.js.map +1 -1
  161. package/Layers/layerSceneComponent.js.map +1 -1
  162. package/Loading/loadingScreen.js +2 -2
  163. package/Loading/loadingScreen.js.map +1 -1
  164. package/Loading/sceneLoader.d.ts +3 -3
  165. package/Loading/sceneLoader.js +1 -1
  166. package/Loading/sceneLoader.js.map +1 -1
  167. package/Materials/GreasedLine/greasedLinePluginMaterial.js.map +1 -1
  168. package/Materials/Node/Blocks/Dual/clipPlanesBlock.d.ts +1 -1
  169. package/Materials/Node/Blocks/Dual/clipPlanesBlock.js +6 -6
  170. package/Materials/Node/Blocks/Dual/clipPlanesBlock.js.map +1 -1
  171. package/Materials/Node/Blocks/Dual/currentScreenBlock.d.ts +2 -3
  172. package/Materials/Node/Blocks/Dual/currentScreenBlock.js +5 -5
  173. package/Materials/Node/Blocks/Dual/currentScreenBlock.js.map +1 -1
  174. package/Materials/Node/Blocks/Dual/fogBlock.d.ts +1 -1
  175. package/Materials/Node/Blocks/Dual/fogBlock.js +4 -4
  176. package/Materials/Node/Blocks/Dual/fogBlock.js.map +1 -1
  177. package/Materials/Node/Blocks/Dual/lightBlock.js +4 -4
  178. package/Materials/Node/Blocks/Dual/lightBlock.js.map +1 -1
  179. package/Materials/Node/Blocks/Dual/reflectionTextureBaseBlock.d.ts +1 -1
  180. package/Materials/Node/Blocks/Dual/reflectionTextureBaseBlock.js +8 -7
  181. package/Materials/Node/Blocks/Dual/reflectionTextureBaseBlock.js.map +1 -1
  182. package/Materials/Node/Blocks/Dual/sceneDepthBlock.d.ts +1 -1
  183. package/Materials/Node/Blocks/Dual/sceneDepthBlock.js +9 -5
  184. package/Materials/Node/Blocks/Dual/sceneDepthBlock.js.map +1 -1
  185. package/Materials/Node/Blocks/Dual/textureBlock.d.ts +4 -2
  186. package/Materials/Node/Blocks/Dual/textureBlock.js +43 -21
  187. package/Materials/Node/Blocks/Dual/textureBlock.js.map +1 -1
  188. package/Materials/Node/Blocks/Fragment/TBNBlock.js +3 -3
  189. package/Materials/Node/Blocks/Fragment/TBNBlock.js.map +1 -1
  190. package/Materials/Node/Blocks/Fragment/derivativeBlock.js +9 -2
  191. package/Materials/Node/Blocks/Fragment/derivativeBlock.js.map +1 -1
  192. package/Materials/Node/Blocks/Fragment/fragCoordBlock.js +1 -1
  193. package/Materials/Node/Blocks/Fragment/fragCoordBlock.js.map +1 -1
  194. package/Materials/Node/Blocks/Fragment/fragmentOutputBlock.d.ts +1 -1
  195. package/Materials/Node/Blocks/Fragment/fragmentOutputBlock.js +16 -8
  196. package/Materials/Node/Blocks/Fragment/fragmentOutputBlock.js.map +1 -1
  197. package/Materials/Node/Blocks/Fragment/frontFacingBlock.js +1 -1
  198. package/Materials/Node/Blocks/Fragment/frontFacingBlock.js.map +1 -1
  199. package/Materials/Node/Blocks/Fragment/heightToNormalBlock.js +2 -2
  200. package/Materials/Node/Blocks/Fragment/heightToNormalBlock.js.map +1 -1
  201. package/Materials/Node/Blocks/Fragment/imageProcessingBlock.js +3 -3
  202. package/Materials/Node/Blocks/Fragment/imageProcessingBlock.js.map +1 -1
  203. package/Materials/Node/Blocks/Fragment/perturbNormalBlock.d.ts +1 -1
  204. package/Materials/Node/Blocks/Fragment/perturbNormalBlock.js +4 -4
  205. package/Materials/Node/Blocks/Fragment/perturbNormalBlock.js.map +1 -1
  206. package/Materials/Node/Blocks/Fragment/screenSizeBlock.d.ts +1 -1
  207. package/Materials/Node/Blocks/Fragment/screenSizeBlock.js +2 -2
  208. package/Materials/Node/Blocks/Fragment/screenSizeBlock.js.map +1 -1
  209. package/Materials/Node/Blocks/Fragment/screenSpaceBlock.js +3 -3
  210. package/Materials/Node/Blocks/Fragment/screenSpaceBlock.js.map +1 -1
  211. package/Materials/Node/Blocks/Fragment/shadowMapBlock.d.ts +1 -1
  212. package/Materials/Node/Blocks/Fragment/shadowMapBlock.js +4 -4
  213. package/Materials/Node/Blocks/Fragment/shadowMapBlock.js.map +1 -1
  214. package/Materials/Node/Blocks/Fragment/twirlBlock.js +9 -9
  215. package/Materials/Node/Blocks/Fragment/twirlBlock.js.map +1 -1
  216. package/Materials/Node/Blocks/Input/inputBlock.d.ts +6 -1
  217. package/Materials/Node/Blocks/Input/inputBlock.js +36 -12
  218. package/Materials/Node/Blocks/Input/inputBlock.js.map +1 -1
  219. package/Materials/Node/Blocks/PBR/anisotropyBlock.d.ts +1 -1
  220. package/Materials/Node/Blocks/PBR/anisotropyBlock.js +1 -1
  221. package/Materials/Node/Blocks/PBR/anisotropyBlock.js.map +1 -1
  222. package/Materials/Node/Blocks/PBR/clearCoatBlock.d.ts +1 -1
  223. package/Materials/Node/Blocks/PBR/clearCoatBlock.js +3 -3
  224. package/Materials/Node/Blocks/PBR/clearCoatBlock.js.map +1 -1
  225. package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.d.ts +1 -1
  226. package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.js +9 -9
  227. package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.js.map +1 -1
  228. package/Materials/Node/Blocks/PBR/reflectionBlock.d.ts +1 -1
  229. package/Materials/Node/Blocks/PBR/reflectionBlock.js +21 -21
  230. package/Materials/Node/Blocks/PBR/reflectionBlock.js.map +1 -1
  231. package/Materials/Node/Blocks/PBR/refractionBlock.d.ts +1 -1
  232. package/Materials/Node/Blocks/PBR/refractionBlock.js +6 -6
  233. package/Materials/Node/Blocks/PBR/refractionBlock.js.map +1 -1
  234. package/Materials/Node/Blocks/PBR/subSurfaceBlock.js +5 -0
  235. package/Materials/Node/Blocks/PBR/subSurfaceBlock.js.map +1 -1
  236. package/Materials/Node/Blocks/Particle/particleBlendMultiplyBlock.js +2 -2
  237. package/Materials/Node/Blocks/Particle/particleBlendMultiplyBlock.js.map +1 -1
  238. package/Materials/Node/Blocks/Particle/particleRampGradientBlock.js +3 -3
  239. package/Materials/Node/Blocks/Particle/particleRampGradientBlock.js.map +1 -1
  240. package/Materials/Node/Blocks/Particle/particleTextureBlock.js +1 -1
  241. package/Materials/Node/Blocks/Particle/particleTextureBlock.js.map +1 -1
  242. package/Materials/Node/Blocks/Teleport/teleportOutBlock.js +1 -1
  243. package/Materials/Node/Blocks/Teleport/teleportOutBlock.js.map +1 -1
  244. package/Materials/Node/Blocks/Vertex/bonesBlock.js +2 -2
  245. package/Materials/Node/Blocks/Vertex/bonesBlock.js.map +1 -1
  246. package/Materials/Node/Blocks/Vertex/instancesBlock.js +5 -5
  247. package/Materials/Node/Blocks/Vertex/instancesBlock.js.map +1 -1
  248. package/Materials/Node/Blocks/Vertex/lightInformationBlock.d.ts +1 -1
  249. package/Materials/Node/Blocks/Vertex/lightInformationBlock.js +12 -12
  250. package/Materials/Node/Blocks/Vertex/lightInformationBlock.js.map +1 -1
  251. package/Materials/Node/Blocks/Vertex/morphTargetsBlock.js +7 -7
  252. package/Materials/Node/Blocks/Vertex/morphTargetsBlock.js.map +1 -1
  253. package/Materials/Node/Blocks/Vertex/vertexOutputBlock.d.ts +1 -1
  254. package/Materials/Node/Blocks/Vertex/vertexOutputBlock.js +10 -3
  255. package/Materials/Node/Blocks/Vertex/vertexOutputBlock.js.map +1 -1
  256. package/Materials/Node/Blocks/addBlock.js +2 -1
  257. package/Materials/Node/Blocks/addBlock.js.map +1 -1
  258. package/Materials/Node/Blocks/arcTan2Block.js +3 -1
  259. package/Materials/Node/Blocks/arcTan2Block.js.map +1 -1
  260. package/Materials/Node/Blocks/clampBlock.js +1 -1
  261. package/Materials/Node/Blocks/clampBlock.js.map +1 -1
  262. package/Materials/Node/Blocks/cloudBlock.js +1 -1
  263. package/Materials/Node/Blocks/cloudBlock.js.map +1 -1
  264. package/Materials/Node/Blocks/colorMergerBlock.js +9 -7
  265. package/Materials/Node/Blocks/colorMergerBlock.js.map +1 -1
  266. package/Materials/Node/Blocks/colorSplitterBlock.js +5 -5
  267. package/Materials/Node/Blocks/colorSplitterBlock.js.map +1 -1
  268. package/Materials/Node/Blocks/conditionalBlock.js +18 -12
  269. package/Materials/Node/Blocks/conditionalBlock.js.map +1 -1
  270. package/Materials/Node/Blocks/crossBlock.js +1 -1
  271. package/Materials/Node/Blocks/crossBlock.js.map +1 -1
  272. package/Materials/Node/Blocks/curveBlock.js +48 -53
  273. package/Materials/Node/Blocks/curveBlock.js.map +1 -1
  274. package/Materials/Node/Blocks/customBlock.js +1 -1
  275. package/Materials/Node/Blocks/customBlock.js.map +1 -1
  276. package/Materials/Node/Blocks/desaturateBlock.js +5 -4
  277. package/Materials/Node/Blocks/desaturateBlock.js.map +1 -1
  278. package/Materials/Node/Blocks/distanceBlock.js +1 -1
  279. package/Materials/Node/Blocks/distanceBlock.js.map +1 -1
  280. package/Materials/Node/Blocks/divideBlock.js +2 -1
  281. package/Materials/Node/Blocks/divideBlock.js.map +1 -1
  282. package/Materials/Node/Blocks/dotBlock.js +1 -1
  283. package/Materials/Node/Blocks/dotBlock.js.map +1 -1
  284. package/Materials/Node/Blocks/elbowBlock.js +1 -1
  285. package/Materials/Node/Blocks/elbowBlock.js.map +1 -1
  286. package/Materials/Node/Blocks/fresnelBlock.js +1 -1
  287. package/Materials/Node/Blocks/fresnelBlock.js.map +1 -1
  288. package/Materials/Node/Blocks/gradientBlock.js +8 -7
  289. package/Materials/Node/Blocks/gradientBlock.js.map +1 -1
  290. package/Materials/Node/Blocks/lengthBlock.js +1 -1
  291. package/Materials/Node/Blocks/lengthBlock.js.map +1 -1
  292. package/Materials/Node/Blocks/lerpBlock.js +1 -1
  293. package/Materials/Node/Blocks/lerpBlock.js.map +1 -1
  294. package/Materials/Node/Blocks/matrixBuilderBlock.js +1 -1
  295. package/Materials/Node/Blocks/matrixBuilderBlock.js.map +1 -1
  296. package/Materials/Node/Blocks/matrixDeterminantBlock.js +1 -1
  297. package/Materials/Node/Blocks/matrixDeterminantBlock.js.map +1 -1
  298. package/Materials/Node/Blocks/matrixTransposeBlock.js +1 -1
  299. package/Materials/Node/Blocks/matrixTransposeBlock.js.map +1 -1
  300. package/Materials/Node/Blocks/maxBlock.js +1 -1
  301. package/Materials/Node/Blocks/maxBlock.js.map +1 -1
  302. package/Materials/Node/Blocks/meshAttributeExistsBlock.js +1 -1
  303. package/Materials/Node/Blocks/meshAttributeExistsBlock.js.map +1 -1
  304. package/Materials/Node/Blocks/minBlock.js +1 -1
  305. package/Materials/Node/Blocks/minBlock.js.map +1 -1
  306. package/Materials/Node/Blocks/modBlock.js +1 -1
  307. package/Materials/Node/Blocks/modBlock.js.map +1 -1
  308. package/Materials/Node/Blocks/multiplyBlock.js +2 -1
  309. package/Materials/Node/Blocks/multiplyBlock.js.map +1 -1
  310. package/Materials/Node/Blocks/nLerpBlock.js +1 -1
  311. package/Materials/Node/Blocks/nLerpBlock.js.map +1 -1
  312. package/Materials/Node/Blocks/negateBlock.js +1 -1
  313. package/Materials/Node/Blocks/negateBlock.js.map +1 -1
  314. package/Materials/Node/Blocks/normalBlendBlock.js +1 -1
  315. package/Materials/Node/Blocks/normalBlendBlock.js.map +1 -1
  316. package/Materials/Node/Blocks/normalizeBlock.js +1 -1
  317. package/Materials/Node/Blocks/normalizeBlock.js.map +1 -1
  318. package/Materials/Node/Blocks/oneMinusBlock.js +1 -1
  319. package/Materials/Node/Blocks/oneMinusBlock.js.map +1 -1
  320. package/Materials/Node/Blocks/posterizeBlock.js +1 -1
  321. package/Materials/Node/Blocks/posterizeBlock.js.map +1 -1
  322. package/Materials/Node/Blocks/powBlock.js +1 -1
  323. package/Materials/Node/Blocks/powBlock.js.map +1 -1
  324. package/Materials/Node/Blocks/randomNumberBlock.js +1 -1
  325. package/Materials/Node/Blocks/randomNumberBlock.js.map +1 -1
  326. package/Materials/Node/Blocks/reciprocalBlock.js +2 -2
  327. package/Materials/Node/Blocks/reciprocalBlock.js.map +1 -1
  328. package/Materials/Node/Blocks/reflectBlock.js +1 -1
  329. package/Materials/Node/Blocks/reflectBlock.js.map +1 -1
  330. package/Materials/Node/Blocks/refractBlock.js +1 -1
  331. package/Materials/Node/Blocks/refractBlock.js.map +1 -1
  332. package/Materials/Node/Blocks/remapBlock.js +1 -1
  333. package/Materials/Node/Blocks/remapBlock.js.map +1 -1
  334. package/Materials/Node/Blocks/replaceColorBlock.js +1 -1
  335. package/Materials/Node/Blocks/replaceColorBlock.js.map +1 -1
  336. package/Materials/Node/Blocks/rotate2dBlock.js +1 -1
  337. package/Materials/Node/Blocks/rotate2dBlock.js.map +1 -1
  338. package/Materials/Node/Blocks/scaleBlock.js +1 -1
  339. package/Materials/Node/Blocks/scaleBlock.js.map +1 -1
  340. package/Materials/Node/Blocks/simplexPerlin3DBlock.js +1 -1
  341. package/Materials/Node/Blocks/simplexPerlin3DBlock.js.map +1 -1
  342. package/Materials/Node/Blocks/smoothStepBlock.js +3 -2
  343. package/Materials/Node/Blocks/smoothStepBlock.js.map +1 -1
  344. package/Materials/Node/Blocks/stepBlock.js +1 -1
  345. package/Materials/Node/Blocks/stepBlock.js.map +1 -1
  346. package/Materials/Node/Blocks/subtractBlock.js +2 -1
  347. package/Materials/Node/Blocks/subtractBlock.js.map +1 -1
  348. package/Materials/Node/Blocks/transformBlock.js +18 -10
  349. package/Materials/Node/Blocks/transformBlock.js.map +1 -1
  350. package/Materials/Node/Blocks/triPlanarBlock.d.ts +1 -1
  351. package/Materials/Node/Blocks/triPlanarBlock.js +2 -2
  352. package/Materials/Node/Blocks/triPlanarBlock.js.map +1 -1
  353. package/Materials/Node/Blocks/trigonometryBlock.js +1 -1
  354. package/Materials/Node/Blocks/trigonometryBlock.js.map +1 -1
  355. package/Materials/Node/Blocks/vectorMergerBlock.js +30 -27
  356. package/Materials/Node/Blocks/vectorMergerBlock.js.map +1 -1
  357. package/Materials/Node/Blocks/vectorSplitterBlock.js +9 -8
  358. package/Materials/Node/Blocks/vectorSplitterBlock.js.map +1 -1
  359. package/Materials/Node/Blocks/viewDirectionBlock.js +1 -1
  360. package/Materials/Node/Blocks/viewDirectionBlock.js.map +1 -1
  361. package/Materials/Node/Blocks/voronoiNoiseBlock.js +19 -8
  362. package/Materials/Node/Blocks/voronoiNoiseBlock.js.map +1 -1
  363. package/Materials/Node/Blocks/waveBlock.js +3 -3
  364. package/Materials/Node/Blocks/waveBlock.js.map +1 -1
  365. package/Materials/Node/Blocks/worleyNoise3DBlock.js +3 -3
  366. package/Materials/Node/Blocks/worleyNoise3DBlock.js.map +1 -1
  367. package/Materials/Node/nodeMaterial.d.ts +9 -3
  368. package/Materials/Node/nodeMaterial.js +29 -4
  369. package/Materials/Node/nodeMaterial.js.map +1 -1
  370. package/Materials/Node/nodeMaterialBlock.d.ts +0 -1
  371. package/Materials/Node/nodeMaterialBlock.js +6 -6
  372. package/Materials/Node/nodeMaterialBlock.js.map +1 -1
  373. package/Materials/Node/nodeMaterialBlockConnectionPoint.d.ts +4 -0
  374. package/Materials/Node/nodeMaterialBlockConnectionPoint.js +12 -0
  375. package/Materials/Node/nodeMaterialBlockConnectionPoint.js.map +1 -1
  376. package/Materials/Node/nodeMaterialBuildState.d.ts +35 -3
  377. package/Materials/Node/nodeMaterialBuildState.js +169 -16
  378. package/Materials/Node/nodeMaterialBuildState.js.map +1 -1
  379. package/Materials/PBR/pbrSubSurfaceConfiguration.d.ts +18 -4
  380. package/Materials/PBR/pbrSubSurfaceConfiguration.js +60 -9
  381. package/Materials/PBR/pbrSubSurfaceConfiguration.js.map +1 -1
  382. package/Materials/Textures/Filtering/hdrFiltering.d.ts +2 -2
  383. package/Materials/Textures/Filtering/hdrFiltering.js.map +1 -1
  384. package/Materials/Textures/Loaders/basisTextureLoader.js +2 -2
  385. package/Materials/Textures/Loaders/basisTextureLoader.js.map +1 -1
  386. package/Materials/Textures/MultiviewRenderTarget.d.ts +1 -0
  387. package/Materials/Textures/MultiviewRenderTarget.js +1 -0
  388. package/Materials/Textures/MultiviewRenderTarget.js.map +1 -1
  389. package/Materials/Textures/Procedurals/proceduralTexture.js +1 -1
  390. package/Materials/Textures/Procedurals/proceduralTexture.js.map +1 -1
  391. package/Materials/Textures/baseTexture.d.ts +3 -3
  392. package/Materials/Textures/baseTexture.js.map +1 -1
  393. package/Materials/Textures/colorGradingTexture.d.ts +2 -2
  394. package/Materials/Textures/colorGradingTexture.js.map +1 -1
  395. package/Materials/Textures/cubeTexture.d.ts +3 -2
  396. package/Materials/Textures/cubeTexture.js +1 -0
  397. package/Materials/Textures/cubeTexture.js.map +1 -1
  398. package/Materials/Textures/hdrCubeTexture.d.ts +2 -2
  399. package/Materials/Textures/hdrCubeTexture.js.map +1 -1
  400. package/Materials/Textures/htmlElementTexture.d.ts +2 -2
  401. package/Materials/Textures/htmlElementTexture.js.map +1 -1
  402. package/Materials/Textures/internalTexture.d.ts +3 -3
  403. package/Materials/Textures/internalTexture.js.map +1 -1
  404. package/Materials/Textures/rawTexture.d.ts +10 -10
  405. package/Materials/Textures/rawTexture.js.map +1 -1
  406. package/Materials/Textures/renderTargetTexture.d.ts +4 -4
  407. package/Materials/Textures/renderTargetTexture.js +4 -4
  408. package/Materials/Textures/renderTargetTexture.js.map +1 -1
  409. package/Materials/Textures/texture.d.ts +2 -2
  410. package/Materials/Textures/texture.js.map +1 -1
  411. package/Materials/Textures/thinTexture.d.ts +3 -3
  412. package/Materials/Textures/thinTexture.js +1 -1
  413. package/Materials/Textures/thinTexture.js.map +1 -1
  414. package/Materials/drawWrapper.d.ts +2 -3
  415. package/Materials/drawWrapper.functions.d.ts +8 -0
  416. package/Materials/drawWrapper.functions.js +9 -0
  417. package/Materials/drawWrapper.functions.js.map +1 -0
  418. package/Materials/drawWrapper.js +0 -3
  419. package/Materials/drawWrapper.js.map +1 -1
  420. package/Materials/effect.d.ts +4 -5
  421. package/Materials/effect.js.map +1 -1
  422. package/Materials/effectRenderer.d.ts +4 -4
  423. package/Materials/effectRenderer.js.map +1 -1
  424. package/Materials/index.d.ts +1 -0
  425. package/Materials/index.js +1 -0
  426. package/Materials/index.js.map +1 -1
  427. package/Materials/materialFlags.d.ts +6 -0
  428. package/Materials/materialFlags.js +15 -1
  429. package/Materials/materialFlags.js.map +1 -1
  430. package/Materials/materialHelper.functions.d.ts +2 -2
  431. package/Materials/materialHelper.functions.js.map +1 -1
  432. package/Materials/materialPluginBase.d.ts +4 -4
  433. package/Materials/materialPluginBase.js.map +1 -1
  434. package/Materials/materialPluginManager.d.ts +2 -2
  435. package/Materials/materialPluginManager.js.map +1 -1
  436. package/Materials/meshDebugPluginMaterial.js +1 -1
  437. package/Materials/meshDebugPluginMaterial.js.map +1 -1
  438. package/Materials/uniformBuffer.d.ts +2 -2
  439. package/Materials/uniformBuffer.js.map +1 -1
  440. package/Meshes/Builders/greasedLineBuilder.d.ts +6 -0
  441. package/Meshes/Builders/greasedLineBuilder.js +15 -8
  442. package/Meshes/Builders/greasedLineBuilder.js.map +1 -1
  443. package/Meshes/Compression/meshoptCompression.js +4 -3
  444. package/Meshes/Compression/meshoptCompression.js.map +1 -1
  445. package/Meshes/GaussianSplatting/gaussianSplattingMesh.js +1 -1
  446. package/Meshes/GaussianSplatting/gaussianSplattingMesh.js.map +1 -1
  447. package/Meshes/GreasedLine/greasedLineBaseMesh.d.ts +2 -2
  448. package/Meshes/GreasedLine/greasedLineBaseMesh.js.map +1 -1
  449. package/Meshes/GreasedLine/greasedLineMesh.js +1 -1
  450. package/Meshes/GreasedLine/greasedLineMesh.js.map +1 -1
  451. package/Meshes/geometry.d.ts +2 -2
  452. package/Meshes/geometry.js +3 -2
  453. package/Meshes/geometry.js.map +1 -1
  454. package/Meshes/instancedMesh.js.map +1 -1
  455. package/Meshes/mesh.d.ts +3 -3
  456. package/Meshes/mesh.js.map +1 -1
  457. package/Meshes/subMesh.d.ts +2 -2
  458. package/Meshes/subMesh.js.map +1 -1
  459. package/Misc/PerformanceViewer/performanceViewerCollectionStrategies.js.map +1 -1
  460. package/Misc/copyTextureToTexture.d.ts +2 -2
  461. package/Misc/copyTextureToTexture.js.map +1 -1
  462. package/Misc/dds.d.ts +3 -2
  463. package/Misc/dds.js +2 -1
  464. package/Misc/dds.js.map +1 -1
  465. package/Misc/dumpTools.d.ts +2 -2
  466. package/Misc/dumpTools.js.map +1 -1
  467. package/Misc/fileTools.js +3 -3
  468. package/Misc/fileTools.js.map +1 -1
  469. package/Misc/filesInput.d.ts +2 -2
  470. package/Misc/filesInput.js.map +1 -1
  471. package/Misc/khronosTextureContainer2.d.ts +8 -2
  472. package/Misc/khronosTextureContainer2.js +3 -2
  473. package/Misc/khronosTextureContainer2.js.map +1 -1
  474. package/Misc/minMaxReducer.d.ts +2 -2
  475. package/Misc/minMaxReducer.js.map +1 -1
  476. package/Misc/screenshotTools.d.ts +6 -6
  477. package/Misc/screenshotTools.js.map +1 -1
  478. package/Misc/textureTools.js.map +1 -1
  479. package/Misc/tools.d.ts +7 -7
  480. package/Misc/tools.functions.d.ts +26 -0
  481. package/Misc/tools.functions.js +62 -0
  482. package/Misc/tools.functions.js.map +1 -1
  483. package/Misc/tools.js.map +1 -1
  484. package/Misc/videoRecorder.d.ts +3 -3
  485. package/Misc/videoRecorder.js.map +1 -1
  486. package/Particles/baseParticleSystem.d.ts +2 -2
  487. package/Particles/baseParticleSystem.js.map +1 -1
  488. package/Particles/computeShaderParticleSystem.d.ts +2 -2
  489. package/Particles/computeShaderParticleSystem.js.map +1 -1
  490. package/Particles/gpuParticleSystem.d.ts +3 -3
  491. package/Particles/gpuParticleSystem.js +2 -2
  492. package/Particles/gpuParticleSystem.js.map +1 -1
  493. package/Particles/particle.js +1 -1
  494. package/Particles/particle.js.map +1 -1
  495. package/Particles/particleSystem.d.ts +3 -3
  496. package/Particles/particleSystem.js +3 -3
  497. package/Particles/particleSystem.js.map +1 -1
  498. package/Particles/particleSystemComponent.d.ts +2 -2
  499. package/Particles/particleSystemComponent.js +2 -2
  500. package/Particles/particleSystemComponent.js.map +1 -1
  501. package/Particles/subEmitter.d.ts +3 -3
  502. package/Particles/subEmitter.js.map +1 -1
  503. package/Particles/thinParticleSystem.d.ts +2 -2
  504. package/Particles/thinParticleSystem.js.map +1 -1
  505. package/Physics/v2/physicsBody.js +3 -3
  506. package/Physics/v2/physicsBody.js.map +1 -1
  507. package/PostProcesses/RenderPipeline/Pipelines/defaultRenderingPipeline.js.map +1 -1
  508. package/PostProcesses/RenderPipeline/postProcessRenderEffect.d.ts +2 -2
  509. package/PostProcesses/RenderPipeline/postProcessRenderEffect.js.map +1 -1
  510. package/PostProcesses/RenderPipeline/postProcessRenderPipeline.d.ts +2 -2
  511. package/PostProcesses/RenderPipeline/postProcessRenderPipeline.js.map +1 -1
  512. package/PostProcesses/blackAndWhitePostProcess.d.ts +2 -2
  513. package/PostProcesses/blackAndWhitePostProcess.js.map +1 -1
  514. package/PostProcesses/bloomMergePostProcess.d.ts +2 -2
  515. package/PostProcesses/bloomMergePostProcess.js.map +1 -1
  516. package/PostProcesses/blurPostProcess.d.ts +2 -2
  517. package/PostProcesses/blurPostProcess.js.map +1 -1
  518. package/PostProcesses/chromaticAberrationPostProcess.d.ts +2 -2
  519. package/PostProcesses/chromaticAberrationPostProcess.js.map +1 -1
  520. package/PostProcesses/circleOfConfusionPostProcess.d.ts +2 -2
  521. package/PostProcesses/circleOfConfusionPostProcess.js.map +1 -1
  522. package/PostProcesses/colorCorrectionPostProcess.d.ts +2 -2
  523. package/PostProcesses/colorCorrectionPostProcess.js.map +1 -1
  524. package/PostProcesses/convolutionPostProcess.d.ts +2 -2
  525. package/PostProcesses/convolutionPostProcess.js.map +1 -1
  526. package/PostProcesses/depthOfFieldBlurPostProcess.d.ts +2 -2
  527. package/PostProcesses/depthOfFieldBlurPostProcess.js.map +1 -1
  528. package/PostProcesses/depthOfFieldEffect.js +1 -1
  529. package/PostProcesses/depthOfFieldEffect.js.map +1 -1
  530. package/PostProcesses/depthOfFieldMergePostProcess.d.ts +2 -2
  531. package/PostProcesses/depthOfFieldMergePostProcess.js.map +1 -1
  532. package/PostProcesses/displayPassPostProcess.d.ts +2 -2
  533. package/PostProcesses/displayPassPostProcess.js.map +1 -1
  534. package/PostProcesses/extractHighlightsPostProcess.d.ts +2 -2
  535. package/PostProcesses/extractHighlightsPostProcess.js.map +1 -1
  536. package/PostProcesses/filterPostProcess.d.ts +2 -2
  537. package/PostProcesses/filterPostProcess.js.map +1 -1
  538. package/PostProcesses/fxaaPostProcess.d.ts +2 -2
  539. package/PostProcesses/fxaaPostProcess.js +2 -2
  540. package/PostProcesses/fxaaPostProcess.js.map +1 -1
  541. package/PostProcesses/grainPostProcess.d.ts +2 -2
  542. package/PostProcesses/grainPostProcess.js.map +1 -1
  543. package/PostProcesses/imageProcessingPostProcess.d.ts +2 -2
  544. package/PostProcesses/imageProcessingPostProcess.js.map +1 -1
  545. package/PostProcesses/motionBlurPostProcess.d.ts +2 -2
  546. package/PostProcesses/motionBlurPostProcess.js.map +1 -1
  547. package/PostProcesses/passPostProcess.d.ts +3 -3
  548. package/PostProcesses/passPostProcess.js +2 -2
  549. package/PostProcesses/passPostProcess.js.map +1 -1
  550. package/PostProcesses/postProcess.d.ts +4 -5
  551. package/PostProcesses/postProcess.js +3 -3
  552. package/PostProcesses/postProcess.js.map +1 -1
  553. package/PostProcesses/refractionPostProcess.d.ts +2 -2
  554. package/PostProcesses/refractionPostProcess.js.map +1 -1
  555. package/PostProcesses/screenSpaceCurvaturePostProcess.d.ts +2 -2
  556. package/PostProcesses/screenSpaceCurvaturePostProcess.js.map +1 -1
  557. package/PostProcesses/screenSpaceReflectionPostProcess.d.ts +2 -2
  558. package/PostProcesses/screenSpaceReflectionPostProcess.js.map +1 -1
  559. package/PostProcesses/sharpenPostProcess.d.ts +2 -2
  560. package/PostProcesses/sharpenPostProcess.js.map +1 -1
  561. package/PostProcesses/subSurfaceScatteringPostProcess.d.ts +2 -2
  562. package/PostProcesses/subSurfaceScatteringPostProcess.js.map +1 -1
  563. package/PostProcesses/volumetricLightScatteringPostProcess.d.ts +2 -2
  564. package/PostProcesses/volumetricLightScatteringPostProcess.js.map +1 -1
  565. package/Rendering/GlobalIllumination/giRSMManager.js.map +1 -1
  566. package/Rendering/depthPeelingRenderer.js.map +1 -1
  567. package/Rendering/fluidRenderer/fluidRenderer.js.map +1 -1
  568. package/Rendering/fluidRenderer/fluidRenderingDepthTextureCopy.d.ts +2 -2
  569. package/Rendering/fluidRenderer/fluidRenderingDepthTextureCopy.js.map +1 -1
  570. package/Rendering/fluidRenderer/fluidRenderingObject.d.ts +2 -2
  571. package/Rendering/fluidRenderer/fluidRenderingObject.js.map +1 -1
  572. package/Rendering/fluidRenderer/fluidRenderingTargetRenderer.d.ts +2 -2
  573. package/Rendering/fluidRenderer/fluidRenderingTargetRenderer.js.map +1 -1
  574. package/Rendering/fluidRenderer/fluidRenderingTextures.d.ts +2 -2
  575. package/Rendering/fluidRenderer/fluidRenderingTextures.js.map +1 -1
  576. package/Rendering/geometryBufferRenderer.js +24 -18
  577. package/Rendering/geometryBufferRenderer.js.map +1 -1
  578. package/Rendering/outlineRenderer.js.map +1 -1
  579. package/Rendering/prePassRenderer.js.map +1 -1
  580. package/Shaders/ShadersInclude/pbrBlockSubSurface.js +19 -3
  581. package/Shaders/ShadersInclude/pbrBlockSubSurface.js.map +1 -1
  582. package/Shaders/ShadersInclude/pbrFragmentDeclaration.js +4 -1
  583. package/Shaders/ShadersInclude/pbrFragmentDeclaration.js.map +1 -1
  584. package/Shaders/ShadersInclude/pbrFragmentSamplersDeclaration.js +1 -0
  585. package/Shaders/ShadersInclude/pbrFragmentSamplersDeclaration.js.map +1 -1
  586. package/Shaders/ShadersInclude/pbrVertexDeclaration.js +3 -0
  587. package/Shaders/ShadersInclude/pbrVertexDeclaration.js.map +1 -1
  588. package/Shaders/pbr.fragment.js +7 -0
  589. package/Shaders/pbr.fragment.js.map +1 -1
  590. package/Shaders/pbr.vertex.js +2 -0
  591. package/Shaders/pbr.vertex.js.map +1 -1
  592. package/ShadersWGSL/ShadersInclude/fresnelFunction.d.ts +5 -0
  593. package/ShadersWGSL/ShadersInclude/fresnelFunction.js +13 -0
  594. package/ShadersWGSL/ShadersInclude/fresnelFunction.js.map +1 -0
  595. package/ShadersWGSL/ShadersInclude/helperFunctions.d.ts +5 -0
  596. package/ShadersWGSL/ShadersInclude/helperFunctions.js +68 -0
  597. package/ShadersWGSL/ShadersInclude/helperFunctions.js.map +1 -0
  598. package/Sprites/spriteRenderer.d.ts +2 -2
  599. package/Sprites/spriteRenderer.js.map +1 -1
  600. package/XR/features/WebXRDepthSensing.js.map +1 -1
  601. package/XR/features/WebXRImageTracking.js.map +1 -1
  602. package/XR/features/WebXRLayers.d.ts +2 -2
  603. package/XR/features/WebXRLayers.js.map +1 -1
  604. package/XR/features/WebXRLightEstimation.js.map +1 -1
  605. package/XR/features/WebXRRawCameraAccess.d.ts +1 -1
  606. package/XR/features/WebXRRawCameraAccess.js.map +1 -1
  607. package/XR/features/WebXRSpaceWarp.js +1 -3
  608. package/XR/features/WebXRSpaceWarp.js.map +1 -1
  609. package/XR/features/WebXRWalkingLocomotion.js.map +1 -1
  610. package/XR/webXRExperienceHelper.js.map +1 -1
  611. package/XR/webXRManagedOutputCanvas.d.ts +2 -2
  612. package/XR/webXRManagedOutputCanvas.js.map +1 -1
  613. package/XR/webXRRenderTargetTextureProvider.js.map +1 -1
  614. package/XR/webXRSessionManager.js.map +1 -1
  615. package/assetContainer.js.map +1 -1
  616. package/node.d.ts +2 -2
  617. package/node.js.map +1 -1
  618. package/package.json +1 -1
  619. package/scene.d.ts +3 -3
  620. package/scene.js.map +1 -1
@@ -15,6 +15,7 @@ import { WebGPUShaderProcessingContext } from "./WebGPU/webgpuShaderProcessingCo
15
15
  import { Tools } from "../Misc/tools.js";
16
16
  import { WebGPUTextureHelper } from "./WebGPU/webgpuTextureHelper.js";
17
17
  import { WebGPUTextureManager } from "./WebGPU/webgpuTextureManager.js";
18
+ import { AbstractEngine } from "./abstractEngine.js";
18
19
  import { WebGPUBufferManager } from "./WebGPU/webgpuBufferManager.js";
19
20
  import { WebGPUHardwareTexture } from "./WebGPU/webgpuHardwareTexture.js";
20
21
  import { UniformBuffer } from "../Materials/uniformBuffer.js";
@@ -22,7 +23,6 @@ import { WebGPUCacheSampler } from "./WebGPU/webgpuCacheSampler.js";
22
23
  import { WebGPUCacheRenderPipelineTree } from "./WebGPU/webgpuCacheRenderPipelineTree.js";
23
24
  import { WebGPUStencilStateComposer } from "./WebGPU/webgpuStencilStateComposer.js";
24
25
  import { WebGPUDepthCullingState } from "./WebGPU/webgpuDepthCullingState.js";
25
- import { DrawWrapper } from "../Materials/drawWrapper.js";
26
26
  import { WebGPUMaterialContext } from "./WebGPU/webgpuMaterialContext.js";
27
27
  import { WebGPUDrawContext } from "./WebGPU/webgpuDrawContext.js";
28
28
  import { WebGPUCacheBindGroups } from "./WebGPU/webgpuCacheBindGroups.js";
@@ -38,6 +38,16 @@ import { WebGPUSnapshotRendering } from "./WebGPU/webgpuSnapshotRendering.js";
38
38
  import "../Buffers/buffer.align.js";
39
39
  import "../ShadersWGSL/postprocess.vertex.js";
40
40
  import { WebGPUPerfCounter } from "./WebGPU/webgpuPerfCounter.js";
41
+ import { SphericalPolynomial } from "../Maths/sphericalPolynomial.js";
42
+ import { PerformanceMonitor } from "../Misc/performanceMonitor.js";
43
+ import { CreateImageBitmapFromSource, ExitFullscreen, ExitPointerlock, GetFontOffset, RequestFullscreen, RequestPointerlock, ResizeImageBitmap, _CommonDispose, _CommonInit, } from "./engine.common.js";
44
+ import { IsWrapper } from "../Materials/drawWrapper.functions.js";
45
+ import { PerfCounter } from "../Misc/perfCounter.js";
46
+ import "./AbstractEngine/abstractEngine.loadingScreen.js";
47
+ import "./AbstractEngine/abstractEngine.dom.js";
48
+ import "./AbstractEngine/abstractEngine.states.js";
49
+ import "./AbstractEngine/abstractEngine.renderPass.js";
50
+ import "../Audio/audioEngine.js";
41
51
  const viewDescriptorSwapChainAntialiasing = {
42
52
  label: `TextureView_SwapChain_ResolveTarget`,
43
53
  dimension: WebGPUConstants.TextureDimension.E2d,
@@ -58,7 +68,7 @@ const tempColor4 = new Color4();
58
68
  * The web GPU engine class provides support for WebGPU version of babylon.js.
59
69
  * @since 5.0.0
60
70
  */
61
- export class WebGPUEngine extends Engine {
71
+ export class WebGPUEngine extends AbstractEngine {
62
72
  /**
63
73
  * Gets or sets the snapshot rendering mode
64
74
  */
@@ -117,6 +127,21 @@ export class WebGPUEngine extends Engine {
117
127
  this._cacheBindGroups.disabled = disable;
118
128
  }
119
129
  }
130
+ /**
131
+ * Gets a boolean indicating if all created effects are ready
132
+ * @returns true if all effects are ready
133
+ */
134
+ areAllEffectsReady() {
135
+ return true;
136
+ }
137
+ /**
138
+ * Get Font size information
139
+ * @param font font name
140
+ * @returns an object containing ascent, height and descent
141
+ */
142
+ getFontOffset(font) {
143
+ return GetFontOffset(font);
144
+ }
120
145
  /**
121
146
  * Gets a Promise<boolean> indicating if the engine can be instantiated (ie. if a WebGPU context can be found)
122
147
  */
@@ -228,7 +253,7 @@ export class WebGPUEngine extends Engine {
228
253
  * @param options Defines the options passed to the engine to create the GPU context dependencies
229
254
  */
230
255
  constructor(canvas, options = {}) {
231
- super(null, options.antialias ?? true, options);
256
+ super(options.antialias ?? true, options);
232
257
  /** A unique id to identify this instance */
233
258
  this.uniqueId = -1;
234
259
  // Page Life cycle and constants
@@ -273,6 +298,12 @@ export class WebGPUEngine extends Engine {
273
298
  * Max number of uncaptured error messages to log
274
299
  */
275
300
  this.numMaxUncapturedErrors = 20;
301
+ /**
302
+ * Gets the list of created scenes
303
+ */
304
+ this.scenes = [];
305
+ /** @internal */
306
+ this._virtualScenes = new Array();
276
307
  this._commandBuffers = [null, null];
277
308
  // Frame Buffer Life Cycle (recreated for each render target pass)
278
309
  /** @internal */
@@ -310,6 +341,7 @@ export class WebGPUEngine extends Engine {
310
341
  this.dbgLogIfNotDrawWrapper = true;
311
342
  /** @internal */
312
343
  this.dbgShowEmptyEnableEffectCalls = true;
344
+ this._snapshotRenderingMode = 0;
313
345
  /**
314
346
  * Indicates if the z range in NDC space is 0..1 (value: true) or -1..1 (value: false)
315
347
  */
@@ -327,7 +359,9 @@ export class WebGPUEngine extends Engine {
327
359
  this._scissorCached = { x: 0, y: 0, z: 0, w: 0 };
328
360
  this._stencilRefsCurrent = -1;
329
361
  this._blendColorsCurrent = [null, null, null, null];
362
+ this._performanceMonitor = new PerformanceMonitor();
330
363
  this._name = "WebGPU";
364
+ this._drawCalls = new PerfCounter();
331
365
  options.deviceDescriptor = options.deviceDescriptor || {};
332
366
  options.enableGPUDebugMarkers = options.enableGPUDebugMarkers ?? false;
333
367
  Logger.Log(`Babylon.js v${Engine.Version} - ${this.description} engine`);
@@ -341,7 +375,9 @@ export class WebGPUEngine extends Engine {
341
375
  this._renderingCanvas = canvas;
342
376
  this._options = options;
343
377
  this._mainPassSampleCount = options.antialias ? this._defaultSampleCount : 1;
344
- this._setupMobileChecks();
378
+ if (navigator && navigator.userAgent) {
379
+ this._setupMobileChecks();
380
+ }
345
381
  this._sharedInit(this._renderingCanvas);
346
382
  this._shaderProcessor = new WebGPUShaderProcessorGLSL();
347
383
  this._shaderProcessorWGSL = new WebGPUShaderProcessorWGSL();
@@ -704,6 +740,14 @@ export class WebGPUEngine extends Engine {
704
740
  depthStencilAttachment: mainDepthAttachment,
705
741
  };
706
742
  }
743
+ /**
744
+ * Shared initialization across engines types.
745
+ * @param canvas The canvas associated with this instance of the engine.
746
+ */
747
+ _sharedInit(canvas) {
748
+ super._sharedInit(canvas);
749
+ _CommonInit(this, canvas, this._creationOptions);
750
+ }
707
751
  _configureContext() {
708
752
  this._context.configure({
709
753
  device: this._device,
@@ -712,6 +756,71 @@ export class WebGPUEngine extends Engine {
712
756
  alphaMode: this.premultipliedAlpha ? WebGPUConstants.CanvasAlphaMode.Premultiplied : WebGPUConstants.CanvasAlphaMode.Opaque,
713
757
  });
714
758
  }
759
+ /**
760
+ * Resize an image and returns the image data as an uint8array
761
+ * @param image image to resize
762
+ * @param bufferWidth destination buffer width
763
+ * @param bufferHeight destination buffer height
764
+ * @returns an uint8array containing RGBA values of bufferWidth * bufferHeight size
765
+ */
766
+ resizeImageBitmap(image, bufferWidth, bufferHeight) {
767
+ return ResizeImageBitmap(this, image, bufferWidth, bufferHeight);
768
+ }
769
+ /**
770
+ * Engine abstraction for loading and creating an image bitmap from a given source string.
771
+ * @param imageSource source to load the image from.
772
+ * @param options An object that sets options for the image's extraction.
773
+ * @returns ImageBitmap
774
+ */
775
+ _createImageBitmapFromSource(imageSource, options) {
776
+ return CreateImageBitmapFromSource(this, imageSource, options);
777
+ }
778
+ /**
779
+ * Toggle full screen mode
780
+ * @param requestPointerLock defines if a pointer lock should be requested from the user
781
+ */
782
+ switchFullscreen(requestPointerLock) {
783
+ if (this.isFullscreen) {
784
+ this.exitFullscreen();
785
+ }
786
+ else {
787
+ this.enterFullscreen(requestPointerLock);
788
+ }
789
+ }
790
+ /**
791
+ * Enters full screen mode
792
+ * @param requestPointerLock defines if a pointer lock should be requested from the user
793
+ */
794
+ enterFullscreen(requestPointerLock) {
795
+ if (!this.isFullscreen) {
796
+ this._pointerLockRequested = requestPointerLock;
797
+ if (this._renderingCanvas) {
798
+ RequestFullscreen(this._renderingCanvas);
799
+ }
800
+ }
801
+ }
802
+ /**
803
+ * Exits full screen mode
804
+ */
805
+ exitFullscreen() {
806
+ if (this.isFullscreen) {
807
+ ExitFullscreen();
808
+ }
809
+ }
810
+ /**
811
+ * Enters Pointerlock mode
812
+ */
813
+ enterPointerlock() {
814
+ if (this._renderingCanvas) {
815
+ RequestPointerlock(this._renderingCanvas);
816
+ }
817
+ }
818
+ /**
819
+ * Exits Pointerlock mode
820
+ */
821
+ exitPointerlock() {
822
+ ExitPointerlock();
823
+ }
715
824
  _rebuildBuffers() {
716
825
  super._rebuildBuffers();
717
826
  for (const storageBuffer of this._storageBuffers) {
@@ -753,6 +862,51 @@ export class WebGPUEngine extends Engine {
753
862
  this._uniformBuffers = uboList;
754
863
  super._restoreEngineAfterContextLost(initEngine);
755
864
  }
865
+ /**
866
+ * Sets a depth stencil texture from a render target to the according uniform.
867
+ * @param channel The texture channel
868
+ * @param uniform The uniform to set
869
+ * @param texture The render target texture containing the depth stencil texture to apply
870
+ * @param name The texture name
871
+ */
872
+ setDepthStencilTexture(channel, uniform, texture, name) {
873
+ if (channel === undefined) {
874
+ return;
875
+ }
876
+ if (!texture || !texture.depthStencilTexture) {
877
+ this._setTexture(channel, null, undefined, undefined, name);
878
+ }
879
+ else {
880
+ this._setTexture(channel, texture, false, true, name);
881
+ }
882
+ }
883
+ /**
884
+ * Sets a texture to the context from a postprocess
885
+ * @param channel defines the channel to use
886
+ * @param postProcess defines the source postprocess
887
+ * @param name name of the channel
888
+ */
889
+ setTextureFromPostProcess(channel, postProcess, name) {
890
+ let postProcessInput = null;
891
+ if (postProcess) {
892
+ if (postProcess._forcedOutputTexture) {
893
+ postProcessInput = postProcess._forcedOutputTexture;
894
+ }
895
+ else if (postProcess._textures.data[postProcess._currentRenderTextureInd]) {
896
+ postProcessInput = postProcess._textures.data[postProcess._currentRenderTextureInd];
897
+ }
898
+ }
899
+ this._bindTexture(channel, postProcessInput?.texture ?? null, name);
900
+ }
901
+ /**
902
+ * Binds the output of the passed in post process to the texture channel specified
903
+ * @param channel The channel the texture should be bound to
904
+ * @param postProcess The post process which's output should be bound
905
+ * @param name name of the channel
906
+ */
907
+ setTextureFromPostProcessOutput(channel, postProcess, name) {
908
+ this._bindTexture(channel, postProcess?._outputTexture?.texture ?? null, name);
909
+ }
756
910
  /**
757
911
  * Force a specific size of the canvas
758
912
  * @param width defines the new canvas' width
@@ -1240,6 +1394,12 @@ export class WebGPUEngine extends Engine {
1240
1394
  // eslint-disable-next-line no-throw-literal
1241
1395
  throw "Not implemented on WebGPU";
1242
1396
  }
1397
+ /**
1398
+ * Unbind all instance attributes
1399
+ */
1400
+ unbindInstanceAttributes() {
1401
+ // Does nothing
1402
+ }
1243
1403
  /**
1244
1404
  * Bind a list of vertex buffers with the engine
1245
1405
  * @param vertexBuffers defines the list of vertex buffers to bind
@@ -1368,7 +1528,7 @@ export class WebGPUEngine extends Engine {
1368
1528
  }
1369
1529
  return compiledEffect;
1370
1530
  }
1371
- const effect = new Effect(baseName, attributesNamesOrOptions, uniformsNamesOrEngine, samplers, this, defines, fallbacks, onCompiled, onError, indexParameters, name, shaderLanguage);
1531
+ const effect = new Effect(baseName, attributesNamesOrOptions, uniformsNamesOrEngine, samplers, this, defines, fallbacks, onCompiled, onError, indexParameters, name, attributesNamesOrOptions.shaderLanguage ?? shaderLanguage);
1372
1532
  this._compiledEffects[name] = effect;
1373
1533
  return effect;
1374
1534
  }
@@ -1526,7 +1686,7 @@ export class WebGPUEngine extends Engine {
1526
1686
  if (!effect) {
1527
1687
  return;
1528
1688
  }
1529
- if (!DrawWrapper.IsWrapper(effect)) {
1689
+ if (!IsWrapper(effect)) {
1530
1690
  this._currentEffect = effect;
1531
1691
  this._currentMaterialContext = this._defaultMaterialContext;
1532
1692
  this._currentDrawContext = this._defaultDrawContext;
@@ -1777,6 +1937,12 @@ export class WebGPUEngine extends Engine {
1777
1937
  this._generateMipmaps(texture);
1778
1938
  }
1779
1939
  }
1940
+ /**
1941
+ * @internal
1942
+ */
1943
+ _getUseSRGBBuffer(useSRGBBuffer, noMipmap) {
1944
+ return useSRGBBuffer && this._caps.supportSRGBBuffers;
1945
+ }
1780
1946
  /**
1781
1947
  * Update the sampling mode of a given texture
1782
1948
  * @param samplingMode defines the required sampling mode
@@ -1842,6 +2008,41 @@ export class WebGPUEngine extends Engine {
1842
2008
  }
1843
2009
  }
1844
2010
  }
2011
+ /**
2012
+ * Create a cube texture from prefiltered data (ie. the mipmaps contain ready to use data for PBR reflection)
2013
+ * @param rootUrl defines the url where the file to load is located
2014
+ * @param scene defines the current scene
2015
+ * @param lodScale defines scale to apply to the mip map selection
2016
+ * @param lodOffset defines offset to apply to the mip map selection
2017
+ * @param onLoad defines an optional callback raised when the texture is loaded
2018
+ * @param onError defines an optional callback raised if there is an issue to load the texture
2019
+ * @param format defines the format of the data
2020
+ * @param forcedExtension defines the extension to use to pick the right loader
2021
+ * @param createPolynomials defines wheter or not to create polynomails harmonics for the texture
2022
+ * @returns the cube texture as an InternalTexture
2023
+ */
2024
+ createPrefilteredCubeTexture(rootUrl, scene, lodScale, lodOffset, onLoad = null, onError = null, format, forcedExtension = null, createPolynomials = true) {
2025
+ const callback = (loadData) => {
2026
+ if (!loadData) {
2027
+ if (onLoad) {
2028
+ onLoad(null);
2029
+ }
2030
+ return;
2031
+ }
2032
+ const texture = loadData.texture;
2033
+ if (!createPolynomials) {
2034
+ texture._sphericalPolynomial = new SphericalPolynomial();
2035
+ }
2036
+ else if (loadData.info.sphericalPolynomial) {
2037
+ texture._sphericalPolynomial = loadData.info.sphericalPolynomial;
2038
+ }
2039
+ texture._source = InternalTextureSource.CubePrefiltered;
2040
+ if (onLoad) {
2041
+ onLoad(texture);
2042
+ }
2043
+ };
2044
+ return this.createCubeTexture(rootUrl, scene, null, false, callback, onError, format, forcedExtension, createPolynomials, lodScale, lodOffset);
2045
+ }
1845
2046
  /**
1846
2047
  * Sets a texture to the according uniform.
1847
2048
  * @param channel The texture channel
@@ -2104,10 +2305,23 @@ export class WebGPUEngine extends Engine {
2104
2305
  //------------------------------------------------------------------------------
2105
2306
  // Frame management
2106
2307
  //------------------------------------------------------------------------------
2308
+ _measureFps() {
2309
+ this._performanceMonitor.sampleFrame();
2310
+ this._fps = this._performanceMonitor.averageFPS;
2311
+ this._deltaTime = this._performanceMonitor.instantaneousFrameTime || 0;
2312
+ }
2313
+ /**
2314
+ * Gets the performance monitor attached to this engine
2315
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/scene/optimize_your_scene#engineinstrumentation
2316
+ */
2317
+ get performanceMonitor() {
2318
+ return this._performanceMonitor;
2319
+ }
2107
2320
  /**
2108
2321
  * Begin a new frame
2109
2322
  */
2110
2323
  beginFrame() {
2324
+ this._measureFps();
2111
2325
  super.beginFrame();
2112
2326
  }
2113
2327
  /**
@@ -2147,7 +2361,6 @@ export class WebGPUEngine extends Engine {
2147
2361
  this._cacheRenderPipeline.endFrame();
2148
2362
  this._cacheBindGroups.endFrame();
2149
2363
  this._pendingDebugCommands.length = 0;
2150
- super.endFrame();
2151
2364
  if (this.dbgVerboseLogsForFirstFrames) {
2152
2365
  if (this._count === undefined) {
2153
2366
  this._count = 0;
@@ -2162,6 +2375,11 @@ export class WebGPUEngine extends Engine {
2162
2375
  }
2163
2376
  }
2164
2377
  }
2378
+ super.endFrame();
2379
+ }
2380
+ /**Gets driver info if available */
2381
+ extractDriverInfo() {
2382
+ return "";
2165
2383
  }
2166
2384
  /**
2167
2385
  * Force a WebGPU flush (ie. a flush of all waiting commands)
@@ -2518,7 +2736,7 @@ export class WebGPUEngine extends Engine {
2518
2736
  */
2519
2737
  unBindFramebuffer(texture, disableGenerateMipMaps = false, onBeforeUnbind) {
2520
2738
  const saveCRT = this._currentRenderTarget;
2521
- this._currentRenderTarget = null; // to be iso with thinEngine, this._currentRenderTarget must be null when onBeforeUnbind is called
2739
+ this._currentRenderTarget = null; // to be iso with abstractEngine, this._currentRenderTarget must be null when onBeforeUnbind is called
2522
2740
  if (onBeforeUnbind) {
2523
2741
  onBeforeUnbind();
2524
2742
  }
@@ -2585,6 +2803,28 @@ export class WebGPUEngine extends Engine {
2585
2803
  setRasterizerState() {
2586
2804
  // Does not exist in WebGPU
2587
2805
  }
2806
+ /**
2807
+ * @internal
2808
+ */
2809
+ _executeWhenRenderingStateIsCompiled(pipelineContext, action) {
2810
+ // No parallel shader compilation.
2811
+ // No Async, so direct launch
2812
+ action();
2813
+ }
2814
+ /**
2815
+ * @internal
2816
+ */
2817
+ bindSamplers() { }
2818
+ /** @internal */
2819
+ _getUnpackAlignement() {
2820
+ return 1;
2821
+ }
2822
+ /**
2823
+ * @internal
2824
+ */
2825
+ _bindTextureDirectly() {
2826
+ return false;
2827
+ }
2588
2828
  /**
2589
2829
  * Set various states to the webGL context
2590
2830
  * @param culling defines culling state: true to enable culling, false to disable it
@@ -2768,6 +3008,7 @@ export class WebGPUEngine extends Engine {
2768
3008
  this._textureHelper.destroyDeferredTextures();
2769
3009
  this._bufferManager.destroyDeferredBuffers();
2770
3010
  this._device.destroy();
3011
+ _CommonDispose(this, this._renderingCanvas);
2771
3012
  super.dispose();
2772
3013
  }
2773
3014
  //------------------------------------------------------------------------------
@@ -2806,160 +3047,6 @@ export class WebGPUEngine extends Engine {
2806
3047
  // TODO WEBGPU. from the webgpu errors.
2807
3048
  return 0;
2808
3049
  }
2809
- //------------------------------------------------------------------------------
2810
- // Unused WebGPU
2811
- //------------------------------------------------------------------------------
2812
- /**
2813
- * @internal
2814
- */
2815
- bindSamplers() { }
2816
- /**
2817
- * @internal
2818
- */
2819
- _bindTextureDirectly() {
2820
- return false;
2821
- }
2822
- /**
2823
- * Gets a boolean indicating if all created effects are ready
2824
- * @returns always true - No parallel shader compilation
2825
- */
2826
- areAllEffectsReady() {
2827
- return true;
2828
- }
2829
- /**
2830
- * @internal
2831
- */
2832
- _executeWhenRenderingStateIsCompiled(pipelineContext, action) {
2833
- // No parallel shader compilation.
2834
- // No Async, so direct launch
2835
- action();
2836
- }
2837
- /**
2838
- * @internal
2839
- */
2840
- _isRenderingStateCompiled() {
2841
- // No parallel shader compilation.
2842
- return true;
2843
- }
2844
- /** @internal */
2845
- _getUnpackAlignement() {
2846
- return 1;
2847
- }
2848
- /**
2849
- * @internal
2850
- */
2851
- _unpackFlipY() { }
2852
- /**
2853
- * @internal
2854
- */
2855
- _bindUnboundFramebuffer() {
2856
- // eslint-disable-next-line no-throw-literal
2857
- throw "_bindUnboundFramebuffer is not implementedin WebGPU! You probably want to use restoreDefaultFramebuffer or unBindFramebuffer instead";
2858
- }
2859
- // TODO WEBGPU. All of the below should go once engine split with baseEngine.
2860
- /**
2861
- * @internal
2862
- */
2863
- _getSamplingParameters() {
2864
- // eslint-disable-next-line no-throw-literal
2865
- throw "_getSamplingParameters is not available in WebGPU";
2866
- }
2867
- /**
2868
- * @internal
2869
- */
2870
- getUniforms() {
2871
- return [];
2872
- }
2873
- /**
2874
- * @internal
2875
- */
2876
- setIntArray() {
2877
- return false;
2878
- }
2879
- /**
2880
- * @internal
2881
- */
2882
- setIntArray2() {
2883
- return false;
2884
- }
2885
- /**
2886
- * @internal
2887
- */
2888
- setIntArray3() {
2889
- return false;
2890
- }
2891
- /**
2892
- * @internal
2893
- */
2894
- setIntArray4() {
2895
- return false;
2896
- }
2897
- /**
2898
- * @internal
2899
- */
2900
- setArray() {
2901
- return false;
2902
- }
2903
- /**
2904
- * @internal
2905
- */
2906
- setArray2() {
2907
- return false;
2908
- }
2909
- /**
2910
- * @internal
2911
- */
2912
- setArray3() {
2913
- return false;
2914
- }
2915
- /**
2916
- * @internal
2917
- */
2918
- setArray4() {
2919
- return false;
2920
- }
2921
- /**
2922
- * @internal
2923
- */
2924
- setMatrices() {
2925
- return false;
2926
- }
2927
- /**
2928
- * @internal
2929
- */
2930
- setMatrix3x3() {
2931
- return false;
2932
- }
2933
- /**
2934
- * @internal
2935
- */
2936
- setMatrix2x2() {
2937
- return false;
2938
- }
2939
- /**
2940
- * @internal
2941
- */
2942
- setFloat() {
2943
- return false;
2944
- }
2945
- /**
2946
- * @internal
2947
- */
2948
- setFloat2() {
2949
- return false;
2950
- }
2951
- /**
2952
- * @internal
2953
- */
2954
- setFloat3() {
2955
- return false;
2956
- }
2957
- /**
2958
- * @internal
2959
- */
2960
- setFloat4() {
2961
- return false;
2962
- }
2963
3050
  }
2964
3051
  // Default glslang options.
2965
3052
  WebGPUEngine._GLSLslangDefaultOptions = {