@babylonjs/core 6.33.2 → 6.34.0-alpha.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 (332) 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.alpha.js +8 -116
  17. package/Engines/Extensions/engine.alpha.js.map +1 -1
  18. package/Engines/Extensions/engine.cubeTexture.d.ts +1 -1
  19. package/Engines/Extensions/engine.cubeTexture.js +11 -213
  20. package/Engines/Extensions/engine.cubeTexture.js.map +1 -1
  21. package/Engines/Extensions/engine.dynamicBuffer.js +5 -42
  22. package/Engines/Extensions/engine.dynamicBuffer.js.map +1 -1
  23. package/Engines/Extensions/engine.dynamicTexture.d.ts +1 -1
  24. package/Engines/Extensions/engine.dynamicTexture.js +5 -47
  25. package/Engines/Extensions/engine.dynamicTexture.js.map +1 -1
  26. package/Engines/Extensions/engine.multiRender.js +11 -341
  27. package/Engines/Extensions/engine.multiRender.js.map +1 -1
  28. package/Engines/Extensions/engine.multiview.js +6 -57
  29. package/Engines/Extensions/engine.multiview.js.map +1 -1
  30. package/Engines/Extensions/engine.query.d.ts +8 -2
  31. package/Engines/Extensions/engine.query.js +44 -152
  32. package/Engines/Extensions/engine.query.js.map +1 -1
  33. package/Engines/Extensions/engine.rawTexture.d.ts +1 -1
  34. package/Engines/Extensions/engine.rawTexture.js +20 -361
  35. package/Engines/Extensions/engine.rawTexture.js.map +1 -1
  36. package/Engines/Extensions/engine.readTexture.js +6 -112
  37. package/Engines/Extensions/engine.readTexture.js.map +1 -1
  38. package/Engines/Extensions/engine.renderTarget.d.ts +1 -1
  39. package/Engines/Extensions/engine.renderTarget.js +8 -173
  40. package/Engines/Extensions/engine.renderTarget.js.map +1 -1
  41. package/Engines/Extensions/engine.renderTargetCube.js +4 -55
  42. package/Engines/Extensions/engine.renderTargetCube.js.map +1 -1
  43. package/Engines/Extensions/engine.storageBuffer.d.ts +2 -1
  44. package/Engines/Extensions/engine.storageBuffer.js.map +1 -1
  45. package/Engines/Extensions/engine.textureSelector.js +11 -52
  46. package/Engines/Extensions/engine.textureSelector.js.map +1 -1
  47. package/Engines/Extensions/engine.transformFeedback.js +10 -11
  48. package/Engines/Extensions/engine.transformFeedback.js.map +1 -1
  49. package/Engines/Extensions/engine.uniformBuffer.js +9 -59
  50. package/Engines/Extensions/engine.uniformBuffer.js.map +1 -1
  51. package/Engines/Extensions/engine.videoTexture.js +4 -54
  52. package/Engines/Extensions/engine.videoTexture.js.map +1 -1
  53. package/Engines/Extensions/engine.views.d.ts +2 -24
  54. package/Engines/Extensions/engine.views.js +17 -136
  55. package/Engines/Extensions/engine.views.js.map +1 -1
  56. package/Engines/Processors/shaderCodeInliner.js +15 -14
  57. package/Engines/Processors/shaderCodeInliner.js.map +1 -1
  58. package/Engines/WebGPU/Extensions/engine.computeShader.js +3 -2
  59. package/Engines/WebGPU/Extensions/engine.computeShader.js.map +1 -1
  60. package/Engines/WebGPU/Extensions/engine.storageBuffer.js +14 -5
  61. package/Engines/WebGPU/Extensions/engine.storageBuffer.js.map +1 -1
  62. package/Engines/WebGPU/webgpuShaderProcessor.js +2 -1
  63. package/Engines/WebGPU/webgpuShaderProcessor.js.map +1 -1
  64. package/Engines/WebGPU/webgpuTintWASM.js +3 -2
  65. package/Engines/WebGPU/webgpuTintWASM.js.map +1 -1
  66. package/Engines/engine.d.ts +15 -64
  67. package/Engines/engine.js +322 -773
  68. package/Engines/engine.js.map +1 -1
  69. package/Engines/nativeEngine.d.ts +1 -1
  70. package/Engines/nativeEngine.js.map +1 -1
  71. package/Engines/nullEngine.d.ts +1 -1
  72. package/Engines/nullEngine.js.map +1 -1
  73. package/Engines/thinEngine.d.ts +160 -151
  74. package/Engines/thinEngine.js +712 -3281
  75. package/Engines/thinEngine.js.map +1 -1
  76. package/Engines/webgpuEngine.d.ts +5 -8
  77. package/Engines/webgpuEngine.js +143 -112
  78. package/Engines/webgpuEngine.js.map +1 -1
  79. package/FlowGraph/Blocks/Execution/flowGraphConsoleLogBlock.js +2 -1
  80. package/FlowGraph/Blocks/Execution/flowGraphConsoleLogBlock.js.map +1 -1
  81. package/FlowGraph/flowGraphBlock.js +1 -21
  82. package/FlowGraph/flowGraphBlock.js.map +1 -1
  83. package/FlowGraph/flowGraphExecutionBlock.d.ts +1 -0
  84. package/FlowGraph/flowGraphExecutionBlock.js +20 -0
  85. package/FlowGraph/flowGraphExecutionBlock.js.map +1 -1
  86. package/Gizmos/axisScaleGizmo.d.ts +1 -0
  87. package/Gizmos/axisScaleGizmo.js +12 -0
  88. package/Gizmos/axisScaleGizmo.js.map +1 -1
  89. package/Gizmos/lightGizmo.js +2 -1
  90. package/Gizmos/lightGizmo.js.map +1 -1
  91. package/Gizmos/rotationGizmo.js +1 -1
  92. package/Gizmos/rotationGizmo.js.map +1 -1
  93. package/Lights/Shadows/cascadedShadowGenerator.js +1 -1
  94. package/Lights/Shadows/cascadedShadowGenerator.js.map +1 -1
  95. package/Materials/Node/Blocks/Dual/lightBlock.js +2 -1
  96. package/Materials/Node/Blocks/Dual/lightBlock.js.map +1 -1
  97. package/Materials/Node/Blocks/Dual/reflectionTextureBlock.js +3 -2
  98. package/Materials/Node/Blocks/Dual/reflectionTextureBlock.js.map +1 -1
  99. package/Materials/Node/Blocks/Fragment/fragDepthBlock.js +2 -1
  100. package/Materials/Node/Blocks/Fragment/fragDepthBlock.js.map +1 -1
  101. package/Materials/Node/Blocks/Fragment/heightToNormalBlock.js +2 -1
  102. package/Materials/Node/Blocks/Fragment/heightToNormalBlock.js.map +1 -1
  103. package/Materials/Node/Blocks/PBR/anisotropyBlock.js +2 -1
  104. package/Materials/Node/Blocks/PBR/anisotropyBlock.js.map +1 -1
  105. package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.js +3 -2
  106. package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.js.map +1 -1
  107. package/Materials/Node/Blocks/PBR/reflectionBlock.js +2 -1
  108. package/Materials/Node/Blocks/PBR/reflectionBlock.js.map +1 -1
  109. package/Materials/Node/nodeMaterial.js +9 -8
  110. package/Materials/Node/nodeMaterial.js.map +1 -1
  111. package/Materials/Node/nodeMaterialBlock.js +2 -1
  112. package/Materials/Node/nodeMaterialBlock.js.map +1 -1
  113. package/Materials/drawWrapper.js +3 -2
  114. package/Materials/drawWrapper.js.map +1 -1
  115. package/Materials/effect.js +2 -1
  116. package/Materials/effect.js.map +1 -1
  117. package/Materials/material.js +2 -1
  118. package/Materials/material.js.map +1 -1
  119. package/Materials/uniformBuffer.d.ts +4 -1
  120. package/Materials/uniformBuffer.js +5 -2
  121. package/Materials/uniformBuffer.js.map +1 -1
  122. package/Meshes/Node/nodeGeometryBlock.js +2 -1
  123. package/Meshes/Node/nodeGeometryBlock.js.map +1 -1
  124. package/Meshes/abstractMesh.js +3 -1
  125. package/Meshes/abstractMesh.js.map +1 -1
  126. package/Misc/assetsManager.js +2 -2
  127. package/Misc/assetsManager.js.map +1 -1
  128. package/Misc/dds.d.ts +2 -0
  129. package/Misc/dds.js +27 -23
  130. package/Misc/dds.js.map +1 -1
  131. package/Misc/logger.d.ts +3 -3
  132. package/Misc/logger.js +8 -4
  133. package/Misc/logger.js.map +1 -1
  134. package/Misc/sceneSerializer.js +2 -1
  135. package/Misc/sceneSerializer.js.map +1 -1
  136. package/Navigation/Plugins/recastJSPlugin.js +2 -2
  137. package/Navigation/Plugins/recastJSPlugin.js.map +1 -1
  138. package/Physics/v2/Plugins/havokPlugin.js +1 -1
  139. package/Physics/v2/Plugins/havokPlugin.js.map +1 -1
  140. package/Physics/v2/index.d.ts +1 -0
  141. package/Physics/v2/index.js +1 -0
  142. package/Physics/v2/index.js.map +1 -1
  143. package/Physics/v2/ragdoll.d.ts +107 -0
  144. package/Physics/v2/ragdoll.js +228 -0
  145. package/Physics/v2/ragdoll.js.map +1 -0
  146. package/PostProcesses/RenderPipeline/Pipelines/ssao2RenderingPipeline.js +2 -2
  147. package/PostProcesses/RenderPipeline/Pipelines/ssao2RenderingPipeline.js.map +1 -1
  148. package/PostProcesses/RenderPipeline/Pipelines/ssrRenderingPipeline.js +3 -2
  149. package/PostProcesses/RenderPipeline/Pipelines/ssrRenderingPipeline.js.map +1 -1
  150. package/PostProcesses/index.d.ts +1 -1
  151. package/PostProcesses/index.js +1 -1
  152. package/PostProcesses/index.js.map +1 -1
  153. package/PostProcesses/passPostProcess.d.ts +1 -0
  154. package/PostProcesses/passPostProcess.js +6 -2
  155. package/PostProcesses/passPostProcess.js.map +1 -1
  156. package/PostProcesses/screenSpaceCurvaturePostProcess.js +1 -1
  157. package/PostProcesses/screenSpaceCurvaturePostProcess.js.map +1 -1
  158. package/PostProcesses/screenSpaceReflectionPostProcess.js +3 -2
  159. package/PostProcesses/screenSpaceReflectionPostProcess.js.map +1 -1
  160. package/Rendering/depthPeelingRenderer.js +2 -1
  161. package/Rendering/depthPeelingRenderer.js.map +1 -1
  162. package/Shaders/ShadersInclude/pbrBlockSubSurface.js +3 -2
  163. package/Shaders/ShadersInclude/pbrBlockSubSurface.js.map +1 -1
  164. package/XR/features/WebXRControllerPhysics.js +2 -2
  165. package/XR/features/WebXRControllerPhysics.js.map +1 -1
  166. package/XR/features/WebXRMeshDetector.js +2 -1
  167. package/XR/features/WebXRMeshDetector.js.map +1 -1
  168. package/XR/features/WebXRWalkingLocomotion.js +1 -1
  169. package/XR/features/WebXRWalkingLocomotion.js.map +1 -1
  170. package/XR/webXRExperienceHelper.js +2 -2
  171. package/XR/webXRExperienceHelper.js.map +1 -1
  172. package/assetContainer.js +2 -2
  173. package/assetContainer.js.map +1 -1
  174. package/esm/Engines/Extensions/alpha/alpha.base.d.ts +34 -0
  175. package/esm/Engines/Extensions/alpha/alpha.base.js +2 -0
  176. package/esm/Engines/Extensions/alpha/alpha.base.js.map +1 -0
  177. package/esm/Engines/Extensions/computeShaders/computeShaders.base.d.ts +87 -0
  178. package/esm/Engines/Extensions/computeShaders/computeShaders.base.js +12 -0
  179. package/esm/Engines/Extensions/computeShaders/computeShaders.base.js.map +1 -0
  180. package/esm/Engines/Extensions/cubeTexture/cubeTexture.base.d.ts +79 -0
  181. package/esm/Engines/Extensions/cubeTexture/cubeTexture.base.js +2 -0
  182. package/esm/Engines/Extensions/cubeTexture/cubeTexture.base.js.map +1 -0
  183. package/esm/Engines/Extensions/debugging/debugging.base.d.ts +11 -0
  184. package/esm/Engines/Extensions/debugging/debugging.base.js +2 -0
  185. package/esm/Engines/Extensions/debugging/debugging.base.js.map +1 -0
  186. package/esm/Engines/Extensions/dynamicBuffer/dynamicBuffer.base.d.ts +20 -0
  187. package/esm/Engines/Extensions/dynamicBuffer/dynamicBuffer.base.js +2 -0
  188. package/esm/Engines/Extensions/dynamicBuffer/dynamicBuffer.base.js.map +1 -0
  189. package/esm/Engines/Extensions/dynamicTexture/dynamicTexture.base.d.ts +26 -0
  190. package/esm/Engines/Extensions/dynamicTexture/dynamicTexture.base.js +2 -0
  191. package/esm/Engines/Extensions/dynamicTexture/dynamicTexture.base.js.map +1 -0
  192. package/esm/Engines/Extensions/engine.extensions.d.ts +67 -0
  193. package/esm/Engines/Extensions/engine.extensions.js +49 -0
  194. package/esm/Engines/Extensions/engine.extensions.js.map +1 -0
  195. package/esm/Engines/Extensions/externalTexture/externalTexture.base.d.ts +16 -0
  196. package/esm/Engines/Extensions/externalTexture/externalTexture.base.js +2 -0
  197. package/esm/Engines/Extensions/externalTexture/externalTexture.base.js.map +1 -0
  198. package/esm/Engines/Extensions/multiRender/multiRender.base.d.ts +54 -0
  199. package/esm/Engines/Extensions/multiRender/multiRender.base.js +2 -0
  200. package/esm/Engines/Extensions/multiRender/multiRender.base.js.map +1 -0
  201. package/esm/Engines/Extensions/multiview/multiview.base.d.ts +67 -0
  202. package/esm/Engines/Extensions/multiview/multiview.base.js +79 -0
  203. package/esm/Engines/Extensions/multiview/multiview.base.js.map +1 -0
  204. package/esm/Engines/Extensions/query/query.base.d.ts +164 -0
  205. package/esm/Engines/Extensions/query/query.base.js +168 -0
  206. package/esm/Engines/Extensions/query/query.base.js.map +1 -0
  207. package/esm/Engines/Extensions/rawTexture/engine.rawTexture.base.d.ts +187 -0
  208. package/esm/Engines/Extensions/rawTexture/engine.rawTexture.base.js +2 -0
  209. package/esm/Engines/Extensions/rawTexture/engine.rawTexture.base.js.map +1 -0
  210. package/esm/Engines/Extensions/readTexture/readTexture.base.d.ts +9 -0
  211. package/esm/Engines/Extensions/readTexture/readTexture.base.js +2 -0
  212. package/esm/Engines/Extensions/readTexture/readTexture.base.js.map +1 -0
  213. package/esm/Engines/Extensions/renderTarget/renderTarget.base.d.ts +35 -0
  214. package/esm/Engines/Extensions/renderTarget/renderTarget.base.js +2 -0
  215. package/esm/Engines/Extensions/renderTarget/renderTarget.base.js.map +1 -0
  216. package/esm/Engines/Extensions/renderTargetCube/renderTargetCube.base.d.ts +12 -0
  217. package/esm/Engines/Extensions/renderTargetCube/renderTargetCube.base.js +2 -0
  218. package/esm/Engines/Extensions/renderTargetCube/renderTargetCube.base.js.map +1 -0
  219. package/esm/Engines/Extensions/storageBuffer/storageBuffer.base.d.ts +36 -0
  220. package/esm/Engines/Extensions/storageBuffer/storageBuffer.base.js +2 -0
  221. package/esm/Engines/Extensions/storageBuffer/storageBuffer.base.js.map +1 -0
  222. package/esm/Engines/Extensions/textureSampler/textureSampler.base.d.ts +11 -0
  223. package/esm/Engines/Extensions/textureSampler/textureSampler.base.js +2 -0
  224. package/esm/Engines/Extensions/textureSampler/textureSampler.base.js.map +1 -0
  225. package/esm/Engines/Extensions/textureSelector/textureSelector.base.d.ts +50 -0
  226. package/esm/Engines/Extensions/textureSelector/textureSelector.base.js +53 -0
  227. package/esm/Engines/Extensions/textureSelector/textureSelector.base.js.map +1 -0
  228. package/esm/Engines/Extensions/transformFeedback/engine.transformFeedback.base.d.ts +42 -0
  229. package/esm/Engines/Extensions/transformFeedback/engine.transformFeedback.base.js +2 -0
  230. package/esm/Engines/Extensions/transformFeedback/engine.transformFeedback.base.js.map +1 -0
  231. package/esm/Engines/Extensions/uniformBuffer/uniformBuffer.base.d.ts +48 -0
  232. package/esm/Engines/Extensions/uniformBuffer/uniformBuffer.base.js +2 -0
  233. package/esm/Engines/Extensions/uniformBuffer/uniformBuffer.base.js.map +1 -0
  234. package/esm/Engines/Extensions/videoTexture/videoTexture.base.d.ts +13 -0
  235. package/esm/Engines/Extensions/videoTexture/videoTexture.base.js +2 -0
  236. package/esm/Engines/Extensions/videoTexture/videoTexture.base.js.map +1 -0
  237. package/esm/Engines/Extensions/views/views.base.d.ts +85 -0
  238. package/esm/Engines/Extensions/views/views.base.js +33 -0
  239. package/esm/Engines/Extensions/views/views.base.js.map +1 -0
  240. package/esm/Engines/WebGL/Extensions/alpha/alpha.webgl.d.ts +8 -0
  241. package/esm/Engines/WebGL/Extensions/alpha/alpha.webgl.js +137 -0
  242. package/esm/Engines/WebGL/Extensions/alpha/alpha.webgl.js.map +1 -0
  243. package/esm/Engines/WebGL/Extensions/cubeTexture/cubeTexture.webgl.d.ts +11 -0
  244. package/esm/Engines/WebGL/Extensions/cubeTexture/cubeTexture.webgl.js +251 -0
  245. package/esm/Engines/WebGL/Extensions/cubeTexture/cubeTexture.webgl.js.map +1 -0
  246. package/esm/Engines/WebGL/Extensions/dynamicBuffer/dynamicBuffer.webgl.d.ts +5 -0
  247. package/esm/Engines/WebGL/Extensions/dynamicBuffer/dynamicBuffer.webgl.js +55 -0
  248. package/esm/Engines/WebGL/Extensions/dynamicBuffer/dynamicBuffer.webgl.js.map +1 -0
  249. package/esm/Engines/WebGL/Extensions/dynamicTexture/dynamicTexture.webgl.d.ts +5 -0
  250. package/esm/Engines/WebGL/Extensions/dynamicTexture/dynamicTexture.webgl.js +65 -0
  251. package/esm/Engines/WebGL/Extensions/dynamicTexture/dynamicTexture.webgl.js.map +1 -0
  252. package/esm/Engines/WebGL/Extensions/multiRender/multiRender.webgl.d.ts +10 -0
  253. package/esm/Engines/WebGL/Extensions/multiRender/multiRender.webgl.js +375 -0
  254. package/esm/Engines/WebGL/Extensions/multiRender/multiRender.webgl.js.map +1 -0
  255. package/esm/Engines/WebGL/Extensions/multiview/multiview.webgl.d.ts +6 -0
  256. package/esm/Engines/WebGL/Extensions/multiview/multiview.webgl.js +77 -0
  257. package/esm/Engines/WebGL/Extensions/multiview/multiview.webgl.js.map +1 -0
  258. package/esm/Engines/WebGL/Extensions/query/query.webgl.d.ts +21 -0
  259. package/esm/Engines/WebGL/Extensions/query/query.webgl.js +220 -0
  260. package/esm/Engines/WebGL/Extensions/query/query.webgl.js.map +1 -0
  261. package/esm/Engines/WebGL/Extensions/rawTexture/engine.rawTexture.webgl.d.ts +15 -0
  262. package/esm/Engines/WebGL/Extensions/rawTexture/engine.rawTexture.webgl.js +392 -0
  263. package/esm/Engines/WebGL/Extensions/rawTexture/engine.rawTexture.webgl.js.map +1 -0
  264. package/esm/Engines/WebGL/Extensions/readTexture/readTexture.webgl.d.ts +17 -0
  265. package/esm/Engines/WebGL/Extensions/readTexture/readTexture.webgl.js +133 -0
  266. package/esm/Engines/WebGL/Extensions/readTexture/readTexture.webgl.js.map +1 -0
  267. package/esm/Engines/WebGL/Extensions/renderTarget/renderTarget.webgl.d.ts +8 -0
  268. package/esm/Engines/WebGL/Extensions/renderTarget/renderTarget.webgl.js +199 -0
  269. package/esm/Engines/WebGL/Extensions/renderTarget/renderTarget.webgl.js.map +1 -0
  270. package/esm/Engines/WebGL/Extensions/renderTargetCube/renderTargetCube.webgl.d.ts +2 -0
  271. package/esm/Engines/WebGL/Extensions/renderTargetCube/renderTargetCube.webgl.js +62 -0
  272. package/esm/Engines/WebGL/Extensions/renderTargetCube/renderTargetCube.webgl.js.map +1 -0
  273. package/esm/Engines/WebGL/Extensions/textureSelector/textureSelector.webgl.d.ts +5 -0
  274. package/esm/Engines/WebGL/Extensions/textureSelector/textureSelector.webgl.js +28 -0
  275. package/esm/Engines/WebGL/Extensions/textureSelector/textureSelector.webgl.js.map +1 -0
  276. package/esm/Engines/WebGL/Extensions/transformFeedback/engine.transformFeedback.webgl.d.ts +11 -0
  277. package/esm/Engines/WebGL/Extensions/transformFeedback/engine.transformFeedback.webgl.js +45 -0
  278. package/esm/Engines/WebGL/Extensions/transformFeedback/engine.transformFeedback.webgl.js.map +1 -0
  279. package/esm/Engines/WebGL/Extensions/uniformBuffer/uniformBuffer.webgl.d.ts +9 -0
  280. package/esm/Engines/WebGL/Extensions/uniformBuffer/uniformBuffer.webgl.js +78 -0
  281. package/esm/Engines/WebGL/Extensions/uniformBuffer/uniformBuffer.webgl.js.map +1 -0
  282. package/esm/Engines/WebGL/Extensions/videoTexture/videoTexture.webgl.d.ts +4 -0
  283. package/esm/Engines/WebGL/Extensions/videoTexture/videoTexture.webgl.js +67 -0
  284. package/esm/Engines/WebGL/Extensions/videoTexture/videoTexture.webgl.js.map +1 -0
  285. package/esm/Engines/WebGL/Extensions/views/views.webgl.d.ts +18 -0
  286. package/esm/Engines/WebGL/Extensions/views/views.webgl.js +152 -0
  287. package/esm/Engines/WebGL/Extensions/views/views.webgl.js.map +1 -0
  288. package/esm/Engines/WebGL/engine.adapterHelpers.d.ts +43 -0
  289. package/esm/Engines/WebGL/engine.adapterHelpers.js +107 -0
  290. package/esm/Engines/WebGL/engine.adapterHelpers.js.map +1 -0
  291. package/esm/Engines/WebGL/engine.webgl.d.ts +1030 -0
  292. package/esm/Engines/WebGL/engine.webgl.js +4083 -0
  293. package/esm/Engines/WebGL/engine.webgl.js.map +1 -0
  294. package/esm/Engines/WebGPU/engine.adapterHelpers.d.ts +7 -0
  295. package/esm/Engines/WebGPU/engine.adapterHelpers.js +20 -0
  296. package/esm/Engines/WebGPU/engine.adapterHelpers.js.map +1 -0
  297. package/esm/Engines/WebGPU/engine.webgpu.constants.d.ts +391 -0
  298. package/esm/Engines/WebGPU/engine.webgpu.constants.js +2 -0
  299. package/esm/Engines/WebGPU/engine.webgpu.constants.js.map +1 -0
  300. package/esm/Engines/WebGPU/engine.webgpu.d.ts +277 -0
  301. package/esm/Engines/WebGPU/engine.webgpu.js +1281 -0
  302. package/esm/Engines/WebGPU/engine.webgpu.js.map +1 -0
  303. package/esm/Engines/engine.adapters.d.ts +32 -0
  304. package/esm/Engines/engine.adapters.js +27 -0
  305. package/esm/Engines/engine.adapters.js.map +1 -0
  306. package/esm/Engines/engine.base.d.ts +807 -0
  307. package/esm/Engines/engine.base.js +1235 -0
  308. package/esm/Engines/engine.base.js.map +1 -0
  309. package/esm/Engines/engine.constants.d.ts +735 -0
  310. package/esm/Engines/engine.constants.js +3 -0
  311. package/esm/Engines/engine.constants.js.map +1 -0
  312. package/esm/Engines/engine.extendable.d.ts +180 -0
  313. package/esm/Engines/engine.extendable.js +477 -0
  314. package/esm/Engines/engine.extendable.js.map +1 -0
  315. package/esm/Engines/engine.interfaces.d.ts +16 -0
  316. package/esm/Engines/engine.interfaces.js +9 -0
  317. package/esm/Engines/engine.interfaces.js.map +1 -0
  318. package/esm/Engines/engine.static.d.ts +215 -0
  319. package/esm/Engines/engine.static.js +345 -0
  320. package/esm/Engines/engine.static.js.map +1 -0
  321. package/esm/Engines/engine.tools.d.ts +20 -0
  322. package/esm/Engines/engine.tools.js +33 -0
  323. package/esm/Engines/engine.tools.js.map +1 -0
  324. package/esm/Engines/public.d.ts +1 -0
  325. package/esm/Engines/public.js +2 -0
  326. package/esm/Engines/public.js.map +1 -0
  327. package/esm/Engines/runtimeEnvironment.d.ts +37 -0
  328. package/esm/Engines/runtimeEnvironment.js +56 -0
  329. package/esm/Engines/runtimeEnvironment.js.map +1 -0
  330. package/package.json +2 -1
  331. package/scene.js +1 -1
  332. package/scene.js.map +1 -1
@@ -0,0 +1,164 @@
1
+ import type { Nullable, int } from "../../../../types.js";
2
+ import type { Observer } from "../../../../Misc/observable.js";
3
+ import { PerfCounter } from "../../../../Misc/perfCounter.js";
4
+ import type { _TimeToken } from "../../../../Instrumentation/timeToken.js";
5
+ import type { IBaseEnginePublic } from "../../engine.base";
6
+ /** @internal */
7
+ export type OcclusionQuery = WebGLQuery | number;
8
+ /** @internal */
9
+ export declare class _OcclusionDataStorage {
10
+ /** @internal */
11
+ occlusionInternalRetryCounter: number;
12
+ /** @internal */
13
+ isOcclusionQueryInProgress: boolean;
14
+ /** @internal */
15
+ isOccluded: boolean;
16
+ /** @internal */
17
+ occlusionRetryCount: number;
18
+ /** @internal */
19
+ occlusionType: number;
20
+ /** @internal */
21
+ occlusionQueryAlgorithmType: number;
22
+ /** @internal */
23
+ forceRenderingWhenOccluded: boolean;
24
+ }
25
+ export interface IQueryExtensionState {
26
+ /** @internal */
27
+ _currentNonTimestampToken: Nullable<_TimeToken>;
28
+ /** @internal */
29
+ _captureGPUFrameTime: boolean;
30
+ /** @internal */
31
+ _gpuFrameTimeToken: Nullable<_TimeToken>;
32
+ /** @internal */
33
+ _gpuFrameTime: PerfCounter;
34
+ /** @internal */
35
+ _onBeginFrameObserver: Nullable<Observer<IBaseEnginePublic>>;
36
+ /** @internal */
37
+ _onEndFrameObserver: Nullable<Observer<IBaseEnginePublic>>;
38
+ }
39
+ export interface IQueryEngineExtension {
40
+ /**
41
+ * Create a new webGL query (you must be sure that queries are supported by checking getCaps() function)
42
+ * @returns the new query
43
+ */
44
+ createQuery(engineState: IBaseEnginePublic): OcclusionQuery;
45
+ /**
46
+ * Delete and release a webGL query
47
+ * @param query defines the query to delete
48
+ * @returns the current engine
49
+ */
50
+ deleteQuery(engineState: IBaseEnginePublic, query: OcclusionQuery): IBaseEnginePublic;
51
+ /**
52
+ * Check if a given query has resolved and got its value
53
+ * @param query defines the query to check
54
+ * @returns true if the query got its value
55
+ */
56
+ isQueryResultAvailable(engineState: IBaseEnginePublic, query: OcclusionQuery): boolean;
57
+ /**
58
+ * Gets the value of a given query
59
+ * @param query defines the query to check
60
+ * @returns the value of the query
61
+ */
62
+ getQueryResult(engineState: IBaseEnginePublic, query: OcclusionQuery): number;
63
+ /**
64
+ * Initiates an occlusion query
65
+ * @param algorithmType defines the algorithm to use
66
+ * @param query defines the query to use
67
+ * @returns the current engine
68
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/occlusionQueries
69
+ */
70
+ beginOcclusionQuery(engineState: IBaseEnginePublic, algorithmType: number, query: OcclusionQuery): boolean;
71
+ /**
72
+ * Ends an occlusion query
73
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/occlusionQueries
74
+ * @param algorithmType defines the algorithm to use
75
+ * @returns the current engine
76
+ */
77
+ endOcclusionQuery(engineState: IBaseEnginePublic, algorithmType: number): IBaseEnginePublic;
78
+ /**
79
+ * Starts a time query (used to measure time spent by the GPU on a specific frame)
80
+ * Please note that only one query can be issued at a time
81
+ * @returns a time token used to track the time span
82
+ */
83
+ startTimeQuery(engineState: IBaseEnginePublic): Nullable<_TimeToken>;
84
+ /**
85
+ * Ends a time query
86
+ * @param token defines the token used to measure the time span
87
+ * @returns the time spent (in ns)
88
+ */
89
+ endTimeQuery(engineState: IBaseEnginePublic, token: _TimeToken): int;
90
+ /**
91
+ * Get the performance counter associated with the frame time computation
92
+ * @returns the perf counter
93
+ */
94
+ getGPUFrameTimeCounter(engineState: IBaseEnginePublic): PerfCounter;
95
+ /**
96
+ * Enable or disable the GPU frame time capture
97
+ * @param value True to enable, false to disable
98
+ */
99
+ captureGPUFrameTime(engineState: IBaseEnginePublic, value: boolean): void;
100
+ /** @internal */
101
+ _createTimeQuery(engineState: IBaseEnginePublic): WebGLQuery;
102
+ /** @internal */
103
+ _deleteTimeQuery(engineState: IBaseEnginePublic, query: WebGLQuery): void;
104
+ /** @internal */
105
+ _getGlAlgorithmType(engineState: IBaseEnginePublic, algorithmType: number): number;
106
+ /** @internal */
107
+ _getTimeQueryResult(engineState: IBaseEnginePublic, query: WebGLQuery): any;
108
+ /** @internal */
109
+ _getTimeQueryAvailability(engineState: IBaseEnginePublic, query: WebGLQuery): any;
110
+ }
111
+ export declare function initQuesryState(engineState: IBaseEnginePublic): void;
112
+ declare module "core/Meshes/abstractMesh.js" {
113
+ interface AbstractMesh {
114
+ /**
115
+ * Backing filed
116
+ * @internal
117
+ */
118
+ __occlusionDataStorage: _OcclusionDataStorage;
119
+ /**
120
+ * Access property
121
+ * @internal
122
+ */
123
+ _occlusionDataStorage: _OcclusionDataStorage;
124
+ /**
125
+ * this number indicates the number of allowed retries before stop the occlusion query, this is useful if the occlusion query is taking long time before to the query result is retrieved, the query result indicates if the object is visible within the scene or not and based on that Babylon.Js engine decides to show or hide the object.
126
+ * The default value is -1 which means don't break the query and wait till the result
127
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/occlusionQueries
128
+ */
129
+ occlusionRetryCount: number;
130
+ /**
131
+ * fes property is responsible for starting the occlusion query within the Mesh or not, fes property is also used to determine what should happen when the occlusionRetryCount is reached. It has supports 3 values:
132
+ * * OCCLUSION_TYPE_NONE (Default Value): fes option means no occlusion query within the Mesh.
133
+ * * OCCLUSION_TYPE_OPTIMISTIC: fes option is means use occlusion query and if occlusionRetryCount is reached and the query is broken show the mesh.
134
+ * * OCCLUSION_TYPE_STRICT: fes option is means use occlusion query and if occlusionRetryCount is reached and the query is broken restore the last state of the mesh occlusion if the mesh was visible then show the mesh if was hidden then hide don't show.
135
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/occlusionQueries
136
+ */
137
+ occlusionType: number;
138
+ /**
139
+ * fes property determines the type of occlusion query algorithm to run in WebGl, you can use:
140
+ * * AbstractMesh.OCCLUSION_ALGORITHM_TYPE_ACCURATE which is mapped to GL_ANY_SAMPLES_PASSED.
141
+ * * AbstractMesh.OCCLUSION_ALGORITHM_TYPE_CONSERVATIVE (Default Value) which is mapped to GL_ANY_SAMPLES_PASSED_CONSERVATIVE which is a false positive algorithm that is faster than GL_ANY_SAMPLES_PASSED but less accurate.
142
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/occlusionQueries
143
+ */
144
+ occlusionQueryAlgorithmType: number;
145
+ /**
146
+ * Gets or sets whether the mesh is occluded or not, it is used also to set the initial state of the mesh to be occluded or not
147
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/occlusionQueries
148
+ */
149
+ isOccluded: boolean;
150
+ /**
151
+ * Flag to check the progress status of the query
152
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/occlusionQueries
153
+ */
154
+ isOcclusionQueryInProgress: boolean;
155
+ /**
156
+ * Flag to force rendering the mesh even if occluded
157
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/occlusionQueries
158
+ */
159
+ forceRenderingWhenOccluded: boolean;
160
+ }
161
+ }
162
+ export declare const initQueryExtension: (extensionImplementation: IQueryEngineExtension, engineState: IBaseEnginePublic) => void;
163
+ /** @internal */
164
+ export declare const _getExtensionState: (engineState: IBaseEnginePublic) => IQueryExtensionState;
@@ -0,0 +1,168 @@
1
+ import { PerfCounter } from "../../../../Misc/perfCounter.js";
2
+ import { AbstractMesh } from "../../../../Meshes/abstractMesh.js";
3
+ /** @internal */
4
+ // eslint-disable-next-line @typescript-eslint/naming-convention
5
+ export class _OcclusionDataStorage {
6
+ constructor() {
7
+ /** @internal */
8
+ this.occlusionInternalRetryCounter = 0;
9
+ /** @internal */
10
+ this.isOcclusionQueryInProgress = false;
11
+ /** @internal */
12
+ this.isOccluded = false;
13
+ /** @internal */
14
+ this.occlusionRetryCount = -1;
15
+ /** @internal */
16
+ this.occlusionType = AbstractMesh.OCCLUSION_TYPE_NONE; // TODO move to Constants. Not urgent, as AbstractMesh is being imported here anyway
17
+ /** @internal */
18
+ this.occlusionQueryAlgorithmType = AbstractMesh.OCCLUSION_ALGORITHM_TYPE_CONSERVATIVE; // TODO same as above
19
+ /** @internal */
20
+ this.forceRenderingWhenOccluded = false;
21
+ }
22
+ }
23
+ export function initQuesryState(engineState) { }
24
+ export const initQueryExtension = (extensionImplementation, engineState) => {
25
+ if (AbstractMesh.prototype._occlusionDataStorage) {
26
+ return;
27
+ }
28
+ Object.defineProperty(AbstractMesh.prototype, "isOcclusionQueryInProgress", {
29
+ get: function () {
30
+ return this._occlusionDataStorage.isOcclusionQueryInProgress;
31
+ },
32
+ set: function (value) {
33
+ this._occlusionDataStorage.isOcclusionQueryInProgress = value;
34
+ },
35
+ enumerable: false,
36
+ configurable: true,
37
+ });
38
+ Object.defineProperty(AbstractMesh.prototype, "_occlusionDataStorage", {
39
+ get: function () {
40
+ if (!this.__occlusionDataStorage) {
41
+ this.__occlusionDataStorage = new _OcclusionDataStorage();
42
+ }
43
+ return this.__occlusionDataStorage;
44
+ },
45
+ enumerable: false,
46
+ configurable: true,
47
+ });
48
+ Object.defineProperty(AbstractMesh.prototype, "isOccluded", {
49
+ get: function () {
50
+ return this._occlusionDataStorage.isOccluded;
51
+ },
52
+ set: function (value) {
53
+ this._occlusionDataStorage.isOccluded = value;
54
+ },
55
+ enumerable: true,
56
+ configurable: true,
57
+ });
58
+ Object.defineProperty(AbstractMesh.prototype, "occlusionQueryAlgorithmType", {
59
+ get: function () {
60
+ return this._occlusionDataStorage.occlusionQueryAlgorithmType;
61
+ },
62
+ set: function (value) {
63
+ this._occlusionDataStorage.occlusionQueryAlgorithmType = value;
64
+ },
65
+ enumerable: true,
66
+ configurable: true,
67
+ });
68
+ Object.defineProperty(AbstractMesh.prototype, "occlusionType", {
69
+ get: function () {
70
+ return this._occlusionDataStorage.occlusionType;
71
+ },
72
+ set: function (value) {
73
+ this._occlusionDataStorage.occlusionType = value;
74
+ },
75
+ enumerable: true,
76
+ configurable: true,
77
+ });
78
+ Object.defineProperty(AbstractMesh.prototype, "occlusionRetryCount", {
79
+ get: function () {
80
+ return this._occlusionDataStorage.occlusionRetryCount;
81
+ },
82
+ set: function (value) {
83
+ this._occlusionDataStorage.occlusionRetryCount = value;
84
+ },
85
+ enumerable: true,
86
+ configurable: true,
87
+ });
88
+ Object.defineProperty(AbstractMesh.prototype, "forceRenderingWhenOccluded", {
89
+ get: function () {
90
+ return this._occlusionDataStorage.forceRenderingWhenOccluded;
91
+ },
92
+ set: function (value) {
93
+ this._occlusionDataStorage.forceRenderingWhenOccluded = value;
94
+ },
95
+ enumerable: true,
96
+ configurable: true,
97
+ });
98
+ // We also need to update AbstractMesh as there is a portion of the code there
99
+ AbstractMesh.prototype._checkOcclusionQuery = function () {
100
+ const dataStorage = this._occlusionDataStorage;
101
+ if (dataStorage.occlusionType === AbstractMesh.OCCLUSION_TYPE_NONE) {
102
+ dataStorage.isOccluded = false;
103
+ return false;
104
+ }
105
+ const engine = this.getEngine();
106
+ if (!engine.getCaps().supportOcclusionQuery) {
107
+ dataStorage.isOccluded = false;
108
+ return false;
109
+ }
110
+ if (!extensionImplementation.isQueryResultAvailable) {
111
+ // Occlusion query where not referenced
112
+ dataStorage.isOccluded = false;
113
+ return false;
114
+ }
115
+ if (this.isOcclusionQueryInProgress && this._occlusionQuery !== null && this._occlusionQuery !== undefined) {
116
+ const isOcclusionQueryAvailable = extensionImplementation.isQueryResultAvailable(engineState, this._occlusionQuery);
117
+ if (isOcclusionQueryAvailable) {
118
+ const occlusionQueryResult = extensionImplementation.getQueryResult(engineState, this._occlusionQuery);
119
+ dataStorage.isOcclusionQueryInProgress = false;
120
+ dataStorage.occlusionInternalRetryCounter = 0;
121
+ dataStorage.isOccluded = occlusionQueryResult > 0 ? false : true;
122
+ }
123
+ else {
124
+ dataStorage.occlusionInternalRetryCounter++;
125
+ if (dataStorage.occlusionRetryCount !== -1 && dataStorage.occlusionInternalRetryCounter > dataStorage.occlusionRetryCount) {
126
+ dataStorage.isOcclusionQueryInProgress = false;
127
+ dataStorage.occlusionInternalRetryCounter = 0;
128
+ // if optimistic set isOccluded to false regardless of the status of isOccluded. (Render in the current render loop)
129
+ // if strict continue the last state of the object.
130
+ dataStorage.isOccluded = dataStorage.occlusionType === AbstractMesh.OCCLUSION_TYPE_OPTIMISTIC ? false : dataStorage.isOccluded;
131
+ }
132
+ else {
133
+ return dataStorage.occlusionType === AbstractMesh.OCCLUSION_TYPE_OPTIMISTIC ? false : dataStorage.isOccluded;
134
+ }
135
+ }
136
+ }
137
+ const scene = this.getScene();
138
+ // TODO this is a mater of types. importing the types would be wrong here, and therefore the scene is being casted to any
139
+ if (scene.getBoundingBoxRenderer) {
140
+ const occlusionBoundingBoxRenderer = scene.getBoundingBoxRenderer();
141
+ if (this._occlusionQuery === null) {
142
+ this._occlusionQuery = extensionImplementation.createQuery(engineState);
143
+ }
144
+ if (extensionImplementation.beginOcclusionQuery(engineState, dataStorage.occlusionQueryAlgorithmType, this._occlusionQuery)) {
145
+ occlusionBoundingBoxRenderer.renderOcclusionBoundingBox(this);
146
+ extensionImplementation.endOcclusionQuery(engineState, dataStorage.occlusionQueryAlgorithmType);
147
+ this._occlusionDataStorage.isOcclusionQueryInProgress = true;
148
+ }
149
+ }
150
+ return dataStorage.isOccluded;
151
+ };
152
+ };
153
+ const stateObjects = [];
154
+ /** @internal */
155
+ export const _getExtensionState = (engineState) => {
156
+ if (!stateObjects[engineState.uniqueId]) {
157
+ stateObjects[engineState.uniqueId] = {
158
+ _currentNonTimestampToken: null,
159
+ _captureGPUFrameTime: false,
160
+ _gpuFrameTimeToken: null,
161
+ _gpuFrameTime: new PerfCounter(),
162
+ _onBeginFrameObserver: null,
163
+ _onEndFrameObserver: null,
164
+ };
165
+ }
166
+ return stateObjects[engineState.uniqueId];
167
+ };
168
+ //# sourceMappingURL=query.base.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query.base.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/esm/Engines/Extensions/query/query.base.ts"],"names":[],"mappings":"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","sourcesContent":["import type { Nullable, int } from \"core/types\";\r\nimport type { Observer } from \"core/Misc/observable\";\r\nimport { PerfCounter } from \"core/Misc/perfCounter\";\r\nimport type { _TimeToken } from \"core/Instrumentation/timeToken\";\r\nimport type { IBaseEnginePublic } from \"../../engine.base\";\r\nimport { AbstractMesh } from \"core/Meshes/abstractMesh\";\r\n\r\n// TODO there is a breaking change here - returning engine state instead of engine\r\n\r\n/** @internal */\r\nexport type OcclusionQuery = WebGLQuery | number;\r\n\r\n/** @internal */\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nexport class _OcclusionDataStorage {\r\n /** @internal */\r\n public occlusionInternalRetryCounter = 0;\r\n\r\n /** @internal */\r\n public isOcclusionQueryInProgress = false;\r\n\r\n /** @internal */\r\n public isOccluded = false;\r\n\r\n /** @internal */\r\n public occlusionRetryCount = -1;\r\n\r\n /** @internal */\r\n public occlusionType = AbstractMesh.OCCLUSION_TYPE_NONE; // TODO move to Constants. Not urgent, as AbstractMesh is being imported here anyway\r\n\r\n /** @internal */\r\n public occlusionQueryAlgorithmType = AbstractMesh.OCCLUSION_ALGORITHM_TYPE_CONSERVATIVE; // TODO same as above\r\n\r\n /** @internal */\r\n public forceRenderingWhenOccluded = false;\r\n}\r\n\r\nexport interface IQueryExtensionState {\r\n /** @internal */\r\n _currentNonTimestampToken: Nullable<_TimeToken>;\r\n /** @internal */\r\n _captureGPUFrameTime: boolean;\r\n /** @internal */\r\n _gpuFrameTimeToken: Nullable<_TimeToken>;\r\n /** @internal */\r\n _gpuFrameTime: PerfCounter;\r\n /** @internal */\r\n _onBeginFrameObserver: Nullable<Observer<IBaseEnginePublic>>;\r\n /** @internal */\r\n _onEndFrameObserver: Nullable<Observer<IBaseEnginePublic>>;\r\n}\r\n\r\nexport interface IQueryEngineExtension {\r\n /**\r\n * Create a new webGL query (you must be sure that queries are supported by checking getCaps() function)\r\n * @returns the new query\r\n */\r\n createQuery(engineState: IBaseEnginePublic): OcclusionQuery;\r\n\r\n /**\r\n * Delete and release a webGL query\r\n * @param query defines the query to delete\r\n * @returns the current engine\r\n */\r\n deleteQuery(engineState: IBaseEnginePublic, query: OcclusionQuery): IBaseEnginePublic;\r\n\r\n /**\r\n * Check if a given query has resolved and got its value\r\n * @param query defines the query to check\r\n * @returns true if the query got its value\r\n */\r\n isQueryResultAvailable(engineState: IBaseEnginePublic, query: OcclusionQuery): boolean;\r\n\r\n /**\r\n * Gets the value of a given query\r\n * @param query defines the query to check\r\n * @returns the value of the query\r\n */\r\n getQueryResult(engineState: IBaseEnginePublic, query: OcclusionQuery): number;\r\n\r\n /**\r\n * Initiates an occlusion query\r\n * @param algorithmType defines the algorithm to use\r\n * @param query defines the query to use\r\n * @returns the current engine\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/occlusionQueries\r\n */\r\n beginOcclusionQuery(engineState: IBaseEnginePublic, algorithmType: number, query: OcclusionQuery): boolean;\r\n\r\n /**\r\n * Ends an occlusion query\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/occlusionQueries\r\n * @param algorithmType defines the algorithm to use\r\n * @returns the current engine\r\n */\r\n endOcclusionQuery(engineState: IBaseEnginePublic, algorithmType: number): IBaseEnginePublic;\r\n\r\n /**\r\n * Starts a time query (used to measure time spent by the GPU on a specific frame)\r\n * Please note that only one query can be issued at a time\r\n * @returns a time token used to track the time span\r\n */\r\n startTimeQuery(engineState: IBaseEnginePublic): Nullable<_TimeToken>;\r\n\r\n /**\r\n * Ends a time query\r\n * @param token defines the token used to measure the time span\r\n * @returns the time spent (in ns)\r\n */\r\n endTimeQuery(engineState: IBaseEnginePublic, token: _TimeToken): int;\r\n\r\n /**\r\n * Get the performance counter associated with the frame time computation\r\n * @returns the perf counter\r\n */\r\n getGPUFrameTimeCounter(engineState: IBaseEnginePublic): PerfCounter;\r\n\r\n /**\r\n * Enable or disable the GPU frame time capture\r\n * @param value True to enable, false to disable\r\n */\r\n captureGPUFrameTime(engineState: IBaseEnginePublic, value: boolean): void;\r\n\r\n /** @internal */\r\n _createTimeQuery(engineState: IBaseEnginePublic): WebGLQuery;\r\n\r\n /** @internal */\r\n _deleteTimeQuery(engineState: IBaseEnginePublic, query: WebGLQuery): void;\r\n\r\n /** @internal */\r\n _getGlAlgorithmType(engineState: IBaseEnginePublic, algorithmType: number): number;\r\n\r\n /** @internal */\r\n _getTimeQueryResult(engineState: IBaseEnginePublic, query: WebGLQuery): any;\r\n\r\n /** @internal */\r\n _getTimeQueryAvailability(engineState: IBaseEnginePublic, query: WebGLQuery): any;\r\n}\r\n\r\nexport function initQuesryState(engineState: IBaseEnginePublic): void {}\r\n\r\ndeclare module \"core/Meshes/abstractMesh.js\" {\r\n export interface AbstractMesh {\r\n /**\r\n * Backing filed\r\n * @internal\r\n */\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n __occlusionDataStorage: _OcclusionDataStorage;\r\n\r\n /**\r\n * Access property\r\n * @internal\r\n */\r\n _occlusionDataStorage: _OcclusionDataStorage;\r\n\r\n /**\r\n * this number indicates the number of allowed retries before stop the occlusion query, this is useful if the occlusion query is taking long time before to the query result is retrieved, the query result indicates if the object is visible within the scene or not and based on that Babylon.Js engine decides to show or hide the object.\r\n * The default value is -1 which means don't break the query and wait till the result\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/occlusionQueries\r\n */\r\n occlusionRetryCount: number;\r\n\r\n /**\r\n * fes property is responsible for starting the occlusion query within the Mesh or not, fes property is also used to determine what should happen when the occlusionRetryCount is reached. It has supports 3 values:\r\n * * OCCLUSION_TYPE_NONE (Default Value): fes option means no occlusion query within the Mesh.\r\n * * OCCLUSION_TYPE_OPTIMISTIC: fes option is means use occlusion query and if occlusionRetryCount is reached and the query is broken show the mesh.\r\n * * OCCLUSION_TYPE_STRICT: fes option is means use occlusion query and if occlusionRetryCount is reached and the query is broken restore the last state of the mesh occlusion if the mesh was visible then show the mesh if was hidden then hide don't show.\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/occlusionQueries\r\n */\r\n occlusionType: number;\r\n\r\n /**\r\n * fes property determines the type of occlusion query algorithm to run in WebGl, you can use:\r\n * * AbstractMesh.OCCLUSION_ALGORITHM_TYPE_ACCURATE which is mapped to GL_ANY_SAMPLES_PASSED.\r\n * * AbstractMesh.OCCLUSION_ALGORITHM_TYPE_CONSERVATIVE (Default Value) which is mapped to GL_ANY_SAMPLES_PASSED_CONSERVATIVE which is a false positive algorithm that is faster than GL_ANY_SAMPLES_PASSED but less accurate.\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/occlusionQueries\r\n */\r\n occlusionQueryAlgorithmType: number;\r\n\r\n /**\r\n * Gets or sets whether the mesh is occluded or not, it is used also to set the initial state of the mesh to be occluded or not\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/occlusionQueries\r\n */\r\n isOccluded: boolean;\r\n\r\n /**\r\n * Flag to check the progress status of the query\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/occlusionQueries\r\n */\r\n isOcclusionQueryInProgress: boolean;\r\n\r\n /**\r\n * Flag to force rendering the mesh even if occluded\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/occlusionQueries\r\n */\r\n forceRenderingWhenOccluded: boolean;\r\n }\r\n}\r\n\r\nexport const initQueryExtension = (extensionImplementation: IQueryEngineExtension, engineState: IBaseEnginePublic) => {\r\n if (AbstractMesh.prototype._occlusionDataStorage) {\r\n return;\r\n }\r\n Object.defineProperty(AbstractMesh.prototype, \"isOcclusionQueryInProgress\", {\r\n get: function (this: AbstractMesh) {\r\n return this._occlusionDataStorage.isOcclusionQueryInProgress;\r\n },\r\n set: function (this: AbstractMesh, value: boolean) {\r\n this._occlusionDataStorage.isOcclusionQueryInProgress = value;\r\n },\r\n enumerable: false,\r\n configurable: true,\r\n });\r\n\r\n Object.defineProperty(AbstractMesh.prototype, \"_occlusionDataStorage\", {\r\n get: function (this: AbstractMesh) {\r\n if (!this.__occlusionDataStorage) {\r\n this.__occlusionDataStorage = new _OcclusionDataStorage();\r\n }\r\n return this.__occlusionDataStorage;\r\n },\r\n enumerable: false,\r\n configurable: true,\r\n });\r\n\r\n Object.defineProperty(AbstractMesh.prototype, \"isOccluded\", {\r\n get: function (this: AbstractMesh) {\r\n return this._occlusionDataStorage.isOccluded;\r\n },\r\n set: function (this: AbstractMesh, value: boolean) {\r\n this._occlusionDataStorage.isOccluded = value;\r\n },\r\n enumerable: true,\r\n configurable: true,\r\n });\r\n\r\n Object.defineProperty(AbstractMesh.prototype, \"occlusionQueryAlgorithmType\", {\r\n get: function (this: AbstractMesh) {\r\n return this._occlusionDataStorage.occlusionQueryAlgorithmType;\r\n },\r\n set: function (this: AbstractMesh, value: number) {\r\n this._occlusionDataStorage.occlusionQueryAlgorithmType = value;\r\n },\r\n enumerable: true,\r\n configurable: true,\r\n });\r\n\r\n Object.defineProperty(AbstractMesh.prototype, \"occlusionType\", {\r\n get: function (this: AbstractMesh) {\r\n return this._occlusionDataStorage.occlusionType;\r\n },\r\n set: function (this: AbstractMesh, value: number) {\r\n this._occlusionDataStorage.occlusionType = value;\r\n },\r\n enumerable: true,\r\n configurable: true,\r\n });\r\n\r\n Object.defineProperty(AbstractMesh.prototype, \"occlusionRetryCount\", {\r\n get: function (this: AbstractMesh) {\r\n return this._occlusionDataStorage.occlusionRetryCount;\r\n },\r\n set: function (this: AbstractMesh, value: number) {\r\n this._occlusionDataStorage.occlusionRetryCount = value;\r\n },\r\n enumerable: true,\r\n configurable: true,\r\n });\r\n\r\n Object.defineProperty(AbstractMesh.prototype, \"forceRenderingWhenOccluded\", {\r\n get: function (this: AbstractMesh) {\r\n return this._occlusionDataStorage.forceRenderingWhenOccluded;\r\n },\r\n set: function (this: AbstractMesh, value: boolean) {\r\n this._occlusionDataStorage.forceRenderingWhenOccluded = value;\r\n },\r\n enumerable: true,\r\n configurable: true,\r\n });\r\n\r\n // We also need to update AbstractMesh as there is a portion of the code there\r\n AbstractMesh.prototype._checkOcclusionQuery = function () {\r\n const dataStorage = this._occlusionDataStorage;\r\n\r\n if (dataStorage.occlusionType === AbstractMesh.OCCLUSION_TYPE_NONE) {\r\n dataStorage.isOccluded = false;\r\n return false;\r\n }\r\n\r\n const engine = this.getEngine();\r\n\r\n if (!engine.getCaps().supportOcclusionQuery) {\r\n dataStorage.isOccluded = false;\r\n return false;\r\n }\r\n\r\n if (!extensionImplementation.isQueryResultAvailable) {\r\n // Occlusion query where not referenced\r\n dataStorage.isOccluded = false;\r\n return false;\r\n }\r\n\r\n if (this.isOcclusionQueryInProgress && this._occlusionQuery !== null && this._occlusionQuery !== undefined) {\r\n const isOcclusionQueryAvailable = extensionImplementation.isQueryResultAvailable(engineState, this._occlusionQuery);\r\n if (isOcclusionQueryAvailable) {\r\n const occlusionQueryResult = extensionImplementation.getQueryResult(engineState, this._occlusionQuery);\r\n\r\n dataStorage.isOcclusionQueryInProgress = false;\r\n dataStorage.occlusionInternalRetryCounter = 0;\r\n dataStorage.isOccluded = occlusionQueryResult > 0 ? false : true;\r\n } else {\r\n dataStorage.occlusionInternalRetryCounter++;\r\n\r\n if (dataStorage.occlusionRetryCount !== -1 && dataStorage.occlusionInternalRetryCounter > dataStorage.occlusionRetryCount) {\r\n dataStorage.isOcclusionQueryInProgress = false;\r\n dataStorage.occlusionInternalRetryCounter = 0;\r\n\r\n // if optimistic set isOccluded to false regardless of the status of isOccluded. (Render in the current render loop)\r\n // if strict continue the last state of the object.\r\n dataStorage.isOccluded = dataStorage.occlusionType === AbstractMesh.OCCLUSION_TYPE_OPTIMISTIC ? false : dataStorage.isOccluded;\r\n } else {\r\n return dataStorage.occlusionType === AbstractMesh.OCCLUSION_TYPE_OPTIMISTIC ? false : dataStorage.isOccluded;\r\n }\r\n }\r\n }\r\n\r\n const scene = this.getScene();\r\n // TODO this is a mater of types. importing the types would be wrong here, and therefore the scene is being casted to any\r\n if ((scene as any).getBoundingBoxRenderer) {\r\n const occlusionBoundingBoxRenderer = (scene as any).getBoundingBoxRenderer();\r\n\r\n if (this._occlusionQuery === null) {\r\n this._occlusionQuery = extensionImplementation.createQuery(engineState);\r\n }\r\n\r\n if (extensionImplementation.beginOcclusionQuery(engineState, dataStorage.occlusionQueryAlgorithmType, this._occlusionQuery)) {\r\n occlusionBoundingBoxRenderer.renderOcclusionBoundingBox(this);\r\n extensionImplementation.endOcclusionQuery(engineState, dataStorage.occlusionQueryAlgorithmType);\r\n this._occlusionDataStorage.isOcclusionQueryInProgress = true;\r\n }\r\n }\r\n\r\n return dataStorage.isOccluded;\r\n };\r\n};\r\n\r\nconst stateObjects: IQueryExtensionState[] = [];\r\n\r\n/** @internal */\r\nexport const _getExtensionState = (engineState: IBaseEnginePublic): IQueryExtensionState => {\r\n if (!stateObjects[engineState.uniqueId]) {\r\n stateObjects[engineState.uniqueId] = {\r\n _currentNonTimestampToken: null,\r\n _captureGPUFrameTime: false,\r\n _gpuFrameTimeToken: null,\r\n _gpuFrameTime: new PerfCounter(),\r\n _onBeginFrameObserver: null,\r\n _onEndFrameObserver: null,\r\n };\r\n }\r\n return stateObjects[engineState.uniqueId];\r\n};\r\n"]}
@@ -0,0 +1,187 @@
1
+ import type { InternalTexture } from "../../../../Materials/Textures/internalTexture.js";
2
+ import type { Scene } from "../../../../scene.js";
3
+ import type { Nullable } from "../../../../types.js";
4
+ import type { IBaseEnginePublic } from "../../engine.base";
5
+ /**
6
+ * Defines the extension for the engine to create additional internal texture formats
7
+ */
8
+ export interface IRawTextureEngineExtension {
9
+ /**
10
+ * Creates a raw texture
11
+ * @param data defines the data to store in the texture
12
+ * @param width defines the width of the texture
13
+ * @param height defines the height of the texture
14
+ * @param format defines the format of the data
15
+ * @param generateMipMaps defines if the engine should generate the mip levels
16
+ * @param invertY defines if data must be stored with Y axis inverted
17
+ * @param samplingMode defines the required sampling mode (Texture.NEAREST_SAMPLINGMODE by default)
18
+ * @param compression defines the compression used (null by default)
19
+ * @param type defines the type fo the data (Engine.TEXTURETYPE_UNSIGNED_INT by default)
20
+ * @param creationFlags specific flags to use when creating the texture (Constants.TEXTURE_CREATIONFLAG_STORAGE for storage textures, for eg)
21
+ * @param useSRGBBuffer defines if the texture must be loaded in a sRGB GPU buffer (if supported by the GPU).
22
+ * @returns the raw texture inside an InternalTexture
23
+ */
24
+ createRawTexture(engineState: IBaseEnginePublic, data: Nullable<ArrayBufferView>, width: number, height: number, format: number, generateMipMaps: boolean, invertY: boolean, samplingMode: number, compression?: Nullable<string>, type?: number, creationFlags?: number, useSRGBBuffer?: boolean): InternalTexture;
25
+ /**
26
+ * Update a raw texture
27
+ * @param texture defines the texture to update
28
+ * @param data defines the data to store in the texture
29
+ * @param format defines the format of the data
30
+ * @param invertY defines if data must be stored with Y axis inverted
31
+ */
32
+ updateRawTexture(engineState: IBaseEnginePublic, texture: Nullable<InternalTexture>, data: Nullable<ArrayBufferView>, format: number, invertY: boolean): void;
33
+ /**
34
+ * Update a raw texture
35
+ * @param texture defines the texture to update
36
+ * @param data defines the data to store in the texture
37
+ * @param format defines the format of the data
38
+ * @param invertY defines if data must be stored with Y axis inverted
39
+ * @param compression defines the compression used (null by default)
40
+ * @param type defines the type fo the data (Engine.TEXTURETYPE_UNSIGNED_INT by default)
41
+ * @param useSRGBBuffer defines if the texture must be loaded in a sRGB GPU buffer (if supported by the GPU).
42
+ */
43
+ updateRawTexture(engineState: IBaseEnginePublic, texture: Nullable<InternalTexture>, data: Nullable<ArrayBufferView>, format: number, invertY: boolean, compression: Nullable<string>, type: number, useSRGBBuffer: boolean): void;
44
+ /**
45
+ * Creates a new raw cube texture
46
+ * @param data defines the array of data to use to create each face
47
+ * @param size defines the size of the textures
48
+ * @param format defines the format of the data
49
+ * @param type defines the type of the data (like Engine.TEXTURETYPE_UNSIGNED_INT)
50
+ * @param generateMipMaps defines if the engine should generate the mip levels
51
+ * @param invertY defines if data must be stored with Y axis inverted
52
+ * @param samplingMode defines the required sampling mode (like Texture.NEAREST_SAMPLINGMODE)
53
+ * @param compression defines the compression used (null by default)
54
+ * @returns the cube texture as an InternalTexture
55
+ */
56
+ createRawCubeTexture(engineState: IBaseEnginePublic, data: Nullable<ArrayBufferView[]>, size: number, format: number, type: number, generateMipMaps: boolean, invertY: boolean, samplingMode: number, compression?: Nullable<string>): InternalTexture;
57
+ /**
58
+ * Update a raw cube texture
59
+ * @param texture defines the texture to update
60
+ * @param data defines the data to store
61
+ * @param format defines the data format
62
+ * @param type defines the type fo the data (Engine.TEXTURETYPE_UNSIGNED_INT by default)
63
+ * @param invertY defines if data must be stored with Y axis inverted
64
+ */
65
+ updateRawCubeTexture(engineState: IBaseEnginePublic, texture: InternalTexture, data: ArrayBufferView[], format: number, type: number, invertY: boolean): void;
66
+ /**
67
+ * Update a raw cube texture
68
+ * @param texture defines the texture to update
69
+ * @param data defines the data to store
70
+ * @param format defines the data format
71
+ * @param type defines the type fo the data (Engine.TEXTURETYPE_UNSIGNED_INT by default)
72
+ * @param invertY defines if data must be stored with Y axis inverted
73
+ * @param compression defines the compression used (null by default)
74
+ */
75
+ updateRawCubeTexture(engineState: IBaseEnginePublic, texture: InternalTexture, data: ArrayBufferView[], format: number, type: number, invertY: boolean, compression: Nullable<string>): void;
76
+ /**
77
+ * Update a raw cube texture
78
+ * @param texture defines the texture to update
79
+ * @param data defines the data to store
80
+ * @param format defines the data format
81
+ * @param type defines the type fo the data (Engine.TEXTURETYPE_UNSIGNED_INT by default)
82
+ * @param invertY defines if data must be stored with Y axis inverted
83
+ * @param compression defines the compression used (null by default)
84
+ * @param level defines which level of the texture to update
85
+ */
86
+ updateRawCubeTexture(engineState: IBaseEnginePublic, texture: InternalTexture, data: ArrayBufferView[], format: number, type: number, invertY: boolean, compression: Nullable<string>, level: number): void;
87
+ /**
88
+ * Creates a new raw cube texture from a specified url
89
+ * @param url defines the url where the data is located
90
+ * @param scene defines the current scene
91
+ * @param size defines the size of the textures
92
+ * @param format defines the format of the data
93
+ * @param type defines the type fo the data (like Engine.TEXTURETYPE_UNSIGNED_INT)
94
+ * @param noMipmap defines if the engine should avoid generating the mip levels
95
+ * @param callback defines a callback used to extract texture data from loaded data
96
+ * @param mipmapGenerator defines to provide an optional tool to generate mip levels
97
+ * @param onLoad defines a callback called when texture is loaded
98
+ * @param onError defines a callback called if there is an error
99
+ * @returns the cube texture as an InternalTexture
100
+ */
101
+ createRawCubeTextureFromUrl(engineState: IBaseEnginePublic, url: string, scene: Nullable<Scene>, size: number, format: number, type: number, noMipmap: boolean, callback: (ArrayBuffer: ArrayBuffer) => Nullable<ArrayBufferView[]>, mipmapGenerator: Nullable<(faces: ArrayBufferView[]) => ArrayBufferView[][]>, onLoad: Nullable<() => void>, onError: Nullable<(message?: string, exception?: any) => void>): InternalTexture;
102
+ /**
103
+ * Creates a new raw cube texture from a specified url
104
+ * @param url defines the url where the data is located
105
+ * @param scene defines the current scene
106
+ * @param size defines the size of the textures
107
+ * @param format defines the format of the data
108
+ * @param type defines the type fo the data (like Engine.TEXTURETYPE_UNSIGNED_INT)
109
+ * @param noMipmap defines if the engine should avoid generating the mip levels
110
+ * @param callback defines a callback used to extract texture data from loaded data
111
+ * @param mipmapGenerator defines to provide an optional tool to generate mip levels
112
+ * @param onLoad defines a callback called when texture is loaded
113
+ * @param onError defines a callback called if there is an error
114
+ * @param samplingMode defines the required sampling mode (like Texture.NEAREST_SAMPLINGMODE)
115
+ * @param invertY defines if data must be stored with Y axis inverted
116
+ * @returns the cube texture as an InternalTexture
117
+ */
118
+ createRawCubeTextureFromUrl(engineState: IBaseEnginePublic, url: string, scene: Nullable<Scene>, size: number, format: number, type: number, noMipmap: boolean, callback: (ArrayBuffer: ArrayBuffer) => Nullable<ArrayBufferView[]>, mipmapGenerator: Nullable<(faces: ArrayBufferView[]) => ArrayBufferView[][]>, onLoad: Nullable<() => void>, onError: Nullable<(message?: string, exception?: any) => void>, samplingMode: number, invertY: boolean): InternalTexture;
119
+ /**
120
+ * Creates a new raw 3D texture
121
+ * @param data defines the data used to create the texture
122
+ * @param width defines the width of the texture
123
+ * @param height defines the height of the texture
124
+ * @param depth defines the depth of the texture
125
+ * @param format defines the format of the texture
126
+ * @param generateMipMaps defines if the engine must generate mip levels
127
+ * @param invertY defines if data must be stored with Y axis inverted
128
+ * @param samplingMode defines the required sampling mode (like Texture.NEAREST_SAMPLINGMODE)
129
+ * @param compression defines the compressed used (can be null)
130
+ * @param textureType defines the compressed used (can be null)
131
+ * @param creationFlags specific flags to use when creating the texture (Constants.TEXTURE_CREATIONFLAG_STORAGE for storage textures, for eg)
132
+ * @returns a new raw 3D texture (stored in an InternalTexture)
133
+ */
134
+ createRawTexture3D(engineState: IBaseEnginePublic, data: Nullable<ArrayBufferView>, width: number, height: number, depth: number, format: number, generateMipMaps: boolean, invertY: boolean, samplingMode: number, compression?: Nullable<string>, textureType?: number, creationFlags?: number): InternalTexture;
135
+ /**
136
+ * Update a raw 3D texture
137
+ * @param texture defines the texture to update
138
+ * @param data defines the data to store
139
+ * @param format defines the data format
140
+ * @param invertY defines if data must be stored with Y axis inverted
141
+ */
142
+ updateRawTexture3D(engineState: IBaseEnginePublic, texture: InternalTexture, data: Nullable<ArrayBufferView>, format: number, invertY: boolean): void;
143
+ /**
144
+ * Update a raw 3D texture
145
+ * @param texture defines the texture to update
146
+ * @param data defines the data to store
147
+ * @param format defines the data format
148
+ * @param invertY defines if data must be stored with Y axis inverted
149
+ * @param compression defines the used compression (can be null)
150
+ * @param textureType defines the texture Type (Engine.TEXTURETYPE_UNSIGNED_INT, Engine.TEXTURETYPE_FLOAT...)
151
+ */
152
+ updateRawTexture3D(engineState: IBaseEnginePublic, texture: InternalTexture, data: Nullable<ArrayBufferView>, format: number, invertY: boolean, compression: Nullable<string>, textureType: number): void;
153
+ /**
154
+ * Creates a new raw 2D array texture
155
+ * @param data defines the data used to create the texture
156
+ * @param width defines the width of the texture
157
+ * @param height defines the height of the texture
158
+ * @param depth defines the number of layers of the texture
159
+ * @param format defines the format of the texture
160
+ * @param generateMipMaps defines if the engine must generate mip levels
161
+ * @param invertY defines if data must be stored with Y axis inverted
162
+ * @param samplingMode defines the required sampling mode (like Texture.NEAREST_SAMPLINGMODE)
163
+ * @param compression defines the compressed used (can be null)
164
+ * @param textureType defines the compressed used (can be null)
165
+ * @param creationFlags specific flags to use when creating the texture (Constants.TEXTURE_CREATIONFLAG_STORAGE for storage textures, for eg)
166
+ * @returns a new raw 2D array texture (stored in an InternalTexture)
167
+ */
168
+ createRawTexture2DArray(engineState: IBaseEnginePublic, data: Nullable<ArrayBufferView>, width: number, height: number, depth: number, format: number, generateMipMaps: boolean, invertY: boolean, samplingMode: number, compression?: Nullable<string>, textureType?: number, creationFlags?: number): InternalTexture;
169
+ /**
170
+ * Update a raw 2D array texture
171
+ * @param texture defines the texture to update
172
+ * @param data defines the data to store
173
+ * @param format defines the data format
174
+ * @param invertY defines if data must be stored with Y axis inverted
175
+ */
176
+ updateRawTexture2DArray(engineState: IBaseEnginePublic, texture: InternalTexture, data: Nullable<ArrayBufferView>, format: number, invertY: boolean): void;
177
+ /**
178
+ * Update a raw 2D array texture
179
+ * @param texture defines the texture to update
180
+ * @param data defines the data to store
181
+ * @param format defines the data format
182
+ * @param invertY defines if data must be stored with Y axis inverted
183
+ * @param compression defines the used compression (can be null)
184
+ * @param textureType defines the texture Type (Engine.TEXTURETYPE_UNSIGNED_INT, Engine.TEXTURETYPE_FLOAT...)
185
+ */
186
+ updateRawTexture2DArray(engineState: IBaseEnginePublic, texture: InternalTexture, data: Nullable<ArrayBufferView>, format: number, invertY: boolean, compression: Nullable<string>, textureType: number): void;
187
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=engine.rawTexture.base.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"engine.rawTexture.base.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/esm/Engines/Extensions/rawTexture/engine.rawTexture.base.ts"],"names":[],"mappings":"","sourcesContent":["import type { InternalTexture } from \"core/Materials/Textures/internalTexture\";\r\nimport type { Scene } from \"core/scene\";\r\nimport type { Nullable } from \"core/types\";\r\nimport type { IBaseEnginePublic } from \"../../engine.base\";\r\n\r\n/**\r\n * Defines the extension for the engine to create additional internal texture formats\r\n */\r\nexport interface IRawTextureEngineExtension {\r\n /**\r\n * Creates a raw texture\r\n * @param data defines the data to store in the texture\r\n * @param width defines the width of the texture\r\n * @param height defines the height of the texture\r\n * @param format defines the format of the data\r\n * @param generateMipMaps defines if the engine should generate the mip levels\r\n * @param invertY defines if data must be stored with Y axis inverted\r\n * @param samplingMode defines the required sampling mode (Texture.NEAREST_SAMPLINGMODE by default)\r\n * @param compression defines the compression used (null by default)\r\n * @param type defines the type fo the data (Engine.TEXTURETYPE_UNSIGNED_INT by default)\r\n * @param creationFlags specific flags to use when creating the texture (Constants.TEXTURE_CREATIONFLAG_STORAGE for storage textures, for eg)\r\n * @param useSRGBBuffer defines if the texture must be loaded in a sRGB GPU buffer (if supported by the GPU).\r\n * @returns the raw texture inside an InternalTexture\r\n */\r\n createRawTexture(\r\n engineState: IBaseEnginePublic,\r\n data: Nullable<ArrayBufferView>,\r\n width: number,\r\n height: number,\r\n format: number,\r\n generateMipMaps: boolean,\r\n invertY: boolean,\r\n samplingMode: number,\r\n compression?: Nullable<string>,\r\n type?: number,\r\n creationFlags?: number,\r\n useSRGBBuffer?: boolean\r\n ): InternalTexture;\r\n\r\n /**\r\n * Update a raw texture\r\n * @param texture defines the texture to update\r\n * @param data defines the data to store in the texture\r\n * @param format defines the format of the data\r\n * @param invertY defines if data must be stored with Y axis inverted\r\n */\r\n updateRawTexture(engineState: IBaseEnginePublic, texture: Nullable<InternalTexture>, data: Nullable<ArrayBufferView>, format: number, invertY: boolean): void;\r\n\r\n /**\r\n * Update a raw texture\r\n * @param texture defines the texture to update\r\n * @param data defines the data to store in the texture\r\n * @param format defines the format of the data\r\n * @param invertY defines if data must be stored with Y axis inverted\r\n * @param compression defines the compression used (null by default)\r\n * @param type defines the type fo the data (Engine.TEXTURETYPE_UNSIGNED_INT by default)\r\n * @param useSRGBBuffer defines if the texture must be loaded in a sRGB GPU buffer (if supported by the GPU).\r\n */\r\n updateRawTexture(\r\n engineState: IBaseEnginePublic,\r\n texture: Nullable<InternalTexture>,\r\n data: Nullable<ArrayBufferView>,\r\n format: number,\r\n invertY: boolean,\r\n compression: Nullable<string>,\r\n type: number,\r\n useSRGBBuffer: boolean\r\n ): void;\r\n\r\n /**\r\n * Creates a new raw cube texture\r\n * @param data defines the array of data to use to create each face\r\n * @param size defines the size of the textures\r\n * @param format defines the format of the data\r\n * @param type defines the type of the data (like Engine.TEXTURETYPE_UNSIGNED_INT)\r\n * @param generateMipMaps defines if the engine should generate the mip levels\r\n * @param invertY defines if data must be stored with Y axis inverted\r\n * @param samplingMode defines the required sampling mode (like Texture.NEAREST_SAMPLINGMODE)\r\n * @param compression defines the compression used (null by default)\r\n * @returns the cube texture as an InternalTexture\r\n */\r\n createRawCubeTexture(\r\n engineState: IBaseEnginePublic,\r\n data: Nullable<ArrayBufferView[]>,\r\n size: number,\r\n format: number,\r\n type: number,\r\n generateMipMaps: boolean,\r\n invertY: boolean,\r\n samplingMode: number,\r\n compression?: Nullable<string>\r\n ): InternalTexture;\r\n\r\n /**\r\n * Update a raw cube texture\r\n * @param texture defines the texture to update\r\n * @param data defines the data to store\r\n * @param format defines the data format\r\n * @param type defines the type fo the data (Engine.TEXTURETYPE_UNSIGNED_INT by default)\r\n * @param invertY defines if data must be stored with Y axis inverted\r\n */\r\n updateRawCubeTexture(engineState: IBaseEnginePublic, texture: InternalTexture, data: ArrayBufferView[], format: number, type: number, invertY: boolean): void;\r\n\r\n /**\r\n * Update a raw cube texture\r\n * @param texture defines the texture to update\r\n * @param data defines the data to store\r\n * @param format defines the data format\r\n * @param type defines the type fo the data (Engine.TEXTURETYPE_UNSIGNED_INT by default)\r\n * @param invertY defines if data must be stored with Y axis inverted\r\n * @param compression defines the compression used (null by default)\r\n */\r\n updateRawCubeTexture(\r\n engineState: IBaseEnginePublic,\r\n texture: InternalTexture,\r\n data: ArrayBufferView[],\r\n format: number,\r\n type: number,\r\n invertY: boolean,\r\n compression: Nullable<string>\r\n ): void;\r\n\r\n /**\r\n * Update a raw cube texture\r\n * @param texture defines the texture to update\r\n * @param data defines the data to store\r\n * @param format defines the data format\r\n * @param type defines the type fo the data (Engine.TEXTURETYPE_UNSIGNED_INT by default)\r\n * @param invertY defines if data must be stored with Y axis inverted\r\n * @param compression defines the compression used (null by default)\r\n * @param level defines which level of the texture to update\r\n */\r\n updateRawCubeTexture(\r\n engineState: IBaseEnginePublic,\r\n texture: InternalTexture,\r\n data: ArrayBufferView[],\r\n format: number,\r\n type: number,\r\n invertY: boolean,\r\n compression: Nullable<string>,\r\n level: number\r\n ): void;\r\n\r\n /**\r\n * Creates a new raw cube texture from a specified url\r\n * @param url defines the url where the data is located\r\n * @param scene defines the current scene\r\n * @param size defines the size of the textures\r\n * @param format defines the format of the data\r\n * @param type defines the type fo the data (like Engine.TEXTURETYPE_UNSIGNED_INT)\r\n * @param noMipmap defines if the engine should avoid generating the mip levels\r\n * @param callback defines a callback used to extract texture data from loaded data\r\n * @param mipmapGenerator defines to provide an optional tool to generate mip levels\r\n * @param onLoad defines a callback called when texture is loaded\r\n * @param onError defines a callback called if there is an error\r\n * @returns the cube texture as an InternalTexture\r\n */\r\n createRawCubeTextureFromUrl(\r\n engineState: IBaseEnginePublic,\r\n url: string,\r\n scene: Nullable<Scene>,\r\n size: number,\r\n format: number,\r\n type: number,\r\n noMipmap: boolean,\r\n callback: (ArrayBuffer: ArrayBuffer) => Nullable<ArrayBufferView[]>,\r\n mipmapGenerator: Nullable<(faces: ArrayBufferView[]) => ArrayBufferView[][]>,\r\n onLoad: Nullable<() => void>,\r\n onError: Nullable<(message?: string, exception?: any) => void>\r\n ): InternalTexture;\r\n\r\n /**\r\n * Creates a new raw cube texture from a specified url\r\n * @param url defines the url where the data is located\r\n * @param scene defines the current scene\r\n * @param size defines the size of the textures\r\n * @param format defines the format of the data\r\n * @param type defines the type fo the data (like Engine.TEXTURETYPE_UNSIGNED_INT)\r\n * @param noMipmap defines if the engine should avoid generating the mip levels\r\n * @param callback defines a callback used to extract texture data from loaded data\r\n * @param mipmapGenerator defines to provide an optional tool to generate mip levels\r\n * @param onLoad defines a callback called when texture is loaded\r\n * @param onError defines a callback called if there is an error\r\n * @param samplingMode defines the required sampling mode (like Texture.NEAREST_SAMPLINGMODE)\r\n * @param invertY defines if data must be stored with Y axis inverted\r\n * @returns the cube texture as an InternalTexture\r\n */\r\n createRawCubeTextureFromUrl(\r\n engineState: IBaseEnginePublic,\r\n url: string,\r\n scene: Nullable<Scene>,\r\n size: number,\r\n format: number,\r\n type: number,\r\n noMipmap: boolean,\r\n callback: (ArrayBuffer: ArrayBuffer) => Nullable<ArrayBufferView[]>,\r\n mipmapGenerator: Nullable<(faces: ArrayBufferView[]) => ArrayBufferView[][]>,\r\n onLoad: Nullable<() => void>,\r\n onError: Nullable<(message?: string, exception?: any) => void>,\r\n samplingMode: number,\r\n invertY: boolean\r\n ): InternalTexture;\r\n\r\n /**\r\n * Creates a new raw 3D texture\r\n * @param data defines the data used to create the texture\r\n * @param width defines the width of the texture\r\n * @param height defines the height of the texture\r\n * @param depth defines the depth of the texture\r\n * @param format defines the format of the texture\r\n * @param generateMipMaps defines if the engine must generate mip levels\r\n * @param invertY defines if data must be stored with Y axis inverted\r\n * @param samplingMode defines the required sampling mode (like Texture.NEAREST_SAMPLINGMODE)\r\n * @param compression defines the compressed used (can be null)\r\n * @param textureType defines the compressed used (can be null)\r\n * @param creationFlags specific flags to use when creating the texture (Constants.TEXTURE_CREATIONFLAG_STORAGE for storage textures, for eg)\r\n * @returns a new raw 3D texture (stored in an InternalTexture)\r\n */\r\n createRawTexture3D(\r\n engineState: IBaseEnginePublic,\r\n data: Nullable<ArrayBufferView>,\r\n width: number,\r\n height: number,\r\n depth: number,\r\n format: number,\r\n generateMipMaps: boolean,\r\n invertY: boolean,\r\n samplingMode: number,\r\n compression?: Nullable<string>,\r\n textureType?: number,\r\n creationFlags?: number\r\n ): InternalTexture;\r\n\r\n /**\r\n * Update a raw 3D texture\r\n * @param texture defines the texture to update\r\n * @param data defines the data to store\r\n * @param format defines the data format\r\n * @param invertY defines if data must be stored with Y axis inverted\r\n */\r\n updateRawTexture3D(engineState: IBaseEnginePublic, texture: InternalTexture, data: Nullable<ArrayBufferView>, format: number, invertY: boolean): void;\r\n\r\n /**\r\n * Update a raw 3D texture\r\n * @param texture defines the texture to update\r\n * @param data defines the data to store\r\n * @param format defines the data format\r\n * @param invertY defines if data must be stored with Y axis inverted\r\n * @param compression defines the used compression (can be null)\r\n * @param textureType defines the texture Type (Engine.TEXTURETYPE_UNSIGNED_INT, Engine.TEXTURETYPE_FLOAT...)\r\n */\r\n updateRawTexture3D(\r\n engineState: IBaseEnginePublic,\r\n texture: InternalTexture,\r\n data: Nullable<ArrayBufferView>,\r\n format: number,\r\n invertY: boolean,\r\n compression: Nullable<string>,\r\n textureType: number\r\n ): void;\r\n\r\n /**\r\n * Creates a new raw 2D array texture\r\n * @param data defines the data used to create the texture\r\n * @param width defines the width of the texture\r\n * @param height defines the height of the texture\r\n * @param depth defines the number of layers of the texture\r\n * @param format defines the format of the texture\r\n * @param generateMipMaps defines if the engine must generate mip levels\r\n * @param invertY defines if data must be stored with Y axis inverted\r\n * @param samplingMode defines the required sampling mode (like Texture.NEAREST_SAMPLINGMODE)\r\n * @param compression defines the compressed used (can be null)\r\n * @param textureType defines the compressed used (can be null)\r\n * @param creationFlags specific flags to use when creating the texture (Constants.TEXTURE_CREATIONFLAG_STORAGE for storage textures, for eg)\r\n * @returns a new raw 2D array texture (stored in an InternalTexture)\r\n */\r\n createRawTexture2DArray(\r\n engineState: IBaseEnginePublic,\r\n data: Nullable<ArrayBufferView>,\r\n width: number,\r\n height: number,\r\n depth: number,\r\n format: number,\r\n generateMipMaps: boolean,\r\n invertY: boolean,\r\n samplingMode: number,\r\n compression?: Nullable<string>,\r\n textureType?: number,\r\n creationFlags?: number\r\n ): InternalTexture;\r\n\r\n /**\r\n * Update a raw 2D array texture\r\n * @param texture defines the texture to update\r\n * @param data defines the data to store\r\n * @param format defines the data format\r\n * @param invertY defines if data must be stored with Y axis inverted\r\n */\r\n updateRawTexture2DArray(engineState: IBaseEnginePublic, texture: InternalTexture, data: Nullable<ArrayBufferView>, format: number, invertY: boolean): void;\r\n\r\n /**\r\n * Update a raw 2D array texture\r\n * @param texture defines the texture to update\r\n * @param data defines the data to store\r\n * @param format defines the data format\r\n * @param invertY defines if data must be stored with Y axis inverted\r\n * @param compression defines the used compression (can be null)\r\n * @param textureType defines the texture Type (Engine.TEXTURETYPE_UNSIGNED_INT, Engine.TEXTURETYPE_FLOAT...)\r\n */\r\n updateRawTexture2DArray(\r\n engineState: IBaseEnginePublic,\r\n texture: InternalTexture,\r\n data: Nullable<ArrayBufferView>,\r\n format: number,\r\n invertY: boolean,\r\n compression: Nullable<string>,\r\n textureType: number\r\n ): void;\r\n}\r\n"]}
@@ -0,0 +1,9 @@
1
+ import type { InternalTexture } from "../../../../Materials/Textures/internalTexture.js";
2
+ import type { Nullable } from "../../../../types.js";
3
+ import type { IBaseEnginePublic } from "../../engine.base";
4
+ export interface IReadTextureEngineExtension {
5
+ /** @internal */
6
+ _readTexturePixels(engineState: IBaseEnginePublic, texture: InternalTexture, width: number, height: number, faceIndex?: number, level?: number, buffer?: Nullable<ArrayBufferView>, flushRenderer?: boolean, noDataConversion?: boolean, x?: number, y?: number): Promise<ArrayBufferView>;
7
+ /** @internal */
8
+ _readTexturePixelsSync(engineState: IBaseEnginePublic, texture: InternalTexture, width: number, height: number, faceIndex?: number, level?: number, buffer?: Nullable<ArrayBufferView>, flushRenderer?: boolean, noDataConversion?: boolean, x?: number, y?: number): ArrayBufferView;
9
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=readTexture.base.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"readTexture.base.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/esm/Engines/Extensions/readTexture/readTexture.base.ts"],"names":[],"mappings":"","sourcesContent":["import type { InternalTexture } from \"core/Materials/Textures/internalTexture\";\r\nimport type { Nullable } from \"core/types\";\r\nimport type { IBaseEnginePublic } from \"../../engine.base\";\r\n\r\nexport interface IReadTextureEngineExtension {\r\n /** @internal */\r\n _readTexturePixels(\r\n engineState: IBaseEnginePublic,\r\n texture: InternalTexture,\r\n width: number,\r\n height: number,\r\n faceIndex?: number,\r\n level?: number,\r\n buffer?: Nullable<ArrayBufferView>,\r\n flushRenderer?: boolean,\r\n noDataConversion?: boolean,\r\n x?: number,\r\n y?: number\r\n ): Promise<ArrayBufferView>;\r\n\r\n /** @internal */\r\n _readTexturePixelsSync(\r\n engineState: IBaseEnginePublic,\r\n texture: InternalTexture,\r\n width: number,\r\n height: number,\r\n faceIndex?: number,\r\n level?: number,\r\n buffer?: Nullable<ArrayBufferView>,\r\n flushRenderer?: boolean,\r\n noDataConversion?: boolean,\r\n x?: number,\r\n y?: number\r\n ): ArrayBufferView;\r\n}\r\n"]}