@onerjs/gui 8.23.1

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 (354) hide show
  1. package/2D/FrameGraph/guiTask.d.ts +34 -0
  2. package/2D/FrameGraph/guiTask.js +62 -0
  3. package/2D/FrameGraph/guiTask.js.map +1 -0
  4. package/2D/FrameGraph/renderGraphGUIBlock.d.ts +43 -0
  5. package/2D/FrameGraph/renderGraphGUIBlock.js +66 -0
  6. package/2D/FrameGraph/renderGraphGUIBlock.js.map +1 -0
  7. package/2D/adtInstrumentation.d.ts +52 -0
  8. package/2D/adtInstrumentation.js +107 -0
  9. package/2D/adtInstrumentation.js.map +1 -0
  10. package/2D/advancedDynamicTexture.d.ts +548 -0
  11. package/2D/advancedDynamicTexture.js +1522 -0
  12. package/2D/advancedDynamicTexture.js.map +1 -0
  13. package/2D/controls/button.d.ts +109 -0
  14. package/2D/controls/button.js +246 -0
  15. package/2D/controls/button.js.map +1 -0
  16. package/2D/controls/checkbox.d.ts +53 -0
  17. package/2D/controls/checkbox.js +164 -0
  18. package/2D/controls/checkbox.js.map +1 -0
  19. package/2D/controls/colorpicker.d.ts +101 -0
  20. package/2D/controls/colorpicker.js +1396 -0
  21. package/2D/controls/colorpicker.js.map +1 -0
  22. package/2D/controls/container.d.ts +179 -0
  23. package/2D/controls/container.js +616 -0
  24. package/2D/controls/container.js.map +1 -0
  25. package/2D/controls/control.d.ts +943 -0
  26. package/2D/controls/control.js +2460 -0
  27. package/2D/controls/control.js.map +1 -0
  28. package/2D/controls/displayGrid.d.ts +53 -0
  29. package/2D/controls/displayGrid.js +202 -0
  30. package/2D/controls/displayGrid.js.map +1 -0
  31. package/2D/controls/ellipse.d.ts +25 -0
  32. package/2D/controls/ellipse.js +93 -0
  33. package/2D/controls/ellipse.js.map +1 -0
  34. package/2D/controls/focusableButton.d.ts +17 -0
  35. package/2D/controls/focusableButton.js +25 -0
  36. package/2D/controls/focusableButton.js.map +1 -0
  37. package/2D/controls/focusableControl.d.ts +43 -0
  38. package/2D/controls/focusableControl.js +2 -0
  39. package/2D/controls/focusableControl.js.map +1 -0
  40. package/2D/controls/gradient/BaseGradient.d.ts +69 -0
  41. package/2D/controls/gradient/BaseGradient.js +84 -0
  42. package/2D/controls/gradient/BaseGradient.js.map +1 -0
  43. package/2D/controls/gradient/LinearGradient.d.ts +45 -0
  44. package/2D/controls/gradient/LinearGradient.js +73 -0
  45. package/2D/controls/gradient/LinearGradient.js.map +1 -0
  46. package/2D/controls/gradient/RadialGradient.d.ts +53 -0
  47. package/2D/controls/gradient/RadialGradient.js +89 -0
  48. package/2D/controls/gradient/RadialGradient.js.map +1 -0
  49. package/2D/controls/grid.d.ts +151 -0
  50. package/2D/controls/grid.js +528 -0
  51. package/2D/controls/grid.js.map +1 -0
  52. package/2D/controls/image.d.ts +228 -0
  53. package/2D/controls/image.js +915 -0
  54. package/2D/controls/image.js.map +1 -0
  55. package/2D/controls/index.d.ts +34 -0
  56. package/2D/controls/index.js +35 -0
  57. package/2D/controls/index.js.map +1 -0
  58. package/2D/controls/inputPassword.d.ts +9 -0
  59. package/2D/controls/inputPassword.js +22 -0
  60. package/2D/controls/inputPassword.js.map +1 -0
  61. package/2D/controls/inputText.d.ts +197 -0
  62. package/2D/controls/inputText.js +1035 -0
  63. package/2D/controls/inputText.js.map +1 -0
  64. package/2D/controls/inputTextArea.d.ts +142 -0
  65. package/2D/controls/inputTextArea.js +1025 -0
  66. package/2D/controls/inputTextArea.js.map +1 -0
  67. package/2D/controls/line.d.ts +73 -0
  68. package/2D/controls/line.js +227 -0
  69. package/2D/controls/line.js.map +1 -0
  70. package/2D/controls/multiLine.d.ts +75 -0
  71. package/2D/controls/multiLine.js +237 -0
  72. package/2D/controls/multiLine.js.map +1 -0
  73. package/2D/controls/radioButton.d.ts +49 -0
  74. package/2D/controls/radioButton.js +185 -0
  75. package/2D/controls/radioButton.js.map +1 -0
  76. package/2D/controls/rectangle.d.ts +43 -0
  77. package/2D/controls/rectangle.js +204 -0
  78. package/2D/controls/rectangle.js.map +1 -0
  79. package/2D/controls/scrollViewers/scrollViewer.d.ts +178 -0
  80. package/2D/controls/scrollViewers/scrollViewer.js +587 -0
  81. package/2D/controls/scrollViewers/scrollViewer.js.map +1 -0
  82. package/2D/controls/scrollViewers/scrollViewerWindow.d.ts +51 -0
  83. package/2D/controls/scrollViewers/scrollViewerWindow.js +254 -0
  84. package/2D/controls/scrollViewers/scrollViewerWindow.js.map +1 -0
  85. package/2D/controls/selector.d.ts +237 -0
  86. package/2D/controls/selector.js +579 -0
  87. package/2D/controls/selector.js.map +1 -0
  88. package/2D/controls/sliders/baseSlider.d.ts +80 -0
  89. package/2D/controls/sliders/baseSlider.js +299 -0
  90. package/2D/controls/sliders/baseSlider.js.map +1 -0
  91. package/2D/controls/sliders/imageBasedSlider.d.ts +47 -0
  92. package/2D/controls/sliders/imageBasedSlider.js +168 -0
  93. package/2D/controls/sliders/imageBasedSlider.js.map +1 -0
  94. package/2D/controls/sliders/imageScrollBar.d.ts +67 -0
  95. package/2D/controls/sliders/imageScrollBar.js +248 -0
  96. package/2D/controls/sliders/imageScrollBar.js.map +1 -0
  97. package/2D/controls/sliders/scrollBar.d.ts +50 -0
  98. package/2D/controls/sliders/scrollBar.js +175 -0
  99. package/2D/controls/sliders/scrollBar.js.map +1 -0
  100. package/2D/controls/sliders/slider.d.ts +46 -0
  101. package/2D/controls/sliders/slider.js +281 -0
  102. package/2D/controls/sliders/slider.js.map +1 -0
  103. package/2D/controls/stackPanel.d.ts +64 -0
  104. package/2D/controls/stackPanel.js +244 -0
  105. package/2D/controls/stackPanel.js.map +1 -0
  106. package/2D/controls/statics.d.ts +6 -0
  107. package/2D/controls/statics.js +50 -0
  108. package/2D/controls/statics.js.map +1 -0
  109. package/2D/controls/textBlock.d.ts +219 -0
  110. package/2D/controls/textBlock.js +670 -0
  111. package/2D/controls/textBlock.js.map +1 -0
  112. package/2D/controls/textWrapper.d.ts +13 -0
  113. package/2D/controls/textWrapper.js +88 -0
  114. package/2D/controls/textWrapper.js.map +1 -0
  115. package/2D/controls/toggleButton.d.ts +93 -0
  116. package/2D/controls/toggleButton.js +229 -0
  117. package/2D/controls/toggleButton.js.map +1 -0
  118. package/2D/controls/virtualKeyboard.d.ts +102 -0
  119. package/2D/controls/virtualKeyboard.js +275 -0
  120. package/2D/controls/virtualKeyboard.js.map +1 -0
  121. package/2D/index.d.ts +11 -0
  122. package/2D/index.js +13 -0
  123. package/2D/index.js.map +1 -0
  124. package/2D/math2D.d.ts +136 -0
  125. package/2D/math2D.js +235 -0
  126. package/2D/math2D.js.map +1 -0
  127. package/2D/measure.d.ts +77 -0
  128. package/2D/measure.js +138 -0
  129. package/2D/measure.js.map +1 -0
  130. package/2D/multiLinePoint.d.ts +47 -0
  131. package/2D/multiLinePoint.js +110 -0
  132. package/2D/multiLinePoint.js.map +1 -0
  133. package/2D/style.d.ts +46 -0
  134. package/2D/style.js +80 -0
  135. package/2D/style.js.map +1 -0
  136. package/2D/valueAndUnit.d.ts +89 -0
  137. package/2D/valueAndUnit.js +194 -0
  138. package/2D/valueAndUnit.js.map +1 -0
  139. package/2D/xmlLoader.d.ts +60 -0
  140. package/2D/xmlLoader.js +348 -0
  141. package/2D/xmlLoader.js.map +1 -0
  142. package/3D/behaviors/defaultBehavior.d.ts +73 -0
  143. package/3D/behaviors/defaultBehavior.js +103 -0
  144. package/3D/behaviors/defaultBehavior.js.map +1 -0
  145. package/3D/controls/MRTK3/touchHolographicButton.d.ts +220 -0
  146. package/3D/controls/MRTK3/touchHolographicButton.js +868 -0
  147. package/3D/controls/MRTK3/touchHolographicButton.js.map +1 -0
  148. package/3D/controls/abstractButton3D.d.ts +15 -0
  149. package/3D/controls/abstractButton3D.js +22 -0
  150. package/3D/controls/abstractButton3D.js.map +1 -0
  151. package/3D/controls/button3D.d.ts +51 -0
  152. package/3D/controls/button3D.js +98 -0
  153. package/3D/controls/button3D.js.map +1 -0
  154. package/3D/controls/container3D.d.ts +72 -0
  155. package/3D/controls/container3D.js +126 -0
  156. package/3D/controls/container3D.js.map +1 -0
  157. package/3D/controls/contentDisplay3D.d.ts +42 -0
  158. package/3D/controls/contentDisplay3D.js +81 -0
  159. package/3D/controls/contentDisplay3D.js.map +1 -0
  160. package/3D/controls/control3D.d.ts +183 -0
  161. package/3D/controls/control3D.js +401 -0
  162. package/3D/controls/control3D.js.map +1 -0
  163. package/3D/controls/cylinderPanel.d.ts +17 -0
  164. package/3D/controls/cylinderPanel.js +57 -0
  165. package/3D/controls/cylinderPanel.js.map +1 -0
  166. package/3D/controls/handMenu.d.ts +28 -0
  167. package/3D/controls/handMenu.js +39 -0
  168. package/3D/controls/handMenu.js.map +1 -0
  169. package/3D/controls/holographicBackplate.d.ts +49 -0
  170. package/3D/controls/holographicBackplate.js +104 -0
  171. package/3D/controls/holographicBackplate.js.map +1 -0
  172. package/3D/controls/holographicButton.d.ts +84 -0
  173. package/3D/controls/holographicButton.js +300 -0
  174. package/3D/controls/holographicButton.js.map +1 -0
  175. package/3D/controls/holographicSlate.d.ts +134 -0
  176. package/3D/controls/holographicSlate.js +413 -0
  177. package/3D/controls/holographicSlate.js.map +1 -0
  178. package/3D/controls/index.d.ts +22 -0
  179. package/3D/controls/index.js +24 -0
  180. package/3D/controls/index.js.map +1 -0
  181. package/3D/controls/meshButton3D.d.ts +21 -0
  182. package/3D/controls/meshButton3D.js +58 -0
  183. package/3D/controls/meshButton3D.js.map +1 -0
  184. package/3D/controls/nearMenu.d.ts +44 -0
  185. package/3D/controls/nearMenu.js +103 -0
  186. package/3D/controls/nearMenu.js.map +1 -0
  187. package/3D/controls/planePanel.d.ts +9 -0
  188. package/3D/controls/planePanel.js +30 -0
  189. package/3D/controls/planePanel.js.map +1 -0
  190. package/3D/controls/scatterPanel.d.ts +18 -0
  191. package/3D/controls/scatterPanel.js +98 -0
  192. package/3D/controls/scatterPanel.js.map +1 -0
  193. package/3D/controls/slider3D.d.ts +95 -0
  194. package/3D/controls/slider3D.js +256 -0
  195. package/3D/controls/slider3D.js.map +1 -0
  196. package/3D/controls/spherePanel.d.ts +17 -0
  197. package/3D/controls/spherePanel.js +58 -0
  198. package/3D/controls/spherePanel.js.map +1 -0
  199. package/3D/controls/stackPanel3D.d.ts +22 -0
  200. package/3D/controls/stackPanel3D.js +95 -0
  201. package/3D/controls/stackPanel3D.js.map +1 -0
  202. package/3D/controls/touchButton3D.d.ts +77 -0
  203. package/3D/controls/touchButton3D.js +205 -0
  204. package/3D/controls/touchButton3D.js.map +1 -0
  205. package/3D/controls/touchHolographicButton.d.ts +110 -0
  206. package/3D/controls/touchHolographicButton.js +400 -0
  207. package/3D/controls/touchHolographicButton.js.map +1 -0
  208. package/3D/controls/touchHolographicMenu.d.ts +61 -0
  209. package/3D/controls/touchHolographicMenu.js +139 -0
  210. package/3D/controls/touchHolographicMenu.js.map +1 -0
  211. package/3D/controls/touchMeshButton3D.d.ts +21 -0
  212. package/3D/controls/touchMeshButton3D.js +58 -0
  213. package/3D/controls/touchMeshButton3D.js.map +1 -0
  214. package/3D/controls/volumeBasedPanel.d.ts +53 -0
  215. package/3D/controls/volumeBasedPanel.js +158 -0
  216. package/3D/controls/volumeBasedPanel.js.map +1 -0
  217. package/3D/gizmos/gizmoHandle.d.ts +108 -0
  218. package/3D/gizmos/gizmoHandle.js +175 -0
  219. package/3D/gizmos/gizmoHandle.js.map +1 -0
  220. package/3D/gizmos/index.d.ts +2 -0
  221. package/3D/gizmos/index.js +3 -0
  222. package/3D/gizmos/index.js.map +1 -0
  223. package/3D/gizmos/slateGizmo.d.ts +57 -0
  224. package/3D/gizmos/slateGizmo.js +353 -0
  225. package/3D/gizmos/slateGizmo.js.map +1 -0
  226. package/3D/gui3DManager.d.ts +94 -0
  227. package/3D/gui3DManager.js +233 -0
  228. package/3D/gui3DManager.js.map +1 -0
  229. package/3D/index.d.ts +5 -0
  230. package/3D/index.js +7 -0
  231. package/3D/index.js.map +1 -0
  232. package/3D/materials/fluent/fluentMaterial.d.ts +91 -0
  233. package/3D/materials/fluent/fluentMaterial.js +286 -0
  234. package/3D/materials/fluent/fluentMaterial.js.map +1 -0
  235. package/3D/materials/fluent/index.d.ts +1 -0
  236. package/3D/materials/fluent/index.js +2 -0
  237. package/3D/materials/fluent/index.js.map +1 -0
  238. package/3D/materials/fluent/shaders/fluent.fragment.d.ts +5 -0
  239. package/3D/materials/fluent/shaders/fluent.fragment.js +41 -0
  240. package/3D/materials/fluent/shaders/fluent.fragment.js.map +1 -0
  241. package/3D/materials/fluent/shaders/fluent.vertex.d.ts +5 -0
  242. package/3D/materials/fluent/shaders/fluent.vertex.js +40 -0
  243. package/3D/materials/fluent/shaders/fluent.vertex.js.map +1 -0
  244. package/3D/materials/fluentBackplate/fluentBackplateMaterial.d.ts +155 -0
  245. package/3D/materials/fluentBackplate/fluentBackplateMaterial.js +466 -0
  246. package/3D/materials/fluentBackplate/fluentBackplateMaterial.js.map +1 -0
  247. package/3D/materials/fluentBackplate/index.d.ts +1 -0
  248. package/3D/materials/fluentBackplate/index.js +2 -0
  249. package/3D/materials/fluentBackplate/index.js.map +1 -0
  250. package/3D/materials/fluentBackplate/shaders/fluentBackplate.fragment.d.ts +5 -0
  251. package/3D/materials/fluentBackplate/shaders/fluentBackplate.fragment.js +60 -0
  252. package/3D/materials/fluentBackplate/shaders/fluentBackplate.fragment.js.map +1 -0
  253. package/3D/materials/fluentBackplate/shaders/fluentBackplate.vertex.d.ts +5 -0
  254. package/3D/materials/fluentBackplate/shaders/fluentBackplate.vertex.js +127 -0
  255. package/3D/materials/fluentBackplate/shaders/fluentBackplate.vertex.js.map +1 -0
  256. package/3D/materials/fluentButton/fluentButtonMaterial.d.ts +190 -0
  257. package/3D/materials/fluentButton/fluentButtonMaterial.js +536 -0
  258. package/3D/materials/fluentButton/fluentButtonMaterial.js.map +1 -0
  259. package/3D/materials/fluentButton/index.d.ts +1 -0
  260. package/3D/materials/fluentButton/index.js +2 -0
  261. package/3D/materials/fluentButton/index.js.map +1 -0
  262. package/3D/materials/fluentButton/shaders/fluentButton.fragment.d.ts +5 -0
  263. package/3D/materials/fluentButton/shaders/fluentButton.fragment.js +57 -0
  264. package/3D/materials/fluentButton/shaders/fluentButton.fragment.js.map +1 -0
  265. package/3D/materials/fluentButton/shaders/fluentButton.vertex.d.ts +5 -0
  266. package/3D/materials/fluentButton/shaders/fluentButton.vertex.js +162 -0
  267. package/3D/materials/fluentButton/shaders/fluentButton.vertex.js.map +1 -0
  268. package/3D/materials/fluentMaterial.d.ts +4 -0
  269. package/3D/materials/fluentMaterial.js +5 -0
  270. package/3D/materials/fluentMaterial.js.map +1 -0
  271. package/3D/materials/handle/handleMaterial.d.ts +68 -0
  272. package/3D/materials/handle/handleMaterial.js +114 -0
  273. package/3D/materials/handle/handleMaterial.js.map +1 -0
  274. package/3D/materials/handle/index.d.ts +1 -0
  275. package/3D/materials/handle/index.js +2 -0
  276. package/3D/materials/handle/index.js.map +1 -0
  277. package/3D/materials/handle/shaders/handle.fragment.d.ts +5 -0
  278. package/3D/materials/handle/shaders/handle.fragment.js +11 -0
  279. package/3D/materials/handle/shaders/handle.fragment.js.map +1 -0
  280. package/3D/materials/handle/shaders/handle.vertex.d.ts +5 -0
  281. package/3D/materials/handle/shaders/handle.vertex.js +11 -0
  282. package/3D/materials/handle/shaders/handle.vertex.js.map +1 -0
  283. package/3D/materials/index.d.ts +5 -0
  284. package/3D/materials/index.js +7 -0
  285. package/3D/materials/index.js.map +1 -0
  286. package/3D/materials/mrdl/index.d.ts +3 -0
  287. package/3D/materials/mrdl/index.js +4 -0
  288. package/3D/materials/mrdl/index.js.map +1 -0
  289. package/3D/materials/mrdl/mrdlBackglowMaterial.d.ts +87 -0
  290. package/3D/materials/mrdl/mrdlBackglowMaterial.js +302 -0
  291. package/3D/materials/mrdl/mrdlBackglowMaterial.js.map +1 -0
  292. package/3D/materials/mrdl/mrdlBackplateMaterial.d.ts +148 -0
  293. package/3D/materials/mrdl/mrdlBackplateMaterial.js +433 -0
  294. package/3D/materials/mrdl/mrdlBackplateMaterial.js.map +1 -0
  295. package/3D/materials/mrdl/mrdlFrontplateMaterial.d.ts +186 -0
  296. package/3D/materials/mrdl/mrdlFrontplateMaterial.js +532 -0
  297. package/3D/materials/mrdl/mrdlFrontplateMaterial.js.map +1 -0
  298. package/3D/materials/mrdl/mrdlInnerquadMaterial.d.ts +56 -0
  299. package/3D/materials/mrdl/mrdlInnerquadMaterial.js +230 -0
  300. package/3D/materials/mrdl/mrdlInnerquadMaterial.js.map +1 -0
  301. package/3D/materials/mrdl/mrdlSliderBarMaterial.d.ts +337 -0
  302. package/3D/materials/mrdl/mrdlSliderBarMaterial.js +855 -0
  303. package/3D/materials/mrdl/mrdlSliderBarMaterial.js.map +1 -0
  304. package/3D/materials/mrdl/mrdlSliderThumbMaterial.d.ts +337 -0
  305. package/3D/materials/mrdl/mrdlSliderThumbMaterial.js +855 -0
  306. package/3D/materials/mrdl/mrdlSliderThumbMaterial.js.map +1 -0
  307. package/3D/materials/mrdl/shaders/mrdlBackglow.fragment.d.ts +5 -0
  308. package/3D/materials/mrdl/shaders/mrdlBackglow.fragment.js +25 -0
  309. package/3D/materials/mrdl/shaders/mrdlBackglow.fragment.js.map +1 -0
  310. package/3D/materials/mrdl/shaders/mrdlBackglow.vertex.d.ts +5 -0
  311. package/3D/materials/mrdl/shaders/mrdlBackglow.vertex.js +12 -0
  312. package/3D/materials/mrdl/shaders/mrdlBackglow.vertex.js.map +1 -0
  313. package/3D/materials/mrdl/shaders/mrdlBackplate.fragment.d.ts +5 -0
  314. package/3D/materials/mrdl/shaders/mrdlBackplate.fragment.js +88 -0
  315. package/3D/materials/mrdl/shaders/mrdlBackplate.fragment.js.map +1 -0
  316. package/3D/materials/mrdl/shaders/mrdlBackplate.vertex.d.ts +5 -0
  317. package/3D/materials/mrdl/shaders/mrdlBackplate.vertex.js +96 -0
  318. package/3D/materials/mrdl/shaders/mrdlBackplate.vertex.js.map +1 -0
  319. package/3D/materials/mrdl/shaders/mrdlFrontplate.fragment.d.ts +5 -0
  320. package/3D/materials/mrdl/shaders/mrdlFrontplate.fragment.js +48 -0
  321. package/3D/materials/mrdl/shaders/mrdlFrontplate.fragment.js.map +1 -0
  322. package/3D/materials/mrdl/shaders/mrdlFrontplate.vertex.d.ts +5 -0
  323. package/3D/materials/mrdl/shaders/mrdlFrontplate.vertex.js +158 -0
  324. package/3D/materials/mrdl/shaders/mrdlFrontplate.vertex.js.map +1 -0
  325. package/3D/materials/mrdl/shaders/mrdlInnerquad.fragment.d.ts +5 -0
  326. package/3D/materials/mrdl/shaders/mrdlInnerquad.fragment.js +27 -0
  327. package/3D/materials/mrdl/shaders/mrdlInnerquad.fragment.js.map +1 -0
  328. package/3D/materials/mrdl/shaders/mrdlInnerquad.vertex.d.ts +5 -0
  329. package/3D/materials/mrdl/shaders/mrdlInnerquad.vertex.js +13 -0
  330. package/3D/materials/mrdl/shaders/mrdlInnerquad.vertex.js.map +1 -0
  331. package/3D/materials/mrdl/shaders/mrdlSliderBar.fragment.d.ts +5 -0
  332. package/3D/materials/mrdl/shaders/mrdlSliderBar.fragment.js +236 -0
  333. package/3D/materials/mrdl/shaders/mrdlSliderBar.fragment.js.map +1 -0
  334. package/3D/materials/mrdl/shaders/mrdlSliderBar.vertex.d.ts +5 -0
  335. package/3D/materials/mrdl/shaders/mrdlSliderBar.vertex.js +137 -0
  336. package/3D/materials/mrdl/shaders/mrdlSliderBar.vertex.js.map +1 -0
  337. package/3D/materials/mrdl/shaders/mrdlSliderThumb.fragment.d.ts +5 -0
  338. package/3D/materials/mrdl/shaders/mrdlSliderThumb.fragment.js +236 -0
  339. package/3D/materials/mrdl/shaders/mrdlSliderThumb.fragment.js.map +1 -0
  340. package/3D/materials/mrdl/shaders/mrdlSliderThumb.vertex.d.ts +5 -0
  341. package/3D/materials/mrdl/shaders/mrdlSliderThumb.vertex.js +137 -0
  342. package/3D/materials/mrdl/shaders/mrdlSliderThumb.vertex.js.map +1 -0
  343. package/3D/vector3WithInfo.d.ts +16 -0
  344. package/3D/vector3WithInfo.js +18 -0
  345. package/3D/vector3WithInfo.js.map +1 -0
  346. package/index.d.ts +2 -0
  347. package/index.js +4 -0
  348. package/index.js.map +1 -0
  349. package/legacy/legacy.d.ts +1 -0
  350. package/legacy/legacy.js +17 -0
  351. package/legacy/legacy.js.map +1 -0
  352. package/license.md +71 -0
  353. package/package.json +47 -0
  354. package/readme.md +31 -0
@@ -0,0 +1,943 @@
1
+ import type { Nullable } from "@babylonjs/core/types.js";
2
+ import { Observable } from "@babylonjs/core/Misc/observable.js";
3
+ import { Vector2, Vector3 } from "@babylonjs/core/Maths/math.vector.js";
4
+ import type { PointerInfoBase } from "@babylonjs/core/Events/pointerEvents.js";
5
+ import type { TransformNode } from "@babylonjs/core/Meshes/transformNode.js";
6
+ import type { Scene } from "@babylonjs/core/scene.js";
7
+ import type { Container } from "./container.js";
8
+ import type { AdvancedDynamicTexture } from "../advancedDynamicTexture.js";
9
+ import { ValueAndUnit } from "../valueAndUnit.js";
10
+ import { Measure } from "../measure.js";
11
+ import type { Style } from "../style.js";
12
+ import { Matrix2D, Vector2WithInfo } from "../math2D.js";
13
+ import type { ICanvasGradient, ICanvasRenderingContext } from "@babylonjs/core/Engines/ICanvas.js";
14
+ import type { IAccessibilityTag } from "@babylonjs/core/IAccessibilityTag.js";
15
+ import type { IKeyboardEvent } from "@babylonjs/core/Events/deviceInputEvents.js";
16
+ import type { IAnimatable } from "@babylonjs/core/Animations/animatable.interface.js";
17
+ import type { Animation } from "@babylonjs/core/Animations/animation.js";
18
+ import type { BaseGradient } from "./gradient/BaseGradient.js";
19
+ import type { AbstractEngine } from "@babylonjs/core/Engines/abstractEngine.js";
20
+ import type { IFocusableControl } from "./focusableControl.js";
21
+ /**
22
+ * Root class used for all 2D controls
23
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#controls
24
+ */
25
+ export declare class Control implements IAnimatable, IFocusableControl {
26
+ /** defines the name of the control */
27
+ name?: string | undefined;
28
+ /**
29
+ * Gets or sets a boolean indicating if alpha must be an inherited value (false by default)
30
+ */
31
+ static AllowAlphaInheritance: boolean;
32
+ private _alpha;
33
+ private _alphaSet;
34
+ private _zIndex;
35
+ /** @internal */
36
+ _host: AdvancedDynamicTexture;
37
+ /** Gets or sets the control parent */
38
+ parent: Nullable<Container>;
39
+ /** @internal */
40
+ _currentMeasure: Measure;
41
+ /** @internal */
42
+ _tempPaddingMeasure: Measure;
43
+ private _fontFamily;
44
+ private _fontStyle;
45
+ private _fontWeight;
46
+ private _fontSize;
47
+ private _font;
48
+ /** @internal */
49
+ _width: ValueAndUnit;
50
+ /** @internal */
51
+ _height: ValueAndUnit;
52
+ /** @internal */
53
+ protected _fontOffset: {
54
+ ascent: number;
55
+ height: number;
56
+ descent: number;
57
+ };
58
+ private _color;
59
+ private _style;
60
+ private _styleObserver;
61
+ /** @internal */
62
+ protected _horizontalAlignment: number;
63
+ /** @internal */
64
+ protected _verticalAlignment: number;
65
+ /** @internal */
66
+ protected _isDirty: boolean;
67
+ /** @internal */
68
+ protected _wasDirty: boolean;
69
+ /** @internal */
70
+ _tempParentMeasure: Measure;
71
+ /** @internal */
72
+ _prevCurrentMeasureTransformedIntoGlobalSpace: Measure;
73
+ /** @internal */
74
+ _cachedParentMeasure: Measure;
75
+ private _descendantsOnlyPadding;
76
+ private _paddingLeft;
77
+ private _paddingRight;
78
+ private _paddingTop;
79
+ private _paddingBottom;
80
+ /** @internal */
81
+ _left: ValueAndUnit;
82
+ /** @internal */
83
+ _top: ValueAndUnit;
84
+ private _scaleX;
85
+ private _scaleY;
86
+ private _rotation;
87
+ private _transformCenterX;
88
+ private _transformCenterY;
89
+ /** @internal */
90
+ _transformMatrix: Matrix2D;
91
+ /** @internal */
92
+ protected _invertTransformMatrix: Matrix2D;
93
+ /** @internal */
94
+ protected _transformedPosition: Vector2;
95
+ private _isMatrixDirty;
96
+ private _cachedOffsetX;
97
+ private _cachedOffsetY;
98
+ private _isVisible;
99
+ private _isHighlighted;
100
+ private _highlightColor;
101
+ protected _highlightLineWidth: number;
102
+ /** @internal */
103
+ _linkedMesh: Nullable<TransformNode>;
104
+ private _fontSet;
105
+ private _dummyVector2;
106
+ private _downCount;
107
+ private _enterCount;
108
+ private _doNotRender;
109
+ private _downPointerIds;
110
+ private _evaluatedMeasure;
111
+ private _evaluatedParentMeasure;
112
+ protected _isEnabled: boolean;
113
+ protected _disabledColor: string;
114
+ protected _disabledColorItem: string;
115
+ protected _isReadOnly: boolean;
116
+ private _gradient;
117
+ /** @internal */
118
+ protected _rebuildLayout: boolean;
119
+ /** @internal */
120
+ protected _urlRewriter?: (url: string) => string;
121
+ /**
122
+ * Observable that fires when the control's enabled state changes
123
+ */
124
+ onEnabledStateChangedObservable: Observable<boolean>;
125
+ /** @internal */
126
+ _customData: any;
127
+ /** @internal */
128
+ _isClipped: boolean;
129
+ /** @internal */
130
+ _automaticSize: boolean;
131
+ /** @internal */
132
+ _tag: any;
133
+ /**
134
+ * Gets or sets the unique id of the node. Please note that this number will be updated when the control is added to a container
135
+ */
136
+ uniqueId: number;
137
+ /**
138
+ * Gets or sets a boolean indicating if the control is readonly (default: false).
139
+ * A readonly control will still raise pointer events but will not react to them
140
+ */
141
+ get isReadOnly(): boolean;
142
+ set isReadOnly(value: boolean);
143
+ /**
144
+ * Gets the transformed measure, that is the bounding box of the control after applying all transformations
145
+ */
146
+ get transformedMeasure(): Measure;
147
+ /**
148
+ * Gets or sets an object used to store user defined information for the node
149
+ */
150
+ metadata: any;
151
+ /** Gets or sets a boolean indicating if the control can be hit with pointer events */
152
+ isHitTestVisible: boolean;
153
+ /** Gets or sets a boolean indicating if the control can block pointer events. False by default except on the following controls:
154
+ * * Button controls (Button, RadioButton, ToggleButton)
155
+ * * Checkbox
156
+ * * ColorPicker
157
+ * * InputText
158
+ * * Slider
159
+ */
160
+ isPointerBlocker: boolean;
161
+ /** Gets or sets a boolean indicating if the control can be focusable */
162
+ isFocusInvisible: boolean;
163
+ protected _clipChildren: boolean;
164
+ /**
165
+ * Sets/Gets a boolean indicating if the children are clipped to the current control bounds.
166
+ * Please note that not clipping children may generate issues with adt.useInvalidateRectOptimization so it is recommended to turn this optimization off if you want to use unclipped children
167
+ */
168
+ set clipChildren(value: boolean);
169
+ get clipChildren(): boolean;
170
+ protected _clipContent: boolean;
171
+ /**
172
+ * Sets/Gets a boolean indicating that control content must be clipped
173
+ * Please note that not clipping content may generate issues with adt.useInvalidateRectOptimization so it is recommended to turn this optimization off if you want to use unclipped children
174
+ */
175
+ set clipContent(value: boolean);
176
+ get clipContent(): boolean;
177
+ /**
178
+ * Gets or sets a boolean indicating that the current control should cache its rendering (useful when the control does not change often)
179
+ */
180
+ useBitmapCache: boolean;
181
+ private _cacheData;
182
+ private _shadowOffsetX;
183
+ /** Gets or sets a value indicating the offset to apply on X axis to render the shadow */
184
+ get shadowOffsetX(): number;
185
+ set shadowOffsetX(value: number);
186
+ private _shadowOffsetY;
187
+ /** Gets or sets a value indicating the offset to apply on Y axis to render the shadow */
188
+ get shadowOffsetY(): number;
189
+ set shadowOffsetY(value: number);
190
+ private _shadowBlur;
191
+ private _previousShadowBlur;
192
+ /** Gets or sets a value indicating the amount of blur to use to render the shadow */
193
+ get shadowBlur(): number;
194
+ set shadowBlur(value: number);
195
+ private _shadowColor;
196
+ /** Gets or sets a value indicating the color of the shadow (black by default ie. "#000") */
197
+ get shadowColor(): string;
198
+ set shadowColor(value: string);
199
+ /** Gets or sets the cursor to use when the control is hovered */
200
+ hoverCursor: string;
201
+ /** @internal */
202
+ protected _linkOffsetX: ValueAndUnit;
203
+ /** @internal */
204
+ protected _linkOffsetY: ValueAndUnit;
205
+ /** Gets the control type name */
206
+ get typeName(): string;
207
+ /**
208
+ * Get the current class name of the control.
209
+ * @returns current class name
210
+ */
211
+ getClassName(): string;
212
+ /**
213
+ * Gets or sets the accessibility tag to describe the control for accessibility purpose.
214
+ * By default, GUI controls already indicate accessibility info, but one can override the info using this tag.
215
+ */
216
+ set accessibilityTag(value: Nullable<IAccessibilityTag>);
217
+ get accessibilityTag(): Nullable<IAccessibilityTag>;
218
+ protected _accessibilityTag: Nullable<IAccessibilityTag>;
219
+ /**
220
+ * Observable that fires whenever the accessibility event of the control has changed
221
+ */
222
+ onAccessibilityTagChangedObservable: Observable<Nullable<IAccessibilityTag>>;
223
+ /**
224
+ * An event triggered when pointer wheel is scrolled
225
+ */
226
+ onWheelObservable: Observable<Vector2>;
227
+ /**
228
+ * An event triggered when the pointer moves over the control.
229
+ */
230
+ onPointerMoveObservable: Observable<Vector2>;
231
+ /**
232
+ * An event triggered when the pointer moves out of the control.
233
+ */
234
+ onPointerOutObservable: Observable<Control>;
235
+ /**
236
+ * An event triggered when the pointer taps the control
237
+ */
238
+ onPointerDownObservable: Observable<Vector2WithInfo>;
239
+ /**
240
+ * An event triggered when pointer up
241
+ */
242
+ onPointerUpObservable: Observable<Vector2WithInfo>;
243
+ /**
244
+ * An event triggered when a control is clicked on
245
+ */
246
+ onPointerClickObservable: Observable<Vector2WithInfo>;
247
+ /**
248
+ * An event triggered when a control receives an ENTER key down event
249
+ */
250
+ onEnterPressedObservable: Observable<Control>;
251
+ /**
252
+ * An event triggered when pointer enters the control
253
+ */
254
+ onPointerEnterObservable: Observable<Control>;
255
+ /**
256
+ * An event triggered when the control is marked as dirty
257
+ */
258
+ onDirtyObservable: Observable<Control>;
259
+ /**
260
+ * An event triggered before drawing the control
261
+ */
262
+ onBeforeDrawObservable: Observable<Control>;
263
+ /**
264
+ * An event triggered after the control was drawn
265
+ */
266
+ onAfterDrawObservable: Observable<Control>;
267
+ /**
268
+ * An event triggered when the control has been disposed
269
+ */
270
+ onDisposeObservable: Observable<Control>;
271
+ /**
272
+ * An event triggered when the control isVisible is changed
273
+ */
274
+ onIsVisibleChangedObservable: Observable<boolean>;
275
+ /**
276
+ * Get the hosting AdvancedDynamicTexture
277
+ */
278
+ get host(): AdvancedDynamicTexture;
279
+ /** Gets or set information about font offsets (used to render and align text) */
280
+ get fontOffset(): {
281
+ ascent: number;
282
+ height: number;
283
+ descent: number;
284
+ };
285
+ set fontOffset(offset: {
286
+ ascent: number;
287
+ height: number;
288
+ descent: number;
289
+ });
290
+ /** Gets or sets alpha value for the control (1 means opaque and 0 means entirely transparent) */
291
+ get alpha(): number;
292
+ set alpha(value: number);
293
+ /**
294
+ * Gets or sets a number indicating size of stroke we want to highlight the control with (mostly for debugging purpose)
295
+ */
296
+ get highlightLineWidth(): number;
297
+ set highlightLineWidth(value: number);
298
+ /**
299
+ * Gets or sets a boolean indicating that we want to highlight the control (mostly for debugging purpose)
300
+ */
301
+ get isHighlighted(): boolean;
302
+ set isHighlighted(value: boolean);
303
+ /**
304
+ * Indicates if the control should be serialized. Defaults to true.
305
+ */
306
+ isSerializable: boolean;
307
+ /**
308
+ * Gets or sets a string defining the color to use for highlighting this control
309
+ */
310
+ get highlightColor(): string;
311
+ set highlightColor(value: string);
312
+ /** Gets or sets a value indicating the scale factor on X axis (1 by default)
313
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#rotation-and-scaling
314
+ */
315
+ get scaleX(): number;
316
+ set scaleX(value: number);
317
+ /** Gets or sets a value indicating the scale factor on Y axis (1 by default)
318
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#rotation-and-scaling
319
+ */
320
+ get scaleY(): number;
321
+ set scaleY(value: number);
322
+ /** Gets or sets the rotation angle (0 by default)
323
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#rotation-and-scaling
324
+ */
325
+ get rotation(): number;
326
+ set rotation(value: number);
327
+ /** Gets or sets the transformation center on Y axis (0 by default)
328
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#rotation-and-scaling
329
+ */
330
+ get transformCenterY(): number;
331
+ set transformCenterY(value: number);
332
+ /** Gets or sets the transformation center on X axis (0 by default)
333
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#rotation-and-scaling
334
+ */
335
+ get transformCenterX(): number;
336
+ set transformCenterX(value: number);
337
+ /**
338
+ * Gets or sets the horizontal alignment
339
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#alignments
340
+ */
341
+ get horizontalAlignment(): number;
342
+ set horizontalAlignment(value: number);
343
+ /**
344
+ * Gets or sets the vertical alignment
345
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#alignments
346
+ */
347
+ get verticalAlignment(): number;
348
+ set verticalAlignment(value: number);
349
+ private _fixedRatio;
350
+ set fixedRatio(value: number);
351
+ /**
352
+ * Gets or sets a fixed ratio for this control.
353
+ * When different from 0, the ratio is used to compute the "second" dimension.
354
+ * The first dimension used in the computation is the last one set (by setting width / widthInPixels or height / heightInPixels), and the
355
+ * second dimension is computed as first dimension * fixedRatio
356
+ */
357
+ get fixedRatio(): number;
358
+ private _fixedRatioMasterIsWidth;
359
+ set fixedRatioMasterIsWidth(value: boolean);
360
+ /**
361
+ * Gets or sets a boolean indicating that the fixed ratio is set on the width instead of the height. True by default.
362
+ * When the height of a control is set, this property is changed to false.
363
+ */
364
+ get fixedRatioMasterIsWidth(): boolean;
365
+ /**
366
+ * Gets or sets control width
367
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#position-and-size
368
+ */
369
+ get width(): string | number;
370
+ set width(value: string | number);
371
+ /**
372
+ * Gets or sets the control width in pixel
373
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#position-and-size
374
+ */
375
+ get widthInPixels(): number;
376
+ set widthInPixels(value: number);
377
+ /**
378
+ * Gets or sets control height
379
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#position-and-size
380
+ */
381
+ get height(): string | number;
382
+ set height(value: string | number);
383
+ /**
384
+ * Gets or sets control height in pixel
385
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#position-and-size
386
+ */
387
+ get heightInPixels(): number;
388
+ set heightInPixels(value: number);
389
+ /** Gets or set font family */
390
+ get fontFamily(): string;
391
+ set fontFamily(value: string);
392
+ /** Gets or sets font style */
393
+ get fontStyle(): string;
394
+ set fontStyle(value: string);
395
+ /** Gets or sets font weight */
396
+ get fontWeight(): string;
397
+ set fontWeight(value: string);
398
+ /**
399
+ * Gets or sets style
400
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#styles
401
+ */
402
+ get style(): Nullable<Style>;
403
+ set style(value: Nullable<Style>);
404
+ /** @internal */
405
+ get _isFontSizeInPercentage(): boolean;
406
+ /** Gets or sets font size in pixels */
407
+ get fontSizeInPixels(): number;
408
+ set fontSizeInPixels(value: number);
409
+ /** Gets or sets font size */
410
+ get fontSize(): string | number;
411
+ set fontSize(value: string | number);
412
+ /** Gets or sets foreground color */
413
+ get color(): string;
414
+ set color(value: string);
415
+ /** Gets or sets gradient. Setting a gradient will override the color */
416
+ get gradient(): Nullable<BaseGradient>;
417
+ set gradient(value: Nullable<BaseGradient>);
418
+ /** Gets or sets z index which is used to reorder controls on the z axis */
419
+ get zIndex(): number;
420
+ set zIndex(value: number);
421
+ /** Gets or sets a boolean indicating if the control can be rendered */
422
+ get notRenderable(): boolean;
423
+ set notRenderable(value: boolean);
424
+ /** Gets or sets a boolean indicating if the control is visible */
425
+ get isVisible(): boolean;
426
+ set isVisible(value: boolean);
427
+ /** Gets a boolean indicating that the control needs to update its rendering */
428
+ get isDirty(): boolean;
429
+ /**
430
+ * Gets the current linked mesh (or null if none)
431
+ */
432
+ get linkedMesh(): Nullable<TransformNode>;
433
+ /**
434
+ * Gets or sets a value indicating the padding should work like in CSS.
435
+ * Basically, it will add the padding amount on each side of the parent control for its children.
436
+ */
437
+ get descendantsOnlyPadding(): boolean;
438
+ set descendantsOnlyPadding(value: boolean);
439
+ /**
440
+ * Gets or sets a value indicating the padding to use on the left of the control
441
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#position-and-size
442
+ */
443
+ get paddingLeft(): string | number;
444
+ set paddingLeft(value: string | number);
445
+ /**
446
+ * Gets or sets a value indicating the padding in pixels to use on the left of the control
447
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#position-and-size
448
+ */
449
+ get paddingLeftInPixels(): number;
450
+ set paddingLeftInPixels(value: number);
451
+ /** @internal */
452
+ get _paddingLeftInPixels(): number;
453
+ /**
454
+ * Gets or sets a value indicating the padding to use on the right of the control
455
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#position-and-size
456
+ */
457
+ get paddingRight(): string | number;
458
+ set paddingRight(value: string | number);
459
+ /**
460
+ * Gets or sets a value indicating the padding in pixels to use on the right of the control
461
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#position-and-size
462
+ */
463
+ get paddingRightInPixels(): number;
464
+ set paddingRightInPixels(value: number);
465
+ /** @internal */
466
+ get _paddingRightInPixels(): number;
467
+ /**
468
+ * Gets or sets a value indicating the padding to use on the top of the control
469
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#position-and-size
470
+ */
471
+ get paddingTop(): string | number;
472
+ set paddingTop(value: string | number);
473
+ /**
474
+ * Gets or sets a value indicating the padding in pixels to use on the top of the control
475
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#position-and-size
476
+ */
477
+ get paddingTopInPixels(): number;
478
+ set paddingTopInPixels(value: number);
479
+ /** @internal */
480
+ get _paddingTopInPixels(): number;
481
+ /**
482
+ * Gets or sets a value indicating the padding to use on the bottom of the control
483
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#position-and-size
484
+ */
485
+ get paddingBottom(): string | number;
486
+ set paddingBottom(value: string | number);
487
+ /**
488
+ * Gets or sets a value indicating the padding in pixels to use on the bottom of the control
489
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#position-and-size
490
+ */
491
+ get paddingBottomInPixels(): number;
492
+ set paddingBottomInPixels(value: number);
493
+ /** @internal */
494
+ get _paddingBottomInPixels(): number;
495
+ /**
496
+ * Gets or sets a value indicating the left coordinate of the control
497
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#position-and-size
498
+ */
499
+ get left(): string | number;
500
+ set left(value: string | number);
501
+ /**
502
+ * Gets or sets a value indicating the left coordinate in pixels of the control
503
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#position-and-size
504
+ */
505
+ get leftInPixels(): number;
506
+ set leftInPixels(value: number);
507
+ /**
508
+ * Gets or sets a value indicating the top coordinate of the control
509
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#position-and-size
510
+ */
511
+ get top(): string | number;
512
+ set top(value: string | number);
513
+ /**
514
+ * Gets or sets a value indicating the top coordinate in pixels of the control
515
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#position-and-size
516
+ */
517
+ get topInPixels(): number;
518
+ set topInPixels(value: number);
519
+ /**
520
+ * Gets or sets a value indicating the offset on X axis to the linked mesh
521
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#tracking-positions
522
+ */
523
+ get linkOffsetX(): string | number;
524
+ set linkOffsetX(value: string | number);
525
+ /**
526
+ * Gets or sets a value indicating the offset in pixels on X axis to the linked mesh
527
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#tracking-positions
528
+ */
529
+ get linkOffsetXInPixels(): number;
530
+ set linkOffsetXInPixels(value: number);
531
+ /**
532
+ * Gets or sets a value indicating the offset on Y axis to the linked mesh
533
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#tracking-positions
534
+ */
535
+ get linkOffsetY(): string | number;
536
+ set linkOffsetY(value: string | number);
537
+ /**
538
+ * Gets or sets a value indicating the offset in pixels on Y axis to the linked mesh
539
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#tracking-positions
540
+ */
541
+ get linkOffsetYInPixels(): number;
542
+ set linkOffsetYInPixels(value: number);
543
+ /** Gets the center coordinate on X axis */
544
+ get centerX(): number;
545
+ /** Gets the center coordinate on Y axis */
546
+ get centerY(): number;
547
+ /** Gets or sets if control is Enabled */
548
+ get isEnabled(): boolean;
549
+ set isEnabled(value: boolean);
550
+ /** Gets or sets background color of control if it's disabled. Only applies to Button class. */
551
+ get disabledColor(): string;
552
+ set disabledColor(value: string);
553
+ /** Gets or sets front color of control if it's disabled. Only applies to Checkbox class. */
554
+ get disabledColorItem(): string;
555
+ set disabledColorItem(value: string);
556
+ /**
557
+ * Gets/sets the overlap group of the control.
558
+ * Controls with overlapGroup set to a number can be deoverlapped.
559
+ * Controls with overlapGroup set to undefined are not deoverlapped.
560
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#deoverlapping
561
+ */
562
+ overlapGroup?: number;
563
+ /**
564
+ * Gets/sets the deoverlap movement multiplier
565
+ */
566
+ overlapDeltaMultiplier?: number;
567
+ /**
568
+ * Array of animations
569
+ */
570
+ animations: Nullable<Animation[]>;
571
+ protected _focusedColor: Nullable<string>;
572
+ /**
573
+ * Border color when control is focused
574
+ * When not defined the ADT color will be used. If no ADT color is defined, focused state won't have any border
575
+ */
576
+ get focusedColor(): Nullable<string>;
577
+ set focusedColor(value: Nullable<string>);
578
+ /**
579
+ * The tab index of this control. -1 indicates this control is not part of the tab navigation.
580
+ * A positive value indicates the order of the control in the tab navigation.
581
+ * A value of 0 indicated the control will be focused after all controls with a positive index.
582
+ * More than one control can have the same tab index and the navigation would then go through all controls with the same value in an order defined by the layout or the hierarchy.
583
+ * The value can be changed at any time.
584
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex
585
+ */
586
+ tabIndex: number;
587
+ protected _isFocused: boolean;
588
+ protected _unfocusedColor: Nullable<string>;
589
+ /** Observable raised when the control gets the focus */
590
+ onFocusObservable: Observable<Control>;
591
+ /** Observable raised when the control loses the focus */
592
+ onBlurObservable: Observable<Control>;
593
+ /** Observable raised when a key event was processed */
594
+ onKeyboardEventProcessedObservable: Observable<IKeyboardEvent>;
595
+ /** @internal */
596
+ onBlur(): void;
597
+ /** @internal */
598
+ onFocus(): void;
599
+ /**
600
+ * Function called to get the list of controls that should not steal the focus from this control
601
+ * @returns an array of controls
602
+ */
603
+ keepsFocusWith(): Nullable<Control[]>;
604
+ /**
605
+ * Function to focus a button programmatically
606
+ */
607
+ focus(): void;
608
+ /**
609
+ * Function to unfocus a button programmatically
610
+ */
611
+ blur(): void;
612
+ /**
613
+ * Handles the keyboard event
614
+ * @param evt Defines the KeyboardEvent
615
+ */
616
+ processKeyboard(evt: IKeyboardEvent): void;
617
+ /**
618
+ * Creates a new control
619
+ * @param name defines the name of the control
620
+ */
621
+ constructor(
622
+ /** defines the name of the control */
623
+ name?: string | undefined);
624
+ /** @internal */
625
+ protected _getTypeName(): string;
626
+ /**
627
+ * Gets the first ascendant in the hierarchy of the given type
628
+ * @param className defines the required type
629
+ * @returns the ascendant or null if not found
630
+ */
631
+ getAscendantOfClass(className: string): Nullable<Control>;
632
+ /**
633
+ * Mark control element as dirty
634
+ * @param force force non visible elements to be marked too
635
+ */
636
+ markAsDirty(force?: boolean): void;
637
+ /**
638
+ * Mark the element and its children as dirty
639
+ */
640
+ markAllAsDirty(): void;
641
+ /** @internal */
642
+ _resetFontCache(): void;
643
+ /**
644
+ * Determines if a container is an ascendant of the current control
645
+ * @param container defines the container to look for
646
+ * @returns true if the container is one of the ascendant of the control
647
+ */
648
+ isAscendant(container: Control): boolean;
649
+ /**
650
+ * Gets coordinates in local control space
651
+ * @param globalCoordinates defines the coordinates to transform
652
+ * @returns the new coordinates in local space
653
+ */
654
+ getLocalCoordinates(globalCoordinates: Vector2): Vector2;
655
+ /**
656
+ * Gets coordinates in local control space
657
+ * @param globalCoordinates defines the coordinates to transform
658
+ * @param result defines the target vector2 where to store the result
659
+ * @returns the current control
660
+ */
661
+ getLocalCoordinatesToRef(globalCoordinates: Vector2, result: Vector2): Control;
662
+ /**
663
+ * Gets coordinates in parent local control space
664
+ * @param globalCoordinates defines the coordinates to transform
665
+ * @returns the new coordinates in parent local space
666
+ */
667
+ getParentLocalCoordinates(globalCoordinates: Vector2): Vector2;
668
+ /**
669
+ * Move the current control to a vector3 position projected onto the screen.
670
+ * @param position defines the target position
671
+ * @param scene defines the hosting scene
672
+ */
673
+ moveToVector3(position: Vector3, scene: Scene): void;
674
+ /**
675
+ * Will store all controls that have this control as ascendant in a given array
676
+ * @param results defines the array where to store the descendants
677
+ * @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
678
+ * @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
679
+ */
680
+ getDescendantsToRef(results: Control[], directDescendantsOnly?: boolean, predicate?: (control: Control) => boolean): void;
681
+ /**
682
+ * Will return all controls that have this control as ascendant
683
+ * @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
684
+ * @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
685
+ * @returns all child controls
686
+ */
687
+ getDescendants(directDescendantsOnly?: boolean, predicate?: (control: Control) => boolean): Control[];
688
+ /**
689
+ * Link current control with a target mesh
690
+ * @param mesh defines the mesh to link with
691
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#tracking-positions
692
+ */
693
+ linkWithMesh(mesh: Nullable<TransformNode>): void;
694
+ /**
695
+ * Shorthand function to set the top, right, bottom, and left padding values on the control.
696
+ * @param { string | number} paddingTop - The value of the top padding.
697
+ * @param { string | number} paddingRight - The value of the right padding. If omitted, top is used.
698
+ * @param { string | number} paddingBottom - The value of the bottom padding. If omitted, top is used.
699
+ * @param { string | number} paddingLeft - The value of the left padding. If omitted, right is used.
700
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#position-and-size
701
+ */
702
+ setPadding(paddingTop: string | number, paddingRight?: string | number, paddingBottom?: string | number, paddingLeft?: string | number): void;
703
+ /**
704
+ * Shorthand funtion to set the top, right, bottom, and left padding values in pixels on the control.
705
+ * @param { number} paddingTop - The value in pixels of the top padding.
706
+ * @param { number} paddingRight - The value in pixels of the right padding. If omitted, top is used.
707
+ * @param { number} paddingBottom - The value in pixels of the bottom padding. If omitted, top is used.
708
+ * @param { number} paddingLeft - The value in pixels of the left padding. If omitted, right is used.
709
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#position-and-size
710
+ */
711
+ setPaddingInPixels(paddingTop: number, paddingRight?: number, paddingBottom?: number, paddingLeft?: number): void;
712
+ /**
713
+ * @internal
714
+ */
715
+ _moveToProjectedPosition(projectedPosition: Vector3): void;
716
+ /**
717
+ * @internal
718
+ */
719
+ _offsetLeft(offset: number): void;
720
+ /**
721
+ * @internal
722
+ */
723
+ _offsetTop(offset: number): void;
724
+ /** @internal */
725
+ _markMatrixAsDirty(): void;
726
+ /** @internal */
727
+ _flagDescendantsAsMatrixDirty(): void;
728
+ /**
729
+ * @internal
730
+ */
731
+ _intersectsRect(rect: Measure, context?: ICanvasRenderingContext): boolean;
732
+ /** @internal */
733
+ protected _computeAdditionalOffsetX(): number;
734
+ /** @internal */
735
+ protected _computeAdditionalOffsetY(): number;
736
+ /** @internal */
737
+ invalidateRect(): void;
738
+ /**
739
+ * @internal
740
+ */
741
+ _markAsDirty(force?: boolean): void;
742
+ /** @internal */
743
+ _markAllAsDirty(): void;
744
+ /**
745
+ * @internal
746
+ */
747
+ _link(host: AdvancedDynamicTexture): void;
748
+ /**
749
+ * @internal
750
+ */
751
+ protected _transform(context?: ICanvasRenderingContext): void;
752
+ /**
753
+ * @internal
754
+ */
755
+ _renderHighlight(context: ICanvasRenderingContext): void;
756
+ /**
757
+ * @internal
758
+ */
759
+ _renderHighlightSpecific(context: ICanvasRenderingContext): void;
760
+ protected _getColor(context: ICanvasRenderingContext): string | ICanvasGradient;
761
+ /**
762
+ * @internal
763
+ */
764
+ protected _applyStates(context: ICanvasRenderingContext): void;
765
+ /**
766
+ * @internal
767
+ */
768
+ _layout(parentMeasure: Measure, context: ICanvasRenderingContext): boolean;
769
+ /**
770
+ * @internal
771
+ */
772
+ protected _processMeasures(parentMeasure: Measure, context: ICanvasRenderingContext): void;
773
+ protected _evaluateClippingState(parentMeasure: Measure): void;
774
+ /** @internal */
775
+ _measure(): void;
776
+ /**
777
+ * @internal
778
+ */
779
+ protected _computeAlignment(parentMeasure: Measure, context: ICanvasRenderingContext): void;
780
+ /**
781
+ * @internal
782
+ */
783
+ protected _preMeasure(parentMeasure: Measure, context: ICanvasRenderingContext): void;
784
+ /**
785
+ * @internal
786
+ */
787
+ protected _postMeasure(parentMeasure: Measure, context: ICanvasRenderingContext): void;
788
+ /**
789
+ * @internal
790
+ */
791
+ protected _additionalProcessing(parentMeasure: Measure, context: ICanvasRenderingContext): void;
792
+ /**
793
+ * @internal
794
+ */
795
+ protected _clipForChildren(context: ICanvasRenderingContext): void;
796
+ private static _ClipMeasure;
797
+ private _tmpMeasureA;
798
+ private _clip;
799
+ /**
800
+ * @internal
801
+ */
802
+ _render(context: ICanvasRenderingContext, invalidatedRectangle?: Nullable<Measure>): boolean;
803
+ /**
804
+ * @internal
805
+ */
806
+ _draw(context: ICanvasRenderingContext, invalidatedRectangle?: Nullable<Measure>): void;
807
+ /**
808
+ * Tests if a given coordinates belong to the current control
809
+ * @param x defines x coordinate to test
810
+ * @param y defines y coordinate to test
811
+ * @returns true if the coordinates are inside the control
812
+ */
813
+ contains(x: number, y: number): boolean;
814
+ /**
815
+ * @internal
816
+ */
817
+ _processPicking(x: number, y: number, pi: Nullable<PointerInfoBase>, type: number, pointerId: number, buttonIndex: number, deltaX?: number, deltaY?: number): boolean;
818
+ /**
819
+ * @internal
820
+ */
821
+ _onPointerMove(target: Control, coordinates: Vector2, pointerId: number, pi: Nullable<PointerInfoBase>): void;
822
+ /**
823
+ * @internal
824
+ */
825
+ _onPointerEnter(target: Control, pi: Nullable<PointerInfoBase>): boolean;
826
+ /**
827
+ * @internal
828
+ */
829
+ _onPointerOut(target: Control, pi: Nullable<PointerInfoBase>, force?: boolean): void;
830
+ /**
831
+ * @internal
832
+ */
833
+ _onPointerDown(target: Control, coordinates: Vector2, pointerId: number, buttonIndex: number, pi: Nullable<PointerInfoBase>): boolean;
834
+ /**
835
+ * @internal
836
+ */
837
+ _onPointerUp(target: Control, coordinates: Vector2, pointerId: number, buttonIndex: number, notifyClick: boolean, pi?: Nullable<PointerInfoBase>): void;
838
+ _onPointerPick(target: Control, coordinates: Vector2, pointerId: number, buttonIndex: number, notifyClick: boolean, pi: Nullable<PointerInfoBase>): boolean;
839
+ /**
840
+ * @internal
841
+ */
842
+ _forcePointerUp(pointerId?: Nullable<number>): void;
843
+ /**
844
+ * @internal
845
+ */
846
+ _onWheelScroll(deltaX?: number, deltaY?: number): void;
847
+ /** @internal */
848
+ _onCanvasBlur(): void;
849
+ /**
850
+ * @internal
851
+ */
852
+ _processObservables(type: number, x: number, y: number, pi: Nullable<PointerInfoBase>, pointerId: number, buttonIndex: number, deltaX?: number, deltaY?: number): boolean;
853
+ private _getStyleProperty;
854
+ private _prepareFont;
855
+ /**
856
+ * A control has a dimension fully defined if that dimension doesn't depend on the parent's dimension.
857
+ * As an example, a control that has dimensions in pixels is fully defined, while in percentage is not fully defined.
858
+ * @param dim the dimension to check (width or height)
859
+ * @returns if the dimension is fully defined
860
+ */
861
+ isDimensionFullyDefined(dim: "width" | "height"): boolean;
862
+ /**
863
+ * Gets the dimension of the control along a specified axis
864
+ * @param dim the dimension to retrieve (width or height)
865
+ * @returns the dimension value along the specified axis
866
+ */
867
+ getDimension(dim: "width" | "height"): ValueAndUnit;
868
+ /**
869
+ * Clones a control and its descendants
870
+ * @param host the texture where the control will be instantiated. Can be empty, in which case the control will be created on the same texture
871
+ * @returns the cloned control
872
+ */
873
+ clone(host?: AdvancedDynamicTexture): Control;
874
+ /**
875
+ * Parses a serialized object into this control
876
+ * @param serializedObject the object with the serialized properties
877
+ * @param host the texture where the control will be instantiated. Can be empty, in which case the control will be created on the same texture
878
+ * @param urlRewriter defines an url rewriter to update urls before sending them to the controls
879
+ * @returns this control
880
+ */
881
+ parse(serializedObject: any, host?: AdvancedDynamicTexture, urlRewriter?: (url: string) => string): Control;
882
+ /**
883
+ * Serializes the current control
884
+ * @param serializationObject defined the JSON serialized object
885
+ * @param force if the control should be serialized even if the isSerializable flag is set to false (default false)
886
+ * @param allowCanvas defines if the control is allowed to use a Canvas2D object to serialize (true by default)
887
+ */
888
+ serialize(serializationObject: any, force?: boolean, allowCanvas?: boolean): void;
889
+ /**
890
+ * @internal
891
+ */
892
+ _parseFromContent(serializedObject: any, host: AdvancedDynamicTexture, urlRewriter?: (url: string) => string): void;
893
+ /** Releases associated resources */
894
+ dispose(): void;
895
+ private static _HORIZONTAL_ALIGNMENT_LEFT;
896
+ private static _HORIZONTAL_ALIGNMENT_RIGHT;
897
+ private static _HORIZONTAL_ALIGNMENT_CENTER;
898
+ private static _VERTICAL_ALIGNMENT_TOP;
899
+ private static _VERTICAL_ALIGNMENT_BOTTOM;
900
+ private static _VERTICAL_ALIGNMENT_CENTER;
901
+ /** HORIZONTAL_ALIGNMENT_LEFT */
902
+ static get HORIZONTAL_ALIGNMENT_LEFT(): number;
903
+ /** HORIZONTAL_ALIGNMENT_RIGHT */
904
+ static get HORIZONTAL_ALIGNMENT_RIGHT(): number;
905
+ /** HORIZONTAL_ALIGNMENT_CENTER */
906
+ static get HORIZONTAL_ALIGNMENT_CENTER(): number;
907
+ /** VERTICAL_ALIGNMENT_TOP */
908
+ static get VERTICAL_ALIGNMENT_TOP(): number;
909
+ /** VERTICAL_ALIGNMENT_BOTTOM */
910
+ static get VERTICAL_ALIGNMENT_BOTTOM(): number;
911
+ /** VERTICAL_ALIGNMENT_CENTER */
912
+ static get VERTICAL_ALIGNMENT_CENTER(): number;
913
+ private static _FontHeightSizes;
914
+ /**
915
+ * @internal
916
+ */
917
+ static _GetFontOffset(font: string, engineToUse?: AbstractEngine): {
918
+ ascent: number;
919
+ height: number;
920
+ descent: number;
921
+ };
922
+ /**
923
+ * Creates a Control from parsed data
924
+ * @param serializedObject defines parsed data
925
+ * @param host defines the hosting AdvancedDynamicTexture
926
+ * @param urlRewriter defines an url rewriter to update urls before sending them to the controls
927
+ * @returns a new Control
928
+ */
929
+ static Parse(serializedObject: any, host: AdvancedDynamicTexture, urlRewriter?: (url: string) => string): Control;
930
+ static AddHeader: (control: Control, text: string, size: string | number, options: {
931
+ isHorizontal: boolean;
932
+ controlFirst: boolean;
933
+ }) => any;
934
+ /**
935
+ * @internal
936
+ */
937
+ protected static drawEllipse(x: number, y: number, width: number, height: number, arc: number, context: ICanvasRenderingContext): void;
938
+ /**
939
+ * Returns true if the control is ready to be used
940
+ * @returns
941
+ */
942
+ isReady(): boolean;
943
+ }