@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":"animationGroup.js","sourceRoot":"","sources":["../../../../../lts/core/generated/Animations/animationGroup.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAIxC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAGrD,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC;;GAEG;AACH,MAAM,OAAO,iBAAiB;IAU1B;;;OAGG;IACI,YAAY;QACf,OAAO,mBAAmB,CAAC;IAC/B,CAAC;IAED;;;OAGG;IACI,SAAS;QACZ,MAAM,mBAAmB,GAAQ,EAAE,CAAC;QACpC,mBAAmB,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,CAAC;QAC3D,mBAAmB,CAAC,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;QAE9C,OAAO,mBAAmB,CAAC;IAC/B,CAAC;CACJ;AAED;;GAEG;AACH,MAAM,OAAO,cAAc;IAwKvB;;;;;;OAMG;IACH;IACI,sCAAsC;IAC/B,IAAY,EACnB,QAAyB,IAAI;QADtB,SAAI,GAAJ,IAAI,CAAQ;QA9Kf,wBAAmB,GAAG,IAAI,KAAK,EAAqB,CAAC;QACrD,iBA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B,CAAC;QAC1C,IAAI,aAAa,EAAE;YACf,cAAc,GAAG,oBAAoB,CAAC,KAAK,CAAC,UAAU,IAAI,cAAc,CAAC,IAAI,CAAC,CAAC;SAClF;QAED,MAAM,kBAAkB,GAAG,cAAc,CAAC,kBAAkB,CAAC;QAC7D,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,kBAAkB,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;YAC5D,MAAM,iBAAiB,GAAG,kBAAkB,CAAC,KAAK,CAAC,CAAC;YACpD,SAAS,CAAC,qBAAqB,CAAC,iBAAiB,CAAC,SAAS,EAAE,cAAc,EAAE,KAAK,CAAC,CAAC;SACvF;QAED,cAAc,CAAC,UAAU,GAAG,IAAI,CAAC;QAEjC,OAAO,cAAc,CAAC;IAC1B,CAAC;IAED;;;OAGG;IACI,YAAY;QACf,OAAO,gBAAgB,CAAC;IAC5B,CAAC;IAED;;;;OAIG;IACI,QAAQ,CAAC,WAAqB;QACjC,IAAI,GAAG,GAAG,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC;QAC/B,GAAG,IAAI,UAAU,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;QACxC,IAAI,WAAW,EAAE;YACb,GAAG,IAAI,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC;YAC/B,GAAG,IAAI,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC;YAC3B,GAAG,IAAI,eAAe,GAAG,IAAI,CAAC,UAAU,CAAC;YACzC,GAAG,IAAI,gBAAgB,GAAG,IAAI,CAAC,WAAW,CAAC;YAC3C,GAAG,IAAI,+BAA+B,GAAG,IAAI,CAAC,mBAAmB,CAAC,MAAM,CAAC;YACzE,GAAG,IAAI,wBAAwB,GAAG,IAAI,CAAC,YAAY,CAAC;SACvD;QACD,OAAO,GAAG,CAAC;IACf,CAAC;CACJ","sourcesContent":["import type { Animatable } from \"./animatable\";\r\nimport { Animation } from \"./animation\";\r\nimport type { IAnimationKey } from \"./animationKey\";\r\n\r\nimport type { Scene, IDisposable } from \"../scene\";\r\nimport { Observable } from \"../Misc/observable\";\r\nimport type { Nullable } from \"../types\";\r\nimport { EngineStore } from \"../Engines/engineStore\";\r\n\r\nimport type { AbstractScene } from \"../abstractScene\";\r\nimport { Tags } from \"../Misc/tags\";\r\n\r\n/**\r\n * This class defines the direct association between an animation and a target\r\n */\r\nexport class TargetedAnimation {\r\n /**\r\n * Animation to perform\r\n */\r\n public animation: Animation;\r\n /**\r\n * Target to animate\r\n */\r\n public target: any;\r\n\r\n /**\r\n * Returns the string \"TargetedAnimation\"\r\n * @returns \"TargetedAnimation\"\r\n */\r\n public getClassName(): string {\r\n return \"TargetedAnimation\";\r\n }\r\n\r\n /**\r\n * Serialize the object\r\n * @returns the JSON object representing the current entity\r\n */\r\n public serialize(): any {\r\n const serializationObject: any = {};\r\n serializationObject.animation = this.animation.serialize();\r\n serializationObject.targetId = this.target.id;\r\n\r\n return serializationObject;\r\n }\r\n}\r\n\r\n/**\r\n * Use this class to create coordinated animations on multiple targets\r\n */\r\nexport class AnimationGroup implements IDisposable {\r\n private _scene: Scene;\r\n\r\n private _targetedAnimations = new Array<TargetedAnimation>();\r\n private _animatables = new Array<Animatable>();\r\n private _from = Number.MAX_VALUE;\r\n private _to = -Number.MAX_VALUE;\r\n private _isStarted: boolean;\r\n private _isPaused: boolean;\r\n private _speedRatio = 1;\r\n private _loopAnimation = false;\r\n private _isAdditive = false;\r\n\r\n /** @internal */\r\n public _parentContainer: Nullable<AbstractScene> = null;\r\n\r\n /**\r\n * Gets or sets the unique id of the node\r\n */\r\n public uniqueId: number;\r\n\r\n /**\r\n * This observable will notify when one animation have ended\r\n */\r\n public onAnimationEndObservable = new Observable<TargetedAnimation>();\r\n\r\n /**\r\n * Observer raised when one animation loops\r\n */\r\n public onAnimationLoopObservable = new Observable<TargetedAnimation>();\r\n\r\n /**\r\n * Observer raised when all animations have looped\r\n */\r\n public onAnimationGroupLoopObservable = new Observable<AnimationGroup>();\r\n\r\n /**\r\n * This observable will notify when all animations have ended.\r\n */\r\n public onAnimationGroupEndObservable = new Observable<AnimationGroup>();\r\n\r\n /**\r\n * This observable will notify when all animations have paused.\r\n */\r\n public onAnimationGroupPauseObservable = new Observable<AnimationGroup>();\r\n\r\n /**\r\n * This observable will notify when all animations are playing.\r\n */\r\n public onAnimationGroupPlayObservable = new Observable<AnimationGroup>();\r\n\r\n /**\r\n * Gets or sets an object used to store user defined information for the node\r\n */\r\n public metadata: any = null;\r\n\r\n /**\r\n * Gets the first frame\r\n */\r\n public get from(): number {\r\n return this._from;\r\n }\r\n\r\n /**\r\n * Gets the last frame\r\n */\r\n public get to(): number {\r\n return this._to;\r\n }\r\n\r\n /**\r\n * Define if the animations are started\r\n */\r\n public get isStarted(): boolean {\r\n return this._isStarted;\r\n }\r\n\r\n /**\r\n * Gets a value indicating that the current group is playing\r\n */\r\n public get isPlaying(): boolean {\r\n return this._isStarted && !this._isPaused;\r\n }\r\n\r\n /**\r\n * Gets or sets the speed ratio to use for all animations\r\n */\r\n public get speedRatio(): number {\r\n return this._speedRatio;\r\n }\r\n\r\n /**\r\n * Gets or sets the speed ratio to use for all animations\r\n */\r\n public set speedRatio(value: number) {\r\n if (this._speedRatio === value) {\r\n return;\r\n }\r\n\r\n this._speedRatio = value;\r\n\r\n for (let index = 0; index < this._animatables.length; index++) {\r\n const animatable = this._animatables[index];\r\n animatable.speedRatio = this._speedRatio;\r\n }\r\n }\r\n\r\n /**\r\n * Gets or sets if all animations should loop or not\r\n */\r\n public get loopAnimation(): boolean {\r\n return this._loopAnimation;\r\n }\r\n\r\n public set loopAnimation(value: boolean) {\r\n if (this._loopAnimation === value) {\r\n return;\r\n }\r\n\r\n this._loopAnimation = value;\r\n\r\n for (let index = 0; index < this._animatables.length; index++) {\r\n const animatable = this._animatables[index];\r\n animatable.loopAnimation = this._loopAnimation;\r\n }\r\n }\r\n\r\n /**\r\n * Gets or sets if all animations should be evaluated additively\r\n */\r\n public get isAdditive(): boolean {\r\n return this._isAdditive;\r\n }\r\n\r\n public set isAdditive(value: boolean) {\r\n if (this._isAdditive === value) {\r\n return;\r\n }\r\n\r\n this._isAdditive = value;\r\n\r\n for (let index = 0; index < this._animatables.length; index++) {\r\n const animatable = this._animatables[index];\r\n animatable.isAdditive = this._isAdditive;\r\n }\r\n }\r\n\r\n /**\r\n * Gets the targeted animations for this animation group\r\n */\r\n public get targetedAnimations(): Array<TargetedAnimation> {\r\n return this._targetedAnimations;\r\n }\r\n\r\n /**\r\n * returning the list of animatables controlled by this animation group.\r\n */\r\n public get animatables(): Array<Animatable> {\r\n return this._animatables;\r\n }\r\n\r\n /**\r\n * Gets the list of target animations\r\n */\r\n public get children() {\r\n return this._targetedAnimations;\r\n }\r\n\r\n /**\r\n * Instantiates a new Animation Group.\r\n * This helps managing several animations at once.\r\n * @see https://doc.babylonjs.com/divingDeeper/animation/groupAnimations\r\n * @param name Defines the name of the group\r\n * @param scene Defines the scene the group belongs to\r\n */\r\n public constructor(\r\n /** The name of the animation group */\r\n public name: string,\r\n scene: Nullable<Scene> = null\r\n ) {\r\n this._scene = scene || EngineStore.LastCreatedScene!;\r\n this.uniqueId = this._scene.getUniqueId();\r\n\r\n this._scene.addAnimationGroup(this);\r\n }\r\n\r\n /**\r\n * Add an animation (with its target) in the group\r\n * @param animation defines the animation we want to add\r\n * @param target defines the target of the animation\r\n * @returns the TargetedAnimation object\r\n */\r\n public addTargetedAnimation(animation: Animation, target: any): TargetedAnimation {\r\n const targetedAnimation = new TargetedAnimation();\r\n targetedAnimation.animation = animation;\r\n targetedAnimation.target = target;\r\n\r\n const keys = animation.getKeys();\r\n if (this._from > keys[0].frame) {\r\n this._from = keys[0].frame;\r\n }\r\n\r\n if (this._to < keys[keys.length - 1].frame) {\r\n this._to = keys[keys.length - 1].frame;\r\n }\r\n\r\n this._targetedAnimations.push(targetedAnimation);\r\n\r\n return targetedAnimation;\r\n }\r\n\r\n /**\r\n * This function will normalize every animation in the group to make sure they all go from beginFrame to endFrame\r\n * It can add constant keys at begin or end\r\n * @param beginFrame defines the new begin frame for all animations or the smallest begin frame of all animations if null (defaults to null)\r\n * @param endFrame defines the new end frame for all animations or the largest end frame of all animations if null (defaults to null)\r\n * @returns the animation group\r\n */\r\n public normalize(beginFrame: Nullable<number> = null, endFrame: Nullable<number> = null): AnimationGroup {\r\n if (beginFrame == null) {\r\n beginFrame = this._from;\r\n }\r\n if (endFrame == null) {\r\n endFrame = this._to;\r\n }\r\n\r\n for (let index = 0; index < this._targetedAnimations.length; index++) {\r\n const targetedAnimation = this._targetedAnimations[index];\r\n const keys = targetedAnimation.animation.getKeys();\r\n const startKey = keys[0];\r\n const endKey = keys[keys.length - 1];\r\n\r\n if (startKey.frame > beginFrame) {\r\n const newKey: IAnimationKey = {\r\n frame: beginFrame,\r\n value: startKey.value,\r\n inTangent: startKey.inTangent,\r\n outTangent: startKey.outTangent,\r\n interpolation: startKey.interpolation,\r\n };\r\n keys.splice(0, 0, newKey);\r\n }\r\n\r\n if (endKey.frame < endFrame) {\r\n const newKey: IAnimationKey = {\r\n frame: endFrame,\r\n value: endKey.value,\r\n inTangent: endKey.inTangent,\r\n outTangent: endKey.outTangent,\r\n interpolation: endKey.interpolation,\r\n };\r\n keys.push(newKey);\r\n }\r\n }\r\n\r\n this._from = beginFrame;\r\n this._to = endFrame;\r\n\r\n return this;\r\n }\r\n\r\n private _animationLoopCount: number;\r\n private _animationLoopFlags: boolean[] = [];\r\n\r\n private _processLoop(animatable: Animatable, targetedAnimation: TargetedAnimation, index: number) {\r\n animatable.onAnimationLoop = () => {\r\n this.onAnimationLoopObservable.notifyObservers(targetedAnimation);\r\n\r\n if (this._animationLoopFlags[index]) {\r\n return;\r\n }\r\n\r\n this._animationLoopFlags[index] = true;\r\n\r\n this._animationLoopCount++;\r\n if (this._animationLoopCount === this._targetedAnimations.length) {\r\n this.onAnimationGroupLoopObservable.notifyObservers(this);\r\n this._animationLoopCount = 0;\r\n this._animationLoopFlags.length = 0;\r\n }\r\n };\r\n }\r\n\r\n /**\r\n * Start all animations on given targets\r\n * @param loop defines if animations must loop\r\n * @param speedRatio defines the ratio to apply to animation speed (1 by default)\r\n * @param from defines the from key (optional)\r\n * @param to defines the to key (optional)\r\n * @param isAdditive defines the additive state for the resulting animatables (optional)\r\n * @returns the current animation group\r\n */\r\n public start(loop = false, speedRatio = 1, from?: number, to?: number, isAdditive?: boolean): AnimationGroup {\r\n if (this._isStarted || this._targetedAnimations.length === 0) {\r\n return this;\r\n }\r\n\r\n this._loopAnimation = loop;\r\n\r\n this._animationLoopCount = 0;\r\n this._animationLoopFlags.length = 0;\r\n\r\n for (let index = 0; index < this._targetedAnimations.length; index++) {\r\n const targetedAnimation = this._targetedAnimations[index];\r\n const animatable = this._scene.beginDirectAnimation(\r\n targetedAnimation.target,\r\n [targetedAnimation.animation],\r\n from !== undefined ? from : this._from,\r\n to !== undefined ? to : this._to,\r\n loop,\r\n speedRatio,\r\n undefined,\r\n undefined,\r\n isAdditive !== undefined ? isAdditive : this._isAdditive\r\n );\r\n animatable.onAnimationEnd = () => {\r\n this.onAnimationEndObservable.notifyObservers(targetedAnimation);\r\n this._checkAnimationGroupEnded(animatable);\r\n };\r\n\r\n this._processLoop(animatable, targetedAnimation, index);\r\n this._animatables.push(animatable);\r\n }\r\n\r\n this._speedRatio = speedRatio;\r\n\r\n this._isStarted = true;\r\n this._isPaused = false;\r\n\r\n this.onAnimationGroupPlayObservable.notifyObservers(this);\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Pause all animations\r\n * @returns the animation group\r\n */\r\n public pause(): AnimationGroup {\r\n if (!this._isStarted) {\r\n return this;\r\n }\r\n\r\n this._isPaused = true;\r\n\r\n for (let index = 0; index < this._animatables.length; index++) {\r\n const animatable = this._animatables[index];\r\n animatable.pause();\r\n }\r\n\r\n this.onAnimationGroupPauseObservable.notifyObservers(this);\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Play all animations to initial state\r\n * This function will start() the animations if they were not started or will restart() them if they were paused\r\n * @param loop defines if animations must loop\r\n * @returns the animation group\r\n */\r\n public play(loop?: boolean): AnimationGroup {\r\n // only if all animatables are ready and exist\r\n if (this.isStarted && this._animatables.length === this._targetedAnimations.length) {\r\n if (loop !== undefined) {\r\n this.loopAnimation = loop;\r\n }\r\n this.restart();\r\n } else {\r\n this.stop();\r\n this.start(loop, this._speedRatio);\r\n }\r\n\r\n this._isPaused = false;\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Reset all animations to initial state\r\n * @returns the animation group\r\n */\r\n public reset(): AnimationGroup {\r\n if (!this._isStarted) {\r\n this.play();\r\n this.goToFrame(0);\r\n this.stop();\r\n return this;\r\n }\r\n\r\n for (let index = 0; index < this._animatables.length; index++) {\r\n const animatable = this._animatables[index];\r\n animatable.reset();\r\n }\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Restart animations from key 0\r\n * @returns the animation group\r\n */\r\n public restart(): AnimationGroup {\r\n if (!this._isStarted) {\r\n return this;\r\n }\r\n\r\n for (let index = 0; index < this._animatables.length; index++) {\r\n const animatable = this._animatables[index];\r\n animatable.restart();\r\n }\r\n\r\n this.onAnimationGroupPlayObservable.notifyObservers(this);\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Stop all animations\r\n * @returns the animation group\r\n */\r\n public stop(): AnimationGroup {\r\n if (!this._isStarted) {\r\n return this;\r\n }\r\n\r\n const list = this._animatables.slice();\r\n for (let index = 0; index < list.length; index++) {\r\n list[index].stop();\r\n }\r\n\r\n this._isStarted = false;\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Set animation weight for all animatables\r\n * @param weight defines the weight to use\r\n * @returns the animationGroup\r\n * @see https://doc.babylonjs.com/babylon101/animations#animation-weights\r\n */\r\n public setWeightForAllAnimatables(weight: number): AnimationGroup {\r\n for (let index = 0; index < this._animatables.length; index++) {\r\n const animatable = this._animatables[index];\r\n animatable.weight = weight;\r\n }\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Synchronize and normalize all animatables with a source animatable\r\n * @param root defines the root animatable to synchronize with (null to stop synchronizing)\r\n * @returns the animationGroup\r\n * @see https://doc.babylonjs.com/babylon101/animations#animation-weights\r\n */\r\n public syncAllAnimationsWith(root: Nullable<Animatable>): AnimationGroup {\r\n for (let index = 0; index < this._animatables.length; index++) {\r\n const animatable = this._animatables[index];\r\n animatable.syncWith(root);\r\n }\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Goes to a specific frame in this animation group\r\n * @param frame the frame number to go to\r\n * @returns the animationGroup\r\n */\r\n public goToFrame(frame: number): AnimationGroup {\r\n if (!this._isStarted) {\r\n return this;\r\n }\r\n\r\n for (let index = 0; index < this._animatables.length; index++) {\r\n const animatable = this._animatables[index];\r\n animatable.goToFrame(frame);\r\n }\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Dispose all associated resources\r\n */\r\n public dispose(): void {\r\n this._targetedAnimations.length = 0;\r\n this._animatables.length = 0;\r\n\r\n // Remove from scene\r\n const index = this._scene.animationGroups.indexOf(this);\r\n\r\n if (index > -1) {\r\n this._scene.animationGroups.splice(index, 1);\r\n }\r\n\r\n if (this._parentContainer) {\r\n const index = this._parentContainer.animationGroups.indexOf(this);\r\n if (index > -1) {\r\n this._parentContainer.animationGroups.splice(index, 1);\r\n }\r\n this._parentContainer = null;\r\n }\r\n\r\n this.onAnimationEndObservable.clear();\r\n this.onAnimationGroupEndObservable.clear();\r\n this.onAnimationGroupPauseObservable.clear();\r\n this.onAnimationGroupPlayObservable.clear();\r\n this.onAnimationLoopObservable.clear();\r\n this.onAnimationGroupLoopObservable.clear();\r\n }\r\n\r\n private _checkAnimationGroupEnded(animatable: Animatable) {\r\n // animatable should be taken out of the array\r\n const idx = this._animatables.indexOf(animatable);\r\n if (idx > -1) {\r\n this._animatables.splice(idx, 1);\r\n }\r\n\r\n // all animatables were removed? animation group ended!\r\n if (this._animatables.length === 0) {\r\n this._isStarted = false;\r\n this.onAnimationGroupEndObservable.notifyObservers(this);\r\n }\r\n }\r\n\r\n /**\r\n * Clone the current animation group and returns a copy\r\n * @param newName defines the name of the new group\r\n * @param targetConverter defines an optional function used to convert current animation targets to new ones\r\n * @param cloneAnimations defines if the animations should be cloned or referenced\r\n * @returns the new animation group\r\n */\r\n public clone(newName: string, targetConverter?: (oldTarget: any) => any, cloneAnimations = false): AnimationGroup {\r\n const newGroup = new AnimationGroup(newName || this.name, this._scene);\r\n\r\n for (const targetAnimation of this._targetedAnimations) {\r\n newGroup.addTargetedAnimation(\r\n cloneAnimations ? targetAnimation.animation.clone() : targetAnimation.animation,\r\n targetConverter ? targetConverter(targetAnimation.target) : targetAnimation.target\r\n );\r\n }\r\n\r\n return newGroup;\r\n }\r\n\r\n /**\r\n * Serializes the animationGroup to an object\r\n * @returns Serialized object\r\n */\r\n public serialize(): any {\r\n const serializationObject: any = {};\r\n\r\n serializationObject.name = this.name;\r\n serializationObject.from = this.from;\r\n serializationObject.to = this.to;\r\n serializationObject.targetedAnimations = [];\r\n for (let targetedAnimationIndex = 0; targetedAnimationIndex < this.targetedAnimations.length; targetedAnimationIndex++) {\r\n const targetedAnimation = this.targetedAnimations[targetedAnimationIndex];\r\n serializationObject.targetedAnimations[targetedAnimationIndex] = targetedAnimation.serialize();\r\n }\r\n\r\n if (Tags && Tags.HasTags(this)) {\r\n serializationObject.tags = Tags.GetTags(this);\r\n }\r\n\r\n // Metadata\r\n if (this.metadata) {\r\n serializationObject.metadata = this.metadata;\r\n }\r\n\r\n return serializationObject;\r\n }\r\n\r\n // Statics\r\n /**\r\n * Returns a new AnimationGroup object parsed from the source provided.\r\n * @param parsedAnimationGroup defines the source\r\n * @param scene defines the scene that will receive the animationGroup\r\n * @returns a new AnimationGroup\r\n */\r\n public static Parse(parsedAnimationGroup: any, scene: Scene): AnimationGroup {\r\n const animationGroup = new AnimationGroup(parsedAnimationGroup.name, scene);\r\n for (let i = 0; i < parsedAnimationGroup.targetedAnimations.length; i++) {\r\n const targetedAnimation = parsedAnimationGroup.targetedAnimations[i];\r\n const animation = Animation.Parse(targetedAnimation.animation);\r\n const id = targetedAnimation.targetId;\r\n if (targetedAnimation.animation.property === \"influence\") {\r\n // morph target animation\r\n const morphTarget = scene.getMorphTargetById(id);\r\n if (morphTarget) {\r\n animationGroup.addTargetedAnimation(animation, morphTarget);\r\n }\r\n } else {\r\n const targetNode = scene.getNodeById(id);\r\n\r\n if (targetNode != null) {\r\n animationGroup.addTargetedAnimation(animation, targetNode);\r\n }\r\n }\r\n }\r\n\r\n if (parsedAnimationGroup.from !== null && parsedAnimationGroup.to !== null) {\r\n animationGroup.normalize(parsedAnimationGroup.from, parsedAnimationGroup.to);\r\n }\r\n\r\n if (Tags) {\r\n Tags.AddTagsTo(animationGroup, parsedAnimationGroup.tags);\r\n }\r\n\r\n if (parsedAnimationGroup.metadata !== undefined) {\r\n animationGroup.metadata = parsedAnimationGroup.metadata;\r\n }\r\n\r\n return animationGroup;\r\n }\r\n\r\n /**\r\n * Convert the keyframes for all animations belonging to the group to be relative to a given reference frame.\r\n * @param sourceAnimationGroup defines the AnimationGroup containing animations to convert\r\n * @param referenceFrame defines the frame that keyframes in the range will be relative to\r\n * @param range defines the name of the AnimationRange belonging to the animations in the group to convert\r\n * @param cloneOriginal defines whether or not to clone the group and convert the clone or convert the original group (default is false)\r\n * @param clonedName defines the name of the resulting cloned AnimationGroup if cloneOriginal is true\r\n * @returns a new AnimationGroup if cloneOriginal is true or the original AnimationGroup if cloneOriginal is false\r\n */\r\n public static MakeAnimationAdditive(sourceAnimationGroup: AnimationGroup, referenceFrame = 0, range?: string, cloneOriginal = false, clonedName?: string): AnimationGroup {\r\n let animationGroup = sourceAnimationGroup;\r\n if (cloneOriginal) {\r\n animationGroup = sourceAnimationGroup.clone(clonedName || animationGroup.name);\r\n }\r\n\r\n const targetedAnimations = animationGroup.targetedAnimations;\r\n for (let index = 0; index < targetedAnimations.length; index++) {\r\n const targetedAnimation = targetedAnimations[index];\r\n Animation.MakeAnimationAdditive(targetedAnimation.animation, referenceFrame, range);\r\n }\r\n\r\n animationGroup.isAdditive = true;\r\n\r\n return animationGroup;\r\n }\r\n\r\n /**\r\n * Returns the string \"AnimationGroup\"\r\n * @returns \"AnimationGroup\"\r\n */\r\n public getClassName(): string {\r\n return \"AnimationGroup\";\r\n }\r\n\r\n /**\r\n * Creates a detailed string about the object\r\n * @param fullDetails defines if the output string will support multiple levels of logging within scene loading\r\n * @returns a string representing the object\r\n */\r\n public toString(fullDetails?: boolean): string {\r\n let ret = \"Name: \" + this.name;\r\n ret += \", type: \" + this.getClassName();\r\n if (fullDetails) {\r\n ret += \", from: \" + this._from;\r\n ret += \", to: \" + this._to;\r\n ret += \", isStarted: \" + this._isStarted;\r\n ret += \", speedRatio: \" + this._speedRatio;\r\n ret += \", targetedAnimations length: \" + this._targetedAnimations.length;\r\n ret += \", animatables length: \" + this._animatables;\r\n }\r\n return ret;\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"animationGroup.js","sourceRoot":"","sources":["../../../../../lts/core/generated/Animations/animationGroup.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAIxC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAGrD,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC;;GAEG;AACH,MAAM,OAAO,iBAAiB;IAU1B;;;OAGG;IACI,YAAY;QACf,OAAO,mBAAmB,CAAC;IAC/B,CAAC;IAED;;;OAGG;IACI,SAAS;QACZ,MAAM,mBAAmB,GAAQ,EAAE,CAAC;QACpC,mBAAmB,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,CAAC;QAC3D,mBAAmB,CAAC,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;QAE9C,OAAO,mBAAmB,CAAC;IAC/B,CAAC;CACJ;AAED;;GAEG;AACH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C;YACzE,GAAG,IAAI,wBAAwB,GAAG,IAAI,CAAC,YAAY,CAAC;SACvD;QACD,OAAO,GAAG,CAAC;IACf,CAAC;CACJ","sourcesContent":["import type { Animatable } from \"./animatable\";\r\nimport { Animation } from \"./animation\";\r\nimport type { IAnimationKey } from \"./animationKey\";\r\n\r\nimport type { Scene, IDisposable } from \"../scene\";\r\nimport { Observable } from \"../Misc/observable\";\r\nimport type { Nullable } from \"../types\";\r\nimport { EngineStore } from \"../Engines/engineStore\";\r\n\r\nimport type { AbstractScene } from \"../abstractScene\";\r\nimport { Tags } from \"../Misc/tags\";\r\n\r\n/**\r\n * This class defines the direct association between an animation and a target\r\n */\r\nexport class TargetedAnimation {\r\n /**\r\n * Animation to perform\r\n */\r\n public animation: Animation;\r\n /**\r\n * Target to animate\r\n */\r\n public target: any;\r\n\r\n /**\r\n * Returns the string \"TargetedAnimation\"\r\n * @returns \"TargetedAnimation\"\r\n */\r\n public getClassName(): string {\r\n return \"TargetedAnimation\";\r\n }\r\n\r\n /**\r\n * Serialize the object\r\n * @returns the JSON object representing the current entity\r\n */\r\n public serialize(): any {\r\n const serializationObject: any = {};\r\n serializationObject.animation = this.animation.serialize();\r\n serializationObject.targetId = this.target.id;\r\n\r\n return serializationObject;\r\n }\r\n}\r\n\r\n/**\r\n * Use this class to create coordinated animations on multiple targets\r\n */\r\nexport class AnimationGroup implements IDisposable {\r\n private _scene: Scene;\r\n\r\n private _targetedAnimations = new Array<TargetedAnimation>();\r\n private _animatables = new Array<Animatable>();\r\n private _from = Number.MAX_VALUE;\r\n private _to = -Number.MAX_VALUE;\r\n private _isStarted: boolean;\r\n private _isPaused: boolean;\r\n private _speedRatio = 1;\r\n private _loopAnimation = false;\r\n private _isAdditive = false;\r\n\r\n /** @internal */\r\n public _parentContainer: Nullable<AbstractScene> = null;\r\n\r\n /**\r\n * Gets or sets the unique id of the node\r\n */\r\n public uniqueId: number;\r\n\r\n /**\r\n * This observable will notify when one animation have ended\r\n */\r\n public onAnimationEndObservable = new Observable<TargetedAnimation>();\r\n\r\n /**\r\n * Observer raised when one animation loops\r\n */\r\n public onAnimationLoopObservable = new Observable<TargetedAnimation>();\r\n\r\n /**\r\n * Observer raised when all animations have looped\r\n */\r\n public onAnimationGroupLoopObservable = new Observable<AnimationGroup>();\r\n\r\n /**\r\n * This observable will notify when all animations have ended.\r\n */\r\n public onAnimationGroupEndObservable = new Observable<AnimationGroup>();\r\n\r\n /**\r\n * This observable will notify when all animations have paused.\r\n */\r\n public onAnimationGroupPauseObservable = new Observable<AnimationGroup>();\r\n\r\n /**\r\n * This observable will notify when all animations are playing.\r\n */\r\n public onAnimationGroupPlayObservable = new Observable<AnimationGroup>();\r\n\r\n /**\r\n * Gets or sets an object used to store user defined information for the node\r\n */\r\n public metadata: any = null;\r\n\r\n /**\r\n * Gets the first frame\r\n */\r\n public get from(): number {\r\n return this._from;\r\n }\r\n\r\n /**\r\n * Gets the last frame\r\n */\r\n public get to(): number {\r\n return this._to;\r\n }\r\n\r\n /**\r\n * Define if the animations are started\r\n */\r\n public get isStarted(): boolean {\r\n return this._isStarted;\r\n }\r\n\r\n /**\r\n * Gets a value indicating that the current group is playing\r\n */\r\n public get isPlaying(): boolean {\r\n return this._isStarted && !this._isPaused;\r\n }\r\n\r\n /**\r\n * Gets or sets the speed ratio to use for all animations\r\n */\r\n public get speedRatio(): number {\r\n return this._speedRatio;\r\n }\r\n\r\n /**\r\n * Gets or sets the speed ratio to use for all animations\r\n */\r\n public set speedRatio(value: number) {\r\n if (this._speedRatio === value) {\r\n return;\r\n }\r\n\r\n this._speedRatio = value;\r\n\r\n for (let index = 0; index < this._animatables.length; index++) {\r\n const animatable = this._animatables[index];\r\n animatable.speedRatio = this._speedRatio;\r\n }\r\n }\r\n\r\n /**\r\n * Gets or sets if all animations should loop or not\r\n */\r\n public get loopAnimation(): boolean {\r\n return this._loopAnimation;\r\n }\r\n\r\n public set loopAnimation(value: boolean) {\r\n if (this._loopAnimation === value) {\r\n return;\r\n }\r\n\r\n this._loopAnimation = value;\r\n\r\n for (let index = 0; index < this._animatables.length; index++) {\r\n const animatable = this._animatables[index];\r\n animatable.loopAnimation = this._loopAnimation;\r\n }\r\n }\r\n\r\n /**\r\n * Gets or sets if all animations should be evaluated additively\r\n */\r\n public get isAdditive(): boolean {\r\n return this._isAdditive;\r\n }\r\n\r\n public set isAdditive(value: boolean) {\r\n if (this._isAdditive === value) {\r\n return;\r\n }\r\n\r\n this._isAdditive = value;\r\n\r\n for (let index = 0; index < this._animatables.length; index++) {\r\n const animatable = this._animatables[index];\r\n animatable.isAdditive = this._isAdditive;\r\n }\r\n }\r\n\r\n /**\r\n * Gets the targeted animations for this animation group\r\n */\r\n public get targetedAnimations(): Array<TargetedAnimation> {\r\n return this._targetedAnimations;\r\n }\r\n\r\n /**\r\n * returning the list of animatables controlled by this animation group.\r\n */\r\n public get animatables(): Array<Animatable> {\r\n return this._animatables;\r\n }\r\n\r\n /**\r\n * Gets the list of target animations\r\n */\r\n public get children() {\r\n return this._targetedAnimations;\r\n }\r\n\r\n /**\r\n * Instantiates a new Animation Group.\r\n * This helps managing several animations at once.\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/groupAnimations\r\n * @param name Defines the name of the group\r\n * @param scene Defines the scene the group belongs to\r\n */\r\n public constructor(\r\n /** The name of the animation group */\r\n public name: string,\r\n scene: Nullable<Scene> = null\r\n ) {\r\n this._scene = scene || EngineStore.LastCreatedScene!;\r\n this.uniqueId = this._scene.getUniqueId();\r\n\r\n this._scene.addAnimationGroup(this);\r\n }\r\n\r\n /**\r\n * Add an animation (with its target) in the group\r\n * @param animation defines the animation we want to add\r\n * @param target defines the target of the animation\r\n * @returns the TargetedAnimation object\r\n */\r\n public addTargetedAnimation(animation: Animation, target: any): TargetedAnimation {\r\n const targetedAnimation = new TargetedAnimation();\r\n targetedAnimation.animation = animation;\r\n targetedAnimation.target = target;\r\n\r\n const keys = animation.getKeys();\r\n if (this._from > keys[0].frame) {\r\n this._from = keys[0].frame;\r\n }\r\n\r\n if (this._to < keys[keys.length - 1].frame) {\r\n this._to = keys[keys.length - 1].frame;\r\n }\r\n\r\n this._targetedAnimations.push(targetedAnimation);\r\n\r\n return targetedAnimation;\r\n }\r\n\r\n /**\r\n * This function will normalize every animation in the group to make sure they all go from beginFrame to endFrame\r\n * It can add constant keys at begin or end\r\n * @param beginFrame defines the new begin frame for all animations or the smallest begin frame of all animations if null (defaults to null)\r\n * @param endFrame defines the new end frame for all animations or the largest end frame of all animations if null (defaults to null)\r\n * @returns the animation group\r\n */\r\n public normalize(beginFrame: Nullable<number> = null, endFrame: Nullable<number> = null): AnimationGroup {\r\n if (beginFrame == null) {\r\n beginFrame = this._from;\r\n }\r\n if (endFrame == null) {\r\n endFrame = this._to;\r\n }\r\n\r\n for (let index = 0; index < this._targetedAnimations.length; index++) {\r\n const targetedAnimation = this._targetedAnimations[index];\r\n const keys = targetedAnimation.animation.getKeys();\r\n const startKey = keys[0];\r\n const endKey = keys[keys.length - 1];\r\n\r\n if (startKey.frame > beginFrame) {\r\n const newKey: IAnimationKey = {\r\n frame: beginFrame,\r\n value: startKey.value,\r\n inTangent: startKey.inTangent,\r\n outTangent: startKey.outTangent,\r\n interpolation: startKey.interpolation,\r\n };\r\n keys.splice(0, 0, newKey);\r\n }\r\n\r\n if (endKey.frame < endFrame) {\r\n const newKey: IAnimationKey = {\r\n frame: endFrame,\r\n value: endKey.value,\r\n inTangent: endKey.inTangent,\r\n outTangent: endKey.outTangent,\r\n interpolation: endKey.interpolation,\r\n };\r\n keys.push(newKey);\r\n }\r\n }\r\n\r\n this._from = beginFrame;\r\n this._to = endFrame;\r\n\r\n return this;\r\n }\r\n\r\n private _animationLoopCount: number;\r\n private _animationLoopFlags: boolean[] = [];\r\n\r\n private _processLoop(animatable: Animatable, targetedAnimation: TargetedAnimation, index: number) {\r\n animatable.onAnimationLoop = () => {\r\n this.onAnimationLoopObservable.notifyObservers(targetedAnimation);\r\n\r\n if (this._animationLoopFlags[index]) {\r\n return;\r\n }\r\n\r\n this._animationLoopFlags[index] = true;\r\n\r\n this._animationLoopCount++;\r\n if (this._animationLoopCount === this._targetedAnimations.length) {\r\n this.onAnimationGroupLoopObservable.notifyObservers(this);\r\n this._animationLoopCount = 0;\r\n this._animationLoopFlags.length = 0;\r\n }\r\n };\r\n }\r\n\r\n /**\r\n * Start all animations on given targets\r\n * @param loop defines if animations must loop\r\n * @param speedRatio defines the ratio to apply to animation speed (1 by default)\r\n * @param from defines the from key (optional)\r\n * @param to defines the to key (optional)\r\n * @param isAdditive defines the additive state for the resulting animatables (optional)\r\n * @returns the current animation group\r\n */\r\n public start(loop = false, speedRatio = 1, from?: number, to?: number, isAdditive?: boolean): AnimationGroup {\r\n if (this._isStarted || this._targetedAnimations.length === 0) {\r\n return this;\r\n }\r\n\r\n this._loopAnimation = loop;\r\n\r\n this._animationLoopCount = 0;\r\n this._animationLoopFlags.length = 0;\r\n\r\n for (let index = 0; index < this._targetedAnimations.length; index++) {\r\n const targetedAnimation = this._targetedAnimations[index];\r\n const animatable = this._scene.beginDirectAnimation(\r\n targetedAnimation.target,\r\n [targetedAnimation.animation],\r\n from !== undefined ? from : this._from,\r\n to !== undefined ? to : this._to,\r\n loop,\r\n speedRatio,\r\n undefined,\r\n undefined,\r\n isAdditive !== undefined ? isAdditive : this._isAdditive\r\n );\r\n animatable.onAnimationEnd = () => {\r\n this.onAnimationEndObservable.notifyObservers(targetedAnimation);\r\n this._checkAnimationGroupEnded(animatable);\r\n };\r\n\r\n this._processLoop(animatable, targetedAnimation, index);\r\n this._animatables.push(animatable);\r\n }\r\n\r\n this._speedRatio = speedRatio;\r\n\r\n this._isStarted = true;\r\n this._isPaused = false;\r\n\r\n this.onAnimationGroupPlayObservable.notifyObservers(this);\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Pause all animations\r\n * @returns the animation group\r\n */\r\n public pause(): AnimationGroup {\r\n if (!this._isStarted) {\r\n return this;\r\n }\r\n\r\n this._isPaused = true;\r\n\r\n for (let index = 0; index < this._animatables.length; index++) {\r\n const animatable = this._animatables[index];\r\n animatable.pause();\r\n }\r\n\r\n this.onAnimationGroupPauseObservable.notifyObservers(this);\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Play all animations to initial state\r\n * This function will start() the animations if they were not started or will restart() them if they were paused\r\n * @param loop defines if animations must loop\r\n * @returns the animation group\r\n */\r\n public play(loop?: boolean): AnimationGroup {\r\n // only if all animatables are ready and exist\r\n if (this.isStarted && this._animatables.length === this._targetedAnimations.length) {\r\n if (loop !== undefined) {\r\n this.loopAnimation = loop;\r\n }\r\n this.restart();\r\n } else {\r\n this.stop();\r\n this.start(loop, this._speedRatio);\r\n }\r\n\r\n this._isPaused = false;\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Reset all animations to initial state\r\n * @returns the animation group\r\n */\r\n public reset(): AnimationGroup {\r\n if (!this._isStarted) {\r\n this.play();\r\n this.goToFrame(0);\r\n this.stop();\r\n return this;\r\n }\r\n\r\n for (let index = 0; index < this._animatables.length; index++) {\r\n const animatable = this._animatables[index];\r\n animatable.reset();\r\n }\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Restart animations from key 0\r\n * @returns the animation group\r\n */\r\n public restart(): AnimationGroup {\r\n if (!this._isStarted) {\r\n return this;\r\n }\r\n\r\n for (let index = 0; index < this._animatables.length; index++) {\r\n const animatable = this._animatables[index];\r\n animatable.restart();\r\n }\r\n\r\n this.onAnimationGroupPlayObservable.notifyObservers(this);\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Stop all animations\r\n * @returns the animation group\r\n */\r\n public stop(): AnimationGroup {\r\n if (!this._isStarted) {\r\n return this;\r\n }\r\n\r\n const list = this._animatables.slice();\r\n for (let index = 0; index < list.length; index++) {\r\n list[index].stop();\r\n }\r\n\r\n this._isStarted = false;\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Set animation weight for all animatables\r\n * @param weight defines the weight to use\r\n * @returns the animationGroup\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#animation-weights\r\n */\r\n public setWeightForAllAnimatables(weight: number): AnimationGroup {\r\n for (let index = 0; index < this._animatables.length; index++) {\r\n const animatable = this._animatables[index];\r\n animatable.weight = weight;\r\n }\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Synchronize and normalize all animatables with a source animatable\r\n * @param root defines the root animatable to synchronize with (null to stop synchronizing)\r\n * @returns the animationGroup\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#animation-weights\r\n */\r\n public syncAllAnimationsWith(root: Nullable<Animatable>): AnimationGroup {\r\n for (let index = 0; index < this._animatables.length; index++) {\r\n const animatable = this._animatables[index];\r\n animatable.syncWith(root);\r\n }\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Goes to a specific frame in this animation group\r\n * @param frame the frame number to go to\r\n * @returns the animationGroup\r\n */\r\n public goToFrame(frame: number): AnimationGroup {\r\n if (!this._isStarted) {\r\n return this;\r\n }\r\n\r\n for (let index = 0; index < this._animatables.length; index++) {\r\n const animatable = this._animatables[index];\r\n animatable.goToFrame(frame);\r\n }\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Dispose all associated resources\r\n */\r\n public dispose(): void {\r\n this._targetedAnimations.length = 0;\r\n this._animatables.length = 0;\r\n\r\n // Remove from scene\r\n const index = this._scene.animationGroups.indexOf(this);\r\n\r\n if (index > -1) {\r\n this._scene.animationGroups.splice(index, 1);\r\n }\r\n\r\n if (this._parentContainer) {\r\n const index = this._parentContainer.animationGroups.indexOf(this);\r\n if (index > -1) {\r\n this._parentContainer.animationGroups.splice(index, 1);\r\n }\r\n this._parentContainer = null;\r\n }\r\n\r\n this.onAnimationEndObservable.clear();\r\n this.onAnimationGroupEndObservable.clear();\r\n this.onAnimationGroupPauseObservable.clear();\r\n this.onAnimationGroupPlayObservable.clear();\r\n this.onAnimationLoopObservable.clear();\r\n this.onAnimationGroupLoopObservable.clear();\r\n }\r\n\r\n private _checkAnimationGroupEnded(animatable: Animatable) {\r\n // animatable should be taken out of the array\r\n const idx = this._animatables.indexOf(animatable);\r\n if (idx > -1) {\r\n this._animatables.splice(idx, 1);\r\n }\r\n\r\n // all animatables were removed? animation group ended!\r\n if (this._animatables.length === 0) {\r\n this._isStarted = false;\r\n this.onAnimationGroupEndObservable.notifyObservers(this);\r\n }\r\n }\r\n\r\n /**\r\n * Clone the current animation group and returns a copy\r\n * @param newName defines the name of the new group\r\n * @param targetConverter defines an optional function used to convert current animation targets to new ones\r\n * @param cloneAnimations defines if the animations should be cloned or referenced\r\n * @returns the new animation group\r\n */\r\n public clone(newName: string, targetConverter?: (oldTarget: any) => any, cloneAnimations = false): AnimationGroup {\r\n const newGroup = new AnimationGroup(newName || this.name, this._scene);\r\n\r\n for (const targetAnimation of this._targetedAnimations) {\r\n newGroup.addTargetedAnimation(\r\n cloneAnimations ? targetAnimation.animation.clone() : targetAnimation.animation,\r\n targetConverter ? targetConverter(targetAnimation.target) : targetAnimation.target\r\n );\r\n }\r\n\r\n return newGroup;\r\n }\r\n\r\n /**\r\n * Serializes the animationGroup to an object\r\n * @returns Serialized object\r\n */\r\n public serialize(): any {\r\n const serializationObject: any = {};\r\n\r\n serializationObject.name = this.name;\r\n serializationObject.from = this.from;\r\n serializationObject.to = this.to;\r\n serializationObject.targetedAnimations = [];\r\n for (let targetedAnimationIndex = 0; targetedAnimationIndex < this.targetedAnimations.length; targetedAnimationIndex++) {\r\n const targetedAnimation = this.targetedAnimations[targetedAnimationIndex];\r\n serializationObject.targetedAnimations[targetedAnimationIndex] = targetedAnimation.serialize();\r\n }\r\n\r\n if (Tags && Tags.HasTags(this)) {\r\n serializationObject.tags = Tags.GetTags(this);\r\n }\r\n\r\n // Metadata\r\n if (this.metadata) {\r\n serializationObject.metadata = this.metadata;\r\n }\r\n\r\n return serializationObject;\r\n }\r\n\r\n // Statics\r\n /**\r\n * Returns a new AnimationGroup object parsed from the source provided.\r\n * @param parsedAnimationGroup defines the source\r\n * @param scene defines the scene that will receive the animationGroup\r\n * @returns a new AnimationGroup\r\n */\r\n public static Parse(parsedAnimationGroup: any, scene: Scene): AnimationGroup {\r\n const animationGroup = new AnimationGroup(parsedAnimationGroup.name, scene);\r\n for (let i = 0; i < parsedAnimationGroup.targetedAnimations.length; i++) {\r\n const targetedAnimation = parsedAnimationGroup.targetedAnimations[i];\r\n const animation = Animation.Parse(targetedAnimation.animation);\r\n const id = targetedAnimation.targetId;\r\n if (targetedAnimation.animation.property === \"influence\") {\r\n // morph target animation\r\n const morphTarget = scene.getMorphTargetById(id);\r\n if (morphTarget) {\r\n animationGroup.addTargetedAnimation(animation, morphTarget);\r\n }\r\n } else {\r\n const targetNode = scene.getNodeById(id);\r\n\r\n if (targetNode != null) {\r\n animationGroup.addTargetedAnimation(animation, targetNode);\r\n }\r\n }\r\n }\r\n\r\n if (parsedAnimationGroup.from !== null && parsedAnimationGroup.to !== null) {\r\n animationGroup.normalize(parsedAnimationGroup.from, parsedAnimationGroup.to);\r\n }\r\n\r\n if (Tags) {\r\n Tags.AddTagsTo(animationGroup, parsedAnimationGroup.tags);\r\n }\r\n\r\n if (parsedAnimationGroup.metadata !== undefined) {\r\n animationGroup.metadata = parsedAnimationGroup.metadata;\r\n }\r\n\r\n return animationGroup;\r\n }\r\n\r\n /**\r\n * Convert the keyframes for all animations belonging to the group to be relative to a given reference frame.\r\n * @param sourceAnimationGroup defines the AnimationGroup containing animations to convert\r\n * @param referenceFrame defines the frame that keyframes in the range will be relative to\r\n * @param range defines the name of the AnimationRange belonging to the animations in the group to convert\r\n * @param cloneOriginal defines whether or not to clone the group and convert the clone or convert the original group (default is false)\r\n * @param clonedName defines the name of the resulting cloned AnimationGroup if cloneOriginal is true\r\n * @returns a new AnimationGroup if cloneOriginal is true or the original AnimationGroup if cloneOriginal is false\r\n */\r\n public static MakeAnimationAdditive(sourceAnimationGroup: AnimationGroup, referenceFrame = 0, range?: string, cloneOriginal = false, clonedName?: string): AnimationGroup {\r\n let animationGroup = sourceAnimationGroup;\r\n if (cloneOriginal) {\r\n animationGroup = sourceAnimationGroup.clone(clonedName || animationGroup.name);\r\n }\r\n\r\n const targetedAnimations = animationGroup.targetedAnimations;\r\n for (let index = 0; index < targetedAnimations.length; index++) {\r\n const targetedAnimation = targetedAnimations[index];\r\n Animation.MakeAnimationAdditive(targetedAnimation.animation, referenceFrame, range);\r\n }\r\n\r\n animationGroup.isAdditive = true;\r\n\r\n return animationGroup;\r\n }\r\n\r\n /**\r\n * Returns the string \"AnimationGroup\"\r\n * @returns \"AnimationGroup\"\r\n */\r\n public getClassName(): string {\r\n return \"AnimationGroup\";\r\n }\r\n\r\n /**\r\n * Creates a detailed string about the object\r\n * @param fullDetails defines if the output string will support multiple levels of logging within scene loading\r\n * @returns a string representing the object\r\n */\r\n public toString(fullDetails?: boolean): string {\r\n let ret = \"Name: \" + this.name;\r\n ret += \", type: \" + this.getClassName();\r\n if (fullDetails) {\r\n ret += \", from: \" + this._from;\r\n ret += \", to: \" + this._to;\r\n ret += \", isStarted: \" + this._isStarted;\r\n ret += \", speedRatio: \" + this._speedRatio;\r\n ret += \", targetedAnimations length: \" + this._targetedAnimations.length;\r\n ret += \", animatables length: \" + this._animatables;\r\n }\r\n return ret;\r\n }\r\n}\r\n"]}
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * This represents the main contract an easing function should follow.
3
3
  * Easing functions are used throughout the animation system.
4
- * @see https://doc.babylonjs.com/divingDeeper/animation/advanced_animations#easing-functions
4
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions
5
5
  */
6
6
  export interface IEasingFunction {
7
7
  /**
@@ -16,7 +16,7 @@ export interface IEasingFunction {
16
16
  }
17
17
  /**
18
18
  * Base class used for every default easing function.
19
- * @see https://doc.babylonjs.com/divingDeeper/animation/advanced_animations#easing-functions
19
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions
20
20
  */
21
21
  export declare class EasingFunction implements IEasingFunction {
22
22
  /**
@@ -57,7 +57,7 @@ export declare class EasingFunction implements IEasingFunction {
57
57
  /**
58
58
  * Easing function with a circle shape (see link below).
59
59
  * @see https://easings.net/#easeInCirc
60
- * @see https://doc.babylonjs.com/divingDeeper/animation/advanced_animations#easing-functions
60
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions
61
61
  */
62
62
  export declare class CircleEase extends EasingFunction implements IEasingFunction {
63
63
  /**
@@ -68,7 +68,7 @@ export declare class CircleEase extends EasingFunction implements IEasingFunctio
68
68
  /**
69
69
  * Easing function with a ease back shape (see link below).
70
70
  * @see https://easings.net/#easeInBack
71
- * @see https://doc.babylonjs.com/divingDeeper/animation/advanced_animations#easing-functions
71
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions
72
72
  */
73
73
  export declare class BackEase extends EasingFunction implements IEasingFunction {
74
74
  /** Defines the amplitude of the function */
@@ -89,7 +89,7 @@ export declare class BackEase extends EasingFunction implements IEasingFunction
89
89
  /**
90
90
  * Easing function with a bouncing shape (see link below).
91
91
  * @see https://easings.net/#easeInBounce
92
- * @see https://doc.babylonjs.com/divingDeeper/animation/advanced_animations#easing-functions
92
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions
93
93
  */
94
94
  export declare class BounceEase extends EasingFunction implements IEasingFunction {
95
95
  /** Defines the number of bounces */
@@ -115,7 +115,7 @@ export declare class BounceEase extends EasingFunction implements IEasingFunctio
115
115
  /**
116
116
  * Easing function with a power of 3 shape (see link below).
117
117
  * @see https://easings.net/#easeInCubic
118
- * @see https://doc.babylonjs.com/divingDeeper/animation/advanced_animations#easing-functions
118
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions
119
119
  */
120
120
  export declare class CubicEase extends EasingFunction implements IEasingFunction {
121
121
  /**
@@ -126,7 +126,7 @@ export declare class CubicEase extends EasingFunction implements IEasingFunction
126
126
  /**
127
127
  * Easing function with an elastic shape (see link below).
128
128
  * @see https://easings.net/#easeInElastic
129
- * @see https://doc.babylonjs.com/divingDeeper/animation/advanced_animations#easing-functions
129
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions
130
130
  */
131
131
  export declare class ElasticEase extends EasingFunction implements IEasingFunction {
132
132
  /** Defines the number of oscillations*/
@@ -152,7 +152,7 @@ export declare class ElasticEase extends EasingFunction implements IEasingFuncti
152
152
  /**
153
153
  * Easing function with an exponential shape (see link below).
154
154
  * @see https://easings.net/#easeInExpo
155
- * @see https://doc.babylonjs.com/divingDeeper/animation/advanced_animations#easing-functions
155
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions
156
156
  */
157
157
  export declare class ExponentialEase extends EasingFunction implements IEasingFunction {
158
158
  /** Defines the exponent of the function */
@@ -173,7 +173,7 @@ export declare class ExponentialEase extends EasingFunction implements IEasingFu
173
173
  /**
174
174
  * Easing function with a power shape (see link below).
175
175
  * @see https://easings.net/#easeInQuad
176
- * @see https://doc.babylonjs.com/divingDeeper/animation/advanced_animations#easing-functions
176
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions
177
177
  */
178
178
  export declare class PowerEase extends EasingFunction implements IEasingFunction {
179
179
  /** Defines the power of the function */
@@ -194,7 +194,7 @@ export declare class PowerEase extends EasingFunction implements IEasingFunction
194
194
  /**
195
195
  * Easing function with a power of 2 shape (see link below).
196
196
  * @see https://easings.net/#easeInQuad
197
- * @see https://doc.babylonjs.com/divingDeeper/animation/advanced_animations#easing-functions
197
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions
198
198
  */
199
199
  export declare class QuadraticEase extends EasingFunction implements IEasingFunction {
200
200
  /**
@@ -205,7 +205,7 @@ export declare class QuadraticEase extends EasingFunction implements IEasingFunc
205
205
  /**
206
206
  * Easing function with a power of 4 shape (see link below).
207
207
  * @see https://easings.net/#easeInQuart
208
- * @see https://doc.babylonjs.com/divingDeeper/animation/advanced_animations#easing-functions
208
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions
209
209
  */
210
210
  export declare class QuarticEase extends EasingFunction implements IEasingFunction {
211
211
  /**
@@ -216,7 +216,7 @@ export declare class QuarticEase extends EasingFunction implements IEasingFuncti
216
216
  /**
217
217
  * Easing function with a power of 5 shape (see link below).
218
218
  * @see https://easings.net/#easeInQuint
219
- * @see https://doc.babylonjs.com/divingDeeper/animation/advanced_animations#easing-functions
219
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions
220
220
  */
221
221
  export declare class QuinticEase extends EasingFunction implements IEasingFunction {
222
222
  /**
@@ -227,7 +227,7 @@ export declare class QuinticEase extends EasingFunction implements IEasingFuncti
227
227
  /**
228
228
  * Easing function with a sin shape (see link below).
229
229
  * @see https://easings.net/#easeInSine
230
- * @see https://doc.babylonjs.com/divingDeeper/animation/advanced_animations#easing-functions
230
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions
231
231
  */
232
232
  export declare class SineEase extends EasingFunction implements IEasingFunction {
233
233
  /**
@@ -238,7 +238,7 @@ export declare class SineEase extends EasingFunction implements IEasingFunction
238
238
  /**
239
239
  * Easing function with a bezier shape (see link below).
240
240
  * @see http://cubic-bezier.com/#.17,.67,.83,.67
241
- * @see https://doc.babylonjs.com/divingDeeper/animation/advanced_animations#easing-functions
241
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions
242
242
  */
243
243
  export declare class BezierCurveEase extends EasingFunction implements IEasingFunction {
244
244
  /** Defines the x component of the start tangent in the bezier curve */
@@ -1,7 +1,7 @@
1
1
  import { BezierCurve } from "../Maths/math.path.js";
2
2
  /**
3
3
  * Base class used for every default easing function.
4
- * @see https://doc.babylonjs.com/divingDeeper/animation/advanced_animations#easing-functions
4
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions
5
5
  */
6
6
  export class EasingFunction {
7
7
  constructor() {
@@ -63,7 +63,7 @@ EasingFunction.EASINGMODE_EASEINOUT = 2;
63
63
  /**
64
64
  * Easing function with a circle shape (see link below).
65
65
  * @see https://easings.net/#easeInCirc
66
- * @see https://doc.babylonjs.com/divingDeeper/animation/advanced_animations#easing-functions
66
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions
67
67
  */
68
68
  export class CircleEase extends EasingFunction {
69
69
  /**
@@ -77,7 +77,7 @@ export class CircleEase extends EasingFunction {
77
77
  /**
78
78
  * Easing function with a ease back shape (see link below).
79
79
  * @see https://easings.net/#easeInBack
80
- * @see https://doc.babylonjs.com/divingDeeper/animation/advanced_animations#easing-functions
80
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions
81
81
  */
82
82
  export class BackEase extends EasingFunction {
83
83
  /**
@@ -102,7 +102,7 @@ export class BackEase extends EasingFunction {
102
102
  /**
103
103
  * Easing function with a bouncing shape (see link below).
104
104
  * @see https://easings.net/#easeInBounce
105
- * @see https://doc.babylonjs.com/divingDeeper/animation/advanced_animations#easing-functions
105
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions
106
106
  */
107
107
  export class BounceEase extends EasingFunction {
108
108
  /**
@@ -147,7 +147,7 @@ export class BounceEase extends EasingFunction {
147
147
  /**
148
148
  * Easing function with a power of 3 shape (see link below).
149
149
  * @see https://easings.net/#easeInCubic
150
- * @see https://doc.babylonjs.com/divingDeeper/animation/advanced_animations#easing-functions
150
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions
151
151
  */
152
152
  export class CubicEase extends EasingFunction {
153
153
  /**
@@ -160,7 +160,7 @@ export class CubicEase extends EasingFunction {
160
160
  /**
161
161
  * Easing function with an elastic shape (see link below).
162
162
  * @see https://easings.net/#easeInElastic
163
- * @see https://doc.babylonjs.com/divingDeeper/animation/advanced_animations#easing-functions
163
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions
164
164
  */
165
165
  export class ElasticEase extends EasingFunction {
166
166
  /**
@@ -197,7 +197,7 @@ export class ElasticEase extends EasingFunction {
197
197
  /**
198
198
  * Easing function with an exponential shape (see link below).
199
199
  * @see https://easings.net/#easeInExpo
200
- * @see https://doc.babylonjs.com/divingDeeper/animation/advanced_animations#easing-functions
200
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions
201
201
  */
202
202
  export class ExponentialEase extends EasingFunction {
203
203
  /**
@@ -224,7 +224,7 @@ export class ExponentialEase extends EasingFunction {
224
224
  /**
225
225
  * Easing function with a power shape (see link below).
226
226
  * @see https://easings.net/#easeInQuad
227
- * @see https://doc.babylonjs.com/divingDeeper/animation/advanced_animations#easing-functions
227
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions
228
228
  */
229
229
  export class PowerEase extends EasingFunction {
230
230
  /**
@@ -249,7 +249,7 @@ export class PowerEase extends EasingFunction {
249
249
  /**
250
250
  * Easing function with a power of 2 shape (see link below).
251
251
  * @see https://easings.net/#easeInQuad
252
- * @see https://doc.babylonjs.com/divingDeeper/animation/advanced_animations#easing-functions
252
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions
253
253
  */
254
254
  export class QuadraticEase extends EasingFunction {
255
255
  /**
@@ -262,7 +262,7 @@ export class QuadraticEase extends EasingFunction {
262
262
  /**
263
263
  * Easing function with a power of 4 shape (see link below).
264
264
  * @see https://easings.net/#easeInQuart
265
- * @see https://doc.babylonjs.com/divingDeeper/animation/advanced_animations#easing-functions
265
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions
266
266
  */
267
267
  export class QuarticEase extends EasingFunction {
268
268
  /**
@@ -275,7 +275,7 @@ export class QuarticEase extends EasingFunction {
275
275
  /**
276
276
  * Easing function with a power of 5 shape (see link below).
277
277
  * @see https://easings.net/#easeInQuint
278
- * @see https://doc.babylonjs.com/divingDeeper/animation/advanced_animations#easing-functions
278
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions
279
279
  */
280
280
  export class QuinticEase extends EasingFunction {
281
281
  /**
@@ -288,7 +288,7 @@ export class QuinticEase extends EasingFunction {
288
288
  /**
289
289
  * Easing function with a sin shape (see link below).
290
290
  * @see https://easings.net/#easeInSine
291
- * @see https://doc.babylonjs.com/divingDeeper/animation/advanced_animations#easing-functions
291
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions
292
292
  */
293
293
  export class SineEase extends EasingFunction {
294
294
  /**
@@ -301,7 +301,7 @@ export class SineEase extends EasingFunction {
301
301
  /**
302
302
  * Easing function with a bezier shape (see link below).
303
303
  * @see http://cubic-bezier.com/#.17,.67,.83,.67
304
- * @see https://doc.babylonjs.com/divingDeeper/animation/advanced_animations#easing-functions
304
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions
305
305
  */
306
306
  export class BezierCurveEase extends EasingFunction {
307
307
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"easing.js","sourceRoot":"","sources":["../../../../../lts/core/generated/Animations/easing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAmBjD;;;GAGG;AACH,MAAM,OAAO,cAAc;IAA3B;QAgBY,gBAAW,GAAG,cAAc,CAAC,iBAAiB,CAAC;IA8C3D,CAAC;IA5CG;;;OAGG;IACI,aAAa,CAAC,UAAkB;QACnC,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,UAAU,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QAC/C,IAAI,CAAC,WAAW,GAAG,CAAC,CAAC;IACzB,CAAC;IACD;;;OAGG;IACI,aAAa;QAChB,OAAO,IAAI,CAAC,WAAW,CAAC;IAC5B,C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,KAAa,CAAC;QAErB,KAAK,EAAE,CAAC;QARD,OAAE,GAAF,EAAE,CAAY;QAEd,OAAE,GAAF,EAAE,CAAY;QAEd,OAAE,GAAF,EAAE,CAAY;QAEd,OAAE,GAAF,EAAE,CAAY;IAGzB,CAAC;IAED;;OAEG;IACI,UAAU,CAAC,QAAgB;QAC9B,OAAO,WAAW,CAAC,WAAW,CAAC,QAAQ,EAAE,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC;IACjF,CAAC;CACJ","sourcesContent":["import { BezierCurve } from \"../Maths/math.path\";\r\n\r\n/**\r\n * This represents the main contract an easing function should follow.\r\n * Easing functions are used throughout the animation system.\r\n * @see https://doc.babylonjs.com/divingDeeper/animation/advanced_animations#easing-functions\r\n */\r\nexport interface IEasingFunction {\r\n /**\r\n * Given an input gradient between 0 and 1, this returns the corresponding value\r\n * of the easing function.\r\n * The link below provides some of the most common examples of easing functions.\r\n * @see https://easings.net/\r\n * @param gradient Defines the value between 0 and 1 we want the easing value for\r\n * @returns the corresponding value on the curve defined by the easing function\r\n */\r\n ease(gradient: number): number;\r\n}\r\n\r\n/**\r\n * Base class used for every default easing function.\r\n * @see https://doc.babylonjs.com/divingDeeper/animation/advanced_animations#easing-functions\r\n */\r\nexport class EasingFunction implements IEasingFunction {\r\n /**\r\n * Interpolation follows the mathematical formula associated with the easing function.\r\n */\r\n public static readonly EASINGMODE_EASEIN = 0;\r\n\r\n /**\r\n * Interpolation follows 100% interpolation minus the output of the formula associated with the easing function.\r\n */\r\n public static readonly EASINGMODE_EASEOUT = 1;\r\n\r\n /**\r\n * Interpolation uses EaseIn for the first half of the animation and EaseOut for the second half.\r\n */\r\n public static readonly EASINGMODE_EASEINOUT = 2;\r\n\r\n private _easingMode = EasingFunction.EASINGMODE_EASEIN;\r\n\r\n /**\r\n * Sets the easing mode of the current function.\r\n * @param easingMode Defines the willing mode (EASINGMODE_EASEIN, EASINGMODE_EASEOUT or EASINGMODE_EASEINOUT)\r\n */\r\n public setEasingMode(easingMode: number) {\r\n const n = Math.min(Math.max(easingMode, 0), 2);\r\n this._easingMode = n;\r\n }\r\n /**\r\n * Gets the current easing mode.\r\n * @returns the easing mode\r\n */\r\n public getEasingMode(): number {\r\n return this._easingMode;\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n public easeInCore(gradient: number): number {\r\n throw new Error(\"You must implement this method\");\r\n }\r\n\r\n /**\r\n * Given an input gradient between 0 and 1, this returns the corresponding value\r\n * of the easing function.\r\n * @param gradient Defines the value between 0 and 1 we want the easing value for\r\n * @returns the corresponding value on the curve defined by the easing function\r\n */\r\n public ease(gradient: number): number {\r\n switch (this._easingMode) {\r\n case EasingFunction.EASINGMODE_EASEIN:\r\n return this.easeInCore(gradient);\r\n case EasingFunction.EASINGMODE_EASEOUT:\r\n return 1 - this.easeInCore(1 - gradient);\r\n }\r\n\r\n if (gradient >= 0.5) {\r\n return (1 - this.easeInCore((1 - gradient) * 2)) * 0.5 + 0.5;\r\n }\r\n\r\n return this.easeInCore(gradient * 2) * 0.5;\r\n }\r\n}\r\n\r\n/**\r\n * Easing function with a circle shape (see link below).\r\n * @see https://easings.net/#easeInCirc\r\n * @see https://doc.babylonjs.com/divingDeeper/animation/advanced_animations#easing-functions\r\n */\r\nexport class CircleEase extends EasingFunction implements IEasingFunction {\r\n /**\r\n * @internal\r\n */\r\n public easeInCore(gradient: number): number {\r\n gradient = Math.max(0, Math.min(1, gradient));\r\n return 1.0 - Math.sqrt(1.0 - gradient * gradient);\r\n }\r\n}\r\n\r\n/**\r\n * Easing function with a ease back shape (see link below).\r\n * @see https://easings.net/#easeInBack\r\n * @see https://doc.babylonjs.com/divingDeeper/animation/advanced_animations#easing-functions\r\n */\r\nexport class BackEase extends EasingFunction implements IEasingFunction {\r\n /**\r\n * Instantiates a back ease easing\r\n * @see https://easings.net/#easeInBack\r\n * @param amplitude Defines the amplitude of the function\r\n */\r\n constructor(\r\n /** Defines the amplitude of the function */\r\n public amplitude: number = 1\r\n ) {\r\n super();\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public easeInCore(gradient: number): number {\r\n const num = Math.max(0, this.amplitude);\r\n return Math.pow(gradient, 3.0) - gradient * num * Math.sin(3.1415926535897931 * gradient);\r\n }\r\n}\r\n\r\n/**\r\n * Easing function with a bouncing shape (see link below).\r\n * @see https://easings.net/#easeInBounce\r\n * @see https://doc.babylonjs.com/divingDeeper/animation/advanced_animations#easing-functions\r\n */\r\nexport class BounceEase extends EasingFunction implements IEasingFunction {\r\n /**\r\n * Instantiates a bounce easing\r\n * @see https://easings.net/#easeInBounce\r\n * @param bounces Defines the number of bounces\r\n * @param bounciness Defines the amplitude of the bounce\r\n */\r\n constructor(\r\n /** Defines the number of bounces */\r\n public bounces: number = 3,\r\n /** Defines the amplitude of the bounce */\r\n public bounciness: number = 2\r\n ) {\r\n super();\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public easeInCore(gradient: number): number {\r\n const y = Math.max(0.0, this.bounces);\r\n let bounciness = this.bounciness;\r\n if (bounciness <= 1.0) {\r\n bounciness = 1.001;\r\n }\r\n const num9 = Math.pow(bounciness, y);\r\n const num5 = 1.0 - bounciness;\r\n const num4 = (1.0 - num9) / num5 + num9 * 0.5;\r\n const num15 = gradient * num4;\r\n const num65 = Math.log(-num15 * (1.0 - bounciness) + 1.0) / Math.log(bounciness);\r\n const num3 = Math.floor(num65);\r\n const num13 = num3 + 1.0;\r\n const num8 = (1.0 - Math.pow(bounciness, num3)) / (num5 * num4);\r\n const num12 = (1.0 - Math.pow(bounciness, num13)) / (num5 * num4);\r\n const num7 = (num8 + num12) * 0.5;\r\n const num6 = gradient - num7;\r\n const num2 = num7 - num8;\r\n return (-Math.pow(1.0 / bounciness, y - num3) / (num2 * num2)) * (num6 - num2) * (num6 + num2);\r\n }\r\n}\r\n\r\n/**\r\n * Easing function with a power of 3 shape (see link below).\r\n * @see https://easings.net/#easeInCubic\r\n * @see https://doc.babylonjs.com/divingDeeper/animation/advanced_animations#easing-functions\r\n */\r\nexport class CubicEase extends EasingFunction implements IEasingFunction {\r\n /**\r\n * @internal\r\n */\r\n public easeInCore(gradient: number): number {\r\n return gradient * gradient * gradient;\r\n }\r\n}\r\n\r\n/**\r\n * Easing function with an elastic shape (see link below).\r\n * @see https://easings.net/#easeInElastic\r\n * @see https://doc.babylonjs.com/divingDeeper/animation/advanced_animations#easing-functions\r\n */\r\nexport class ElasticEase extends EasingFunction implements IEasingFunction {\r\n /**\r\n * Instantiates an elastic easing function\r\n * @see https://easings.net/#easeInElastic\r\n * @param oscillations Defines the number of oscillations\r\n * @param springiness Defines the amplitude of the oscillations\r\n */\r\n constructor(\r\n /** Defines the number of oscillations*/\r\n public oscillations: number = 3,\r\n /** Defines the amplitude of the oscillations*/\r\n public springiness: number = 3\r\n ) {\r\n super();\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public easeInCore(gradient: number): number {\r\n let num2;\r\n const num3 = Math.max(0.0, this.oscillations);\r\n const num = Math.max(0.0, this.springiness);\r\n\r\n if (num == 0) {\r\n num2 = gradient;\r\n } else {\r\n num2 = (Math.exp(num * gradient) - 1.0) / (Math.exp(num) - 1.0);\r\n }\r\n return num2 * Math.sin((6.2831853071795862 * num3 + 1.5707963267948966) * gradient);\r\n }\r\n}\r\n\r\n/**\r\n * Easing function with an exponential shape (see link below).\r\n * @see https://easings.net/#easeInExpo\r\n * @see https://doc.babylonjs.com/divingDeeper/animation/advanced_animations#easing-functions\r\n */\r\nexport class ExponentialEase extends EasingFunction implements IEasingFunction {\r\n /**\r\n * Instantiates an exponential easing function\r\n * @see https://easings.net/#easeInExpo\r\n * @param exponent Defines the exponent of the function\r\n */\r\n constructor(\r\n /** Defines the exponent of the function */\r\n public exponent: number = 2\r\n ) {\r\n super();\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public easeInCore(gradient: number): number {\r\n if (this.exponent <= 0) {\r\n return gradient;\r\n }\r\n\r\n return (Math.exp(this.exponent * gradient) - 1.0) / (Math.exp(this.exponent) - 1.0);\r\n }\r\n}\r\n\r\n/**\r\n * Easing function with a power shape (see link below).\r\n * @see https://easings.net/#easeInQuad\r\n * @see https://doc.babylonjs.com/divingDeeper/animation/advanced_animations#easing-functions\r\n */\r\nexport class PowerEase extends EasingFunction implements IEasingFunction {\r\n /**\r\n * Instantiates an power base easing function\r\n * @see https://easings.net/#easeInQuad\r\n * @param power Defines the power of the function\r\n */\r\n constructor(\r\n /** Defines the power of the function */\r\n public power: number = 2\r\n ) {\r\n super();\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public easeInCore(gradient: number): number {\r\n const y = Math.max(0.0, this.power);\r\n return Math.pow(gradient, y);\r\n }\r\n}\r\n\r\n/**\r\n * Easing function with a power of 2 shape (see link below).\r\n * @see https://easings.net/#easeInQuad\r\n * @see https://doc.babylonjs.com/divingDeeper/animation/advanced_animations#easing-functions\r\n */\r\nexport class QuadraticEase extends EasingFunction implements IEasingFunction {\r\n /**\r\n * @internal\r\n */\r\n public easeInCore(gradient: number): number {\r\n return gradient * gradient;\r\n }\r\n}\r\n\r\n/**\r\n * Easing function with a power of 4 shape (see link below).\r\n * @see https://easings.net/#easeInQuart\r\n * @see https://doc.babylonjs.com/divingDeeper/animation/advanced_animations#easing-functions\r\n */\r\nexport class QuarticEase extends EasingFunction implements IEasingFunction {\r\n /**\r\n * @internal\r\n */\r\n public easeInCore(gradient: number): number {\r\n return gradient * gradient * gradient * gradient;\r\n }\r\n}\r\n\r\n/**\r\n * Easing function with a power of 5 shape (see link below).\r\n * @see https://easings.net/#easeInQuint\r\n * @see https://doc.babylonjs.com/divingDeeper/animation/advanced_animations#easing-functions\r\n */\r\nexport class QuinticEase extends EasingFunction implements IEasingFunction {\r\n /**\r\n * @internal\r\n */\r\n public easeInCore(gradient: number): number {\r\n return gradient * gradient * gradient * gradient * gradient;\r\n }\r\n}\r\n\r\n/**\r\n * Easing function with a sin shape (see link below).\r\n * @see https://easings.net/#easeInSine\r\n * @see https://doc.babylonjs.com/divingDeeper/animation/advanced_animations#easing-functions\r\n */\r\nexport class SineEase extends EasingFunction implements IEasingFunction {\r\n /**\r\n * @internal\r\n */\r\n public easeInCore(gradient: number): number {\r\n return 1.0 - Math.sin(1.5707963267948966 * (1.0 - gradient));\r\n }\r\n}\r\n\r\n/**\r\n * Easing function with a bezier shape (see link below).\r\n * @see http://cubic-bezier.com/#.17,.67,.83,.67\r\n * @see https://doc.babylonjs.com/divingDeeper/animation/advanced_animations#easing-functions\r\n */\r\nexport class BezierCurveEase extends EasingFunction implements IEasingFunction {\r\n /**\r\n * Instantiates a bezier function\r\n * @see http://cubic-bezier.com/#.17,.67,.83,.67\r\n * @param x1 Defines the x component of the start tangent in the bezier curve\r\n * @param y1 Defines the y component of the start tangent in the bezier curve\r\n * @param x2 Defines the x component of the end tangent in the bezier curve\r\n * @param y2 Defines the y component of the end tangent in the bezier curve\r\n */\r\n constructor(\r\n /** Defines the x component of the start tangent in the bezier curve */\r\n public x1: number = 0,\r\n /** Defines the y component of the start tangent in the bezier curve */\r\n public y1: number = 0,\r\n /** Defines the x component of the end tangent in the bezier curve */\r\n public x2: number = 1,\r\n /** Defines the y component of the end tangent in the bezier curve */\r\n public y2: number = 1\r\n ) {\r\n super();\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public easeInCore(gradient: number): number {\r\n return BezierCurve.Interpolate(gradient, this.x1, this.y1, this.x2, this.y2);\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"easing.js","sourceRoot":"","sources":["../../../../../lts/core/generated/Animations/easing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAmBjD;;;GAGG;AACH,MAAM,OAAO,cAAc;IAA3B;QAgBY,gBAAW,GAAG,cAAc,CAAC,iBAAiB,CAAC;IA8C3D,CAAC;IA5CG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,CAAC,kBAAkB,GAAG,CAAC,GAAG,GAAG,QAAQ,CAAC,CAAC,CAAC;IACjE,CAAC;CACJ;AAED;;;;GAIG;AACH,MAAM,OAAO,eAAgB,SAAQ,cAAc;IAC/C;;;;;;;OAOG;IACH;IACI,uEAAuE;IAChE,KAAa,CAAC;IACrB,uEAAuE;IAChE,KAAa,CAAC;IACrB,qEAAqE;IAC9D,KAAa,CAAC;IACrB,qEAAqE;IAC9D,KAAa,CAAC;QAErB,KAAK,EAAE,CAAC;QARD,OAAE,GAAF,EAAE,CAAY;QAEd,OAAE,GAAF,EAAE,CAAY;QAEd,OAAE,GAAF,EAAE,CAAY;QAEd,OAAE,GAAF,EAAE,CAAY;IAGzB,CAAC;IAED;;OAEG;IACI,UAAU,CAAC,QAAgB;QAC9B,OAAO,WAAW,CAAC,WAAW,CAAC,QAAQ,EAAE,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC;IACjF,CAAC;CACJ","sourcesContent":["import { BezierCurve } from \"../Maths/math.path\";\r\n\r\n/**\r\n * This represents the main contract an easing function should follow.\r\n * Easing functions are used throughout the animation system.\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions\r\n */\r\nexport interface IEasingFunction {\r\n /**\r\n * Given an input gradient between 0 and 1, this returns the corresponding value\r\n * of the easing function.\r\n * The link below provides some of the most common examples of easing functions.\r\n * @see https://easings.net/\r\n * @param gradient Defines the value between 0 and 1 we want the easing value for\r\n * @returns the corresponding value on the curve defined by the easing function\r\n */\r\n ease(gradient: number): number;\r\n}\r\n\r\n/**\r\n * Base class used for every default easing function.\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions\r\n */\r\nexport class EasingFunction implements IEasingFunction {\r\n /**\r\n * Interpolation follows the mathematical formula associated with the easing function.\r\n */\r\n public static readonly EASINGMODE_EASEIN = 0;\r\n\r\n /**\r\n * Interpolation follows 100% interpolation minus the output of the formula associated with the easing function.\r\n */\r\n public static readonly EASINGMODE_EASEOUT = 1;\r\n\r\n /**\r\n * Interpolation uses EaseIn for the first half of the animation and EaseOut for the second half.\r\n */\r\n public static readonly EASINGMODE_EASEINOUT = 2;\r\n\r\n private _easingMode = EasingFunction.EASINGMODE_EASEIN;\r\n\r\n /**\r\n * Sets the easing mode of the current function.\r\n * @param easingMode Defines the willing mode (EASINGMODE_EASEIN, EASINGMODE_EASEOUT or EASINGMODE_EASEINOUT)\r\n */\r\n public setEasingMode(easingMode: number) {\r\n const n = Math.min(Math.max(easingMode, 0), 2);\r\n this._easingMode = n;\r\n }\r\n /**\r\n * Gets the current easing mode.\r\n * @returns the easing mode\r\n */\r\n public getEasingMode(): number {\r\n return this._easingMode;\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n public easeInCore(gradient: number): number {\r\n throw new Error(\"You must implement this method\");\r\n }\r\n\r\n /**\r\n * Given an input gradient between 0 and 1, this returns the corresponding value\r\n * of the easing function.\r\n * @param gradient Defines the value between 0 and 1 we want the easing value for\r\n * @returns the corresponding value on the curve defined by the easing function\r\n */\r\n public ease(gradient: number): number {\r\n switch (this._easingMode) {\r\n case EasingFunction.EASINGMODE_EASEIN:\r\n return this.easeInCore(gradient);\r\n case EasingFunction.EASINGMODE_EASEOUT:\r\n return 1 - this.easeInCore(1 - gradient);\r\n }\r\n\r\n if (gradient >= 0.5) {\r\n return (1 - this.easeInCore((1 - gradient) * 2)) * 0.5 + 0.5;\r\n }\r\n\r\n return this.easeInCore(gradient * 2) * 0.5;\r\n }\r\n}\r\n\r\n/**\r\n * Easing function with a circle shape (see link below).\r\n * @see https://easings.net/#easeInCirc\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions\r\n */\r\nexport class CircleEase extends EasingFunction implements IEasingFunction {\r\n /**\r\n * @internal\r\n */\r\n public easeInCore(gradient: number): number {\r\n gradient = Math.max(0, Math.min(1, gradient));\r\n return 1.0 - Math.sqrt(1.0 - gradient * gradient);\r\n }\r\n}\r\n\r\n/**\r\n * Easing function with a ease back shape (see link below).\r\n * @see https://easings.net/#easeInBack\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions\r\n */\r\nexport class BackEase extends EasingFunction implements IEasingFunction {\r\n /**\r\n * Instantiates a back ease easing\r\n * @see https://easings.net/#easeInBack\r\n * @param amplitude Defines the amplitude of the function\r\n */\r\n constructor(\r\n /** Defines the amplitude of the function */\r\n public amplitude: number = 1\r\n ) {\r\n super();\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public easeInCore(gradient: number): number {\r\n const num = Math.max(0, this.amplitude);\r\n return Math.pow(gradient, 3.0) - gradient * num * Math.sin(3.1415926535897931 * gradient);\r\n }\r\n}\r\n\r\n/**\r\n * Easing function with a bouncing shape (see link below).\r\n * @see https://easings.net/#easeInBounce\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions\r\n */\r\nexport class BounceEase extends EasingFunction implements IEasingFunction {\r\n /**\r\n * Instantiates a bounce easing\r\n * @see https://easings.net/#easeInBounce\r\n * @param bounces Defines the number of bounces\r\n * @param bounciness Defines the amplitude of the bounce\r\n */\r\n constructor(\r\n /** Defines the number of bounces */\r\n public bounces: number = 3,\r\n /** Defines the amplitude of the bounce */\r\n public bounciness: number = 2\r\n ) {\r\n super();\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public easeInCore(gradient: number): number {\r\n const y = Math.max(0.0, this.bounces);\r\n let bounciness = this.bounciness;\r\n if (bounciness <= 1.0) {\r\n bounciness = 1.001;\r\n }\r\n const num9 = Math.pow(bounciness, y);\r\n const num5 = 1.0 - bounciness;\r\n const num4 = (1.0 - num9) / num5 + num9 * 0.5;\r\n const num15 = gradient * num4;\r\n const num65 = Math.log(-num15 * (1.0 - bounciness) + 1.0) / Math.log(bounciness);\r\n const num3 = Math.floor(num65);\r\n const num13 = num3 + 1.0;\r\n const num8 = (1.0 - Math.pow(bounciness, num3)) / (num5 * num4);\r\n const num12 = (1.0 - Math.pow(bounciness, num13)) / (num5 * num4);\r\n const num7 = (num8 + num12) * 0.5;\r\n const num6 = gradient - num7;\r\n const num2 = num7 - num8;\r\n return (-Math.pow(1.0 / bounciness, y - num3) / (num2 * num2)) * (num6 - num2) * (num6 + num2);\r\n }\r\n}\r\n\r\n/**\r\n * Easing function with a power of 3 shape (see link below).\r\n * @see https://easings.net/#easeInCubic\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions\r\n */\r\nexport class CubicEase extends EasingFunction implements IEasingFunction {\r\n /**\r\n * @internal\r\n */\r\n public easeInCore(gradient: number): number {\r\n return gradient * gradient * gradient;\r\n }\r\n}\r\n\r\n/**\r\n * Easing function with an elastic shape (see link below).\r\n * @see https://easings.net/#easeInElastic\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions\r\n */\r\nexport class ElasticEase extends EasingFunction implements IEasingFunction {\r\n /**\r\n * Instantiates an elastic easing function\r\n * @see https://easings.net/#easeInElastic\r\n * @param oscillations Defines the number of oscillations\r\n * @param springiness Defines the amplitude of the oscillations\r\n */\r\n constructor(\r\n /** Defines the number of oscillations*/\r\n public oscillations: number = 3,\r\n /** Defines the amplitude of the oscillations*/\r\n public springiness: number = 3\r\n ) {\r\n super();\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public easeInCore(gradient: number): number {\r\n let num2;\r\n const num3 = Math.max(0.0, this.oscillations);\r\n const num = Math.max(0.0, this.springiness);\r\n\r\n if (num == 0) {\r\n num2 = gradient;\r\n } else {\r\n num2 = (Math.exp(num * gradient) - 1.0) / (Math.exp(num) - 1.0);\r\n }\r\n return num2 * Math.sin((6.2831853071795862 * num3 + 1.5707963267948966) * gradient);\r\n }\r\n}\r\n\r\n/**\r\n * Easing function with an exponential shape (see link below).\r\n * @see https://easings.net/#easeInExpo\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions\r\n */\r\nexport class ExponentialEase extends EasingFunction implements IEasingFunction {\r\n /**\r\n * Instantiates an exponential easing function\r\n * @see https://easings.net/#easeInExpo\r\n * @param exponent Defines the exponent of the function\r\n */\r\n constructor(\r\n /** Defines the exponent of the function */\r\n public exponent: number = 2\r\n ) {\r\n super();\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public easeInCore(gradient: number): number {\r\n if (this.exponent <= 0) {\r\n return gradient;\r\n }\r\n\r\n return (Math.exp(this.exponent * gradient) - 1.0) / (Math.exp(this.exponent) - 1.0);\r\n }\r\n}\r\n\r\n/**\r\n * Easing function with a power shape (see link below).\r\n * @see https://easings.net/#easeInQuad\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions\r\n */\r\nexport class PowerEase extends EasingFunction implements IEasingFunction {\r\n /**\r\n * Instantiates an power base easing function\r\n * @see https://easings.net/#easeInQuad\r\n * @param power Defines the power of the function\r\n */\r\n constructor(\r\n /** Defines the power of the function */\r\n public power: number = 2\r\n ) {\r\n super();\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public easeInCore(gradient: number): number {\r\n const y = Math.max(0.0, this.power);\r\n return Math.pow(gradient, y);\r\n }\r\n}\r\n\r\n/**\r\n * Easing function with a power of 2 shape (see link below).\r\n * @see https://easings.net/#easeInQuad\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions\r\n */\r\nexport class QuadraticEase extends EasingFunction implements IEasingFunction {\r\n /**\r\n * @internal\r\n */\r\n public easeInCore(gradient: number): number {\r\n return gradient * gradient;\r\n }\r\n}\r\n\r\n/**\r\n * Easing function with a power of 4 shape (see link below).\r\n * @see https://easings.net/#easeInQuart\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions\r\n */\r\nexport class QuarticEase extends EasingFunction implements IEasingFunction {\r\n /**\r\n * @internal\r\n */\r\n public easeInCore(gradient: number): number {\r\n return gradient * gradient * gradient * gradient;\r\n }\r\n}\r\n\r\n/**\r\n * Easing function with a power of 5 shape (see link below).\r\n * @see https://easings.net/#easeInQuint\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions\r\n */\r\nexport class QuinticEase extends EasingFunction implements IEasingFunction {\r\n /**\r\n * @internal\r\n */\r\n public easeInCore(gradient: number): number {\r\n return gradient * gradient * gradient * gradient * gradient;\r\n }\r\n}\r\n\r\n/**\r\n * Easing function with a sin shape (see link below).\r\n * @see https://easings.net/#easeInSine\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions\r\n */\r\nexport class SineEase extends EasingFunction implements IEasingFunction {\r\n /**\r\n * @internal\r\n */\r\n public easeInCore(gradient: number): number {\r\n return 1.0 - Math.sin(1.5707963267948966 * (1.0 - gradient));\r\n }\r\n}\r\n\r\n/**\r\n * Easing function with a bezier shape (see link below).\r\n * @see http://cubic-bezier.com/#.17,.67,.83,.67\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/advanced_animations#easing-functions\r\n */\r\nexport class BezierCurveEase extends EasingFunction implements IEasingFunction {\r\n /**\r\n * Instantiates a bezier function\r\n * @see http://cubic-bezier.com/#.17,.67,.83,.67\r\n * @param x1 Defines the x component of the start tangent in the bezier curve\r\n * @param y1 Defines the y component of the start tangent in the bezier curve\r\n * @param x2 Defines the x component of the end tangent in the bezier curve\r\n * @param y2 Defines the y component of the end tangent in the bezier curve\r\n */\r\n constructor(\r\n /** Defines the x component of the start tangent in the bezier curve */\r\n public x1: number = 0,\r\n /** Defines the y component of the start tangent in the bezier curve */\r\n public y1: number = 0,\r\n /** Defines the x component of the end tangent in the bezier curve */\r\n public x2: number = 1,\r\n /** Defines the y component of the end tangent in the bezier curve */\r\n public y2: number = 1\r\n ) {\r\n super();\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public easeInCore(gradient: number): number {\r\n return BezierCurve.Interpolate(gradient, this.x1, this.y1, this.x2, this.y2);\r\n }\r\n}\r\n"]}
@@ -5,7 +5,7 @@ import type { Analyser } from "../analyser";
5
5
  /**
6
6
  * This represents an audio engine and it is responsible
7
7
  * to play, synchronize and analyse sounds throughout the application.
8
- * @see https://doc.babylonjs.com/how_to/playing_sounds_and_music
8
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/audio/playingSoundsMusic
9
9
  */
10
10
  export interface IAudioEngine extends IDisposable {
11
11
  /**
@@ -73,7 +73,7 @@ export interface IAudioEngine extends IDisposable {
73
73
  /**
74
74
  * Connect the audio engine to an audio analyser allowing some amazing
75
75
  * synchronization between the sounds/music and your visualization (VuMeter for instance).
76
- * @see https://doc.babylonjs.com/how_to/playing_sounds_and_music#using-the-analyser
76
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/audio/playingSoundsMusic#using-the-analyser
77
77
  * @param analyser The analyser to connect to the engine
78
78
  */
79
79
  connectToAnalyser(analyser: Analyser): void;
@@ -1 +1 @@
1
- {"version":3,"file":"IAudioEngine.js","sourceRoot":"","sources":["../../../../../../lts/core/generated/Audio/Interfaces/IAudioEngine.ts"],"names":[],"mappings":"","sourcesContent":["import type { Observable } from \"../../Misc/observable\";\r\nimport type { IDisposable } from \"../../scene\";\r\nimport type { Nullable } from \"../../types\";\r\nimport type { Analyser } from \"../analyser\";\r\n\r\n/**\r\n * This represents an audio engine and it is responsible\r\n * to play, synchronize and analyse sounds throughout the application.\r\n * @see https://doc.babylonjs.com/how_to/playing_sounds_and_music\r\n */\r\nexport interface IAudioEngine extends IDisposable {\r\n /**\r\n * Gets whether the current host supports Web Audio and thus could create AudioContexts.\r\n */\r\n readonly canUseWebAudio: boolean;\r\n\r\n /**\r\n * Gets the current AudioContext if available.\r\n */\r\n readonly audioContext: Nullable<AudioContext>;\r\n\r\n /**\r\n * The master gain node defines the global audio volume of your audio engine.\r\n */\r\n readonly masterGain: GainNode;\r\n\r\n /**\r\n * Gets whether or not mp3 are supported by your browser.\r\n */\r\n readonly isMP3supported: boolean;\r\n\r\n /**\r\n * Gets whether or not ogg are supported by your browser.\r\n */\r\n readonly isOGGsupported: boolean;\r\n\r\n /**\r\n * Defines if Babylon should emit a warning if WebAudio is not supported.\r\n * @ignoreNaming\r\n */\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n WarnedWebAudioUnsupported: boolean;\r\n\r\n /**\r\n * Defines if the audio engine relies on a custom unlocked button.\r\n * In this case, the embedded button will not be displayed.\r\n */\r\n useCustomUnlockedButton: boolean;\r\n\r\n /**\r\n * Gets whether or not the audio engine is unlocked (require first a user gesture on some browser).\r\n */\r\n readonly unlocked: boolean;\r\n\r\n /**\r\n * Event raised when audio has been unlocked on the browser.\r\n */\r\n onAudioUnlockedObservable: Observable<IAudioEngine>;\r\n\r\n /**\r\n * Event raised when audio has been locked on the browser.\r\n */\r\n onAudioLockedObservable: Observable<IAudioEngine>;\r\n\r\n /**\r\n * Flags the audio engine in Locked state.\r\n * This happens due to new browser policies preventing audio to autoplay.\r\n */\r\n lock(): void;\r\n\r\n /**\r\n * Unlocks the audio engine once a user action has been done on the dom.\r\n * This is helpful to resume play once browser policies have been satisfied.\r\n */\r\n unlock(): void;\r\n\r\n /**\r\n * Gets the global volume sets on the master gain.\r\n * @returns the global volume if set or -1 otherwise\r\n */\r\n getGlobalVolume(): number;\r\n\r\n /**\r\n * Sets the global volume of your experience (sets on the master gain).\r\n * @param newVolume Defines the new global volume of the application\r\n */\r\n setGlobalVolume(newVolume: number): void;\r\n\r\n /**\r\n * Connect the audio engine to an audio analyser allowing some amazing\r\n * synchronization between the sounds/music and your visualization (VuMeter for instance).\r\n * @see https://doc.babylonjs.com/how_to/playing_sounds_and_music#using-the-analyser\r\n * @param analyser The analyser to connect to the engine\r\n */\r\n connectToAnalyser(analyser: Analyser): void;\r\n}\r\n"]}
1
+ {"version":3,"file":"IAudioEngine.js","sourceRoot":"","sources":["../../../../../../lts/core/generated/Audio/Interfaces/IAudioEngine.ts"],"names":[],"mappings":"","sourcesContent":["import type { Observable } from \"../../Misc/observable\";\r\nimport type { IDisposable } from \"../../scene\";\r\nimport type { Nullable } from \"../../types\";\r\nimport type { Analyser } from \"../analyser\";\r\n\r\n/**\r\n * This represents an audio engine and it is responsible\r\n * to play, synchronize and analyse sounds throughout the application.\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/audio/playingSoundsMusic\r\n */\r\nexport interface IAudioEngine extends IDisposable {\r\n /**\r\n * Gets whether the current host supports Web Audio and thus could create AudioContexts.\r\n */\r\n readonly canUseWebAudio: boolean;\r\n\r\n /**\r\n * Gets the current AudioContext if available.\r\n */\r\n readonly audioContext: Nullable<AudioContext>;\r\n\r\n /**\r\n * The master gain node defines the global audio volume of your audio engine.\r\n */\r\n readonly masterGain: GainNode;\r\n\r\n /**\r\n * Gets whether or not mp3 are supported by your browser.\r\n */\r\n readonly isMP3supported: boolean;\r\n\r\n /**\r\n * Gets whether or not ogg are supported by your browser.\r\n */\r\n readonly isOGGsupported: boolean;\r\n\r\n /**\r\n * Defines if Babylon should emit a warning if WebAudio is not supported.\r\n * @ignoreNaming\r\n */\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n WarnedWebAudioUnsupported: boolean;\r\n\r\n /**\r\n * Defines if the audio engine relies on a custom unlocked button.\r\n * In this case, the embedded button will not be displayed.\r\n */\r\n useCustomUnlockedButton: boolean;\r\n\r\n /**\r\n * Gets whether or not the audio engine is unlocked (require first a user gesture on some browser).\r\n */\r\n readonly unlocked: boolean;\r\n\r\n /**\r\n * Event raised when audio has been unlocked on the browser.\r\n */\r\n onAudioUnlockedObservable: Observable<IAudioEngine>;\r\n\r\n /**\r\n * Event raised when audio has been locked on the browser.\r\n */\r\n onAudioLockedObservable: Observable<IAudioEngine>;\r\n\r\n /**\r\n * Flags the audio engine in Locked state.\r\n * This happens due to new browser policies preventing audio to autoplay.\r\n */\r\n lock(): void;\r\n\r\n /**\r\n * Unlocks the audio engine once a user action has been done on the dom.\r\n * This is helpful to resume play once browser policies have been satisfied.\r\n */\r\n unlock(): void;\r\n\r\n /**\r\n * Gets the global volume sets on the master gain.\r\n * @returns the global volume if set or -1 otherwise\r\n */\r\n getGlobalVolume(): number;\r\n\r\n /**\r\n * Sets the global volume of your experience (sets on the master gain).\r\n * @param newVolume Defines the new global volume of the application\r\n */\r\n setGlobalVolume(newVolume: number): void;\r\n\r\n /**\r\n * Connect the audio engine to an audio analyser allowing some amazing\r\n * synchronization between the sounds/music and your visualization (VuMeter for instance).\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/audio/playingSoundsMusic#using-the-analyser\r\n * @param analyser The analyser to connect to the engine\r\n */\r\n connectToAnalyser(analyser: Analyser): void;\r\n}\r\n"]}
@@ -28,17 +28,17 @@ export interface ISoundOptions {
28
28
  useCustomAttenuation?: boolean;
29
29
  /**
30
30
  * Define the roll off factor of spatial sounds.
31
- * @see https://doc.babylonjs.com/how_to/playing_sounds_and_music#creating-a-spatial-3d-sound
31
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/audio/playingSoundsMusic#creating-a-spatial-3d-sound
32
32
  */
33
33
  rolloffFactor?: number;
34
34
  /**
35
35
  * Define the reference distance the sound should be heard perfectly.
36
- * @see https://doc.babylonjs.com/how_to/playing_sounds_and_music#creating-a-spatial-3d-sound
36
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/audio/playingSoundsMusic#creating-a-spatial-3d-sound
37
37
  */
38
38
  refDistance?: number;
39
39
  /**
40
40
  * Define the distance attenuation model the sound will follow.
41
- * @see https://doc.babylonjs.com/how_to/playing_sounds_and_music#creating-a-spatial-3d-sound
41
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/audio/playingSoundsMusic#creating-a-spatial-3d-sound
42
42
  */
43
43
  distanceModel?: string;
44
44
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"ISoundOptions.js","sourceRoot":"","sources":["../../../../../../lts/core/generated/Audio/Interfaces/ISoundOptions.ts"],"names":[],"mappings":"","sourcesContent":["/**\r\n * Interface used to define options for Sound class\r\n */\r\nexport interface ISoundOptions {\r\n /**\r\n * Does the sound autoplay once loaded.\r\n */\r\n autoplay?: boolean;\r\n /**\r\n * Does the sound loop after it finishes playing once.\r\n */\r\n loop?: boolean;\r\n /**\r\n * Sound's volume\r\n */\r\n volume?: number;\r\n /**\r\n * Is it a spatial sound?\r\n */\r\n spatialSound?: boolean;\r\n /**\r\n * Maximum distance to hear that sound\r\n */\r\n maxDistance?: number;\r\n /**\r\n * Uses user defined attenuation function\r\n */\r\n useCustomAttenuation?: boolean;\r\n /**\r\n * Define the roll off factor of spatial sounds.\r\n * @see https://doc.babylonjs.com/how_to/playing_sounds_and_music#creating-a-spatial-3d-sound\r\n */\r\n rolloffFactor?: number;\r\n /**\r\n * Define the reference distance the sound should be heard perfectly.\r\n * @see https://doc.babylonjs.com/how_to/playing_sounds_and_music#creating-a-spatial-3d-sound\r\n */\r\n refDistance?: number;\r\n /**\r\n * Define the distance attenuation model the sound will follow.\r\n * @see https://doc.babylonjs.com/how_to/playing_sounds_and_music#creating-a-spatial-3d-sound\r\n */\r\n distanceModel?: string;\r\n /**\r\n * Defines the playback speed (1 by default)\r\n */\r\n playbackRate?: number;\r\n /**\r\n * Defines if the sound is from a streaming source\r\n */\r\n streaming?: boolean;\r\n /**\r\n * Defines an optional length (in seconds) inside the sound file\r\n */\r\n length?: number;\r\n /**\r\n * Defines an optional offset (in seconds) inside the sound file\r\n */\r\n offset?: number;\r\n /**\r\n * If true, URLs will not be required to state the audio file codec to use.\r\n */\r\n skipCodecCheck?: boolean;\r\n}\r\n"]}
1
+ {"version":3,"file":"ISoundOptions.js","sourceRoot":"","sources":["../../../../../../lts/core/generated/Audio/Interfaces/ISoundOptions.ts"],"names":[],"mappings":"","sourcesContent":["/**\r\n * Interface used to define options for Sound class\r\n */\r\nexport interface ISoundOptions {\r\n /**\r\n * Does the sound autoplay once loaded.\r\n */\r\n autoplay?: boolean;\r\n /**\r\n * Does the sound loop after it finishes playing once.\r\n */\r\n loop?: boolean;\r\n /**\r\n * Sound's volume\r\n */\r\n volume?: number;\r\n /**\r\n * Is it a spatial sound?\r\n */\r\n spatialSound?: boolean;\r\n /**\r\n * Maximum distance to hear that sound\r\n */\r\n maxDistance?: number;\r\n /**\r\n * Uses user defined attenuation function\r\n */\r\n useCustomAttenuation?: boolean;\r\n /**\r\n * Define the roll off factor of spatial sounds.\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/audio/playingSoundsMusic#creating-a-spatial-3d-sound\r\n */\r\n rolloffFactor?: number;\r\n /**\r\n * Define the reference distance the sound should be heard perfectly.\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/audio/playingSoundsMusic#creating-a-spatial-3d-sound\r\n */\r\n refDistance?: number;\r\n /**\r\n * Define the distance attenuation model the sound will follow.\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/audio/playingSoundsMusic#creating-a-spatial-3d-sound\r\n */\r\n distanceModel?: string;\r\n /**\r\n * Defines the playback speed (1 by default)\r\n */\r\n playbackRate?: number;\r\n /**\r\n * Defines if the sound is from a streaming source\r\n */\r\n streaming?: boolean;\r\n /**\r\n * Defines an optional length (in seconds) inside the sound file\r\n */\r\n length?: number;\r\n /**\r\n * Defines an optional offset (in seconds) inside the sound file\r\n */\r\n offset?: number;\r\n /**\r\n * If true, URLs will not be required to state the audio file codec to use.\r\n */\r\n skipCodecCheck?: boolean;\r\n}\r\n"]}