@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
@@ -9,7 +9,7 @@ import { Plane } from "../../Maths/math.plane.js";
9
9
  * It will dynamically be rendered every frame to adapt to the camera point of view.
10
10
  * You can then easily use it as a reflectionTexture on a flat surface.
11
11
  * In case the surface is not a plane, please consider relying on reflection probes.
12
- * @see https://doc.babylonjs.com/how_to/reflect#mirrors
12
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/reflectionTexture#mirrortexture
13
13
  */
14
14
  export class MirrorTexture extends RenderTargetTexture {
15
15
  /**
@@ -18,7 +18,7 @@ export class MirrorTexture extends RenderTargetTexture {
18
18
  * It will dynamically be rendered every frame to adapt to the camera point of view.
19
19
  * You can then easily use it as a reflectionTexture on a flat surface.
20
20
  * In case the surface is not a plane, please consider relying on reflection probes.
21
- * @see https://doc.babylonjs.com/how_to/reflect#mirrors
21
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/reflectionTexture#mirrors
22
22
  * @param name
23
23
  * @param size
24
24
  * @param scene
@@ -32,7 +32,7 @@ export class MirrorTexture extends RenderTargetTexture {
32
32
  /**
33
33
  * Define the reflection plane we want to use. The mirrorPlane is usually set to the constructed reflector.
34
34
  * It is possible to directly set the mirrorPlane by directly using a Plane(a, b, c, d) where a, b and c give the plane normal vector (a, b, c) and d is a scalar displacement from the mirrorPlane to the origin. However in all but the very simplest of situations it is more straight forward to set it to the reflector as stated in the doc.
35
- * @see https://doc.babylonjs.com/how_to/reflect#mirrors
35
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/reflectionTexture#mirrors
36
36
  */
37
37
  this.mirrorPlane = new Plane(0, 1, 0, 1);
38
38
  this._transformMatrix = Matrix.Zero();
@@ -1 +1 @@
1
- {"version":3,"file":"mirrorTexture.js","sourceRoot":"","sources":["../../../../../../lts/core/generated/Materials/Textures/mirrorTexture.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,8CAA8C,CAAC;AAEnF,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AACtE,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAE/C;;;;;;GAMG;AACH,MAAM,OAAO,aAAc,SAAQ,mBAAmB;IA0HlD;;;;;;;;;;;;;;OAcG;IACH,YACI,IAAY,EACZ,IAAoE,EACpE,KAAa,EACb,eAAyB,EACzB,OAAe,SAAS,CAAC,wBAAwB,EACjD,YAAY,GAAG,OAAO,CAAC,qBAAqB,EAC5C,mBAAmB,GAAG,IAAI;QAE1B,KAAK,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,eAAe,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,YAAY,EAAE,mBAAmB,CAAC,CAAC;QAjJpG;;;;WAIG;QACI,gBAAW,GAAG,IAAI,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;QAwGnC,qBAAgB,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC;QACjC,kBAAa,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC;QAI9B,wBAAmB,GAAG,CAAC,CAAC;QACxB,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,MAAM,CAAC,IAAI,CAAC,oCAAoC,CAAC,CAAC;SAC3G;QACD,MAAA,IAAI,CAAC,SAAS,0CAAE,OAAO,EAAE,CAAC;IAC9B,CAAC;CACJ;AAED,OAAO,CAAC,aAAa,GAAG,CAAC,IAAY,EAAE,gBAAwB,EAAE,KAAY,EAAE,eAAwB,EAAiB,EAAE;IACtH,OAAO,IAAI,aAAa,CAAC,IAAI,EAAE,gBAAgB,EAAE,KAAK,EAAE,eAAe,CAAC,CAAC;AAC7E,CAAC,CAAC","sourcesContent":["import type { Observer } from \"../../Misc/observable\";\r\nimport type { Nullable } from \"../../types\";\r\nimport type { Camera } from \"../../Cameras/camera\";\r\nimport type { Scene } from \"../../scene\";\r\nimport { Matrix, Vector3, Vector2 } from \"../../Maths/math.vector\";\r\nimport { Texture } from \"../../Materials/Textures/texture\";\r\nimport { RenderTargetTexture } from \"../../Materials/Textures/renderTargetTexture\";\r\nimport type { ImageProcessingConfiguration } from \"../../Materials/imageProcessingConfiguration\";\r\nimport { BlurPostProcess } from \"../../PostProcesses/blurPostProcess\";\r\nimport { Constants } from \"../../Engines/constants\";\r\nimport { Plane } from \"../../Maths/math.plane\";\r\nimport type { UniformBuffer } from \"../uniformBuffer\";\r\n/**\r\n * Mirror texture can be used to simulate the view from a mirror in a scene.\r\n * It will dynamically be rendered every frame to adapt to the camera point of view.\r\n * You can then easily use it as a reflectionTexture on a flat surface.\r\n * In case the surface is not a plane, please consider relying on reflection probes.\r\n * @see https://doc.babylonjs.com/how_to/reflect#mirrors\r\n */\r\nexport class MirrorTexture extends RenderTargetTexture {\r\n /**\r\n * Define the reflection plane we want to use. The mirrorPlane is usually set to the constructed reflector.\r\n * It is possible to directly set the mirrorPlane by directly using a Plane(a, b, c, d) where a, b and c give the plane normal vector (a, b, c) and d is a scalar displacement from the mirrorPlane to the origin. However in all but the very simplest of situations it is more straight forward to set it to the reflector as stated in the doc.\r\n * @see https://doc.babylonjs.com/how_to/reflect#mirrors\r\n */\r\n public mirrorPlane = new Plane(0, 1, 0, 1);\r\n\r\n /**\r\n * Define the blur ratio used to blur the reflection if needed.\r\n */\r\n public set blurRatio(value: number) {\r\n if (this._blurRatio === value) {\r\n return;\r\n }\r\n\r\n this._blurRatio = value;\r\n this._preparePostProcesses();\r\n }\r\n\r\n public get blurRatio(): number {\r\n return this._blurRatio;\r\n }\r\n\r\n /**\r\n * Define the adaptive blur kernel used to blur the reflection if needed.\r\n * This will autocompute the closest best match for the `blurKernel`\r\n */\r\n public set adaptiveBlurKernel(value: number) {\r\n this._adaptiveBlurKernel = value;\r\n this._autoComputeBlurKernel();\r\n }\r\n\r\n /**\r\n * Define the blur kernel used to blur the reflection if needed.\r\n * Please consider using `adaptiveBlurKernel` as it could find the closest best value for you.\r\n */\r\n public set blurKernel(value: number) {\r\n this.blurKernelX = value;\r\n this.blurKernelY = value;\r\n }\r\n\r\n /**\r\n * Define the blur kernel on the X Axis used to blur the reflection if needed.\r\n * Please consider using `adaptiveBlurKernel` as it could find the closest best value for you.\r\n */\r\n public set blurKernelX(value: number) {\r\n if (this._blurKernelX === value) {\r\n return;\r\n }\r\n\r\n this._blurKernelX = value;\r\n this._preparePostProcesses();\r\n }\r\n\r\n public get blurKernelX(): number {\r\n return this._blurKernelX;\r\n }\r\n\r\n /**\r\n * Define the blur kernel on the Y Axis used to blur the reflection if needed.\r\n * Please consider using `adaptiveBlurKernel` as it could find the closest best value for you.\r\n */\r\n public set blurKernelY(value: number) {\r\n if (this._blurKernelY === value) {\r\n return;\r\n }\r\n\r\n this._blurKernelY = value;\r\n this._preparePostProcesses();\r\n }\r\n\r\n public get blurKernelY(): number {\r\n return this._blurKernelY;\r\n }\r\n\r\n private _autoComputeBlurKernel(): void {\r\n const engine = this.getScene()!.getEngine();\r\n\r\n const dw = this.getRenderWidth() / engine.getRenderWidth();\r\n const dh = this.getRenderHeight() / engine.getRenderHeight();\r\n this.blurKernelX = this._adaptiveBlurKernel * dw;\r\n this.blurKernelY = this._adaptiveBlurKernel * dh;\r\n }\r\n\r\n protected _onRatioRescale(): void {\r\n if (this._sizeRatio) {\r\n this.resize(this._initialSizeParameter);\r\n if (!this._adaptiveBlurKernel) {\r\n this._preparePostProcesses();\r\n }\r\n }\r\n\r\n if (this._adaptiveBlurKernel) {\r\n this._autoComputeBlurKernel();\r\n }\r\n }\r\n\r\n private _updateGammaSpace() {\r\n const scene = this.getScene();\r\n\r\n if (!scene) {\r\n return;\r\n }\r\n\r\n this.gammaSpace = !scene.imageProcessingConfiguration.isEnabled || !scene.imageProcessingConfiguration.applyByPostProcess;\r\n }\r\n\r\n private _imageProcessingConfigChangeObserver: Nullable<Observer<ImageProcessingConfiguration>>;\r\n\r\n private _transformMatrix = Matrix.Zero();\r\n private _mirrorMatrix = Matrix.Zero();\r\n\r\n private _blurX: Nullable<BlurPostProcess>;\r\n private _blurY: Nullable<BlurPostProcess>;\r\n private _adaptiveBlurKernel = 0;\r\n private _blurKernelX = 0;\r\n private _blurKernelY = 0;\r\n private _blurRatio = 1.0;\r\n private _sceneUBO: UniformBuffer;\r\n private _currentSceneUBO: UniformBuffer;\r\n\r\n /**\r\n * Instantiates a Mirror Texture.\r\n * Mirror texture can be used to simulate the view from a mirror in a scene.\r\n * It will dynamically be rendered every frame to adapt to the camera point of view.\r\n * You can then easily use it as a reflectionTexture on a flat surface.\r\n * In case the surface is not a plane, please consider relying on reflection probes.\r\n * @see https://doc.babylonjs.com/how_to/reflect#mirrors\r\n * @param name\r\n * @param size\r\n * @param scene\r\n * @param generateMipMaps\r\n * @param type\r\n * @param samplingMode\r\n * @param generateDepthBuffer\r\n */\r\n constructor(\r\n name: string,\r\n size: number | { width: number; height: number } | { ratio: number },\r\n scene?: Scene,\r\n generateMipMaps?: boolean,\r\n type: number = Constants.TEXTURETYPE_UNSIGNED_INT,\r\n samplingMode = Texture.BILINEAR_SAMPLINGMODE,\r\n generateDepthBuffer = true\r\n ) {\r\n super(name, size, scene, generateMipMaps, true, type, false, samplingMode, generateDepthBuffer);\r\n\r\n scene = <Scene>this.getScene();\r\n\r\n if (!scene) {\r\n return this;\r\n }\r\n this.ignoreCameraViewport = true;\r\n\r\n this._updateGammaSpace();\r\n this._imageProcessingConfigChangeObserver = scene.imageProcessingConfiguration.onUpdateParameters.add(() => {\r\n this._updateGammaSpace();\r\n });\r\n\r\n const engine = scene.getEngine();\r\n\r\n if (engine.supportsUniformBuffers) {\r\n this._sceneUBO = scene.createSceneUniformBuffer(`Scene for Mirror Texture (name \"${name}\")`);\r\n }\r\n\r\n this.onBeforeBindObservable.add(() => {\r\n engine._debugPushGroup?.(`mirror generation for ${name}`, 1);\r\n });\r\n\r\n this.onAfterUnbindObservable.add(() => {\r\n engine._debugPopGroup?.(1);\r\n });\r\n\r\n let saveClipPlane: Nullable<Plane>;\r\n\r\n this.onBeforeRenderObservable.add(() => {\r\n if (this._sceneUBO) {\r\n this._currentSceneUBO = scene!.getSceneUniformBuffer();\r\n scene!.setSceneUniformBuffer(this._sceneUBO);\r\n scene!.getSceneUniformBuffer().unbindEffect();\r\n }\r\n\r\n Matrix.ReflectionToRef(this.mirrorPlane, this._mirrorMatrix);\r\n this._mirrorMatrix.multiplyToRef(scene!.getViewMatrix(), this._transformMatrix);\r\n\r\n scene!.setTransformMatrix(this._transformMatrix, scene!.getProjectionMatrix());\r\n\r\n saveClipPlane = scene!.clipPlane;\r\n scene!.clipPlane = this.mirrorPlane;\r\n\r\n scene!.getEngine().cullBackFaces = false;\r\n\r\n scene!._mirroredCameraPosition = Vector3.TransformCoordinates((<Camera>scene!.activeCamera).globalPosition, this._mirrorMatrix);\r\n });\r\n\r\n this.onAfterRenderObservable.add(() => {\r\n if (this._sceneUBO) {\r\n scene!.setSceneUniformBuffer(this._currentSceneUBO);\r\n }\r\n scene!.updateTransformMatrix();\r\n scene!.getEngine().cullBackFaces = null;\r\n scene!._mirroredCameraPosition = null;\r\n\r\n scene!.clipPlane = saveClipPlane;\r\n });\r\n }\r\n\r\n private _preparePostProcesses(): void {\r\n this.clearPostProcesses(true);\r\n\r\n if (this._blurKernelX && this._blurKernelY) {\r\n const engine = (<Scene>this.getScene()).getEngine();\r\n\r\n const textureType =\r\n engine.getCaps().textureFloatRender && engine.getCaps().textureFloatLinearFiltering ? Constants.TEXTURETYPE_FLOAT : Constants.TEXTURETYPE_HALF_FLOAT;\r\n\r\n this._blurX = new BlurPostProcess(\r\n \"horizontal blur\",\r\n new Vector2(1.0, 0),\r\n this._blurKernelX,\r\n this._blurRatio,\r\n null,\r\n Texture.BILINEAR_SAMPLINGMODE,\r\n engine,\r\n false,\r\n textureType\r\n );\r\n this._blurX.autoClear = false;\r\n\r\n if (this._blurRatio === 1 && this.samples < 2 && this._texture) {\r\n this._blurX.inputTexture = this._renderTarget!;\r\n } else {\r\n this._blurX.alwaysForcePOT = true;\r\n }\r\n\r\n this._blurY = new BlurPostProcess(\r\n \"vertical blur\",\r\n new Vector2(0, 1.0),\r\n this._blurKernelY,\r\n this._blurRatio,\r\n null,\r\n Texture.BILINEAR_SAMPLINGMODE,\r\n engine,\r\n false,\r\n textureType\r\n );\r\n this._blurY.autoClear = false;\r\n this._blurY.alwaysForcePOT = this._blurRatio !== 1;\r\n\r\n this.addPostProcess(this._blurX);\r\n this.addPostProcess(this._blurY);\r\n } else {\r\n if (this._blurY) {\r\n this.removePostProcess(this._blurY);\r\n this._blurY.dispose();\r\n this._blurY = null;\r\n }\r\n if (this._blurX) {\r\n this.removePostProcess(this._blurX);\r\n this._blurX.dispose();\r\n this._blurX = null;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Clone the mirror texture.\r\n * @returns the cloned texture\r\n */\r\n public clone(): MirrorTexture {\r\n const scene = this.getScene();\r\n\r\n if (!scene) {\r\n return this;\r\n }\r\n\r\n const textureSize = this.getSize();\r\n const newTexture = new MirrorTexture(\r\n this.name,\r\n textureSize.width,\r\n scene,\r\n this._renderTargetOptions.generateMipMaps,\r\n this._renderTargetOptions.type,\r\n this._renderTargetOptions.samplingMode,\r\n this._renderTargetOptions.generateDepthBuffer\r\n );\r\n\r\n // Base texture\r\n newTexture.hasAlpha = this.hasAlpha;\r\n newTexture.level = this.level;\r\n\r\n // Mirror Texture\r\n newTexture.mirrorPlane = this.mirrorPlane.clone();\r\n if (this.renderList) {\r\n newTexture.renderList = this.renderList.slice(0);\r\n }\r\n\r\n return newTexture;\r\n }\r\n\r\n /**\r\n * Serialize the texture to a JSON representation you could use in Parse later on\r\n * @returns the serialized JSON representation\r\n */\r\n public serialize(): any {\r\n if (!this.name) {\r\n return null;\r\n }\r\n\r\n const serializationObject = super.serialize();\r\n\r\n serializationObject.mirrorPlane = this.mirrorPlane.asArray();\r\n\r\n return serializationObject;\r\n }\r\n\r\n /**\r\n * Dispose the texture and release its associated resources.\r\n */\r\n public dispose() {\r\n super.dispose();\r\n const scene = this.getScene();\r\n\r\n if (scene) {\r\n scene.imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingConfigChangeObserver);\r\n }\r\n this._sceneUBO?.dispose();\r\n }\r\n}\r\n\r\nTexture._CreateMirror = (name: string, renderTargetSize: number, scene: Scene, generateMipMaps: boolean): MirrorTexture => {\r\n return new MirrorTexture(name, renderTargetSize, scene, generateMipMaps);\r\n};\r\n"]}
1
+ {"version":3,"file":"mirrorTexture.js","sourceRoot":"","sources":["../../../../../../lts/core/generated/Materials/Textures/mirrorTexture.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,8CAA8C,CAAC;AAEnF,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AACtE,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAE/C;;;;;;GAMG;AACH,MAAM,OAAO,aAAc,SAAQ,mBAA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,UAAU,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;SACpD;QAED,OAAO,UAAU,CAAC;IACtB,CAAC;IAED;;;OAGG;IACI,SAAS;QACZ,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;YACZ,OAAO,IAAI,CAAC;SACf;QAED,MAAM,mBAAmB,GAAG,KAAK,CAAC,SAAS,EAAE,CAAC;QAE9C,mBAAmB,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC;QAE7D,OAAO,mBAAmB,CAAC;IAC/B,CAAC;IAED;;OAEG;IACI,OAAO;;QACV,KAAK,CAAC,OAAO,EAAE,CAAC;QAChB,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC;QAE9B,IAAI,KAAK,EAAE;YACP,KAAK,CAAC,4BAA4B,CAAC,kBAAkB,CAAC,MAAM,CAAC,IAAI,CAAC,oCAAoC,CAAC,CAAC;SAC3G;QACD,MAAA,IAAI,CAAC,SAAS,0CAAE,OAAO,EAAE,CAAC;IAC9B,CAAC;CACJ;AAED,OAAO,CAAC,aAAa,GAAG,CAAC,IAAY,EAAE,gBAAwB,EAAE,KAAY,EAAE,eAAwB,EAAiB,EAAE;IACtH,OAAO,IAAI,aAAa,CAAC,IAAI,EAAE,gBAAgB,EAAE,KAAK,EAAE,eAAe,CAAC,CAAC;AAC7E,CAAC,CAAC","sourcesContent":["import type { Observer } from \"../../Misc/observable\";\r\nimport type { Nullable } from \"../../types\";\r\nimport type { Camera } from \"../../Cameras/camera\";\r\nimport type { Scene } from \"../../scene\";\r\nimport { Matrix, Vector3, Vector2 } from \"../../Maths/math.vector\";\r\nimport { Texture } from \"../../Materials/Textures/texture\";\r\nimport { RenderTargetTexture } from \"../../Materials/Textures/renderTargetTexture\";\r\nimport type { ImageProcessingConfiguration } from \"../../Materials/imageProcessingConfiguration\";\r\nimport { BlurPostProcess } from \"../../PostProcesses/blurPostProcess\";\r\nimport { Constants } from \"../../Engines/constants\";\r\nimport { Plane } from \"../../Maths/math.plane\";\r\nimport type { UniformBuffer } from \"../uniformBuffer\";\r\n/**\r\n * Mirror texture can be used to simulate the view from a mirror in a scene.\r\n * It will dynamically be rendered every frame to adapt to the camera point of view.\r\n * You can then easily use it as a reflectionTexture on a flat surface.\r\n * In case the surface is not a plane, please consider relying on reflection probes.\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/reflectionTexture#mirrortexture\r\n */\r\nexport class MirrorTexture extends RenderTargetTexture {\r\n /**\r\n * Define the reflection plane we want to use. The mirrorPlane is usually set to the constructed reflector.\r\n * It is possible to directly set the mirrorPlane by directly using a Plane(a, b, c, d) where a, b and c give the plane normal vector (a, b, c) and d is a scalar displacement from the mirrorPlane to the origin. However in all but the very simplest of situations it is more straight forward to set it to the reflector as stated in the doc.\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/reflectionTexture#mirrors\r\n */\r\n public mirrorPlane = new Plane(0, 1, 0, 1);\r\n\r\n /**\r\n * Define the blur ratio used to blur the reflection if needed.\r\n */\r\n public set blurRatio(value: number) {\r\n if (this._blurRatio === value) {\r\n return;\r\n }\r\n\r\n this._blurRatio = value;\r\n this._preparePostProcesses();\r\n }\r\n\r\n public get blurRatio(): number {\r\n return this._blurRatio;\r\n }\r\n\r\n /**\r\n * Define the adaptive blur kernel used to blur the reflection if needed.\r\n * This will autocompute the closest best match for the `blurKernel`\r\n */\r\n public set adaptiveBlurKernel(value: number) {\r\n this._adaptiveBlurKernel = value;\r\n this._autoComputeBlurKernel();\r\n }\r\n\r\n /**\r\n * Define the blur kernel used to blur the reflection if needed.\r\n * Please consider using `adaptiveBlurKernel` as it could find the closest best value for you.\r\n */\r\n public set blurKernel(value: number) {\r\n this.blurKernelX = value;\r\n this.blurKernelY = value;\r\n }\r\n\r\n /**\r\n * Define the blur kernel on the X Axis used to blur the reflection if needed.\r\n * Please consider using `adaptiveBlurKernel` as it could find the closest best value for you.\r\n */\r\n public set blurKernelX(value: number) {\r\n if (this._blurKernelX === value) {\r\n return;\r\n }\r\n\r\n this._blurKernelX = value;\r\n this._preparePostProcesses();\r\n }\r\n\r\n public get blurKernelX(): number {\r\n return this._blurKernelX;\r\n }\r\n\r\n /**\r\n * Define the blur kernel on the Y Axis used to blur the reflection if needed.\r\n * Please consider using `adaptiveBlurKernel` as it could find the closest best value for you.\r\n */\r\n public set blurKernelY(value: number) {\r\n if (this._blurKernelY === value) {\r\n return;\r\n }\r\n\r\n this._blurKernelY = value;\r\n this._preparePostProcesses();\r\n }\r\n\r\n public get blurKernelY(): number {\r\n return this._blurKernelY;\r\n }\r\n\r\n private _autoComputeBlurKernel(): void {\r\n const engine = this.getScene()!.getEngine();\r\n\r\n const dw = this.getRenderWidth() / engine.getRenderWidth();\r\n const dh = this.getRenderHeight() / engine.getRenderHeight();\r\n this.blurKernelX = this._adaptiveBlurKernel * dw;\r\n this.blurKernelY = this._adaptiveBlurKernel * dh;\r\n }\r\n\r\n protected _onRatioRescale(): void {\r\n if (this._sizeRatio) {\r\n this.resize(this._initialSizeParameter);\r\n if (!this._adaptiveBlurKernel) {\r\n this._preparePostProcesses();\r\n }\r\n }\r\n\r\n if (this._adaptiveBlurKernel) {\r\n this._autoComputeBlurKernel();\r\n }\r\n }\r\n\r\n private _updateGammaSpace() {\r\n const scene = this.getScene();\r\n\r\n if (!scene) {\r\n return;\r\n }\r\n\r\n this.gammaSpace = !scene.imageProcessingConfiguration.isEnabled || !scene.imageProcessingConfiguration.applyByPostProcess;\r\n }\r\n\r\n private _imageProcessingConfigChangeObserver: Nullable<Observer<ImageProcessingConfiguration>>;\r\n\r\n private _transformMatrix = Matrix.Zero();\r\n private _mirrorMatrix = Matrix.Zero();\r\n\r\n private _blurX: Nullable<BlurPostProcess>;\r\n private _blurY: Nullable<BlurPostProcess>;\r\n private _adaptiveBlurKernel = 0;\r\n private _blurKernelX = 0;\r\n private _blurKernelY = 0;\r\n private _blurRatio = 1.0;\r\n private _sceneUBO: UniformBuffer;\r\n private _currentSceneUBO: UniformBuffer;\r\n\r\n /**\r\n * Instantiates a Mirror Texture.\r\n * Mirror texture can be used to simulate the view from a mirror in a scene.\r\n * It will dynamically be rendered every frame to adapt to the camera point of view.\r\n * You can then easily use it as a reflectionTexture on a flat surface.\r\n * In case the surface is not a plane, please consider relying on reflection probes.\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/reflectionTexture#mirrors\r\n * @param name\r\n * @param size\r\n * @param scene\r\n * @param generateMipMaps\r\n * @param type\r\n * @param samplingMode\r\n * @param generateDepthBuffer\r\n */\r\n constructor(\r\n name: string,\r\n size: number | { width: number; height: number } | { ratio: number },\r\n scene?: Scene,\r\n generateMipMaps?: boolean,\r\n type: number = Constants.TEXTURETYPE_UNSIGNED_INT,\r\n samplingMode = Texture.BILINEAR_SAMPLINGMODE,\r\n generateDepthBuffer = true\r\n ) {\r\n super(name, size, scene, generateMipMaps, true, type, false, samplingMode, generateDepthBuffer);\r\n\r\n scene = <Scene>this.getScene();\r\n\r\n if (!scene) {\r\n return this;\r\n }\r\n this.ignoreCameraViewport = true;\r\n\r\n this._updateGammaSpace();\r\n this._imageProcessingConfigChangeObserver = scene.imageProcessingConfiguration.onUpdateParameters.add(() => {\r\n this._updateGammaSpace();\r\n });\r\n\r\n const engine = scene.getEngine();\r\n\r\n if (engine.supportsUniformBuffers) {\r\n this._sceneUBO = scene.createSceneUniformBuffer(`Scene for Mirror Texture (name \"${name}\")`);\r\n }\r\n\r\n this.onBeforeBindObservable.add(() => {\r\n engine._debugPushGroup?.(`mirror generation for ${name}`, 1);\r\n });\r\n\r\n this.onAfterUnbindObservable.add(() => {\r\n engine._debugPopGroup?.(1);\r\n });\r\n\r\n let saveClipPlane: Nullable<Plane>;\r\n\r\n this.onBeforeRenderObservable.add(() => {\r\n if (this._sceneUBO) {\r\n this._currentSceneUBO = scene!.getSceneUniformBuffer();\r\n scene!.setSceneUniformBuffer(this._sceneUBO);\r\n scene!.getSceneUniformBuffer().unbindEffect();\r\n }\r\n\r\n Matrix.ReflectionToRef(this.mirrorPlane, this._mirrorMatrix);\r\n this._mirrorMatrix.multiplyToRef(scene!.getViewMatrix(), this._transformMatrix);\r\n\r\n scene!.setTransformMatrix(this._transformMatrix, scene!.getProjectionMatrix());\r\n\r\n saveClipPlane = scene!.clipPlane;\r\n scene!.clipPlane = this.mirrorPlane;\r\n\r\n scene!.getEngine().cullBackFaces = false;\r\n\r\n scene!._mirroredCameraPosition = Vector3.TransformCoordinates((<Camera>scene!.activeCamera).globalPosition, this._mirrorMatrix);\r\n });\r\n\r\n this.onAfterRenderObservable.add(() => {\r\n if (this._sceneUBO) {\r\n scene!.setSceneUniformBuffer(this._currentSceneUBO);\r\n }\r\n scene!.updateTransformMatrix();\r\n scene!.getEngine().cullBackFaces = null;\r\n scene!._mirroredCameraPosition = null;\r\n\r\n scene!.clipPlane = saveClipPlane;\r\n });\r\n }\r\n\r\n private _preparePostProcesses(): void {\r\n this.clearPostProcesses(true);\r\n\r\n if (this._blurKernelX && this._blurKernelY) {\r\n const engine = (<Scene>this.getScene()).getEngine();\r\n\r\n const textureType =\r\n engine.getCaps().textureFloatRender && engine.getCaps().textureFloatLinearFiltering ? Constants.TEXTURETYPE_FLOAT : Constants.TEXTURETYPE_HALF_FLOAT;\r\n\r\n this._blurX = new BlurPostProcess(\r\n \"horizontal blur\",\r\n new Vector2(1.0, 0),\r\n this._blurKernelX,\r\n this._blurRatio,\r\n null,\r\n Texture.BILINEAR_SAMPLINGMODE,\r\n engine,\r\n false,\r\n textureType\r\n );\r\n this._blurX.autoClear = false;\r\n\r\n if (this._blurRatio === 1 && this.samples < 2 && this._texture) {\r\n this._blurX.inputTexture = this._renderTarget!;\r\n } else {\r\n this._blurX.alwaysForcePOT = true;\r\n }\r\n\r\n this._blurY = new BlurPostProcess(\r\n \"vertical blur\",\r\n new Vector2(0, 1.0),\r\n this._blurKernelY,\r\n this._blurRatio,\r\n null,\r\n Texture.BILINEAR_SAMPLINGMODE,\r\n engine,\r\n false,\r\n textureType\r\n );\r\n this._blurY.autoClear = false;\r\n this._blurY.alwaysForcePOT = this._blurRatio !== 1;\r\n\r\n this.addPostProcess(this._blurX);\r\n this.addPostProcess(this._blurY);\r\n } else {\r\n if (this._blurY) {\r\n this.removePostProcess(this._blurY);\r\n this._blurY.dispose();\r\n this._blurY = null;\r\n }\r\n if (this._blurX) {\r\n this.removePostProcess(this._blurX);\r\n this._blurX.dispose();\r\n this._blurX = null;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Clone the mirror texture.\r\n * @returns the cloned texture\r\n */\r\n public clone(): MirrorTexture {\r\n const scene = this.getScene();\r\n\r\n if (!scene) {\r\n return this;\r\n }\r\n\r\n const textureSize = this.getSize();\r\n const newTexture = new MirrorTexture(\r\n this.name,\r\n textureSize.width,\r\n scene,\r\n this._renderTargetOptions.generateMipMaps,\r\n this._renderTargetOptions.type,\r\n this._renderTargetOptions.samplingMode,\r\n this._renderTargetOptions.generateDepthBuffer\r\n );\r\n\r\n // Base texture\r\n newTexture.hasAlpha = this.hasAlpha;\r\n newTexture.level = this.level;\r\n\r\n // Mirror Texture\r\n newTexture.mirrorPlane = this.mirrorPlane.clone();\r\n if (this.renderList) {\r\n newTexture.renderList = this.renderList.slice(0);\r\n }\r\n\r\n return newTexture;\r\n }\r\n\r\n /**\r\n * Serialize the texture to a JSON representation you could use in Parse later on\r\n * @returns the serialized JSON representation\r\n */\r\n public serialize(): any {\r\n if (!this.name) {\r\n return null;\r\n }\r\n\r\n const serializationObject = super.serialize();\r\n\r\n serializationObject.mirrorPlane = this.mirrorPlane.asArray();\r\n\r\n return serializationObject;\r\n }\r\n\r\n /**\r\n * Dispose the texture and release its associated resources.\r\n */\r\n public dispose() {\r\n super.dispose();\r\n const scene = this.getScene();\r\n\r\n if (scene) {\r\n scene.imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingConfigChangeObserver);\r\n }\r\n this._sceneUBO?.dispose();\r\n }\r\n}\r\n\r\nTexture._CreateMirror = (name: string, renderTargetSize: number, scene: Scene, generateMipMaps: boolean): MirrorTexture => {\r\n return new MirrorTexture(name, renderTargetSize, scene, generateMipMaps);\r\n};\r\n"]}
@@ -4,13 +4,13 @@ import { RenderTargetTexture } from "../../Materials/Textures/renderTargetTextur
4
4
  /**
5
5
  * Creates a refraction texture used by refraction channel of the standard material.
6
6
  * It is like a mirror but to see through a material.
7
- * @see https://doc.babylonjs.com/how_to/reflect#refraction
7
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/reflectionTexture#refractiontexture
8
8
  */
9
9
  export declare class RefractionTexture extends RenderTargetTexture {
10
10
  /**
11
11
  * Define the reflection plane we want to use. The refractionPlane is usually set to the constructed refractor.
12
12
  * It is possible to directly set the refractionPlane by directly using a Plane(a, b, c, d) where a, b and c give the plane normal vector (a, b, c) and d is a scalar displacement from the refractionPlane to the origin. However in all but the very simplest of situations it is more straight forward to set it to the refractor as stated in the doc.
13
- * @see https://doc.babylonjs.com/how_to/reflect#refraction
13
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/reflectionTexture#refraction
14
14
  */
15
15
  refractionPlane: Plane;
16
16
  /**
@@ -20,7 +20,7 @@ export declare class RefractionTexture extends RenderTargetTexture {
20
20
  /**
21
21
  * Creates a refraction texture used by refraction channel of the standard material.
22
22
  * It is like a mirror but to see through a material.
23
- * @see https://doc.babylonjs.com/how_to/reflect#refraction
23
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/reflectionTexture#refraction
24
24
  * @param name Define the texture name
25
25
  * @param size Define the size of the underlying texture
26
26
  * @param scene Define the scene the refraction belongs to
@@ -3,13 +3,13 @@ import { RenderTargetTexture } from "../../Materials/Textures/renderTargetTextur
3
3
  /**
4
4
  * Creates a refraction texture used by refraction channel of the standard material.
5
5
  * It is like a mirror but to see through a material.
6
- * @see https://doc.babylonjs.com/how_to/reflect#refraction
6
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/reflectionTexture#refractiontexture
7
7
  */
8
8
  export class RefractionTexture extends RenderTargetTexture {
9
9
  /**
10
10
  * Creates a refraction texture used by refraction channel of the standard material.
11
11
  * It is like a mirror but to see through a material.
12
- * @see https://doc.babylonjs.com/how_to/reflect#refraction
12
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/reflectionTexture#refraction
13
13
  * @param name Define the texture name
14
14
  * @param size Define the size of the underlying texture
15
15
  * @param scene Define the scene the refraction belongs to
@@ -20,7 +20,7 @@ export class RefractionTexture extends RenderTargetTexture {
20
20
  /**
21
21
  * Define the reflection plane we want to use. The refractionPlane is usually set to the constructed refractor.
22
22
  * It is possible to directly set the refractionPlane by directly using a Plane(a, b, c, d) where a, b and c give the plane normal vector (a, b, c) and d is a scalar displacement from the refractionPlane to the origin. However in all but the very simplest of situations it is more straight forward to set it to the refractor as stated in the doc.
23
- * @see https://doc.babylonjs.com/how_to/reflect#refraction
23
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/reflectionTexture#refraction
24
24
  */
25
25
  this.refractionPlane = new Plane(0, 1, 0, 1);
26
26
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"refractionTexture.js","sourceRoot":"","sources":["../../../../../../lts/core/generated/Materials/Textures/refractionTexture.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,8CAA8C,CAAC;AACnF;;;;GAIG;AACH,MAAM,OAAO,iBAAkB,SAAQ,mBAAmB;IAatD;;;;;;;;OAQG;IACH,YAAY,IAAY,EAAE,IAAY,EAAE,KAAa,EAAE,eAAyB;QAC5E,KAAK,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,eAAe,EAAE,IAAI,CAAC,CAAC;QAtBpD;;;;WAIG;QACI,oBAAe,GAAG,IAAI,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC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GAAG,KAAK,CAAC,SAAS,EAAE,CAAC;QAE9C,mBAAmB,CAAC,WAAW,GAAG,IAAI,CAAC,eAAe,CAAC,OAAO,EAAE,CAAC;QACjE,mBAAmB,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QAEvC,OAAO,mBAAmB,CAAC;IAC/B,CAAC;CACJ","sourcesContent":["import type { Scene } from \"../../scene\";\r\nimport { Plane } from \"../../Maths/math.plane\";\r\nimport { RenderTargetTexture } from \"../../Materials/Textures/renderTargetTexture\";\r\n/**\r\n * Creates a refraction texture used by refraction channel of the standard material.\r\n * It is like a mirror but to see through a material.\r\n * @see https://doc.babylonjs.com/how_to/reflect#refraction\r\n */\r\nexport class RefractionTexture extends RenderTargetTexture {\r\n /**\r\n * Define the reflection plane we want to use. The refractionPlane is usually set to the constructed refractor.\r\n * It is possible to directly set the refractionPlane by directly using a Plane(a, b, c, d) where a, b and c give the plane normal vector (a, b, c) and d is a scalar displacement from the refractionPlane to the origin. However in all but the very simplest of situations it is more straight forward to set it to the refractor as stated in the doc.\r\n * @see https://doc.babylonjs.com/how_to/reflect#refraction\r\n */\r\n public refractionPlane = new Plane(0, 1, 0, 1);\r\n\r\n /**\r\n * Define how deep under the surface we should see.\r\n */\r\n public depth = 2.0;\r\n\r\n /**\r\n * Creates a refraction texture used by refraction channel of the standard material.\r\n * It is like a mirror but to see through a material.\r\n * @see https://doc.babylonjs.com/how_to/reflect#refraction\r\n * @param name Define the texture name\r\n * @param size Define the size of the underlying texture\r\n * @param scene Define the scene the refraction belongs to\r\n * @param generateMipMaps Define if we need to generate mips level for the refraction\r\n */\r\n constructor(name: string, size: number, scene?: Scene, generateMipMaps?: boolean) {\r\n super(name, size, scene, generateMipMaps, true);\r\n\r\n this.onBeforeRenderObservable.add(() => {\r\n this.getScene()!.clipPlane = this.refractionPlane;\r\n });\r\n\r\n this.onAfterRenderObservable.add(() => {\r\n this.getScene()!.clipPlane = null;\r\n });\r\n }\r\n\r\n /**\r\n * Clone the refraction texture.\r\n * @returns the cloned texture\r\n */\r\n public clone(): RefractionTexture {\r\n const scene = this.getScene();\r\n\r\n if (!scene) {\r\n return this;\r\n }\r\n\r\n const textureSize = this.getSize();\r\n const newTexture = new RefractionTexture(this.name, textureSize.width, scene, this._generateMipMaps);\r\n\r\n // Base texture\r\n newTexture.hasAlpha = this.hasAlpha;\r\n newTexture.level = this.level;\r\n\r\n // Refraction Texture\r\n newTexture.refractionPlane = this.refractionPlane.clone();\r\n if (this.renderList) {\r\n newTexture.renderList = this.renderList.slice(0);\r\n }\r\n newTexture.depth = this.depth;\r\n\r\n return newTexture;\r\n }\r\n\r\n /**\r\n * Serialize the texture to a JSON representation you could use in Parse later on\r\n * @returns the serialized JSON representation\r\n */\r\n public serialize(): any {\r\n if (!this.name) {\r\n return null;\r\n }\r\n\r\n const serializationObject = super.serialize();\r\n\r\n serializationObject.mirrorPlane = this.refractionPlane.asArray();\r\n serializationObject.depth = this.depth;\r\n\r\n return serializationObject;\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"refractionTexture.js","sourceRoot":"","sources":["../../../../../../lts/core/generated/Materials/Textures/refractionTexture.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,8CAA8C,CAAC;AACnF;;;;GAIG;AACH,MAAM,OAAO,iBAAkB,SAAQ,mBAAmB;IAatD;;;;;;;;OAQG;IACH,YAAY,IAAY,EAAE,IAAY,EAAE,KAAa,EAAE,eAAyB;QAC5E,KAAK,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,eAAe,EAAE,IAAI,CAAC,CAAC;QAtBpD;;;;WAIG;QACI,oBAAe,GAAG,IAAI,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;QAE/C;;WAEG;QACI,UAAK,GAAG,GAAG,CAAC;QAcf,IAAI,CAAC,wBAAwB,CAAC,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AAC,OAAO,EAAE,CAAC;QACjE,mBAAmB,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QAEvC,OAAO,mBAAmB,CAAC;IAC/B,CAAC;CACJ","sourcesContent":["import type { Scene } from \"../../scene\";\r\nimport { Plane } from \"../../Maths/math.plane\";\r\nimport { RenderTargetTexture } from \"../../Materials/Textures/renderTargetTexture\";\r\n/**\r\n * Creates a refraction texture used by refraction channel of the standard material.\r\n * It is like a mirror but to see through a material.\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/reflectionTexture#refractiontexture\r\n */\r\nexport class RefractionTexture extends RenderTargetTexture {\r\n /**\r\n * Define the reflection plane we want to use. The refractionPlane is usually set to the constructed refractor.\r\n * It is possible to directly set the refractionPlane by directly using a Plane(a, b, c, d) where a, b and c give the plane normal vector (a, b, c) and d is a scalar displacement from the refractionPlane to the origin. However in all but the very simplest of situations it is more straight forward to set it to the refractor as stated in the doc.\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/reflectionTexture#refraction\r\n */\r\n public refractionPlane = new Plane(0, 1, 0, 1);\r\n\r\n /**\r\n * Define how deep under the surface we should see.\r\n */\r\n public depth = 2.0;\r\n\r\n /**\r\n * Creates a refraction texture used by refraction channel of the standard material.\r\n * It is like a mirror but to see through a material.\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/reflectionTexture#refraction\r\n * @param name Define the texture name\r\n * @param size Define the size of the underlying texture\r\n * @param scene Define the scene the refraction belongs to\r\n * @param generateMipMaps Define if we need to generate mips level for the refraction\r\n */\r\n constructor(name: string, size: number, scene?: Scene, generateMipMaps?: boolean) {\r\n super(name, size, scene, generateMipMaps, true);\r\n\r\n this.onBeforeRenderObservable.add(() => {\r\n this.getScene()!.clipPlane = this.refractionPlane;\r\n });\r\n\r\n this.onAfterRenderObservable.add(() => {\r\n this.getScene()!.clipPlane = null;\r\n });\r\n }\r\n\r\n /**\r\n * Clone the refraction texture.\r\n * @returns the cloned texture\r\n */\r\n public clone(): RefractionTexture {\r\n const scene = this.getScene();\r\n\r\n if (!scene) {\r\n return this;\r\n }\r\n\r\n const textureSize = this.getSize();\r\n const newTexture = new RefractionTexture(this.name, textureSize.width, scene, this._generateMipMaps);\r\n\r\n // Base texture\r\n newTexture.hasAlpha = this.hasAlpha;\r\n newTexture.level = this.level;\r\n\r\n // Refraction Texture\r\n newTexture.refractionPlane = this.refractionPlane.clone();\r\n if (this.renderList) {\r\n newTexture.renderList = this.renderList.slice(0);\r\n }\r\n newTexture.depth = this.depth;\r\n\r\n return newTexture;\r\n }\r\n\r\n /**\r\n * Serialize the texture to a JSON representation you could use in Parse later on\r\n * @returns the serialized JSON representation\r\n */\r\n public serialize(): any {\r\n if (!this.name) {\r\n return null;\r\n }\r\n\r\n const serializationObject = super.serialize();\r\n\r\n serializationObject.mirrorPlane = this.refractionPlane.asArray();\r\n serializationObject.depth = this.depth;\r\n\r\n return serializationObject;\r\n }\r\n}\r\n"]}
@@ -42,7 +42,7 @@ export interface ITextureCreationOptions {
42
42
  }
43
43
  /**
44
44
  * This represents a texture in babylon. It can be easily loaded from a network, base64 or html input.
45
- * @see https://doc.babylonjs.com/babylon101/materials#texture
45
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/materials_introduction#texture
46
46
  */
47
47
  export declare class Texture extends BaseTexture {
48
48
  /**
@@ -136,40 +136,40 @@ export declare class Texture extends BaseTexture {
136
136
  url: Nullable<string>;
137
137
  /**
138
138
  * Define an offset on the texture to offset the u coordinates of the UVs
139
- * @see https://doc.babylonjs.com/how_to/more_materials#offsetting
139
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/moreMaterials#offsetting
140
140
  */
141
141
  uOffset: number;
142
142
  /**
143
143
  * Define an offset on the texture to offset the v coordinates of the UVs
144
- * @see https://doc.babylonjs.com/how_to/more_materials#offsetting
144
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/moreMaterials#offsetting
145
145
  */
146
146
  vOffset: number;
147
147
  /**
148
148
  * Define an offset on the texture to scale the u coordinates of the UVs
149
- * @see https://doc.babylonjs.com/how_to/more_materials#tiling
149
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/moreMaterials#tiling
150
150
  */
151
151
  uScale: number;
152
152
  /**
153
153
  * Define an offset on the texture to scale the v coordinates of the UVs
154
- * @see https://doc.babylonjs.com/how_to/more_materials#tiling
154
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/moreMaterials#tiling
155
155
  */
156
156
  vScale: number;
157
157
  /**
158
158
  * Define an offset on the texture to rotate around the u coordinates of the UVs
159
159
  * The angle is defined in radians.
160
- * @see https://doc.babylonjs.com/how_to/more_materials
160
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/moreMaterials
161
161
  */
162
162
  uAng: number;
163
163
  /**
164
164
  * Define an offset on the texture to rotate around the v coordinates of the UVs
165
165
  * The angle is defined in radians.
166
- * @see https://doc.babylonjs.com/how_to/more_materials
166
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/moreMaterials
167
167
  */
168
168
  vAng: number;
169
169
  /**
170
170
  * Define an offset on the texture to rotate around the w coordinates of the UVs (in case of 3d texture)
171
171
  * The angle is defined in radians.
172
- * @see https://doc.babylonjs.com/how_to/more_materials
172
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/moreMaterials
173
173
  */
174
174
  wAng: number;
175
175
  /**
@@ -194,7 +194,7 @@ export declare class Texture extends BaseTexture {
194
194
  get noMipmap(): boolean;
195
195
  /**
196
196
  * List of inspectable custom properties (used by the Inspector)
197
- * @see https://doc.babylonjs.com/how_to/debug_layer#extensibility
197
+ * @see https://doc.babylonjs.com/toolsAndResources/inspector#extensibility
198
198
  */
199
199
  inspectableCustomProperties: Nullable<IInspectable[]>;
200
200
  private _noMipmap;
@@ -255,7 +255,7 @@ export declare class Texture extends BaseTexture {
255
255
  /**
256
256
  * Instantiates a new texture.
257
257
  * This represents a texture in babylon. It can be easily loaded from a network, base64 or html input.
258
- * @see https://doc.babylonjs.com/babylon101/materials#texture
258
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/materials_introduction#texture
259
259
  * @param url defines the url of the picture to load as a texture
260
260
  * @param sceneOrEngine defines the scene or engine the texture will belong to
261
261
  * @param noMipmapOrOptions defines if the texture will require mip maps or not or set of all options to create the texture
@@ -14,13 +14,13 @@ import { GenerateBase64StringFromTexture, GenerateBase64StringFromTextureAsync }
14
14
  import { CompatibilityOptions } from "../../Compat/compatibilityOptions.js";
15
15
  /**
16
16
  * This represents a texture in babylon. It can be easily loaded from a network, base64 or html input.
17
- * @see https://doc.babylonjs.com/babylon101/materials#texture
17
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/materials_introduction#texture
18
18
  */
19
19
  export class Texture extends BaseTexture {
20
20
  /**
21
21
  * Instantiates a new texture.
22
22
  * This represents a texture in babylon. It can be easily loaded from a network, base64 or html input.
23
- * @see https://doc.babylonjs.com/babylon101/materials#texture
23
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/materials_introduction#texture
24
24
  * @param url defines the url of the picture to load as a texture
25
25
  * @param sceneOrEngine defines the scene or engine the texture will belong to
26
26
  * @param noMipmapOrOptions defines if the texture will require mip maps or not or set of all options to create the texture
@@ -45,40 +45,40 @@ export class Texture extends BaseTexture {
45
45
  this.url = null;
46
46
  /**
47
47
  * Define an offset on the texture to offset the u coordinates of the UVs
48
- * @see https://doc.babylonjs.com/how_to/more_materials#offsetting
48
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/moreMaterials#offsetting
49
49
  */
50
50
  this.uOffset = 0;
51
51
  /**
52
52
  * Define an offset on the texture to offset the v coordinates of the UVs
53
- * @see https://doc.babylonjs.com/how_to/more_materials#offsetting
53
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/moreMaterials#offsetting
54
54
  */
55
55
  this.vOffset = 0;
56
56
  /**
57
57
  * Define an offset on the texture to scale the u coordinates of the UVs
58
- * @see https://doc.babylonjs.com/how_to/more_materials#tiling
58
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/moreMaterials#tiling
59
59
  */
60
60
  this.uScale = 1.0;
61
61
  /**
62
62
  * Define an offset on the texture to scale the v coordinates of the UVs
63
- * @see https://doc.babylonjs.com/how_to/more_materials#tiling
63
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/moreMaterials#tiling
64
64
  */
65
65
  this.vScale = 1.0;
66
66
  /**
67
67
  * Define an offset on the texture to rotate around the u coordinates of the UVs
68
68
  * The angle is defined in radians.
69
- * @see https://doc.babylonjs.com/how_to/more_materials
69
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/moreMaterials
70
70
  */
71
71
  this.uAng = 0;
72
72
  /**
73
73
  * Define an offset on the texture to rotate around the v coordinates of the UVs
74
74
  * The angle is defined in radians.
75
- * @see https://doc.babylonjs.com/how_to/more_materials
75
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/moreMaterials
76
76
  */
77
77
  this.vAng = 0;
78
78
  /**
79
79
  * Define an offset on the texture to rotate around the w coordinates of the UVs (in case of 3d texture)
80
80
  * The angle is defined in radians.
81
- * @see https://doc.babylonjs.com/how_to/more_materials
81
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/moreMaterials
82
82
  */
83
83
  this.wAng = 0;
84
84
  /**
@@ -99,7 +99,7 @@ export class Texture extends BaseTexture {
99
99
  this.homogeneousRotationInUVTransform = false;
100
100
  /**
101
101
  * List of inspectable custom properties (used by the Inspector)
102
- * @see https://doc.babylonjs.com/how_to/debug_layer#extensibility
102
+ * @see https://doc.babylonjs.com/toolsAndResources/inspector#extensibility
103
103
  */
104
104
  this.inspectableCustomProperties = null;
105
105
  this._noMipmap = false;