@babylonjs/gui 5.0.0-beta.9 → 5.0.0-rc.10

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 (305) hide show
  1. package/2D/adtInstrumentation.d.ts +52 -52
  2. package/2D/adtInstrumentation.js +126 -126
  3. package/2D/adtInstrumentation.js.map +1 -1
  4. package/2D/advancedDynamicTexture.d.ts +449 -412
  5. package/2D/advancedDynamicTexture.js +1318 -1239
  6. package/2D/advancedDynamicTexture.js.map +1 -1
  7. package/2D/controls/button.d.ts +135 -97
  8. package/2D/controls/button.js +276 -238
  9. package/2D/controls/button.js.map +1 -1
  10. package/2D/controls/checkbox.d.ts +59 -51
  11. package/2D/controls/checkbox.js +188 -178
  12. package/2D/controls/checkbox.js.map +1 -1
  13. package/2D/controls/colorpicker.d.ts +103 -90
  14. package/2D/controls/colorpicker.js +1417 -1400
  15. package/2D/controls/colorpicker.js.map +1 -1
  16. package/2D/controls/container.d.ts +175 -130
  17. package/2D/controls/container.js +570 -525
  18. package/2D/controls/container.js.map +1 -1
  19. package/2D/controls/control.d.ts +866 -743
  20. package/2D/controls/control.js +2433 -2308
  21. package/2D/controls/control.js.map +1 -1
  22. package/2D/controls/displayGrid.d.ts +53 -55
  23. package/2D/controls/displayGrid.js +245 -245
  24. package/2D/controls/displayGrid.js.map +1 -1
  25. package/2D/controls/ellipse.d.ts +21 -21
  26. package/2D/controls/ellipse.js +85 -85
  27. package/2D/controls/ellipse.js.map +1 -1
  28. package/2D/controls/focusableButton.d.ts +59 -52
  29. package/2D/controls/focusableButton.js +99 -92
  30. package/2D/controls/focusableButton.js.map +1 -1
  31. package/2D/controls/focusableControl.d.ts +34 -34
  32. package/2D/controls/focusableControl.js +1 -1
  33. package/2D/controls/focusableControl.js.map +1 -1
  34. package/2D/controls/grid.d.ts +139 -135
  35. package/2D/controls/grid.js +529 -525
  36. package/2D/controls/grid.js.map +1 -1
  37. package/2D/controls/image.d.ts +204 -197
  38. package/2D/controls/image.js +887 -879
  39. package/2D/controls/image.js.map +1 -1
  40. package/2D/controls/index.d.ts +29 -29
  41. package/2D/controls/index.js +29 -29
  42. package/2D/controls/index.js.map +1 -1
  43. package/2D/controls/inputPassword.d.ts +9 -8
  44. package/2D/controls/inputPassword.js +28 -25
  45. package/2D/controls/inputPassword.js.map +1 -1
  46. package/2D/controls/inputText.d.ts +201 -180
  47. package/2D/controls/inputText.js +1119 -1095
  48. package/2D/controls/inputText.js.map +1 -1
  49. package/2D/controls/line.d.ts +66 -66
  50. package/2D/controls/line.js +271 -271
  51. package/2D/controls/line.js.map +1 -1
  52. package/2D/controls/multiLine.d.ts +75 -77
  53. package/2D/controls/multiLine.js +262 -262
  54. package/2D/controls/multiLine.js.map +1 -1
  55. package/2D/controls/radioButton.d.ts +49 -49
  56. package/2D/controls/radioButton.js +205 -205
  57. package/2D/controls/radioButton.js.map +1 -1
  58. package/2D/controls/rectangle.d.ts +29 -29
  59. package/2D/controls/rectangle.js +150 -150
  60. package/2D/controls/rectangle.js.map +1 -1
  61. package/2D/controls/scrollViewers/scrollViewer.d.ts +182 -175
  62. package/2D/controls/scrollViewers/scrollViewer.js +677 -676
  63. package/2D/controls/scrollViewers/scrollViewer.js.map +1 -1
  64. package/2D/controls/scrollViewers/scrollViewerWindow.d.ts +57 -45
  65. package/2D/controls/scrollViewers/scrollViewerWindow.js +278 -263
  66. package/2D/controls/scrollViewers/scrollViewerWindow.js.map +1 -1
  67. package/2D/controls/selector.d.ts +263 -209
  68. package/2D/controls/selector.js +692 -629
  69. package/2D/controls/selector.js.map +1 -1
  70. package/2D/controls/sliders/baseSlider.d.ts +82 -78
  71. package/2D/controls/sliders/baseSlider.js +347 -343
  72. package/2D/controls/sliders/baseSlider.js.map +1 -1
  73. package/2D/controls/sliders/imageBasedSlider.d.ts +49 -47
  74. package/2D/controls/sliders/imageBasedSlider.js +192 -188
  75. package/2D/controls/sliders/imageBasedSlider.js.map +1 -1
  76. package/2D/controls/sliders/imageScrollBar.d.ts +65 -61
  77. package/2D/controls/sliders/imageScrollBar.js +263 -256
  78. package/2D/controls/sliders/imageScrollBar.js.map +1 -1
  79. package/2D/controls/sliders/scrollBar.d.ts +38 -34
  80. package/2D/controls/sliders/scrollBar.js +143 -136
  81. package/2D/controls/sliders/scrollBar.js.map +1 -1
  82. package/2D/controls/sliders/slider.d.ts +35 -37
  83. package/2D/controls/sliders/slider.js +271 -271
  84. package/2D/controls/sliders/slider.js.map +1 -1
  85. package/2D/controls/stackPanel.d.ts +64 -56
  86. package/2D/controls/stackPanel.js +246 -236
  87. package/2D/controls/stackPanel.js.map +1 -1
  88. package/2D/controls/statics.d.ts +6 -6
  89. package/2D/controls/statics.js +49 -47
  90. package/2D/controls/statics.js.map +1 -1
  91. package/2D/controls/textBlock.d.ts +175 -171
  92. package/2D/controls/textBlock.js +603 -588
  93. package/2D/controls/textBlock.js.map +1 -1
  94. package/2D/controls/textWrapper.d.ts +13 -13
  95. package/2D/controls/textWrapper.js +101 -101
  96. package/2D/controls/textWrapper.js.map +1 -1
  97. package/2D/controls/toggleButton.d.ts +117 -83
  98. package/2D/controls/toggleButton.js +268 -234
  99. package/2D/controls/toggleButton.js.map +1 -1
  100. package/2D/controls/virtualKeyboard.d.ts +96 -96
  101. package/2D/controls/virtualKeyboard.js +256 -256
  102. package/2D/controls/virtualKeyboard.js.map +1 -1
  103. package/2D/index.d.ts +9 -9
  104. package/2D/index.js +10 -9
  105. package/2D/index.js.map +1 -1
  106. package/2D/math2D.d.ts +117 -117
  107. package/2D/math2D.js +221 -221
  108. package/2D/math2D.js.map +1 -1
  109. package/2D/measure.d.ts +77 -77
  110. package/2D/measure.js +139 -149
  111. package/2D/measure.js.map +1 -1
  112. package/2D/multiLinePoint.d.ts +47 -47
  113. package/2D/multiLinePoint.js +127 -127
  114. package/2D/multiLinePoint.js.map +1 -1
  115. package/2D/style.d.ts +46 -46
  116. package/2D/style.js +97 -97
  117. package/2D/style.js.map +1 -1
  118. package/2D/valueAndUnit.d.ts +89 -89
  119. package/2D/valueAndUnit.js +226 -222
  120. package/2D/valueAndUnit.js.map +1 -1
  121. package/2D/xmlLoader.d.ts +60 -60
  122. package/2D/xmlLoader.js +348 -341
  123. package/2D/xmlLoader.js.map +1 -1
  124. package/3D/behaviors/defaultBehavior.d.ts +73 -73
  125. package/3D/behaviors/defaultBehavior.js +121 -121
  126. package/3D/behaviors/defaultBehavior.js.map +1 -1
  127. package/3D/controls/abstractButton3D.d.ts +15 -15
  128. package/3D/controls/abstractButton3D.js +25 -25
  129. package/3D/controls/abstractButton3D.js.map +1 -1
  130. package/3D/controls/button3D.d.ts +30 -30
  131. package/3D/controls/button3D.js +93 -93
  132. package/3D/controls/button3D.js.map +1 -1
  133. package/3D/controls/container3D.d.ts +72 -72
  134. package/3D/controls/container3D.js +139 -140
  135. package/3D/controls/container3D.js.map +1 -1
  136. package/3D/controls/contentDisplay3D.d.ts +30 -30
  137. package/3D/controls/contentDisplay3D.js +79 -78
  138. package/3D/controls/contentDisplay3D.js.map +1 -1
  139. package/3D/controls/control3D.d.ts +201 -165
  140. package/3D/controls/control3D.js +445 -408
  141. package/3D/controls/control3D.js.map +1 -1
  142. package/3D/controls/cylinderPanel.d.ts +17 -17
  143. package/3D/controls/cylinderPanel.js +66 -66
  144. package/3D/controls/cylinderPanel.js.map +1 -1
  145. package/3D/controls/handMenu.d.ts +28 -28
  146. package/3D/controls/handMenu.js +47 -47
  147. package/3D/controls/handMenu.js.map +1 -1
  148. package/3D/controls/holographicBackplate.d.ts +49 -48
  149. package/3D/controls/holographicBackplate.js +120 -120
  150. package/3D/controls/holographicBackplate.js.map +1 -1
  151. package/3D/controls/holographicButton.d.ts +84 -83
  152. package/3D/controls/holographicButton.js +339 -338
  153. package/3D/controls/holographicButton.js.map +1 -1
  154. package/3D/controls/holographicSlate.d.ts +131 -118
  155. package/3D/controls/holographicSlate.js +431 -369
  156. package/3D/controls/holographicSlate.js.map +1 -1
  157. package/3D/controls/index.d.ts +21 -21
  158. package/3D/controls/index.js +21 -21
  159. package/3D/controls/index.js.map +1 -1
  160. package/3D/controls/meshButton3D.d.ts +21 -21
  161. package/3D/controls/meshButton3D.js +62 -61
  162. package/3D/controls/meshButton3D.js.map +1 -1
  163. package/3D/controls/nearMenu.d.ts +44 -44
  164. package/3D/controls/nearMenu.js +114 -112
  165. package/3D/controls/nearMenu.js.map +1 -1
  166. package/3D/controls/planePanel.d.ts +9 -9
  167. package/3D/controls/planePanel.js +36 -36
  168. package/3D/controls/planePanel.js.map +1 -1
  169. package/3D/controls/scatterPanel.d.ts +18 -18
  170. package/3D/controls/scatterPanel.js +108 -108
  171. package/3D/controls/scatterPanel.js.map +1 -1
  172. package/3D/controls/slider3D.d.ts +81 -80
  173. package/3D/controls/slider3D.js +268 -267
  174. package/3D/controls/slider3D.js.map +1 -1
  175. package/3D/controls/spherePanel.d.ts +17 -17
  176. package/3D/controls/spherePanel.js +67 -67
  177. package/3D/controls/spherePanel.js.map +1 -1
  178. package/3D/controls/stackPanel3D.d.ts +22 -22
  179. package/3D/controls/stackPanel3D.js +107 -107
  180. package/3D/controls/stackPanel3D.js.map +1 -1
  181. package/3D/controls/touchButton3D.d.ts +80 -64
  182. package/3D/controls/touchButton3D.js +233 -188
  183. package/3D/controls/touchButton3D.js.map +1 -1
  184. package/3D/controls/touchHolographicButton.d.ts +110 -104
  185. package/3D/controls/touchHolographicButton.js +445 -432
  186. package/3D/controls/touchHolographicButton.js.map +1 -1
  187. package/3D/controls/touchHolographicMenu.d.ts +61 -61
  188. package/3D/controls/touchHolographicMenu.js +149 -148
  189. package/3D/controls/touchHolographicMenu.js.map +1 -1
  190. package/3D/controls/touchMeshButton3D.d.ts +21 -22
  191. package/3D/controls/touchMeshButton3D.js +62 -62
  192. package/3D/controls/touchMeshButton3D.js.map +1 -1
  193. package/3D/controls/volumeBasedPanel.d.ts +53 -52
  194. package/3D/controls/volumeBasedPanel.js +174 -174
  195. package/3D/controls/volumeBasedPanel.js.map +1 -1
  196. package/3D/gizmos/gizmoHandle.d.ts +108 -108
  197. package/3D/gizmos/gizmoHandle.js +209 -209
  198. package/3D/gizmos/gizmoHandle.js.map +1 -1
  199. package/3D/gizmos/index.d.ts +2 -2
  200. package/3D/gizmos/index.js +2 -2
  201. package/3D/gizmos/index.js.map +1 -1
  202. package/3D/gizmos/slateGizmo.d.ts +57 -59
  203. package/3D/gizmos/slateGizmo.js +369 -363
  204. package/3D/gizmos/slateGizmo.js.map +1 -1
  205. package/3D/gui3DManager.d.ts +94 -94
  206. package/3D/gui3DManager.js +257 -257
  207. package/3D/gui3DManager.js.map +1 -1
  208. package/3D/index.d.ts +5 -5
  209. package/3D/index.js +6 -5
  210. package/3D/index.js.map +1 -1
  211. package/3D/materials/fluent/fluentMaterial.d.ts +91 -90
  212. package/3D/materials/fluent/fluentMaterial.js +292 -281
  213. package/3D/materials/fluent/fluentMaterial.js.map +1 -1
  214. package/3D/materials/fluent/index.d.ts +1 -1
  215. package/3D/materials/fluent/index.js +1 -1
  216. package/3D/materials/fluent/index.js.map +1 -1
  217. package/3D/materials/fluent/shaders/fluent.fragment.d.ts +5 -5
  218. package/3D/materials/fluent/shaders/fluent.fragment.js +8 -6
  219. package/3D/materials/fluent/shaders/fluent.fragment.js.map +1 -1
  220. package/3D/materials/fluent/shaders/fluent.vertex.d.ts +5 -5
  221. package/3D/materials/fluent/shaders/fluent.vertex.js +8 -6
  222. package/3D/materials/fluent/shaders/fluent.vertex.js.map +1 -1
  223. package/3D/materials/fluentBackplate/fluentBackplateMaterial.d.ts +155 -154
  224. package/3D/materials/fluentBackplate/fluentBackplateMaterial.js +469 -434
  225. package/3D/materials/fluentBackplate/fluentBackplateMaterial.js.map +1 -1
  226. package/3D/materials/fluentBackplate/index.d.ts +1 -1
  227. package/3D/materials/fluentBackplate/index.js +1 -1
  228. package/3D/materials/fluentBackplate/index.js.map +1 -1
  229. package/3D/materials/fluentBackplate/shaders/fluentBackplate.fragment.d.ts +5 -5
  230. package/3D/materials/fluentBackplate/shaders/fluentBackplate.fragment.js +8 -6
  231. package/3D/materials/fluentBackplate/shaders/fluentBackplate.fragment.js.map +1 -1
  232. package/3D/materials/fluentBackplate/shaders/fluentBackplate.vertex.d.ts +5 -5
  233. package/3D/materials/fluentBackplate/shaders/fluentBackplate.vertex.js +8 -6
  234. package/3D/materials/fluentBackplate/shaders/fluentBackplate.vertex.js.map +1 -1
  235. package/3D/materials/fluentButton/fluentButtonMaterial.d.ts +190 -189
  236. package/3D/materials/fluentButton/fluentButtonMaterial.js +539 -537
  237. package/3D/materials/fluentButton/fluentButtonMaterial.js.map +1 -1
  238. package/3D/materials/fluentButton/index.d.ts +1 -1
  239. package/3D/materials/fluentButton/index.js +1 -1
  240. package/3D/materials/fluentButton/index.js.map +1 -1
  241. package/3D/materials/fluentButton/shaders/fluentButton.fragment.d.ts +5 -5
  242. package/3D/materials/fluentButton/shaders/fluentButton.fragment.js +8 -6
  243. package/3D/materials/fluentButton/shaders/fluentButton.fragment.js.map +1 -1
  244. package/3D/materials/fluentButton/shaders/fluentButton.vertex.d.ts +5 -5
  245. package/3D/materials/fluentButton/shaders/fluentButton.vertex.js +8 -6
  246. package/3D/materials/fluentButton/shaders/fluentButton.vertex.js.map +1 -1
  247. package/3D/materials/fluentMaterial.d.ts +4 -4
  248. package/3D/materials/fluentMaterial.js +4 -4
  249. package/3D/materials/fluentMaterial.js.map +1 -1
  250. package/3D/materials/handle/handleMaterial.d.ts +68 -68
  251. package/3D/materials/handle/handleMaterial.js +126 -126
  252. package/3D/materials/handle/handleMaterial.js.map +1 -1
  253. package/3D/materials/handle/index.d.ts +1 -1
  254. package/3D/materials/handle/index.js +1 -1
  255. package/3D/materials/handle/index.js.map +1 -1
  256. package/3D/materials/handle/shaders/handle.fragment.d.ts +5 -5
  257. package/3D/materials/handle/shaders/handle.fragment.js +8 -6
  258. package/3D/materials/handle/shaders/handle.fragment.js.map +1 -1
  259. package/3D/materials/handle/shaders/handle.vertex.d.ts +5 -5
  260. package/3D/materials/handle/shaders/handle.vertex.js +8 -6
  261. package/3D/materials/handle/shaders/handle.vertex.js.map +1 -1
  262. package/3D/materials/index.d.ts +5 -5
  263. package/3D/materials/index.js +6 -5
  264. package/3D/materials/index.js.map +1 -1
  265. package/3D/materials/mrdl/index.d.ts +3 -3
  266. package/3D/materials/mrdl/index.js +3 -3
  267. package/3D/materials/mrdl/index.js.map +1 -1
  268. package/3D/materials/mrdl/mrdlBackplateMaterial.d.ts +148 -147
  269. package/3D/materials/mrdl/mrdlBackplateMaterial.js +436 -409
  270. package/3D/materials/mrdl/mrdlBackplateMaterial.js.map +1 -1
  271. package/3D/materials/mrdl/mrdlSliderBarMaterial.d.ts +334 -333
  272. package/3D/materials/mrdl/mrdlSliderBarMaterial.js +851 -786
  273. package/3D/materials/mrdl/mrdlSliderBarMaterial.js.map +1 -1
  274. package/3D/materials/mrdl/mrdlSliderThumbMaterial.d.ts +334 -333
  275. package/3D/materials/mrdl/mrdlSliderThumbMaterial.js +851 -786
  276. package/3D/materials/mrdl/mrdlSliderThumbMaterial.js.map +1 -1
  277. package/3D/materials/mrdl/shaders/mrdlBackplate.fragment.d.ts +5 -5
  278. package/3D/materials/mrdl/shaders/mrdlBackplate.fragment.js +8 -6
  279. package/3D/materials/mrdl/shaders/mrdlBackplate.fragment.js.map +1 -1
  280. package/3D/materials/mrdl/shaders/mrdlBackplate.vertex.d.ts +5 -5
  281. package/3D/materials/mrdl/shaders/mrdlBackplate.vertex.js +8 -6
  282. package/3D/materials/mrdl/shaders/mrdlBackplate.vertex.js.map +1 -1
  283. package/3D/materials/mrdl/shaders/mrdlSliderBar.fragment.d.ts +5 -5
  284. package/3D/materials/mrdl/shaders/mrdlSliderBar.fragment.js +8 -6
  285. package/3D/materials/mrdl/shaders/mrdlSliderBar.fragment.js.map +1 -1
  286. package/3D/materials/mrdl/shaders/mrdlSliderBar.vertex.d.ts +5 -5
  287. package/3D/materials/mrdl/shaders/mrdlSliderBar.vertex.js +8 -6
  288. package/3D/materials/mrdl/shaders/mrdlSliderBar.vertex.js.map +1 -1
  289. package/3D/materials/mrdl/shaders/mrdlSliderThumb.fragment.d.ts +5 -5
  290. package/3D/materials/mrdl/shaders/mrdlSliderThumb.fragment.js +8 -6
  291. package/3D/materials/mrdl/shaders/mrdlSliderThumb.fragment.js.map +1 -1
  292. package/3D/materials/mrdl/shaders/mrdlSliderThumb.vertex.d.ts +5 -5
  293. package/3D/materials/mrdl/shaders/mrdlSliderThumb.vertex.js +8 -6
  294. package/3D/materials/mrdl/shaders/mrdlSliderThumb.vertex.js.map +1 -1
  295. package/3D/vector3WithInfo.d.ts +16 -16
  296. package/3D/vector3WithInfo.js +23 -23
  297. package/3D/vector3WithInfo.js.map +1 -1
  298. package/index.d.ts +2 -2
  299. package/index.js +3 -2
  300. package/index.js.map +1 -1
  301. package/legacy/legacy.d.ts +1 -1
  302. package/legacy/legacy.js +14 -13
  303. package/legacy/legacy.js.map +1 -1
  304. package/package.json +21 -328
  305. package/readme.md +2 -2
@@ -1,412 +1,449 @@
1
- import { Nullable } from "@babylonjs/core/types";
2
- import { Observable } from "@babylonjs/core/Misc/observable";
3
- import { Vector2, Vector3, Matrix } from "@babylonjs/core/Maths/math.vector";
4
- import { ClipboardInfo } from "@babylonjs/core/Events/clipboardEvents";
5
- import { DynamicTexture } from "@babylonjs/core/Materials/Textures/dynamicTexture";
6
- import { AbstractMesh } from "@babylonjs/core/Meshes/abstractMesh";
7
- import { Layer } from "@babylonjs/core/Layers/layer";
8
- import { Scene } from "@babylonjs/core/scene";
9
- import { Container } from "./controls/container";
10
- import { Control } from "./controls/control";
11
- import { IFocusableControl } from "./controls/focusableControl";
12
- import { Style } from "./style";
13
- import { Viewport } from "@babylonjs/core/Maths/math.viewport";
14
- /**
15
- * Class used to create texture to support 2D GUI elements
16
- * @see https://doc.babylonjs.com/how_to/gui
17
- */
18
- export declare class AdvancedDynamicTexture extends DynamicTexture {
19
- /** Define the Uurl to load snippets */
20
- static SnippetUrl: string;
21
- /** Indicates if some optimizations can be performed in GUI GPU management (the downside is additional memory/GPU texture memory used) */
22
- static AllowGPUOptimizations: boolean;
23
- /** Snippet ID if the content was created from the snippet server */
24
- snippetId: string;
25
- private _isDirty;
26
- private _renderObserver;
27
- private _resizeObserver;
28
- private _preKeyboardObserver;
29
- private _pointerMoveObserver;
30
- private _pointerObserver;
31
- private _canvasPointerOutObserver;
32
- private _canvasBlurObserver;
33
- private _background;
34
- /** @hidden */
35
- _rootContainer: Container;
36
- /** @hidden */
37
- _lastPickedControl: Control;
38
- /** @hidden */
39
- _lastControlOver: {
40
- [pointerId: number]: Control;
41
- };
42
- /** @hidden */
43
- _lastControlDown: {
44
- [pointerId: number]: Control;
45
- };
46
- /** @hidden */
47
- _capturingControl: {
48
- [pointerId: number]: Control;
49
- };
50
- /** @hidden */
51
- _shouldBlockPointer: boolean;
52
- /** @hidden */
53
- _layerToDispose: Nullable<Layer>;
54
- /** @hidden */
55
- _linkedControls: Control[];
56
- private _isFullscreen;
57
- private _fullscreenViewport;
58
- private _idealWidth;
59
- private _idealHeight;
60
- private _useSmallestIdeal;
61
- private _renderAtIdealSize;
62
- private _focusedControl;
63
- private _blockNextFocusCheck;
64
- private _renderScale;
65
- private _rootElement;
66
- private _cursorChanged;
67
- private _defaultMousePointerId;
68
- /** @hidden */
69
- _numLayoutCalls: number;
70
- /** Gets the number of layout calls made the last time the ADT has been rendered */
71
- get numLayoutCalls(): number;
72
- /** @hidden */
73
- _numRenderCalls: number;
74
- /** Gets the number of render calls made the last time the ADT has been rendered */
75
- get numRenderCalls(): number;
76
- /**
77
- * Define type to string to ensure compatibility across browsers
78
- * Safari doesn't support DataTransfer constructor
79
- */
80
- private _clipboardData;
81
- /**
82
- * Observable event triggered each time an clipboard event is received from the rendering canvas
83
- */
84
- onClipboardObservable: Observable<ClipboardInfo>;
85
- /**
86
- * Observable event triggered each time a pointer down is intercepted by a control
87
- */
88
- onControlPickedObservable: Observable<Control>;
89
- /**
90
- * Observable event triggered before layout is evaluated
91
- */
92
- onBeginLayoutObservable: Observable<AdvancedDynamicTexture>;
93
- /**
94
- * Observable event triggered after the layout was evaluated
95
- */
96
- onEndLayoutObservable: Observable<AdvancedDynamicTexture>;
97
- /**
98
- * Observable event triggered before the texture is rendered
99
- */
100
- onBeginRenderObservable: Observable<AdvancedDynamicTexture>;
101
- /**
102
- * Observable event triggered after the texture was rendered
103
- */
104
- onEndRenderObservable: Observable<AdvancedDynamicTexture>;
105
- /**
106
- * Gets or sets a boolean defining if alpha is stored as premultiplied
107
- */
108
- premulAlpha: boolean;
109
- /**
110
- * Gets or sets a boolean indicating that the canvas must be reverted on Y when updating the texture
111
- */
112
- applyYInversionOnUpdate: boolean;
113
- /**
114
- * Gets or sets a number used to scale rendering size (2 means that the texture will be twice bigger).
115
- * Useful when you want more antialiasing
116
- */
117
- get renderScale(): number;
118
- set renderScale(value: number);
119
- /** Gets or sets the background color */
120
- get background(): string;
121
- set background(value: string);
122
- /**
123
- * Gets or sets the ideal width used to design controls.
124
- * The GUI will then rescale everything accordingly
125
- * @see https://doc.babylonjs.com/how_to/gui#adaptive-scaling
126
- */
127
- get idealWidth(): number;
128
- set idealWidth(value: number);
129
- /**
130
- * Gets or sets the ideal height used to design controls.
131
- * The GUI will then rescale everything accordingly
132
- * @see https://doc.babylonjs.com/how_to/gui#adaptive-scaling
133
- */
134
- get idealHeight(): number;
135
- set idealHeight(value: number);
136
- /**
137
- * Gets or sets a boolean indicating if the smallest ideal value must be used if idealWidth and idealHeight are both set
138
- * @see https://doc.babylonjs.com/how_to/gui#adaptive-scaling
139
- */
140
- get useSmallestIdeal(): boolean;
141
- set useSmallestIdeal(value: boolean);
142
- /**
143
- * Gets or sets a boolean indicating if adaptive scaling must be used
144
- * @see https://doc.babylonjs.com/how_to/gui#adaptive-scaling
145
- */
146
- get renderAtIdealSize(): boolean;
147
- set renderAtIdealSize(value: boolean);
148
- /**
149
- * Gets the ratio used when in "ideal mode"
150
- * @see https://doc.babylonjs.com/how_to/gui#adaptive-scaling
151
- * */
152
- get idealRatio(): number;
153
- /**
154
- * Gets the underlying layer used to render the texture when in fullscreen mode
155
- */
156
- get layer(): Nullable<Layer>;
157
- /**
158
- * Gets the root container control
159
- */
160
- get rootContainer(): Container;
161
- /**
162
- * Returns an array containing the root container.
163
- * This is mostly used to let the Inspector introspects the ADT
164
- * @returns an array containing the rootContainer
165
- */
166
- getChildren(): Array<Container>;
167
- /**
168
- * Will return all controls that are inside this texture
169
- * @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
170
- * @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
171
- * @return all child controls
172
- */
173
- getDescendants(directDescendantsOnly?: boolean, predicate?: (control: Control) => boolean): Control[];
174
- /**
175
- * Will return all controls with the given type name
176
- * @param typeName defines the type name to search for
177
- * @returns an array of all controls found
178
- */
179
- getControlsByType(typeName: string): Control[];
180
- /**
181
- * Will return the first control with the given name
182
- * @param name defines the name to search for
183
- * @return the first control found or null
184
- */
185
- getControlByName(name: string): Nullable<Control>;
186
- private _getControlByKey;
187
- /**
188
- * Gets or sets the current focused control
189
- */
190
- get focusedControl(): Nullable<IFocusableControl>;
191
- set focusedControl(control: Nullable<IFocusableControl>);
192
- /**
193
- * Gets or sets a boolean indicating if the texture must be rendered in background or foreground when in fullscreen mode
194
- */
195
- get isForeground(): boolean;
196
- set isForeground(value: boolean);
197
- /**
198
- * Gets or set information about clipboardData
199
- */
200
- get clipboardData(): string;
201
- set clipboardData(value: string);
202
- /**
203
- * Creates a new AdvancedDynamicTexture
204
- * @param name defines the name of the texture
205
- * @param width defines the width of the texture
206
- * @param height defines the height of the texture
207
- * @param scene defines the hosting scene
208
- * @param generateMipMaps defines a boolean indicating if mipmaps must be generated (false by default)
209
- * @param samplingMode defines the texture sampling mode (Texture.NEAREST_SAMPLINGMODE by default)
210
- * @param invertY defines if the texture needs to be inverted on the y axis during loading (true by default)
211
- */
212
- constructor(name: string, width?: number, height?: number, scene?: Nullable<Scene>, generateMipMaps?: boolean, samplingMode?: number, invertY?: boolean);
213
- /**
214
- * Get the current class name of the texture useful for serialization or dynamic coding.
215
- * @returns "AdvancedDynamicTexture"
216
- */
217
- getClassName(): string;
218
- /**
219
- * Function used to execute a function on all controls
220
- * @param func defines the function to execute
221
- * @param container defines the container where controls belong. If null the root container will be used
222
- */
223
- executeOnAllControls(func: (control: Control) => void, container?: Container): void;
224
- private _useInvalidateRectOptimization;
225
- /**
226
- * Gets or sets a boolean indicating if the InvalidateRect optimization should be turned on
227
- */
228
- get useInvalidateRectOptimization(): boolean;
229
- set useInvalidateRectOptimization(value: boolean);
230
- private _invalidatedRectangle;
231
- /**
232
- * Invalidates a rectangle area on the gui texture
233
- * @param invalidMinX left most position of the rectangle to invalidate in the texture
234
- * @param invalidMinY top most position of the rectangle to invalidate in the texture
235
- * @param invalidMaxX right most position of the rectangle to invalidate in the texture
236
- * @param invalidMaxY bottom most position of the rectangle to invalidate in the texture
237
- */
238
- invalidateRect(invalidMinX: number, invalidMinY: number, invalidMaxX: number, invalidMaxY: number): void;
239
- /**
240
- * Marks the texture as dirty forcing a complete update
241
- */
242
- markAsDirty(): void;
243
- /**
244
- * Helper function used to create a new style
245
- * @returns a new style
246
- * @see https://doc.babylonjs.com/how_to/gui#styles
247
- */
248
- createStyle(): Style;
249
- /**
250
- * Adds a new control to the root container
251
- * @param control defines the control to add
252
- * @returns the current texture
253
- */
254
- addControl(control: Control): AdvancedDynamicTexture;
255
- /**
256
- * Removes a control from the root container
257
- * @param control defines the control to remove
258
- * @returns the current texture
259
- */
260
- removeControl(control: Control): AdvancedDynamicTexture;
261
- /**
262
- * Moves overlapped controls towards a position where it is not overlapping anymore.
263
- * Please note that this method alters linkOffsetXInPixels and linkOffsetYInPixels.
264
- * @param overlapGroup the overlap group which will be processed or undefined to process all overlap groups
265
- * @param deltaStep the step size (speed) to reach the target non overlapping position (default 0.1)
266
- * @param repelFactor how much is the control repelled by other controls
267
- */
268
- moveToNonOverlappedPosition(overlapGroup?: number | Control[], deltaStep?: number, repelFactor?: number): void;
269
- /**
270
- * Release all resources
271
- */
272
- dispose(): void;
273
- private _onResize;
274
- /** @hidden */
275
- _getGlobalViewport(): Viewport;
276
- /**
277
- * Get screen coordinates for a vector3
278
- * @param position defines the position to project
279
- * @param worldMatrix defines the world matrix to use
280
- * @returns the projected position
281
- */
282
- getProjectedPosition(position: Vector3, worldMatrix: Matrix): Vector2;
283
- /**
284
- * Get screen coordinates for a vector3
285
- * @param position defines the position to project
286
- * @param worldMatrix defines the world matrix to use
287
- * @returns the projected position with Z
288
- */
289
- getProjectedPositionWithZ(position: Vector3, worldMatrix: Matrix): Vector3;
290
- private _checkUpdate;
291
- private _clearMeasure;
292
- private _render;
293
- /** @hidden */
294
- _changeCursor(cursor: string): void;
295
- /** @hidden */
296
- _registerLastControlDown(control: Control, pointerId: number): void;
297
- private _doPicking;
298
- /** @hidden */
299
- _cleanControlAfterRemovalFromList(list: {
300
- [pointerId: number]: Control;
301
- }, control: Control): void;
302
- /** @hidden */
303
- _cleanControlAfterRemoval(control: Control): void;
304
- /** Attach to all scene events required to support pointer events */
305
- attach(): void;
306
- /** @hidden */
307
- private onClipboardCopy;
308
- /** @hidden */
309
- private onClipboardCut;
310
- /** @hidden */
311
- private onClipboardPaste;
312
- /**
313
- * Register the clipboard Events onto the canvas
314
- */
315
- registerClipboardEvents(): void;
316
- /**
317
- * Unregister the clipboard Events from the canvas
318
- */
319
- unRegisterClipboardEvents(): void;
320
- /**
321
- * Connect the texture to a hosting mesh to enable interactions
322
- * @param mesh defines the mesh to attach to
323
- * @param supportPointerMove defines a boolean indicating if pointer move events must be catched as well
324
- */
325
- attachToMesh(mesh: AbstractMesh, supportPointerMove?: boolean): void;
326
- /**
327
- * Move the focus to a specific control
328
- * @param control defines the control which will receive the focus
329
- */
330
- moveFocusToControl(control: IFocusableControl): void;
331
- private _manageFocus;
332
- private _attachToOnPointerOut;
333
- private _attachToOnBlur;
334
- /**
335
- * Serializes the entire GUI system
336
- * @returns an object with the JSON serialized data
337
- */
338
- serializeContent(): any;
339
- /**
340
- * Recreate the content of the ADT from a JSON object
341
- * @param serializedObject define the JSON serialized object to restore from
342
- * @param scaleToSize defines whether to scale to texture to the saved size
343
- */
344
- parseContent(serializedObject: any, scaleToSize?: boolean): void;
345
- /**
346
- * Recreate the content of the ADT from a snippet saved by the GUI editor
347
- * @param snippetId defines the snippet to load
348
- * @param scaleToSize defines whether to scale to texture to the saved size
349
- * @returns a promise that will resolve on success
350
- */
351
- parseFromSnippetAsync(snippetId: string, scaleToSize?: boolean): Promise<void>;
352
- /**
353
- * Recreate the content of the ADT from a url json
354
- * @param url defines the url to load
355
- * @param scaleToSize defines whether to scale to texture to the saved size
356
- * @returns a promise that will resolve on success
357
- */
358
- parseFromURLAsync(url: string, scaleToSize?: boolean): Promise<void>;
359
- /**
360
- * Compares two rectangle based controls for pixel overlap
361
- * @param control1 The first control to compare
362
- * @param control2 The second control to compare
363
- * @returns true if overlaps, otherwise false
364
- */
365
- private static _Overlaps;
366
- /**
367
- * Creates a new AdvancedDynamicTexture in projected mode (ie. attached to a mesh)
368
- * @param mesh defines the mesh which will receive the texture
369
- * @param width defines the texture width (1024 by default)
370
- * @param height defines the texture height (1024 by default)
371
- * @param supportPointerMove defines a boolean indicating if the texture must capture move events (true by default)
372
- * @param onlyAlphaTesting defines a boolean indicating that alpha blending will not be used (only alpha testing) (false by default)
373
- * @param invertY defines if the texture needs to be inverted on the y axis during loading (true by default)
374
- * @returns a new AdvancedDynamicTexture
375
- */
376
- static CreateForMesh(mesh: AbstractMesh, width?: number, height?: number, supportPointerMove?: boolean, onlyAlphaTesting?: boolean, invertY?: boolean): AdvancedDynamicTexture;
377
- /**
378
- * Creates a new AdvancedDynamicTexture in projected mode (ie. attached to a mesh) BUT do not create a new material for the mesh. You will be responsible for connecting the texture
379
- * @param mesh defines the mesh which will receive the texture
380
- * @param width defines the texture width (1024 by default)
381
- * @param height defines the texture height (1024 by default)
382
- * @param supportPointerMove defines a boolean indicating if the texture must capture move events (true by default)
383
- * @param invertY defines if the texture needs to be inverted on the y axis during loading (true by default)
384
- * @returns a new AdvancedDynamicTexture
385
- */
386
- static CreateForMeshTexture(mesh: AbstractMesh, width?: number, height?: number, supportPointerMove?: boolean, invertY?: boolean): AdvancedDynamicTexture;
387
- /**
388
- * Creates a new AdvancedDynamicTexture in fullscreen mode.
389
- * In this mode the texture will rely on a layer for its rendering.
390
- * This allows it to be treated like any other layer.
391
- * As such, if you have a multi camera setup, you can set the layerMask on the GUI as well.
392
- * LayerMask is set through advancedTexture.layer.layerMask
393
- * @param name defines name for the texture
394
- * @param foreground defines a boolean indicating if the texture must be rendered in foreground (default is true)
395
- * @param scene defines the hosting scene
396
- * @param sampling defines the texture sampling mode (Texture.BILINEAR_SAMPLINGMODE by default)
397
- * @param adaptiveScaling defines whether to automatically scale root to match hardwarescaling (false by default)
398
- * @returns a new AdvancedDynamicTexture
399
- */
400
- static CreateFullscreenUI(name: string, foreground?: boolean, scene?: Nullable<Scene>, sampling?: number, adaptiveScaling?: boolean): AdvancedDynamicTexture;
401
- /**
402
- * Scales the texture
403
- * @param ratio the scale factor to apply to both width and height
404
- */
405
- scale(ratio: number): void;
406
- /**
407
- * Resizes the texture
408
- * @param width the new width
409
- * @param height the new height
410
- */
411
- scaleTo(width: number, height: number): void;
412
- }
1
+ import type { Nullable } from "@babylonjs/core/types.js";
2
+ import { Observable } from "@babylonjs/core/Misc/observable.js";
3
+ import type { Matrix } from "@babylonjs/core/Maths/math.vector.js";
4
+ import { Vector2, Vector3 } from "@babylonjs/core/Maths/math.vector.js";
5
+ import { ClipboardInfo } from "@babylonjs/core/Events/clipboardEvents.js";
6
+ import { DynamicTexture } from "@babylonjs/core/Materials/Textures/dynamicTexture.js";
7
+ import type { AbstractMesh } from "@babylonjs/core/Meshes/abstractMesh.js";
8
+ import { Layer } from "@babylonjs/core/Layers/layer.js";
9
+ import type { Scene } from "@babylonjs/core/scene.js";
10
+ import { Container } from "./controls/container";
11
+ import { Control } from "./controls/control";
12
+ import { IFocusableControl } from "./controls/focusableControl";
13
+ import { Style } from "./style";
14
+ import { Viewport } from "@babylonjs/core/Maths/math.viewport.js";
15
+ /**
16
+ * Class used to create texture to support 2D GUI elements
17
+ * @see https://doc.babylonjs.com/how_to/gui
18
+ */
19
+ export declare class AdvancedDynamicTexture extends DynamicTexture {
20
+ /** Define the Uurl to load snippets */
21
+ static SnippetUrl: string;
22
+ /** Indicates if some optimizations can be performed in GUI GPU management (the downside is additional memory/GPU texture memory used) */
23
+ static AllowGPUOptimizations: boolean;
24
+ /** Snippet ID if the content was created from the snippet server */
25
+ snippetId: string;
26
+ private _isDirty;
27
+ private _renderObserver;
28
+ private _resizeObserver;
29
+ private _preKeyboardObserver;
30
+ private _pointerMoveObserver;
31
+ private _sceneRenderObserver;
32
+ private _pointerObserver;
33
+ private _canvasPointerOutObserver;
34
+ private _canvasBlurObserver;
35
+ private _background;
36
+ /** @hidden */
37
+ _rootContainer: Container;
38
+ /** @hidden */
39
+ _lastPickedControl: Control;
40
+ /** @hidden */
41
+ _lastControlOver: {
42
+ [pointerId: number]: Control;
43
+ };
44
+ /** @hidden */
45
+ _lastControlDown: {
46
+ [pointerId: number]: Control;
47
+ };
48
+ /** @hidden */
49
+ _capturingControl: {
50
+ [pointerId: number]: Control;
51
+ };
52
+ /** @hidden */
53
+ _shouldBlockPointer: boolean;
54
+ /** @hidden */
55
+ _layerToDispose: Nullable<Layer>;
56
+ /** @hidden */
57
+ _linkedControls: Control[];
58
+ private _isFullscreen;
59
+ private _fullscreenViewport;
60
+ private _idealWidth;
61
+ private _idealHeight;
62
+ private _useSmallestIdeal;
63
+ private _renderAtIdealSize;
64
+ private _focusedControl;
65
+ private _blockNextFocusCheck;
66
+ private _renderScale;
67
+ private _rootElement;
68
+ private _cursorChanged;
69
+ private _defaultMousePointerId;
70
+ /** @hidden */
71
+ _numLayoutCalls: number;
72
+ /** Gets the number of layout calls made the last time the ADT has been rendered */
73
+ get numLayoutCalls(): number;
74
+ /** @hidden */
75
+ _numRenderCalls: number;
76
+ /** Gets the number of render calls made the last time the ADT has been rendered */
77
+ get numRenderCalls(): number;
78
+ /**
79
+ * Define type to string to ensure compatibility across browsers
80
+ * Safari doesn't support DataTransfer constructor
81
+ */
82
+ private _clipboardData;
83
+ /**
84
+ * Observable event triggered each time an clipboard event is received from the rendering canvas
85
+ */
86
+ onClipboardObservable: Observable<ClipboardInfo>;
87
+ /**
88
+ * Observable event triggered each time a pointer down is intercepted by a control
89
+ */
90
+ onControlPickedObservable: Observable<Control>;
91
+ /**
92
+ * Observable event triggered before layout is evaluated
93
+ */
94
+ onBeginLayoutObservable: Observable<AdvancedDynamicTexture>;
95
+ /**
96
+ * Observable event triggered after the layout was evaluated
97
+ */
98
+ onEndLayoutObservable: Observable<AdvancedDynamicTexture>;
99
+ /**
100
+ * Observable event triggered before the texture is rendered
101
+ */
102
+ onBeginRenderObservable: Observable<AdvancedDynamicTexture>;
103
+ /**
104
+ * Observable event triggered after the texture was rendered
105
+ */
106
+ onEndRenderObservable: Observable<AdvancedDynamicTexture>;
107
+ /**
108
+ * Gets or sets a boolean defining if alpha is stored as premultiplied
109
+ */
110
+ premulAlpha: boolean;
111
+ /**
112
+ * Gets or sets a boolean indicating that the canvas must be reverted on Y when updating the texture
113
+ */
114
+ applyYInversionOnUpdate: boolean;
115
+ /**
116
+ * Gets or sets a number used to scale rendering size (2 means that the texture will be twice bigger).
117
+ * Useful when you want more antialiasing
118
+ */
119
+ get renderScale(): number;
120
+ set renderScale(value: number);
121
+ /** Gets or sets the background color */
122
+ get background(): string;
123
+ set background(value: string);
124
+ /**
125
+ * Gets or sets the ideal width used to design controls.
126
+ * The GUI will then rescale everything accordingly
127
+ * @see https://doc.babylonjs.com/how_to/gui#adaptive-scaling
128
+ */
129
+ get idealWidth(): number;
130
+ set idealWidth(value: number);
131
+ /**
132
+ * Gets or sets the ideal height used to design controls.
133
+ * The GUI will then rescale everything accordingly
134
+ * @see https://doc.babylonjs.com/how_to/gui#adaptive-scaling
135
+ */
136
+ get idealHeight(): number;
137
+ set idealHeight(value: number);
138
+ /**
139
+ * Gets or sets a boolean indicating if the smallest ideal value must be used if idealWidth and idealHeight are both set
140
+ * @see https://doc.babylonjs.com/how_to/gui#adaptive-scaling
141
+ */
142
+ get useSmallestIdeal(): boolean;
143
+ set useSmallestIdeal(value: boolean);
144
+ /**
145
+ * Gets or sets a boolean indicating if adaptive scaling must be used
146
+ * @see https://doc.babylonjs.com/how_to/gui#adaptive-scaling
147
+ */
148
+ get renderAtIdealSize(): boolean;
149
+ set renderAtIdealSize(value: boolean);
150
+ /**
151
+ * Gets the ratio used when in "ideal mode"
152
+ * @see https://doc.babylonjs.com/how_to/gui#adaptive-scaling
153
+ * */
154
+ get idealRatio(): number;
155
+ /**
156
+ * Gets the underlying layer used to render the texture when in fullscreen mode
157
+ */
158
+ get layer(): Nullable<Layer>;
159
+ /**
160
+ * Gets the root container control
161
+ */
162
+ get rootContainer(): Container;
163
+ /**
164
+ * Returns an array containing the root container.
165
+ * This is mostly used to let the Inspector introspects the ADT
166
+ * @returns an array containing the rootContainer
167
+ */
168
+ getChildren(): Array<Container>;
169
+ /**
170
+ * Will return all controls that are inside this texture
171
+ * @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
172
+ * @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
173
+ * @return all child controls
174
+ */
175
+ getDescendants(directDescendantsOnly?: boolean, predicate?: (control: Control) => boolean): Control[];
176
+ /**
177
+ * Will return all controls with the given type name
178
+ * @param typeName defines the type name to search for
179
+ * @returns an array of all controls found
180
+ */
181
+ getControlsByType(typeName: string): Control[];
182
+ /**
183
+ * Will return the first control with the given name
184
+ * @param name defines the name to search for
185
+ * @return the first control found or null
186
+ */
187
+ getControlByName(name: string): Nullable<Control>;
188
+ private _getControlByKey;
189
+ /**
190
+ * Gets or sets the current focused control
191
+ */
192
+ get focusedControl(): Nullable<IFocusableControl>;
193
+ set focusedControl(control: Nullable<IFocusableControl>);
194
+ /**
195
+ * Gets or sets a boolean indicating if the texture must be rendered in background or foreground when in fullscreen mode
196
+ */
197
+ get isForeground(): boolean;
198
+ set isForeground(value: boolean);
199
+ /**
200
+ * Gets or set information about clipboardData
201
+ */
202
+ get clipboardData(): string;
203
+ set clipboardData(value: string);
204
+ /**
205
+ * If set to true, every scene render will trigger a pointer event for the GUI
206
+ * if it is linked to a mesh or has controls linked to a mesh. This will allow
207
+ * you to catch the pointer moving around the GUI due to camera or mesh movements,
208
+ * but it has a performance cost.
209
+ */
210
+ checkPointerEveryFrame: boolean;
211
+ /**
212
+ * Creates a new AdvancedDynamicTexture
213
+ * @param name defines the name of the texture
214
+ * @param width defines the width of the texture
215
+ * @param height defines the height of the texture
216
+ * @param scene defines the hosting scene
217
+ * @param generateMipMaps defines a boolean indicating if mipmaps must be generated (false by default)
218
+ * @param samplingMode defines the texture sampling mode (Texture.NEAREST_SAMPLINGMODE by default)
219
+ * @param invertY defines if the texture needs to be inverted on the y axis during loading (true by default)
220
+ */
221
+ constructor(name: string, width?: number, height?: number, scene?: Nullable<Scene>, generateMipMaps?: boolean, samplingMode?: number, invertY?: boolean);
222
+ /**
223
+ * Get the current class name of the texture useful for serialization or dynamic coding.
224
+ * @returns "AdvancedDynamicTexture"
225
+ */
226
+ getClassName(): string;
227
+ /**
228
+ * Function used to execute a function on all controls
229
+ * @param func defines the function to execute
230
+ * @param container defines the container where controls belong. If null the root container will be used
231
+ */
232
+ executeOnAllControls(func: (control: Control) => void, container?: Container): void;
233
+ private _useInvalidateRectOptimization;
234
+ /**
235
+ * Gets or sets a boolean indicating if the InvalidateRect optimization should be turned on
236
+ */
237
+ get useInvalidateRectOptimization(): boolean;
238
+ set useInvalidateRectOptimization(value: boolean);
239
+ private _invalidatedRectangle;
240
+ /**
241
+ * Invalidates a rectangle area on the gui texture
242
+ * @param invalidMinX left most position of the rectangle to invalidate in the texture
243
+ * @param invalidMinY top most position of the rectangle to invalidate in the texture
244
+ * @param invalidMaxX right most position of the rectangle to invalidate in the texture
245
+ * @param invalidMaxY bottom most position of the rectangle to invalidate in the texture
246
+ */
247
+ invalidateRect(invalidMinX: number, invalidMinY: number, invalidMaxX: number, invalidMaxY: number): void;
248
+ /**
249
+ * Marks the texture as dirty forcing a complete update
250
+ */
251
+ markAsDirty(): void;
252
+ /**
253
+ * Helper function used to create a new style
254
+ * @returns a new style
255
+ * @see https://doc.babylonjs.com/how_to/gui#styles
256
+ */
257
+ createStyle(): Style;
258
+ /**
259
+ * Adds a new control to the root container
260
+ * @param control defines the control to add
261
+ * @returns the current texture
262
+ */
263
+ addControl(control: Control): AdvancedDynamicTexture;
264
+ /**
265
+ * Removes a control from the root container
266
+ * @param control defines the control to remove
267
+ * @returns the current texture
268
+ */
269
+ removeControl(control: Control): AdvancedDynamicTexture;
270
+ /**
271
+ * Moves overlapped controls towards a position where it is not overlapping anymore.
272
+ * Please note that this method alters linkOffsetXInPixels and linkOffsetYInPixels.
273
+ * @param overlapGroup the overlap group which will be processed or undefined to process all overlap groups
274
+ * @param deltaStep the step size (speed) to reach the target non overlapping position (default 0.1)
275
+ * @param repelFactor how much is the control repelled by other controls
276
+ */
277
+ moveToNonOverlappedPosition(overlapGroup?: number | Control[], deltaStep?: number, repelFactor?: number): void;
278
+ /**
279
+ * Release all resources
280
+ */
281
+ dispose(): void;
282
+ private _onResize;
283
+ /** @hidden */
284
+ _getGlobalViewport(): Viewport;
285
+ /**
286
+ * Get screen coordinates for a vector3
287
+ * @param position defines the position to project
288
+ * @param worldMatrix defines the world matrix to use
289
+ * @returns the projected position
290
+ */
291
+ getProjectedPosition(position: Vector3, worldMatrix: Matrix): Vector2;
292
+ /**
293
+ * Get screen coordinates for a vector3
294
+ * @param position defines the position to project
295
+ * @param worldMatrix defines the world matrix to use
296
+ * @returns the projected position with Z
297
+ */
298
+ getProjectedPositionWithZ(position: Vector3, worldMatrix: Matrix): Vector3;
299
+ private _checkUpdate;
300
+ private _clearMeasure;
301
+ private _render;
302
+ /**
303
+ * @param cursor
304
+ * @hidden
305
+ */
306
+ _changeCursor(cursor: string): void;
307
+ /**
308
+ * @param control
309
+ * @param pointerId
310
+ * @hidden
311
+ */
312
+ _registerLastControlDown(control: Control, pointerId: number): void;
313
+ private _doPicking;
314
+ /**
315
+ * @param list
316
+ * @param control
317
+ * @hidden
318
+ */
319
+ _cleanControlAfterRemovalFromList(list: {
320
+ [pointerId: number]: Control;
321
+ }, control: Control): void;
322
+ /**
323
+ * @param control
324
+ * @hidden
325
+ */
326
+ _cleanControlAfterRemoval(control: Control): void;
327
+ private _translateToPicking;
328
+ /** Attach to all scene events required to support pointer events */
329
+ attach(): void;
330
+ /**
331
+ * @param rawEvt
332
+ * @hidden
333
+ */
334
+ private _onClipboardCopy;
335
+ /**
336
+ * @param rawEvt
337
+ * @hidden
338
+ */
339
+ private _onClipboardCut;
340
+ /**
341
+ * @param rawEvt
342
+ * @hidden
343
+ */
344
+ private _onClipboardPaste;
345
+ /**
346
+ * Register the clipboard Events onto the canvas
347
+ */
348
+ registerClipboardEvents(): void;
349
+ /**
350
+ * Unregister the clipboard Events from the canvas
351
+ */
352
+ unRegisterClipboardEvents(): void;
353
+ /**
354
+ * Connect the texture to a hosting mesh to enable interactions
355
+ * @param mesh defines the mesh to attach to
356
+ * @param supportPointerMove defines a boolean indicating if pointer move events must be catched as well
357
+ */
358
+ attachToMesh(mesh: AbstractMesh, supportPointerMove?: boolean): void;
359
+ /**
360
+ * Move the focus to a specific control
361
+ * @param control defines the control which will receive the focus
362
+ */
363
+ moveFocusToControl(control: IFocusableControl): void;
364
+ private _manageFocus;
365
+ private _attachPickingToSceneRender;
366
+ private _attachToOnPointerOut;
367
+ private _attachToOnBlur;
368
+ /**
369
+ * Serializes the entire GUI system
370
+ * @returns an object with the JSON serialized data
371
+ */
372
+ serializeContent(): any;
373
+ /**
374
+ * Recreate the content of the ADT from a JSON object
375
+ * @param serializedObject define the JSON serialized object to restore from
376
+ * @param scaleToSize defines whether to scale to texture to the saved size
377
+ */
378
+ parseContent(serializedObject: any, scaleToSize?: boolean): void;
379
+ /**
380
+ * Recreate the content of the ADT from a snippet saved by the GUI editor
381
+ * @param snippetId defines the snippet to load
382
+ * @param scaleToSize defines whether to scale to texture to the saved size
383
+ * @returns a promise that will resolve on success
384
+ */
385
+ parseFromSnippetAsync(snippetId: string, scaleToSize?: boolean): Promise<void>;
386
+ /**
387
+ * Recreate the content of the ADT from a url json
388
+ * @param url defines the url to load
389
+ * @param scaleToSize defines whether to scale to texture to the saved size
390
+ * @returns a promise that will resolve on success
391
+ */
392
+ parseFromURLAsync(url: string, scaleToSize?: boolean): Promise<void>;
393
+ /**
394
+ * Compares two rectangle based controls for pixel overlap
395
+ * @param control1 The first control to compare
396
+ * @param control2 The second control to compare
397
+ * @returns true if overlaps, otherwise false
398
+ */
399
+ private static _Overlaps;
400
+ /**
401
+ * Creates a new AdvancedDynamicTexture in projected mode (ie. attached to a mesh)
402
+ * @param mesh defines the mesh which will receive the texture
403
+ * @param width defines the texture width (1024 by default)
404
+ * @param height defines the texture height (1024 by default)
405
+ * @param supportPointerMove defines a boolean indicating if the texture must capture move events (true by default)
406
+ * @param onlyAlphaTesting defines a boolean indicating that alpha blending will not be used (only alpha testing) (false by default)
407
+ * @param invertY defines if the texture needs to be inverted on the y axis during loading (true by default)
408
+ * @param materialSetupCallback defines a custom way of creating and setting up the material on the mesh
409
+ * @returns a new AdvancedDynamicTexture
410
+ */
411
+ static CreateForMesh(mesh: AbstractMesh, width?: number, height?: number, supportPointerMove?: boolean, onlyAlphaTesting?: boolean, invertY?: boolean, materialSetupCallback?: (mesh: AbstractMesh, uniqueId: string, texture: AdvancedDynamicTexture, onlyAlphaTesting: boolean) => void): AdvancedDynamicTexture;
412
+ private static _CreateMaterial;
413
+ /**
414
+ * Creates a new AdvancedDynamicTexture in projected mode (ie. attached to a mesh) BUT do not create a new material for the mesh. You will be responsible for connecting the texture
415
+ * @param mesh defines the mesh which will receive the texture
416
+ * @param width defines the texture width (1024 by default)
417
+ * @param height defines the texture height (1024 by default)
418
+ * @param supportPointerMove defines a boolean indicating if the texture must capture move events (true by default)
419
+ * @param invertY defines if the texture needs to be inverted on the y axis during loading (true by default)
420
+ * @returns a new AdvancedDynamicTexture
421
+ */
422
+ static CreateForMeshTexture(mesh: AbstractMesh, width?: number, height?: number, supportPointerMove?: boolean, invertY?: boolean): AdvancedDynamicTexture;
423
+ /**
424
+ * Creates a new AdvancedDynamicTexture in fullscreen mode.
425
+ * In this mode the texture will rely on a layer for its rendering.
426
+ * This allows it to be treated like any other layer.
427
+ * As such, if you have a multi camera setup, you can set the layerMask on the GUI as well.
428
+ * LayerMask is set through advancedTexture.layer.layerMask
429
+ * @param name defines name for the texture
430
+ * @param foreground defines a boolean indicating if the texture must be rendered in foreground (default is true)
431
+ * @param scene defines the hosting scene
432
+ * @param sampling defines the texture sampling mode (Texture.BILINEAR_SAMPLINGMODE by default)
433
+ * @param adaptiveScaling defines whether to automatically scale root to match hardwarescaling (false by default)
434
+ * @returns a new AdvancedDynamicTexture
435
+ */
436
+ static CreateFullscreenUI(name: string, foreground?: boolean, scene?: Nullable<Scene>, sampling?: number, adaptiveScaling?: boolean): AdvancedDynamicTexture;
437
+ /**
438
+ * Scales the texture
439
+ * @param ratio the scale factor to apply to both width and height
440
+ */
441
+ scale(ratio: number): void;
442
+ /**
443
+ * Resizes the texture
444
+ * @param width the new width
445
+ * @param height the new height
446
+ */
447
+ scaleTo(width: number, height: number): void;
448
+ }
449
+ export { IFocusableControl };