@babylonjs/core 5.32.0 → 5.32.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (636) hide show
  1. package/Actions/abstractActionManager.d.ts +1 -1
  2. package/Actions/abstractActionManager.js +1 -1
  3. package/Actions/abstractActionManager.js.map +1 -1
  4. package/Actions/action.d.ts +1 -1
  5. package/Actions/action.js +1 -1
  6. package/Actions/action.js.map +1 -1
  7. package/Actions/actionManager.d.ts +18 -18
  8. package/Actions/actionManager.js +18 -18
  9. package/Actions/actionManager.js.map +1 -1
  10. package/Actions/directActions.d.ts +10 -10
  11. package/Actions/directActions.js +10 -10
  12. package/Actions/directActions.js.map +1 -1
  13. package/Actions/interpolateValueAction.d.ts +1 -1
  14. package/Actions/interpolateValueAction.js +1 -1
  15. package/Actions/interpolateValueAction.js.map +1 -1
  16. package/Animations/animatable.d.ts +2 -2
  17. package/Animations/animatable.js +2 -2
  18. package/Animations/animatable.js.map +1 -1
  19. package/Animations/animationGroup.d.ts +3 -3
  20. package/Animations/animationGroup.js +3 -3
  21. package/Animations/animationGroup.js.map +1 -1
  22. package/Animations/easing.d.ts +14 -14
  23. package/Animations/easing.js +13 -13
  24. package/Animations/easing.js.map +1 -1
  25. package/Audio/Interfaces/IAudioEngine.d.ts +2 -2
  26. package/Audio/Interfaces/IAudioEngine.js.map +1 -1
  27. package/Audio/Interfaces/ISoundOptions.d.ts +3 -3
  28. package/Audio/Interfaces/ISoundOptions.js.map +1 -1
  29. package/Audio/analyser.d.ts +1 -1
  30. package/Audio/analyser.js +1 -1
  31. package/Audio/analyser.js.map +1 -1
  32. package/Audio/audioEngine.d.ts +2 -2
  33. package/Audio/audioEngine.js +2 -2
  34. package/Audio/audioEngine.js.map +1 -1
  35. package/Audio/audioSceneComponent.d.ts +4 -4
  36. package/Audio/audioSceneComponent.js.map +1 -1
  37. package/Audio/sound.d.ts +13 -13
  38. package/Audio/sound.js +13 -13
  39. package/Audio/sound.js.map +1 -1
  40. package/Audio/soundTrack.d.ts +5 -5
  41. package/Audio/soundTrack.js +5 -5
  42. package/Audio/soundTrack.js.map +1 -1
  43. package/BakedVertexAnimation/bakedVertexAnimationManager.d.ts +1 -1
  44. package/BakedVertexAnimation/bakedVertexAnimationManager.js +1 -1
  45. package/BakedVertexAnimation/bakedVertexAnimationManager.js.map +1 -1
  46. package/Behaviors/Cameras/autoRotationBehavior.d.ts +1 -1
  47. package/Behaviors/Cameras/autoRotationBehavior.js +1 -1
  48. package/Behaviors/Cameras/autoRotationBehavior.js.map +1 -1
  49. package/Behaviors/Cameras/bouncingBehavior.d.ts +1 -1
  50. package/Behaviors/Cameras/bouncingBehavior.js +1 -1
  51. package/Behaviors/Cameras/bouncingBehavior.js.map +1 -1
  52. package/Behaviors/Cameras/framingBehavior.d.ts +1 -1
  53. package/Behaviors/Cameras/framingBehavior.js +1 -1
  54. package/Behaviors/Cameras/framingBehavior.js.map +1 -1
  55. package/Behaviors/Meshes/pointerDragBehavior.d.ts +8 -0
  56. package/Behaviors/Meshes/pointerDragBehavior.js +9 -3
  57. package/Behaviors/Meshes/pointerDragBehavior.js.map +1 -1
  58. package/Bones/bone.d.ts +1 -1
  59. package/Bones/bone.js +1 -1
  60. package/Bones/bone.js.map +1 -1
  61. package/Bones/boneIKController.d.ts +1 -1
  62. package/Bones/boneIKController.js +1 -1
  63. package/Bones/boneIKController.js.map +1 -1
  64. package/Bones/boneLookController.d.ts +1 -1
  65. package/Bones/boneLookController.js +1 -1
  66. package/Bones/boneLookController.js.map +1 -1
  67. package/Bones/skeleton.d.ts +3 -3
  68. package/Bones/skeleton.js +2 -2
  69. package/Bones/skeleton.js.map +1 -1
  70. package/Cameras/Inputs/BaseCameraMouseWheelInput.js +2 -2
  71. package/Cameras/Inputs/BaseCameraMouseWheelInput.js.map +1 -1
  72. package/Cameras/Inputs/BaseCameraPointersInput.js +2 -2
  73. package/Cameras/Inputs/BaseCameraPointersInput.js.map +1 -1
  74. package/Cameras/Inputs/arcRotateCameraGamepadInput.d.ts +1 -1
  75. package/Cameras/Inputs/arcRotateCameraGamepadInput.js +1 -1
  76. package/Cameras/Inputs/arcRotateCameraGamepadInput.js.map +1 -1
  77. package/Cameras/Inputs/arcRotateCameraKeyboardMoveInput.d.ts +1 -1
  78. package/Cameras/Inputs/arcRotateCameraKeyboardMoveInput.js +1 -1
  79. package/Cameras/Inputs/arcRotateCameraKeyboardMoveInput.js.map +1 -1
  80. package/Cameras/Inputs/arcRotateCameraMouseWheelInput.d.ts +1 -1
  81. package/Cameras/Inputs/arcRotateCameraMouseWheelInput.js +3 -3
  82. package/Cameras/Inputs/arcRotateCameraMouseWheelInput.js.map +1 -1
  83. package/Cameras/Inputs/arcRotateCameraPointersInput.d.ts +1 -1
  84. package/Cameras/Inputs/arcRotateCameraPointersInput.js +1 -1
  85. package/Cameras/Inputs/arcRotateCameraPointersInput.js.map +1 -1
  86. package/Cameras/Inputs/arcRotateCameraVRDeviceOrientationInput.d.ts +1 -1
  87. package/Cameras/Inputs/arcRotateCameraVRDeviceOrientationInput.js +1 -1
  88. package/Cameras/Inputs/arcRotateCameraVRDeviceOrientationInput.js.map +1 -1
  89. package/Cameras/Inputs/flyCameraKeyboardInput.d.ts +1 -1
  90. package/Cameras/Inputs/flyCameraKeyboardInput.js +1 -1
  91. package/Cameras/Inputs/flyCameraKeyboardInput.js.map +1 -1
  92. package/Cameras/Inputs/flyCameraMouseInput.d.ts +2 -2
  93. package/Cameras/Inputs/flyCameraMouseInput.js +4 -4
  94. package/Cameras/Inputs/flyCameraMouseInput.js.map +1 -1
  95. package/Cameras/Inputs/followCameraKeyboardMoveInput.d.ts +1 -1
  96. package/Cameras/Inputs/followCameraKeyboardMoveInput.js +1 -1
  97. package/Cameras/Inputs/followCameraKeyboardMoveInput.js.map +1 -1
  98. package/Cameras/Inputs/followCameraMouseWheelInput.d.ts +1 -1
  99. package/Cameras/Inputs/followCameraMouseWheelInput.js +3 -3
  100. package/Cameras/Inputs/followCameraMouseWheelInput.js.map +1 -1
  101. package/Cameras/Inputs/followCameraPointersInput.d.ts +1 -1
  102. package/Cameras/Inputs/followCameraPointersInput.js +1 -1
  103. package/Cameras/Inputs/followCameraPointersInput.js.map +1 -1
  104. package/Cameras/Inputs/freeCameraDeviceOrientationInput.d.ts +2 -2
  105. package/Cameras/Inputs/freeCameraDeviceOrientationInput.js +2 -2
  106. package/Cameras/Inputs/freeCameraDeviceOrientationInput.js.map +1 -1
  107. package/Cameras/Inputs/freeCameraGamepadInput.d.ts +1 -1
  108. package/Cameras/Inputs/freeCameraGamepadInput.js +1 -1
  109. package/Cameras/Inputs/freeCameraGamepadInput.js.map +1 -1
  110. package/Cameras/Inputs/freeCameraKeyboardMoveInput.d.ts +1 -1
  111. package/Cameras/Inputs/freeCameraKeyboardMoveInput.js +1 -1
  112. package/Cameras/Inputs/freeCameraKeyboardMoveInput.js.map +1 -1
  113. package/Cameras/Inputs/freeCameraMouseInput.d.ts +3 -2
  114. package/Cameras/Inputs/freeCameraMouseInput.js +10 -7
  115. package/Cameras/Inputs/freeCameraMouseInput.js.map +1 -1
  116. package/Cameras/Inputs/freeCameraMouseWheelInput.d.ts +1 -1
  117. package/Cameras/Inputs/freeCameraMouseWheelInput.js +1 -1
  118. package/Cameras/Inputs/freeCameraMouseWheelInput.js.map +1 -1
  119. package/Cameras/Inputs/freeCameraTouchInput.d.ts +2 -2
  120. package/Cameras/Inputs/freeCameraTouchInput.js +4 -4
  121. package/Cameras/Inputs/freeCameraTouchInput.js.map +1 -1
  122. package/Cameras/Inputs/freeCameraVirtualJoystickInput.d.ts +1 -1
  123. package/Cameras/Inputs/freeCameraVirtualJoystickInput.js +1 -1
  124. package/Cameras/Inputs/freeCameraVirtualJoystickInput.js.map +1 -1
  125. package/Cameras/Stereoscopic/anaglyphArcRotateCamera.d.ts +1 -1
  126. package/Cameras/Stereoscopic/anaglyphArcRotateCamera.js +1 -1
  127. package/Cameras/Stereoscopic/anaglyphArcRotateCamera.js.map +1 -1
  128. package/Cameras/Stereoscopic/anaglyphFreeCamera.d.ts +1 -1
  129. package/Cameras/Stereoscopic/anaglyphFreeCamera.js +1 -1
  130. package/Cameras/Stereoscopic/anaglyphFreeCamera.js.map +1 -1
  131. package/Cameras/Stereoscopic/anaglyphGamepadCamera.d.ts +1 -1
  132. package/Cameras/Stereoscopic/anaglyphGamepadCamera.js +1 -1
  133. package/Cameras/Stereoscopic/anaglyphGamepadCamera.js.map +1 -1
  134. package/Cameras/Stereoscopic/anaglyphUniversalCamera.d.ts +1 -1
  135. package/Cameras/Stereoscopic/anaglyphUniversalCamera.js +1 -1
  136. package/Cameras/Stereoscopic/anaglyphUniversalCamera.js.map +1 -1
  137. package/Cameras/Stereoscopic/stereoscopicArcRotateCamera.d.ts +1 -1
  138. package/Cameras/Stereoscopic/stereoscopicArcRotateCamera.js +1 -1
  139. package/Cameras/Stereoscopic/stereoscopicArcRotateCamera.js.map +1 -1
  140. package/Cameras/Stereoscopic/stereoscopicFreeCamera.d.ts +1 -1
  141. package/Cameras/Stereoscopic/stereoscopicFreeCamera.js +1 -1
  142. package/Cameras/Stereoscopic/stereoscopicFreeCamera.js.map +1 -1
  143. package/Cameras/Stereoscopic/stereoscopicGamepadCamera.d.ts +1 -1
  144. package/Cameras/Stereoscopic/stereoscopicGamepadCamera.js +1 -1
  145. package/Cameras/Stereoscopic/stereoscopicGamepadCamera.js.map +1 -1
  146. package/Cameras/Stereoscopic/stereoscopicScreenUniversalCamera.d.ts +1 -1
  147. package/Cameras/Stereoscopic/stereoscopicScreenUniversalCamera.js +1 -1
  148. package/Cameras/Stereoscopic/stereoscopicScreenUniversalCamera.js.map +1 -1
  149. package/Cameras/Stereoscopic/stereoscopicUniversalCamera.d.ts +1 -1
  150. package/Cameras/Stereoscopic/stereoscopicUniversalCamera.js +1 -1
  151. package/Cameras/Stereoscopic/stereoscopicUniversalCamera.js.map +1 -1
  152. package/Cameras/VR/vrCameraMetrics.d.ts +1 -1
  153. package/Cameras/VR/vrCameraMetrics.js +1 -1
  154. package/Cameras/VR/vrCameraMetrics.js.map +1 -1
  155. package/Cameras/VR/vrDeviceOrientationArcRotateCamera.d.ts +1 -1
  156. package/Cameras/VR/vrDeviceOrientationArcRotateCamera.js +1 -1
  157. package/Cameras/VR/vrDeviceOrientationArcRotateCamera.js.map +1 -1
  158. package/Cameras/VR/vrDeviceOrientationFreeCamera.d.ts +1 -1
  159. package/Cameras/VR/vrDeviceOrientationFreeCamera.js +1 -1
  160. package/Cameras/VR/vrDeviceOrientationFreeCamera.js.map +1 -1
  161. package/Cameras/VR/vrDeviceOrientationGamepadCamera.d.ts +1 -1
  162. package/Cameras/VR/vrDeviceOrientationGamepadCamera.js +1 -1
  163. package/Cameras/VR/vrDeviceOrientationGamepadCamera.js.map +1 -1
  164. package/Cameras/VR/vrExperienceHelper.d.ts +2 -2
  165. package/Cameras/VR/vrExperienceHelper.js +2 -2
  166. package/Cameras/VR/vrExperienceHelper.js.map +1 -1
  167. package/Cameras/VR/webVRCamera.d.ts +2 -2
  168. package/Cameras/VR/webVRCamera.js +2 -2
  169. package/Cameras/VR/webVRCamera.js.map +1 -1
  170. package/Cameras/arcRotateCamera.d.ts +9 -9
  171. package/Cameras/arcRotateCamera.js +9 -9
  172. package/Cameras/arcRotateCamera.js.map +1 -1
  173. package/Cameras/arcRotateCameraInputsManager.d.ts +1 -1
  174. package/Cameras/arcRotateCameraInputsManager.js +1 -1
  175. package/Cameras/arcRotateCameraInputsManager.js.map +1 -1
  176. package/Cameras/camera.d.ts +4 -4
  177. package/Cameras/camera.js +4 -4
  178. package/Cameras/camera.js.map +1 -1
  179. package/Cameras/cameraInputsManager.d.ts +1 -1
  180. package/Cameras/cameraInputsManager.js +1 -1
  181. package/Cameras/cameraInputsManager.js.map +1 -1
  182. package/Cameras/flyCamera.d.ts +1 -1
  183. package/Cameras/flyCamera.js +1 -1
  184. package/Cameras/flyCamera.js.map +1 -1
  185. package/Cameras/flyCameraInputsManager.d.ts +1 -1
  186. package/Cameras/flyCameraInputsManager.js +1 -1
  187. package/Cameras/flyCameraInputsManager.js.map +1 -1
  188. package/Cameras/followCamera.d.ts +4 -4
  189. package/Cameras/followCamera.js +4 -4
  190. package/Cameras/followCamera.js.map +1 -1
  191. package/Cameras/followCameraInputsManager.d.ts +1 -1
  192. package/Cameras/followCameraInputsManager.js +1 -1
  193. package/Cameras/followCameraInputsManager.js.map +1 -1
  194. package/Cameras/freeCamera.d.ts +3 -3
  195. package/Cameras/freeCamera.js +3 -3
  196. package/Cameras/freeCamera.js.map +1 -1
  197. package/Cameras/freeCameraInputsManager.d.ts +1 -1
  198. package/Cameras/freeCameraInputsManager.js +1 -1
  199. package/Cameras/freeCameraInputsManager.js.map +1 -1
  200. package/Cameras/gamepadCamera.d.ts +2 -2
  201. package/Cameras/gamepadCamera.js +2 -2
  202. package/Cameras/gamepadCamera.js.map +1 -1
  203. package/Cameras/targetCamera.d.ts +2 -2
  204. package/Cameras/targetCamera.js +2 -2
  205. package/Cameras/targetCamera.js.map +1 -1
  206. package/Cameras/touchCamera.d.ts +2 -2
  207. package/Cameras/touchCamera.js +2 -2
  208. package/Cameras/touchCamera.js.map +1 -1
  209. package/Cameras/universalCamera.d.ts +2 -2
  210. package/Cameras/universalCamera.js +2 -2
  211. package/Cameras/universalCamera.js.map +1 -1
  212. package/Cameras/virtualJoysticksCamera.d.ts +2 -2
  213. package/Cameras/virtualJoysticksCamera.js +2 -2
  214. package/Cameras/virtualJoysticksCamera.js.map +1 -1
  215. package/Collisions/pickingInfo.d.ts +1 -1
  216. package/Collisions/pickingInfo.js +1 -1
  217. package/Collisions/pickingInfo.js.map +1 -1
  218. package/Culling/Octrees/octree.d.ts +2 -2
  219. package/Culling/Octrees/octree.js +2 -2
  220. package/Culling/Octrees/octree.js.map +1 -1
  221. package/Culling/Octrees/octreeBlock.d.ts +1 -1
  222. package/Culling/Octrees/octreeBlock.js +1 -1
  223. package/Culling/Octrees/octreeBlock.js.map +1 -1
  224. package/Culling/Octrees/octreeSceneComponent.d.ts +3 -3
  225. package/Culling/Octrees/octreeSceneComponent.js +1 -1
  226. package/Culling/Octrees/octreeSceneComponent.js.map +1 -1
  227. package/Culling/boundingInfo.d.ts +3 -3
  228. package/Culling/boundingInfo.js +2 -2
  229. package/Culling/boundingInfo.js.map +1 -1
  230. package/Debug/debugLayer.d.ts +1 -1
  231. package/Debug/debugLayer.js.map +1 -1
  232. package/Debug/rayHelper.d.ts +2 -2
  233. package/Debug/rayHelper.js +2 -2
  234. package/Debug/rayHelper.js.map +1 -1
  235. package/Engines/Extensions/engine.alpha.d.ts +2 -2
  236. package/Engines/Extensions/engine.alpha.js.map +1 -1
  237. package/Engines/Extensions/engine.multiRender.d.ts +2 -2
  238. package/Engines/Extensions/engine.multiRender.js.map +1 -1
  239. package/Engines/Extensions/engine.query.d.ts +8 -8
  240. package/Engines/Extensions/engine.query.js.map +1 -1
  241. package/Engines/Extensions/engine.renderTarget.d.ts +1 -1
  242. package/Engines/Extensions/engine.renderTarget.js.map +1 -1
  243. package/Engines/Extensions/engine.uniformBuffer.d.ts +3 -3
  244. package/Engines/Extensions/engine.uniformBuffer.js.map +1 -1
  245. package/Engines/Extensions/engine.views.d.ts +2 -2
  246. package/Engines/Extensions/engine.views.js +1 -1
  247. package/Engines/Extensions/engine.views.js.map +1 -1
  248. package/Engines/Extensions/engine.webVR.d.ts +1 -1
  249. package/Engines/Extensions/engine.webVR.js.map +1 -1
  250. package/Engines/Processors/shaderProcessor.d.ts +2 -2
  251. package/Engines/Processors/shaderProcessor.js +2 -2
  252. package/Engines/Processors/shaderProcessor.js.map +1 -1
  253. package/Engines/WebGPU/webgpuShaderProcessor.js +11 -9
  254. package/Engines/WebGPU/webgpuShaderProcessor.js.map +1 -1
  255. package/Engines/constants.d.ts +17 -17
  256. package/Engines/constants.js +17 -17
  257. package/Engines/constants.js.map +1 -1
  258. package/Engines/engine.d.ts +12 -12
  259. package/Engines/engine.js +11 -11
  260. package/Engines/engine.js.map +1 -1
  261. package/Engines/nativeEngine.d.ts +2 -2
  262. package/Engines/nativeEngine.js +23 -2
  263. package/Engines/nativeEngine.js.map +1 -1
  264. package/Engines/nullEngine.d.ts +5 -5
  265. package/Engines/nullEngine.js +5 -5
  266. package/Engines/nullEngine.js.map +1 -1
  267. package/Engines/thinEngine.d.ts +8 -8
  268. package/Engines/thinEngine.js +6 -6
  269. package/Engines/thinEngine.js.map +1 -1
  270. package/Engines/webgpuEngine.d.ts +4 -4
  271. package/Engines/webgpuEngine.js +1 -1
  272. package/Engines/webgpuEngine.js.map +1 -1
  273. package/Gamepads/gamepadSceneComponent.d.ts +1 -1
  274. package/Gamepads/gamepadSceneComponent.js.map +1 -1
  275. package/Gizmos/gizmo.d.ts +6 -7
  276. package/Gizmos/gizmo.js +43 -36
  277. package/Gizmos/gizmo.js.map +1 -1
  278. package/Gizmos/planeRotationGizmo.js +17 -7
  279. package/Gizmos/planeRotationGizmo.js.map +1 -1
  280. package/Gizmos/positionGizmo.d.ts +4 -0
  281. package/Gizmos/positionGizmo.js +21 -0
  282. package/Gizmos/positionGizmo.js.map +1 -1
  283. package/Gizmos/rotationGizmo.d.ts +4 -0
  284. package/Gizmos/rotationGizmo.js +20 -0
  285. package/Gizmos/rotationGizmo.js.map +1 -1
  286. package/Gizmos/scaleGizmo.d.ts +2 -0
  287. package/Gizmos/scaleGizmo.js +10 -0
  288. package/Gizmos/scaleGizmo.js.map +1 -1
  289. package/Helpers/sceneHelpers.d.ts +7 -7
  290. package/Helpers/sceneHelpers.js.map +1 -1
  291. package/Inputs/scene.inputManager.js +34 -25
  292. package/Inputs/scene.inputManager.js.map +1 -1
  293. package/Instrumentation/engineInstrumentation.d.ts +2 -2
  294. package/Instrumentation/engineInstrumentation.js +2 -2
  295. package/Instrumentation/engineInstrumentation.js.map +1 -1
  296. package/Instrumentation/sceneInstrumentation.d.ts +2 -2
  297. package/Instrumentation/sceneInstrumentation.js +2 -2
  298. package/Instrumentation/sceneInstrumentation.js.map +1 -1
  299. package/Layers/effectLayerSceneComponent.d.ts +2 -2
  300. package/Layers/effectLayerSceneComponent.js.map +1 -1
  301. package/Layers/glowLayer.d.ts +1 -1
  302. package/Layers/glowLayer.js +1 -1
  303. package/Layers/glowLayer.js.map +1 -1
  304. package/LensFlares/lensFlare.d.ts +3 -3
  305. package/LensFlares/lensFlare.js +3 -3
  306. package/LensFlares/lensFlare.js.map +1 -1
  307. package/LensFlares/lensFlareSystem.d.ts +2 -2
  308. package/LensFlares/lensFlareSystem.js +2 -2
  309. package/LensFlares/lensFlareSystem.js.map +1 -1
  310. package/LensFlares/lensFlareSystemSceneComponent.d.ts +1 -1
  311. package/LensFlares/lensFlareSystemSceneComponent.js.map +1 -1
  312. package/Lights/Shadows/shadowGenerator.d.ts +2 -2
  313. package/Lights/Shadows/shadowGenerator.js +2 -2
  314. package/Lights/Shadows/shadowGenerator.js.map +1 -1
  315. package/Lights/directionalLight.d.ts +2 -2
  316. package/Lights/directionalLight.js +2 -2
  317. package/Lights/directionalLight.js.map +1 -1
  318. package/Lights/hemisphericLight.d.ts +1 -1
  319. package/Lights/hemisphericLight.js +1 -1
  320. package/Lights/hemisphericLight.js.map +1 -1
  321. package/Lights/light.d.ts +1 -1
  322. package/Lights/light.js +1 -1
  323. package/Lights/light.js.map +1 -1
  324. package/Lights/pointLight.d.ts +2 -2
  325. package/Lights/pointLight.js +2 -2
  326. package/Lights/pointLight.js.map +1 -1
  327. package/Lights/spotLight.d.ts +2 -2
  328. package/Lights/spotLight.js +2 -2
  329. package/Lights/spotLight.js.map +1 -1
  330. package/Loading/loadingScreen.d.ts +2 -2
  331. package/Loading/loadingScreen.js +1 -1
  332. package/Loading/loadingScreen.js.map +1 -1
  333. package/Materials/Node/Blocks/Vertex/instancesBlock.d.ts +1 -1
  334. package/Materials/Node/Blocks/Vertex/instancesBlock.js +1 -1
  335. package/Materials/Node/Blocks/Vertex/instancesBlock.js.map +1 -1
  336. package/Materials/Node/Blocks/reciprocalBlock.js +6 -2
  337. package/Materials/Node/Blocks/reciprocalBlock.js.map +1 -1
  338. package/Materials/PBR/pbrBaseMaterial.d.ts +1 -1
  339. package/Materials/PBR/pbrBaseMaterial.js +1 -1
  340. package/Materials/PBR/pbrBaseMaterial.js.map +1 -1
  341. package/Materials/PBR/pbrMaterial.d.ts +1 -1
  342. package/Materials/PBR/pbrMaterial.js +1 -1
  343. package/Materials/PBR/pbrMaterial.js.map +1 -1
  344. package/Materials/Textures/Packer/packer.d.ts +1 -1
  345. package/Materials/Textures/Packer/packer.js +1 -1
  346. package/Materials/Textures/Packer/packer.js.map +1 -1
  347. package/Materials/Textures/Procedurals/customProceduralTexture.d.ts +2 -2
  348. package/Materials/Textures/Procedurals/customProceduralTexture.js +2 -2
  349. package/Materials/Textures/Procedurals/customProceduralTexture.js.map +1 -1
  350. package/Materials/Textures/Procedurals/proceduralTexture.d.ts +2 -2
  351. package/Materials/Textures/Procedurals/proceduralTexture.js +2 -2
  352. package/Materials/Textures/Procedurals/proceduralTexture.js.map +1 -1
  353. package/Materials/Textures/Procedurals/proceduralTextureSceneComponent.d.ts +1 -1
  354. package/Materials/Textures/Procedurals/proceduralTextureSceneComponent.js.map +1 -1
  355. package/Materials/Textures/cubeTexture.d.ts +2 -2
  356. package/Materials/Textures/cubeTexture.js +2 -2
  357. package/Materials/Textures/cubeTexture.js.map +1 -1
  358. package/Materials/Textures/dynamicTexture.d.ts +1 -1
  359. package/Materials/Textures/dynamicTexture.js +1 -1
  360. package/Materials/Textures/dynamicTexture.js.map +1 -1
  361. package/Materials/Textures/mirrorTexture.d.ts +3 -3
  362. package/Materials/Textures/mirrorTexture.js +3 -3
  363. package/Materials/Textures/mirrorTexture.js.map +1 -1
  364. package/Materials/Textures/refractionTexture.d.ts +3 -3
  365. package/Materials/Textures/refractionTexture.js +3 -3
  366. package/Materials/Textures/refractionTexture.js.map +1 -1
  367. package/Materials/Textures/texture.d.ts +10 -10
  368. package/Materials/Textures/texture.js +10 -10
  369. package/Materials/Textures/texture.js.map +1 -1
  370. package/Materials/Textures/videoTexture.d.ts +2 -2
  371. package/Materials/Textures/videoTexture.js +2 -2
  372. package/Materials/Textures/videoTexture.js.map +1 -1
  373. package/Materials/effect.d.ts +20 -2
  374. package/Materials/effect.js +28 -4
  375. package/Materials/effect.js.map +1 -1
  376. package/Materials/effectRenderer.js +1 -0
  377. package/Materials/effectRenderer.js.map +1 -1
  378. package/Materials/fresnelParameters.d.ts +1 -1
  379. package/Materials/fresnelParameters.js +1 -1
  380. package/Materials/fresnelParameters.js.map +1 -1
  381. package/Materials/material.d.ts +1 -1
  382. package/Materials/material.js.map +1 -1
  383. package/Materials/multiMaterial.d.ts +2 -2
  384. package/Materials/multiMaterial.js +2 -2
  385. package/Materials/multiMaterial.js.map +1 -1
  386. package/Materials/shaderMaterial.d.ts +2 -2
  387. package/Materials/shaderMaterial.js +2 -2
  388. package/Materials/shaderMaterial.js.map +1 -1
  389. package/Materials/shadowDepthWrapper.d.ts +1 -1
  390. package/Materials/shadowDepthWrapper.js +2 -2
  391. package/Materials/shadowDepthWrapper.js.map +1 -1
  392. package/Materials/standardMaterial.d.ts +18 -18
  393. package/Materials/standardMaterial.js +6 -6
  394. package/Materials/standardMaterial.js.map +1 -1
  395. package/Maths/math.path.d.ts +7 -7
  396. package/Maths/math.path.js +7 -7
  397. package/Maths/math.path.js.map +1 -1
  398. package/Maths/math.vector.d.ts +4 -4
  399. package/Maths/math.vector.js +4 -4
  400. package/Maths/math.vector.js.map +1 -1
  401. package/Meshes/Builders/boxBuilder.d.ts +3 -3
  402. package/Meshes/Builders/boxBuilder.js +3 -3
  403. package/Meshes/Builders/boxBuilder.js.map +1 -1
  404. package/Meshes/Builders/capsuleBuilder.d.ts +1 -1
  405. package/Meshes/Builders/capsuleBuilder.js +1 -1
  406. package/Meshes/Builders/capsuleBuilder.js.map +1 -1
  407. package/Meshes/Builders/cylinderBuilder.d.ts +2 -2
  408. package/Meshes/Builders/cylinderBuilder.js +2 -2
  409. package/Meshes/Builders/cylinderBuilder.js.map +1 -1
  410. package/Meshes/Builders/decalBuilder.d.ts +1 -1
  411. package/Meshes/Builders/decalBuilder.js +1 -1
  412. package/Meshes/Builders/decalBuilder.js.map +1 -1
  413. package/Meshes/Builders/discBuilder.d.ts +2 -2
  414. package/Meshes/Builders/discBuilder.js +2 -2
  415. package/Meshes/Builders/discBuilder.js.map +1 -1
  416. package/Meshes/Builders/geodesicBuilder.d.ts +1 -1
  417. package/Meshes/Builders/geodesicBuilder.js +1 -1
  418. package/Meshes/Builders/geodesicBuilder.js.map +1 -1
  419. package/Meshes/Builders/goldbergBuilder.d.ts +1 -1
  420. package/Meshes/Builders/goldbergBuilder.js +1 -1
  421. package/Meshes/Builders/goldbergBuilder.js.map +1 -1
  422. package/Meshes/Builders/groundBuilder.d.ts +4 -4
  423. package/Meshes/Builders/groundBuilder.js +4 -4
  424. package/Meshes/Builders/groundBuilder.js.map +1 -1
  425. package/Meshes/Builders/icoSphereBuilder.d.ts +2 -2
  426. package/Meshes/Builders/icoSphereBuilder.js +2 -2
  427. package/Meshes/Builders/icoSphereBuilder.js.map +1 -1
  428. package/Meshes/Builders/latheBuilder.d.ts +2 -2
  429. package/Meshes/Builders/latheBuilder.js +2 -2
  430. package/Meshes/Builders/latheBuilder.js.map +1 -1
  431. package/Meshes/Builders/linesBuilder.d.ts +6 -6
  432. package/Meshes/Builders/linesBuilder.js +6 -6
  433. package/Meshes/Builders/linesBuilder.js.map +1 -1
  434. package/Meshes/Builders/planeBuilder.d.ts +2 -2
  435. package/Meshes/Builders/planeBuilder.js +2 -2
  436. package/Meshes/Builders/planeBuilder.js.map +1 -1
  437. package/Meshes/Builders/polygonBuilder.d.ts +1 -1
  438. package/Meshes/Builders/polygonBuilder.js +1 -1
  439. package/Meshes/Builders/polygonBuilder.js.map +1 -1
  440. package/Meshes/Builders/polyhedronBuilder.d.ts +3 -3
  441. package/Meshes/Builders/polyhedronBuilder.js +3 -3
  442. package/Meshes/Builders/polyhedronBuilder.js.map +1 -1
  443. package/Meshes/Builders/ribbonBuilder.d.ts +4 -4
  444. package/Meshes/Builders/ribbonBuilder.js +4 -4
  445. package/Meshes/Builders/ribbonBuilder.js.map +1 -1
  446. package/Meshes/Builders/shapeBuilder.d.ts +9 -9
  447. package/Meshes/Builders/shapeBuilder.js +9 -9
  448. package/Meshes/Builders/shapeBuilder.js.map +1 -1
  449. package/Meshes/Builders/sphereBuilder.d.ts +2 -2
  450. package/Meshes/Builders/sphereBuilder.js +2 -2
  451. package/Meshes/Builders/sphereBuilder.js.map +1 -1
  452. package/Meshes/Builders/tiledBoxBuilder.d.ts +2 -2
  453. package/Meshes/Builders/tiledBoxBuilder.js +2 -2
  454. package/Meshes/Builders/tiledBoxBuilder.js.map +1 -1
  455. package/Meshes/Builders/tiledPlaneBuilder.d.ts +2 -2
  456. package/Meshes/Builders/tiledPlaneBuilder.js +2 -2
  457. package/Meshes/Builders/tiledPlaneBuilder.js.map +1 -1
  458. package/Meshes/Builders/torusBuilder.d.ts +2 -2
  459. package/Meshes/Builders/torusBuilder.js +2 -2
  460. package/Meshes/Builders/torusBuilder.js.map +1 -1
  461. package/Meshes/Builders/torusKnotBuilder.d.ts +2 -2
  462. package/Meshes/Builders/torusKnotBuilder.js +2 -2
  463. package/Meshes/Builders/torusKnotBuilder.js.map +1 -1
  464. package/Meshes/Builders/tubeBuilder.d.ts +4 -4
  465. package/Meshes/Builders/tubeBuilder.js +4 -4
  466. package/Meshes/Builders/tubeBuilder.js.map +1 -1
  467. package/Meshes/abstractMesh.d.ts +35 -35
  468. package/Meshes/abstractMesh.js +34 -34
  469. package/Meshes/abstractMesh.js.map +1 -1
  470. package/Meshes/instancedMesh.d.ts +3 -3
  471. package/Meshes/instancedMesh.js +1 -1
  472. package/Meshes/instancedMesh.js.map +1 -1
  473. package/Meshes/linesMesh.d.ts +2 -2
  474. package/Meshes/linesMesh.js +2 -2
  475. package/Meshes/linesMesh.js.map +1 -1
  476. package/Meshes/mesh.d.ts +36 -36
  477. package/Meshes/mesh.js +9 -17
  478. package/Meshes/mesh.js.map +1 -1
  479. package/Meshes/meshLODLevel.d.ts +1 -1
  480. package/Meshes/meshLODLevel.js +1 -1
  481. package/Meshes/meshLODLevel.js.map +1 -1
  482. package/Meshes/meshSimplification.d.ts +6 -6
  483. package/Meshes/meshSimplification.js +4 -4
  484. package/Meshes/meshSimplification.js.map +1 -1
  485. package/Meshes/meshSimplificationSceneComponent.d.ts +1 -1
  486. package/Meshes/meshSimplificationSceneComponent.js.map +1 -1
  487. package/Meshes/polygonMesh.d.ts +2 -2
  488. package/Meshes/polygonMesh.js +2 -2
  489. package/Meshes/polygonMesh.js.map +1 -1
  490. package/Meshes/transformNode.d.ts +1 -1
  491. package/Meshes/transformNode.js +1 -1
  492. package/Meshes/transformNode.js.map +1 -1
  493. package/Misc/assetsManager.d.ts +2 -2
  494. package/Misc/assetsManager.js +2 -2
  495. package/Misc/assetsManager.js.map +1 -1
  496. package/Misc/iInspectable.d.ts +1 -1
  497. package/Misc/iInspectable.js.map +1 -1
  498. package/Misc/sceneOptimizer.d.ts +12 -12
  499. package/Misc/sceneOptimizer.js +12 -12
  500. package/Misc/sceneOptimizer.js.map +1 -1
  501. package/Misc/screenshotTools.d.ts +10 -10
  502. package/Misc/screenshotTools.js +10 -10
  503. package/Misc/screenshotTools.js.map +1 -1
  504. package/Misc/tools.d.ts +4 -4
  505. package/Misc/tools.js +4 -4
  506. package/Misc/tools.js.map +1 -1
  507. package/Misc/videoRecorder.d.ts +1 -1
  508. package/Misc/videoRecorder.js +1 -1
  509. package/Misc/videoRecorder.js.map +1 -1
  510. package/Morph/morphTarget.d.ts +1 -1
  511. package/Morph/morphTarget.js +1 -1
  512. package/Morph/morphTarget.js.map +1 -1
  513. package/Morph/morphTargetManager.d.ts +1 -1
  514. package/Morph/morphTargetManager.js +1 -1
  515. package/Morph/morphTargetManager.js.map +1 -1
  516. package/Offline/IOfflineProvider.d.ts +1 -1
  517. package/Offline/IOfflineProvider.js.map +1 -1
  518. package/Offline/database.d.ts +1 -1
  519. package/Offline/database.js +1 -1
  520. package/Offline/database.js.map +1 -1
  521. package/Particles/IParticleSystem.d.ts +1 -1
  522. package/Particles/IParticleSystem.js.map +1 -1
  523. package/Particles/baseParticleSystem.d.ts +1 -1
  524. package/Particles/baseParticleSystem.js +1 -1
  525. package/Particles/baseParticleSystem.js.map +1 -1
  526. package/Particles/gpuParticleSystem.d.ts +1 -1
  527. package/Particles/gpuParticleSystem.js +1 -1
  528. package/Particles/gpuParticleSystem.js.map +1 -1
  529. package/Particles/particleSystem.d.ts +2 -2
  530. package/Particles/particleSystem.js +2 -2
  531. package/Particles/particleSystem.js.map +1 -1
  532. package/Particles/solidParticleSystem.d.ts +15 -15
  533. package/Particles/solidParticleSystem.js +13 -13
  534. package/Particles/solidParticleSystem.js.map +1 -1
  535. package/Physics/IPhysicsEngine.d.ts +1 -1
  536. package/Physics/IPhysicsEngine.js.map +1 -1
  537. package/Physics/Plugins/ammoJSPlugin.d.ts +1 -1
  538. package/Physics/Plugins/ammoJSPlugin.js +1 -1
  539. package/Physics/Plugins/ammoJSPlugin.js.map +1 -1
  540. package/Physics/physicsEngine.d.ts +1 -1
  541. package/Physics/physicsEngine.js +1 -1
  542. package/Physics/physicsEngine.js.map +1 -1
  543. package/Physics/physicsEngineComponent.d.ts +3 -3
  544. package/Physics/physicsEngineComponent.js +2 -2
  545. package/Physics/physicsEngineComponent.js.map +1 -1
  546. package/Physics/physicsHelper.d.ts +12 -12
  547. package/Physics/physicsHelper.js +6 -6
  548. package/Physics/physicsHelper.js.map +1 -1
  549. package/Physics/physicsImpostor.d.ts +3 -3
  550. package/Physics/physicsImpostor.js +1 -1
  551. package/Physics/physicsImpostor.js.map +1 -1
  552. package/Physics/physicsJoint.d.ts +9 -9
  553. package/Physics/physicsJoint.js +5 -5
  554. package/Physics/physicsJoint.js.map +1 -1
  555. package/Physics/physicsRaycastResult.d.ts +1 -1
  556. package/Physics/physicsRaycastResult.js +1 -1
  557. package/Physics/physicsRaycastResult.js.map +1 -1
  558. package/PostProcesses/RenderPipeline/Pipelines/defaultRenderingPipeline.d.ts +1 -1
  559. package/PostProcesses/RenderPipeline/Pipelines/defaultRenderingPipeline.js +1 -1
  560. package/PostProcesses/RenderPipeline/Pipelines/defaultRenderingPipeline.js.map +1 -1
  561. package/PostProcesses/RenderPipeline/Pipelines/standardRenderingPipeline.d.ts +1 -1
  562. package/PostProcesses/RenderPipeline/Pipelines/standardRenderingPipeline.js +1 -1
  563. package/PostProcesses/RenderPipeline/Pipelines/standardRenderingPipeline.js.map +1 -1
  564. package/PostProcesses/RenderPipeline/postProcessRenderEffect.d.ts +1 -1
  565. package/PostProcesses/RenderPipeline/postProcessRenderEffect.js +1 -1
  566. package/PostProcesses/RenderPipeline/postProcessRenderEffect.js.map +1 -1
  567. package/PostProcesses/RenderPipeline/postProcessRenderPipeline.d.ts +2 -2
  568. package/PostProcesses/RenderPipeline/postProcessRenderPipeline.js +1 -1
  569. package/PostProcesses/RenderPipeline/postProcessRenderPipeline.js.map +1 -1
  570. package/PostProcesses/RenderPipeline/postProcessRenderPipelineManager.d.ts +2 -2
  571. package/PostProcesses/RenderPipeline/postProcessRenderPipelineManager.js +2 -2
  572. package/PostProcesses/RenderPipeline/postProcessRenderPipelineManager.js.map +1 -1
  573. package/PostProcesses/RenderPipeline/postProcessRenderPipelineManagerSceneComponent.d.ts +2 -2
  574. package/PostProcesses/RenderPipeline/postProcessRenderPipelineManagerSceneComponent.js.map +1 -1
  575. package/PostProcesses/blackAndWhitePostProcess.d.ts +1 -1
  576. package/PostProcesses/blackAndWhitePostProcess.js +1 -1
  577. package/PostProcesses/blackAndWhitePostProcess.js.map +1 -1
  578. package/PostProcesses/fxaaPostProcess.d.ts +1 -1
  579. package/PostProcesses/fxaaPostProcess.js +1 -1
  580. package/PostProcesses/fxaaPostProcess.js.map +1 -1
  581. package/PostProcesses/highlightsPostProcess.d.ts +2 -2
  582. package/PostProcesses/highlightsPostProcess.js +2 -2
  583. package/PostProcesses/highlightsPostProcess.js.map +1 -1
  584. package/PostProcesses/imageProcessingPostProcess.d.ts +1 -1
  585. package/PostProcesses/imageProcessingPostProcess.js +1 -1
  586. package/PostProcesses/imageProcessingPostProcess.js.map +1 -1
  587. package/PostProcesses/postProcess.d.ts +2 -2
  588. package/PostProcesses/postProcess.js +1 -1
  589. package/PostProcesses/postProcess.js.map +1 -1
  590. package/PostProcesses/postProcessManager.d.ts +1 -1
  591. package/PostProcesses/postProcessManager.js +1 -1
  592. package/PostProcesses/postProcessManager.js.map +1 -1
  593. package/PostProcesses/refractionPostProcess.d.ts +2 -2
  594. package/PostProcesses/refractionPostProcess.js +2 -2
  595. package/PostProcesses/refractionPostProcess.js.map +1 -1
  596. package/Probes/reflectionProbe.d.ts +2 -2
  597. package/Probes/reflectionProbe.js +1 -1
  598. package/Probes/reflectionProbe.js.map +1 -1
  599. package/Rendering/geometryBufferRenderer.js +2 -2
  600. package/Rendering/geometryBufferRenderer.js.map +1 -1
  601. package/Sprites/sprite.d.ts +1 -1
  602. package/Sprites/sprite.js +1 -1
  603. package/Sprites/sprite.js.map +1 -1
  604. package/Sprites/spriteManager.d.ts +2 -2
  605. package/Sprites/spriteManager.js +1 -1
  606. package/Sprites/spriteManager.js.map +1 -1
  607. package/Sprites/spritePackedManager.d.ts +1 -1
  608. package/Sprites/spritePackedManager.js +1 -1
  609. package/Sprites/spritePackedManager.js.map +1 -1
  610. package/Sprites/spriteSceneComponent.d.ts +1 -1
  611. package/Sprites/spriteSceneComponent.js.map +1 -1
  612. package/Sprites/thinSprite.d.ts +1 -1
  613. package/Sprites/thinSprite.js +1 -1
  614. package/Sprites/thinSprite.js.map +1 -1
  615. package/XR/webXRCamera.d.ts +1 -1
  616. package/XR/webXRCamera.js +1 -1
  617. package/XR/webXRCamera.js.map +1 -1
  618. package/XR/webXRExperienceHelper.d.ts +1 -1
  619. package/XR/webXRExperienceHelper.js +1 -1
  620. package/XR/webXRExperienceHelper.js.map +1 -1
  621. package/XR/webXRInputSource.d.ts +1 -1
  622. package/XR/webXRInputSource.js +1 -1
  623. package/XR/webXRInputSource.js.map +1 -1
  624. package/XR/webXRSessionManager.d.ts +1 -1
  625. package/XR/webXRSessionManager.js +1 -1
  626. package/XR/webXRSessionManager.js.map +1 -1
  627. package/abstractScene.d.ts +9 -9
  628. package/abstractScene.js +9 -9
  629. package/abstractScene.js.map +1 -1
  630. package/node.d.ts +6 -6
  631. package/node.js +5 -5
  632. package/node.js.map +1 -1
  633. package/package.json +1 -1
  634. package/scene.d.ts +29 -24
  635. package/scene.js +24 -18
  636. package/scene.js.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"assetsManager.js","sourceRoot":"","sources":["../../../../../lts/core/generated/Misc/assetsManager.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AACtE,OAAO,EAAE,0BAA0B,EAAE,MAAM,kDAAkD,CAAC;AAC9F,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAGxC,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAErD;;GAEG;AACH,MAAM,CAAN,IAAY,cAiBX;AAjBD,WAAY,cAAc;IACtB;;OAEG;IACH,mDAAI,CAAA;IACJ;;OAEG;IACH,yDAAO,CAAA;IACP;;OAEG;IACH,mDAAI,CAAA;IACJ;;OAEG;IACH,qDAAK,CAAA;AACT,CAAC,EAjBW,cAAc,KAAd,cAAc,QAiBzB;AAED;;GAEG;AACH,MAAM,OAAgB,iBAAiB;IAWnC;;;OAGG;IACH;IACI;;OAEG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";\r\nimport type { AbstractMesh } from \"../Meshes/abstractMesh\";\r\nimport type { TransformNode } from \"../Meshes/transformNode\";\r\nimport type { IParticleSystem } from \"../Particles/IParticleSystem\";\r\nimport type { Skeleton } from \"../Bones/skeleton\";\r\nimport { SceneLoader } from \"../Loading/sceneLoader\";\r\nimport { Tools } from \"./tools\";\r\nimport { Observable } from \"./observable\";\r\nimport type { BaseTexture } from \"../Materials/Textures/baseTexture\";\r\nimport { Texture } from \"../Materials/Textures/texture\";\r\nimport { CubeTexture } from \"../Materials/Textures/cubeTexture\";\r\nimport { HDRCubeTexture } from \"../Materials/Textures/hdrCubeTexture\";\r\nimport { EquiRectangularCubeTexture } from \"../Materials/Textures/equiRectangularCubeTexture\";\r\nimport { Logger } from \"../Misc/logger\";\r\nimport type { AnimationGroup } from \"../Animations/animationGroup\";\r\nimport type { AssetContainer } from \"../assetContainer\";\r\nimport { EngineStore } from \"../Engines/engineStore\";\r\n\r\n/**\r\n * Defines the list of states available for a task inside a AssetsManager\r\n */\r\nexport enum AssetTaskState {\r\n /**\r\n * Initialization\r\n */\r\n INIT,\r\n /**\r\n * Running\r\n */\r\n RUNNING,\r\n /**\r\n * Done\r\n */\r\n DONE,\r\n /**\r\n * Error\r\n */\r\n ERROR,\r\n}\r\n\r\n/**\r\n * Define an abstract asset task used with a AssetsManager class to load assets into a scene\r\n */\r\nexport abstract class AbstractAssetTask {\r\n /**\r\n * Callback called when the task is successful\r\n */\r\n public onSuccess: (task: any) => void;\r\n\r\n /**\r\n * Callback called when the task is not successful\r\n */\r\n public onError: (task: any, message?: string, exception?: any) => void;\r\n\r\n /**\r\n * Creates a new AssetsManager\r\n * @param name defines the name of the task\r\n */\r\n constructor(\r\n /**\r\n * Task name\r\n */ public name: string\r\n ) {}\r\n\r\n private _isCompleted = false;\r\n private _taskState = AssetTaskState.INIT;\r\n private _errorObject: { message?: string; exception?: any };\r\n\r\n /**\r\n * Get if the task is completed\r\n */\r\n public get isCompleted(): boolean {\r\n return this._isCompleted;\r\n }\r\n\r\n /**\r\n * Gets the current state of the task\r\n */\r\n public get taskState(): AssetTaskState {\r\n return this._taskState;\r\n }\r\n\r\n /**\r\n * Gets the current error object (if task is in error)\r\n */\r\n public get errorObject(): { message?: string; exception?: any } {\r\n return this._errorObject;\r\n }\r\n\r\n /**\r\n * Internal only\r\n * @internal\r\n */\r\n public _setErrorObject(message?: string, exception?: any) {\r\n if (this._errorObject) {\r\n return;\r\n }\r\n\r\n this._errorObject = {\r\n message: message,\r\n exception: exception,\r\n };\r\n }\r\n\r\n /**\r\n * Execute the current task\r\n * @param scene defines the scene where you want your assets to be loaded\r\n * @param onSuccess is a callback called when the task is successfully executed\r\n * @param onError is a callback called if an error occurs\r\n */\r\n public run(scene: Scene, onSuccess: () => void, onError: (message?: string, exception?: any) => void) {\r\n this._taskState = AssetTaskState.RUNNING;\r\n this.runTask(\r\n scene,\r\n () => {\r\n this._onDoneCallback(onSuccess, onError);\r\n },\r\n (msg, exception) => {\r\n this._onErrorCallback(onError, msg, exception);\r\n }\r\n );\r\n }\r\n\r\n /**\r\n * Execute the current task\r\n * @param scene defines the scene where you want your assets to be loaded\r\n * @param onSuccess is a callback called when the task is successfully executed\r\n * @param onError is a callback called if an error occurs\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n public runTask(scene: Scene, onSuccess: () => void, onError: (message?: string, exception?: any) => void) {\r\n throw new Error(\"runTask is not implemented\");\r\n }\r\n\r\n /**\r\n * Reset will set the task state back to INIT, so the next load call of the assets manager will execute this task again.\r\n * This can be used with failed tasks that have the reason for failure fixed.\r\n */\r\n public reset() {\r\n this._taskState = AssetTaskState.INIT;\r\n }\r\n\r\n private _onErrorCallback(onError: (message?: string, exception?: any) => void, message?: string, exception?: any) {\r\n this._taskState = AssetTaskState.ERROR;\r\n\r\n this._errorObject = {\r\n message: message,\r\n exception: exception,\r\n };\r\n\r\n if (this.onError) {\r\n this.onError(this, message, exception);\r\n }\r\n\r\n onError();\r\n }\r\n\r\n private _onDoneCallback(onSuccess: () => void, onError: (message?: string, exception?: any) => void) {\r\n try {\r\n this._taskState = AssetTaskState.DONE;\r\n this._isCompleted = true;\r\n\r\n if (this.onSuccess) {\r\n this.onSuccess(this);\r\n }\r\n\r\n onSuccess();\r\n } catch (e) {\r\n this._onErrorCallback(onError, \"Task is done, error executing success callback(s)\", e);\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Define the interface used by progress events raised during assets loading\r\n */\r\nexport interface IAssetsProgressEvent {\r\n /**\r\n * Defines the number of remaining tasks to process\r\n */\r\n remainingCount: number;\r\n /**\r\n * Defines the total number of tasks\r\n */\r\n totalCount: number;\r\n /**\r\n * Defines the task that was just processed\r\n */\r\n task: AbstractAssetTask;\r\n}\r\n\r\n/**\r\n * Class used to share progress information about assets loading\r\n */\r\nexport class AssetsProgressEvent implements IAssetsProgressEvent {\r\n /**\r\n * Defines the number of remaining tasks to process\r\n */\r\n public remainingCount: number;\r\n /**\r\n * Defines the total number of tasks\r\n */\r\n public totalCount: number;\r\n /**\r\n * Defines the task that was just processed\r\n */\r\n public task: AbstractAssetTask;\r\n\r\n /**\r\n * Creates a AssetsProgressEvent\r\n * @param remainingCount defines the number of remaining tasks to process\r\n * @param totalCount defines the total number of tasks\r\n * @param task defines the task that was just processed\r\n */\r\n constructor(remainingCount: number, totalCount: number, task: AbstractAssetTask) {\r\n this.remainingCount = remainingCount;\r\n this.totalCount = totalCount;\r\n this.task = task;\r\n }\r\n}\r\n\r\n/**\r\n * Define a task used by AssetsManager to load assets into a container\r\n */\r\nexport class ContainerAssetTask extends AbstractAssetTask {\r\n /**\r\n * Get the loaded asset container\r\n */\r\n public loadedContainer: AssetContainer;\r\n /**\r\n * Gets the list of loaded transforms\r\n */\r\n public loadedTransformNodes: Array<TransformNode>;\r\n /**\r\n * Gets the list of loaded meshes\r\n */\r\n public loadedMeshes: Array<AbstractMesh>;\r\n /**\r\n * Gets the list of loaded particle systems\r\n */\r\n public loadedParticleSystems: Array<IParticleSystem>;\r\n /**\r\n * Gets the list of loaded skeletons\r\n */\r\n public loadedSkeletons: Array<Skeleton>;\r\n /**\r\n * Gets the list of loaded animation groups\r\n */\r\n public loadedAnimationGroups: Array<AnimationGroup>;\r\n\r\n /**\r\n * Callback called when the task is successful\r\n */\r\n public onSuccess: (task: ContainerAssetTask) => void;\r\n\r\n /**\r\n * Callback called when the task is successful\r\n */\r\n public onError: (task: ContainerAssetTask, message?: string, exception?: any) => void;\r\n\r\n /**\r\n * Creates a new ContainerAssetTask\r\n * @param name defines the name of the task\r\n * @param meshesNames defines the list of mesh's names you want to load\r\n * @param rootUrl defines the root url to use as a base to load your meshes and associated resources\r\n * @param sceneFilename defines the filename or File of the scene to load from\r\n */\r\n constructor(\r\n /**\r\n * Defines the name of the task\r\n */\r\n public name: string,\r\n /**\r\n * Defines the list of mesh's names you want to load\r\n */\r\n public meshesNames: any,\r\n /**\r\n * Defines the root url to use as a base to load your meshes and associated resources\r\n */\r\n public rootUrl: string,\r\n /**\r\n * Defines the filename or File of the scene to load from\r\n */\r\n public sceneFilename: string | File,\r\n /**\r\n * Defines the extension to use to load the scene (if not defined, \".babylon\" will be used)\r\n */\r\n public extension?: string\r\n ) {\r\n super(name);\r\n }\r\n\r\n /**\r\n * Execute the current task\r\n * @param scene defines the scene where you want your assets to be loaded\r\n * @param onSuccess is a callback called when the task is successfully executed\r\n * @param onError is a callback called if an error occurs\r\n */\r\n public runTask(scene: Scene, onSuccess: () => void, onError: (message?: string, exception?: any) => void) {\r\n SceneLoader.LoadAssetContainer(\r\n this.rootUrl,\r\n this.sceneFilename,\r\n scene,\r\n (container: AssetContainer) => {\r\n this.loadedContainer = container;\r\n this.loadedMeshes = container.meshes;\r\n this.loadedTransformNodes = container.transformNodes;\r\n this.loadedParticleSystems = container.particleSystems;\r\n this.loadedSkeletons = container.skeletons;\r\n this.loadedAnimationGroups = container.animationGroups;\r\n onSuccess();\r\n },\r\n null,\r\n (scene, message, exception) => {\r\n onError(message, exception);\r\n },\r\n this.extension\r\n );\r\n }\r\n}\r\n\r\n/**\r\n * Define a task used by AssetsManager to load meshes\r\n */\r\nexport class MeshAssetTask extends AbstractAssetTask {\r\n /**\r\n * Gets the list of loaded transforms\r\n */\r\n public loadedTransformNodes: Array<TransformNode>;\r\n /**\r\n * Gets the list of loaded meshes\r\n */\r\n public loadedMeshes: Array<AbstractMesh>;\r\n /**\r\n * Gets the list of loaded particle systems\r\n */\r\n public loadedParticleSystems: Array<IParticleSystem>;\r\n /**\r\n * Gets the list of loaded skeletons\r\n */\r\n public loadedSkeletons: Array<Skeleton>;\r\n /**\r\n * Gets the list of loaded animation groups\r\n */\r\n public loadedAnimationGroups: Array<AnimationGroup>;\r\n\r\n /**\r\n * Callback called when the task is successful\r\n */\r\n public onSuccess: (task: MeshAssetTask) => void;\r\n\r\n /**\r\n * Callback called when the task is successful\r\n */\r\n public onError: (task: MeshAssetTask, message?: string, exception?: any) => void;\r\n\r\n /**\r\n * Creates a new MeshAssetTask\r\n * @param name defines the name of the task\r\n * @param meshesNames defines the list of mesh's names you want to load\r\n * @param rootUrl defines the root url to use as a base to load your meshes and associated resources\r\n * @param sceneFilename defines the filename or File of the scene to load from\r\n */\r\n constructor(\r\n /**\r\n * Defines the name of the task\r\n */\r\n public name: string,\r\n /**\r\n * Defines the list of mesh's names you want to load\r\n */\r\n public meshesNames: any,\r\n /**\r\n * Defines the root url to use as a base to load your meshes and associated resources\r\n */\r\n public rootUrl: string,\r\n /**\r\n * Defines the filename or File of the scene to load from\r\n */\r\n public sceneFilename: string | File,\r\n /**\r\n * Defines the extension to use to load the scene (if not defined, \".babylon\" will be used)\r\n */\r\n public extension?: string\r\n ) {\r\n super(name);\r\n }\r\n\r\n /**\r\n * Execute the current task\r\n * @param scene defines the scene where you want your assets to be loaded\r\n * @param onSuccess is a callback called when the task is successfully executed\r\n * @param onError is a callback called if an error occurs\r\n */\r\n public runTask(scene: Scene, onSuccess: () => void, onError: (message?: string, exception?: any) => void) {\r\n SceneLoader.ImportMesh(\r\n this.meshesNames,\r\n this.rootUrl,\r\n this.sceneFilename,\r\n scene,\r\n (meshes: AbstractMesh[], particleSystems: IParticleSystem[], skeletons: Skeleton[], animationGroups: AnimationGroup[], transformNodes: TransformNode[]) => {\r\n this.loadedMeshes = meshes;\r\n this.loadedTransformNodes = transformNodes;\r\n this.loadedParticleSystems = particleSystems;\r\n this.loadedSkeletons = skeletons;\r\n this.loadedAnimationGroups = animationGroups;\r\n onSuccess();\r\n },\r\n null,\r\n (scene, message, exception) => {\r\n onError(message, exception);\r\n },\r\n this.extension\r\n );\r\n }\r\n}\r\n\r\n/**\r\n * Define a task used by AssetsManager to load text content\r\n */\r\nexport class TextFileAssetTask extends AbstractAssetTask {\r\n /**\r\n * Gets the loaded text string\r\n */\r\n public text: string;\r\n\r\n /**\r\n * Callback called when the task is successful\r\n */\r\n public onSuccess: (task: TextFileAssetTask) => void;\r\n\r\n /**\r\n * Callback called when the task is successful\r\n */\r\n public onError: (task: TextFileAssetTask, message?: string, exception?: any) => void;\r\n\r\n /**\r\n * Creates a new TextFileAssetTask object\r\n * @param name defines the name of the task\r\n * @param url defines the location of the file to load\r\n */\r\n constructor(\r\n /**\r\n * Defines the name of the task\r\n */\r\n public name: string,\r\n /**\r\n * Defines the location of the file to load\r\n */\r\n public url: string\r\n ) {\r\n super(name);\r\n }\r\n\r\n /**\r\n * Execute the current task\r\n * @param scene defines the scene where you want your assets to be loaded\r\n * @param onSuccess is a callback called when the task is successfully executed\r\n * @param onError is a callback called if an error occurs\r\n */\r\n public runTask(scene: Scene, onSuccess: () => void, onError: (message?: string, exception?: any) => void) {\r\n scene._loadFile(\r\n this.url,\r\n (data) => {\r\n this.text = data as string;\r\n onSuccess();\r\n },\r\n undefined,\r\n false,\r\n false,\r\n (request, exception) => {\r\n if (request) {\r\n onError(request.status + \" \" + request.statusText, exception);\r\n }\r\n }\r\n );\r\n }\r\n}\r\n\r\n/**\r\n * Define a task used by AssetsManager to load binary data\r\n */\r\nexport class BinaryFileAssetTask extends AbstractAssetTask {\r\n /**\r\n * Gets the loaded data (as an array buffer)\r\n */\r\n public data: ArrayBuffer;\r\n\r\n /**\r\n * Callback called when the task is successful\r\n */\r\n public onSuccess: (task: BinaryFileAssetTask) => void;\r\n /**\r\n * Callback called when the task is successful\r\n */\r\n public onError: (task: BinaryFileAssetTask, message?: string, exception?: any) => void;\r\n\r\n /**\r\n * Creates a new BinaryFileAssetTask object\r\n * @param name defines the name of the new task\r\n * @param url defines the location of the file to load\r\n */\r\n constructor(\r\n /**\r\n * Defines the name of the task\r\n */\r\n public name: string,\r\n /**\r\n * Defines the location of the file to load\r\n */\r\n public url: string\r\n ) {\r\n super(name);\r\n }\r\n\r\n /**\r\n * Execute the current task\r\n * @param scene defines the scene where you want your assets to be loaded\r\n * @param onSuccess is a callback called when the task is successfully executed\r\n * @param onError is a callback called if an error occurs\r\n */\r\n public runTask(scene: Scene, onSuccess: () => void, onError: (message?: string, exception?: any) => void) {\r\n scene._loadFile(\r\n this.url,\r\n (data) => {\r\n this.data = data as ArrayBuffer;\r\n onSuccess();\r\n },\r\n undefined,\r\n true,\r\n true,\r\n (request, exception) => {\r\n if (request) {\r\n onError(request.status + \" \" + request.statusText, exception);\r\n }\r\n }\r\n );\r\n }\r\n}\r\n\r\n/**\r\n * Define a task used by AssetsManager to load images\r\n */\r\nexport class ImageAssetTask extends AbstractAssetTask {\r\n /**\r\n * Gets the loaded images\r\n */\r\n public image: HTMLImageElement;\r\n\r\n /**\r\n * Callback called when the task is successful\r\n */\r\n public onSuccess: (task: ImageAssetTask) => void;\r\n /**\r\n * Callback called when the task is successful\r\n */\r\n public onError: (task: ImageAssetTask, message?: string, exception?: any) => void;\r\n\r\n /**\r\n * Creates a new ImageAssetTask\r\n * @param name defines the name of the task\r\n * @param url defines the location of the image to load\r\n */\r\n constructor(\r\n /**\r\n * Defines the name of the task\r\n */\r\n public name: string,\r\n /**\r\n * Defines the location of the image to load\r\n */\r\n public url: string\r\n ) {\r\n super(name);\r\n }\r\n\r\n /**\r\n * Execute the current task\r\n * @param scene defines the scene where you want your assets to be loaded\r\n * @param onSuccess is a callback called when the task is successfully executed\r\n * @param onError is a callback called if an error occurs\r\n */\r\n public runTask(scene: Scene, onSuccess: () => void, onError: (message?: string, exception?: any) => void) {\r\n const img = new Image();\r\n\r\n Tools.SetCorsBehavior(this.url, img);\r\n\r\n img.onload = () => {\r\n this.image = img;\r\n onSuccess();\r\n };\r\n\r\n img.onerror = (err: string | Event): any => {\r\n onError(\"Error loading image\", err);\r\n };\r\n\r\n img.src = this.url;\r\n }\r\n}\r\n\r\n/**\r\n * Defines the interface used by texture loading tasks\r\n */\r\nexport interface ITextureAssetTask<TEX extends BaseTexture> {\r\n /**\r\n * Gets the loaded texture\r\n */\r\n texture: TEX;\r\n}\r\n\r\n/**\r\n * Define a task used by AssetsManager to load 2D textures\r\n */\r\nexport class TextureAssetTask extends AbstractAssetTask implements ITextureAssetTask<Texture> {\r\n /**\r\n * Gets the loaded texture\r\n */\r\n public texture: Texture;\r\n\r\n /**\r\n * Callback called when the task is successful\r\n */\r\n public onSuccess: (task: TextureAssetTask) => void;\r\n /**\r\n * Callback called when the task is successful\r\n */\r\n public onError: (task: TextureAssetTask, message?: string, exception?: any) => void;\r\n\r\n /**\r\n * Creates a new TextureAssetTask object\r\n * @param name defines the name of the task\r\n * @param url defines the location of the file to load\r\n * @param noMipmap defines if mipmap should not be generated (default is false)\r\n * @param invertY defines if texture must be inverted on Y axis (default is true)\r\n * @param samplingMode defines the sampling mode to use (default is Texture.TRILINEAR_SAMPLINGMODE)\r\n */\r\n constructor(\r\n /**\r\n * Defines the name of the task\r\n */\r\n public name: string,\r\n /**\r\n * Defines the location of the file to load\r\n */\r\n public url: string,\r\n /**\r\n * Defines if mipmap should not be generated (default is false)\r\n */\r\n public noMipmap?: boolean,\r\n /**\r\n * Defines if texture must be inverted on Y axis (default is true)\r\n */\r\n public invertY: boolean = true,\r\n /**\r\n * Defines the sampling mode to use (default is Texture.TRILINEAR_SAMPLINGMODE)\r\n */\r\n public samplingMode: number = Texture.TRILINEAR_SAMPLINGMODE\r\n ) {\r\n super(name);\r\n }\r\n\r\n /**\r\n * Execute the current task\r\n * @param scene defines the scene where you want your assets to be loaded\r\n * @param onSuccess is a callback called when the task is successfully executed\r\n * @param onError is a callback called if an error occurs\r\n */\r\n public runTask(scene: Scene, onSuccess: () => void, onError: (message?: string, exception?: any) => void) {\r\n const onload = () => {\r\n onSuccess();\r\n };\r\n\r\n const onerror = (message?: string, exception?: any) => {\r\n onError(message, exception);\r\n };\r\n\r\n this.texture = new Texture(this.url, scene, this.noMipmap, this.invertY, this.samplingMode, onload, onerror);\r\n }\r\n}\r\n\r\n/**\r\n * Define a task used by AssetsManager to load cube textures\r\n */\r\nexport class CubeTextureAssetTask extends AbstractAssetTask implements ITextureAssetTask<CubeTexture> {\r\n /**\r\n * Gets the loaded texture\r\n */\r\n public texture: CubeTexture;\r\n\r\n /**\r\n * Callback called when the task is successful\r\n */\r\n public onSuccess: (task: CubeTextureAssetTask) => void;\r\n /**\r\n * Callback called when the task is successful\r\n */\r\n public onError: (task: CubeTextureAssetTask, message?: string, exception?: any) => void;\r\n\r\n /**\r\n * Creates a new CubeTextureAssetTask\r\n * @param name defines the name of the task\r\n * @param url defines the location of the files to load (You have to specify the folder where the files are + filename with no extension)\r\n * @param extensions defines the extensions to use to load files ([\"_px\", \"_py\", \"_pz\", \"_nx\", \"_ny\", \"_nz\"] by default)\r\n * @param noMipmap defines if mipmaps should not be generated (default is false)\r\n * @param files defines the explicit list of files (undefined by default)\r\n * @param prefiltered\r\n */\r\n constructor(\r\n /**\r\n * Defines the name of the task\r\n */\r\n public name: string,\r\n /**\r\n * Defines the location of the files to load (You have to specify the folder where the files are + filename with no extension)\r\n */\r\n public url: string,\r\n /**\r\n * Defines the extensions to use to load files ([\"_px\", \"_py\", \"_pz\", \"_nx\", \"_ny\", \"_nz\"] by default)\r\n */\r\n public extensions?: string[],\r\n /**\r\n * Defines if mipmaps should not be generated (default is false)\r\n */\r\n public noMipmap?: boolean,\r\n /**\r\n * Defines the explicit list of files (undefined by default)\r\n */\r\n public files?: string[],\r\n /**\r\n * Defines the prefiltered texture option (default is false)\r\n */\r\n public prefiltered?: boolean\r\n ) {\r\n super(name);\r\n }\r\n\r\n /**\r\n * Execute the current task\r\n * @param scene defines the scene where you want your assets to be loaded\r\n * @param onSuccess is a callback called when the task is successfully executed\r\n * @param onError is a callback called if an error occurs\r\n */\r\n public runTask(scene: Scene, onSuccess: () => void, onError: (message?: string, exception?: any) => void) {\r\n const onload = () => {\r\n onSuccess();\r\n };\r\n\r\n const onerror = (message?: string, exception?: any) => {\r\n onError(message, exception);\r\n };\r\n\r\n this.texture = new CubeTexture(this.url, scene, this.extensions, this.noMipmap, this.files, onload, onerror, undefined, this.prefiltered);\r\n }\r\n}\r\n\r\n/**\r\n * Define a task used by AssetsManager to load HDR cube textures\r\n */\r\nexport class HDRCubeTextureAssetTask extends AbstractAssetTask implements ITextureAssetTask<HDRCubeTexture> {\r\n /**\r\n * Gets the loaded texture\r\n */\r\n public texture: HDRCubeTexture;\r\n\r\n /**\r\n * Callback called when the task is successful\r\n */\r\n public onSuccess: (task: HDRCubeTextureAssetTask) => void;\r\n /**\r\n * Callback called when the task is successful\r\n */\r\n public onError: (task: HDRCubeTextureAssetTask, message?: string, exception?: any) => void;\r\n\r\n /**\r\n * Creates a new HDRCubeTextureAssetTask object\r\n * @param name defines the name of the task\r\n * @param url defines the location of the file to load\r\n * @param size defines the desired size (the more it increases the longer the generation will be) If the size is omitted this implies you are using a preprocessed cubemap.\r\n * @param noMipmap defines if mipmaps should not be generated (default is false)\r\n * @param generateHarmonics specifies whether you want to extract the polynomial harmonics during the generation process (default is true)\r\n * @param gammaSpace specifies if the texture will be use in gamma or linear space (the PBR material requires those texture in linear space, but the standard material would require them in Gamma space) (default is false)\r\n * @param reserved Internal use only\r\n */\r\n constructor(\r\n /**\r\n * Defines the name of the task\r\n */\r\n public name: string,\r\n /**\r\n * Defines the location of the file to load\r\n */\r\n public url: string,\r\n /**\r\n * Defines the desired size (the more it increases the longer the generation will be)\r\n */\r\n public size: number,\r\n /**\r\n * Defines if mipmaps should not be generated (default is false)\r\n */\r\n public noMipmap = false,\r\n /**\r\n * Specifies whether you want to extract the polynomial harmonics during the generation process (default is true)\r\n */\r\n public generateHarmonics = true,\r\n /**\r\n * Specifies if the texture will be use in gamma or linear space (the PBR material requires those texture in linear space, but the standard material would require them in Gamma space) (default is false)\r\n */\r\n public gammaSpace = false,\r\n /**\r\n * Internal Use Only\r\n */\r\n public reserved = false\r\n ) {\r\n super(name);\r\n }\r\n\r\n /**\r\n * Execute the current task\r\n * @param scene defines the scene where you want your assets to be loaded\r\n * @param onSuccess is a callback called when the task is successfully executed\r\n * @param onError is a callback called if an error occurs\r\n */\r\n public runTask(scene: Scene, onSuccess: () => void, onError: (message?: string, exception?: any) => void) {\r\n const onload = () => {\r\n onSuccess();\r\n };\r\n\r\n const onerror = (message?: string, exception?: any) => {\r\n onError(message, exception);\r\n };\r\n\r\n this.texture = new HDRCubeTexture(this.url, scene, this.size, this.noMipmap, this.generateHarmonics, this.gammaSpace, this.reserved, onload, onerror);\r\n }\r\n}\r\n\r\n/**\r\n * Define a task used by AssetsManager to load Equirectangular cube textures\r\n */\r\nexport class EquiRectangularCubeTextureAssetTask extends AbstractAssetTask implements ITextureAssetTask<EquiRectangularCubeTexture> {\r\n /**\r\n * Gets the loaded texture\r\n */\r\n public texture: EquiRectangularCubeTexture;\r\n\r\n /**\r\n * Callback called when the task is successful\r\n */\r\n public onSuccess: (task: EquiRectangularCubeTextureAssetTask) => void;\r\n /**\r\n * Callback called when the task is successful\r\n */\r\n public onError: (task: EquiRectangularCubeTextureAssetTask, message?: string, exception?: any) => void;\r\n\r\n /**\r\n * Creates a new EquiRectangularCubeTextureAssetTask object\r\n * @param name defines the name of the task\r\n * @param url defines the location of the file to load\r\n * @param size defines the desired size (the more it increases the longer the generation will be)\r\n * If the size is omitted this implies you are using a preprocessed cubemap.\r\n * @param noMipmap defines if mipmaps should not be generated (default is false)\r\n * @param gammaSpace specifies if the texture will be used in gamma or linear space\r\n * (the PBR material requires those texture in linear space, but the standard material would require them in Gamma space)\r\n * (default is true)\r\n */\r\n constructor(\r\n /**\r\n * Defines the name of the task\r\n */\r\n public name: string,\r\n /**\r\n * Defines the location of the file to load\r\n */\r\n public url: string,\r\n /**\r\n * Defines the desired size (the more it increases the longer the generation will be)\r\n */\r\n public size: number,\r\n /**\r\n * Defines if mipmaps should not be generated (default is false)\r\n */\r\n public noMipmap: boolean = false,\r\n /**\r\n * Specifies if the texture will be use in gamma or linear space (the PBR material requires those texture in linear space,\r\n * but the standard material would require them in Gamma space) (default is true)\r\n */\r\n public gammaSpace: boolean = true\r\n ) {\r\n super(name);\r\n }\r\n\r\n /**\r\n * Execute the current task\r\n * @param scene defines the scene where you want your assets to be loaded\r\n * @param onSuccess is a callback called when the task is successfully executed\r\n * @param onError is a callback called if an error occurs\r\n */\r\n public runTask(scene: Scene, onSuccess: () => void, onError: (message?: string, exception?: any) => void): void {\r\n const onload = () => {\r\n onSuccess();\r\n };\r\n\r\n const onerror = (message?: string, exception?: any) => {\r\n onError(message, exception);\r\n };\r\n\r\n this.texture = new EquiRectangularCubeTexture(this.url, scene, this.size, this.noMipmap, this.gammaSpace, onload, onerror);\r\n }\r\n}\r\n\r\n/**\r\n * This class can be used to easily import assets into a scene\r\n * @see https://doc.babylonjs.com/how_to/how_to_use_assetsmanager\r\n */\r\nexport class AssetsManager {\r\n private _scene: Scene;\r\n private _isLoading = false;\r\n\r\n protected _tasks = new Array<AbstractAssetTask>();\r\n protected _waitingTasksCount = 0;\r\n protected _totalTasksCount = 0;\r\n\r\n /**\r\n * Callback called when all tasks are processed\r\n */\r\n public onFinish: (tasks: AbstractAssetTask[]) => void;\r\n\r\n /**\r\n * Callback called when a task is successful\r\n */\r\n public onTaskSuccess: (task: AbstractAssetTask) => void;\r\n\r\n /**\r\n * Callback called when a task had an error\r\n */\r\n public onTaskError: (task: AbstractAssetTask) => void;\r\n\r\n /**\r\n * Callback called when a task is done (whatever the result is)\r\n */\r\n public onProgress: (remainingCount: number, totalCount: number, task: AbstractAssetTask) => void;\r\n\r\n /**\r\n * Observable called when all tasks are processed\r\n */\r\n public onTaskSuccessObservable = new Observable<AbstractAssetTask>();\r\n\r\n /**\r\n * Observable called when a task had an error\r\n */\r\n public onTaskErrorObservable = new Observable<AbstractAssetTask>();\r\n\r\n /**\r\n * Observable called when all tasks were executed\r\n */\r\n public onTasksDoneObservable = new Observable<AbstractAssetTask[]>();\r\n\r\n /**\r\n * Observable called when a task is done (whatever the result is)\r\n */\r\n public onProgressObservable = new Observable<IAssetsProgressEvent>();\r\n\r\n /**\r\n * Gets or sets a boolean defining if the AssetsManager should use the default loading screen\r\n * @see https://doc.babylonjs.com/how_to/creating_a_custom_loading_screen\r\n */\r\n public useDefaultLoadingScreen = true;\r\n\r\n /**\r\n * Gets or sets a boolean defining if the AssetsManager should automatically hide the loading screen\r\n * when all assets have been downloaded.\r\n * If set to false, you need to manually call in hideLoadingUI() once your scene is ready.\r\n */\r\n public autoHideLoadingUI = true;\r\n\r\n /**\r\n * Creates a new AssetsManager\r\n * @param scene defines the scene to work on\r\n */\r\n constructor(scene?: Scene) {\r\n this._scene = scene || <Scene>EngineStore.LastCreatedScene;\r\n }\r\n\r\n /**\r\n * Add a ContainerAssetTask to the list of active tasks\r\n * @param taskName defines the name of the new task\r\n * @param meshesNames defines the name of meshes to load\r\n * @param rootUrl defines the root url to use to locate files\r\n * @param sceneFilename defines the filename of the scene file or the File itself\r\n * @param extension defines the extension to use to load the file\r\n * @returns a new ContainerAssetTask object\r\n */\r\n public addContainerTask(taskName: string, meshesNames: any, rootUrl: string, sceneFilename: string | File, extension?: string): ContainerAssetTask {\r\n const task = new ContainerAssetTask(taskName, meshesNames, rootUrl, sceneFilename, extension);\r\n this._tasks.push(task);\r\n\r\n return task;\r\n }\r\n\r\n /**\r\n * Add a MeshAssetTask to the list of active tasks\r\n * @param taskName defines the name of the new task\r\n * @param meshesNames defines the name of meshes to load\r\n * @param rootUrl defines the root url to use to locate files\r\n * @param sceneFilename defines the filename of the scene file or the File itself\r\n * @param extension defines the extension to use to load the file\r\n * @returns a new MeshAssetTask object\r\n */\r\n public addMeshTask(taskName: string, meshesNames: any, rootUrl: string, sceneFilename: string | File, extension?: string): MeshAssetTask {\r\n const task = new MeshAssetTask(taskName, meshesNames, rootUrl, sceneFilename, extension);\r\n this._tasks.push(task);\r\n\r\n return task;\r\n }\r\n\r\n /**\r\n * Add a TextFileAssetTask to the list of active tasks\r\n * @param taskName defines the name of the new task\r\n * @param url defines the url of the file to load\r\n * @returns a new TextFileAssetTask object\r\n */\r\n public addTextFileTask(taskName: string, url: string): TextFileAssetTask {\r\n const task = new TextFileAssetTask(taskName, url);\r\n this._tasks.push(task);\r\n\r\n return task;\r\n }\r\n\r\n /**\r\n * Add a BinaryFileAssetTask to the list of active tasks\r\n * @param taskName defines the name of the new task\r\n * @param url defines the url of the file to load\r\n * @returns a new BinaryFileAssetTask object\r\n */\r\n public addBinaryFileTask(taskName: string, url: string): BinaryFileAssetTask {\r\n const task = new BinaryFileAssetTask(taskName, url);\r\n this._tasks.push(task);\r\n\r\n return task;\r\n }\r\n\r\n /**\r\n * Add a ImageAssetTask to the list of active tasks\r\n * @param taskName defines the name of the new task\r\n * @param url defines the url of the file to load\r\n * @returns a new ImageAssetTask object\r\n */\r\n public addImageTask(taskName: string, url: string): ImageAssetTask {\r\n const task = new ImageAssetTask(taskName, url);\r\n this._tasks.push(task);\r\n\r\n return task;\r\n }\r\n\r\n /**\r\n * Add a TextureAssetTask to the list of active tasks\r\n * @param taskName defines the name of the new task\r\n * @param url defines the url of the file to load\r\n * @param noMipmap defines if the texture must not receive mipmaps (false by default)\r\n * @param invertY defines if you want to invert Y axis of the loaded texture (false by default)\r\n * @param samplingMode defines the sampling mode to use (Texture.TRILINEAR_SAMPLINGMODE by default)\r\n * @returns a new TextureAssetTask object\r\n */\r\n public addTextureTask(taskName: string, url: string, noMipmap?: boolean, invertY?: boolean, samplingMode: number = Texture.TRILINEAR_SAMPLINGMODE): TextureAssetTask {\r\n const task = new TextureAssetTask(taskName, url, noMipmap, invertY, samplingMode);\r\n this._tasks.push(task);\r\n\r\n return task;\r\n }\r\n\r\n /**\r\n * Add a CubeTextureAssetTask to the list of active tasks\r\n * @param taskName defines the name of the new task\r\n * @param url defines the url of the file to load\r\n * @param extensions defines the extension to use to load the cube map (can be null)\r\n * @param noMipmap defines if the texture must not receive mipmaps (false by default)\r\n * @param files defines the list of files to load (can be null)\r\n * @param prefiltered defines the prefiltered texture option (default is false)\r\n * @returns a new CubeTextureAssetTask object\r\n */\r\n public addCubeTextureTask(taskName: string, url: string, extensions?: string[], noMipmap?: boolean, files?: string[], prefiltered?: boolean): CubeTextureAssetTask {\r\n const task = new CubeTextureAssetTask(taskName, url, extensions, noMipmap, files, prefiltered);\r\n this._tasks.push(task);\r\n\r\n return task;\r\n }\r\n\r\n /**\r\n *\r\n * Add a HDRCubeTextureAssetTask to the list of active tasks\r\n * @param taskName defines the name of the new task\r\n * @param url defines the url of the file to load\r\n * @param size defines the size you want for the cubemap (can be null)\r\n * @param noMipmap defines if the texture must not receive mipmaps (false by default)\r\n * @param generateHarmonics defines if you want to automatically generate (true by default)\r\n * @param gammaSpace specifies if the texture will be use in gamma or linear space (the PBR material requires those texture in linear space, but the standard material would require them in Gamma space) (default is false)\r\n * @param reserved Internal use only\r\n * @returns a new HDRCubeTextureAssetTask object\r\n */\r\n public addHDRCubeTextureTask(\r\n taskName: string,\r\n url: string,\r\n size: number,\r\n noMipmap = false,\r\n generateHarmonics = true,\r\n gammaSpace = false,\r\n reserved = false\r\n ): HDRCubeTextureAssetTask {\r\n const task = new HDRCubeTextureAssetTask(taskName, url, size, noMipmap, generateHarmonics, gammaSpace, reserved);\r\n this._tasks.push(task);\r\n\r\n return task;\r\n }\r\n\r\n /**\r\n *\r\n * Add a EquiRectangularCubeTextureAssetTask to the list of active tasks\r\n * @param taskName defines the name of the new task\r\n * @param url defines the url of the file to load\r\n * @param size defines the size you want for the cubemap (can be null)\r\n * @param noMipmap defines if the texture must not receive mipmaps (false by default)\r\n * @param gammaSpace Specifies if the texture will be used in gamma or linear space\r\n * (the PBR material requires those textures in linear space, but the standard material would require them in Gamma space)\r\n * @returns a new EquiRectangularCubeTextureAssetTask object\r\n */\r\n public addEquiRectangularCubeTextureAssetTask(taskName: string, url: string, size: number, noMipmap = false, gammaSpace = true): EquiRectangularCubeTextureAssetTask {\r\n const task = new EquiRectangularCubeTextureAssetTask(taskName, url, size, noMipmap, gammaSpace);\r\n this._tasks.push(task);\r\n\r\n return task;\r\n }\r\n\r\n /**\r\n * Remove a task from the assets manager.\r\n * @param task the task to remove\r\n */\r\n public removeTask(task: AbstractAssetTask) {\r\n const index = this._tasks.indexOf(task);\r\n\r\n if (index > -1) {\r\n this._tasks.splice(index, 1);\r\n }\r\n }\r\n\r\n private _decreaseWaitingTasksCount(task: AbstractAssetTask): void {\r\n this._waitingTasksCount--;\r\n\r\n try {\r\n if (this.onProgress) {\r\n this.onProgress(this._waitingTasksCount, this._totalTasksCount, task);\r\n }\r\n\r\n this.onProgressObservable.notifyObservers(new AssetsProgressEvent(this._waitingTasksCount, this._totalTasksCount, task));\r\n } catch (e) {\r\n Logger.Error(\"Error running progress callbacks.\");\r\n console.log(e);\r\n }\r\n\r\n if (this._waitingTasksCount === 0) {\r\n try {\r\n const currentTasks = this._tasks.slice();\r\n\r\n if (this.onFinish) {\r\n // Calling onFinish with immutable array of tasks\r\n this.onFinish(currentTasks);\r\n }\r\n\r\n // Let's remove successful tasks\r\n for (const task of currentTasks) {\r\n if (task.taskState === AssetTaskState.DONE) {\r\n const index = this._tasks.indexOf(task);\r\n\r\n if (index > -1) {\r\n this._tasks.splice(index, 1);\r\n }\r\n }\r\n }\r\n\r\n this.onTasksDoneObservable.notifyObservers(this._tasks);\r\n } catch (e) {\r\n Logger.Error(\"Error running tasks-done callbacks.\");\r\n console.log(e);\r\n }\r\n this._isLoading = false;\r\n if (this.autoHideLoadingUI) {\r\n this._scene.getEngine().hideLoadingUI();\r\n }\r\n }\r\n }\r\n\r\n private _runTask(task: AbstractAssetTask): void {\r\n const done = () => {\r\n try {\r\n if (this.onTaskSuccess) {\r\n this.onTaskSuccess(task);\r\n }\r\n this.onTaskSuccessObservable.notifyObservers(task);\r\n this._decreaseWaitingTasksCount(task);\r\n } catch (e) {\r\n error(\"Error executing task success callbacks\", e);\r\n }\r\n };\r\n\r\n const error = (message?: string, exception?: any) => {\r\n task._setErrorObject(message, exception);\r\n\r\n if (this.onTaskError) {\r\n this.onTaskError(task);\r\n } else if (!task.onError) {\r\n Logger.Error(this._formatTaskErrorMessage(task));\r\n }\r\n this.onTaskErrorObservable.notifyObservers(task);\r\n this._decreaseWaitingTasksCount(task);\r\n };\r\n\r\n task.run(this._scene, done, error);\r\n }\r\n\r\n private _formatTaskErrorMessage(task: AbstractAssetTask) {\r\n let errorMessage = \"Unable to complete task \" + task.name;\r\n\r\n if (task.errorObject.message) {\r\n errorMessage += `: ${task.errorObject.message}`;\r\n }\r\n if (task.errorObject.exception) {\r\n errorMessage += `: ${task.errorObject.exception}`;\r\n }\r\n\r\n return errorMessage;\r\n }\r\n\r\n /**\r\n * Reset the AssetsManager and remove all tasks\r\n * @returns the current instance of the AssetsManager\r\n */\r\n public reset(): AssetsManager {\r\n this._isLoading = false;\r\n this._tasks = new Array<AbstractAssetTask>();\r\n return this;\r\n }\r\n\r\n /**\r\n * Start the loading process\r\n * @returns the current instance of the AssetsManager\r\n */\r\n public load(): AssetsManager {\r\n if (this._isLoading) {\r\n return this;\r\n }\r\n this._isLoading = true;\r\n this._waitingTasksCount = this._tasks.length;\r\n this._totalTasksCount = this._tasks.length;\r\n\r\n if (this._waitingTasksCount === 0) {\r\n this._isLoading = false;\r\n if (this.onFinish) {\r\n this.onFinish(this._tasks);\r\n }\r\n this.onTasksDoneObservable.notifyObservers(this._tasks);\r\n return this;\r\n }\r\n\r\n if (this.useDefaultLoadingScreen) {\r\n this._scene.getEngine().displayLoadingUI();\r\n }\r\n\r\n for (let index = 0; index < this._tasks.length; index++) {\r\n const task = this._tasks[index];\r\n if (task.taskState === AssetTaskState.INIT) {\r\n this._runTask(task);\r\n }\r\n }\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Start the loading process as an async operation\r\n * @returns a promise returning the list of failed tasks\r\n */\r\n public loadAsync(): Promise<void> {\r\n return new Promise((resolve, reject) => {\r\n if (this._isLoading) {\r\n resolve();\r\n return;\r\n }\r\n this.onTasksDoneObservable.addOnce((remainingTasks) => {\r\n if (remainingTasks && remainingTasks.length) {\r\n reject(remainingTasks);\r\n } else {\r\n resolve();\r\n }\r\n });\r\n\r\n this.load();\r\n });\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"assetsManager.js","sourceRoot":"","sources":["../../../../../lts/core/generated/Misc/assetsManager.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AACtE,OAAO,EAAE,0BAA0B,EAAE,MAAM,kDAAkD,CAAC;AAC9F,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAGxC,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAErD;;GAEG;AACH,MAAM,CAAN,IAAY,cAiBX;AAjBD,WAAY,cAAc;IACtB;;OAEG;IACH,mDAAI,CAAA;IACJ;;OAEG;IACH,yDAAO,CAAA;IACP;;OAEG;IACH,mDAAI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H,OAAO,EAAE,CAAC;iBACb;YACL,CAAC,CAAC,CAAC;YAEH,IAAI,CAAC,IAAI,EAAE,CAAC;QAChB,CAAC,CAAC,CAAC;IACP,CAAC;CACJ","sourcesContent":["import type { Scene } from \"../scene\";\r\nimport type { AbstractMesh } from \"../Meshes/abstractMesh\";\r\nimport type { TransformNode } from \"../Meshes/transformNode\";\r\nimport type { IParticleSystem } from \"../Particles/IParticleSystem\";\r\nimport type { Skeleton } from \"../Bones/skeleton\";\r\nimport { SceneLoader } from \"../Loading/sceneLoader\";\r\nimport { Tools } from \"./tools\";\r\nimport { Observable } from \"./observable\";\r\nimport type { BaseTexture } from \"../Materials/Textures/baseTexture\";\r\nimport { Texture } from \"../Materials/Textures/texture\";\r\nimport { CubeTexture } from \"../Materials/Textures/cubeTexture\";\r\nimport { HDRCubeTexture } from \"../Materials/Textures/hdrCubeTexture\";\r\nimport { EquiRectangularCubeTexture } from \"../Materials/Textures/equiRectangularCubeTexture\";\r\nimport { Logger } from \"../Misc/logger\";\r\nimport type { AnimationGroup } from \"../Animations/animationGroup\";\r\nimport type { AssetContainer } from \"../assetContainer\";\r\nimport { EngineStore } from \"../Engines/engineStore\";\r\n\r\n/**\r\n * Defines the list of states available for a task inside a AssetsManager\r\n */\r\nexport enum AssetTaskState {\r\n /**\r\n * Initialization\r\n */\r\n INIT,\r\n /**\r\n * Running\r\n */\r\n RUNNING,\r\n /**\r\n * Done\r\n */\r\n DONE,\r\n /**\r\n * Error\r\n */\r\n ERROR,\r\n}\r\n\r\n/**\r\n * Define an abstract asset task used with a AssetsManager class to load assets into a scene\r\n */\r\nexport abstract class AbstractAssetTask {\r\n /**\r\n * Callback called when the task is successful\r\n */\r\n public onSuccess: (task: any) => void;\r\n\r\n /**\r\n * Callback called when the task is not successful\r\n */\r\n public onError: (task: any, message?: string, exception?: any) => void;\r\n\r\n /**\r\n * Creates a new AssetsManager\r\n * @param name defines the name of the task\r\n */\r\n constructor(\r\n /**\r\n * Task name\r\n */ public name: string\r\n ) {}\r\n\r\n private _isCompleted = false;\r\n private _taskState = AssetTaskState.INIT;\r\n private _errorObject: { message?: string; exception?: any };\r\n\r\n /**\r\n * Get if the task is completed\r\n */\r\n public get isCompleted(): boolean {\r\n return this._isCompleted;\r\n }\r\n\r\n /**\r\n * Gets the current state of the task\r\n */\r\n public get taskState(): AssetTaskState {\r\n return this._taskState;\r\n }\r\n\r\n /**\r\n * Gets the current error object (if task is in error)\r\n */\r\n public get errorObject(): { message?: string; exception?: any } {\r\n return this._errorObject;\r\n }\r\n\r\n /**\r\n * Internal only\r\n * @internal\r\n */\r\n public _setErrorObject(message?: string, exception?: any) {\r\n if (this._errorObject) {\r\n return;\r\n }\r\n\r\n this._errorObject = {\r\n message: message,\r\n exception: exception,\r\n };\r\n }\r\n\r\n /**\r\n * Execute the current task\r\n * @param scene defines the scene where you want your assets to be loaded\r\n * @param onSuccess is a callback called when the task is successfully executed\r\n * @param onError is a callback called if an error occurs\r\n */\r\n public run(scene: Scene, onSuccess: () => void, onError: (message?: string, exception?: any) => void) {\r\n this._taskState = AssetTaskState.RUNNING;\r\n this.runTask(\r\n scene,\r\n () => {\r\n this._onDoneCallback(onSuccess, onError);\r\n },\r\n (msg, exception) => {\r\n this._onErrorCallback(onError, msg, exception);\r\n }\r\n );\r\n }\r\n\r\n /**\r\n * Execute the current task\r\n * @param scene defines the scene where you want your assets to be loaded\r\n * @param onSuccess is a callback called when the task is successfully executed\r\n * @param onError is a callback called if an error occurs\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n public runTask(scene: Scene, onSuccess: () => void, onError: (message?: string, exception?: any) => void) {\r\n throw new Error(\"runTask is not implemented\");\r\n }\r\n\r\n /**\r\n * Reset will set the task state back to INIT, so the next load call of the assets manager will execute this task again.\r\n * This can be used with failed tasks that have the reason for failure fixed.\r\n */\r\n public reset() {\r\n this._taskState = AssetTaskState.INIT;\r\n }\r\n\r\n private _onErrorCallback(onError: (message?: string, exception?: any) => void, message?: string, exception?: any) {\r\n this._taskState = AssetTaskState.ERROR;\r\n\r\n this._errorObject = {\r\n message: message,\r\n exception: exception,\r\n };\r\n\r\n if (this.onError) {\r\n this.onError(this, message, exception);\r\n }\r\n\r\n onError();\r\n }\r\n\r\n private _onDoneCallback(onSuccess: () => void, onError: (message?: string, exception?: any) => void) {\r\n try {\r\n this._taskState = AssetTaskState.DONE;\r\n this._isCompleted = true;\r\n\r\n if (this.onSuccess) {\r\n this.onSuccess(this);\r\n }\r\n\r\n onSuccess();\r\n } catch (e) {\r\n this._onErrorCallback(onError, \"Task is done, error executing success callback(s)\", e);\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Define the interface used by progress events raised during assets loading\r\n */\r\nexport interface IAssetsProgressEvent {\r\n /**\r\n * Defines the number of remaining tasks to process\r\n */\r\n remainingCount: number;\r\n /**\r\n * Defines the total number of tasks\r\n */\r\n totalCount: number;\r\n /**\r\n * Defines the task that was just processed\r\n */\r\n task: AbstractAssetTask;\r\n}\r\n\r\n/**\r\n * Class used to share progress information about assets loading\r\n */\r\nexport class AssetsProgressEvent implements IAssetsProgressEvent {\r\n /**\r\n * Defines the number of remaining tasks to process\r\n */\r\n public remainingCount: number;\r\n /**\r\n * Defines the total number of tasks\r\n */\r\n public totalCount: number;\r\n /**\r\n * Defines the task that was just processed\r\n */\r\n public task: AbstractAssetTask;\r\n\r\n /**\r\n * Creates a AssetsProgressEvent\r\n * @param remainingCount defines the number of remaining tasks to process\r\n * @param totalCount defines the total number of tasks\r\n * @param task defines the task that was just processed\r\n */\r\n constructor(remainingCount: number, totalCount: number, task: AbstractAssetTask) {\r\n this.remainingCount = remainingCount;\r\n this.totalCount = totalCount;\r\n this.task = task;\r\n }\r\n}\r\n\r\n/**\r\n * Define a task used by AssetsManager to load assets into a container\r\n */\r\nexport class ContainerAssetTask extends AbstractAssetTask {\r\n /**\r\n * Get the loaded asset container\r\n */\r\n public loadedContainer: AssetContainer;\r\n /**\r\n * Gets the list of loaded transforms\r\n */\r\n public loadedTransformNodes: Array<TransformNode>;\r\n /**\r\n * Gets the list of loaded meshes\r\n */\r\n public loadedMeshes: Array<AbstractMesh>;\r\n /**\r\n * Gets the list of loaded particle systems\r\n */\r\n public loadedParticleSystems: Array<IParticleSystem>;\r\n /**\r\n * Gets the list of loaded skeletons\r\n */\r\n public loadedSkeletons: Array<Skeleton>;\r\n /**\r\n * Gets the list of loaded animation groups\r\n */\r\n public loadedAnimationGroups: Array<AnimationGroup>;\r\n\r\n /**\r\n * Callback called when the task is successful\r\n */\r\n public onSuccess: (task: ContainerAssetTask) => void;\r\n\r\n /**\r\n * Callback called when the task is successful\r\n */\r\n public onError: (task: ContainerAssetTask, message?: string, exception?: any) => void;\r\n\r\n /**\r\n * Creates a new ContainerAssetTask\r\n * @param name defines the name of the task\r\n * @param meshesNames defines the list of mesh's names you want to load\r\n * @param rootUrl defines the root url to use as a base to load your meshes and associated resources\r\n * @param sceneFilename defines the filename or File of the scene to load from\r\n */\r\n constructor(\r\n /**\r\n * Defines the name of the task\r\n */\r\n public name: string,\r\n /**\r\n * Defines the list of mesh's names you want to load\r\n */\r\n public meshesNames: any,\r\n /**\r\n * Defines the root url to use as a base to load your meshes and associated resources\r\n */\r\n public rootUrl: string,\r\n /**\r\n * Defines the filename or File of the scene to load from\r\n */\r\n public sceneFilename: string | File,\r\n /**\r\n * Defines the extension to use to load the scene (if not defined, \".babylon\" will be used)\r\n */\r\n public extension?: string\r\n ) {\r\n super(name);\r\n }\r\n\r\n /**\r\n * Execute the current task\r\n * @param scene defines the scene where you want your assets to be loaded\r\n * @param onSuccess is a callback called when the task is successfully executed\r\n * @param onError is a callback called if an error occurs\r\n */\r\n public runTask(scene: Scene, onSuccess: () => void, onError: (message?: string, exception?: any) => void) {\r\n SceneLoader.LoadAssetContainer(\r\n this.rootUrl,\r\n this.sceneFilename,\r\n scene,\r\n (container: AssetContainer) => {\r\n this.loadedContainer = container;\r\n this.loadedMeshes = container.meshes;\r\n this.loadedTransformNodes = container.transformNodes;\r\n this.loadedParticleSystems = container.particleSystems;\r\n this.loadedSkeletons = container.skeletons;\r\n this.loadedAnimationGroups = container.animationGroups;\r\n onSuccess();\r\n },\r\n null,\r\n (scene, message, exception) => {\r\n onError(message, exception);\r\n },\r\n this.extension\r\n );\r\n }\r\n}\r\n\r\n/**\r\n * Define a task used by AssetsManager to load meshes\r\n */\r\nexport class MeshAssetTask extends AbstractAssetTask {\r\n /**\r\n * Gets the list of loaded transforms\r\n */\r\n public loadedTransformNodes: Array<TransformNode>;\r\n /**\r\n * Gets the list of loaded meshes\r\n */\r\n public loadedMeshes: Array<AbstractMesh>;\r\n /**\r\n * Gets the list of loaded particle systems\r\n */\r\n public loadedParticleSystems: Array<IParticleSystem>;\r\n /**\r\n * Gets the list of loaded skeletons\r\n */\r\n public loadedSkeletons: Array<Skeleton>;\r\n /**\r\n * Gets the list of loaded animation groups\r\n */\r\n public loadedAnimationGroups: Array<AnimationGroup>;\r\n\r\n /**\r\n * Callback called when the task is successful\r\n */\r\n public onSuccess: (task: MeshAssetTask) => void;\r\n\r\n /**\r\n * Callback called when the task is successful\r\n */\r\n public onError: (task: MeshAssetTask, message?: string, exception?: any) => void;\r\n\r\n /**\r\n * Creates a new MeshAssetTask\r\n * @param name defines the name of the task\r\n * @param meshesNames defines the list of mesh's names you want to load\r\n * @param rootUrl defines the root url to use as a base to load your meshes and associated resources\r\n * @param sceneFilename defines the filename or File of the scene to load from\r\n */\r\n constructor(\r\n /**\r\n * Defines the name of the task\r\n */\r\n public name: string,\r\n /**\r\n * Defines the list of mesh's names you want to load\r\n */\r\n public meshesNames: any,\r\n /**\r\n * Defines the root url to use as a base to load your meshes and associated resources\r\n */\r\n public rootUrl: string,\r\n /**\r\n * Defines the filename or File of the scene to load from\r\n */\r\n public sceneFilename: string | File,\r\n /**\r\n * Defines the extension to use to load the scene (if not defined, \".babylon\" will be used)\r\n */\r\n public extension?: string\r\n ) {\r\n super(name);\r\n }\r\n\r\n /**\r\n * Execute the current task\r\n * @param scene defines the scene where you want your assets to be loaded\r\n * @param onSuccess is a callback called when the task is successfully executed\r\n * @param onError is a callback called if an error occurs\r\n */\r\n public runTask(scene: Scene, onSuccess: () => void, onError: (message?: string, exception?: any) => void) {\r\n SceneLoader.ImportMesh(\r\n this.meshesNames,\r\n this.rootUrl,\r\n this.sceneFilename,\r\n scene,\r\n (meshes: AbstractMesh[], particleSystems: IParticleSystem[], skeletons: Skeleton[], animationGroups: AnimationGroup[], transformNodes: TransformNode[]) => {\r\n this.loadedMeshes = meshes;\r\n this.loadedTransformNodes = transformNodes;\r\n this.loadedParticleSystems = particleSystems;\r\n this.loadedSkeletons = skeletons;\r\n this.loadedAnimationGroups = animationGroups;\r\n onSuccess();\r\n },\r\n null,\r\n (scene, message, exception) => {\r\n onError(message, exception);\r\n },\r\n this.extension\r\n );\r\n }\r\n}\r\n\r\n/**\r\n * Define a task used by AssetsManager to load text content\r\n */\r\nexport class TextFileAssetTask extends AbstractAssetTask {\r\n /**\r\n * Gets the loaded text string\r\n */\r\n public text: string;\r\n\r\n /**\r\n * Callback called when the task is successful\r\n */\r\n public onSuccess: (task: TextFileAssetTask) => void;\r\n\r\n /**\r\n * Callback called when the task is successful\r\n */\r\n public onError: (task: TextFileAssetTask, message?: string, exception?: any) => void;\r\n\r\n /**\r\n * Creates a new TextFileAssetTask object\r\n * @param name defines the name of the task\r\n * @param url defines the location of the file to load\r\n */\r\n constructor(\r\n /**\r\n * Defines the name of the task\r\n */\r\n public name: string,\r\n /**\r\n * Defines the location of the file to load\r\n */\r\n public url: string\r\n ) {\r\n super(name);\r\n }\r\n\r\n /**\r\n * Execute the current task\r\n * @param scene defines the scene where you want your assets to be loaded\r\n * @param onSuccess is a callback called when the task is successfully executed\r\n * @param onError is a callback called if an error occurs\r\n */\r\n public runTask(scene: Scene, onSuccess: () => void, onError: (message?: string, exception?: any) => void) {\r\n scene._loadFile(\r\n this.url,\r\n (data) => {\r\n this.text = data as string;\r\n onSuccess();\r\n },\r\n undefined,\r\n false,\r\n false,\r\n (request, exception) => {\r\n if (request) {\r\n onError(request.status + \" \" + request.statusText, exception);\r\n }\r\n }\r\n );\r\n }\r\n}\r\n\r\n/**\r\n * Define a task used by AssetsManager to load binary data\r\n */\r\nexport class BinaryFileAssetTask extends AbstractAssetTask {\r\n /**\r\n * Gets the loaded data (as an array buffer)\r\n */\r\n public data: ArrayBuffer;\r\n\r\n /**\r\n * Callback called when the task is successful\r\n */\r\n public onSuccess: (task: BinaryFileAssetTask) => void;\r\n /**\r\n * Callback called when the task is successful\r\n */\r\n public onError: (task: BinaryFileAssetTask, message?: string, exception?: any) => void;\r\n\r\n /**\r\n * Creates a new BinaryFileAssetTask object\r\n * @param name defines the name of the new task\r\n * @param url defines the location of the file to load\r\n */\r\n constructor(\r\n /**\r\n * Defines the name of the task\r\n */\r\n public name: string,\r\n /**\r\n * Defines the location of the file to load\r\n */\r\n public url: string\r\n ) {\r\n super(name);\r\n }\r\n\r\n /**\r\n * Execute the current task\r\n * @param scene defines the scene where you want your assets to be loaded\r\n * @param onSuccess is a callback called when the task is successfully executed\r\n * @param onError is a callback called if an error occurs\r\n */\r\n public runTask(scene: Scene, onSuccess: () => void, onError: (message?: string, exception?: any) => void) {\r\n scene._loadFile(\r\n this.url,\r\n (data) => {\r\n this.data = data as ArrayBuffer;\r\n onSuccess();\r\n },\r\n undefined,\r\n true,\r\n true,\r\n (request, exception) => {\r\n if (request) {\r\n onError(request.status + \" \" + request.statusText, exception);\r\n }\r\n }\r\n );\r\n }\r\n}\r\n\r\n/**\r\n * Define a task used by AssetsManager to load images\r\n */\r\nexport class ImageAssetTask extends AbstractAssetTask {\r\n /**\r\n * Gets the loaded images\r\n */\r\n public image: HTMLImageElement;\r\n\r\n /**\r\n * Callback called when the task is successful\r\n */\r\n public onSuccess: (task: ImageAssetTask) => void;\r\n /**\r\n * Callback called when the task is successful\r\n */\r\n public onError: (task: ImageAssetTask, message?: string, exception?: any) => void;\r\n\r\n /**\r\n * Creates a new ImageAssetTask\r\n * @param name defines the name of the task\r\n * @param url defines the location of the image to load\r\n */\r\n constructor(\r\n /**\r\n * Defines the name of the task\r\n */\r\n public name: string,\r\n /**\r\n * Defines the location of the image to load\r\n */\r\n public url: string\r\n ) {\r\n super(name);\r\n }\r\n\r\n /**\r\n * Execute the current task\r\n * @param scene defines the scene where you want your assets to be loaded\r\n * @param onSuccess is a callback called when the task is successfully executed\r\n * @param onError is a callback called if an error occurs\r\n */\r\n public runTask(scene: Scene, onSuccess: () => void, onError: (message?: string, exception?: any) => void) {\r\n const img = new Image();\r\n\r\n Tools.SetCorsBehavior(this.url, img);\r\n\r\n img.onload = () => {\r\n this.image = img;\r\n onSuccess();\r\n };\r\n\r\n img.onerror = (err: string | Event): any => {\r\n onError(\"Error loading image\", err);\r\n };\r\n\r\n img.src = this.url;\r\n }\r\n}\r\n\r\n/**\r\n * Defines the interface used by texture loading tasks\r\n */\r\nexport interface ITextureAssetTask<TEX extends BaseTexture> {\r\n /**\r\n * Gets the loaded texture\r\n */\r\n texture: TEX;\r\n}\r\n\r\n/**\r\n * Define a task used by AssetsManager to load 2D textures\r\n */\r\nexport class TextureAssetTask extends AbstractAssetTask implements ITextureAssetTask<Texture> {\r\n /**\r\n * Gets the loaded texture\r\n */\r\n public texture: Texture;\r\n\r\n /**\r\n * Callback called when the task is successful\r\n */\r\n public onSuccess: (task: TextureAssetTask) => void;\r\n /**\r\n * Callback called when the task is successful\r\n */\r\n public onError: (task: TextureAssetTask, message?: string, exception?: any) => void;\r\n\r\n /**\r\n * Creates a new TextureAssetTask object\r\n * @param name defines the name of the task\r\n * @param url defines the location of the file to load\r\n * @param noMipmap defines if mipmap should not be generated (default is false)\r\n * @param invertY defines if texture must be inverted on Y axis (default is true)\r\n * @param samplingMode defines the sampling mode to use (default is Texture.TRILINEAR_SAMPLINGMODE)\r\n */\r\n constructor(\r\n /**\r\n * Defines the name of the task\r\n */\r\n public name: string,\r\n /**\r\n * Defines the location of the file to load\r\n */\r\n public url: string,\r\n /**\r\n * Defines if mipmap should not be generated (default is false)\r\n */\r\n public noMipmap?: boolean,\r\n /**\r\n * Defines if texture must be inverted on Y axis (default is true)\r\n */\r\n public invertY: boolean = true,\r\n /**\r\n * Defines the sampling mode to use (default is Texture.TRILINEAR_SAMPLINGMODE)\r\n */\r\n public samplingMode: number = Texture.TRILINEAR_SAMPLINGMODE\r\n ) {\r\n super(name);\r\n }\r\n\r\n /**\r\n * Execute the current task\r\n * @param scene defines the scene where you want your assets to be loaded\r\n * @param onSuccess is a callback called when the task is successfully executed\r\n * @param onError is a callback called if an error occurs\r\n */\r\n public runTask(scene: Scene, onSuccess: () => void, onError: (message?: string, exception?: any) => void) {\r\n const onload = () => {\r\n onSuccess();\r\n };\r\n\r\n const onerror = (message?: string, exception?: any) => {\r\n onError(message, exception);\r\n };\r\n\r\n this.texture = new Texture(this.url, scene, this.noMipmap, this.invertY, this.samplingMode, onload, onerror);\r\n }\r\n}\r\n\r\n/**\r\n * Define a task used by AssetsManager to load cube textures\r\n */\r\nexport class CubeTextureAssetTask extends AbstractAssetTask implements ITextureAssetTask<CubeTexture> {\r\n /**\r\n * Gets the loaded texture\r\n */\r\n public texture: CubeTexture;\r\n\r\n /**\r\n * Callback called when the task is successful\r\n */\r\n public onSuccess: (task: CubeTextureAssetTask) => void;\r\n /**\r\n * Callback called when the task is successful\r\n */\r\n public onError: (task: CubeTextureAssetTask, message?: string, exception?: any) => void;\r\n\r\n /**\r\n * Creates a new CubeTextureAssetTask\r\n * @param name defines the name of the task\r\n * @param url defines the location of the files to load (You have to specify the folder where the files are + filename with no extension)\r\n * @param extensions defines the extensions to use to load files ([\"_px\", \"_py\", \"_pz\", \"_nx\", \"_ny\", \"_nz\"] by default)\r\n * @param noMipmap defines if mipmaps should not be generated (default is false)\r\n * @param files defines the explicit list of files (undefined by default)\r\n * @param prefiltered\r\n */\r\n constructor(\r\n /**\r\n * Defines the name of the task\r\n */\r\n public name: string,\r\n /**\r\n * Defines the location of the files to load (You have to specify the folder where the files are + filename with no extension)\r\n */\r\n public url: string,\r\n /**\r\n * Defines the extensions to use to load files ([\"_px\", \"_py\", \"_pz\", \"_nx\", \"_ny\", \"_nz\"] by default)\r\n */\r\n public extensions?: string[],\r\n /**\r\n * Defines if mipmaps should not be generated (default is false)\r\n */\r\n public noMipmap?: boolean,\r\n /**\r\n * Defines the explicit list of files (undefined by default)\r\n */\r\n public files?: string[],\r\n /**\r\n * Defines the prefiltered texture option (default is false)\r\n */\r\n public prefiltered?: boolean\r\n ) {\r\n super(name);\r\n }\r\n\r\n /**\r\n * Execute the current task\r\n * @param scene defines the scene where you want your assets to be loaded\r\n * @param onSuccess is a callback called when the task is successfully executed\r\n * @param onError is a callback called if an error occurs\r\n */\r\n public runTask(scene: Scene, onSuccess: () => void, onError: (message?: string, exception?: any) => void) {\r\n const onload = () => {\r\n onSuccess();\r\n };\r\n\r\n const onerror = (message?: string, exception?: any) => {\r\n onError(message, exception);\r\n };\r\n\r\n this.texture = new CubeTexture(this.url, scene, this.extensions, this.noMipmap, this.files, onload, onerror, undefined, this.prefiltered);\r\n }\r\n}\r\n\r\n/**\r\n * Define a task used by AssetsManager to load HDR cube textures\r\n */\r\nexport class HDRCubeTextureAssetTask extends AbstractAssetTask implements ITextureAssetTask<HDRCubeTexture> {\r\n /**\r\n * Gets the loaded texture\r\n */\r\n public texture: HDRCubeTexture;\r\n\r\n /**\r\n * Callback called when the task is successful\r\n */\r\n public onSuccess: (task: HDRCubeTextureAssetTask) => void;\r\n /**\r\n * Callback called when the task is successful\r\n */\r\n public onError: (task: HDRCubeTextureAssetTask, message?: string, exception?: any) => void;\r\n\r\n /**\r\n * Creates a new HDRCubeTextureAssetTask object\r\n * @param name defines the name of the task\r\n * @param url defines the location of the file to load\r\n * @param size defines the desired size (the more it increases the longer the generation will be) If the size is omitted this implies you are using a preprocessed cubemap.\r\n * @param noMipmap defines if mipmaps should not be generated (default is false)\r\n * @param generateHarmonics specifies whether you want to extract the polynomial harmonics during the generation process (default is true)\r\n * @param gammaSpace specifies if the texture will be use in gamma or linear space (the PBR material requires those texture in linear space, but the standard material would require them in Gamma space) (default is false)\r\n * @param reserved Internal use only\r\n */\r\n constructor(\r\n /**\r\n * Defines the name of the task\r\n */\r\n public name: string,\r\n /**\r\n * Defines the location of the file to load\r\n */\r\n public url: string,\r\n /**\r\n * Defines the desired size (the more it increases the longer the generation will be)\r\n */\r\n public size: number,\r\n /**\r\n * Defines if mipmaps should not be generated (default is false)\r\n */\r\n public noMipmap = false,\r\n /**\r\n * Specifies whether you want to extract the polynomial harmonics during the generation process (default is true)\r\n */\r\n public generateHarmonics = true,\r\n /**\r\n * Specifies if the texture will be use in gamma or linear space (the PBR material requires those texture in linear space, but the standard material would require them in Gamma space) (default is false)\r\n */\r\n public gammaSpace = false,\r\n /**\r\n * Internal Use Only\r\n */\r\n public reserved = false\r\n ) {\r\n super(name);\r\n }\r\n\r\n /**\r\n * Execute the current task\r\n * @param scene defines the scene where you want your assets to be loaded\r\n * @param onSuccess is a callback called when the task is successfully executed\r\n * @param onError is a callback called if an error occurs\r\n */\r\n public runTask(scene: Scene, onSuccess: () => void, onError: (message?: string, exception?: any) => void) {\r\n const onload = () => {\r\n onSuccess();\r\n };\r\n\r\n const onerror = (message?: string, exception?: any) => {\r\n onError(message, exception);\r\n };\r\n\r\n this.texture = new HDRCubeTexture(this.url, scene, this.size, this.noMipmap, this.generateHarmonics, this.gammaSpace, this.reserved, onload, onerror);\r\n }\r\n}\r\n\r\n/**\r\n * Define a task used by AssetsManager to load Equirectangular cube textures\r\n */\r\nexport class EquiRectangularCubeTextureAssetTask extends AbstractAssetTask implements ITextureAssetTask<EquiRectangularCubeTexture> {\r\n /**\r\n * Gets the loaded texture\r\n */\r\n public texture: EquiRectangularCubeTexture;\r\n\r\n /**\r\n * Callback called when the task is successful\r\n */\r\n public onSuccess: (task: EquiRectangularCubeTextureAssetTask) => void;\r\n /**\r\n * Callback called when the task is successful\r\n */\r\n public onError: (task: EquiRectangularCubeTextureAssetTask, message?: string, exception?: any) => void;\r\n\r\n /**\r\n * Creates a new EquiRectangularCubeTextureAssetTask object\r\n * @param name defines the name of the task\r\n * @param url defines the location of the file to load\r\n * @param size defines the desired size (the more it increases the longer the generation will be)\r\n * If the size is omitted this implies you are using a preprocessed cubemap.\r\n * @param noMipmap defines if mipmaps should not be generated (default is false)\r\n * @param gammaSpace specifies if the texture will be used in gamma or linear space\r\n * (the PBR material requires those texture in linear space, but the standard material would require them in Gamma space)\r\n * (default is true)\r\n */\r\n constructor(\r\n /**\r\n * Defines the name of the task\r\n */\r\n public name: string,\r\n /**\r\n * Defines the location of the file to load\r\n */\r\n public url: string,\r\n /**\r\n * Defines the desired size (the more it increases the longer the generation will be)\r\n */\r\n public size: number,\r\n /**\r\n * Defines if mipmaps should not be generated (default is false)\r\n */\r\n public noMipmap: boolean = false,\r\n /**\r\n * Specifies if the texture will be use in gamma or linear space (the PBR material requires those texture in linear space,\r\n * but the standard material would require them in Gamma space) (default is true)\r\n */\r\n public gammaSpace: boolean = true\r\n ) {\r\n super(name);\r\n }\r\n\r\n /**\r\n * Execute the current task\r\n * @param scene defines the scene where you want your assets to be loaded\r\n * @param onSuccess is a callback called when the task is successfully executed\r\n * @param onError is a callback called if an error occurs\r\n */\r\n public runTask(scene: Scene, onSuccess: () => void, onError: (message?: string, exception?: any) => void): void {\r\n const onload = () => {\r\n onSuccess();\r\n };\r\n\r\n const onerror = (message?: string, exception?: any) => {\r\n onError(message, exception);\r\n };\r\n\r\n this.texture = new EquiRectangularCubeTexture(this.url, scene, this.size, this.noMipmap, this.gammaSpace, onload, onerror);\r\n }\r\n}\r\n\r\n/**\r\n * This class can be used to easily import assets into a scene\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/importers/assetManager\r\n */\r\nexport class AssetsManager {\r\n private _scene: Scene;\r\n private _isLoading = false;\r\n\r\n protected _tasks = new Array<AbstractAssetTask>();\r\n protected _waitingTasksCount = 0;\r\n protected _totalTasksCount = 0;\r\n\r\n /**\r\n * Callback called when all tasks are processed\r\n */\r\n public onFinish: (tasks: AbstractAssetTask[]) => void;\r\n\r\n /**\r\n * Callback called when a task is successful\r\n */\r\n public onTaskSuccess: (task: AbstractAssetTask) => void;\r\n\r\n /**\r\n * Callback called when a task had an error\r\n */\r\n public onTaskError: (task: AbstractAssetTask) => void;\r\n\r\n /**\r\n * Callback called when a task is done (whatever the result is)\r\n */\r\n public onProgress: (remainingCount: number, totalCount: number, task: AbstractAssetTask) => void;\r\n\r\n /**\r\n * Observable called when all tasks are processed\r\n */\r\n public onTaskSuccessObservable = new Observable<AbstractAssetTask>();\r\n\r\n /**\r\n * Observable called when a task had an error\r\n */\r\n public onTaskErrorObservable = new Observable<AbstractAssetTask>();\r\n\r\n /**\r\n * Observable called when all tasks were executed\r\n */\r\n public onTasksDoneObservable = new Observable<AbstractAssetTask[]>();\r\n\r\n /**\r\n * Observable called when a task is done (whatever the result is)\r\n */\r\n public onProgressObservable = new Observable<IAssetsProgressEvent>();\r\n\r\n /**\r\n * Gets or sets a boolean defining if the AssetsManager should use the default loading screen\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/scene/customLoadingScreen\r\n */\r\n public useDefaultLoadingScreen = true;\r\n\r\n /**\r\n * Gets or sets a boolean defining if the AssetsManager should automatically hide the loading screen\r\n * when all assets have been downloaded.\r\n * If set to false, you need to manually call in hideLoadingUI() once your scene is ready.\r\n */\r\n public autoHideLoadingUI = true;\r\n\r\n /**\r\n * Creates a new AssetsManager\r\n * @param scene defines the scene to work on\r\n */\r\n constructor(scene?: Scene) {\r\n this._scene = scene || <Scene>EngineStore.LastCreatedScene;\r\n }\r\n\r\n /**\r\n * Add a ContainerAssetTask to the list of active tasks\r\n * @param taskName defines the name of the new task\r\n * @param meshesNames defines the name of meshes to load\r\n * @param rootUrl defines the root url to use to locate files\r\n * @param sceneFilename defines the filename of the scene file or the File itself\r\n * @param extension defines the extension to use to load the file\r\n * @returns a new ContainerAssetTask object\r\n */\r\n public addContainerTask(taskName: string, meshesNames: any, rootUrl: string, sceneFilename: string | File, extension?: string): ContainerAssetTask {\r\n const task = new ContainerAssetTask(taskName, meshesNames, rootUrl, sceneFilename, extension);\r\n this._tasks.push(task);\r\n\r\n return task;\r\n }\r\n\r\n /**\r\n * Add a MeshAssetTask to the list of active tasks\r\n * @param taskName defines the name of the new task\r\n * @param meshesNames defines the name of meshes to load\r\n * @param rootUrl defines the root url to use to locate files\r\n * @param sceneFilename defines the filename of the scene file or the File itself\r\n * @param extension defines the extension to use to load the file\r\n * @returns a new MeshAssetTask object\r\n */\r\n public addMeshTask(taskName: string, meshesNames: any, rootUrl: string, sceneFilename: string | File, extension?: string): MeshAssetTask {\r\n const task = new MeshAssetTask(taskName, meshesNames, rootUrl, sceneFilename, extension);\r\n this._tasks.push(task);\r\n\r\n return task;\r\n }\r\n\r\n /**\r\n * Add a TextFileAssetTask to the list of active tasks\r\n * @param taskName defines the name of the new task\r\n * @param url defines the url of the file to load\r\n * @returns a new TextFileAssetTask object\r\n */\r\n public addTextFileTask(taskName: string, url: string): TextFileAssetTask {\r\n const task = new TextFileAssetTask(taskName, url);\r\n this._tasks.push(task);\r\n\r\n return task;\r\n }\r\n\r\n /**\r\n * Add a BinaryFileAssetTask to the list of active tasks\r\n * @param taskName defines the name of the new task\r\n * @param url defines the url of the file to load\r\n * @returns a new BinaryFileAssetTask object\r\n */\r\n public addBinaryFileTask(taskName: string, url: string): BinaryFileAssetTask {\r\n const task = new BinaryFileAssetTask(taskName, url);\r\n this._tasks.push(task);\r\n\r\n return task;\r\n }\r\n\r\n /**\r\n * Add a ImageAssetTask to the list of active tasks\r\n * @param taskName defines the name of the new task\r\n * @param url defines the url of the file to load\r\n * @returns a new ImageAssetTask object\r\n */\r\n public addImageTask(taskName: string, url: string): ImageAssetTask {\r\n const task = new ImageAssetTask(taskName, url);\r\n this._tasks.push(task);\r\n\r\n return task;\r\n }\r\n\r\n /**\r\n * Add a TextureAssetTask to the list of active tasks\r\n * @param taskName defines the name of the new task\r\n * @param url defines the url of the file to load\r\n * @param noMipmap defines if the texture must not receive mipmaps (false by default)\r\n * @param invertY defines if you want to invert Y axis of the loaded texture (false by default)\r\n * @param samplingMode defines the sampling mode to use (Texture.TRILINEAR_SAMPLINGMODE by default)\r\n * @returns a new TextureAssetTask object\r\n */\r\n public addTextureTask(taskName: string, url: string, noMipmap?: boolean, invertY?: boolean, samplingMode: number = Texture.TRILINEAR_SAMPLINGMODE): TextureAssetTask {\r\n const task = new TextureAssetTask(taskName, url, noMipmap, invertY, samplingMode);\r\n this._tasks.push(task);\r\n\r\n return task;\r\n }\r\n\r\n /**\r\n * Add a CubeTextureAssetTask to the list of active tasks\r\n * @param taskName defines the name of the new task\r\n * @param url defines the url of the file to load\r\n * @param extensions defines the extension to use to load the cube map (can be null)\r\n * @param noMipmap defines if the texture must not receive mipmaps (false by default)\r\n * @param files defines the list of files to load (can be null)\r\n * @param prefiltered defines the prefiltered texture option (default is false)\r\n * @returns a new CubeTextureAssetTask object\r\n */\r\n public addCubeTextureTask(taskName: string, url: string, extensions?: string[], noMipmap?: boolean, files?: string[], prefiltered?: boolean): CubeTextureAssetTask {\r\n const task = new CubeTextureAssetTask(taskName, url, extensions, noMipmap, files, prefiltered);\r\n this._tasks.push(task);\r\n\r\n return task;\r\n }\r\n\r\n /**\r\n *\r\n * Add a HDRCubeTextureAssetTask to the list of active tasks\r\n * @param taskName defines the name of the new task\r\n * @param url defines the url of the file to load\r\n * @param size defines the size you want for the cubemap (can be null)\r\n * @param noMipmap defines if the texture must not receive mipmaps (false by default)\r\n * @param generateHarmonics defines if you want to automatically generate (true by default)\r\n * @param gammaSpace specifies if the texture will be use in gamma or linear space (the PBR material requires those texture in linear space, but the standard material would require them in Gamma space) (default is false)\r\n * @param reserved Internal use only\r\n * @returns a new HDRCubeTextureAssetTask object\r\n */\r\n public addHDRCubeTextureTask(\r\n taskName: string,\r\n url: string,\r\n size: number,\r\n noMipmap = false,\r\n generateHarmonics = true,\r\n gammaSpace = false,\r\n reserved = false\r\n ): HDRCubeTextureAssetTask {\r\n const task = new HDRCubeTextureAssetTask(taskName, url, size, noMipmap, generateHarmonics, gammaSpace, reserved);\r\n this._tasks.push(task);\r\n\r\n return task;\r\n }\r\n\r\n /**\r\n *\r\n * Add a EquiRectangularCubeTextureAssetTask to the list of active tasks\r\n * @param taskName defines the name of the new task\r\n * @param url defines the url of the file to load\r\n * @param size defines the size you want for the cubemap (can be null)\r\n * @param noMipmap defines if the texture must not receive mipmaps (false by default)\r\n * @param gammaSpace Specifies if the texture will be used in gamma or linear space\r\n * (the PBR material requires those textures in linear space, but the standard material would require them in Gamma space)\r\n * @returns a new EquiRectangularCubeTextureAssetTask object\r\n */\r\n public addEquiRectangularCubeTextureAssetTask(taskName: string, url: string, size: number, noMipmap = false, gammaSpace = true): EquiRectangularCubeTextureAssetTask {\r\n const task = new EquiRectangularCubeTextureAssetTask(taskName, url, size, noMipmap, gammaSpace);\r\n this._tasks.push(task);\r\n\r\n return task;\r\n }\r\n\r\n /**\r\n * Remove a task from the assets manager.\r\n * @param task the task to remove\r\n */\r\n public removeTask(task: AbstractAssetTask) {\r\n const index = this._tasks.indexOf(task);\r\n\r\n if (index > -1) {\r\n this._tasks.splice(index, 1);\r\n }\r\n }\r\n\r\n private _decreaseWaitingTasksCount(task: AbstractAssetTask): void {\r\n this._waitingTasksCount--;\r\n\r\n try {\r\n if (this.onProgress) {\r\n this.onProgress(this._waitingTasksCount, this._totalTasksCount, task);\r\n }\r\n\r\n this.onProgressObservable.notifyObservers(new AssetsProgressEvent(this._waitingTasksCount, this._totalTasksCount, task));\r\n } catch (e) {\r\n Logger.Error(\"Error running progress callbacks.\");\r\n console.log(e);\r\n }\r\n\r\n if (this._waitingTasksCount === 0) {\r\n try {\r\n const currentTasks = this._tasks.slice();\r\n\r\n if (this.onFinish) {\r\n // Calling onFinish with immutable array of tasks\r\n this.onFinish(currentTasks);\r\n }\r\n\r\n // Let's remove successful tasks\r\n for (const task of currentTasks) {\r\n if (task.taskState === AssetTaskState.DONE) {\r\n const index = this._tasks.indexOf(task);\r\n\r\n if (index > -1) {\r\n this._tasks.splice(index, 1);\r\n }\r\n }\r\n }\r\n\r\n this.onTasksDoneObservable.notifyObservers(this._tasks);\r\n } catch (e) {\r\n Logger.Error(\"Error running tasks-done callbacks.\");\r\n console.log(e);\r\n }\r\n this._isLoading = false;\r\n if (this.autoHideLoadingUI) {\r\n this._scene.getEngine().hideLoadingUI();\r\n }\r\n }\r\n }\r\n\r\n private _runTask(task: AbstractAssetTask): void {\r\n const done = () => {\r\n try {\r\n if (this.onTaskSuccess) {\r\n this.onTaskSuccess(task);\r\n }\r\n this.onTaskSuccessObservable.notifyObservers(task);\r\n this._decreaseWaitingTasksCount(task);\r\n } catch (e) {\r\n error(\"Error executing task success callbacks\", e);\r\n }\r\n };\r\n\r\n const error = (message?: string, exception?: any) => {\r\n task._setErrorObject(message, exception);\r\n\r\n if (this.onTaskError) {\r\n this.onTaskError(task);\r\n } else if (!task.onError) {\r\n Logger.Error(this._formatTaskErrorMessage(task));\r\n }\r\n this.onTaskErrorObservable.notifyObservers(task);\r\n this._decreaseWaitingTasksCount(task);\r\n };\r\n\r\n task.run(this._scene, done, error);\r\n }\r\n\r\n private _formatTaskErrorMessage(task: AbstractAssetTask) {\r\n let errorMessage = \"Unable to complete task \" + task.name;\r\n\r\n if (task.errorObject.message) {\r\n errorMessage += `: ${task.errorObject.message}`;\r\n }\r\n if (task.errorObject.exception) {\r\n errorMessage += `: ${task.errorObject.exception}`;\r\n }\r\n\r\n return errorMessage;\r\n }\r\n\r\n /**\r\n * Reset the AssetsManager and remove all tasks\r\n * @returns the current instance of the AssetsManager\r\n */\r\n public reset(): AssetsManager {\r\n this._isLoading = false;\r\n this._tasks = new Array<AbstractAssetTask>();\r\n return this;\r\n }\r\n\r\n /**\r\n * Start the loading process\r\n * @returns the current instance of the AssetsManager\r\n */\r\n public load(): AssetsManager {\r\n if (this._isLoading) {\r\n return this;\r\n }\r\n this._isLoading = true;\r\n this._waitingTasksCount = this._tasks.length;\r\n this._totalTasksCount = this._tasks.length;\r\n\r\n if (this._waitingTasksCount === 0) {\r\n this._isLoading = false;\r\n if (this.onFinish) {\r\n this.onFinish(this._tasks);\r\n }\r\n this.onTasksDoneObservable.notifyObservers(this._tasks);\r\n return this;\r\n }\r\n\r\n if (this.useDefaultLoadingScreen) {\r\n this._scene.getEngine().displayLoadingUI();\r\n }\r\n\r\n for (let index = 0; index < this._tasks.length; index++) {\r\n const task = this._tasks[index];\r\n if (task.taskState === AssetTaskState.INIT) {\r\n this._runTask(task);\r\n }\r\n }\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Start the loading process as an async operation\r\n * @returns a promise returning the list of failed tasks\r\n */\r\n public loadAsync(): Promise<void> {\r\n return new Promise((resolve, reject) => {\r\n if (this._isLoading) {\r\n resolve();\r\n return;\r\n }\r\n this.onTasksDoneObservable.addOnce((remainingTasks) => {\r\n if (remainingTasks && remainingTasks.length) {\r\n reject(remainingTasks);\r\n } else {\r\n resolve();\r\n }\r\n });\r\n\r\n this.load();\r\n });\r\n }\r\n}\r\n"]}
@@ -68,7 +68,7 @@ export interface IInspectableOptions {
68
68
  /**
69
69
  * Interface used to define custom inspectable properties.
70
70
  * This interface is used by the inspector to display custom property grids
71
- * @see https://doc.babylonjs.com/how_to/debug_layer#extensibility
71
+ * @see https://doc.babylonjs.com/toolsAndResources/inspector#extensibility
72
72
  */
73
73
  export interface IInspectable {
74
74
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"iInspectable.js","sourceRoot":"","sources":["../../../../../lts/core/generated/Misc/iInspectable.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAN,IAAY,eA6CX;AA7CD,WAAY,eAAe;IACvB;;OAEG;IACH,6DAAY,CAAA;IACZ;;OAEG;IACH,yDAAU,CAAA;IACV;;OAEG;IACH,2DAAW,CAAA;IACX;;OAEG;IACH,iEAAc,CAAA;IACd;;OAEG;IACH,yDAAU,CAAA;IACV;;OAEG;IACH,yDAAU,CAAA;IACV;;OAEG;IACH,yDAAU,CAAA;IACV;;OAEG;IACH,2DAAW,CAAA;IACX;;OAEG;IACH,mDAAO,CAAA;IACP;;OAEG;IACH,iEAAc,CAAA;IACd;;OAEG;IACH,4DAAY,CAAA;AAChB,CAAC,EA7CW,eAAe,KAAf,eAAe,QA6C1B","sourcesContent":["/**\r\n * Enum that determines the text-wrapping mode to use.\r\n */\r\nexport enum InspectableType {\r\n /**\r\n * Checkbox for booleans\r\n */\r\n Checkbox = 0,\r\n /**\r\n * Sliders for numbers\r\n */\r\n Slider = 1,\r\n /**\r\n * Vector3\r\n */\r\n Vector3 = 2,\r\n /**\r\n * Quaternions\r\n */\r\n Quaternion = 3,\r\n /**\r\n * Color3\r\n */\r\n Color3 = 4,\r\n /**\r\n * String\r\n */\r\n String = 5,\r\n /**\r\n * Button\r\n */\r\n Button = 6,\r\n /**\r\n * Options\r\n */\r\n Options = 7,\r\n /**\r\n * Tab\r\n */\r\n Tab = 8,\r\n /**\r\n * File button\r\n */\r\n FileButton = 9,\r\n /**\r\n * Vector2\r\n */\r\n Vector2 = 10,\r\n}\r\n\r\n/**\r\n * Interface used to define custom inspectable options in \"Options\" mode.\r\n * This interface is used by the inspector to display the list of options\r\n */\r\nexport interface IInspectableOptions {\r\n /**\r\n * Defines the visible part of the option\r\n */\r\n label: string;\r\n /**\r\n * Defines the value part of the option (returned through the callback)\r\n */\r\n value: number | string;\r\n /**\r\n * Defines if the option should be selected or not\r\n */\r\n selected?: boolean;\r\n}\r\n\r\n/**\r\n * Interface used to define custom inspectable properties.\r\n * This interface is used by the inspector to display custom property grids\r\n * @see https://doc.babylonjs.com/how_to/debug_layer#extensibility\r\n */\r\nexport interface IInspectable {\r\n /**\r\n * Gets the label to display\r\n */\r\n label: string;\r\n /**\r\n * Gets the name of the property to edit\r\n */\r\n propertyName: string;\r\n /**\r\n * Gets the type of the editor to use\r\n */\r\n type: InspectableType;\r\n /**\r\n * Gets the minimum value of the property when using in \"slider\" mode\r\n */\r\n min?: number;\r\n /**\r\n * Gets the maximum value of the property when using in \"slider\" mode\r\n */\r\n max?: number;\r\n /**\r\n * Gets the setp to use when using in \"slider\" mode\r\n */\r\n step?: number;\r\n /**\r\n * Gets the callback function when using \"Button\" mode\r\n */\r\n callback?: () => void;\r\n /**\r\n * Gets the callback function when using \"FileButton\" mode\r\n */\r\n fileCallback?: (file: File) => void;\r\n /**\r\n * Gets the list of options when using \"Option\" mode\r\n */\r\n options?: IInspectableOptions[];\r\n /**\r\n * Gets the extensions to accept when using \"FileButton\" mode.\r\n * The value should be a comma separated string with the list of extensions to accept e.g., \".jpg, .png, .tga, .dds, .env\".\r\n */\r\n accept?: string;\r\n}\r\n"]}
1
+ {"version":3,"file":"iInspectable.js","sourceRoot":"","sources":["../../../../../lts/core/generated/Misc/iInspectable.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAN,IAAY,eA6CX;AA7CD,WAAY,eAAe;IACvB;;OAEG;IACH,6DAAY,CAAA;IACZ;;OAEG;IACH,yDAAU,CAAA;IACV;;OAEG;IACH,2DAAW,CAAA;IACX;;OAEG;IACH,iEAAc,CAAA;IACd;;OAEG;IACH,yDAAU,CAAA;IACV;;OAEG;IACH,yDAAU,CAAA;IACV;;OAEG;IACH,yDAAU,CAAA;IACV;;OAEG;IACH,2DAAW,CAAA;IACX;;OAEG;IACH,mDAAO,CAAA;IACP;;OAEG;IACH,iEAAc,CAAA;IACd;;OAEG;IACH,4DAAY,CAAA;AAChB,CAAC,EA7CW,eAAe,KAAf,eAAe,QA6C1B","sourcesContent":["/**\r\n * Enum that determines the text-wrapping mode to use.\r\n */\r\nexport enum InspectableType {\r\n /**\r\n * Checkbox for booleans\r\n */\r\n Checkbox = 0,\r\n /**\r\n * Sliders for numbers\r\n */\r\n Slider = 1,\r\n /**\r\n * Vector3\r\n */\r\n Vector3 = 2,\r\n /**\r\n * Quaternions\r\n */\r\n Quaternion = 3,\r\n /**\r\n * Color3\r\n */\r\n Color3 = 4,\r\n /**\r\n * String\r\n */\r\n String = 5,\r\n /**\r\n * Button\r\n */\r\n Button = 6,\r\n /**\r\n * Options\r\n */\r\n Options = 7,\r\n /**\r\n * Tab\r\n */\r\n Tab = 8,\r\n /**\r\n * File button\r\n */\r\n FileButton = 9,\r\n /**\r\n * Vector2\r\n */\r\n Vector2 = 10,\r\n}\r\n\r\n/**\r\n * Interface used to define custom inspectable options in \"Options\" mode.\r\n * This interface is used by the inspector to display the list of options\r\n */\r\nexport interface IInspectableOptions {\r\n /**\r\n * Defines the visible part of the option\r\n */\r\n label: string;\r\n /**\r\n * Defines the value part of the option (returned through the callback)\r\n */\r\n value: number | string;\r\n /**\r\n * Defines if the option should be selected or not\r\n */\r\n selected?: boolean;\r\n}\r\n\r\n/**\r\n * Interface used to define custom inspectable properties.\r\n * This interface is used by the inspector to display custom property grids\r\n * @see https://doc.babylonjs.com/toolsAndResources/inspector#extensibility\r\n */\r\nexport interface IInspectable {\r\n /**\r\n * Gets the label to display\r\n */\r\n label: string;\r\n /**\r\n * Gets the name of the property to edit\r\n */\r\n propertyName: string;\r\n /**\r\n * Gets the type of the editor to use\r\n */\r\n type: InspectableType;\r\n /**\r\n * Gets the minimum value of the property when using in \"slider\" mode\r\n */\r\n min?: number;\r\n /**\r\n * Gets the maximum value of the property when using in \"slider\" mode\r\n */\r\n max?: number;\r\n /**\r\n * Gets the setp to use when using in \"slider\" mode\r\n */\r\n step?: number;\r\n /**\r\n * Gets the callback function when using \"Button\" mode\r\n */\r\n callback?: () => void;\r\n /**\r\n * Gets the callback function when using \"FileButton\" mode\r\n */\r\n fileCallback?: (file: File) => void;\r\n /**\r\n * Gets the list of options when using \"Option\" mode\r\n */\r\n options?: IInspectableOptions[];\r\n /**\r\n * Gets the extensions to accept when using \"FileButton\" mode.\r\n * The value should be a comma separated string with the list of extensions to accept e.g., \".jpg, .png, .tga, .dds, .env\".\r\n */\r\n accept?: string;\r\n}\r\n"]}
@@ -2,7 +2,7 @@ import type { Scene, IDisposable } from "../scene";
2
2
  import { Observable } from "./observable";
3
3
  /**
4
4
  * Defines the root class used to create scene optimization to use with SceneOptimizer
5
- * @description More details at https://doc.babylonjs.com/how_to/how_to_use_sceneoptimizer
5
+ * @description More details at https://doc.babylonjs.com/features/featuresDeepDive/scene/sceneOptimizer
6
6
  */
7
7
  export declare class SceneOptimization {
8
8
  /**
@@ -33,7 +33,7 @@ export declare class SceneOptimization {
33
33
  }
34
34
  /**
35
35
  * Defines an optimization used to reduce the size of render target textures
36
- * @description More details at https://doc.babylonjs.com/how_to/how_to_use_sceneoptimizer
36
+ * @description More details at https://doc.babylonjs.com/features/featuresDeepDive/scene/sceneOptimizer
37
37
  */
38
38
  export declare class TextureOptimization extends SceneOptimization {
39
39
  /**
@@ -82,7 +82,7 @@ export declare class TextureOptimization extends SceneOptimization {
82
82
  }
83
83
  /**
84
84
  * Defines an optimization used to increase or decrease the rendering resolution
85
- * @description More details at https://doc.babylonjs.com/how_to/how_to_use_sceneoptimizer
85
+ * @description More details at https://doc.babylonjs.com/features/featuresDeepDive/scene/sceneOptimizer
86
86
  */
87
87
  export declare class HardwareScalingOptimization extends SceneOptimization {
88
88
  /**
@@ -133,7 +133,7 @@ export declare class HardwareScalingOptimization extends SceneOptimization {
133
133
  }
134
134
  /**
135
135
  * Defines an optimization used to remove shadows
136
- * @description More details at https://doc.babylonjs.com/how_to/how_to_use_sceneoptimizer
136
+ * @description More details at https://doc.babylonjs.com/features/featuresDeepDive/scene/sceneOptimizer
137
137
  */
138
138
  export declare class ShadowsOptimization extends SceneOptimization {
139
139
  /**
@@ -151,7 +151,7 @@ export declare class ShadowsOptimization extends SceneOptimization {
151
151
  }
152
152
  /**
153
153
  * Defines an optimization used to turn post-processes off
154
- * @description More details at https://doc.babylonjs.com/how_to/how_to_use_sceneoptimizer
154
+ * @description More details at https://doc.babylonjs.com/features/featuresDeepDive/scene/sceneOptimizer
155
155
  */
156
156
  export declare class PostProcessesOptimization extends SceneOptimization {
157
157
  /**
@@ -169,7 +169,7 @@ export declare class PostProcessesOptimization extends SceneOptimization {
169
169
  }
170
170
  /**
171
171
  * Defines an optimization used to turn lens flares off
172
- * @description More details at https://doc.babylonjs.com/how_to/how_to_use_sceneoptimizer
172
+ * @description More details at https://doc.babylonjs.com/features/featuresDeepDive/scene/sceneOptimizer
173
173
  */
174
174
  export declare class LensFlaresOptimization extends SceneOptimization {
175
175
  /**
@@ -187,7 +187,7 @@ export declare class LensFlaresOptimization extends SceneOptimization {
187
187
  }
188
188
  /**
189
189
  * Defines an optimization based on user defined callback.
190
- * @description More details at https://doc.babylonjs.com/how_to/how_to_use_sceneoptimizer
190
+ * @description More details at https://doc.babylonjs.com/features/featuresDeepDive/scene/sceneOptimizer
191
191
  */
192
192
  export declare class CustomOptimization extends SceneOptimization {
193
193
  /**
@@ -213,7 +213,7 @@ export declare class CustomOptimization extends SceneOptimization {
213
213
  }
214
214
  /**
215
215
  * Defines an optimization used to turn particles off
216
- * @description More details at https://doc.babylonjs.com/how_to/how_to_use_sceneoptimizer
216
+ * @description More details at https://doc.babylonjs.com/features/featuresDeepDive/scene/sceneOptimizer
217
217
  */
218
218
  export declare class ParticlesOptimization extends SceneOptimization {
219
219
  /**
@@ -231,7 +231,7 @@ export declare class ParticlesOptimization extends SceneOptimization {
231
231
  }
232
232
  /**
233
233
  * Defines an optimization used to turn render targets off
234
- * @description More details at https://doc.babylonjs.com/how_to/how_to_use_sceneoptimizer
234
+ * @description More details at https://doc.babylonjs.com/features/featuresDeepDive/scene/sceneOptimizer
235
235
  */
236
236
  export declare class RenderTargetsOptimization extends SceneOptimization {
237
237
  /**
@@ -249,7 +249,7 @@ export declare class RenderTargetsOptimization extends SceneOptimization {
249
249
  }
250
250
  /**
251
251
  * Defines an optimization used to merge meshes with compatible materials
252
- * @description More details at https://doc.babylonjs.com/how_to/how_to_use_sceneoptimizer
252
+ * @description More details at https://doc.babylonjs.com/features/featuresDeepDive/scene/sceneOptimizer
253
253
  */
254
254
  export declare class MergeMeshesOptimization extends SceneOptimization {
255
255
  private static _UpdateSelectionTree;
@@ -278,7 +278,7 @@ export declare class MergeMeshesOptimization extends SceneOptimization {
278
278
  }
279
279
  /**
280
280
  * Defines a list of options used by SceneOptimizer
281
- * @description More details at https://doc.babylonjs.com/how_to/how_to_use_sceneoptimizer
281
+ * @description More details at https://doc.babylonjs.com/features/featuresDeepDive/scene/sceneOptimizer
282
282
  */
283
283
  export declare class SceneOptimizerOptions {
284
284
  /**
@@ -342,7 +342,7 @@ export declare class SceneOptimizerOptions {
342
342
  }
343
343
  /**
344
344
  * Class used to run optimizations in order to reach a target frame rate
345
- * @description More details at https://doc.babylonjs.com/how_to/how_to_use_sceneoptimizer
345
+ * @description More details at https://doc.babylonjs.com/features/featuresDeepDive/scene/sceneOptimizer
346
346
  */
347
347
  export declare class SceneOptimizer implements IDisposable {
348
348
  private _isRunning;
@@ -3,7 +3,7 @@ import { Mesh } from "../Meshes/mesh.js";
3
3
  import { Observable } from "./observable.js";
4
4
  /**
5
5
  * Defines the root class used to create scene optimization to use with SceneOptimizer
6
- * @description More details at https://doc.babylonjs.com/how_to/how_to_use_sceneoptimizer
6
+ * @description More details at https://doc.babylonjs.com/features/featuresDeepDive/scene/sceneOptimizer
7
7
  */
8
8
  export class SceneOptimization {
9
9
  /**
@@ -36,7 +36,7 @@ export class SceneOptimization {
36
36
  }
37
37
  /**
38
38
  * Defines an optimization used to reduce the size of render target textures
39
- * @description More details at https://doc.babylonjs.com/how_to/how_to_use_sceneoptimizer
39
+ * @description More details at https://doc.babylonjs.com/features/featuresDeepDive/scene/sceneOptimizer
40
40
  */
41
41
  export class TextureOptimization extends SceneOptimization {
42
42
  /**
@@ -95,7 +95,7 @@ export class TextureOptimization extends SceneOptimization {
95
95
  }
96
96
  /**
97
97
  * Defines an optimization used to increase or decrease the rendering resolution
98
- * @description More details at https://doc.babylonjs.com/how_to/how_to_use_sceneoptimizer
98
+ * @description More details at https://doc.babylonjs.com/features/featuresDeepDive/scene/sceneOptimizer
99
99
  */
100
100
  export class HardwareScalingOptimization extends SceneOptimization {
101
101
  /**
@@ -151,7 +151,7 @@ export class HardwareScalingOptimization extends SceneOptimization {
151
151
  }
152
152
  /**
153
153
  * Defines an optimization used to remove shadows
154
- * @description More details at https://doc.babylonjs.com/how_to/how_to_use_sceneoptimizer
154
+ * @description More details at https://doc.babylonjs.com/features/featuresDeepDive/scene/sceneOptimizer
155
155
  */
156
156
  export class ShadowsOptimization extends SceneOptimization {
157
157
  /**
@@ -174,7 +174,7 @@ export class ShadowsOptimization extends SceneOptimization {
174
174
  }
175
175
  /**
176
176
  * Defines an optimization used to turn post-processes off
177
- * @description More details at https://doc.babylonjs.com/how_to/how_to_use_sceneoptimizer
177
+ * @description More details at https://doc.babylonjs.com/features/featuresDeepDive/scene/sceneOptimizer
178
178
  */
179
179
  export class PostProcessesOptimization extends SceneOptimization {
180
180
  /**
@@ -197,7 +197,7 @@ export class PostProcessesOptimization extends SceneOptimization {
197
197
  }
198
198
  /**
199
199
  * Defines an optimization used to turn lens flares off
200
- * @description More details at https://doc.babylonjs.com/how_to/how_to_use_sceneoptimizer
200
+ * @description More details at https://doc.babylonjs.com/features/featuresDeepDive/scene/sceneOptimizer
201
201
  */
202
202
  export class LensFlaresOptimization extends SceneOptimization {
203
203
  /**
@@ -220,7 +220,7 @@ export class LensFlaresOptimization extends SceneOptimization {
220
220
  }
221
221
  /**
222
222
  * Defines an optimization based on user defined callback.
223
- * @description More details at https://doc.babylonjs.com/how_to/how_to_use_sceneoptimizer
223
+ * @description More details at https://doc.babylonjs.com/features/featuresDeepDive/scene/sceneOptimizer
224
224
  */
225
225
  export class CustomOptimization extends SceneOptimization {
226
226
  /**
@@ -248,7 +248,7 @@ export class CustomOptimization extends SceneOptimization {
248
248
  }
249
249
  /**
250
250
  * Defines an optimization used to turn particles off
251
- * @description More details at https://doc.babylonjs.com/how_to/how_to_use_sceneoptimizer
251
+ * @description More details at https://doc.babylonjs.com/features/featuresDeepDive/scene/sceneOptimizer
252
252
  */
253
253
  export class ParticlesOptimization extends SceneOptimization {
254
254
  /**
@@ -271,7 +271,7 @@ export class ParticlesOptimization extends SceneOptimization {
271
271
  }
272
272
  /**
273
273
  * Defines an optimization used to turn render targets off
274
- * @description More details at https://doc.babylonjs.com/how_to/how_to_use_sceneoptimizer
274
+ * @description More details at https://doc.babylonjs.com/features/featuresDeepDive/scene/sceneOptimizer
275
275
  */
276
276
  export class RenderTargetsOptimization extends SceneOptimization {
277
277
  /**
@@ -294,7 +294,7 @@ export class RenderTargetsOptimization extends SceneOptimization {
294
294
  }
295
295
  /**
296
296
  * Defines an optimization used to merge meshes with compatible materials
297
- * @description More details at https://doc.babylonjs.com/how_to/how_to_use_sceneoptimizer
297
+ * @description More details at https://doc.babylonjs.com/features/featuresDeepDive/scene/sceneOptimizer
298
298
  */
299
299
  export class MergeMeshesOptimization extends SceneOptimization {
300
300
  constructor() {
@@ -397,7 +397,7 @@ export class MergeMeshesOptimization extends SceneOptimization {
397
397
  MergeMeshesOptimization._UpdateSelectionTree = false;
398
398
  /**
399
399
  * Defines a list of options used by SceneOptimizer
400
- * @description More details at https://doc.babylonjs.com/how_to/how_to_use_sceneoptimizer
400
+ * @description More details at https://doc.babylonjs.com/features/featuresDeepDive/scene/sceneOptimizer
401
401
  */
402
402
  export class SceneOptimizerOptions {
403
403
  /**
@@ -519,7 +519,7 @@ export class SceneOptimizerOptions {
519
519
  }
520
520
  /**
521
521
  * Class used to run optimizations in order to reach a target frame rate
522
- * @description More details at https://doc.babylonjs.com/how_to/how_to_use_sceneoptimizer
522
+ * @description More details at https://doc.babylonjs.com/features/featuresDeepDive/scene/sceneOptimizer
523
523
  */
524
524
  export class SceneOptimizer {
525
525
  /**