@babylonjs/gui 9.13.0 → 9.15.0

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 (325) hide show
  1. package/2D/FrameGraph/pure.d.ts +2 -0
  2. package/2D/FrameGraph/pure.js +3 -0
  3. package/2D/FrameGraph/pure.js.map +1 -0
  4. package/2D/FrameGraph/renderGraphGUIBlock.d.ts +3 -41
  5. package/2D/FrameGraph/renderGraphGUIBlock.js +5 -64
  6. package/2D/FrameGraph/renderGraphGUIBlock.js.map +1 -1
  7. package/2D/FrameGraph/renderGraphGUIBlock.pure.d.ts +48 -0
  8. package/2D/FrameGraph/renderGraphGUIBlock.pure.js +78 -0
  9. package/2D/FrameGraph/renderGraphGUIBlock.pure.js.map +1 -0
  10. package/2D/advancedDynamicTexture.d.ts +2 -2
  11. package/2D/advancedDynamicTexture.js +2 -2
  12. package/2D/advancedDynamicTexture.js.map +1 -1
  13. package/2D/controls/button.d.ts +3 -107
  14. package/2D/controls/button.js +5 -243
  15. package/2D/controls/button.js.map +1 -1
  16. package/2D/controls/button.pure.d.ts +114 -0
  17. package/2D/controls/button.pure.js +257 -0
  18. package/2D/controls/button.pure.js.map +1 -0
  19. package/2D/controls/checkbox.d.ts +3 -51
  20. package/2D/controls/checkbox.js +5 -161
  21. package/2D/controls/checkbox.js.map +1 -1
  22. package/2D/controls/checkbox.pure.d.ts +58 -0
  23. package/2D/controls/checkbox.pure.js +175 -0
  24. package/2D/controls/checkbox.pure.js.map +1 -0
  25. package/2D/controls/colorpicker.d.ts +5 -101
  26. package/2D/controls/colorpicker.js +7 -1394
  27. package/2D/controls/colorpicker.js.map +1 -1
  28. package/2D/controls/colorpicker.pure.d.ts +106 -0
  29. package/2D/controls/colorpicker.pure.js +1406 -0
  30. package/2D/controls/colorpicker.pure.js.map +1 -0
  31. package/2D/controls/container.d.ts +3 -177
  32. package/2D/controls/container.js +5 -615
  33. package/2D/controls/container.js.map +1 -1
  34. package/2D/controls/container.pure.d.ts +184 -0
  35. package/2D/controls/container.pure.js +629 -0
  36. package/2D/controls/container.pure.js.map +1 -0
  37. package/2D/controls/control.d.ts +3 -944
  38. package/2D/controls/control.js +5 -2457
  39. package/2D/controls/control.js.map +1 -1
  40. package/2D/controls/control.pure.d.ts +951 -0
  41. package/2D/controls/control.pure.js +2471 -0
  42. package/2D/controls/control.pure.js.map +1 -0
  43. package/2D/controls/displayGrid.d.ts +5 -53
  44. package/2D/controls/displayGrid.js +7 -201
  45. package/2D/controls/displayGrid.js.map +1 -1
  46. package/2D/controls/displayGrid.pure.d.ts +58 -0
  47. package/2D/controls/displayGrid.pure.js +213 -0
  48. package/2D/controls/displayGrid.pure.js.map +1 -0
  49. package/2D/controls/ellipse.d.ts +5 -25
  50. package/2D/controls/ellipse.js +7 -92
  51. package/2D/controls/ellipse.js.map +1 -1
  52. package/2D/controls/ellipse.pure.d.ts +30 -0
  53. package/2D/controls/ellipse.pure.js +104 -0
  54. package/2D/controls/ellipse.pure.js.map +1 -0
  55. package/2D/controls/focusableButton.d.ts +3 -15
  56. package/2D/controls/focusableButton.js +5 -22
  57. package/2D/controls/focusableButton.js.map +1 -1
  58. package/2D/controls/focusableButton.pure.d.ts +22 -0
  59. package/2D/controls/focusableButton.pure.js +36 -0
  60. package/2D/controls/focusableButton.pure.js.map +1 -0
  61. package/2D/controls/gradient/LinearGradient.d.ts +3 -43
  62. package/2D/controls/gradient/LinearGradient.js +5 -70
  63. package/2D/controls/gradient/LinearGradient.js.map +1 -1
  64. package/2D/controls/gradient/LinearGradient.pure.d.ts +50 -0
  65. package/2D/controls/gradient/LinearGradient.pure.js +84 -0
  66. package/2D/controls/gradient/LinearGradient.pure.js.map +1 -0
  67. package/2D/controls/gradient/RadialGradient.d.ts +3 -51
  68. package/2D/controls/gradient/RadialGradient.js +5 -86
  69. package/2D/controls/gradient/RadialGradient.js.map +1 -1
  70. package/2D/controls/gradient/RadialGradient.pure.d.ts +58 -0
  71. package/2D/controls/gradient/RadialGradient.pure.js +100 -0
  72. package/2D/controls/gradient/RadialGradient.pure.js.map +1 -0
  73. package/2D/controls/gradient/pure.d.ts +3 -0
  74. package/2D/controls/gradient/pure.js +4 -0
  75. package/2D/controls/gradient/pure.js.map +1 -0
  76. package/2D/controls/grid.d.ts +3 -149
  77. package/2D/controls/grid.js +5 -525
  78. package/2D/controls/grid.js.map +1 -1
  79. package/2D/controls/grid.pure.d.ts +156 -0
  80. package/2D/controls/grid.pure.js +539 -0
  81. package/2D/controls/grid.pure.js.map +1 -0
  82. package/2D/controls/image.d.ts +3 -226
  83. package/2D/controls/image.js +5 -913
  84. package/2D/controls/image.js.map +1 -1
  85. package/2D/controls/image.pure.d.ts +233 -0
  86. package/2D/controls/image.pure.js +927 -0
  87. package/2D/controls/image.pure.js.map +1 -0
  88. package/2D/controls/inputPassword.d.ts +3 -7
  89. package/2D/controls/inputPassword.js +5 -19
  90. package/2D/controls/inputPassword.js.map +1 -1
  91. package/2D/controls/inputPassword.pure.d.ts +14 -0
  92. package/2D/controls/inputPassword.pure.js +33 -0
  93. package/2D/controls/inputPassword.pure.js.map +1 -0
  94. package/2D/controls/inputText.d.ts +3 -202
  95. package/2D/controls/inputText.js +5 -1050
  96. package/2D/controls/inputText.js.map +1 -1
  97. package/2D/controls/inputText.pure.d.ts +209 -0
  98. package/2D/controls/inputText.pure.js +1064 -0
  99. package/2D/controls/inputText.pure.js.map +1 -0
  100. package/2D/controls/inputTextArea.d.ts +3 -140
  101. package/2D/controls/inputTextArea.js +5 -1023
  102. package/2D/controls/inputTextArea.js.map +1 -1
  103. package/2D/controls/inputTextArea.pure.d.ts +147 -0
  104. package/2D/controls/inputTextArea.pure.js +1037 -0
  105. package/2D/controls/inputTextArea.pure.js.map +1 -0
  106. package/2D/controls/line.d.ts +5 -74
  107. package/2D/controls/line.js +7 -234
  108. package/2D/controls/line.js.map +1 -1
  109. package/2D/controls/line.pure.d.ts +79 -0
  110. package/2D/controls/line.pure.js +246 -0
  111. package/2D/controls/line.pure.js.map +1 -0
  112. package/2D/controls/multiLine.d.ts +3 -73
  113. package/2D/controls/multiLine.js +5 -234
  114. package/2D/controls/multiLine.js.map +1 -1
  115. package/2D/controls/multiLine.pure.d.ts +80 -0
  116. package/2D/controls/multiLine.pure.js +248 -0
  117. package/2D/controls/multiLine.pure.js.map +1 -0
  118. package/2D/controls/pure.d.ts +38 -0
  119. package/2D/controls/pure.js +39 -0
  120. package/2D/controls/pure.js.map +1 -0
  121. package/2D/controls/radioButton.d.ts +3 -47
  122. package/2D/controls/radioButton.js +5 -182
  123. package/2D/controls/radioButton.js.map +1 -1
  124. package/2D/controls/radioButton.pure.d.ts +54 -0
  125. package/2D/controls/radioButton.pure.js +196 -0
  126. package/2D/controls/radioButton.pure.js.map +1 -0
  127. package/2D/controls/rectangle.d.ts +5 -43
  128. package/2D/controls/rectangle.js +7 -205
  129. package/2D/controls/rectangle.js.map +1 -1
  130. package/2D/controls/rectangle.pure.d.ts +48 -0
  131. package/2D/controls/rectangle.pure.js +217 -0
  132. package/2D/controls/rectangle.pure.js.map +1 -0
  133. package/2D/controls/scrollViewers/pure.d.ts +2 -0
  134. package/2D/controls/scrollViewers/pure.js +3 -0
  135. package/2D/controls/scrollViewers/pure.js.map +1 -0
  136. package/2D/controls/scrollViewers/scrollViewer.d.ts +3 -176
  137. package/2D/controls/scrollViewers/scrollViewer.js +5 -584
  138. package/2D/controls/scrollViewers/scrollViewer.js.map +1 -1
  139. package/2D/controls/scrollViewers/scrollViewer.pure.d.ts +183 -0
  140. package/2D/controls/scrollViewers/scrollViewer.pure.js +598 -0
  141. package/2D/controls/scrollViewers/scrollViewer.pure.js.map +1 -0
  142. package/2D/controls/scrollViewers/scrollViewerWindow.d.ts +1 -1
  143. package/2D/controls/scrollViewers/scrollViewerWindow.js +2 -2
  144. package/2D/controls/scrollViewers/scrollViewerWindow.js.map +1 -1
  145. package/2D/controls/selector.d.ts +2 -2
  146. package/2D/controls/selector.js +8 -8
  147. package/2D/controls/selector.js.map +1 -1
  148. package/2D/controls/sliders/baseSlider.d.ts +1 -1
  149. package/2D/controls/sliders/baseSlider.js +1 -1
  150. package/2D/controls/sliders/baseSlider.js.map +1 -1
  151. package/2D/controls/sliders/imageBasedSlider.d.ts +3 -45
  152. package/2D/controls/sliders/imageBasedSlider.js +5 -165
  153. package/2D/controls/sliders/imageBasedSlider.js.map +1 -1
  154. package/2D/controls/sliders/imageBasedSlider.pure.d.ts +52 -0
  155. package/2D/controls/sliders/imageBasedSlider.pure.js +179 -0
  156. package/2D/controls/sliders/imageBasedSlider.pure.js.map +1 -0
  157. package/2D/controls/sliders/pure.d.ts +4 -0
  158. package/2D/controls/sliders/pure.js +5 -0
  159. package/2D/controls/sliders/pure.js.map +1 -0
  160. package/2D/controls/sliders/scrollBar.d.ts +3 -48
  161. package/2D/controls/sliders/scrollBar.js +5 -170
  162. package/2D/controls/sliders/scrollBar.js.map +1 -1
  163. package/2D/controls/sliders/scrollBar.pure.d.ts +55 -0
  164. package/2D/controls/sliders/scrollBar.pure.js +184 -0
  165. package/2D/controls/sliders/scrollBar.pure.js.map +1 -0
  166. package/2D/controls/sliders/slider.d.ts +3 -44
  167. package/2D/controls/sliders/slider.js +5 -278
  168. package/2D/controls/sliders/slider.js.map +1 -1
  169. package/2D/controls/sliders/slider.pure.d.ts +51 -0
  170. package/2D/controls/sliders/slider.pure.js +292 -0
  171. package/2D/controls/sliders/slider.pure.js.map +1 -0
  172. package/2D/controls/stackPanel.d.ts +3 -62
  173. package/2D/controls/stackPanel.js +5 -243
  174. package/2D/controls/stackPanel.js.map +1 -1
  175. package/2D/controls/stackPanel.pure.d.ts +69 -0
  176. package/2D/controls/stackPanel.pure.js +257 -0
  177. package/2D/controls/stackPanel.pure.js.map +1 -0
  178. package/2D/controls/statics.d.ts +3 -4
  179. package/2D/controls/statics.js +5 -47
  180. package/2D/controls/statics.js.map +1 -1
  181. package/2D/controls/statics.pure.d.ts +11 -0
  182. package/2D/controls/statics.pure.js +61 -0
  183. package/2D/controls/statics.pure.js.map +1 -0
  184. package/2D/controls/textBlock.d.ts +3 -217
  185. package/2D/controls/textBlock.js +5 -676
  186. package/2D/controls/textBlock.js.map +1 -1
  187. package/2D/controls/textBlock.pure.d.ts +224 -0
  188. package/2D/controls/textBlock.pure.js +690 -0
  189. package/2D/controls/textBlock.pure.js.map +1 -0
  190. package/2D/controls/toggleButton.d.ts +3 -91
  191. package/2D/controls/toggleButton.js +5 -226
  192. package/2D/controls/toggleButton.js.map +1 -1
  193. package/2D/controls/toggleButton.pure.d.ts +98 -0
  194. package/2D/controls/toggleButton.pure.js +240 -0
  195. package/2D/controls/toggleButton.pure.js.map +1 -0
  196. package/2D/controls/virtualKeyboard.d.ts +3 -100
  197. package/2D/controls/virtualKeyboard.js +5 -272
  198. package/2D/controls/virtualKeyboard.js.map +1 -1
  199. package/2D/controls/virtualKeyboard.pure.d.ts +107 -0
  200. package/2D/controls/virtualKeyboard.pure.js +286 -0
  201. package/2D/controls/virtualKeyboard.pure.js.map +1 -0
  202. package/2D/math2D.d.ts +1 -1
  203. package/2D/math2D.js +1 -1
  204. package/2D/math2D.js.map +1 -1
  205. package/2D/measure.js +1 -1
  206. package/2D/measure.js.map +1 -1
  207. package/2D/pure.d.ts +13 -0
  208. package/2D/pure.js +15 -0
  209. package/2D/pure.js.map +1 -0
  210. package/3D/controls/MRTK3/touchHolographicButton.d.ts +4 -4
  211. package/3D/controls/MRTK3/touchHolographicButton.js +10 -10
  212. package/3D/controls/MRTK3/touchHolographicButton.js.map +1 -1
  213. package/3D/controls/holographicBackplate.d.ts +1 -1
  214. package/3D/controls/holographicBackplate.js +1 -1
  215. package/3D/controls/holographicBackplate.js.map +1 -1
  216. package/3D/controls/holographicButton.d.ts +1 -1
  217. package/3D/controls/holographicButton.js +4 -4
  218. package/3D/controls/holographicButton.js.map +1 -1
  219. package/3D/controls/holographicSlate.js +4 -4
  220. package/3D/controls/holographicSlate.js.map +1 -1
  221. package/3D/controls/pure.d.ts +23 -0
  222. package/3D/controls/pure.js +24 -0
  223. package/3D/controls/pure.js.map +1 -0
  224. package/3D/controls/slider3D.d.ts +3 -3
  225. package/3D/controls/slider3D.js +3 -3
  226. package/3D/controls/slider3D.js.map +1 -1
  227. package/3D/controls/touchHolographicButton.d.ts +2 -2
  228. package/3D/controls/touchHolographicButton.js +5 -5
  229. package/3D/controls/touchHolographicButton.js.map +1 -1
  230. package/3D/controls/touchHolographicMenu.js +1 -1
  231. package/3D/controls/touchHolographicMenu.js.map +1 -1
  232. package/3D/gizmos/gizmoHandle.d.ts +1 -1
  233. package/3D/gizmos/gizmoHandle.js +1 -1
  234. package/3D/gizmos/gizmoHandle.js.map +1 -1
  235. package/3D/gizmos/pure.d.ts +3 -0
  236. package/3D/gizmos/pure.js +4 -0
  237. package/3D/gizmos/pure.js.map +1 -0
  238. package/3D/materials/fluent/fluentMaterial.d.ts +5 -100
  239. package/3D/materials/fluent/fluentMaterial.js +7 -305
  240. package/3D/materials/fluent/fluentMaterial.js.map +1 -1
  241. package/3D/materials/fluent/fluentMaterial.pure.d.ts +105 -0
  242. package/3D/materials/fluent/fluentMaterial.pure.js +320 -0
  243. package/3D/materials/fluent/fluentMaterial.pure.js.map +1 -0
  244. package/3D/materials/fluent/pure.d.ts +2 -0
  245. package/3D/materials/fluent/pure.js +3 -0
  246. package/3D/materials/fluent/pure.js.map +1 -0
  247. package/3D/materials/fluentBackplate/fluentBackplateMaterial.d.ts +5 -164
  248. package/3D/materials/fluentBackplate/fluentBackplateMaterial.js +7 -488
  249. package/3D/materials/fluentBackplate/fluentBackplateMaterial.js.map +1 -1
  250. package/3D/materials/fluentBackplate/fluentBackplateMaterial.pure.d.ts +169 -0
  251. package/3D/materials/fluentBackplate/fluentBackplateMaterial.pure.js +503 -0
  252. package/3D/materials/fluentBackplate/fluentBackplateMaterial.pure.js.map +1 -0
  253. package/3D/materials/fluentBackplate/pure.d.ts +2 -0
  254. package/3D/materials/fluentBackplate/pure.js +3 -0
  255. package/3D/materials/fluentBackplate/pure.js.map +1 -0
  256. package/3D/materials/fluentButton/fluentButtonMaterial.d.ts +5 -200
  257. package/3D/materials/fluentButton/fluentButtonMaterial.js +7 -563
  258. package/3D/materials/fluentButton/fluentButtonMaterial.js.map +1 -1
  259. package/3D/materials/fluentButton/fluentButtonMaterial.pure.d.ts +205 -0
  260. package/3D/materials/fluentButton/fluentButtonMaterial.pure.js +578 -0
  261. package/3D/materials/fluentButton/fluentButtonMaterial.pure.js.map +1 -0
  262. package/3D/materials/fluentButton/pure.d.ts +2 -0
  263. package/3D/materials/fluentButton/pure.js +3 -0
  264. package/3D/materials/fluentButton/pure.js.map +1 -0
  265. package/3D/materials/fluentMaterial.d.ts +1 -1
  266. package/3D/materials/fluentMaterial.js +1 -1
  267. package/3D/materials/fluentMaterial.js.map +1 -1
  268. package/3D/materials/handle/handleMaterial.d.ts +5 -66
  269. package/3D/materials/handle/handleMaterial.js +5 -118
  270. package/3D/materials/handle/handleMaterial.js.map +1 -1
  271. package/3D/materials/handle/handleMaterial.pure.d.ts +66 -0
  272. package/3D/materials/handle/handleMaterial.pure.js +121 -0
  273. package/3D/materials/handle/handleMaterial.pure.js.map +1 -0
  274. package/3D/materials/handle/pure.d.ts +2 -0
  275. package/3D/materials/handle/pure.js +3 -0
  276. package/3D/materials/handle/pure.js.map +1 -0
  277. package/3D/materials/mrdl/mrdlBackglowMaterial.d.ts +5 -85
  278. package/3D/materials/mrdl/mrdlBackglowMaterial.js +7 -299
  279. package/3D/materials/mrdl/mrdlBackglowMaterial.js.map +1 -1
  280. package/3D/materials/mrdl/mrdlBackglowMaterial.pure.d.ts +90 -0
  281. package/3D/materials/mrdl/mrdlBackglowMaterial.pure.js +314 -0
  282. package/3D/materials/mrdl/mrdlBackglowMaterial.pure.js.map +1 -0
  283. package/3D/materials/mrdl/mrdlBackplateMaterial.d.ts +5 -145
  284. package/3D/materials/mrdl/mrdlBackplateMaterial.js +7 -433
  285. package/3D/materials/mrdl/mrdlBackplateMaterial.js.map +1 -1
  286. package/3D/materials/mrdl/mrdlBackplateMaterial.pure.d.ts +157 -0
  287. package/3D/materials/mrdl/mrdlBackplateMaterial.pure.js +455 -0
  288. package/3D/materials/mrdl/mrdlBackplateMaterial.pure.js.map +1 -0
  289. package/3D/materials/mrdl/mrdlFrontplateMaterial.d.ts +5 -183
  290. package/3D/materials/mrdl/mrdlFrontplateMaterial.js +7 -532
  291. package/3D/materials/mrdl/mrdlFrontplateMaterial.js.map +1 -1
  292. package/3D/materials/mrdl/mrdlFrontplateMaterial.pure.d.ts +188 -0
  293. package/3D/materials/mrdl/mrdlFrontplateMaterial.pure.js +547 -0
  294. package/3D/materials/mrdl/mrdlFrontplateMaterial.pure.js.map +1 -0
  295. package/3D/materials/mrdl/mrdlInnerquadMaterial.d.ts +5 -54
  296. package/3D/materials/mrdl/mrdlInnerquadMaterial.js +7 -227
  297. package/3D/materials/mrdl/mrdlInnerquadMaterial.js.map +1 -1
  298. package/3D/materials/mrdl/mrdlInnerquadMaterial.pure.d.ts +59 -0
  299. package/3D/materials/mrdl/mrdlInnerquadMaterial.pure.js +242 -0
  300. package/3D/materials/mrdl/mrdlInnerquadMaterial.pure.js.map +1 -0
  301. package/3D/materials/mrdl/mrdlSliderBarMaterial.d.ts +5 -334
  302. package/3D/materials/mrdl/mrdlSliderBarMaterial.js +7 -855
  303. package/3D/materials/mrdl/mrdlSliderBarMaterial.js.map +1 -1
  304. package/3D/materials/mrdl/mrdlSliderBarMaterial.pure.d.ts +346 -0
  305. package/3D/materials/mrdl/mrdlSliderBarMaterial.pure.js +877 -0
  306. package/3D/materials/mrdl/mrdlSliderBarMaterial.pure.js.map +1 -0
  307. package/3D/materials/mrdl/mrdlSliderThumbMaterial.d.ts +5 -334
  308. package/3D/materials/mrdl/mrdlSliderThumbMaterial.js +7 -855
  309. package/3D/materials/mrdl/mrdlSliderThumbMaterial.js.map +1 -1
  310. package/3D/materials/mrdl/mrdlSliderThumbMaterial.pure.d.ts +346 -0
  311. package/3D/materials/mrdl/mrdlSliderThumbMaterial.pure.js +877 -0
  312. package/3D/materials/mrdl/mrdlSliderThumbMaterial.pure.js.map +1 -0
  313. package/3D/materials/mrdl/pure.d.ts +7 -0
  314. package/3D/materials/mrdl/pure.js +8 -0
  315. package/3D/materials/mrdl/pure.js.map +1 -0
  316. package/3D/materials/pure.d.ts +6 -0
  317. package/3D/materials/pure.js +8 -0
  318. package/3D/materials/pure.js.map +1 -0
  319. package/3D/pure.d.ts +6 -0
  320. package/3D/pure.js +8 -0
  321. package/3D/pure.js.map +1 -0
  322. package/package.json +50 -3
  323. package/pure.d.ts +3 -0
  324. package/pure.js +5 -0
  325. package/pure.js.map +1 -0
@@ -0,0 +1,877 @@
1
+ import { __decorate } from "@babylonjs/core/tslib.es6.js";
2
+ import { serialize } from "@babylonjs/core/Misc/decorators.js";
3
+ import { SerializationHelper } from "@babylonjs/core/Misc/decorators.serialization.js";
4
+ import { Vector2, Vector3, Vector4 } from "@babylonjs/core/Maths/math.vector.pure.js";
5
+ import { Texture } from "@babylonjs/core/Materials/Textures/texture.pure.js";
6
+ import { MaterialDefines } from "@babylonjs/core/Materials/materialDefines.js";
7
+ import { PushMaterial } from "@babylonjs/core/Materials/pushMaterial.js";
8
+ import { VertexBuffer } from "@babylonjs/core/Buffers/buffer.pure.js";
9
+ import { RegisterClass } from "@babylonjs/core/Misc/typeStore.js";
10
+ import { Color4 } from "@babylonjs/core/Maths/math.color.pure.js";
11
+ import { EffectFallbacks } from "@babylonjs/core/Materials/effectFallbacks.js";
12
+ import { Constants } from "@babylonjs/core/Engines/constants.js";
13
+ import { HandleFallbacksForShadows, PrepareAttributesForInstances, PrepareDefinesForAttributes, PrepareUniformsAndSamplersList } from "@babylonjs/core/Materials/materialHelper.functions.js";
14
+ import { Tools } from "@babylonjs/core/Misc/tools.pure.js";
15
+ /** @internal */
16
+ class MRDLSliderThumbMaterialDefines extends MaterialDefines {
17
+ constructor() {
18
+ super();
19
+ /*
20
+ "SKY_ENABLED", "BLOB_ENABLE_2", "IRIDESCENCE_ENABLED"
21
+ */
22
+ this.SKY_ENABLED = true;
23
+ this.BLOB_ENABLE_2 = true;
24
+ this.IRIDESCENCE_ENABLED = true;
25
+ this._needNormals = true;
26
+ this._needUVs = true;
27
+ this.rebuild();
28
+ }
29
+ }
30
+ /**
31
+ * Class used to render Slider Thumb material with MRDL
32
+ */
33
+ export class MRDLSliderThumbMaterial extends PushMaterial {
34
+ constructor(name, scene) {
35
+ super(name, scene);
36
+ /**
37
+ * Gets or sets the corner Radius on the slider thumb.
38
+ */
39
+ this.radius = 0.157;
40
+ /**
41
+ * Gets or sets the Bevel Front on the slider thumb.
42
+ */
43
+ this.bevelFront = 0.065;
44
+ /**
45
+ * Gets or sets the Bevel Front Stretch on the slider thumb.
46
+ */
47
+ this.bevelFrontStretch = 0.077;
48
+ /**
49
+ * Gets or sets the Bevel Back on the slider thumb.
50
+ */
51
+ this.bevelBack = 0.031;
52
+ /**
53
+ * Gets or sets the Bevel Back Stretch on the slider thumb.
54
+ */
55
+ this.bevelBackStretch = 0;
56
+ /**
57
+ * Gets or sets the top left Radii Multiplier.
58
+ */
59
+ this.radiusTopLeft = 1.0;
60
+ /**
61
+ * Gets or sets the top left Radii Multiplier.
62
+ */
63
+ this.radiusTopRight = 1.0;
64
+ /**
65
+ * Gets or sets the top left Radii Multiplier.
66
+ */
67
+ this.radiusBottomLeft = 1.0;
68
+ /**
69
+ * Gets or sets the top left Radii Multiplier.
70
+ */
71
+ this.radiusBottomRight = 1.0;
72
+ /**
73
+ * Gets or sets whether Bulge is enabled.
74
+ * Default is false.
75
+ */
76
+ this.bulgeEnabled = false;
77
+ /**
78
+ * Gets or sets the Bulge Height.
79
+ */
80
+ this.bulgeHeight = -0.323;
81
+ /**
82
+ * Gets or sets the Bulge Radius.
83
+ */
84
+ this.bulgeRadius = 0.73;
85
+ /**
86
+ * Gets or sets the Sun Intensity.
87
+ */
88
+ this.sunIntensity = 2;
89
+ /**
90
+ * Gets or sets the Sun Theta.
91
+ */
92
+ this.sunTheta = 0.937;
93
+ /**
94
+ * Gets or sets the Sun Phi.
95
+ */
96
+ this.sunPhi = 0.555;
97
+ /**
98
+ * Gets or sets the Indirect Diffuse.
99
+ */
100
+ this.indirectDiffuse = 1;
101
+ /**
102
+ * Gets or sets the base albedo.
103
+ */
104
+ this.albedo = new Color4(0.0117647, 0.505882, 0.996078, 1);
105
+ /**
106
+ * Gets or sets the Specular value.
107
+ */
108
+ this.specular = 0;
109
+ /**
110
+ * Gets or sets the Shininess value.
111
+ */
112
+ this.shininess = 10;
113
+ /**
114
+ * Gets or sets the Sharpness value.
115
+ */
116
+ this.sharpness = 0;
117
+ /**
118
+ * Gets or sets the Subsurface value.
119
+ */
120
+ this.subsurface = 0.31;
121
+ /**
122
+ * Gets or sets the left gradient color.
123
+ */
124
+ this.leftGradientColor = new Color4(0.0117647, 0.505882, 0.996078, 1);
125
+ /**
126
+ * Gets or sets the right gradient color.
127
+ */
128
+ this.rightGradientColor = new Color4(0.0117647, 0.505882, 0.996078, 1);
129
+ /**
130
+ * Gets or sets the reflection value.
131
+ */
132
+ this.reflection = 0.749;
133
+ /**
134
+ * Gets or sets the front reflect value.
135
+ */
136
+ this.frontReflect = 0;
137
+ /**
138
+ * Gets or sets the edge reflect value.
139
+ */
140
+ this.edgeReflect = 0.09;
141
+ /**
142
+ * Gets or sets the power value.
143
+ */
144
+ this.power = 8.1;
145
+ /**
146
+ * Gets or sets the sky color.
147
+ */
148
+ this.skyColor = new Color4(0.0117647, 0.960784, 0.996078, 1);
149
+ /**
150
+ * Gets or sets the horizon color.
151
+ */
152
+ this.horizonColor = new Color4(0.0117647, 0.333333, 0.996078, 1);
153
+ /**
154
+ * Gets or sets the ground color.
155
+ */
156
+ this.groundColor = new Color4(0, 0.254902, 0.996078, 1);
157
+ /**
158
+ * Gets or sets the horizon power value.
159
+ */
160
+ this.horizonPower = 1;
161
+ /**
162
+ * Gets or sets the finger occlusion width value.
163
+ */
164
+ this.width = 0.02;
165
+ /**
166
+ * Gets or sets the finger occlusion fuzz value.
167
+ */
168
+ this.fuzz = 0.5;
169
+ /**
170
+ * Gets or sets the minimum finger occlusion fuzz value.
171
+ */
172
+ this.minFuzz = 0.001;
173
+ /**
174
+ * Gets or sets the finger occlusion clip fade value.
175
+ */
176
+ this.clipFade = 0.01;
177
+ /**
178
+ * Gets or sets the hue shift value.
179
+ */
180
+ this.hueShift = 0;
181
+ /**
182
+ * Gets or sets the saturation shift value.
183
+ */
184
+ this.saturationShift = 0;
185
+ /**
186
+ * Gets or sets the value shift.
187
+ */
188
+ this.valueShift = 0;
189
+ /**
190
+ * Gets or sets the position of the hover glow effect.
191
+ */
192
+ this.blobPosition = new Vector3(0, 0, 0.1);
193
+ /**
194
+ * Gets or sets the intensity of the hover glow effect.
195
+ */
196
+ this.blobIntensity = 0.5;
197
+ /**
198
+ * Gets or sets the near size of the hover glow effect.
199
+ */
200
+ this.blobNearSize = 0.01;
201
+ /**
202
+ * Gets or sets the far size of the hover glow effect.
203
+ */
204
+ this.blobFarSize = 0.03;
205
+ /**
206
+ * Gets or sets the distance considered "near" to the mesh, which controls the size of the hover glow effect (see blobNearSize).
207
+ */
208
+ this.blobNearDistance = 0;
209
+ /**
210
+ * Gets or sets the distance considered "far" from the mesh, which controls the size of the hover glow effect (see blobFarSize).
211
+ */
212
+ this.blobFarDistance = 0.08;
213
+ /**
214
+ * Gets or sets the length of the hover glow effect fade.
215
+ */
216
+ this.blobFadeLength = 0.576;
217
+ /**
218
+ * Gets or sets the progress of the hover glow effect selection animation corresponding to the left pointer (0.0 - 1.0).
219
+ */
220
+ this.blobPulse = 0;
221
+ /**
222
+ * Gets or sets the opacity of the hover glow effect corresponding to the left pointer (0.0 - 1.0). Default is 0.
223
+ */
224
+ this.blobFade = 1;
225
+ /**
226
+ * Gets or sets the position of the hover glow effect.
227
+ */
228
+ this.blobPosition2 = new Vector3(0.2, 0, 0.1);
229
+ /**
230
+ * Gets or sets the size of the hover glow effect when the right pointer is considered "near" to the mesh (see blobNearDistance).
231
+ */
232
+ this.blobNearSize2 = 0.01;
233
+ /**
234
+ * Gets or sets the progress of the hover glow effect selection animation corresponding to the right pointer (0.0 - 1.0).
235
+ */
236
+ this.blobPulse2 = 0;
237
+ /**
238
+ * Gets or sets the opacity of the hover glow effect corresponding to the right pointer (0.0 - 1.0). Default is 1.
239
+ */
240
+ this.blobFade2 = 1;
241
+ /**
242
+ * Gets or sets the texture of the hover glow effect.
243
+ */
244
+ this.blobTexture = new Texture("", this.getScene());
245
+ /**
246
+ * Gets or sets the finger position for left index.
247
+ */
248
+ this.leftIndexPosition = new Vector3(0, 0, 1);
249
+ /**
250
+ * Gets or sets the finger position for right index.
251
+ */
252
+ this.rightIndexPosition = new Vector3(-1, -1, -1);
253
+ /**
254
+ * Gets or sets the finger position for left index middle position.
255
+ */
256
+ this.leftIndexMiddlePosition = new Vector3(0, 0, 0);
257
+ /**
258
+ * Gets or sets the finger position for right index middle position.
259
+ */
260
+ this.rightIndexMiddlePosition = new Vector3(0, 0, 0);
261
+ /**
262
+ * Gets or sets the Decal Scale for XY.
263
+ */
264
+ this.decalScaleXY = new Vector2(1.5, 1.5);
265
+ /**
266
+ * Gets or sets decalFrontOnly
267
+ * Default is true
268
+ */
269
+ this.decalFrontOnly = true;
270
+ /**
271
+ * Gets or sets the Rim Light intensity.
272
+ */
273
+ this.rimIntensity = 0.287;
274
+ /**
275
+ * Gets or sets the Rim Light hue shift value.
276
+ */
277
+ this.rimHueShift = 0;
278
+ /**
279
+ * Gets or sets the Rim Light saturation shift value.
280
+ */
281
+ this.rimSaturationShift = 0;
282
+ /**
283
+ * Gets or sets the Rim Light value shift.
284
+ */
285
+ this.rimValueShift = -1;
286
+ /**
287
+ * Gets or sets the intensity of the iridescence effect.
288
+ */
289
+ this.iridescenceIntensity = 0;
290
+ /**
291
+ * @internal
292
+ */
293
+ this.useGlobalLeftIndex = 1.0;
294
+ /**
295
+ * @internal
296
+ */
297
+ this.useGlobalRightIndex = 1.0;
298
+ /**
299
+ * @internal
300
+ */
301
+ this.globalLeftIndexTipProximity = 0.0;
302
+ /**
303
+ * @internal
304
+ */
305
+ this.globalRightIndexTipProximity = 0.0;
306
+ /**
307
+ * @internal
308
+ */
309
+ this.globalLeftIndexTipPosition = new Vector4(0.5, 0.0, -0.55, 1.0);
310
+ /**
311
+ * @internal
312
+ */
313
+ this.globaRightIndexTipPosition = new Vector4(0.0, 0.0, 0.0, 1.0);
314
+ /**
315
+ * @internal
316
+ */
317
+ this.globalLeftThumbTipPosition = new Vector4(0.5, 0.0, -0.55, 1.0);
318
+ /**
319
+ * @internal
320
+ */
321
+ this.globalRightThumbTipPosition = new Vector4(0.0, 0.0, 0.0, 1.0);
322
+ /**
323
+ * @internal
324
+ */
325
+ this.globalLeftIndexMiddlePosition = new Vector4(0.5, 0.0, -0.55, 1.0);
326
+ /**
327
+ * @internal
328
+ */
329
+ this.globalRightIndexMiddlePosition = new Vector4(0.0, 0.0, 0.0, 1.0);
330
+ this.alphaMode = Constants.ALPHA_DISABLE;
331
+ this.backFaceCulling = false;
332
+ const textureUrl = Tools.GetAssetUrl(MRDLSliderThumbMaterial.BLUE_GRADIENT_TEXTURE_URL);
333
+ this._blueGradientTexture = new Texture(textureUrl, scene, true, false, Texture.NEAREST_SAMPLINGMODE);
334
+ this._decalTexture = new Texture("", this.getScene());
335
+ this._reflectionMapTexture = new Texture("", this.getScene());
336
+ this._indirectEnvTexture = new Texture("", this.getScene());
337
+ }
338
+ needAlphaBlending() {
339
+ return false;
340
+ }
341
+ needAlphaTesting() {
342
+ return false;
343
+ }
344
+ getAlphaTestTexture() {
345
+ return null;
346
+ }
347
+ // Methods
348
+ isReadyForSubMesh(mesh, subMesh) {
349
+ const drawWrapper = subMesh._drawWrapper;
350
+ if (this.isFrozen) {
351
+ if (drawWrapper.effect && drawWrapper._wasPreviouslyReady) {
352
+ return true;
353
+ }
354
+ }
355
+ if (!subMesh.materialDefines) {
356
+ subMesh.materialDefines = new MRDLSliderThumbMaterialDefines();
357
+ }
358
+ const defines = subMesh.materialDefines;
359
+ const scene = this.getScene();
360
+ if (!this._blueGradientTexture.isReady()) {
361
+ return false;
362
+ }
363
+ if (this._isReadyForSubMesh(subMesh)) {
364
+ return true;
365
+ }
366
+ const engine = scene.getEngine();
367
+ // Attribs
368
+ PrepareDefinesForAttributes(mesh, defines, false, false);
369
+ // Get correct effect
370
+ if (defines.isDirty) {
371
+ defines.markAsProcessed();
372
+ scene.resetCachedMaterial();
373
+ // Fallbacks
374
+ const fallbacks = new EffectFallbacks();
375
+ if (defines.FOG) {
376
+ fallbacks.addFallback(1, "FOG");
377
+ }
378
+ HandleFallbacksForShadows(defines, fallbacks);
379
+ defines.IMAGEPROCESSINGPOSTPROCESS = scene.imageProcessingConfiguration.applyByPostProcess;
380
+ //Attributes
381
+ const attribs = [VertexBuffer.PositionKind];
382
+ if (defines.NORMAL) {
383
+ attribs.push(VertexBuffer.NormalKind);
384
+ }
385
+ if (defines.UV1) {
386
+ attribs.push(VertexBuffer.UVKind);
387
+ }
388
+ if (defines.UV2) {
389
+ attribs.push(VertexBuffer.UV2Kind);
390
+ }
391
+ if (defines.VERTEXCOLOR) {
392
+ attribs.push(VertexBuffer.ColorKind);
393
+ }
394
+ if (defines.TANGENT) {
395
+ attribs.push(VertexBuffer.TangentKind);
396
+ }
397
+ PrepareAttributesForInstances(attribs, defines);
398
+ // Legacy browser patch
399
+ const shaderName = "mrdlSliderThumb";
400
+ const join = defines.toString();
401
+ const uniforms = [
402
+ "world",
403
+ "viewProjection",
404
+ "cameraPosition",
405
+ "_Radius_",
406
+ "_Bevel_Front_",
407
+ "_Bevel_Front_Stretch_",
408
+ "_Bevel_Back_",
409
+ "_Bevel_Back_Stretch_",
410
+ "_Radius_Top_Left_",
411
+ "_Radius_Top_Right_",
412
+ "_Radius_Bottom_Left_",
413
+ "_Radius_Bottom_Right_",
414
+ "_Bulge_Enabled_",
415
+ "_Bulge_Height_",
416
+ "_Bulge_Radius_",
417
+ "_Sun_Intensity_",
418
+ "_Sun_Theta_",
419
+ "_Sun_Phi_",
420
+ "_Indirect_Diffuse_",
421
+ "_Albedo_",
422
+ "_Specular_",
423
+ "_Shininess_",
424
+ "_Sharpness_",
425
+ "_Subsurface_",
426
+ "_Left_Color_",
427
+ "_Right_Color_",
428
+ "_Reflection_",
429
+ "_Front_Reflect_",
430
+ "_Edge_Reflect_",
431
+ "_Power_",
432
+ "_Sky_Color_",
433
+ "_Horizon_Color_",
434
+ "_Ground_Color_",
435
+ "_Horizon_Power_",
436
+ "_Reflection_Map_",
437
+ "_Indirect_Environment_",
438
+ "_Width_",
439
+ "_Fuzz_",
440
+ "_Min_Fuzz_",
441
+ "_Clip_Fade_",
442
+ "_Hue_Shift_",
443
+ "_Saturation_Shift_",
444
+ "_Value_Shift_",
445
+ "_Blob_Position_",
446
+ "_Blob_Intensity_",
447
+ "_Blob_Near_Size_",
448
+ "_Blob_Far_Size_",
449
+ "_Blob_Near_Distance_",
450
+ "_Blob_Far_Distance_",
451
+ "_Blob_Fade_Length_",
452
+ "_Blob_Pulse_",
453
+ "_Blob_Fade_",
454
+ "_Blob_Texture_",
455
+ "_Blob_Position_2_",
456
+ "_Blob_Near_Size_2_",
457
+ "_Blob_Pulse_2_",
458
+ "_Blob_Fade_2_",
459
+ "_Left_Index_Pos_",
460
+ "_Right_Index_Pos_",
461
+ "_Left_Index_Middle_Pos_",
462
+ "_Right_Index_Middle_Pos_",
463
+ "_Decal_",
464
+ "_Decal_Scale_XY_",
465
+ "_Decal_Front_Only_",
466
+ "_Rim_Intensity_",
467
+ "_Rim_Texture_",
468
+ "_Rim_Hue_Shift_",
469
+ "_Rim_Saturation_Shift_",
470
+ "_Rim_Value_Shift_",
471
+ "_Iridescence_Intensity_",
472
+ "_Iridescence_Texture_",
473
+ "Use_Global_Left_Index",
474
+ "Use_Global_Right_Index",
475
+ "Global_Left_Index_Tip_Position",
476
+ "Global_Right_Index_Tip_Position",
477
+ "Global_Left_Thumb_Tip_Position",
478
+ "Global_Right_Thumb_Tip_Position",
479
+ "Global_Left_Index_Middle_Position;",
480
+ "Global_Right_Index_Middle_Position",
481
+ "Global_Left_Index_Tip_Proximity",
482
+ "Global_Right_Index_Tip_Proximity",
483
+ ];
484
+ const samplers = ["_Rim_Texture_", "_Iridescence_Texture_"];
485
+ const uniformBuffers = [];
486
+ PrepareUniformsAndSamplersList({
487
+ uniformsNames: uniforms,
488
+ uniformBuffersNames: uniformBuffers,
489
+ samplers: samplers,
490
+ defines: defines,
491
+ maxSimultaneousLights: 4,
492
+ });
493
+ subMesh.setEffect(scene.getEngine().createEffect(shaderName, {
494
+ attributes: attribs,
495
+ uniformsNames: uniforms,
496
+ uniformBuffersNames: uniformBuffers,
497
+ samplers: samplers,
498
+ defines: join,
499
+ fallbacks: fallbacks,
500
+ onCompiled: this.onCompiled,
501
+ onError: this.onError,
502
+ indexParameters: { maxSimultaneousLights: 4 },
503
+ extraInitializationsAsync: async () => {
504
+ await Promise.all([import("./shaders/mrdlSliderThumb.vertex.js"), import("./shaders/mrdlSliderThumb.fragment.js")]);
505
+ },
506
+ }, engine), defines);
507
+ }
508
+ if (!subMesh.effect || !subMesh.effect.isReady()) {
509
+ return false;
510
+ }
511
+ defines._renderId = scene.getRenderId();
512
+ drawWrapper._wasPreviouslyReady = true;
513
+ return true;
514
+ }
515
+ bindForSubMesh(world, mesh, subMesh) {
516
+ const defines = subMesh.materialDefines;
517
+ if (!defines) {
518
+ return;
519
+ }
520
+ const effect = subMesh.effect;
521
+ if (!effect) {
522
+ return;
523
+ }
524
+ this._activeEffect = effect;
525
+ // Matrices
526
+ this.bindOnlyWorldMatrix(world);
527
+ this._activeEffect.setMatrix("viewProjection", this.getScene().getTransformMatrix());
528
+ this._activeEffect.setVector3("cameraPosition", this.getScene().activeCamera.position);
529
+ // "Round Rect"
530
+ this._activeEffect.setFloat("_Radius_", this.radius);
531
+ this._activeEffect.setFloat("_Bevel_Front_", this.bevelFront);
532
+ this._activeEffect.setFloat("_Bevel_Front_Stretch_", this.bevelFrontStretch);
533
+ this._activeEffect.setFloat("_Bevel_Back_", this.bevelBack);
534
+ this._activeEffect.setFloat("_Bevel_Back_Stretch_", this.bevelBackStretch);
535
+ // "Radii Multipliers"
536
+ this._activeEffect.setFloat("_Radius_Top_Left_", this.radiusTopLeft);
537
+ this._activeEffect.setFloat("_Radius_Top_Right_", this.radiusTopRight);
538
+ this._activeEffect.setFloat("_Radius_Bottom_Left_", this.radiusBottomLeft);
539
+ this._activeEffect.setFloat("_Radius_Bottom_Right_", this.radiusBottomRight);
540
+ // "Bulge"
541
+ this._activeEffect.setFloat("_Bulge_Enabled_", this.bulgeEnabled ? 1.0 : 0.0);
542
+ this._activeEffect.setFloat("_Bulge_Height_", this.bulgeHeight);
543
+ this._activeEffect.setFloat("_Bulge_Radius_", this.bulgeRadius);
544
+ // "Sun"
545
+ this._activeEffect.setFloat("_Sun_Intensity_", this.sunIntensity);
546
+ this._activeEffect.setFloat("_Sun_Theta_", this.sunTheta);
547
+ this._activeEffect.setFloat("_Sun_Phi_", this.sunPhi);
548
+ this._activeEffect.setFloat("_Indirect_Diffuse_", this.indirectDiffuse);
549
+ // "Diffuse And Specular"
550
+ this._activeEffect.setDirectColor4("_Albedo_", this.albedo);
551
+ this._activeEffect.setFloat("_Specular_", this.specular);
552
+ this._activeEffect.setFloat("_Shininess_", this.shininess);
553
+ this._activeEffect.setFloat("_Sharpness_", this.sharpness);
554
+ this._activeEffect.setFloat("_Subsurface_", this.subsurface);
555
+ // "Gradient"
556
+ this._activeEffect.setDirectColor4("_Left_Color_", this.leftGradientColor);
557
+ this._activeEffect.setDirectColor4("_Right_Color_", this.rightGradientColor);
558
+ // "Reflection"
559
+ this._activeEffect.setFloat("_Reflection_", this.reflection);
560
+ this._activeEffect.setFloat("_Front_Reflect_", this.frontReflect);
561
+ this._activeEffect.setFloat("_Edge_Reflect_", this.edgeReflect);
562
+ this._activeEffect.setFloat("_Power_", this.power);
563
+ // "Sky Environment"
564
+ //define SKY_ENABLED true;
565
+ this._activeEffect.setDirectColor4("_Sky_Color_", this.skyColor);
566
+ this._activeEffect.setDirectColor4("_Horizon_Color_", this.horizonColor);
567
+ this._activeEffect.setDirectColor4("_Ground_Color_", this.groundColor);
568
+ this._activeEffect.setFloat("_Horizon_Power_", this.horizonPower);
569
+ // "Mapped Environment"
570
+ //define ENV_ENABLE false;
571
+ this._activeEffect.setTexture("_Reflection_Map_", this._reflectionMapTexture);
572
+ this._activeEffect.setTexture("_Indirect_Environment_", this._indirectEnvTexture);
573
+ // "FingerOcclusion"
574
+ //define OCCLUSION_ENABLED false;
575
+ this._activeEffect.setFloat("_Width_", this.width);
576
+ this._activeEffect.setFloat("_Fuzz_", this.fuzz);
577
+ this._activeEffect.setFloat("_Min_Fuzz_", this.minFuzz);
578
+ this._activeEffect.setFloat("_Clip_Fade_", this.clipFade);
579
+ // "View Based Color Shift"
580
+ this._activeEffect.setFloat("_Hue_Shift_", this.hueShift);
581
+ this._activeEffect.setFloat("_Saturation_Shift_", this.saturationShift);
582
+ this._activeEffect.setFloat("_Value_Shift_", this.valueShift);
583
+ // "Blob"
584
+ //define BLOB_ENABLE false;
585
+ this._activeEffect.setVector3("_Blob_Position_", this.blobPosition);
586
+ this._activeEffect.setFloat("_Blob_Intensity_", this.blobIntensity);
587
+ this._activeEffect.setFloat("_Blob_Near_Size_", this.blobNearSize);
588
+ this._activeEffect.setFloat("_Blob_Far_Size_", this.blobFarSize);
589
+ this._activeEffect.setFloat("_Blob_Near_Distance_", this.blobNearDistance);
590
+ this._activeEffect.setFloat("_Blob_Far_Distance_", this.blobFarDistance);
591
+ this._activeEffect.setFloat("_Blob_Fade_Length_", this.blobFadeLength);
592
+ this._activeEffect.setFloat("_Blob_Pulse_", this.blobPulse);
593
+ this._activeEffect.setFloat("_Blob_Fade_", this.blobFade);
594
+ // "Blob Texture"
595
+ this._activeEffect.setTexture("_Blob_Texture_", this.blobTexture);
596
+ // "Blob 2"
597
+ //define BLOB_ENABLE_2 true;
598
+ this._activeEffect.setVector3("_Blob_Position_2_", this.blobPosition2);
599
+ this._activeEffect.setFloat("_Blob_Near_Size_2_", this.blobNearSize2);
600
+ this._activeEffect.setFloat("_Blob_Pulse_2_", this.blobPulse2);
601
+ this._activeEffect.setFloat("_Blob_Fade_2_", this.blobFade2);
602
+ // "Finger Positions"
603
+ this._activeEffect.setVector3("_Left_Index_Pos_", this.leftIndexPosition);
604
+ this._activeEffect.setVector3("_Right_Index_Pos_", this.rightIndexPosition);
605
+ this._activeEffect.setVector3("_Left_Index_Middle_Pos_", this.leftIndexMiddlePosition);
606
+ this._activeEffect.setVector3("_Right_Index_Middle_Pos_", this.rightIndexMiddlePosition);
607
+ // "Decal Texture"
608
+ //define DECAL_ENABLE false;
609
+ this._activeEffect.setTexture("_Decal_", this._decalTexture);
610
+ this._activeEffect.setVector2("_Decal_Scale_XY_", this.decalScaleXY);
611
+ this._activeEffect.setFloat("_Decal_Front_Only_", this.decalFrontOnly ? 1.0 : 0.0);
612
+ // "Rim Light"
613
+ this._activeEffect.setFloat("_Rim_Intensity_", this.rimIntensity);
614
+ this._activeEffect.setTexture("_Rim_Texture_", this._blueGradientTexture);
615
+ this._activeEffect.setFloat("_Rim_Hue_Shift_", this.rimHueShift);
616
+ this._activeEffect.setFloat("_Rim_Saturation_Shift_", this.rimSaturationShift);
617
+ this._activeEffect.setFloat("_Rim_Value_Shift_", this.rimValueShift);
618
+ // "Iridescence"
619
+ //define IRIDESCENCE_ENABLED true;
620
+ this._activeEffect.setFloat("_Iridescence_Intensity_", this.iridescenceIntensity);
621
+ this._activeEffect.setTexture("_Iridescence_Texture_", this._blueGradientTexture);
622
+ // Global inputs
623
+ this._activeEffect.setFloat("Use_Global_Left_Index", this.useGlobalLeftIndex);
624
+ this._activeEffect.setFloat("Use_Global_Right_Index", this.useGlobalRightIndex);
625
+ this._activeEffect.setVector4("Global_Left_Index_Tip_Position", this.globalLeftIndexTipPosition);
626
+ this._activeEffect.setVector4("Global_Right_Index_Tip_Position", this.globaRightIndexTipPosition);
627
+ this._activeEffect.setVector4("Global_Left_Thumb_Tip_Position", this.globalLeftThumbTipPosition);
628
+ this._activeEffect.setVector4("Global_Right_Thumb_Tip_Position", this.globalRightThumbTipPosition);
629
+ this._activeEffect.setVector4("Global_Left_Index_Middle_Position", this.globalLeftIndexMiddlePosition);
630
+ this._activeEffect.setVector4("Global_Right_Index_Middle_Position", this.globalRightIndexMiddlePosition);
631
+ this._activeEffect.setFloat("Global_Left_Index_Tip_Proximity", this.globalLeftIndexTipProximity);
632
+ this._activeEffect.setFloat("Global_Right_Index_Tip_Proximity", this.globalRightIndexTipProximity);
633
+ this._afterBind(mesh, this._activeEffect, subMesh);
634
+ }
635
+ /**
636
+ * Get the list of animatables in the material.
637
+ * @returns the list of animatables object used in the material
638
+ */
639
+ getAnimatables() {
640
+ return [];
641
+ }
642
+ dispose(forceDisposeEffect) {
643
+ super.dispose(forceDisposeEffect);
644
+ this._reflectionMapTexture.dispose();
645
+ this._indirectEnvTexture.dispose();
646
+ this._blueGradientTexture.dispose();
647
+ this._decalTexture.dispose();
648
+ }
649
+ clone(name) {
650
+ return SerializationHelper.Clone(() => new MRDLSliderThumbMaterial(name, this.getScene()), this);
651
+ }
652
+ serialize() {
653
+ const serializationObject = super.serialize();
654
+ serializationObject.customType = "BABYLON.MRDLSliderThumbMaterial";
655
+ return serializationObject;
656
+ }
657
+ getClassName() {
658
+ return "MRDLSliderThumbMaterial";
659
+ }
660
+ // Statics
661
+ /**
662
+ * Parses a serialized MRDLSliderThumbMaterial and returns a new instance.
663
+ * @param source - the serialized object
664
+ * @param scene - defines the hosting scene
665
+ * @param rootUrl - the root URL used to load any associated textures
666
+ * @returns a new MRDLSliderThumbMaterial
667
+ */
668
+ static Parse(source, scene, rootUrl) {
669
+ return SerializationHelper.Parse(() => new MRDLSliderThumbMaterial(source.name, scene), source, scene, rootUrl);
670
+ }
671
+ }
672
+ /**
673
+ * URL pointing to the texture used to define the coloring for the Iridescent Map effect.
674
+ */
675
+ MRDLSliderThumbMaterial.BLUE_GRADIENT_TEXTURE_URL = "https://assets.babylonjs.com/core/MRTK/MRDL/mrtk-mrdl-blue-gradient.png";
676
+ __decorate([
677
+ serialize()
678
+ ], MRDLSliderThumbMaterial.prototype, "radius", void 0);
679
+ __decorate([
680
+ serialize()
681
+ ], MRDLSliderThumbMaterial.prototype, "bevelFront", void 0);
682
+ __decorate([
683
+ serialize()
684
+ ], MRDLSliderThumbMaterial.prototype, "bevelFrontStretch", void 0);
685
+ __decorate([
686
+ serialize()
687
+ ], MRDLSliderThumbMaterial.prototype, "bevelBack", void 0);
688
+ __decorate([
689
+ serialize()
690
+ ], MRDLSliderThumbMaterial.prototype, "bevelBackStretch", void 0);
691
+ __decorate([
692
+ serialize()
693
+ ], MRDLSliderThumbMaterial.prototype, "radiusTopLeft", void 0);
694
+ __decorate([
695
+ serialize()
696
+ ], MRDLSliderThumbMaterial.prototype, "radiusTopRight", void 0);
697
+ __decorate([
698
+ serialize()
699
+ ], MRDLSliderThumbMaterial.prototype, "radiusBottomLeft", void 0);
700
+ __decorate([
701
+ serialize()
702
+ ], MRDLSliderThumbMaterial.prototype, "radiusBottomRight", void 0);
703
+ __decorate([
704
+ serialize()
705
+ ], MRDLSliderThumbMaterial.prototype, "bulgeEnabled", void 0);
706
+ __decorate([
707
+ serialize()
708
+ ], MRDLSliderThumbMaterial.prototype, "bulgeHeight", void 0);
709
+ __decorate([
710
+ serialize()
711
+ ], MRDLSliderThumbMaterial.prototype, "bulgeRadius", void 0);
712
+ __decorate([
713
+ serialize()
714
+ ], MRDLSliderThumbMaterial.prototype, "sunIntensity", void 0);
715
+ __decorate([
716
+ serialize()
717
+ ], MRDLSliderThumbMaterial.prototype, "sunTheta", void 0);
718
+ __decorate([
719
+ serialize()
720
+ ], MRDLSliderThumbMaterial.prototype, "sunPhi", void 0);
721
+ __decorate([
722
+ serialize()
723
+ ], MRDLSliderThumbMaterial.prototype, "indirectDiffuse", void 0);
724
+ __decorate([
725
+ serialize()
726
+ ], MRDLSliderThumbMaterial.prototype, "albedo", void 0);
727
+ __decorate([
728
+ serialize()
729
+ ], MRDLSliderThumbMaterial.prototype, "specular", void 0);
730
+ __decorate([
731
+ serialize()
732
+ ], MRDLSliderThumbMaterial.prototype, "shininess", void 0);
733
+ __decorate([
734
+ serialize()
735
+ ], MRDLSliderThumbMaterial.prototype, "sharpness", void 0);
736
+ __decorate([
737
+ serialize()
738
+ ], MRDLSliderThumbMaterial.prototype, "subsurface", void 0);
739
+ __decorate([
740
+ serialize()
741
+ ], MRDLSliderThumbMaterial.prototype, "leftGradientColor", void 0);
742
+ __decorate([
743
+ serialize()
744
+ ], MRDLSliderThumbMaterial.prototype, "rightGradientColor", void 0);
745
+ __decorate([
746
+ serialize()
747
+ ], MRDLSliderThumbMaterial.prototype, "reflection", void 0);
748
+ __decorate([
749
+ serialize()
750
+ ], MRDLSliderThumbMaterial.prototype, "frontReflect", void 0);
751
+ __decorate([
752
+ serialize()
753
+ ], MRDLSliderThumbMaterial.prototype, "edgeReflect", void 0);
754
+ __decorate([
755
+ serialize()
756
+ ], MRDLSliderThumbMaterial.prototype, "power", void 0);
757
+ __decorate([
758
+ serialize()
759
+ ], MRDLSliderThumbMaterial.prototype, "skyColor", void 0);
760
+ __decorate([
761
+ serialize()
762
+ ], MRDLSliderThumbMaterial.prototype, "horizonColor", void 0);
763
+ __decorate([
764
+ serialize()
765
+ ], MRDLSliderThumbMaterial.prototype, "groundColor", void 0);
766
+ __decorate([
767
+ serialize()
768
+ ], MRDLSliderThumbMaterial.prototype, "horizonPower", void 0);
769
+ __decorate([
770
+ serialize()
771
+ ], MRDLSliderThumbMaterial.prototype, "width", void 0);
772
+ __decorate([
773
+ serialize()
774
+ ], MRDLSliderThumbMaterial.prototype, "fuzz", void 0);
775
+ __decorate([
776
+ serialize()
777
+ ], MRDLSliderThumbMaterial.prototype, "minFuzz", void 0);
778
+ __decorate([
779
+ serialize()
780
+ ], MRDLSliderThumbMaterial.prototype, "clipFade", void 0);
781
+ __decorate([
782
+ serialize()
783
+ ], MRDLSliderThumbMaterial.prototype, "hueShift", void 0);
784
+ __decorate([
785
+ serialize()
786
+ ], MRDLSliderThumbMaterial.prototype, "saturationShift", void 0);
787
+ __decorate([
788
+ serialize()
789
+ ], MRDLSliderThumbMaterial.prototype, "valueShift", void 0);
790
+ __decorate([
791
+ serialize()
792
+ ], MRDLSliderThumbMaterial.prototype, "blobPosition", void 0);
793
+ __decorate([
794
+ serialize()
795
+ ], MRDLSliderThumbMaterial.prototype, "blobIntensity", void 0);
796
+ __decorate([
797
+ serialize()
798
+ ], MRDLSliderThumbMaterial.prototype, "blobNearSize", void 0);
799
+ __decorate([
800
+ serialize()
801
+ ], MRDLSliderThumbMaterial.prototype, "blobFarSize", void 0);
802
+ __decorate([
803
+ serialize()
804
+ ], MRDLSliderThumbMaterial.prototype, "blobNearDistance", void 0);
805
+ __decorate([
806
+ serialize()
807
+ ], MRDLSliderThumbMaterial.prototype, "blobFarDistance", void 0);
808
+ __decorate([
809
+ serialize()
810
+ ], MRDLSliderThumbMaterial.prototype, "blobFadeLength", void 0);
811
+ __decorate([
812
+ serialize()
813
+ ], MRDLSliderThumbMaterial.prototype, "blobPulse", void 0);
814
+ __decorate([
815
+ serialize()
816
+ ], MRDLSliderThumbMaterial.prototype, "blobFade", void 0);
817
+ __decorate([
818
+ serialize()
819
+ ], MRDLSliderThumbMaterial.prototype, "blobPosition2", void 0);
820
+ __decorate([
821
+ serialize()
822
+ ], MRDLSliderThumbMaterial.prototype, "blobNearSize2", void 0);
823
+ __decorate([
824
+ serialize()
825
+ ], MRDLSliderThumbMaterial.prototype, "blobPulse2", void 0);
826
+ __decorate([
827
+ serialize()
828
+ ], MRDLSliderThumbMaterial.prototype, "blobFade2", void 0);
829
+ __decorate([
830
+ serialize()
831
+ ], MRDLSliderThumbMaterial.prototype, "blobTexture", void 0);
832
+ __decorate([
833
+ serialize()
834
+ ], MRDLSliderThumbMaterial.prototype, "leftIndexPosition", void 0);
835
+ __decorate([
836
+ serialize()
837
+ ], MRDLSliderThumbMaterial.prototype, "rightIndexPosition", void 0);
838
+ __decorate([
839
+ serialize()
840
+ ], MRDLSliderThumbMaterial.prototype, "leftIndexMiddlePosition", void 0);
841
+ __decorate([
842
+ serialize()
843
+ ], MRDLSliderThumbMaterial.prototype, "rightIndexMiddlePosition", void 0);
844
+ __decorate([
845
+ serialize()
846
+ ], MRDLSliderThumbMaterial.prototype, "decalScaleXY", void 0);
847
+ __decorate([
848
+ serialize()
849
+ ], MRDLSliderThumbMaterial.prototype, "decalFrontOnly", void 0);
850
+ __decorate([
851
+ serialize()
852
+ ], MRDLSliderThumbMaterial.prototype, "rimIntensity", void 0);
853
+ __decorate([
854
+ serialize()
855
+ ], MRDLSliderThumbMaterial.prototype, "rimHueShift", void 0);
856
+ __decorate([
857
+ serialize()
858
+ ], MRDLSliderThumbMaterial.prototype, "rimSaturationShift", void 0);
859
+ __decorate([
860
+ serialize()
861
+ ], MRDLSliderThumbMaterial.prototype, "rimValueShift", void 0);
862
+ __decorate([
863
+ serialize()
864
+ ], MRDLSliderThumbMaterial.prototype, "iridescenceIntensity", void 0);
865
+ let _Registered = false;
866
+ /**
867
+ * Registers the MRDLSliderThumbMaterial class with the type store for serialization support.
868
+ * Safe to call multiple times; only the first call has an effect.
869
+ */
870
+ export function RegisterMRDLSliderThumbMaterial() {
871
+ if (_Registered) {
872
+ return;
873
+ }
874
+ _Registered = true;
875
+ RegisterClass("BABYLON.GUI.MRDLSliderThumbMaterial", MRDLSliderThumbMaterial);
876
+ }
877
+ //# sourceMappingURL=mrdlSliderThumbMaterial.pure.js.map