@itwin/frontend-devtools 3.4.0-dev.9 → 3.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (387) hide show
  1. package/CHANGELOG.md +51 -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 +219 -219
  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.d.ts.map +1 -1
  55. package/lib/cjs/tools/FrustumDecoration.js +374 -371
  56. package/lib/cjs/tools/FrustumDecoration.js.map +1 -1
  57. package/lib/cjs/tools/InspectElementTool.d.ts +42 -42
  58. package/lib/cjs/tools/InspectElementTool.js +198 -198
  59. package/lib/cjs/tools/InspectElementTool.js.map +1 -1
  60. package/lib/cjs/tools/MapLayerTool.d.ts +257 -257
  61. package/lib/cjs/tools/MapLayerTool.js +499 -499
  62. package/lib/cjs/tools/MapLayerTool.js.map +1 -1
  63. package/lib/cjs/tools/MeasureTileLoadTime.d.ts +12 -12
  64. package/lib/cjs/tools/MeasureTileLoadTime.d.ts.map +1 -1
  65. package/lib/cjs/tools/MeasureTileLoadTime.js +63 -60
  66. package/lib/cjs/tools/MeasureTileLoadTime.js.map +1 -1
  67. package/lib/cjs/tools/ModelAppearanceTools.d.ts +86 -86
  68. package/lib/cjs/tools/ModelAppearanceTools.js +183 -183
  69. package/lib/cjs/tools/ModelAppearanceTools.js.map +1 -1
  70. package/lib/cjs/tools/PlanProjectionTools.d.ts +40 -40
  71. package/lib/cjs/tools/PlanProjectionTools.js +149 -149
  72. package/lib/cjs/tools/PlanProjectionTools.js.map +1 -1
  73. package/lib/cjs/tools/PlanarMaskTools.d.ts +182 -182
  74. package/lib/cjs/tools/PlanarMaskTools.d.ts.map +1 -1
  75. package/lib/cjs/tools/PlanarMaskTools.js +393 -390
  76. package/lib/cjs/tools/PlanarMaskTools.js.map +1 -1
  77. package/lib/cjs/tools/ProjectExtents.d.ts +41 -41
  78. package/lib/cjs/tools/ProjectExtents.js +110 -110
  79. package/lib/cjs/tools/ProjectExtents.js.map +1 -1
  80. package/lib/cjs/tools/RealityModelTools.d.ts +116 -116
  81. package/lib/cjs/tools/RealityModelTools.js +281 -281
  82. package/lib/cjs/tools/RealityModelTools.js.map +1 -1
  83. package/lib/cjs/tools/RealityTransitionTool.d.ts +25 -25
  84. package/lib/cjs/tools/RealityTransitionTool.js +116 -116
  85. package/lib/cjs/tools/RealityTransitionTool.js.map +1 -1
  86. package/lib/cjs/tools/RenderSystemTools.d.ts +38 -38
  87. package/lib/cjs/tools/RenderSystemTools.js +70 -70
  88. package/lib/cjs/tools/RenderSystemTools.js.map +1 -1
  89. package/lib/cjs/tools/RenderTargetTools.d.ts +100 -100
  90. package/lib/cjs/tools/RenderTargetTools.js +166 -166
  91. package/lib/cjs/tools/RenderTargetTools.js.map +1 -1
  92. package/lib/cjs/tools/ReportWebGLCompatibilityTool.d.ts +11 -11
  93. package/lib/cjs/tools/ReportWebGLCompatibilityTool.js +30 -30
  94. package/lib/cjs/tools/ReportWebGLCompatibilityTool.js.map +1 -1
  95. package/lib/cjs/tools/SavedViews.d.ts +46 -46
  96. package/lib/cjs/tools/SavedViews.js +136 -136
  97. package/lib/cjs/tools/SavedViews.js.map +1 -1
  98. package/lib/cjs/tools/ScheduleScriptTools.d.ts +37 -37
  99. package/lib/cjs/tools/ScheduleScriptTools.js +159 -159
  100. package/lib/cjs/tools/ScheduleScriptTools.js.map +1 -1
  101. package/lib/cjs/tools/SelectionTools.d.ts +28 -28
  102. package/lib/cjs/tools/SelectionTools.d.ts.map +1 -1
  103. package/lib/cjs/tools/SelectionTools.js +87 -87
  104. package/lib/cjs/tools/SelectionTools.js.map +1 -1
  105. package/lib/cjs/tools/SetGpuMemoryLimitTool.d.ts +15 -15
  106. package/lib/cjs/tools/SetGpuMemoryLimitTool.js +33 -33
  107. package/lib/cjs/tools/SetGpuMemoryLimitTool.js.map +1 -1
  108. package/lib/cjs/tools/SourceAspectIdTools.d.ts +40 -40
  109. package/lib/cjs/tools/SourceAspectIdTools.js +86 -86
  110. package/lib/cjs/tools/SourceAspectIdTools.js.map +1 -1
  111. package/lib/cjs/tools/TileRequestDecoration.d.ts +12 -12
  112. package/lib/cjs/tools/TileRequestDecoration.js +83 -83
  113. package/lib/cjs/tools/TileRequestDecoration.js.map +1 -1
  114. package/lib/cjs/tools/TileTreeBoundsDecoration.d.ts +11 -11
  115. package/lib/cjs/tools/TileTreeBoundsDecoration.js +74 -74
  116. package/lib/cjs/tools/TileTreeBoundsDecoration.js.map +1 -1
  117. package/lib/cjs/tools/ToolTipProvider.d.ts +15 -15
  118. package/lib/cjs/tools/ToolTipProvider.js +66 -66
  119. package/lib/cjs/tools/ToolTipProvider.js.map +1 -1
  120. package/lib/cjs/tools/ViewportTools.d.ts +218 -218
  121. package/lib/cjs/tools/ViewportTools.js +516 -516
  122. package/lib/cjs/tools/ViewportTools.js.map +1 -1
  123. package/lib/cjs/tools/parseArgs.d.ts +23 -23
  124. package/lib/cjs/tools/parseArgs.js +51 -51
  125. package/lib/cjs/tools/parseArgs.js.map +1 -1
  126. package/lib/cjs/tools/parseBoolean.d.ts +8 -8
  127. package/lib/cjs/tools/parseBoolean.js +26 -26
  128. package/lib/cjs/tools/parseBoolean.js.map +1 -1
  129. package/lib/cjs/tools/parseToggle.d.ts +8 -8
  130. package/lib/cjs/tools/parseToggle.js +25 -25
  131. package/lib/cjs/tools/parseToggle.js.map +1 -1
  132. package/lib/cjs/ui/Button.d.ts +29 -29
  133. package/lib/cjs/ui/Button.d.ts.map +1 -1
  134. package/lib/cjs/ui/Button.js +26 -26
  135. package/lib/cjs/ui/Button.js.map +1 -1
  136. package/lib/cjs/ui/CheckBox.d.ts +23 -23
  137. package/lib/cjs/ui/CheckBox.js +27 -27
  138. package/lib/cjs/ui/CheckBox.js.map +1 -1
  139. package/lib/cjs/ui/ColorInput.d.ts +27 -27
  140. package/lib/cjs/ui/ColorInput.d.ts.map +1 -1
  141. package/lib/cjs/ui/ColorInput.js +53 -53
  142. package/lib/cjs/ui/ColorInput.js.map +1 -1
  143. package/lib/cjs/ui/ComboBox.d.ts +28 -28
  144. package/lib/cjs/ui/ComboBox.js +42 -42
  145. package/lib/cjs/ui/ComboBox.js.map +1 -1
  146. package/lib/cjs/ui/DataList.d.ts +27 -27
  147. package/lib/cjs/ui/DataList.js +39 -39
  148. package/lib/cjs/ui/DataList.js.map +1 -1
  149. package/lib/cjs/ui/NestedMenu.d.ts +19 -19
  150. package/lib/cjs/ui/NestedMenu.d.ts.map +1 -1
  151. package/lib/cjs/ui/NestedMenu.js +46 -46
  152. package/lib/cjs/ui/NestedMenu.js.map +1 -1
  153. package/lib/cjs/ui/NumericInput.d.ts +34 -34
  154. package/lib/cjs/ui/NumericInput.d.ts.map +1 -1
  155. package/lib/cjs/ui/NumericInput.js +59 -59
  156. package/lib/cjs/ui/NumericInput.js.map +1 -1
  157. package/lib/cjs/ui/RadioBox.d.ts +28 -28
  158. package/lib/cjs/ui/RadioBox.js +76 -76
  159. package/lib/cjs/ui/RadioBox.js.map +1 -1
  160. package/lib/cjs/ui/Slider.d.ts +24 -24
  161. package/lib/cjs/ui/Slider.js +32 -32
  162. package/lib/cjs/ui/Slider.js.map +1 -1
  163. package/lib/cjs/ui/TextBox.d.ts +32 -32
  164. package/lib/cjs/ui/TextBox.js +56 -56
  165. package/lib/cjs/ui/TextBox.js.map +1 -1
  166. package/lib/cjs/widgets/DiagnosticsPanel.d.ts +37 -37
  167. package/lib/cjs/widgets/DiagnosticsPanel.js +81 -81
  168. package/lib/cjs/widgets/DiagnosticsPanel.js.map +1 -1
  169. package/lib/cjs/widgets/FpsTracker.d.ts +19 -19
  170. package/lib/cjs/widgets/FpsTracker.js +56 -56
  171. package/lib/cjs/widgets/FpsTracker.js.map +1 -1
  172. package/lib/cjs/widgets/GpuProfiler.d.ts +16 -16
  173. package/lib/cjs/widgets/GpuProfiler.js +192 -192
  174. package/lib/cjs/widgets/GpuProfiler.js.map +1 -1
  175. package/lib/cjs/widgets/KeyinField.d.ts +61 -61
  176. package/lib/cjs/widgets/KeyinField.js +187 -187
  177. package/lib/cjs/widgets/KeyinField.js.map +1 -1
  178. package/lib/cjs/widgets/MemoryTracker.d.ts +27 -27
  179. package/lib/cjs/widgets/MemoryTracker.js +243 -243
  180. package/lib/cjs/widgets/MemoryTracker.js.map +1 -1
  181. package/lib/cjs/widgets/RenderCommandBreakdown.d.ts +15 -15
  182. package/lib/cjs/widgets/RenderCommandBreakdown.js +68 -68
  183. package/lib/cjs/widgets/RenderCommandBreakdown.js.map +1 -1
  184. package/lib/cjs/widgets/TileMemoryBreakdown.d.ts +30 -30
  185. package/lib/cjs/widgets/TileMemoryBreakdown.js +204 -204
  186. package/lib/cjs/widgets/TileMemoryBreakdown.js.map +1 -1
  187. package/lib/cjs/widgets/TileStatisticsTracker.d.ts +21 -21
  188. package/lib/cjs/widgets/TileStatisticsTracker.js +142 -142
  189. package/lib/cjs/widgets/TileStatisticsTracker.js.map +1 -1
  190. package/lib/cjs/widgets/ToolSettingsTracker.d.ts +9 -9
  191. package/lib/cjs/widgets/ToolSettingsTracker.d.ts.map +1 -1
  192. package/lib/cjs/widgets/ToolSettingsTracker.js +211 -181
  193. package/lib/cjs/widgets/ToolSettingsTracker.js.map +1 -1
  194. package/lib/esm/ClipboardUtilities.d.ts +8 -8
  195. package/lib/esm/ClipboardUtilities.js +22 -22
  196. package/lib/esm/ClipboardUtilities.js.map +1 -1
  197. package/lib/esm/FrontEndDevTools.d.ts +19 -19
  198. package/lib/esm/FrontEndDevTools.js +215 -215
  199. package/lib/esm/FrontEndDevTools.js.map +1 -1
  200. package/lib/esm/effects/Convolution.d.ts +68 -68
  201. package/lib/esm/effects/Convolution.js +155 -155
  202. package/lib/esm/effects/Convolution.js.map +1 -1
  203. package/lib/esm/effects/EffectTools.d.ts +33 -33
  204. package/lib/esm/effects/EffectTools.js +62 -62
  205. package/lib/esm/effects/EffectTools.js.map +1 -1
  206. package/lib/esm/effects/Explosion.d.ts +12 -12
  207. package/lib/esm/effects/Explosion.js +164 -164
  208. package/lib/esm/effects/Explosion.js.map +1 -1
  209. package/lib/esm/effects/FlipImage.d.ts +30 -30
  210. package/lib/esm/effects/FlipImage.js +94 -94
  211. package/lib/esm/effects/FlipImage.js.map +1 -1
  212. package/lib/esm/effects/LensDistortion.d.ts +34 -34
  213. package/lib/esm/effects/LensDistortion.js +104 -104
  214. package/lib/esm/effects/LensDistortion.js.map +1 -1
  215. package/lib/esm/effects/Random.d.ts +24 -24
  216. package/lib/esm/effects/Random.js +41 -41
  217. package/lib/esm/effects/Random.js.map +1 -1
  218. package/lib/esm/effects/Saturation.d.ts +30 -30
  219. package/lib/esm/effects/Saturation.js +80 -80
  220. package/lib/esm/effects/Saturation.js.map +1 -1
  221. package/lib/esm/effects/Snow.d.ts +76 -76
  222. package/lib/esm/effects/Snow.js +182 -182
  223. package/lib/esm/effects/Snow.js.map +1 -1
  224. package/lib/esm/effects/Vignette.d.ts +39 -39
  225. package/lib/esm/effects/Vignette.js +103 -103
  226. package/lib/esm/effects/Vignette.js.map +1 -1
  227. package/lib/esm/frontend-devtools.d.ts +82 -82
  228. package/lib/esm/frontend-devtools.js +86 -86
  229. package/lib/esm/frontend-devtools.js.map +1 -1
  230. package/lib/esm/tools/AnimationIntervalTool.d.ts +15 -15
  231. package/lib/esm/tools/AnimationIntervalTool.js +26 -26
  232. package/lib/esm/tools/AnimationIntervalTool.js.map +1 -1
  233. package/lib/esm/tools/ChangeUnitsTool.d.ts +15 -15
  234. package/lib/esm/tools/ChangeUnitsTool.js +37 -37
  235. package/lib/esm/tools/ChangeUnitsTool.js.map +1 -1
  236. package/lib/esm/tools/ClipTools.d.ts +67 -67
  237. package/lib/esm/tools/ClipTools.js +158 -158
  238. package/lib/esm/tools/ClipTools.js.map +1 -1
  239. package/lib/esm/tools/DisplayStyleTools.d.ts +145 -145
  240. package/lib/esm/tools/DisplayStyleTools.js +356 -356
  241. package/lib/esm/tools/DisplayStyleTools.js.map +1 -1
  242. package/lib/esm/tools/EmphasizeElementsTool.d.ts +60 -60
  243. package/lib/esm/tools/EmphasizeElementsTool.js +145 -145
  244. package/lib/esm/tools/EmphasizeElementsTool.js.map +1 -1
  245. package/lib/esm/tools/FrustumDecoration.d.ts +57 -57
  246. package/lib/esm/tools/FrustumDecoration.d.ts.map +1 -1
  247. package/lib/esm/tools/FrustumDecoration.js +367 -364
  248. package/lib/esm/tools/FrustumDecoration.js.map +1 -1
  249. package/lib/esm/tools/InspectElementTool.d.ts +42 -42
  250. package/lib/esm/tools/InspectElementTool.js +194 -194
  251. package/lib/esm/tools/InspectElementTool.js.map +1 -1
  252. package/lib/esm/tools/MapLayerTool.d.ts +257 -257
  253. package/lib/esm/tools/MapLayerTool.js +478 -478
  254. package/lib/esm/tools/MapLayerTool.js.map +1 -1
  255. package/lib/esm/tools/MeasureTileLoadTime.d.ts +12 -12
  256. package/lib/esm/tools/MeasureTileLoadTime.d.ts.map +1 -1
  257. package/lib/esm/tools/MeasureTileLoadTime.js +59 -56
  258. package/lib/esm/tools/MeasureTileLoadTime.js.map +1 -1
  259. package/lib/esm/tools/ModelAppearanceTools.d.ts +86 -86
  260. package/lib/esm/tools/ModelAppearanceTools.js +172 -172
  261. package/lib/esm/tools/ModelAppearanceTools.js.map +1 -1
  262. package/lib/esm/tools/PlanProjectionTools.d.ts +40 -40
  263. package/lib/esm/tools/PlanProjectionTools.js +143 -143
  264. package/lib/esm/tools/PlanProjectionTools.js.map +1 -1
  265. package/lib/esm/tools/PlanarMaskTools.d.ts +182 -182
  266. package/lib/esm/tools/PlanarMaskTools.d.ts.map +1 -1
  267. package/lib/esm/tools/PlanarMaskTools.js +377 -374
  268. package/lib/esm/tools/PlanarMaskTools.js.map +1 -1
  269. package/lib/esm/tools/ProjectExtents.d.ts +41 -41
  270. package/lib/esm/tools/ProjectExtents.js +104 -104
  271. package/lib/esm/tools/ProjectExtents.js.map +1 -1
  272. package/lib/esm/tools/RealityModelTools.d.ts +116 -116
  273. package/lib/esm/tools/RealityModelTools.js +268 -268
  274. package/lib/esm/tools/RealityModelTools.js.map +1 -1
  275. package/lib/esm/tools/RealityTransitionTool.d.ts +25 -25
  276. package/lib/esm/tools/RealityTransitionTool.js +112 -112
  277. package/lib/esm/tools/RealityTransitionTool.js.map +1 -1
  278. package/lib/esm/tools/RenderSystemTools.d.ts +38 -38
  279. package/lib/esm/tools/RenderSystemTools.js +63 -63
  280. package/lib/esm/tools/RenderSystemTools.js.map +1 -1
  281. package/lib/esm/tools/RenderTargetTools.d.ts +100 -100
  282. package/lib/esm/tools/RenderTargetTools.js +152 -152
  283. package/lib/esm/tools/RenderTargetTools.js.map +1 -1
  284. package/lib/esm/tools/ReportWebGLCompatibilityTool.d.ts +11 -11
  285. package/lib/esm/tools/ReportWebGLCompatibilityTool.js +26 -26
  286. package/lib/esm/tools/ReportWebGLCompatibilityTool.js.map +1 -1
  287. package/lib/esm/tools/SavedViews.d.ts +46 -46
  288. package/lib/esm/tools/SavedViews.js +128 -128
  289. package/lib/esm/tools/SavedViews.js.map +1 -1
  290. package/lib/esm/tools/ScheduleScriptTools.d.ts +37 -37
  291. package/lib/esm/tools/ScheduleScriptTools.js +153 -153
  292. package/lib/esm/tools/ScheduleScriptTools.js.map +1 -1
  293. package/lib/esm/tools/SelectionTools.d.ts +28 -28
  294. package/lib/esm/tools/SelectionTools.d.ts.map +1 -1
  295. package/lib/esm/tools/SelectionTools.js +82 -82
  296. package/lib/esm/tools/SelectionTools.js.map +1 -1
  297. package/lib/esm/tools/SetGpuMemoryLimitTool.d.ts +15 -15
  298. package/lib/esm/tools/SetGpuMemoryLimitTool.js +29 -29
  299. package/lib/esm/tools/SetGpuMemoryLimitTool.js.map +1 -1
  300. package/lib/esm/tools/SourceAspectIdTools.d.ts +40 -40
  301. package/lib/esm/tools/SourceAspectIdTools.js +80 -80
  302. package/lib/esm/tools/SourceAspectIdTools.js.map +1 -1
  303. package/lib/esm/tools/TileRequestDecoration.d.ts +12 -12
  304. package/lib/esm/tools/TileRequestDecoration.js +79 -79
  305. package/lib/esm/tools/TileRequestDecoration.js.map +1 -1
  306. package/lib/esm/tools/TileTreeBoundsDecoration.d.ts +11 -11
  307. package/lib/esm/tools/TileTreeBoundsDecoration.js +70 -70
  308. package/lib/esm/tools/TileTreeBoundsDecoration.js.map +1 -1
  309. package/lib/esm/tools/ToolTipProvider.d.ts +15 -15
  310. package/lib/esm/tools/ToolTipProvider.js +62 -62
  311. package/lib/esm/tools/ToolTipProvider.js.map +1 -1
  312. package/lib/esm/tools/ViewportTools.d.ts +218 -218
  313. package/lib/esm/tools/ViewportTools.js +492 -492
  314. package/lib/esm/tools/ViewportTools.js.map +1 -1
  315. package/lib/esm/tools/parseArgs.d.ts +23 -23
  316. package/lib/esm/tools/parseArgs.js +47 -47
  317. package/lib/esm/tools/parseArgs.js.map +1 -1
  318. package/lib/esm/tools/parseBoolean.d.ts +8 -8
  319. package/lib/esm/tools/parseBoolean.js +22 -22
  320. package/lib/esm/tools/parseBoolean.js.map +1 -1
  321. package/lib/esm/tools/parseToggle.d.ts +8 -8
  322. package/lib/esm/tools/parseToggle.js +21 -21
  323. package/lib/esm/tools/parseToggle.js.map +1 -1
  324. package/lib/esm/ui/Button.d.ts +29 -29
  325. package/lib/esm/ui/Button.d.ts.map +1 -1
  326. package/lib/esm/ui/Button.js +22 -22
  327. package/lib/esm/ui/Button.js.map +1 -1
  328. package/lib/esm/ui/CheckBox.d.ts +23 -23
  329. package/lib/esm/ui/CheckBox.js +23 -23
  330. package/lib/esm/ui/CheckBox.js.map +1 -1
  331. package/lib/esm/ui/ColorInput.d.ts +27 -27
  332. package/lib/esm/ui/ColorInput.d.ts.map +1 -1
  333. package/lib/esm/ui/ColorInput.js +48 -48
  334. package/lib/esm/ui/ColorInput.js.map +1 -1
  335. package/lib/esm/ui/ComboBox.d.ts +28 -28
  336. package/lib/esm/ui/ComboBox.js +38 -38
  337. package/lib/esm/ui/ComboBox.js.map +1 -1
  338. package/lib/esm/ui/DataList.d.ts +27 -27
  339. package/lib/esm/ui/DataList.js +34 -34
  340. package/lib/esm/ui/DataList.js.map +1 -1
  341. package/lib/esm/ui/NestedMenu.d.ts +19 -19
  342. package/lib/esm/ui/NestedMenu.d.ts.map +1 -1
  343. package/lib/esm/ui/NestedMenu.js +42 -42
  344. package/lib/esm/ui/NestedMenu.js.map +1 -1
  345. package/lib/esm/ui/NumericInput.d.ts +34 -34
  346. package/lib/esm/ui/NumericInput.d.ts.map +1 -1
  347. package/lib/esm/ui/NumericInput.js +54 -54
  348. package/lib/esm/ui/NumericInput.js.map +1 -1
  349. package/lib/esm/ui/RadioBox.d.ts +28 -28
  350. package/lib/esm/ui/RadioBox.js +72 -72
  351. package/lib/esm/ui/RadioBox.js.map +1 -1
  352. package/lib/esm/ui/Slider.d.ts +24 -24
  353. package/lib/esm/ui/Slider.js +28 -28
  354. package/lib/esm/ui/Slider.js.map +1 -1
  355. package/lib/esm/ui/TextBox.d.ts +32 -32
  356. package/lib/esm/ui/TextBox.js +52 -52
  357. package/lib/esm/ui/TextBox.js.map +1 -1
  358. package/lib/esm/widgets/DiagnosticsPanel.d.ts +37 -37
  359. package/lib/esm/widgets/DiagnosticsPanel.js +77 -77
  360. package/lib/esm/widgets/DiagnosticsPanel.js.map +1 -1
  361. package/lib/esm/widgets/FpsTracker.d.ts +19 -19
  362. package/lib/esm/widgets/FpsTracker.js +52 -52
  363. package/lib/esm/widgets/FpsTracker.js.map +1 -1
  364. package/lib/esm/widgets/GpuProfiler.d.ts +16 -16
  365. package/lib/esm/widgets/GpuProfiler.js +188 -188
  366. package/lib/esm/widgets/GpuProfiler.js.map +1 -1
  367. package/lib/esm/widgets/KeyinField.d.ts +61 -61
  368. package/lib/esm/widgets/KeyinField.js +183 -183
  369. package/lib/esm/widgets/KeyinField.js.map +1 -1
  370. package/lib/esm/widgets/MemoryTracker.d.ts +27 -27
  371. package/lib/esm/widgets/MemoryTracker.js +238 -238
  372. package/lib/esm/widgets/MemoryTracker.js.map +1 -1
  373. package/lib/esm/widgets/RenderCommandBreakdown.d.ts +15 -15
  374. package/lib/esm/widgets/RenderCommandBreakdown.js +64 -64
  375. package/lib/esm/widgets/RenderCommandBreakdown.js.map +1 -1
  376. package/lib/esm/widgets/TileMemoryBreakdown.d.ts +30 -30
  377. package/lib/esm/widgets/TileMemoryBreakdown.js +200 -200
  378. package/lib/esm/widgets/TileMemoryBreakdown.js.map +1 -1
  379. package/lib/esm/widgets/TileStatisticsTracker.d.ts +21 -21
  380. package/lib/esm/widgets/TileStatisticsTracker.js +138 -138
  381. package/lib/esm/widgets/TileStatisticsTracker.js.map +1 -1
  382. package/lib/esm/widgets/ToolSettingsTracker.d.ts +9 -9
  383. package/lib/esm/widgets/ToolSettingsTracker.d.ts.map +1 -1
  384. package/lib/esm/widgets/ToolSettingsTracker.js +207 -177
  385. package/lib/esm/widgets/ToolSettingsTracker.js.map +1 -1
  386. package/lib/public/locales/en/FrontendDevTools.json +479 -479
  387. package/package.json +8 -8
@@ -1,357 +1,357 @@
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 { ColorDef, RenderMode, SkyCube, SkySphere, SubCategoryOverride, ViewFlags, WhiteOnWhiteReversalSettings, } from "@itwin/core-common";
9
- import { IModelApp, NotifyMessageDetails, OutputMessagePriority, Tool, } from "@itwin/core-frontend";
10
- import { copyStringToClipboard } from "../ClipboardUtilities";
11
- import { parseArgs } from "./parseArgs";
12
- import { parseToggle } from "./parseToggle";
13
- // Compiler has the info to construct this array for us, but we have no access to it...
14
- const booleanFlagNames = [
15
- "dimensions", "patterns", "weights", "styles", "transparency", "fill", "textures", "materials", "acsTriad", "grid", "visibleEdges",
16
- "hiddenEdges", "lighting", "shadows", "clipVolume", "constructions", "monochrome", "backgroundMap", "ambientOcclusion", "forceSurfaceDiscard",
17
- "wiremesh",
18
- ];
19
- const lowercaseBooleanFlagNames = booleanFlagNames.map((name) => name.toLowerCase());
20
- /** Modifies the selected viewport's DisplayStyleState.
21
- * @beta
22
- */
23
- export class DisplayStyleTool extends Tool {
24
- get require3d() { return false; }
25
- async run() {
26
- const vp = IModelApp.viewManager.selectedView;
27
- if (undefined !== vp && (!this.require3d || vp.view.is3d()) && await this.execute(vp))
28
- vp.displayStyle = vp.view.displayStyle;
29
- return true;
30
- }
31
- async parseAndRun(...args) {
32
- const vp = IModelApp.viewManager.selectedView;
33
- if (undefined !== vp && (!this.require3d || vp.view.is3d()) && await this.parse(args, vp))
34
- return this.run();
35
- else
36
- return false;
37
- }
38
- }
39
- /** Modifies the selected viewport's ViewFlags.
40
- * The keyin syntax is as follows:
41
- * fdt change viewflags flag=value
42
- * Where 'flag' is one of the BooleanFlagName values, or "renderMode"; and value is an integer.
43
- * For boolean flags, value is 0 for false or 1 for true. For renderMode, value is one of the RenderMode enum values.
44
- * Flag names are case-insensitive.
45
- * @beta
46
- */
47
- export class ChangeViewFlagsTool extends Tool {
48
- static get maxArgs() { return undefined; }
49
- static get minArgs() { return 1; }
50
- async run(vf, vp) {
51
- if (undefined !== vf && undefined !== vp)
52
- vp.viewFlags = vf;
53
- return true;
54
- }
55
- async parseAndRun(...args) {
56
- const vp = IModelApp.viewManager.selectedView;
57
- if (undefined === vp || 0 === args.length)
58
- return true;
59
- const vf = { ...vp.viewFlags };
60
- for (const arg of args) {
61
- const parts = arg.split("=");
62
- if (2 !== parts.length)
63
- continue;
64
- const value = parseInt(parts[1], 10);
65
- if (Number.isNaN(value))
66
- continue;
67
- const name = parts[0].toLowerCase();
68
- if (name === "rendermode") {
69
- switch (value) {
70
- case RenderMode.SmoothShade:
71
- case RenderMode.Wireframe:
72
- case RenderMode.HiddenLine:
73
- case RenderMode.SolidFill:
74
- vf.renderMode = value;
75
- vp.invalidateRenderPlan();
76
- break;
77
- }
78
- continue;
79
- }
80
- if (0 !== value && 1 !== value)
81
- continue;
82
- const index = lowercaseBooleanFlagNames.indexOf(name);
83
- if (-1 !== index) {
84
- const propName = booleanFlagNames[index];
85
- vf[propName] = 0 !== value;
86
- vp.invalidateRenderPlan();
87
- }
88
- }
89
- return this.run(new ViewFlags(vf), vp);
90
- }
91
- }
92
- ChangeViewFlagsTool.toolId = "ChangeViewFlags";
93
- /** Toggles the skybox.
94
- * @beta
95
- */
96
- export class ToggleSkyboxTool extends DisplayStyleTool {
97
- get require3d() { return true; }
98
- async parse(_args) { return true; } // no arguments
99
- async execute(vp) {
100
- const style = vp.view.displayStyle;
101
- style.environment = style.environment.withDisplay({ sky: !style.environment.displaySky });
102
- return true;
103
- }
104
- }
105
- ToggleSkyboxTool.toolId = "ToggleSkybox";
106
- /** Defines a [SkySphere]($common) to apply to the current view.
107
- * @beta
108
- */
109
- export class SkySphereTool extends DisplayStyleTool {
110
- static get minArgs() { return 1; }
111
- static get maxArgs() { return 1; }
112
- get require3d() { return true; }
113
- async parse(args) {
114
- this._image = args[0];
115
- return true;
116
- }
117
- async execute(vp) {
118
- if (this._image && vp.view.is3d()) {
119
- vp.view.displayStyle.environment = vp.view.displayStyle.environment.clone({
120
- displaySky: true,
121
- sky: new SkySphere(this._image),
122
- });
123
- }
124
- return true;
125
- }
126
- }
127
- SkySphereTool.toolId = "SetSkySphere";
128
- /** Defines a [SkyCube]($common) to apply to the current view.
129
- * @beta
130
- */
131
- export class SkyCubeTool extends DisplayStyleTool {
132
- constructor() {
133
- super(...arguments);
134
- this._images = [];
135
- }
136
- static get minArgs() { return 1; }
137
- static get maxArgs() { return 6; }
138
- get require3d() { return true; }
139
- async parse(args) {
140
- this._images = [...args];
141
- return true;
142
- }
143
- async execute(vp) {
144
- const imgs = this._images;
145
- if (imgs.length === 0 || !vp.view.is3d())
146
- return true;
147
- let top, bottom, left, right, front, back;
148
- switch (imgs.length) {
149
- case 1:
150
- top = bottom = left = right = front = back = imgs[0];
151
- break;
152
- case 2:
153
- top = bottom = imgs[0];
154
- left = right = front = back = imgs[1];
155
- break;
156
- case 3:
157
- top = bottom = imgs[0];
158
- left = right = imgs[1];
159
- front = back = imgs[2];
160
- break;
161
- case 4:
162
- top = imgs[0];
163
- bottom = imgs[1];
164
- left = right = imgs[2];
165
- front = back = imgs[3];
166
- break;
167
- case 5:
168
- top = bottom = imgs[0];
169
- left = imgs[1];
170
- right = imgs[2];
171
- front = imgs[3];
172
- back = imgs[4];
173
- break;
174
- default:
175
- top = imgs[0];
176
- bottom = imgs[1];
177
- left = imgs[2];
178
- right = imgs[3];
179
- front = imgs[4];
180
- back = imgs[5];
181
- break;
182
- }
183
- vp.view.displayStyle.environment = vp.view.displayStyle.environment.clone({
184
- displaySky: true,
185
- sky: new SkyCube({ top, bottom, left, right, front, back }),
186
- });
187
- return true;
188
- }
189
- }
190
- SkyCubeTool.toolId = "SetSkyCube";
191
- /** Outputs (and optionally copies to the clipboard) a "rendering style" as a partial DisplayStyle3dSettingsProps JSON object based
192
- * on the current view's display style settings.
193
- * All arguments are optional, of the form "name=value" where `value` is 0 for false or 1 for true. All arguments default to `false` if omitted.
194
- * @see [DisplayStyleSettings.toOverrides]($common) for details.
195
- * Arguments:
196
- * * `all`: include all settings.
197
- * * `imodel`: include iModel-specific settings.
198
- * * `project`: include iTwin-specific (formerly known as project) settings.
199
- * * `map`: include background map settings.
200
- * * `drawingaids`: include drawing aid decoration settings.
201
- * * `copy`: copy result to system clipboard.
202
- * * `quote`: format the JSON so it can be parsed directly by [ApplyRenderingStyleTool].
203
- * @beta
204
- */
205
- export class SaveRenderingStyleTool extends DisplayStyleTool {
206
- constructor() {
207
- super(...arguments);
208
- this._options = {};
209
- this._copyToClipboard = false;
210
- this._quote = false;
211
- }
212
- static get minArgs() { return 0; }
213
- static get maxArgs() { return 7; }
214
- async parse(inputArgs) {
215
- const args = parseArgs(inputArgs);
216
- function getArg(name) {
217
- return args.getBoolean(name) ? true : undefined;
218
- }
219
- this._options.includeAll = getArg("a");
220
- this._options.includeIModelSpecific = getArg("i");
221
- this._options.includeITwinSpecific = getArg("p"); // "p" for backwards compatibility with old "project" terminology
222
- this._options.includeBackgroundMap = getArg("m");
223
- this._options.includeDrawingAids = getArg("d");
224
- this._copyToClipboard = true === getArg("c");
225
- this._quote = true === getArg("q");
226
- return true;
227
- }
228
- async execute(vp) {
229
- let json = JSON.stringify(vp.displayStyle.settings.toOverrides(this._options));
230
- if (this._quote)
231
- json = `"${json.replace(/"/g, '""')}"`;
232
- IModelApp.notifications.outputMessage(new NotifyMessageDetails(OutputMessagePriority.Info, "Rendering style saved", json));
233
- if (this._copyToClipboard)
234
- copyStringToClipboard(json);
235
- return false;
236
- }
237
- }
238
- SaveRenderingStyleTool.toolId = "SaveRenderingStyle";
239
- /** Given a "rendering style" as a partial DisplayStyle3dSettingsProperties JSON string, apply it to the selected viewport's display style.
240
- * @see [DisplayStyleSettings.applyOverrides]($common) for details.
241
- * @beta
242
- */
243
- export class ApplyRenderingStyleTool extends DisplayStyleTool {
244
- static get minArgs() { return 1; }
245
- static get maxArgs() { return 1; }
246
- async parse(args) {
247
- try {
248
- this._overrides = JSON.parse(args[0]);
249
- return true;
250
- }
251
- catch {
252
- IModelApp.notifications.outputMessage(new NotifyMessageDetails(OutputMessagePriority.Error, "Invalid JSON"));
253
- return false;
254
- }
255
- }
256
- async execute(vp) {
257
- if (this._overrides)
258
- vp.overrideDisplayStyle(this._overrides);
259
- return false;
260
- }
261
- }
262
- ApplyRenderingStyleTool.toolId = "ApplyRenderingStyle";
263
- /** Apply appearance overrides to one or more subcategories in the active viewport.
264
- * @beta
265
- */
266
- export class OverrideSubCategoryTool extends DisplayStyleTool {
267
- constructor() {
268
- super(...arguments);
269
- this._overrideProps = {};
270
- this._subcategoryIds = [];
271
- }
272
- static get minArgs() { return 1; }
273
- static get maxArgs() { return 7; }
274
- async parse(inArgs) {
275
- const args = parseArgs(inArgs);
276
- const ids = args.get("i");
277
- if (ids)
278
- this._subcategoryIds = ids.split(",");
279
- const props = this._overrideProps;
280
- props.color = args.getInteger("c");
281
- props.weight = args.getInteger("w");
282
- props.priority = args.getInteger("p");
283
- props.transp = args.getFloat("t");
284
- props.material = args.get("m");
285
- const visible = args.getBoolean("v");
286
- props.invisible = typeof visible === "boolean" ? !visible : undefined;
287
- return true;
288
- }
289
- async execute(vp) {
290
- const ovr = SubCategoryOverride.fromJSON(this._overrideProps);
291
- for (const id of this._subcategoryIds)
292
- vp.displayStyle.overrideSubCategory(id, ovr);
293
- return true;
294
- }
295
- }
296
- OverrideSubCategoryTool.toolId = "OverrideSubCategory";
297
- /** Set whether background color is ignored when applying white-on-white reversal.
298
- * @beta
299
- */
300
- export class WoWIgnoreBackgroundTool extends DisplayStyleTool {
301
- static get minArgs() { return 0; }
302
- static get maxArgs() { return 1; }
303
- async parse(args) {
304
- const ignore = parseToggle(args[0]);
305
- if (typeof ignore === "string")
306
- return false;
307
- this._ignore = ignore;
308
- return true;
309
- }
310
- async execute(vp) {
311
- var _a;
312
- const ignoreBackgroundColor = (_a = this._ignore) !== null && _a !== void 0 ? _a : !vp.displayStyle.settings.whiteOnWhiteReversal.ignoreBackgroundColor;
313
- vp.displayStyle.settings.whiteOnWhiteReversal = WhiteOnWhiteReversalSettings.fromJSON({ ignoreBackgroundColor });
314
- return true;
315
- }
316
- }
317
- WoWIgnoreBackgroundTool.toolId = "WoWIgnoreBackground";
318
- /** Toggle whether surfaces display with overlaid wiremesh in the active viewport.
319
- * @see [ViewFlags.wiremesh]($common).
320
- * @beta
321
- */
322
- export class ToggleWiremeshTool extends DisplayStyleTool {
323
- static get minArgs() { return 0; }
324
- static get maxArgs() { return 1; }
325
- async parse(args) {
326
- const enable = parseToggle(args[0]);
327
- if (typeof enable === "string")
328
- return false;
329
- this._enable = enable;
330
- return true;
331
- }
332
- async execute(vp) {
333
- var _a;
334
- vp.viewFlags = vp.viewFlags.with("wiremesh", (_a = this._enable) !== null && _a !== void 0 ? _a : !vp.viewFlags.wiremesh);
335
- return true;
336
- }
337
- }
338
- ToggleWiremeshTool.toolId = "ToggleWiremesh";
339
- /** Change the background color of the active viewport and optionally its transparency.
340
- * @beta
341
- */
342
- export class ChangeBackgroundColorTool extends DisplayStyleTool {
343
- static get minArgs() { return 1; }
344
- static get maxArgs() { return 1; }
345
- async parse(args) {
346
- this._color = ColorDef.fromString(args[0]);
347
- return true;
348
- }
349
- async execute(vp) {
350
- if (!this._color)
351
- return false;
352
- vp.displayStyle.backgroundColor = this._color;
353
- return true;
354
- }
355
- }
356
- ChangeBackgroundColorTool.toolId = "ChangeBackgroundColor";
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 { ColorDef, RenderMode, SkyCube, SkySphere, SubCategoryOverride, ViewFlags, WhiteOnWhiteReversalSettings, } from "@itwin/core-common";
9
+ import { IModelApp, NotifyMessageDetails, OutputMessagePriority, Tool, } from "@itwin/core-frontend";
10
+ import { copyStringToClipboard } from "../ClipboardUtilities";
11
+ import { parseArgs } from "./parseArgs";
12
+ import { parseToggle } from "./parseToggle";
13
+ // Compiler has the info to construct this array for us, but we have no access to it...
14
+ const booleanFlagNames = [
15
+ "dimensions", "patterns", "weights", "styles", "transparency", "fill", "textures", "materials", "acsTriad", "grid", "visibleEdges",
16
+ "hiddenEdges", "lighting", "shadows", "clipVolume", "constructions", "monochrome", "backgroundMap", "ambientOcclusion", "forceSurfaceDiscard",
17
+ "wiremesh",
18
+ ];
19
+ const lowercaseBooleanFlagNames = booleanFlagNames.map((name) => name.toLowerCase());
20
+ /** Modifies the selected viewport's DisplayStyleState.
21
+ * @beta
22
+ */
23
+ export class DisplayStyleTool extends Tool {
24
+ get require3d() { return false; }
25
+ async run() {
26
+ const vp = IModelApp.viewManager.selectedView;
27
+ if (undefined !== vp && (!this.require3d || vp.view.is3d()) && await this.execute(vp))
28
+ vp.displayStyle = vp.view.displayStyle;
29
+ return true;
30
+ }
31
+ async parseAndRun(...args) {
32
+ const vp = IModelApp.viewManager.selectedView;
33
+ if (undefined !== vp && (!this.require3d || vp.view.is3d()) && await this.parse(args, vp))
34
+ return this.run();
35
+ else
36
+ return false;
37
+ }
38
+ }
39
+ /** Modifies the selected viewport's ViewFlags.
40
+ * The keyin syntax is as follows:
41
+ * fdt change viewflags flag=value
42
+ * Where 'flag' is one of the BooleanFlagName values, or "renderMode"; and value is an integer.
43
+ * For boolean flags, value is 0 for false or 1 for true. For renderMode, value is one of the RenderMode enum values.
44
+ * Flag names are case-insensitive.
45
+ * @beta
46
+ */
47
+ export class ChangeViewFlagsTool extends Tool {
48
+ static get maxArgs() { return undefined; }
49
+ static get minArgs() { return 1; }
50
+ async run(vf, vp) {
51
+ if (undefined !== vf && undefined !== vp)
52
+ vp.viewFlags = vf;
53
+ return true;
54
+ }
55
+ async parseAndRun(...args) {
56
+ const vp = IModelApp.viewManager.selectedView;
57
+ if (undefined === vp || 0 === args.length)
58
+ return true;
59
+ const vf = { ...vp.viewFlags };
60
+ for (const arg of args) {
61
+ const parts = arg.split("=");
62
+ if (2 !== parts.length)
63
+ continue;
64
+ const value = parseInt(parts[1], 10);
65
+ if (Number.isNaN(value))
66
+ continue;
67
+ const name = parts[0].toLowerCase();
68
+ if (name === "rendermode") {
69
+ switch (value) {
70
+ case RenderMode.SmoothShade:
71
+ case RenderMode.Wireframe:
72
+ case RenderMode.HiddenLine:
73
+ case RenderMode.SolidFill:
74
+ vf.renderMode = value;
75
+ vp.invalidateRenderPlan();
76
+ break;
77
+ }
78
+ continue;
79
+ }
80
+ if (0 !== value && 1 !== value)
81
+ continue;
82
+ const index = lowercaseBooleanFlagNames.indexOf(name);
83
+ if (-1 !== index) {
84
+ const propName = booleanFlagNames[index];
85
+ vf[propName] = 0 !== value;
86
+ vp.invalidateRenderPlan();
87
+ }
88
+ }
89
+ return this.run(new ViewFlags(vf), vp);
90
+ }
91
+ }
92
+ ChangeViewFlagsTool.toolId = "ChangeViewFlags";
93
+ /** Toggles the skybox.
94
+ * @beta
95
+ */
96
+ export class ToggleSkyboxTool extends DisplayStyleTool {
97
+ get require3d() { return true; }
98
+ async parse(_args) { return true; } // no arguments
99
+ async execute(vp) {
100
+ const style = vp.view.displayStyle;
101
+ style.environment = style.environment.withDisplay({ sky: !style.environment.displaySky });
102
+ return true;
103
+ }
104
+ }
105
+ ToggleSkyboxTool.toolId = "ToggleSkybox";
106
+ /** Defines a [SkySphere]($common) to apply to the current view.
107
+ * @beta
108
+ */
109
+ export class SkySphereTool extends DisplayStyleTool {
110
+ static get minArgs() { return 1; }
111
+ static get maxArgs() { return 1; }
112
+ get require3d() { return true; }
113
+ async parse(args) {
114
+ this._image = args[0];
115
+ return true;
116
+ }
117
+ async execute(vp) {
118
+ if (this._image && vp.view.is3d()) {
119
+ vp.view.displayStyle.environment = vp.view.displayStyle.environment.clone({
120
+ displaySky: true,
121
+ sky: new SkySphere(this._image),
122
+ });
123
+ }
124
+ return true;
125
+ }
126
+ }
127
+ SkySphereTool.toolId = "SetSkySphere";
128
+ /** Defines a [SkyCube]($common) to apply to the current view.
129
+ * @beta
130
+ */
131
+ export class SkyCubeTool extends DisplayStyleTool {
132
+ constructor() {
133
+ super(...arguments);
134
+ this._images = [];
135
+ }
136
+ static get minArgs() { return 1; }
137
+ static get maxArgs() { return 6; }
138
+ get require3d() { return true; }
139
+ async parse(args) {
140
+ this._images = [...args];
141
+ return true;
142
+ }
143
+ async execute(vp) {
144
+ const imgs = this._images;
145
+ if (imgs.length === 0 || !vp.view.is3d())
146
+ return true;
147
+ let top, bottom, left, right, front, back;
148
+ switch (imgs.length) {
149
+ case 1:
150
+ top = bottom = left = right = front = back = imgs[0];
151
+ break;
152
+ case 2:
153
+ top = bottom = imgs[0];
154
+ left = right = front = back = imgs[1];
155
+ break;
156
+ case 3:
157
+ top = bottom = imgs[0];
158
+ left = right = imgs[1];
159
+ front = back = imgs[2];
160
+ break;
161
+ case 4:
162
+ top = imgs[0];
163
+ bottom = imgs[1];
164
+ left = right = imgs[2];
165
+ front = back = imgs[3];
166
+ break;
167
+ case 5:
168
+ top = bottom = imgs[0];
169
+ left = imgs[1];
170
+ right = imgs[2];
171
+ front = imgs[3];
172
+ back = imgs[4];
173
+ break;
174
+ default:
175
+ top = imgs[0];
176
+ bottom = imgs[1];
177
+ left = imgs[2];
178
+ right = imgs[3];
179
+ front = imgs[4];
180
+ back = imgs[5];
181
+ break;
182
+ }
183
+ vp.view.displayStyle.environment = vp.view.displayStyle.environment.clone({
184
+ displaySky: true,
185
+ sky: new SkyCube({ top, bottom, left, right, front, back }),
186
+ });
187
+ return true;
188
+ }
189
+ }
190
+ SkyCubeTool.toolId = "SetSkyCube";
191
+ /** Outputs (and optionally copies to the clipboard) a "rendering style" as a partial DisplayStyle3dSettingsProps JSON object based
192
+ * on the current view's display style settings.
193
+ * All arguments are optional, of the form "name=value" where `value` is 0 for false or 1 for true. All arguments default to `false` if omitted.
194
+ * @see [DisplayStyleSettings.toOverrides]($common) for details.
195
+ * Arguments:
196
+ * * `all`: include all settings.
197
+ * * `imodel`: include iModel-specific settings.
198
+ * * `project`: include iTwin-specific (formerly known as project) settings.
199
+ * * `map`: include background map settings.
200
+ * * `drawingaids`: include drawing aid decoration settings.
201
+ * * `copy`: copy result to system clipboard.
202
+ * * `quote`: format the JSON so it can be parsed directly by [ApplyRenderingStyleTool].
203
+ * @beta
204
+ */
205
+ export class SaveRenderingStyleTool extends DisplayStyleTool {
206
+ constructor() {
207
+ super(...arguments);
208
+ this._options = {};
209
+ this._copyToClipboard = false;
210
+ this._quote = false;
211
+ }
212
+ static get minArgs() { return 0; }
213
+ static get maxArgs() { return 7; }
214
+ async parse(inputArgs) {
215
+ const args = parseArgs(inputArgs);
216
+ function getArg(name) {
217
+ return args.getBoolean(name) ? true : undefined;
218
+ }
219
+ this._options.includeAll = getArg("a");
220
+ this._options.includeIModelSpecific = getArg("i");
221
+ this._options.includeITwinSpecific = getArg("p"); // "p" for backwards compatibility with old "project" terminology
222
+ this._options.includeBackgroundMap = getArg("m");
223
+ this._options.includeDrawingAids = getArg("d");
224
+ this._copyToClipboard = true === getArg("c");
225
+ this._quote = true === getArg("q");
226
+ return true;
227
+ }
228
+ async execute(vp) {
229
+ let json = JSON.stringify(vp.displayStyle.settings.toOverrides(this._options));
230
+ if (this._quote)
231
+ json = `"${json.replace(/"/g, '""')}"`;
232
+ IModelApp.notifications.outputMessage(new NotifyMessageDetails(OutputMessagePriority.Info, "Rendering style saved", json));
233
+ if (this._copyToClipboard)
234
+ copyStringToClipboard(json);
235
+ return false;
236
+ }
237
+ }
238
+ SaveRenderingStyleTool.toolId = "SaveRenderingStyle";
239
+ /** Given a "rendering style" as a partial DisplayStyle3dSettingsProperties JSON string, apply it to the selected viewport's display style.
240
+ * @see [DisplayStyleSettings.applyOverrides]($common) for details.
241
+ * @beta
242
+ */
243
+ export class ApplyRenderingStyleTool extends DisplayStyleTool {
244
+ static get minArgs() { return 1; }
245
+ static get maxArgs() { return 1; }
246
+ async parse(args) {
247
+ try {
248
+ this._overrides = JSON.parse(args[0]);
249
+ return true;
250
+ }
251
+ catch {
252
+ IModelApp.notifications.outputMessage(new NotifyMessageDetails(OutputMessagePriority.Error, "Invalid JSON"));
253
+ return false;
254
+ }
255
+ }
256
+ async execute(vp) {
257
+ if (this._overrides)
258
+ vp.overrideDisplayStyle(this._overrides);
259
+ return false;
260
+ }
261
+ }
262
+ ApplyRenderingStyleTool.toolId = "ApplyRenderingStyle";
263
+ /** Apply appearance overrides to one or more subcategories in the active viewport.
264
+ * @beta
265
+ */
266
+ export class OverrideSubCategoryTool extends DisplayStyleTool {
267
+ constructor() {
268
+ super(...arguments);
269
+ this._overrideProps = {};
270
+ this._subcategoryIds = [];
271
+ }
272
+ static get minArgs() { return 1; }
273
+ static get maxArgs() { return 7; }
274
+ async parse(inArgs) {
275
+ const args = parseArgs(inArgs);
276
+ const ids = args.get("i");
277
+ if (ids)
278
+ this._subcategoryIds = ids.split(",");
279
+ const props = this._overrideProps;
280
+ props.color = args.getInteger("c");
281
+ props.weight = args.getInteger("w");
282
+ props.priority = args.getInteger("p");
283
+ props.transp = args.getFloat("t");
284
+ props.material = args.get("m");
285
+ const visible = args.getBoolean("v");
286
+ props.invisible = typeof visible === "boolean" ? !visible : undefined;
287
+ return true;
288
+ }
289
+ async execute(vp) {
290
+ const ovr = SubCategoryOverride.fromJSON(this._overrideProps);
291
+ for (const id of this._subcategoryIds)
292
+ vp.displayStyle.overrideSubCategory(id, ovr);
293
+ return true;
294
+ }
295
+ }
296
+ OverrideSubCategoryTool.toolId = "OverrideSubCategory";
297
+ /** Set whether background color is ignored when applying white-on-white reversal.
298
+ * @beta
299
+ */
300
+ export class WoWIgnoreBackgroundTool extends DisplayStyleTool {
301
+ static get minArgs() { return 0; }
302
+ static get maxArgs() { return 1; }
303
+ async parse(args) {
304
+ const ignore = parseToggle(args[0]);
305
+ if (typeof ignore === "string")
306
+ return false;
307
+ this._ignore = ignore;
308
+ return true;
309
+ }
310
+ async execute(vp) {
311
+ var _a;
312
+ const ignoreBackgroundColor = (_a = this._ignore) !== null && _a !== void 0 ? _a : !vp.displayStyle.settings.whiteOnWhiteReversal.ignoreBackgroundColor;
313
+ vp.displayStyle.settings.whiteOnWhiteReversal = WhiteOnWhiteReversalSettings.fromJSON({ ignoreBackgroundColor });
314
+ return true;
315
+ }
316
+ }
317
+ WoWIgnoreBackgroundTool.toolId = "WoWIgnoreBackground";
318
+ /** Toggle whether surfaces display with overlaid wiremesh in the active viewport.
319
+ * @see [ViewFlags.wiremesh]($common).
320
+ * @beta
321
+ */
322
+ export class ToggleWiremeshTool extends DisplayStyleTool {
323
+ static get minArgs() { return 0; }
324
+ static get maxArgs() { return 1; }
325
+ async parse(args) {
326
+ const enable = parseToggle(args[0]);
327
+ if (typeof enable === "string")
328
+ return false;
329
+ this._enable = enable;
330
+ return true;
331
+ }
332
+ async execute(vp) {
333
+ var _a;
334
+ vp.viewFlags = vp.viewFlags.with("wiremesh", (_a = this._enable) !== null && _a !== void 0 ? _a : !vp.viewFlags.wiremesh);
335
+ return true;
336
+ }
337
+ }
338
+ ToggleWiremeshTool.toolId = "ToggleWiremesh";
339
+ /** Change the background color of the active viewport and optionally its transparency.
340
+ * @beta
341
+ */
342
+ export class ChangeBackgroundColorTool extends DisplayStyleTool {
343
+ static get minArgs() { return 1; }
344
+ static get maxArgs() { return 1; }
345
+ async parse(args) {
346
+ this._color = ColorDef.fromString(args[0]);
347
+ return true;
348
+ }
349
+ async execute(vp) {
350
+ if (!this._color)
351
+ return false;
352
+ vp.displayStyle.backgroundColor = this._color;
353
+ return true;
354
+ }
355
+ }
356
+ ChangeBackgroundColorTool.toolId = "ChangeBackgroundColor";
357
357
  //# sourceMappingURL=DisplayStyleTools.js.map