@itwin/frontend-devtools 5.0.0-dev.8 → 5.0.0-dev.83

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 (226) hide show
  1. package/CHANGELOG.md +46 -1
  2. package/lib/cjs/FrontEndDevTools.js +1 -1
  3. package/lib/cjs/FrontEndDevTools.js.map +1 -1
  4. package/lib/cjs/effects/Convolution.js +6 -6
  5. package/lib/cjs/effects/Convolution.js.map +1 -1
  6. package/lib/cjs/effects/EffectTools.js +2 -2
  7. package/lib/cjs/effects/EffectTools.js.map +1 -1
  8. package/lib/cjs/effects/Explosion.js +37 -25
  9. package/lib/cjs/effects/Explosion.js.map +1 -1
  10. package/lib/cjs/effects/FlipImage.js +2 -2
  11. package/lib/cjs/effects/FlipImage.js.map +1 -1
  12. package/lib/cjs/effects/LensDistortion.js +4 -4
  13. package/lib/cjs/effects/LensDistortion.js.map +1 -1
  14. package/lib/cjs/effects/Saturation.js +4 -4
  15. package/lib/cjs/effects/Saturation.js.map +1 -1
  16. package/lib/cjs/effects/Snow.d.ts +1 -1
  17. package/lib/cjs/effects/Snow.d.ts.map +1 -1
  18. package/lib/cjs/effects/Snow.js +19 -8
  19. package/lib/cjs/effects/Snow.js.map +1 -1
  20. package/lib/cjs/effects/Vignette.js +12 -12
  21. package/lib/cjs/effects/Vignette.js.map +1 -1
  22. package/lib/cjs/tools/AnimationIntervalTool.js +1 -1
  23. package/lib/cjs/tools/AnimationIntervalTool.js.map +1 -1
  24. package/lib/cjs/tools/ChangeUnitsTool.js +1 -1
  25. package/lib/cjs/tools/ChangeUnitsTool.js.map +1 -1
  26. package/lib/cjs/tools/ClipTools.js +6 -8
  27. package/lib/cjs/tools/ClipTools.js.map +1 -1
  28. package/lib/cjs/tools/DisplayStyleTools.js +21 -25
  29. package/lib/cjs/tools/DisplayStyleTools.js.map +1 -1
  30. package/lib/cjs/tools/EmphasizeElementsTool.js +7 -13
  31. package/lib/cjs/tools/EmphasizeElementsTool.js.map +1 -1
  32. package/lib/cjs/tools/FrustumDecoration.js +28 -9
  33. package/lib/cjs/tools/FrustumDecoration.js.map +1 -1
  34. package/lib/cjs/tools/InspectElementTool.js +7 -6
  35. package/lib/cjs/tools/InspectElementTool.js.map +1 -1
  36. package/lib/cjs/tools/MapLayerTool.js +24 -20
  37. package/lib/cjs/tools/MapLayerTool.js.map +1 -1
  38. package/lib/cjs/tools/MeasureTileLoadTime.js +4 -1
  39. package/lib/cjs/tools/MeasureTileLoadTime.js.map +1 -1
  40. package/lib/cjs/tools/ModelAppearanceTools.js +9 -9
  41. package/lib/cjs/tools/ModelAppearanceTools.js.map +1 -1
  42. package/lib/cjs/tools/PlanProjectionTools.js +8 -15
  43. package/lib/cjs/tools/PlanProjectionTools.js.map +1 -1
  44. package/lib/cjs/tools/PlanarMaskTools.js +21 -26
  45. package/lib/cjs/tools/PlanarMaskTools.js.map +1 -1
  46. package/lib/cjs/tools/ProjectExtents.js +6 -3
  47. package/lib/cjs/tools/ProjectExtents.js.map +1 -1
  48. package/lib/cjs/tools/RealityModelTools.js +10 -10
  49. package/lib/cjs/tools/RealityModelTools.js.map +1 -1
  50. package/lib/cjs/tools/RealityTransitionTool.js +1 -1
  51. package/lib/cjs/tools/RealityTransitionTool.js.map +1 -1
  52. package/lib/cjs/tools/RenderSystemTools.js +4 -3
  53. package/lib/cjs/tools/RenderSystemTools.js.map +1 -1
  54. package/lib/cjs/tools/RenderTargetTools.d.ts +1 -1
  55. package/lib/cjs/tools/RenderTargetTools.d.ts.map +1 -1
  56. package/lib/cjs/tools/RenderTargetTools.js +15 -20
  57. package/lib/cjs/tools/RenderTargetTools.js.map +1 -1
  58. package/lib/cjs/tools/ReportWebGLCompatibilityTool.js +1 -1
  59. package/lib/cjs/tools/ReportWebGLCompatibilityTool.js.map +1 -1
  60. package/lib/cjs/tools/SavedViews.js +4 -7
  61. package/lib/cjs/tools/SavedViews.js.map +1 -1
  62. package/lib/cjs/tools/ScheduleScriptTools.d.ts.map +1 -1
  63. package/lib/cjs/tools/ScheduleScriptTools.js +11 -12
  64. package/lib/cjs/tools/ScheduleScriptTools.js.map +1 -1
  65. package/lib/cjs/tools/SelectionTools.js +4 -6
  66. package/lib/cjs/tools/SelectionTools.js.map +1 -1
  67. package/lib/cjs/tools/SetGpuMemoryLimitTool.js +1 -1
  68. package/lib/cjs/tools/SetGpuMemoryLimitTool.js.map +1 -1
  69. package/lib/cjs/tools/SourceAspectIdTools.js +2 -2
  70. package/lib/cjs/tools/SourceAspectIdTools.js.map +1 -1
  71. package/lib/cjs/tools/TileRequestDecoration.js +6 -3
  72. package/lib/cjs/tools/TileRequestDecoration.js.map +1 -1
  73. package/lib/cjs/tools/TileTreeBoundsDecoration.d.ts.map +1 -1
  74. package/lib/cjs/tools/TileTreeBoundsDecoration.js +8 -4
  75. package/lib/cjs/tools/TileTreeBoundsDecoration.js.map +1 -1
  76. package/lib/cjs/tools/ToolTipProvider.js +2 -1
  77. package/lib/cjs/tools/ToolTipProvider.js.map +1 -1
  78. package/lib/cjs/tools/ViewportTools.js +22 -19
  79. package/lib/cjs/tools/ViewportTools.js.map +1 -1
  80. package/lib/cjs/widgets/DiagnosticsPanel.d.ts +1 -1
  81. package/lib/cjs/widgets/DiagnosticsPanel.d.ts.map +1 -1
  82. package/lib/cjs/widgets/DiagnosticsPanel.js +11 -1
  83. package/lib/cjs/widgets/DiagnosticsPanel.js.map +1 -1
  84. package/lib/cjs/widgets/FpsTracker.d.ts +1 -1
  85. package/lib/cjs/widgets/FpsTracker.d.ts.map +1 -1
  86. package/lib/cjs/widgets/FpsTracker.js +5 -1
  87. package/lib/cjs/widgets/FpsTracker.js.map +1 -1
  88. package/lib/cjs/widgets/GpuProfiler.d.ts +1 -1
  89. package/lib/cjs/widgets/GpuProfiler.d.ts.map +1 -1
  90. package/lib/cjs/widgets/GpuProfiler.js +89 -82
  91. package/lib/cjs/widgets/GpuProfiler.js.map +1 -1
  92. package/lib/cjs/widgets/KeyinField.js +8 -1
  93. package/lib/cjs/widgets/KeyinField.js.map +1 -1
  94. package/lib/cjs/widgets/MemoryTracker.d.ts +1 -1
  95. package/lib/cjs/widgets/MemoryTracker.d.ts.map +1 -1
  96. package/lib/cjs/widgets/MemoryTracker.js +16 -4
  97. package/lib/cjs/widgets/MemoryTracker.js.map +1 -1
  98. package/lib/cjs/widgets/RenderCommandBreakdown.d.ts +1 -1
  99. package/lib/cjs/widgets/RenderCommandBreakdown.d.ts.map +1 -1
  100. package/lib/cjs/widgets/RenderCommandBreakdown.js +6 -2
  101. package/lib/cjs/widgets/RenderCommandBreakdown.js.map +1 -1
  102. package/lib/cjs/widgets/TileMemoryBreakdown.d.ts +1 -1
  103. package/lib/cjs/widgets/TileMemoryBreakdown.d.ts.map +1 -1
  104. package/lib/cjs/widgets/TileMemoryBreakdown.js +10 -8
  105. package/lib/cjs/widgets/TileMemoryBreakdown.js.map +1 -1
  106. package/lib/cjs/widgets/TileStatisticsTracker.d.ts +1 -1
  107. package/lib/cjs/widgets/TileStatisticsTracker.d.ts.map +1 -1
  108. package/lib/cjs/widgets/TileStatisticsTracker.js +5 -2
  109. package/lib/cjs/widgets/TileStatisticsTracker.js.map +1 -1
  110. package/lib/cjs/widgets/ToolSettingsTracker.d.ts +1 -1
  111. package/lib/cjs/widgets/ToolSettingsTracker.d.ts.map +1 -1
  112. package/lib/cjs/widgets/ToolSettingsTracker.js +2 -2
  113. package/lib/cjs/widgets/ToolSettingsTracker.js.map +1 -1
  114. package/lib/esm/FrontEndDevTools.js +1 -1
  115. package/lib/esm/FrontEndDevTools.js.map +1 -1
  116. package/lib/esm/effects/Convolution.js +6 -6
  117. package/lib/esm/effects/Convolution.js.map +1 -1
  118. package/lib/esm/effects/EffectTools.js +2 -2
  119. package/lib/esm/effects/EffectTools.js.map +1 -1
  120. package/lib/esm/effects/Explosion.js +37 -25
  121. package/lib/esm/effects/Explosion.js.map +1 -1
  122. package/lib/esm/effects/FlipImage.js +2 -2
  123. package/lib/esm/effects/FlipImage.js.map +1 -1
  124. package/lib/esm/effects/LensDistortion.js +4 -4
  125. package/lib/esm/effects/LensDistortion.js.map +1 -1
  126. package/lib/esm/effects/Saturation.js +4 -4
  127. package/lib/esm/effects/Saturation.js.map +1 -1
  128. package/lib/esm/effects/Snow.d.ts +1 -1
  129. package/lib/esm/effects/Snow.d.ts.map +1 -1
  130. package/lib/esm/effects/Snow.js +19 -8
  131. package/lib/esm/effects/Snow.js.map +1 -1
  132. package/lib/esm/effects/Vignette.js +12 -12
  133. package/lib/esm/effects/Vignette.js.map +1 -1
  134. package/lib/esm/tools/AnimationIntervalTool.js +1 -1
  135. package/lib/esm/tools/AnimationIntervalTool.js.map +1 -1
  136. package/lib/esm/tools/ChangeUnitsTool.js +1 -1
  137. package/lib/esm/tools/ChangeUnitsTool.js.map +1 -1
  138. package/lib/esm/tools/ClipTools.js +6 -8
  139. package/lib/esm/tools/ClipTools.js.map +1 -1
  140. package/lib/esm/tools/DisplayStyleTools.js +21 -25
  141. package/lib/esm/tools/DisplayStyleTools.js.map +1 -1
  142. package/lib/esm/tools/EmphasizeElementsTool.js +7 -13
  143. package/lib/esm/tools/EmphasizeElementsTool.js.map +1 -1
  144. package/lib/esm/tools/FrustumDecoration.js +28 -9
  145. package/lib/esm/tools/FrustumDecoration.js.map +1 -1
  146. package/lib/esm/tools/InspectElementTool.js +7 -6
  147. package/lib/esm/tools/InspectElementTool.js.map +1 -1
  148. package/lib/esm/tools/MapLayerTool.js +24 -20
  149. package/lib/esm/tools/MapLayerTool.js.map +1 -1
  150. package/lib/esm/tools/MeasureTileLoadTime.js +4 -1
  151. package/lib/esm/tools/MeasureTileLoadTime.js.map +1 -1
  152. package/lib/esm/tools/ModelAppearanceTools.js +9 -9
  153. package/lib/esm/tools/ModelAppearanceTools.js.map +1 -1
  154. package/lib/esm/tools/PlanProjectionTools.js +8 -15
  155. package/lib/esm/tools/PlanProjectionTools.js.map +1 -1
  156. package/lib/esm/tools/PlanarMaskTools.js +21 -26
  157. package/lib/esm/tools/PlanarMaskTools.js.map +1 -1
  158. package/lib/esm/tools/ProjectExtents.js +6 -3
  159. package/lib/esm/tools/ProjectExtents.js.map +1 -1
  160. package/lib/esm/tools/RealityModelTools.js +10 -10
  161. package/lib/esm/tools/RealityModelTools.js.map +1 -1
  162. package/lib/esm/tools/RealityTransitionTool.js +1 -1
  163. package/lib/esm/tools/RealityTransitionTool.js.map +1 -1
  164. package/lib/esm/tools/RenderSystemTools.js +4 -3
  165. package/lib/esm/tools/RenderSystemTools.js.map +1 -1
  166. package/lib/esm/tools/RenderTargetTools.d.ts +1 -1
  167. package/lib/esm/tools/RenderTargetTools.d.ts.map +1 -1
  168. package/lib/esm/tools/RenderTargetTools.js +15 -20
  169. package/lib/esm/tools/RenderTargetTools.js.map +1 -1
  170. package/lib/esm/tools/ReportWebGLCompatibilityTool.js +1 -1
  171. package/lib/esm/tools/ReportWebGLCompatibilityTool.js.map +1 -1
  172. package/lib/esm/tools/SavedViews.js +4 -7
  173. package/lib/esm/tools/SavedViews.js.map +1 -1
  174. package/lib/esm/tools/ScheduleScriptTools.d.ts.map +1 -1
  175. package/lib/esm/tools/ScheduleScriptTools.js +11 -12
  176. package/lib/esm/tools/ScheduleScriptTools.js.map +1 -1
  177. package/lib/esm/tools/SelectionTools.js +4 -6
  178. package/lib/esm/tools/SelectionTools.js.map +1 -1
  179. package/lib/esm/tools/SetGpuMemoryLimitTool.js +1 -1
  180. package/lib/esm/tools/SetGpuMemoryLimitTool.js.map +1 -1
  181. package/lib/esm/tools/SourceAspectIdTools.js +2 -2
  182. package/lib/esm/tools/SourceAspectIdTools.js.map +1 -1
  183. package/lib/esm/tools/TileRequestDecoration.js +6 -3
  184. package/lib/esm/tools/TileRequestDecoration.js.map +1 -1
  185. package/lib/esm/tools/TileTreeBoundsDecoration.d.ts.map +1 -1
  186. package/lib/esm/tools/TileTreeBoundsDecoration.js +8 -4
  187. package/lib/esm/tools/TileTreeBoundsDecoration.js.map +1 -1
  188. package/lib/esm/tools/ToolTipProvider.js +2 -1
  189. package/lib/esm/tools/ToolTipProvider.js.map +1 -1
  190. package/lib/esm/tools/ViewportTools.js +22 -19
  191. package/lib/esm/tools/ViewportTools.js.map +1 -1
  192. package/lib/esm/widgets/DiagnosticsPanel.d.ts +1 -1
  193. package/lib/esm/widgets/DiagnosticsPanel.d.ts.map +1 -1
  194. package/lib/esm/widgets/DiagnosticsPanel.js +11 -1
  195. package/lib/esm/widgets/DiagnosticsPanel.js.map +1 -1
  196. package/lib/esm/widgets/FpsTracker.d.ts +1 -1
  197. package/lib/esm/widgets/FpsTracker.d.ts.map +1 -1
  198. package/lib/esm/widgets/FpsTracker.js +5 -1
  199. package/lib/esm/widgets/FpsTracker.js.map +1 -1
  200. package/lib/esm/widgets/GpuProfiler.d.ts +1 -1
  201. package/lib/esm/widgets/GpuProfiler.d.ts.map +1 -1
  202. package/lib/esm/widgets/GpuProfiler.js +89 -82
  203. package/lib/esm/widgets/GpuProfiler.js.map +1 -1
  204. package/lib/esm/widgets/KeyinField.js +8 -1
  205. package/lib/esm/widgets/KeyinField.js.map +1 -1
  206. package/lib/esm/widgets/MemoryTracker.d.ts +1 -1
  207. package/lib/esm/widgets/MemoryTracker.d.ts.map +1 -1
  208. package/lib/esm/widgets/MemoryTracker.js +16 -4
  209. package/lib/esm/widgets/MemoryTracker.js.map +1 -1
  210. package/lib/esm/widgets/RenderCommandBreakdown.d.ts +1 -1
  211. package/lib/esm/widgets/RenderCommandBreakdown.d.ts.map +1 -1
  212. package/lib/esm/widgets/RenderCommandBreakdown.js +6 -2
  213. package/lib/esm/widgets/RenderCommandBreakdown.js.map +1 -1
  214. package/lib/esm/widgets/TileMemoryBreakdown.d.ts +1 -1
  215. package/lib/esm/widgets/TileMemoryBreakdown.d.ts.map +1 -1
  216. package/lib/esm/widgets/TileMemoryBreakdown.js +10 -8
  217. package/lib/esm/widgets/TileMemoryBreakdown.js.map +1 -1
  218. package/lib/esm/widgets/TileStatisticsTracker.d.ts +1 -1
  219. package/lib/esm/widgets/TileStatisticsTracker.d.ts.map +1 -1
  220. package/lib/esm/widgets/TileStatisticsTracker.js +5 -2
  221. package/lib/esm/widgets/TileStatisticsTracker.js.map +1 -1
  222. package/lib/esm/widgets/ToolSettingsTracker.d.ts +1 -1
  223. package/lib/esm/widgets/ToolSettingsTracker.d.ts.map +1 -1
  224. package/lib/esm/widgets/ToolSettingsTracker.js +2 -2
  225. package/lib/esm/widgets/ToolSettingsTracker.js.map +1 -1
  226. package/package.json +10 -10
@@ -1 +1 @@
1
- {"version":3,"file":"MapLayerTool.js","sourceRoot":"","sources":["../../../src/tools/MapLayerTool.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAO/F,oDAA2F;AAC3F,wDAAyK;AACzK,iDAA8C;AAC9C,+CAA4C;AAE5C,+CAA+C;AAC/C,MAAM,sBAAuB,SAAQ,oBAAI;IACvC,YAAsB,gBAAgB,IAAI,EAAY,UAAU,KAAK;QACnE,KAAK,EAAE,CAAC;QADY,kBAAa,GAAb,aAAa,CAAO;QAAY,YAAO,GAAP,OAAO,CAAQ;IAErE,CAAC;IAES,QAAQ,CAAC,MAAuB;QACxC,MAAM,EAAE,GAAG,yBAAS,CAAC,WAAW,CAAC,YAAY,CAAC;QAC9C,IAAI,EAAE,KAAK,SAAS,IAAI,MAAM,KAAK,SAAS;YAC1C,OAAO;QAET,MAAM,CAAC,cAAc,EAAE,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,EAAE;YAC1C,IAAI,UAAU,CAAC,MAAM,KAAK,oCAAoB,CAAC,KAAK,IAAI,UAAU,CAAC,MAAM,KAAK,oCAAoB,CAAC,WAAW,EAAE,CAAC;gBAC/G,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;oBACjB,EAAE,CAAC,YAAY,CAAC,iBAAiB,GAAG,kCAAoB,CAAC,QAAQ,CAAC,EAAE,GAAG,MAAM,EAAE,SAAS,EAAE,UAAU,CAAC,SAAS,EAAE,CAAC,CAAC;oBAClH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C,MAAM,KAAc,OAAO,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC;IAC3C,MAAM,KAAc,OAAO,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC;IAElD;;OAEG;IACa,KAAK,CAAC,GAAG,CAAC,OAAgB;QACxC,MAAM,EAAE,GAAG,yBAAS,CAAC,WAAW,CAAC,YAAY,CAAC;QAC9C,IAAI,SAAS,KAAK,EAAE,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,aAAa,EAAE,IAAI,EAAE,CAAC,YAAY,CAAC,iBAAiB,YAAY,sBAAQ;YACvG,OAAO,KAAK,CAAC;QAEf,EAAE,CAAC,YAAY,CAAC,iBAAiB,GAAG,EAAE,CAAC,YAAY,CAAC,iBAAiB,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC;QACzF,EAAE,CAAC,oBAAoB,EAAE,CAAC;QAE1B,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;OAEG;IACa,KAAK,CAAC,WAAW,CAAC,GAAG,IAAc;QACjD,MAAM,OAAO,GAAG,IAAA,2BAAY,EAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;QAEtC,OAAO,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;IAC7D,CAAC;;AA1BH,sDA2BC;AA1BwB,4BAAM,GAAG,0BAA0B,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\n/** @packageDocumentation\n * @module Tools\n */\n\nimport { Id64String } from \"@itwin/core-bentley\";\nimport { BaseMapLayerSettings, ColorDef, ModelMapLayerSettings } from \"@itwin/core-common\";\nimport { IModelApp, MapLayerSource, MapLayerSources, MapLayerSourceStatus, NotifyMessageDetails, OutputMessagePriority, Tool, WmsUtilities } from \"@itwin/core-frontend\";\nimport { parseBoolean } from \"./parseBoolean\";\nimport { parseToggle } from \"./parseToggle\";\n\n/** Base class for attaching map layer tool. */\nclass AttachMapLayerBaseTool extends Tool {\n constructor(protected _isBackground = true, protected _isBase = false) {\n super();\n }\n\n protected doAttach(source?: MapLayerSource) {\n const vp = IModelApp.viewManager.selectedView;\n if (vp === undefined || source === undefined)\n return;\n\n source.validateSource().then((validation) => {\n if (validation.status === MapLayerSourceStatus.Valid || validation.status === MapLayerSourceStatus.RequireAuth) {\n if (this._isBase) {\n vp.displayStyle.backgroundMapBase = BaseMapLayerSettings.fromJSON({ ...source, subLayers: validation.subLayers });\n vp.invalidateRenderPlan();\n } else {\n const settings = source.toLayerSettings(validation.subLayers);\n if (settings) {\n // Need to specify index in mapLayerIndex, so just use -1 to attach layer at the bottom\n // Previously, this was done within attachMapLayer if index was undefined.\n vp.displayStyle.attachMapLayer({ settings, mapLayerIndex: { isOverlay: !this._isBackground, index: -1 } });\n }\n }\n\n if (validation.status === MapLayerSourceStatus.Valid) {\n vp.invalidateRenderPlan();\n const msg = IModelApp.localization.getLocalizedString(\"FrontendDevTools:tools.AttachMapLayerTool.Messages.MapLayerAttached\", { sourceName: source.name });\n IModelApp.notifications.outputMessage(new NotifyMessageDetails(OutputMessagePriority.Info, msg));\n } else if (validation.status === MapLayerSourceStatus.RequireAuth) {\n const msg = IModelApp.localization.getLocalizedString(\"FrontendDevTools:tools.AttachMapLayerTool.Messages.MapLayerAttachedRequiresAuth\", { sourceName: source.name });\n IModelApp.notifications.outputMessage(new NotifyMessageDetails(OutputMessagePriority.Warning, msg));\n }\n\n } else if (validation.status === MapLayerSourceStatus.IncompatibleFormat) {\n const msg = IModelApp.localization.getLocalizedString(\"FrontendDevTools:tools.AttachMapLayerTool.Messages.MapLayersIncompatibleFormat\", { sourceName: source.name });\n IModelApp.notifications.outputMessage(new NotifyMessageDetails(OutputMessagePriority.Error, msg));\n } else {\n const msg = IModelApp.localization.getLocalizedString(\"FrontendDevTools:tools.AttachMapLayerTool.Messages.MapLayerValidationFailed\", { sourceName: source.name });\n IModelApp.notifications.outputMessage(new NotifyMessageDetails(OutputMessagePriority.Error, msg));\n }\n }).catch((error) => {\n const msg = IModelApp.localization.getLocalizedString(\"FrontendDevTools:tools.AttachMapLayerTool.Messages.MapLayerAttachError\", { error, sourceName: source.name });\n IModelApp.notifications.outputMessage(new NotifyMessageDetails(OutputMessagePriority.Error, msg));\n });\n }\n}\n\n/** Attach a map layer from URL base class. A layer is attached for each unique model in the selection\n * @beta\n */\nexport class AttachModelMapLayerTool extends Tool {\n public static override get minArgs() { return 0; }\n public static override get maxArgs() { return 1; }\n public static override toolId = \"AttachModelMapLayerTool\";\n constructor(protected _formatId: string) { super(); }\n\n public override async run(nameIn?: string): Promise<boolean> {\n const vp = IModelApp.viewManager.selectedView;\n if (!vp)\n return false;\n\n const iModel = vp.iModel;\n const elements = await iModel.elements.getProps(iModel.selectionSet.elements);\n const modelIds = new Set<Id64String>();\n\n for (const element of elements)\n modelIds.add(element.model);\n\n for (const modelId of modelIds) {\n const modelProps = await iModel.models.getProps(modelId);\n const modelName = modelProps[0].name ? modelProps[0].name : modelId;\n const name = nameIn ? (modelIds.size > 1 ? `${nameIn}: ${modelName}` : nameIn) : modelName;\n const settings = ModelMapLayerSettings.fromJSON({ name, modelId });\n vp.displayStyle.attachMapLayer({ settings, mapLayerIndex: { isOverlay: false, index: -1 } });\n }\n return true;\n }\n\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n return this.run(args[0]);\n }\n public async onRestartTool() {\n }\n}\n/** Attach a map layer from URL base class. */\nclass AttachMapLayerByURLBaseTool extends AttachMapLayerBaseTool {\n public static override get minArgs() { return 1; }\n public static override get maxArgs() { return 4; }\n constructor(protected _formatId: string) { super(); }\n\n public override async run(url: string, name?: string, userName?: string, password?: string): Promise<boolean> {\n const source = MapLayerSource.fromJSON({ url, name: (name ? name : url), formatId: this._formatId });\n if (source) {\n source.userName = userName;\n source.password = password;\n }\n\n this.doAttach(source);\n return true;\n }\n\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n return this.run(args[0], args[1], args[2], args[3]);\n }\n}\n\n/** This tool attaches a WMS map layer from a given URL.\n * @beta\n */\nexport class AttachWmsMapLayerByUrlTool extends AttachMapLayerByURLBaseTool {\n public static override toolId = \"AttachWmsMapLayerTool\";\n constructor() { super(\"WMS\"); }\n /** This method runs the tool, attaching a WMS map layer from a given URL.\n * @param args contains url, name, userName, password in array order\n */\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n return this.run(WmsUtilities.getBaseUrl(args[0]), args[1], args[2], args[3]);\n }\n}\n\n/** This tool attaches a WMTS map layer from a given URL.\n * @beta\n */\nexport class AttachWmtsMapLayerByUrlTool extends AttachMapLayerByURLBaseTool {\n public static override toolId = \"AttachWmtsMapLayerTool\";\n constructor() { super(\"WMTS\"); }\n /** This method runs the tool, attaching a WMTS map layer from a given URL.\n * @param args contains url, name, userName, password in array order\n */\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n return this.run(WmsUtilities.getBaseUrl(args[0]), args[1], args[2], args[3]);\n }\n}\n\n/** This tool attaches an ArcGIS map layer from a given URL.\n * @beta\n */\nexport class AttachArcGISMapLayerByUrlTool extends AttachMapLayerByURLBaseTool {\n public static override toolId = \"AttachArcGISMapLayerTool\";\n constructor() { super(\"ArcGIS\"); }\n}\n\n/** This tool attaches an ArcGIS map layer from a given URL.\n * @beta\n */\nexport class AttachArcGISFeatureMapLayerByUrlTool extends AttachMapLayerByURLBaseTool {\n public static override toolId = \"AttachArcGISFeatureMapLayerTool\";\n constructor() { super(\"ArcGISFeature\"); }\n}\n\n/** This tool attaches an ArcGIS map layer from a given URL.\n * @beta\n */\nexport class AttachOgcApiFeaturesMapLayerTool extends AttachMapLayerByURLBaseTool {\n public static override toolId = \"AttachOgcApiFeaturesMapLayerTool\";\n constructor() { super(\"OgcApiFeatures\"); }\n}\n\n/** This tool attaches a map layer from a given tile URL.\n * @beta\n */\nexport class AttachTileURLMapLayerByUrlTool extends AttachMapLayerByURLBaseTool {\n public static override toolId = \"AttachTileURLMapLayerTool\";\n constructor() { super(\"TileURL\"); }\n}\n\n/** This tool add a Map Layer from a specified name (look up in MapLayerSources.json).\n * @beta\n */\nexport class AttachMapLayerTool extends AttachMapLayerBaseTool {\n public static override toolId = \"AttachMapLayerTool\";\n public static override get minArgs() { return 1; }\n public static override get maxArgs() { return 1; }\n\n /** This method runs the tool, adding a map layer from a specified name in MayLayerSources.json.\n * @param name the name of the map layer to add\n */\n public override async run(name: string): Promise<boolean> {\n const vp = IModelApp.viewManager.selectedView;\n if (vp === undefined)\n return false;\n\n MapLayerSources.create().then((sources) => {\n if (sources !== undefined) {\n const source = sources.findByName(name, this._isBase);\n if (source !== undefined)\n this.doAttach(source);\n }\n }).catch((_err) => { });\n\n return true;\n }\n\n /** Executes this tool's run method with args[0] containing `name`.\n * @see [[run]]\n */\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n return this.run(args[0]);\n }\n}\n/** This tool attaches a Overlay map layer.\n * @beta\n */\nexport class AttachMapOverlayTool extends AttachMapLayerTool {\n public static override toolId = \"AttachMapOverlayTool\";\n constructor() {\n super();\n this._isBackground = false;\n }\n}\n\n/** Sets map layer base tool.\n * @beta\n */\nexport class SetMapBaseTool extends AttachMapLayerTool {\n public static override toolId = \"SetMapBaseTool\";\n constructor() {\n super();\n this._isBase = true;\n }\n}\n\n/** Detach Map Layers Tool.\n * @beta\n */\nexport class DetachMapLayersTool extends Tool {\n public static override toolId = \"DetachMapLayersTool\";\n public static override get minArgs() { return 0; }\n public static override get maxArgs() { return 0; }\n public override async parseAndRun(..._args: string[]): Promise<boolean> {\n return this.run();\n }\n\n public override async run(): Promise<boolean> {\n const vp = IModelApp.viewManager.selectedView;\n if (vp === undefined)\n return false;\n vp.displayStyle.detachMapLayerByIndex({ index: -1, isOverlay: true });\n vp.displayStyle.detachMapLayerByIndex({ index: -1, isOverlay: false });\n vp.invalidateRenderPlan();\n return true;\n }\n}\n\nfunction parseLayerIndex(args: string[]) {\n const layerIndex = args.length > 1 ? parseInt(args[1], 10) : 0;\n return isNaN(layerIndex) ? 0 : layerIndex;\n}\n\n/** This tool sets the visibility of the map layer.\n * @beta\n */\nexport class MapLayerVisibilityTool extends Tool {\n public static override toolId = \"SetMapLayerVisibility\";\n public static override get minArgs() { return 1; }\n public static override get maxArgs() { return 2; }\n\n /** This method runs the tool, setting the visibility of a map layer.\n * @param layerIndex the index of the layer to change\n * @param visible a boolean that should be true if the layer should be visible\n */\n public override async run(layerIndex: number, enable?: boolean): Promise<boolean> {\n const vp = IModelApp.viewManager.selectedView;\n if (undefined === vp || !vp.view.isSpatialView())\n return false;\n\n const mapLayer = vp.displayStyle.mapLayerAtIndex({ index: layerIndex, isOverlay: false });\n if (undefined === mapLayer)\n return false;\n\n const visible = (enable === undefined) ? !mapLayer.visible : enable;\n\n vp.displayStyle.changeMapLayerProps({ visible }, { index: layerIndex, isOverlay: false });\n vp.invalidateRenderPlan();\n\n return true;\n }\n\n /** Executes this tool's run method with args[0] containing `enable` and args[1] containing `layerIndex`.\n * @see [[run]]\n */\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n const enable = parseToggle(args[0]);\n const layerIndex = parseLayerIndex(args);\n if (typeof enable !== \"string\")\n await this.run(layerIndex, enable);\n\n return true;\n }\n}\n/** This tool reorders map layers.\n * @beta\n */\nexport class ReorderMapLayers extends Tool {\n public static override toolId = \"ReorderMapLayers\";\n public static override get minArgs() { return 0; }\n public static override get maxArgs() { return 2; }\n /** This method runs the tool, reordering the map layers.\n * @param from a numeric value specifying the layer index that is being moved\n * @param from a numeric value specifying the layer index to move that layer to\n */\n public override async run(from: number, to: number): Promise<boolean> {\n const vp = IModelApp.viewManager.selectedView;\n if (undefined === vp || !vp.view.isSpatialView())\n return false;\n\n vp.displayStyle.moveMapLayerToIndex(isNaN(from) ? 0 : from, isNaN(to) ? vp.displayStyle.settings.mapImagery.backgroundLayers.length : to, false);\n vp.invalidateRenderPlan();\n return true;\n }\n /** Executes this tool's run method with args[0] containing `from` and args[1] containing `to`.\n * @see [[run]]\n */\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n const from = parseInt(args[0], 10);\n const to = parseInt(args[1], 10);\n await this.run(from, to);\n return true;\n }\n\n}\n\n/** This tool sets the transparency of a map layer.\n * @beta\n */\nexport class MapLayerTransparencyTool extends Tool {\n public static override toolId = \"SetMapLayerTransparency\";\n public static override get minArgs() { return 1; }\n public static override get maxArgs() { return 2; }\n /** This method runs the tool, setting the transparency of a map layer.\n * @param layerIndex the index of the layer to change\n * @param transparency a numeric value in the range 0.0 (fully opaque) to 1.0 (fully transparent)\n */\n public override async run(layerIndex: number, transparency: number): Promise<boolean> {\n const vp = IModelApp.viewManager.selectedView;\n if (undefined === vp || !vp.view.isSpatialView())\n return false;\n\n vp.displayStyle.changeMapLayerProps({ transparency }, { index: layerIndex, isOverlay: false });\n vp.invalidateRenderPlan();\n\n return true;\n }\n /** Executes this tool's run method with args[0] containing `transparency` and args[1] containing `layerIndex`.\n * @see [[run]]\n */\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n const transparency = parseFloat(args[0]);\n const layerIndex = parseLayerIndex(args);\n if (transparency >= 0 && transparency <= 1)\n await this.run(layerIndex, transparency);\n\n return true;\n }\n}\n/** This tool sets the visibility of the map sublayer.\n * @beta\n */\nexport class MapLayerSubLayerVisibilityTool extends Tool {\n public static override toolId = \"SetMapSubLayerVisibility\";\n public static override get minArgs() { return 1; }\n public static override get maxArgs() { return 2; }\n\n /** This method runs the tool, setting the visibility of a map sublayer.\n * @param layerIndex the index of the layer to change\n * @param visible a boolean that should be true if the sublayer should be visible\n */\n public override async run(layerIndex: number, visible: boolean): Promise<boolean> {\n const vp = IModelApp.viewManager.selectedView;\n if (undefined === vp || !vp.view.isSpatialView())\n return false;\n\n vp.displayStyle.changeMapSubLayerProps({ visible }, -1, { index: layerIndex, isOverlay: false });\n vp.invalidateRenderPlan();\n\n return true;\n }\n\n /** Executes this tool's run method with args[0] containing `transparency` and args[1] containing `layerIndex`.\n * @see [[run]]\n */\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n const on = args[0] !== \"off\";\n const layerIndex = parseLayerIndex(args);\n await this.run(layerIndex, on);\n\n return true;\n }\n}\n\n/** This tool changes the viewport so it is zoomed to the range of a map layer.\n * @beta\n */\nexport class MapLayerZoomTool extends Tool {\n public static override toolId = \"MapLayerZoom\";\n public static override get minArgs() { return 0; }\n public static override get maxArgs() { return 1; }\n\n /** This method runs the tool, changing the viewport so it is zoomed to the range of a map layer.\n * @param layerIndex the index of the layer whose range to zoom to\n */\n public override async run(layerIndex: number): Promise<boolean> {\n const vp = IModelApp.viewManager.selectedView;\n if (undefined === vp || !vp.view.isSpatialView())\n return false;\n\n vp.viewMapLayerRange({ index: layerIndex, isOverlay: false }, vp).then(() => { }).catch(() => { });\n\n return true;\n }\n\n /** Executes this tool's run method with args[0] containing `layerIndex`.\n * @see [[run]]\n */\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n const layerIndex = parseLayerIndex(args);\n await this.run(layerIndex);\n\n return true;\n }\n}\n\n/** This tool toggles whether to apply terrain heights to the map.\n * @beta\n */\nexport class ToggleTerrainTool extends Tool {\n public static override toolId = \"ToggleTerrain\";\n public static override get minArgs() { return 0; }\n public static override get maxArgs() { return 1; }\n\n /** This method runs the tool, changing whether to apply terrain heights to the map.\n * @param enable whether or not to enable terrain heights on the map\n */\n public override async run(enable?: boolean): Promise<boolean> {\n const vp = IModelApp.viewManager.selectedView;\n if (undefined === vp || !vp.view.isSpatialView())\n return false;\n\n const applyTerrain = (enable === undefined) ? !vp.displayStyle.backgroundMapSettings.applyTerrain : enable;\n vp.displayStyle.changeBackgroundMapProps({ applyTerrain });\n vp.invalidateRenderPlan();\n\n return true;\n }\n\n /** Executes this tool's run method with args[0] containing `enable`.\n * @see [[run]]\n */\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n const enable = parseToggle(args[0]);\n if (typeof enable !== \"string\")\n await this.run(enable);\n\n return true;\n }\n}\n\n/** This tool changes the color of the base map.\n * @beta\n */\nexport class MapBaseColorTool extends Tool {\n public static override toolId = \"SetMapBaseColorTool\";\n public static override get minArgs() { return 3; }\n public static override get maxArgs() { return 3; }\n\n /** This method runs the tool, changing the color of the base map.\n * @param color the color for the base map\n */\n public override async run(color: ColorDef) {\n const vp = IModelApp.viewManager.selectedView;\n if (undefined === vp || !vp.view.isSpatialView())\n return false;\n\n const curTransparency = vp.displayStyle.backgroundMapBase instanceof ColorDef ? vp.displayStyle.backgroundMapBase.getTransparency() : 0;\n vp.displayStyle.backgroundMapBase = color.withTransparency(curTransparency);\n vp.invalidateRenderPlan();\n\n return true;\n }\n\n /** Executes this tool's run method with args[0] containing a 0 to 255 red component, args[1] containing a 0 to 255 green component, and args[2] containing a 0 to 255 blue component.\n * These rgb values will be used to construct the `color` parameter passed to this tool's run method.\n * @see [[run]]\n */\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n const red = parseFloat(args[0]), green = parseFloat(args[1]), blue = parseFloat(args[2]);\n\n return (isNaN(red) || red < 0 || red > 255 || isNaN(green) || green < 0 || green > 255 || isNaN(blue) || blue < 0 || blue > 255) ? false : this.run(ColorDef.from(red, green, blue));\n }\n}\n/** This tool changes the transparency of the base map.\n * @beta\n */\nexport class MapBaseTransparencyTool extends Tool {\n public static override toolId = \"SetMapBaseTransparencyTool\";\n public static override get minArgs() { return 1; }\n public static override get maxArgs() { return 1; }\n\n /** This method runs the tool, changing the transparency of the base map.\n * @param transparency a numeric value in range 0.0 to 1.0 whether 0.0 means fully opaque and 1.0 means fully transparent\n */\n public override async run(transparency: number) {\n const vp = IModelApp.viewManager.selectedView;\n if (undefined === vp || !vp.view.isSpatialView())\n return false;\n\n vp.displayStyle.changeBaseMapTransparency(transparency);\n vp.invalidateRenderPlan();\n\n return true;\n }\n\n /** Executes this tool's run method with args[0] containing `transparency`.\n * @see [[run]]\n */\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n const transparency = parseFloat(args[0]);\n\n return (isNaN(transparency) || transparency < 0 || transparency > 1) ? false : this.run(transparency);\n }\n}\n\n/** This tool changes the visibility of the base map.\n * @beta\n */\nexport class MapBaseVisibilityTool extends Tool {\n public static override toolId = \"SetMapBaseVisibilityTool\";\n public static override get minArgs() { return 1; }\n public static override get maxArgs() { return 1; }\n\n /** This method runs the tool, changing the visibility of the base map.\n * @param visible a boolean which specifies whether or not to make the base map visible\n */\n public override async run(visible: boolean) {\n const vp = IModelApp.viewManager.selectedView;\n if (undefined === vp || !vp.view.isSpatialView() || vp.displayStyle.backgroundMapBase instanceof ColorDef)\n return false;\n\n vp.displayStyle.backgroundMapBase = vp.displayStyle.backgroundMapBase.clone({ visible });\n vp.invalidateRenderPlan();\n\n return true;\n }\n\n /** Executes this tool's run method with args[0] containing `visible`.\n * @see [[run]]\n */\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n const visible = parseBoolean(args[0]);\n\n return (visible !== undefined ? this.run(visible) : false);\n }\n}\n"]}
1
+ {"version":3,"file":"MapLayerTool.js","sourceRoot":"","sources":["../../../src/tools/MapLayerTool.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAO/F,oDAA2F;AAC3F,wDAAyK;AACzK,iDAA8C;AAC9C,+CAA4C;AAE5C,+CAA+C;AAC/C,MAAM,sBAAuB,SAAQ,oBAAI;IACjB;IAAgC;IAAtD,YAAsB,gBAAgB,IAAI,EAAY,UAAU,KAAK;QACnE,KAAK,EAAE,CAAC;QADY,kBAAa,GAAb,aAAa,CAAO;QAAY,YAAO,GAAP,OAAO,CAAQ;IAErE,CAAC;IAES,QAAQ,CAAC,MAAuB;QACxC,MAAM,EAAE,GAAG,yBAAS,CAAC,WAAW,CAAC,YAAY,CAAC;QAC9C,IAAI,EAAE,KAAK,SAAS,IAAI,MAAM,KAAK,SAAS;YAC1C,OAAO;QAET,MAAM,CAAC,cAAc,EAAE,CAAC,IAAI,CAAC,CAAC,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O,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;IAC7D,CAAC;;AA1BH,sDA2BC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\n/** @packageDocumentation\n * @module Tools\n */\n\nimport { Id64String } from \"@itwin/core-bentley\";\nimport { BaseMapLayerSettings, ColorDef, ModelMapLayerSettings } from \"@itwin/core-common\";\nimport { IModelApp, MapLayerSource, MapLayerSources, MapLayerSourceStatus, NotifyMessageDetails, OutputMessagePriority, Tool, WmsUtilities } from \"@itwin/core-frontend\";\nimport { parseBoolean } from \"./parseBoolean\";\nimport { parseToggle } from \"./parseToggle\";\n\n/** Base class for attaching map layer tool. */\nclass AttachMapLayerBaseTool extends Tool {\n constructor(protected _isBackground = true, protected _isBase = false) {\n super();\n }\n\n protected doAttach(source?: MapLayerSource) {\n const vp = IModelApp.viewManager.selectedView;\n if (vp === undefined || source === undefined)\n return;\n\n source.validateSource().then((validation) => {\n if (validation.status === MapLayerSourceStatus.Valid || validation.status === MapLayerSourceStatus.RequireAuth) {\n if (this._isBase) {\n vp.displayStyle.backgroundMapBase = BaseMapLayerSettings.fromJSON({ ...source, subLayers: validation.subLayers });\n vp.invalidateRenderPlan();\n } else {\n const settings = source.toLayerSettings(validation.subLayers);\n if (settings) {\n // Need to specify index in mapLayerIndex, so just use -1 to attach layer at the bottom\n // Previously, this was done within attachMapLayer if index was undefined.\n vp.displayStyle.attachMapLayer({ settings, mapLayerIndex: { isOverlay: !this._isBackground, index: -1 } });\n }\n }\n\n if (validation.status === MapLayerSourceStatus.Valid) {\n vp.invalidateRenderPlan();\n const msg = IModelApp.localization.getLocalizedString(\"FrontendDevTools:tools.AttachMapLayerTool.Messages.MapLayerAttached\", { sourceName: source.name });\n IModelApp.notifications.outputMessage(new NotifyMessageDetails(OutputMessagePriority.Info, msg));\n } else if (validation.status === MapLayerSourceStatus.RequireAuth) {\n const msg = IModelApp.localization.getLocalizedString(\"FrontendDevTools:tools.AttachMapLayerTool.Messages.MapLayerAttachedRequiresAuth\", { sourceName: source.name });\n IModelApp.notifications.outputMessage(new NotifyMessageDetails(OutputMessagePriority.Warning, msg));\n }\n\n } else if (validation.status === MapLayerSourceStatus.IncompatibleFormat) {\n const msg = IModelApp.localization.getLocalizedString(\"FrontendDevTools:tools.AttachMapLayerTool.Messages.MapLayersIncompatibleFormat\", { sourceName: source.name });\n IModelApp.notifications.outputMessage(new NotifyMessageDetails(OutputMessagePriority.Error, msg));\n } else {\n const msg = IModelApp.localization.getLocalizedString(\"FrontendDevTools:tools.AttachMapLayerTool.Messages.MapLayerValidationFailed\", { sourceName: source.name });\n IModelApp.notifications.outputMessage(new NotifyMessageDetails(OutputMessagePriority.Error, msg));\n }\n }).catch((error) => {\n const msg = IModelApp.localization.getLocalizedString(\"FrontendDevTools:tools.AttachMapLayerTool.Messages.MapLayerAttachError\", { error, sourceName: source.name });\n IModelApp.notifications.outputMessage(new NotifyMessageDetails(OutputMessagePriority.Error, msg));\n });\n }\n}\n\n/** Attach a map layer from URL base class. A layer is attached for each unique model in the selection\n * @beta\n */\nexport class AttachModelMapLayerTool extends Tool {\n public static override get minArgs() { return 0; }\n public static override get maxArgs() { return 1; }\n public static override toolId = \"AttachModelMapLayerTool\";\n constructor(protected _formatId: string) { super(); }\n\n public override async run(nameIn?: string): Promise<boolean> {\n const vp = IModelApp.viewManager.selectedView;\n if (!vp)\n return false;\n\n const iModel = vp.iModel;\n const elements = await iModel.elements.getProps(iModel.selectionSet.elements);\n const modelIds = new Set<Id64String>();\n\n for (const element of elements)\n modelIds.add(element.model);\n\n for (const modelId of modelIds) {\n const modelProps = await iModel.models.getProps(modelId);\n const modelName = modelProps[0].name ? modelProps[0].name : modelId;\n const name = nameIn ? (modelIds.size > 1 ? `${nameIn}: ${modelName}` : nameIn) : modelName;\n const settings = ModelMapLayerSettings.fromJSON({ name, modelId });\n vp.displayStyle.attachMapLayer({ settings, mapLayerIndex: { isOverlay: false, index: -1 } });\n }\n return true;\n }\n\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n return this.run(args[0]);\n }\n public async onRestartTool() {\n }\n}\n/** Attach a map layer from URL base class. */\nclass AttachMapLayerByURLBaseTool extends AttachMapLayerBaseTool {\n public static override get minArgs() { return 1; }\n public static override get maxArgs() { return 4; }\n constructor(protected _formatId: string) { super(); }\n\n public override async run(url: string, name?: string, userName?: string, password?: string): Promise<boolean> {\n const source = MapLayerSource.fromJSON({ url, name: (name ? name : url), formatId: this._formatId });\n if (source) {\n source.userName = userName;\n source.password = password;\n }\n\n this.doAttach(source);\n return true;\n }\n\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n return this.run(args[0], args[1], args[2], args[3]);\n }\n}\n\n/** This tool attaches a WMS map layer from a given URL.\n * @beta\n */\nexport class AttachWmsMapLayerByUrlTool extends AttachMapLayerByURLBaseTool {\n public static override toolId = \"AttachWmsMapLayerTool\";\n constructor() { super(\"WMS\"); }\n /** This method runs the tool, attaching a WMS map layer from a given URL.\n * @param args contains url, name, userName, password in array order\n */\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n return this.run(WmsUtilities.getBaseUrl(args[0]), args[1], args[2], args[3]);\n }\n}\n\n/** This tool attaches a WMTS map layer from a given URL.\n * @beta\n */\nexport class AttachWmtsMapLayerByUrlTool extends AttachMapLayerByURLBaseTool {\n public static override toolId = \"AttachWmtsMapLayerTool\";\n constructor() { super(\"WMTS\"); }\n /** This method runs the tool, attaching a WMTS map layer from a given URL.\n * @param args contains url, name, userName, password in array order\n */\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n return this.run(WmsUtilities.getBaseUrl(args[0]), args[1], args[2], args[3]);\n }\n}\n\n/** This tool attaches an ArcGIS map layer from a given URL.\n * @beta\n */\nexport class AttachArcGISMapLayerByUrlTool extends AttachMapLayerByURLBaseTool {\n public static override toolId = \"AttachArcGISMapLayerTool\";\n constructor() { super(\"ArcGIS\"); }\n}\n\n/** This tool attaches an ArcGIS map layer from a given URL.\n * @beta\n */\nexport class AttachArcGISFeatureMapLayerByUrlTool extends AttachMapLayerByURLBaseTool {\n public static override toolId = \"AttachArcGISFeatureMapLayerTool\";\n constructor() { super(\"ArcGISFeature\"); }\n}\n\n/** This tool attaches an ArcGIS map layer from a given URL.\n * @beta\n */\nexport class AttachOgcApiFeaturesMapLayerTool extends AttachMapLayerByURLBaseTool {\n public static override toolId = \"AttachOgcApiFeaturesMapLayerTool\";\n constructor() { super(\"OgcApiFeatures\"); }\n}\n\n/** This tool attaches a map layer from a given tile URL.\n * @beta\n */\nexport class AttachTileURLMapLayerByUrlTool extends AttachMapLayerByURLBaseTool {\n public static override toolId = \"AttachTileURLMapLayerTool\";\n constructor() { super(\"TileURL\"); }\n}\n\n/** This tool add a Map Layer from a specified name (look up in MapLayerSources.json).\n * @beta\n */\nexport class AttachMapLayerTool extends AttachMapLayerBaseTool {\n public static override toolId = \"AttachMapLayerTool\";\n public static override get minArgs() { return 1; }\n public static override get maxArgs() { return 1; }\n\n /** This method runs the tool, adding a map layer from a specified name in MayLayerSources.json.\n * @param name the name of the map layer to add\n */\n public override async run(name: string): Promise<boolean> {\n const vp = IModelApp.viewManager.selectedView;\n if (vp === undefined)\n return false;\n\n MapLayerSources.create().then((sources) => {\n if (sources !== undefined) {\n const source = sources.findByName(name, this._isBase);\n if (source !== undefined)\n this.doAttach(source);\n }\n }).catch((_err) => { });\n\n return true;\n }\n\n /** Executes this tool's run method with args[0] containing `name`.\n * @see [[run]]\n */\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n return this.run(args[0]);\n }\n}\n/** This tool attaches a Overlay map layer.\n * @beta\n */\nexport class AttachMapOverlayTool extends AttachMapLayerTool {\n public static override toolId = \"AttachMapOverlayTool\";\n constructor() {\n super();\n this._isBackground = false;\n }\n}\n\n/** Sets map layer base tool.\n * @beta\n */\nexport class SetMapBaseTool extends AttachMapLayerTool {\n public static override toolId = \"SetMapBaseTool\";\n constructor() {\n super();\n this._isBase = true;\n }\n}\n\n/** Detach Map Layers Tool.\n * @beta\n */\nexport class DetachMapLayersTool extends Tool {\n public static override toolId = \"DetachMapLayersTool\";\n public static override get minArgs() { return 0; }\n public static override get maxArgs() { return 0; }\n public override async parseAndRun(..._args: string[]): Promise<boolean> {\n return this.run();\n }\n\n public override async run(): Promise<boolean> {\n const vp = IModelApp.viewManager.selectedView;\n if (vp === undefined)\n return false;\n vp.displayStyle.detachMapLayerByIndex({ index: -1, isOverlay: true });\n vp.displayStyle.detachMapLayerByIndex({ index: -1, isOverlay: false });\n vp.invalidateRenderPlan();\n return true;\n }\n}\n\nfunction parseLayerIndex(args: string[]) {\n const layerIndex = args.length > 1 ? parseInt(args[1], 10) : 0;\n return isNaN(layerIndex) ? 0 : layerIndex;\n}\n\n/** This tool sets the visibility of the map layer.\n * @beta\n */\nexport class MapLayerVisibilityTool extends Tool {\n public static override toolId = \"SetMapLayerVisibility\";\n public static override get minArgs() { return 1; }\n public static override get maxArgs() { return 2; }\n\n /** This method runs the tool, setting the visibility of a map layer.\n * @param layerIndex the index of the layer to change\n * @param visible a boolean that should be true if the layer should be visible\n */\n public override async run(layerIndex: number, enable?: boolean): Promise<boolean> {\n const vp = IModelApp.viewManager.selectedView;\n if (undefined === vp || !vp.view.isSpatialView())\n return false;\n\n const mapLayer = vp.displayStyle.mapLayerAtIndex({ index: layerIndex, isOverlay: false });\n if (undefined === mapLayer)\n return false;\n\n const visible = (enable === undefined) ? !mapLayer.visible : enable;\n\n vp.displayStyle.changeMapLayerProps({ visible }, { index: layerIndex, isOverlay: false });\n vp.invalidateRenderPlan();\n\n return true;\n }\n\n /** Executes this tool's run method with args[0] containing `enable` and args[1] containing `layerIndex`.\n * @see [[run]]\n */\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n const enable = parseToggle(args[0]);\n const layerIndex = parseLayerIndex(args);\n if (typeof enable !== \"string\")\n await this.run(layerIndex, enable);\n\n return true;\n }\n}\n/** This tool reorders map layers.\n * @beta\n */\nexport class ReorderMapLayers extends Tool {\n public static override toolId = \"ReorderMapLayers\";\n public static override get minArgs() { return 0; }\n public static override get maxArgs() { return 2; }\n /** This method runs the tool, reordering the map layers.\n * @param from a numeric value specifying the layer index that is being moved\n * @param from a numeric value specifying the layer index to move that layer to\n */\n public override async run(from: number, to: number): Promise<boolean> {\n const vp = IModelApp.viewManager.selectedView;\n if (undefined === vp || !vp.view.isSpatialView())\n return false;\n\n vp.displayStyle.moveMapLayerToIndex(isNaN(from) ? 0 : from, isNaN(to) ? vp.displayStyle.settings.mapImagery.backgroundLayers.length : to, false);\n vp.invalidateRenderPlan();\n return true;\n }\n /** Executes this tool's run method with args[0] containing `from` and args[1] containing `to`.\n * @see [[run]]\n */\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n const from = parseInt(args[0], 10);\n const to = parseInt(args[1], 10);\n await this.run(from, to);\n return true;\n }\n\n}\n\n/** This tool sets the transparency of a map layer.\n * @beta\n */\nexport class MapLayerTransparencyTool extends Tool {\n public static override toolId = \"SetMapLayerTransparency\";\n public static override get minArgs() { return 1; }\n public static override get maxArgs() { return 2; }\n /** This method runs the tool, setting the transparency of a map layer.\n * @param layerIndex the index of the layer to change\n * @param transparency a numeric value in the range 0.0 (fully opaque) to 1.0 (fully transparent)\n */\n public override async run(layerIndex: number, transparency: number): Promise<boolean> {\n const vp = IModelApp.viewManager.selectedView;\n if (undefined === vp || !vp.view.isSpatialView())\n return false;\n\n vp.displayStyle.changeMapLayerProps({ transparency }, { index: layerIndex, isOverlay: false });\n vp.invalidateRenderPlan();\n\n return true;\n }\n /** Executes this tool's run method with args[0] containing `transparency` and args[1] containing `layerIndex`.\n * @see [[run]]\n */\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n const transparency = parseFloat(args[0]);\n const layerIndex = parseLayerIndex(args);\n if (transparency >= 0 && transparency <= 1)\n await this.run(layerIndex, transparency);\n\n return true;\n }\n}\n/** This tool sets the visibility of the map sublayer.\n * @beta\n */\nexport class MapLayerSubLayerVisibilityTool extends Tool {\n public static override toolId = \"SetMapSubLayerVisibility\";\n public static override get minArgs() { return 1; }\n public static override get maxArgs() { return 2; }\n\n /** This method runs the tool, setting the visibility of a map sublayer.\n * @param layerIndex the index of the layer to change\n * @param visible a boolean that should be true if the sublayer should be visible\n */\n public override async run(layerIndex: number, visible: boolean): Promise<boolean> {\n const vp = IModelApp.viewManager.selectedView;\n if (undefined === vp || !vp.view.isSpatialView())\n return false;\n\n vp.displayStyle.changeMapSubLayerProps({ visible }, -1, { index: layerIndex, isOverlay: false });\n vp.invalidateRenderPlan();\n\n return true;\n }\n\n /** Executes this tool's run method with args[0] containing `transparency` and args[1] containing `layerIndex`.\n * @see [[run]]\n */\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n const on = args[0] !== \"off\";\n const layerIndex = parseLayerIndex(args);\n await this.run(layerIndex, on);\n\n return true;\n }\n}\n\n/** This tool changes the viewport so it is zoomed to the range of a map layer.\n * @beta\n */\nexport class MapLayerZoomTool extends Tool {\n public static override toolId = \"MapLayerZoom\";\n public static override get minArgs() { return 0; }\n public static override get maxArgs() { return 1; }\n\n /** This method runs the tool, changing the viewport so it is zoomed to the range of a map layer.\n * @param layerIndex the index of the layer whose range to zoom to\n */\n public override async run(layerIndex: number): Promise<boolean> {\n const vp = IModelApp.viewManager.selectedView;\n if (undefined === vp || !vp.view.isSpatialView())\n return false;\n\n vp.viewMapLayerRange({ index: layerIndex, isOverlay: false }, vp).then(() => { }).catch(() => { });\n\n return true;\n }\n\n /** Executes this tool's run method with args[0] containing `layerIndex`.\n * @see [[run]]\n */\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n const layerIndex = parseLayerIndex(args);\n await this.run(layerIndex);\n\n return true;\n }\n}\n\n/** This tool toggles whether to apply terrain heights to the map.\n * @beta\n */\nexport class ToggleTerrainTool extends Tool {\n public static override toolId = \"ToggleTerrain\";\n public static override get minArgs() { return 0; }\n public static override get maxArgs() { return 1; }\n\n /** This method runs the tool, changing whether to apply terrain heights to the map.\n * @param enable whether or not to enable terrain heights on the map\n */\n public override async run(enable?: boolean): Promise<boolean> {\n const vp = IModelApp.viewManager.selectedView;\n if (undefined === vp || !vp.view.isSpatialView())\n return false;\n\n const applyTerrain = (enable === undefined) ? !vp.displayStyle.backgroundMapSettings.applyTerrain : enable;\n vp.displayStyle.changeBackgroundMapProps({ applyTerrain });\n vp.invalidateRenderPlan();\n\n return true;\n }\n\n /** Executes this tool's run method with args[0] containing `enable`.\n * @see [[run]]\n */\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n const enable = parseToggle(args[0]);\n if (typeof enable !== \"string\")\n await this.run(enable);\n\n return true;\n }\n}\n\n/** This tool changes the color of the base map.\n * @beta\n */\nexport class MapBaseColorTool extends Tool {\n public static override toolId = \"SetMapBaseColorTool\";\n public static override get minArgs() { return 3; }\n public static override get maxArgs() { return 3; }\n\n /** This method runs the tool, changing the color of the base map.\n * @param color the color for the base map\n */\n public override async run(color: ColorDef) {\n const vp = IModelApp.viewManager.selectedView;\n if (undefined === vp || !vp.view.isSpatialView())\n return false;\n\n const curTransparency = vp.displayStyle.backgroundMapBase instanceof ColorDef ? vp.displayStyle.backgroundMapBase.getTransparency() : 0;\n vp.displayStyle.backgroundMapBase = color.withTransparency(curTransparency);\n vp.invalidateRenderPlan();\n\n return true;\n }\n\n /** Executes this tool's run method with args[0] containing a 0 to 255 red component, args[1] containing a 0 to 255 green component, and args[2] containing a 0 to 255 blue component.\n * These rgb values will be used to construct the `color` parameter passed to this tool's run method.\n * @see [[run]]\n */\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n const red = parseFloat(args[0]), green = parseFloat(args[1]), blue = parseFloat(args[2]);\n\n return (isNaN(red) || red < 0 || red > 255 || isNaN(green) || green < 0 || green > 255 || isNaN(blue) || blue < 0 || blue > 255) ? false : this.run(ColorDef.from(red, green, blue));\n }\n}\n/** This tool changes the transparency of the base map.\n * @beta\n */\nexport class MapBaseTransparencyTool extends Tool {\n public static override toolId = \"SetMapBaseTransparencyTool\";\n public static override get minArgs() { return 1; }\n public static override get maxArgs() { return 1; }\n\n /** This method runs the tool, changing the transparency of the base map.\n * @param transparency a numeric value in range 0.0 to 1.0 whether 0.0 means fully opaque and 1.0 means fully transparent\n */\n public override async run(transparency: number) {\n const vp = IModelApp.viewManager.selectedView;\n if (undefined === vp || !vp.view.isSpatialView())\n return false;\n\n vp.displayStyle.changeBaseMapTransparency(transparency);\n vp.invalidateRenderPlan();\n\n return true;\n }\n\n /** Executes this tool's run method with args[0] containing `transparency`.\n * @see [[run]]\n */\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n const transparency = parseFloat(args[0]);\n\n return (isNaN(transparency) || transparency < 0 || transparency > 1) ? false : this.run(transparency);\n }\n}\n\n/** This tool changes the visibility of the base map.\n * @beta\n */\nexport class MapBaseVisibilityTool extends Tool {\n public static override toolId = \"SetMapBaseVisibilityTool\";\n public static override get minArgs() { return 1; }\n public static override get maxArgs() { return 1; }\n\n /** This method runs the tool, changing the visibility of the base map.\n * @param visible a boolean which specifies whether or not to make the base map visible\n */\n public override async run(visible: boolean) {\n const vp = IModelApp.viewManager.selectedView;\n if (undefined === vp || !vp.view.isSpatialView() || vp.displayStyle.backgroundMapBase instanceof ColorDef)\n return false;\n\n vp.displayStyle.backgroundMapBase = vp.displayStyle.backgroundMapBase.clone({ visible });\n vp.invalidateRenderPlan();\n\n return true;\n }\n\n /** Executes this tool's run method with args[0] containing `visible`.\n * @see [[run]]\n */\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n const visible = parseBoolean(args[0]);\n\n return (visible !== undefined ? this.run(visible) : false);\n }\n}\n"]}
@@ -11,6 +11,9 @@ exports.MeasureTileLoadTimeTool = void 0;
11
11
  const core_bentley_1 = require("@itwin/core-bentley");
12
12
  const core_frontend_1 = require("@itwin/core-frontend");
13
13
  class TileLoadTimer {
14
+ _vp;
15
+ _stopwatch;
16
+ _cleanup;
14
17
  constructor(vp) {
15
18
  this._vp = vp;
16
19
  this._stopwatch = new core_bentley_1.StopWatch();
@@ -49,6 +52,7 @@ class TileLoadTimer {
49
52
  * @beta
50
53
  */
51
54
  class MeasureTileLoadTimeTool extends core_frontend_1.Tool {
55
+ static toolId = "MeasureTileLoadTime";
52
56
  /** This method runs the tool, unloading all tile trees, then starts a timer that stops when all tile trees and tiles required for the view are ready. It will then output the elapsed time to notifications manager.
53
57
  * @param _args this parameter is unused
54
58
  */
@@ -60,5 +64,4 @@ class MeasureTileLoadTimeTool extends core_frontend_1.Tool {
60
64
  }
61
65
  }
62
66
  exports.MeasureTileLoadTimeTool = MeasureTileLoadTimeTool;
63
- MeasureTileLoadTimeTool.toolId = "MeasureTileLoadTime";
64
67
  //# sourceMappingURL=MeasureTileLoadTime.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MeasureTileLoadTime.js","sourceRoot":"","sources":["../../../src/tools/MeasureTileLoadTime.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F;;GAEG;AAEH,sDAAgD;AAChD,wDAA8G;AAE9G,MAAM,aAAa;IAKjB,YAAmB,EAAY;QAC7B,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC;QACd,IAAI,CAAC,UAAU,GAAG,IAAI,wBAAS,EAAE,CAAC;QAElC,mCAAmC;QACnC,yBAAS,CAAC,WAAW,CAAC,wBAAwB,CAAC,SAAS,CAAC,CAAC;QAE1D,MAAM,cAAc,GAAG,EAAE,CAAC,QAAQ,CAAC,WAAW,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;QACtE,MAAM,aAAa,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;QACrE,IAAI,CAAC,QAAQ,GAAG,GAAG,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,EAAE,CAAC,CAAC;QAExB,OAAO,IAAI,CAAC;IACd,CAAC;;AAZH,0DAaC;AAZwB,8BAAM,GAAG,qBAAqB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\n/** @packageDocumentation\n * @module Tools\n */\n\nimport { StopWatch } from \"@itwin/core-bentley\";\nimport { IModelApp, NotifyMessageDetails, OutputMessagePriority, Tool, Viewport } from \"@itwin/core-frontend\";\n\nclass TileLoadTimer {\n private readonly _vp: Viewport;\n private readonly _stopwatch: StopWatch;\n private _cleanup?: () => void;\n\n public constructor(vp: Viewport) {\n this._vp = vp;\n this._stopwatch = new StopWatch();\n\n // Purge tile trees for all models.\n IModelApp.viewManager.refreshForModifiedModels(undefined);\n\n const removeOnRender = vp.onRender.addListener(() => this.onRender());\n const removeOnClose = vp.iModel.onClose.addOnce(() => this.cancel());\n this._cleanup = () => {\n removeOnRender();\n removeOnClose();\n };\n\n IModelApp.notifications.outputMessage(new NotifyMessageDetails(OutputMessagePriority.Info, \"Tile loading timer started.\"));\n this._stopwatch.start();\n }\n\n private cancel(): void {\n IModelApp.notifications.outputMessage(new NotifyMessageDetails(OutputMessagePriority.Info, \"Tile loading timer canceled.\"));\n this.stop();\n }\n\n private stop(): void {\n if (undefined !== this._cleanup) {\n this._cleanup();\n this._cleanup = undefined;\n }\n }\n\n private onRender(): void {\n // ###TODO: May be intermediate frames during which children props have been asynchronously requested but no outstanding tile requests.\n if (!this._vp.areAllTileTreesLoaded || 0 < this._vp.numRequestedTiles)\n return;\n\n this._stopwatch.stop();\n IModelApp.notifications.outputMessage(new NotifyMessageDetails(OutputMessagePriority.Info, `Tiles loaded in ${this._stopwatch.elapsedSeconds.toFixed(4)} seconds.`));\n\n this.stop();\n }\n}\n\n/** Unloads all tile trees, then starts a timer that stops when all tile trees and tiles required for the view are ready.\n * Outputs the elapsed time to notifications manager.\n * @beta\n */\nexport class MeasureTileLoadTimeTool extends Tool {\n public static override toolId = \"MeasureTileLoadTime\";\n\n /** This method runs the tool, unloading all tile trees, then starts a timer that stops when all tile trees and tiles required for the view are ready. It will then output the elapsed time to notifications manager.\n * @param _args this parameter is unused\n */\n public override async run(_args: any[]): Promise<boolean> {\n const vp = IModelApp.viewManager.selectedView;\n if (undefined !== vp)\n new TileLoadTimer(vp);\n\n return true;\n }\n}\n"]}
1
+ {"version":3,"file":"MeasureTileLoadTime.js","sourceRoot":"","sources":["../../../src/tools/MeasureTileLoadTime.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F;;GAEG;AAEH,sDAAgD;AAChD,wDAA8G;AAE9G,MAAM,aAAa;IACA,GAAG,CAAW;IACd,UAAU,CAAY;IAC/B,QAAQ,CAAc;IAE9B,YAAmB,EAAY;QAC7B,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC;QACd,IAAI,CAAC,UAAU,GAAG,IAAI,wBAAS,EAAE,CAAC;QAElC,mCAAmC;QACnC,yBAAS,CAAC,WAAW,CAAC,wBAAwB,CAAC,SAAS,CAAC,CAAC;QAE1D,MAAM,cAAc,GAAG,EAAE,CAAC,QAAQ,CAAC,WAAW,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;QACtE,MAAM,aAAa,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;QACrE,IAAI,CAAC,QAAQ,GAAG,GAAG,EAAE;YACnB,cAAc,EAAE,CAAC;YACjB,aAAa,EAAE,CAAC;QAClB,CAAC,CAAC;QAEF,yBAAS,CAAC,aAAa,CAAC,aAAa,CAAC,IAAI,oCAAoB,CAAC,qCAAqB,CAAC,IAAI,EAAE,6BAA6B,CAAC,CAAC,CAAC;QAC3H,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;IAC1B,CAAC;IAEO,MAAM;QACZ,yBAAS,CAAC,aAAa,CAAC,aAAa,CAAC,IAAI,oCAAoB,CAAC,qCAAqB,CAAC,IAAI,EAAE,8BAA8B,CAAC,CAAC,CAAC;QAC5H,IAAI,CAAC,IAAI,EAAE,CAAC;IACd,CAAC;IAEO,IAAI;QACV,IAAI,SAAS,KAAK,IAAI,CAAC,QAAQ,EAAE,CAAC;YAChC,IAAI,CAAC,QAAQ,EAAE,CAAC;YAChB,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAC;QAC5B,CAAC;IACH,CAAC;IAEO,QAAQ;QACd,uIAAuI;QACvI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,qBAAqB,IAAI,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,iBAAiB;YACnE,OAAO;QAET,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC;QACvB,yBAAS,CAAC,aAAa,CAAC,aAAa,CAAC,IAAI,oCAAoB,CAAC,qCAAqB,CAAC,IAAI,EAAE,mBAAmB,IAAI,CAAC,UAAU,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC;QAErK,IAAI,CAAC,IAAI,EAAE,CAAC;IACd,CAAC;CACF;AAED;;;GAGG;AACH,MAAa,uBAAwB,SAAQ,oBAAI;IACxC,MAAM,CAAU,MAAM,GAAG,qBAAqB,CAAC;IAEtD;;OAEG;IACa,KAAK,CAAC,GAAG,CAAC,KAAY;QACpC,MAAM,EAAE,GAAG,yBAAS,CAAC,WAAW,CAAC,YAAY,CAAC;QAC9C,IAAI,SAAS,KAAK,EAAE;YAClB,IAAI,aAAa,CAAC,EAAE,CAAC,CAAC;QAExB,OAAO,IAAI,CAAC;IACd,CAAC;;AAZH,0DAaC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\n/** @packageDocumentation\n * @module Tools\n */\n\nimport { StopWatch } from \"@itwin/core-bentley\";\nimport { IModelApp, NotifyMessageDetails, OutputMessagePriority, Tool, Viewport } from \"@itwin/core-frontend\";\n\nclass TileLoadTimer {\n private readonly _vp: Viewport;\n private readonly _stopwatch: StopWatch;\n private _cleanup?: () => void;\n\n public constructor(vp: Viewport) {\n this._vp = vp;\n this._stopwatch = new StopWatch();\n\n // Purge tile trees for all models.\n IModelApp.viewManager.refreshForModifiedModels(undefined);\n\n const removeOnRender = vp.onRender.addListener(() => this.onRender());\n const removeOnClose = vp.iModel.onClose.addOnce(() => this.cancel());\n this._cleanup = () => {\n removeOnRender();\n removeOnClose();\n };\n\n IModelApp.notifications.outputMessage(new NotifyMessageDetails(OutputMessagePriority.Info, \"Tile loading timer started.\"));\n this._stopwatch.start();\n }\n\n private cancel(): void {\n IModelApp.notifications.outputMessage(new NotifyMessageDetails(OutputMessagePriority.Info, \"Tile loading timer canceled.\"));\n this.stop();\n }\n\n private stop(): void {\n if (undefined !== this._cleanup) {\n this._cleanup();\n this._cleanup = undefined;\n }\n }\n\n private onRender(): void {\n // ###TODO: May be intermediate frames during which children props have been asynchronously requested but no outstanding tile requests.\n if (!this._vp.areAllTileTreesLoaded || 0 < this._vp.numRequestedTiles)\n return;\n\n this._stopwatch.stop();\n IModelApp.notifications.outputMessage(new NotifyMessageDetails(OutputMessagePriority.Info, `Tiles loaded in ${this._stopwatch.elapsedSeconds.toFixed(4)} seconds.`));\n\n this.stop();\n }\n}\n\n/** Unloads all tile trees, then starts a timer that stops when all tile trees and tiles required for the view are ready.\n * Outputs the elapsed time to notifications manager.\n * @beta\n */\nexport class MeasureTileLoadTimeTool extends Tool {\n public static override toolId = \"MeasureTileLoadTime\";\n\n /** This method runs the tool, unloading all tile trees, then starts a timer that stops when all tile trees and tiles required for the view are ready. It will then output the elapsed time to notifications manager.\n * @param _args this parameter is unused\n */\n public override async run(_args: any[]): Promise<boolean> {\n const vp = IModelApp.viewManager.selectedView;\n if (undefined !== vp)\n new TileLoadTimer(vp);\n\n return true;\n }\n}\n"]}
@@ -30,6 +30,7 @@ function modelChangedString(name) {
30
30
  * @beta
31
31
  */
32
32
  class SetModelTransparencyTool extends core_frontend_1.Tool {
33
+ static toolId = "SetModelTransparencyTool";
33
34
  static get minArgs() { return 1; }
34
35
  static get maxArgs() { return 2; }
35
36
  async run(transparency, name) {
@@ -43,11 +44,11 @@ class SetModelTransparencyTool extends core_frontend_1.Tool {
43
44
  }
44
45
  }
45
46
  exports.SetModelTransparencyTool = SetModelTransparencyTool;
46
- SetModelTransparencyTool.toolId = "SetModelTransparencyTool";
47
47
  /** Set model appearance override for line weight in display style.
48
48
  * @beta
49
49
  */
50
50
  class SetModelLineWeightTool extends core_frontend_1.Tool {
51
+ static toolId = "SetModelLineWeightTool";
51
52
  static get minArgs() { return 1; }
52
53
  static get maxArgs() { return 2; }
53
54
  async run(weight, name) {
@@ -61,13 +62,14 @@ class SetModelLineWeightTool extends core_frontend_1.Tool {
61
62
  }
62
63
  }
63
64
  exports.SetModelLineWeightTool = SetModelLineWeightTool;
64
- SetModelLineWeightTool.toolId = "SetModelLineWeightTool";
65
65
  /** Set model appearance override for line code in display style.
66
66
  * @beta
67
67
  */
68
68
  class SetModelLineCodeTool extends core_frontend_1.Tool {
69
+ static toolId = "SetModelLineCodeTool";
69
70
  static get minArgs() { return 1; }
70
71
  static get maxArgs() { return 2; }
72
+ static linePixels = [core_common_1.LinePixels.Code0, core_common_1.LinePixels.Code1, core_common_1.LinePixels.Code2, core_common_1.LinePixels.Code3, core_common_1.LinePixels.Code4, core_common_1.LinePixels.Code5, core_common_1.LinePixels.Code6, core_common_1.LinePixels.Code7];
71
73
  async run(lineCode, name) {
72
74
  if (lineCode < 0 || lineCode >= SetModelLineCodeTool.linePixels.length)
73
75
  return false;
@@ -81,12 +83,11 @@ class SetModelLineCodeTool extends core_frontend_1.Tool {
81
83
  }
82
84
  }
83
85
  exports.SetModelLineCodeTool = SetModelLineCodeTool;
84
- SetModelLineCodeTool.toolId = "SetModelLineCodeTool";
85
- SetModelLineCodeTool.linePixels = [core_common_1.LinePixels.Code0, core_common_1.LinePixels.Code1, core_common_1.LinePixels.Code2, core_common_1.LinePixels.Code3, core_common_1.LinePixels.Code4, core_common_1.LinePixels.Code5, core_common_1.LinePixels.Code6, core_common_1.LinePixels.Code7];
86
86
  /** Set model appearance override for nonLocatable in display style.
87
87
  * @beta
88
88
  */
89
89
  class SetModelLocateTool extends core_frontend_1.Tool {
90
+ static toolId = "SetModelLocateTool";
90
91
  static get minArgs() { return 1; }
91
92
  static get maxArgs() { return 2; }
92
93
  async run(locate, name) {
@@ -102,11 +103,11 @@ class SetModelLocateTool extends core_frontend_1.Tool {
102
103
  }
103
104
  }
104
105
  exports.SetModelLocateTool = SetModelLocateTool;
105
- SetModelLocateTool.toolId = "SetModelLocateTool";
106
106
  /** Set model appearance override for emphasized in display style.
107
107
  * @beta
108
108
  */
109
109
  class SetModelEmphasizedTool extends core_frontend_1.Tool {
110
+ static toolId = "SetModelEmphasizedTool";
110
111
  static get minArgs() { return 1; }
111
112
  static get maxArgs() { return 2; }
112
113
  async run(emphasized, name) {
@@ -121,11 +122,11 @@ class SetModelEmphasizedTool extends core_frontend_1.Tool {
121
122
  }
122
123
  }
123
124
  exports.SetModelEmphasizedTool = SetModelEmphasizedTool;
124
- SetModelEmphasizedTool.toolId = "SetModelEmphasizedTool";
125
125
  /** Set model appearance override for ignoreMaterials in display style.
126
126
  * @beta
127
127
  */
128
128
  class SetModelIgnoresMaterialsTool extends core_frontend_1.Tool {
129
+ static toolId = "SetModelIgnoresMaterialsTool";
129
130
  static get minArgs() { return 1; }
130
131
  static get maxArgs() { return 2; }
131
132
  async run(ignoresMaterial, name) {
@@ -140,11 +141,11 @@ class SetModelIgnoresMaterialsTool extends core_frontend_1.Tool {
140
141
  }
141
142
  }
142
143
  exports.SetModelIgnoresMaterialsTool = SetModelIgnoresMaterialsTool;
143
- SetModelIgnoresMaterialsTool.toolId = "SetModelIgnoresMaterialsTool";
144
144
  /** Set model appearance override for color in display style.
145
145
  * @beta
146
146
  */
147
147
  class SetModelColorTool extends core_frontend_1.Tool {
148
+ static toolId = "SetModelColorTool";
148
149
  static get minArgs() { return 3; }
149
150
  static get maxArgs() { return 4; }
150
151
  async run(rgb, name) {
@@ -158,11 +159,11 @@ class SetModelColorTool extends core_frontend_1.Tool {
158
159
  }
159
160
  }
160
161
  exports.SetModelColorTool = SetModelColorTool;
161
- SetModelColorTool.toolId = "SetModelColorTool";
162
162
  /** clear model appearance overrides in display style.
163
163
  * @beta
164
164
  */
165
165
  class ClearModelAppearanceOverrides extends core_frontend_1.Tool {
166
+ static toolId = "ClearModelAppearanceOverrides";
166
167
  static get minArgs() { return 0; }
167
168
  static get maxArgs() { return 1; }
168
169
  async run(name) {
@@ -180,5 +181,4 @@ class ClearModelAppearanceOverrides extends core_frontend_1.Tool {
180
181
  }
181
182
  }
182
183
  exports.ClearModelAppearanceOverrides = ClearModelAppearanceOverrides;
183
- ClearModelAppearanceOverrides.toolId = "ClearModelAppearanceOverrides";
184
184
  //# sourceMappingURL=ModelAppearanceTools.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ModelAppearanceTools.js","sourceRoot":"","sources":["../../../src/tools/ModelAppearanceTools.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F;;GAEG;AAEH,oDAA0G;AAC1G,wDAAgI;AAChI,iDAA8C;AAE9C,SAAS,8BAA8B,CAAC,EAAwB,EAAE,SAAiC,EAAE,IAAY;IAC/G,IAAI,OAAO,GAAG,KAAK,CAAC;IACpB,IAAI,EAAE,KAAK,SAAS,IAAI,EAAE,CAAC,IAAI,YAAY,gCAAgB;QACzD,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,KAAK,EAAE,EAAE;YAC7B,IAAI,IAAI,KAAK,SAAS,IAAI,KAAK,CAAC,IAAI,KAAK,IAAI,EAAE,CAAC;gBAC9C,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gB,EAAE,CAAC;YAC5D,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,KAAK,EAAE,EAAE;gBAC7B,IAAI,IAAI,KAAK,SAAS,IAAI,KAAK,CAAC,IAAI,KAAK,IAAI;oBAC3C,EAAE,CAAC,2BAA2B,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;YAC7C,CAAC,CAAC,CAAC;QACL,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;IAEe,KAAK,CAAC,WAAW,CAAC,GAAG,IAAc;QACjD,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IAC3B,CAAC;;AAnBH,sEAoBC;AAnBwB,oCAAM,GAAG,+BAA+B,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\n/** @packageDocumentation\n * @module Tools\n */\n\nimport { FeatureAppearance, FeatureAppearanceProps, LinePixels, RgbColorProps } from \"@itwin/core-common\";\nimport { IModelApp, NotifyMessageDetails, OutputMessagePriority, SpatialViewState, Tool, Viewport } from \"@itwin/core-frontend\";\nimport { parseBoolean } from \"./parseBoolean\";\n\nfunction changeModelAppearanceOverrides(vp: Viewport | undefined, overrides: FeatureAppearanceProps, name: string): boolean {\n let changed = false;\n if (vp !== undefined && vp.view instanceof SpatialViewState)\n vp.view.forEachModel((model) => {\n if (name === undefined || model.name === name) {\n changed = true;\n const existingOverrides = vp.displayStyle.settings.getModelAppearanceOverride(model.id);\n vp.overrideModelAppearance(model.id, existingOverrides ? existingOverrides.clone(overrides) : FeatureAppearance.fromJSON(overrides));\n }\n });\n\n return changed;\n}\n\nfunction modelChangedString(name: string) {\n return name === undefined ? `All Models` : `Model: ${name}`;\n}\n\n/** Set model appearance override for transparency in display style.\n * @beta\n */\nexport class SetModelTransparencyTool extends Tool {\n public static override toolId = \"SetModelTransparencyTool\";\n public static override get minArgs() { return 1; }\n public static override get maxArgs() { return 2; }\n\n public override async run(transparency: number, name: string): Promise<boolean> {\n const changed = changeModelAppearanceOverrides(IModelApp.viewManager.selectedView, { transparency }, name);\n\n if (changed)\n IModelApp.notifications.outputMessage(new NotifyMessageDetails(OutputMessagePriority.Info, `${modelChangedString(name)} set to transparency: ${transparency}`));\n\n return changed;\n }\n\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n return this.run(parseFloat(args[0]), args[1]);\n }\n}\n\n/** Set model appearance override for line weight in display style.\n * @beta\n */\nexport class SetModelLineWeightTool extends Tool {\n public static override toolId = \"SetModelLineWeightTool\";\n public static override get minArgs() { return 1; }\n public static override get maxArgs() { return 2; }\n\n public override async run(weight: number, name: string): Promise<boolean> {\n const changed = changeModelAppearanceOverrides(IModelApp.viewManager.selectedView, { weight }, name);\n\n if (changed)\n IModelApp.notifications.outputMessage(new NotifyMessageDetails(OutputMessagePriority.Info, `${modelChangedString(name)} set to line weight: ${weight}`));\n\n return changed;\n }\n\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n return this.run(parseFloat(args[0]), args[1]);\n }\n}\n\n/** Set model appearance override for line code in display style.\n * @beta\n */\nexport class SetModelLineCodeTool extends Tool {\n public static override toolId = \"SetModelLineCodeTool\";\n public static override get minArgs() { return 1; }\n public static override get maxArgs() { return 2; }\n public static linePixels = [LinePixels.Code0, LinePixels.Code1, LinePixels.Code2, LinePixels.Code3, LinePixels.Code4, LinePixels.Code5, LinePixels.Code6, LinePixels.Code7];\n\n public override async run(lineCode: number, name: string): Promise<boolean> {\n if (lineCode < 0 || lineCode >= SetModelLineCodeTool.linePixels.length)\n return false;\n\n const changed = changeModelAppearanceOverrides(IModelApp.viewManager.selectedView, { linePixels: SetModelLineCodeTool.linePixels[lineCode] }, name);\n\n if (changed)\n IModelApp.notifications.outputMessage(new NotifyMessageDetails(OutputMessagePriority.Info, `${modelChangedString(name)} set to line code: ${lineCode}`));\n\n return changed;\n }\n\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n return this.run(parseFloat(args[0]), args[1]);\n }\n}\n\n/** Set model appearance override for nonLocatable in display style.\n * @beta\n */\nexport class SetModelLocateTool extends Tool {\n public static override toolId = \"SetModelLocateTool\";\n public static override get minArgs() { return 1; }\n public static override get maxArgs() { return 2; }\n\n public override async run(locate: boolean, name: string): Promise<boolean> {\n const nonLocatable = locate ? undefined : true;\n const changed = changeModelAppearanceOverrides(IModelApp.viewManager.selectedView, { nonLocatable }, name);\n\n if (changed)\n IModelApp.notifications.outputMessage(new NotifyMessageDetails(OutputMessagePriority.Info, `${modelChangedString(name)} set to locate: ${locate}`));\n\n return changed;\n }\n\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n const locate = parseBoolean(args[0]);\n return locate === undefined ? false : this.run(locate, args[1]);\n }\n}\n\n/** Set model appearance override for emphasized in display style.\n * @beta\n */\nexport class SetModelEmphasizedTool extends Tool {\n public static override toolId = \"SetModelEmphasizedTool\";\n public static override get minArgs() { return 1; }\n public static override get maxArgs() { return 2; }\n\n public override async run(emphasized: true | undefined, name: string): Promise<boolean> {\n const changed = changeModelAppearanceOverrides(IModelApp.viewManager.selectedView, { emphasized }, name);\n\n if (changed)\n IModelApp.notifications.outputMessage(new NotifyMessageDetails(OutputMessagePriority.Info, `Mode: ${name} set to emphasized: ${emphasized}`));\n\n return changed;\n }\n\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n const emphasized = parseBoolean(args[0]);\n return emphasized === undefined ? false : this.run(emphasized ? true : undefined, args[1]);\n }\n}\n\n/** Set model appearance override for ignoreMaterials in display style.\n * @beta\n */\nexport class SetModelIgnoresMaterialsTool extends Tool {\n public static override toolId = \"SetModelIgnoresMaterialsTool\";\n public static override get minArgs() { return 1; }\n public static override get maxArgs() { return 2; }\n\n public override async run(ignoresMaterial: true | undefined, name: string): Promise<boolean> {\n const changed = changeModelAppearanceOverrides(IModelApp.viewManager.selectedView, { ignoresMaterial }, name);\n\n if (changed)\n IModelApp.notifications.outputMessage(new NotifyMessageDetails(OutputMessagePriority.Info, `Mode: ${name} set to ignore Materials: ${ignoresMaterial}`));\n\n return changed;\n }\n\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n const ignoresMaterial = parseBoolean(args[0]);\n return ignoresMaterial === undefined ? false : this.run(ignoresMaterial ? true : undefined, args[1]);\n }\n}\n\n/** Set model appearance override for color in display style.\n * @beta\n */\nexport class SetModelColorTool extends Tool {\n public static override toolId = \"SetModelColorTool\";\n public static override get minArgs() { return 3; }\n public static override get maxArgs() { return 4; }\n\n public override async run(rgb: RgbColorProps, name: string): Promise<boolean> {\n const changed = changeModelAppearanceOverrides(IModelApp.viewManager.selectedView, { rgb }, name);\n\n if (changed)\n IModelApp.notifications.outputMessage(new NotifyMessageDetails(OutputMessagePriority.Info, `${modelChangedString(name)} set to RGB color: (${rgb.r}, ${rgb.g}, ${rgb.b})`));\n\n return true;\n }\n\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n return this.run({ r: parseFloat(args[0]), g: parseFloat(args[1]), b: parseFloat(args[2]) }, args[3]);\n }\n}\n\n/** clear model appearance overrides in display style.\n * @beta\n */\nexport class ClearModelAppearanceOverrides extends Tool {\n public static override toolId = \"ClearModelAppearanceOverrides\";\n public static override get minArgs() { return 0; }\n public static override get maxArgs() { return 1; }\n\n public override async run(name?: string): Promise<boolean> {\n const vp = IModelApp.viewManager.selectedView;\n if (vp !== undefined && vp.view instanceof SpatialViewState) {\n vp.view.forEachModel((model) => {\n if (name === undefined || model.name === name)\n vp.dropModelAppearanceOverride(model.id);\n });\n }\n\n return true;\n }\n\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n return this.run(args[0]);\n }\n}\n"]}
1
+ {"version":3,"file":"ModelAppearanceTools.js","sourceRoot":"","sources":["../../../src/tools/ModelAppearanceTools.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F;;GAEG;AAEH,oDAA0G;AAC1G,wDAAgI;AAChI,iDAA8C;A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;IACvG,CAAC;;AAhBH,8CAiBC;AAED;;GAEG;AACH,MAAa,6BAA8B,SAAQ,oBAAI;IAC9C,MAAM,CAAU,MAAM,GAAG,+BAA+B,CAAC;IACzD,MAAM,KAAc,OAAO,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC;IAC3C,MAAM,KAAc,OAAO,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC;IAElC,KAAK,CAAC,GAAG,CAAC,IAAa;QACrC,MAAM,EAAE,GAAG,yBAAS,CAAC,WAAW,CAAC,YAAY,CAAC;QAC9C,IAAI,EAAE,KAAK,SAAS,IAAI,EAAE,CAAC,IAAI,YAAY,gCAAgB,EAAE,CAAC;YAC5D,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,KAAK,EAAE,EAAE;gBAC7B,IAAI,IAAI,KAAK,SAAS,IAAI,KAAK,CAAC,IAAI,KAAK,IAAI;oBAC3C,EAAE,CAAC,2BAA2B,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;YAC7C,CAAC,CAAC,CAAC;QACL,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;IAEe,KAAK,CAAC,WAAW,CAAC,GAAG,IAAc;QACjD,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IAC3B,CAAC;;AAnBH,sEAoBC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\n/** @packageDocumentation\n * @module Tools\n */\n\nimport { FeatureAppearance, FeatureAppearanceProps, LinePixels, RgbColorProps } from \"@itwin/core-common\";\nimport { IModelApp, NotifyMessageDetails, OutputMessagePriority, SpatialViewState, Tool, Viewport } from \"@itwin/core-frontend\";\nimport { parseBoolean } from \"./parseBoolean\";\n\nfunction changeModelAppearanceOverrides(vp: Viewport | undefined, overrides: FeatureAppearanceProps, name: string): boolean {\n let changed = false;\n if (vp !== undefined && vp.view instanceof SpatialViewState)\n vp.view.forEachModel((model) => {\n if (name === undefined || model.name === name) {\n changed = true;\n const existingOverrides = vp.displayStyle.settings.getModelAppearanceOverride(model.id);\n vp.overrideModelAppearance(model.id, existingOverrides ? existingOverrides.clone(overrides) : FeatureAppearance.fromJSON(overrides));\n }\n });\n\n return changed;\n}\n\nfunction modelChangedString(name: string) {\n return name === undefined ? `All Models` : `Model: ${name}`;\n}\n\n/** Set model appearance override for transparency in display style.\n * @beta\n */\nexport class SetModelTransparencyTool extends Tool {\n public static override toolId = \"SetModelTransparencyTool\";\n public static override get minArgs() { return 1; }\n public static override get maxArgs() { return 2; }\n\n public override async run(transparency: number, name: string): Promise<boolean> {\n const changed = changeModelAppearanceOverrides(IModelApp.viewManager.selectedView, { transparency }, name);\n\n if (changed)\n IModelApp.notifications.outputMessage(new NotifyMessageDetails(OutputMessagePriority.Info, `${modelChangedString(name)} set to transparency: ${transparency}`));\n\n return changed;\n }\n\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n return this.run(parseFloat(args[0]), args[1]);\n }\n}\n\n/** Set model appearance override for line weight in display style.\n * @beta\n */\nexport class SetModelLineWeightTool extends Tool {\n public static override toolId = \"SetModelLineWeightTool\";\n public static override get minArgs() { return 1; }\n public static override get maxArgs() { return 2; }\n\n public override async run(weight: number, name: string): Promise<boolean> {\n const changed = changeModelAppearanceOverrides(IModelApp.viewManager.selectedView, { weight }, name);\n\n if (changed)\n IModelApp.notifications.outputMessage(new NotifyMessageDetails(OutputMessagePriority.Info, `${modelChangedString(name)} set to line weight: ${weight}`));\n\n return changed;\n }\n\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n return this.run(parseFloat(args[0]), args[1]);\n }\n}\n\n/** Set model appearance override for line code in display style.\n * @beta\n */\nexport class SetModelLineCodeTool extends Tool {\n public static override toolId = \"SetModelLineCodeTool\";\n public static override get minArgs() { return 1; }\n public static override get maxArgs() { return 2; }\n public static linePixels = [LinePixels.Code0, LinePixels.Code1, LinePixels.Code2, LinePixels.Code3, LinePixels.Code4, LinePixels.Code5, LinePixels.Code6, LinePixels.Code7];\n\n public override async run(lineCode: number, name: string): Promise<boolean> {\n if (lineCode < 0 || lineCode >= SetModelLineCodeTool.linePixels.length)\n return false;\n\n const changed = changeModelAppearanceOverrides(IModelApp.viewManager.selectedView, { linePixels: SetModelLineCodeTool.linePixels[lineCode] }, name);\n\n if (changed)\n IModelApp.notifications.outputMessage(new NotifyMessageDetails(OutputMessagePriority.Info, `${modelChangedString(name)} set to line code: ${lineCode}`));\n\n return changed;\n }\n\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n return this.run(parseFloat(args[0]), args[1]);\n }\n}\n\n/** Set model appearance override for nonLocatable in display style.\n * @beta\n */\nexport class SetModelLocateTool extends Tool {\n public static override toolId = \"SetModelLocateTool\";\n public static override get minArgs() { return 1; }\n public static override get maxArgs() { return 2; }\n\n public override async run(locate: boolean, name: string): Promise<boolean> {\n const nonLocatable = locate ? undefined : true;\n const changed = changeModelAppearanceOverrides(IModelApp.viewManager.selectedView, { nonLocatable }, name);\n\n if (changed)\n IModelApp.notifications.outputMessage(new NotifyMessageDetails(OutputMessagePriority.Info, `${modelChangedString(name)} set to locate: ${locate}`));\n\n return changed;\n }\n\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n const locate = parseBoolean(args[0]);\n return locate === undefined ? false : this.run(locate, args[1]);\n }\n}\n\n/** Set model appearance override for emphasized in display style.\n * @beta\n */\nexport class SetModelEmphasizedTool extends Tool {\n public static override toolId = \"SetModelEmphasizedTool\";\n public static override get minArgs() { return 1; }\n public static override get maxArgs() { return 2; }\n\n public override async run(emphasized: true | undefined, name: string): Promise<boolean> {\n const changed = changeModelAppearanceOverrides(IModelApp.viewManager.selectedView, { emphasized }, name);\n\n if (changed)\n IModelApp.notifications.outputMessage(new NotifyMessageDetails(OutputMessagePriority.Info, `Mode: ${name} set to emphasized: ${emphasized}`));\n\n return changed;\n }\n\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n const emphasized = parseBoolean(args[0]);\n return emphasized === undefined ? false : this.run(emphasized ? true : undefined, args[1]);\n }\n}\n\n/** Set model appearance override for ignoreMaterials in display style.\n * @beta\n */\nexport class SetModelIgnoresMaterialsTool extends Tool {\n public static override toolId = \"SetModelIgnoresMaterialsTool\";\n public static override get minArgs() { return 1; }\n public static override get maxArgs() { return 2; }\n\n public override async run(ignoresMaterial: true | undefined, name: string): Promise<boolean> {\n const changed = changeModelAppearanceOverrides(IModelApp.viewManager.selectedView, { ignoresMaterial }, name);\n\n if (changed)\n IModelApp.notifications.outputMessage(new NotifyMessageDetails(OutputMessagePriority.Info, `Mode: ${name} set to ignore Materials: ${ignoresMaterial}`));\n\n return changed;\n }\n\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n const ignoresMaterial = parseBoolean(args[0]);\n return ignoresMaterial === undefined ? false : this.run(ignoresMaterial ? true : undefined, args[1]);\n }\n}\n\n/** Set model appearance override for color in display style.\n * @beta\n */\nexport class SetModelColorTool extends Tool {\n public static override toolId = \"SetModelColorTool\";\n public static override get minArgs() { return 3; }\n public static override get maxArgs() { return 4; }\n\n public override async run(rgb: RgbColorProps, name: string): Promise<boolean> {\n const changed = changeModelAppearanceOverrides(IModelApp.viewManager.selectedView, { rgb }, name);\n\n if (changed)\n IModelApp.notifications.outputMessage(new NotifyMessageDetails(OutputMessagePriority.Info, `${modelChangedString(name)} set to RGB color: (${rgb.r}, ${rgb.g}, ${rgb.b})`));\n\n return true;\n }\n\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n return this.run({ r: parseFloat(args[0]), g: parseFloat(args[1]), b: parseFloat(args[2]) }, args[3]);\n }\n}\n\n/** clear model appearance overrides in display style.\n * @beta\n */\nexport class ClearModelAppearanceOverrides extends Tool {\n public static override toolId = \"ClearModelAppearanceOverrides\";\n public static override get minArgs() { return 0; }\n public static override get maxArgs() { return 1; }\n\n public override async run(name?: string): Promise<boolean> {\n const vp = IModelApp.viewManager.selectedView;\n if (vp !== undefined && vp.view instanceof SpatialViewState) {\n vp.view.forEachModel((model) => {\n if (name === undefined || model.name === name)\n vp.dropModelAppearanceOverride(model.id);\n });\n }\n\n return true;\n }\n\n public override async parseAndRun(...args: string[]): Promise<boolean> {\n return this.run(args[0]);\n }\n}\n"]}
@@ -17,12 +17,10 @@ const parseArgs_1 = require("./parseArgs");
17
17
  * @beta
18
18
  */
19
19
  class DumpPlanProjectionSettingsTool extends DisplayStyleTools_1.DisplayStyleTool {
20
- constructor() {
21
- super(...arguments);
22
- this._copyToClipboard = false;
23
- }
20
+ static toolId = "DumpLayerSettings";
24
21
  static get minArgs() { return 0; }
25
22
  static get maxArgs() { return 1; }
23
+ _copyToClipboard = false;
26
24
  get require3d() { return true; }
27
25
  async parse(args) {
28
26
  if (1 === args.length)
@@ -47,17 +45,15 @@ class DumpPlanProjectionSettingsTool extends DisplayStyleTools_1.DisplayStyleToo
47
45
  }
48
46
  }
49
47
  exports.DumpPlanProjectionSettingsTool = DumpPlanProjectionSettingsTool;
50
- DumpPlanProjectionSettingsTool.toolId = "DumpLayerSettings";
51
48
  /** Changes subcategory display priority.
52
49
  * @beta
53
50
  */
54
51
  class OverrideSubCategoryPriorityTool extends DisplayStyleTools_1.DisplayStyleTool {
55
- constructor() {
56
- super(...arguments);
57
- this._subcatIds = new Set();
58
- }
52
+ static toolId = "OverrideSubCategoryPriority";
59
53
  static get minArgs() { return 1; }
60
54
  static get maxArgs() { return 2; }
55
+ _subcatIds = new Set();
56
+ _priority;
61
57
  async execute(vp) {
62
58
  const style = vp.displayStyle;
63
59
  for (const id of this._subcatIds) {
@@ -84,17 +80,15 @@ class OverrideSubCategoryPriorityTool extends DisplayStyleTools_1.DisplayStyleTo
84
80
  }
85
81
  }
86
82
  exports.OverrideSubCategoryPriorityTool = OverrideSubCategoryPriorityTool;
87
- OverrideSubCategoryPriorityTool.toolId = "OverrideSubCategoryPriority";
88
83
  /** Changes plan projection settings for one or more models.
89
84
  * @beta
90
85
  */
91
86
  class ChangePlanProjectionSettingsTool extends DisplayStyleTools_1.DisplayStyleTool {
92
- constructor() {
93
- super(...arguments);
94
- this._modelIds = new Set();
95
- }
87
+ static toolId = "ChangeLayerSettings";
96
88
  static get minArgs() { return 1; }
97
89
  static get maxArgs() { return 5; }
90
+ _modelIds = new Set();
91
+ _settings;
98
92
  get require3d() { return true; }
99
93
  async execute(vp) {
100
94
  const settings = vp.displayStyle.settings;
@@ -146,5 +140,4 @@ class ChangePlanProjectionSettingsTool extends DisplayStyleTools_1.DisplayStyleT
146
140
  }
147
141
  }
148
142
  exports.ChangePlanProjectionSettingsTool = ChangePlanProjectionSettingsTool;
149
- ChangePlanProjectionSettingsTool.toolId = "ChangeLayerSettings";
150
143
  //# sourceMappingURL=PlanProjectionTools.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PlanProjectionTools.js","sourceRoot":"","sources":["../../../src/tools/PlanProjectionTools.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F;;GAEG;AAEH,oDAA8G;AAC9G,wDAAyI;AACzI,8DAA8D;AAC9D,2DAAuD;AACvD,2CAAwC;AAExC;;GAEG;AACH,MAAa,8BAA+B,SAAQ,oCAAgB;IAApE;;QAKU,qBAAgB,GAAG,KAAK,CAAC;IA+BnC,CAAC;IAlCQ,MAAM,KAAc,OAAO,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC;IAC3C,MAAM,KAAc,OAAO,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC;IAIlD,IAAuB,SAAS,KAAK,OAAO,IAAI,CAAC,CAAC,CAAC;IAEzC,KAAK,CAAC,KAAK,CAAC,IAAc;QAClC,IAAI,CAAC,KAAK,IAAI,CAAC,MAAM;YACnB,IAAI,CAAC,gBAAgB,GAAG,GAAG,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;QAExD,OAAO,IAAI,CAAC;IACd,CAAC;IAES,KAAK,CAAC,OAAO,CAAC,EA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BAAqB,AAAxB,CAAyB","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\n/** @packageDocumentation\n * @module Tools\n */\n\nimport { PlanProjectionSettings, PlanProjectionSettingsProps, SubCategoryOverride } from \"@itwin/core-common\";\nimport { DisplayStyle3dState, IModelApp, ModelState, NotifyMessageDetails, OutputMessagePriority, Viewport } from \"@itwin/core-frontend\";\nimport { copyStringToClipboard } from \"../ClipboardUtilities\";\nimport { DisplayStyleTool } from \"./DisplayStyleTools\";\nimport { parseArgs } from \"./parseArgs\";\n\n/** Dumps a JSON representation of the plan projection settings for the current viewport.\n * @beta\n */\nexport class DumpPlanProjectionSettingsTool extends DisplayStyleTool {\n public static override toolId = \"DumpLayerSettings\";\n public static override get minArgs() { return 0; }\n public static override get maxArgs() { return 1; }\n\n private _copyToClipboard = false;\n\n protected override get require3d() { return true; }\n\n protected async parse(args: string[]) {\n if (1 === args.length)\n this._copyToClipboard = \"c\" === args[0].toLowerCase();\n\n return true;\n }\n\n protected async execute(vp: Viewport) {\n const settings = (vp.displayStyle as DisplayStyle3dState).settings.planProjectionSettings;\n if (undefined === settings) {\n IModelApp.notifications.outputMessage(new NotifyMessageDetails(OutputMessagePriority.Info, \"No plan projection settings defined\"));\n return false;\n }\n\n const props = [];\n for (const [modelId, value] of settings)\n props.push({ modelId, settings: value.toJSON() });\n\n const json = JSON.stringify(props);\n if (this._copyToClipboard)\n copyStringToClipboard(json);\n\n const messageDetails = new NotifyMessageDetails(OutputMessagePriority.Info, \"Dumped plan projection settings\", json);\n IModelApp.notifications.outputMessage(messageDetails);\n\n return false;\n }\n}\n\n/** Changes subcategory display priority.\n * @beta\n */\nexport abstract class OverrideSubCategoryPriorityTool extends DisplayStyleTool {\n public static override toolId = \"OverrideSubCategoryPriority\";\n public static override get minArgs() { return 1; }\n public static override get maxArgs() { return 2; }\n\n private readonly _subcatIds = new Set<string>();\n private _priority?: number;\n\n protected async execute(vp: Viewport) {\n const style = vp.displayStyle;\n for (const id of this._subcatIds) {\n const ovr = style.getSubCategoryOverride(id);\n if (undefined === ovr) {\n if (undefined !== this._priority)\n style.overrideSubCategory(id, SubCategoryOverride.fromJSON({ priority: this._priority }));\n } else {\n const props = ovr.toJSON();\n props.priority = this._priority;\n style.overrideSubCategory(id, SubCategoryOverride.fromJSON(props));\n }\n }\n\n return true;\n }\n\n protected async parse(args: string[]) {\n for (const id of args[0].split(\",\"))\n this._subcatIds.add(id);\n\n const priority = parseInt(args[1], 10);\n if (!Number.isNaN(priority))\n this._priority = priority;\n\n return true;\n }\n}\n\n/** Changes plan projection settings for one or more models.\n * @beta\n */\nexport abstract class ChangePlanProjectionSettingsTool extends DisplayStyleTool {\n public static override toolId = \"ChangeLayerSettings\";\n public static override get minArgs() { return 1; }\n public static override get maxArgs() { return 5; }\n\n private readonly _modelIds = new Set<string>();\n private _settings?: PlanProjectionSettings;\n\n protected override get require3d() { return true; }\n\n protected async execute(vp: Viewport) {\n const settings = (vp.displayStyle as DisplayStyle3dState).settings;\n for (const modelId of this._modelIds)\n settings.setPlanProjectionSettings(modelId, this._settings);\n\n return true;\n }\n\n protected async parse(inputArgs: string[]) {\n if (!this.parseModels(inputArgs[0]))\n return false;\n\n const args = parseArgs(inputArgs.slice(1));\n const props: PlanProjectionSettingsProps = {};\n\n props.transparency = args.getFloat(\"t\");\n props.overlay = args.getBoolean(\"o\");\n props.enforceDisplayPriority = args.getBoolean(\"p\");\n props.elevation = args.getFloat(\"e\");\n\n this._settings = PlanProjectionSettings.fromJSON(props);\n return true;\n }\n\n private parseModels(models: string) {\n const vp = IModelApp.viewManager.selectedView!; // already validated by super.parseAndRun\n models = models.toLowerCase();\n\n const isPlanProjection = (modelId: string) => {\n const model = vp.iModel.models.getLoaded(modelId);\n return undefined !== model && isPlanProjectionModel(model);\n };\n const isPlanProjectionModel = (model: ModelState) => {\n const model3d = model.asGeometricModel3d;\n return undefined !== model3d && model3d.isPlanProjection;\n };\n\n switch (models[0]) {\n case \"a\": // all models in selector\n vp.view.forEachModel((model) => {\n if (isPlanProjectionModel(model))\n this._modelIds.add(model.id);\n });\n break;\n case \"0\": // comma-separated list of Ids\n for (const modelId of models.split(\",\"))\n if (isPlanProjection(modelId))\n this._modelIds.add(modelId);\n\n break;\n }\n\n if (this._modelIds.size === 0) {\n IModelApp.notifications.outputMessage(new NotifyMessageDetails(OutputMessagePriority.Error, \"No plan projection models\"));\n return false;\n }\n\n return true;\n }\n}\n"]}
1
+ {"version":3,"file":"PlanProjectionTools.js","sourceRoot":"","sources":["../../../src/tools/PlanProjectionTools.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F;;GAEG;AAEH,oDAA8G;AAC9G,wDAAyI;AACzI,8DAA8D;AAC9D,2DAAuD;AACvD,2CAAwC;AAExC;;GAEG;AACH,MAAa,8BAA+B,SAAQ,oCAAgB;IAC3D,MAAM,CAAU,MAAM,GAAG,mBAAmB,CAAC;IAC7C,MAAM,KAAc,OAAO,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC;IAC3C,MAAM,KAAc,OAAO,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC;IAE1C,gBAAgB,GAAG,KAAK,CAAC;IAEjC,IAAuB,SAAS,KAAK,OAAO,IAAI,CAAC,CAAC,CAAC;IAEzC,KAAK,CAAC,KAAK,CAAC,IAAc;QAClC,IAAI,CAAC,KAAK,IAAI,CAAC,MAAM;YACnB,IAAI,CAAC,gBAAgB,GAAG,GAAG,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;QAExD,OAAO,IAAI,CAAC;IACd,CAAC;IAES,KAAK,CAAC,OAAO,CAAC,EAAY;QAClC,MAAM,QAAQ,GAAI,EAAE,CAAC,YAAoC,CAAC,QAAQ,CAAC,sBAAsB,CAAC;QAC1F,IAAI,SAAS,KAAK,QAAQ,EAAE,CAAC;YAC3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OAAO,SAAS,KAAK,KAAK,IAAI,qBAAqB,CAAC,KAAK,CAAC,CAAC;QAC7D,CAAC,CAAC;QACF,MAAM,qBAAqB,GAAG,CAAC,KAAiB,EAAE,EAAE;YAClD,MAAM,OAAO,GAAG,KAAK,CAAC,kBAAkB,CAAC;YACzC,OAAO,SAAS,KAAK,OAAO,IAAI,OAAO,CAAC,gBAAgB,CAAC;QAC3D,CAAC,CAAC;QAEF,QAAQ,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;YAClB,KAAK,GAAG,EAAE,yBAAyB;gBACjC,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,KAAK,EAAE,EAAE;oBAC7B,IAAI,qBAAqB,CAAC,KAAK,CAAC;wBAC9B,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;gBACjC,CAAC,CAAC,CAAC;gBACH,MAAM;YACR,KAAK,GAAG,EAAE,8BAA8B;gBACtC,KAAK,MAAM,OAAO,IAAI,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC;oBACrC,IAAI,gBAAgB,CAAC,OAAO,CAAC;wBAC3B,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;gBAEhC,MAAM;QACV,CAAC;QAED,IAAI,IAAI,CAAC,SAAS,CAAC,IAAI,KAAK,CAAC,EAAE,CAAC;YAC9B,yBAAS,CAAC,aAAa,CAAC,aAAa,CAAC,IAAI,oCAAoB,CAAC,qCAAqB,CAAC,KAAK,EAAE,2BAA2B,CAAC,CAAC,CAAC;YAC1H,OAAO,KAAK,CAAC;QACf,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;;AApEH,4EAqEC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\n/** @packageDocumentation\n * @module Tools\n */\n\nimport { PlanProjectionSettings, PlanProjectionSettingsProps, SubCategoryOverride } from \"@itwin/core-common\";\nimport { DisplayStyle3dState, IModelApp, ModelState, NotifyMessageDetails, OutputMessagePriority, Viewport } from \"@itwin/core-frontend\";\nimport { copyStringToClipboard } from \"../ClipboardUtilities\";\nimport { DisplayStyleTool } from \"./DisplayStyleTools\";\nimport { parseArgs } from \"./parseArgs\";\n\n/** Dumps a JSON representation of the plan projection settings for the current viewport.\n * @beta\n */\nexport class DumpPlanProjectionSettingsTool extends DisplayStyleTool {\n public static override toolId = \"DumpLayerSettings\";\n public static override get minArgs() { return 0; }\n public static override get maxArgs() { return 1; }\n\n private _copyToClipboard = false;\n\n protected override get require3d() { return true; }\n\n protected async parse(args: string[]) {\n if (1 === args.length)\n this._copyToClipboard = \"c\" === args[0].toLowerCase();\n\n return true;\n }\n\n protected async execute(vp: Viewport) {\n const settings = (vp.displayStyle as DisplayStyle3dState).settings.planProjectionSettings;\n if (undefined === settings) {\n IModelApp.notifications.outputMessage(new NotifyMessageDetails(OutputMessagePriority.Info, \"No plan projection settings defined\"));\n return false;\n }\n\n const props = [];\n for (const [modelId, value] of settings)\n props.push({ modelId, settings: value.toJSON() });\n\n const json = JSON.stringify(props);\n if (this._copyToClipboard)\n copyStringToClipboard(json);\n\n const messageDetails = new NotifyMessageDetails(OutputMessagePriority.Info, \"Dumped plan projection settings\", json);\n IModelApp.notifications.outputMessage(messageDetails);\n\n return false;\n }\n}\n\n/** Changes subcategory display priority.\n * @beta\n */\nexport abstract class OverrideSubCategoryPriorityTool extends DisplayStyleTool {\n public static override toolId = \"OverrideSubCategoryPriority\";\n public static override get minArgs() { return 1; }\n public static override get maxArgs() { return 2; }\n\n private readonly _subcatIds = new Set<string>();\n private _priority?: number;\n\n protected async execute(vp: Viewport) {\n const style = vp.displayStyle;\n for (const id of this._subcatIds) {\n const ovr = style.getSubCategoryOverride(id);\n if (undefined === ovr) {\n if (undefined !== this._priority)\n style.overrideSubCategory(id, SubCategoryOverride.fromJSON({ priority: this._priority }));\n } else {\n const props = ovr.toJSON();\n props.priority = this._priority;\n style.overrideSubCategory(id, SubCategoryOverride.fromJSON(props));\n }\n }\n\n return true;\n }\n\n protected async parse(args: string[]) {\n for (const id of args[0].split(\",\"))\n this._subcatIds.add(id);\n\n const priority = parseInt(args[1], 10);\n if (!Number.isNaN(priority))\n this._priority = priority;\n\n return true;\n }\n}\n\n/** Changes plan projection settings for one or more models.\n * @beta\n */\nexport abstract class ChangePlanProjectionSettingsTool extends DisplayStyleTool {\n public static override toolId = \"ChangeLayerSettings\";\n public static override get minArgs() { return 1; }\n public static override get maxArgs() { return 5; }\n\n private readonly _modelIds = new Set<string>();\n private _settings?: PlanProjectionSettings;\n\n protected override get require3d() { return true; }\n\n protected async execute(vp: Viewport) {\n const settings = (vp.displayStyle as DisplayStyle3dState).settings;\n for (const modelId of this._modelIds)\n settings.setPlanProjectionSettings(modelId, this._settings);\n\n return true;\n }\n\n protected async parse(inputArgs: string[]) {\n if (!this.parseModels(inputArgs[0]))\n return false;\n\n const args = parseArgs(inputArgs.slice(1));\n const props: PlanProjectionSettingsProps = {};\n\n props.transparency = args.getFloat(\"t\");\n props.overlay = args.getBoolean(\"o\");\n props.enforceDisplayPriority = args.getBoolean(\"p\");\n props.elevation = args.getFloat(\"e\");\n\n this._settings = PlanProjectionSettings.fromJSON(props);\n return true;\n }\n\n private parseModels(models: string) {\n const vp = IModelApp.viewManager.selectedView!; // already validated by super.parseAndRun\n models = models.toLowerCase();\n\n const isPlanProjection = (modelId: string) => {\n const model = vp.iModel.models.getLoaded(modelId);\n return undefined !== model && isPlanProjectionModel(model);\n };\n const isPlanProjectionModel = (model: ModelState) => {\n const model3d = model.asGeometricModel3d;\n return undefined !== model3d && model3d.isPlanProjection;\n };\n\n switch (models[0]) {\n case \"a\": // all models in selector\n vp.view.forEachModel((model) => {\n if (isPlanProjectionModel(model))\n this._modelIds.add(model.id);\n });\n break;\n case \"0\": // comma-separated list of Ids\n for (const modelId of models.split(\",\"))\n if (isPlanProjection(modelId))\n this._modelIds.add(modelId);\n\n break;\n }\n\n if (this._modelIds.size === 0) {\n IModelApp.notifications.outputMessage(new NotifyMessageDetails(OutputMessagePriority.Error, \"No plan projection models\"));\n return false;\n }\n\n return true;\n }\n}\n"]}