@itwin/frontend-devtools 3.7.3 → 3.7.5

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 (369) hide show
  1. package/CHANGELOG.md +11 -1
  2. package/lib/cjs/ClipboardUtilities.d.ts +8 -8
  3. package/lib/cjs/ClipboardUtilities.js +26 -26
  4. package/lib/cjs/ClipboardUtilities.js.map +1 -1
  5. package/lib/cjs/FrontEndDevTools.d.ts +19 -19
  6. package/lib/cjs/FrontEndDevTools.js +221 -221
  7. package/lib/cjs/FrontEndDevTools.js.map +1 -1
  8. package/lib/cjs/effects/Convolution.d.ts +68 -68
  9. package/lib/cjs/effects/Convolution.js +165 -165
  10. package/lib/cjs/effects/Convolution.js.map +1 -1
  11. package/lib/cjs/effects/EffectTools.d.ts +33 -33
  12. package/lib/cjs/effects/EffectTools.js +68 -68
  13. package/lib/cjs/effects/EffectTools.js.map +1 -1
  14. package/lib/cjs/effects/Explosion.d.ts +12 -12
  15. package/lib/cjs/effects/Explosion.js +168 -168
  16. package/lib/cjs/effects/Explosion.js.map +1 -1
  17. package/lib/cjs/effects/FlipImage.d.ts +30 -30
  18. package/lib/cjs/effects/FlipImage.js +99 -99
  19. package/lib/cjs/effects/FlipImage.js.map +1 -1
  20. package/lib/cjs/effects/LensDistortion.d.ts +34 -34
  21. package/lib/cjs/effects/LensDistortion.js +109 -109
  22. package/lib/cjs/effects/LensDistortion.js.map +1 -1
  23. package/lib/cjs/effects/Random.d.ts +24 -24
  24. package/lib/cjs/effects/Random.js +49 -49
  25. package/lib/cjs/effects/Random.js.map +1 -1
  26. package/lib/cjs/effects/Saturation.d.ts +30 -30
  27. package/lib/cjs/effects/Saturation.js +85 -85
  28. package/lib/cjs/effects/Saturation.js.map +1 -1
  29. package/lib/cjs/effects/Snow.d.ts +76 -76
  30. package/lib/cjs/effects/Snow.js +187 -187
  31. package/lib/cjs/effects/Snow.js.map +1 -1
  32. package/lib/cjs/effects/Vignette.d.ts +39 -39
  33. package/lib/cjs/effects/Vignette.js +108 -108
  34. package/lib/cjs/effects/Vignette.js.map +1 -1
  35. package/lib/cjs/frontend-devtools.d.ts +82 -82
  36. package/lib/cjs/frontend-devtools.js +98 -98
  37. package/lib/cjs/frontend-devtools.js.map +1 -1
  38. package/lib/cjs/tools/AnimationIntervalTool.d.ts +15 -15
  39. package/lib/cjs/tools/AnimationIntervalTool.js +30 -30
  40. package/lib/cjs/tools/AnimationIntervalTool.js.map +1 -1
  41. package/lib/cjs/tools/ChangeUnitsTool.d.ts +15 -15
  42. package/lib/cjs/tools/ChangeUnitsTool.js +41 -41
  43. package/lib/cjs/tools/ChangeUnitsTool.js.map +1 -1
  44. package/lib/cjs/tools/ClipTools.d.ts +67 -67
  45. package/lib/cjs/tools/ClipTools.js +164 -164
  46. package/lib/cjs/tools/ClipTools.js.map +1 -1
  47. package/lib/cjs/tools/DisplayStyleTools.d.ts +145 -145
  48. package/lib/cjs/tools/DisplayStyleTools.js +370 -370
  49. package/lib/cjs/tools/DisplayStyleTools.js.map +1 -1
  50. package/lib/cjs/tools/EmphasizeElementsTool.d.ts +60 -60
  51. package/lib/cjs/tools/EmphasizeElementsTool.js +154 -154
  52. package/lib/cjs/tools/EmphasizeElementsTool.js.map +1 -1
  53. package/lib/cjs/tools/FrustumDecoration.d.ts +57 -57
  54. package/lib/cjs/tools/FrustumDecoration.js +374 -374
  55. package/lib/cjs/tools/FrustumDecoration.js.map +1 -1
  56. package/lib/cjs/tools/InspectElementTool.d.ts +42 -42
  57. package/lib/cjs/tools/InspectElementTool.js +198 -198
  58. package/lib/cjs/tools/InspectElementTool.js.map +1 -1
  59. package/lib/cjs/tools/MapLayerTool.d.ts +264 -264
  60. package/lib/cjs/tools/MapLayerTool.js +507 -507
  61. package/lib/cjs/tools/MapLayerTool.js.map +1 -1
  62. package/lib/cjs/tools/MeasureTileLoadTime.d.ts +12 -12
  63. package/lib/cjs/tools/MeasureTileLoadTime.js +63 -63
  64. package/lib/cjs/tools/MeasureTileLoadTime.js.map +1 -1
  65. package/lib/cjs/tools/ModelAppearanceTools.d.ts +86 -86
  66. package/lib/cjs/tools/ModelAppearanceTools.js +183 -183
  67. package/lib/cjs/tools/ModelAppearanceTools.js.map +1 -1
  68. package/lib/cjs/tools/PlanProjectionTools.d.ts +40 -40
  69. package/lib/cjs/tools/PlanProjectionTools.js +149 -149
  70. package/lib/cjs/tools/PlanProjectionTools.js.map +1 -1
  71. package/lib/cjs/tools/PlanarMaskTools.d.ts +182 -182
  72. package/lib/cjs/tools/PlanarMaskTools.js +393 -393
  73. package/lib/cjs/tools/PlanarMaskTools.js.map +1 -1
  74. package/lib/cjs/tools/ProjectExtents.d.ts +41 -41
  75. package/lib/cjs/tools/ProjectExtents.js +110 -110
  76. package/lib/cjs/tools/ProjectExtents.js.map +1 -1
  77. package/lib/cjs/tools/RealityModelTools.d.ts +116 -116
  78. package/lib/cjs/tools/RealityModelTools.js +281 -281
  79. package/lib/cjs/tools/RealityModelTools.js.map +1 -1
  80. package/lib/cjs/tools/RealityTransitionTool.d.ts +25 -25
  81. package/lib/cjs/tools/RealityTransitionTool.js +116 -116
  82. package/lib/cjs/tools/RealityTransitionTool.js.map +1 -1
  83. package/lib/cjs/tools/RenderSystemTools.d.ts +38 -38
  84. package/lib/cjs/tools/RenderSystemTools.js +70 -70
  85. package/lib/cjs/tools/RenderSystemTools.js.map +1 -1
  86. package/lib/cjs/tools/RenderTargetTools.d.ts +107 -107
  87. package/lib/cjs/tools/RenderTargetTools.js +174 -174
  88. package/lib/cjs/tools/RenderTargetTools.js.map +1 -1
  89. package/lib/cjs/tools/ReportWebGLCompatibilityTool.d.ts +11 -11
  90. package/lib/cjs/tools/ReportWebGLCompatibilityTool.js +30 -30
  91. package/lib/cjs/tools/ReportWebGLCompatibilityTool.js.map +1 -1
  92. package/lib/cjs/tools/SavedViews.d.ts +46 -46
  93. package/lib/cjs/tools/SavedViews.js +136 -136
  94. package/lib/cjs/tools/SavedViews.js.map +1 -1
  95. package/lib/cjs/tools/ScheduleScriptTools.d.ts +37 -37
  96. package/lib/cjs/tools/ScheduleScriptTools.js +159 -159
  97. package/lib/cjs/tools/ScheduleScriptTools.js.map +1 -1
  98. package/lib/cjs/tools/SelectionTools.d.ts +28 -28
  99. package/lib/cjs/tools/SelectionTools.js +87 -87
  100. package/lib/cjs/tools/SelectionTools.js.map +1 -1
  101. package/lib/cjs/tools/SetGpuMemoryLimitTool.d.ts +15 -15
  102. package/lib/cjs/tools/SetGpuMemoryLimitTool.js +33 -33
  103. package/lib/cjs/tools/SetGpuMemoryLimitTool.js.map +1 -1
  104. package/lib/cjs/tools/SourceAspectIdTools.d.ts +40 -40
  105. package/lib/cjs/tools/SourceAspectIdTools.js +87 -87
  106. package/lib/cjs/tools/SourceAspectIdTools.js.map +1 -1
  107. package/lib/cjs/tools/TileRequestDecoration.d.ts +12 -12
  108. package/lib/cjs/tools/TileRequestDecoration.js +83 -83
  109. package/lib/cjs/tools/TileRequestDecoration.js.map +1 -1
  110. package/lib/cjs/tools/TileTreeBoundsDecoration.d.ts +11 -11
  111. package/lib/cjs/tools/TileTreeBoundsDecoration.js +74 -74
  112. package/lib/cjs/tools/TileTreeBoundsDecoration.js.map +1 -1
  113. package/lib/cjs/tools/ToolTipProvider.d.ts +15 -15
  114. package/lib/cjs/tools/ToolTipProvider.js +66 -66
  115. package/lib/cjs/tools/ToolTipProvider.js.map +1 -1
  116. package/lib/cjs/tools/ViewportTools.d.ts +218 -218
  117. package/lib/cjs/tools/ViewportTools.js +517 -517
  118. package/lib/cjs/tools/ViewportTools.js.map +1 -1
  119. package/lib/cjs/tools/parseArgs.d.ts +23 -23
  120. package/lib/cjs/tools/parseArgs.js +51 -51
  121. package/lib/cjs/tools/parseArgs.js.map +1 -1
  122. package/lib/cjs/tools/parseBoolean.d.ts +8 -8
  123. package/lib/cjs/tools/parseBoolean.js +26 -26
  124. package/lib/cjs/tools/parseBoolean.js.map +1 -1
  125. package/lib/cjs/tools/parseToggle.d.ts +8 -8
  126. package/lib/cjs/tools/parseToggle.js +25 -25
  127. package/lib/cjs/tools/parseToggle.js.map +1 -1
  128. package/lib/cjs/ui/Button.d.ts +29 -29
  129. package/lib/cjs/ui/Button.js +26 -26
  130. package/lib/cjs/ui/Button.js.map +1 -1
  131. package/lib/cjs/ui/CheckBox.d.ts +23 -23
  132. package/lib/cjs/ui/CheckBox.js +27 -27
  133. package/lib/cjs/ui/CheckBox.js.map +1 -1
  134. package/lib/cjs/ui/ColorInput.d.ts +27 -27
  135. package/lib/cjs/ui/ColorInput.js +53 -53
  136. package/lib/cjs/ui/ColorInput.js.map +1 -1
  137. package/lib/cjs/ui/ComboBox.d.ts +28 -28
  138. package/lib/cjs/ui/ComboBox.js +42 -42
  139. package/lib/cjs/ui/ComboBox.js.map +1 -1
  140. package/lib/cjs/ui/DataList.d.ts +27 -27
  141. package/lib/cjs/ui/DataList.js +39 -39
  142. package/lib/cjs/ui/DataList.js.map +1 -1
  143. package/lib/cjs/ui/NestedMenu.d.ts +19 -19
  144. package/lib/cjs/ui/NestedMenu.js +46 -46
  145. package/lib/cjs/ui/NestedMenu.js.map +1 -1
  146. package/lib/cjs/ui/NumericInput.d.ts +35 -35
  147. package/lib/cjs/ui/NumericInput.js +61 -61
  148. package/lib/cjs/ui/NumericInput.js.map +1 -1
  149. package/lib/cjs/ui/RadioBox.d.ts +29 -29
  150. package/lib/cjs/ui/RadioBox.js +76 -76
  151. package/lib/cjs/ui/RadioBox.js.map +1 -1
  152. package/lib/cjs/ui/Slider.d.ts +28 -28
  153. package/lib/cjs/ui/Slider.js +42 -42
  154. package/lib/cjs/ui/Slider.js.map +1 -1
  155. package/lib/cjs/ui/TextBox.d.ts +32 -32
  156. package/lib/cjs/ui/TextBox.js +56 -56
  157. package/lib/cjs/ui/TextBox.js.map +1 -1
  158. package/lib/cjs/widgets/DiagnosticsPanel.d.ts +37 -37
  159. package/lib/cjs/widgets/DiagnosticsPanel.js +81 -81
  160. package/lib/cjs/widgets/DiagnosticsPanel.js.map +1 -1
  161. package/lib/cjs/widgets/FpsTracker.d.ts +19 -19
  162. package/lib/cjs/widgets/FpsTracker.js +56 -56
  163. package/lib/cjs/widgets/FpsTracker.js.map +1 -1
  164. package/lib/cjs/widgets/GpuProfiler.d.ts +16 -16
  165. package/lib/cjs/widgets/GpuProfiler.js +192 -192
  166. package/lib/cjs/widgets/GpuProfiler.js.map +1 -1
  167. package/lib/cjs/widgets/KeyinField.d.ts +61 -61
  168. package/lib/cjs/widgets/KeyinField.js +187 -187
  169. package/lib/cjs/widgets/KeyinField.js.map +1 -1
  170. package/lib/cjs/widgets/MemoryTracker.d.ts +27 -27
  171. package/lib/cjs/widgets/MemoryTracker.js +243 -243
  172. package/lib/cjs/widgets/MemoryTracker.js.map +1 -1
  173. package/lib/cjs/widgets/RenderCommandBreakdown.d.ts +15 -15
  174. package/lib/cjs/widgets/RenderCommandBreakdown.js +68 -68
  175. package/lib/cjs/widgets/RenderCommandBreakdown.js.map +1 -1
  176. package/lib/cjs/widgets/TileMemoryBreakdown.d.ts +30 -30
  177. package/lib/cjs/widgets/TileMemoryBreakdown.js +204 -204
  178. package/lib/cjs/widgets/TileMemoryBreakdown.js.map +1 -1
  179. package/lib/cjs/widgets/TileStatisticsTracker.d.ts +21 -21
  180. package/lib/cjs/widgets/TileStatisticsTracker.js +142 -142
  181. package/lib/cjs/widgets/TileStatisticsTracker.js.map +1 -1
  182. package/lib/cjs/widgets/ToolSettingsTracker.d.ts +9 -9
  183. package/lib/cjs/widgets/ToolSettingsTracker.js +211 -211
  184. package/lib/cjs/widgets/ToolSettingsTracker.js.map +1 -1
  185. package/lib/esm/ClipboardUtilities.d.ts +8 -8
  186. package/lib/esm/ClipboardUtilities.js +22 -22
  187. package/lib/esm/ClipboardUtilities.js.map +1 -1
  188. package/lib/esm/FrontEndDevTools.d.ts +19 -19
  189. package/lib/esm/FrontEndDevTools.js +217 -217
  190. package/lib/esm/FrontEndDevTools.js.map +1 -1
  191. package/lib/esm/effects/Convolution.d.ts +68 -68
  192. package/lib/esm/effects/Convolution.js +155 -155
  193. package/lib/esm/effects/Convolution.js.map +1 -1
  194. package/lib/esm/effects/EffectTools.d.ts +33 -33
  195. package/lib/esm/effects/EffectTools.js +62 -62
  196. package/lib/esm/effects/EffectTools.js.map +1 -1
  197. package/lib/esm/effects/Explosion.d.ts +12 -12
  198. package/lib/esm/effects/Explosion.js +164 -164
  199. package/lib/esm/effects/Explosion.js.map +1 -1
  200. package/lib/esm/effects/FlipImage.d.ts +30 -30
  201. package/lib/esm/effects/FlipImage.js +94 -94
  202. package/lib/esm/effects/FlipImage.js.map +1 -1
  203. package/lib/esm/effects/LensDistortion.d.ts +34 -34
  204. package/lib/esm/effects/LensDistortion.js +104 -104
  205. package/lib/esm/effects/LensDistortion.js.map +1 -1
  206. package/lib/esm/effects/Random.d.ts +24 -24
  207. package/lib/esm/effects/Random.js +41 -41
  208. package/lib/esm/effects/Random.js.map +1 -1
  209. package/lib/esm/effects/Saturation.d.ts +30 -30
  210. package/lib/esm/effects/Saturation.js +80 -80
  211. package/lib/esm/effects/Saturation.js.map +1 -1
  212. package/lib/esm/effects/Snow.d.ts +76 -76
  213. package/lib/esm/effects/Snow.js +182 -182
  214. package/lib/esm/effects/Snow.js.map +1 -1
  215. package/lib/esm/effects/Vignette.d.ts +39 -39
  216. package/lib/esm/effects/Vignette.js +103 -103
  217. package/lib/esm/effects/Vignette.js.map +1 -1
  218. package/lib/esm/frontend-devtools.d.ts +82 -82
  219. package/lib/esm/frontend-devtools.js +86 -86
  220. package/lib/esm/frontend-devtools.js.map +1 -1
  221. package/lib/esm/tools/AnimationIntervalTool.d.ts +15 -15
  222. package/lib/esm/tools/AnimationIntervalTool.js +26 -26
  223. package/lib/esm/tools/AnimationIntervalTool.js.map +1 -1
  224. package/lib/esm/tools/ChangeUnitsTool.d.ts +15 -15
  225. package/lib/esm/tools/ChangeUnitsTool.js +37 -37
  226. package/lib/esm/tools/ChangeUnitsTool.js.map +1 -1
  227. package/lib/esm/tools/ClipTools.d.ts +67 -67
  228. package/lib/esm/tools/ClipTools.js +158 -158
  229. package/lib/esm/tools/ClipTools.js.map +1 -1
  230. package/lib/esm/tools/DisplayStyleTools.d.ts +145 -145
  231. package/lib/esm/tools/DisplayStyleTools.js +356 -356
  232. package/lib/esm/tools/DisplayStyleTools.js.map +1 -1
  233. package/lib/esm/tools/EmphasizeElementsTool.d.ts +60 -60
  234. package/lib/esm/tools/EmphasizeElementsTool.js +145 -145
  235. package/lib/esm/tools/EmphasizeElementsTool.js.map +1 -1
  236. package/lib/esm/tools/FrustumDecoration.d.ts +57 -57
  237. package/lib/esm/tools/FrustumDecoration.js +367 -367
  238. package/lib/esm/tools/FrustumDecoration.js.map +1 -1
  239. package/lib/esm/tools/InspectElementTool.d.ts +42 -42
  240. package/lib/esm/tools/InspectElementTool.js +194 -194
  241. package/lib/esm/tools/InspectElementTool.js.map +1 -1
  242. package/lib/esm/tools/MapLayerTool.d.ts +264 -264
  243. package/lib/esm/tools/MapLayerTool.js +485 -485
  244. package/lib/esm/tools/MapLayerTool.js.map +1 -1
  245. package/lib/esm/tools/MeasureTileLoadTime.d.ts +12 -12
  246. package/lib/esm/tools/MeasureTileLoadTime.js +59 -59
  247. package/lib/esm/tools/MeasureTileLoadTime.js.map +1 -1
  248. package/lib/esm/tools/ModelAppearanceTools.d.ts +86 -86
  249. package/lib/esm/tools/ModelAppearanceTools.js +172 -172
  250. package/lib/esm/tools/ModelAppearanceTools.js.map +1 -1
  251. package/lib/esm/tools/PlanProjectionTools.d.ts +40 -40
  252. package/lib/esm/tools/PlanProjectionTools.js +143 -143
  253. package/lib/esm/tools/PlanProjectionTools.js.map +1 -1
  254. package/lib/esm/tools/PlanarMaskTools.d.ts +182 -182
  255. package/lib/esm/tools/PlanarMaskTools.js +377 -377
  256. package/lib/esm/tools/PlanarMaskTools.js.map +1 -1
  257. package/lib/esm/tools/ProjectExtents.d.ts +41 -41
  258. package/lib/esm/tools/ProjectExtents.js +104 -104
  259. package/lib/esm/tools/ProjectExtents.js.map +1 -1
  260. package/lib/esm/tools/RealityModelTools.d.ts +116 -116
  261. package/lib/esm/tools/RealityModelTools.js +268 -268
  262. package/lib/esm/tools/RealityModelTools.js.map +1 -1
  263. package/lib/esm/tools/RealityTransitionTool.d.ts +25 -25
  264. package/lib/esm/tools/RealityTransitionTool.js +112 -112
  265. package/lib/esm/tools/RealityTransitionTool.js.map +1 -1
  266. package/lib/esm/tools/RenderSystemTools.d.ts +38 -38
  267. package/lib/esm/tools/RenderSystemTools.js +63 -63
  268. package/lib/esm/tools/RenderSystemTools.js.map +1 -1
  269. package/lib/esm/tools/RenderTargetTools.d.ts +107 -107
  270. package/lib/esm/tools/RenderTargetTools.js +159 -159
  271. package/lib/esm/tools/RenderTargetTools.js.map +1 -1
  272. package/lib/esm/tools/ReportWebGLCompatibilityTool.d.ts +11 -11
  273. package/lib/esm/tools/ReportWebGLCompatibilityTool.js +26 -26
  274. package/lib/esm/tools/ReportWebGLCompatibilityTool.js.map +1 -1
  275. package/lib/esm/tools/SavedViews.d.ts +46 -46
  276. package/lib/esm/tools/SavedViews.js +128 -128
  277. package/lib/esm/tools/SavedViews.js.map +1 -1
  278. package/lib/esm/tools/ScheduleScriptTools.d.ts +37 -37
  279. package/lib/esm/tools/ScheduleScriptTools.js +153 -153
  280. package/lib/esm/tools/ScheduleScriptTools.js.map +1 -1
  281. package/lib/esm/tools/SelectionTools.d.ts +28 -28
  282. package/lib/esm/tools/SelectionTools.js +82 -82
  283. package/lib/esm/tools/SelectionTools.js.map +1 -1
  284. package/lib/esm/tools/SetGpuMemoryLimitTool.d.ts +15 -15
  285. package/lib/esm/tools/SetGpuMemoryLimitTool.js +29 -29
  286. package/lib/esm/tools/SetGpuMemoryLimitTool.js.map +1 -1
  287. package/lib/esm/tools/SourceAspectIdTools.d.ts +40 -40
  288. package/lib/esm/tools/SourceAspectIdTools.js +81 -81
  289. package/lib/esm/tools/SourceAspectIdTools.js.map +1 -1
  290. package/lib/esm/tools/TileRequestDecoration.d.ts +12 -12
  291. package/lib/esm/tools/TileRequestDecoration.js +79 -79
  292. package/lib/esm/tools/TileRequestDecoration.js.map +1 -1
  293. package/lib/esm/tools/TileTreeBoundsDecoration.d.ts +11 -11
  294. package/lib/esm/tools/TileTreeBoundsDecoration.js +70 -70
  295. package/lib/esm/tools/TileTreeBoundsDecoration.js.map +1 -1
  296. package/lib/esm/tools/ToolTipProvider.d.ts +15 -15
  297. package/lib/esm/tools/ToolTipProvider.js +62 -62
  298. package/lib/esm/tools/ToolTipProvider.js.map +1 -1
  299. package/lib/esm/tools/ViewportTools.d.ts +218 -218
  300. package/lib/esm/tools/ViewportTools.js +493 -493
  301. package/lib/esm/tools/ViewportTools.js.map +1 -1
  302. package/lib/esm/tools/parseArgs.d.ts +23 -23
  303. package/lib/esm/tools/parseArgs.js +47 -47
  304. package/lib/esm/tools/parseArgs.js.map +1 -1
  305. package/lib/esm/tools/parseBoolean.d.ts +8 -8
  306. package/lib/esm/tools/parseBoolean.js +22 -22
  307. package/lib/esm/tools/parseBoolean.js.map +1 -1
  308. package/lib/esm/tools/parseToggle.d.ts +8 -8
  309. package/lib/esm/tools/parseToggle.js +21 -21
  310. package/lib/esm/tools/parseToggle.js.map +1 -1
  311. package/lib/esm/ui/Button.d.ts +29 -29
  312. package/lib/esm/ui/Button.js +22 -22
  313. package/lib/esm/ui/Button.js.map +1 -1
  314. package/lib/esm/ui/CheckBox.d.ts +23 -23
  315. package/lib/esm/ui/CheckBox.js +23 -23
  316. package/lib/esm/ui/CheckBox.js.map +1 -1
  317. package/lib/esm/ui/ColorInput.d.ts +27 -27
  318. package/lib/esm/ui/ColorInput.js +48 -48
  319. package/lib/esm/ui/ColorInput.js.map +1 -1
  320. package/lib/esm/ui/ComboBox.d.ts +28 -28
  321. package/lib/esm/ui/ComboBox.js +38 -38
  322. package/lib/esm/ui/ComboBox.js.map +1 -1
  323. package/lib/esm/ui/DataList.d.ts +27 -27
  324. package/lib/esm/ui/DataList.js +34 -34
  325. package/lib/esm/ui/DataList.js.map +1 -1
  326. package/lib/esm/ui/NestedMenu.d.ts +19 -19
  327. package/lib/esm/ui/NestedMenu.js +42 -42
  328. package/lib/esm/ui/NestedMenu.js.map +1 -1
  329. package/lib/esm/ui/NumericInput.d.ts +35 -35
  330. package/lib/esm/ui/NumericInput.js +56 -56
  331. package/lib/esm/ui/NumericInput.js.map +1 -1
  332. package/lib/esm/ui/RadioBox.d.ts +29 -29
  333. package/lib/esm/ui/RadioBox.js +72 -72
  334. package/lib/esm/ui/RadioBox.js.map +1 -1
  335. package/lib/esm/ui/Slider.d.ts +28 -28
  336. package/lib/esm/ui/Slider.js +38 -38
  337. package/lib/esm/ui/Slider.js.map +1 -1
  338. package/lib/esm/ui/TextBox.d.ts +32 -32
  339. package/lib/esm/ui/TextBox.js +52 -52
  340. package/lib/esm/ui/TextBox.js.map +1 -1
  341. package/lib/esm/widgets/DiagnosticsPanel.d.ts +37 -37
  342. package/lib/esm/widgets/DiagnosticsPanel.js +77 -77
  343. package/lib/esm/widgets/DiagnosticsPanel.js.map +1 -1
  344. package/lib/esm/widgets/FpsTracker.d.ts +19 -19
  345. package/lib/esm/widgets/FpsTracker.js +52 -52
  346. package/lib/esm/widgets/FpsTracker.js.map +1 -1
  347. package/lib/esm/widgets/GpuProfiler.d.ts +16 -16
  348. package/lib/esm/widgets/GpuProfiler.js +188 -188
  349. package/lib/esm/widgets/GpuProfiler.js.map +1 -1
  350. package/lib/esm/widgets/KeyinField.d.ts +61 -61
  351. package/lib/esm/widgets/KeyinField.js +183 -183
  352. package/lib/esm/widgets/KeyinField.js.map +1 -1
  353. package/lib/esm/widgets/MemoryTracker.d.ts +27 -27
  354. package/lib/esm/widgets/MemoryTracker.js +238 -238
  355. package/lib/esm/widgets/MemoryTracker.js.map +1 -1
  356. package/lib/esm/widgets/RenderCommandBreakdown.d.ts +15 -15
  357. package/lib/esm/widgets/RenderCommandBreakdown.js +64 -64
  358. package/lib/esm/widgets/RenderCommandBreakdown.js.map +1 -1
  359. package/lib/esm/widgets/TileMemoryBreakdown.d.ts +30 -30
  360. package/lib/esm/widgets/TileMemoryBreakdown.js +200 -200
  361. package/lib/esm/widgets/TileMemoryBreakdown.js.map +1 -1
  362. package/lib/esm/widgets/TileStatisticsTracker.d.ts +21 -21
  363. package/lib/esm/widgets/TileStatisticsTracker.js +138 -138
  364. package/lib/esm/widgets/TileStatisticsTracker.js.map +1 -1
  365. package/lib/esm/widgets/ToolSettingsTracker.d.ts +9 -9
  366. package/lib/esm/widgets/ToolSettingsTracker.js +207 -207
  367. package/lib/esm/widgets/ToolSettingsTracker.js.map +1 -1
  368. package/lib/public/locales/en/FrontendDevTools.json +484 -484
  369. package/package.json +7 -7
@@ -1,494 +1,494 @@
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
- /** @packageDocumentation
6
- * @module Tools
7
- */
8
- import { BeDuration } from "@itwin/core-bentley";
9
- import { ColorDef, Hilite } from "@itwin/core-common";
10
- import { DrawingViewState, FlashMode, FlashSettings, IModelApp, TileBoundingBoxes, Tool, } from "@itwin/core-frontend";
11
- import { parseArgs } from "./parseArgs";
12
- import { parseToggle } from "./parseToggle";
13
- /** Base class for a tool that toggles some aspect of a Viewport.
14
- * @beta
15
- */
16
- export class ViewportToggleTool extends Tool {
17
- static get minArgs() { return 0; }
18
- static get maxArgs() { return 1; }
19
- async run(enable) {
20
- const vp = IModelApp.viewManager.selectedView;
21
- if (undefined !== vp)
22
- await this.toggle(vp, enable);
23
- return true;
24
- }
25
- async parseAndRun(...args) {
26
- const enable = parseToggle(args[0]);
27
- if (typeof enable !== "string")
28
- await this.run(enable);
29
- return true;
30
- }
31
- }
32
- /** Freeze or unfreeze the scene for the selected viewport. While the scene is frozen, no new tiles will be selected for drawing within the viewport.
33
- * @beta
34
- */
35
- export class FreezeSceneTool extends ViewportToggleTool {
36
- async toggle(vp, enable) {
37
- if (undefined === enable || enable !== vp.freezeScene)
38
- vp.freezeScene = !vp.freezeScene;
39
- return Promise.resolve();
40
- }
41
- }
42
- FreezeSceneTool.toolId = "FreezeScene";
43
- const boundingVolumeNames = [
44
- "none",
45
- "volume",
46
- "content",
47
- "both",
48
- "children",
49
- "sphere",
50
- "solid",
51
- ];
52
- /** Set the tile bounding volume decorations to display in the selected viewport.
53
- * Omitting the argument turns on Volume bounding boxes if bounding boxes are currently off; otherwise, toggles them off.
54
- * Allowed inputs are "none", "volume", "content", "both" (volume and content), "children", and "sphere".
55
- * @beta
56
- */
57
- export class ShowTileVolumesTool extends Tool {
58
- static get minArgs() { return 0; }
59
- static get maxArgs() { return 1; }
60
- async run(boxes) {
61
- const vp = IModelApp.viewManager.selectedView;
62
- if (undefined === vp)
63
- return true;
64
- if (undefined === boxes)
65
- boxes = TileBoundingBoxes.None === vp.debugBoundingBoxes ? TileBoundingBoxes.Volume : TileBoundingBoxes.None;
66
- vp.debugBoundingBoxes = boxes;
67
- return true;
68
- }
69
- async parseAndRun(...args) {
70
- let boxes;
71
- if (0 !== args.length) {
72
- const arg = args[0].toLowerCase();
73
- for (let i = 0; i < boundingVolumeNames.length; i++) {
74
- if (arg === boundingVolumeNames[i]) {
75
- boxes = i;
76
- break;
77
- }
78
- }
79
- if (undefined === boxes)
80
- return true;
81
- }
82
- return this.run(boxes);
83
- }
84
- }
85
- ShowTileVolumesTool.toolId = "ShowTileVolumes";
86
- /** Sets or unsets or flips the deactivated state of one or more tile tree references within the selected viewport.
87
- * Deactivated tile tree references are omitted from the scene.
88
- * This is useful for isolating particular tile trees or tiles for debugging.
89
- * @beta
90
- */
91
- export class ToggleTileTreeReferencesTool extends Tool {
92
- static get minArgs() { return 1; }
93
- static get maxArgs() { return 3; }
94
- async parseAndRun(...args) {
95
- const which = args[0].toLowerCase();
96
- switch (which) {
97
- case "all":
98
- case "animated":
99
- case "primary":
100
- case "section":
101
- this._which = which;
102
- break;
103
- default:
104
- this._which = which.split(",").map((x) => Number.parseInt(x, 10)).filter((x) => !Number.isNaN(x));
105
- }
106
- let modelIds = args[2];
107
- let deactivate = parseToggle(args[1]);
108
- if (typeof deactivate !== "string") {
109
- if (typeof deactivate === "boolean")
110
- deactivate = !deactivate;
111
- this._deactivate = deactivate;
112
- }
113
- else {
114
- modelIds = args[1];
115
- }
116
- if (modelIds)
117
- this._modelIds = modelIds.toLowerCase().split(",");
118
- return this.run();
119
- }
120
- async run() {
121
- const vp = IModelApp.viewManager.selectedView;
122
- if (!vp || !this._which || !vp.view.isSpatialView())
123
- return false;
124
- vp.view.setTileTreeReferencesDeactivated(this._modelIds, this._deactivate, this._which);
125
- vp.invalidateScene();
126
- return true;
127
- }
128
- }
129
- ToggleTileTreeReferencesTool.toolId = "ToggleTileTreeReferences";
130
- /** This tool sets the aspect ratio skew for the selected viewport.
131
- * @beta
132
- */
133
- export class SetAspectRatioSkewTool extends Tool {
134
- static get minArgs() { return 0; }
135
- static get maxArgs() { return 1; }
136
- /** This method runs the tool, setting the aspect ratio skew for the selected viewport.
137
- * @param skew the aspect ratio (x/y) skew value; 1.0 or undefined removes any skew
138
- */
139
- async run(skew) {
140
- if (undefined === skew)
141
- skew = 1.0;
142
- const vp = IModelApp.viewManager.selectedView;
143
- if (undefined !== vp) {
144
- vp.view.setAspectRatioSkew(skew);
145
- vp.synchWithView();
146
- }
147
- return true;
148
- }
149
- /** Executes this tool's run method.
150
- * @param args the first entry of this array contains the `skew` argument
151
- * @see [[run]]
152
- */
153
- async parseAndRun(...args) {
154
- const skew = args.length > 0 ? parseFloat(args[0]) : 1.0;
155
- return !Number.isNaN(skew) && this.run(skew);
156
- }
157
- }
158
- SetAspectRatioSkewTool.toolId = "SetAspectRatioSkew";
159
- /** Changes the [ModelSubCategoryHiliteMode]($frontend) for the [HiliteSet]($frontend) associated with the selected Viewport.
160
- * @beta
161
- */
162
- export class ChangeHiliteModeTool extends Tool {
163
- static get minArgs() { return 1; }
164
- static get maxArgs() { return 1; }
165
- async run(mode) {
166
- var _a;
167
- const hilites = (_a = IModelApp.viewManager.selectedView) === null || _a === void 0 ? void 0 : _a.iModel.hilited;
168
- if (!hilites)
169
- return false;
170
- if (mode === "union" || mode === "intersection")
171
- hilites.modelSubCategoryMode = mode;
172
- return true;
173
- }
174
- async parseAndRun(...args) {
175
- return this.run(args[0]);
176
- }
177
- }
178
- ChangeHiliteModeTool.toolId = "ChangeHiliteMode";
179
- /** Changes the selected viewport's hilite or emphasis settings.
180
- * @beta
181
- */
182
- export class ChangeHiliteTool extends Tool {
183
- static get minArgs() { return 0; }
184
- static get maxArgs() { return 6; }
185
- async run(settings) {
186
- const vp = IModelApp.viewManager.selectedView;
187
- if (undefined !== vp)
188
- this.apply(vp, settings);
189
- return true;
190
- }
191
- async parseAndRun(...inputArgs) {
192
- if (0 === inputArgs.length)
193
- return this.run();
194
- const vp = IModelApp.viewManager.selectedView;
195
- if (undefined === vp)
196
- return true;
197
- const cur = this.getCurrentSettings(vp);
198
- const colors = cur.color.colors;
199
- let visible = cur.visibleRatio;
200
- let hidden = cur.hiddenRatio;
201
- let silhouette = cur.silhouette;
202
- const args = parseArgs(inputArgs);
203
- const parseColorComponent = (c) => {
204
- const num = args.getInteger(c);
205
- if (undefined !== num)
206
- colors[c] = Math.floor(Math.max(0, Math.min(255, num)));
207
- };
208
- parseColorComponent("r");
209
- parseColorComponent("g");
210
- parseColorComponent("b");
211
- const silhouetteArg = args.getInteger("s");
212
- if (undefined !== silhouetteArg && silhouetteArg >= Hilite.Silhouette.None && silhouetteArg <= Hilite.Silhouette.Thick)
213
- silhouette = silhouetteArg;
214
- const v = args.getFloat("v");
215
- if (undefined !== v && v >= 0 && v <= 1)
216
- visible = v;
217
- const h = args.getFloat("h");
218
- if (undefined !== h && h >= 0 && h <= 1)
219
- hidden = h;
220
- if (undefined === silhouette)
221
- silhouette = cur.silhouette;
222
- if (undefined === visible)
223
- visible = cur.visibleRatio;
224
- if (undefined === hidden)
225
- hidden = cur.hiddenRatio;
226
- const settings = {
227
- color: ColorDef.from(colors.r, colors.g, colors.b),
228
- silhouette,
229
- visibleRatio: visible,
230
- hiddenRatio: hidden,
231
- };
232
- return this.run(settings);
233
- }
234
- }
235
- /** Changes the selected viewport's hilite settings, or resets to defaults.
236
- * @beta
237
- */
238
- export class ChangeHiliteSettingsTool extends ChangeHiliteTool {
239
- getCurrentSettings(vp) { return vp.hilite; }
240
- apply(vp, settings) {
241
- vp.hilite = undefined !== settings ? settings : new Hilite.Settings();
242
- }
243
- }
244
- ChangeHiliteSettingsTool.toolId = "ChangeHiliteSettings";
245
- /** Changes the selected viewport's emphasis settings.
246
- * @beta
247
- */
248
- export class ChangeEmphasisSettingsTool extends ChangeHiliteTool {
249
- getCurrentSettings(vp) { return vp.emphasisSettings; }
250
- apply(vp, settings) {
251
- if (undefined !== settings)
252
- vp.emphasisSettings = settings;
253
- }
254
- }
255
- ChangeEmphasisSettingsTool.toolId = "ChangeEmphasisSettings";
256
- /** Changes the [FlashSettings]($frontend) for the selected [Viewport]($frontend).
257
- * @beta
258
- */
259
- export class ChangeFlashSettingsTool extends Tool {
260
- static get minArgs() { return 0; }
261
- static get maxArgs() { return 3; }
262
- async run(settings) {
263
- const vp = IModelApp.viewManager.selectedView;
264
- if (vp)
265
- vp.flashSettings = settings !== null && settings !== void 0 ? settings : new FlashSettings();
266
- return true;
267
- }
268
- async parseAndRun(...inputArgs) {
269
- const vp = IModelApp.viewManager.selectedView;
270
- if (!vp)
271
- return true;
272
- if (1 === inputArgs.length && "default" === inputArgs[0].toLowerCase())
273
- return this.run();
274
- const options = {};
275
- const args = parseArgs(inputArgs);
276
- const intensity = args.getFloat("i");
277
- if (undefined !== intensity)
278
- options.maxIntensity = intensity;
279
- const mode = args.get("m");
280
- if (mode) {
281
- switch (mode[0].toLowerCase()) {
282
- case "b":
283
- options.litMode = FlashMode.Brighten;
284
- break;
285
- case "h":
286
- options.litMode = FlashMode.Hilite;
287
- break;
288
- default:
289
- return false;
290
- }
291
- }
292
- const duration = args.getFloat("d");
293
- if (undefined !== duration)
294
- options.duration = BeDuration.fromSeconds(duration);
295
- return this.run(vp.flashSettings.clone(options));
296
- }
297
- }
298
- ChangeFlashSettingsTool.toolId = "ChangeFlashSettings";
299
- /** Enables or disables fade-out transparency mode for the selected viewport.
300
- * @beta
301
- */
302
- export class FadeOutTool extends ViewportToggleTool {
303
- async toggle(vp, enable) {
304
- if (undefined === enable || enable !== vp.isFadeOutActive)
305
- vp.isFadeOutActive = !vp.isFadeOutActive;
306
- return Promise.resolve();
307
- }
308
- }
309
- FadeOutTool.toolId = "FadeOut";
310
- /** Sets the default tile size modifier used for all viewports that don't explicitly override it.
311
- * @beta
312
- */
313
- export class DefaultTileSizeModifierTool extends Tool {
314
- static get minArgs() { return 1; }
315
- static get maxArgs() { return 1; }
316
- /** This method runs the tool, setting the default tile size modifier used for all viewports that don't explicitly override it.
317
- * @param modifier the tile size modifier to use; if undefined, do not set modifier
318
- */
319
- async run(modifier) {
320
- if (undefined !== modifier)
321
- IModelApp.tileAdmin.defaultTileSizeModifier = modifier;
322
- return true;
323
- }
324
- /** Executes this tool's run method with args[0] containing `modifier`.
325
- * @see [[run]]
326
- */
327
- async parseAndRun(...args) {
328
- return this.run(Number.parseFloat(args[0]));
329
- }
330
- }
331
- DefaultTileSizeModifierTool.toolId = "DefaultTileSizeMod";
332
- /** Sets or clears the tile size modifier override for the selected viewport.
333
- * @beta
334
- */
335
- export class ViewportTileSizeModifierTool extends Tool {
336
- static get minArgs() { return 1; }
337
- static get maxArgs() { return 1; }
338
- /** This method runs the tool, setting the tile size modifier used for the selected viewport.
339
- * @param modifier the tile size modifier to use; if undefined, reset the modifier
340
- */
341
- async run(modifier) {
342
- const vp = IModelApp.viewManager.selectedView;
343
- if (undefined !== vp)
344
- vp.setTileSizeModifier(modifier);
345
- return true;
346
- }
347
- /** Executes this tool's run method with args[0] containing the `modifier` argument or the string "reset" in order to reset the modifier.
348
- * @see [[run]]
349
- */
350
- async parseAndRun(...args) {
351
- const arg = args[0].toLowerCase();
352
- const modifier = "reset" === arg ? undefined : Number.parseFloat(args[0]);
353
- return this.run(modifier);
354
- }
355
- }
356
- ViewportTileSizeModifierTool.toolId = "ViewportTileSizeMod";
357
- /** This tool adds a reality model to the viewport.
358
- * @beta
359
- */
360
- export class ViewportAddRealityModel extends Tool {
361
- static get minArgs() { return 1; }
362
- static get maxArgs() { return 1; }
363
- /** This method runs the tool, adding a reality model to the viewport
364
- * @param url the URL which points to the reality model tileset
365
- */
366
- async run(url) {
367
- const vp = IModelApp.viewManager.selectedView;
368
- if (undefined !== vp)
369
- vp.displayStyle.attachRealityModel({ tilesetUrl: url });
370
- return true;
371
- }
372
- /** Executes this tool's run method with args[0] containing the `url` argument.
373
- * @see [[run]]
374
- */
375
- async parseAndRun(...args) {
376
- return this.run(args[0]);
377
- }
378
- }
379
- ViewportAddRealityModel.toolId = "ViewportAddRealityModel";
380
- /** Changes the `allow3dManipulations` flag for the selected viewport if the viewport is displaying a `ViewState3d`.
381
- * @beta
382
- */
383
- export class Toggle3dManipulationsTool extends ViewportToggleTool {
384
- async toggle(vp, allow) {
385
- if (!vp.view.is3d())
386
- return Promise.resolve();
387
- if (undefined === allow)
388
- allow = !vp.view.allow3dManipulations();
389
- if (allow !== vp.view.allow3dManipulations()) {
390
- vp.view.setAllow3dManipulations(allow);
391
- // eslint-disable-next-line @typescript-eslint/no-floating-promises
392
- IModelApp.toolAdmin.startDefaultTool();
393
- }
394
- return Promise.resolve();
395
- }
396
- }
397
- Toggle3dManipulationsTool.toolId = "Toggle3dManipulations";
398
- /** Toggles display of view attachments in sheet views.
399
- * @beta
400
- */
401
- export class ToggleViewAttachmentsTool extends ViewportToggleTool {
402
- async toggle(vp, enable) {
403
- if (undefined === enable || enable !== vp.wantViewAttachments)
404
- vp.wantViewAttachments = !vp.wantViewAttachments;
405
- return Promise.resolve();
406
- }
407
- }
408
- ToggleViewAttachmentsTool.toolId = "ToggleViewAttachments";
409
- /** Toggle display of view attachment boundaries in sheet views.
410
- * @beta
411
- */
412
- export class ToggleViewAttachmentBoundariesTool extends ViewportToggleTool {
413
- async toggle(vp, enable) {
414
- if (undefined === enable || enable !== vp.wantViewAttachmentBoundaries)
415
- vp.wantViewAttachmentBoundaries = !vp.wantViewAttachmentBoundaries;
416
- return Promise.resolve();
417
- }
418
- }
419
- ToggleViewAttachmentBoundariesTool.toolId = "ToggleViewAttachmentBoundaries";
420
- /** Toggle display of view attachment clip shapes in sheet views.
421
- * @beta
422
- */
423
- export class ToggleViewAttachmentClipShapesTool extends ViewportToggleTool {
424
- async toggle(vp, enable) {
425
- if (undefined === enable || enable !== vp.wantViewAttachmentClipShapes)
426
- vp.wantViewAttachmentClipShapes = !vp.wantViewAttachmentClipShapes;
427
- return Promise.resolve();
428
- }
429
- }
430
- ToggleViewAttachmentClipShapesTool.toolId = "ToggleViewAttachmentClipShapes";
431
- /** Toggles display of 2d graphics in a [DrawingViewState]($frontend). This setting affects all drawing views until it is reset.
432
- * @beta
433
- */
434
- export class ToggleDrawingGraphicsTool extends ViewportToggleTool {
435
- async toggle(vp, enable) {
436
- if (undefined === enable || enable !== DrawingViewState.hideDrawingGraphics) {
437
- DrawingViewState.hideDrawingGraphics = !DrawingViewState.hideDrawingGraphics;
438
- vp.invalidateScene();
439
- }
440
- return Promise.resolve();
441
- }
442
- }
443
- ToggleDrawingGraphicsTool.toolId = "ToggleDrawingGraphics";
444
- /** Toggles whether a [SectionDrawing]($backend)'s spatial view is always displayed along with the 2d graphics by a [DrawingViewState]($frontend), even
445
- * if it otherwise would not be. This setting affects all section drawing views until it is reset.
446
- * @beta
447
- */
448
- export class ToggleSectionDrawingSpatialViewTool extends ViewportToggleTool {
449
- async toggle(vp, enable) {
450
- if (undefined === enable || enable !== DrawingViewState.alwaysDisplaySpatialView) {
451
- DrawingViewState.alwaysDisplaySpatialView = !DrawingViewState.alwaysDisplaySpatialView;
452
- if (vp.view instanceof DrawingViewState) {
453
- // Force the view to update its section drawing attachment.
454
- const view = vp.view.clone();
455
- await view.changeViewedModel(view.baseModelId);
456
- await view.load();
457
- vp.changeView(view);
458
- }
459
- }
460
- }
461
- }
462
- ToggleSectionDrawingSpatialViewTool.toolId = "ToggleSectionDrawingSpatialView";
463
- /** Change the camera settings of the selected viewport.
464
- * @beta
465
- */
466
- export class ChangeCameraTool extends Tool {
467
- static get minArgs() { return 1; }
468
- static get maxArgs() { return 2; }
469
- async run(camera) {
470
- const vp = IModelApp.viewManager.selectedView;
471
- if (camera && vp && vp.view.is3d()) {
472
- const view = vp.view.clone();
473
- view.camera.setFrom(camera);
474
- vp.changeView(view);
475
- }
476
- return true;
477
- }
478
- async parseAndRun(...inArgs) {
479
- const vp = IModelApp.viewManager.selectedView;
480
- if (!vp || !vp.view.is3d())
481
- return false;
482
- const camera = vp.view.camera.clone();
483
- const args = parseArgs(inArgs);
484
- const lens = args.getFloat("l");
485
- if (undefined !== lens)
486
- camera.lens.setDegrees(lens);
487
- const focusDist = args.getFloat("d");
488
- if (undefined !== focusDist)
489
- camera.focusDist = focusDist;
490
- return this.run(camera);
491
- }
492
- }
493
- ChangeCameraTool.toolId = "ChangeCamera";
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
+ /** @packageDocumentation
6
+ * @module Tools
7
+ */
8
+ import { BeDuration } from "@itwin/core-bentley";
9
+ import { ColorDef, Hilite } from "@itwin/core-common";
10
+ import { DrawingViewState, FlashMode, FlashSettings, IModelApp, TileBoundingBoxes, Tool, } from "@itwin/core-frontend";
11
+ import { parseArgs } from "./parseArgs";
12
+ import { parseToggle } from "./parseToggle";
13
+ /** Base class for a tool that toggles some aspect of a Viewport.
14
+ * @beta
15
+ */
16
+ export class ViewportToggleTool extends Tool {
17
+ static get minArgs() { return 0; }
18
+ static get maxArgs() { return 1; }
19
+ async run(enable) {
20
+ const vp = IModelApp.viewManager.selectedView;
21
+ if (undefined !== vp)
22
+ await this.toggle(vp, enable);
23
+ return true;
24
+ }
25
+ async parseAndRun(...args) {
26
+ const enable = parseToggle(args[0]);
27
+ if (typeof enable !== "string")
28
+ await this.run(enable);
29
+ return true;
30
+ }
31
+ }
32
+ /** Freeze or unfreeze the scene for the selected viewport. While the scene is frozen, no new tiles will be selected for drawing within the viewport.
33
+ * @beta
34
+ */
35
+ export class FreezeSceneTool extends ViewportToggleTool {
36
+ async toggle(vp, enable) {
37
+ if (undefined === enable || enable !== vp.freezeScene)
38
+ vp.freezeScene = !vp.freezeScene;
39
+ return Promise.resolve();
40
+ }
41
+ }
42
+ FreezeSceneTool.toolId = "FreezeScene";
43
+ const boundingVolumeNames = [
44
+ "none",
45
+ "volume",
46
+ "content",
47
+ "both",
48
+ "children",
49
+ "sphere",
50
+ "solid",
51
+ ];
52
+ /** Set the tile bounding volume decorations to display in the selected viewport.
53
+ * Omitting the argument turns on Volume bounding boxes if bounding boxes are currently off; otherwise, toggles them off.
54
+ * Allowed inputs are "none", "volume", "content", "both" (volume and content), "children", and "sphere".
55
+ * @beta
56
+ */
57
+ export class ShowTileVolumesTool extends Tool {
58
+ static get minArgs() { return 0; }
59
+ static get maxArgs() { return 1; }
60
+ async run(boxes) {
61
+ const vp = IModelApp.viewManager.selectedView;
62
+ if (undefined === vp)
63
+ return true;
64
+ if (undefined === boxes)
65
+ boxes = TileBoundingBoxes.None === vp.debugBoundingBoxes ? TileBoundingBoxes.Volume : TileBoundingBoxes.None;
66
+ vp.debugBoundingBoxes = boxes;
67
+ return true;
68
+ }
69
+ async parseAndRun(...args) {
70
+ let boxes;
71
+ if (0 !== args.length) {
72
+ const arg = args[0].toLowerCase();
73
+ for (let i = 0; i < boundingVolumeNames.length; i++) {
74
+ if (arg === boundingVolumeNames[i]) {
75
+ boxes = i;
76
+ break;
77
+ }
78
+ }
79
+ if (undefined === boxes)
80
+ return true;
81
+ }
82
+ return this.run(boxes);
83
+ }
84
+ }
85
+ ShowTileVolumesTool.toolId = "ShowTileVolumes";
86
+ /** Sets or unsets or flips the deactivated state of one or more tile tree references within the selected viewport.
87
+ * Deactivated tile tree references are omitted from the scene.
88
+ * This is useful for isolating particular tile trees or tiles for debugging.
89
+ * @beta
90
+ */
91
+ export class ToggleTileTreeReferencesTool extends Tool {
92
+ static get minArgs() { return 1; }
93
+ static get maxArgs() { return 3; }
94
+ async parseAndRun(...args) {
95
+ const which = args[0].toLowerCase();
96
+ switch (which) {
97
+ case "all":
98
+ case "animated":
99
+ case "primary":
100
+ case "section":
101
+ this._which = which;
102
+ break;
103
+ default:
104
+ this._which = which.split(",").map((x) => Number.parseInt(x, 10)).filter((x) => !Number.isNaN(x));
105
+ }
106
+ let modelIds = args[2];
107
+ let deactivate = parseToggle(args[1]);
108
+ if (typeof deactivate !== "string") {
109
+ if (typeof deactivate === "boolean")
110
+ deactivate = !deactivate;
111
+ this._deactivate = deactivate;
112
+ }
113
+ else {
114
+ modelIds = args[1];
115
+ }
116
+ if (modelIds)
117
+ this._modelIds = modelIds.toLowerCase().split(",");
118
+ return this.run();
119
+ }
120
+ async run() {
121
+ const vp = IModelApp.viewManager.selectedView;
122
+ if (!vp || !this._which || !vp.view.isSpatialView())
123
+ return false;
124
+ vp.view.setTileTreeReferencesDeactivated(this._modelIds, this._deactivate, this._which);
125
+ vp.invalidateScene();
126
+ return true;
127
+ }
128
+ }
129
+ ToggleTileTreeReferencesTool.toolId = "ToggleTileTreeReferences";
130
+ /** This tool sets the aspect ratio skew for the selected viewport.
131
+ * @beta
132
+ */
133
+ export class SetAspectRatioSkewTool extends Tool {
134
+ static get minArgs() { return 0; }
135
+ static get maxArgs() { return 1; }
136
+ /** This method runs the tool, setting the aspect ratio skew for the selected viewport.
137
+ * @param skew the aspect ratio (x/y) skew value; 1.0 or undefined removes any skew
138
+ */
139
+ async run(skew) {
140
+ if (undefined === skew)
141
+ skew = 1.0;
142
+ const vp = IModelApp.viewManager.selectedView;
143
+ if (undefined !== vp) {
144
+ vp.view.setAspectRatioSkew(skew);
145
+ vp.synchWithView();
146
+ }
147
+ return true;
148
+ }
149
+ /** Executes this tool's run method.
150
+ * @param args the first entry of this array contains the `skew` argument
151
+ * @see [[run]]
152
+ */
153
+ async parseAndRun(...args) {
154
+ const skew = args.length > 0 ? parseFloat(args[0]) : 1.0;
155
+ return !Number.isNaN(skew) && this.run(skew);
156
+ }
157
+ }
158
+ SetAspectRatioSkewTool.toolId = "SetAspectRatioSkew";
159
+ /** Changes the [ModelSubCategoryHiliteMode]($frontend) for the [HiliteSet]($frontend) associated with the selected Viewport.
160
+ * @beta
161
+ */
162
+ export class ChangeHiliteModeTool extends Tool {
163
+ static get minArgs() { return 1; }
164
+ static get maxArgs() { return 1; }
165
+ async run(mode) {
166
+ var _a;
167
+ const hilites = (_a = IModelApp.viewManager.selectedView) === null || _a === void 0 ? void 0 : _a.iModel.hilited;
168
+ if (!hilites)
169
+ return false;
170
+ if (mode === "union" || mode === "intersection")
171
+ hilites.modelSubCategoryMode = mode;
172
+ return true;
173
+ }
174
+ async parseAndRun(...args) {
175
+ return this.run(args[0]);
176
+ }
177
+ }
178
+ ChangeHiliteModeTool.toolId = "ChangeHiliteMode";
179
+ /** Changes the selected viewport's hilite or emphasis settings.
180
+ * @beta
181
+ */
182
+ export class ChangeHiliteTool extends Tool {
183
+ static get minArgs() { return 0; }
184
+ static get maxArgs() { return 6; }
185
+ async run(settings) {
186
+ const vp = IModelApp.viewManager.selectedView;
187
+ if (undefined !== vp)
188
+ this.apply(vp, settings);
189
+ return true;
190
+ }
191
+ async parseAndRun(...inputArgs) {
192
+ if (0 === inputArgs.length)
193
+ return this.run();
194
+ const vp = IModelApp.viewManager.selectedView;
195
+ if (undefined === vp)
196
+ return true;
197
+ const cur = this.getCurrentSettings(vp);
198
+ const colors = cur.color.colors;
199
+ let visible = cur.visibleRatio;
200
+ let hidden = cur.hiddenRatio;
201
+ let silhouette = cur.silhouette;
202
+ const args = parseArgs(inputArgs);
203
+ const parseColorComponent = (c) => {
204
+ const num = args.getInteger(c);
205
+ if (undefined !== num)
206
+ colors[c] = Math.floor(Math.max(0, Math.min(255, num)));
207
+ };
208
+ parseColorComponent("r");
209
+ parseColorComponent("g");
210
+ parseColorComponent("b");
211
+ const silhouetteArg = args.getInteger("s");
212
+ if (undefined !== silhouetteArg && silhouetteArg >= Hilite.Silhouette.None && silhouetteArg <= Hilite.Silhouette.Thick)
213
+ silhouette = silhouetteArg;
214
+ const v = args.getFloat("v");
215
+ if (undefined !== v && v >= 0 && v <= 1)
216
+ visible = v;
217
+ const h = args.getFloat("h");
218
+ if (undefined !== h && h >= 0 && h <= 1)
219
+ hidden = h;
220
+ if (undefined === silhouette)
221
+ silhouette = cur.silhouette;
222
+ if (undefined === visible)
223
+ visible = cur.visibleRatio;
224
+ if (undefined === hidden)
225
+ hidden = cur.hiddenRatio;
226
+ const settings = {
227
+ color: ColorDef.from(colors.r, colors.g, colors.b),
228
+ silhouette,
229
+ visibleRatio: visible,
230
+ hiddenRatio: hidden,
231
+ };
232
+ return this.run(settings);
233
+ }
234
+ }
235
+ /** Changes the selected viewport's hilite settings, or resets to defaults.
236
+ * @beta
237
+ */
238
+ export class ChangeHiliteSettingsTool extends ChangeHiliteTool {
239
+ getCurrentSettings(vp) { return vp.hilite; }
240
+ apply(vp, settings) {
241
+ vp.hilite = undefined !== settings ? settings : new Hilite.Settings();
242
+ }
243
+ }
244
+ ChangeHiliteSettingsTool.toolId = "ChangeHiliteSettings";
245
+ /** Changes the selected viewport's emphasis settings.
246
+ * @beta
247
+ */
248
+ export class ChangeEmphasisSettingsTool extends ChangeHiliteTool {
249
+ getCurrentSettings(vp) { return vp.emphasisSettings; }
250
+ apply(vp, settings) {
251
+ if (undefined !== settings)
252
+ vp.emphasisSettings = settings;
253
+ }
254
+ }
255
+ ChangeEmphasisSettingsTool.toolId = "ChangeEmphasisSettings";
256
+ /** Changes the [FlashSettings]($frontend) for the selected [Viewport]($frontend).
257
+ * @beta
258
+ */
259
+ export class ChangeFlashSettingsTool extends Tool {
260
+ static get minArgs() { return 0; }
261
+ static get maxArgs() { return 3; }
262
+ async run(settings) {
263
+ const vp = IModelApp.viewManager.selectedView;
264
+ if (vp)
265
+ vp.flashSettings = settings !== null && settings !== void 0 ? settings : new FlashSettings();
266
+ return true;
267
+ }
268
+ async parseAndRun(...inputArgs) {
269
+ const vp = IModelApp.viewManager.selectedView;
270
+ if (!vp)
271
+ return true;
272
+ if (1 === inputArgs.length && "default" === inputArgs[0].toLowerCase())
273
+ return this.run();
274
+ const options = {};
275
+ const args = parseArgs(inputArgs);
276
+ const intensity = args.getFloat("i");
277
+ if (undefined !== intensity)
278
+ options.maxIntensity = intensity;
279
+ const mode = args.get("m");
280
+ if (mode) {
281
+ switch (mode[0].toLowerCase()) {
282
+ case "b":
283
+ options.litMode = FlashMode.Brighten;
284
+ break;
285
+ case "h":
286
+ options.litMode = FlashMode.Hilite;
287
+ break;
288
+ default:
289
+ return false;
290
+ }
291
+ }
292
+ const duration = args.getFloat("d");
293
+ if (undefined !== duration)
294
+ options.duration = BeDuration.fromSeconds(duration);
295
+ return this.run(vp.flashSettings.clone(options));
296
+ }
297
+ }
298
+ ChangeFlashSettingsTool.toolId = "ChangeFlashSettings";
299
+ /** Enables or disables fade-out transparency mode for the selected viewport.
300
+ * @beta
301
+ */
302
+ export class FadeOutTool extends ViewportToggleTool {
303
+ async toggle(vp, enable) {
304
+ if (undefined === enable || enable !== vp.isFadeOutActive)
305
+ vp.isFadeOutActive = !vp.isFadeOutActive;
306
+ return Promise.resolve();
307
+ }
308
+ }
309
+ FadeOutTool.toolId = "FadeOut";
310
+ /** Sets the default tile size modifier used for all viewports that don't explicitly override it.
311
+ * @beta
312
+ */
313
+ export class DefaultTileSizeModifierTool extends Tool {
314
+ static get minArgs() { return 1; }
315
+ static get maxArgs() { return 1; }
316
+ /** This method runs the tool, setting the default tile size modifier used for all viewports that don't explicitly override it.
317
+ * @param modifier the tile size modifier to use; if undefined, do not set modifier
318
+ */
319
+ async run(modifier) {
320
+ if (undefined !== modifier)
321
+ IModelApp.tileAdmin.defaultTileSizeModifier = modifier;
322
+ return true;
323
+ }
324
+ /** Executes this tool's run method with args[0] containing `modifier`.
325
+ * @see [[run]]
326
+ */
327
+ async parseAndRun(...args) {
328
+ return this.run(Number.parseFloat(args[0]));
329
+ }
330
+ }
331
+ DefaultTileSizeModifierTool.toolId = "DefaultTileSizeMod";
332
+ /** Sets or clears the tile size modifier override for the selected viewport.
333
+ * @beta
334
+ */
335
+ export class ViewportTileSizeModifierTool extends Tool {
336
+ static get minArgs() { return 1; }
337
+ static get maxArgs() { return 1; }
338
+ /** This method runs the tool, setting the tile size modifier used for the selected viewport.
339
+ * @param modifier the tile size modifier to use; if undefined, reset the modifier
340
+ */
341
+ async run(modifier) {
342
+ const vp = IModelApp.viewManager.selectedView;
343
+ if (undefined !== vp)
344
+ vp.setTileSizeModifier(modifier);
345
+ return true;
346
+ }
347
+ /** Executes this tool's run method with args[0] containing the `modifier` argument or the string "reset" in order to reset the modifier.
348
+ * @see [[run]]
349
+ */
350
+ async parseAndRun(...args) {
351
+ const arg = args[0].toLowerCase();
352
+ const modifier = "reset" === arg ? undefined : Number.parseFloat(args[0]);
353
+ return this.run(modifier);
354
+ }
355
+ }
356
+ ViewportTileSizeModifierTool.toolId = "ViewportTileSizeMod";
357
+ /** This tool adds a reality model to the viewport.
358
+ * @beta
359
+ */
360
+ export class ViewportAddRealityModel extends Tool {
361
+ static get minArgs() { return 1; }
362
+ static get maxArgs() { return 1; }
363
+ /** This method runs the tool, adding a reality model to the viewport
364
+ * @param url the URL which points to the reality model tileset
365
+ */
366
+ async run(url) {
367
+ const vp = IModelApp.viewManager.selectedView;
368
+ if (undefined !== vp)
369
+ vp.displayStyle.attachRealityModel({ tilesetUrl: url });
370
+ return true;
371
+ }
372
+ /** Executes this tool's run method with args[0] containing the `url` argument.
373
+ * @see [[run]]
374
+ */
375
+ async parseAndRun(...args) {
376
+ return this.run(args[0]);
377
+ }
378
+ }
379
+ ViewportAddRealityModel.toolId = "ViewportAddRealityModel";
380
+ /** Changes the `allow3dManipulations` flag for the selected viewport if the viewport is displaying a `ViewState3d`.
381
+ * @beta
382
+ */
383
+ export class Toggle3dManipulationsTool extends ViewportToggleTool {
384
+ async toggle(vp, allow) {
385
+ if (!vp.view.is3d())
386
+ return Promise.resolve();
387
+ if (undefined === allow)
388
+ allow = !vp.view.allow3dManipulations();
389
+ if (allow !== vp.view.allow3dManipulations()) {
390
+ vp.view.setAllow3dManipulations(allow);
391
+ // eslint-disable-next-line @typescript-eslint/no-floating-promises
392
+ IModelApp.toolAdmin.startDefaultTool();
393
+ }
394
+ return Promise.resolve();
395
+ }
396
+ }
397
+ Toggle3dManipulationsTool.toolId = "Toggle3dManipulations";
398
+ /** Toggles display of view attachments in sheet views.
399
+ * @beta
400
+ */
401
+ export class ToggleViewAttachmentsTool extends ViewportToggleTool {
402
+ async toggle(vp, enable) {
403
+ if (undefined === enable || enable !== vp.wantViewAttachments)
404
+ vp.wantViewAttachments = !vp.wantViewAttachments;
405
+ return Promise.resolve();
406
+ }
407
+ }
408
+ ToggleViewAttachmentsTool.toolId = "ToggleViewAttachments";
409
+ /** Toggle display of view attachment boundaries in sheet views.
410
+ * @beta
411
+ */
412
+ export class ToggleViewAttachmentBoundariesTool extends ViewportToggleTool {
413
+ async toggle(vp, enable) {
414
+ if (undefined === enable || enable !== vp.wantViewAttachmentBoundaries)
415
+ vp.wantViewAttachmentBoundaries = !vp.wantViewAttachmentBoundaries;
416
+ return Promise.resolve();
417
+ }
418
+ }
419
+ ToggleViewAttachmentBoundariesTool.toolId = "ToggleViewAttachmentBoundaries";
420
+ /** Toggle display of view attachment clip shapes in sheet views.
421
+ * @beta
422
+ */
423
+ export class ToggleViewAttachmentClipShapesTool extends ViewportToggleTool {
424
+ async toggle(vp, enable) {
425
+ if (undefined === enable || enable !== vp.wantViewAttachmentClipShapes)
426
+ vp.wantViewAttachmentClipShapes = !vp.wantViewAttachmentClipShapes;
427
+ return Promise.resolve();
428
+ }
429
+ }
430
+ ToggleViewAttachmentClipShapesTool.toolId = "ToggleViewAttachmentClipShapes";
431
+ /** Toggles display of 2d graphics in a [DrawingViewState]($frontend). This setting affects all drawing views until it is reset.
432
+ * @beta
433
+ */
434
+ export class ToggleDrawingGraphicsTool extends ViewportToggleTool {
435
+ async toggle(vp, enable) {
436
+ if (undefined === enable || enable !== DrawingViewState.hideDrawingGraphics) {
437
+ DrawingViewState.hideDrawingGraphics = !DrawingViewState.hideDrawingGraphics;
438
+ vp.invalidateScene();
439
+ }
440
+ return Promise.resolve();
441
+ }
442
+ }
443
+ ToggleDrawingGraphicsTool.toolId = "ToggleDrawingGraphics";
444
+ /** Toggles whether a [SectionDrawing]($backend)'s spatial view is always displayed along with the 2d graphics by a [DrawingViewState]($frontend), even
445
+ * if it otherwise would not be. This setting affects all section drawing views until it is reset.
446
+ * @beta
447
+ */
448
+ export class ToggleSectionDrawingSpatialViewTool extends ViewportToggleTool {
449
+ async toggle(vp, enable) {
450
+ if (undefined === enable || enable !== DrawingViewState.alwaysDisplaySpatialView) {
451
+ DrawingViewState.alwaysDisplaySpatialView = !DrawingViewState.alwaysDisplaySpatialView;
452
+ if (vp.view instanceof DrawingViewState) {
453
+ // Force the view to update its section drawing attachment.
454
+ const view = vp.view.clone();
455
+ await view.changeViewedModel(view.baseModelId);
456
+ await view.load();
457
+ vp.changeView(view);
458
+ }
459
+ }
460
+ }
461
+ }
462
+ ToggleSectionDrawingSpatialViewTool.toolId = "ToggleSectionDrawingSpatialView";
463
+ /** Change the camera settings of the selected viewport.
464
+ * @beta
465
+ */
466
+ export class ChangeCameraTool extends Tool {
467
+ static get minArgs() { return 1; }
468
+ static get maxArgs() { return 2; }
469
+ async run(camera) {
470
+ const vp = IModelApp.viewManager.selectedView;
471
+ if (camera && vp && vp.view.is3d()) {
472
+ const view = vp.view.clone();
473
+ view.camera.setFrom(camera);
474
+ vp.changeView(view);
475
+ }
476
+ return true;
477
+ }
478
+ async parseAndRun(...inArgs) {
479
+ const vp = IModelApp.viewManager.selectedView;
480
+ if (!vp || !vp.view.is3d())
481
+ return false;
482
+ const camera = vp.view.camera.clone();
483
+ const args = parseArgs(inArgs);
484
+ const lens = args.getFloat("l");
485
+ if (undefined !== lens)
486
+ camera.lens.setDegrees(lens);
487
+ const focusDist = args.getFloat("d");
488
+ if (undefined !== focusDist)
489
+ camera.focusDist = focusDist;
490
+ return this.run(camera);
491
+ }
492
+ }
493
+ ChangeCameraTool.toolId = "ChangeCamera";
494
494
  //# sourceMappingURL=ViewportTools.js.map