@babylonjs/core 8.8.0 → 8.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (342) hide show
  1. package/Actions/actionManager.js +2 -0
  2. package/Actions/actionManager.js.map +1 -1
  3. package/Animations/animatable.core.js +1 -1
  4. package/Animations/animatable.core.js.map +1 -1
  5. package/Animations/animation.js +4 -2
  6. package/Animations/animation.js.map +1 -1
  7. package/Audio/audioEngine.d.ts +1 -1
  8. package/Audio/audioEngine.js +20 -10
  9. package/Audio/audioEngine.js.map +1 -1
  10. package/Audio/audioSceneComponent.js +2 -0
  11. package/Audio/audioSceneComponent.js.map +1 -1
  12. package/Audio/sound.js +2 -0
  13. package/Audio/sound.js.map +1 -1
  14. package/AudioV2/abstractAudio/audioEngineV2.js +8 -1
  15. package/AudioV2/abstractAudio/audioEngineV2.js.map +1 -1
  16. package/AudioV2/abstractAudio/streamingSound.js +3 -1
  17. package/AudioV2/abstractAudio/streamingSound.js.map +1 -1
  18. package/AudioV2/abstractAudio/subNodes/abstractAudioSubGraph.js +6 -2
  19. package/AudioV2/abstractAudio/subNodes/abstractAudioSubGraph.js.map +1 -1
  20. package/AudioV2/abstractAudio/subProperties/audioAnalyzer.js +3 -0
  21. package/AudioV2/abstractAudio/subProperties/audioAnalyzer.js.map +1 -1
  22. package/AudioV2/abstractAudio/subProperties/spatialAudio.js +1 -0
  23. package/AudioV2/abstractAudio/subProperties/spatialAudio.js.map +1 -1
  24. package/AudioV2/webAudio/webAudioEngine.js +5 -1
  25. package/AudioV2/webAudio/webAudioEngine.js.map +1 -1
  26. package/AudioV2/webAudio/webAudioStaticSound.js +2 -0
  27. package/AudioV2/webAudio/webAudioStaticSound.js.map +1 -1
  28. package/AudioV2/webAudio/webAudioStreamingSound.js +3 -0
  29. package/AudioV2/webAudio/webAudioStreamingSound.js.map +1 -1
  30. package/AudioV2/webAudio/webAudioUnmuteUI.js +1 -0
  31. package/AudioV2/webAudio/webAudioUnmuteUI.js.map +1 -1
  32. package/BakedVertexAnimation/vertexAnimationBaker.d.ts +1 -0
  33. package/BakedVertexAnimation/vertexAnimationBaker.js +3 -1
  34. package/BakedVertexAnimation/vertexAnimationBaker.js.map +1 -1
  35. package/Buffers/buffer.nonFloatVertexBuffers.js +1 -0
  36. package/Buffers/buffer.nonFloatVertexBuffers.js.map +1 -1
  37. package/Buffers/storageBuffer.js +1 -1
  38. package/Buffers/storageBuffer.js.map +1 -1
  39. package/Cameras/Inputs/arcRotateCameraVRDeviceOrientationInput.js +2 -0
  40. package/Cameras/Inputs/arcRotateCameraVRDeviceOrientationInput.js.map +1 -1
  41. package/Cameras/Inputs/freeCameraDeviceOrientationInput.js +6 -1
  42. package/Cameras/Inputs/freeCameraDeviceOrientationInput.js.map +1 -1
  43. package/Cameras/VR/vrExperienceHelper.js +2 -0
  44. package/Cameras/VR/vrExperienceHelper.js.map +1 -1
  45. package/Collisions/gpuPicker.js +9 -6
  46. package/Collisions/gpuPicker.js.map +1 -1
  47. package/Compute/computeShader.js +1 -1
  48. package/Compute/computeShader.js.map +1 -1
  49. package/Culling/Helper/boundingInfoHelper.js +3 -3
  50. package/Culling/Helper/boundingInfoHelper.js.map +1 -1
  51. package/Culling/Helper/computeShaderBoundingHelper.js +3 -1
  52. package/Culling/Helper/computeShaderBoundingHelper.js.map +1 -1
  53. package/Culling/Helper/transformFeedbackBoundingHelper.js +3 -0
  54. package/Culling/Helper/transformFeedbackBoundingHelper.js.map +1 -1
  55. package/Debug/debugLayer.js +1 -1
  56. package/Debug/debugLayer.js.map +1 -1
  57. package/Engines/AbstractEngine/abstractEngine.cubeTexture.js +1 -0
  58. package/Engines/AbstractEngine/abstractEngine.cubeTexture.js.map +1 -1
  59. package/Engines/Extensions/engine.prefilteredCubeTexture.js +1 -0
  60. package/Engines/Extensions/engine.prefilteredCubeTexture.js.map +1 -1
  61. package/Engines/Extensions/engine.readTexture.js +1 -0
  62. package/Engines/Extensions/engine.readTexture.js.map +1 -1
  63. package/Engines/WebGPU/Extensions/engine.computeShader.js +1 -0
  64. package/Engines/WebGPU/Extensions/engine.computeShader.js.map +1 -1
  65. package/Engines/WebGPU/Extensions/engine.readTexture.js +1 -0
  66. package/Engines/WebGPU/Extensions/engine.readTexture.js.map +1 -1
  67. package/Engines/WebGPU/Extensions/engine.videoTexture.js +2 -0
  68. package/Engines/WebGPU/Extensions/engine.videoTexture.js.map +1 -1
  69. package/Engines/WebGPU/webgpuBufferManager.js +3 -1
  70. package/Engines/WebGPU/webgpuBufferManager.js.map +1 -1
  71. package/Engines/WebGPU/webgpuOcclusionQuery.js +1 -0
  72. package/Engines/WebGPU/webgpuOcclusionQuery.js.map +1 -1
  73. package/Engines/WebGPU/webgpuQuerySet.js +15 -9
  74. package/Engines/WebGPU/webgpuQuerySet.js.map +1 -1
  75. package/Engines/WebGPU/webgpuTextureManager.js +1 -0
  76. package/Engines/WebGPU/webgpuTextureManager.js.map +1 -1
  77. package/Engines/WebGPU/webgpuTimestampQuery.js +4 -2
  78. package/Engines/WebGPU/webgpuTimestampQuery.js.map +1 -1
  79. package/Engines/WebGPU/webgpuTintWASM.js +1 -0
  80. package/Engines/WebGPU/webgpuTintWASM.js.map +1 -1
  81. package/Engines/abstractEngine.js +5 -2
  82. package/Engines/abstractEngine.js.map +1 -1
  83. package/Engines/engine.common.js +7 -1
  84. package/Engines/engine.common.js.map +1 -1
  85. package/Engines/engine.js +5 -3
  86. package/Engines/engine.js.map +1 -1
  87. package/Engines/engineFactory.js +1 -1
  88. package/Engines/engineFactory.js.map +1 -1
  89. package/Engines/nativeEngine.js +19 -11
  90. package/Engines/nativeEngine.js.map +1 -1
  91. package/Engines/webgpuEngine.js +30 -11
  92. package/Engines/webgpuEngine.js.map +1 -1
  93. package/FlowGraph/flowGraphParser.js +2 -2
  94. package/FlowGraph/flowGraphParser.js.map +1 -1
  95. package/FrameGraph/Node/nodeRenderGraph.js +5 -1
  96. package/FrameGraph/Node/nodeRenderGraph.js.map +1 -1
  97. package/FrameGraph/Node/nodeRenderGraphBlock.js +1 -1
  98. package/FrameGraph/Node/nodeRenderGraphBlock.js.map +1 -1
  99. package/FrameGraph/frameGraph.js +1 -1
  100. package/FrameGraph/frameGraph.js.map +1 -1
  101. package/Helpers/sceneHelpers.js +1 -3
  102. package/Helpers/sceneHelpers.js.map +1 -1
  103. package/Helpers/videoDome.js +1 -0
  104. package/Helpers/videoDome.js.map +1 -1
  105. package/Layers/thinEffectLayer.js +1 -0
  106. package/Layers/thinEffectLayer.js.map +1 -1
  107. package/LensFlares/lensFlareSystem.js +1 -0
  108. package/LensFlares/lensFlareSystem.js.map +1 -1
  109. package/Lights/Shadows/shadowGenerator.js +3 -2
  110. package/Lights/Shadows/shadowGenerator.js.map +1 -1
  111. package/Lights/areaLight.js +2 -0
  112. package/Lights/areaLight.js.map +1 -1
  113. package/Loading/sceneLoader.js +56 -22
  114. package/Loading/sceneLoader.js.map +1 -1
  115. package/Materials/GaussianSplatting/gaussianSplattingMaterial.d.ts +15 -1
  116. package/Materials/GaussianSplatting/gaussianSplattingMaterial.js +34 -7
  117. package/Materials/GaussianSplatting/gaussianSplattingMaterial.js.map +1 -1
  118. package/Materials/Node/Blocks/Dual/clipPlanesBlock.js +1 -0
  119. package/Materials/Node/Blocks/Dual/clipPlanesBlock.js.map +1 -1
  120. package/Materials/Node/Blocks/Dual/fogBlock.js +1 -0
  121. package/Materials/Node/Blocks/Dual/fogBlock.js.map +1 -1
  122. package/Materials/Node/Blocks/Dual/lightBlock.js +1 -0
  123. package/Materials/Node/Blocks/Dual/lightBlock.js.map +1 -1
  124. package/Materials/Node/Blocks/Dual/reflectionTextureBaseBlock.js +1 -0
  125. package/Materials/Node/Blocks/Dual/reflectionTextureBaseBlock.js.map +1 -1
  126. package/Materials/Node/Blocks/Fragment/imageProcessingBlock.js +1 -0
  127. package/Materials/Node/Blocks/Fragment/imageProcessingBlock.js.map +1 -1
  128. package/Materials/Node/Blocks/Fragment/perturbNormalBlock.js +1 -0
  129. package/Materials/Node/Blocks/Fragment/perturbNormalBlock.js.map +1 -1
  130. package/Materials/Node/Blocks/Fragment/shadowMapBlock.js +1 -0
  131. package/Materials/Node/Blocks/Fragment/shadowMapBlock.js.map +1 -1
  132. package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.js +1 -0
  133. package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.js.map +1 -1
  134. package/Materials/Node/Blocks/Vertex/bonesBlock.js +1 -0
  135. package/Materials/Node/Blocks/Vertex/bonesBlock.js.map +1 -1
  136. package/Materials/Node/Blocks/Vertex/morphTargetsBlock.js +1 -0
  137. package/Materials/Node/Blocks/Vertex/morphTargetsBlock.js.map +1 -1
  138. package/Materials/Node/nodeMaterial.js +11 -3
  139. package/Materials/Node/nodeMaterial.js.map +1 -1
  140. package/Materials/Node/nodeMaterialBuildState.js +1 -0
  141. package/Materials/Node/nodeMaterialBuildState.js.map +1 -1
  142. package/Materials/Textures/Filtering/hdrIrradianceFiltering.js +1 -0
  143. package/Materials/Textures/Filtering/hdrIrradianceFiltering.js.map +1 -1
  144. package/Materials/Textures/Loaders/basisTextureLoader.js +4 -0
  145. package/Materials/Textures/Loaders/basisTextureLoader.js.map +1 -1
  146. package/Materials/Textures/Loaders/envTextureLoader.js +1 -0
  147. package/Materials/Textures/Loaders/envTextureLoader.js.map +1 -1
  148. package/Materials/Textures/Loaders/exrTextureLoader.js +2 -0
  149. package/Materials/Textures/Loaders/exrTextureLoader.js.map +1 -1
  150. package/Materials/Textures/Loaders/ktxTextureLoader.js +1 -0
  151. package/Materials/Textures/Loaders/ktxTextureLoader.js.map +1 -1
  152. package/Materials/Textures/Loaders/textureLoaderManager.js +9 -9
  153. package/Materials/Textures/Loaders/textureLoaderManager.js.map +1 -1
  154. package/Materials/Textures/Packer/packer.js +3 -1
  155. package/Materials/Textures/Packer/packer.js.map +1 -1
  156. package/Materials/Textures/Procedurals/proceduralTexture.js +1 -0
  157. package/Materials/Textures/Procedurals/proceduralTexture.js.map +1 -1
  158. package/Materials/Textures/baseTexture.polynomial.js +1 -0
  159. package/Materials/Textures/baseTexture.polynomial.js.map +1 -1
  160. package/Materials/Textures/hdrCubeTexture.js +1 -0
  161. package/Materials/Textures/hdrCubeTexture.js.map +1 -1
  162. package/Materials/Textures/internalTexture.js +1 -0
  163. package/Materials/Textures/internalTexture.js.map +1 -1
  164. package/Materials/Textures/rawCubeTexture.js +3 -0
  165. package/Materials/Textures/rawCubeTexture.js.map +1 -1
  166. package/Materials/Textures/renderTargetTexture.js +2 -0
  167. package/Materials/Textures/renderTargetTexture.js.map +1 -1
  168. package/Materials/Textures/videoTexture.js +6 -0
  169. package/Materials/Textures/videoTexture.js.map +1 -1
  170. package/Materials/effect.js +2 -1
  171. package/Materials/effect.js.map +1 -1
  172. package/Materials/effect.webgl.functions.js +3 -1
  173. package/Materials/effect.webgl.functions.js.map +1 -1
  174. package/Materials/effectRenderer.js +1 -0
  175. package/Materials/effectRenderer.js.map +1 -1
  176. package/Materials/material.js +2 -1
  177. package/Materials/material.js.map +1 -1
  178. package/Materials/shaderMaterial.js +4 -2
  179. package/Materials/shaderMaterial.js.map +1 -1
  180. package/Meshes/Compression/dracoCodec.js +5 -1
  181. package/Meshes/Compression/dracoCodec.js.map +1 -1
  182. package/Meshes/Compression/dracoCompression.js +4 -3
  183. package/Meshes/Compression/dracoCompression.js.map +1 -1
  184. package/Meshes/Compression/dracoCompressionWorker.js +5 -2
  185. package/Meshes/Compression/dracoCompressionWorker.js.map +1 -1
  186. package/Meshes/Compression/dracoDecoder.js +5 -1
  187. package/Meshes/Compression/dracoDecoder.js.map +1 -1
  188. package/Meshes/Compression/dracoEncoder.js +3 -2
  189. package/Meshes/Compression/dracoEncoder.js.map +1 -1
  190. package/Meshes/Compression/meshoptCompression.js +18 -18
  191. package/Meshes/Compression/meshoptCompression.js.map +1 -1
  192. package/Meshes/GaussianSplatting/gaussianSplattingMesh.js +14 -15
  193. package/Meshes/GaussianSplatting/gaussianSplattingMesh.js.map +1 -1
  194. package/Meshes/Node/Blocks/Textures/geometryTextureBlock.js +20 -10
  195. package/Meshes/Node/Blocks/Textures/geometryTextureBlock.js.map +1 -1
  196. package/Meshes/Node/Blocks/booleanGeometryBlock.js +1 -0
  197. package/Meshes/Node/Blocks/booleanGeometryBlock.js.map +1 -1
  198. package/Meshes/Node/nodeGeometry.js +5 -1
  199. package/Meshes/Node/nodeGeometry.js.map +1 -1
  200. package/Meshes/mesh.js +2 -2
  201. package/Meshes/mesh.js.map +1 -1
  202. package/Meshes/meshUVSpaceRenderer.js +1 -0
  203. package/Meshes/meshUVSpaceRenderer.js.map +1 -1
  204. package/Misc/HighDynamicRange/cubemapToSphericalPolynomial.js +1 -0
  205. package/Misc/HighDynamicRange/cubemapToSphericalPolynomial.js.map +1 -1
  206. package/Misc/assetsManager.js +2 -1
  207. package/Misc/assetsManager.js.map +1 -1
  208. package/Misc/asyncLock.js +5 -2
  209. package/Misc/asyncLock.js.map +1 -1
  210. package/Misc/basis.js +9 -2
  211. package/Misc/basis.js.map +1 -1
  212. package/Misc/basisWorker.js +3 -1
  213. package/Misc/basisWorker.js.map +1 -1
  214. package/Misc/copyTextureToTexture.js +1 -0
  215. package/Misc/copyTextureToTexture.js.map +1 -1
  216. package/Misc/coroutine.js +2 -1
  217. package/Misc/coroutine.js.map +1 -1
  218. package/Misc/dataReader.js +3 -4
  219. package/Misc/dataReader.js.map +1 -1
  220. package/Misc/dumpTools.js +7 -1
  221. package/Misc/dumpTools.js.map +1 -1
  222. package/Misc/environmentTextureTools.d.ts +0 -2
  223. package/Misc/environmentTextureTools.js +20 -7
  224. package/Misc/environmentTextureTools.js.map +1 -1
  225. package/Misc/equirectangularCapture.js +2 -1
  226. package/Misc/equirectangularCapture.js.map +1 -1
  227. package/Misc/fileTools.js +2 -0
  228. package/Misc/fileTools.js.map +1 -1
  229. package/Misc/filesInput.js +5 -1
  230. package/Misc/filesInput.js.map +1 -1
  231. package/Misc/khronosTextureContainer2.js +10 -3
  232. package/Misc/khronosTextureContainer2.js.map +1 -1
  233. package/Misc/khronosTextureContainer2Worker.js +4 -1
  234. package/Misc/khronosTextureContainer2Worker.js.map +1 -1
  235. package/Misc/minMaxReducer.js +1 -0
  236. package/Misc/minMaxReducer.js.map +1 -1
  237. package/Misc/observable.extensions.js +3 -1
  238. package/Misc/observable.extensions.js.map +1 -1
  239. package/Misc/observable.js +2 -0
  240. package/Misc/observable.js.map +1 -1
  241. package/Misc/observableCoroutine.js +1 -0
  242. package/Misc/observableCoroutine.js.map +1 -1
  243. package/Misc/reflector.js +1 -0
  244. package/Misc/reflector.js.map +1 -1
  245. package/Misc/rgbdTextureTools.js +2 -1
  246. package/Misc/rgbdTextureTools.js.map +1 -1
  247. package/Misc/sceneSerializer.js +2 -2
  248. package/Misc/sceneSerializer.js.map +1 -1
  249. package/Misc/screenshotTools.js +9 -4
  250. package/Misc/screenshotTools.js.map +1 -1
  251. package/Misc/textureTools.js +2 -0
  252. package/Misc/textureTools.js.map +1 -1
  253. package/Misc/tools.internals.js +2 -1
  254. package/Misc/tools.internals.js.map +1 -1
  255. package/Misc/tools.js +9 -3
  256. package/Misc/tools.js.map +1 -1
  257. package/Misc/videoRecorder.js +1 -0
  258. package/Misc/videoRecorder.js.map +1 -1
  259. package/Misc/webRequest.fetch.js +2 -1
  260. package/Misc/webRequest.fetch.js.map +1 -1
  261. package/Misc/workerPool.js +3 -0
  262. package/Misc/workerPool.js.map +1 -1
  263. package/Particles/flowMap.js +1 -1
  264. package/Particles/flowMap.js.map +1 -1
  265. package/Particles/particleHelper.js +7 -0
  266. package/Particles/particleHelper.js.map +1 -1
  267. package/Particles/pointsCloudSystem.js +7 -7
  268. package/Particles/pointsCloudSystem.js.map +1 -1
  269. package/Particles/thinParticleSystem.js +2 -0
  270. package/Particles/thinParticleSystem.js.map +1 -1
  271. package/Physics/physicsHelper.js +2 -2
  272. package/Physics/physicsHelper.js.map +1 -1
  273. package/Physics/v1/Plugins/oimoJSPlugin.js +1 -1
  274. package/Physics/v1/Plugins/oimoJSPlugin.js.map +1 -1
  275. package/PostProcesses/RenderPipeline/Pipelines/standardRenderingPipeline.js +1 -0
  276. package/PostProcesses/RenderPipeline/Pipelines/standardRenderingPipeline.js.map +1 -1
  277. package/Rendering/GlobalIllumination/giRSMManager.js +1 -0
  278. package/Rendering/GlobalIllumination/giRSMManager.js.map +1 -1
  279. package/Rendering/IBLShadows/iblShadowsVoxelRenderer.js +1 -0
  280. package/Rendering/IBLShadows/iblShadowsVoxelRenderer.js.map +1 -1
  281. package/Rendering/depthRenderer.js +1 -0
  282. package/Rendering/depthRenderer.js.map +1 -1
  283. package/Rendering/fluidRenderer/fluidRenderingTargetRenderer.js +3 -1
  284. package/Rendering/fluidRenderer/fluidRenderingTargetRenderer.js.map +1 -1
  285. package/Rendering/fluidRenderer/fluidRenderingTextures.js.map +1 -1
  286. package/Rendering/geometryBufferRenderer.js +1 -0
  287. package/Rendering/geometryBufferRenderer.js.map +1 -1
  288. package/Rendering/iblCdfGenerator.js +4 -1
  289. package/Rendering/iblCdfGenerator.js.map +1 -1
  290. package/Sprites/spriteManager.js +5 -1
  291. package/Sprites/spriteManager.js.map +1 -1
  292. package/Sprites/spriteRenderer.js +1 -0
  293. package/Sprites/spriteRenderer.js.map +1 -1
  294. package/XR/features/WebXRAnchorSystem.js +4 -3
  295. package/XR/features/WebXRAnchorSystem.js.map +1 -1
  296. package/XR/features/WebXRDepthSensing.js +1 -1
  297. package/XR/features/WebXRDepthSensing.js.map +1 -1
  298. package/XR/features/WebXRHandTracking.js +4 -1
  299. package/XR/features/WebXRHandTracking.js.map +1 -1
  300. package/XR/features/WebXRHitTest.js +4 -1
  301. package/XR/features/WebXRHitTest.js.map +1 -1
  302. package/XR/features/WebXRHitTestLegacy.js +6 -5
  303. package/XR/features/WebXRHitTestLegacy.js.map +1 -1
  304. package/XR/features/WebXRImageTracking.js +2 -1
  305. package/XR/features/WebXRImageTracking.js.map +1 -1
  306. package/XR/features/WebXRLightEstimation.js +3 -0
  307. package/XR/features/WebXRLightEstimation.js.map +1 -1
  308. package/XR/features/WebXRNearInteraction.js +2 -0
  309. package/XR/features/WebXRNearInteraction.js.map +1 -1
  310. package/XR/features/WebXRPlaneDetector.js +2 -2
  311. package/XR/features/WebXRPlaneDetector.js.map +1 -1
  312. package/XR/motionController/webXRAbstractMotionController.js +3 -2
  313. package/XR/motionController/webXRAbstractMotionController.js.map +1 -1
  314. package/XR/motionController/webXRMicrosoftMixedRealityController.js +6 -6
  315. package/XR/motionController/webXRMicrosoftMixedRealityController.js.map +1 -1
  316. package/XR/motionController/webXRMotionControllerManager.js +15 -9
  317. package/XR/motionController/webXRMotionControllerManager.js.map +1 -1
  318. package/XR/motionController/webXRProfiledMotionController.js +1 -1
  319. package/XR/motionController/webXRProfiledMotionController.js.map +1 -1
  320. package/XR/native/nativeXRFrame.js +1 -0
  321. package/XR/native/nativeXRFrame.js.map +1 -1
  322. package/XR/webXRDefaultExperience.js +10 -12
  323. package/XR/webXRDefaultExperience.js.map +1 -1
  324. package/XR/webXREnterExitUI.js +2 -1
  325. package/XR/webXREnterExitUI.js.map +1 -1
  326. package/XR/webXRExperienceHelper.js +5 -2
  327. package/XR/webXRExperienceHelper.js.map +1 -1
  328. package/XR/webXRFeaturesManager.js +1 -0
  329. package/XR/webXRFeaturesManager.js.map +1 -1
  330. package/XR/webXRInput.js +1 -0
  331. package/XR/webXRInput.js.map +1 -1
  332. package/XR/webXRInputSource.js +2 -0
  333. package/XR/webXRInputSource.js.map +1 -1
  334. package/XR/webXRManagedOutputCanvas.js +5 -1
  335. package/XR/webXRManagedOutputCanvas.js.map +1 -1
  336. package/XR/webXRSessionManager.js +56 -60
  337. package/XR/webXRSessionManager.js.map +1 -1
  338. package/assetContainer.js +28 -28
  339. package/assetContainer.js.map +1 -1
  340. package/package.json +1 -1
  341. package/scene.js +5 -4
  342. package/scene.js.map +1 -1
@@ -20,6 +20,7 @@ function CreateSceneLTCTextures(scene) {
20
20
  scene._ltcTextures.LTC2.wrapV = Texture.CLAMP_ADDRESSMODE;
21
21
  scene.useDelayedTextureLoading = useDelayedTextureLoading;
22
22
  DecodeLTCTextureDataAsync()
23
+ // eslint-disable-next-line github/no-then
23
24
  .then((textureData) => {
24
25
  if (scene._ltcTextures) {
25
26
  const ltc1 = scene._ltcTextures?.LTC1;
@@ -32,6 +33,7 @@ function CreateSceneLTCTextures(scene) {
32
33
  });
33
34
  }
34
35
  })
36
+ // eslint-disable-next-line github/no-then
35
37
  .catch((error) => {
36
38
  Logger.Error(`Area Light fail to get LTC textures data. Error: ${error}`);
37
39
  });
@@ -1 +1 @@
1
- {"version":3,"file":"areaLight.js","sourceRoot":"","sources":["../../../../dev/core/src/Lights/areaLight.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,4CAA2C;AAChE,OAAO,EAAE,OAAO,EAAE,yCAAwC;AAC1D,OAAO,EAAE,SAAS,EAAE,gCAA+B;AACnD,OAAO,EAAE,KAAK,EAAE,mBAA0B;AAG1C,OAAO,EAAE,yBAAyB,EAAE,gCAAuC;AAE3E,OAAO,EAAE,MAAM,EAAE,0BAAyB;AAY1C,SAAS,sBAAsB,CAAC,KAAY;IACxC,MAAM,wBAAwB,GAAG,KAAK,CAAC,wBAAwB,CAAC;IAChE,KAAK,CAAC,wBAAwB,GAAG,KAAK,CAAC;IAEvC,MAAM,aAAa,GAAG,KAAK,CAAC,sBAAsB,CAAC;IACnD,KAAK,CAAC,sBAAsB,GAAG,KAAK,CAAC;IAErC,KAAK,CAAC,YAAY,GAAG;QACjB,IAAI,EAAE,UAAU,CAAC,iBAAiB,CAAC,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,KAAK,CAAC,SAAS,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,CAAC,qBAAqB,EAAE,SAAS,CAAC,sBAAsB,EAAE,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC;QACpK,IAAI,EAAE,UAAU,CAAC,iBAAiB,CA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ent":["import type { Vector3 } from \"core/Maths/math.vector\";\r\nimport { RawTexture } from \"core/Materials/Textures/rawTexture\";\r\nimport { Texture } from \"core/Materials/Textures/texture\";\r\nimport { Constants } from \"core/Engines/constants\";\r\nimport { Light } from \"core/Lights/light\";\r\nimport type { Effect } from \"core/Materials/effect\";\r\nimport type { ILTCTextures } from \"core/Lights/LTC/ltcTextureTool\";\r\nimport { DecodeLTCTextureDataAsync } from \"core/Lights/LTC/ltcTextureTool\";\r\nimport type { Scene } from \"core/scene\";\r\nimport { Logger } from \"core/Misc/logger\";\r\n\r\ndeclare module \"../scene\" {\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n export interface Scene {\r\n /**\r\n * @internal\r\n */\r\n _ltcTextures?: ILTCTextures;\r\n }\r\n}\r\n\r\nfunction CreateSceneLTCTextures(scene: Scene): void {\r\n const useDelayedTextureLoading = scene.useDelayedTextureLoading;\r\n scene.useDelayedTextureLoading = false;\r\n\r\n const previousState = scene._blockEntityCollection;\r\n scene._blockEntityCollection = false;\r\n\r\n scene._ltcTextures = {\r\n LTC1: RawTexture.CreateRGBATexture(null, 64, 64, scene.getEngine(), false, false, Constants.TEXTURE_LINEAR_LINEAR, Constants.TEXTURETYPE_HALF_FLOAT, 0, false, true),\r\n LTC2: RawTexture.CreateRGBATexture(null, 64, 64, scene.getEngine(), false, false, Constants.TEXTURE_LINEAR_LINEAR, Constants.TEXTURETYPE_HALF_FLOAT, 0, false, true),\r\n };\r\n\r\n scene._blockEntityCollection = previousState;\r\n\r\n scene._ltcTextures.LTC1.wrapU = Texture.CLAMP_ADDRESSMODE;\r\n scene._ltcTextures.LTC1.wrapV = Texture.CLAMP_ADDRESSMODE;\r\n\r\n scene._ltcTextures.LTC2.wrapU = Texture.CLAMP_ADDRESSMODE;\r\n scene._ltcTextures.LTC2.wrapV = Texture.CLAMP_ADDRESSMODE;\r\n\r\n scene.useDelayedTextureLoading = useDelayedTextureLoading;\r\n\r\n DecodeLTCTextureDataAsync()\r\n .then((textureData) => {\r\n if (scene._ltcTextures) {\r\n const ltc1 = scene._ltcTextures?.LTC1 as RawTexture;\r\n ltc1.update(textureData[0]);\r\n\r\n const ltc2 = scene._ltcTextures?.LTC2 as RawTexture;\r\n ltc2.update(textureData[1]);\r\n\r\n scene.onDisposeObservable.addOnce(() => {\r\n scene._ltcTextures?.LTC1.dispose();\r\n scene._ltcTextures?.LTC2.dispose();\r\n });\r\n }\r\n })\r\n .catch((error) => {\r\n Logger.Error(`Area Light fail to get LTC textures data. Error: ${error}`);\r\n });\r\n}\r\n\r\n/**\r\n * Abstract Area Light class that servers as parent for all Area Lights implementations.\r\n * The light is emitted from the area in the -Z direction.\r\n */\r\nexport abstract class AreaLight extends Light {\r\n /**\r\n * Area Light position.\r\n */\r\n public position: Vector3;\r\n\r\n /**\r\n * Creates a area light object.\r\n * Documentation : https://doc.babylonjs.com/features/featuresDeepDive/lights/lights_introduction\r\n * @param name The friendly name of the light\r\n * @param position The position of the area light.\r\n * @param scene The scene the light belongs to\r\n */\r\n constructor(name: string, position: Vector3, scene?: Scene) {\r\n super(name, scene);\r\n this.position = position;\r\n\r\n if (!this._scene._ltcTextures) {\r\n CreateSceneLTCTextures(this._scene);\r\n }\r\n }\r\n\r\n public override transferTexturesToEffect(effect: Effect): Light {\r\n if (this._scene._ltcTextures) {\r\n effect.setTexture(\"areaLightsLTC1Sampler\", this._scene._ltcTextures.LTC1);\r\n effect.setTexture(\"areaLightsLTC2Sampler\", this._scene._ltcTextures.LTC2);\r\n }\r\n return this;\r\n }\r\n\r\n /**\r\n * Prepares the list of defines specific to the light type.\r\n * @param defines the list of defines\r\n * @param lightIndex defines the index of the light for the effect\r\n */\r\n public prepareLightSpecificDefines(defines: any, lightIndex: number): void {\r\n defines[\"AREALIGHT\" + lightIndex] = true;\r\n defines[\"AREALIGHTUSED\"] = true;\r\n }\r\n\r\n public override _isReady(): boolean {\r\n if (this._scene._ltcTextures) {\r\n return this._scene._ltcTextures.LTC1.isReady() && this._scene._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AAG,QAAQ,CAAC;QAEzB,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,CAAC;YAC5B,sBAAsB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACxC,CAAC;IACL,CAAC;IAEe,wBAAwB,CAAC,MAAc;QACnD,IAAI,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,CAAC;YAC3B,MAAM,CAAC,UAAU,CAAC,uBAAuB,EAAE,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;YAC1E,MAAM,CAAC,UAAU,CAAC,uBAAuB,EAAE,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;QAC9E,CAAC;QACD,OAAO,IAAI,CAAC;IAChB,CAAC;IAED;;;;OAIG;IACI,2BAA2B,CAAC,OAAY,EAAE,UAAkB;QAC/D,OAAO,CAAC,WAAW,GAAG,UAAU,CAAC,GAAG,IAAI,CAAC;QACzC,OAAO,CAAC,eAAe,CAAC,GAAG,IAAI,CAAC;IACpC,CAAC;IAEe,QAAQ;QACpB,IAAI,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,CAAC;YAC3B,OAAO,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;QAC9F,CAAC;QAED,OAAO,KAAK,CAAC;IACjB,CAAC;CACJ","sourcesContent":["import type { Vector3 } from \"core/Maths/math.vector\";\r\nimport { RawTexture } from \"core/Materials/Textures/rawTexture\";\r\nimport { Texture } from \"core/Materials/Textures/texture\";\r\nimport { Constants } from \"core/Engines/constants\";\r\nimport { Light } from \"core/Lights/light\";\r\nimport type { Effect } from \"core/Materials/effect\";\r\nimport type { ILTCTextures } from \"core/Lights/LTC/ltcTextureTool\";\r\nimport { DecodeLTCTextureDataAsync } from \"core/Lights/LTC/ltcTextureTool\";\r\nimport type { Scene } from \"core/scene\";\r\nimport { Logger } from \"core/Misc/logger\";\r\n\r\ndeclare module \"../scene\" {\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n export interface Scene {\r\n /**\r\n * @internal\r\n */\r\n _ltcTextures?: ILTCTextures;\r\n }\r\n}\r\n\r\nfunction CreateSceneLTCTextures(scene: Scene): void {\r\n const useDelayedTextureLoading = scene.useDelayedTextureLoading;\r\n scene.useDelayedTextureLoading = false;\r\n\r\n const previousState = scene._blockEntityCollection;\r\n scene._blockEntityCollection = false;\r\n\r\n scene._ltcTextures = {\r\n LTC1: RawTexture.CreateRGBATexture(null, 64, 64, scene.getEngine(), false, false, Constants.TEXTURE_LINEAR_LINEAR, Constants.TEXTURETYPE_HALF_FLOAT, 0, false, true),\r\n LTC2: RawTexture.CreateRGBATexture(null, 64, 64, scene.getEngine(), false, false, Constants.TEXTURE_LINEAR_LINEAR, Constants.TEXTURETYPE_HALF_FLOAT, 0, false, true),\r\n };\r\n\r\n scene._blockEntityCollection = previousState;\r\n\r\n scene._ltcTextures.LTC1.wrapU = Texture.CLAMP_ADDRESSMODE;\r\n scene._ltcTextures.LTC1.wrapV = Texture.CLAMP_ADDRESSMODE;\r\n\r\n scene._ltcTextures.LTC2.wrapU = Texture.CLAMP_ADDRESSMODE;\r\n scene._ltcTextures.LTC2.wrapV = Texture.CLAMP_ADDRESSMODE;\r\n\r\n scene.useDelayedTextureLoading = useDelayedTextureLoading;\r\n\r\n DecodeLTCTextureDataAsync()\r\n // eslint-disable-next-line github/no-then\r\n .then((textureData) => {\r\n if (scene._ltcTextures) {\r\n const ltc1 = scene._ltcTextures?.LTC1 as RawTexture;\r\n ltc1.update(textureData[0]);\r\n\r\n const ltc2 = scene._ltcTextures?.LTC2 as RawTexture;\r\n ltc2.update(textureData[1]);\r\n\r\n scene.onDisposeObservable.addOnce(() => {\r\n scene._ltcTextures?.LTC1.dispose();\r\n scene._ltcTextures?.LTC2.dispose();\r\n });\r\n }\r\n })\r\n // eslint-disable-next-line github/no-then\r\n .catch((error) => {\r\n Logger.Error(`Area Light fail to get LTC textures data. Error: ${error}`);\r\n });\r\n}\r\n\r\n/**\r\n * Abstract Area Light class that servers as parent for all Area Lights implementations.\r\n * The light is emitted from the area in the -Z direction.\r\n */\r\nexport abstract class AreaLight extends Light {\r\n /**\r\n * Area Light position.\r\n */\r\n public position: Vector3;\r\n\r\n /**\r\n * Creates a area light object.\r\n * Documentation : https://doc.babylonjs.com/features/featuresDeepDive/lights/lights_introduction\r\n * @param name The friendly name of the light\r\n * @param position The position of the area light.\r\n * @param scene The scene the light belongs to\r\n */\r\n constructor(name: string, position: Vector3, scene?: Scene) {\r\n super(name, scene);\r\n this.position = position;\r\n\r\n if (!this._scene._ltcTextures) {\r\n CreateSceneLTCTextures(this._scene);\r\n }\r\n }\r\n\r\n public override transferTexturesToEffect(effect: Effect): Light {\r\n if (this._scene._ltcTextures) {\r\n effect.setTexture(\"areaLightsLTC1Sampler\", this._scene._ltcTextures.LTC1);\r\n effect.setTexture(\"areaLightsLTC2Sampler\", this._scene._ltcTextures.LTC2);\r\n }\r\n return this;\r\n }\r\n\r\n /**\r\n * Prepares the list of defines specific to the light type.\r\n * @param defines the list of defines\r\n * @param lightIndex defines the index of the light for the effect\r\n */\r\n public prepareLightSpecificDefines(defines: any, lightIndex: number): void {\r\n defines[\"AREALIGHT\" + lightIndex] = true;\r\n defines[\"AREALIGHTUSED\"] = true;\r\n }\r\n\r\n public override _isReady(): boolean {\r\n if (this._scene._ltcTextures) {\r\n return this._scene._ltcTextures.LTC1.isReady() && this._scene._ltcTextures.LTC2.isReady();\r\n }\r\n\r\n return false;\r\n }\r\n}\r\n"]}
@@ -119,6 +119,7 @@ async function loadDataAsync(fileInfo, scene, onSuccess, onProgress, onError, on
119
119
  const response = await _FetchAsync(fileInfo.url, { method: "HEAD", responseHeaders: ["Content-Type"] });
120
120
  const mimeType = response.headerValues ? response.headerValues["Content-Type"] : "";
121
121
  if (mimeType) {
122
+ // eslint-disable-next-line require-atomic-updates
122
123
  registeredPlugin = getPluginForMimeType(mimeType);
123
124
  }
124
125
  }
@@ -144,6 +145,7 @@ async function loadDataAsync(fileInfo, scene, onSuccess, onProgress, onError, on
144
145
  const pluginFactory = registeredPlugin.plugin;
145
146
  const partialPlugin = pluginFactory.createPlugin(pluginOptions ?? {});
146
147
  if (partialPlugin instanceof Promise) {
148
+ // eslint-disable-next-line github/no-then
147
149
  partialPlugin.then(callback).catch((error) => {
148
150
  onError("Error instantiating plugin.", error);
149
151
  });
@@ -174,9 +176,11 @@ async function loadDataAsync(fileInfo, scene, onSuccess, onProgress, onError, on
174
176
  const result = plugin.directLoad(scene, directLoad);
175
177
  if (result instanceof Promise) {
176
178
  result
179
+ // eslint-disable-next-line github/no-then
177
180
  .then((data) => {
178
181
  onSuccess(plugin, data);
179
182
  })
183
+ // eslint-disable-next-line github/no-then
180
184
  .catch((error) => {
181
185
  onError("Error in directLoad of _loadData: " + error, error);
182
186
  });
@@ -346,7 +350,7 @@ export function GetRegisteredSceneLoaderPluginMetadata() {
346
350
  */
347
351
  export async function ImportMeshAsync(source, scene, options) {
348
352
  const { meshNames, rootUrl = "", onProgress, pluginExtension, name, pluginOptions } = options ?? {};
349
- return importMeshAsyncCoreAsync(meshNames, rootUrl, source, scene, onProgress, pluginExtension, name, pluginOptions);
353
+ return await importMeshAsyncCoreAsync(meshNames, rootUrl, source, scene, onProgress, pluginExtension, name, pluginOptions);
350
354
  }
351
355
  async function importMeshAsync(meshNames, rootUrl, sceneFilename = "", scene = EngineStore.LastCreatedScene, onSuccess = null, onProgress = null, onError = null, pluginExtension = null, name = "", pluginOptions = {}) {
352
356
  if (!scene) {
@@ -414,10 +418,12 @@ async function importMeshAsync(meshNames, rootUrl, sceneFilename = "", scene = E
414
418
  const asyncedPlugin = plugin;
415
419
  asyncedPlugin
416
420
  .importMeshAsync(meshNames, scene, data, fileInfo.rootUrl, progressHandler, fileInfo.name)
421
+ // eslint-disable-next-line github/no-then
417
422
  .then((result) => {
418
423
  scene.loadingPluginName = plugin.name;
419
424
  successHandler(result.meshes, result.particleSystems, result.skeletons, result.animationGroups, result.transformNodes, result.geometries, result.lights, result.spriteManagers);
420
425
  })
426
+ // eslint-disable-next-line github/no-then
421
427
  .catch((error) => {
422
428
  errorHandler(error.message, error);
423
429
  });
@@ -425,7 +431,7 @@ async function importMeshAsync(meshNames, rootUrl, sceneFilename = "", scene = E
425
431
  }, progressHandler, errorHandler, disposeHandler, pluginExtension, name, pluginOptions);
426
432
  }
427
433
  async function importMeshAsyncCoreAsync(meshNames, rootUrl, sceneFilename, scene, onProgress, pluginExtension, name, pluginOptions) {
428
- return new Promise((resolve, reject) => {
434
+ return await new Promise((resolve, reject) => {
429
435
  try {
430
436
  importMeshAsync(meshNames, rootUrl, sceneFilename, scene, (meshes, particleSystems, skeletons, animationGroups, transformNodes, geometries, lights, spriteManagers) => {
431
437
  resolve({
@@ -439,10 +445,14 @@ async function importMeshAsyncCoreAsync(meshNames, rootUrl, sceneFilename, scene
439
445
  spriteManagers: spriteManagers,
440
446
  });
441
447
  }, onProgress, (scene, message, exception) => {
448
+ // eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errors
442
449
  reject(exception || new Error(message));
443
- }, pluginExtension, name, pluginOptions).catch(reject);
450
+ }, pluginExtension, name, pluginOptions
451
+ // eslint-disable-next-line github/no-then
452
+ ).catch(reject);
444
453
  }
445
454
  catch (error) {
455
+ // eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errors
446
456
  reject(error);
447
457
  }
448
458
  });
@@ -464,7 +474,7 @@ async function loadSceneImplAsync(rootUrl, sceneFilename = "", engine = EngineSt
464
474
  */
465
475
  export async function LoadSceneAsync(source, engine, options) {
466
476
  const { rootUrl = "", onProgress, pluginExtension, name, pluginOptions } = options ?? {};
467
- return loadSceneSharedAsync(rootUrl, source, engine, onProgress, pluginExtension, name, pluginOptions);
477
+ return await loadSceneSharedAsync(rootUrl, source, engine, onProgress, pluginExtension, name, pluginOptions);
468
478
  }
469
479
  /**
470
480
  * Load a scene
@@ -475,14 +485,16 @@ export async function LoadSceneAsync(source, engine, options) {
475
485
  * @returns The loaded scene
476
486
  */
477
487
  export async function loadSceneAsync(source, engine, options) {
478
- return LoadSceneAsync(source, engine, options);
488
+ return await LoadSceneAsync(source, engine, options);
479
489
  }
480
490
  // This function is shared between the new module level loadSceneAsync and the legacy SceneLoader.LoadAsync
481
491
  async function loadSceneSharedAsync(rootUrl, sceneFilename, engine, onProgress, pluginExtension, name, pluginOptions) {
482
- return new Promise((resolve, reject) => {
492
+ return await new Promise((resolve, reject) => {
493
+ // eslint-disable-next-line @typescript-eslint/no-floating-promises
483
494
  loadSceneImplAsync(rootUrl, sceneFilename, engine, (scene) => {
484
495
  resolve(scene);
485
496
  }, onProgress, (scene, message, exception) => {
497
+ // eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errors
486
498
  reject(exception || new Error(message));
487
499
  }, pluginExtension, name, pluginOptions);
488
500
  });
@@ -555,10 +567,12 @@ async function appendSceneImplAsync(rootUrl, sceneFilename = "", scene = EngineS
555
567
  const asyncedPlugin = plugin;
556
568
  asyncedPlugin
557
569
  .loadAsync(scene, data, fileInfo.rootUrl, progressHandler, fileInfo.name)
570
+ // eslint-disable-next-line github/no-then
558
571
  .then(() => {
559
572
  scene.loadingPluginName = plugin.name;
560
573
  successHandler();
561
574
  })
575
+ // eslint-disable-next-line github/no-then
562
576
  .catch((error) => {
563
577
  errorHandler(error.message, error);
564
578
  });
@@ -585,19 +599,23 @@ export async function AppendSceneAsync(source, scene, options) {
585
599
  * @returns A promise that resolves when the scene is appended
586
600
  */
587
601
  export async function appendSceneAsync(source, scene, options) {
588
- return AppendSceneAsync(source, scene, options);
602
+ return await AppendSceneAsync(source, scene, options);
589
603
  }
590
604
  // This function is shared between the new module level appendSceneAsync and the legacy SceneLoader.AppendAsync
591
605
  async function appendSceneSharedAsync(rootUrl, sceneFilename, scene, onProgress, pluginExtension, name, pluginOptions) {
592
- return new Promise((resolve, reject) => {
606
+ return await new Promise((resolve, reject) => {
593
607
  try {
594
608
  appendSceneImplAsync(rootUrl, sceneFilename, scene, (scene) => {
595
609
  resolve(scene);
596
610
  }, onProgress, (scene, message, exception) => {
611
+ // eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errors
597
612
  reject(exception || new Error(message));
598
- }, pluginExtension, name, pluginOptions).catch(reject);
613
+ }, pluginExtension, name, pluginOptions
614
+ // eslint-disable-next-line github/no-then
615
+ ).catch(reject);
599
616
  }
600
617
  catch (error) {
618
+ // eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errors
601
619
  reject(error);
602
620
  }
603
621
  });
@@ -664,11 +682,13 @@ async function loadAssetContainerImplAsync(rootUrl, sceneFilename = "", scene =
664
682
  const asyncedPlugin = plugin;
665
683
  asyncedPlugin
666
684
  .loadAssetContainerAsync(scene, data, fileInfo.rootUrl, progressHandler, fileInfo.name)
685
+ // eslint-disable-next-line github/no-then
667
686
  .then((assetContainer) => {
668
687
  assetContainer.populateRootNodes();
669
688
  scene.loadingPluginName = plugin.name;
670
689
  successHandler(assetContainer);
671
690
  })
691
+ // eslint-disable-next-line github/no-then
672
692
  .catch((error) => {
673
693
  errorHandler(error.message, error);
674
694
  });
@@ -687,7 +707,7 @@ async function loadAssetContainerImplAsync(rootUrl, sceneFilename = "", scene =
687
707
  */
688
708
  export async function LoadAssetContainerAsync(source, scene, options) {
689
709
  const { rootUrl = "", onProgress, pluginExtension, name, pluginOptions } = options ?? {};
690
- return loadAssetContainerSharedAsync(rootUrl, source, scene, onProgress, pluginExtension, name, pluginOptions);
710
+ return await loadAssetContainerSharedAsync(rootUrl, source, scene, onProgress, pluginExtension, name, pluginOptions);
691
711
  }
692
712
  /**
693
713
  * Load a scene into an asset container
@@ -698,19 +718,23 @@ export async function LoadAssetContainerAsync(source, scene, options) {
698
718
  * @returns The loaded asset container
699
719
  */
700
720
  export async function loadAssetContainerAsync(source, scene, options) {
701
- return LoadAssetContainerAsync(source, scene, options);
721
+ return await LoadAssetContainerAsync(source, scene, options);
702
722
  }
703
723
  // This function is shared between the new module level loadAssetContainerAsync and the legacy SceneLoader.LoadAssetContainerAsync
704
724
  async function loadAssetContainerSharedAsync(rootUrl, sceneFilename, scene, onProgress, pluginExtension, name, pluginOptions) {
705
- return new Promise((resolve, reject) => {
725
+ return await new Promise((resolve, reject) => {
706
726
  try {
707
727
  loadAssetContainerImplAsync(rootUrl, sceneFilename, scene, (assets) => {
708
728
  resolve(assets);
709
729
  }, onProgress, (scene, message, exception) => {
730
+ // eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errors
710
731
  reject(exception || new Error(message));
711
- }, pluginExtension, name, pluginOptions).catch(reject);
732
+ }, pluginExtension, name, pluginOptions
733
+ // eslint-disable-next-line github/no-then
734
+ ).catch(reject);
712
735
  }
713
736
  catch (error) {
737
+ // eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errors
714
738
  reject(error);
715
739
  }
716
740
  });
@@ -796,19 +820,23 @@ export async function ImportAnimationsAsync(source, scene, options) {
796
820
  * @returns A promise that resolves when the animations are imported
797
821
  */
798
822
  export async function importAnimationsAsync(source, scene, options) {
799
- return ImportAnimationsAsync(source, scene, options);
823
+ return await ImportAnimationsAsync(source, scene, options);
800
824
  }
801
825
  // This function is shared between the new module level importAnimationsAsync and the legacy SceneLoader.ImportAnimationsAsync
802
826
  async function importAnimationsSharedAsync(rootUrl, sceneFilename, scene, overwriteAnimations, animationGroupLoadingMode, targetConverter, onProgress, pluginExtension, name, pluginOptions) {
803
- return new Promise((resolve, reject) => {
827
+ return await new Promise((resolve, reject) => {
804
828
  try {
805
829
  importAnimationsImplAsync(rootUrl, sceneFilename, scene, overwriteAnimations, animationGroupLoadingMode, targetConverter, (scene) => {
806
830
  resolve(scene);
807
831
  }, onProgress, (scene, message, exception) => {
832
+ // eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errors
808
833
  reject(exception || new Error(message));
809
- }, pluginExtension, name, pluginOptions).catch(reject);
834
+ }, pluginExtension, name, pluginOptions
835
+ // eslint-disable-next-line github/no-then
836
+ ).catch(reject);
810
837
  }
811
838
  catch (error) {
839
+ // eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errors
812
840
  reject(error);
813
841
  }
814
842
  });
@@ -904,6 +932,7 @@ export class SceneLoader {
904
932
  * @deprecated Please use the module level {@link ImportMeshAsync} instead
905
933
  */
906
934
  static ImportMesh(meshNames, rootUrl, sceneFilename, scene, onSuccess, onProgress, onError, pluginExtension, name) {
935
+ // eslint-disable-next-line github/no-then
907
936
  importMeshAsync(meshNames, rootUrl, sceneFilename, scene, onSuccess, onProgress, onError, pluginExtension, name).catch((error) => onError?.(EngineStore.LastCreatedScene, error?.message, error));
908
937
  }
909
938
  /**
@@ -919,7 +948,7 @@ export class SceneLoader {
919
948
  * @deprecated Please use the module level {@link ImportMeshAsync} instead
920
949
  */
921
950
  static async ImportMeshAsync(meshNames, rootUrl, sceneFilename, scene, onProgress, pluginExtension, name) {
922
- return importMeshAsyncCoreAsync(meshNames, rootUrl, sceneFilename, scene, onProgress, pluginExtension, name);
951
+ return await importMeshAsyncCoreAsync(meshNames, rootUrl, sceneFilename, scene, onProgress, pluginExtension, name);
923
952
  }
924
953
  /**
925
954
  * Load a scene
@@ -934,6 +963,7 @@ export class SceneLoader {
934
963
  * @deprecated Please use the module level {@link LoadSceneAsync} instead
935
964
  */
936
965
  static Load(rootUrl, sceneFilename, engine, onSuccess, onProgress, onError, pluginExtension, name) {
966
+ // eslint-disable-next-line github/no-then
937
967
  loadSceneImplAsync(rootUrl, sceneFilename, engine, onSuccess, onProgress, onError, pluginExtension, name).catch((error) => onError?.(EngineStore.LastCreatedScene, error?.message, error));
938
968
  }
939
969
  /**
@@ -948,7 +978,7 @@ export class SceneLoader {
948
978
  * @deprecated Please use the module level {@link LoadSceneAsync} instead
949
979
  */
950
980
  static async LoadAsync(rootUrl, sceneFilename, engine, onProgress, pluginExtension, name) {
951
- return loadSceneSharedAsync(rootUrl, sceneFilename, engine, onProgress, pluginExtension, name);
981
+ return await loadSceneSharedAsync(rootUrl, sceneFilename, engine, onProgress, pluginExtension, name);
952
982
  }
953
983
  /**
954
984
  * Append a scene
@@ -963,6 +993,7 @@ export class SceneLoader {
963
993
  * @deprecated Please use the module level {@link AppendSceneAsync} instead
964
994
  */
965
995
  static Append(rootUrl, sceneFilename, scene, onSuccess, onProgress, onError, pluginExtension, name) {
996
+ // eslint-disable-next-line github/no-then
966
997
  appendSceneImplAsync(rootUrl, sceneFilename, scene, onSuccess, onProgress, onError, pluginExtension, name).catch((error) => onError?.((scene ?? EngineStore.LastCreatedScene), error?.message, error));
967
998
  }
968
999
  /**
@@ -977,7 +1008,7 @@ export class SceneLoader {
977
1008
  * @deprecated Please use the module level {@link AppendSceneAsync} instead
978
1009
  */
979
1010
  static async AppendAsync(rootUrl, sceneFilename, scene, onProgress, pluginExtension, name) {
980
- return appendSceneSharedAsync(rootUrl, sceneFilename, scene, onProgress, pluginExtension, name);
1011
+ return await appendSceneSharedAsync(rootUrl, sceneFilename, scene, onProgress, pluginExtension, name);
981
1012
  }
982
1013
  /**
983
1014
  * Load a scene into an asset container
@@ -992,6 +1023,7 @@ export class SceneLoader {
992
1023
  * @deprecated Please use the module level {@link LoadAssetContainerAsync} instead
993
1024
  */
994
1025
  static LoadAssetContainer(rootUrl, sceneFilename, scene, onSuccess, onProgress, onError, pluginExtension, name) {
1026
+ // eslint-disable-next-line github/no-then
995
1027
  loadAssetContainerImplAsync(rootUrl, sceneFilename, scene, onSuccess, onProgress, onError, pluginExtension, name).catch((error) => onError?.((scene ?? EngineStore.LastCreatedScene), error?.message, error));
996
1028
  }
997
1029
  /**
@@ -1006,7 +1038,7 @@ export class SceneLoader {
1006
1038
  * @deprecated Please use the module level {@link LoadAssetContainerAsync} instead
1007
1039
  */
1008
1040
  static async LoadAssetContainerAsync(rootUrl, sceneFilename, scene, onProgress, pluginExtension, name) {
1009
- return loadAssetContainerSharedAsync(rootUrl, sceneFilename, scene, onProgress, pluginExtension, name);
1041
+ return await loadAssetContainerSharedAsync(rootUrl, sceneFilename, scene, onProgress, pluginExtension, name);
1010
1042
  }
1011
1043
  /**
1012
1044
  * Import animations from a file into a scene
@@ -1024,7 +1056,9 @@ export class SceneLoader {
1024
1056
  * @deprecated Please use the module level {@link ImportAnimationsAsync} instead
1025
1057
  */
1026
1058
  static ImportAnimations(rootUrl, sceneFilename, scene, overwriteAnimations, animationGroupLoadingMode, targetConverter, onSuccess, onProgress, onError, pluginExtension, name) {
1027
- importAnimationsImplAsync(rootUrl, sceneFilename, scene, overwriteAnimations, animationGroupLoadingMode, targetConverter, onSuccess, onProgress, onError, pluginExtension, name).catch((error) => onError?.((scene ?? EngineStore.LastCreatedScene), error?.message, error));
1059
+ importAnimationsImplAsync(rootUrl, sceneFilename, scene, overwriteAnimations, animationGroupLoadingMode, targetConverter, onSuccess, onProgress, onError, pluginExtension, name
1060
+ // eslint-disable-next-line github/no-then
1061
+ ).catch((error) => onError?.((scene ?? EngineStore.LastCreatedScene), error?.message, error));
1028
1062
  }
1029
1063
  /**
1030
1064
  * Import animations from a file into a scene
@@ -1047,7 +1081,7 @@ export class SceneLoader {
1047
1081
  onSuccess, onProgress,
1048
1082
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
1049
1083
  onError, pluginExtension, name) {
1050
- return importAnimationsSharedAsync(rootUrl, sceneFilename, scene, overwriteAnimations, animationGroupLoadingMode, targetConverter, onProgress, pluginExtension, name);
1084
+ return await importAnimationsSharedAsync(rootUrl, sceneFilename, scene, overwriteAnimations, animationGroupLoadingMode, targetConverter, onProgress, pluginExtension, name);
1051
1085
  }
1052
1086
  }
1053
1087
  /**