@itwin/frontend-devtools 4.0.0-dev.51 → 4.0.0-dev.54

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 (346) hide show
  1. package/lib/cjs/ClipboardUtilities.d.ts +8 -8
  2. package/lib/cjs/ClipboardUtilities.js +26 -26
  3. package/lib/cjs/FrontEndDevTools.d.ts +19 -19
  4. package/lib/cjs/FrontEndDevTools.js +221 -221
  5. package/lib/cjs/FrontEndDevTools.js.map +1 -1
  6. package/lib/cjs/effects/Convolution.d.ts +68 -68
  7. package/lib/cjs/effects/Convolution.js +148 -148
  8. package/lib/cjs/effects/Convolution.js.map +1 -1
  9. package/lib/cjs/effects/EffectTools.d.ts +33 -33
  10. package/lib/cjs/effects/EffectTools.js +67 -67
  11. package/lib/cjs/effects/EffectTools.js.map +1 -1
  12. package/lib/cjs/effects/Explosion.d.ts +12 -12
  13. package/lib/cjs/effects/Explosion.js +168 -168
  14. package/lib/cjs/effects/Explosion.js.map +1 -1
  15. package/lib/cjs/effects/FlipImage.d.ts +30 -30
  16. package/lib/cjs/effects/FlipImage.js +79 -79
  17. package/lib/cjs/effects/FlipImage.js.map +1 -1
  18. package/lib/cjs/effects/LensDistortion.d.ts +34 -34
  19. package/lib/cjs/effects/LensDistortion.js +88 -88
  20. package/lib/cjs/effects/LensDistortion.js.map +1 -1
  21. package/lib/cjs/effects/Random.d.ts +24 -24
  22. package/lib/cjs/effects/Random.js +49 -49
  23. package/lib/cjs/effects/Saturation.d.ts +30 -30
  24. package/lib/cjs/effects/Saturation.js +59 -59
  25. package/lib/cjs/effects/Saturation.js.map +1 -1
  26. package/lib/cjs/effects/Snow.d.ts +76 -76
  27. package/lib/cjs/effects/Snow.js +187 -187
  28. package/lib/cjs/effects/Snow.js.map +1 -1
  29. package/lib/cjs/effects/Vignette.d.ts +39 -39
  30. package/lib/cjs/effects/Vignette.js +79 -79
  31. package/lib/cjs/effects/Vignette.js.map +1 -1
  32. package/lib/cjs/frontend-devtools.d.ts +82 -82
  33. package/lib/cjs/frontend-devtools.js +102 -98
  34. package/lib/cjs/frontend-devtools.js.map +1 -1
  35. package/lib/cjs/tools/AnimationIntervalTool.d.ts +15 -15
  36. package/lib/cjs/tools/AnimationIntervalTool.js +30 -30
  37. package/lib/cjs/tools/AnimationIntervalTool.js.map +1 -1
  38. package/lib/cjs/tools/ChangeUnitsTool.d.ts +15 -15
  39. package/lib/cjs/tools/ChangeUnitsTool.js +41 -41
  40. package/lib/cjs/tools/ChangeUnitsTool.js.map +1 -1
  41. package/lib/cjs/tools/ClipTools.d.ts +67 -67
  42. package/lib/cjs/tools/ClipTools.js +161 -161
  43. package/lib/cjs/tools/ClipTools.js.map +1 -1
  44. package/lib/cjs/tools/DisplayStyleTools.d.ts +145 -145
  45. package/lib/cjs/tools/DisplayStyleTools.js +368 -368
  46. package/lib/cjs/tools/DisplayStyleTools.js.map +1 -1
  47. package/lib/cjs/tools/EmphasizeElementsTool.d.ts +60 -60
  48. package/lib/cjs/tools/EmphasizeElementsTool.js +154 -154
  49. package/lib/cjs/tools/EmphasizeElementsTool.js.map +1 -1
  50. package/lib/cjs/tools/FrustumDecoration.d.ts +57 -57
  51. package/lib/cjs/tools/FrustumDecoration.js +374 -374
  52. package/lib/cjs/tools/FrustumDecoration.js.map +1 -1
  53. package/lib/cjs/tools/InspectElementTool.d.ts +42 -42
  54. package/lib/cjs/tools/InspectElementTool.js +198 -198
  55. package/lib/cjs/tools/InspectElementTool.js.map +1 -1
  56. package/lib/cjs/tools/MapLayerTool.d.ts +264 -264
  57. package/lib/cjs/tools/MapLayerTool.js +507 -507
  58. package/lib/cjs/tools/MapLayerTool.js.map +1 -1
  59. package/lib/cjs/tools/MeasureTileLoadTime.d.ts +12 -12
  60. package/lib/cjs/tools/MeasureTileLoadTime.js +63 -63
  61. package/lib/cjs/tools/MeasureTileLoadTime.js.map +1 -1
  62. package/lib/cjs/tools/ModelAppearanceTools.d.ts +86 -86
  63. package/lib/cjs/tools/ModelAppearanceTools.js +183 -183
  64. package/lib/cjs/tools/ModelAppearanceTools.js.map +1 -1
  65. package/lib/cjs/tools/PlanProjectionTools.d.ts +40 -40
  66. package/lib/cjs/tools/PlanProjectionTools.js +149 -149
  67. package/lib/cjs/tools/PlanProjectionTools.js.map +1 -1
  68. package/lib/cjs/tools/PlanarMaskTools.d.ts +182 -182
  69. package/lib/cjs/tools/PlanarMaskTools.js +391 -391
  70. package/lib/cjs/tools/PlanarMaskTools.js.map +1 -1
  71. package/lib/cjs/tools/ProjectExtents.d.ts +41 -41
  72. package/lib/cjs/tools/ProjectExtents.js +110 -110
  73. package/lib/cjs/tools/ProjectExtents.js.map +1 -1
  74. package/lib/cjs/tools/RealityModelTools.d.ts +116 -116
  75. package/lib/cjs/tools/RealityModelTools.js +281 -281
  76. package/lib/cjs/tools/RealityModelTools.js.map +1 -1
  77. package/lib/cjs/tools/RealityTransitionTool.d.ts +25 -25
  78. package/lib/cjs/tools/RealityTransitionTool.js +115 -115
  79. package/lib/cjs/tools/RealityTransitionTool.js.map +1 -1
  80. package/lib/cjs/tools/RenderSystemTools.d.ts +38 -38
  81. package/lib/cjs/tools/RenderSystemTools.js +69 -69
  82. package/lib/cjs/tools/RenderSystemTools.js.map +1 -1
  83. package/lib/cjs/tools/RenderTargetTools.d.ts +107 -107
  84. package/lib/cjs/tools/RenderTargetTools.d.ts.map +1 -1
  85. package/lib/cjs/tools/RenderTargetTools.js +174 -174
  86. package/lib/cjs/tools/RenderTargetTools.js.map +1 -1
  87. package/lib/cjs/tools/ReportWebGLCompatibilityTool.d.ts +11 -11
  88. package/lib/cjs/tools/ReportWebGLCompatibilityTool.js +30 -30
  89. package/lib/cjs/tools/ReportWebGLCompatibilityTool.js.map +1 -1
  90. package/lib/cjs/tools/SavedViews.d.ts +46 -46
  91. package/lib/cjs/tools/SavedViews.js +136 -136
  92. package/lib/cjs/tools/SavedViews.js.map +1 -1
  93. package/lib/cjs/tools/ScheduleScriptTools.d.ts +37 -37
  94. package/lib/cjs/tools/ScheduleScriptTools.js +157 -157
  95. package/lib/cjs/tools/ScheduleScriptTools.js.map +1 -1
  96. package/lib/cjs/tools/SelectionTools.d.ts +28 -28
  97. package/lib/cjs/tools/SelectionTools.js +87 -87
  98. package/lib/cjs/tools/SelectionTools.js.map +1 -1
  99. package/lib/cjs/tools/SetGpuMemoryLimitTool.d.ts +15 -15
  100. package/lib/cjs/tools/SetGpuMemoryLimitTool.js +33 -33
  101. package/lib/cjs/tools/SetGpuMemoryLimitTool.js.map +1 -1
  102. package/lib/cjs/tools/SourceAspectIdTools.d.ts +40 -40
  103. package/lib/cjs/tools/SourceAspectIdTools.d.ts.map +1 -1
  104. package/lib/cjs/tools/SourceAspectIdTools.js +86 -85
  105. package/lib/cjs/tools/SourceAspectIdTools.js.map +1 -1
  106. package/lib/cjs/tools/TileRequestDecoration.d.ts +12 -12
  107. package/lib/cjs/tools/TileRequestDecoration.js +83 -83
  108. package/lib/cjs/tools/TileRequestDecoration.js.map +1 -1
  109. package/lib/cjs/tools/TileTreeBoundsDecoration.d.ts +11 -11
  110. package/lib/cjs/tools/TileTreeBoundsDecoration.js +74 -74
  111. package/lib/cjs/tools/TileTreeBoundsDecoration.js.map +1 -1
  112. package/lib/cjs/tools/ToolTipProvider.d.ts +15 -15
  113. package/lib/cjs/tools/ToolTipProvider.js +66 -66
  114. package/lib/cjs/tools/ToolTipProvider.js.map +1 -1
  115. package/lib/cjs/tools/ViewportTools.d.ts +218 -218
  116. package/lib/cjs/tools/ViewportTools.js +516 -516
  117. package/lib/cjs/tools/ViewportTools.js.map +1 -1
  118. package/lib/cjs/tools/parseArgs.d.ts +23 -23
  119. package/lib/cjs/tools/parseArgs.js +51 -51
  120. package/lib/cjs/tools/parseBoolean.d.ts +8 -8
  121. package/lib/cjs/tools/parseBoolean.js +26 -26
  122. package/lib/cjs/tools/parseToggle.d.ts +8 -8
  123. package/lib/cjs/tools/parseToggle.js +25 -25
  124. package/lib/cjs/ui/Button.d.ts +29 -29
  125. package/lib/cjs/ui/Button.d.ts.map +1 -1
  126. package/lib/cjs/ui/Button.js +26 -26
  127. package/lib/cjs/ui/CheckBox.d.ts +23 -23
  128. package/lib/cjs/ui/CheckBox.d.ts.map +1 -1
  129. package/lib/cjs/ui/CheckBox.js +27 -27
  130. package/lib/cjs/ui/ColorInput.d.ts +27 -27
  131. package/lib/cjs/ui/ColorInput.d.ts.map +1 -1
  132. package/lib/cjs/ui/ColorInput.js +53 -53
  133. package/lib/cjs/ui/ComboBox.d.ts +28 -28
  134. package/lib/cjs/ui/ComboBox.d.ts.map +1 -1
  135. package/lib/cjs/ui/ComboBox.js +42 -42
  136. package/lib/cjs/ui/DataList.d.ts +27 -27
  137. package/lib/cjs/ui/DataList.d.ts.map +1 -1
  138. package/lib/cjs/ui/DataList.js +39 -39
  139. package/lib/cjs/ui/NestedMenu.d.ts +19 -19
  140. package/lib/cjs/ui/NestedMenu.d.ts.map +1 -1
  141. package/lib/cjs/ui/NestedMenu.js +46 -46
  142. package/lib/cjs/ui/NumericInput.d.ts +35 -35
  143. package/lib/cjs/ui/NumericInput.d.ts.map +1 -1
  144. package/lib/cjs/ui/NumericInput.js +61 -61
  145. package/lib/cjs/ui/RadioBox.d.ts +29 -29
  146. package/lib/cjs/ui/RadioBox.d.ts.map +1 -1
  147. package/lib/cjs/ui/RadioBox.js +76 -76
  148. package/lib/cjs/ui/Slider.d.ts +28 -28
  149. package/lib/cjs/ui/Slider.d.ts.map +1 -1
  150. package/lib/cjs/ui/Slider.js +42 -42
  151. package/lib/cjs/ui/TextBox.d.ts +32 -32
  152. package/lib/cjs/ui/TextBox.d.ts.map +1 -1
  153. package/lib/cjs/ui/TextBox.js +56 -56
  154. package/lib/cjs/widgets/DiagnosticsPanel.d.ts +37 -37
  155. package/lib/cjs/widgets/DiagnosticsPanel.js +81 -81
  156. package/lib/cjs/widgets/FpsTracker.d.ts +19 -19
  157. package/lib/cjs/widgets/FpsTracker.js +56 -56
  158. package/lib/cjs/widgets/GpuProfiler.d.ts +16 -16
  159. package/lib/cjs/widgets/GpuProfiler.js +192 -192
  160. package/lib/cjs/widgets/KeyinField.d.ts +61 -61
  161. package/lib/cjs/widgets/KeyinField.js +186 -186
  162. package/lib/cjs/widgets/MemoryTracker.d.ts +27 -27
  163. package/lib/cjs/widgets/MemoryTracker.js +242 -242
  164. package/lib/cjs/widgets/MemoryTracker.js.map +1 -1
  165. package/lib/cjs/widgets/RenderCommandBreakdown.d.ts +15 -15
  166. package/lib/cjs/widgets/RenderCommandBreakdown.js +67 -67
  167. package/lib/cjs/widgets/TileMemoryBreakdown.d.ts +30 -30
  168. package/lib/cjs/widgets/TileMemoryBreakdown.js +203 -203
  169. package/lib/cjs/widgets/TileStatisticsTracker.d.ts +21 -21
  170. package/lib/cjs/widgets/TileStatisticsTracker.js +144 -144
  171. package/lib/cjs/widgets/ToolSettingsTracker.d.ts +9 -9
  172. package/lib/cjs/widgets/ToolSettingsTracker.js +211 -211
  173. package/lib/cjs/widgets/ToolSettingsTracker.js.map +1 -1
  174. package/lib/esm/ClipboardUtilities.d.ts +8 -8
  175. package/lib/esm/ClipboardUtilities.js +22 -22
  176. package/lib/esm/FrontEndDevTools.d.ts +19 -19
  177. package/lib/esm/FrontEndDevTools.js +218 -217
  178. package/lib/esm/FrontEndDevTools.js.map +1 -1
  179. package/lib/esm/effects/Convolution.d.ts +68 -68
  180. package/lib/esm/effects/Convolution.js +144 -138
  181. package/lib/esm/effects/Convolution.js.map +1 -1
  182. package/lib/esm/effects/EffectTools.d.ts +33 -33
  183. package/lib/esm/effects/EffectTools.js +63 -61
  184. package/lib/esm/effects/EffectTools.js.map +1 -1
  185. package/lib/esm/effects/Explosion.d.ts +12 -12
  186. package/lib/esm/effects/Explosion.js +165 -164
  187. package/lib/esm/effects/Explosion.js.map +1 -1
  188. package/lib/esm/effects/FlipImage.d.ts +30 -30
  189. package/lib/esm/effects/FlipImage.js +76 -74
  190. package/lib/esm/effects/FlipImage.js.map +1 -1
  191. package/lib/esm/effects/LensDistortion.d.ts +34 -34
  192. package/lib/esm/effects/LensDistortion.js +85 -83
  193. package/lib/esm/effects/LensDistortion.js.map +1 -1
  194. package/lib/esm/effects/Random.d.ts +24 -24
  195. package/lib/esm/effects/Random.js +41 -41
  196. package/lib/esm/effects/Saturation.d.ts +30 -30
  197. package/lib/esm/effects/Saturation.js +56 -54
  198. package/lib/esm/effects/Saturation.js.map +1 -1
  199. package/lib/esm/effects/Snow.d.ts +76 -76
  200. package/lib/esm/effects/Snow.js +184 -182
  201. package/lib/esm/effects/Snow.js.map +1 -1
  202. package/lib/esm/effects/Vignette.d.ts +39 -39
  203. package/lib/esm/effects/Vignette.js +76 -74
  204. package/lib/esm/effects/Vignette.js.map +1 -1
  205. package/lib/esm/frontend-devtools.d.ts +82 -82
  206. package/lib/esm/frontend-devtools.js +86 -86
  207. package/lib/esm/tools/AnimationIntervalTool.d.ts +15 -15
  208. package/lib/esm/tools/AnimationIntervalTool.js +27 -26
  209. package/lib/esm/tools/AnimationIntervalTool.js.map +1 -1
  210. package/lib/esm/tools/ChangeUnitsTool.d.ts +15 -15
  211. package/lib/esm/tools/ChangeUnitsTool.js +38 -37
  212. package/lib/esm/tools/ChangeUnitsTool.js.map +1 -1
  213. package/lib/esm/tools/ClipTools.d.ts +67 -67
  214. package/lib/esm/tools/ClipTools.js +158 -155
  215. package/lib/esm/tools/ClipTools.js.map +1 -1
  216. package/lib/esm/tools/DisplayStyleTools.d.ts +145 -145
  217. package/lib/esm/tools/DisplayStyleTools.js +364 -354
  218. package/lib/esm/tools/DisplayStyleTools.js.map +1 -1
  219. package/lib/esm/tools/EmphasizeElementsTool.d.ts +60 -60
  220. package/lib/esm/tools/EmphasizeElementsTool.js +150 -145
  221. package/lib/esm/tools/EmphasizeElementsTool.js.map +1 -1
  222. package/lib/esm/tools/FrustumDecoration.d.ts +57 -57
  223. package/lib/esm/tools/FrustumDecoration.js +370 -367
  224. package/lib/esm/tools/FrustumDecoration.js.map +1 -1
  225. package/lib/esm/tools/InspectElementTool.d.ts +42 -42
  226. package/lib/esm/tools/InspectElementTool.js +195 -194
  227. package/lib/esm/tools/InspectElementTool.js.map +1 -1
  228. package/lib/esm/tools/MapLayerTool.d.ts +264 -264
  229. package/lib/esm/tools/MapLayerTool.js +504 -485
  230. package/lib/esm/tools/MapLayerTool.js.map +1 -1
  231. package/lib/esm/tools/MeasureTileLoadTime.d.ts +12 -12
  232. package/lib/esm/tools/MeasureTileLoadTime.js +60 -59
  233. package/lib/esm/tools/MeasureTileLoadTime.js.map +1 -1
  234. package/lib/esm/tools/ModelAppearanceTools.d.ts +86 -86
  235. package/lib/esm/tools/ModelAppearanceTools.js +180 -172
  236. package/lib/esm/tools/ModelAppearanceTools.js.map +1 -1
  237. package/lib/esm/tools/PlanProjectionTools.d.ts +40 -40
  238. package/lib/esm/tools/PlanProjectionTools.js +146 -143
  239. package/lib/esm/tools/PlanProjectionTools.js.map +1 -1
  240. package/lib/esm/tools/PlanarMaskTools.d.ts +182 -182
  241. package/lib/esm/tools/PlanarMaskTools.js +387 -375
  242. package/lib/esm/tools/PlanarMaskTools.js.map +1 -1
  243. package/lib/esm/tools/ProjectExtents.d.ts +41 -41
  244. package/lib/esm/tools/ProjectExtents.js +105 -104
  245. package/lib/esm/tools/ProjectExtents.js.map +1 -1
  246. package/lib/esm/tools/RealityModelTools.d.ts +116 -116
  247. package/lib/esm/tools/RealityModelTools.js +278 -268
  248. package/lib/esm/tools/RealityModelTools.js.map +1 -1
  249. package/lib/esm/tools/RealityTransitionTool.d.ts +25 -25
  250. package/lib/esm/tools/RealityTransitionTool.js +112 -111
  251. package/lib/esm/tools/RealityTransitionTool.js.map +1 -1
  252. package/lib/esm/tools/RenderSystemTools.d.ts +38 -38
  253. package/lib/esm/tools/RenderSystemTools.js +65 -62
  254. package/lib/esm/tools/RenderSystemTools.js.map +1 -1
  255. package/lib/esm/tools/RenderTargetTools.d.ts +107 -107
  256. package/lib/esm/tools/RenderTargetTools.d.ts.map +1 -1
  257. package/lib/esm/tools/RenderTargetTools.js +169 -159
  258. package/lib/esm/tools/RenderTargetTools.js.map +1 -1
  259. package/lib/esm/tools/ReportWebGLCompatibilityTool.d.ts +11 -11
  260. package/lib/esm/tools/ReportWebGLCompatibilityTool.js +27 -26
  261. package/lib/esm/tools/ReportWebGLCompatibilityTool.js.map +1 -1
  262. package/lib/esm/tools/SavedViews.d.ts +46 -46
  263. package/lib/esm/tools/SavedViews.js +131 -128
  264. package/lib/esm/tools/SavedViews.js.map +1 -1
  265. package/lib/esm/tools/ScheduleScriptTools.d.ts +37 -37
  266. package/lib/esm/tools/ScheduleScriptTools.js +154 -151
  267. package/lib/esm/tools/ScheduleScriptTools.js.map +1 -1
  268. package/lib/esm/tools/SelectionTools.d.ts +28 -28
  269. package/lib/esm/tools/SelectionTools.js +84 -82
  270. package/lib/esm/tools/SelectionTools.js.map +1 -1
  271. package/lib/esm/tools/SetGpuMemoryLimitTool.d.ts +15 -15
  272. package/lib/esm/tools/SetGpuMemoryLimitTool.js +30 -29
  273. package/lib/esm/tools/SetGpuMemoryLimitTool.js.map +1 -1
  274. package/lib/esm/tools/SourceAspectIdTools.d.ts +40 -40
  275. package/lib/esm/tools/SourceAspectIdTools.d.ts.map +1 -1
  276. package/lib/esm/tools/SourceAspectIdTools.js +82 -79
  277. package/lib/esm/tools/SourceAspectIdTools.js.map +1 -1
  278. package/lib/esm/tools/TileRequestDecoration.d.ts +12 -12
  279. package/lib/esm/tools/TileRequestDecoration.js +80 -79
  280. package/lib/esm/tools/TileRequestDecoration.js.map +1 -1
  281. package/lib/esm/tools/TileTreeBoundsDecoration.d.ts +11 -11
  282. package/lib/esm/tools/TileTreeBoundsDecoration.js +71 -70
  283. package/lib/esm/tools/TileTreeBoundsDecoration.js.map +1 -1
  284. package/lib/esm/tools/ToolTipProvider.d.ts +15 -15
  285. package/lib/esm/tools/ToolTipProvider.js +63 -62
  286. package/lib/esm/tools/ToolTipProvider.js.map +1 -1
  287. package/lib/esm/tools/ViewportTools.d.ts +218 -218
  288. package/lib/esm/tools/ViewportTools.js +511 -492
  289. package/lib/esm/tools/ViewportTools.js.map +1 -1
  290. package/lib/esm/tools/parseArgs.d.ts +23 -23
  291. package/lib/esm/tools/parseArgs.js +47 -47
  292. package/lib/esm/tools/parseBoolean.d.ts +8 -8
  293. package/lib/esm/tools/parseBoolean.js +22 -22
  294. package/lib/esm/tools/parseToggle.d.ts +8 -8
  295. package/lib/esm/tools/parseToggle.js +21 -21
  296. package/lib/esm/ui/Button.d.ts +29 -29
  297. package/lib/esm/ui/Button.d.ts.map +1 -1
  298. package/lib/esm/ui/Button.js +22 -22
  299. package/lib/esm/ui/CheckBox.d.ts +23 -23
  300. package/lib/esm/ui/CheckBox.d.ts.map +1 -1
  301. package/lib/esm/ui/CheckBox.js +23 -23
  302. package/lib/esm/ui/ColorInput.d.ts +27 -27
  303. package/lib/esm/ui/ColorInput.d.ts.map +1 -1
  304. package/lib/esm/ui/ColorInput.js +48 -48
  305. package/lib/esm/ui/ComboBox.d.ts +28 -28
  306. package/lib/esm/ui/ComboBox.d.ts.map +1 -1
  307. package/lib/esm/ui/ComboBox.js +38 -38
  308. package/lib/esm/ui/DataList.d.ts +27 -27
  309. package/lib/esm/ui/DataList.d.ts.map +1 -1
  310. package/lib/esm/ui/DataList.js +34 -34
  311. package/lib/esm/ui/NestedMenu.d.ts +19 -19
  312. package/lib/esm/ui/NestedMenu.d.ts.map +1 -1
  313. package/lib/esm/ui/NestedMenu.js +42 -42
  314. package/lib/esm/ui/NumericInput.d.ts +35 -35
  315. package/lib/esm/ui/NumericInput.d.ts.map +1 -1
  316. package/lib/esm/ui/NumericInput.js +56 -56
  317. package/lib/esm/ui/RadioBox.d.ts +29 -29
  318. package/lib/esm/ui/RadioBox.d.ts.map +1 -1
  319. package/lib/esm/ui/RadioBox.js +72 -72
  320. package/lib/esm/ui/Slider.d.ts +28 -28
  321. package/lib/esm/ui/Slider.d.ts.map +1 -1
  322. package/lib/esm/ui/Slider.js +38 -38
  323. package/lib/esm/ui/TextBox.d.ts +32 -32
  324. package/lib/esm/ui/TextBox.d.ts.map +1 -1
  325. package/lib/esm/ui/TextBox.js +52 -52
  326. package/lib/esm/widgets/DiagnosticsPanel.d.ts +37 -37
  327. package/lib/esm/widgets/DiagnosticsPanel.js +77 -77
  328. package/lib/esm/widgets/FpsTracker.d.ts +19 -19
  329. package/lib/esm/widgets/FpsTracker.js +52 -52
  330. package/lib/esm/widgets/GpuProfiler.d.ts +16 -16
  331. package/lib/esm/widgets/GpuProfiler.js +188 -188
  332. package/lib/esm/widgets/KeyinField.d.ts +61 -61
  333. package/lib/esm/widgets/KeyinField.js +182 -182
  334. package/lib/esm/widgets/MemoryTracker.d.ts +27 -27
  335. package/lib/esm/widgets/MemoryTracker.js +237 -237
  336. package/lib/esm/widgets/MemoryTracker.js.map +1 -1
  337. package/lib/esm/widgets/RenderCommandBreakdown.d.ts +15 -15
  338. package/lib/esm/widgets/RenderCommandBreakdown.js +63 -63
  339. package/lib/esm/widgets/TileMemoryBreakdown.d.ts +30 -30
  340. package/lib/esm/widgets/TileMemoryBreakdown.js +199 -199
  341. package/lib/esm/widgets/TileStatisticsTracker.d.ts +21 -21
  342. package/lib/esm/widgets/TileStatisticsTracker.js +140 -140
  343. package/lib/esm/widgets/ToolSettingsTracker.d.ts +9 -9
  344. package/lib/esm/widgets/ToolSettingsTracker.js +208 -207
  345. package/lib/esm/widgets/ToolSettingsTracker.js.map +1 -1
  346. package/package.json +8 -8
@@ -1,376 +1,388 @@
1
- /*---------------------------------------------------------------------------------------------
2
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
- * See LICENSE.md in the project root for license terms and full copyright notice.
4
- *--------------------------------------------------------------------------------------------*/
5
- import { PlanarClipMaskMode, PlanarClipMaskPriority, PlanarClipMaskSettings } from "@itwin/core-common";
6
- import { EventHandled, IModelApp, LocateFilterStatus, LocateResponse, PrimitiveTool, Tool, } from "@itwin/core-frontend";
7
- import { parseBoolean } from "./parseBoolean";
8
- /** Set Map Masking by selected models.
9
- * @beta
10
- */
11
- export class SetMapHigherPriorityMasking extends Tool {
12
- static get minArgs() { return 0; }
13
- static get maxArgs() { return 2; }
14
- async run(transparency, invert) {
15
- const vp = IModelApp.viewManager.selectedView;
16
- if (undefined === vp)
17
- return false;
18
- vp.changeBackgroundMapProps({ planarClipMask: { mode: PlanarClipMaskMode.Priority, priority: PlanarClipMaskPriority.BackgroundMap, transparency, invert } });
19
- vp.invalidateRenderPlan();
20
- return true;
21
- }
22
- async parseAndRun(...args) {
23
- const transparency = parseFloat(args[0]);
24
- let invert;
25
- if (args.length > 1)
26
- invert = parseBoolean(args[1]);
27
- return this.run((transparency !== undefined && transparency < 1.0) ? transparency : 0, invert === true);
28
- }
29
- }
30
- SetMapHigherPriorityMasking.toolId = "SetMapHigherPriorityMask";
31
- /** Unmask Mask.
32
- * @beta
33
- */
34
- export class UnmaskMapTool extends Tool {
35
- static get minArgs() { return 0; }
36
- static get maxArgs() { return 0; }
37
- async run() {
38
- const vp = IModelApp.viewManager.selectedView;
39
- if (undefined === vp)
40
- return false;
41
- vp.changeBackgroundMapProps({ planarClipMask: { mode: PlanarClipMaskMode.None, transparency: 0, invert: false } });
42
- vp.invalidateRenderPlan();
43
- return true;
44
- }
45
- }
46
- UnmaskMapTool.toolId = "UnmaskMap";
47
- /** Base class for the reality model planar masking tools.
48
- * @beta
49
- */
50
- export class PlanarMaskBaseTool extends PrimitiveTool {
51
- constructor() {
52
- super(...arguments);
53
- this._acceptedModelIds = new Set();
54
- this._acceptedSubCategoryIds = new Set();
55
- this._acceptedElementIds = new Set();
56
- this._transparency = 0;
57
- this._useSelection = false;
58
- this._invert = false;
59
- }
60
- requireWriteableTarget() { return false; }
61
- async onPostInstall() {
62
- await super.onPostInstall();
63
- this.setupAndPromptForNextAction();
64
- }
65
- async onUnsuspend() { this.showPrompt(); }
66
- setupAndPromptForNextAction() {
67
- this._useSelection = (undefined !== this.targetView && this.iModel.selectionSet.isActive);
68
- this.initLocateElements(!this._useSelection || (this.targetModelRequired() && !this._targetMaskModel));
69
- IModelApp.locateManager.options.allowDecorations = true; // So we can select "contextual" reality models.
70
- this.showPrompt();
71
- }
72
- targetModelRequired() { return true; }
73
- elementRequired() { return true; }
74
- allowSelection() { return true; }
75
- clearIds() {
76
- this._acceptedElementIds.clear();
77
- this._acceptedModelIds.clear();
78
- }
79
- async exitTool() {
80
- await super.exitTool();
81
- this._transparency = 0;
82
- }
83
- async onRestartTool() {
84
- this.clearIds();
85
- this._acceptedSubCategoryIds.clear();
86
- const tool = this.createToolInstance();
87
- if (!await tool.run())
88
- await this.exitTool();
89
- }
90
- async parseAndRun(...args) {
91
- const transparency = parseFloat(args[0]);
92
- this._transparency = (transparency !== undefined && transparency < 1.0) ? transparency : 0;
93
- if (args.length > 1)
94
- this._invert = parseBoolean(args[1]) === true;
95
- return this.run();
96
- }
97
- async onCleanup() {
98
- if (0 !== this._acceptedElementIds.size)
99
- this.iModel.hilited.setHilite(this._acceptedElementIds, false);
100
- this.clearIds();
101
- }
102
- async filterHit(hit, _out) {
103
- if (!hit.modelId)
104
- return LocateFilterStatus.Reject;
105
- if (undefined === this._targetMaskModel && this.targetModelRequired()) {
106
- if (undefined !== hit.viewport.displayStyle.contextRealityModelStates.find((x) => x.modelId === hit.modelId))
107
- return LocateFilterStatus.Accept;
108
- const model = this.iModel.models.getLoaded(hit.modelId)?.asSpatialModel;
109
- return model?.isRealityModel ? LocateFilterStatus.Accept : LocateFilterStatus.Reject;
110
- }
111
- else
112
- return (hit.isElementHit && !hit.isModelHit && !this._acceptedElementIds.has(hit.sourceId)) ? LocateFilterStatus.Accept : LocateFilterStatus.Reject;
113
- }
114
- async onDataButtonDown(ev) {
115
- const hit = await IModelApp.locateManager.doLocate(new LocateResponse(), true, ev.point, ev.viewport, ev.inputSource);
116
- const vp = IModelApp.viewManager.selectedView;
117
- if (undefined === vp)
118
- return EventHandled.No;
119
- if (undefined !== hit && undefined === this._targetMaskModel && this.targetModelRequired()) {
120
- if (hit.modelId) {
121
- this._targetMaskModel = hit.viewport.displayStyle.contextRealityModelStates.find((x) => x.modelId === hit.modelId) ?? hit.modelId;
122
- if (!this.elementRequired()) {
123
- this.applyMask(vp);
124
- await this.onRestartTool();
125
- }
126
- }
127
- }
128
- else if (this._useSelection && this.iModel.selectionSet.isActive) {
129
- const elements = await this.iModel.elements.getProps(this.iModel.selectionSet.elements);
130
- for (const element of elements) {
131
- if (element.id && element.model) {
132
- this._acceptedElementIds.add(element.id);
133
- this._acceptedModelIds.add(element.model);
134
- }
135
- }
136
- this.applyMask(vp);
137
- await this.exitTool();
138
- return EventHandled.No;
139
- }
140
- else if (undefined !== hit && hit.isElementHit) {
141
- const sourceId = hit.sourceId;
142
- if (!this._acceptedElementIds.has(sourceId)) {
143
- this._acceptedElementIds.add(sourceId);
144
- this._acceptedModelIds.add(hit.modelId);
145
- if (hit.subCategoryId)
146
- this._acceptedSubCategoryIds.add(hit.subCategoryId);
147
- this.applyMask(vp);
148
- }
149
- }
150
- this.setupAndPromptForNextAction();
151
- return EventHandled.No;
152
- }
153
- createSubCategoryMask() {
154
- return PlanarClipMaskSettings.create({
155
- subCategoryIds: this._acceptedSubCategoryIds,
156
- modelIds: this._acceptedModelIds,
157
- transparency: this._transparency,
158
- invert: this._invert,
159
- });
160
- }
161
- createElementMask(option) {
162
- return PlanarClipMaskSettings.create({
163
- elementIds: this._acceptedElementIds,
164
- exclude: "exclude" === option,
165
- modelIds: this._acceptedModelIds,
166
- transparency: this._transparency,
167
- invert: this._invert,
168
- });
169
- }
170
- createModelMask() {
171
- return PlanarClipMaskSettings.create({ modelIds: this._acceptedModelIds, transparency: this._transparency, invert: this._invert });
172
- }
173
- setRealityModelMask(vp, mask) {
174
- if (typeof this._targetMaskModel === "string")
175
- vp.displayStyle.settings.planarClipMasks.set(this._targetMaskModel, mask);
176
- else if (undefined !== this._targetMaskModel)
177
- this._targetMaskModel.planarClipMaskSettings = mask;
178
- }
179
- }
180
- /** Tool to mask background map by elements
181
- * @beta
182
- */
183
- export class MaskBackgroundMapByElementTool extends PlanarMaskBaseTool {
184
- static get minArgs() { return 0; }
185
- static get maxArgs() { return 2; }
186
- targetModelRequired() { return false; }
187
- showPrompt() {
188
- IModelApp.notifications.outputPromptByKey(`FrontendDevTools:tools.MaskBackgroundMapByElement.Prompts.${this._useSelection ? "AcceptSelection" : "IdentifyMaskElement"}`);
189
- }
190
- createToolInstance() { return new MaskBackgroundMapByElementTool(); }
191
- applyMask(vp) {
192
- vp.changeBackgroundMapProps({ planarClipMask: this.createElementMask("include").toJSON() });
193
- }
194
- }
195
- MaskBackgroundMapByElementTool.toolId = "MaskBackgroundMapByElement";
196
- /** Tool to mask background map by excluded elements
197
- * @beta
198
- */
199
- export class MaskBackgroundMapByExcludedElementTool extends PlanarMaskBaseTool {
200
- static get minArgs() { return 0; }
201
- static get maxArgs() { return 2; }
202
- targetModelRequired() { return false; }
203
- showPrompt() {
204
- IModelApp.notifications.outputPromptByKey(`FrontendDevTools:tools.MaskBackgroundMapByExcludedElement.Prompts.${this._useSelection ? "AcceptSelection" : "IdentifyMaskElement"}`);
205
- }
206
- createToolInstance() { return new MaskBackgroundMapByExcludedElementTool(); }
207
- applyMask(vp) {
208
- vp.changeBackgroundMapProps({ planarClipMask: this.createElementMask("exclude").toJSON() });
209
- }
210
- }
211
- MaskBackgroundMapByExcludedElementTool.toolId = "MaskBackgroundMapByExcludedElement";
212
- /** Tool to mask background map by SubCategories
213
- * @beta
214
- */
215
- export class MaskBackgroundMapBySubCategoryTool extends PlanarMaskBaseTool {
216
- static get minArgs() { return 0; }
217
- static get maxArgs() { return 2; }
218
- targetModelRequired() { return false; }
219
- allowSelection() { return false; } // Need picking to get subcategory.
220
- showPrompt() {
221
- IModelApp.notifications.outputPromptByKey("FrontendDevTools:tools.MaskBackgroundMapBySubCategory.Prompts.IdentifyMaskSubCategory");
222
- }
223
- createToolInstance() { return new MaskBackgroundMapBySubCategoryTool(); }
224
- applyMask(vp) {
225
- vp.changeBackgroundMapProps({ planarClipMask: this.createSubCategoryMask().toJSON() });
226
- }
227
- }
228
- MaskBackgroundMapBySubCategoryTool.toolId = "MaskBackgroundMapBySubCategory";
229
- /** Tool to mask background map by geometric models
230
- * @beta
231
- */
232
- export class MaskBackgroundMapByModelTool extends PlanarMaskBaseTool {
233
- static get minArgs() { return 0; }
234
- static get maxArgs() { return 2; }
235
- targetModelRequired() { return false; }
236
- showPrompt() {
237
- IModelApp.notifications.outputPromptByKey(`FrontendDevTools:tools.MaskBackgroundMapByModel.Prompts.${this._useSelection ? "AcceptSelection" : "IdentifyMaskModel"}`);
238
- }
239
- createToolInstance() { return new MaskBackgroundMapByModelTool(); }
240
- applyMask(vp) {
241
- vp.changeBackgroundMapProps({ planarClipMask: this.createModelMask().toJSON() });
242
- }
243
- }
244
- MaskBackgroundMapByModelTool.toolId = "MaskBackgroundMapByModel";
245
- /** Tool to mask reality model by elements
246
- * @beta
247
- */
248
- export class MaskRealityModelByElementTool extends PlanarMaskBaseTool {
249
- static get minArgs() { return 0; }
250
- static get maxArgs() { return 2; }
251
- targetModelRequired() { return true; }
252
- showPrompt() {
253
- const key = `FrontendDevTools:tools.MaskRealityModelByElement.Prompts.${this._targetMaskModel === undefined ? "IdentifyRealityModel" : (this._useSelection ? "AcceptSelection" : "IdentifyMaskElement")}`;
254
- IModelApp.notifications.outputPromptByKey(key);
255
- }
256
- createToolInstance() { return new MaskRealityModelByElementTool(); }
257
- applyMask(vp) {
258
- this.setRealityModelMask(vp, this.createElementMask("include"));
259
- }
260
- }
261
- MaskRealityModelByElementTool.toolId = "MaskRealityModelByElement";
262
- /** Tool to mask reality model by excluded elements
263
- * @beta
264
- */
265
- export class MaskRealityModelByExcludedElementTool extends PlanarMaskBaseTool {
266
- static get minArgs() { return 0; }
267
- static get maxArgs() { return 2; }
268
- targetModelRequired() { return true; }
269
- showPrompt() {
270
- const key = `FrontendDevTools:tools.MaskRealityModelByExcludedElement.Prompts.${this._targetMaskModel === undefined ? "IdentifyRealityModel" : (this._useSelection ? "AcceptSelection" : "IdentifyMaskElement")}`;
271
- IModelApp.notifications.outputPromptByKey(key);
272
- }
273
- createToolInstance() { return new MaskRealityModelByExcludedElementTool(); }
274
- applyMask(vp) {
275
- this.setRealityModelMask(vp, this.createElementMask("exclude"));
276
- }
277
- }
278
- MaskRealityModelByExcludedElementTool.toolId = "MaskRealityModelByExcludedElement";
279
- /** Tool to mask reality model by geometric models
280
- * @beta
281
- */
282
- export class MaskRealityModelByModelTool extends PlanarMaskBaseTool {
283
- static get minArgs() { return 0; }
284
- static get maxArgs() { return 2; }
285
- targetModelRequired() { return true; }
286
- showPrompt() {
287
- const key = `FrontendDevTools:tools.MaskRealityModelByModel.Prompts.${this._targetMaskModel === undefined ? "IdentifyRealityModel" : (this._useSelection ? "AcceptSelection" : "IdentifyMaskModel")}`;
288
- IModelApp.notifications.outputPromptByKey(key);
289
- }
290
- createToolInstance() { return new MaskRealityModelByModelTool(); }
291
- applyMask(vp) {
292
- this.setRealityModelMask(vp, this.createModelMask());
293
- }
294
- }
295
- MaskRealityModelByModelTool.toolId = "MaskRealityModelByModel";
296
- /** Tool to mask reality model by SubCategories
297
- * @beta
298
- */
299
- export class MaskRealityModelBySubCategoryTool extends PlanarMaskBaseTool {
300
- static get minArgs() { return 0; }
301
- static get maxArgs() { return 2; }
302
- targetModelRequired() { return true; }
303
- allowSelection() { return false; } // Need picking to get subcategory.
304
- showPrompt() {
305
- const key = `FrontendDevTools:tools.MaskRealityModelByModel.Prompts.${this._targetMaskModel === undefined ? "IdentifyRealityModel" : "IdentifyMaskSubCategory"}`;
306
- IModelApp.notifications.outputPromptByKey(key);
307
- }
308
- createToolInstance() { return new MaskRealityModelBySubCategoryTool(); }
309
- applyMask(vp) {
310
- this.setRealityModelMask(vp, this.createSubCategoryMask());
311
- }
312
- }
313
- MaskRealityModelBySubCategoryTool.toolId = "MaskRealityModelBySubCategory";
314
- /** Tool to mask reality model by higher priority models.
315
- * @beta
316
- */
317
- export class SetHigherPriorityRealityModelMasking extends PlanarMaskBaseTool {
318
- constructor() {
319
- super(...arguments);
320
- this._priority = 0;
321
- }
322
- static get minArgs() { return 0; }
323
- static get maxArgs() { return 3; }
324
- targetModelRequired() { return true; }
325
- elementRequired() { return false; }
326
- showPrompt() {
327
- IModelApp.notifications.outputPromptByKey("FrontendDevTools:tools.SetHigherPriorityRealityModelMasking.Prompts.IdentifyRealityModel");
328
- }
329
- createToolInstance() { return new SetHigherPriorityRealityModelMasking(); }
330
- applyMask(vp) {
331
- const basePriority = this._targetMaskModel === vp.displayStyle.getOSMBuildingRealityModel() ? PlanarClipMaskPriority.GlobalRealityModel : PlanarClipMaskPriority.RealityModel;
332
- this.setRealityModelMask(vp, PlanarClipMaskSettings.create({ priority: basePriority + this._priority, transparency: this._transparency, invert: this._invert }));
333
- }
334
- async parseAndRun(...args) {
335
- await super.parseAndRun(...args);
336
- const priority = parseInt(args[0], 10);
337
- this._priority = (priority === undefined || isNaN(priority)) ? 0 : priority;
338
- if (args.length > 1) {
339
- const value = parseInt(args[1], 10);
340
- if (!isNaN(value) && value >= 0 && value <= 1)
341
- this._transparency = value;
342
- }
343
- if (args.length > 2)
344
- this._invert = parseBoolean(args[2]) === true;
345
- return this.run();
346
- }
347
- }
348
- SetHigherPriorityRealityModelMasking.toolId = "SetHigherPriorityRealityModelMasking";
349
- /** Remove masks from reality model.
350
- * @beta
351
- */
352
- export class UnmaskRealityModelTool extends PlanarMaskBaseTool {
353
- targetModelRequired() { return true; }
354
- showPrompt() {
355
- IModelApp.notifications.outputPromptByKey("FrontendDevTools:tools.UnmaskRealityModel.Prompts.IdentifyRealityModel");
356
- }
357
- createToolInstance() { return new UnmaskRealityModelTool(); }
358
- applyMask(vp) {
359
- const settings = PlanarClipMaskSettings.create({ subCategoryIds: this._acceptedSubCategoryIds, modelIds: this._acceptedModelIds });
360
- this.setRealityModelMask(vp, settings);
361
- }
362
- async onDataButtonDown(ev) {
363
- const hit = await IModelApp.locateManager.doLocate(new LocateResponse(), true, ev.point, ev.viewport, ev.inputSource);
364
- if (hit?.modelId) {
365
- const model = hit.viewport.displayStyle.contextRealityModelStates.find((x) => x.modelId === hit.modelId);
366
- if (model)
367
- model.planarClipMaskSettings = undefined;
368
- else
369
- hit.viewport.displayStyle.settings.planarClipMasks.delete(hit.modelId);
370
- await this.onRestartTool();
371
- }
372
- return EventHandled.No;
373
- }
374
- }
375
- UnmaskRealityModelTool.toolId = "UnmaskRealityModel";
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
+ * See LICENSE.md in the project root for license terms and full copyright notice.
4
+ *--------------------------------------------------------------------------------------------*/
5
+ import { PlanarClipMaskMode, PlanarClipMaskPriority, PlanarClipMaskSettings } from "@itwin/core-common";
6
+ import { EventHandled, IModelApp, LocateFilterStatus, LocateResponse, PrimitiveTool, Tool, } from "@itwin/core-frontend";
7
+ import { parseBoolean } from "./parseBoolean";
8
+ /** Set Map Masking by selected models.
9
+ * @beta
10
+ */
11
+ class SetMapHigherPriorityMasking extends Tool {
12
+ static get minArgs() { return 0; }
13
+ static get maxArgs() { return 2; }
14
+ async run(transparency, invert) {
15
+ const vp = IModelApp.viewManager.selectedView;
16
+ if (undefined === vp)
17
+ return false;
18
+ vp.changeBackgroundMapProps({ planarClipMask: { mode: PlanarClipMaskMode.Priority, priority: PlanarClipMaskPriority.BackgroundMap, transparency, invert } });
19
+ vp.invalidateRenderPlan();
20
+ return true;
21
+ }
22
+ async parseAndRun(...args) {
23
+ const transparency = parseFloat(args[0]);
24
+ let invert;
25
+ if (args.length > 1)
26
+ invert = parseBoolean(args[1]);
27
+ return this.run((transparency !== undefined && transparency < 1.0) ? transparency : 0, invert === true);
28
+ }
29
+ }
30
+ SetMapHigherPriorityMasking.toolId = "SetMapHigherPriorityMask";
31
+ export { SetMapHigherPriorityMasking };
32
+ /** Unmask Mask.
33
+ * @beta
34
+ */
35
+ class UnmaskMapTool extends Tool {
36
+ static get minArgs() { return 0; }
37
+ static get maxArgs() { return 0; }
38
+ async run() {
39
+ const vp = IModelApp.viewManager.selectedView;
40
+ if (undefined === vp)
41
+ return false;
42
+ vp.changeBackgroundMapProps({ planarClipMask: { mode: PlanarClipMaskMode.None, transparency: 0, invert: false } });
43
+ vp.invalidateRenderPlan();
44
+ return true;
45
+ }
46
+ }
47
+ UnmaskMapTool.toolId = "UnmaskMap";
48
+ export { UnmaskMapTool };
49
+ /** Base class for the reality model planar masking tools.
50
+ * @beta
51
+ */
52
+ export class PlanarMaskBaseTool extends PrimitiveTool {
53
+ constructor() {
54
+ super(...arguments);
55
+ this._acceptedModelIds = new Set();
56
+ this._acceptedSubCategoryIds = new Set();
57
+ this._acceptedElementIds = new Set();
58
+ this._transparency = 0;
59
+ this._useSelection = false;
60
+ this._invert = false;
61
+ }
62
+ requireWriteableTarget() { return false; }
63
+ async onPostInstall() {
64
+ await super.onPostInstall();
65
+ this.setupAndPromptForNextAction();
66
+ }
67
+ async onUnsuspend() { this.showPrompt(); }
68
+ setupAndPromptForNextAction() {
69
+ this._useSelection = (undefined !== this.targetView && this.iModel.selectionSet.isActive);
70
+ this.initLocateElements(!this._useSelection || (this.targetModelRequired() && !this._targetMaskModel));
71
+ IModelApp.locateManager.options.allowDecorations = true; // So we can select "contextual" reality models.
72
+ this.showPrompt();
73
+ }
74
+ targetModelRequired() { return true; }
75
+ elementRequired() { return true; }
76
+ allowSelection() { return true; }
77
+ clearIds() {
78
+ this._acceptedElementIds.clear();
79
+ this._acceptedModelIds.clear();
80
+ }
81
+ async exitTool() {
82
+ await super.exitTool();
83
+ this._transparency = 0;
84
+ }
85
+ async onRestartTool() {
86
+ this.clearIds();
87
+ this._acceptedSubCategoryIds.clear();
88
+ const tool = this.createToolInstance();
89
+ if (!await tool.run())
90
+ await this.exitTool();
91
+ }
92
+ async parseAndRun(...args) {
93
+ const transparency = parseFloat(args[0]);
94
+ this._transparency = (transparency !== undefined && transparency < 1.0) ? transparency : 0;
95
+ if (args.length > 1)
96
+ this._invert = parseBoolean(args[1]) === true;
97
+ return this.run();
98
+ }
99
+ async onCleanup() {
100
+ if (0 !== this._acceptedElementIds.size)
101
+ this.iModel.hilited.setHilite(this._acceptedElementIds, false);
102
+ this.clearIds();
103
+ }
104
+ async filterHit(hit, _out) {
105
+ if (!hit.modelId)
106
+ return LocateFilterStatus.Reject;
107
+ if (undefined === this._targetMaskModel && this.targetModelRequired()) {
108
+ if (undefined !== hit.viewport.displayStyle.contextRealityModelStates.find((x) => x.modelId === hit.modelId))
109
+ return LocateFilterStatus.Accept;
110
+ const model = this.iModel.models.getLoaded(hit.modelId)?.asSpatialModel;
111
+ return model?.isRealityModel ? LocateFilterStatus.Accept : LocateFilterStatus.Reject;
112
+ }
113
+ else
114
+ return (hit.isElementHit && !hit.isModelHit && !this._acceptedElementIds.has(hit.sourceId)) ? LocateFilterStatus.Accept : LocateFilterStatus.Reject;
115
+ }
116
+ async onDataButtonDown(ev) {
117
+ const hit = await IModelApp.locateManager.doLocate(new LocateResponse(), true, ev.point, ev.viewport, ev.inputSource);
118
+ const vp = IModelApp.viewManager.selectedView;
119
+ if (undefined === vp)
120
+ return EventHandled.No;
121
+ if (undefined !== hit && undefined === this._targetMaskModel && this.targetModelRequired()) {
122
+ if (hit.modelId) {
123
+ this._targetMaskModel = hit.viewport.displayStyle.contextRealityModelStates.find((x) => x.modelId === hit.modelId) ?? hit.modelId;
124
+ if (!this.elementRequired()) {
125
+ this.applyMask(vp);
126
+ await this.onRestartTool();
127
+ }
128
+ }
129
+ }
130
+ else if (this._useSelection && this.iModel.selectionSet.isActive) {
131
+ const elements = await this.iModel.elements.getProps(this.iModel.selectionSet.elements);
132
+ for (const element of elements) {
133
+ if (element.id && element.model) {
134
+ this._acceptedElementIds.add(element.id);
135
+ this._acceptedModelIds.add(element.model);
136
+ }
137
+ }
138
+ this.applyMask(vp);
139
+ await this.exitTool();
140
+ return EventHandled.No;
141
+ }
142
+ else if (undefined !== hit && hit.isElementHit) {
143
+ const sourceId = hit.sourceId;
144
+ if (!this._acceptedElementIds.has(sourceId)) {
145
+ this._acceptedElementIds.add(sourceId);
146
+ this._acceptedModelIds.add(hit.modelId);
147
+ if (hit.subCategoryId)
148
+ this._acceptedSubCategoryIds.add(hit.subCategoryId);
149
+ this.applyMask(vp);
150
+ }
151
+ }
152
+ this.setupAndPromptForNextAction();
153
+ return EventHandled.No;
154
+ }
155
+ createSubCategoryMask() {
156
+ return PlanarClipMaskSettings.create({
157
+ subCategoryIds: this._acceptedSubCategoryIds,
158
+ modelIds: this._acceptedModelIds,
159
+ transparency: this._transparency,
160
+ invert: this._invert,
161
+ });
162
+ }
163
+ createElementMask(option) {
164
+ return PlanarClipMaskSettings.create({
165
+ elementIds: this._acceptedElementIds,
166
+ exclude: "exclude" === option,
167
+ modelIds: this._acceptedModelIds,
168
+ transparency: this._transparency,
169
+ invert: this._invert,
170
+ });
171
+ }
172
+ createModelMask() {
173
+ return PlanarClipMaskSettings.create({ modelIds: this._acceptedModelIds, transparency: this._transparency, invert: this._invert });
174
+ }
175
+ setRealityModelMask(vp, mask) {
176
+ if (typeof this._targetMaskModel === "string")
177
+ vp.displayStyle.settings.planarClipMasks.set(this._targetMaskModel, mask);
178
+ else if (undefined !== this._targetMaskModel)
179
+ this._targetMaskModel.planarClipMaskSettings = mask;
180
+ }
181
+ }
182
+ /** Tool to mask background map by elements
183
+ * @beta
184
+ */
185
+ class MaskBackgroundMapByElementTool extends PlanarMaskBaseTool {
186
+ static get minArgs() { return 0; }
187
+ static get maxArgs() { return 2; }
188
+ targetModelRequired() { return false; }
189
+ showPrompt() {
190
+ IModelApp.notifications.outputPromptByKey(`FrontendDevTools:tools.MaskBackgroundMapByElement.Prompts.${this._useSelection ? "AcceptSelection" : "IdentifyMaskElement"}`);
191
+ }
192
+ createToolInstance() { return new MaskBackgroundMapByElementTool(); }
193
+ applyMask(vp) {
194
+ vp.changeBackgroundMapProps({ planarClipMask: this.createElementMask("include").toJSON() });
195
+ }
196
+ }
197
+ MaskBackgroundMapByElementTool.toolId = "MaskBackgroundMapByElement";
198
+ export { MaskBackgroundMapByElementTool };
199
+ /** Tool to mask background map by excluded elements
200
+ * @beta
201
+ */
202
+ class MaskBackgroundMapByExcludedElementTool extends PlanarMaskBaseTool {
203
+ static get minArgs() { return 0; }
204
+ static get maxArgs() { return 2; }
205
+ targetModelRequired() { return false; }
206
+ showPrompt() {
207
+ IModelApp.notifications.outputPromptByKey(`FrontendDevTools:tools.MaskBackgroundMapByExcludedElement.Prompts.${this._useSelection ? "AcceptSelection" : "IdentifyMaskElement"}`);
208
+ }
209
+ createToolInstance() { return new MaskBackgroundMapByExcludedElementTool(); }
210
+ applyMask(vp) {
211
+ vp.changeBackgroundMapProps({ planarClipMask: this.createElementMask("exclude").toJSON() });
212
+ }
213
+ }
214
+ MaskBackgroundMapByExcludedElementTool.toolId = "MaskBackgroundMapByExcludedElement";
215
+ export { MaskBackgroundMapByExcludedElementTool };
216
+ /** Tool to mask background map by SubCategories
217
+ * @beta
218
+ */
219
+ class MaskBackgroundMapBySubCategoryTool extends PlanarMaskBaseTool {
220
+ static get minArgs() { return 0; }
221
+ static get maxArgs() { return 2; }
222
+ targetModelRequired() { return false; }
223
+ allowSelection() { return false; } // Need picking to get subcategory.
224
+ showPrompt() {
225
+ IModelApp.notifications.outputPromptByKey("FrontendDevTools:tools.MaskBackgroundMapBySubCategory.Prompts.IdentifyMaskSubCategory");
226
+ }
227
+ createToolInstance() { return new MaskBackgroundMapBySubCategoryTool(); }
228
+ applyMask(vp) {
229
+ vp.changeBackgroundMapProps({ planarClipMask: this.createSubCategoryMask().toJSON() });
230
+ }
231
+ }
232
+ MaskBackgroundMapBySubCategoryTool.toolId = "MaskBackgroundMapBySubCategory";
233
+ export { MaskBackgroundMapBySubCategoryTool };
234
+ /** Tool to mask background map by geometric models
235
+ * @beta
236
+ */
237
+ class MaskBackgroundMapByModelTool extends PlanarMaskBaseTool {
238
+ static get minArgs() { return 0; }
239
+ static get maxArgs() { return 2; }
240
+ targetModelRequired() { return false; }
241
+ showPrompt() {
242
+ IModelApp.notifications.outputPromptByKey(`FrontendDevTools:tools.MaskBackgroundMapByModel.Prompts.${this._useSelection ? "AcceptSelection" : "IdentifyMaskModel"}`);
243
+ }
244
+ createToolInstance() { return new MaskBackgroundMapByModelTool(); }
245
+ applyMask(vp) {
246
+ vp.changeBackgroundMapProps({ planarClipMask: this.createModelMask().toJSON() });
247
+ }
248
+ }
249
+ MaskBackgroundMapByModelTool.toolId = "MaskBackgroundMapByModel";
250
+ export { MaskBackgroundMapByModelTool };
251
+ /** Tool to mask reality model by elements
252
+ * @beta
253
+ */
254
+ class MaskRealityModelByElementTool extends PlanarMaskBaseTool {
255
+ static get minArgs() { return 0; }
256
+ static get maxArgs() { return 2; }
257
+ targetModelRequired() { return true; }
258
+ showPrompt() {
259
+ const key = `FrontendDevTools:tools.MaskRealityModelByElement.Prompts.${this._targetMaskModel === undefined ? "IdentifyRealityModel" : (this._useSelection ? "AcceptSelection" : "IdentifyMaskElement")}`;
260
+ IModelApp.notifications.outputPromptByKey(key);
261
+ }
262
+ createToolInstance() { return new MaskRealityModelByElementTool(); }
263
+ applyMask(vp) {
264
+ this.setRealityModelMask(vp, this.createElementMask("include"));
265
+ }
266
+ }
267
+ MaskRealityModelByElementTool.toolId = "MaskRealityModelByElement";
268
+ export { MaskRealityModelByElementTool };
269
+ /** Tool to mask reality model by excluded elements
270
+ * @beta
271
+ */
272
+ class MaskRealityModelByExcludedElementTool extends PlanarMaskBaseTool {
273
+ static get minArgs() { return 0; }
274
+ static get maxArgs() { return 2; }
275
+ targetModelRequired() { return true; }
276
+ showPrompt() {
277
+ const key = `FrontendDevTools:tools.MaskRealityModelByExcludedElement.Prompts.${this._targetMaskModel === undefined ? "IdentifyRealityModel" : (this._useSelection ? "AcceptSelection" : "IdentifyMaskElement")}`;
278
+ IModelApp.notifications.outputPromptByKey(key);
279
+ }
280
+ createToolInstance() { return new MaskRealityModelByExcludedElementTool(); }
281
+ applyMask(vp) {
282
+ this.setRealityModelMask(vp, this.createElementMask("exclude"));
283
+ }
284
+ }
285
+ MaskRealityModelByExcludedElementTool.toolId = "MaskRealityModelByExcludedElement";
286
+ export { MaskRealityModelByExcludedElementTool };
287
+ /** Tool to mask reality model by geometric models
288
+ * @beta
289
+ */
290
+ class MaskRealityModelByModelTool extends PlanarMaskBaseTool {
291
+ static get minArgs() { return 0; }
292
+ static get maxArgs() { return 2; }
293
+ targetModelRequired() { return true; }
294
+ showPrompt() {
295
+ const key = `FrontendDevTools:tools.MaskRealityModelByModel.Prompts.${this._targetMaskModel === undefined ? "IdentifyRealityModel" : (this._useSelection ? "AcceptSelection" : "IdentifyMaskModel")}`;
296
+ IModelApp.notifications.outputPromptByKey(key);
297
+ }
298
+ createToolInstance() { return new MaskRealityModelByModelTool(); }
299
+ applyMask(vp) {
300
+ this.setRealityModelMask(vp, this.createModelMask());
301
+ }
302
+ }
303
+ MaskRealityModelByModelTool.toolId = "MaskRealityModelByModel";
304
+ export { MaskRealityModelByModelTool };
305
+ /** Tool to mask reality model by SubCategories
306
+ * @beta
307
+ */
308
+ class MaskRealityModelBySubCategoryTool extends PlanarMaskBaseTool {
309
+ static get minArgs() { return 0; }
310
+ static get maxArgs() { return 2; }
311
+ targetModelRequired() { return true; }
312
+ allowSelection() { return false; } // Need picking to get subcategory.
313
+ showPrompt() {
314
+ const key = `FrontendDevTools:tools.MaskRealityModelByModel.Prompts.${this._targetMaskModel === undefined ? "IdentifyRealityModel" : "IdentifyMaskSubCategory"}`;
315
+ IModelApp.notifications.outputPromptByKey(key);
316
+ }
317
+ createToolInstance() { return new MaskRealityModelBySubCategoryTool(); }
318
+ applyMask(vp) {
319
+ this.setRealityModelMask(vp, this.createSubCategoryMask());
320
+ }
321
+ }
322
+ MaskRealityModelBySubCategoryTool.toolId = "MaskRealityModelBySubCategory";
323
+ export { MaskRealityModelBySubCategoryTool };
324
+ /** Tool to mask reality model by higher priority models.
325
+ * @beta
326
+ */
327
+ class SetHigherPriorityRealityModelMasking extends PlanarMaskBaseTool {
328
+ constructor() {
329
+ super(...arguments);
330
+ this._priority = 0;
331
+ }
332
+ static get minArgs() { return 0; }
333
+ static get maxArgs() { return 3; }
334
+ targetModelRequired() { return true; }
335
+ elementRequired() { return false; }
336
+ showPrompt() {
337
+ IModelApp.notifications.outputPromptByKey("FrontendDevTools:tools.SetHigherPriorityRealityModelMasking.Prompts.IdentifyRealityModel");
338
+ }
339
+ createToolInstance() { return new SetHigherPriorityRealityModelMasking(); }
340
+ applyMask(vp) {
341
+ const basePriority = this._targetMaskModel === vp.displayStyle.getOSMBuildingRealityModel() ? PlanarClipMaskPriority.GlobalRealityModel : PlanarClipMaskPriority.RealityModel;
342
+ this.setRealityModelMask(vp, PlanarClipMaskSettings.create({ priority: basePriority + this._priority, transparency: this._transparency, invert: this._invert }));
343
+ }
344
+ async parseAndRun(...args) {
345
+ await super.parseAndRun(...args);
346
+ const priority = parseInt(args[0], 10);
347
+ this._priority = (priority === undefined || isNaN(priority)) ? 0 : priority;
348
+ if (args.length > 1) {
349
+ const value = parseInt(args[1], 10);
350
+ if (!isNaN(value) && value >= 0 && value <= 1)
351
+ this._transparency = value;
352
+ }
353
+ if (args.length > 2)
354
+ this._invert = parseBoolean(args[2]) === true;
355
+ return this.run();
356
+ }
357
+ }
358
+ SetHigherPriorityRealityModelMasking.toolId = "SetHigherPriorityRealityModelMasking";
359
+ export { SetHigherPriorityRealityModelMasking };
360
+ /** Remove masks from reality model.
361
+ * @beta
362
+ */
363
+ class UnmaskRealityModelTool extends PlanarMaskBaseTool {
364
+ targetModelRequired() { return true; }
365
+ showPrompt() {
366
+ IModelApp.notifications.outputPromptByKey("FrontendDevTools:tools.UnmaskRealityModel.Prompts.IdentifyRealityModel");
367
+ }
368
+ createToolInstance() { return new UnmaskRealityModelTool(); }
369
+ applyMask(vp) {
370
+ const settings = PlanarClipMaskSettings.create({ subCategoryIds: this._acceptedSubCategoryIds, modelIds: this._acceptedModelIds });
371
+ this.setRealityModelMask(vp, settings);
372
+ }
373
+ async onDataButtonDown(ev) {
374
+ const hit = await IModelApp.locateManager.doLocate(new LocateResponse(), true, ev.point, ev.viewport, ev.inputSource);
375
+ if (hit?.modelId) {
376
+ const model = hit.viewport.displayStyle.contextRealityModelStates.find((x) => x.modelId === hit.modelId);
377
+ if (model)
378
+ model.planarClipMaskSettings = undefined;
379
+ else
380
+ hit.viewport.displayStyle.settings.planarClipMasks.delete(hit.modelId);
381
+ await this.onRestartTool();
382
+ }
383
+ return EventHandled.No;
384
+ }
385
+ }
386
+ UnmaskRealityModelTool.toolId = "UnmaskRealityModel";
387
+ export { UnmaskRealityModelTool };
376
388
  //# sourceMappingURL=PlanarMaskTools.js.map