@itwin/core-frontend 4.1.0-dev.35 → 4.1.0-dev.40

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 (851) hide show
  1. package/lib/cjs/AccuDraw.js.map +1 -1
  2. package/lib/cjs/AccuSnap.js.map +1 -1
  3. package/lib/cjs/ApproximateTerrainHeights.js.map +1 -1
  4. package/lib/cjs/ApproximateTerrainHeightsProps.js.map +1 -1
  5. package/lib/cjs/AuxCoordSys.js.map +1 -1
  6. package/lib/cjs/BackgroundMapGeometry.js.map +1 -1
  7. package/lib/cjs/BingLocation.js.map +1 -1
  8. package/lib/cjs/BriefcaseConnection.js.map +1 -1
  9. package/lib/cjs/BriefcaseTxns.js.map +1 -1
  10. package/lib/cjs/CategorySelectorState.js.map +1 -1
  11. package/lib/cjs/ChangeFlags.js.map +1 -1
  12. package/lib/cjs/CheckpointConnection.js.map +1 -1
  13. package/lib/cjs/CoordSystem.js.map +1 -1
  14. package/lib/cjs/DecorationsCache.js.map +1 -1
  15. package/lib/cjs/DevTools.js.map +1 -1
  16. package/lib/cjs/DisplayStyleState.js.map +1 -1
  17. package/lib/cjs/DrawingViewState.js +5 -5
  18. package/lib/cjs/DrawingViewState.js.map +1 -1
  19. package/lib/cjs/ElementLocateManager.js.map +1 -1
  20. package/lib/cjs/EmphasizeElements.js.map +1 -1
  21. package/lib/cjs/EntityState.js.map +1 -1
  22. package/lib/cjs/EnvironmentDecorations.js.map +1 -1
  23. package/lib/cjs/FeatureOverrideProvider.js.map +1 -1
  24. package/lib/cjs/FlashSettings.js.map +1 -1
  25. package/lib/cjs/FrontendHubAccess.js.map +1 -1
  26. package/lib/cjs/Frustum2d.js.map +1 -1
  27. package/lib/cjs/FrustumAnimator.js.map +1 -1
  28. package/lib/cjs/FuzzySearch.js.map +1 -1
  29. package/lib/cjs/GeoServices.js.map +1 -1
  30. package/lib/cjs/GlobeAnimator.js.map +1 -1
  31. package/lib/cjs/GraphicalEditingScope.js.map +1 -1
  32. package/lib/cjs/HitDetail.js.map +1 -1
  33. package/lib/cjs/IModelApp.js.map +1 -1
  34. package/lib/cjs/IModelConnection.js +23 -23
  35. package/lib/cjs/IModelConnection.js.map +1 -1
  36. package/lib/cjs/IModelRoutingContext.js.map +1 -1
  37. package/lib/cjs/IModeljs-css.js +133 -133
  38. package/lib/cjs/IModeljs-css.js.map +1 -1
  39. package/lib/cjs/IpcApp.js.map +1 -1
  40. package/lib/cjs/LinePlaneIntersect.js.map +1 -1
  41. package/lib/cjs/LocalhostIpcApp.js.map +1 -1
  42. package/lib/cjs/MarginPercent.js.map +1 -1
  43. package/lib/cjs/Marker.js.map +1 -1
  44. package/lib/cjs/ModelSelectorState.js.map +1 -1
  45. package/lib/cjs/NativeApp.js.map +1 -1
  46. package/lib/cjs/NativeAppLogger.js.map +1 -1
  47. package/lib/cjs/NoRenderApp.js.map +1 -1
  48. package/lib/cjs/NotificationManager.js.map +1 -1
  49. package/lib/cjs/PerModelCategoryVisibility.js.map +1 -1
  50. package/lib/cjs/PlanarClipMaskState.js.map +1 -1
  51. package/lib/cjs/RealityDataSource.js.map +1 -1
  52. package/lib/cjs/RealityDataSourceCesiumIonAssetImpl.js.map +1 -1
  53. package/lib/cjs/RealityDataSourceContextShareImpl.js.map +1 -1
  54. package/lib/cjs/RealityDataSourceTilesetUrlImpl.js.map +1 -1
  55. package/lib/cjs/SelectionSet.js.map +1 -1
  56. package/lib/cjs/SheetViewState.js.map +1 -1
  57. package/lib/cjs/SpatialViewState.js.map +1 -1
  58. package/lib/cjs/Sprites.js.map +1 -1
  59. package/lib/cjs/StandardView.js.map +1 -1
  60. package/lib/cjs/SubCategoriesCache.js.map +1 -1
  61. package/lib/cjs/TentativePoint.js.map +1 -1
  62. package/lib/cjs/Tiles.js.map +1 -1
  63. package/lib/cjs/UserPreferences.js.map +1 -1
  64. package/lib/cjs/ViewAnimation.js.map +1 -1
  65. package/lib/cjs/ViewContext.js.map +1 -1
  66. package/lib/cjs/ViewCreator2d.js.map +1 -1
  67. package/lib/cjs/ViewCreator3d.js.map +1 -1
  68. package/lib/cjs/ViewGlobalLocation.js.map +1 -1
  69. package/lib/cjs/ViewManager.js.map +1 -1
  70. package/lib/cjs/ViewPose.js.map +1 -1
  71. package/lib/cjs/ViewState.js.map +1 -1
  72. package/lib/cjs/ViewStatus.js.map +1 -1
  73. package/lib/cjs/ViewingSpace.js.map +1 -1
  74. package/lib/cjs/Viewport.js.map +1 -1
  75. package/lib/cjs/ViewportSync.js.map +1 -1
  76. package/lib/cjs/common/FrontendLoggerCategory.js.map +1 -1
  77. package/lib/cjs/common/ImageUtil.js.map +1 -1
  78. package/lib/cjs/common/ViewRect.js.map +1 -1
  79. package/lib/cjs/common/WorkerProxy.js.map +1 -1
  80. package/lib/cjs/common/gltf/GltfModel.js.map +1 -1
  81. package/lib/cjs/common/gltf/GltfParser.js.map +1 -1
  82. package/lib/cjs/common/gltf/GltfSchema.js.map +1 -1
  83. package/lib/cjs/common/imdl/CompactEdges.js.map +1 -1
  84. package/lib/cjs/common/imdl/ImdlModel.js.map +1 -1
  85. package/lib/cjs/common/imdl/ImdlSchema.js.map +1 -1
  86. package/lib/cjs/common/imdl/ParseImdlDocument.js.map +1 -1
  87. package/lib/cjs/common/render/AnimationNodeId.js.map +1 -1
  88. package/lib/cjs/common/render/MaterialParams.js.map +1 -1
  89. package/lib/cjs/common/render/TextureParams.js.map +1 -1
  90. package/lib/cjs/common/render/primitives/AuxChannelTable.js.map +1 -1
  91. package/lib/cjs/common/render/primitives/DisplayParams.js.map +1 -1
  92. package/lib/cjs/common/render/primitives/EdgeParams.js.map +1 -1
  93. package/lib/cjs/common/render/primitives/MeshParams.js.map +1 -1
  94. package/lib/cjs/common/render/primitives/MeshPrimitive.js.map +1 -1
  95. package/lib/cjs/common/render/primitives/PointStringParams.js.map +1 -1
  96. package/lib/cjs/common/render/primitives/PolylineParams.js.map +1 -1
  97. package/lib/cjs/common/render/primitives/SurfaceParams.js.map +1 -1
  98. package/lib/cjs/common/render/primitives/VertexIndices.js.map +1 -1
  99. package/lib/cjs/common/render/primitives/VertexTable.js.map +1 -1
  100. package/lib/cjs/common/render/primitives/VertexTableSplitter.js.map +1 -1
  101. package/lib/cjs/core-frontend.js.map +1 -1
  102. package/lib/cjs/extension/Extension.js.map +1 -1
  103. package/lib/cjs/extension/ExtensionAdmin.js.map +1 -1
  104. package/lib/cjs/extension/ExtensionHost.js.map +1 -1
  105. package/lib/cjs/extension/ExtensionRuntime.js.map +1 -1
  106. package/lib/cjs/extension/providers/ExtensionLoadScript.js.map +1 -1
  107. package/lib/cjs/extension/providers/LocalExtensionProvider.js.map +1 -1
  108. package/lib/cjs/extension/providers/RemoteExtensionProvider.js.map +1 -1
  109. package/lib/cjs/properties/AngleDescription.js.map +1 -1
  110. package/lib/cjs/properties/FormattedQuantityDescription.js.map +1 -1
  111. package/lib/cjs/properties/LengthDescription.js.map +1 -1
  112. package/lib/cjs/public/scripts/checkbrowser.js +24 -24
  113. package/lib/cjs/quantity-formatting/BaseUnitFormattingSettingsProvider.js.map +1 -1
  114. package/lib/cjs/quantity-formatting/BasicUnitsProvider.js.map +1 -1
  115. package/lib/cjs/quantity-formatting/LocalUnitFormatProvider.js.map +1 -1
  116. package/lib/cjs/quantity-formatting/QuantityFormatter.js.map +1 -1
  117. package/lib/cjs/quantity-formatting/QuantityTypesEditorSpecs.js.map +1 -1
  118. package/lib/cjs/quantity-formatting/UnitsData.js.map +1 -1
  119. package/lib/cjs/render/CanvasDecoration.js.map +1 -1
  120. package/lib/cjs/render/CreateRenderMaterialArgs.js.map +1 -1
  121. package/lib/cjs/render/CreateTextureArgs.js.map +1 -1
  122. package/lib/cjs/render/Decorations.js.map +1 -1
  123. package/lib/cjs/render/FeatureSymbology.js.map +1 -1
  124. package/lib/cjs/render/FrameStats.js.map +1 -1
  125. package/lib/cjs/render/GraphicBranch.js.map +1 -1
  126. package/lib/cjs/render/GraphicBuilder.js.map +1 -1
  127. package/lib/cjs/render/GraphicPrimitive.js.map +1 -1
  128. package/lib/cjs/render/InstancedGraphicParams.js.map +1 -1
  129. package/lib/cjs/render/MockRender.js.map +1 -1
  130. package/lib/cjs/render/ParticleCollectionBuilder.js.map +1 -1
  131. package/lib/cjs/render/Pixel.js.map +1 -1
  132. package/lib/cjs/render/RealityMeshGraphicParams.js.map +1 -1
  133. package/lib/cjs/render/RealityMeshParams.js.map +1 -1
  134. package/lib/cjs/render/RenderClipVolume.js.map +1 -1
  135. package/lib/cjs/render/RenderGraphic.js.map +1 -1
  136. package/lib/cjs/render/RenderMemory.js.map +1 -1
  137. package/lib/cjs/render/RenderPlan.js.map +1 -1
  138. package/lib/cjs/render/RenderPlanarClassifier.js.map +1 -1
  139. package/lib/cjs/render/RenderSystem.js.map +1 -1
  140. package/lib/cjs/render/RenderTarget.js.map +1 -1
  141. package/lib/cjs/render/Scene.js.map +1 -1
  142. package/lib/cjs/render/ScreenSpaceEffectBuilder.js.map +1 -1
  143. package/lib/cjs/render/UpsampleRealityMeshParams.js.map +1 -1
  144. package/lib/cjs/render/VisibleFeature.js.map +1 -1
  145. package/lib/cjs/render/primitives/ColorMap.js.map +1 -1
  146. package/lib/cjs/render/primitives/EdgeParams.js.map +1 -1
  147. package/lib/cjs/render/primitives/PointCloudPrimitive.js.map +1 -1
  148. package/lib/cjs/render/primitives/PointStringParams.js.map +1 -1
  149. package/lib/cjs/render/primitives/Polyface.js.map +1 -1
  150. package/lib/cjs/render/primitives/PolylineParams.js.map +1 -1
  151. package/lib/cjs/render/primitives/Primitives.js.map +1 -1
  152. package/lib/cjs/render/primitives/Strokes.js.map +1 -1
  153. package/lib/cjs/render/primitives/VertexKey.js.map +1 -1
  154. package/lib/cjs/render/primitives/VertexTableBuilder.js.map +1 -1
  155. package/lib/cjs/render/primitives/geometry/GeometryAccumulator.js.map +1 -1
  156. package/lib/cjs/render/primitives/geometry/GeometryList.js.map +1 -1
  157. package/lib/cjs/render/primitives/geometry/GeometryListBuilder.js.map +1 -1
  158. package/lib/cjs/render/primitives/geometry/GeometryPrimitives.js.map +1 -1
  159. package/lib/cjs/render/primitives/mesh/MeshBuilder.js.map +1 -1
  160. package/lib/cjs/render/primitives/mesh/MeshBuilderMap.js.map +1 -1
  161. package/lib/cjs/render/primitives/mesh/MeshPrimitives.js.map +1 -1
  162. package/lib/cjs/render/webgl/AtmosphereUniforms.js.map +1 -1
  163. package/lib/cjs/render/webgl/AttributeBuffers.js.map +1 -1
  164. package/lib/cjs/render/webgl/AttributeMap.js.map +1 -1
  165. package/lib/cjs/render/webgl/BackgroundMapDrape.js.map +1 -1
  166. package/lib/cjs/render/webgl/BatchState.js.map +1 -1
  167. package/lib/cjs/render/webgl/BatchUniforms.js.map +1 -1
  168. package/lib/cjs/render/webgl/BranchStack.js.map +1 -1
  169. package/lib/cjs/render/webgl/BranchState.js.map +1 -1
  170. package/lib/cjs/render/webgl/BranchUniforms.js.map +1 -1
  171. package/lib/cjs/render/webgl/CachedGeometry.js.map +1 -1
  172. package/lib/cjs/render/webgl/ClipStack.js.map +1 -1
  173. package/lib/cjs/render/webgl/ClipVolume.js.map +1 -1
  174. package/lib/cjs/render/webgl/ClippingProgram.js.map +1 -1
  175. package/lib/cjs/render/webgl/ColorInfo.js.map +1 -1
  176. package/lib/cjs/render/webgl/Diagnostics.js.map +1 -1
  177. package/lib/cjs/render/webgl/Disposable.js.map +1 -1
  178. package/lib/cjs/render/webgl/DrawCommand.js.map +1 -1
  179. package/lib/cjs/render/webgl/EDL.js.map +1 -1
  180. package/lib/cjs/render/webgl/EdgeGeometry.js.map +1 -1
  181. package/lib/cjs/render/webgl/EdgeSettings.js.map +1 -1
  182. package/lib/cjs/render/webgl/FeatureOverrides.js.map +1 -1
  183. package/lib/cjs/render/webgl/FloatRGBA.js.map +1 -1
  184. package/lib/cjs/render/webgl/FrameBuffer.js.map +1 -1
  185. package/lib/cjs/render/webgl/FrustumUniforms.js.map +1 -1
  186. package/lib/cjs/render/webgl/GL.js.map +1 -1
  187. package/lib/cjs/render/webgl/GLTimer.js.map +1 -1
  188. package/lib/cjs/render/webgl/Graphic.js.map +1 -1
  189. package/lib/cjs/render/webgl/HiliteUniforms.js.map +1 -1
  190. package/lib/cjs/render/webgl/IModelFrameLifecycle.js.map +1 -1
  191. package/lib/cjs/render/webgl/IndexedEdgeGeometry.js.map +1 -1
  192. package/lib/cjs/render/webgl/InstancedGeometry.js.map +1 -1
  193. package/lib/cjs/render/webgl/Layer.js.map +1 -1
  194. package/lib/cjs/render/webgl/LayerCommands.js.map +1 -1
  195. package/lib/cjs/render/webgl/LightingUniforms.js.map +1 -1
  196. package/lib/cjs/render/webgl/LineCode.js.map +1 -1
  197. package/lib/cjs/render/webgl/Material.js.map +1 -1
  198. package/lib/cjs/render/webgl/Matrix.js.map +1 -1
  199. package/lib/cjs/render/webgl/Mesh.js.map +1 -1
  200. package/lib/cjs/render/webgl/MeshData.js.map +1 -1
  201. package/lib/cjs/render/webgl/MeshGeometry.js.map +1 -1
  202. package/lib/cjs/render/webgl/PerformanceMetrics.js.map +1 -1
  203. package/lib/cjs/render/webgl/PlanarClassifier.js.map +1 -1
  204. package/lib/cjs/render/webgl/PlanarGrid.js.map +1 -1
  205. package/lib/cjs/render/webgl/PlanarTextureProjection.js.map +1 -1
  206. package/lib/cjs/render/webgl/PointCloud.js.map +1 -1
  207. package/lib/cjs/render/webgl/PointString.js.map +1 -1
  208. package/lib/cjs/render/webgl/Polyline.js.map +1 -1
  209. package/lib/cjs/render/webgl/Primitive.js.map +1 -1
  210. package/lib/cjs/render/webgl/RealityMesh.js.map +1 -1
  211. package/lib/cjs/render/webgl/RealityModelUniforms.js.map +1 -1
  212. package/lib/cjs/render/webgl/RenderBuffer.js.map +1 -1
  213. package/lib/cjs/render/webgl/RenderCommands.js.map +1 -1
  214. package/lib/cjs/render/webgl/RenderFlags.js.map +1 -1
  215. package/lib/cjs/render/webgl/RenderState.js.map +1 -1
  216. package/lib/cjs/render/webgl/SceneCompositor.js.map +1 -1
  217. package/lib/cjs/render/webgl/ScratchDrawParams.js.map +1 -1
  218. package/lib/cjs/render/webgl/ScreenSpaceEffect.js.map +1 -1
  219. package/lib/cjs/render/webgl/ShaderBuilder.js.map +1 -1
  220. package/lib/cjs/render/webgl/ShaderProgram.js.map +1 -1
  221. package/lib/cjs/render/webgl/ShadowUniforms.js.map +1 -1
  222. package/lib/cjs/render/webgl/SolarShadowMap.js.map +1 -1
  223. package/lib/cjs/render/webgl/StyleUniforms.js.map +1 -1
  224. package/lib/cjs/render/webgl/SurfaceGeometry.js.map +1 -1
  225. package/lib/cjs/render/webgl/Sync.js.map +1 -1
  226. package/lib/cjs/render/webgl/System.js.map +1 -1
  227. package/lib/cjs/render/webgl/Target.js.map +1 -1
  228. package/lib/cjs/render/webgl/TargetGraphics.js.map +1 -1
  229. package/lib/cjs/render/webgl/TargetUniforms.js.map +1 -1
  230. package/lib/cjs/render/webgl/Technique.js.map +1 -1
  231. package/lib/cjs/render/webgl/TechniqueFlags.js.map +1 -1
  232. package/lib/cjs/render/webgl/TechniqueId.js.map +1 -1
  233. package/lib/cjs/render/webgl/Texture.js.map +1 -1
  234. package/lib/cjs/render/webgl/TextureDrape.js.map +1 -1
  235. package/lib/cjs/render/webgl/ThematicSensors.js.map +1 -1
  236. package/lib/cjs/render/webgl/ThematicUniforms.js.map +1 -1
  237. package/lib/cjs/render/webgl/UniformHandle.js.map +1 -1
  238. package/lib/cjs/render/webgl/VertexLUT.js.map +1 -1
  239. package/lib/cjs/render/webgl/ViewRectUniforms.js.map +1 -1
  240. package/lib/cjs/render/webgl/VisibleTileFeatures.js.map +1 -1
  241. package/lib/cjs/render/webgl/glsl/AmbientOcclusion.js +154 -154
  242. package/lib/cjs/render/webgl/glsl/AmbientOcclusion.js.map +1 -1
  243. package/lib/cjs/render/webgl/glsl/Animation.js +83 -83
  244. package/lib/cjs/render/webgl/glsl/Animation.js.map +1 -1
  245. package/lib/cjs/render/webgl/glsl/Atmosphere.js +266 -266
  246. package/lib/cjs/render/webgl/glsl/Atmosphere.js.map +1 -1
  247. package/lib/cjs/render/webgl/glsl/Blur.js +37 -37
  248. package/lib/cjs/render/webgl/glsl/Blur.js.map +1 -1
  249. package/lib/cjs/render/webgl/glsl/ClearPickAndColor.js +4 -4
  250. package/lib/cjs/render/webgl/glsl/ClearPickAndColor.js.map +1 -1
  251. package/lib/cjs/render/webgl/glsl/ClearTranslucent.js +3 -3
  252. package/lib/cjs/render/webgl/glsl/ClearTranslucent.js.map +1 -1
  253. package/lib/cjs/render/webgl/glsl/Clipping.js +60 -60
  254. package/lib/cjs/render/webgl/glsl/Clipping.js.map +1 -1
  255. package/lib/cjs/render/webgl/glsl/Color.js +12 -12
  256. package/lib/cjs/render/webgl/glsl/Color.js.map +1 -1
  257. package/lib/cjs/render/webgl/glsl/Combine3Textures.js +7 -7
  258. package/lib/cjs/render/webgl/glsl/Combine3Textures.js.map +1 -1
  259. package/lib/cjs/render/webgl/glsl/CombineTextures.js +5 -5
  260. package/lib/cjs/render/webgl/glsl/CombineTextures.js.map +1 -1
  261. package/lib/cjs/render/webgl/glsl/Common.js +16 -16
  262. package/lib/cjs/render/webgl/glsl/Common.js.map +1 -1
  263. package/lib/cjs/render/webgl/glsl/Composite.js +71 -71
  264. package/lib/cjs/render/webgl/glsl/Composite.js.map +1 -1
  265. package/lib/cjs/render/webgl/glsl/CopyColor.js +6 -6
  266. package/lib/cjs/render/webgl/glsl/CopyColor.js.map +1 -1
  267. package/lib/cjs/render/webgl/glsl/CopyPickBuffers.js +3 -3
  268. package/lib/cjs/render/webgl/glsl/CopyPickBuffers.js.map +1 -1
  269. package/lib/cjs/render/webgl/glsl/CopyStencil.js +4 -4
  270. package/lib/cjs/render/webgl/glsl/CopyStencil.js.map +1 -1
  271. package/lib/cjs/render/webgl/glsl/Decode.js +65 -65
  272. package/lib/cjs/render/webgl/glsl/Decode.js.map +1 -1
  273. package/lib/cjs/render/webgl/glsl/EDL.js +103 -103
  274. package/lib/cjs/render/webgl/glsl/EDL.js.map +1 -1
  275. package/lib/cjs/render/webgl/glsl/EVSMFromDepth.js +25 -25
  276. package/lib/cjs/render/webgl/glsl/EVSMFromDepth.js.map +1 -1
  277. package/lib/cjs/render/webgl/glsl/Edge.js +146 -146
  278. package/lib/cjs/render/webgl/glsl/Edge.js.map +1 -1
  279. package/lib/cjs/render/webgl/glsl/FeatureSymbology.js +232 -232
  280. package/lib/cjs/render/webgl/glsl/FeatureSymbology.js.map +1 -1
  281. package/lib/cjs/render/webgl/glsl/Fragment.js +41 -41
  282. package/lib/cjs/render/webgl/glsl/Fragment.js.map +1 -1
  283. package/lib/cjs/render/webgl/glsl/Instancing.js +21 -21
  284. package/lib/cjs/render/webgl/glsl/Instancing.js.map +1 -1
  285. package/lib/cjs/render/webgl/glsl/Lighting.js +92 -92
  286. package/lib/cjs/render/webgl/glsl/Lighting.js.map +1 -1
  287. package/lib/cjs/render/webgl/glsl/LogarithmicDepthBuffer.js.map +1 -1
  288. package/lib/cjs/render/webgl/glsl/LookupTable.js +19 -19
  289. package/lib/cjs/render/webgl/glsl/LookupTable.js.map +1 -1
  290. package/lib/cjs/render/webgl/glsl/Monochrome.js +13 -13
  291. package/lib/cjs/render/webgl/glsl/Monochrome.js.map +1 -1
  292. package/lib/cjs/render/webgl/glsl/PlanarClassification.js +188 -188
  293. package/lib/cjs/render/webgl/glsl/PlanarClassification.js.map +1 -1
  294. package/lib/cjs/render/webgl/glsl/PlanarGrid.js +22 -22
  295. package/lib/cjs/render/webgl/glsl/PlanarGrid.js.map +1 -1
  296. package/lib/cjs/render/webgl/glsl/PointCloud.js +28 -28
  297. package/lib/cjs/render/webgl/glsl/PointCloud.js.map +1 -1
  298. package/lib/cjs/render/webgl/glsl/PointString.js +9 -9
  299. package/lib/cjs/render/webgl/glsl/PointString.js.map +1 -1
  300. package/lib/cjs/render/webgl/glsl/Polyline.js +213 -213
  301. package/lib/cjs/render/webgl/glsl/Polyline.js.map +1 -1
  302. package/lib/cjs/render/webgl/glsl/RealityMesh.js +83 -83
  303. package/lib/cjs/render/webgl/glsl/RealityMesh.js.map +1 -1
  304. package/lib/cjs/render/webgl/glsl/RenderPass.js.map +1 -1
  305. package/lib/cjs/render/webgl/glsl/ScreenSpaceEffect.js +9 -9
  306. package/lib/cjs/render/webgl/glsl/ScreenSpaceEffect.js.map +1 -1
  307. package/lib/cjs/render/webgl/glsl/SkyBox.js.map +1 -1
  308. package/lib/cjs/render/webgl/glsl/SkySphere.js +49 -49
  309. package/lib/cjs/render/webgl/glsl/SkySphere.js.map +1 -1
  310. package/lib/cjs/render/webgl/glsl/SolarShadowMapping.js +51 -51
  311. package/lib/cjs/render/webgl/glsl/SolarShadowMapping.js.map +1 -1
  312. package/lib/cjs/render/webgl/glsl/Surface.js +239 -239
  313. package/lib/cjs/render/webgl/glsl/Surface.js.map +1 -1
  314. package/lib/cjs/render/webgl/glsl/Thematic.js +134 -134
  315. package/lib/cjs/render/webgl/glsl/Thematic.js.map +1 -1
  316. package/lib/cjs/render/webgl/glsl/Translucency.js +19 -19
  317. package/lib/cjs/render/webgl/glsl/Translucency.js.map +1 -1
  318. package/lib/cjs/render/webgl/glsl/Vertex.js +73 -73
  319. package/lib/cjs/render/webgl/glsl/Vertex.js.map +1 -1
  320. package/lib/cjs/render/webgl/glsl/Viewport.js +38 -38
  321. package/lib/cjs/render/webgl/glsl/Viewport.js.map +1 -1
  322. package/lib/cjs/render/webgl/glsl/ViewportQuad.js.map +1 -1
  323. package/lib/cjs/render/webgl/glsl/Wiremesh.js +10 -10
  324. package/lib/cjs/render/webgl/glsl/Wiremesh.js.map +1 -1
  325. package/lib/cjs/render-primitives.js.map +1 -1
  326. package/lib/cjs/request/Request.js.map +1 -1
  327. package/lib/cjs/tile/B3dmReader.js.map +1 -1
  328. package/lib/cjs/tile/BatchedTileIdMap.js.map +1 -1
  329. package/lib/cjs/tile/CesiumAssetProvider.js.map +1 -1
  330. package/lib/cjs/tile/ClassifierTileTree.js.map +1 -1
  331. package/lib/cjs/tile/ContextShareProvider.js.map +1 -1
  332. package/lib/cjs/tile/DisclosedTileTreeSet.js.map +1 -1
  333. package/lib/cjs/tile/DynamicIModelTile.js.map +1 -1
  334. package/lib/cjs/tile/GltfReader.js.map +1 -1
  335. package/lib/cjs/tile/GraphicsCollector.js.map +1 -1
  336. package/lib/cjs/tile/I3dmReader.js.map +1 -1
  337. package/lib/cjs/tile/IModelTile.js.map +1 -1
  338. package/lib/cjs/tile/IModelTileRequestChannels.js.map +1 -1
  339. package/lib/cjs/tile/IModelTileTree.js.map +1 -1
  340. package/lib/cjs/tile/ImdlDecoder.js.map +1 -1
  341. package/lib/cjs/tile/ImdlGraphicsCreator.js.map +1 -1
  342. package/lib/cjs/tile/ImdlParser.js.map +1 -1
  343. package/lib/cjs/tile/ImdlReader.js.map +1 -1
  344. package/lib/cjs/tile/LRUTileList.js.map +1 -1
  345. package/lib/cjs/tile/OPCFormatInterpreter.js.map +1 -1
  346. package/lib/cjs/tile/PntsReader.js.map +1 -1
  347. package/lib/cjs/tile/RealityTile.js.map +1 -1
  348. package/lib/cjs/tile/RealityTileDrawArgs.js.map +1 -1
  349. package/lib/cjs/tile/RealityTileLoader.js.map +1 -1
  350. package/lib/cjs/tile/RealityTileTree.js +1 -1
  351. package/lib/cjs/tile/RealityTileTree.js.map +1 -1
  352. package/lib/cjs/tile/ThreeDTileFormatInterpreter.js.map +1 -1
  353. package/lib/cjs/tile/Tile.js.map +1 -1
  354. package/lib/cjs/tile/TileAdmin.js.map +1 -1
  355. package/lib/cjs/tile/TileContent.js.map +1 -1
  356. package/lib/cjs/tile/TileDrawArgs.js.map +1 -1
  357. package/lib/cjs/tile/TileGeometryCollector.js.map +1 -1
  358. package/lib/cjs/tile/TileParams.js.map +1 -1
  359. package/lib/cjs/tile/TileRequest.js.map +1 -1
  360. package/lib/cjs/tile/TileRequestChannel.js.map +1 -1
  361. package/lib/cjs/tile/TileRequestChannels.js.map +1 -1
  362. package/lib/cjs/tile/TileStorage.js.map +1 -1
  363. package/lib/cjs/tile/TileTree.js.map +1 -1
  364. package/lib/cjs/tile/TileTreeOwner.js.map +1 -1
  365. package/lib/cjs/tile/TileTreeParams.js.map +1 -1
  366. package/lib/cjs/tile/TileTreeReference.js.map +1 -1
  367. package/lib/cjs/tile/TileTreeSupplier.js.map +1 -1
  368. package/lib/cjs/tile/TileUsageMarker.js.map +1 -1
  369. package/lib/cjs/tile/TileUser.js.map +1 -1
  370. package/lib/cjs/tile/TileUserSet.js.map +1 -1
  371. package/lib/cjs/tile/TiledGraphicsProvider.js.map +1 -1
  372. package/lib/cjs/tile/ViewFlagOverrides.js.map +1 -1
  373. package/lib/cjs/tile/internal.js.map +1 -1
  374. package/lib/cjs/tile/map/ArcGISTileMap.js.map +1 -1
  375. package/lib/cjs/tile/map/ArcGisUtilities.js.map +1 -1
  376. package/lib/cjs/tile/map/BingElevation.js.map +1 -1
  377. package/lib/cjs/tile/map/CesiumTerrainProvider.js.map +1 -1
  378. package/lib/cjs/tile/map/EllipsoidTerrainProvider.js.map +1 -1
  379. package/lib/cjs/tile/map/ImageryProviders/ArcGISImageryProvider.js.map +1 -1
  380. package/lib/cjs/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.js.map +1 -1
  381. package/lib/cjs/tile/map/ImageryProviders/AzureMapsLayerImageryProvider.js.map +1 -1
  382. package/lib/cjs/tile/map/ImageryProviders/BingImageryProvider.js.map +1 -1
  383. package/lib/cjs/tile/map/ImageryProviders/MapBoxLayerImageryProvider.js.map +1 -1
  384. package/lib/cjs/tile/map/ImageryProviders/TileUrlImageryProvider.js.map +1 -1
  385. package/lib/cjs/tile/map/ImageryProviders/WmsMapLayerImageryProvider.js.map +1 -1
  386. package/lib/cjs/tile/map/ImageryProviders/WmtsMapLayerImageryProvider.js.map +1 -1
  387. package/lib/cjs/tile/map/MapCartoRectangle.js.map +1 -1
  388. package/lib/cjs/tile/map/MapFeatureInfo.js.map +1 -1
  389. package/lib/cjs/tile/map/MapLayerAuthentication.js.map +1 -1
  390. package/lib/cjs/tile/map/MapLayerFormatRegistry.js.map +1 -1
  391. package/lib/cjs/tile/map/MapLayerImageryProvider.js +2 -2
  392. package/lib/cjs/tile/map/MapLayerImageryProvider.js.map +1 -1
  393. package/lib/cjs/tile/map/MapLayerSources.js.map +1 -1
  394. package/lib/cjs/tile/map/MapLayerTileTreeReference.js.map +1 -1
  395. package/lib/cjs/tile/map/MapTile.js.map +1 -1
  396. package/lib/cjs/tile/map/MapTileAvailability.js.map +1 -1
  397. package/lib/cjs/tile/map/MapTileLoader.js.map +1 -1
  398. package/lib/cjs/tile/map/MapTiledGraphicsProvider.js.map +1 -1
  399. package/lib/cjs/tile/map/MapTilingScheme.js.map +1 -1
  400. package/lib/cjs/tile/map/QuadId.js.map +1 -1
  401. package/lib/cjs/tile/map/TerrainMeshProvider.js.map +1 -1
  402. package/lib/cjs/tile/map/TerrainProvider.js.map +1 -1
  403. package/lib/cjs/tile/map/WmsCapabilities.js.map +1 -1
  404. package/lib/cjs/tile/map/WmsUtilities.js.map +1 -1
  405. package/lib/cjs/tile/map/WmtsCapabilities.js.map +1 -1
  406. package/lib/cjs/tools/AccuDrawTool.js.map +1 -1
  407. package/lib/cjs/tools/ClipViewTool.js.map +1 -1
  408. package/lib/cjs/tools/EditManipulator.js.map +1 -1
  409. package/lib/cjs/tools/ElementSetTool.js.map +1 -1
  410. package/lib/cjs/tools/EventController.js.map +1 -1
  411. package/lib/cjs/tools/IdleTool.js.map +1 -1
  412. package/lib/cjs/tools/MeasureTool.js.map +1 -1
  413. package/lib/cjs/tools/PrimitiveTool.js.map +1 -1
  414. package/lib/cjs/tools/SelectTool.js.map +1 -1
  415. package/lib/cjs/tools/ToolAdmin.js.map +1 -1
  416. package/lib/cjs/tools/ToolAssistance.js.map +1 -1
  417. package/lib/cjs/tools/ToolSettings.js.map +1 -1
  418. package/lib/cjs/tools/ViewTool.js.map +1 -1
  419. package/lib/cjs/webgl.js.map +1 -1
  420. package/lib/cjs/workers/ImdlParser/Worker.js.map +1 -1
  421. package/lib/cjs/workers/ImdlParser/webpack.config.js +40 -40
  422. package/lib/cjs/workers/RegisterWorker.js.map +1 -1
  423. package/lib/esm/AccuDraw.js.map +1 -1
  424. package/lib/esm/AccuSnap.js.map +1 -1
  425. package/lib/esm/ApproximateTerrainHeights.js.map +1 -1
  426. package/lib/esm/ApproximateTerrainHeightsProps.js.map +1 -1
  427. package/lib/esm/AuxCoordSys.js.map +1 -1
  428. package/lib/esm/BackgroundMapGeometry.js.map +1 -1
  429. package/lib/esm/BingLocation.js.map +1 -1
  430. package/lib/esm/BriefcaseConnection.js.map +1 -1
  431. package/lib/esm/BriefcaseTxns.js.map +1 -1
  432. package/lib/esm/CategorySelectorState.js.map +1 -1
  433. package/lib/esm/ChangeFlags.js.map +1 -1
  434. package/lib/esm/CheckpointConnection.js.map +1 -1
  435. package/lib/esm/CoordSystem.js.map +1 -1
  436. package/lib/esm/DecorationsCache.js.map +1 -1
  437. package/lib/esm/DevTools.js.map +1 -1
  438. package/lib/esm/DisplayStyleState.js.map +1 -1
  439. package/lib/esm/DrawingViewState.js +5 -5
  440. package/lib/esm/DrawingViewState.js.map +1 -1
  441. package/lib/esm/ElementLocateManager.js.map +1 -1
  442. package/lib/esm/EmphasizeElements.js.map +1 -1
  443. package/lib/esm/EntityState.js.map +1 -1
  444. package/lib/esm/EnvironmentDecorations.js.map +1 -1
  445. package/lib/esm/FeatureOverrideProvider.js.map +1 -1
  446. package/lib/esm/FlashSettings.js.map +1 -1
  447. package/lib/esm/FrontendHubAccess.js.map +1 -1
  448. package/lib/esm/Frustum2d.js.map +1 -1
  449. package/lib/esm/FrustumAnimator.js.map +1 -1
  450. package/lib/esm/FuzzySearch.js.map +1 -1
  451. package/lib/esm/GeoServices.js.map +1 -1
  452. package/lib/esm/GlobeAnimator.js.map +1 -1
  453. package/lib/esm/GraphicalEditingScope.js.map +1 -1
  454. package/lib/esm/HitDetail.js.map +1 -1
  455. package/lib/esm/IModelApp.js.map +1 -1
  456. package/lib/esm/IModelConnection.js +23 -23
  457. package/lib/esm/IModelConnection.js.map +1 -1
  458. package/lib/esm/IModelRoutingContext.js.map +1 -1
  459. package/lib/esm/IModeljs-css.js +133 -133
  460. package/lib/esm/IModeljs-css.js.map +1 -1
  461. package/lib/esm/IpcApp.js.map +1 -1
  462. package/lib/esm/LinePlaneIntersect.js.map +1 -1
  463. package/lib/esm/LocalhostIpcApp.js.map +1 -1
  464. package/lib/esm/MarginPercent.js.map +1 -1
  465. package/lib/esm/Marker.js.map +1 -1
  466. package/lib/esm/ModelSelectorState.js.map +1 -1
  467. package/lib/esm/NativeApp.js.map +1 -1
  468. package/lib/esm/NativeAppLogger.js.map +1 -1
  469. package/lib/esm/NoRenderApp.js.map +1 -1
  470. package/lib/esm/NotificationManager.js.map +1 -1
  471. package/lib/esm/PerModelCategoryVisibility.js.map +1 -1
  472. package/lib/esm/PlanarClipMaskState.js.map +1 -1
  473. package/lib/esm/RealityDataSource.js.map +1 -1
  474. package/lib/esm/RealityDataSourceCesiumIonAssetImpl.js.map +1 -1
  475. package/lib/esm/RealityDataSourceContextShareImpl.js.map +1 -1
  476. package/lib/esm/RealityDataSourceTilesetUrlImpl.js.map +1 -1
  477. package/lib/esm/SelectionSet.js.map +1 -1
  478. package/lib/esm/SheetViewState.js.map +1 -1
  479. package/lib/esm/SpatialViewState.js.map +1 -1
  480. package/lib/esm/Sprites.js.map +1 -1
  481. package/lib/esm/StandardView.js.map +1 -1
  482. package/lib/esm/SubCategoriesCache.js.map +1 -1
  483. package/lib/esm/TentativePoint.js.map +1 -1
  484. package/lib/esm/Tiles.js.map +1 -1
  485. package/lib/esm/UserPreferences.js.map +1 -1
  486. package/lib/esm/ViewAnimation.js.map +1 -1
  487. package/lib/esm/ViewContext.js.map +1 -1
  488. package/lib/esm/ViewCreator2d.js.map +1 -1
  489. package/lib/esm/ViewCreator3d.js.map +1 -1
  490. package/lib/esm/ViewGlobalLocation.js.map +1 -1
  491. package/lib/esm/ViewManager.js.map +1 -1
  492. package/lib/esm/ViewPose.js.map +1 -1
  493. package/lib/esm/ViewState.js.map +1 -1
  494. package/lib/esm/ViewStatus.js.map +1 -1
  495. package/lib/esm/ViewingSpace.js.map +1 -1
  496. package/lib/esm/Viewport.js.map +1 -1
  497. package/lib/esm/ViewportSync.js.map +1 -1
  498. package/lib/esm/common/FrontendLoggerCategory.js.map +1 -1
  499. package/lib/esm/common/ImageUtil.js.map +1 -1
  500. package/lib/esm/common/ViewRect.js.map +1 -1
  501. package/lib/esm/common/WorkerProxy.js.map +1 -1
  502. package/lib/esm/common/gltf/GltfModel.js.map +1 -1
  503. package/lib/esm/common/gltf/GltfParser.js.map +1 -1
  504. package/lib/esm/common/gltf/GltfSchema.js.map +1 -1
  505. package/lib/esm/common/imdl/CompactEdges.js.map +1 -1
  506. package/lib/esm/common/imdl/ImdlModel.js.map +1 -1
  507. package/lib/esm/common/imdl/ImdlSchema.js.map +1 -1
  508. package/lib/esm/common/imdl/ParseImdlDocument.js.map +1 -1
  509. package/lib/esm/common/render/AnimationNodeId.js.map +1 -1
  510. package/lib/esm/common/render/MaterialParams.js.map +1 -1
  511. package/lib/esm/common/render/TextureParams.js.map +1 -1
  512. package/lib/esm/common/render/primitives/AuxChannelTable.js.map +1 -1
  513. package/lib/esm/common/render/primitives/DisplayParams.js.map +1 -1
  514. package/lib/esm/common/render/primitives/EdgeParams.js.map +1 -1
  515. package/lib/esm/common/render/primitives/MeshParams.js.map +1 -1
  516. package/lib/esm/common/render/primitives/MeshPrimitive.js.map +1 -1
  517. package/lib/esm/common/render/primitives/PointStringParams.js.map +1 -1
  518. package/lib/esm/common/render/primitives/PolylineParams.js.map +1 -1
  519. package/lib/esm/common/render/primitives/SurfaceParams.js.map +1 -1
  520. package/lib/esm/common/render/primitives/VertexIndices.js.map +1 -1
  521. package/lib/esm/common/render/primitives/VertexTable.js.map +1 -1
  522. package/lib/esm/common/render/primitives/VertexTableSplitter.js.map +1 -1
  523. package/lib/esm/core-frontend.js.map +1 -1
  524. package/lib/esm/extension/Extension.js.map +1 -1
  525. package/lib/esm/extension/ExtensionAdmin.js.map +1 -1
  526. package/lib/esm/extension/ExtensionHost.js.map +1 -1
  527. package/lib/esm/extension/ExtensionRuntime.js.map +1 -1
  528. package/lib/esm/extension/providers/ExtensionLoadScript.js.map +1 -1
  529. package/lib/esm/extension/providers/LocalExtensionProvider.js.map +1 -1
  530. package/lib/esm/extension/providers/RemoteExtensionProvider.js.map +1 -1
  531. package/lib/esm/properties/AngleDescription.js.map +1 -1
  532. package/lib/esm/properties/FormattedQuantityDescription.js.map +1 -1
  533. package/lib/esm/properties/LengthDescription.js.map +1 -1
  534. package/lib/esm/public/scripts/checkbrowser.js +24 -24
  535. package/lib/esm/quantity-formatting/BaseUnitFormattingSettingsProvider.js.map +1 -1
  536. package/lib/esm/quantity-formatting/BasicUnitsProvider.js.map +1 -1
  537. package/lib/esm/quantity-formatting/LocalUnitFormatProvider.js.map +1 -1
  538. package/lib/esm/quantity-formatting/QuantityFormatter.js.map +1 -1
  539. package/lib/esm/quantity-formatting/QuantityTypesEditorSpecs.js.map +1 -1
  540. package/lib/esm/quantity-formatting/UnitsData.js.map +1 -1
  541. package/lib/esm/render/CanvasDecoration.js.map +1 -1
  542. package/lib/esm/render/CreateRenderMaterialArgs.js.map +1 -1
  543. package/lib/esm/render/CreateTextureArgs.js.map +1 -1
  544. package/lib/esm/render/Decorations.js.map +1 -1
  545. package/lib/esm/render/FeatureSymbology.js.map +1 -1
  546. package/lib/esm/render/FrameStats.js.map +1 -1
  547. package/lib/esm/render/GraphicBranch.js.map +1 -1
  548. package/lib/esm/render/GraphicBuilder.js.map +1 -1
  549. package/lib/esm/render/GraphicPrimitive.js.map +1 -1
  550. package/lib/esm/render/InstancedGraphicParams.js.map +1 -1
  551. package/lib/esm/render/MockRender.js.map +1 -1
  552. package/lib/esm/render/ParticleCollectionBuilder.js.map +1 -1
  553. package/lib/esm/render/Pixel.js.map +1 -1
  554. package/lib/esm/render/RealityMeshGraphicParams.js.map +1 -1
  555. package/lib/esm/render/RealityMeshParams.js.map +1 -1
  556. package/lib/esm/render/RenderClipVolume.js.map +1 -1
  557. package/lib/esm/render/RenderGraphic.js.map +1 -1
  558. package/lib/esm/render/RenderMemory.js.map +1 -1
  559. package/lib/esm/render/RenderPlan.js.map +1 -1
  560. package/lib/esm/render/RenderPlanarClassifier.js.map +1 -1
  561. package/lib/esm/render/RenderSystem.js.map +1 -1
  562. package/lib/esm/render/RenderTarget.js.map +1 -1
  563. package/lib/esm/render/Scene.js.map +1 -1
  564. package/lib/esm/render/ScreenSpaceEffectBuilder.js.map +1 -1
  565. package/lib/esm/render/UpsampleRealityMeshParams.js.map +1 -1
  566. package/lib/esm/render/VisibleFeature.js.map +1 -1
  567. package/lib/esm/render/primitives/ColorMap.js.map +1 -1
  568. package/lib/esm/render/primitives/EdgeParams.js.map +1 -1
  569. package/lib/esm/render/primitives/PointCloudPrimitive.js.map +1 -1
  570. package/lib/esm/render/primitives/PointStringParams.js.map +1 -1
  571. package/lib/esm/render/primitives/Polyface.js.map +1 -1
  572. package/lib/esm/render/primitives/PolylineParams.js.map +1 -1
  573. package/lib/esm/render/primitives/Primitives.js.map +1 -1
  574. package/lib/esm/render/primitives/Strokes.js.map +1 -1
  575. package/lib/esm/render/primitives/VertexKey.js.map +1 -1
  576. package/lib/esm/render/primitives/VertexTableBuilder.js.map +1 -1
  577. package/lib/esm/render/primitives/geometry/GeometryAccumulator.js.map +1 -1
  578. package/lib/esm/render/primitives/geometry/GeometryList.js.map +1 -1
  579. package/lib/esm/render/primitives/geometry/GeometryListBuilder.js.map +1 -1
  580. package/lib/esm/render/primitives/geometry/GeometryPrimitives.js.map +1 -1
  581. package/lib/esm/render/primitives/mesh/MeshBuilder.js.map +1 -1
  582. package/lib/esm/render/primitives/mesh/MeshBuilderMap.js.map +1 -1
  583. package/lib/esm/render/primitives/mesh/MeshPrimitives.js.map +1 -1
  584. package/lib/esm/render/webgl/AtmosphereUniforms.js.map +1 -1
  585. package/lib/esm/render/webgl/AttributeBuffers.js.map +1 -1
  586. package/lib/esm/render/webgl/AttributeMap.js.map +1 -1
  587. package/lib/esm/render/webgl/BackgroundMapDrape.js.map +1 -1
  588. package/lib/esm/render/webgl/BatchState.js.map +1 -1
  589. package/lib/esm/render/webgl/BatchUniforms.js.map +1 -1
  590. package/lib/esm/render/webgl/BranchStack.js.map +1 -1
  591. package/lib/esm/render/webgl/BranchState.js.map +1 -1
  592. package/lib/esm/render/webgl/BranchUniforms.js.map +1 -1
  593. package/lib/esm/render/webgl/CachedGeometry.js.map +1 -1
  594. package/lib/esm/render/webgl/ClipStack.js.map +1 -1
  595. package/lib/esm/render/webgl/ClipVolume.js.map +1 -1
  596. package/lib/esm/render/webgl/ClippingProgram.js.map +1 -1
  597. package/lib/esm/render/webgl/ColorInfo.js.map +1 -1
  598. package/lib/esm/render/webgl/Diagnostics.js.map +1 -1
  599. package/lib/esm/render/webgl/Disposable.js.map +1 -1
  600. package/lib/esm/render/webgl/DrawCommand.js.map +1 -1
  601. package/lib/esm/render/webgl/EDL.js.map +1 -1
  602. package/lib/esm/render/webgl/EdgeGeometry.js.map +1 -1
  603. package/lib/esm/render/webgl/EdgeSettings.js.map +1 -1
  604. package/lib/esm/render/webgl/FeatureOverrides.js.map +1 -1
  605. package/lib/esm/render/webgl/FloatRGBA.js.map +1 -1
  606. package/lib/esm/render/webgl/FrameBuffer.js.map +1 -1
  607. package/lib/esm/render/webgl/FrustumUniforms.js.map +1 -1
  608. package/lib/esm/render/webgl/GL.js.map +1 -1
  609. package/lib/esm/render/webgl/GLTimer.js.map +1 -1
  610. package/lib/esm/render/webgl/Graphic.js.map +1 -1
  611. package/lib/esm/render/webgl/HiliteUniforms.js.map +1 -1
  612. package/lib/esm/render/webgl/IModelFrameLifecycle.js.map +1 -1
  613. package/lib/esm/render/webgl/IndexedEdgeGeometry.js.map +1 -1
  614. package/lib/esm/render/webgl/InstancedGeometry.js.map +1 -1
  615. package/lib/esm/render/webgl/Layer.js.map +1 -1
  616. package/lib/esm/render/webgl/LayerCommands.js.map +1 -1
  617. package/lib/esm/render/webgl/LightingUniforms.js.map +1 -1
  618. package/lib/esm/render/webgl/LineCode.js.map +1 -1
  619. package/lib/esm/render/webgl/Material.js.map +1 -1
  620. package/lib/esm/render/webgl/Matrix.js.map +1 -1
  621. package/lib/esm/render/webgl/Mesh.js.map +1 -1
  622. package/lib/esm/render/webgl/MeshData.js.map +1 -1
  623. package/lib/esm/render/webgl/MeshGeometry.js.map +1 -1
  624. package/lib/esm/render/webgl/PerformanceMetrics.js.map +1 -1
  625. package/lib/esm/render/webgl/PlanarClassifier.js.map +1 -1
  626. package/lib/esm/render/webgl/PlanarGrid.js.map +1 -1
  627. package/lib/esm/render/webgl/PlanarTextureProjection.js.map +1 -1
  628. package/lib/esm/render/webgl/PointCloud.js.map +1 -1
  629. package/lib/esm/render/webgl/PointString.js.map +1 -1
  630. package/lib/esm/render/webgl/Polyline.js.map +1 -1
  631. package/lib/esm/render/webgl/Primitive.js.map +1 -1
  632. package/lib/esm/render/webgl/RealityMesh.js.map +1 -1
  633. package/lib/esm/render/webgl/RealityModelUniforms.js.map +1 -1
  634. package/lib/esm/render/webgl/RenderBuffer.js.map +1 -1
  635. package/lib/esm/render/webgl/RenderCommands.js.map +1 -1
  636. package/lib/esm/render/webgl/RenderFlags.js.map +1 -1
  637. package/lib/esm/render/webgl/RenderState.js.map +1 -1
  638. package/lib/esm/render/webgl/SceneCompositor.js.map +1 -1
  639. package/lib/esm/render/webgl/ScratchDrawParams.js.map +1 -1
  640. package/lib/esm/render/webgl/ScreenSpaceEffect.js.map +1 -1
  641. package/lib/esm/render/webgl/ShaderBuilder.js.map +1 -1
  642. package/lib/esm/render/webgl/ShaderProgram.js.map +1 -1
  643. package/lib/esm/render/webgl/ShadowUniforms.js.map +1 -1
  644. package/lib/esm/render/webgl/SolarShadowMap.js.map +1 -1
  645. package/lib/esm/render/webgl/StyleUniforms.js.map +1 -1
  646. package/lib/esm/render/webgl/SurfaceGeometry.js.map +1 -1
  647. package/lib/esm/render/webgl/Sync.js.map +1 -1
  648. package/lib/esm/render/webgl/System.js.map +1 -1
  649. package/lib/esm/render/webgl/Target.js.map +1 -1
  650. package/lib/esm/render/webgl/TargetGraphics.js.map +1 -1
  651. package/lib/esm/render/webgl/TargetUniforms.js.map +1 -1
  652. package/lib/esm/render/webgl/Technique.js.map +1 -1
  653. package/lib/esm/render/webgl/TechniqueFlags.js.map +1 -1
  654. package/lib/esm/render/webgl/TechniqueId.js.map +1 -1
  655. package/lib/esm/render/webgl/Texture.js.map +1 -1
  656. package/lib/esm/render/webgl/TextureDrape.js.map +1 -1
  657. package/lib/esm/render/webgl/ThematicSensors.js.map +1 -1
  658. package/lib/esm/render/webgl/ThematicUniforms.js.map +1 -1
  659. package/lib/esm/render/webgl/UniformHandle.js.map +1 -1
  660. package/lib/esm/render/webgl/VertexLUT.js.map +1 -1
  661. package/lib/esm/render/webgl/ViewRectUniforms.js.map +1 -1
  662. package/lib/esm/render/webgl/VisibleTileFeatures.js.map +1 -1
  663. package/lib/esm/render/webgl/glsl/AmbientOcclusion.js +154 -154
  664. package/lib/esm/render/webgl/glsl/AmbientOcclusion.js.map +1 -1
  665. package/lib/esm/render/webgl/glsl/Animation.js +83 -83
  666. package/lib/esm/render/webgl/glsl/Animation.js.map +1 -1
  667. package/lib/esm/render/webgl/glsl/Atmosphere.js +266 -266
  668. package/lib/esm/render/webgl/glsl/Atmosphere.js.map +1 -1
  669. package/lib/esm/render/webgl/glsl/Blur.js +37 -37
  670. package/lib/esm/render/webgl/glsl/Blur.js.map +1 -1
  671. package/lib/esm/render/webgl/glsl/ClearPickAndColor.js +4 -4
  672. package/lib/esm/render/webgl/glsl/ClearPickAndColor.js.map +1 -1
  673. package/lib/esm/render/webgl/glsl/ClearTranslucent.js +3 -3
  674. package/lib/esm/render/webgl/glsl/ClearTranslucent.js.map +1 -1
  675. package/lib/esm/render/webgl/glsl/Clipping.js +60 -60
  676. package/lib/esm/render/webgl/glsl/Clipping.js.map +1 -1
  677. package/lib/esm/render/webgl/glsl/Color.js +12 -12
  678. package/lib/esm/render/webgl/glsl/Color.js.map +1 -1
  679. package/lib/esm/render/webgl/glsl/Combine3Textures.js +7 -7
  680. package/lib/esm/render/webgl/glsl/Combine3Textures.js.map +1 -1
  681. package/lib/esm/render/webgl/glsl/CombineTextures.js +5 -5
  682. package/lib/esm/render/webgl/glsl/CombineTextures.js.map +1 -1
  683. package/lib/esm/render/webgl/glsl/Common.js +16 -16
  684. package/lib/esm/render/webgl/glsl/Common.js.map +1 -1
  685. package/lib/esm/render/webgl/glsl/Composite.js +71 -71
  686. package/lib/esm/render/webgl/glsl/Composite.js.map +1 -1
  687. package/lib/esm/render/webgl/glsl/CopyColor.js +6 -6
  688. package/lib/esm/render/webgl/glsl/CopyColor.js.map +1 -1
  689. package/lib/esm/render/webgl/glsl/CopyPickBuffers.js +3 -3
  690. package/lib/esm/render/webgl/glsl/CopyPickBuffers.js.map +1 -1
  691. package/lib/esm/render/webgl/glsl/CopyStencil.js +4 -4
  692. package/lib/esm/render/webgl/glsl/CopyStencil.js.map +1 -1
  693. package/lib/esm/render/webgl/glsl/Decode.js +65 -65
  694. package/lib/esm/render/webgl/glsl/Decode.js.map +1 -1
  695. package/lib/esm/render/webgl/glsl/EDL.js +103 -103
  696. package/lib/esm/render/webgl/glsl/EDL.js.map +1 -1
  697. package/lib/esm/render/webgl/glsl/EVSMFromDepth.js +25 -25
  698. package/lib/esm/render/webgl/glsl/EVSMFromDepth.js.map +1 -1
  699. package/lib/esm/render/webgl/glsl/Edge.js +146 -146
  700. package/lib/esm/render/webgl/glsl/Edge.js.map +1 -1
  701. package/lib/esm/render/webgl/glsl/FeatureSymbology.js +232 -232
  702. package/lib/esm/render/webgl/glsl/FeatureSymbology.js.map +1 -1
  703. package/lib/esm/render/webgl/glsl/Fragment.js +41 -41
  704. package/lib/esm/render/webgl/glsl/Fragment.js.map +1 -1
  705. package/lib/esm/render/webgl/glsl/Instancing.js +21 -21
  706. package/lib/esm/render/webgl/glsl/Instancing.js.map +1 -1
  707. package/lib/esm/render/webgl/glsl/Lighting.js +92 -92
  708. package/lib/esm/render/webgl/glsl/Lighting.js.map +1 -1
  709. package/lib/esm/render/webgl/glsl/LogarithmicDepthBuffer.js.map +1 -1
  710. package/lib/esm/render/webgl/glsl/LookupTable.js +19 -19
  711. package/lib/esm/render/webgl/glsl/LookupTable.js.map +1 -1
  712. package/lib/esm/render/webgl/glsl/Monochrome.js +13 -13
  713. package/lib/esm/render/webgl/glsl/Monochrome.js.map +1 -1
  714. package/lib/esm/render/webgl/glsl/PlanarClassification.js +188 -188
  715. package/lib/esm/render/webgl/glsl/PlanarClassification.js.map +1 -1
  716. package/lib/esm/render/webgl/glsl/PlanarGrid.js +22 -22
  717. package/lib/esm/render/webgl/glsl/PlanarGrid.js.map +1 -1
  718. package/lib/esm/render/webgl/glsl/PointCloud.js +28 -28
  719. package/lib/esm/render/webgl/glsl/PointCloud.js.map +1 -1
  720. package/lib/esm/render/webgl/glsl/PointString.js +9 -9
  721. package/lib/esm/render/webgl/glsl/PointString.js.map +1 -1
  722. package/lib/esm/render/webgl/glsl/Polyline.js +213 -213
  723. package/lib/esm/render/webgl/glsl/Polyline.js.map +1 -1
  724. package/lib/esm/render/webgl/glsl/RealityMesh.js +83 -83
  725. package/lib/esm/render/webgl/glsl/RealityMesh.js.map +1 -1
  726. package/lib/esm/render/webgl/glsl/RenderPass.js.map +1 -1
  727. package/lib/esm/render/webgl/glsl/ScreenSpaceEffect.js +9 -9
  728. package/lib/esm/render/webgl/glsl/ScreenSpaceEffect.js.map +1 -1
  729. package/lib/esm/render/webgl/glsl/SkyBox.js.map +1 -1
  730. package/lib/esm/render/webgl/glsl/SkySphere.js +49 -49
  731. package/lib/esm/render/webgl/glsl/SkySphere.js.map +1 -1
  732. package/lib/esm/render/webgl/glsl/SolarShadowMapping.js +51 -51
  733. package/lib/esm/render/webgl/glsl/SolarShadowMapping.js.map +1 -1
  734. package/lib/esm/render/webgl/glsl/Surface.js +239 -239
  735. package/lib/esm/render/webgl/glsl/Surface.js.map +1 -1
  736. package/lib/esm/render/webgl/glsl/Thematic.js +134 -134
  737. package/lib/esm/render/webgl/glsl/Thematic.js.map +1 -1
  738. package/lib/esm/render/webgl/glsl/Translucency.js +19 -19
  739. package/lib/esm/render/webgl/glsl/Translucency.js.map +1 -1
  740. package/lib/esm/render/webgl/glsl/Vertex.js +73 -73
  741. package/lib/esm/render/webgl/glsl/Vertex.js.map +1 -1
  742. package/lib/esm/render/webgl/glsl/Viewport.js +38 -38
  743. package/lib/esm/render/webgl/glsl/Viewport.js.map +1 -1
  744. package/lib/esm/render/webgl/glsl/ViewportQuad.js.map +1 -1
  745. package/lib/esm/render/webgl/glsl/Wiremesh.js +10 -10
  746. package/lib/esm/render/webgl/glsl/Wiremesh.js.map +1 -1
  747. package/lib/esm/render-primitives.js.map +1 -1
  748. package/lib/esm/request/Request.js.map +1 -1
  749. package/lib/esm/tile/B3dmReader.js.map +1 -1
  750. package/lib/esm/tile/BatchedTileIdMap.js.map +1 -1
  751. package/lib/esm/tile/CesiumAssetProvider.js.map +1 -1
  752. package/lib/esm/tile/ClassifierTileTree.js.map +1 -1
  753. package/lib/esm/tile/ContextShareProvider.js.map +1 -1
  754. package/lib/esm/tile/DisclosedTileTreeSet.js.map +1 -1
  755. package/lib/esm/tile/DynamicIModelTile.js.map +1 -1
  756. package/lib/esm/tile/GltfReader.js.map +1 -1
  757. package/lib/esm/tile/GraphicsCollector.js.map +1 -1
  758. package/lib/esm/tile/I3dmReader.js.map +1 -1
  759. package/lib/esm/tile/IModelTile.js.map +1 -1
  760. package/lib/esm/tile/IModelTileRequestChannels.js.map +1 -1
  761. package/lib/esm/tile/IModelTileTree.js.map +1 -1
  762. package/lib/esm/tile/ImdlDecoder.js.map +1 -1
  763. package/lib/esm/tile/ImdlGraphicsCreator.js.map +1 -1
  764. package/lib/esm/tile/ImdlParser.js.map +1 -1
  765. package/lib/esm/tile/ImdlReader.js.map +1 -1
  766. package/lib/esm/tile/LRUTileList.js.map +1 -1
  767. package/lib/esm/tile/OPCFormatInterpreter.js.map +1 -1
  768. package/lib/esm/tile/PntsReader.js.map +1 -1
  769. package/lib/esm/tile/RealityTile.js.map +1 -1
  770. package/lib/esm/tile/RealityTileDrawArgs.js.map +1 -1
  771. package/lib/esm/tile/RealityTileLoader.js.map +1 -1
  772. package/lib/esm/tile/RealityTileTree.js +1 -1
  773. package/lib/esm/tile/RealityTileTree.js.map +1 -1
  774. package/lib/esm/tile/ThreeDTileFormatInterpreter.js.map +1 -1
  775. package/lib/esm/tile/Tile.js.map +1 -1
  776. package/lib/esm/tile/TileAdmin.js.map +1 -1
  777. package/lib/esm/tile/TileContent.js.map +1 -1
  778. package/lib/esm/tile/TileDrawArgs.js.map +1 -1
  779. package/lib/esm/tile/TileGeometryCollector.js.map +1 -1
  780. package/lib/esm/tile/TileParams.js.map +1 -1
  781. package/lib/esm/tile/TileRequest.js.map +1 -1
  782. package/lib/esm/tile/TileRequestChannel.js.map +1 -1
  783. package/lib/esm/tile/TileRequestChannels.js.map +1 -1
  784. package/lib/esm/tile/TileStorage.js.map +1 -1
  785. package/lib/esm/tile/TileTree.js.map +1 -1
  786. package/lib/esm/tile/TileTreeOwner.js.map +1 -1
  787. package/lib/esm/tile/TileTreeParams.js.map +1 -1
  788. package/lib/esm/tile/TileTreeReference.js.map +1 -1
  789. package/lib/esm/tile/TileTreeSupplier.js.map +1 -1
  790. package/lib/esm/tile/TileUsageMarker.js.map +1 -1
  791. package/lib/esm/tile/TileUser.js.map +1 -1
  792. package/lib/esm/tile/TileUserSet.js.map +1 -1
  793. package/lib/esm/tile/TiledGraphicsProvider.js.map +1 -1
  794. package/lib/esm/tile/ViewFlagOverrides.js.map +1 -1
  795. package/lib/esm/tile/internal.js.map +1 -1
  796. package/lib/esm/tile/map/ArcGISTileMap.js.map +1 -1
  797. package/lib/esm/tile/map/ArcGisUtilities.js.map +1 -1
  798. package/lib/esm/tile/map/BingElevation.js.map +1 -1
  799. package/lib/esm/tile/map/CesiumTerrainProvider.js.map +1 -1
  800. package/lib/esm/tile/map/EllipsoidTerrainProvider.js.map +1 -1
  801. package/lib/esm/tile/map/ImageryProviders/ArcGISImageryProvider.js.map +1 -1
  802. package/lib/esm/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.js.map +1 -1
  803. package/lib/esm/tile/map/ImageryProviders/AzureMapsLayerImageryProvider.js.map +1 -1
  804. package/lib/esm/tile/map/ImageryProviders/BingImageryProvider.js.map +1 -1
  805. package/lib/esm/tile/map/ImageryProviders/MapBoxLayerImageryProvider.js.map +1 -1
  806. package/lib/esm/tile/map/ImageryProviders/TileUrlImageryProvider.js.map +1 -1
  807. package/lib/esm/tile/map/ImageryProviders/WmsMapLayerImageryProvider.js.map +1 -1
  808. package/lib/esm/tile/map/ImageryProviders/WmtsMapLayerImageryProvider.js.map +1 -1
  809. package/lib/esm/tile/map/MapCartoRectangle.js.map +1 -1
  810. package/lib/esm/tile/map/MapFeatureInfo.js.map +1 -1
  811. package/lib/esm/tile/map/MapLayerAuthentication.js.map +1 -1
  812. package/lib/esm/tile/map/MapLayerFormatRegistry.js.map +1 -1
  813. package/lib/esm/tile/map/MapLayerImageryProvider.js +2 -2
  814. package/lib/esm/tile/map/MapLayerImageryProvider.js.map +1 -1
  815. package/lib/esm/tile/map/MapLayerSources.js.map +1 -1
  816. package/lib/esm/tile/map/MapLayerTileTreeReference.js.map +1 -1
  817. package/lib/esm/tile/map/MapTile.js.map +1 -1
  818. package/lib/esm/tile/map/MapTileAvailability.js.map +1 -1
  819. package/lib/esm/tile/map/MapTileLoader.js.map +1 -1
  820. package/lib/esm/tile/map/MapTiledGraphicsProvider.js.map +1 -1
  821. package/lib/esm/tile/map/MapTilingScheme.js.map +1 -1
  822. package/lib/esm/tile/map/QuadId.js.map +1 -1
  823. package/lib/esm/tile/map/TerrainMeshProvider.js.map +1 -1
  824. package/lib/esm/tile/map/TerrainProvider.js.map +1 -1
  825. package/lib/esm/tile/map/WmsCapabilities.js.map +1 -1
  826. package/lib/esm/tile/map/WmsUtilities.js.map +1 -1
  827. package/lib/esm/tile/map/WmtsCapabilities.js.map +1 -1
  828. package/lib/esm/tools/AccuDrawTool.js.map +1 -1
  829. package/lib/esm/tools/ClipViewTool.js.map +1 -1
  830. package/lib/esm/tools/EditManipulator.js.map +1 -1
  831. package/lib/esm/tools/ElementSetTool.js.map +1 -1
  832. package/lib/esm/tools/EventController.js.map +1 -1
  833. package/lib/esm/tools/IdleTool.js.map +1 -1
  834. package/lib/esm/tools/MeasureTool.js.map +1 -1
  835. package/lib/esm/tools/PrimitiveTool.js.map +1 -1
  836. package/lib/esm/tools/SelectTool.js.map +1 -1
  837. package/lib/esm/tools/ToolAdmin.js.map +1 -1
  838. package/lib/esm/tools/ToolAssistance.js.map +1 -1
  839. package/lib/esm/tools/ToolSettings.js.map +1 -1
  840. package/lib/esm/tools/ViewTool.js.map +1 -1
  841. package/lib/esm/webgl.js.map +1 -1
  842. package/lib/esm/workers/ImdlParser/Worker.js.map +1 -1
  843. package/lib/esm/workers/ImdlParser/webpack.config.js +40 -40
  844. package/lib/esm/workers/RegisterWorker.js.map +1 -1
  845. package/lib/public/assets/MapLayerSources.json +25 -25
  846. package/lib/public/images/cesium-ion.svg +92 -92
  847. package/lib/public/images/imodeljs-icon.svg +2 -2
  848. package/lib/public/locales/en/CoreTools.json +477 -477
  849. package/lib/public/locales/en/iModelJs.json +170 -170
  850. package/lib/public/scripts/checkbrowser.js +24 -24
  851. package/package.json +23 -22
@@ -1 +1 @@
1
- {"version":3,"file":"QuantityTypesEditorSpecs.js","sourceRoot":"","sources":["../../../src/quantity-formatting/QuantityTypesEditorSpecs.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAyBH;;GAEG;AACI,MAAM,8BAA8B,GAAG,CAAC,IAAgC,EAAwC,EAAE;IACvH,OAAO,IAAI,CAAC,UAAU,KAAK,UAAU,CAAC;AACxC,CAAC,CAAC;AAFW,QAAA,8BAA8B,kCAEzC;AAWF;;GAEG;AACI,MAAM,+BAA+B,GAAG,CAAC,IAAgC,EAAyC,EAAE;IACzH,OAAO,IAAI,CAAC,UAAU,KAAK,MAAM,CAAC;AACpC,CAAC,CAAC;AAFW,QAAA,+BAA+B,mCAE1C;AAYF;;GAEG;AACI,MAAM,gCAAgC,GAAG,CAAC,IAAgC,EAA0C,EAAE;IAC3H,OAAO,IAAI,CAAC,UAAU,KAAK,QAAQ,CAAC;AACtC,CAAC,CAAC;AAFW,QAAA,gCAAgC,oCAE3C","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module QuantityFormatting\r\n */\r\n\r\nimport {\r\n FormatProps,\r\n} from \"@itwin/core-quantity\";\r\n\r\n/** Properties that define an EditorSpec for editing a custom formatting property that is stored in the \"custom\" property in the FormatProps.\r\n * The editor controls will be automatically generated in the UI and are limited to a checkbox to set a boolean value, a text dropdown/select\r\n * component to pick a string value from a list of options, and a text input component that returns a string value.\r\n * @public\r\n */\r\nexport interface CustomFormatPropEditorSpec {\r\n editorType: \"checkbox\" | \"text\" | \"select\";\r\n label: string;\r\n}\r\n\r\n/** CheckboxFormatPropEditorSpec defines getter and setter method for a boolean property editor.\r\n * @public\r\n */\r\nexport interface CheckboxFormatPropEditorSpec extends CustomFormatPropEditorSpec {\r\n editorType: \"checkbox\";\r\n getBool: (props: FormatProps) => boolean;\r\n setBool: (props: FormatProps, isChecked: boolean) => FormatProps;\r\n}\r\n\r\n/** CheckboxFormatPropEditorSpec type guard.\r\n * @public\r\n */\r\nexport const isCheckboxFormatPropEditorSpec = (item: CustomFormatPropEditorSpec): item is CheckboxFormatPropEditorSpec => {\r\n return item.editorType === \"checkbox\";\r\n};\r\n\r\n/** TextInputFormatPropEditorSpec defines getter and setter method for a text input property editor.\r\n * @public\r\n */\r\nexport interface TextInputFormatPropEditorSpec extends CustomFormatPropEditorSpec {\r\n editorType: \"text\";\r\n getString: (props: FormatProps) => string;\r\n setString: (props: FormatProps, value: string) => FormatProps;\r\n}\r\n\r\n/** TextInputFormatPropEditorSpec type guard.\r\n * @public\r\n */\r\nexport const isTextInputFormatPropEditorSpec = (item: CustomFormatPropEditorSpec): item is TextInputFormatPropEditorSpec => {\r\n return item.editorType === \"text\";\r\n};\r\n\r\n/** TextSelectFormatPropEditorSpec defines getter and setter method for a Select/Dropdown property editor.\r\n * @public\r\n */\r\nexport interface TextSelectFormatPropEditorSpec extends CustomFormatPropEditorSpec {\r\n editorType: \"select\";\r\n selectOptions: { label: string, value: string }[];\r\n getString: (props: FormatProps) => string;\r\n setString: (props: FormatProps, value: string) => FormatProps;\r\n}\r\n\r\n/** TextSelectFormatPropEditorSpec type guard.\r\n * @public\r\n */\r\nexport const isTextSelectFormatPropEditorSpec = (item: CustomFormatPropEditorSpec): item is TextSelectFormatPropEditorSpec => {\r\n return item.editorType === \"select\";\r\n};\r\n"]}
1
+ {"version":3,"file":"QuantityTypesEditorSpecs.js","sourceRoot":"","sources":["../../../src/quantity-formatting/QuantityTypesEditorSpecs.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAyBH;;GAEG;AACI,MAAM,8BAA8B,GAAG,CAAC,IAAgC,EAAwC,EAAE;IACvH,OAAO,IAAI,CAAC,UAAU,KAAK,UAAU,CAAC;AACxC,CAAC,CAAC;AAFW,QAAA,8BAA8B,kCAEzC;AAWF;;GAEG;AACI,MAAM,+BAA+B,GAAG,CAAC,IAAgC,EAAyC,EAAE;IACzH,OAAO,IAAI,CAAC,UAAU,KAAK,MAAM,CAAC;AACpC,CAAC,CAAC;AAFW,QAAA,+BAA+B,mCAE1C;AAYF;;GAEG;AACI,MAAM,gCAAgC,GAAG,CAAC,IAAgC,EAA0C,EAAE;IAC3H,OAAO,IAAI,CAAC,UAAU,KAAK,QAAQ,CAAC;AACtC,CAAC,CAAC;AAFW,QAAA,gCAAgC,oCAE3C","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/** @packageDocumentation\n * @module QuantityFormatting\n */\n\nimport {\n FormatProps,\n} from \"@itwin/core-quantity\";\n\n/** Properties that define an EditorSpec for editing a custom formatting property that is stored in the \"custom\" property in the FormatProps.\n * The editor controls will be automatically generated in the UI and are limited to a checkbox to set a boolean value, a text dropdown/select\n * component to pick a string value from a list of options, and a text input component that returns a string value.\n * @public\n */\nexport interface CustomFormatPropEditorSpec {\n editorType: \"checkbox\" | \"text\" | \"select\";\n label: string;\n}\n\n/** CheckboxFormatPropEditorSpec defines getter and setter method for a boolean property editor.\n * @public\n */\nexport interface CheckboxFormatPropEditorSpec extends CustomFormatPropEditorSpec {\n editorType: \"checkbox\";\n getBool: (props: FormatProps) => boolean;\n setBool: (props: FormatProps, isChecked: boolean) => FormatProps;\n}\n\n/** CheckboxFormatPropEditorSpec type guard.\n * @public\n */\nexport const isCheckboxFormatPropEditorSpec = (item: CustomFormatPropEditorSpec): item is CheckboxFormatPropEditorSpec => {\n return item.editorType === \"checkbox\";\n};\n\n/** TextInputFormatPropEditorSpec defines getter and setter method for a text input property editor.\n * @public\n */\nexport interface TextInputFormatPropEditorSpec extends CustomFormatPropEditorSpec {\n editorType: \"text\";\n getString: (props: FormatProps) => string;\n setString: (props: FormatProps, value: string) => FormatProps;\n}\n\n/** TextInputFormatPropEditorSpec type guard.\n * @public\n */\nexport const isTextInputFormatPropEditorSpec = (item: CustomFormatPropEditorSpec): item is TextInputFormatPropEditorSpec => {\n return item.editorType === \"text\";\n};\n\n/** TextSelectFormatPropEditorSpec defines getter and setter method for a Select/Dropdown property editor.\n * @public\n */\nexport interface TextSelectFormatPropEditorSpec extends CustomFormatPropEditorSpec {\n editorType: \"select\";\n selectOptions: { label: string, value: string }[];\n getString: (props: FormatProps) => string;\n setString: (props: FormatProps, value: string) => FormatProps;\n}\n\n/** TextSelectFormatPropEditorSpec type guard.\n * @public\n */\nexport const isTextSelectFormatPropEditorSpec = (item: CustomFormatPropEditorSpec): item is TextSelectFormatPropEditorSpec => {\n return item.editorType === \"select\";\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"UnitsData.js","sourceRoot":"","sources":["../../../src/quantity-formatting/UnitsData.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH;;GAEG;AACU,QAAA,eAAe,GAAG;IAC7B,8BAA8B;IAC9B,EAAE,IAAI,EAAE,WAAW,EAAE,gBAAgB,EAAE,CAAC,QAAQ,CAAC,EAAE;IACnD,qBAAqB;IACrB,EAAE,IAAI,EAAE,eAAe,EAAE,gBAAgB,EAAE,CAAC,KAAK,EAAE,GAAG,CAAC,EAAE;IACzD,EAAE,IAAI,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,CAAC,KAAK,CAAC,EAAE;IACvD,EAAE,IAAI,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,CAAC,KAAK,CAAC,EAAE;IACvD,EAAE,IAAI,EAAE,YAAY,EAAE,gBAAgB,EAAE,CAAC,IAAI,CAAC,EAAE;IAChD,4BAA4B;IAC5B,EAAE,IAAI,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC,KAAK,CAAC,EAAE;IAC9C,EAAE,IAAI,EAAE,WAAW,EAAE,gBAAgB,EAAE,EAAE,EAAE;IAC3C,EAAE,IAAI,EAAE,UAAU,EAAE,gBAAgB,EAAE,CAAC,IAAI,CAAC,EAAE;IAC9C,EAAE,IAAI,EAAE,WAAW,EAAE,gBAAgB,EAAE,CAAC,KAAK,CAAC,EAAE;IAChD,EAAE,IAAI,EAAE,YAAY,EAAE,gBAAgB,EAAE,CAAC,MAAM,CAAC,EAAE;IAClD,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AE,IAAI,EAAE,KAAK,EAAE,gBAAgB,CAAC,EAAE;IACvF,EAAE,IAAI,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,CAAC,KAAK,EAAE,mBAAmB,CAAC,EAAE;IAC/E,EAAE,IAAI,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,CAAC,KAAK,EAAE,oBAAoB,CAAC,EAAE;IAC/E,EAAE,IAAI,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,CAAC,mBAAmB,EAAE,kBAAkB,EAAE,KAAK,CAAC,EAAE;IACpG,EAAE,IAAI,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,CAAC,oBAAoB,CAAC,EAAE;IAC3E,kDAAkD;IAClD,EAAE,IAAI,EAAE,aAAa,EAAE,gBAAgB,EAAE,CAAC,IAAI,CAAC,EAAE;IACjD,EAAE,IAAI,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,CAAC,OAAO,CAAC,EAAE;IAC9D,EAAE,IAAI,EAAE,YAAY,EAAE,gBAAgB,EAAE,CAAC,IAAI,CAAC,EAAE;IAChD,+CAA+C;IAC/C,EAAE,IAAI,EAAE,cAAc,EAAE,gBAAgB,EAAE,CAAC,IAAI,CAAC,EAAE;IAClD,EAAE,IAAI,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,CAAC,IAAI,CAAC,EAAE;IAC5D,EAAE,IAAI,EAAE,eAAe,EAAE,gBAAgB,EAAE,CAAC,IAAI,CAAC,EAAE;IACnD,EAAE,IAAI,EAAE,aAAa,EAAE,gBAAgB,EAAE,CAAC,IAAI,CAAC,EAAE;CAClD,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module QuantityFormatting\r\n */\r\n\r\n/**\r\n * Additional unit data such alternate display label not found in the Units Schema\r\n */\r\nexport const UNIT_EXTRA_DATA = [\r\n // Angles ( base unit radian )\r\n { name: \"Units.RAD\", altDisplayLabels: [\"radian\"] },\r\n // 1 rad = 180.0/PI °\r\n { name: \"Units.ARC_DEG\", altDisplayLabels: [\"deg\", \"^\"] },\r\n { name: \"Units.ARC_MINUTE\", altDisplayLabels: [\"min\"] },\r\n { name: \"Units.ARC_SECOND\", altDisplayLabels: [\"sec\"] },\r\n { name: \"Units.GRAD\", altDisplayLabels: [\"gd\"] },\r\n // Time ( base unit second )\r\n { name: \"Units.S\", altDisplayLabels: [\"sec\"] },\r\n { name: \"Units.MIN\", altDisplayLabels: [] },\r\n { name: \"Units.HR\", altDisplayLabels: [\"hr\"] },\r\n { name: \"Units.DAY\", altDisplayLabels: [\"day\"] },\r\n { name: \"Units.WEEK\", altDisplayLabels: [\"week\"] },\r\n { name: \"Units.YR\", altDisplayLabels: [\"year\"] },\r\n // conversion => specified unit to base unit of m\r\n { name: \"Units.M\", altDisplayLabels: [\"meter\"] },\r\n { name: \"Units.MM\", altDisplayLabels: [\"MM\"] },\r\n { name: \"Units.CM\", altDisplayLabels: [\"CM\"] },\r\n { name: \"Units.DM\", altDisplayLabels: [\"DM\"] },\r\n { name: \"Units.KM\", altDisplayLabels: [\"KM\"] },\r\n { name: \"Units.UM\", altDisplayLabels: [] },\r\n { name: \"Units.MILLIINCH\", altDisplayLabels: [] },\r\n { name: \"Units.MICROINCH\", altDisplayLabels: [] },\r\n { name: \"Units.MILLIFOOT\", altDisplayLabels: [] },\r\n { name: \"Units.IN\", altDisplayLabels: [\"IN\", \"\\\"\"] },\r\n { name: \"Units.FT\", altDisplayLabels: [\"F\", \"FT\", \"'\"] },\r\n { name: \"Units.CHAIN\", altDisplayLabels: [\"CHAIN\"] },\r\n { name: \"Units.YRD\", altDisplayLabels: [\"YRD\", \"yrd\"] },\r\n { name: \"Units.MILE\", altDisplayLabels: [\"mile\", \"Miles\", \"Mile\"] },\r\n { name: \"Units.US_SURVEY_FT\", altDisplayLabels: [\"ft\", \"SF\", \"USF\", \"ft (US Survey)\"] },\r\n { name: \"Units.US_SURVEY_YRD\", altDisplayLabels: [\"USY\", \"yards (US Survey)\"] },\r\n { name: \"Units.US_SURVEY_IN\", altDisplayLabels: [\"USI\", \"inches (US Survey)\"] },\r\n { name: \"Units.US_SURVEY_MILE\", altDisplayLabels: [\"miles (US Survey)\", \"mile (US Survey)\", \"USM\"] },\r\n { name: \"Units.US_SURVEY_CHAIN\", altDisplayLabels: [\"chains (US Survey)\"] },\r\n // conversion => specified unit to base unit of m²\r\n { name: \"Units.SQ_FT\", altDisplayLabels: [\"sf\"] },\r\n { name: \"Units.SQ_US_SURVEY_FT\", altDisplayLabels: [\"sussf\"] },\r\n { name: \"Units.SQ_M\", altDisplayLabels: [\"sm\"] },\r\n // conversion => specified unit to base unit m³\r\n { name: \"Units.CUB_FT\", altDisplayLabels: [\"cf\"] },\r\n { name: \"Units.CUB_US_SURVEY_FT\", altDisplayLabels: [\"cf\"] },\r\n { name: \"Units.CUB_YRD\", altDisplayLabels: [\"cy\"] },\r\n { name: \"Units.CUB_M\", altDisplayLabels: [\"cm\"] },\r\n];\r\n"]}
1
+ {"version":3,"file":"UnitsData.js","sourceRoot":"","sources":["../../../src/quantity-formatting/UnitsData.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH;;GAEG;AACU,QAAA,eAAe,GAAG;IAC7B,8BAA8B;IAC9B,EAAE,IAAI,EAAE,WAAW,EAAE,gBAAgB,EAAE,CAAC,QAAQ,CAAC,EAAE;IACnD,qBAAqB;IACrB,EAAE,IAAI,EAAE,eAAe,EAAE,gBAAgB,EAAE,CAAC,KAAK,EAAE,GAAG,CAAC,EAAE;IACzD,EAAE,IAAI,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,CAAC,KAAK,CAAC,EAAE;IACvD,EAAE,IAAI,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,CAAC,KAAK,CAAC,EAAE;IACvD,EAAE,IAAI,EAAE,Y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B,EAAE,CAAC,IAAI,CAAC,EAAE;IAC5D,EAAE,IAAI,EAAE,eAAe,EAAE,gBAAgB,EAAE,CAAC,IAAI,CAAC,EAAE;IACnD,EAAE,IAAI,EAAE,aAAa,EAAE,gBAAgB,EAAE,CAAC,IAAI,CAAC,EAAE;CAClD,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/** @packageDocumentation\n * @module QuantityFormatting\n */\n\n/**\n * Additional unit data such alternate display label not found in the Units Schema\n */\nexport const UNIT_EXTRA_DATA = [\n // Angles ( base unit radian )\n { name: \"Units.RAD\", altDisplayLabels: [\"radian\"] },\n // 1 rad = 180.0/PI °\n { name: \"Units.ARC_DEG\", altDisplayLabels: [\"deg\", \"^\"] },\n { name: \"Units.ARC_MINUTE\", altDisplayLabels: [\"min\"] },\n { name: \"Units.ARC_SECOND\", altDisplayLabels: [\"sec\"] },\n { name: \"Units.GRAD\", altDisplayLabels: [\"gd\"] },\n // Time ( base unit second )\n { name: \"Units.S\", altDisplayLabels: [\"sec\"] },\n { name: \"Units.MIN\", altDisplayLabels: [] },\n { name: \"Units.HR\", altDisplayLabels: [\"hr\"] },\n { name: \"Units.DAY\", altDisplayLabels: [\"day\"] },\n { name: \"Units.WEEK\", altDisplayLabels: [\"week\"] },\n { name: \"Units.YR\", altDisplayLabels: [\"year\"] },\n // conversion => specified unit to base unit of m\n { name: \"Units.M\", altDisplayLabels: [\"meter\"] },\n { name: \"Units.MM\", altDisplayLabels: [\"MM\"] },\n { name: \"Units.CM\", altDisplayLabels: [\"CM\"] },\n { name: \"Units.DM\", altDisplayLabels: [\"DM\"] },\n { name: \"Units.KM\", altDisplayLabels: [\"KM\"] },\n { name: \"Units.UM\", altDisplayLabels: [] },\n { name: \"Units.MILLIINCH\", altDisplayLabels: [] },\n { name: \"Units.MICROINCH\", altDisplayLabels: [] },\n { name: \"Units.MILLIFOOT\", altDisplayLabels: [] },\n { name: \"Units.IN\", altDisplayLabels: [\"IN\", \"\\\"\"] },\n { name: \"Units.FT\", altDisplayLabels: [\"F\", \"FT\", \"'\"] },\n { name: \"Units.CHAIN\", altDisplayLabels: [\"CHAIN\"] },\n { name: \"Units.YRD\", altDisplayLabels: [\"YRD\", \"yrd\"] },\n { name: \"Units.MILE\", altDisplayLabels: [\"mile\", \"Miles\", \"Mile\"] },\n { name: \"Units.US_SURVEY_FT\", altDisplayLabels: [\"ft\", \"SF\", \"USF\", \"ft (US Survey)\"] },\n { name: \"Units.US_SURVEY_YRD\", altDisplayLabels: [\"USY\", \"yards (US Survey)\"] },\n { name: \"Units.US_SURVEY_IN\", altDisplayLabels: [\"USI\", \"inches (US Survey)\"] },\n { name: \"Units.US_SURVEY_MILE\", altDisplayLabels: [\"miles (US Survey)\", \"mile (US Survey)\", \"USM\"] },\n { name: \"Units.US_SURVEY_CHAIN\", altDisplayLabels: [\"chains (US Survey)\"] },\n // conversion => specified unit to base unit of m²\n { name: \"Units.SQ_FT\", altDisplayLabels: [\"sf\"] },\n { name: \"Units.SQ_US_SURVEY_FT\", altDisplayLabels: [\"sussf\"] },\n { name: \"Units.SQ_M\", altDisplayLabels: [\"sm\"] },\n // conversion => specified unit to base unit m³\n { name: \"Units.CUB_FT\", altDisplayLabels: [\"cf\"] },\n { name: \"Units.CUB_US_SURVEY_FT\", altDisplayLabels: [\"cf\"] },\n { name: \"Units.CUB_YRD\", altDisplayLabels: [\"cy\"] },\n { name: \"Units.CUB_M\", altDisplayLabels: [\"cm\"] },\n];\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"CanvasDecoration.js","sourceRoot":"","sources":["../../../src/render/CanvasDecoration.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Rendering\r\n */\r\n\r\nimport { XAndY } from \"@itwin/core-geometry\";\r\nimport { BeButtonEvent, BeWheelEvent } from \"../tools/Tool\";\r\n\r\n/** A [Decoration]($docs/learning/frontend/ViewDecorations#canvas-decorations) that is drawn onto the\r\n * [2d canvas](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D) on top of a ScreenViewport.\r\n * CanvasDecorations may be pickable by implementing [[pick]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface CanvasDecoration {\r\n /**\r\n * Required method to draw this decoration into the supplied [CanvasRenderingContext2D](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D). This method is called every time a frame is rendered.\r\n * @param ctx The CanvasRenderingContext2D for the [[ScreenViewport]] being rendered.\r\n * @note Before this this function is called, the state of the CanvasRenderingContext2D is [saved](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/save),\r\n * and it is [restored](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/restore) when this method returns. Therefore,\r\n * it is *not* necessary for implementers to save/restore themselves.\r\n */\r\n drawDecoration(ctx: CanvasRenderingContext2D): void;\r\n /**\r\n * Optional view coordinates position of this overlay decoration. If present, [ctx.translate](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/translate) is called\r\n * with this point before [[drawDecoration]] is called.\r\n */\r\n position?: XAndY;\r\n /** Optional method to provide feedback when mouse events occur on this decoration.\r\n * @param pt The position of the mouse in the ScreenViewport\r\n * @return true if the mouse is inside this decoration.\r\n * @note If this method is not present, no mouse events are directed to this decoration.\r\n */\r\n pick?(pt: XAndY): boolean;\r\n /** Optional method to be called whenever this decorator is picked and the mouse first enters this decoration. */\r\n onMouseEnter?(ev: BeButtonEvent): void;\r\n /** Optional method to be called whenever when the mouse leaves this decoration. */\r\n onMouseLeave?(): void;\r\n /** Optional method to be called whenever when the mouse moves inside this decoration. */\r\n onMouseMove?(ev: BeButtonEvent): void;\r\n /**\r\n * Optional method to be called whenever this decorator is picked and a mouse button is pressed or released inside this decoration.\r\n * @return true if the event was handled by this decoration and should *not* be forwarded to the active tool.\r\n * @note This method is called for both mouse up and down events. If it returns `true` for a down event, it should also return `true` for the\r\n * corresponding up event.\r\n */\r\n onMouseButton?(ev: BeButtonEvent): boolean;\r\n /**\r\n * Optional method to be called when the mouse wheel is rolled with the pointer over this decoration.\r\n * @return true to indicate that the event has been handled and should not be propagated to default handler\r\n */\r\n onWheel?(ev: BeWheelEvent): boolean;\r\n /** Cursor to use when mouse is inside this decoration. Default is \"pointer\". */\r\n decorationCursor?: string;\r\n}\r\n\r\n/** An array of [[CanvasDecoration]]s.\r\n * @public\r\n * @extensions\r\n */\r\nexport type CanvasDecorationList = CanvasDecoration[];\r\n"]}
1
+ {"version":3,"file":"CanvasDecoration.js","sourceRoot":"","sources":["../../../src/render/CanvasDecoration.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG","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/** @packageDocumentation\n * @module Rendering\n */\n\nimport { XAndY } from \"@itwin/core-geometry\";\nimport { BeButtonEvent, BeWheelEvent } from \"../tools/Tool\";\n\n/** A [Decoration]($docs/learning/frontend/ViewDecorations#canvas-decorations) that is drawn onto the\n * [2d canvas](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D) on top of a ScreenViewport.\n * CanvasDecorations may be pickable by implementing [[pick]].\n * @public\n * @extensions\n */\nexport interface CanvasDecoration {\n /**\n * Required method to draw this decoration into the supplied [CanvasRenderingContext2D](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D). This method is called every time a frame is rendered.\n * @param ctx The CanvasRenderingContext2D for the [[ScreenViewport]] being rendered.\n * @note Before this this function is called, the state of the CanvasRenderingContext2D is [saved](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/save),\n * and it is [restored](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/restore) when this method returns. Therefore,\n * it is *not* necessary for implementers to save/restore themselves.\n */\n drawDecoration(ctx: CanvasRenderingContext2D): void;\n /**\n * Optional view coordinates position of this overlay decoration. If present, [ctx.translate](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/translate) is called\n * with this point before [[drawDecoration]] is called.\n */\n position?: XAndY;\n /** Optional method to provide feedback when mouse events occur on this decoration.\n * @param pt The position of the mouse in the ScreenViewport\n * @return true if the mouse is inside this decoration.\n * @note If this method is not present, no mouse events are directed to this decoration.\n */\n pick?(pt: XAndY): boolean;\n /** Optional method to be called whenever this decorator is picked and the mouse first enters this decoration. */\n onMouseEnter?(ev: BeButtonEvent): void;\n /** Optional method to be called whenever when the mouse leaves this decoration. */\n onMouseLeave?(): void;\n /** Optional method to be called whenever when the mouse moves inside this decoration. */\n onMouseMove?(ev: BeButtonEvent): void;\n /**\n * Optional method to be called whenever this decorator is picked and a mouse button is pressed or released inside this decoration.\n * @return true if the event was handled by this decoration and should *not* be forwarded to the active tool.\n * @note This method is called for both mouse up and down events. If it returns `true` for a down event, it should also return `true` for the\n * corresponding up event.\n */\n onMouseButton?(ev: BeButtonEvent): boolean;\n /**\n * Optional method to be called when the mouse wheel is rolled with the pointer over this decoration.\n * @return true to indicate that the event has been handled and should not be propagated to default handler\n */\n onWheel?(ev: BeWheelEvent): boolean;\n /** Cursor to use when mouse is inside this decoration. Default is \"pointer\". */\n decorationCursor?: string;\n}\n\n/** An array of [[CanvasDecoration]]s.\n * @public\n * @extensions\n */\nexport type CanvasDecorationList = CanvasDecoration[];\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"CreateRenderMaterialArgs.js","sourceRoot":"","sources":["../../../src/render/CreateRenderMaterialArgs.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Rendering\r\n */\r\n\r\nimport { Id64String } from \"@itwin/core-bentley\";\r\nimport { IModelConnection } from \"../IModelConnection\";\r\nimport { MaterialParams } from \"../common/render/MaterialParams\";\r\n\r\n/** Specifies the provenance of a [RenderMaterial]($common) created for a persistent material element.\r\n * @see [[CreateRenderMaterialArgs.source]].\r\n * @internal\r\n */\r\nexport interface RenderMaterialSource {\r\n iModel: IModelConnection;\r\n id: Id64String;\r\n}\r\n\r\n/** Arguments supplied to [[RenderSystem.createRenderMaterial]].\r\n * @public\r\n */\r\nexport interface CreateRenderMaterialArgs extends MaterialParams {\r\n /** If supplied, the material will be cached on the iModel by its element Id for subsequent reuse.\r\n * @internal\r\n */\r\n source?: RenderMaterialSource;\r\n}\r\n"]}
1
+ {"version":3,"file":"CreateRenderMaterialArgs.js","sourceRoot":"","sources":["../../../src/render/CreateRenderMaterialArgs.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG","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/** @packageDocumentation\n * @module Rendering\n */\n\nimport { Id64String } from \"@itwin/core-bentley\";\nimport { IModelConnection } from \"../IModelConnection\";\nimport { MaterialParams } from \"../common/render/MaterialParams\";\n\n/** Specifies the provenance of a [RenderMaterial]($common) created for a persistent material element.\n * @see [[CreateRenderMaterialArgs.source]].\n * @internal\n */\nexport interface RenderMaterialSource {\n iModel: IModelConnection;\n id: Id64String;\n}\n\n/** Arguments supplied to [[RenderSystem.createRenderMaterial]].\n * @public\n */\nexport interface CreateRenderMaterialArgs extends MaterialParams {\n /** If supplied, the material will be cached on the iModel by its element Id for subsequent reuse.\n * @internal\n */\n source?: RenderMaterialSource;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"CreateTextureArgs.js","sourceRoot":"","sources":["../../../src/render/CreateTextureArgs.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Rendering\r\n */\r\n\r\nimport { ImageSource, RenderTexture, TextureTransparency } from \"@itwin/core-common\";\r\nimport { IModelConnection } from \"../IModelConnection\";\r\nimport { TextureCacheKey, TextureImage } from \"../common/render/TextureParams\";\r\n\r\n/** Specifies that a [RenderTexture]($common) should be kept in memory until the corresponding [[IModelConnection]] is closed, at\r\n * which point it will be disposed.\r\n * @see [[TextureOwnership]]\r\n * @public\r\n * @extensions\r\n */\r\nexport interface TextureCacheOwnership {\r\n /** The iModel on which the texture will be cached. */\r\n iModel: IModelConnection;\r\n /** The key uniquely identifying the texture amongst all textures cached on the iModel. */\r\n key: TextureCacheKey;\r\n}\r\n\r\n/** Describes the ownership of a [RenderTexture]($common), which controls when the texture is disposed of.\r\n * - [[TextureCacheOwnership]] indicates that the texture will be disposed of when the [[IModelConnection]] is closed, and that attempting\r\n * to create or look up a texture with the same `key` as an existing cached texture will always return the cached texture instead of creating\r\n * a new one.\r\n * - \"external\" indicates that the lifetime of the texture will be controlled externally, e.g. by a [[Decorator]], in which case the owner of the\r\n * texture is responsible for calling its `dispose` method when it is no longer needed.\r\n * @see [[CreateTextureArgs.ownership]]\r\n * @public\r\n * @extensions\r\n */\r\nexport type TextureOwnership = TextureCacheOwnership | \"external\";\r\n\r\n/** Arguments supplied to [[RenderSystem.createTexture]] to create a [RenderTexture]($common).\r\n * @public\r\n * @extensions\r\n */\r\nexport interface CreateTextureArgs {\r\n /** The type of texture to create. Default: [RenderTexture.Type.Normal]($common). */\r\n type?: RenderTexture.Type;\r\n /** The image from which to create the texture. */\r\n image: TextureImage;\r\n /** The ownership of the texture. If `undefined`, the texture's lifetime will be controlled by the first [[RenderGraphic]] with which it\r\n * becomes associated, such that disposing of the graphic will also dispose of the texture.\r\n * Applications typically create textures for use with [[Decorator]]s, which recreate their graphics quite frequently.\r\n * Ideally, the decorator will take ownership of the texture by specifying \"external\" and disposing of the texture when it is no longer needed,\r\n * rather than recreating the texture every time it creates its decoration graphics.\r\n */\r\n ownership?: TextureOwnership;\r\n}\r\n\r\n/** Arguments supplied to [[RenderSystem.createTextureFromSource]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface CreateTextureFromSourceArgs {\r\n /** The type of texture to create. Default: [RenderTexture.Type.Normal]($common). */\r\n type?: RenderTexture.Type;\r\n /** The image from which to create the texture. */\r\n source: ImageSource;\r\n /** Describes the transparency of the image. If this information can be supplied, it can improve performance.\r\n * If not supplied, PNGs will default to [TextureTransparency.Mixed]($common) and JPEGs (which do not support transparency) to [TextureTransparency.Opaque]($common).\r\n */\r\n transparency?: TextureTransparency;\r\n /** The ownership of the texture. If `undefined`, the texture's lifetime will be controlled by the first [[RenderGraphic]] with which it\r\n * becomes associated, such that disposing of the graphic will also dispose of the texture.\r\n * Applications typically create textures for use with [[Decorator]]s, which recreate their graphics quite frequently.\r\n * Ideally, the decorator will take ownership of the texture by specifying \"external\" and disposing of the texture when it is no longer needed,\r\n * rather than recreating the texture every time it creates its decoration graphics.\r\n */\r\n ownership?: TextureCacheOwnership & { key: string } | \"external\";\r\n}\r\n"]}
1
+ {"version":3,"file":"CreateTextureArgs.js","sourceRoot":"","sources":["../../../src/render/CreateTextureArgs.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG","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/** @packageDocumentation\n * @module Rendering\n */\n\nimport { ImageSource, RenderTexture, TextureTransparency } from \"@itwin/core-common\";\nimport { IModelConnection } from \"../IModelConnection\";\nimport { TextureCacheKey, TextureImage } from \"../common/render/TextureParams\";\n\n/** Specifies that a [RenderTexture]($common) should be kept in memory until the corresponding [[IModelConnection]] is closed, at\n * which point it will be disposed.\n * @see [[TextureOwnership]]\n * @public\n * @extensions\n */\nexport interface TextureCacheOwnership {\n /** The iModel on which the texture will be cached. */\n iModel: IModelConnection;\n /** The key uniquely identifying the texture amongst all textures cached on the iModel. */\n key: TextureCacheKey;\n}\n\n/** Describes the ownership of a [RenderTexture]($common), which controls when the texture is disposed of.\n * - [[TextureCacheOwnership]] indicates that the texture will be disposed of when the [[IModelConnection]] is closed, and that attempting\n * to create or look up a texture with the same `key` as an existing cached texture will always return the cached texture instead of creating\n * a new one.\n * - \"external\" indicates that the lifetime of the texture will be controlled externally, e.g. by a [[Decorator]], in which case the owner of the\n * texture is responsible for calling its `dispose` method when it is no longer needed.\n * @see [[CreateTextureArgs.ownership]]\n * @public\n * @extensions\n */\nexport type TextureOwnership = TextureCacheOwnership | \"external\";\n\n/** Arguments supplied to [[RenderSystem.createTexture]] to create a [RenderTexture]($common).\n * @public\n * @extensions\n */\nexport interface CreateTextureArgs {\n /** The type of texture to create. Default: [RenderTexture.Type.Normal]($common). */\n type?: RenderTexture.Type;\n /** The image from which to create the texture. */\n image: TextureImage;\n /** The ownership of the texture. If `undefined`, the texture's lifetime will be controlled by the first [[RenderGraphic]] with which it\n * becomes associated, such that disposing of the graphic will also dispose of the texture.\n * Applications typically create textures for use with [[Decorator]]s, which recreate their graphics quite frequently.\n * Ideally, the decorator will take ownership of the texture by specifying \"external\" and disposing of the texture when it is no longer needed,\n * rather than recreating the texture every time it creates its decoration graphics.\n */\n ownership?: TextureOwnership;\n}\n\n/** Arguments supplied to [[RenderSystem.createTextureFromSource]].\n * @public\n * @extensions\n */\nexport interface CreateTextureFromSourceArgs {\n /** The type of texture to create. Default: [RenderTexture.Type.Normal]($common). */\n type?: RenderTexture.Type;\n /** The image from which to create the texture. */\n source: ImageSource;\n /** Describes the transparency of the image. If this information can be supplied, it can improve performance.\n * If not supplied, PNGs will default to [TextureTransparency.Mixed]($common) and JPEGs (which do not support transparency) to [TextureTransparency.Opaque]($common).\n */\n transparency?: TextureTransparency;\n /** The ownership of the texture. If `undefined`, the texture's lifetime will be controlled by the first [[RenderGraphic]] with which it\n * becomes associated, such that disposing of the graphic will also dispose of the texture.\n * Applications typically create textures for use with [[Decorator]]s, which recreate their graphics quite frequently.\n * Ideally, the decorator will take ownership of the texture by specifying \"external\" and disposing of the texture when it is no longer needed,\n * rather than recreating the texture every time it creates its decoration graphics.\n */\n ownership?: TextureCacheOwnership & { key: string } | \"external\";\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Decorations.js","sourceRoot":"","sources":["../../../src/render/Decorations.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAyE;AAIzE;;;GAGG;AACH,MAAa,WAAW;IAUtB,uHAAuH;IACvH,IAAW,MAAM,KAAgC,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;IACvE,IAAW,MAAM,CAAC,MAAiC;QACjD,IAAA,sBAAO,EAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACtB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IACxB,CAAC;IAED,kGAAkG;IAClG,IAAW,cAAc,KAAgC,OAAO,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC;IACvF,IAAW,cAAc,CAAC,cAAyC;QACjE,IAAA,sBAAO,EAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QAC9B,IAAI,CAAC,eAAe,GAAG,cAAc,CAAC;IACxC,CAAC;IAED,uFAAuF;IACvF,IAAW,MAAM,KAA8B,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;IACrE,IAAW,MAAM,CAAC,MAA+B;QAC/C,IAAA,2BAAY,EAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC3B,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IACxB,CAAC;IAED,wIAAwI;IACxI,IAAW,KAAK,KAA8B,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;IACnE,IAAW,KAAK,CAAC,KAA8B;QAC7C,IAAA,2BAAY,EAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAC1B,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACtB,CAAC;IAED,yFAAyF;IACzF,IAAW,YAAY,KAA8B,OAAO,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC;IACjF,IAAW,YAAY,CAAC,YAAqC;QAC3D,IAAA,2BAAY,EAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QACjC,IAAI,CAAC,aAAa,GAAG,YAAY,CAAC;IACpC,CAAC;IAED,uFAAuF;IACvF,IAAW,WAAW,KAA8B,OAAO,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;IAC/E,IAAW,WAAW,CAAC,WAAoC;QACzD,IAAA,2BAAY,EAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAChC,IAAI,CAAC,YAAY,GAAG,WAAW,CAAC;IAClC,CAAC;IAEM,OAAO;QACZ,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC;QACxB,IAAI,CAAC,cAAc,GAAG,SAAS,CAAC;QAChC,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC;QACvB,IAAI,CAAC,YAAY,GAAG,SAAS,CAAC;QAC9B,IAAI,CAAC,WAAW,GAAG,SAAS,CAAC;QAC7B,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC;IAC1B,CAAC;CACF;AA5DD,kCA4DC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Rendering\r\n */\r\n\r\nimport { dispose, disposeArray, IDisposable } from \"@itwin/core-bentley\";\r\nimport { CanvasDecorationList } from \"./CanvasDecoration\";\r\nimport { GraphicList, RenderGraphic } from \"./RenderGraphic\";\r\n\r\n/** A set of [[RenderGraphic]]s and [[CanvasDecoration]]s produced by [[Tool]]s and [[Decorator]]s, used to decorate the contents of a [[Viewport]].\r\n * @public\r\n * @extensions\r\n */\r\nexport class Decorations implements IDisposable {\r\n private _skyBox?: RenderGraphic;\r\n private _viewBackground?: RenderGraphic; // drawn first, view units, with no zbuffer, smooth shading, default lighting. e.g., a skybox\r\n private _normal?: GraphicList; // drawn with zbuffer, with scene lighting\r\n private _world?: GraphicList; // drawn with zbuffer, with default lighting, smooth shading\r\n private _worldOverlay?: GraphicList; // drawn in overlay mode, world units\r\n private _viewOverlay?: GraphicList; // drawn in overlay mode, view units\r\n\r\n public canvasDecorations?: CanvasDecorationList;\r\n\r\n /** A view decoration created from a [[SkyBox]] rendered behind all other geometry to provide environmental context. */\r\n public get skyBox(): RenderGraphic | undefined { return this._skyBox; }\r\n public set skyBox(skyBox: RenderGraphic | undefined) {\r\n dispose(this._skyBox);\r\n this._skyBox = skyBox;\r\n }\r\n\r\n /** A view decoration drawn as the background of the view. @see [[GraphicType.ViewBackground]]. */\r\n public get viewBackground(): RenderGraphic | undefined { return this._viewBackground; }\r\n public set viewBackground(viewBackground: RenderGraphic | undefined) {\r\n dispose(this._viewBackground);\r\n this._viewBackground = viewBackground;\r\n }\r\n\r\n /** Decorations drawn as if they were part of the scene. @see [[GraphicType.Scene]]. */\r\n public get normal(): GraphicList | undefined { return this._normal; }\r\n public set normal(normal: GraphicList | undefined) {\r\n disposeArray(this._normal);\r\n this._normal = normal;\r\n }\r\n\r\n /** Decorations drawn as if they were part of the world, but ignoring the view's [[ViewFlags]]. @see [[GraphicType.WorldDecoration]]. */\r\n public get world(): GraphicList | undefined { return this._world; }\r\n public set world(world: GraphicList | undefined) {\r\n disposeArray(this._world);\r\n this._world = world;\r\n }\r\n\r\n /** Overlay decorations drawn in world coordinates. @see [[GraphicType.WorldOverlay]]. */\r\n public get worldOverlay(): GraphicList | undefined { return this._worldOverlay; }\r\n public set worldOverlay(worldOverlay: GraphicList | undefined) {\r\n disposeArray(this._worldOverlay);\r\n this._worldOverlay = worldOverlay;\r\n }\r\n\r\n /** Overlay decorations drawn in view coordinates. @see [[GraphicType.ViewOverlay]]. */\r\n public get viewOverlay(): GraphicList | undefined { return this._viewOverlay; }\r\n public set viewOverlay(viewOverlay: GraphicList | undefined) {\r\n disposeArray(this._viewOverlay);\r\n this._viewOverlay = viewOverlay;\r\n }\r\n\r\n public dispose() {\r\n this.skyBox = undefined;\r\n this.viewBackground = undefined;\r\n this.world = undefined;\r\n this.worldOverlay = undefined;\r\n this.viewOverlay = undefined;\r\n this.normal = undefined;\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"Decorations.js","sourceRoot":"","sources":["../../../src/render/Decorations.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAyE;AAIzE;;;GAGG;AACH,MAAa,WAAW;IAUtB,uHAAuH;IACvH,IAAW,MAAM,KAAgC,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;IACvE,IAAW,MAAM,CAAC,MAAiC;QACjD,IAAA,sBAAO,EAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACtB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IACxB,CAAC;IAED,kGAAkG;IAClG,IAAW,cAAc,KAAgC,OAAO,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC;IACvF,IAAW,cAAc,CAAC,cAAyC;QACjE,IAAA,sBAAO,EAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QAC9B,IAAI,CAAC,eAAe,GAAG,cAAc,CAAC;IACxC,CAAC;IAED,uFAAuF;IACvF,IAAW,MAAM,KAA8B,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;IACrE,IAAW,MAAM,CAAC,MAA+B;QAC/C,IAAA,2BAAY,EAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC3B,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IACxB,CAAC;IAED,wIAAwI;IACxI,IAAW,KAAK,KAA8B,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;IACnE,IAAW,KAAK,CAAC,KAA8B;QAC7C,IAAA,2BAAY,EAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAC1B,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACtB,CAAC;IAED,yFAAyF;IACzF,IAAW,YAAY,KAA8B,OAAO,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC;IACjF,IAAW,YAAY,CAAC,YAAqC;QAC3D,IAAA,2BAAY,EAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QACjC,IAAI,CAAC,aAAa,GAAG,YAAY,CAAC;IACpC,CAAC;IAED,uFAAuF;IACvF,IAAW,WAAW,KAA8B,OAAO,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;IAC/E,IAAW,WAAW,CAAC,WAAoC;QACzD,IAAA,2BAAY,EAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAChC,IAAI,CAAC,YAAY,GAAG,WAAW,CAAC;IAClC,CAAC;IAEM,OAAO;QACZ,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC;QACxB,IAAI,CAAC,cAAc,GAAG,SAAS,CAAC;QAChC,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC;QACvB,IAAI,CAAC,YAAY,GAAG,SAAS,CAAC;QAC9B,IAAI,CAAC,WAAW,GAAG,SAAS,CAAC;QAC7B,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC;IAC1B,CAAC;CACF;AA5DD,kCA4DC","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/** @packageDocumentation\n * @module Rendering\n */\n\nimport { dispose, disposeArray, IDisposable } from \"@itwin/core-bentley\";\nimport { CanvasDecorationList } from \"./CanvasDecoration\";\nimport { GraphicList, RenderGraphic } from \"./RenderGraphic\";\n\n/** A set of [[RenderGraphic]]s and [[CanvasDecoration]]s produced by [[Tool]]s and [[Decorator]]s, used to decorate the contents of a [[Viewport]].\n * @public\n * @extensions\n */\nexport class Decorations implements IDisposable {\n private _skyBox?: RenderGraphic;\n private _viewBackground?: RenderGraphic; // drawn first, view units, with no zbuffer, smooth shading, default lighting. e.g., a skybox\n private _normal?: GraphicList; // drawn with zbuffer, with scene lighting\n private _world?: GraphicList; // drawn with zbuffer, with default lighting, smooth shading\n private _worldOverlay?: GraphicList; // drawn in overlay mode, world units\n private _viewOverlay?: GraphicList; // drawn in overlay mode, view units\n\n public canvasDecorations?: CanvasDecorationList;\n\n /** A view decoration created from a [[SkyBox]] rendered behind all other geometry to provide environmental context. */\n public get skyBox(): RenderGraphic | undefined { return this._skyBox; }\n public set skyBox(skyBox: RenderGraphic | undefined) {\n dispose(this._skyBox);\n this._skyBox = skyBox;\n }\n\n /** A view decoration drawn as the background of the view. @see [[GraphicType.ViewBackground]]. */\n public get viewBackground(): RenderGraphic | undefined { return this._viewBackground; }\n public set viewBackground(viewBackground: RenderGraphic | undefined) {\n dispose(this._viewBackground);\n this._viewBackground = viewBackground;\n }\n\n /** Decorations drawn as if they were part of the scene. @see [[GraphicType.Scene]]. */\n public get normal(): GraphicList | undefined { return this._normal; }\n public set normal(normal: GraphicList | undefined) {\n disposeArray(this._normal);\n this._normal = normal;\n }\n\n /** Decorations drawn as if they were part of the world, but ignoring the view's [[ViewFlags]]. @see [[GraphicType.WorldDecoration]]. */\n public get world(): GraphicList | undefined { return this._world; }\n public set world(world: GraphicList | undefined) {\n disposeArray(this._world);\n this._world = world;\n }\n\n /** Overlay decorations drawn in world coordinates. @see [[GraphicType.WorldOverlay]]. */\n public get worldOverlay(): GraphicList | undefined { return this._worldOverlay; }\n public set worldOverlay(worldOverlay: GraphicList | undefined) {\n disposeArray(this._worldOverlay);\n this._worldOverlay = worldOverlay;\n }\n\n /** Overlay decorations drawn in view coordinates. @see [[GraphicType.ViewOverlay]]. */\n public get viewOverlay(): GraphicList | undefined { return this._viewOverlay; }\n public set viewOverlay(viewOverlay: GraphicList | undefined) {\n disposeArray(this._viewOverlay);\n this._viewOverlay = viewOverlay;\n }\n\n public dispose() {\n this.skyBox = undefined;\n this.viewBackground = undefined;\n this.world = undefined;\n this.worldOverlay = undefined;\n this.viewOverlay = undefined;\n this.normal = undefined;\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"FeatureSymbology.js","sourceRoot":"","sources":["../../../src/render/FeatureSymbology.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAoD;AACpD,oDAAyE;AACzE,0CAAuC;AAGvC,+BAA+B;AAE/B;;;GAGG;AACH,IAAiB,gBAAgB,CA0LhC;AA1LD,WAAiB,gBAAgB;IAkB/B;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,MAAa,SAAU,SAAQ,8BAAgB;QAG7C,aAAa;QACb,IAAW,MAAM;YACf,OAAO,IAAI,CAAC,OAAO,CAAC;QACtB,CAAC;QAED;;WAEG;QACH,YAAmB,IAA2B;YAC5C,KAAK,EAAE,CAAC;YACR,IAAI,SAAS,KAAK,IAAI,EAAE;gBACtB,IAAI,IAAI,YAAY,mBAAQ;oBAC1B,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;;oBAE5B,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;aAC3B;QACH,CAAC;QAED;;WAEG;QACI,MAAM,CAAC,UAAU,CAAC,MAAc,EAAE,IAA2B;YAClE,MAAM,IAAI,GAAG,IAAI,SAAS,CAAC,IAAI,CAAC,CAAC;YACjC,IAAI,CAAC,OAAO,GAAG,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C,IAAI,EAAE,IAAI,EAAE,GAAG,CAAC,CAAC;oBAElD,IAAI,SAAS,KAAK,GAAG,CAAC,QAAQ;wBAC5B,IAAI,CAAC,sBAAsB,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,CAAC,QAAQ,CAAC,CAAC;iBAC7D;YACH,CAAC,CAAC;YAEF,0DAA0D;YAC1D,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAC,IAAY,EAAE,IAAY,EAAE,EAAE;gBAChE,WAAW,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;YAC1B,CAAC,CAAC,CAAC;YAEH,kFAAkF;YAClF,IAAI,CAAC,0BAA0B,CAAC,OAAO,CAAC,CAAC,UAAkB,EAAE,UAAkB,EAAE,OAAuB,EAAE,EAAE;gBAC1G,OAAO,CAAC,OAAO,CAAC,CAAC,IAAY,EAAE,IAAY,EAAE,EAAE;oBAC7C,IAAI,CAAC,IAAI,CAAC,oBAAoB,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE;wBAC1C,sFAAsF;wBACtF,WAAW,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;qBACzB;gBACH,CAAC,CAAC,CAAC;YACL,CAAC,CAAC,CAAC;QACL,CAAC;KACF;IAhJY,0BAAS,YAgJrB,CAAA;AACH,CAAC,EA1LgB,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QA0LhC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Rendering\r\n */\r\n\r\nimport { BeEvent, Id64 } from \"@itwin/core-bentley\";\r\nimport { FeatureAppearance, FeatureOverrides } from \"@itwin/core-common\";\r\nimport { Viewport } from \"../Viewport\";\r\nimport { ViewState } from \"../ViewState\";\r\n\r\n// cspell:ignore subcat subcats\r\n\r\n/** Contains types that enable an application to customize how [Feature]($common)s are drawn within a [[Viewport]].\r\n * @public\r\n * @extensions\r\n */\r\nexport namespace FeatureSymbology {\r\n /** An object that serves as the source of a [[FeatureSymbology.Overrides]].\r\n * Use this if you are drawing the same tiles into a single Viewport and overriding the FeatureSymbology.Overrides applied to them\r\n * by settings [[GraphicBranch.symbologyOverrides]].\r\n * Each tile will have a separate set of feature overrides per combination of Source and Viewport. This prevents the display system\r\n * from constantly recomputing the feature overrides for a tile.\r\n * You must call `onSourceDisposed.raiseEvent()` when the source is no longer being used by the Viewport to allow the feature overrides\r\n * and their WebGL resources to be freed - failure to do so will result in memory leaks, which may eventually produce WebGL context loss.\r\n * @alpha\r\n */\r\n export interface Source {\r\n /** An event raised when this source becomes disassociated with the viewport, indicating any WebGL resources allocated for it\r\n * can be freed.\r\n * Failure to invoke this event appropriately will result in memory leaks, which may eventually produce WebGL context loss.\r\n */\r\n readonly onSourceDisposed: BeEvent<() => void>;\r\n }\r\n\r\n /** Allows a [[Viewport]] to customize the appearance of individual [Feature]($common)s within it.\r\n *\r\n * The Viewport computes its base Overrides based on the following:\r\n * - The set of categories enabled for display in its [[CategorySelectorState]]. Every [[SubCategory]] belonging to an enabled [[Category]] is added to the set of visible subcategories - all other subcategories are assumed to be invisible.\r\n * - For the set of visible subcategories, any [[SubCategoryOverride]]s defined by the view's [[DisplayStyleState]] are applied. This may render some subcategories invisible, and change the symbology of others.\r\n * - The visibility of each [GeometryClass]($common) is set based on the view's [ViewFlags]($common).\r\n * - The line weight is overridden to 1 pixel for all Features if line weight has been disabled by the view's [ViewFlags]($common).\r\n * - The sets of elements which are always drawn and never drawn are initialized from the [[Viewport]]'s sets.\r\n * An application can further customize the symbology of any Features by registering a [[FeatureOverrideProvider]] with a [[Viewport]]. That provider's addFeatureOverrides function will be invoked\r\n * whenever the Overrides need to be regenerated.\r\n *\r\n * To override the symbology of *most* Features within a view, specify a `defaultOverrides` to be applied to any Feature not explicitly overridden.\r\n * If default overrides are defined and some Features should draw normally without being affected by the default overrides, override that Feature with\r\n * an Appearance which defines no overrides.\r\n *\r\n * It is possible to override multiple aspects of a Feature. For example, you might specify that all elements belonging to subcategory \"A\" should be drawn in red, and\r\n * that the element with Id \"0x123\" should be drawn with 0.25 transparency. In this case, when drawing a Feature with subcategory \"A\" and element Id \"0x123\", the two overrides will\r\n * be merged, causing the Feature's geometry to draw 25% transparent red. On the other hand, if subcategory \"A\" is specified to draw in red and element \"0x123\" to draw in green,\r\n * the color specified by the element override will take precedence over that specified for the subcategory, resulting in a green Feature.\r\n *\r\n * @see [[Viewport.alwaysDrawn]]\r\n * @see [[Viewport.neverDrawn]]\r\n */\r\n export class Overrides extends FeatureOverrides {\r\n private _source?: Source;\r\n\r\n /** @alpha */\r\n public get source(): Source | undefined {\r\n return this._source;\r\n }\r\n\r\n /** Construct a new Overrides. The result is an empty set of overrides if no view or viewport is supplied.\r\n * @param view If supplied, the overrides will be initialized based on the current state of the view or viewport.\r\n */\r\n public constructor(view?: ViewState | Viewport) {\r\n super();\r\n if (undefined !== view) {\r\n if (view instanceof Viewport)\r\n this.initFromViewport(view);\r\n else\r\n this.initFromView(view);\r\n }\r\n }\r\n\r\n /** Create symbology overrides associated with a [[FeatureSymbology.Source]].\r\n * @alpha\r\n */\r\n public static withSource(source: Source, view?: ViewState | Viewport): Overrides {\r\n const ovrs = new Overrides(view);\r\n ovrs._source = source;\r\n return ovrs;\r\n }\r\n\r\n /** Initialize these Overrides based on a specific view.\r\n * @internal\r\n */\r\n public initFromView(view: ViewState): void {\r\n this._initFromView(view);\r\n this._initSubCategoryOverrides(view);\r\n }\r\n\r\n /** Initialize these Overrides based on a specific viewport.\r\n * @internal\r\n */\r\n public initFromViewport(viewport: Viewport): void {\r\n const view = viewport.view;\r\n this._initFromView(view);\r\n\r\n if (undefined !== viewport.neverDrawn)\r\n this.setNeverDrawnSet(viewport.neverDrawn);\r\n\r\n if (undefined !== viewport.alwaysDrawn)\r\n this.setAlwaysDrawnSet(viewport.alwaysDrawn, viewport.isAlwaysDrawnExclusive);\r\n\r\n viewport.addFeatureOverrides(this);\r\n viewport.addModelSubCategoryVisibilityOverrides(this, this._modelSubCategoryOverrides);\r\n\r\n // This will include any per-model subcategory visibility overrides added above.\r\n this._initSubCategoryOverrides(view);\r\n }\r\n\r\n private _initFromView(view: ViewState): void {\r\n const { viewFlags } = view;\r\n const { constructions, dimensions, patterns } = viewFlags;\r\n\r\n this.neverDrawnAnimationNodes.clear();\r\n this.animationNodeOverrides.clear();\r\n\r\n for (const excluded of view.displayStyle.settings.excludedElementIds)\r\n this.setNeverDrawn(excluded);\r\n\r\n this._constructions = constructions;\r\n this._dimensions = dimensions;\r\n this._patterns = patterns;\r\n this._lineWeights = viewFlags.weights;\r\n\r\n for (const categoryId of view.categorySelector.categories) {\r\n const subCategoryIds = view.iModel.subcategories.getSubCategories(categoryId);\r\n if (undefined === subCategoryIds)\r\n continue;\r\n\r\n for (const subCategoryId of subCategoryIds) {\r\n if (view.isSubCategoryVisible(subCategoryId)) {\r\n const idLo = Id64.getLowerUint32(subCategoryId);\r\n const idHi = Id64.getUpperUint32(subCategoryId);\r\n this._visibleSubCategories.add(idLo, idHi);\r\n\r\n const app = view.iModel.subcategories.getSubCategoryAppearance(subCategoryId);\r\n if (undefined !== app)\r\n this._subCategoryPriorities.set(idLo, idHi, app.priority);\r\n }\r\n }\r\n }\r\n const style = view.displayStyle;\r\n style.settings.modelAppearanceOverrides.forEach((appearance, modelId) => this.override({ modelId, appearance, onConflict: \"skip\" }));\r\n\r\n style.forEachRealityModel((realityModel) => {\r\n if (realityModel.appearanceOverrides && realityModel.modelId)\r\n this.override({ modelId: realityModel.modelId, appearance: realityModel.appearanceOverrides });\r\n });\r\n\r\n const script = style.scheduleScript;\r\n if (script)\r\n script.addSymbologyOverrides(this, style.settings.timePoint ?? 0);\r\n\r\n if (!view.is3d())\r\n return;\r\n\r\n const planProjectionSettings = view.getDisplayStyle3d().settings.planProjectionSettings;\r\n if (undefined === planProjectionSettings)\r\n return;\r\n\r\n for (const [modelId, projSettings] of planProjectionSettings) {\r\n if (undefined !== projSettings.transparency)\r\n this.override({ modelId, appearance: FeatureAppearance.fromJSON({ transparency: projSettings.transparency }) });\r\n }\r\n }\r\n\r\n private _initSubCategoryOverrides(view: ViewState): void {\r\n const addOverride = (idLo: number, idHi: number) => {\r\n const subCategoryId = Id64.fromUint32Pair(idLo, idHi);\r\n const ovr = view.getSubCategoryOverride(subCategoryId);\r\n if (undefined !== ovr) {\r\n const app = FeatureAppearance.fromSubCategoryOverride(ovr);\r\n if (app.overridesSymbology)\r\n this._subCategoryOverrides.set(idLo, idHi, app);\r\n\r\n if (undefined !== ovr.priority)\r\n this._subCategoryPriorities.set(idLo, idHi, ovr.priority);\r\n }\r\n };\r\n\r\n // Add overrides for all subcategories visible in the view\r\n this._visibleSubCategories.forEach((idLo: number, idHi: number) => {\r\n addOverride(idLo, idHi);\r\n });\r\n\r\n // Add overrides for all subcategories overridden to be visible in specific models\r\n this._modelSubCategoryOverrides.forEach((_modelIdLo: number, _modelIdHi: number, subcats: Id64.Uint32Set) => {\r\n subcats.forEach((idLo: number, idHi: number) => {\r\n if (!this.isSubCategoryVisible(idLo, idHi)) {\r\n // Overridden to be visible in one or more models - will need the appearance overrides\r\n addOverride(idLo, idHi);\r\n }\r\n });\r\n });\r\n }\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"FeatureSymbology.js","sourceRoot":"","sources":["../../../src/render/FeatureSymbology.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAoD;AACpD,oDAAyE;AACzE,0CAAuC;AAGvC,+BAA+B;AAE/B;;;GAGG;AACH,IAAiB,gBAAgB,CA0LhC;AA1LD,WAAiB,gBAAgB;IAkB/B;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,MAAa,SAAU,SAAQ,8BAAgB;QAG7C,aAAa;QACb,IAAW,MAAM;YACf,OAAO,IAAI,CAAC,OAAO,CAAC;QACtB,C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BAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QA0LhC","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/** @packageDocumentation\n * @module Rendering\n */\n\nimport { BeEvent, Id64 } from \"@itwin/core-bentley\";\nimport { FeatureAppearance, FeatureOverrides } from \"@itwin/core-common\";\nimport { Viewport } from \"../Viewport\";\nimport { ViewState } from \"../ViewState\";\n\n// cspell:ignore subcat subcats\n\n/** Contains types that enable an application to customize how [Feature]($common)s are drawn within a [[Viewport]].\n * @public\n * @extensions\n */\nexport namespace FeatureSymbology {\n /** An object that serves as the source of a [[FeatureSymbology.Overrides]].\n * Use this if you are drawing the same tiles into a single Viewport and overriding the FeatureSymbology.Overrides applied to them\n * by settings [[GraphicBranch.symbologyOverrides]].\n * Each tile will have a separate set of feature overrides per combination of Source and Viewport. This prevents the display system\n * from constantly recomputing the feature overrides for a tile.\n * You must call `onSourceDisposed.raiseEvent()` when the source is no longer being used by the Viewport to allow the feature overrides\n * and their WebGL resources to be freed - failure to do so will result in memory leaks, which may eventually produce WebGL context loss.\n * @alpha\n */\n export interface Source {\n /** An event raised when this source becomes disassociated with the viewport, indicating any WebGL resources allocated for it\n * can be freed.\n * Failure to invoke this event appropriately will result in memory leaks, which may eventually produce WebGL context loss.\n */\n readonly onSourceDisposed: BeEvent<() => void>;\n }\n\n /** Allows a [[Viewport]] to customize the appearance of individual [Feature]($common)s within it.\n *\n * The Viewport computes its base Overrides based on the following:\n * - The set of categories enabled for display in its [[CategorySelectorState]]. Every [[SubCategory]] belonging to an enabled [[Category]] is added to the set of visible subcategories - all other subcategories are assumed to be invisible.\n * - For the set of visible subcategories, any [[SubCategoryOverride]]s defined by the view's [[DisplayStyleState]] are applied. This may render some subcategories invisible, and change the symbology of others.\n * - The visibility of each [GeometryClass]($common) is set based on the view's [ViewFlags]($common).\n * - The line weight is overridden to 1 pixel for all Features if line weight has been disabled by the view's [ViewFlags]($common).\n * - The sets of elements which are always drawn and never drawn are initialized from the [[Viewport]]'s sets.\n * An application can further customize the symbology of any Features by registering a [[FeatureOverrideProvider]] with a [[Viewport]]. That provider's addFeatureOverrides function will be invoked\n * whenever the Overrides need to be regenerated.\n *\n * To override the symbology of *most* Features within a view, specify a `defaultOverrides` to be applied to any Feature not explicitly overridden.\n * If default overrides are defined and some Features should draw normally without being affected by the default overrides, override that Feature with\n * an Appearance which defines no overrides.\n *\n * It is possible to override multiple aspects of a Feature. For example, you might specify that all elements belonging to subcategory \"A\" should be drawn in red, and\n * that the element with Id \"0x123\" should be drawn with 0.25 transparency. In this case, when drawing a Feature with subcategory \"A\" and element Id \"0x123\", the two overrides will\n * be merged, causing the Feature's geometry to draw 25% transparent red. On the other hand, if subcategory \"A\" is specified to draw in red and element \"0x123\" to draw in green,\n * the color specified by the element override will take precedence over that specified for the subcategory, resulting in a green Feature.\n *\n * @see [[Viewport.alwaysDrawn]]\n * @see [[Viewport.neverDrawn]]\n */\n export class Overrides extends FeatureOverrides {\n private _source?: Source;\n\n /** @alpha */\n public get source(): Source | undefined {\n return this._source;\n }\n\n /** Construct a new Overrides. The result is an empty set of overrides if no view or viewport is supplied.\n * @param view If supplied, the overrides will be initialized based on the current state of the view or viewport.\n */\n public constructor(view?: ViewState | Viewport) {\n super();\n if (undefined !== view) {\n if (view instanceof Viewport)\n this.initFromViewport(view);\n else\n this.initFromView(view);\n }\n }\n\n /** Create symbology overrides associated with a [[FeatureSymbology.Source]].\n * @alpha\n */\n public static withSource(source: Source, view?: ViewState | Viewport): Overrides {\n const ovrs = new Overrides(view);\n ovrs._source = source;\n return ovrs;\n }\n\n /** Initialize these Overrides based on a specific view.\n * @internal\n */\n public initFromView(view: ViewState): void {\n this._initFromView(view);\n this._initSubCategoryOverrides(view);\n }\n\n /** Initialize these Overrides based on a specific viewport.\n * @internal\n */\n public initFromViewport(viewport: Viewport): void {\n const view = viewport.view;\n this._initFromView(view);\n\n if (undefined !== viewport.neverDrawn)\n this.setNeverDrawnSet(viewport.neverDrawn);\n\n if (undefined !== viewport.alwaysDrawn)\n this.setAlwaysDrawnSet(viewport.alwaysDrawn, viewport.isAlwaysDrawnExclusive);\n\n viewport.addFeatureOverrides(this);\n viewport.addModelSubCategoryVisibilityOverrides(this, this._modelSubCategoryOverrides);\n\n // This will include any per-model subcategory visibility overrides added above.\n this._initSubCategoryOverrides(view);\n }\n\n private _initFromView(view: ViewState): void {\n const { viewFlags } = view;\n const { constructions, dimensions, patterns } = viewFlags;\n\n this.neverDrawnAnimationNodes.clear();\n this.animationNodeOverrides.clear();\n\n for (const excluded of view.displayStyle.settings.excludedElementIds)\n this.setNeverDrawn(excluded);\n\n this._constructions = constructions;\n this._dimensions = dimensions;\n this._patterns = patterns;\n this._lineWeights = viewFlags.weights;\n\n for (const categoryId of view.categorySelector.categories) {\n const subCategoryIds = view.iModel.subcategories.getSubCategories(categoryId);\n if (undefined === subCategoryIds)\n continue;\n\n for (const subCategoryId of subCategoryIds) {\n if (view.isSubCategoryVisible(subCategoryId)) {\n const idLo = Id64.getLowerUint32(subCategoryId);\n const idHi = Id64.getUpperUint32(subCategoryId);\n this._visibleSubCategories.add(idLo, idHi);\n\n const app = view.iModel.subcategories.getSubCategoryAppearance(subCategoryId);\n if (undefined !== app)\n this._subCategoryPriorities.set(idLo, idHi, app.priority);\n }\n }\n }\n const style = view.displayStyle;\n style.settings.modelAppearanceOverrides.forEach((appearance, modelId) => this.override({ modelId, appearance, onConflict: \"skip\" }));\n\n style.forEachRealityModel((realityModel) => {\n if (realityModel.appearanceOverrides && realityModel.modelId)\n this.override({ modelId: realityModel.modelId, appearance: realityModel.appearanceOverrides });\n });\n\n const script = style.scheduleScript;\n if (script)\n script.addSymbologyOverrides(this, style.settings.timePoint ?? 0);\n\n if (!view.is3d())\n return;\n\n const planProjectionSettings = view.getDisplayStyle3d().settings.planProjectionSettings;\n if (undefined === planProjectionSettings)\n return;\n\n for (const [modelId, projSettings] of planProjectionSettings) {\n if (undefined !== projSettings.transparency)\n this.override({ modelId, appearance: FeatureAppearance.fromJSON({ transparency: projSettings.transparency }) });\n }\n }\n\n private _initSubCategoryOverrides(view: ViewState): void {\n const addOverride = (idLo: number, idHi: number) => {\n const subCategoryId = Id64.fromUint32Pair(idLo, idHi);\n const ovr = view.getSubCategoryOverride(subCategoryId);\n if (undefined !== ovr) {\n const app = FeatureAppearance.fromSubCategoryOverride(ovr);\n if (app.overridesSymbology)\n this._subCategoryOverrides.set(idLo, idHi, app);\n\n if (undefined !== ovr.priority)\n this._subCategoryPriorities.set(idLo, idHi, ovr.priority);\n }\n };\n\n // Add overrides for all subcategories visible in the view\n this._visibleSubCategories.forEach((idLo: number, idHi: number) => {\n addOverride(idLo, idHi);\n });\n\n // Add overrides for all subcategories overridden to be visible in specific models\n this._modelSubCategoryOverrides.forEach((_modelIdLo: number, _modelIdHi: number, subcats: Id64.Uint32Set) => {\n subcats.forEach((idLo: number, idHi: number) => {\n if (!this.isSubCategoryVisible(idLo, idHi)) {\n // Overridden to be visible in one or more models - will need the appearance overrides\n addOverride(idLo, idHi);\n }\n });\n });\n }\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"FrameStats.js","sourceRoot":"","sources":["../../../src/render/FrameStats.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAmDH,gBAAgB;AAChB,MAAa,mBAAmB;IAKtB,MAAM,CAAC,YAAY;QACzB,OAAO;YACL,OAAO,EAAE,CAAC;YACV,cAAc,EAAE,CAAC;YACjB,aAAa,EAAE,CAAC;YAChB,aAAa,EAAE,CAAC;YAChB,qBAAqB,EAAE,CAAC;YACxB,sBAAsB,EAAE,CAAC;YACzB,eAAe,EAAE,CAAC;YAClB,kBAAkB,EAAE,CAAC;YACrB,cAAc,EAAE,CAAC;YACjB,UAAU,EAAE,CAAC;YACb,kBAAkB,EAAE,CAAC;YACrB,eAAe,EA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vG,MAAM,CAAC,KAAuB;QACpC,MAAM,QAAQ,GAAG,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QACzC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,QAAQ,CAAC;IAClD,CAAC;IAEO,IAAI,CAAC,KAAuB;QAClC,MAAM,SAAS,GAAG,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QAC1C,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,CAAC;IACnD,CAAC;IAEM,UAAU;QACf,IAAI,CAAC,kBAAkB,GAAG,SAAS,KAAK,IAAI,CAAC,kBAAkB,IAAI,IAAI,CAAC,kBAAkB,CAAC,iBAAiB,GAAG,CAAC,CAAC;IACnH,CAAC;IAEM,QAAQ,CAAC,aAAa,GAAG,KAAK;QACnC,IAAI,IAAI,CAAC,kBAAkB,EAAE;YAC3B,IAAI,aAAa,EAAE;gBACjB,IAAI,SAAS,KAAK,IAAI,CAAC,kBAAkB;oBACvC,IAAI,CAAC,kBAAkB,CAAC,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,oDAAoD;gBAC5G,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC,CAAC,iDAAiD;aAC9E;YACD,IAAI,CAAC,WAAW,EAAE,CAAC;YACnB,IAAI,CAAC,kBAAkB,GAAG,KAAK,CAAC;SACjC;IACH,CAAC;IAEM,SAAS,CAAC,KAAuB;QACtC,IAAI,IAAI,CAAC,kBAAkB;YACzB,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACvB,CAAC;IAEM,OAAO,CAAC,KAAuB;QACpC,IAAI,IAAI,CAAC,kBAAkB;YACzB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACrB,CAAC;CACF;AAnFD,kDAmFC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Rendering\r\n */\r\n\r\nimport { BeEvent } from \"@itwin/core-bentley\";\r\n\r\n/** Describes timing statistics for a single rendered frame. Aside from `frameId`, `totalFrameTime`, and `totalSceneTime`, the other entries may represent operations that are not performed every frame and may contain an expected value of zero.\r\n * @note By default, the display system does not render frames continuously. The display system will render a new frame only when the view changes. Therefore, the data contained within this interface cannot directly be used to compute a representative framerate.\r\n * @alpha\r\n */\r\nexport interface FrameStats {\r\n /** A unique number identifying the frame to which these statistics belong. */\r\n frameId: number;\r\n /** The CPU time in milliseconds spent setting up the scene. This does not include the time described by `totalFrameTime`. */\r\n totalSceneTime: number;\r\n /** The CPU time in milliseconds spent performing animations while setting up the scene. This is included in `totalSceneTime`. */\r\n animationTime: number;\r\n /** The CPU time in milliseconds spent setting up the view while setting up the scene. This is included in `totalSceneTime`. */\r\n setupViewTime: number;\r\n /** The CPU time in milliseconds spent when creating or changing the scene if invalid. This is included in `totalSceneTime`. */\r\n createChangeSceneTime: number;\r\n /** The CPU time in milliseconds spent validating the render plan while setting up the scene. This is included in `totalSceneTime`. */\r\n validateRenderPlanTime: number;\r\n /** The CPU time in milliseconds spent adding or changing decorations while setting up the scene. This is included in `totalSceneTime`. */\r\n decorationsTime: number;\r\n /** The CPU time in milliseconds spent executing the target's `onBeforeRender` call while setting up the scene. This is included in `totalSceneTime`. */\r\n onBeforeRenderTime: number;\r\n /** The CPU time in milliseconds spent rendering the frame. This does not include the time described by `totalSceneTime`. */\r\n totalFrameTime: number;\r\n /** The CPU time in milliseconds spent rendering opaque geometry. This is included in `totalFrameTime`. */\r\n opaqueTime: number;\r\n /** The CPU time in milliseconds spent executing the `IModelFrameLifecycle.onRenderOpaque` call. This is included in `totalFrameTime`. */\r\n onRenderOpaqueTime: number;\r\n /** The CPU time in milliseconds spent rendering translucent geometry. This is included in `totalFrameTime`. */\r\n translucentTime: number;\r\n /** The CPU time in milliseconds spent rendering overlays. This is included in `totalFrameTime`. */\r\n overlaysTime: number;\r\n /** The CPU time in milliseconds spent rendering the solar shadow map. This is included in `totalFrameTime`. */\r\n shadowsTime: number;\r\n /** The CPU time in milliseconds spent rendering both planar and volume classifiers. This is included in `totalFrameTime`. */\r\n classifiersTime: number;\r\n /** The CPU time in milliseconds spent applying screenspace effects. This is included in `totalFrameTime`. */\r\n screenspaceEffectsTime: number;\r\n /** The CPU time in milliseconds spent rendering background geometry including backgrounds, skyboxes, and background maps. This is included in `totalFrameTime`. */\r\n backgroundTime: number;\r\n}\r\n\r\n/** An event which will be raised when a new frame statistics object is available. The listeners will receive that frame statistics object.\r\n * @see [[Viewport.enableFrameStatsListener]]\r\n * @alpha\r\n */\r\nexport type OnFrameStatsReadyEvent = BeEvent<(frameStats: Readonly<FrameStats>) => void>;\r\n\r\n/** @internal */\r\nexport class FrameStatsCollector {\r\n private _onFrameStatsReady?: OnFrameStatsReadyEvent;\r\n private _frameStats = FrameStatsCollector._createStats();\r\n private _shouldRecordFrame = false;\r\n\r\n private static _createStats(): FrameStats {\r\n return {\r\n frameId: 0,\r\n totalSceneTime: 0,\r\n animationTime: 0,\r\n setupViewTime: 0,\r\n createChangeSceneTime: 0,\r\n validateRenderPlanTime: 0,\r\n decorationsTime: 0,\r\n onBeforeRenderTime: 0,\r\n totalFrameTime: 0,\r\n opaqueTime: 0,\r\n onRenderOpaqueTime: 0,\r\n translucentTime: 0,\r\n overlaysTime: 0,\r\n shadowsTime: 0,\r\n classifiersTime: 0,\r\n screenspaceEffectsTime: 0,\r\n backgroundTime: 0,\r\n };\r\n }\r\n\r\n private _clearStats() {\r\n this._frameStats.totalSceneTime = 0;\r\n this._frameStats.animationTime = 0;\r\n this._frameStats.setupViewTime = 0;\r\n this._frameStats.createChangeSceneTime = 0;\r\n this._frameStats.validateRenderPlanTime = 0;\r\n this._frameStats.decorationsTime = 0;\r\n this._frameStats.onBeforeRenderTime = 0;\r\n this._frameStats.totalFrameTime = 0;\r\n this._frameStats.opaqueTime = 0;\r\n this._frameStats.onRenderOpaqueTime = 0;\r\n this._frameStats.translucentTime = 0;\r\n this._frameStats.overlaysTime = 0;\r\n this._frameStats.shadowsTime = 0;\r\n this._frameStats.classifiersTime = 0;\r\n this._frameStats.screenspaceEffectsTime = 0;\r\n this._frameStats.backgroundTime = 0;\r\n }\r\n\r\n public constructor(onFrameStatsReady?: OnFrameStatsReadyEvent) { this._onFrameStatsReady = onFrameStatsReady; }\r\n\r\n private _begin(entry: keyof FrameStats) {\r\n const prevSpan = this._frameStats[entry];\r\n this._frameStats[entry] = Date.now() - prevSpan;\r\n }\r\n\r\n private _end(entry: keyof FrameStats) {\r\n const beginTime = this._frameStats[entry];\r\n this._frameStats[entry] = Date.now() - beginTime;\r\n }\r\n\r\n public beginFrame() {\r\n this._shouldRecordFrame = undefined !== this._onFrameStatsReady && this._onFrameStatsReady.numberOfListeners > 0;\r\n }\r\n\r\n public endFrame(wasFrameDrawn = false) {\r\n if (this._shouldRecordFrame) {\r\n if (wasFrameDrawn) {\r\n if (undefined !== this._onFrameStatsReady)\r\n this._onFrameStatsReady.raiseEvent(this._frameStats); // transmit this frame's statistics to any listeners\r\n this._frameStats.frameId++; // increment frame counter for next pending frame\r\n }\r\n this._clearStats();\r\n this._shouldRecordFrame = false;\r\n }\r\n }\r\n\r\n public beginTime(entry: keyof FrameStats) {\r\n if (this._shouldRecordFrame)\r\n this._begin(entry);\r\n }\r\n\r\n public endTime(entry: keyof FrameStats) {\r\n if (this._shouldRecordFrame)\r\n this._end(entry);\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"FrameStats.js","sourceRoot":"","sources":["../../../src/render/FrameStats.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAmDH,gBAAgB;AAChB,MAAa,mBAAmB;IAKtB,MAAM,CAAC,YAAY;QACzB,OAAO;YACL,OAAO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C,KAAuB;QACtC,IAAI,IAAI,CAAC,kBAAkB;YACzB,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACvB,CAAC;IAEM,OAAO,CAAC,KAAuB;QACpC,IAAI,IAAI,CAAC,kBAAkB;YACzB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACrB,CAAC;CACF;AAnFD,kDAmFC","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/** @packageDocumentation\n * @module Rendering\n */\n\nimport { BeEvent } from \"@itwin/core-bentley\";\n\n/** Describes timing statistics for a single rendered frame. Aside from `frameId`, `totalFrameTime`, and `totalSceneTime`, the other entries may represent operations that are not performed every frame and may contain an expected value of zero.\n * @note By default, the display system does not render frames continuously. The display system will render a new frame only when the view changes. Therefore, the data contained within this interface cannot directly be used to compute a representative framerate.\n * @alpha\n */\nexport interface FrameStats {\n /** A unique number identifying the frame to which these statistics belong. */\n frameId: number;\n /** The CPU time in milliseconds spent setting up the scene. This does not include the time described by `totalFrameTime`. */\n totalSceneTime: number;\n /** The CPU time in milliseconds spent performing animations while setting up the scene. This is included in `totalSceneTime`. */\n animationTime: number;\n /** The CPU time in milliseconds spent setting up the view while setting up the scene. This is included in `totalSceneTime`. */\n setupViewTime: number;\n /** The CPU time in milliseconds spent when creating or changing the scene if invalid. This is included in `totalSceneTime`. */\n createChangeSceneTime: number;\n /** The CPU time in milliseconds spent validating the render plan while setting up the scene. This is included in `totalSceneTime`. */\n validateRenderPlanTime: number;\n /** The CPU time in milliseconds spent adding or changing decorations while setting up the scene. This is included in `totalSceneTime`. */\n decorationsTime: number;\n /** The CPU time in milliseconds spent executing the target's `onBeforeRender` call while setting up the scene. This is included in `totalSceneTime`. */\n onBeforeRenderTime: number;\n /** The CPU time in milliseconds spent rendering the frame. This does not include the time described by `totalSceneTime`. */\n totalFrameTime: number;\n /** The CPU time in milliseconds spent rendering opaque geometry. This is included in `totalFrameTime`. */\n opaqueTime: number;\n /** The CPU time in milliseconds spent executing the `IModelFrameLifecycle.onRenderOpaque` call. This is included in `totalFrameTime`. */\n onRenderOpaqueTime: number;\n /** The CPU time in milliseconds spent rendering translucent geometry. This is included in `totalFrameTime`. */\n translucentTime: number;\n /** The CPU time in milliseconds spent rendering overlays. This is included in `totalFrameTime`. */\n overlaysTime: number;\n /** The CPU time in milliseconds spent rendering the solar shadow map. This is included in `totalFrameTime`. */\n shadowsTime: number;\n /** The CPU time in milliseconds spent rendering both planar and volume classifiers. This is included in `totalFrameTime`. */\n classifiersTime: number;\n /** The CPU time in milliseconds spent applying screenspace effects. This is included in `totalFrameTime`. */\n screenspaceEffectsTime: number;\n /** The CPU time in milliseconds spent rendering background geometry including backgrounds, skyboxes, and background maps. This is included in `totalFrameTime`. */\n backgroundTime: number;\n}\n\n/** An event which will be raised when a new frame statistics object is available. The listeners will receive that frame statistics object.\n * @see [[Viewport.enableFrameStatsListener]]\n * @alpha\n */\nexport type OnFrameStatsReadyEvent = BeEvent<(frameStats: Readonly<FrameStats>) => void>;\n\n/** @internal */\nexport class FrameStatsCollector {\n private _onFrameStatsReady?: OnFrameStatsReadyEvent;\n private _frameStats = FrameStatsCollector._createStats();\n private _shouldRecordFrame = false;\n\n private static _createStats(): FrameStats {\n return {\n frameId: 0,\n totalSceneTime: 0,\n animationTime: 0,\n setupViewTime: 0,\n createChangeSceneTime: 0,\n validateRenderPlanTime: 0,\n decorationsTime: 0,\n onBeforeRenderTime: 0,\n totalFrameTime: 0,\n opaqueTime: 0,\n onRenderOpaqueTime: 0,\n translucentTime: 0,\n overlaysTime: 0,\n shadowsTime: 0,\n classifiersTime: 0,\n screenspaceEffectsTime: 0,\n backgroundTime: 0,\n };\n }\n\n private _clearStats() {\n this._frameStats.totalSceneTime = 0;\n this._frameStats.animationTime = 0;\n this._frameStats.setupViewTime = 0;\n this._frameStats.createChangeSceneTime = 0;\n this._frameStats.validateRenderPlanTime = 0;\n this._frameStats.decorationsTime = 0;\n this._frameStats.onBeforeRenderTime = 0;\n this._frameStats.totalFrameTime = 0;\n this._frameStats.opaqueTime = 0;\n this._frameStats.onRenderOpaqueTime = 0;\n this._frameStats.translucentTime = 0;\n this._frameStats.overlaysTime = 0;\n this._frameStats.shadowsTime = 0;\n this._frameStats.classifiersTime = 0;\n this._frameStats.screenspaceEffectsTime = 0;\n this._frameStats.backgroundTime = 0;\n }\n\n public constructor(onFrameStatsReady?: OnFrameStatsReadyEvent) { this._onFrameStatsReady = onFrameStatsReady; }\n\n private _begin(entry: keyof FrameStats) {\n const prevSpan = this._frameStats[entry];\n this._frameStats[entry] = Date.now() - prevSpan;\n }\n\n private _end(entry: keyof FrameStats) {\n const beginTime = this._frameStats[entry];\n this._frameStats[entry] = Date.now() - beginTime;\n }\n\n public beginFrame() {\n this._shouldRecordFrame = undefined !== this._onFrameStatsReady && this._onFrameStatsReady.numberOfListeners > 0;\n }\n\n public endFrame(wasFrameDrawn = false) {\n if (this._shouldRecordFrame) {\n if (wasFrameDrawn) {\n if (undefined !== this._onFrameStatsReady)\n this._onFrameStatsReady.raiseEvent(this._frameStats); // transmit this frame's statistics to any listeners\n this._frameStats.frameId++; // increment frame counter for next pending frame\n }\n this._clearStats();\n this._shouldRecordFrame = false;\n }\n }\n\n public beginTime(entry: keyof FrameStats) {\n if (this._shouldRecordFrame)\n this._begin(entry);\n }\n\n public endTime(entry: keyof FrameStats) {\n if (this._shouldRecordFrame)\n this._end(entry);\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"GraphicBranch.js","sourceRoot":"","sources":["../../../src/render/GraphicBranch.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA4E;AAK5E,4CAAyC;AAqBzC;;;;;;;GAOG;AACH,MAAa,aAAa;IA0BxB;;OAEG;IACH,YAAmB,cAAuB,KAAK;QA5B/C,qCAAqC;QACrB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K,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,OAAO,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC;aACzE;SACF;QAED,OAAO;YACL,YAAY,EAAE,QAAQ;YACtB,gBAAgB,EAAE,MAAM,CAAC,iBAAiB;SAC3C,CAAC;IACJ,CAAC;IAnBe,gCAAU,aAmBzB,CAAA;AACH,CAAC,EArBgB,qBAAqB,GAArB,6BAAqB,KAArB,6BAAqB,QAqBrC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Rendering\r\n */\r\n\r\nimport { disposeArray, Id64String, IDisposable } from \"@itwin/core-bentley\";\r\nimport {\r\n FeatureAppearanceProvider, HiddenLine, RealityModelDisplaySettings, RenderSchedule, ViewFlagOverrides, ViewFlags,\r\n} from \"@itwin/core-common\";\r\nimport { IModelConnection } from \"../IModelConnection\";\r\nimport { IModelApp } from \"../IModelApp\";\r\nimport { FeatureSymbology } from \"./FeatureSymbology\";\r\nimport { RenderClipVolume } from \"./RenderClipVolume\";\r\nimport { RenderGraphic } from \"./RenderGraphic\";\r\nimport { RenderMemory } from \"./RenderMemory\";\r\nimport { RenderPlanarClassifier } from \"./RenderPlanarClassifier\";\r\nimport { RenderTextureDrape } from \"./RenderSystem\";\r\nimport { Range3d } from \"@itwin/core-geometry\";\r\nimport { AnimationNodeId } from \"../common/render/AnimationNodeId\";\r\n\r\n/** Carries information in a GraphicBranchOptions about a GraphicBranch produced by drawing one view into the context of another.\r\n * @internal\r\n */\r\nexport interface GraphicBranchFrustum {\r\n is3d: boolean;\r\n scale: {\r\n x: number;\r\n y: number;\r\n };\r\n}\r\n\r\n/**\r\n * A node in a scene graph. The branch itself is not renderable. Instead it contains a list of RenderGraphics,\r\n * and a transform, symbology overrides, and clip volume which are to be applied when rendering them.\r\n * Branches can be nested to build an arbitrarily-complex scene graph.\r\n * @see [[RenderSystem.createBranch]]\r\n * @public\r\n * @extensions\r\n */\r\nexport class GraphicBranch implements IDisposable /* , RenderMemory.Consumer */ {\r\n /** The child nodes of this branch */\r\n public readonly entries: RenderGraphic[] = [];\r\n /** If true, when the branch is disposed of, the RenderGraphics in its entries array will also be disposed */\r\n public readonly ownsEntries: boolean;\r\n /** Selectively overrides the view's [ViewFlags]($common) while drawing graphics within this branch. The default overrides nothing.\r\n * @see [[setViewFlagOverrides]].\r\n */\r\n public viewFlagOverrides: ViewFlagOverrides = {};\r\n /** Controls how reality models are displayed within this branch.\r\n * @beta\r\n */\r\n public realityModelDisplaySettings?: RealityModelDisplaySettings;\r\n /** @internal */\r\n public realityModelRange?: Range3d;\r\n /** Optional symbology overrides to be applied to all graphics in this branch */\r\n public symbologyOverrides?: FeatureSymbology.Overrides;\r\n /** Optional animation branch Id that incorporates the model Id and, for element timelines, the batch Id.\r\n * @internal\r\n */\r\n public animationId?: string;\r\n /** Identifies the node in the [RenderSchedule.Script]($backend) with which this branch is associated.\r\n * @internal\r\n */\r\n public animationNodeId?: AnimationNodeId | number;\r\n\r\n /** Constructor\r\n * @param ownsEntries If true, when this branch is [[dispose]]d, all of the [[RenderGraphic]]s it contains will also be disposed.\r\n */\r\n public constructor(ownsEntries: boolean = false) {\r\n this.ownsEntries = ownsEntries;\r\n }\r\n\r\n /** Add a graphic to this branch. */\r\n public add(graphic: RenderGraphic): void {\r\n this.entries.push(graphic);\r\n }\r\n\r\n /** Compute the view flags that result from applying this branch's [[viewFlagOverrides]] to the input flags.\r\n * @param flags The input view flags, e.g., from the view's [[DisplayStyleState]].\r\n * @returns The result of applying [[viewFlagOverrides]] to `flags`.\r\n */\r\n public getViewFlags(flags: ViewFlags): ViewFlags {\r\n return flags.override(this.viewFlagOverrides);\r\n }\r\n\r\n /** Set [[viewFlagOverrides]] to override **all** ViewFlags as specified by `flags`. */\r\n public setViewFlags(flags: ViewFlags): void {\r\n this.viewFlagOverrides = { ...flags };\r\n }\r\n\r\n /** Change [[viewFlagOverrides]]. */\r\n public setViewFlagOverrides(ovr: ViewFlagOverrides): void {\r\n this.viewFlagOverrides = { ...ovr };\r\n }\r\n\r\n /** Disposes of all graphics in this branch, if and only if [[ownsEntries]] is true. */\r\n public dispose() {\r\n this.clear();\r\n }\r\n\r\n /** Returns true if this branch contains no graphics. */\r\n public get isEmpty(): boolean {\r\n return 0 === this.entries.length;\r\n }\r\n\r\n /** Empties the list of [[RenderGraphic]]s contained in this branch, and if the [[ownsEntries]] flag is set, also disposes of them. */\r\n public clear(): void {\r\n if (this.ownsEntries)\r\n disposeArray(this.entries);\r\n else\r\n this.entries.length = 0;\r\n }\r\n\r\n /** @internal */\r\n public collectStatistics(stats: RenderMemory.Statistics): void {\r\n for (const entry of this.entries)\r\n entry.collectStatistics(stats);\r\n }\r\n}\r\n\r\n/** Options passed to [[RenderSystem.createGraphicBranch]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface GraphicBranchOptions {\r\n /** Clip applied to the graphics in the branch. */\r\n clipVolume?: RenderClipVolume;\r\n /** @internal */\r\n classifierOrDrape?: RenderPlanarClassifier | RenderTextureDrape;\r\n /** Optionally replaces the view's hidden line settings when drawing the branch. */\r\n hline?: HiddenLine.Settings;\r\n /** The iModel from which the graphics originate, if different than that associated with the view. */\r\n iModel?: IModelConnection;\r\n /** @internal */\r\n frustum?: GraphicBranchFrustum;\r\n /** Supplements the view's [[FeatureSymbology.Overrides]] for graphics in the branch. */\r\n appearanceProvider?: FeatureAppearanceProvider;\r\n /** @internal Secondary planar classifiers (map layers) */\r\n secondaryClassifiers?: Map<number, RenderPlanarClassifier>;\r\n /** The Id of the [ViewAttachment]($backend) from which this branch's graphics originated.\r\n * @internal\r\n */\r\n viewAttachmentId?: Id64String;\r\n}\r\n\r\n/** Clip/Transform for a branch that are varied over time.\r\n * @internal\r\n */\r\nexport interface AnimationBranchState {\r\n readonly clip?: RenderClipVolume;\r\n readonly omit?: boolean;\r\n}\r\n\r\n/** @internal */\r\nexport function formatAnimationBranchId(modelId: Id64String, branchId: number): string {\r\n if (branchId < 0)\r\n return modelId;\r\n\r\n return `${modelId}_Node_${branchId.toString()}`;\r\n}\r\n\r\nfunction addAnimationBranch(modelId: Id64String, timeline: RenderSchedule.Timeline, branchId: number, branches: Map<string, AnimationBranchState>, time: number): void {\r\n const clipVector = timeline.getClipVector(time);\r\n const clip = clipVector ? IModelApp.renderSystem.createClipVolume(clipVector) : undefined;\r\n if (clip)\r\n branches.set(formatAnimationBranchId(modelId, branchId), { clip });\r\n}\r\n\r\n/** Mapping from node/branch IDs to animation branch state\r\n * @internal\r\n */\r\nexport interface AnimationBranchStates {\r\n /** Maps node Id to branch state. */\r\n readonly branchStates: Map<string, AnimationBranchState>;\r\n /** Ids of nodes that apply a transform. */\r\n readonly transformNodeIds: ReadonlySet<number>;\r\n}\r\n\r\n/** @internal */\r\nexport namespace AnimationBranchStates {\r\n export function fromScript(script: RenderSchedule.Script, time: number): AnimationBranchStates | undefined {\r\n if (!script.containsModelClipping && !script.requiresBatching)\r\n return undefined;\r\n\r\n const branches = new Map<string, AnimationBranchState>();\r\n for (const model of script.modelTimelines) {\r\n addAnimationBranch(model.modelId, model, -1, branches, time);\r\n for (const elem of model.elementTimelines) {\r\n if (elem.getVisibility(time) <= 0)\r\n branches.set(formatAnimationBranchId(model.modelId, elem.batchId), { omit: true });\r\n else\r\n addAnimationBranch(model.modelId, elem, elem.batchId, branches, time);\r\n }\r\n }\r\n\r\n return {\r\n branchStates: branches,\r\n transformNodeIds: script.transformBatchIds,\r\n };\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"GraphicBranch.js","sourceRoot":"","sources":["../../../src/render/GraphicBranch.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA4E;AAK5E,4CAAyC;AAqBzC;;;;;;;GAOG;AACH,MAAa,aAAa;IA0BxB;;OAEG;IACH,YAAmB,c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CAAC;;oBAEnF,kBAAkB,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,OAAO,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC;aACzE;SACF;QAED,OAAO;YACL,YAAY,EAAE,QAAQ;YACtB,gBAAgB,EAAE,MAAM,CAAC,iBAAiB;SAC3C,CAAC;IACJ,CAAC;IAnBe,gCAAU,aAmBzB,CAAA;AACH,CAAC,EArBgB,qBAAqB,GAArB,6BAAqB,KAArB,6BAAqB,QAqBrC","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/** @packageDocumentation\n * @module Rendering\n */\n\nimport { disposeArray, Id64String, IDisposable } from \"@itwin/core-bentley\";\nimport {\n FeatureAppearanceProvider, HiddenLine, RealityModelDisplaySettings, RenderSchedule, ViewFlagOverrides, ViewFlags,\n} from \"@itwin/core-common\";\nimport { IModelConnection } from \"../IModelConnection\";\nimport { IModelApp } from \"../IModelApp\";\nimport { FeatureSymbology } from \"./FeatureSymbology\";\nimport { RenderClipVolume } from \"./RenderClipVolume\";\nimport { RenderGraphic } from \"./RenderGraphic\";\nimport { RenderMemory } from \"./RenderMemory\";\nimport { RenderPlanarClassifier } from \"./RenderPlanarClassifier\";\nimport { RenderTextureDrape } from \"./RenderSystem\";\nimport { Range3d } from \"@itwin/core-geometry\";\nimport { AnimationNodeId } from \"../common/render/AnimationNodeId\";\n\n/** Carries information in a GraphicBranchOptions about a GraphicBranch produced by drawing one view into the context of another.\n * @internal\n */\nexport interface GraphicBranchFrustum {\n is3d: boolean;\n scale: {\n x: number;\n y: number;\n };\n}\n\n/**\n * A node in a scene graph. The branch itself is not renderable. Instead it contains a list of RenderGraphics,\n * and a transform, symbology overrides, and clip volume which are to be applied when rendering them.\n * Branches can be nested to build an arbitrarily-complex scene graph.\n * @see [[RenderSystem.createBranch]]\n * @public\n * @extensions\n */\nexport class GraphicBranch implements IDisposable /* , RenderMemory.Consumer */ {\n /** The child nodes of this branch */\n public readonly entries: RenderGraphic[] = [];\n /** If true, when the branch is disposed of, the RenderGraphics in its entries array will also be disposed */\n public readonly ownsEntries: boolean;\n /** Selectively overrides the view's [ViewFlags]($common) while drawing graphics within this branch. The default overrides nothing.\n * @see [[setViewFlagOverrides]].\n */\n public viewFlagOverrides: ViewFlagOverrides = {};\n /** Controls how reality models are displayed within this branch.\n * @beta\n */\n public realityModelDisplaySettings?: RealityModelDisplaySettings;\n /** @internal */\n public realityModelRange?: Range3d;\n /** Optional symbology overrides to be applied to all graphics in this branch */\n public symbologyOverrides?: FeatureSymbology.Overrides;\n /** Optional animation branch Id that incorporates the model Id and, for element timelines, the batch Id.\n * @internal\n */\n public animationId?: string;\n /** Identifies the node in the [RenderSchedule.Script]($backend) with which this branch is associated.\n * @internal\n */\n public animationNodeId?: AnimationNodeId | number;\n\n /** Constructor\n * @param ownsEntries If true, when this branch is [[dispose]]d, all of the [[RenderGraphic]]s it contains will also be disposed.\n */\n public constructor(ownsEntries: boolean = false) {\n this.ownsEntries = ownsEntries;\n }\n\n /** Add a graphic to this branch. */\n public add(graphic: RenderGraphic): void {\n this.entries.push(graphic);\n }\n\n /** Compute the view flags that result from applying this branch's [[viewFlagOverrides]] to the input flags.\n * @param flags The input view flags, e.g., from the view's [[DisplayStyleState]].\n * @returns The result of applying [[viewFlagOverrides]] to `flags`.\n */\n public getViewFlags(flags: ViewFlags): ViewFlags {\n return flags.override(this.viewFlagOverrides);\n }\n\n /** Set [[viewFlagOverrides]] to override **all** ViewFlags as specified by `flags`. */\n public setViewFlags(flags: ViewFlags): void {\n this.viewFlagOverrides = { ...flags };\n }\n\n /** Change [[viewFlagOverrides]]. */\n public setViewFlagOverrides(ovr: ViewFlagOverrides): void {\n this.viewFlagOverrides = { ...ovr };\n }\n\n /** Disposes of all graphics in this branch, if and only if [[ownsEntries]] is true. */\n public dispose() {\n this.clear();\n }\n\n /** Returns true if this branch contains no graphics. */\n public get isEmpty(): boolean {\n return 0 === this.entries.length;\n }\n\n /** Empties the list of [[RenderGraphic]]s contained in this branch, and if the [[ownsEntries]] flag is set, also disposes of them. */\n public clear(): void {\n if (this.ownsEntries)\n disposeArray(this.entries);\n else\n this.entries.length = 0;\n }\n\n /** @internal */\n public collectStatistics(stats: RenderMemory.Statistics): void {\n for (const entry of this.entries)\n entry.collectStatistics(stats);\n }\n}\n\n/** Options passed to [[RenderSystem.createGraphicBranch]].\n * @public\n * @extensions\n */\nexport interface GraphicBranchOptions {\n /** Clip applied to the graphics in the branch. */\n clipVolume?: RenderClipVolume;\n /** @internal */\n classifierOrDrape?: RenderPlanarClassifier | RenderTextureDrape;\n /** Optionally replaces the view's hidden line settings when drawing the branch. */\n hline?: HiddenLine.Settings;\n /** The iModel from which the graphics originate, if different than that associated with the view. */\n iModel?: IModelConnection;\n /** @internal */\n frustum?: GraphicBranchFrustum;\n /** Supplements the view's [[FeatureSymbology.Overrides]] for graphics in the branch. */\n appearanceProvider?: FeatureAppearanceProvider;\n /** @internal Secondary planar classifiers (map layers) */\n secondaryClassifiers?: Map<number, RenderPlanarClassifier>;\n /** The Id of the [ViewAttachment]($backend) from which this branch's graphics originated.\n * @internal\n */\n viewAttachmentId?: Id64String;\n}\n\n/** Clip/Transform for a branch that are varied over time.\n * @internal\n */\nexport interface AnimationBranchState {\n readonly clip?: RenderClipVolume;\n readonly omit?: boolean;\n}\n\n/** @internal */\nexport function formatAnimationBranchId(modelId: Id64String, branchId: number): string {\n if (branchId < 0)\n return modelId;\n\n return `${modelId}_Node_${branchId.toString()}`;\n}\n\nfunction addAnimationBranch(modelId: Id64String, timeline: RenderSchedule.Timeline, branchId: number, branches: Map<string, AnimationBranchState>, time: number): void {\n const clipVector = timeline.getClipVector(time);\n const clip = clipVector ? IModelApp.renderSystem.createClipVolume(clipVector) : undefined;\n if (clip)\n branches.set(formatAnimationBranchId(modelId, branchId), { clip });\n}\n\n/** Mapping from node/branch IDs to animation branch state\n * @internal\n */\nexport interface AnimationBranchStates {\n /** Maps node Id to branch state. */\n readonly branchStates: Map<string, AnimationBranchState>;\n /** Ids of nodes that apply a transform. */\n readonly transformNodeIds: ReadonlySet<number>;\n}\n\n/** @internal */\nexport namespace AnimationBranchStates {\n export function fromScript(script: RenderSchedule.Script, time: number): AnimationBranchStates | undefined {\n if (!script.containsModelClipping && !script.requiresBatching)\n return undefined;\n\n const branches = new Map<string, AnimationBranchState>();\n for (const model of script.modelTimelines) {\n addAnimationBranch(model.modelId, model, -1, branches, time);\n for (const elem of model.elementTimelines) {\n if (elem.getVisibility(time) <= 0)\n branches.set(formatAnimationBranchId(model.modelId, elem.batchId), { omit: true });\n else\n addAnimationBranch(model.modelId, elem, elem.batchId, branches, time);\n }\n }\n\n return {\n branchStates: branches,\n transformNodeIds: script.transformBatchIds,\n };\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"GraphicBuilder.js","sourceRoot":"","sources":["../../../src/render/GraphicBuilder.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAyD;AACzD,wDAE8B;AAC9B,oDAA8H;AAM9H;;;;;;;;GAQG;AACH,IAAY,WAkDX;AAlDD,WAAY,WAAW;IACrB;;;;;;;OAOG;IACH,iEAAc,CAAA;IACd,qEAAqE;IACrE;;;;;;OAMG;IACH,+CAAK,CAAA;IACL,8GAA8G;IAC9G;;;;;;OAMG;IACH,mEAAe,CAAA;IACf;;;;;;;;;;OAUG;IACH,6DAAY,CAAA;IACZ;;;;;;;;OAQG;IACH,2DAAW,CAAA;AACb,CAAC,EAlDW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAkDtB;AA6ID;;;;;;;;;;;;;;GAcG;AACH,MAAsB,cAAc;IAuClC,gBAAgB;IAChB,YAAsB,OAAoE;QACxF,sHAAsH;QACtH,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QAExB,MAAM,EAAE,GA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CAAC,aAAa,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,iBAAG,CAAC,YAAY,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;QAChF,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,iBAAG,CAAC,cAAc,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,iBAAG,CAAC,eAAe,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;IACtF,CAAC;IAED;;;;;;OAMG;IACI,YAAY,CAAC,SAAmB,EAAE,SAAmB,EAAE,SAAiB,EAAE,UAAU,GAAG,wBAAU,CAAC,KAAK;QAC5G,IAAI,CAAC,qBAAqB,CAAC,2BAAa,CAAC,aAAa,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC;IACvG,CAAC;IAED;;;;;OAKG;IACI,eAAe,CAAC,SAAmB,IAAI,IAAI,CAAC,qBAAqB,CAAC,2BAAa,CAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;CACvH;AAzVD,wCAyVC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Rendering\r\n */\r\n\r\nimport { assert, Id64String } from \"@itwin/core-bentley\";\r\nimport {\r\n AnyCurvePrimitive, Arc3d, Box, Loop, Path, Point2d, Point3d, Polyface, Range3d, SolidPrimitive, Transform,\r\n} from \"@itwin/core-geometry\";\r\nimport { AnalysisStyle, ColorDef, Feature, Frustum, GeometryClass, GraphicParams, LinePixels, Npc } from \"@itwin/core-common\";\r\nimport { IModelConnection } from \"../IModelConnection\";\r\nimport { Viewport } from \"../Viewport\";\r\nimport { RenderGraphic } from \"./RenderGraphic\";\r\nimport { GraphicPrimitive } from \"./GraphicPrimitive\";\r\n\r\n/**\r\n * Describes the type of a [[GraphicBuilder]], which defines the coordinate system in which the builder's geometry is defined and\r\n * controls the behavior of the [[RenderGraphic]] produced by the builder.\r\n * @note For those types for which depth-testing is disabled, the order in which the individual geometric primitives are drawn determines which geometry draws on top of other geometry.\r\n * - Within a [[GraphicList]], each [[RenderGraphic]] is rendered in the order in which it appears in the list; and\r\n * - Within a single [[RenderGraphic]], each geometric primitive is rendered in the ordered in which it was added to the GraphicBuilder.\r\n * @public\r\n * @extensions\r\n */\r\nexport enum GraphicType {\r\n /**\r\n * Renders behind all other graphics. For example, the border of a [[SheetViewState]] is of this type.\r\n * Coordinates: [[CoordSystem.View]].\r\n * [[RenderMode]]: [[RenderMode.SmoothShade]].\r\n * Lighting: none.\r\n * Depth-testing: disabled.\r\n * @see [[Decorations.viewBackground]]\r\n */\r\n ViewBackground,\r\n /** Used for the scene itself, dynamics, and 'normal' decorations. */\r\n /**\r\n * Renders as if it were part of the scene. All of the [[ViewFlags]] applied to the view's normal geometry also applies to these types of decorations.\r\n * Coordinates: [[CoordSystem.World]].\r\n * Lighting and [[RenderMode]]: from view.\r\n * Depth-testing: enabled.\r\n * @see [[Decorations.normal]].\r\n */\r\n Scene,\r\n /** Renders within the scene. Coordinates: world. RenderMode: smooth. Lighting: default. Z-testing: enabled */\r\n /** Renders within the scene, but ignores the view's [[ViewFlags]].\r\n * Coordinates: [[CoordSystem.World]].\r\n * Lighting: default.\r\n * [[RenderMode]]: [[RenderMode.SmoothShade]].\r\n * Depth-testing: enabled.\r\n * @see [[Decorations.world]].\r\n */\r\n WorldDecoration,\r\n /**\r\n * Renders as an overlay on top of the scene. These decorations differ from [[GraphicType.WorldDecoration]] only in that depth-testing is disabled.\r\n * For example, the ACS triad and [[WindowAreaTool]] decorations are of this type.\r\n * Coordinates: [[CoordSystem.World]].\r\n * [[RenderMode]]: [[RenderMode.SmoothShade]]\r\n * Lighting: default.\r\n * Depth-testing: disabled.\r\n * Renders atop the scene. Coordinates: world. RenderMode: smooth. Lighting: none. Z-testing: disabled\r\n * @note Overlay decorations typically employ some degree of transparency to ensure that they do not fully obscure the scene.\r\n * @see [[Decorations.worldOverlay]]\r\n */\r\n WorldOverlay,\r\n /**\r\n * Renders as an overlay on top of the scene. These decorations differ from [[GraphicType.WorldOverlay]] only in that their geometry is defined in view coordinates rather than world.\r\n * Coordinates: [[CoordSystem.View]].\r\n * [[RenderMode]]: [[RenderMode.SmoothShade]]\r\n * Lighting: default.\r\n * Depth-testing: disabled.\r\n * @note For more flexibility in defining view overlay decorations, consider using a [[CanvasDecorationList]].\r\n * @see [[Decorations.viewOverlay]]\r\n */\r\n ViewOverlay,\r\n}\r\n\r\n/** Options used when constructing a `Batch` - that is, a [[RenderGraphic]] with an associated [FeatureTable]($common) describing individual [Feature]($common)s within the\r\n * graphic. Individual features can be resymbolized in a variety of ways including flashing and hiliting.\r\n * For example, to prevent graphics produced by [[readElementGraphics]] from being hilited when their corresponding element is in the [[SelectionSet]],\r\n * pass `{ noHilite: true }` to [[readElementGraphics]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface BatchOptions {\r\n /** Identifies the [[Tile]] associated with the batch, chiefly for debugging purposes.\r\n * @beta\r\n */\r\n tileId?: string;\r\n /** If true, features within the batch will not be flashed on mouseover. */\r\n noFlash?: boolean;\r\n /** If true, features within the batch will not be hilited when their corresponding element is in the [[SelectionSet]]. */\r\n noHilite?: boolean;\r\n /** If true, features within the batch will not be emphasized when the corresponding [[Feature]] is emphasized using [FeatureOverrides]($common). */\r\n noEmphasis?: boolean;\r\n /** If true, the contents of the batch will only be drawn by [[Viewport.readPixels]], not [[Viewport.renderFrame]], causing them to be locatable but invisible. */\r\n locateOnly?: boolean;\r\n}\r\n\r\n/** Options used as part of [[GraphicBuilderOptions]] to describe a [pickable]($docs/learning/frontend/ViewDecorations#pickable-view-graphic-decorations) [[RenderGraphic]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface PickableGraphicOptions extends BatchOptions {\r\n /** A unique identifier for the graphic.\r\n * @see [[IModelConnection.transientIds]] to obtain a unique Id in the context of an iModel.\r\n * @see [[GraphicBuilder.activatePickableId]] or [[GraphicBuilder.activateFeature]] to change the pickable object while adding geometry.\r\n */\r\n id: Id64String;\r\n /** Optional Id of the subcategory with which the graphic should be associated. */\r\n subCategoryId?: Id64String;\r\n /** Optional geometry class for the graphic - defaults to [GeometryClass.Primary]($common). */\r\n geometryClass?: GeometryClass;\r\n /** The optional Id of the model with which the graphic should be associated. */\r\n modelId?: Id64String;\r\n}\r\n\r\n/** Options for creating a [[GraphicBuilder]] used by functions like [[DecorateContext.createGraphic]] and [[RenderSystem.createGraphic]].\r\n * @see [[ViewportGraphicBuilderOptions]] to create a graphic builder for a [[Viewport]].\r\n * @see [[CustomGraphicBuilderOptions]] to create a graphic builder unassociated with any [[Viewport]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface GraphicBuilderOptions {\r\n /** The type of graphic to produce. */\r\n type: GraphicType;\r\n\r\n /** The local-to-world transform in which the builder's geometry is to be defined - by default, an identity transform. */\r\n placement?: Transform;\r\n\r\n /** If the graphic is to be pickable, specifies the pickable Id and other options. */\r\n pickable?: PickableGraphicOptions;\r\n\r\n /** If true, the order in which geometry is added to the builder is preserved.\r\n * This is useful for overlay and background graphics because they draw without using the depth buffer. For example, to draw an overlay containing a red shape with a white outline,\r\n * you would add the shape to the GraphicBuilder first, followed by the outline, to ensure the outline draws \"in front of\" the shape.\r\n * It defaults to true for overlays and background graphics, and false for other graphic types.\r\n * It is not useful for other types of graphics and imposes a performance penalty due to increased number of draw calls.\r\n * For overlay and background graphics that do not need to draw in any particular order, the performance penalty can be eliminated by setting this to `false`.\r\n */\r\n preserveOrder?: boolean;\r\n\r\n /** Controls whether normals are generated for surfaces. Normals allow 3d geometry to receive lighting; without them the geometry will be unaffected by lighting.\r\n * By default, normals are generated only for graphics of type [[GraphicType.Scene]]; or for any type of graphic if [[GraphicBuilder.wantEdges]] is true, because\r\n * normals are required to prevent z-fighting between surfaces and their edges. This default can be overridden by explicitly specifying `true` or `false`.\r\n * @see [[GraphicType]] for a description of whether and how different types of graphics are affected by lighting.\r\n */\r\n wantNormals?: boolean;\r\n\r\n /** Controls whether edges are generated for surfaces.\r\n * Edges are only displayed if [ViewFlags.renderMode]($common) is not [RenderMode.SmoothShade]($common) or [ViewFlags.visibleEdges]($common) is `true`.\r\n * Since all decoration graphics except [[GraphicType.Scene]] are drawn in smooth shaded mode with no visible edges, by default edges are only produced for scene graphics, and\r\n * - if a [[Viewport]] is supplied with the options - only if [ViewFlags.edgesRequired]($common) is true for the viewport.\r\n * That default can be overridden by explicitly specifying `true` or `false`. This can be useful for non-scene decorations contained in a [[GraphicBranch]] that applies [ViewFlagOverrides]($common)\r\n * that change the edge display settings; or for scene decorations that might be cached for reuse after the viewport's edge settings are changed.\r\n * @note Edges will tend to z-fight with their surfaces unless the graphic is [[pickable]].\r\n */\r\n generateEdges?: boolean;\r\n\r\n /** If defined, specifies a point about which the graphic will rotate such that it always faces the viewer.\r\n * This can be particular useful for planar regions to create a billboarding effect - e.g., to implement [[Marker]]-like WebGL decorations.\r\n * The graphic's [[placement]] transform is not applied to the point.\r\n * @note This has no effect for graphics displayed in a 2d view.\r\n */\r\n viewIndependentOrigin?: Point3d;\r\n}\r\n\r\n/** Options for creating a [[GraphicBuilder]] to produce a [[RenderGraphic]] to be displayed in a specific [[Viewport]].\r\n * The level of detail of the graphic will be computed from the position of its geometry within the viewport's [Frustum]($common).\r\n * Default values for [[GraphicBuilderOptions.wantNormals]] and [[GraphicBuilderOptions.generateEdges]] will be determined by the viewport's [ViewFlags]($common).\r\n * The [[GraphicBuilder.iModel]] will be set to the viewport's [[IModelConnection]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ViewportGraphicBuilderOptions extends GraphicBuilderOptions {\r\n /** The viewport in which the resultant [[RenderGraphic]] is to be drawn. */\r\n viewport: Viewport;\r\n\r\n /** If true, [[ViewState.getAspectRatioSkew]] will be taken into account when computing the level of detail for the produced graphics. */\r\n applyAspectRatioSkew?: boolean;\r\n\r\n iModel?: never;\r\n computeChordTolerance?: never;\r\n}\r\n\r\n/** Arguments used to compute the chord tolerance (level of detail) of the [[RenderGraphic]]s produced by a [[GraphicBuilder]].\r\n * Generally, the chord tolerance should be roughly equivalent to the size in meters of one pixel on screen where the graphic is to be displayed.\r\n * For [[GraphicType.ViewOverlay]] and [[GraphicType.ViewBackground]], which already define their geometry in pixels, the chord tolerance should typically be 1.\r\n * @see [[CustomGraphicBuilderOptions.computeChordTolerance]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ComputeChordToleranceArgs {\r\n /** The graphic builder being used to produce the graphics. */\r\n readonly graphic: GraphicBuilder;\r\n /** A function that computes a range enclosing all of the geometry that was added to the builder. */\r\n readonly computeRange: () => Range3d;\r\n}\r\n\r\n/** Options for creating a [[GraphicBuilder]] to produce a [[RenderGraphic]] that is not associated with any particular [[Viewport]] and may not be associated with\r\n * any particular [[IModelConnection]].\r\n * This is primarily useful when the same graphic is to be saved and reused for display in multiple viewports and for which a chord tolerance can be computed\r\n * independently of each viewport's [Frustum]($common).\r\n * @public\r\n * @extensions\r\n */\r\nexport interface CustomGraphicBuilderOptions extends GraphicBuilderOptions {\r\n /** Optionally, the IModelConnection with which the graphic is associated. */\r\n iModel?: IModelConnection;\r\n /** A function that can compute the level of detail for the graphics produced by the builder. */\r\n computeChordTolerance: (args: ComputeChordToleranceArgs) => number;\r\n\r\n applyAspectRatioSkew?: never;\r\n viewport?: never;\r\n}\r\n\r\n/** Provides methods for constructing a [[RenderGraphic]] from geometric primitives.\r\n * GraphicBuilder is primarily used for creating [[Decorations]] to be displayed inside a [[Viewport]].\r\n *\r\n * The typical process for constructing a [[RenderGraphic]] proceeds as follows:\r\n * 1. Use [[DecorateContext.createGraphic]] or [[RenderSystem.createGraphic]] to obtain a builder.\r\n * 2. Set up the symbology using [[GraphicBuilder.activateGraphicParams]] or [[GraphicBuilder.setSymbology]].\r\n * 3. Add one or more geometric primitives using methods like [[GraphicBuilder.addShape]] and [[GraphicBuilder.addLineString]], possibly setting new symbology in between.\r\n * 4. Use [[GraphicBuilder.finish]] to produce the finished [[RenderGraphic]].\r\n *\r\n * @note Most of the methods which add geometry to the builder take ownership of their inputs rather than cloning them.\r\n * So, for example, if you pass an array of points to addLineString(), you should not subsequently modify that array.\r\n *\r\n * @public\r\n * @extensions\r\n */\r\nexport abstract class GraphicBuilder {\r\n /** The local coordinate system transform applied to this builder's geometry.\r\n * @see [[GraphicBuilderOptions.placement]].\r\n */\r\n public readonly placement: Transform;\r\n\r\n /** The iModel associated with this builder, if any. */\r\n public readonly iModel?: IModelConnection;\r\n\r\n /** The type of graphic to be produced by this builder.\r\n * @see [[GraphicBuilderOptions.type]].\r\n */\r\n public readonly type: GraphicType;\r\n\r\n /** If the graphic is to be pickable, specifies the pickable Id and other options. */\r\n public readonly pickable?: Readonly<PickableGraphicOptions>;\r\n\r\n /** If true, the order in which geometry is added to the builder is preserved.\r\n * @see [[GraphicBuilderOptions.preserveOrder]] for more details.\r\n */\r\n public readonly preserveOrder: boolean;\r\n\r\n /** Controls whether normals are generated for surfaces.\r\n * @note Normals are required for proper edge display, so by default they are always produced if [[wantEdges]] is `true`.\r\n * @see [[GraphicBuilderOptions.wantNormals]] for more details.\r\n */\r\n public readonly wantNormals: boolean;\r\n\r\n /** Controls whether edges are generated for surfaces.\r\n * @see [[GraphicBuilderOptions.generateEdges]] for more details.\r\n */\r\n public readonly wantEdges: boolean;\r\n\r\n /** @alpha */\r\n public readonly analysisStyle?: AnalysisStyle;\r\n\r\n protected readonly _computeChordTolerance: (args: ComputeChordToleranceArgs) => number;\r\n protected readonly _options: CustomGraphicBuilderOptions | ViewportGraphicBuilderOptions;\r\n\r\n /** @internal */\r\n protected constructor(options: ViewportGraphicBuilderOptions | CustomGraphicBuilderOptions) {\r\n // Stored for potential use later in creating a new GraphicBuilder from this one (see PrimitiveBuilder.finishGraphic).\r\n this._options = options;\r\n\r\n const vp = options.viewport;\r\n this.placement = options.placement ?? Transform.createIdentity();\r\n this.iModel = vp?.iModel ?? options.iModel;\r\n this.type = options.type;\r\n this.pickable = options.pickable;\r\n this.wantEdges = options.generateEdges ?? (this.type === GraphicType.Scene && (!vp || vp.viewFlags.edgesRequired()));\r\n this.wantNormals = options.wantNormals ?? (this.wantEdges || this.type === GraphicType.Scene);\r\n this.preserveOrder = options.preserveOrder ?? (this.isOverlay || this.isViewBackground);\r\n\r\n if (!options.viewport) {\r\n this._computeChordTolerance = options.computeChordTolerance;\r\n return;\r\n }\r\n\r\n this.analysisStyle = options.viewport.displayStyle.settings.analysisStyle;\r\n\r\n this._computeChordTolerance = (args: ComputeChordToleranceArgs) => {\r\n let pixelSize = 1;\r\n if (!this.isViewCoordinates) {\r\n // Compute the horizontal distance in meters between two adjacent pixels at the center of the geometry.\r\n pixelSize = options.viewport.getPixelSizeAtPoint(args.computeRange().center);\r\n pixelSize = options.viewport.target.adjustPixelSizeForLOD(pixelSize);\r\n\r\n // Aspect ratio skew > 1.0 stretches the view in Y. In that case use the smaller vertical pixel distance for our stroke tolerance.\r\n const skew = options.applyAspectRatioSkew ? options.viewport.view.getAspectRatioSkew() : 0;\r\n if (skew > 1)\r\n pixelSize /= skew;\r\n }\r\n\r\n return pixelSize * 0.25;\r\n };\r\n }\r\n\r\n /** The Id to be associated with the graphic for picking.\r\n * @see [[GraphicBuilderOptions.pickable]] for more options.\r\n * @deprecated in 3.x. This provides only the **first** pickable Id for this graphic - you should keep track of the **current** pickable Id yourself.\r\n */\r\n public get pickId(): Id64String | undefined {\r\n return this.pickable?.id;\r\n }\r\n\r\n /** Whether the builder's geometry is defined in [[CoordSystem.View]] coordinates.\r\n * @see [[isWorldCoordinates]].\r\n */\r\n public get isViewCoordinates(): boolean {\r\n return this.type === GraphicType.ViewBackground || this.type === GraphicType.ViewOverlay;\r\n }\r\n\r\n /** Whether the builder's geometry is defined in [[CoordSystem.World]] coordinates.\r\n * @see [[isViewCoordinates]].\r\n */\r\n public get isWorldCoordinates(): boolean {\r\n return !this.isViewCoordinates;\r\n }\r\n\r\n /** True if the builder produces a graphic of [[GraphicType.Scene]]. */\r\n public get isSceneGraphic(): boolean {\r\n return this.type === GraphicType.Scene;\r\n }\r\n\r\n /** True if the builder produces a graphic of [[GraphicType.ViewBackground]]. */\r\n public get isViewBackground(): boolean {\r\n return this.type === GraphicType.ViewBackground;\r\n }\r\n\r\n /** True if the builder produces a graphic of [[GraphicType.WorldOverlay]] or [[GraphicType.ViewOerlay]]. */\r\n public get isOverlay(): boolean {\r\n return this.type === GraphicType.ViewOverlay || this.type === GraphicType.WorldOverlay;\r\n }\r\n\r\n /**\r\n * Processes the accumulated symbology and geometry to produce a renderable graphic.\r\n * This function can only be called once; after the [[RenderGraphic]] has been extracted the [[GraphicBuilder]] should no longer be used.\r\n */\r\n public abstract finish(): RenderGraphic;\r\n\r\n /** Sets the current active symbology for this builder. Any new geometry subsequently added to the builder will be drawn using the specified symbology.\r\n * @param graphicParams The symbology to apply to subsequent geometry.\r\n * @see [[GraphicBuilder.setSymbology]] for a convenient way to set common symbology options.\r\n */\r\n public abstract activateGraphicParams(graphicParams: GraphicParams): void;\r\n\r\n /** Called by [[activateFeature]] after validation to change the [Feature]($common) to be associated with subsequently-added geometry.\r\n * This default implementation does nothing.\r\n */\r\n protected _activateFeature(_feature: Feature): void { }\r\n\r\n /** Change the [Feature]($common) to be associated with subsequently-added geometry. This permits multiple features to be batched together into a single graphic\r\n * for more efficient rendering.\r\n * @note This method has no effect if [[GraphicBuilderOptions.pickable]] was not supplied to the GraphicBuilder's constructor.\r\n */\r\n public activateFeature(feature: Feature): void {\r\n assert(undefined !== this._options.pickable, \"GraphicBuilder.activateFeature has no effect if PickableGraphicOptions were not supplied\");\r\n if (this._options.pickable)\r\n this._activateFeature(feature);\r\n }\r\n\r\n /** Change the pickable Id to be associated with subsequently-added geometry. This permits multiple pickable objects to be batched together into a single graphic\r\n * for more efficient rendering. This method calls [[activateFeature]], using the subcategory Id and [GeometryClass]($common) specified in [[GraphicBuilder.pickable]]\r\n * at construction, if any.\r\n * @note This method has no effect if [[GraphicBuilderOptions.pickable]] was not supplied to the GraphicBuilder's constructor.\r\n */\r\n public activatePickableId(id: Id64String): void {\r\n const pick = this._options.pickable;\r\n this.activateFeature(new Feature(id, pick?.subCategoryId, pick?.geometryClass));\r\n }\r\n\r\n /**\r\n * Appends a 3d line string to the builder.\r\n * @param points Array of vertices in the line string.\r\n */\r\n public abstract addLineString(points: Point3d[]): void;\r\n\r\n /**\r\n * Appends a 2d line string to the builder.\r\n * @param points Array of vertices in the line string.\r\n * @param zDepth Z value in local coordinates to use for each point.\r\n */\r\n public abstract addLineString2d(points: Point2d[], zDepth: number): void;\r\n\r\n /**\r\n * Appends a 3d point string to the builder. The points are drawn disconnected, with a diameter in pixels defined by the builder's active [[GraphicParams.rasterWidth]].\r\n * @param points Array of vertices in the point string.\r\n */\r\n public abstract addPointString(points: Point3d[]): void;\r\n\r\n /**\r\n * Appends a 2d point string to the builder. The points are drawn disconnected, with a diameter in pixels defined by the builder's active [[GraphicParams.rasterWidth]].\r\n * @param points Array of vertices in the point string.\r\n * @param zDepth Z value in local coordinates to use for each point.\r\n */\r\n public abstract addPointString2d(points: Point2d[], zDepth: number): void;\r\n\r\n /**\r\n * Appends a closed 3d planar region to the builder.\r\n * @param points Array of vertices of the shape.\r\n */\r\n public abstract addShape(points: Point3d[]): void;\r\n\r\n /**\r\n * Appends a closed 2d region to the builder.\r\n * @param points Array of vertices of the shape.\r\n * @param zDepth Z value in local coordinates to use for each point.\r\n */\r\n public abstract addShape2d(points: Point2d[], zDepth: number): void;\r\n\r\n /**\r\n * Appends a 3d open arc or closed ellipse to the builder.\r\n * @param arc Description of the arc or ellipse.\r\n * @param isEllipse If true, and if the arc defines a full sweep, then draw as a closed ellipse instead of an arc.\r\n * @param filled If true, and isEllipse is also true, then draw ellipse filled.\r\n */\r\n public abstract addArc(arc: Arc3d, isEllipse: boolean, filled: boolean): void;\r\n\r\n /**\r\n * Appends a 2d open arc or closed ellipse to the builder.\r\n * @param arc Description of the arc or ellipse.\r\n * @param isEllipse If true, and if the arc defines a full sweep, then draw as a closed ellipse instead of an arc.\r\n * @param filled If true, and isEllipse is also true, then draw ellipse filled.\r\n * @param zDepth Z value in local coordinates to use for each point in the arc or ellipse.\r\n */\r\n public abstract addArc2d(ellipse: Arc3d, isEllipse: boolean, filled: boolean, zDepth: number): void;\r\n\r\n /** Append a 3d open path to the builder. */\r\n public abstract addPath(path: Path): void;\r\n\r\n /** Append a 3d planar region to the builder. */\r\n public abstract addLoop(loop: Loop): void;\r\n\r\n /** Append a [CurvePrimitive]($core-geometry) to the builder. */\r\n public addCurvePrimitive(curve: AnyCurvePrimitive): void {\r\n switch (curve.curvePrimitiveType) {\r\n case \"lineString\":\r\n this.addLineString(curve.points);\r\n break;\r\n case \"lineSegment\":\r\n this.addLineString([curve.startPoint(), curve.endPoint()]);\r\n break;\r\n case \"arc\":\r\n this.addArc(curve, false, false);\r\n break;\r\n default:\r\n const path = new Path();\r\n if (path.tryAddChild(curve))\r\n this.addPath(path);\r\n\r\n break;\r\n }\r\n }\r\n\r\n /** Append a mesh to the builder.\r\n * @param meshData Describes the mesh\r\n * @param filled If the mesh describes a planar region, indicates whether its interior area should be drawn with fill in [[RenderMode.Wireframe]].\r\n */\r\n public abstract addPolyface(meshData: Polyface, filled: boolean): void;\r\n\r\n /** Append a solid primitive to the builder. */\r\n public abstract addSolidPrimitive(solidPrimitive: SolidPrimitive): void;\r\n\r\n /** Append any primitive to the builder.\r\n * @param primitive The graphic primitive to append.\r\n */\r\n public addPrimitive(primitive: GraphicPrimitive): void {\r\n switch (primitive.type) {\r\n case \"linestring\":\r\n this.addLineString(primitive.points);\r\n break;\r\n case \"linestring2d\":\r\n this.addLineString2d(primitive.points, primitive.zDepth);\r\n break;\r\n case \"pointstring\":\r\n this.addPointString(primitive.points);\r\n break;\r\n case \"pointstring2d\":\r\n this.addPointString2d(primitive.points, primitive.zDepth);\r\n break;\r\n case \"shape\":\r\n this.addShape(primitive.points);\r\n break;\r\n case \"shape2d\":\r\n this.addShape2d(primitive.points, primitive.zDepth);\r\n break;\r\n case \"arc\":\r\n this.addArc(primitive.arc, true === primitive.isEllipse, true === primitive.filled);\r\n break;\r\n case \"arc2d\":\r\n this.addArc2d(primitive.arc, true === primitive.isEllipse, true === primitive.filled, primitive.zDepth);\r\n break;\r\n case \"path\":\r\n this.addPath(primitive.path);\r\n break;\r\n case \"loop\":\r\n this.addLoop(primitive.loop);\r\n break;\r\n case \"polyface\":\r\n this.addPolyface(primitive.polyface, true === primitive.filled);\r\n break;\r\n case \"solidPrimitive\":\r\n this.addSolidPrimitive(primitive.solidPrimitive);\r\n break;\r\n }\r\n }\r\n\r\n /** Add a box representing a volume of space. Typically used for debugging purposes.\r\n * @param range The volume of space.\r\n * @param solid If true, a [[Box]] solid primitive will be added; otherwise, a wireframe outline of the box will be added.\r\n */\r\n public addRangeBox(range: Range3d, solid = false): void {\r\n if (!solid) {\r\n this.addFrustum(Frustum.fromRange(range));\r\n return;\r\n }\r\n\r\n const box = Box.createRange(range, true);\r\n if (box)\r\n this.addSolidPrimitive(box);\r\n }\r\n\r\n /** Add Frustum edges. Useful for debugging. */\r\n public addFrustum(frustum: Frustum) {\r\n this.addRangeBoxFromCorners(frustum.points);\r\n }\r\n\r\n /** Add range edges from corner points */\r\n public addRangeBoxFromCorners(p: Point3d[]) {\r\n this.addLineString([\r\n p[Npc.LeftBottomFront],\r\n p[Npc.LeftTopFront],\r\n p[Npc.RightTopFront],\r\n p[Npc.RightBottomFront],\r\n p[Npc.RightBottomRear],\r\n p[Npc.RightTopRear],\r\n p[Npc.LeftTopRear],\r\n p[Npc.LeftBottomRear],\r\n p[Npc.LeftBottomFront].clone(),\r\n p[Npc.RightBottomFront].clone(),\r\n ]);\r\n\r\n this.addLineString([p[Npc.LeftTopFront].clone(), p[Npc.LeftTopRear].clone()]);\r\n this.addLineString([p[Npc.RightTopFront].clone(), p[Npc.RightTopRear].clone()]);\r\n this.addLineString([p[Npc.LeftBottomRear].clone(), p[Npc.RightBottomRear].clone()]);\r\n }\r\n\r\n /** Sets the current active symbology for this builder. Any new geometry subsequently added will be drawn using the specified symbology.\r\n * @param lineColor The color in which to draw lines.\r\n * @param fillColor The color in which to draw filled regions.\r\n * @param lineWidth The width in pixels to draw lines. The renderer will clamp this value to an integer in the range [1, 32].\r\n * @param linePixels The pixel pattern in which to draw lines.\r\n * @see [[GraphicBuilder.activateGraphicParams]] for additional symbology options.\r\n */\r\n public setSymbology(lineColor: ColorDef, fillColor: ColorDef, lineWidth: number, linePixels = LinePixels.Solid) {\r\n this.activateGraphicParams(GraphicParams.fromSymbology(lineColor, fillColor, lineWidth, linePixels));\r\n }\r\n\r\n /** Set the current active symbology for this builder to be a blanking fill before adding a planar region.\r\n * A planar region drawn with blanking fill renders behind other geometry in the same graphic.\r\n * Blanking fill is not affected by the fill [[ViewFlags]] being disabled.\r\n * An example would be to add a line to a graphic containing a shape with blanking fill so that the line is always shown in front of the fill.\r\n * @param fillColor The color in which to draw filled regions.\r\n */\r\n public setBlankingFill(fillColor: ColorDef) { this.activateGraphicParams(GraphicParams.fromBlankingFill(fillColor)); }\r\n}\r\n"]}
1
+ {"version":3,"file":"GraphicBuilder.js","sourceRoot":"","sources":["../../../src/render/GraphicBuilder.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAyD;AACzD,wDAE8B;AAC9B,oDAA8H;AAM9H;;;;;;;;GAQG;AACH,IAAY,WAkDX;AAlDD,WAAY,WAAW;IACrB;;;;;;;OAOG;IACH,iEAAc,CAAA;IACd,qEAAqE;IACrE;;;;;;OAMG;IACH,+CAAK,CAAA;IACL,8GAA8G;IAC9G;;;;;;OAMG;IACH,mEAAe,CAAA;IACf;;;;;;;;;;OAUG;IACH,6DAAY,CAAA;IACZ;;;;;;;;OAQG;IACH,2DAAW,CAAA;AACb,CAAC,EAlDW,WAAW,GAAX,mBAA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CAAC,iBAAG,CAAC,YAAY,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,iBAAG,CAAC,WAAW,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;QAC9E,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,iBAAG,CAAC,aAAa,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,iBAAG,CAAC,YAAY,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;QAChF,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,iBAAG,CAAC,cAAc,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,iBAAG,CAAC,eAAe,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;IACtF,CAAC;IAED;;;;;;OAMG;IACI,YAAY,CAAC,SAAmB,EAAE,SAAmB,EAAE,SAAiB,EAAE,UAAU,GAAG,wBAAU,CAAC,KAAK;QAC5G,IAAI,CAAC,qBAAqB,CAAC,2BAAa,CAAC,aAAa,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC;IACvG,CAAC;IAED;;;;;OAKG;IACI,eAAe,CAAC,SAAmB,IAAI,IAAI,CAAC,qBAAqB,CAAC,2BAAa,CAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;CACvH;AAzVD,wCAyVC","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/** @packageDocumentation\n * @module Rendering\n */\n\nimport { assert, Id64String } from \"@itwin/core-bentley\";\nimport {\n AnyCurvePrimitive, Arc3d, Box, Loop, Path, Point2d, Point3d, Polyface, Range3d, SolidPrimitive, Transform,\n} from \"@itwin/core-geometry\";\nimport { AnalysisStyle, ColorDef, Feature, Frustum, GeometryClass, GraphicParams, LinePixels, Npc } from \"@itwin/core-common\";\nimport { IModelConnection } from \"../IModelConnection\";\nimport { Viewport } from \"../Viewport\";\nimport { RenderGraphic } from \"./RenderGraphic\";\nimport { GraphicPrimitive } from \"./GraphicPrimitive\";\n\n/**\n * Describes the type of a [[GraphicBuilder]], which defines the coordinate system in which the builder's geometry is defined and\n * controls the behavior of the [[RenderGraphic]] produced by the builder.\n * @note For those types for which depth-testing is disabled, the order in which the individual geometric primitives are drawn determines which geometry draws on top of other geometry.\n * - Within a [[GraphicList]], each [[RenderGraphic]] is rendered in the order in which it appears in the list; and\n * - Within a single [[RenderGraphic]], each geometric primitive is rendered in the ordered in which it was added to the GraphicBuilder.\n * @public\n * @extensions\n */\nexport enum GraphicType {\n /**\n * Renders behind all other graphics. For example, the border of a [[SheetViewState]] is of this type.\n * Coordinates: [[CoordSystem.View]].\n * [[RenderMode]]: [[RenderMode.SmoothShade]].\n * Lighting: none.\n * Depth-testing: disabled.\n * @see [[Decorations.viewBackground]]\n */\n ViewBackground,\n /** Used for the scene itself, dynamics, and 'normal' decorations. */\n /**\n * Renders as if it were part of the scene. All of the [[ViewFlags]] applied to the view's normal geometry also applies to these types of decorations.\n * Coordinates: [[CoordSystem.World]].\n * Lighting and [[RenderMode]]: from view.\n * Depth-testing: enabled.\n * @see [[Decorations.normal]].\n */\n Scene,\n /** Renders within the scene. Coordinates: world. RenderMode: smooth. Lighting: default. Z-testing: enabled */\n /** Renders within the scene, but ignores the view's [[ViewFlags]].\n * Coordinates: [[CoordSystem.World]].\n * Lighting: default.\n * [[RenderMode]]: [[RenderMode.SmoothShade]].\n * Depth-testing: enabled.\n * @see [[Decorations.world]].\n */\n WorldDecoration,\n /**\n * Renders as an overlay on top of the scene. These decorations differ from [[GraphicType.WorldDecoration]] only in that depth-testing is disabled.\n * For example, the ACS triad and [[WindowAreaTool]] decorations are of this type.\n * Coordinates: [[CoordSystem.World]].\n * [[RenderMode]]: [[RenderMode.SmoothShade]]\n * Lighting: default.\n * Depth-testing: disabled.\n * Renders atop the scene. Coordinates: world. RenderMode: smooth. Lighting: none. Z-testing: disabled\n * @note Overlay decorations typically employ some degree of transparency to ensure that they do not fully obscure the scene.\n * @see [[Decorations.worldOverlay]]\n */\n WorldOverlay,\n /**\n * Renders as an overlay on top of the scene. These decorations differ from [[GraphicType.WorldOverlay]] only in that their geometry is defined in view coordinates rather than world.\n * Coordinates: [[CoordSystem.View]].\n * [[RenderMode]]: [[RenderMode.SmoothShade]]\n * Lighting: default.\n * Depth-testing: disabled.\n * @note For more flexibility in defining view overlay decorations, consider using a [[CanvasDecorationList]].\n * @see [[Decorations.viewOverlay]]\n */\n ViewOverlay,\n}\n\n/** Options used when constructing a `Batch` - that is, a [[RenderGraphic]] with an associated [FeatureTable]($common) describing individual [Feature]($common)s within the\n * graphic. Individual features can be resymbolized in a variety of ways including flashing and hiliting.\n * For example, to prevent graphics produced by [[readElementGraphics]] from being hilited when their corresponding element is in the [[SelectionSet]],\n * pass `{ noHilite: true }` to [[readElementGraphics]].\n * @public\n * @extensions\n */\nexport interface BatchOptions {\n /** Identifies the [[Tile]] associated with the batch, chiefly for debugging purposes.\n * @beta\n */\n tileId?: string;\n /** If true, features within the batch will not be flashed on mouseover. */\n noFlash?: boolean;\n /** If true, features within the batch will not be hilited when their corresponding element is in the [[SelectionSet]]. */\n noHilite?: boolean;\n /** If true, features within the batch will not be emphasized when the corresponding [[Feature]] is emphasized using [FeatureOverrides]($common). */\n noEmphasis?: boolean;\n /** If true, the contents of the batch will only be drawn by [[Viewport.readPixels]], not [[Viewport.renderFrame]], causing them to be locatable but invisible. */\n locateOnly?: boolean;\n}\n\n/** Options used as part of [[GraphicBuilderOptions]] to describe a [pickable]($docs/learning/frontend/ViewDecorations#pickable-view-graphic-decorations) [[RenderGraphic]].\n * @public\n * @extensions\n */\nexport interface PickableGraphicOptions extends BatchOptions {\n /** A unique identifier for the graphic.\n * @see [[IModelConnection.transientIds]] to obtain a unique Id in the context of an iModel.\n * @see [[GraphicBuilder.activatePickableId]] or [[GraphicBuilder.activateFeature]] to change the pickable object while adding geometry.\n */\n id: Id64String;\n /** Optional Id of the subcategory with which the graphic should be associated. */\n subCategoryId?: Id64String;\n /** Optional geometry class for the graphic - defaults to [GeometryClass.Primary]($common). */\n geometryClass?: GeometryClass;\n /** The optional Id of the model with which the graphic should be associated. */\n modelId?: Id64String;\n}\n\n/** Options for creating a [[GraphicBuilder]] used by functions like [[DecorateContext.createGraphic]] and [[RenderSystem.createGraphic]].\n * @see [[ViewportGraphicBuilderOptions]] to create a graphic builder for a [[Viewport]].\n * @see [[CustomGraphicBuilderOptions]] to create a graphic builder unassociated with any [[Viewport]].\n * @public\n * @extensions\n */\nexport interface GraphicBuilderOptions {\n /** The type of graphic to produce. */\n type: GraphicType;\n\n /** The local-to-world transform in which the builder's geometry is to be defined - by default, an identity transform. */\n placement?: Transform;\n\n /** If the graphic is to be pickable, specifies the pickable Id and other options. */\n pickable?: PickableGraphicOptions;\n\n /** If true, the order in which geometry is added to the builder is preserved.\n * This is useful for overlay and background graphics because they draw without using the depth buffer. For example, to draw an overlay containing a red shape with a white outline,\n * you would add the shape to the GraphicBuilder first, followed by the outline, to ensure the outline draws \"in front of\" the shape.\n * It defaults to true for overlays and background graphics, and false for other graphic types.\n * It is not useful for other types of graphics and imposes a performance penalty due to increased number of draw calls.\n * For overlay and background graphics that do not need to draw in any particular order, the performance penalty can be eliminated by setting this to `false`.\n */\n preserveOrder?: boolean;\n\n /** Controls whether normals are generated for surfaces. Normals allow 3d geometry to receive lighting; without them the geometry will be unaffected by lighting.\n * By default, normals are generated only for graphics of type [[GraphicType.Scene]]; or for any type of graphic if [[GraphicBuilder.wantEdges]] is true, because\n * normals are required to prevent z-fighting between surfaces and their edges. This default can be overridden by explicitly specifying `true` or `false`.\n * @see [[GraphicType]] for a description of whether and how different types of graphics are affected by lighting.\n */\n wantNormals?: boolean;\n\n /** Controls whether edges are generated for surfaces.\n * Edges are only displayed if [ViewFlags.renderMode]($common) is not [RenderMode.SmoothShade]($common) or [ViewFlags.visibleEdges]($common) is `true`.\n * Since all decoration graphics except [[GraphicType.Scene]] are drawn in smooth shaded mode with no visible edges, by default edges are only produced for scene graphics, and\n * - if a [[Viewport]] is supplied with the options - only if [ViewFlags.edgesRequired]($common) is true for the viewport.\n * That default can be overridden by explicitly specifying `true` or `false`. This can be useful for non-scene decorations contained in a [[GraphicBranch]] that applies [ViewFlagOverrides]($common)\n * that change the edge display settings; or for scene decorations that might be cached for reuse after the viewport's edge settings are changed.\n * @note Edges will tend to z-fight with their surfaces unless the graphic is [[pickable]].\n */\n generateEdges?: boolean;\n\n /** If defined, specifies a point about which the graphic will rotate such that it always faces the viewer.\n * This can be particular useful for planar regions to create a billboarding effect - e.g., to implement [[Marker]]-like WebGL decorations.\n * The graphic's [[placement]] transform is not applied to the point.\n * @note This has no effect for graphics displayed in a 2d view.\n */\n viewIndependentOrigin?: Point3d;\n}\n\n/** Options for creating a [[GraphicBuilder]] to produce a [[RenderGraphic]] to be displayed in a specific [[Viewport]].\n * The level of detail of the graphic will be computed from the position of its geometry within the viewport's [Frustum]($common).\n * Default values for [[GraphicBuilderOptions.wantNormals]] and [[GraphicBuilderOptions.generateEdges]] will be determined by the viewport's [ViewFlags]($common).\n * The [[GraphicBuilder.iModel]] will be set to the viewport's [[IModelConnection]].\n * @public\n * @extensions\n */\nexport interface ViewportGraphicBuilderOptions extends GraphicBuilderOptions {\n /** The viewport in which the resultant [[RenderGraphic]] is to be drawn. */\n viewport: Viewport;\n\n /** If true, [[ViewState.getAspectRatioSkew]] will be taken into account when computing the level of detail for the produced graphics. */\n applyAspectRatioSkew?: boolean;\n\n iModel?: never;\n computeChordTolerance?: never;\n}\n\n/** Arguments used to compute the chord tolerance (level of detail) of the [[RenderGraphic]]s produced by a [[GraphicBuilder]].\n * Generally, the chord tolerance should be roughly equivalent to the size in meters of one pixel on screen where the graphic is to be displayed.\n * For [[GraphicType.ViewOverlay]] and [[GraphicType.ViewBackground]], which already define their geometry in pixels, the chord tolerance should typically be 1.\n * @see [[CustomGraphicBuilderOptions.computeChordTolerance]].\n * @public\n * @extensions\n */\nexport interface ComputeChordToleranceArgs {\n /** The graphic builder being used to produce the graphics. */\n readonly graphic: GraphicBuilder;\n /** A function that computes a range enclosing all of the geometry that was added to the builder. */\n readonly computeRange: () => Range3d;\n}\n\n/** Options for creating a [[GraphicBuilder]] to produce a [[RenderGraphic]] that is not associated with any particular [[Viewport]] and may not be associated with\n * any particular [[IModelConnection]].\n * This is primarily useful when the same graphic is to be saved and reused for display in multiple viewports and for which a chord tolerance can be computed\n * independently of each viewport's [Frustum]($common).\n * @public\n * @extensions\n */\nexport interface CustomGraphicBuilderOptions extends GraphicBuilderOptions {\n /** Optionally, the IModelConnection with which the graphic is associated. */\n iModel?: IModelConnection;\n /** A function that can compute the level of detail for the graphics produced by the builder. */\n computeChordTolerance: (args: ComputeChordToleranceArgs) => number;\n\n applyAspectRatioSkew?: never;\n viewport?: never;\n}\n\n/** Provides methods for constructing a [[RenderGraphic]] from geometric primitives.\n * GraphicBuilder is primarily used for creating [[Decorations]] to be displayed inside a [[Viewport]].\n *\n * The typical process for constructing a [[RenderGraphic]] proceeds as follows:\n * 1. Use [[DecorateContext.createGraphic]] or [[RenderSystem.createGraphic]] to obtain a builder.\n * 2. Set up the symbology using [[GraphicBuilder.activateGraphicParams]] or [[GraphicBuilder.setSymbology]].\n * 3. Add one or more geometric primitives using methods like [[GraphicBuilder.addShape]] and [[GraphicBuilder.addLineString]], possibly setting new symbology in between.\n * 4. Use [[GraphicBuilder.finish]] to produce the finished [[RenderGraphic]].\n *\n * @note Most of the methods which add geometry to the builder take ownership of their inputs rather than cloning them.\n * So, for example, if you pass an array of points to addLineString(), you should not subsequently modify that array.\n *\n * @public\n * @extensions\n */\nexport abstract class GraphicBuilder {\n /** The local coordinate system transform applied to this builder's geometry.\n * @see [[GraphicBuilderOptions.placement]].\n */\n public readonly placement: Transform;\n\n /** The iModel associated with this builder, if any. */\n public readonly iModel?: IModelConnection;\n\n /** The type of graphic to be produced by this builder.\n * @see [[GraphicBuilderOptions.type]].\n */\n public readonly type: GraphicType;\n\n /** If the graphic is to be pickable, specifies the pickable Id and other options. */\n public readonly pickable?: Readonly<PickableGraphicOptions>;\n\n /** If true, the order in which geometry is added to the builder is preserved.\n * @see [[GraphicBuilderOptions.preserveOrder]] for more details.\n */\n public readonly preserveOrder: boolean;\n\n /** Controls whether normals are generated for surfaces.\n * @note Normals are required for proper edge display, so by default they are always produced if [[wantEdges]] is `true`.\n * @see [[GraphicBuilderOptions.wantNormals]] for more details.\n */\n public readonly wantNormals: boolean;\n\n /** Controls whether edges are generated for surfaces.\n * @see [[GraphicBuilderOptions.generateEdges]] for more details.\n */\n public readonly wantEdges: boolean;\n\n /** @alpha */\n public readonly analysisStyle?: AnalysisStyle;\n\n protected readonly _computeChordTolerance: (args: ComputeChordToleranceArgs) => number;\n protected readonly _options: CustomGraphicBuilderOptions | ViewportGraphicBuilderOptions;\n\n /** @internal */\n protected constructor(options: ViewportGraphicBuilderOptions | CustomGraphicBuilderOptions) {\n // Stored for potential use later in creating a new GraphicBuilder from this one (see PrimitiveBuilder.finishGraphic).\n this._options = options;\n\n const vp = options.viewport;\n this.placement = options.placement ?? Transform.createIdentity();\n this.iModel = vp?.iModel ?? options.iModel;\n this.type = options.type;\n this.pickable = options.pickable;\n this.wantEdges = options.generateEdges ?? (this.type === GraphicType.Scene && (!vp || vp.viewFlags.edgesRequired()));\n this.wantNormals = options.wantNormals ?? (this.wantEdges || this.type === GraphicType.Scene);\n this.preserveOrder = options.preserveOrder ?? (this.isOverlay || this.isViewBackground);\n\n if (!options.viewport) {\n this._computeChordTolerance = options.computeChordTolerance;\n return;\n }\n\n this.analysisStyle = options.viewport.displayStyle.settings.analysisStyle;\n\n this._computeChordTolerance = (args: ComputeChordToleranceArgs) => {\n let pixelSize = 1;\n if (!this.isViewCoordinates) {\n // Compute the horizontal distance in meters between two adjacent pixels at the center of the geometry.\n pixelSize = options.viewport.getPixelSizeAtPoint(args.computeRange().center);\n pixelSize = options.viewport.target.adjustPixelSizeForLOD(pixelSize);\n\n // Aspect ratio skew > 1.0 stretches the view in Y. In that case use the smaller vertical pixel distance for our stroke tolerance.\n const skew = options.applyAspectRatioSkew ? options.viewport.view.getAspectRatioSkew() : 0;\n if (skew > 1)\n pixelSize /= skew;\n }\n\n return pixelSize * 0.25;\n };\n }\n\n /** The Id to be associated with the graphic for picking.\n * @see [[GraphicBuilderOptions.pickable]] for more options.\n * @deprecated in 3.x. This provides only the **first** pickable Id for this graphic - you should keep track of the **current** pickable Id yourself.\n */\n public get pickId(): Id64String | undefined {\n return this.pickable?.id;\n }\n\n /** Whether the builder's geometry is defined in [[CoordSystem.View]] coordinates.\n * @see [[isWorldCoordinates]].\n */\n public get isViewCoordinates(): boolean {\n return this.type === GraphicType.ViewBackground || this.type === GraphicType.ViewOverlay;\n }\n\n /** Whether the builder's geometry is defined in [[CoordSystem.World]] coordinates.\n * @see [[isViewCoordinates]].\n */\n public get isWorldCoordinates(): boolean {\n return !this.isViewCoordinates;\n }\n\n /** True if the builder produces a graphic of [[GraphicType.Scene]]. */\n public get isSceneGraphic(): boolean {\n return this.type === GraphicType.Scene;\n }\n\n /** True if the builder produces a graphic of [[GraphicType.ViewBackground]]. */\n public get isViewBackground(): boolean {\n return this.type === GraphicType.ViewBackground;\n }\n\n /** True if the builder produces a graphic of [[GraphicType.WorldOverlay]] or [[GraphicType.ViewOerlay]]. */\n public get isOverlay(): boolean {\n return this.type === GraphicType.ViewOverlay || this.type === GraphicType.WorldOverlay;\n }\n\n /**\n * Processes the accumulated symbology and geometry to produce a renderable graphic.\n * This function can only be called once; after the [[RenderGraphic]] has been extracted the [[GraphicBuilder]] should no longer be used.\n */\n public abstract finish(): RenderGraphic;\n\n /** Sets the current active symbology for this builder. Any new geometry subsequently added to the builder will be drawn using the specified symbology.\n * @param graphicParams The symbology to apply to subsequent geometry.\n * @see [[GraphicBuilder.setSymbology]] for a convenient way to set common symbology options.\n */\n public abstract activateGraphicParams(graphicParams: GraphicParams): void;\n\n /** Called by [[activateFeature]] after validation to change the [Feature]($common) to be associated with subsequently-added geometry.\n * This default implementation does nothing.\n */\n protected _activateFeature(_feature: Feature): void { }\n\n /** Change the [Feature]($common) to be associated with subsequently-added geometry. This permits multiple features to be batched together into a single graphic\n * for more efficient rendering.\n * @note This method has no effect if [[GraphicBuilderOptions.pickable]] was not supplied to the GraphicBuilder's constructor.\n */\n public activateFeature(feature: Feature): void {\n assert(undefined !== this._options.pickable, \"GraphicBuilder.activateFeature has no effect if PickableGraphicOptions were not supplied\");\n if (this._options.pickable)\n this._activateFeature(feature);\n }\n\n /** Change the pickable Id to be associated with subsequently-added geometry. This permits multiple pickable objects to be batched together into a single graphic\n * for more efficient rendering. This method calls [[activateFeature]], using the subcategory Id and [GeometryClass]($common) specified in [[GraphicBuilder.pickable]]\n * at construction, if any.\n * @note This method has no effect if [[GraphicBuilderOptions.pickable]] was not supplied to the GraphicBuilder's constructor.\n */\n public activatePickableId(id: Id64String): void {\n const pick = this._options.pickable;\n this.activateFeature(new Feature(id, pick?.subCategoryId, pick?.geometryClass));\n }\n\n /**\n * Appends a 3d line string to the builder.\n * @param points Array of vertices in the line string.\n */\n public abstract addLineString(points: Point3d[]): void;\n\n /**\n * Appends a 2d line string to the builder.\n * @param points Array of vertices in the line string.\n * @param zDepth Z value in local coordinates to use for each point.\n */\n public abstract addLineString2d(points: Point2d[], zDepth: number): void;\n\n /**\n * Appends a 3d point string to the builder. The points are drawn disconnected, with a diameter in pixels defined by the builder's active [[GraphicParams.rasterWidth]].\n * @param points Array of vertices in the point string.\n */\n public abstract addPointString(points: Point3d[]): void;\n\n /**\n * Appends a 2d point string to the builder. The points are drawn disconnected, with a diameter in pixels defined by the builder's active [[GraphicParams.rasterWidth]].\n * @param points Array of vertices in the point string.\n * @param zDepth Z value in local coordinates to use for each point.\n */\n public abstract addPointString2d(points: Point2d[], zDepth: number): void;\n\n /**\n * Appends a closed 3d planar region to the builder.\n * @param points Array of vertices of the shape.\n */\n public abstract addShape(points: Point3d[]): void;\n\n /**\n * Appends a closed 2d region to the builder.\n * @param points Array of vertices of the shape.\n * @param zDepth Z value in local coordinates to use for each point.\n */\n public abstract addShape2d(points: Point2d[], zDepth: number): void;\n\n /**\n * Appends a 3d open arc or closed ellipse to the builder.\n * @param arc Description of the arc or ellipse.\n * @param isEllipse If true, and if the arc defines a full sweep, then draw as a closed ellipse instead of an arc.\n * @param filled If true, and isEllipse is also true, then draw ellipse filled.\n */\n public abstract addArc(arc: Arc3d, isEllipse: boolean, filled: boolean): void;\n\n /**\n * Appends a 2d open arc or closed ellipse to the builder.\n * @param arc Description of the arc or ellipse.\n * @param isEllipse If true, and if the arc defines a full sweep, then draw as a closed ellipse instead of an arc.\n * @param filled If true, and isEllipse is also true, then draw ellipse filled.\n * @param zDepth Z value in local coordinates to use for each point in the arc or ellipse.\n */\n public abstract addArc2d(ellipse: Arc3d, isEllipse: boolean, filled: boolean, zDepth: number): void;\n\n /** Append a 3d open path to the builder. */\n public abstract addPath(path: Path): void;\n\n /** Append a 3d planar region to the builder. */\n public abstract addLoop(loop: Loop): void;\n\n /** Append a [CurvePrimitive]($core-geometry) to the builder. */\n public addCurvePrimitive(curve: AnyCurvePrimitive): void {\n switch (curve.curvePrimitiveType) {\n case \"lineString\":\n this.addLineString(curve.points);\n break;\n case \"lineSegment\":\n this.addLineString([curve.startPoint(), curve.endPoint()]);\n break;\n case \"arc\":\n this.addArc(curve, false, false);\n break;\n default:\n const path = new Path();\n if (path.tryAddChild(curve))\n this.addPath(path);\n\n break;\n }\n }\n\n /** Append a mesh to the builder.\n * @param meshData Describes the mesh\n * @param filled If the mesh describes a planar region, indicates whether its interior area should be drawn with fill in [[RenderMode.Wireframe]].\n */\n public abstract addPolyface(meshData: Polyface, filled: boolean): void;\n\n /** Append a solid primitive to the builder. */\n public abstract addSolidPrimitive(solidPrimitive: SolidPrimitive): void;\n\n /** Append any primitive to the builder.\n * @param primitive The graphic primitive to append.\n */\n public addPrimitive(primitive: GraphicPrimitive): void {\n switch (primitive.type) {\n case \"linestring\":\n this.addLineString(primitive.points);\n break;\n case \"linestring2d\":\n this.addLineString2d(primitive.points, primitive.zDepth);\n break;\n case \"pointstring\":\n this.addPointString(primitive.points);\n break;\n case \"pointstring2d\":\n this.addPointString2d(primitive.points, primitive.zDepth);\n break;\n case \"shape\":\n this.addShape(primitive.points);\n break;\n case \"shape2d\":\n this.addShape2d(primitive.points, primitive.zDepth);\n break;\n case \"arc\":\n this.addArc(primitive.arc, true === primitive.isEllipse, true === primitive.filled);\n break;\n case \"arc2d\":\n this.addArc2d(primitive.arc, true === primitive.isEllipse, true === primitive.filled, primitive.zDepth);\n break;\n case \"path\":\n this.addPath(primitive.path);\n break;\n case \"loop\":\n this.addLoop(primitive.loop);\n break;\n case \"polyface\":\n this.addPolyface(primitive.polyface, true === primitive.filled);\n break;\n case \"solidPrimitive\":\n this.addSolidPrimitive(primitive.solidPrimitive);\n break;\n }\n }\n\n /** Add a box representing a volume of space. Typically used for debugging purposes.\n * @param range The volume of space.\n * @param solid If true, a [[Box]] solid primitive will be added; otherwise, a wireframe outline of the box will be added.\n */\n public addRangeBox(range: Range3d, solid = false): void {\n if (!solid) {\n this.addFrustum(Frustum.fromRange(range));\n return;\n }\n\n const box = Box.createRange(range, true);\n if (box)\n this.addSolidPrimitive(box);\n }\n\n /** Add Frustum edges. Useful for debugging. */\n public addFrustum(frustum: Frustum) {\n this.addRangeBoxFromCorners(frustum.points);\n }\n\n /** Add range edges from corner points */\n public addRangeBoxFromCorners(p: Point3d[]) {\n this.addLineString([\n p[Npc.LeftBottomFront],\n p[Npc.LeftTopFront],\n p[Npc.RightTopFront],\n p[Npc.RightBottomFront],\n p[Npc.RightBottomRear],\n p[Npc.RightTopRear],\n p[Npc.LeftTopRear],\n p[Npc.LeftBottomRear],\n p[Npc.LeftBottomFront].clone(),\n p[Npc.RightBottomFront].clone(),\n ]);\n\n this.addLineString([p[Npc.LeftTopFront].clone(), p[Npc.LeftTopRear].clone()]);\n this.addLineString([p[Npc.RightTopFront].clone(), p[Npc.RightTopRear].clone()]);\n this.addLineString([p[Npc.LeftBottomRear].clone(), p[Npc.RightBottomRear].clone()]);\n }\n\n /** Sets the current active symbology for this builder. Any new geometry subsequently added will be drawn using the specified symbology.\n * @param lineColor The color in which to draw lines.\n * @param fillColor The color in which to draw filled regions.\n * @param lineWidth The width in pixels to draw lines. The renderer will clamp this value to an integer in the range [1, 32].\n * @param linePixels The pixel pattern in which to draw lines.\n * @see [[GraphicBuilder.activateGraphicParams]] for additional symbology options.\n */\n public setSymbology(lineColor: ColorDef, fillColor: ColorDef, lineWidth: number, linePixels = LinePixels.Solid) {\n this.activateGraphicParams(GraphicParams.fromSymbology(lineColor, fillColor, lineWidth, linePixels));\n }\n\n /** Set the current active symbology for this builder to be a blanking fill before adding a planar region.\n * A planar region drawn with blanking fill renders behind other geometry in the same graphic.\n * Blanking fill is not affected by the fill [[ViewFlags]] being disabled.\n * An example would be to add a line to a graphic containing a shape with blanking fill so that the line is always shown in front of the fill.\n * @param fillColor The color in which to draw filled regions.\n */\n public setBlankingFill(fillColor: ColorDef) { this.activateGraphicParams(GraphicParams.fromBlankingFill(fillColor)); }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"GraphicPrimitive.js","sourceRoot":"","sources":["../../../src/render/GraphicPrimitive.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Rendering\r\n */\r\n\r\nimport { Arc3d, Loop, Path, Point2d, Point3d, Polyface, SolidPrimitive } from \"@itwin/core-geometry\";\r\n\r\n/** Base interface for a 2d [[GraphicPrimitive]] that can be supplied to [[GraphicBuilder.addPrimitive]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface GraphicPrimitive2d {\r\n /** Z value in local coordinates to use for each point. */\r\n zDepth: number;\r\n}\r\n\r\n/** A [[GraphicPrimitive]] representing a line string that can be supplied to [[GraphicBuilder.addPrimitive]].\r\n * @see [[GraphicBuilder.addLineString]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface GraphicLineString {\r\n type: \"linestring\";\r\n points: Point3d[];\r\n}\r\n\r\n/** A [[GraphicPrimitive]] representing a 2d line string that can be supplied to [[GraphicBuilder.addPrimitive]].\r\n * @see [[GraphicBuilder.addLineString2d]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface GraphicLineString2d extends GraphicPrimitive2d {\r\n type: \"linestring2d\";\r\n points: Point2d[];\r\n}\r\n\r\n/** A [[GraphicPrimitive]] representing a point string that can be supplied to [[GraphicBuilder.addPrimitive]].\r\n * @see [[GraphicBuilder.addPointString]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface GraphicPointString {\r\n type: \"pointstring\";\r\n points: Point3d[];\r\n}\r\n\r\n/** A [[GraphicPrimitive]] representing a 2d point string that can be supplied to [[GraphicBuilder.addPrimitive]].\r\n * @see [[GraphicBuilder.addPointString2d]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface GraphicPointString2d extends GraphicPrimitive2d {\r\n type: \"pointstring2d\";\r\n points: Point2d[];\r\n}\r\n\r\n/** A [[GraphicPrimitive]] representing a closed 3d planar region that can be supplied to [[GraphicBuilder.addPrimitive]].\r\n * @see [[GraphicBuilder.addShape]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface GraphicShape {\r\n type: \"shape\";\r\n points: Point3d[];\r\n}\r\n\r\n/** A [[GraphicPrimitive]] representing a closed 2d region that can be supplied to [[GraphicBuilder.addPrimitive]].\r\n * @see [[GraphicBuilder.addShape2d]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface GraphicShape2d extends GraphicPrimitive2d {\r\n type: \"shape2d\";\r\n points: Point2d[];\r\n}\r\n\r\n/** A [[GraphicPrimitive]] representing a 3d open arc or closed ellipse that can be supplied to [[GraphicBuilder.addPrimitive]].\r\n * @see [[GraphicBuilder.addArc]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface GraphicArc {\r\n type: \"arc\";\r\n arc: Arc3d;\r\n isEllipse?: boolean;\r\n filled?: boolean;\r\n}\r\n\r\n/** A [[GraphicPrimitive]] representing a 2d open arc or closed ellipse that can be supplied to [[GraphicBuilder.addPrimitive]].\r\n * @see [[GraphicBuilder.addArc2d]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface GraphicArc2d {\r\n type: \"arc2d\";\r\n arc: Arc3d;\r\n isEllipse?: boolean;\r\n filled?: boolean;\r\n zDepth: number;\r\n}\r\n\r\n/** A [[GraphicPrimitive]] representing a 3d open path that can be supplied to [[GraphicBuilder.addPrimitive]].\r\n * @see [[GraphicBuilder.addPath]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface GraphicPath {\r\n type: \"path\";\r\n path: Path;\r\n}\r\n\r\n/** A [[GraphicPrimitive]] representing a 3d planar region that can be supplied to [[GraphicBuilder.addPrimitive]].\r\n * @see [[GraphicBuilder.addLoop]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface GraphicLoop {\r\n type: \"loop\";\r\n loop: Loop;\r\n}\r\n\r\n/** A [[GraphicPrimitive]] representing a mesh that can be supplied to [[GraphicBuilder.addPrimitive]].\r\n * @see [[GraphicBuilder.addPolyface]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface GraphicPolyface {\r\n type: \"polyface\";\r\n polyface: Polyface;\r\n filled?: boolean;\r\n}\r\n\r\n/** A [[GraphicPrimitive]] representing a [SolidPrimitive]($core-geometry) to be supplied to [[GraphicBuilder.addPrimitive]].\r\n * @see [[GraphicBuilder.addSolidPrimitive]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface GraphicSolidPrimitive {\r\n type: \"solidPrimitive\";\r\n solidPrimitive: SolidPrimitive;\r\n}\r\n\r\n/** Union type representing a graphic primitive that can be supplied to [[GraphicBuilder.addPrimitive]].\r\n * Each primitive type corresponds to one of GraphicBuilder's `addXXX` methods. This is useful when the precise type of\r\n * geometry is not known at the point at which it is added to the builder. As a simple example:\r\n * ```ts\r\n * function getPrimitives(): GraphicPrimitive[] {\r\n * const primitives: GraphicPrimitive[] = [{ type: \"polyface\", polyface: getPolyface(), filled: true }];\r\n * if (someCondition())\r\n * primitives.push({ type: \"linestring\", points: getPoints() });\r\n * else\r\n * primitives.push({ type: \"arc\", arc: getArc(), isEllipse: true });\r\n *\r\n * return primitives;\r\n * }\r\n *\r\n * function addGraphics(builder: GraphicBuilder) {\r\n * for (const primitive of getPrimitives())\r\n * builder.addPrimitive(primitive);\r\n * }\r\n * ```\r\n * @public\r\n * @extensions\r\n */\r\nexport type GraphicPrimitive = GraphicLineString | GraphicLineString2d | GraphicPointString | GraphicPointString2d | GraphicShape | GraphicShape2d | GraphicArc | GraphicArc2d | GraphicPath | GraphicLoop | GraphicPolyface | GraphicSolidPrimitive;\r\n"]}
1
+ {"version":3,"file":"GraphicPrimitive.js","sourceRoot":"","sources":["../../../src/render/GraphicPrimitive.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG","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/** @packageDocumentation\n * @module Rendering\n */\n\nimport { Arc3d, Loop, Path, Point2d, Point3d, Polyface, SolidPrimitive } from \"@itwin/core-geometry\";\n\n/** Base interface for a 2d [[GraphicPrimitive]] that can be supplied to [[GraphicBuilder.addPrimitive]].\n * @public\n * @extensions\n */\nexport interface GraphicPrimitive2d {\n /** Z value in local coordinates to use for each point. */\n zDepth: number;\n}\n\n/** A [[GraphicPrimitive]] representing a line string that can be supplied to [[GraphicBuilder.addPrimitive]].\n * @see [[GraphicBuilder.addLineString]].\n * @public\n * @extensions\n */\nexport interface GraphicLineString {\n type: \"linestring\";\n points: Point3d[];\n}\n\n/** A [[GraphicPrimitive]] representing a 2d line string that can be supplied to [[GraphicBuilder.addPrimitive]].\n * @see [[GraphicBuilder.addLineString2d]].\n * @public\n * @extensions\n */\nexport interface GraphicLineString2d extends GraphicPrimitive2d {\n type: \"linestring2d\";\n points: Point2d[];\n}\n\n/** A [[GraphicPrimitive]] representing a point string that can be supplied to [[GraphicBuilder.addPrimitive]].\n * @see [[GraphicBuilder.addPointString]].\n * @public\n * @extensions\n */\nexport interface GraphicPointString {\n type: \"pointstring\";\n points: Point3d[];\n}\n\n/** A [[GraphicPrimitive]] representing a 2d point string that can be supplied to [[GraphicBuilder.addPrimitive]].\n * @see [[GraphicBuilder.addPointString2d]].\n * @public\n * @extensions\n */\nexport interface GraphicPointString2d extends GraphicPrimitive2d {\n type: \"pointstring2d\";\n points: Point2d[];\n}\n\n/** A [[GraphicPrimitive]] representing a closed 3d planar region that can be supplied to [[GraphicBuilder.addPrimitive]].\n * @see [[GraphicBuilder.addShape]].\n * @public\n * @extensions\n */\nexport interface GraphicShape {\n type: \"shape\";\n points: Point3d[];\n}\n\n/** A [[GraphicPrimitive]] representing a closed 2d region that can be supplied to [[GraphicBuilder.addPrimitive]].\n * @see [[GraphicBuilder.addShape2d]].\n * @public\n * @extensions\n */\nexport interface GraphicShape2d extends GraphicPrimitive2d {\n type: \"shape2d\";\n points: Point2d[];\n}\n\n/** A [[GraphicPrimitive]] representing a 3d open arc or closed ellipse that can be supplied to [[GraphicBuilder.addPrimitive]].\n * @see [[GraphicBuilder.addArc]].\n * @public\n * @extensions\n */\nexport interface GraphicArc {\n type: \"arc\";\n arc: Arc3d;\n isEllipse?: boolean;\n filled?: boolean;\n}\n\n/** A [[GraphicPrimitive]] representing a 2d open arc or closed ellipse that can be supplied to [[GraphicBuilder.addPrimitive]].\n * @see [[GraphicBuilder.addArc2d]].\n * @public\n * @extensions\n */\nexport interface GraphicArc2d {\n type: \"arc2d\";\n arc: Arc3d;\n isEllipse?: boolean;\n filled?: boolean;\n zDepth: number;\n}\n\n/** A [[GraphicPrimitive]] representing a 3d open path that can be supplied to [[GraphicBuilder.addPrimitive]].\n * @see [[GraphicBuilder.addPath]].\n * @public\n * @extensions\n */\nexport interface GraphicPath {\n type: \"path\";\n path: Path;\n}\n\n/** A [[GraphicPrimitive]] representing a 3d planar region that can be supplied to [[GraphicBuilder.addPrimitive]].\n * @see [[GraphicBuilder.addLoop]].\n * @public\n * @extensions\n */\nexport interface GraphicLoop {\n type: \"loop\";\n loop: Loop;\n}\n\n/** A [[GraphicPrimitive]] representing a mesh that can be supplied to [[GraphicBuilder.addPrimitive]].\n * @see [[GraphicBuilder.addPolyface]].\n * @public\n * @extensions\n */\nexport interface GraphicPolyface {\n type: \"polyface\";\n polyface: Polyface;\n filled?: boolean;\n}\n\n/** A [[GraphicPrimitive]] representing a [SolidPrimitive]($core-geometry) to be supplied to [[GraphicBuilder.addPrimitive]].\n * @see [[GraphicBuilder.addSolidPrimitive]].\n * @public\n * @extensions\n */\nexport interface GraphicSolidPrimitive {\n type: \"solidPrimitive\";\n solidPrimitive: SolidPrimitive;\n}\n\n/** Union type representing a graphic primitive that can be supplied to [[GraphicBuilder.addPrimitive]].\n * Each primitive type corresponds to one of GraphicBuilder's `addXXX` methods. This is useful when the precise type of\n * geometry is not known at the point at which it is added to the builder. As a simple example:\n * ```ts\n * function getPrimitives(): GraphicPrimitive[] {\n * const primitives: GraphicPrimitive[] = [{ type: \"polyface\", polyface: getPolyface(), filled: true }];\n * if (someCondition())\n * primitives.push({ type: \"linestring\", points: getPoints() });\n * else\n * primitives.push({ type: \"arc\", arc: getArc(), isEllipse: true });\n *\n * return primitives;\n * }\n *\n * function addGraphics(builder: GraphicBuilder) {\n * for (const primitive of getPrimitives())\n * builder.addPrimitive(primitive);\n * }\n * ```\n * @public\n * @extensions\n */\nexport type GraphicPrimitive = GraphicLineString | GraphicLineString2d | GraphicPointString | GraphicPointString2d | GraphicShape | GraphicShape2d | GraphicArc | GraphicArc2d | GraphicPath | GraphicLoop | GraphicPolyface | GraphicSolidPrimitive;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"InstancedGraphicParams.js","sourceRoot":"","sources":["../../../src/render/InstancedGraphicParams.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Rendering\r\n */\r\n\r\nimport {\r\n Point2d, Point3d, Range3d, Transform,\r\n} from \"@itwin/core-geometry\";\r\n\r\n/** Parameters for creating a [[RenderGraphic]] representing a collection of instances of shared geometry.\r\n * Each instance is drawn using the same graphics, but with its own transform and (optionally) [[Feature]] Id.\r\n * @internal\r\n */\r\nexport interface InstancedGraphicParams {\r\n /** The number of instances.\r\n * Must be greater than zero.\r\n * Must be equal to (transforms.length / 12)\r\n * If featureIds is defined, must be equal to (featureIds.length / 3)\r\n * If symbologyOverrides is defined, must be equal to (symbologyOverrides.length / 8)\r\n */\r\n readonly count: number;\r\n\r\n /** An array of instance-to-model transforms.\r\n * Each transform consists of 3 rows of 4 columns where the 4th column holds the translation.\r\n * The translations are relative to the `transformCenter` property.\r\n */\r\n readonly transforms: Float32Array;\r\n\r\n /** A point roughly in the center of the range of all of the instances, to which each instance's translation is relative.\r\n * This is used to reduce precision errors when transforming the instances in shader code.\r\n */\r\n readonly transformCenter: Point3d;\r\n\r\n /** If defined, an array of little-endian 24-bit unsigned integers containing the feature ID of each instance. */\r\n readonly featureIds?: Uint8Array;\r\n\r\n /** If defined, as array of bytes (8 per instance) encoding the symbology overrides for each instance.\r\n * The encoding matches that used by FeatureOverrides, though only the RGB, alpha, line weight, and line code are used.\r\n */\r\n readonly symbologyOverrides?: Uint8Array;\r\n\r\n /** If defined, the combined range of all instances of the geometry.\r\n */\r\n readonly range?: Range3d;\r\n}\r\n\r\n/** Parameters for creating a [[RenderGraphic]] representing a patterned area.\r\n * A patterned area is a planar region filled with a pattern symbol repeated in\r\n * a regular grid and clipped by the region's boundary.\r\n * @internal\r\n */\r\nexport interface PatternGraphicParams {\r\n readonly xyOffsets: Float32Array;\r\n readonly featureId?: number;\r\n readonly orgTransform: Transform;\r\n readonly scale: number;\r\n readonly spacing: Point2d;\r\n readonly origin: Point2d;\r\n /** Usually, to tile tree coordinates. */\r\n readonly patternToModel: Transform;\r\n /** Range of pattern boundary in model (tile tree, usually) coordinates. */\r\n readonly range: Range3d;\r\n readonly symbolTranslation: Point3d;\r\n readonly viewIndependentOrigin?: Point3d;\r\n}\r\n"]}
1
+ {"version":3,"file":"InstancedGraphicParams.js","sourceRoot":"","sources":["../../../src/render/InstancedGraphicParams.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG","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/** @packageDocumentation\n * @module Rendering\n */\n\nimport {\n Point2d, Point3d, Range3d, Transform,\n} from \"@itwin/core-geometry\";\n\n/** Parameters for creating a [[RenderGraphic]] representing a collection of instances of shared geometry.\n * Each instance is drawn using the same graphics, but with its own transform and (optionally) [[Feature]] Id.\n * @internal\n */\nexport interface InstancedGraphicParams {\n /** The number of instances.\n * Must be greater than zero.\n * Must be equal to (transforms.length / 12)\n * If featureIds is defined, must be equal to (featureIds.length / 3)\n * If symbologyOverrides is defined, must be equal to (symbologyOverrides.length / 8)\n */\n readonly count: number;\n\n /** An array of instance-to-model transforms.\n * Each transform consists of 3 rows of 4 columns where the 4th column holds the translation.\n * The translations are relative to the `transformCenter` property.\n */\n readonly transforms: Float32Array;\n\n /** A point roughly in the center of the range of all of the instances, to which each instance's translation is relative.\n * This is used to reduce precision errors when transforming the instances in shader code.\n */\n readonly transformCenter: Point3d;\n\n /** If defined, an array of little-endian 24-bit unsigned integers containing the feature ID of each instance. */\n readonly featureIds?: Uint8Array;\n\n /** If defined, as array of bytes (8 per instance) encoding the symbology overrides for each instance.\n * The encoding matches that used by FeatureOverrides, though only the RGB, alpha, line weight, and line code are used.\n */\n readonly symbologyOverrides?: Uint8Array;\n\n /** If defined, the combined range of all instances of the geometry.\n */\n readonly range?: Range3d;\n}\n\n/** Parameters for creating a [[RenderGraphic]] representing a patterned area.\n * A patterned area is a planar region filled with a pattern symbol repeated in\n * a regular grid and clipped by the region's boundary.\n * @internal\n */\nexport interface PatternGraphicParams {\n readonly xyOffsets: Float32Array;\n readonly featureId?: number;\n readonly orgTransform: Transform;\n readonly scale: number;\n readonly spacing: Point2d;\n readonly origin: Point2d;\n /** Usually, to tile tree coordinates. */\n readonly patternToModel: Transform;\n /** Range of pattern boundary in model (tile tree, usually) coordinates. */\n readonly range: Range3d;\n readonly symbolTranslation: Point3d;\n readonly viewIndependentOrigin?: Point3d;\n}\n"]}