@itwin/core-frontend 5.3.0-dev.8 → 5.3.0

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 (206) hide show
  1. package/CHANGELOG.md +39 -1
  2. package/lib/cjs/ElementLocateManager.d.ts.map +1 -1
  3. package/lib/cjs/ElementLocateManager.js +2 -5
  4. package/lib/cjs/ElementLocateManager.js.map +1 -1
  5. package/lib/cjs/HitDetail.d.ts +1 -24
  6. package/lib/cjs/HitDetail.d.ts.map +1 -1
  7. package/lib/cjs/HitDetail.js +0 -5
  8. package/lib/cjs/HitDetail.js.map +1 -1
  9. package/lib/cjs/IModelApp.d.ts +4 -0
  10. package/lib/cjs/IModelApp.d.ts.map +1 -1
  11. package/lib/cjs/IModelApp.js +5 -1
  12. package/lib/cjs/IModelApp.js.map +1 -1
  13. package/lib/cjs/IModeljs-css.d.ts.map +1 -1
  14. package/lib/cjs/IModeljs-css.js +4 -0
  15. package/lib/cjs/IModeljs-css.js.map +1 -1
  16. package/lib/cjs/SubCategoriesCache.d.ts +1 -1
  17. package/lib/cjs/SubCategoriesCache.d.ts.map +1 -1
  18. package/lib/cjs/SubCategoriesCache.js +3 -3
  19. package/lib/cjs/SubCategoriesCache.js.map +1 -1
  20. package/lib/cjs/ViewManager.d.ts +4 -2
  21. package/lib/cjs/ViewManager.d.ts.map +1 -1
  22. package/lib/cjs/ViewManager.js +3 -1
  23. package/lib/cjs/ViewManager.js.map +1 -1
  24. package/lib/cjs/Viewport.d.ts.map +1 -1
  25. package/lib/cjs/Viewport.js +9 -3
  26. package/lib/cjs/Viewport.js.map +1 -1
  27. package/lib/cjs/common/imdl/ParseImdlDocument.d.ts.map +1 -1
  28. package/lib/cjs/common/imdl/ParseImdlDocument.js +1 -43
  29. package/lib/cjs/common/imdl/ParseImdlDocument.js.map +1 -1
  30. package/lib/cjs/common/internal/Symbols.d.ts +1 -0
  31. package/lib/cjs/common/internal/Symbols.d.ts.map +1 -1
  32. package/lib/cjs/common/internal/Symbols.js +1 -0
  33. package/lib/cjs/common/internal/Symbols.js.map +1 -1
  34. package/lib/cjs/internal/cross-package.d.ts +4 -0
  35. package/lib/cjs/internal/cross-package.d.ts.map +1 -1
  36. package/lib/cjs/internal/cross-package.js +3 -1
  37. package/lib/cjs/internal/cross-package.js.map +1 -1
  38. package/lib/cjs/internal/render/RenderAreaPattern.d.ts +1 -0
  39. package/lib/cjs/internal/render/RenderAreaPattern.d.ts.map +1 -1
  40. package/lib/cjs/internal/render/RenderAreaPattern.js.map +1 -1
  41. package/lib/cjs/internal/render/RenderGeometry.d.ts +3 -1
  42. package/lib/cjs/internal/render/RenderGeometry.d.ts.map +1 -1
  43. package/lib/cjs/internal/render/RenderGeometry.js.map +1 -1
  44. package/lib/cjs/internal/render/RenderPlan.d.ts +3 -1
  45. package/lib/cjs/internal/render/RenderPlan.d.ts.map +1 -1
  46. package/lib/cjs/internal/render/RenderPlan.js.map +1 -1
  47. package/lib/cjs/internal/render/webgl/FrustumUniforms.d.ts +0 -2
  48. package/lib/cjs/internal/render/webgl/FrustumUniforms.d.ts.map +1 -1
  49. package/lib/cjs/internal/render/webgl/FrustumUniforms.js +0 -7
  50. package/lib/cjs/internal/render/webgl/FrustumUniforms.js.map +1 -1
  51. package/lib/cjs/internal/render/webgl/SceneCompositor.d.ts +0 -9
  52. package/lib/cjs/internal/render/webgl/SceneCompositor.d.ts.map +1 -1
  53. package/lib/cjs/internal/render/webgl/SceneCompositor.js +4 -67
  54. package/lib/cjs/internal/render/webgl/SceneCompositor.js.map +1 -1
  55. package/lib/cjs/internal/render/webgl/ShaderBuilder.d.ts +3 -4
  56. package/lib/cjs/internal/render/webgl/ShaderBuilder.d.ts.map +1 -1
  57. package/lib/cjs/internal/render/webgl/ShaderBuilder.js +3 -3
  58. package/lib/cjs/internal/render/webgl/ShaderBuilder.js.map +1 -1
  59. package/lib/cjs/internal/render/webgl/System.d.ts +1 -1
  60. package/lib/cjs/internal/render/webgl/System.d.ts.map +1 -1
  61. package/lib/cjs/internal/render/webgl/System.js.map +1 -1
  62. package/lib/cjs/internal/render/webgl/glsl/Atmosphere.js +1 -1
  63. package/lib/cjs/internal/render/webgl/glsl/ClearPickAndColor.d.ts.map +1 -1
  64. package/lib/cjs/internal/render/webgl/glsl/ClearPickAndColor.js +1 -2
  65. package/lib/cjs/internal/render/webgl/glsl/ClearPickAndColor.js.map +1 -1
  66. package/lib/cjs/internal/render/webgl/glsl/Contours.d.ts.map +1 -1
  67. package/lib/cjs/internal/render/webgl/glsl/Contours.js +1 -30
  68. package/lib/cjs/internal/render/webgl/glsl/Contours.js.map +1 -1
  69. package/lib/cjs/internal/render/webgl/glsl/Fragment.d.ts.map +1 -1
  70. package/lib/cjs/internal/render/webgl/glsl/Fragment.js +2 -7
  71. package/lib/cjs/internal/render/webgl/glsl/Fragment.js.map +1 -1
  72. package/lib/cjs/internal/render/webgl/glsl/RealityMesh.js +1 -1
  73. package/lib/cjs/internal/render/webgl/glsl/Surface.js +1 -1
  74. package/lib/cjs/internal/tile/DynamicIModelTile.d.ts +2 -0
  75. package/lib/cjs/internal/tile/DynamicIModelTile.d.ts.map +1 -1
  76. package/lib/cjs/internal/tile/DynamicIModelTile.js +3 -0
  77. package/lib/cjs/internal/tile/DynamicIModelTile.js.map +1 -1
  78. package/lib/cjs/internal/tile/IModelTileTree.d.ts +2 -0
  79. package/lib/cjs/internal/tile/IModelTileTree.d.ts.map +1 -1
  80. package/lib/cjs/internal/tile/IModelTileTree.js +5 -0
  81. package/lib/cjs/internal/tile/IModelTileTree.js.map +1 -1
  82. package/lib/cjs/internal/tile/map/ImageryProviders/ArcGISImageryProvider.d.ts.map +1 -1
  83. package/lib/cjs/internal/tile/map/ImageryProviders/ArcGISImageryProvider.js +1 -0
  84. package/lib/cjs/internal/tile/map/ImageryProviders/ArcGISImageryProvider.js.map +1 -1
  85. package/lib/cjs/render/Pixel.d.ts +2 -13
  86. package/lib/cjs/render/Pixel.d.ts.map +1 -1
  87. package/lib/cjs/render/Pixel.js +1 -9
  88. package/lib/cjs/render/Pixel.js.map +1 -1
  89. package/lib/cjs/tile/map/MapLayerAuthentication.d.ts +4 -0
  90. package/lib/cjs/tile/map/MapLayerAuthentication.d.ts.map +1 -1
  91. package/lib/cjs/tile/map/MapLayerAuthentication.js.map +1 -1
  92. package/lib/cjs/tile/map/MapLayerImageryProvider.d.ts +17 -2
  93. package/lib/cjs/tile/map/MapLayerImageryProvider.d.ts.map +1 -1
  94. package/lib/cjs/tile/map/MapLayerImageryProvider.js +29 -2
  95. package/lib/cjs/tile/map/MapLayerImageryProvider.js.map +1 -1
  96. package/lib/cjs/tools/AccuDrawViewportUI.d.ts +82 -26
  97. package/lib/cjs/tools/AccuDrawViewportUI.d.ts.map +1 -1
  98. package/lib/cjs/tools/AccuDrawViewportUI.js +171 -87
  99. package/lib/cjs/tools/AccuDrawViewportUI.js.map +1 -1
  100. package/lib/cjs/tools/ToolAdmin.d.ts.map +1 -1
  101. package/lib/cjs/tools/ToolAdmin.js +3 -0
  102. package/lib/cjs/tools/ToolAdmin.js.map +1 -1
  103. package/lib/esm/ElementLocateManager.d.ts.map +1 -1
  104. package/lib/esm/ElementLocateManager.js +2 -5
  105. package/lib/esm/ElementLocateManager.js.map +1 -1
  106. package/lib/esm/HitDetail.d.ts +1 -24
  107. package/lib/esm/HitDetail.d.ts.map +1 -1
  108. package/lib/esm/HitDetail.js +0 -5
  109. package/lib/esm/HitDetail.js.map +1 -1
  110. package/lib/esm/IModelApp.d.ts +4 -0
  111. package/lib/esm/IModelApp.d.ts.map +1 -1
  112. package/lib/esm/IModelApp.js +5 -1
  113. package/lib/esm/IModelApp.js.map +1 -1
  114. package/lib/esm/IModeljs-css.d.ts.map +1 -1
  115. package/lib/esm/IModeljs-css.js +4 -0
  116. package/lib/esm/IModeljs-css.js.map +1 -1
  117. package/lib/esm/SubCategoriesCache.d.ts +1 -1
  118. package/lib/esm/SubCategoriesCache.d.ts.map +1 -1
  119. package/lib/esm/SubCategoriesCache.js +3 -3
  120. package/lib/esm/SubCategoriesCache.js.map +1 -1
  121. package/lib/esm/ViewManager.d.ts +4 -2
  122. package/lib/esm/ViewManager.d.ts.map +1 -1
  123. package/lib/esm/ViewManager.js +3 -1
  124. package/lib/esm/ViewManager.js.map +1 -1
  125. package/lib/esm/Viewport.d.ts.map +1 -1
  126. package/lib/esm/Viewport.js +9 -3
  127. package/lib/esm/Viewport.js.map +1 -1
  128. package/lib/esm/common/imdl/ParseImdlDocument.d.ts.map +1 -1
  129. package/lib/esm/common/imdl/ParseImdlDocument.js +1 -43
  130. package/lib/esm/common/imdl/ParseImdlDocument.js.map +1 -1
  131. package/lib/esm/common/internal/Symbols.d.ts +1 -0
  132. package/lib/esm/common/internal/Symbols.d.ts.map +1 -1
  133. package/lib/esm/common/internal/Symbols.js +1 -0
  134. package/lib/esm/common/internal/Symbols.js.map +1 -1
  135. package/lib/esm/internal/cross-package.d.ts +4 -0
  136. package/lib/esm/internal/cross-package.d.ts.map +1 -1
  137. package/lib/esm/internal/cross-package.js +1 -0
  138. package/lib/esm/internal/cross-package.js.map +1 -1
  139. package/lib/esm/internal/render/RenderAreaPattern.d.ts +1 -0
  140. package/lib/esm/internal/render/RenderAreaPattern.d.ts.map +1 -1
  141. package/lib/esm/internal/render/RenderAreaPattern.js.map +1 -1
  142. package/lib/esm/internal/render/RenderGeometry.d.ts +3 -1
  143. package/lib/esm/internal/render/RenderGeometry.d.ts.map +1 -1
  144. package/lib/esm/internal/render/RenderGeometry.js.map +1 -1
  145. package/lib/esm/internal/render/RenderPlan.d.ts +3 -1
  146. package/lib/esm/internal/render/RenderPlan.d.ts.map +1 -1
  147. package/lib/esm/internal/render/RenderPlan.js.map +1 -1
  148. package/lib/esm/internal/render/webgl/FrustumUniforms.d.ts +0 -2
  149. package/lib/esm/internal/render/webgl/FrustumUniforms.d.ts.map +1 -1
  150. package/lib/esm/internal/render/webgl/FrustumUniforms.js +1 -8
  151. package/lib/esm/internal/render/webgl/FrustumUniforms.js.map +1 -1
  152. package/lib/esm/internal/render/webgl/SceneCompositor.d.ts +0 -9
  153. package/lib/esm/internal/render/webgl/SceneCompositor.d.ts.map +1 -1
  154. package/lib/esm/internal/render/webgl/SceneCompositor.js +4 -67
  155. package/lib/esm/internal/render/webgl/SceneCompositor.js.map +1 -1
  156. package/lib/esm/internal/render/webgl/ShaderBuilder.d.ts +3 -4
  157. package/lib/esm/internal/render/webgl/ShaderBuilder.d.ts.map +1 -1
  158. package/lib/esm/internal/render/webgl/ShaderBuilder.js +3 -3
  159. package/lib/esm/internal/render/webgl/ShaderBuilder.js.map +1 -1
  160. package/lib/esm/internal/render/webgl/System.d.ts +1 -1
  161. package/lib/esm/internal/render/webgl/System.d.ts.map +1 -1
  162. package/lib/esm/internal/render/webgl/System.js.map +1 -1
  163. package/lib/esm/internal/render/webgl/glsl/Atmosphere.js +1 -1
  164. package/lib/esm/internal/render/webgl/glsl/ClearPickAndColor.d.ts.map +1 -1
  165. package/lib/esm/internal/render/webgl/glsl/ClearPickAndColor.js +1 -2
  166. package/lib/esm/internal/render/webgl/glsl/ClearPickAndColor.js.map +1 -1
  167. package/lib/esm/internal/render/webgl/glsl/Contours.d.ts.map +1 -1
  168. package/lib/esm/internal/render/webgl/glsl/Contours.js +1 -30
  169. package/lib/esm/internal/render/webgl/glsl/Contours.js.map +1 -1
  170. package/lib/esm/internal/render/webgl/glsl/Fragment.d.ts.map +1 -1
  171. package/lib/esm/internal/render/webgl/glsl/Fragment.js +2 -7
  172. package/lib/esm/internal/render/webgl/glsl/Fragment.js.map +1 -1
  173. package/lib/esm/internal/render/webgl/glsl/RealityMesh.js +1 -1
  174. package/lib/esm/internal/render/webgl/glsl/Surface.js +1 -1
  175. package/lib/esm/internal/tile/DynamicIModelTile.d.ts +2 -0
  176. package/lib/esm/internal/tile/DynamicIModelTile.d.ts.map +1 -1
  177. package/lib/esm/internal/tile/DynamicIModelTile.js +3 -0
  178. package/lib/esm/internal/tile/DynamicIModelTile.js.map +1 -1
  179. package/lib/esm/internal/tile/IModelTileTree.d.ts +2 -0
  180. package/lib/esm/internal/tile/IModelTileTree.d.ts.map +1 -1
  181. package/lib/esm/internal/tile/IModelTileTree.js +5 -0
  182. package/lib/esm/internal/tile/IModelTileTree.js.map +1 -1
  183. package/lib/esm/internal/tile/map/ImageryProviders/ArcGISImageryProvider.d.ts.map +1 -1
  184. package/lib/esm/internal/tile/map/ImageryProviders/ArcGISImageryProvider.js +1 -0
  185. package/lib/esm/internal/tile/map/ImageryProviders/ArcGISImageryProvider.js.map +1 -1
  186. package/lib/esm/render/Pixel.d.ts +2 -13
  187. package/lib/esm/render/Pixel.d.ts.map +1 -1
  188. package/lib/esm/render/Pixel.js +1 -9
  189. package/lib/esm/render/Pixel.js.map +1 -1
  190. package/lib/esm/tile/map/MapLayerAuthentication.d.ts +4 -0
  191. package/lib/esm/tile/map/MapLayerAuthentication.d.ts.map +1 -1
  192. package/lib/esm/tile/map/MapLayerAuthentication.js.map +1 -1
  193. package/lib/esm/tile/map/MapLayerImageryProvider.d.ts +17 -2
  194. package/lib/esm/tile/map/MapLayerImageryProvider.d.ts.map +1 -1
  195. package/lib/esm/tile/map/MapLayerImageryProvider.js +29 -2
  196. package/lib/esm/tile/map/MapLayerImageryProvider.js.map +1 -1
  197. package/lib/esm/tools/AccuDrawViewportUI.d.ts +82 -26
  198. package/lib/esm/tools/AccuDrawViewportUI.d.ts.map +1 -1
  199. package/lib/esm/tools/AccuDrawViewportUI.js +171 -87
  200. package/lib/esm/tools/AccuDrawViewportUI.js.map +1 -1
  201. package/lib/esm/tools/ToolAdmin.d.ts.map +1 -1
  202. package/lib/esm/tools/ToolAdmin.js +3 -0
  203. package/lib/esm/tools/ToolAdmin.js.map +1 -1
  204. package/lib/public/scripts/parse-imdl-worker.js +1 -1
  205. package/lib/workers/webpack/parse-imdl-worker.js +1 -1
  206. package/package.json +22 -23
@@ -7,7 +7,7 @@
7
7
  * @module Utils
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.IModelTileTree = exports.DebugShaderFile = exports.LogoDecoration = exports.GoogleMapsDecorator = exports.LayerTileTreeReferenceHandler = exports.LayerTileTreeHandler = exports.WmsUtilities = exports.SpatialTileTreeReferences = exports.RealityTileLoader = exports.RealityModelTileUtils = exports.MapTileTreeReference = exports.ImdlReader = exports.ImageryMapTileTree = exports.GltfReader = exports.FeatureGraphicsRenderer = exports.FeatureGeometryBaseRenderer = exports.deflateCoordinates = exports.createSpatialTileTreeReferences = exports.collectMaskRefs = exports.ArcGisUtilities = exports.ArcGISImageryProvider = exports.ArcGisGeometryReaderJSON = exports.ArcGisErrorCode = exports.appendQueryParams = exports.acquireImdlDecoder = exports.PrimitiveVisibility = exports.formatAnimationBranchId = exports.RenderDiagnostics = exports.PerformanceMetrics = exports.Target = exports.OnScreenTarget = exports.GltfDataType = exports.AnimationNodeId = exports._scheduleScriptReference = exports._callIpcChannel = void 0;
10
+ exports._implementationProhibited = exports.IModelTileTree = exports.DebugShaderFile = exports.LogoDecoration = exports.GoogleMapsDecorator = exports.LayerTileTreeReferenceHandler = exports.LayerTileTreeHandler = exports.WmsUtilities = exports.SpatialTileTreeReferences = exports.RealityTileLoader = exports.RealityModelTileUtils = exports.MapTileTreeReference = exports.ImdlReader = exports.ImageryMapTileTree = exports.GltfReader = exports.FeatureGraphicsRenderer = exports.FeatureGeometryBaseRenderer = exports.deflateCoordinates = exports.createSpatialTileTreeReferences = exports.collectMaskRefs = exports.ArcGisUtilities = exports.ArcGISImageryProvider = exports.ArcGisGeometryReaderJSON = exports.ArcGisErrorCode = exports.appendQueryParams = exports.acquireImdlDecoder = exports.PrimitiveVisibility = exports.formatAnimationBranchId = exports.RenderDiagnostics = exports.PerformanceMetrics = exports.Target = exports.OnScreenTarget = exports.GltfDataType = exports.AnimationNodeId = exports._scheduleScriptReference = exports._callIpcChannel = void 0;
11
11
  var Symbols_1 = require("../common/internal/Symbols");
12
12
  Object.defineProperty(exports, "_callIpcChannel", { enumerable: true, get: function () { return Symbols_1._callIpcChannel; } });
13
13
  Object.defineProperty(exports, "_scheduleScriptReference", { enumerable: true, get: function () { return Symbols_1._scheduleScriptReference; } });
@@ -58,4 +58,6 @@ var RenderSystemDebugControl_2 = require("./render/RenderSystemDebugControl");
58
58
  Object.defineProperty(exports, "DebugShaderFile", { enumerable: true, get: function () { return RenderSystemDebugControl_2.DebugShaderFile; } });
59
59
  var IModelTileTree_1 = require("./tile/IModelTileTree");
60
60
  Object.defineProperty(exports, "IModelTileTree", { enumerable: true, get: function () { return IModelTileTree_1.IModelTileTree; } });
61
+ var Symbols_2 = require("../common/internal/Symbols");
62
+ Object.defineProperty(exports, "_implementationProhibited", { enumerable: true, get: function () { return Symbols_2._implementationProhibited; } });
61
63
  //# sourceMappingURL=cross-package.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"cross-package.js","sourceRoot":"","sources":["../../../src/internal/cross-package.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAuF;AAA9E,0GAAA,eAAe,OAAA;AAAE,mHAAA,wBAAwB,OAAA;AAClD,6EAA4E;AAAnE,kHAAA,eAAe,OAAA;AACxB,wDAAiF;AAAxE,0GAAA,YAAY,OAAA;AACrB,gDAA+D;AAAtD,wGAAA,cAAc,OAAA;AAAE,gGAAA,MAAM,OAAA;AAC/B,wEAAuE;AAA9D,wHAAA,kBAAkB,OAAA;AAC3B,8EAAyH;AAA5F,6HAAA,iBAAiB,OAAA;AAC9C,sEAAwE;AAA/D,+HAAA,uBAAuB,OAAA;AAChC,8EAAuG;AAA9F,+HAAA,mBAAmB,OAAA;AAE5B,iEAAiE;AACjE,6CAkC0B;AAjCzB,8GAAA,kBAAkB,OAAA;AAClB,6GAAA,iBAAiB,OAAA;AACjB,2GAAA,eAAe,OAAA;AACf,oHAAA,wBAAwB,OAAA;AAExB,iHAAA,qBAAqB,OAAA;AAErB,2GAAA,eAAe,OAAA;AAEf,2GAAA,eAAe,OAAA;AACf,2HAAA,+BAA+B,OAAA;AAC/B,8GAAA,kBAAkB,OAAA;AAElB,uHAAA,2BAA2B,OAAA;AAE3B,mHAAA,uBAAuB,OAAA;AAGvB,sGAAA,UAAU,OAAA;AAIV,8GAAA,kBAAkB,OAAA;AAElB,sGAAA,UAAU,OAAA;AAEV,gHAAA,oBAAoB,OAAA;AACpB,iHAAA,qBAAqB,OAAA;AACrB,6GAAA,iBAAiB,OAAA;AACjB,qHAAA,yBAAyB,OAAA;AAEzB,wGAAA,YAAY,OAAA;AACZ,gHAAA,oBAAoB,OAAA;AAA4B,yHAAA,6BAA6B,OAAA;AAE9E,6DAA4E;AAAnE,0HAAA,mBAAmB,OAAA;AAAE,qHAAA,cAAc,OAAA;AAE5C,qFAAqF;AACrF,mCAAmC;AACnC,8EAAoE;AAA3D,2HAAA,eAAe,OAAA;AACxB,wDAAuD;AAA9C,gHAAA,cAAc,OAAA","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 Utils\n */\n\nexport { _callIpcChannel, _scheduleScriptReference } from \"../common/internal/Symbols\";\nexport { AnimationNodeId } from \"../common/internal/render/AnimationNodeId\";\nexport { GltfDataType, type GltfMeshPrimitive } from \"../common/gltf/GltfSchema\";\nexport { OnScreenTarget, Target } from \"./render/webgl/Target\";\nexport { PerformanceMetrics } from \"./render/webgl/PerformanceMetrics\";\nexport { type GLTimerResult, RenderDiagnostics, type RenderSystemDebugControl } from \"./render/RenderSystemDebugControl\";\nexport { formatAnimationBranchId } from \"./render/AnimationBranchState\";\nexport { PrimitiveVisibility, type RenderTargetDebugControl } from \"./render/RenderTargetDebugControl\";\n\n// Used by frontend-tiles, map-layers-formats, frontend-dev-tools\nexport {\n acquireImdlDecoder,\n appendQueryParams,\n ArcGisErrorCode,\n ArcGisGeometryReaderJSON,\n type ArcGisGetServiceJsonArgs,\n ArcGISImageryProvider,\n type ArcGISServiceMetadata,\n ArcGisUtilities,\n type ArcGisValidateSourceArgs,\n collectMaskRefs,\n createSpatialTileTreeReferences,\n deflateCoordinates,\n type FeatureAttributeDrivenSymbology,\n FeatureGeometryBaseRenderer,\n type FeatureGeometryRenderer,\n FeatureGraphicsRenderer,\n type FeatureSymbolizedRenderer,\n type FeatureSymbologyRenderer,\n GltfReader,\n type GltfReaderArgs,\n type GltfReaderResult,\n type GraphicsGeometryRenderer,\n ImageryMapTileTree,\n type ImdlDecoder,\n ImdlReader,\n type MapLayerInfoFromTileTree,\n MapTileTreeReference,\n RealityModelTileUtils,\n RealityTileLoader,\n SpatialTileTreeReferences,\n type WGS84Extent,\n WmsUtilities,\n LayerTileTreeHandler, type MapLayerTreeSetting, LayerTileTreeReferenceHandler\n} from \"../tile/internal\";\nexport { GoogleMapsDecorator, LogoDecoration } from \"./GoogleMapsDecorator\";\n\n// Used by display-test-app which currently builds using both ESModules and CommonJS.\n// Remove once CommonJS is dropped.\nexport { DebugShaderFile } from \"./render/RenderSystemDebugControl\";\nexport { IModelTileTree } from \"./tile/IModelTileTree\";\n"]}
1
+ {"version":3,"file":"cross-package.js","sourceRoot":"","sources":["../../../src/internal/cross-package.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAuF;AAA9E,0GAAA,eAAe,OAAA;AAAE,mHAAA,wBAAwB,OAAA;AAClD,6EAA4E;AAAnE,kHAAA,eAAe,OAAA;AACxB,wDAAiF;AAAxE,0GAAA,YAAY,OAAA;AACrB,gDAA+D;AAAtD,wGAAA,cAAc,OAAA;AAAE,gGAAA,MAAM,OAAA;AAC/B,wEAAuE;AAA9D,wHAAA,kBAAkB,OAAA;AAC3B,8EAAyH;AAA5F,6HAAA,iBAAiB,OAAA;AAC9C,sEAAwE;AAA/D,+HAAA,uBAAuB,OAAA;AAChC,8EAAuG;AAA9F,+HAAA,mBAAmB,OAAA;AAE5B,iEAAiE;AACjE,6CAkC0B;AAjCzB,8GAAA,kBAAkB,OAAA;AAClB,6GAAA,iBAAiB,OAAA;AACjB,2GAAA,eAAe,OAAA;AACf,oHAAA,wBAAwB,OAAA;AAExB,iHAAA,qBAAqB,OAAA;AAErB,2GAAA,eAAe,OAAA;AAEf,2GAAA,eAAe,OAAA;AACf,2HAAA,+BAA+B,OAAA;AAC/B,8GAAA,kBAAkB,OAAA;AAElB,uHAAA,2BAA2B,OAAA;AAE3B,mHAAA,uBAAuB,OAAA;AAGvB,sGAAA,UAAU,OAAA;AAIV,8GAAA,kBAAkB,OAAA;AAElB,sGAAA,UAAU,OAAA;AAEV,gHAAA,oBAAoB,OAAA;AACpB,iHAAA,qBAAqB,OAAA;AACrB,6GAAA,iBAAiB,OAAA;AACjB,qHAAA,yBAAyB,OAAA;AAEzB,wGAAA,YAAY,OAAA;AACZ,gHAAA,oBAAoB,OAAA;AAA4B,yHAAA,6BAA6B,OAAA;AAE9E,6DAA4E;AAAnE,0HAAA,mBAAmB,OAAA;AAAE,qHAAA,cAAc,OAAA;AAE5C,qFAAqF;AACrF,mCAAmC;AACnC,8EAAoE;AAA3D,2HAAA,eAAe,OAAA;AACxB,wDAAuD;AAA9C,gHAAA,cAAc,OAAA;AAMvB,sDAAuE;AAA9D,oHAAA,yBAAyB,OAAA","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 Utils\n */\n\nexport { _callIpcChannel, _scheduleScriptReference } from \"../common/internal/Symbols\";\nexport { AnimationNodeId } from \"../common/internal/render/AnimationNodeId\";\nexport { GltfDataType, type GltfMeshPrimitive } from \"../common/gltf/GltfSchema\";\nexport { OnScreenTarget, Target } from \"./render/webgl/Target\";\nexport { PerformanceMetrics } from \"./render/webgl/PerformanceMetrics\";\nexport { type GLTimerResult, RenderDiagnostics, type RenderSystemDebugControl } from \"./render/RenderSystemDebugControl\";\nexport { formatAnimationBranchId } from \"./render/AnimationBranchState\";\nexport { PrimitiveVisibility, type RenderTargetDebugControl } from \"./render/RenderTargetDebugControl\";\n\n// Used by frontend-tiles, map-layers-formats, frontend-dev-tools\nexport {\n acquireImdlDecoder,\n appendQueryParams,\n ArcGisErrorCode,\n ArcGisGeometryReaderJSON,\n type ArcGisGetServiceJsonArgs,\n ArcGISImageryProvider,\n type ArcGISServiceMetadata,\n ArcGisUtilities,\n type ArcGisValidateSourceArgs,\n collectMaskRefs,\n createSpatialTileTreeReferences,\n deflateCoordinates,\n type FeatureAttributeDrivenSymbology,\n FeatureGeometryBaseRenderer,\n type FeatureGeometryRenderer,\n FeatureGraphicsRenderer,\n type FeatureSymbolizedRenderer,\n type FeatureSymbologyRenderer,\n GltfReader,\n type GltfReaderArgs,\n type GltfReaderResult,\n type GraphicsGeometryRenderer,\n ImageryMapTileTree,\n type ImdlDecoder,\n ImdlReader,\n type MapLayerInfoFromTileTree,\n MapTileTreeReference,\n RealityModelTileUtils,\n RealityTileLoader,\n SpatialTileTreeReferences,\n type WGS84Extent,\n WmsUtilities,\n LayerTileTreeHandler, type MapLayerTreeSetting, LayerTileTreeReferenceHandler\n} from \"../tile/internal\";\nexport { GoogleMapsDecorator, LogoDecoration } from \"./GoogleMapsDecorator\";\n\n// Used by display-test-app which currently builds using both ESModules and CommonJS.\n// Remove once CommonJS is dropped.\nexport { DebugShaderFile } from \"./render/RenderSystemDebugControl\";\nexport { IModelTileTree } from \"./tile/IModelTileTree\";\n\n// Used by cesium-renderer\nexport { type RenderPlan } from \"./render/RenderPlan\";\nexport { type RenderAreaPattern } from \"./render/RenderAreaPattern\";\nexport { type RenderGeometry } from \"./render/RenderGeometry\";\nexport { _implementationProhibited } from \"../common/internal/Symbols\";\n"]}
@@ -5,6 +5,7 @@ import { _implementationProhibited } from "../../common/internal/Symbols";
5
5
  import { RenderMemory } from "../../render/RenderMemory";
6
6
  /** An opaque representation of instructions for repeatedly drawing a [[RenderGeometry]] to pattern a planar region,
7
7
  * to be supplied to [[RenderSystem.createRenderGraphic]].
8
+ * @internal
8
9
  */
9
10
  export interface RenderAreaPattern extends Disposable, RenderMemory.Consumer {
10
11
  readonly [_implementationProhibited]: "renderAreaPattern";
@@ -1 +1 @@
1
- {"version":3,"file":"RenderAreaPattern.d.ts","sourceRoot":"","sources":["../../../../src/internal/render/RenderAreaPattern.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAEzD;;GAEG;AACH,MAAM,WAAW,iBAAkB,SAAQ,UAAU,EAAE,YAAY,CAAC,QAAQ;IAC1E,QAAQ,CAAC,CAAC,yBAAyB,CAAC,EAAE,mBAAmB,CAAC;CAC3D"}
1
+ {"version":3,"file":"RenderAreaPattern.d.ts","sourceRoot":"","sources":["../../../../src/internal/render/RenderAreaPattern.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAEzD;;;GAGG;AACH,MAAM,WAAW,iBAAkB,SAAQ,UAAU,EAAE,YAAY,CAAC,QAAQ;IAC1E,QAAQ,CAAC,CAAC,yBAAyB,CAAC,EAAE,mBAAmB,CAAC;CAC3D"}
@@ -1 +1 @@
1
- {"version":3,"file":"RenderAreaPattern.js","sourceRoot":"","sources":["../../../../src/internal/render/RenderAreaPattern.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;AAEH,2DAA0E","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 { _implementationProhibited } from \"../../common/internal/Symbols\";\nimport { RenderMemory } from \"../../render/RenderMemory\";\n\n/** An opaque representation of instructions for repeatedly drawing a [[RenderGeometry]] to pattern a planar region,\n * to be supplied to [[RenderSystem.createRenderGraphic]].\n */\nexport interface RenderAreaPattern extends Disposable, RenderMemory.Consumer {\n readonly [_implementationProhibited]: \"renderAreaPattern\";\n}\n\n"]}
1
+ {"version":3,"file":"RenderAreaPattern.js","sourceRoot":"","sources":["../../../../src/internal/render/RenderAreaPattern.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;AAEH,2DAA0E","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 { _implementationProhibited } from \"../../common/internal/Symbols\";\nimport { RenderMemory } from \"../../render/RenderMemory\";\n\n/** An opaque representation of instructions for repeatedly drawing a [[RenderGeometry]] to pattern a planar region,\n * to be supplied to [[RenderSystem.createRenderGraphic]].\n * @internal\n */\nexport interface RenderAreaPattern extends Disposable, RenderMemory.Consumer {\n readonly [_implementationProhibited]: \"renderAreaPattern\";\n}\n\n"]}
@@ -3,7 +3,9 @@
3
3
  */
4
4
  import { RenderMemory } from "../../render/RenderMemory";
5
5
  import { Range3d } from "@itwin/core-geometry";
6
- /** An opaque representation of geometry allocated by a [[RenderSystem]] to be supplied to [[RenderSystem.createRenderGraphic]]. */
6
+ /** An opaque representation of geometry allocated by a [[RenderSystem]] to be supplied to [[RenderSystem.createRenderGraphic]].
7
+ * @internal
8
+ */
7
9
  export interface RenderGeometry extends Disposable, RenderMemory.Consumer {
8
10
  readonly renderGeometryType: "mesh" | "polyline" | "point-string" | "point-cloud" | "reality-mesh";
9
11
  readonly isInstanceable: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"RenderGeometry.d.ts","sourceRoot":"","sources":["../../../../src/internal/render/RenderGeometry.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAE/C,mIAAmI;AACnI,MAAM,WAAW,cAAe,SAAQ,UAAU,EAAE,YAAY,CAAC,QAAQ;IACvE,QAAQ,CAAC,kBAAkB,EAAE,MAAM,GAAG,UAAU,GAAG,cAAc,GAAG,aAAa,GAAG,cAAc,CAAC;IACnG,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAC;IACjC,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAC7B;;;OAGG;IACH,SAAS,EAAE,OAAO,CAAC;IACnB,gBAAgB;IAChB,YAAY,CAAC,GAAG,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;CACtC"}
1
+ {"version":3,"file":"RenderGeometry.d.ts","sourceRoot":"","sources":["../../../../src/internal/render/RenderGeometry.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAE/C;;GAEG;AACH,MAAM,WAAW,cAAe,SAAQ,UAAU,EAAE,YAAY,CAAC,QAAQ;IACvE,QAAQ,CAAC,kBAAkB,EAAE,MAAM,GAAG,UAAU,GAAG,cAAc,GAAG,aAAa,GAAG,cAAc,CAAC;IACnG,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAC;IACjC,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAC7B;;;OAGG;IACH,SAAS,EAAE,OAAO,CAAC;IACnB,gBAAgB;IAChB,YAAY,CAAC,GAAG,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;CACtC"}
@@ -1 +1 @@
1
- {"version":3,"file":"RenderGeometry.js","sourceRoot":"","sources":["../../../../src/internal/render/RenderGeometry.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 { RenderMemory } from \"../../render/RenderMemory\";\nimport { Range3d } from \"@itwin/core-geometry\";\n\n/** An opaque representation of geometry allocated by a [[RenderSystem]] to be supplied to [[RenderSystem.createRenderGraphic]]. */\nexport interface RenderGeometry extends Disposable, RenderMemory.Consumer {\n readonly renderGeometryType: \"mesh\" | \"polyline\" | \"point-string\" | \"point-cloud\" | \"reality-mesh\";\n readonly isInstanceable: boolean;\n readonly isDisposed: boolean;\n /** If true, this geometry is intended for reuse. Its `dispose` method will do nothing. Instead, we will rely on the JS garbage collector\n * to dispose of any WebGL resources it contains.\n * When creating a reusable `GraphicTemplate`, we set this to `true` for all geometry in the template. We never set it to `false`.\n */\n noDispose: boolean;\n /** @internal */\n computeRange(out?: Range3d): Range3d;\n}\n\n"]}
1
+ {"version":3,"file":"RenderGeometry.js","sourceRoot":"","sources":["../../../../src/internal/render/RenderGeometry.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 { RenderMemory } from \"../../render/RenderMemory\";\nimport { Range3d } from \"@itwin/core-geometry\";\n\n/** An opaque representation of geometry allocated by a [[RenderSystem]] to be supplied to [[RenderSystem.createRenderGraphic]].\n * @internal\n */\nexport interface RenderGeometry extends Disposable, RenderMemory.Consumer {\n readonly renderGeometryType: \"mesh\" | \"polyline\" | \"point-string\" | \"point-cloud\" | \"reality-mesh\";\n readonly isInstanceable: boolean;\n readonly isDisposed: boolean;\n /** If true, this geometry is intended for reuse. Its `dispose` method will do nothing. Instead, we will rely on the JS garbage collector\n * to dispose of any WebGL resources it contains.\n * When creating a reusable `GraphicTemplate`, we set this to `true` for all geometry in the template. We never set it to `false`.\n */\n noDispose: boolean;\n /** @internal */\n computeRange(out?: Range3d): Range3d;\n}\n\n"]}
@@ -12,7 +12,9 @@ export declare class RenderPlanEllipsoid {
12
12
  constructor(ellipsoidCenter: Point3d, ellipsoidRotation: Matrix3d, ellipsoidRadii: Point3d);
13
13
  equals(other: RenderPlanEllipsoid): boolean;
14
14
  }
15
- /** A RenderPlan holds a Frustum and the render settings for displaying a RenderScene into a RenderTarget. */
15
+ /** A RenderPlan holds a Frustum and the render settings for displaying a RenderScene into a RenderTarget.
16
+ * @internal
17
+ */
16
18
  export interface RenderPlan {
17
19
  readonly is3d: boolean;
18
20
  readonly viewFlags: ViewFlags;
@@ -1 +1 @@
1
- {"version":3,"file":"RenderPlan.d.ts","sourceRoot":"","sources":["../../../../src/internal/render/RenderPlan.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EACL,gBAAgB,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,cAAc,EAAE,OAAO,EAAa,UAAU,EAAE,MAAM,EAAE,aAAa,EAAE,cAAc,EACvJ,aAAa,EAAE,eAAe,EAAE,SAAS,EAAE,4BAA4B,EACxE,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAY,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACzF,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAO1C,qBAAa,mBAAmB;IAC9B,SAAgB,eAAe,EAAE,OAAO,CAAC;IACzC,SAAgB,iBAAiB,EAAE,QAAQ,CAAC;IAC5C,SAAgB,cAAc,EAAE,OAAO,CAAC;gBAE5B,eAAe,E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a,EAAE,QAAQ;QACzB,eAAe,GAAG,EAAE,CAAC,MAAM,CAAC,YAAY,CAAC,kBAAkB,CAAC,aAAa,CAAC,QAAQ,CAAC,QAAQ,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC;IAE1G,IAAI,SAA0C,CAAC;IAC/C,IAAI,uBAAS,CAAC,SAAS,KAAK,IAAI,CAAC,SAAS,EAAE,CAAC;QAC3C,MAAM,WAAW,GAAG,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;QAClD,SAAS,GAAG,IAAI,mBAAmB,CACjC,uBAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,MAAM,CAAC,EACpC,WAAW,CAAC,MAAM,EAClB,uBAAO,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,wBAAQ,CAAC,gBAAgB,CAAC,OAAO,EAAE,CAAC,EAAE,wBAAQ,CAAC,gBAAgB,CAAC,OAAO,EAAE,CAAC,EAAE,wBAAQ,CAAC,gBAAgB,CAAC,KAAK,EAAE,CAAC,CACrI,CAAC;IACJ,CAAC;IAED,OAAO;QACL,IAAI;QACJ,SAAS;QACT,OAAO;QACP,SAAS;QACT,cAAc;QACd,cAAc;QACd,gBAAgB;QAChB,aAAa;QACb,IAAI;QACJ,SAAS;QACT,KAAK;QACL,aAAa;QACb,EAAE;QACF,QAAQ;QACR,QAAQ;QACR,UAAU;QACV,eAAe;QACf,eAAe;QACf,OAAO;QACP,QAAQ;QACR,oBAAoB;QACpB,aAAa;QACb,eAAe;QACf,QAAQ;QACR,MAAM;QACN,oBAAoB,EAAE,EAAE,CAAC,YAAY,CAAC,QAAQ,CAAC,oBAAoB;QACnE,SAAS;KACV,CAAC;AACJ,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 Rendering\n */\n\nimport {\n AmbientOcclusion, AnalysisStyle, Atmosphere, ClipStyle, ColorDef, ContourDisplay, Frustum, GlobeMode, HiddenLine, Hilite, LightSettings, MonochromeMode, Npc,\n RenderTexture, ThematicDisplay, ViewFlags, WhiteOnWhiteReversalSettings,\n} from \"@itwin/core-common\";\nimport { ClipVector, Constant, Matrix3d, Point3d, Vector3d } from \"@itwin/core-geometry\";\nimport { FlashSettings } from \"../../FlashSettings\";\nimport { Viewport } from \"../../Viewport\";\nimport { ViewState3d } from \"../../ViewState\";\n\nconst scratchPoint3a = new Point3d();\nconst scratchPoint3b = new Point3d();\nconst scratchPoint3c = new Point3d();\n\nexport class RenderPlanEllipsoid {\n public readonly ellipsoidCenter: Point3d;\n public readonly ellipsoidRotation: Matrix3d;\n public readonly ellipsoidRadii: Point3d;\n\n constructor(ellipsoidCenter: Point3d, ellipsoidRotation: Matrix3d, ellipsoidRadii: Point3d) {\n this.ellipsoidCenter = ellipsoidCenter;\n this.ellipsoidRotation = ellipsoidRotation;\n this.ellipsoidRadii = ellipsoidRadii;\n }\n\n public equals(other: RenderPlanEllipsoid): boolean {\n if (this.ellipsoidCenter.isAlmostEqual(other.ellipsoidCenter))\n return false;\n if (this.ellipsoidRotation.isAlmostEqual(other.ellipsoidRotation))\n return false;\n if (this.ellipsoidRadii.isAlmostEqual(other.ellipsoidRadii))\n return false;\n return true;\n }\n}\n\n/** A RenderPlan holds a Frustum and the render settings for displaying a RenderScene into a RenderTarget. */\nexport interface RenderPlan {\n readonly is3d: boolean;\n readonly viewFlags: ViewFlags;\n readonly bgColor: ColorDef;\n readonly monoColor: ColorDef;\n readonly monochromeMode: MonochromeMode;\n readonly hiliteSettings: Hilite.Settings;\n readonly emphasisSettings: Hilite.Settings;\n readonly flashSettings: FlashSettings;\n readonly clip?: ClipVector;\n readonly clipStyle: ClipStyle;\n readonly hline?: HiddenLine.Settings;\n readonly analysisStyle?: AnalysisStyle;\n readonly ao?: AmbientOcclusion.Settings;\n readonly thematic?: ThematicDisplay;\n readonly contours?: ContourDisplay;\n readonly atmosphere?: Atmosphere.Settings;\n readonly isFadeOutActive: boolean;\n readonly analysisTexture?: RenderTexture;\n readonly frustum: Frustum;\n readonly fraction: number;\n readonly globalViewTransition: number;\n readonly isGlobeMode3D: boolean;\n readonly backgroundMapOn: boolean;\n readonly upVector: Vector3d;\n readonly lights?: LightSettings;\n readonly whiteOnWhiteReversal: WhiteOnWhiteReversalSettings;\n readonly ellipsoid?: RenderPlanEllipsoid;\n}\n\nexport function createEmptyRenderPlan(): RenderPlan {\n return {\n is3d: true,\n viewFlags: new ViewFlags(),\n bgColor: ColorDef.white,\n monoColor: ColorDef.white,\n monochromeMode: MonochromeMode.Scaled,\n hiliteSettings: new Hilite.Settings(),\n emphasisSettings: new Hilite.Settings(),\n flashSettings: new FlashSettings(),\n clipStyle: ClipStyle.defaults,\n frustum: new Frustum(),\n fraction: 0,\n isFadeOutActive: false,\n globalViewTransition: 0,\n isGlobeMode3D: false,\n backgroundMapOn: false,\n upVector: Vector3d.unitZ(),\n whiteOnWhiteReversal: WhiteOnWhiteReversalSettings.fromJSON(),\n };\n}\n\nexport function createRenderPlanFromViewport(vp: Viewport): RenderPlan {\n const view = vp.view;\n const style = view.displayStyle;\n\n const is3d = view.is3d();\n\n const globalViewTransition = view.is3d() ? view.globalViewTransition() : 0.0;\n const isGlobeMode3D = GlobeMode.Ellipsoid === view.globeMode;\n const backgroundMapOn = view.displayStyle.viewFlags.backgroundMap;\n const frustum = vp.viewingSpace.getFrustum();\n const fraction = vp.viewingSpace.frustFraction;\n const viewFlags = style.viewFlags;\n\n const bgColor = view.backgroundColor;\n const monoColor = style.monochromeColor;\n const monochromeMode = style.settings.monochromeMode;\n\n const hiliteSettings = vp.hilite;\n const emphasisSettings = vp.emphasisSettings;\n const flashSettings = vp.flashSettings;\n const lights = vp.lightSettings;\n\n const isFadeOutActive = vp.isFadeOutActive;\n const clip = view.getViewClip();\n const clipStyle = view.displayStyle.settings.clipStyle;\n const hline = style.is3d() ? style.settings.hiddenLineSettings : undefined;\n const ao = style.is3d() ? style.settings.ambientOcclusionSettings : undefined;\n const analysisStyle = style.settings.analysisStyle;\n const thematic = (style.is3d() && view.displayStyle.viewFlags.thematicDisplay) ? style.settings.thematic : undefined;\n const contours = (style.is3d() && style.settings.contours.groups.length > 0) ? style.settings.contours : undefined;\n const shouldDisplayAtmosphere = (style.is3d() && GlobeMode.Ellipsoid === view.globeMode && vp.iModel.isGeoLocated && style.viewFlags.backgroundMap) ? (vp.view as ViewState3d).getDisplayStyle3d().environment.displayAtmosphere : false;\n const atmosphere = shouldDisplayAtmosphere ? (vp.view as ViewState3d).getDisplayStyle3d().environment.atmosphere : undefined;\n\n let upVector;\n if (GlobeMode.Ellipsoid === view.globeMode) {\n const lb = frustum.getCorner(Npc.LeftBottomRear).interpolate(0.5, frustum.getCorner(Npc.LeftBottomFront), scratchPoint3a);\n const rt = frustum.getCorner(Npc.RightTopRear).interpolate(0.5, frustum.getCorner(Npc.RightTopFront), scratchPoint3b);\n const cntr = lb.interpolate(0.5, rt, scratchPoint3c);\n upVector = view.getUpVector(cntr);\n } else {\n upVector = Vector3d.unitZ();\n }\n\n let analysisTexture;\n if (analysisStyle?.thematic)\n analysisTexture = vp.target.renderSystem.getGradientTexture(analysisStyle.thematic.gradient, vp.iModel);\n\n let ellipsoid: RenderPlanEllipsoid | undefined;\n if (GlobeMode.Ellipsoid === view.globeMode) {\n const mapEcefToDb = view.iModel.getMapEcefToDb(0);\n ellipsoid = new RenderPlanEllipsoid(\n Point3d.fromJSON(mapEcefToDb.origin),\n mapEcefToDb.matrix,\n Point3d.fromJSON({ x: Constant.earthRadiusWGS84.equator, y: Constant.earthRadiusWGS84.equator, z: Constant.earthRadiusWGS84.polar }),\n );\n }\n\n return {\n is3d,\n viewFlags,\n bgColor,\n monoColor,\n monochromeMode,\n hiliteSettings,\n emphasisSettings,\n flashSettings,\n clip,\n clipStyle,\n hline,\n analysisStyle,\n ao,\n thematic,\n contours,\n atmosphere,\n isFadeOutActive,\n analysisTexture,\n frustum,\n fraction,\n globalViewTransition,\n isGlobeMode3D,\n backgroundMapOn,\n upVector,\n lights,\n whiteOnWhiteReversal: vp.displayStyle.settings.whiteOnWhiteReversal,\n ellipsoid,\n };\n}\n"]}
1
+ {"version":3,"file":"RenderPlan.js","sourceRoot":"","sources":["../../../../src/internal/render/RenderPlan.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAsEH,sDAoBC;AAED,oEAsFC;AAhLD,oDAG4B;AAC5B,wDAAyF;AACzF,uDAAoD;AAIpD,MAAM,cAAc,GAAG,IAAI,uBAAO,EAAE,CAAC;AACrC,MAAM,cAAc,GAAG,IAAI,uBAAO,EAAE,CAAC;AACrC,MAAM,cAAc,GAAG,IAAI,uBAAO,EAAE,CAAC;AAErC,MAAa,mBAAmB;IACd,eAAe,CAAU;IACzB,iBAAiB,CAAW;IAC5B,cAAc,CAAU;IAExC,YAAY,eAAwB,EAAE,iBAA2B,EAAE,cAAuB;QACxF,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;QACvC,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;QAC3C,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;IACvC,CAAC;IAEM,MAAM,CAAC,KAA0B;QACtC,IAAI,IAAI,CAAC,eAAe,CAAC,aAAa,CAAC,KAAK,CAAC,eAAe,CAAC;YAC3D,OAAO,KAAK,CAAC;QACf,IAAI,IAAI,CAAC,iBAAiB,CAAC,aAAa,CAAC,KAAK,CAAC,iBAAiB,CAAC;YAC/D,OAAO,KAAK,CAAC;QACf,IAAI,IAAI,CAAC,cAAc,CAAC,aAAa,CAAC,KAAK,CAAC,cAAc,CAAC;YACzD,OAAO,KAAK,CAAC;QACf,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AApBD,kDAoBC;AAmCD,SAAgB,qBAAqB;IACnC,OAAO;QACL,IAAI,EAAE,IAAI;QACV,SAAS,EAAE,IAAI,uBAAS,E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,MAAM,CAAC,YAAY,CAAC,kBAAkB,CAAC,aAAa,CAAC,QAAQ,CAAC,QAAQ,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC;IAE1G,IAAI,SAA0C,CAAC;IAC/C,IAAI,uBAAS,CAAC,SAAS,KAAK,IAAI,CAAC,SAAS,EAAE,CAAC;QAC3C,MAAM,WAAW,GAAG,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;QAClD,SAAS,GAAG,IAAI,mBAAmB,CACjC,uBAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,MAAM,CAAC,EACpC,WAAW,CAAC,MAAM,EAClB,uBAAO,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,wBAAQ,CAAC,gBAAgB,CAAC,OAAO,EAAE,CAAC,EAAE,wBAAQ,CAAC,gBAAgB,CAAC,OAAO,EAAE,CAAC,EAAE,wBAAQ,CAAC,gBAAgB,CAAC,KAAK,EAAE,CAAC,CACrI,CAAC;IACJ,CAAC;IAED,OAAO;QACL,IAAI;QACJ,SAAS;QACT,OAAO;QACP,SAAS;QACT,cAAc;QACd,cAAc;QACd,gBAAgB;QAChB,aAAa;QACb,IAAI;QACJ,SAAS;QACT,KAAK;QACL,aAAa;QACb,EAAE;QACF,QAAQ;QACR,QAAQ;QACR,UAAU;QACV,eAAe;QACf,eAAe;QACf,OAAO;QACP,QAAQ;QACR,oBAAoB;QACpB,aAAa;QACb,eAAe;QACf,QAAQ;QACR,MAAM;QACN,oBAAoB,EAAE,EAAE,CAAC,YAAY,CAAC,QAAQ,CAAC,oBAAoB;QACnE,SAAS;KACV,CAAC;AACJ,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 Rendering\n */\n\nimport {\n AmbientOcclusion, AnalysisStyle, Atmosphere, ClipStyle, ColorDef, ContourDisplay, Frustum, GlobeMode, HiddenLine, Hilite, LightSettings, MonochromeMode, Npc,\n RenderTexture, ThematicDisplay, ViewFlags, WhiteOnWhiteReversalSettings,\n} from \"@itwin/core-common\";\nimport { ClipVector, Constant, Matrix3d, Point3d, Vector3d } from \"@itwin/core-geometry\";\nimport { FlashSettings } from \"../../FlashSettings\";\nimport { Viewport } from \"../../Viewport\";\nimport { ViewState3d } from \"../../ViewState\";\n\nconst scratchPoint3a = new Point3d();\nconst scratchPoint3b = new Point3d();\nconst scratchPoint3c = new Point3d();\n\nexport class RenderPlanEllipsoid {\n public readonly ellipsoidCenter: Point3d;\n public readonly ellipsoidRotation: Matrix3d;\n public readonly ellipsoidRadii: Point3d;\n\n constructor(ellipsoidCenter: Point3d, ellipsoidRotation: Matrix3d, ellipsoidRadii: Point3d) {\n this.ellipsoidCenter = ellipsoidCenter;\n this.ellipsoidRotation = ellipsoidRotation;\n this.ellipsoidRadii = ellipsoidRadii;\n }\n\n public equals(other: RenderPlanEllipsoid): boolean {\n if (this.ellipsoidCenter.isAlmostEqual(other.ellipsoidCenter))\n return false;\n if (this.ellipsoidRotation.isAlmostEqual(other.ellipsoidRotation))\n return false;\n if (this.ellipsoidRadii.isAlmostEqual(other.ellipsoidRadii))\n return false;\n return true;\n }\n}\n\n/** A RenderPlan holds a Frustum and the render settings for displaying a RenderScene into a RenderTarget.\n * @internal\n */\nexport interface RenderPlan {\n readonly is3d: boolean;\n readonly viewFlags: ViewFlags;\n readonly bgColor: ColorDef;\n readonly monoColor: ColorDef;\n readonly monochromeMode: MonochromeMode;\n readonly hiliteSettings: Hilite.Settings;\n readonly emphasisSettings: Hilite.Settings;\n readonly flashSettings: FlashSettings;\n readonly clip?: ClipVector;\n readonly clipStyle: ClipStyle;\n readonly hline?: HiddenLine.Settings;\n readonly analysisStyle?: AnalysisStyle;\n readonly ao?: AmbientOcclusion.Settings;\n readonly thematic?: ThematicDisplay;\n readonly contours?: ContourDisplay;\n readonly atmosphere?: Atmosphere.Settings;\n readonly isFadeOutActive: boolean;\n readonly analysisTexture?: RenderTexture;\n readonly frustum: Frustum;\n readonly fraction: number;\n readonly globalViewTransition: number;\n readonly isGlobeMode3D: boolean;\n readonly backgroundMapOn: boolean;\n readonly upVector: Vector3d;\n readonly lights?: LightSettings;\n readonly whiteOnWhiteReversal: WhiteOnWhiteReversalSettings;\n readonly ellipsoid?: RenderPlanEllipsoid;\n}\n\nexport function createEmptyRenderPlan(): RenderPlan {\n return {\n is3d: true,\n viewFlags: new ViewFlags(),\n bgColor: ColorDef.white,\n monoColor: ColorDef.white,\n monochromeMode: MonochromeMode.Scaled,\n hiliteSettings: new Hilite.Settings(),\n emphasisSettings: new Hilite.Settings(),\n flashSettings: new FlashSettings(),\n clipStyle: ClipStyle.defaults,\n frustum: new Frustum(),\n fraction: 0,\n isFadeOutActive: false,\n globalViewTransition: 0,\n isGlobeMode3D: false,\n backgroundMapOn: false,\n upVector: Vector3d.unitZ(),\n whiteOnWhiteReversal: WhiteOnWhiteReversalSettings.fromJSON(),\n };\n}\n\nexport function createRenderPlanFromViewport(vp: Viewport): RenderPlan {\n const view = vp.view;\n const style = view.displayStyle;\n\n const is3d = view.is3d();\n\n const globalViewTransition = view.is3d() ? view.globalViewTransition() : 0.0;\n const isGlobeMode3D = GlobeMode.Ellipsoid === view.globeMode;\n const backgroundMapOn = view.displayStyle.viewFlags.backgroundMap;\n const frustum = vp.viewingSpace.getFrustum();\n const fraction = vp.viewingSpace.frustFraction;\n const viewFlags = style.viewFlags;\n\n const bgColor = view.backgroundColor;\n const monoColor = style.monochromeColor;\n const monochromeMode = style.settings.monochromeMode;\n\n const hiliteSettings = vp.hilite;\n const emphasisSettings = vp.emphasisSettings;\n const flashSettings = vp.flashSettings;\n const lights = vp.lightSettings;\n\n const isFadeOutActive = vp.isFadeOutActive;\n const clip = view.getViewClip();\n const clipStyle = view.displayStyle.settings.clipStyle;\n const hline = style.is3d() ? style.settings.hiddenLineSettings : undefined;\n const ao = style.is3d() ? style.settings.ambientOcclusionSettings : undefined;\n const analysisStyle = style.settings.analysisStyle;\n const thematic = (style.is3d() && view.displayStyle.viewFlags.thematicDisplay) ? style.settings.thematic : undefined;\n const contours = (style.is3d() && style.settings.contours.groups.length > 0) ? style.settings.contours : undefined;\n const shouldDisplayAtmosphere = (style.is3d() && GlobeMode.Ellipsoid === view.globeMode && vp.iModel.isGeoLocated && style.viewFlags.backgroundMap) ? (vp.view as ViewState3d).getDisplayStyle3d().environment.displayAtmosphere : false;\n const atmosphere = shouldDisplayAtmosphere ? (vp.view as ViewState3d).getDisplayStyle3d().environment.atmosphere : undefined;\n\n let upVector;\n if (GlobeMode.Ellipsoid === view.globeMode) {\n const lb = frustum.getCorner(Npc.LeftBottomRear).interpolate(0.5, frustum.getCorner(Npc.LeftBottomFront), scratchPoint3a);\n const rt = frustum.getCorner(Npc.RightTopRear).interpolate(0.5, frustum.getCorner(Npc.RightTopFront), scratchPoint3b);\n const cntr = lb.interpolate(0.5, rt, scratchPoint3c);\n upVector = view.getUpVector(cntr);\n } else {\n upVector = Vector3d.unitZ();\n }\n\n let analysisTexture;\n if (analysisStyle?.thematic)\n analysisTexture = vp.target.renderSystem.getGradientTexture(analysisStyle.thematic.gradient, vp.iModel);\n\n let ellipsoid: RenderPlanEllipsoid | undefined;\n if (GlobeMode.Ellipsoid === view.globeMode) {\n const mapEcefToDb = view.iModel.getMapEcefToDb(0);\n ellipsoid = new RenderPlanEllipsoid(\n Point3d.fromJSON(mapEcefToDb.origin),\n mapEcefToDb.matrix,\n Point3d.fromJSON({ x: Constant.earthRadiusWGS84.equator, y: Constant.earthRadiusWGS84.equator, z: Constant.earthRadiusWGS84.polar }),\n );\n }\n\n return {\n is3d,\n viewFlags,\n bgColor,\n monoColor,\n monochromeMode,\n hiliteSettings,\n emphasisSettings,\n flashSettings,\n clip,\n clipStyle,\n hline,\n analysisStyle,\n ao,\n thematic,\n contours,\n atmosphere,\n isFadeOutActive,\n analysisTexture,\n frustum,\n fraction,\n globalViewTransition,\n isGlobeMode3D,\n backgroundMapOn,\n upVector,\n lights,\n whiteOnWhiteReversal: vp.displayStyle.settings.whiteOnWhiteReversal,\n ellipsoid,\n };\n}\n"]}
@@ -32,7 +32,6 @@ export declare class FrustumUniforms {
32
32
  private readonly _viewUpVector;
33
33
  private readonly _planeData;
34
34
  private readonly _frustumData;
35
- private readonly _worldFrustumZRange;
36
35
  readonly projectionMatrix32: Matrix4;
37
36
  private readonly _logZData;
38
37
  private readonly _viewUpVector32;
@@ -43,7 +42,6 @@ export declare class FrustumUniforms {
43
42
  bindUpVector(uniform: UniformHandle): void;
44
43
  get planes(): Float32Array;
45
44
  get frustum(): Float32Array;
46
- get worldFrustumZRange(): Float32Array;
47
45
  get nearPlane(): number;
48
46
  get farPlane(): number;
49
47
  get type(): FrustumUniformType;
@@ -1 +1 @@
1
- {"version":3,"file":"FrustumUniforms.d.ts","sourceRoot":"","sources":["../../../../../src/internal/render/webgl/FrustumUniforms.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAAsB,QAAQ,EAAE,OAAO,EAAW,SAAS,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAC3G,OAAO,EAAE,OAAO,EAAO,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAGnC,gBAAgB;AAChB,0BAAkB,kBAAkB;IAClC,MAAM,IAAA;IACN,YAAY,IAAA;IACZ,WAAW,IAAA;CACZ;AAED,gBAAgB;AAChB,0BAAkB,KAAK;IACrB,IAAI,IAAA;IACJ,OAAO,IAAA;IACP,KAAK,IAAA;IACL,MAAM,IAAA;CACP;AAQD;;;GAGG;AACH,qBAAa,eAAe;IAE1B,SAAgB,WAAW,UAAiB;IAC5C,OAAO,CAAC,aAAa,CAAK;IAC1B,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAiB;IAClD,SAA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uB;IACjD,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAuB;IAGhD,OAAO,SAAK;IAGnB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAMvB;;IAKK,oBAAoB,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI;IAKlD,YAAY,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI;IAMjD,IAAW,MAAM,IAAI,YAAY,CAA4B;IAG7D,IAAW,OAAO,IAAI,YAAY,CAA8B;IAEhE,IAAW,SAAS,IAAI,MAAM,CAAiD;IAC/E,IAAW,QAAQ,IAAI,MAAM,CAAgD;IAC7E,IAAW,IAAI,IAAI,kBAAkB,CAAkE;IACvG,IAAW,IAAI,IAAI,OAAO,CAAoD;IAC9E,IAAW,YAAY,IAAI,MAAM,CAA+B;IAGhE,IAAW,IAAI,IAAI,YAAY,CAA2B;IAEnD,aAAa,CAAC,UAAU,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,IAAI;IAuF5E,sBAAsB,CAAC,SAAS,EAAE,QAAQ,GAAG,IAAI;IAMxD,SAAS,CAAC,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IAOnF,SAAS,CAAC,UAAU,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,kBAAkB,GAAG,IAAI;CAS1F;AAWD,gBAAgB;AAChB,wBAAgB,SAAS,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,OAAO,WAM9E"}
@@ -31,7 +31,6 @@ class FrustumUniforms {
31
31
  // GPU state
32
32
  _planeData = new Float32Array(4);
33
33
  _frustumData = new Float32Array(3);
34
- _worldFrustumZRange = new Float32Array(2);
35
34
  projectionMatrix32 = new Matrix_1.Matrix4();
36
35
  _logZData = new Float32Array(2);
37
36
  _viewUpVector32 = new Float32Array(3);
@@ -44,7 +43,6 @@ class FrustumUniforms {
44
43
  viewX: new core_geometry_1.Vector3d(),
45
44
  viewY: new core_geometry_1.Vector3d(),
46
45
  viewZ: new core_geometry_1.Vector3d(),
47
- range: new core_geometry_1.Range3d(),
48
46
  };
49
47
  constructor() {
50
48
  }
@@ -60,8 +58,6 @@ class FrustumUniforms {
60
58
  get planes() { return this._planeData; }
61
59
  // uniform vec3 u_frustum; // { near, far, type }
62
60
  get frustum() { return this._frustumData; }
63
- // uniform vec2 u_worldFrustumZRange // { min, max }
64
- get worldFrustumZRange() { return this._worldFrustumZRange; }
65
61
  get nearPlane() { return this._frustumData[0 /* FrustumData.kNear */]; }
66
62
  get farPlane() { return this._frustumData[1 /* FrustumData.kFar */]; }
67
63
  get type() { return this.frustum[2 /* FrustumData.kType */]; }
@@ -74,9 +70,6 @@ class FrustumUniforms {
74
70
  return;
75
71
  (0, Sync_1.desync)(this);
76
72
  newFrustum.clone(this.planFrustum);
77
- const range = newFrustum.toRange(this._scratch.range);
78
- this._worldFrustumZRange[0] = range.low.z;
79
- this._worldFrustumZRange[1] = range.high.z;
80
73
  const farLowerLeft = newFrustum.getCorner(core_common_1.Npc.LeftBottomRear);
81
74
  const farLowerRight = newFrustum.getCorner(core_common_1.Npc.RightBottomRear);
82
75
  const farUpperLeft = newFrustum.getCorner(core_common_1.Npc.LeftTopRear);
@@ -1 +1 @@
1
- {"version":3,"file":"FrustumUniforms.js","sourceRoot":"","sources":["../../../../../src/internal/render/webgl/FrustumUniforms.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AA8NH,8BAMC;AAlOD,sDAAoD;AACpD,wDAA2G;AAC3G,oDAAkD;AAElD,iEAA8D;AAC9D,qCAAmC;AACnC,iCAAsC;AAuBtC;;;GAGG;AACH,MAAa,eAAe;IAC1B,uCAAuC;IACvB,WAAW,GAAG,IAAI,qBAAO,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AAE,GAAG,EAClB,MAAM,CAAC,CAAC;AACZ,CAAC;AAED,SAAS,OAAO,CAAC,IAAY,EAAE,KAAa,EAAE,MAAc,EAAE,GAAW,EAAE,IAAY,EAAE,GAAW,EAAE,MAAgB;IACpH,wBAAQ,CAAC,eAAe,CACtB,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,GAAG,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,GAAG,IAAI,CAAC,EAAE,GAAG,EACxE,GAAG,EAAE,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,MAAM,CAAC,EAAE,CAAC,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC,GAAG,GAAG,MAAM,CAAC,EAAE,GAAG,EACxE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC,GAAG,GAAG,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,IAAI,CAAC,EAC1E,GAAG,EAAE,GAAG,EAAE,CAAC,GAAG,EAAE,GAAG,EACnB,MAAM,CAAC,CAAC;AACZ,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 WebGL\n */\n\nimport { expectDefined } from \"@itwin/core-bentley\";\nimport { InverseMatrixState, Matrix4d, Point3d, Range3d, Transform, Vector3d } from \"@itwin/core-geometry\";\nimport { Frustum, Npc } from \"@itwin/core-common\";\nimport { UniformHandle } from \"./UniformHandle\";\nimport { IModelFrameLifecycle } from \"./IModelFrameLifecycle\";\nimport { Matrix4 } from \"./Matrix\";\nimport { desync, sync } from \"./Sync\";\n\n/** @internal */\nexport const enum FrustumUniformType { // eslint-disable-line no-restricted-syntax\n TwoDee,\n Orthographic,\n Perspective,\n}\n\n/** @internal */\nexport const enum Plane { // eslint-disable-line no-restricted-syntax\n kTop,\n kBottom,\n kLeft,\n kRight,\n}\n\nconst enum FrustumData { // eslint-disable-line no-restricted-syntax\n kNear,\n kFar,\n kType,\n}\n\n/** Represents a Target's frustum for use in glsl as a pair of uniforms.\n * Do not modify fields of exposed objects directly. e.g., do not directly manipulate the projection or view matrices - use the appropriate APIs.\n * @internal\n */\nexport class FrustumUniforms {\n // CPU state. Do not modify - use APIs.\n public readonly planFrustum = new Frustum();\n private _planFraction = 0;\n private readonly _nearPlaneCenter = new Point3d();\n public readonly viewMatrix = Transform.createIdentity();\n public readonly projectionMatrix = Matrix4d.createIdentity();\n private readonly _worldUpVector = Vector3d.unitZ();\n private readonly _viewUpVector = Vector3d.unitZ();\n\n // GPU state\n private readonly _planeData: Float32Array = new Float32Array(4);\n private readonly _frustumData: Float32Array = new Float32Array(3);\n private readonly _worldFrustumZRange: Float32Array = new Float32Array(2);\n public readonly projectionMatrix32 = new Matrix4();\n private readonly _logZData = new Float32Array(2);\n private readonly _viewUpVector32 = new Float32Array(3);\n\n // SyncTarget\n public syncKey = 0;\n\n // Scratch variables\n private readonly _scratch = {\n point3d: new Point3d(),\n vec3d: new Vector3d(),\n viewX: new Vector3d(),\n viewY: new Vector3d(),\n viewZ: new Vector3d(),\n range: new Range3d(),\n };\n\n public constructor() {\n }\n\n public bindProjectionMatrix(uniform: UniformHandle): void {\n if (!sync(this, uniform))\n uniform.setMatrix4(this.projectionMatrix32);\n }\n\n public bindUpVector(uniform: UniformHandle): void {\n if (!sync(this, uniform))\n uniform.setUniform3fv(this._viewUpVector32);\n }\n\n // uniform vec4 u_frustumPlanes; // { top, bottom, left, right }\n public get planes(): Float32Array { return this._planeData; }\n\n // uniform vec3 u_frustum; // { near, far, type }\n public get frustum(): Float32Array { return this._frustumData; }\n\n // uniform vec2 u_worldFrustumZRange // { min, max }\n public get worldFrustumZRange(): Float32Array { return this._worldFrustumZRange; }\n\n public get nearPlane(): number { return this._frustumData[FrustumData.kNear]; }\n public get farPlane(): number { return this._frustumData[FrustumData.kFar]; }\n public get type(): FrustumUniformType { return this.frustum[FrustumData.kType] as FrustumUniformType; }\n public get is2d(): boolean { return FrustumUniformType.TwoDee === this.type; }\n public get planFraction(): number { return this._planFraction; }\n\n // uniform vec2 u_logZ where x = 1/near and y = log(far/near)\n public get logZ(): Float32Array { return this._logZData; }\n\n public changeFrustum(newFrustum: Frustum, newFraction: number, is3d: boolean): void {\n if (newFraction === this._planFraction && is3d !== this.is2d && newFrustum.equals(this.planFrustum))\n return;\n\n desync(this);\n\n newFrustum.clone(this.planFrustum);\n\n const range = newFrustum.toRange(this._scratch.range);\n this._worldFrustumZRange[0] = range.low.z;\n this._worldFrustumZRange[1] = range.high.z;\n\n const farLowerLeft = newFrustum.getCorner(Npc.LeftBottomRear);\n const farLowerRight = newFrustum.getCorner(Npc.RightBottomRear);\n const farUpperLeft = newFrustum.getCorner(Npc.LeftTopRear);\n const farUpperRight = newFrustum.getCorner(Npc.RightTopRear);\n const nearLowerLeft = newFrustum.getCorner(Npc.LeftBottomFront);\n const nearLowerRight = newFrustum.getCorner(Npc.RightBottomFront);\n const nearUpperLeft = newFrustum.getCorner(Npc.LeftTopFront);\n const nearUpperRight = newFrustum.getCorner(Npc.RightTopFront);\n\n const nearCenter = nearLowerLeft.interpolate(0.5, nearUpperRight, this._scratch.point3d);\n\n const viewX = normalizedDifference(nearLowerRight, nearLowerLeft, this._scratch.viewX);\n const viewY = normalizedDifference(nearUpperLeft, nearLowerLeft, this._scratch.viewY);\n const viewZ = expectDefined(viewX.crossProduct(viewY, this._scratch.viewZ).normalize());\n\n this._planFraction = newFraction;\n\n if (!is3d || newFraction > 0.999) { // ortho or 2d\n const halfWidth = Vector3d.createStartEnd(farLowerRight, farLowerLeft, this._scratch.vec3d).magnitude() * 0.5;\n const halfHeight = Vector3d.createStartEnd(farLowerRight, farUpperRight).magnitude() * 0.5;\n const depth = Vector3d.createStartEnd(farLowerLeft, nearLowerLeft, this._scratch.vec3d).magnitude();\n\n lookIn(nearCenter, viewX, viewY, viewZ, this.viewMatrix);\n ortho(-halfWidth, halfWidth, -halfHeight, halfHeight, 0, depth, this.projectionMatrix);\n\n this._nearPlaneCenter.setFrom(nearLowerLeft);\n this._nearPlaneCenter.interpolate(0.5, nearUpperRight, this._nearPlaneCenter);\n\n this.setPlanes(halfHeight, -halfHeight, -halfWidth, halfWidth);\n this.setFrustum(0, depth, is3d ? FrustumUniformType.Orthographic : FrustumUniformType.TwoDee);\n } else { // perspective\n const scale = 1.0 / (1.0 - newFraction);\n const zVec = Vector3d.createStartEnd(farLowerLeft, nearLowerLeft, this._scratch.vec3d);\n const cameraPosition = fromSumOf(farLowerLeft, zVec, scale, this._scratch.point3d);\n\n const frustumLeft = dotDifference(farLowerLeft, cameraPosition, viewX) * newFraction;\n const frustumRight = dotDifference(farLowerRight, cameraPosition, viewX) * newFraction;\n const frustumBottom = dotDifference(farLowerLeft, cameraPosition, viewY) * newFraction;\n const frustumTop = dotDifference(farUpperLeft, cameraPosition, viewY) * newFraction;\n const frustumFront = -dotDifference(nearLowerLeft, cameraPosition, viewZ);\n const frustumBack = -dotDifference(farLowerLeft, cameraPosition, viewZ);\n\n lookIn(cameraPosition, viewX, viewY, viewZ, this.viewMatrix);\n frustum(frustumLeft, frustumRight, frustumBottom, frustumTop, frustumFront, frustumBack, this.projectionMatrix);\n\n IModelFrameLifecycle.onChangeCameraView.raiseEvent({\n cameraPosition,\n viewX,\n viewY,\n viewZ,\n });\n IModelFrameLifecycle.onChangeCameraFrustum.raiseEvent({\n type: FrustumUniformType.Perspective,\n left: frustumLeft,\n right: frustumRight,\n bottom: frustumBottom,\n top: frustumTop,\n front: frustumFront,\n back: frustumBack,\n });\n\n this._nearPlaneCenter.setFrom(nearLowerLeft);\n this._nearPlaneCenter.interpolate(0.5, nearUpperRight, this._nearPlaneCenter);\n\n this.setPlanes(frustumTop, frustumBottom, frustumLeft, frustumRight);\n this.setFrustum(frustumFront, frustumBack, FrustumUniformType.Perspective);\n }\n\n this.viewMatrix.matrix.inverseState = InverseMatrixState.unknown;\n\n this.viewMatrix.matrix.multiplyVector(this._worldUpVector, this._viewUpVector);\n this._viewUpVector.normalizeInPlace();\n this._viewUpVector32[0] = this._viewUpVector.x;\n this._viewUpVector32[1] = this._viewUpVector.y;\n this._viewUpVector32[2] = this._viewUpVector.z;\n\n this.projectionMatrix32.initFromMatrix4d(this.projectionMatrix);\n }\n\n public changeProjectionMatrix(newMatrix: Matrix4d): void {\n desync(this);\n this.projectionMatrix.setFrom(newMatrix);\n this.projectionMatrix32.initFromMatrix4d(this.projectionMatrix);\n }\n\n protected setPlanes(top: number, bottom: number, left: number, right: number): void {\n this._planeData[Plane.kTop] = top;\n this._planeData[Plane.kBottom] = bottom;\n this._planeData[Plane.kLeft] = left;\n this._planeData[Plane.kRight] = right;\n }\n\n protected setFrustum(nearPlane: number, farPlane: number, type: FrustumUniformType): void {\n this._frustumData[FrustumData.kNear] = nearPlane;\n this._frustumData[FrustumData.kFar] = farPlane;\n this._frustumData[FrustumData.kType] = type as number;\n\n // If nearPlane is zero, we don't have a camera (or got very unlucky); in that case shader will compute linear depth.\n this._logZData[0] = 0 !== nearPlane ? 1 / nearPlane : 0;\n this._logZData[1] = 0 !== nearPlane ? Math.log(farPlane / nearPlane) : farPlane;\n }\n}\n\nfunction normalizedDifference(p0: Point3d, p1: Point3d, out?: Vector3d): Vector3d {\n const result = undefined !== out ? out : new Vector3d();\n result.x = p0.x - p1.x;\n result.y = p0.y - p1.y;\n result.z = p0.z - p1.z;\n result.normalizeInPlace();\n return result;\n}\n\n/** @internal */\nexport function fromSumOf(p: Point3d, v: Vector3d, scale: number, out?: Point3d) {\n const result = undefined !== out ? out : new Point3d();\n result.x = p.x + v.x * scale;\n result.y = p.y + v.y * scale;\n result.z = p.z + v.z * scale;\n return result;\n}\n\nfunction dotDifference(pt: Point3d, origin: Point3d, vec: Vector3d): number {\n return (pt.x - origin.x) * vec.x + (pt.y - origin.y) * vec.y + (pt.z - origin.z) * vec.z;\n}\n\nfunction lookIn(eye: Point3d, viewX: Vector3d, viewY: Vector3d, viewZ: Vector3d, result: Transform) {\n const rot = result.matrix.coffs;\n rot[0] = viewX.x;\n rot[1] = viewX.y;\n rot[2] = viewX.z;\n rot[3] = viewY.x;\n rot[4] = viewY.y;\n rot[5] = viewY.z;\n rot[6] = viewZ.x;\n rot[7] = viewZ.y;\n rot[8] = viewZ.z;\n\n result.origin.x = -viewX.dotProduct(eye);\n result.origin.y = -viewY.dotProduct(eye);\n result.origin.z = -viewZ.dotProduct(eye);\n}\n\nfunction ortho(left: number, right: number, bottom: number, top: number, near: number, far: number, result: Matrix4d) {\n Matrix4d.createRowValues(\n 2.0 / (right - left), 0.0, 0.0, -(right + left) / (right - left),\n 0.0, 2.0 / (top - bottom), 0.0, -(top + bottom) / (top - bottom),\n 0.0, 0.0, -2.0 / (far - near), -(far + near) / (far - near),\n 0.0, 0.0, 0.0, 1.0,\n result);\n}\n\nfunction frustum(left: number, right: number, bottom: number, top: number, near: number, far: number, result: Matrix4d) {\n Matrix4d.createRowValues(\n (2.0 * near) / (right - left), 0.0, (right + left) / (right - left), 0.0,\n 0.0, (2.0 * near) / (top - bottom), (top + bottom) / (top - bottom), 0.0,\n 0.0, 0.0, -(far + near) / (far - near), -(2.0 * far * near) / (far - near),\n 0.0, 0.0, -1.0, 0.0,\n result);\n}\n"]}
1
+ {"version":3,"file":"FrustumUniforms.js","sourceRoot":"","sources":["../../../../../src/internal/render/webgl/FrustumUniforms.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAqNH,8BAMC;AAzND,sDAAoD;AACpD,wDAAkG;AAClG,oDAAkD;AAElD,iEAA8D;AAC9D,qCAAmC;AACnC,iCAAsC;AAuBtC;;;GAGG;AACH,MAAa,eAAe;IAC1B,uCAAuC;IACvB,WA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C,EAAE,CAAC,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC,GAAG,GAAG,MAAM,CAAC,EAAE,GAAG,EACxE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC,GAAG,GAAG,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,IAAI,CAAC,EAC1E,GAAG,EAAE,GAAG,EAAE,CAAC,GAAG,EAAE,GAAG,EACnB,MAAM,CAAC,CAAC;AACZ,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 WebGL\n */\n\nimport { expectDefined } from \"@itwin/core-bentley\";\nimport { InverseMatrixState, Matrix4d, Point3d, Transform, Vector3d } from \"@itwin/core-geometry\";\nimport { Frustum, Npc } from \"@itwin/core-common\";\nimport { UniformHandle } from \"./UniformHandle\";\nimport { IModelFrameLifecycle } from \"./IModelFrameLifecycle\";\nimport { Matrix4 } from \"./Matrix\";\nimport { desync, sync } from \"./Sync\";\n\n/** @internal */\nexport const enum FrustumUniformType { // eslint-disable-line no-restricted-syntax\n TwoDee,\n Orthographic,\n Perspective,\n}\n\n/** @internal */\nexport const enum Plane { // eslint-disable-line no-restricted-syntax\n kTop,\n kBottom,\n kLeft,\n kRight,\n}\n\nconst enum FrustumData { // eslint-disable-line no-restricted-syntax\n kNear,\n kFar,\n kType,\n}\n\n/** Represents a Target's frustum for use in glsl as a pair of uniforms.\n * Do not modify fields of exposed objects directly. e.g., do not directly manipulate the projection or view matrices - use the appropriate APIs.\n * @internal\n */\nexport class FrustumUniforms {\n // CPU state. Do not modify - use APIs.\n public readonly planFrustum = new Frustum();\n private _planFraction = 0;\n private readonly _nearPlaneCenter = new Point3d();\n public readonly viewMatrix = Transform.createIdentity();\n public readonly projectionMatrix = Matrix4d.createIdentity();\n private readonly _worldUpVector = Vector3d.unitZ();\n private readonly _viewUpVector = Vector3d.unitZ();\n\n // GPU state\n private readonly _planeData: Float32Array = new Float32Array(4);\n private readonly _frustumData: Float32Array = new Float32Array(3);\n public readonly projectionMatrix32 = new Matrix4();\n private readonly _logZData = new Float32Array(2);\n private readonly _viewUpVector32 = new Float32Array(3);\n\n // SyncTarget\n public syncKey = 0;\n\n // Scratch variables\n private readonly _scratch = {\n point3d: new Point3d(),\n vec3d: new Vector3d(),\n viewX: new Vector3d(),\n viewY: new Vector3d(),\n viewZ: new Vector3d(),\n };\n\n public constructor() {\n }\n\n public bindProjectionMatrix(uniform: UniformHandle): void {\n if (!sync(this, uniform))\n uniform.setMatrix4(this.projectionMatrix32);\n }\n\n public bindUpVector(uniform: UniformHandle): void {\n if (!sync(this, uniform))\n uniform.setUniform3fv(this._viewUpVector32);\n }\n\n // uniform vec4 u_frustumPlanes; // { top, bottom, left, right }\n public get planes(): Float32Array { return this._planeData; }\n\n // uniform vec3 u_frustum; // { near, far, type }\n public get frustum(): Float32Array { return this._frustumData; }\n\n public get nearPlane(): number { return this._frustumData[FrustumData.kNear]; }\n public get farPlane(): number { return this._frustumData[FrustumData.kFar]; }\n public get type(): FrustumUniformType { return this.frustum[FrustumData.kType] as FrustumUniformType; }\n public get is2d(): boolean { return FrustumUniformType.TwoDee === this.type; }\n public get planFraction(): number { return this._planFraction; }\n\n // uniform vec2 u_logZ where x = 1/near and y = log(far/near)\n public get logZ(): Float32Array { return this._logZData; }\n\n public changeFrustum(newFrustum: Frustum, newFraction: number, is3d: boolean): void {\n if (newFraction === this._planFraction && is3d !== this.is2d && newFrustum.equals(this.planFrustum))\n return;\n\n desync(this);\n\n newFrustum.clone(this.planFrustum);\n\n const farLowerLeft = newFrustum.getCorner(Npc.LeftBottomRear);\n const farLowerRight = newFrustum.getCorner(Npc.RightBottomRear);\n const farUpperLeft = newFrustum.getCorner(Npc.LeftTopRear);\n const farUpperRight = newFrustum.getCorner(Npc.RightTopRear);\n const nearLowerLeft = newFrustum.getCorner(Npc.LeftBottomFront);\n const nearLowerRight = newFrustum.getCorner(Npc.RightBottomFront);\n const nearUpperLeft = newFrustum.getCorner(Npc.LeftTopFront);\n const nearUpperRight = newFrustum.getCorner(Npc.RightTopFront);\n\n const nearCenter = nearLowerLeft.interpolate(0.5, nearUpperRight, this._scratch.point3d);\n\n const viewX = normalizedDifference(nearLowerRight, nearLowerLeft, this._scratch.viewX);\n const viewY = normalizedDifference(nearUpperLeft, nearLowerLeft, this._scratch.viewY);\n const viewZ = expectDefined(viewX.crossProduct(viewY, this._scratch.viewZ).normalize());\n\n this._planFraction = newFraction;\n\n if (!is3d || newFraction > 0.999) { // ortho or 2d\n const halfWidth = Vector3d.createStartEnd(farLowerRight, farLowerLeft, this._scratch.vec3d).magnitude() * 0.5;\n const halfHeight = Vector3d.createStartEnd(farLowerRight, farUpperRight).magnitude() * 0.5;\n const depth = Vector3d.createStartEnd(farLowerLeft, nearLowerLeft, this._scratch.vec3d).magnitude();\n\n lookIn(nearCenter, viewX, viewY, viewZ, this.viewMatrix);\n ortho(-halfWidth, halfWidth, -halfHeight, halfHeight, 0, depth, this.projectionMatrix);\n\n this._nearPlaneCenter.setFrom(nearLowerLeft);\n this._nearPlaneCenter.interpolate(0.5, nearUpperRight, this._nearPlaneCenter);\n\n this.setPlanes(halfHeight, -halfHeight, -halfWidth, halfWidth);\n this.setFrustum(0, depth, is3d ? FrustumUniformType.Orthographic : FrustumUniformType.TwoDee);\n } else { // perspective\n const scale = 1.0 / (1.0 - newFraction);\n const zVec = Vector3d.createStartEnd(farLowerLeft, nearLowerLeft, this._scratch.vec3d);\n const cameraPosition = fromSumOf(farLowerLeft, zVec, scale, this._scratch.point3d);\n\n const frustumLeft = dotDifference(farLowerLeft, cameraPosition, viewX) * newFraction;\n const frustumRight = dotDifference(farLowerRight, cameraPosition, viewX) * newFraction;\n const frustumBottom = dotDifference(farLowerLeft, cameraPosition, viewY) * newFraction;\n const frustumTop = dotDifference(farUpperLeft, cameraPosition, viewY) * newFraction;\n const frustumFront = -dotDifference(nearLowerLeft, cameraPosition, viewZ);\n const frustumBack = -dotDifference(farLowerLeft, cameraPosition, viewZ);\n\n lookIn(cameraPosition, viewX, viewY, viewZ, this.viewMatrix);\n frustum(frustumLeft, frustumRight, frustumBottom, frustumTop, frustumFront, frustumBack, this.projectionMatrix);\n\n IModelFrameLifecycle.onChangeCameraView.raiseEvent({\n cameraPosition,\n viewX,\n viewY,\n viewZ,\n });\n IModelFrameLifecycle.onChangeCameraFrustum.raiseEvent({\n type: FrustumUniformType.Perspective,\n left: frustumLeft,\n right: frustumRight,\n bottom: frustumBottom,\n top: frustumTop,\n front: frustumFront,\n back: frustumBack,\n });\n\n this._nearPlaneCenter.setFrom(nearLowerLeft);\n this._nearPlaneCenter.interpolate(0.5, nearUpperRight, this._nearPlaneCenter);\n\n this.setPlanes(frustumTop, frustumBottom, frustumLeft, frustumRight);\n this.setFrustum(frustumFront, frustumBack, FrustumUniformType.Perspective);\n }\n\n this.viewMatrix.matrix.inverseState = InverseMatrixState.unknown;\n\n this.viewMatrix.matrix.multiplyVector(this._worldUpVector, this._viewUpVector);\n this._viewUpVector.normalizeInPlace();\n this._viewUpVector32[0] = this._viewUpVector.x;\n this._viewUpVector32[1] = this._viewUpVector.y;\n this._viewUpVector32[2] = this._viewUpVector.z;\n\n this.projectionMatrix32.initFromMatrix4d(this.projectionMatrix);\n }\n\n public changeProjectionMatrix(newMatrix: Matrix4d): void {\n desync(this);\n this.projectionMatrix.setFrom(newMatrix);\n this.projectionMatrix32.initFromMatrix4d(this.projectionMatrix);\n }\n\n protected setPlanes(top: number, bottom: number, left: number, right: number): void {\n this._planeData[Plane.kTop] = top;\n this._planeData[Plane.kBottom] = bottom;\n this._planeData[Plane.kLeft] = left;\n this._planeData[Plane.kRight] = right;\n }\n\n protected setFrustum(nearPlane: number, farPlane: number, type: FrustumUniformType): void {\n this._frustumData[FrustumData.kNear] = nearPlane;\n this._frustumData[FrustumData.kFar] = farPlane;\n this._frustumData[FrustumData.kType] = type as number;\n\n // If nearPlane is zero, we don't have a camera (or got very unlucky); in that case shader will compute linear depth.\n this._logZData[0] = 0 !== nearPlane ? 1 / nearPlane : 0;\n this._logZData[1] = 0 !== nearPlane ? Math.log(farPlane / nearPlane) : farPlane;\n }\n}\n\nfunction normalizedDifference(p0: Point3d, p1: Point3d, out?: Vector3d): Vector3d {\n const result = undefined !== out ? out : new Vector3d();\n result.x = p0.x - p1.x;\n result.y = p0.y - p1.y;\n result.z = p0.z - p1.z;\n result.normalizeInPlace();\n return result;\n}\n\n/** @internal */\nexport function fromSumOf(p: Point3d, v: Vector3d, scale: number, out?: Point3d) {\n const result = undefined !== out ? out : new Point3d();\n result.x = p.x + v.x * scale;\n result.y = p.y + v.y * scale;\n result.z = p.z + v.z * scale;\n return result;\n}\n\nfunction dotDifference(pt: Point3d, origin: Point3d, vec: Vector3d): number {\n return (pt.x - origin.x) * vec.x + (pt.y - origin.y) * vec.y + (pt.z - origin.z) * vec.z;\n}\n\nfunction lookIn(eye: Point3d, viewX: Vector3d, viewY: Vector3d, viewZ: Vector3d, result: Transform) {\n const rot = result.matrix.coffs;\n rot[0] = viewX.x;\n rot[1] = viewX.y;\n rot[2] = viewX.z;\n rot[3] = viewY.x;\n rot[4] = viewY.y;\n rot[5] = viewY.z;\n rot[6] = viewZ.x;\n rot[7] = viewZ.y;\n rot[8] = viewZ.z;\n\n result.origin.x = -viewX.dotProduct(eye);\n result.origin.y = -viewY.dotProduct(eye);\n result.origin.z = -viewZ.dotProduct(eye);\n}\n\nfunction ortho(left: number, right: number, bottom: number, top: number, near: number, far: number, result: Matrix4d) {\n Matrix4d.createRowValues(\n 2.0 / (right - left), 0.0, 0.0, -(right + left) / (right - left),\n 0.0, 2.0 / (top - bottom), 0.0, -(top + bottom) / (top - bottom),\n 0.0, 0.0, -2.0 / (far - near), -(far + near) / (far - near),\n 0.0, 0.0, 0.0, 1.0,\n result);\n}\n\nfunction frustum(left: number, right: number, bottom: number, top: number, near: number, far: number, result: Matrix4d) {\n Matrix4d.createRowValues(\n (2.0 * near) / (right - left), 0.0, (right + left) / (right - left), 0.0,\n 0.0, (2.0 * near) / (top - bottom), (top + bottom) / (top - bottom), 0.0,\n 0.0, 0.0, -(far + near) / (far - near), -(2.0 * far * near) / (far - near),\n 0.0, 0.0, -1.0, 0.0,\n result);\n}\n"]}
@@ -1,7 +1,6 @@
1
1
  /** @packageDocumentation
2
2
  * @module WebGL
3
3
  */
4
- import { ContourDisplay } from "@itwin/core-common";
5
4
  import { SceneContext } from "../../../ViewContext";
6
5
  import { ViewRect } from "../../../common/ViewRect";
7
6
  import { Pixel } from "../../../render/Pixel";
@@ -19,12 +18,6 @@ import { ShaderProgramExecutor } from "./ShaderProgram";
19
18
  import { EyeDomeLighting } from "./EDL";
20
19
  export declare function collectTextureStatistics(texture: TextureHandle | undefined, stats: RenderMemory.Statistics): void;
21
20
  export declare function collectGeometryStatistics(geom: CachedGeometry | undefined, stats: RenderMemory.Statistics): void;
22
- interface ContourPixels {
23
- display: ContourDisplay;
24
- data: Uint32Array;
25
- zLow: number;
26
- zHigh: number;
27
- }
28
21
  /** Orchestrates rendering of the scene on behalf of a Target.
29
22
  * This base class exists only so we don't have to export all the types of the shared Compositor members like Textures, FrameBuffers, etc.
30
23
  * @internal
@@ -41,7 +34,6 @@ export declare abstract class SceneCompositor implements WebGLDisposable, Render
41
34
  abstract drawForReadPixels(_commands: RenderCommands, sceneOverlays: GraphicList, worldOverlayDecorations: GraphicList | undefined, viewOverlayDecorations: GraphicList | undefined): void;
42
35
  abstract readPixels(rect: ViewRect, selector: Pixel.Selector): Pixel.Buffer | undefined;
43
36
  abstract readDepthAndOrder(rect: ViewRect): Uint8Array | undefined;
44
- abstract readContours(rect: ViewRect): ContourPixels | undefined;
45
37
  abstract readFeatureIds(rect: ViewRect): Uint8Array | undefined;
46
38
  abstract updateSolarShadows(context: SceneContext | undefined): void;
47
39
  abstract drawPrimitive(primitive: Primitive, exec: ShaderProgramExecutor, outputsToPick: boolean): void;
@@ -56,5 +48,4 @@ export declare abstract class SceneCompositor implements WebGLDisposable, Render
56
48
  static create(target: Target): SceneCompositor;
57
49
  abstract collectStatistics(stats: RenderMemory.Statistics): void;
58
50
  }
59
- export {};
60
51
  //# sourceMappingURL=SceneCompositor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SceneCompositor.d.ts","sourceRoot":"","sources":["../../../../../src/internal/render/webgl/SceneCompositor.ts"],"names":[],"mappings":"AAIA;;GAEG;AAIH,OAAO,EACH,cAAc,EAEjB,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEpD,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAG5D,OAAO,EAC2D,cAAc,EAE/E,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAe,WAAW,EAAE,MAAM,eAAe,CAAC;AAIzD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAIlD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE1C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAW,eAAe,EAAE,MAAM,OAAO,CAAC;AAGjD,wBAAgB,wBAAwB,CAAC,OAA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,CAAC,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE,qBAAqB,EAAE,aAAa,EAAE,OAAO,GAAG,IAAI;aAC9F,iBAAiB,IAAI,IAAI;IAEzC,8GAA8G;IAC9G,aAAoB,oBAAoB,IAAI,WAAW,CAAC;IAExD,aAAoB,UAAU,IAAI,aAAa,CAAC;IAChD,aAAoB,aAAa,IAAI,aAAa,CAAC;IACnD,aAAoB,gBAAgB,IAAI,MAAM,CAAC;IAE/C,IAAW,eAAe,IAAI,OAAO,CAAkC;IAEvE,SAAS,aAAa,MAAM,EAAE,MAAM;WAOtB,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,eAAe;aAIrC,iBAAiB,CAAC,KAAK,EAAE,YAAY,CAAC,UAAU,GAAG,IAAI;CACxE"}
@@ -47,8 +47,6 @@ class Textures {
47
47
  featureId;
48
48
  depthAndOrder;
49
49
  depthAndOrderHidden; // only used if AO and multisampling
50
- contours;
51
- contoursMsBuff;
52
50
  hilite;
53
51
  occlusion;
54
52
  occlusionBlur;
@@ -66,8 +64,6 @@ class Textures {
66
64
  && undefined === this.color
67
65
  && undefined === this.featureId
68
66
  && undefined === this.depthAndOrder
69
- && undefined === this.contours
70
- && undefined === this.contoursMsBuff
71
67
  && undefined === this.depthAndOrderHidden
72
68
  && undefined === this.hilite
73
69
  && undefined === this.occlusion
@@ -87,8 +83,6 @@ class Textures {
87
83
  this.color = (0, core_bentley_1.dispose)(this.color);
88
84
  this.featureId = (0, core_bentley_1.dispose)(this.featureId);
89
85
  this.depthAndOrder = (0, core_bentley_1.dispose)(this.depthAndOrder);
90
- this.contours = (0, core_bentley_1.dispose)(this.contours);
91
- this.contoursMsBuff = (0, core_bentley_1.dispose)(this.contoursMsBuff);
92
86
  this.depthAndOrderHidden = (0, core_bentley_1.dispose)(this.depthAndOrderHidden);
93
87
  this.hilite = (0, core_bentley_1.dispose)(this.hilite);
94
88
  this.occlusion = (0, core_bentley_1.dispose)(this.occlusion);
@@ -108,8 +102,6 @@ class Textures {
108
102
  collectTextureStatistics(this.color, stats);
109
103
  collectTextureStatistics(this.featureId, stats);
110
104
  collectTextureStatistics(this.depthAndOrder, stats);
111
- collectTextureStatistics(this.contours, stats);
112
- collectMsBufferStatistics(this.contoursMsBuff, stats);
113
105
  collectTextureStatistics(this.depthAndOrderHidden, stats);
114
106
  collectTextureStatistics(this.hilite, stats);
115
107
  collectTextureStatistics(this.occlusion, stats);
@@ -148,13 +140,11 @@ class Textures {
148
140
  this.color = Texture_1.TextureHandle.createForAttachment(width, height, GL_1.GL.Texture.Format.Rgba, GL_1.GL.Texture.DataType.UnsignedByte);
149
141
  this.featureId = Texture_1.TextureHandle.createForAttachment(width, height, GL_1.GL.Texture.Format.Rgba, GL_1.GL.Texture.DataType.UnsignedByte);
150
142
  this.depthAndOrder = Texture_1.TextureHandle.createForAttachment(width, height, GL_1.GL.Texture.Format.Rgba, GL_1.GL.Texture.DataType.UnsignedByte);
151
- this.contours = Texture_1.TextureHandle.createForAttachment(width, height, GL_1.GL.Texture.Format.Rgba, GL_1.GL.Texture.DataType.UnsignedByte);
152
143
  let rVal = undefined !== this.accumulation
153
144
  && undefined !== this.revealage
154
145
  && undefined !== this.color
155
146
  && undefined !== this.featureId
156
147
  && undefined !== this.depthAndOrder
157
- && undefined !== this.contours
158
148
  && undefined !== this.hilite;
159
149
  if (rVal && numSamples > 1) {
160
150
  rVal = this.enableMultiSampling(width, height, numSamples);
@@ -199,14 +189,12 @@ class Textures {
199
189
  this.featureIdMsBuffHidden = RenderBuffer_1.RenderBufferMultiSample.create(width, height, WebGL2RenderingContext.RGBA8, numSamples);
200
190
  this.depthAndOrderMsBuff = RenderBuffer_1.RenderBufferMultiSample.create(width, height, WebGL2RenderingContext.RGBA8, numSamples);
201
191
  this.depthAndOrderMsBuffHidden = RenderBuffer_1.RenderBufferMultiSample.create(width, height, WebGL2RenderingContext.RGBA8, numSamples);
202
- this.contoursMsBuff = RenderBuffer_1.RenderBufferMultiSample.create(width, height, WebGL2RenderingContext.RGBA8, numSamples);
203
192
  this.hiliteMsBuff = RenderBuffer_1.RenderBufferMultiSample.create(width, height, WebGL2RenderingContext.RGBA8, numSamples);
204
193
  return undefined !== this.colorMsBuff
205
194
  && undefined !== this.featureIdMsBuff
206
195
  && undefined !== this.featureIdMsBuffHidden
207
196
  && undefined !== this.depthAndOrderMsBuff
208
197
  && undefined !== this.depthAndOrderMsBuffHidden
209
- && undefined !== this.contoursMsBuff
210
198
  && undefined !== this.hiliteMsBuff;
211
199
  }
212
200
  disableMultiSampling() {
@@ -215,7 +203,6 @@ class Textures {
215
203
  this.featureIdMsBuffHidden = (0, core_bentley_1.dispose)(this.featureIdMsBuffHidden);
216
204
  this.depthAndOrderMsBuff = (0, core_bentley_1.dispose)(this.depthAndOrderMsBuff);
217
205
  this.depthAndOrderMsBuffHidden = (0, core_bentley_1.dispose)(this.depthAndOrderMsBuffHidden);
218
- this.contoursMsBuff = (0, core_bentley_1.dispose)(this.contoursMsBuff);
219
206
  this.hiliteMsBuff = (0, core_bentley_1.dispose)(this.hiliteMsBuff);
220
207
  return true;
221
208
  }
@@ -225,7 +212,6 @@ class FrameBuffers {
225
212
  opaqueColor;
226
213
  opaqueAndCompositeColor;
227
214
  depthAndOrder;
228
- contours;
229
215
  hilite;
230
216
  hiliteUsingStencil;
231
217
  stencilSet;
@@ -250,10 +236,9 @@ class FrameBuffers {
250
236
  if (!this.initPotentialMSFbos(textures, depth, depthMS))
251
237
  return false;
252
238
  this.depthAndOrder = FrameBuffer_1.FrameBuffer.create([(0, core_bentley_1.expectDefined)(textures.depthAndOrder)], depth);
253
- this.contours = FrameBuffer_1.FrameBuffer.create([(0, core_bentley_1.expectDefined)(textures.contours)], depth);
254
239
  this.hilite = FrameBuffer_1.FrameBuffer.create([(0, core_bentley_1.expectDefined)(textures.hilite)], depth);
255
240
  this.hiliteUsingStencil = FrameBuffer_1.FrameBuffer.create([(0, core_bentley_1.expectDefined)(textures.hilite)], depth);
256
- if (!this.depthAndOrder || !this.contours || !this.hilite || !this.hiliteUsingStencil)
241
+ if (!this.depthAndOrder || !this.hilite || !this.hiliteUsingStencil)
257
242
  return false;
258
243
  (0, core_bentley_1.assert)(undefined === this.opaqueAll);
259
244
  if (!this.initPotentialMSMRTFbos(textures, depth, depthMS))
@@ -294,10 +279,9 @@ class FrameBuffers {
294
279
  undefined !== textures.color &&
295
280
  undefined !== textures.featureId &&
296
281
  undefined !== textures.depthAndOrder &&
297
- undefined !== textures.contours &&
298
282
  undefined !== textures.accumulation &&
299
283
  undefined !== textures.revealage);
300
- const colorAndPick = [boundColor, textures.featureId, textures.depthAndOrder, textures.contours];
284
+ const colorAndPick = [boundColor, textures.featureId, textures.depthAndOrder];
301
285
  if (undefined === depthMs) {
302
286
  this.opaqueAll = FrameBuffer_1.FrameBuffer.create(colorAndPick, depth);
303
287
  colorAndPick[0] = textures.color;
@@ -307,10 +291,9 @@ class FrameBuffers {
307
291
  (0, core_bentley_1.assert)(undefined !== textures.colorMsBuff &&
308
292
  undefined !== textures.featureIdMsBuff &&
309
293
  undefined !== textures.featureIdMsBuffHidden &&
310
- undefined !== textures.contoursMsBuff &&
311
294
  undefined !== textures.depthAndOrderMsBuff &&
312
295
  undefined !== textures.depthAndOrderMsBuffHidden);
313
- const colorAndPickMsBuffs = [textures.colorMsBuff, textures.featureIdMsBuff, textures.depthAndOrderMsBuff, textures.contoursMsBuff];
296
+ const colorAndPickMsBuffs = [textures.colorMsBuff, textures.featureIdMsBuff, textures.depthAndOrderMsBuff];
314
297
  const colorAndPickFilters = [GL_1.GL.MultiSampling.Filter.Linear, GL_1.GL.MultiSampling.Filter.Nearest, GL_1.GL.MultiSampling.Filter.Nearest, GL_1.GL.MultiSampling.Filter.Nearest];
315
298
  this.opaqueAll = FrameBuffer_1.FrameBuffer.create(colorAndPick, depth, colorAndPickMsBuffs, colorAndPickFilters, depthMs);
316
299
  colorAndPick[0] = textures.color;
@@ -426,7 +409,7 @@ class FrameBuffers {
426
409
  return this.initPotentialMSFbos(textures, depth, undefined);
427
410
  }
428
411
  get isDisposed() {
429
- return undefined === this.opaqueColor && undefined === this.opaqueAndCompositeColor && undefined === this.depthAndOrder && undefined === this.contours
412
+ return undefined === this.opaqueColor && undefined === this.opaqueAndCompositeColor && undefined === this.depthAndOrder
430
413
  && undefined === this.hilite && undefined === this.hiliteUsingStencil && undefined === this.occlusion
431
414
  && undefined === this.occlusionBlur && undefined === this.stencilSet && undefined === this.altZOnly
432
415
  && undefined === this.volClassCreateBlend && undefined === this.volClassCreateBlendAltZ && undefined === this.opaqueAll
@@ -439,7 +422,6 @@ class FrameBuffers {
439
422
  this.opaqueColor = (0, core_bentley_1.dispose)(this.opaqueColor);
440
423
  this.opaqueAndCompositeColor = (0, core_bentley_1.dispose)(this.opaqueAndCompositeColor);
441
424
  this.depthAndOrder = (0, core_bentley_1.dispose)(this.depthAndOrder);
442
- this.contours = (0, core_bentley_1.dispose)(this.contours);
443
425
  this.hilite = (0, core_bentley_1.dispose)(this.hilite);
444
426
  this.hiliteUsingStencil = (0, core_bentley_1.dispose)(this.hiliteUsingStencil);
445
427
  this.occlusion = (0, core_bentley_1.dispose)(this.occlusion);
@@ -556,7 +538,6 @@ class PixelBuffer {
556
538
  _selector;
557
539
  _featureId;
558
540
  _depthAndOrder;
559
- _contours;
560
541
  _batchState;
561
542
  _scratchModelFeature = core_common_1.ModelFeature.create();
562
543
  get _numPixels() { return this._rect.width * this._rect.height; }
@@ -670,28 +651,6 @@ class PixelBuffer {
670
651
  }
671
652
  }
672
653
  }
673
- let contour;
674
- if (this._contours) {
675
- const contour32 = this.getPixel32(this._contours.data, index);
676
- if (contour32) { // undefined means out of bounds; zero means not a contour.
677
- const groupIndexAndType = this.decodeUint8(contour32, 32);
678
- const groupIndex = groupIndexAndType & ~(8 | 16);
679
- const group = this._contours.display.groups[groupIndex];
680
- if (group) {
681
- const elevationFraction = this.decodeDepthRgba(contour32);
682
- let elevation = elevationFraction * (this._contours.zHigh - this._contours.zLow) + this._contours.zLow;
683
- // The shader rounds to the nearest contour elevation using single-precision arithmetic.
684
- // Re-round here using double-precision to get closer.
685
- const interval = group.contourDef.minorInterval;
686
- elevation = (elevation >= 0 ? Math.floor((elevation + interval / 2) / interval) : Math.ceil((elevation - interval / 2) / interval)) * interval;
687
- contour = {
688
- group,
689
- elevation,
690
- isMajor: groupIndexAndType > 15,
691
- };
692
- }
693
- }
694
- }
695
654
  let featureTable, iModel, transformToIModel, tileId, viewAttachmentId, inSectionDrawingAttachment;
696
655
  if (undefined !== batchInfo) {
697
656
  featureTable = batchInfo.featureTable;
@@ -712,7 +671,6 @@ class PixelBuffer {
712
671
  tileId,
713
672
  viewAttachmentId,
714
673
  inSectionDrawingAttachment,
715
- contour,
716
674
  });
717
675
  }
718
676
  constructor(rect, selector, compositor) {
@@ -733,10 +691,6 @@ class PixelBuffer {
733
691
  else
734
692
  this._selector &= ~Pixel_1.Pixel.Selector.Feature;
735
693
  }
736
- // Note: readContours is a no-op unless contours are actually being drawn.
737
- if (Pixel_1.Pixel.Selector.None !== (selector & Pixel_1.Pixel.Selector.Contours)) {
738
- this._contours = compositor.readContours(rect);
739
- }
740
694
  }
741
695
  get isEmpty() { return Pixel_1.Pixel.Selector.None === this._selector; }
742
696
  static create(rect, selector, compositor) {
@@ -1424,23 +1378,6 @@ class Compositor extends SceneCompositor {
1424
1378
  readDepthAndOrder(rect) {
1425
1379
  return this.readFrameBuffer(rect, this._fbos.depthAndOrder);
1426
1380
  }
1427
- readContours(rect) {
1428
- // Are we actually drawing any contours? If not, don't bother reading an array of all zeroes off the GPU.
1429
- const contours = this.target.currentContours;
1430
- if (!contours || !contours.displayContours || contours.groups.length === 0) {
1431
- return undefined;
1432
- }
1433
- const info = this.readFrameBuffer(rect, this._fbos.contours);
1434
- if (!info) {
1435
- return undefined;
1436
- }
1437
- return {
1438
- data: new Uint32Array(info.buffer),
1439
- display: contours,
1440
- zLow: this.target.uniforms.frustum.worldFrustumZRange[0],
1441
- zHigh: this.target.uniforms.frustum.worldFrustumZRange[1],
1442
- };
1443
- }
1444
1381
  readFeatureIds(rect) {
1445
1382
  const tex = this._textures.featureId;
1446
1383
  if (undefined === tex)