@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
package/abstractScene.js CHANGED
@@ -10,12 +10,12 @@ export class AbstractScene {
10
10
  */
11
11
  this.rootNodes = new Array();
12
12
  /** All of the cameras added to this scene
13
- * @see https://doc.babylonjs.com/babylon101/cameras
13
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/cameras
14
14
  */
15
15
  this.cameras = new Array();
16
16
  /**
17
17
  * All of the lights added to this scene
18
- * @see https://doc.babylonjs.com/babylon101/lights
18
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/lights/lights_introduction
19
19
  */
20
20
  this.lights = new Array();
21
21
  /**
@@ -24,12 +24,12 @@ export class AbstractScene {
24
24
  this.meshes = new Array();
25
25
  /**
26
26
  * The list of skeletons added to the scene
27
- * @see https://doc.babylonjs.com/how_to/how_to_use_bones_and_skeletons
27
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/bonesSkeletons
28
28
  */
29
29
  this.skeletons = new Array();
30
30
  /**
31
31
  * All of the particle systems added to this scene
32
- * @see https://doc.babylonjs.com/babylon101/particles
32
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/particles/particle_system/particle_system_intro
33
33
  */
34
34
  this.particleSystems = new Array();
35
35
  /**
@@ -38,12 +38,12 @@ export class AbstractScene {
38
38
  this.animations = [];
39
39
  /**
40
40
  * All of the animation groups added to this scene
41
- * @see https://doc.babylonjs.com/divingDeeper/animation/groupAnimations
41
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/groupAnimations
42
42
  */
43
43
  this.animationGroups = new Array();
44
44
  /**
45
45
  * All of the multi-materials added to this scene
46
- * @see https://doc.babylonjs.com/how_to/multi_materials
46
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/multiMaterials
47
47
  */
48
48
  this.multiMaterials = new Array();
49
49
  /**
@@ -51,12 +51,12 @@ export class AbstractScene {
51
51
  * In the context of a Scene, it is not supposed to be modified manually.
52
52
  * Any addition or removal should be done using the addMaterial and removeMaterial Scene methods.
53
53
  * Note also that the order of the Material within the array is not significant and might change.
54
- * @see https://doc.babylonjs.com/babylon101/materials
54
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/materials_introduction
55
55
  */
56
56
  this.materials = new Array();
57
57
  /**
58
58
  * The list of morph target managers added to the scene
59
- * @see https://doc.babylonjs.com/how_to/how_to_dynamically_morph_a_mesh
59
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/dynamicMeshMorph
60
60
  */
61
61
  this.morphTargetManagers = new Array();
62
62
  /**
@@ -68,7 +68,7 @@ export class AbstractScene {
68
68
  * In the context of a Scene, it is not supposed to be modified manually.
69
69
  * Any addition or removal should be done using the addTransformNode and removeTransformNode Scene methods.
70
70
  * Note also that the order of the TransformNode within the array is not significant and might change.
71
- * @see https://doc.babylonjs.com/how_to/transformnode
71
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/transforms/parent_pivot/transform_node
72
72
  */
73
73
  this.transformNodes = new Array();
74
74
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"abstractScene.js","sourceRoot":"","sources":["../../../../lts/core/generated/abstractScene.ts"],"names":[],"mappings":"AAiCA;;;;GAIG;AACH,MAAM,OAAgB,aAAa;IAAnC;QAsEI;;WAEG;QACI,cAAS,GAAG,IAAI,KAAK,EAAQ,CAAC;QAErC;;WAEG;QACI,YAAO,GAAG,IAAI,KAAK,EAAU,CAAC;QAErC;;;WAGG;QACI,WAAM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QACrD,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAC7E,OAAO,KAAK,CAAC;IACjB,CAAC;;AA9LD;;GAEG;AACY,iCAAmB,GAAyC,EAAE,CAAC;AAE9E;;GAEG;AACY,2CAA6B,GAAmD,EAAE,CAAC","sourcesContent":["import type { Scene } from \"./scene\";\r\nimport type { Nullable } from \"./types\";\r\nimport type { AbstractMesh } from \"./Meshes/abstractMesh\";\r\nimport type { TransformNode } from \"./Meshes/transformNode\";\r\nimport type { Geometry } from \"./Meshes/geometry\";\r\nimport type { Skeleton } from \"./Bones/skeleton\";\r\nimport type { MorphTargetManager } from \"./Morph/morphTargetManager\";\r\nimport type { AssetContainer } from \"./assetContainer\";\r\nimport type { IParticleSystem } from \"./Particles/IParticleSystem\";\r\nimport type { AnimationGroup } from \"./Animations/animationGroup\";\r\nimport type { BaseTexture } from \"./Materials/Textures/baseTexture\";\r\nimport type { Material } from \"./Materials/material\";\r\nimport type { MultiMaterial } from \"./Materials/multiMaterial\";\r\nimport type { AbstractActionManager } from \"./Actions/abstractActionManager\";\r\nimport type { Camera } from \"./Cameras/camera\";\r\nimport type { Light } from \"./Lights/light\";\r\nimport type { Node } from \"./node\";\r\n\r\ndeclare type Animation = import(\"./Animations/animation\").Animation;\r\ndeclare type PostProcess = import(\"./PostProcesses/postProcess\").PostProcess;\r\n\r\n/**\r\n * Defines how the parser contract is defined.\r\n * These parsers are used to parse a list of specific assets (like particle systems, etc..)\r\n */\r\nexport type BabylonFileParser = (parsedData: any, scene: Scene, container: AssetContainer, rootUrl: string) => void;\r\n\r\n/**\r\n * Defines how the individual parser contract is defined.\r\n * These parser can parse an individual asset\r\n */\r\nexport type IndividualBabylonFileParser = (parsedData: any, scene: Scene, rootUrl: string) => any;\r\n\r\n/**\r\n * Base class of the scene acting as a container for the different elements composing a scene.\r\n * This class is dynamically extended by the different components of the scene increasing\r\n * flexibility and reducing coupling\r\n */\r\nexport abstract class AbstractScene {\r\n /**\r\n * Stores the list of available parsers in the application.\r\n */\r\n private static _BabylonFileParsers: { [key: string]: BabylonFileParser } = {};\r\n\r\n /**\r\n * Stores the list of available individual parsers in the application.\r\n */\r\n private static _IndividualBabylonFileParsers: { [key: string]: IndividualBabylonFileParser } = {};\r\n\r\n /**\r\n * Adds a parser in the list of available ones\r\n * @param name Defines the name of the parser\r\n * @param parser Defines the parser to add\r\n */\r\n public static AddParser(name: string, parser: BabylonFileParser): void {\r\n this._BabylonFileParsers[name] = parser;\r\n }\r\n\r\n /**\r\n * Gets a general parser from the list of available ones\r\n * @param name Defines the name of the parser\r\n * @returns the requested parser or null\r\n */\r\n public static GetParser(name: string): Nullable<BabylonFileParser> {\r\n if (this._BabylonFileParsers[name]) {\r\n return this._BabylonFileParsers[name];\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * Adds n individual parser in the list of available ones\r\n * @param name Defines the name of the parser\r\n * @param parser Defines the parser to add\r\n */\r\n public static AddIndividualParser(name: string, parser: IndividualBabylonFileParser): void {\r\n this._IndividualBabylonFileParsers[name] = parser;\r\n }\r\n\r\n /**\r\n * Gets an individual parser from the list of available ones\r\n * @param name Defines the name of the parser\r\n * @returns the requested parser or null\r\n */\r\n public static GetIndividualParser(name: string): Nullable<IndividualBabylonFileParser> {\r\n if (this._IndividualBabylonFileParsers[name]) {\r\n return this._IndividualBabylonFileParsers[name];\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * Parser json data and populate both a scene and its associated container object\r\n * @param jsonData Defines the data to parse\r\n * @param scene Defines the scene to parse the data for\r\n * @param container Defines the container attached to the parsing sequence\r\n * @param rootUrl Defines the root url of the data\r\n */\r\n public static Parse(jsonData: any, scene: Scene, container: AssetContainer, rootUrl: string): void {\r\n for (const parserName in this._BabylonFileParsers) {\r\n if (Object.prototype.hasOwnProperty.call(this._BabylonFileParsers, parserName)) {\r\n this._BabylonFileParsers[parserName](jsonData, scene, container, rootUrl);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Gets the list of root nodes (ie. nodes with no parent)\r\n */\r\n public rootNodes = new Array<Node>();\r\n\r\n /** All of the cameras added to this scene\r\n * @see https://doc.babylonjs.com/babylon101/cameras\r\n */\r\n public cameras = new Array<Camera>();\r\n\r\n /**\r\n * All of the lights added to this scene\r\n * @see https://doc.babylonjs.com/babylon101/lights\r\n */\r\n public lights = new Array<Light>();\r\n\r\n /**\r\n * All of the (abstract) meshes added to this scene\r\n */\r\n public meshes = new Array<AbstractMesh>();\r\n\r\n /**\r\n * The list of skeletons added to the scene\r\n * @see https://doc.babylonjs.com/how_to/how_to_use_bones_and_skeletons\r\n */\r\n public skeletons = new Array<Skeleton>();\r\n\r\n /**\r\n * All of the particle systems added to this scene\r\n * @see https://doc.babylonjs.com/babylon101/particles\r\n */\r\n public particleSystems = new Array<IParticleSystem>();\r\n\r\n /**\r\n * Gets a list of Animations associated with the scene\r\n */\r\n public animations: Animation[] = [];\r\n\r\n /**\r\n * All of the animation groups added to this scene\r\n * @see https://doc.babylonjs.com/divingDeeper/animation/groupAnimations\r\n */\r\n public animationGroups = new Array<AnimationGroup>();\r\n\r\n /**\r\n * All of the multi-materials added to this scene\r\n * @see https://doc.babylonjs.com/how_to/multi_materials\r\n */\r\n public multiMaterials = new Array<MultiMaterial>();\r\n\r\n /**\r\n * All of the materials added to this scene\r\n * In the context of a Scene, it is not supposed to be modified manually.\r\n * Any addition or removal should be done using the addMaterial and removeMaterial Scene methods.\r\n * Note also that the order of the Material within the array is not significant and might change.\r\n * @see https://doc.babylonjs.com/babylon101/materials\r\n */\r\n public materials = new Array<Material>();\r\n\r\n /**\r\n * The list of morph target managers added to the scene\r\n * @see https://doc.babylonjs.com/how_to/how_to_dynamically_morph_a_mesh\r\n */\r\n public morphTargetManagers = new Array<MorphTargetManager>();\r\n\r\n /**\r\n * The list of geometries used in the scene.\r\n */\r\n public geometries = new Array<Geometry>();\r\n\r\n /**\r\n * All of the transform nodes added to this scene\r\n * In the context of a Scene, it is not supposed to be modified manually.\r\n * Any addition or removal should be done using the addTransformNode and removeTransformNode Scene methods.\r\n * Note also that the order of the TransformNode within the array is not significant and might change.\r\n * @see https://doc.babylonjs.com/how_to/transformnode\r\n */\r\n public transformNodes = new Array<TransformNode>();\r\n\r\n /**\r\n * ActionManagers available on the scene.\r\n * @deprecated\r\n */\r\n public actionManagers = new Array<AbstractActionManager>();\r\n\r\n /**\r\n * Textures to keep.\r\n */\r\n public textures = new Array<BaseTexture>();\r\n\r\n /** @internal */\r\n protected _environmentTexture: Nullable<BaseTexture> = null;\r\n /**\r\n * Texture used in all pbr material as the reflection texture.\r\n * As in the majority of the scene they are the same (exception for multi room and so on),\r\n * this is easier to reference from here than from all the materials.\r\n */\r\n public get environmentTexture(): Nullable<BaseTexture> {\r\n return this._environmentTexture;\r\n }\r\n\r\n public set environmentTexture(value: Nullable<BaseTexture>) {\r\n this._environmentTexture = value;\r\n }\r\n\r\n /**\r\n * The list of postprocesses added to the scene\r\n */\r\n public postProcesses = new Array<PostProcess>();\r\n\r\n /**\r\n * @returns all meshes, lights, cameras, transformNodes and bones\r\n */\r\n public getNodes(): Array<Node> {\r\n let nodes = new Array<Node>();\r\n nodes = nodes.concat(this.meshes);\r\n nodes = nodes.concat(this.lights);\r\n nodes = nodes.concat(this.cameras);\r\n nodes = nodes.concat(this.transformNodes); // dummies\r\n this.skeletons.forEach((skeleton) => (nodes = nodes.concat(skeleton.bones)));\r\n return nodes;\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"abstractScene.js","sourceRoot":"","sources":["../../../../lts/core/generated/abstractScene.ts"],"names":[],"mappings":"AAiCA;;;;GAIG;AACH,MAAM,OAAgB,aAAa;IAAnC;QAsEI;;WAEG;QACI,cAAS,GAAG,IAAI,KAAK,EAAQ,CAAC;QAErC;;WAEG;QACI,YAAO,GAAG,IAAI,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IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,UAAU;QACrD,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAC7E,OAAO,KAAK,CAAC;IACjB,CAAC;;AA9LD;;GAEG;AACY,iCAAmB,GAAyC,EAAE,CAAC;AAE9E;;GAEG;AACY,2CAA6B,GAAmD,EAAE,CAAC","sourcesContent":["import type { Scene } from \"./scene\";\r\nimport type { Nullable } from \"./types\";\r\nimport type { AbstractMesh } from \"./Meshes/abstractMesh\";\r\nimport type { TransformNode } from \"./Meshes/transformNode\";\r\nimport type { Geometry } from \"./Meshes/geometry\";\r\nimport type { Skeleton } from \"./Bones/skeleton\";\r\nimport type { MorphTargetManager } from \"./Morph/morphTargetManager\";\r\nimport type { AssetContainer } from \"./assetContainer\";\r\nimport type { IParticleSystem } from \"./Particles/IParticleSystem\";\r\nimport type { AnimationGroup } from \"./Animations/animationGroup\";\r\nimport type { BaseTexture } from \"./Materials/Textures/baseTexture\";\r\nimport type { Material } from \"./Materials/material\";\r\nimport type { MultiMaterial } from \"./Materials/multiMaterial\";\r\nimport type { AbstractActionManager } from \"./Actions/abstractActionManager\";\r\nimport type { Camera } from \"./Cameras/camera\";\r\nimport type { Light } from \"./Lights/light\";\r\nimport type { Node } from \"./node\";\r\n\r\ndeclare type Animation = import(\"./Animations/animation\").Animation;\r\ndeclare type PostProcess = import(\"./PostProcesses/postProcess\").PostProcess;\r\n\r\n/**\r\n * Defines how the parser contract is defined.\r\n * These parsers are used to parse a list of specific assets (like particle systems, etc..)\r\n */\r\nexport type BabylonFileParser = (parsedData: any, scene: Scene, container: AssetContainer, rootUrl: string) => void;\r\n\r\n/**\r\n * Defines how the individual parser contract is defined.\r\n * These parser can parse an individual asset\r\n */\r\nexport type IndividualBabylonFileParser = (parsedData: any, scene: Scene, rootUrl: string) => any;\r\n\r\n/**\r\n * Base class of the scene acting as a container for the different elements composing a scene.\r\n * This class is dynamically extended by the different components of the scene increasing\r\n * flexibility and reducing coupling\r\n */\r\nexport abstract class AbstractScene {\r\n /**\r\n * Stores the list of available parsers in the application.\r\n */\r\n private static _BabylonFileParsers: { [key: string]: BabylonFileParser } = {};\r\n\r\n /**\r\n * Stores the list of available individual parsers in the application.\r\n */\r\n private static _IndividualBabylonFileParsers: { [key: string]: IndividualBabylonFileParser } = {};\r\n\r\n /**\r\n * Adds a parser in the list of available ones\r\n * @param name Defines the name of the parser\r\n * @param parser Defines the parser to add\r\n */\r\n public static AddParser(name: string, parser: BabylonFileParser): void {\r\n this._BabylonFileParsers[name] = parser;\r\n }\r\n\r\n /**\r\n * Gets a general parser from the list of available ones\r\n * @param name Defines the name of the parser\r\n * @returns the requested parser or null\r\n */\r\n public static GetParser(name: string): Nullable<BabylonFileParser> {\r\n if (this._BabylonFileParsers[name]) {\r\n return this._BabylonFileParsers[name];\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * Adds n individual parser in the list of available ones\r\n * @param name Defines the name of the parser\r\n * @param parser Defines the parser to add\r\n */\r\n public static AddIndividualParser(name: string, parser: IndividualBabylonFileParser): void {\r\n this._IndividualBabylonFileParsers[name] = parser;\r\n }\r\n\r\n /**\r\n * Gets an individual parser from the list of available ones\r\n * @param name Defines the name of the parser\r\n * @returns the requested parser or null\r\n */\r\n public static GetIndividualParser(name: string): Nullable<IndividualBabylonFileParser> {\r\n if (this._IndividualBabylonFileParsers[name]) {\r\n return this._IndividualBabylonFileParsers[name];\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * Parser json data and populate both a scene and its associated container object\r\n * @param jsonData Defines the data to parse\r\n * @param scene Defines the scene to parse the data for\r\n * @param container Defines the container attached to the parsing sequence\r\n * @param rootUrl Defines the root url of the data\r\n */\r\n public static Parse(jsonData: any, scene: Scene, container: AssetContainer, rootUrl: string): void {\r\n for (const parserName in this._BabylonFileParsers) {\r\n if (Object.prototype.hasOwnProperty.call(this._BabylonFileParsers, parserName)) {\r\n this._BabylonFileParsers[parserName](jsonData, scene, container, rootUrl);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Gets the list of root nodes (ie. nodes with no parent)\r\n */\r\n public rootNodes = new Array<Node>();\r\n\r\n /** All of the cameras added to this scene\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/cameras\r\n */\r\n public cameras = new Array<Camera>();\r\n\r\n /**\r\n * All of the lights added to this scene\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/lights/lights_introduction\r\n */\r\n public lights = new Array<Light>();\r\n\r\n /**\r\n * All of the (abstract) meshes added to this scene\r\n */\r\n public meshes = new Array<AbstractMesh>();\r\n\r\n /**\r\n * The list of skeletons added to the scene\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/bonesSkeletons\r\n */\r\n public skeletons = new Array<Skeleton>();\r\n\r\n /**\r\n * All of the particle systems added to this scene\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/particles/particle_system/particle_system_intro\r\n */\r\n public particleSystems = new Array<IParticleSystem>();\r\n\r\n /**\r\n * Gets a list of Animations associated with the scene\r\n */\r\n public animations: Animation[] = [];\r\n\r\n /**\r\n * All of the animation groups added to this scene\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/animation/groupAnimations\r\n */\r\n public animationGroups = new Array<AnimationGroup>();\r\n\r\n /**\r\n * All of the multi-materials added to this scene\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/multiMaterials\r\n */\r\n public multiMaterials = new Array<MultiMaterial>();\r\n\r\n /**\r\n * All of the materials added to this scene\r\n * In the context of a Scene, it is not supposed to be modified manually.\r\n * Any addition or removal should be done using the addMaterial and removeMaterial Scene methods.\r\n * Note also that the order of the Material within the array is not significant and might change.\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/materials_introduction\r\n */\r\n public materials = new Array<Material>();\r\n\r\n /**\r\n * The list of morph target managers added to the scene\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/dynamicMeshMorph\r\n */\r\n public morphTargetManagers = new Array<MorphTargetManager>();\r\n\r\n /**\r\n * The list of geometries used in the scene.\r\n */\r\n public geometries = new Array<Geometry>();\r\n\r\n /**\r\n * All of the transform nodes added to this scene\r\n * In the context of a Scene, it is not supposed to be modified manually.\r\n * Any addition or removal should be done using the addTransformNode and removeTransformNode Scene methods.\r\n * Note also that the order of the TransformNode within the array is not significant and might change.\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/transforms/parent_pivot/transform_node\r\n */\r\n public transformNodes = new Array<TransformNode>();\r\n\r\n /**\r\n * ActionManagers available on the scene.\r\n * @deprecated\r\n */\r\n public actionManagers = new Array<AbstractActionManager>();\r\n\r\n /**\r\n * Textures to keep.\r\n */\r\n public textures = new Array<BaseTexture>();\r\n\r\n /** @internal */\r\n protected _environmentTexture: Nullable<BaseTexture> = null;\r\n /**\r\n * Texture used in all pbr material as the reflection texture.\r\n * As in the majority of the scene they are the same (exception for multi room and so on),\r\n * this is easier to reference from here than from all the materials.\r\n */\r\n public get environmentTexture(): Nullable<BaseTexture> {\r\n return this._environmentTexture;\r\n }\r\n\r\n public set environmentTexture(value: Nullable<BaseTexture>) {\r\n this._environmentTexture = value;\r\n }\r\n\r\n /**\r\n * The list of postprocesses added to the scene\r\n */\r\n public postProcesses = new Array<PostProcess>();\r\n\r\n /**\r\n * @returns all meshes, lights, cameras, transformNodes and bones\r\n */\r\n public getNodes(): Array<Node> {\r\n let nodes = new Array<Node>();\r\n nodes = nodes.concat(this.meshes);\r\n nodes = nodes.concat(this.lights);\r\n nodes = nodes.concat(this.cameras);\r\n nodes = nodes.concat(this.transformNodes); // dummies\r\n this.skeletons.forEach((skeleton) => (nodes = nodes.concat(skeleton.bones)));\r\n return nodes;\r\n }\r\n}\r\n"]}
package/node.d.ts CHANGED
@@ -69,7 +69,7 @@ export declare class Node implements IBehaviorAware<Node> {
69
69
  reservedDataStore: any;
70
70
  /**
71
71
  * List of inspectable custom properties (used by the Inspector)
72
- * @see https://doc.babylonjs.com/how_to/debug_layer#extensibility
72
+ * @see https://doc.babylonjs.com/toolsAndResources/inspector#extensibility
73
73
  */
74
74
  inspectableCustomProperties: IInspectable[];
75
75
  /**
@@ -128,7 +128,7 @@ export declare class Node implements IBehaviorAware<Node> {
128
128
  isDisposed(): boolean;
129
129
  /**
130
130
  * Gets or sets the parent of the node (without keeping the current position in the scene)
131
- * @see https://doc.babylonjs.com/how_to/parenting
131
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/transforms/parent_pivot/parent
132
132
  */
133
133
  set parent(parent: Nullable<Node>);
134
134
  get parent(): Nullable<Node>;
@@ -189,7 +189,7 @@ export declare class Node implements IBehaviorAware<Node> {
189
189
  private _behaviors;
190
190
  /**
191
191
  * Attach a behavior to the node
192
- * @see https://doc.babylonjs.com/features/behaviour
192
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/behaviors
193
193
  * @param behavior defines the behavior to attach
194
194
  * @param attachImmediately defines that the behavior must be attached even if the scene is still loading
195
195
  * @returns the current Node
@@ -197,20 +197,20 @@ export declare class Node implements IBehaviorAware<Node> {
197
197
  addBehavior(behavior: Behavior<Node>, attachImmediately?: boolean): Node;
198
198
  /**
199
199
  * Remove an attached behavior
200
- * @see https://doc.babylonjs.com/features/behaviour
200
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/behaviors
201
201
  * @param behavior defines the behavior to attach
202
202
  * @returns the current Node
203
203
  */
204
204
  removeBehavior(behavior: Behavior<Node>): Node;
205
205
  /**
206
206
  * Gets the list of attached behaviors
207
- * @see https://doc.babylonjs.com/features/behaviour
207
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/behaviors
208
208
  */
209
209
  get behaviors(): Behavior<Node>[];
210
210
  /**
211
211
  * Gets an attached behavior by name
212
212
  * @param name defines the name of the behavior to look for
213
- * @see https://doc.babylonjs.com/features/behaviour
213
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/behaviors
214
214
  * @returns null if behavior was not found else the requested behavior
215
215
  */
216
216
  getBehaviorByName(name: string): Nullable<Behavior<Node>>;
package/node.js CHANGED
@@ -149,7 +149,7 @@ export class Node {
149
149
  }
150
150
  /**
151
151
  * Gets or sets the parent of the node (without keeping the current position in the scene)
152
- * @see https://doc.babylonjs.com/how_to/parenting
152
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/transforms/parent_pivot/parent
153
153
  */
154
154
  set parent(parent) {
155
155
  if (this._parentNode === parent) {
@@ -264,7 +264,7 @@ export class Node {
264
264
  }
265
265
  /**
266
266
  * Attach a behavior to the node
267
- * @see https://doc.babylonjs.com/features/behaviour
267
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/behaviors
268
268
  * @param behavior defines the behavior to attach
269
269
  * @param attachImmediately defines that the behavior must be attached even if the scene is still loading
270
270
  * @returns the current Node
@@ -289,7 +289,7 @@ export class Node {
289
289
  }
290
290
  /**
291
291
  * Remove an attached behavior
292
- * @see https://doc.babylonjs.com/features/behaviour
292
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/behaviors
293
293
  * @param behavior defines the behavior to attach
294
294
  * @returns the current Node
295
295
  */
@@ -304,7 +304,7 @@ export class Node {
304
304
  }
305
305
  /**
306
306
  * Gets the list of attached behaviors
307
- * @see https://doc.babylonjs.com/features/behaviour
307
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/behaviors
308
308
  */
309
309
  get behaviors() {
310
310
  return this._behaviors;
@@ -312,7 +312,7 @@ export class Node {
312
312
  /**
313
313
  * Gets an attached behavior by name
314
314
  * @param name defines the name of the behavior to look for
315
- * @see https://doc.babylonjs.com/features/behaviour
315
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/behaviors
316
316
  * @returns null if behavior was not found else the requested behavior
317
317
  */
318
318
  getBehaviorByName(name) {
package/node.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"node.js","sourceRoot":"","sources":["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D;gBACxD,IAAI,CAAC,SAAS,CAAC,eAAe,IAAI,SAAS,CAAC,gBAAgB,EAAE,KAAK,CAAC,EAAE;oBAClE,SAAS;iBACZ;gBAED,MAAM,iBAAiB,GAAG,SAAS,CAAC,eAAe,EAAE,CAAC;gBACtD,MAAM,WAAW,GAAG,iBAAiB,CAAC,WAAW,CAAC;gBAElD,MAAM,MAAM,GAAG,WAAW,CAAC,YAAY,CAAC;gBACxC,MAAM,MAAM,GAAG,WAAW,CAAC,YAAY,CAAC;gBAExC,OAAO,CAAC,YAAY,CAAC,MAAM,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;gBACvC,OAAO,CAAC,YAAY,CAAC,MAAM,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;aAC1C;SACJ;QAED,OAAO;YACH,GAAG,EAAE,GAAG;YACR,GAAG,EAAE,GAAG;SACX,CAAC;IACN,CAAC;;AA76BD;;GAEG;AACW,2BAAsB,GAAG,CAAC,KAAa,EAAE,KAAa,EAAE,GAAW,EAAkB,EAAE;IACjG,MAAM,WAAW,CAAC,gBAAgB,CAAC,CAAC;AACxC,CAAC,CAAC;AAEa,sBAAiB,GAA2B,EAAE,CAAC;AAmC9D;IADC,SAAS,EAAE;kCACQ;AAMpB;IADC,SAAS,EAAE;gCACM;AAMlB;IADC,SAAS,EAAE;sCACY;AAMxB;IADC,SAAS,EAAE;mCACM;AAMlB;IADC,SAAS,EAAE;sCACgB","sourcesContent":["/* eslint-disable @typescript-eslint/no-unused-vars */\r\nimport type { Scene } from \"./scene\";\r\nimport type { Nullable } from \"./types\";\r\nimport { Matrix, Vector3 } from \"./Maths/math.vector\";\r\nimport type { Engine } from \"./Engines/engine\";\r\nimport type { IBehaviorAware, Behavior } from \"./Behaviors/behavior\";\r\nimport { serialize } from \"./Misc/decorators\";\r\nimport type { Observer } from \"./Misc/observable\";\r\nimport { Observable } from \"./Misc/observable\";\r\nimport { EngineStore } from \"./Engines/engineStore\";\r\nimport { _WarnImport } from \"./Misc/devTools\";\r\nimport type { AbstractActionManager } from \"./Actions/abstractActionManager\";\r\nimport type { IInspectable } from \"./Misc/iInspectable\";\r\nimport type { AbstractScene } from \"./abstractScene\";\r\nimport type { IAccessibilityTag } from \"./IAccessibilityTag\";\r\n\r\ndeclare type Animatable = import(\"./Animations/animatable\").Animatable;\r\ndeclare type AnimationPropertiesOverride = import(\"./Animations/animationPropertiesOverride\").AnimationPropertiesOverride;\r\ndeclare type Animation = import(\"./Animations/animation\").Animation;\r\ndeclare type AnimationRange = import(\"./Animations/animationRange\").AnimationRange;\r\ndeclare type AbstractMesh = import(\"./Meshes/abstractMesh\").AbstractMesh;\r\n\r\n/**\r\n * Defines how a node can be built from a string name.\r\n */\r\nexport type NodeConstructor = (name: string, scene: Scene, options?: any) => () => Node;\r\n\r\n/** @internal */\r\nclass _InternalNodeDataInfo {\r\n public _doNotSerialize = false;\r\n public _isDisposed = false;\r\n public _sceneRootNodesIndex = -1;\r\n public _isEnabled = true;\r\n public _isParentEnabled = true;\r\n public _isReady = true;\r\n public _onEnabledStateChangedObservable = new Observable<boolean>();\r\n public _onClonedObservable = new Observable<Node>();\r\n}\r\n\r\n/**\r\n * Node is the basic class for all scene objects (Mesh, Light, Camera.)\r\n */\r\nexport class Node implements IBehaviorAware<Node> {\r\n protected _isDirty = false;\r\n\r\n /**\r\n * @internal\r\n */\r\n public static _AnimationRangeFactory = (_name: string, _from: number, _to: number): AnimationRange => {\r\n throw _WarnImport(\"AnimationRange\");\r\n };\r\n\r\n private static _NodeConstructors: { [key: string]: any } = {};\r\n\r\n /**\r\n * Add a new node constructor\r\n * @param type defines the type name of the node to construct\r\n * @param constructorFunc defines the constructor function\r\n */\r\n public static AddNodeConstructor(type: string, constructorFunc: NodeConstructor) {\r\n this._NodeConstructors[type] = constructorFunc;\r\n }\r\n\r\n /**\r\n * Returns a node constructor based on type name\r\n * @param type defines the type name\r\n * @param name defines the new node name\r\n * @param scene defines the hosting scene\r\n * @param options defines optional options to transmit to constructors\r\n * @returns the new constructor or null\r\n */\r\n public static Construct(type: string, name: string, scene: Scene, options?: any): Nullable<() => Node> {\r\n const constructorFunc = this._NodeConstructors[type];\r\n\r\n if (!constructorFunc) {\r\n return null;\r\n }\r\n\r\n return constructorFunc(name, scene, options);\r\n }\r\n\r\n private _nodeDataStorage = new _InternalNodeDataInfo();\r\n\r\n /**\r\n * Gets or sets the name of the node\r\n */\r\n @serialize()\r\n public name: string;\r\n\r\n /**\r\n * Gets or sets the id of the node\r\n */\r\n @serialize()\r\n public id: string;\r\n\r\n /**\r\n * Gets or sets the unique id of the node\r\n */\r\n @serialize()\r\n public uniqueId: number;\r\n\r\n /**\r\n * Gets or sets a string used to store user defined state for the node\r\n */\r\n @serialize()\r\n public state = \"\";\r\n\r\n /**\r\n * Gets or sets an object used to store user defined information for the node\r\n */\r\n @serialize()\r\n public metadata: any = null;\r\n\r\n /**\r\n * For internal use only. Please do not use.\r\n */\r\n public reservedDataStore: any = null;\r\n\r\n /**\r\n * List of inspectable custom properties (used by the Inspector)\r\n * @see https://doc.babylonjs.com/how_to/debug_layer#extensibility\r\n */\r\n public inspectableCustomProperties: IInspectable[];\r\n\r\n /**\r\n * Gets or sets the accessibility tag to describe the node for accessibility purpose.\r\n */\r\n public set accessibilityTag(value: Nullable<IAccessibilityTag>) {\r\n this._accessibilityTag = value;\r\n this.onAccessibilityTagChangedObservable.notifyObservers(value);\r\n }\r\n\r\n public get accessibilityTag() {\r\n return this._accessibilityTag;\r\n }\r\n\r\n protected _accessibilityTag: Nullable<IAccessibilityTag> = null;\r\n\r\n public onAccessibilityTagChangedObservable = new Observable<Nullable<IAccessibilityTag>>();\r\n\r\n /**\r\n * Gets or sets a boolean used to define if the node must be serialized\r\n */\r\n public get doNotSerialize() {\r\n if (this._nodeDataStorage._doNotSerialize) {\r\n return true;\r\n }\r\n\r\n if (this._parentNode) {\r\n return this._parentNode.doNotSerialize;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n public set doNotSerialize(value: boolean) {\r\n this._nodeDataStorage._doNotSerialize = value;\r\n }\r\n\r\n /** @internal */\r\n public _parentContainer: Nullable<AbstractScene> = null;\r\n\r\n /**\r\n * Gets a list of Animations associated with the node\r\n */\r\n public animations = new Array<Animation>();\r\n protected _ranges: { [name: string]: Nullable<AnimationRange> } = {};\r\n\r\n /**\r\n * Callback raised when the node is ready to be used\r\n */\r\n public onReady: Nullable<(node: Node) => void> = null;\r\n\r\n /** @internal */\r\n public _currentRenderId = -1;\r\n private _parentUpdateId = -1;\r\n /** @internal */\r\n public _childUpdateId = -1;\r\n\r\n /** @internal */\r\n public _waitingParentId: Nullable<string> = null;\r\n /** @internal */\r\n public _waitingParentInstanceIndex: Nullable<string> = null;\r\n /** @internal */\r\n public _waitingParsedUniqueId: Nullable<number> = null;\r\n /** @internal */\r\n public _scene: Scene;\r\n /** @internal */\r\n public _cache: any = {};\r\n\r\n protected _parentNode: Nullable<Node> = null;\r\n\r\n /** @internal */\r\n protected _children: Nullable<Node[]> = null;\r\n\r\n /** @internal */\r\n public _worldMatrix = Matrix.Identity();\r\n /** @internal */\r\n public _worldMatrixDeterminant = 0;\r\n /** @internal */\r\n public _worldMatrixDeterminantIsDirty = true;\r\n\r\n /**\r\n * Gets a boolean indicating if the node has been disposed\r\n * @returns true if the node was disposed\r\n */\r\n public isDisposed(): boolean {\r\n return this._nodeDataStorage._isDisposed;\r\n }\r\n\r\n /**\r\n * Gets or sets the parent of the node (without keeping the current position in the scene)\r\n * @see https://doc.babylonjs.com/how_to/parenting\r\n */\r\n public set parent(parent: Nullable<Node>) {\r\n if (this._parentNode === parent) {\r\n return;\r\n }\r\n\r\n const previousParentNode = this._parentNode;\r\n\r\n // Remove self from list of children of parent\r\n if (this._parentNode && this._parentNode._children !== undefined && this._parentNode._children !== null) {\r\n const index = this._parentNode._children.indexOf(this);\r\n if (index !== -1) {\r\n this._parentNode._children.splice(index, 1);\r\n }\r\n\r\n if (!parent && !this._nodeDataStorage._isDisposed) {\r\n this._addToSceneRootNodes();\r\n }\r\n }\r\n\r\n // Store new parent\r\n this._parentNode = parent;\r\n\r\n // Add as child to new parent\r\n if (this._parentNode) {\r\n if (this._parentNode._children === undefined || this._parentNode._children === null) {\r\n this._parentNode._children = new Array<Node>();\r\n }\r\n this._parentNode._children.push(this);\r\n\r\n if (!previousParentNode) {\r\n this._removeFromSceneRootNodes();\r\n }\r\n }\r\n\r\n // Enabled state\r\n this._syncParentEnabledState();\r\n }\r\n\r\n public get parent(): Nullable<Node> {\r\n return this._parentNode;\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public _serializeAsParent(serializationObject: any): void {\r\n serializationObject.parentId = this.uniqueId;\r\n }\r\n\r\n /** @internal */\r\n public _addToSceneRootNodes() {\r\n if (this._nodeDataStorage._sceneRootNodesIndex === -1) {\r\n this._nodeDataStorage._sceneRootNodesIndex = this._scene.rootNodes.length;\r\n this._scene.rootNodes.push(this);\r\n }\r\n }\r\n\r\n /** @internal */\r\n public _removeFromSceneRootNodes() {\r\n if (this._nodeDataStorage._sceneRootNodesIndex !== -1) {\r\n const rootNodes = this._scene.rootNodes;\r\n const lastIdx = rootNodes.length - 1;\r\n rootNodes[this._nodeDataStorage._sceneRootNodesIndex] = rootNodes[lastIdx];\r\n rootNodes[this._nodeDataStorage._sceneRootNodesIndex]._nodeDataStorage._sceneRootNodesIndex = this._nodeDataStorage._sceneRootNodesIndex;\r\n this._scene.rootNodes.pop();\r\n this._nodeDataStorage._sceneRootNodesIndex = -1;\r\n }\r\n }\r\n\r\n private _animationPropertiesOverride: Nullable<AnimationPropertiesOverride> = null;\r\n\r\n /**\r\n * Gets or sets the animation properties override\r\n */\r\n public get animationPropertiesOverride(): Nullable<AnimationPropertiesOverride> {\r\n if (!this._animationPropertiesOverride) {\r\n return this._scene.animationPropertiesOverride;\r\n }\r\n return this._animationPropertiesOverride;\r\n }\r\n\r\n public set animationPropertiesOverride(value: Nullable<AnimationPropertiesOverride>) {\r\n this._animationPropertiesOverride = value;\r\n }\r\n\r\n /**\r\n * Gets a string identifying the name of the class\r\n * @returns \"Node\" string\r\n */\r\n public getClassName(): string {\r\n return \"Node\";\r\n }\r\n\r\n /** @internal */\r\n public readonly _isNode = true;\r\n\r\n /**\r\n * An event triggered when the mesh is disposed\r\n */\r\n public onDisposeObservable = new Observable<Node>();\r\n\r\n private _onDisposeObserver: Nullable<Observer<Node>> = null;\r\n /**\r\n * Sets a callback that will be raised when the node will be disposed\r\n */\r\n public set onDispose(callback: () => void) {\r\n if (this._onDisposeObserver) {\r\n this.onDisposeObservable.remove(this._onDisposeObserver);\r\n }\r\n this._onDisposeObserver = this.onDisposeObservable.add(callback);\r\n }\r\n\r\n /**\r\n * An event triggered when the enabled state of the node changes\r\n */\r\n public get onEnabledStateChangedObservable(): Observable<boolean> {\r\n return this._nodeDataStorage._onEnabledStateChangedObservable;\r\n }\r\n\r\n /**\r\n * An event triggered when the node is cloned\r\n */\r\n public get onClonedObservable(): Observable<Node> {\r\n return this._nodeDataStorage._onClonedObservable;\r\n }\r\n\r\n /**\r\n * Creates a new Node\r\n * @param name the name and id to be given to this node\r\n * @param scene the scene this node will be added to\r\n */\r\n constructor(name: string, scene: Nullable<Scene> = null) {\r\n this.name = name;\r\n this.id = name;\r\n this._scene = <Scene>(scene || EngineStore.LastCreatedScene);\r\n this.uniqueId = this._scene.getUniqueId();\r\n this._initCache();\r\n }\r\n\r\n /**\r\n * Gets the scene of the node\r\n * @returns a scene\r\n */\r\n public getScene(): Scene {\r\n return this._scene;\r\n }\r\n\r\n /**\r\n * Gets the engine of the node\r\n * @returns a Engine\r\n */\r\n public getEngine(): Engine {\r\n return this._scene.getEngine();\r\n }\r\n\r\n // Behaviors\r\n private _behaviors = new Array<Behavior<Node>>();\r\n\r\n /**\r\n * Attach a behavior to the node\r\n * @see https://doc.babylonjs.com/features/behaviour\r\n * @param behavior defines the behavior to attach\r\n * @param attachImmediately defines that the behavior must be attached even if the scene is still loading\r\n * @returns the current Node\r\n */\r\n public addBehavior(behavior: Behavior<Node>, attachImmediately = false): Node {\r\n const index = this._behaviors.indexOf(behavior);\r\n\r\n if (index !== -1) {\r\n return this;\r\n }\r\n\r\n behavior.init();\r\n if (this._scene.isLoading && !attachImmediately) {\r\n // We defer the attach when the scene will be loaded\r\n this._scene.onDataLoadedObservable.addOnce(() => {\r\n behavior.attach(this);\r\n });\r\n } else {\r\n behavior.attach(this);\r\n }\r\n this._behaviors.push(behavior);\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Remove an attached behavior\r\n * @see https://doc.babylonjs.com/features/behaviour\r\n * @param behavior defines the behavior to attach\r\n * @returns the current Node\r\n */\r\n public removeBehavior(behavior: Behavior<Node>): Node {\r\n const index = this._behaviors.indexOf(behavior);\r\n\r\n if (index === -1) {\r\n return this;\r\n }\r\n\r\n this._behaviors[index].detach();\r\n this._behaviors.splice(index, 1);\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Gets the list of attached behaviors\r\n * @see https://doc.babylonjs.com/features/behaviour\r\n */\r\n public get behaviors(): Behavior<Node>[] {\r\n return this._behaviors;\r\n }\r\n\r\n /**\r\n * Gets an attached behavior by name\r\n * @param name defines the name of the behavior to look for\r\n * @see https://doc.babylonjs.com/features/behaviour\r\n * @returns null if behavior was not found else the requested behavior\r\n */\r\n public getBehaviorByName(name: string): Nullable<Behavior<Node>> {\r\n for (const behavior of this._behaviors) {\r\n if (behavior.name === name) {\r\n return behavior;\r\n }\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * Returns the latest update of the World matrix\r\n * @returns a Matrix\r\n */\r\n public getWorldMatrix(): Matrix {\r\n if (this._currentRenderId !== this._scene.getRenderId()) {\r\n this.computeWorldMatrix();\r\n }\r\n return this._worldMatrix;\r\n }\r\n\r\n /** @internal */\r\n public _getWorldMatrixDeterminant(): number {\r\n if (this._worldMatrixDeterminantIsDirty) {\r\n this._worldMatrixDeterminantIsDirty = false;\r\n this._worldMatrixDeterminant = this._worldMatrix.determinant();\r\n }\r\n return this._worldMatrixDeterminant;\r\n }\r\n\r\n /**\r\n * Returns directly the latest state of the mesh World matrix.\r\n * A Matrix is returned.\r\n */\r\n public get worldMatrixFromCache(): Matrix {\r\n return this._worldMatrix;\r\n }\r\n\r\n // override it in derived class if you add new variables to the cache\r\n // and call the parent class method\r\n /** @internal */\r\n public _initCache() {\r\n this._cache = {};\r\n this._cache.parent = undefined;\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public updateCache(force?: boolean): void {\r\n if (!force && this.isSynchronized()) {\r\n return;\r\n }\r\n\r\n this._cache.parent = this.parent;\r\n\r\n this._updateCache();\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public _getActionManagerForTrigger(trigger?: number, _initialCall = true): Nullable<AbstractActionManager> {\r\n if (!this.parent) {\r\n return null;\r\n }\r\n\r\n return this.parent._getActionManagerForTrigger(trigger, false);\r\n }\r\n\r\n // override it in derived class if you add new variables to the cache\r\n // and call the parent class method if !ignoreParentClass\r\n /**\r\n * @internal\r\n */\r\n public _updateCache(_ignoreParentClass?: boolean): void {}\r\n\r\n // override it in derived class if you add new variables to the cache\r\n /** @internal */\r\n public _isSynchronized(): boolean {\r\n return true;\r\n }\r\n\r\n /** @internal */\r\n public _markSyncedWithParent() {\r\n if (this._parentNode) {\r\n this._parentUpdateId = this._parentNode._childUpdateId;\r\n }\r\n }\r\n\r\n /** @internal */\r\n public isSynchronizedWithParent(): boolean {\r\n if (!this._parentNode) {\r\n return true;\r\n }\r\n\r\n if (this._parentNode._isDirty || this._parentUpdateId !== this._parentNode._childUpdateId) {\r\n return false;\r\n }\r\n\r\n return this._parentNode.isSynchronized();\r\n }\r\n\r\n /** @internal */\r\n public isSynchronized(): boolean {\r\n if (this._cache.parent !== this._parentNode) {\r\n this._cache.parent = this._parentNode;\r\n return false;\r\n }\r\n\r\n if (this._parentNode && !this.isSynchronizedWithParent()) {\r\n return false;\r\n }\r\n\r\n return this._isSynchronized();\r\n }\r\n\r\n /**\r\n * Is this node ready to be used/rendered\r\n * @param _completeCheck defines if a complete check (including materials and lights) has to be done (false by default)\r\n * @returns true if the node is ready\r\n */\r\n public isReady(_completeCheck = false): boolean {\r\n return this._nodeDataStorage._isReady;\r\n }\r\n\r\n /**\r\n * Flag the node as dirty (Forcing it to update everything)\r\n * @param _property helps children apply precise \"dirtyfication\"\r\n * @returns this node\r\n */\r\n public markAsDirty(_property?: string): Node {\r\n this._currentRenderId = Number.MAX_VALUE;\r\n this._isDirty = true;\r\n return this;\r\n }\r\n\r\n /**\r\n * Is this node enabled?\r\n * If the node has a parent, all ancestors will be checked and false will be returned if any are false (not enabled), otherwise will return true\r\n * @param checkAncestors indicates if this method should check the ancestors. The default is to check the ancestors. If set to false, the method will return the value of this node without checking ancestors\r\n * @returns whether this node (and its parent) is enabled\r\n */\r\n public isEnabled(checkAncestors: boolean = true): boolean {\r\n if (checkAncestors === false) {\r\n return this._nodeDataStorage._isEnabled;\r\n }\r\n\r\n if (!this._nodeDataStorage._isEnabled) {\r\n return false;\r\n }\r\n\r\n return this._nodeDataStorage._isParentEnabled;\r\n }\r\n\r\n /** @internal */\r\n protected _syncParentEnabledState() {\r\n this._nodeDataStorage._isParentEnabled = this._parentNode ? this._parentNode.isEnabled() : true;\r\n\r\n if (this._children) {\r\n this._children.forEach((c) => {\r\n c._syncParentEnabledState(); // Force children to update accordingly\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * Set the enabled state of this node\r\n * @param value defines the new enabled state\r\n */\r\n public setEnabled(value: boolean): void {\r\n if (this._nodeDataStorage._isEnabled === value) {\r\n return;\r\n }\r\n this._nodeDataStorage._isEnabled = value;\r\n this._syncParentEnabledState();\r\n this._nodeDataStorage._onEnabledStateChangedObservable.notifyObservers(value);\r\n }\r\n\r\n /**\r\n * Is this node a descendant of the given node?\r\n * The function will iterate up the hierarchy until the ancestor was found or no more parents defined\r\n * @param ancestor defines the parent node to inspect\r\n * @returns a boolean indicating if this node is a descendant of the given node\r\n */\r\n public isDescendantOf(ancestor: Node): boolean {\r\n if (this.parent) {\r\n if (this.parent === ancestor) {\r\n return true;\r\n }\r\n\r\n return this.parent.isDescendantOf(ancestor);\r\n }\r\n return false;\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public _getDescendants(results: Node[], directDescendantsOnly: boolean = false, predicate?: (node: Node) => boolean): void {\r\n if (!this._children) {\r\n return;\r\n }\r\n\r\n for (let index = 0; index < this._children.length; index++) {\r\n const item = this._children[index];\r\n\r\n if (!predicate || predicate(item)) {\r\n results.push(item);\r\n }\r\n\r\n if (!directDescendantsOnly) {\r\n item._getDescendants(results, false, predicate);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Will return all nodes that have this node as ascendant\r\n * @param directDescendantsOnly defines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered\r\n * @param predicate defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored\r\n * @returns all children nodes of all types\r\n */\r\n public getDescendants<T extends Node>(directDescendantsOnly?: boolean, predicate?: (node: Node) => node is T): T[];\r\n\r\n /**\r\n * Will return all nodes that have this node as ascendant\r\n * @param directDescendantsOnly defines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered\r\n * @param predicate defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored\r\n * @returns all children nodes of all types\r\n */\r\n public getDescendants(directDescendantsOnly?: boolean, predicate?: (node: Node) => boolean): Node[];\r\n\r\n /**\r\n * Will return all nodes that have this node as ascendant\r\n * @param directDescendantsOnly defines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered\r\n * @param predicate defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored\r\n * @returns all children nodes of all types\r\n */\r\n public getDescendants(directDescendantsOnly?: boolean, predicate?: (node: Node) => boolean): Node[] {\r\n const results = new Array<Node>();\r\n\r\n this._getDescendants(results, directDescendantsOnly, predicate);\r\n\r\n return results;\r\n }\r\n\r\n /**\r\n * Get all child-meshes of this node\r\n * @param directDescendantsOnly defines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered (Default: false)\r\n * @param predicate defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored\r\n * @returns an array of AbstractMesh\r\n */\r\n public getChildMeshes<T extends AbstractMesh>(directDescendantsOnly?: boolean, predicate?: (node: Node) => node is T): T[];\r\n\r\n /**\r\n * Get all child-meshes of this node\r\n * @param directDescendantsOnly defines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered (Default: false)\r\n * @param predicate defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored\r\n * @returns an array of AbstractMesh\r\n */\r\n public getChildMeshes(directDescendantsOnly?: boolean, predicate?: (node: Node) => boolean): AbstractMesh[];\r\n\r\n /**\r\n * Get all child-meshes of this node\r\n * @param directDescendantsOnly defines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered (Default: false)\r\n * @param predicate defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored\r\n * @returns an array of AbstractMesh\r\n */\r\n public getChildMeshes(directDescendantsOnly?: boolean, predicate?: (node: Node) => boolean): AbstractMesh[] {\r\n const results: Array<AbstractMesh> = [];\r\n this._getDescendants(results, directDescendantsOnly, (node: Node) => {\r\n return (!predicate || predicate(node)) && (<AbstractMesh>node).cullingStrategy !== undefined;\r\n });\r\n return results;\r\n }\r\n\r\n /**\r\n * Get all direct children of this node\r\n * @param predicate defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored\r\n * @param directDescendantsOnly defines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered (Default: true)\r\n * @returns an array of Node\r\n */\r\n public getChildren<T extends Node>(predicate?: (node: Node) => node is T, directDescendantsOnly?: boolean): T[];\r\n\r\n /**\r\n * Get all direct children of this node\r\n * @param predicate defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored\r\n * @param directDescendantsOnly defines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered (Default: true)\r\n * @returns an array of Node\r\n */\r\n public getChildren(predicate?: (node: Node) => boolean, directDescendantsOnly?: boolean): Node[];\r\n\r\n /**\r\n * Get all direct children of this node\r\n * @param predicate defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored\r\n * @param directDescendantsOnly defines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered (Default: true)\r\n * @returns an array of Node\r\n */\r\n public getChildren(predicate?: (node: Node) => boolean, directDescendantsOnly = true): Node[] {\r\n return this.getDescendants(directDescendantsOnly, predicate);\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public _setReady(state: boolean): void {\r\n if (state === this._nodeDataStorage._isReady) {\r\n return;\r\n }\r\n\r\n if (!state) {\r\n this._nodeDataStorage._isReady = false;\r\n return;\r\n }\r\n\r\n if (this.onReady) {\r\n this.onReady(this);\r\n }\r\n this._nodeDataStorage._isReady = true;\r\n }\r\n\r\n /**\r\n * Get an animation by name\r\n * @param name defines the name of the animation to look for\r\n * @returns null if not found else the requested animation\r\n */\r\n public getAnimationByName(name: string): Nullable<Animation> {\r\n for (let i = 0; i < this.animations.length; i++) {\r\n const animation = this.animations[i];\r\n\r\n if (animation.name === name) {\r\n return animation;\r\n }\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * Creates an animation range for this node\r\n * @param name defines the name of the range\r\n * @param from defines the starting key\r\n * @param to defines the end key\r\n */\r\n public createAnimationRange(name: string, from: number, to: number): void {\r\n // check name not already in use\r\n if (!this._ranges[name]) {\r\n this._ranges[name] = Node._AnimationRangeFactory(name, from, to);\r\n for (let i = 0, nAnimations = this.animations.length; i < nAnimations; i++) {\r\n if (this.animations[i]) {\r\n this.animations[i].createRange(name, from, to);\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Delete a specific animation range\r\n * @param name defines the name of the range to delete\r\n * @param deleteFrames defines if animation frames from the range must be deleted as well\r\n */\r\n public deleteAnimationRange(name: string, deleteFrames = true): void {\r\n for (let i = 0, nAnimations = this.animations.length; i < nAnimations; i++) {\r\n if (this.animations[i]) {\r\n this.animations[i].deleteRange(name, deleteFrames);\r\n }\r\n }\r\n this._ranges[name] = null; // said much faster than 'delete this._range[name]'\r\n }\r\n\r\n /**\r\n * Get an animation range by name\r\n * @param name defines the name of the animation range to look for\r\n * @returns null if not found else the requested animation range\r\n */\r\n public getAnimationRange(name: string): Nullable<AnimationRange> {\r\n return this._ranges[name] || null;\r\n }\r\n\r\n /**\r\n * Gets the list of all animation ranges defined on this node\r\n * @returns an array\r\n */\r\n public getAnimationRanges(): Nullable<AnimationRange>[] {\r\n const animationRanges: Nullable<AnimationRange>[] = [];\r\n let name: string;\r\n for (name in this._ranges) {\r\n animationRanges.push(this._ranges[name]);\r\n }\r\n return animationRanges;\r\n }\r\n\r\n /**\r\n * Will start the animation sequence\r\n * @param name defines the range frames for animation sequence\r\n * @param loop defines if the animation should loop (false by default)\r\n * @param speedRatio defines the speed factor in which to run the animation (1 by default)\r\n * @param onAnimationEnd defines a function to be executed when the animation ended (undefined by default)\r\n * @returns the object created for this animation. If range does not exist, it will return null\r\n */\r\n public beginAnimation(name: string, loop?: boolean, speedRatio?: number, onAnimationEnd?: () => void): Nullable<Animatable> {\r\n const range = this.getAnimationRange(name);\r\n\r\n if (!range) {\r\n return null;\r\n }\r\n\r\n return this._scene.beginAnimation(this, range.from, range.to, loop, speedRatio, onAnimationEnd);\r\n }\r\n\r\n /**\r\n * Serialize animation ranges into a JSON compatible object\r\n * @returns serialization object\r\n */\r\n public serializeAnimationRanges(): any {\r\n const serializationRanges = [];\r\n for (const name in this._ranges) {\r\n const localRange = this._ranges[name];\r\n if (!localRange) {\r\n continue;\r\n }\r\n const range: any = {};\r\n range.name = name;\r\n range.from = localRange.from;\r\n range.to = localRange.to;\r\n serializationRanges.push(range);\r\n }\r\n return serializationRanges;\r\n }\r\n\r\n /**\r\n * Computes the world matrix of the node\r\n * @param _force defines if the cache version should be invalidated forcing the world matrix to be created from scratch\r\n * @returns the world matrix\r\n */\r\n public computeWorldMatrix(_force?: boolean): Matrix {\r\n if (!this._worldMatrix) {\r\n this._worldMatrix = Matrix.Identity();\r\n }\r\n return this._worldMatrix;\r\n }\r\n\r\n /**\r\n * Releases resources associated with this node.\r\n * @param doNotRecurse Set to true to not recurse into each children (recurse into each children by default)\r\n * @param disposeMaterialAndTextures Set to true to also dispose referenced materials and textures (false by default)\r\n */\r\n public dispose(doNotRecurse?: boolean, disposeMaterialAndTextures = false): void {\r\n this._nodeDataStorage._isDisposed = true;\r\n\r\n if (!doNotRecurse) {\r\n const nodes = this.getDescendants(true);\r\n for (const node of nodes) {\r\n node.dispose(doNotRecurse, disposeMaterialAndTextures);\r\n }\r\n }\r\n\r\n if (!this.parent) {\r\n this._removeFromSceneRootNodes();\r\n } else {\r\n this.parent = null;\r\n }\r\n\r\n // Callback\r\n this.onDisposeObservable.notifyObservers(this);\r\n this.onDisposeObservable.clear();\r\n\r\n this.onEnabledStateChangedObservable.clear();\r\n this.onClonedObservable.clear();\r\n\r\n // Behaviors\r\n for (const behavior of this._behaviors) {\r\n behavior.detach();\r\n }\r\n\r\n this._behaviors.length = 0;\r\n\r\n this.metadata = null;\r\n }\r\n\r\n /**\r\n * Parse animation range data from a serialization object and store them into a given node\r\n * @param node defines where to store the animation ranges\r\n * @param parsedNode defines the serialization object to read data from\r\n * @param _scene defines the hosting scene\r\n */\r\n public static ParseAnimationRanges(node: Node, parsedNode: any, _scene: Scene): void {\r\n if (parsedNode.ranges) {\r\n for (let index = 0; index < parsedNode.ranges.length; index++) {\r\n const data = parsedNode.ranges[index];\r\n node.createAnimationRange(data.name, data.from, data.to);\r\n }\r\n }\r\n }\r\n /**\r\n * Return the minimum and maximum world vectors of the entire hierarchy under current node\r\n * @param includeDescendants Include bounding info from descendants as well (true by default)\r\n * @param predicate defines a callback function that can be customize to filter what meshes should be included in the list used to compute the bounding vectors\r\n * @returns the new bounding vectors\r\n */\r\n public getHierarchyBoundingVectors(includeDescendants = true, predicate: Nullable<(abstractMesh: AbstractMesh) => boolean> = null): { min: Vector3; max: Vector3 } {\r\n // Ensures that all world matrix will be recomputed.\r\n this.getScene().incrementRenderId();\r\n\r\n this.computeWorldMatrix(true);\r\n\r\n let min: Vector3;\r\n let max: Vector3;\r\n\r\n const thisAbstractMesh = this as Node as AbstractMesh;\r\n if (thisAbstractMesh.getBoundingInfo && thisAbstractMesh.subMeshes) {\r\n // If this is an abstract mesh get its bounding info\r\n const boundingInfo = thisAbstractMesh.getBoundingInfo();\r\n min = boundingInfo.boundingBox.minimumWorld.clone();\r\n max = boundingInfo.boundingBox.maximumWorld.clone();\r\n } else {\r\n min = new Vector3(Number.MAX_VALUE, Number.MAX_VALUE, Number.MAX_VALUE);\r\n max = new Vector3(-Number.MAX_VALUE, -Number.MAX_VALUE, -Number.MAX_VALUE);\r\n }\r\n\r\n if (includeDescendants) {\r\n const descendants = this.getDescendants(false);\r\n\r\n for (const descendant of descendants) {\r\n const childMesh = <AbstractMesh>descendant;\r\n childMesh.computeWorldMatrix(true);\r\n\r\n // Filters meshes based on custom predicate function.\r\n if (predicate && !predicate(childMesh)) {\r\n continue;\r\n }\r\n\r\n //make sure we have the needed params to get mix and max\r\n if (!childMesh.getBoundingInfo || childMesh.getTotalVertices() === 0) {\r\n continue;\r\n }\r\n\r\n const childBoundingInfo = childMesh.getBoundingInfo();\r\n const boundingBox = childBoundingInfo.boundingBox;\r\n\r\n const minBox = boundingBox.minimumWorld;\r\n const maxBox = boundingBox.maximumWorld;\r\n\r\n Vector3.CheckExtends(minBox, min, max);\r\n Vector3.CheckExtends(maxBox, min, max);\r\n }\r\n }\r\n\r\n return {\r\n min: min,\r\n max: max,\r\n };\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"node.js","sourceRoot":"","sources":["../../../../lts/core/generated/node.ts"],"names":[],"mappings":";AAGA,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAGtD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAiB9C,gBAAgB;AAChB,MAAM,qBAAqB;IAA3B;QACW,oBAAe,GAAG,KAAK,CAAC;QACxB,gBAAW,GAAG,KAAK,CAAC;QACpB,yBAAoB,GAAG,CAAC,CAAC,CAAC;QAC1B,eAAU,GAAG,IAAI,CAAC;QAClB,qBAAgB,GAAG,IAAI,CAAC;QACxB,aAAQ,GAAG,IAAI,CAAC;QAChB,qCAAgC,GAAG,IAAI,UAAU,EAAW,CAAC;QAC7D,wBAAmB,GAAG,IAAI,UAAU,EAAQ,CAAC;IACxD,CAAC;CAAA;AAED;;GAEG;AACH,MAAM,OAAO,IAAI;IA0Sb;;;;OAIG;IACH,YAAY,IAAY,EAAE,QAAyB,IAAI;QA9S7C,aAAQ,GAAG,KAAK,CAAC;QAsCnB,qBAAgB,GAAG,IAAI,qBAAqB,EAAE,CAAC;QAoBvD;;WAEG;QAEI,UAAK,GAAG,EAAE,CAAC;QAElB;;WAEG;QAEI,aAAQ,GAAQ,IAAI,CAAC;QAE5B;;WAEG;QACI,sBAAiB,GAAQ,IAAI,CAAC;QAoB3B,sBAAiB,GAAgC,IAAI,CAAC;QAEzD,wCAAmC,GAAG,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AW,EAAE;gBAClC,MAAM,SAAS,GAAiB,UAAU,CAAC;gBAC3C,SAAS,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;gBAEnC,qDAAqD;gBACrD,IAAI,SAAS,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,EAAE;oBACpC,SAAS;iBACZ;gBAED,wDAAwD;gBACxD,IAAI,CAAC,SAAS,CAAC,eAAe,IAAI,SAAS,CAAC,gBAAgB,EAAE,KAAK,CAAC,EAAE;oBAClE,SAAS;iBACZ;gBAED,MAAM,iBAAiB,GAAG,SAAS,CAAC,eAAe,EAAE,CAAC;gBACtD,MAAM,WAAW,GAAG,iBAAiB,CAAC,WAAW,CAAC;gBAElD,MAAM,MAAM,GAAG,WAAW,CAAC,YAAY,CAAC;gBACxC,MAAM,MAAM,GAAG,WAAW,CAAC,YAAY,CAAC;gBAExC,OAAO,CAAC,YAAY,CAAC,MAAM,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;gBACvC,OAAO,CAAC,YAAY,CAAC,MAAM,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;aAC1C;SACJ;QAED,OAAO;YACH,GAAG,EAAE,GAAG;YACR,GAAG,EAAE,GAAG;SACX,CAAC;IACN,CAAC;;AA76BD;;GAEG;AACW,2BAAsB,GAAG,CAAC,KAAa,EAAE,KAAa,EAAE,GAAW,EAAkB,EAAE;IACjG,MAAM,WAAW,CAAC,gBAAgB,CAAC,CAAC;AACxC,CAAC,CAAC;AAEa,sBAAiB,GAA2B,EAAE,CAAC;AAmC9D;IADC,SAAS,EAAE;kCACQ;AAMpB;IADC,SAAS,EAAE;gCACM;AAMlB;IADC,SAAS,EAAE;sCACY;AAMxB;IADC,SAAS,EAAE;mCACM;AAMlB;IADC,SAAS,EAAE;sCACgB","sourcesContent":["/* eslint-disable @typescript-eslint/no-unused-vars */\r\nimport type { Scene } from \"./scene\";\r\nimport type { Nullable } from \"./types\";\r\nimport { Matrix, Vector3 } from \"./Maths/math.vector\";\r\nimport type { Engine } from \"./Engines/engine\";\r\nimport type { IBehaviorAware, Behavior } from \"./Behaviors/behavior\";\r\nimport { serialize } from \"./Misc/decorators\";\r\nimport type { Observer } from \"./Misc/observable\";\r\nimport { Observable } from \"./Misc/observable\";\r\nimport { EngineStore } from \"./Engines/engineStore\";\r\nimport { _WarnImport } from \"./Misc/devTools\";\r\nimport type { AbstractActionManager } from \"./Actions/abstractActionManager\";\r\nimport type { IInspectable } from \"./Misc/iInspectable\";\r\nimport type { AbstractScene } from \"./abstractScene\";\r\nimport type { IAccessibilityTag } from \"./IAccessibilityTag\";\r\n\r\ndeclare type Animatable = import(\"./Animations/animatable\").Animatable;\r\ndeclare type AnimationPropertiesOverride = import(\"./Animations/animationPropertiesOverride\").AnimationPropertiesOverride;\r\ndeclare type Animation = import(\"./Animations/animation\").Animation;\r\ndeclare type AnimationRange = import(\"./Animations/animationRange\").AnimationRange;\r\ndeclare type AbstractMesh = import(\"./Meshes/abstractMesh\").AbstractMesh;\r\n\r\n/**\r\n * Defines how a node can be built from a string name.\r\n */\r\nexport type NodeConstructor = (name: string, scene: Scene, options?: any) => () => Node;\r\n\r\n/** @internal */\r\nclass _InternalNodeDataInfo {\r\n public _doNotSerialize = false;\r\n public _isDisposed = false;\r\n public _sceneRootNodesIndex = -1;\r\n public _isEnabled = true;\r\n public _isParentEnabled = true;\r\n public _isReady = true;\r\n public _onEnabledStateChangedObservable = new Observable<boolean>();\r\n public _onClonedObservable = new Observable<Node>();\r\n}\r\n\r\n/**\r\n * Node is the basic class for all scene objects (Mesh, Light, Camera.)\r\n */\r\nexport class Node implements IBehaviorAware<Node> {\r\n protected _isDirty = false;\r\n\r\n /**\r\n * @internal\r\n */\r\n public static _AnimationRangeFactory = (_name: string, _from: number, _to: number): AnimationRange => {\r\n throw _WarnImport(\"AnimationRange\");\r\n };\r\n\r\n private static _NodeConstructors: { [key: string]: any } = {};\r\n\r\n /**\r\n * Add a new node constructor\r\n * @param type defines the type name of the node to construct\r\n * @param constructorFunc defines the constructor function\r\n */\r\n public static AddNodeConstructor(type: string, constructorFunc: NodeConstructor) {\r\n this._NodeConstructors[type] = constructorFunc;\r\n }\r\n\r\n /**\r\n * Returns a node constructor based on type name\r\n * @param type defines the type name\r\n * @param name defines the new node name\r\n * @param scene defines the hosting scene\r\n * @param options defines optional options to transmit to constructors\r\n * @returns the new constructor or null\r\n */\r\n public static Construct(type: string, name: string, scene: Scene, options?: any): Nullable<() => Node> {\r\n const constructorFunc = this._NodeConstructors[type];\r\n\r\n if (!constructorFunc) {\r\n return null;\r\n }\r\n\r\n return constructorFunc(name, scene, options);\r\n }\r\n\r\n private _nodeDataStorage = new _InternalNodeDataInfo();\r\n\r\n /**\r\n * Gets or sets the name of the node\r\n */\r\n @serialize()\r\n public name: string;\r\n\r\n /**\r\n * Gets or sets the id of the node\r\n */\r\n @serialize()\r\n public id: string;\r\n\r\n /**\r\n * Gets or sets the unique id of the node\r\n */\r\n @serialize()\r\n public uniqueId: number;\r\n\r\n /**\r\n * Gets or sets a string used to store user defined state for the node\r\n */\r\n @serialize()\r\n public state = \"\";\r\n\r\n /**\r\n * Gets or sets an object used to store user defined information for the node\r\n */\r\n @serialize()\r\n public metadata: any = null;\r\n\r\n /**\r\n * For internal use only. Please do not use.\r\n */\r\n public reservedDataStore: any = null;\r\n\r\n /**\r\n * List of inspectable custom properties (used by the Inspector)\r\n * @see https://doc.babylonjs.com/toolsAndResources/inspector#extensibility\r\n */\r\n public inspectableCustomProperties: IInspectable[];\r\n\r\n /**\r\n * Gets or sets the accessibility tag to describe the node for accessibility purpose.\r\n */\r\n public set accessibilityTag(value: Nullable<IAccessibilityTag>) {\r\n this._accessibilityTag = value;\r\n this.onAccessibilityTagChangedObservable.notifyObservers(value);\r\n }\r\n\r\n public get accessibilityTag() {\r\n return this._accessibilityTag;\r\n }\r\n\r\n protected _accessibilityTag: Nullable<IAccessibilityTag> = null;\r\n\r\n public onAccessibilityTagChangedObservable = new Observable<Nullable<IAccessibilityTag>>();\r\n\r\n /**\r\n * Gets or sets a boolean used to define if the node must be serialized\r\n */\r\n public get doNotSerialize() {\r\n if (this._nodeDataStorage._doNotSerialize) {\r\n return true;\r\n }\r\n\r\n if (this._parentNode) {\r\n return this._parentNode.doNotSerialize;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n public set doNotSerialize(value: boolean) {\r\n this._nodeDataStorage._doNotSerialize = value;\r\n }\r\n\r\n /** @internal */\r\n public _parentContainer: Nullable<AbstractScene> = null;\r\n\r\n /**\r\n * Gets a list of Animations associated with the node\r\n */\r\n public animations = new Array<Animation>();\r\n protected _ranges: { [name: string]: Nullable<AnimationRange> } = {};\r\n\r\n /**\r\n * Callback raised when the node is ready to be used\r\n */\r\n public onReady: Nullable<(node: Node) => void> = null;\r\n\r\n /** @internal */\r\n public _currentRenderId = -1;\r\n private _parentUpdateId = -1;\r\n /** @internal */\r\n public _childUpdateId = -1;\r\n\r\n /** @internal */\r\n public _waitingParentId: Nullable<string> = null;\r\n /** @internal */\r\n public _waitingParentInstanceIndex: Nullable<string> = null;\r\n /** @internal */\r\n public _waitingParsedUniqueId: Nullable<number> = null;\r\n /** @internal */\r\n public _scene: Scene;\r\n /** @internal */\r\n public _cache: any = {};\r\n\r\n protected _parentNode: Nullable<Node> = null;\r\n\r\n /** @internal */\r\n protected _children: Nullable<Node[]> = null;\r\n\r\n /** @internal */\r\n public _worldMatrix = Matrix.Identity();\r\n /** @internal */\r\n public _worldMatrixDeterminant = 0;\r\n /** @internal */\r\n public _worldMatrixDeterminantIsDirty = true;\r\n\r\n /**\r\n * Gets a boolean indicating if the node has been disposed\r\n * @returns true if the node was disposed\r\n */\r\n public isDisposed(): boolean {\r\n return this._nodeDataStorage._isDisposed;\r\n }\r\n\r\n /**\r\n * Gets or sets the parent of the node (without keeping the current position in the scene)\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/transforms/parent_pivot/parent\r\n */\r\n public set parent(parent: Nullable<Node>) {\r\n if (this._parentNode === parent) {\r\n return;\r\n }\r\n\r\n const previousParentNode = this._parentNode;\r\n\r\n // Remove self from list of children of parent\r\n if (this._parentNode && this._parentNode._children !== undefined && this._parentNode._children !== null) {\r\n const index = this._parentNode._children.indexOf(this);\r\n if (index !== -1) {\r\n this._parentNode._children.splice(index, 1);\r\n }\r\n\r\n if (!parent && !this._nodeDataStorage._isDisposed) {\r\n this._addToSceneRootNodes();\r\n }\r\n }\r\n\r\n // Store new parent\r\n this._parentNode = parent;\r\n\r\n // Add as child to new parent\r\n if (this._parentNode) {\r\n if (this._parentNode._children === undefined || this._parentNode._children === null) {\r\n this._parentNode._children = new Array<Node>();\r\n }\r\n this._parentNode._children.push(this);\r\n\r\n if (!previousParentNode) {\r\n this._removeFromSceneRootNodes();\r\n }\r\n }\r\n\r\n // Enabled state\r\n this._syncParentEnabledState();\r\n }\r\n\r\n public get parent(): Nullable<Node> {\r\n return this._parentNode;\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public _serializeAsParent(serializationObject: any): void {\r\n serializationObject.parentId = this.uniqueId;\r\n }\r\n\r\n /** @internal */\r\n public _addToSceneRootNodes() {\r\n if (this._nodeDataStorage._sceneRootNodesIndex === -1) {\r\n this._nodeDataStorage._sceneRootNodesIndex = this._scene.rootNodes.length;\r\n this._scene.rootNodes.push(this);\r\n }\r\n }\r\n\r\n /** @internal */\r\n public _removeFromSceneRootNodes() {\r\n if (this._nodeDataStorage._sceneRootNodesIndex !== -1) {\r\n const rootNodes = this._scene.rootNodes;\r\n const lastIdx = rootNodes.length - 1;\r\n rootNodes[this._nodeDataStorage._sceneRootNodesIndex] = rootNodes[lastIdx];\r\n rootNodes[this._nodeDataStorage._sceneRootNodesIndex]._nodeDataStorage._sceneRootNodesIndex = this._nodeDataStorage._sceneRootNodesIndex;\r\n this._scene.rootNodes.pop();\r\n this._nodeDataStorage._sceneRootNodesIndex = -1;\r\n }\r\n }\r\n\r\n private _animationPropertiesOverride: Nullable<AnimationPropertiesOverride> = null;\r\n\r\n /**\r\n * Gets or sets the animation properties override\r\n */\r\n public get animationPropertiesOverride(): Nullable<AnimationPropertiesOverride> {\r\n if (!this._animationPropertiesOverride) {\r\n return this._scene.animationPropertiesOverride;\r\n }\r\n return this._animationPropertiesOverride;\r\n }\r\n\r\n public set animationPropertiesOverride(value: Nullable<AnimationPropertiesOverride>) {\r\n this._animationPropertiesOverride = value;\r\n }\r\n\r\n /**\r\n * Gets a string identifying the name of the class\r\n * @returns \"Node\" string\r\n */\r\n public getClassName(): string {\r\n return \"Node\";\r\n }\r\n\r\n /** @internal */\r\n public readonly _isNode = true;\r\n\r\n /**\r\n * An event triggered when the mesh is disposed\r\n */\r\n public onDisposeObservable = new Observable<Node>();\r\n\r\n private _onDisposeObserver: Nullable<Observer<Node>> = null;\r\n /**\r\n * Sets a callback that will be raised when the node will be disposed\r\n */\r\n public set onDispose(callback: () => void) {\r\n if (this._onDisposeObserver) {\r\n this.onDisposeObservable.remove(this._onDisposeObserver);\r\n }\r\n this._onDisposeObserver = this.onDisposeObservable.add(callback);\r\n }\r\n\r\n /**\r\n * An event triggered when the enabled state of the node changes\r\n */\r\n public get onEnabledStateChangedObservable(): Observable<boolean> {\r\n return this._nodeDataStorage._onEnabledStateChangedObservable;\r\n }\r\n\r\n /**\r\n * An event triggered when the node is cloned\r\n */\r\n public get onClonedObservable(): Observable<Node> {\r\n return this._nodeDataStorage._onClonedObservable;\r\n }\r\n\r\n /**\r\n * Creates a new Node\r\n * @param name the name and id to be given to this node\r\n * @param scene the scene this node will be added to\r\n */\r\n constructor(name: string, scene: Nullable<Scene> = null) {\r\n this.name = name;\r\n this.id = name;\r\n this._scene = <Scene>(scene || EngineStore.LastCreatedScene);\r\n this.uniqueId = this._scene.getUniqueId();\r\n this._initCache();\r\n }\r\n\r\n /**\r\n * Gets the scene of the node\r\n * @returns a scene\r\n */\r\n public getScene(): Scene {\r\n return this._scene;\r\n }\r\n\r\n /**\r\n * Gets the engine of the node\r\n * @returns a Engine\r\n */\r\n public getEngine(): Engine {\r\n return this._scene.getEngine();\r\n }\r\n\r\n // Behaviors\r\n private _behaviors = new Array<Behavior<Node>>();\r\n\r\n /**\r\n * Attach a behavior to the node\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/behaviors\r\n * @param behavior defines the behavior to attach\r\n * @param attachImmediately defines that the behavior must be attached even if the scene is still loading\r\n * @returns the current Node\r\n */\r\n public addBehavior(behavior: Behavior<Node>, attachImmediately = false): Node {\r\n const index = this._behaviors.indexOf(behavior);\r\n\r\n if (index !== -1) {\r\n return this;\r\n }\r\n\r\n behavior.init();\r\n if (this._scene.isLoading && !attachImmediately) {\r\n // We defer the attach when the scene will be loaded\r\n this._scene.onDataLoadedObservable.addOnce(() => {\r\n behavior.attach(this);\r\n });\r\n } else {\r\n behavior.attach(this);\r\n }\r\n this._behaviors.push(behavior);\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Remove an attached behavior\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/behaviors\r\n * @param behavior defines the behavior to attach\r\n * @returns the current Node\r\n */\r\n public removeBehavior(behavior: Behavior<Node>): Node {\r\n const index = this._behaviors.indexOf(behavior);\r\n\r\n if (index === -1) {\r\n return this;\r\n }\r\n\r\n this._behaviors[index].detach();\r\n this._behaviors.splice(index, 1);\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Gets the list of attached behaviors\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/behaviors\r\n */\r\n public get behaviors(): Behavior<Node>[] {\r\n return this._behaviors;\r\n }\r\n\r\n /**\r\n * Gets an attached behavior by name\r\n * @param name defines the name of the behavior to look for\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/behaviors\r\n * @returns null if behavior was not found else the requested behavior\r\n */\r\n public getBehaviorByName(name: string): Nullable<Behavior<Node>> {\r\n for (const behavior of this._behaviors) {\r\n if (behavior.name === name) {\r\n return behavior;\r\n }\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * Returns the latest update of the World matrix\r\n * @returns a Matrix\r\n */\r\n public getWorldMatrix(): Matrix {\r\n if (this._currentRenderId !== this._scene.getRenderId()) {\r\n this.computeWorldMatrix();\r\n }\r\n return this._worldMatrix;\r\n }\r\n\r\n /** @internal */\r\n public _getWorldMatrixDeterminant(): number {\r\n if (this._worldMatrixDeterminantIsDirty) {\r\n this._worldMatrixDeterminantIsDirty = false;\r\n this._worldMatrixDeterminant = this._worldMatrix.determinant();\r\n }\r\n return this._worldMatrixDeterminant;\r\n }\r\n\r\n /**\r\n * Returns directly the latest state of the mesh World matrix.\r\n * A Matrix is returned.\r\n */\r\n public get worldMatrixFromCache(): Matrix {\r\n return this._worldMatrix;\r\n }\r\n\r\n // override it in derived class if you add new variables to the cache\r\n // and call the parent class method\r\n /** @internal */\r\n public _initCache() {\r\n this._cache = {};\r\n this._cache.parent = undefined;\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public updateCache(force?: boolean): void {\r\n if (!force && this.isSynchronized()) {\r\n return;\r\n }\r\n\r\n this._cache.parent = this.parent;\r\n\r\n this._updateCache();\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public _getActionManagerForTrigger(trigger?: number, _initialCall = true): Nullable<AbstractActionManager> {\r\n if (!this.parent) {\r\n return null;\r\n }\r\n\r\n return this.parent._getActionManagerForTrigger(trigger, false);\r\n }\r\n\r\n // override it in derived class if you add new variables to the cache\r\n // and call the parent class method if !ignoreParentClass\r\n /**\r\n * @internal\r\n */\r\n public _updateCache(_ignoreParentClass?: boolean): void {}\r\n\r\n // override it in derived class if you add new variables to the cache\r\n /** @internal */\r\n public _isSynchronized(): boolean {\r\n return true;\r\n }\r\n\r\n /** @internal */\r\n public _markSyncedWithParent() {\r\n if (this._parentNode) {\r\n this._parentUpdateId = this._parentNode._childUpdateId;\r\n }\r\n }\r\n\r\n /** @internal */\r\n public isSynchronizedWithParent(): boolean {\r\n if (!this._parentNode) {\r\n return true;\r\n }\r\n\r\n if (this._parentNode._isDirty || this._parentUpdateId !== this._parentNode._childUpdateId) {\r\n return false;\r\n }\r\n\r\n return this._parentNode.isSynchronized();\r\n }\r\n\r\n /** @internal */\r\n public isSynchronized(): boolean {\r\n if (this._cache.parent !== this._parentNode) {\r\n this._cache.parent = this._parentNode;\r\n return false;\r\n }\r\n\r\n if (this._parentNode && !this.isSynchronizedWithParent()) {\r\n return false;\r\n }\r\n\r\n return this._isSynchronized();\r\n }\r\n\r\n /**\r\n * Is this node ready to be used/rendered\r\n * @param _completeCheck defines if a complete check (including materials and lights) has to be done (false by default)\r\n * @returns true if the node is ready\r\n */\r\n public isReady(_completeCheck = false): boolean {\r\n return this._nodeDataStorage._isReady;\r\n }\r\n\r\n /**\r\n * Flag the node as dirty (Forcing it to update everything)\r\n * @param _property helps children apply precise \"dirtyfication\"\r\n * @returns this node\r\n */\r\n public markAsDirty(_property?: string): Node {\r\n this._currentRenderId = Number.MAX_VALUE;\r\n this._isDirty = true;\r\n return this;\r\n }\r\n\r\n /**\r\n * Is this node enabled?\r\n * If the node has a parent, all ancestors will be checked and false will be returned if any are false (not enabled), otherwise will return true\r\n * @param checkAncestors indicates if this method should check the ancestors. The default is to check the ancestors. If set to false, the method will return the value of this node without checking ancestors\r\n * @returns whether this node (and its parent) is enabled\r\n */\r\n public isEnabled(checkAncestors: boolean = true): boolean {\r\n if (checkAncestors === false) {\r\n return this._nodeDataStorage._isEnabled;\r\n }\r\n\r\n if (!this._nodeDataStorage._isEnabled) {\r\n return false;\r\n }\r\n\r\n return this._nodeDataStorage._isParentEnabled;\r\n }\r\n\r\n /** @internal */\r\n protected _syncParentEnabledState() {\r\n this._nodeDataStorage._isParentEnabled = this._parentNode ? this._parentNode.isEnabled() : true;\r\n\r\n if (this._children) {\r\n this._children.forEach((c) => {\r\n c._syncParentEnabledState(); // Force children to update accordingly\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * Set the enabled state of this node\r\n * @param value defines the new enabled state\r\n */\r\n public setEnabled(value: boolean): void {\r\n if (this._nodeDataStorage._isEnabled === value) {\r\n return;\r\n }\r\n this._nodeDataStorage._isEnabled = value;\r\n this._syncParentEnabledState();\r\n this._nodeDataStorage._onEnabledStateChangedObservable.notifyObservers(value);\r\n }\r\n\r\n /**\r\n * Is this node a descendant of the given node?\r\n * The function will iterate up the hierarchy until the ancestor was found or no more parents defined\r\n * @param ancestor defines the parent node to inspect\r\n * @returns a boolean indicating if this node is a descendant of the given node\r\n */\r\n public isDescendantOf(ancestor: Node): boolean {\r\n if (this.parent) {\r\n if (this.parent === ancestor) {\r\n return true;\r\n }\r\n\r\n return this.parent.isDescendantOf(ancestor);\r\n }\r\n return false;\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public _getDescendants(results: Node[], directDescendantsOnly: boolean = false, predicate?: (node: Node) => boolean): void {\r\n if (!this._children) {\r\n return;\r\n }\r\n\r\n for (let index = 0; index < this._children.length; index++) {\r\n const item = this._children[index];\r\n\r\n if (!predicate || predicate(item)) {\r\n results.push(item);\r\n }\r\n\r\n if (!directDescendantsOnly) {\r\n item._getDescendants(results, false, predicate);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Will return all nodes that have this node as ascendant\r\n * @param directDescendantsOnly defines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered\r\n * @param predicate defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored\r\n * @returns all children nodes of all types\r\n */\r\n public getDescendants<T extends Node>(directDescendantsOnly?: boolean, predicate?: (node: Node) => node is T): T[];\r\n\r\n /**\r\n * Will return all nodes that have this node as ascendant\r\n * @param directDescendantsOnly defines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered\r\n * @param predicate defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored\r\n * @returns all children nodes of all types\r\n */\r\n public getDescendants(directDescendantsOnly?: boolean, predicate?: (node: Node) => boolean): Node[];\r\n\r\n /**\r\n * Will return all nodes that have this node as ascendant\r\n * @param directDescendantsOnly defines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered\r\n * @param predicate defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored\r\n * @returns all children nodes of all types\r\n */\r\n public getDescendants(directDescendantsOnly?: boolean, predicate?: (node: Node) => boolean): Node[] {\r\n const results = new Array<Node>();\r\n\r\n this._getDescendants(results, directDescendantsOnly, predicate);\r\n\r\n return results;\r\n }\r\n\r\n /**\r\n * Get all child-meshes of this node\r\n * @param directDescendantsOnly defines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered (Default: false)\r\n * @param predicate defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored\r\n * @returns an array of AbstractMesh\r\n */\r\n public getChildMeshes<T extends AbstractMesh>(directDescendantsOnly?: boolean, predicate?: (node: Node) => node is T): T[];\r\n\r\n /**\r\n * Get all child-meshes of this node\r\n * @param directDescendantsOnly defines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered (Default: false)\r\n * @param predicate defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored\r\n * @returns an array of AbstractMesh\r\n */\r\n public getChildMeshes(directDescendantsOnly?: boolean, predicate?: (node: Node) => boolean): AbstractMesh[];\r\n\r\n /**\r\n * Get all child-meshes of this node\r\n * @param directDescendantsOnly defines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered (Default: false)\r\n * @param predicate defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored\r\n * @returns an array of AbstractMesh\r\n */\r\n public getChildMeshes(directDescendantsOnly?: boolean, predicate?: (node: Node) => boolean): AbstractMesh[] {\r\n const results: Array<AbstractMesh> = [];\r\n this._getDescendants(results, directDescendantsOnly, (node: Node) => {\r\n return (!predicate || predicate(node)) && (<AbstractMesh>node).cullingStrategy !== undefined;\r\n });\r\n return results;\r\n }\r\n\r\n /**\r\n * Get all direct children of this node\r\n * @param predicate defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored\r\n * @param directDescendantsOnly defines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered (Default: true)\r\n * @returns an array of Node\r\n */\r\n public getChildren<T extends Node>(predicate?: (node: Node) => node is T, directDescendantsOnly?: boolean): T[];\r\n\r\n /**\r\n * Get all direct children of this node\r\n * @param predicate defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored\r\n * @param directDescendantsOnly defines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered (Default: true)\r\n * @returns an array of Node\r\n */\r\n public getChildren(predicate?: (node: Node) => boolean, directDescendantsOnly?: boolean): Node[];\r\n\r\n /**\r\n * Get all direct children of this node\r\n * @param predicate defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored\r\n * @param directDescendantsOnly defines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered (Default: true)\r\n * @returns an array of Node\r\n */\r\n public getChildren(predicate?: (node: Node) => boolean, directDescendantsOnly = true): Node[] {\r\n return this.getDescendants(directDescendantsOnly, predicate);\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public _setReady(state: boolean): void {\r\n if (state === this._nodeDataStorage._isReady) {\r\n return;\r\n }\r\n\r\n if (!state) {\r\n this._nodeDataStorage._isReady = false;\r\n return;\r\n }\r\n\r\n if (this.onReady) {\r\n this.onReady(this);\r\n }\r\n this._nodeDataStorage._isReady = true;\r\n }\r\n\r\n /**\r\n * Get an animation by name\r\n * @param name defines the name of the animation to look for\r\n * @returns null if not found else the requested animation\r\n */\r\n public getAnimationByName(name: string): Nullable<Animation> {\r\n for (let i = 0; i < this.animations.length; i++) {\r\n const animation = this.animations[i];\r\n\r\n if (animation.name === name) {\r\n return animation;\r\n }\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * Creates an animation range for this node\r\n * @param name defines the name of the range\r\n * @param from defines the starting key\r\n * @param to defines the end key\r\n */\r\n public createAnimationRange(name: string, from: number, to: number): void {\r\n // check name not already in use\r\n if (!this._ranges[name]) {\r\n this._ranges[name] = Node._AnimationRangeFactory(name, from, to);\r\n for (let i = 0, nAnimations = this.animations.length; i < nAnimations; i++) {\r\n if (this.animations[i]) {\r\n this.animations[i].createRange(name, from, to);\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Delete a specific animation range\r\n * @param name defines the name of the range to delete\r\n * @param deleteFrames defines if animation frames from the range must be deleted as well\r\n */\r\n public deleteAnimationRange(name: string, deleteFrames = true): void {\r\n for (let i = 0, nAnimations = this.animations.length; i < nAnimations; i++) {\r\n if (this.animations[i]) {\r\n this.animations[i].deleteRange(name, deleteFrames);\r\n }\r\n }\r\n this._ranges[name] = null; // said much faster than 'delete this._range[name]'\r\n }\r\n\r\n /**\r\n * Get an animation range by name\r\n * @param name defines the name of the animation range to look for\r\n * @returns null if not found else the requested animation range\r\n */\r\n public getAnimationRange(name: string): Nullable<AnimationRange> {\r\n return this._ranges[name] || null;\r\n }\r\n\r\n /**\r\n * Gets the list of all animation ranges defined on this node\r\n * @returns an array\r\n */\r\n public getAnimationRanges(): Nullable<AnimationRange>[] {\r\n const animationRanges: Nullable<AnimationRange>[] = [];\r\n let name: string;\r\n for (name in this._ranges) {\r\n animationRanges.push(this._ranges[name]);\r\n }\r\n return animationRanges;\r\n }\r\n\r\n /**\r\n * Will start the animation sequence\r\n * @param name defines the range frames for animation sequence\r\n * @param loop defines if the animation should loop (false by default)\r\n * @param speedRatio defines the speed factor in which to run the animation (1 by default)\r\n * @param onAnimationEnd defines a function to be executed when the animation ended (undefined by default)\r\n * @returns the object created for this animation. If range does not exist, it will return null\r\n */\r\n public beginAnimation(name: string, loop?: boolean, speedRatio?: number, onAnimationEnd?: () => void): Nullable<Animatable> {\r\n const range = this.getAnimationRange(name);\r\n\r\n if (!range) {\r\n return null;\r\n }\r\n\r\n return this._scene.beginAnimation(this, range.from, range.to, loop, speedRatio, onAnimationEnd);\r\n }\r\n\r\n /**\r\n * Serialize animation ranges into a JSON compatible object\r\n * @returns serialization object\r\n */\r\n public serializeAnimationRanges(): any {\r\n const serializationRanges = [];\r\n for (const name in this._ranges) {\r\n const localRange = this._ranges[name];\r\n if (!localRange) {\r\n continue;\r\n }\r\n const range: any = {};\r\n range.name = name;\r\n range.from = localRange.from;\r\n range.to = localRange.to;\r\n serializationRanges.push(range);\r\n }\r\n return serializationRanges;\r\n }\r\n\r\n /**\r\n * Computes the world matrix of the node\r\n * @param _force defines if the cache version should be invalidated forcing the world matrix to be created from scratch\r\n * @returns the world matrix\r\n */\r\n public computeWorldMatrix(_force?: boolean): Matrix {\r\n if (!this._worldMatrix) {\r\n this._worldMatrix = Matrix.Identity();\r\n }\r\n return this._worldMatrix;\r\n }\r\n\r\n /**\r\n * Releases resources associated with this node.\r\n * @param doNotRecurse Set to true to not recurse into each children (recurse into each children by default)\r\n * @param disposeMaterialAndTextures Set to true to also dispose referenced materials and textures (false by default)\r\n */\r\n public dispose(doNotRecurse?: boolean, disposeMaterialAndTextures = false): void {\r\n this._nodeDataStorage._isDisposed = true;\r\n\r\n if (!doNotRecurse) {\r\n const nodes = this.getDescendants(true);\r\n for (const node of nodes) {\r\n node.dispose(doNotRecurse, disposeMaterialAndTextures);\r\n }\r\n }\r\n\r\n if (!this.parent) {\r\n this._removeFromSceneRootNodes();\r\n } else {\r\n this.parent = null;\r\n }\r\n\r\n // Callback\r\n this.onDisposeObservable.notifyObservers(this);\r\n this.onDisposeObservable.clear();\r\n\r\n this.onEnabledStateChangedObservable.clear();\r\n this.onClonedObservable.clear();\r\n\r\n // Behaviors\r\n for (const behavior of this._behaviors) {\r\n behavior.detach();\r\n }\r\n\r\n this._behaviors.length = 0;\r\n\r\n this.metadata = null;\r\n }\r\n\r\n /**\r\n * Parse animation range data from a serialization object and store them into a given node\r\n * @param node defines where to store the animation ranges\r\n * @param parsedNode defines the serialization object to read data from\r\n * @param _scene defines the hosting scene\r\n */\r\n public static ParseAnimationRanges(node: Node, parsedNode: any, _scene: Scene): void {\r\n if (parsedNode.ranges) {\r\n for (let index = 0; index < parsedNode.ranges.length; index++) {\r\n const data = parsedNode.ranges[index];\r\n node.createAnimationRange(data.name, data.from, data.to);\r\n }\r\n }\r\n }\r\n /**\r\n * Return the minimum and maximum world vectors of the entire hierarchy under current node\r\n * @param includeDescendants Include bounding info from descendants as well (true by default)\r\n * @param predicate defines a callback function that can be customize to filter what meshes should be included in the list used to compute the bounding vectors\r\n * @returns the new bounding vectors\r\n */\r\n public getHierarchyBoundingVectors(includeDescendants = true, predicate: Nullable<(abstractMesh: AbstractMesh) => boolean> = null): { min: Vector3; max: Vector3 } {\r\n // Ensures that all world matrix will be recomputed.\r\n this.getScene().incrementRenderId();\r\n\r\n this.computeWorldMatrix(true);\r\n\r\n let min: Vector3;\r\n let max: Vector3;\r\n\r\n const thisAbstractMesh = this as Node as AbstractMesh;\r\n if (thisAbstractMesh.getBoundingInfo && thisAbstractMesh.subMeshes) {\r\n // If this is an abstract mesh get its bounding info\r\n const boundingInfo = thisAbstractMesh.getBoundingInfo();\r\n min = boundingInfo.boundingBox.minimumWorld.clone();\r\n max = boundingInfo.boundingBox.maximumWorld.clone();\r\n } else {\r\n min = new Vector3(Number.MAX_VALUE, Number.MAX_VALUE, Number.MAX_VALUE);\r\n max = new Vector3(-Number.MAX_VALUE, -Number.MAX_VALUE, -Number.MAX_VALUE);\r\n }\r\n\r\n if (includeDescendants) {\r\n const descendants = this.getDescendants(false);\r\n\r\n for (const descendant of descendants) {\r\n const childMesh = <AbstractMesh>descendant;\r\n childMesh.computeWorldMatrix(true);\r\n\r\n // Filters meshes based on custom predicate function.\r\n if (predicate && !predicate(childMesh)) {\r\n continue;\r\n }\r\n\r\n //make sure we have the needed params to get mix and max\r\n if (!childMesh.getBoundingInfo || childMesh.getTotalVertices() === 0) {\r\n continue;\r\n }\r\n\r\n const childBoundingInfo = childMesh.getBoundingInfo();\r\n const boundingBox = childBoundingInfo.boundingBox;\r\n\r\n const minBox = boundingBox.minimumWorld;\r\n const maxBox = boundingBox.maximumWorld;\r\n\r\n Vector3.CheckExtends(minBox, min, max);\r\n Vector3.CheckExtends(maxBox, min, max);\r\n }\r\n }\r\n\r\n return {\r\n min: min,\r\n max: max,\r\n };\r\n }\r\n}\r\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@babylonjs/core",
3
- "version": "5.32.0",
3
+ "version": "5.32.2",
4
4
  "main": "index.js",
5
5
  "module": "index.js",
6
6
  "types": "index.d.ts",