@itwin/frontend-devtools 4.0.0-dev.28 → 4.0.0-dev.32

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