@itwin/core-frontend 3.6.0-dev.5 → 3.6.0-dev.50
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.
- package/CHANGELOG.md +36 -1
- package/LICENSE.md +1 -1
- package/lib/cjs/AccuDraw.js +1 -1
- package/lib/cjs/AccuDraw.js.map +1 -1
- package/lib/cjs/IModelApp.d.ts +3 -3
- package/lib/cjs/IModelApp.d.ts.map +1 -1
- package/lib/cjs/IModelApp.js +2 -2
- package/lib/cjs/IModelApp.js.map +1 -1
- package/lib/cjs/NoRenderApp.d.ts.map +1 -1
- package/lib/cjs/NoRenderApp.js +3 -0
- package/lib/cjs/NoRenderApp.js.map +1 -1
- package/lib/cjs/Tiles.d.ts +4 -0
- package/lib/cjs/Tiles.d.ts.map +1 -1
- package/lib/cjs/Tiles.js +11 -0
- package/lib/cjs/Tiles.js.map +1 -1
- package/lib/cjs/ViewContext.js +1 -1
- package/lib/cjs/ViewContext.js.map +1 -1
- package/lib/cjs/ViewManager.d.ts.map +1 -1
- package/lib/cjs/ViewManager.js +2 -3
- package/lib/cjs/ViewManager.js.map +1 -1
- package/lib/cjs/ViewState.d.ts +4 -5
- package/lib/cjs/ViewState.d.ts.map +1 -1
- package/lib/cjs/ViewState.js +0 -1
- package/lib/cjs/ViewState.js.map +1 -1
- package/lib/cjs/Viewport.d.ts +48 -3
- package/lib/cjs/Viewport.d.ts.map +1 -1
- package/lib/cjs/Viewport.js +56 -2
- package/lib/cjs/Viewport.js.map +1 -1
- package/lib/cjs/extension/ExtensionRuntime.js +3 -0
- package/lib/cjs/extension/ExtensionRuntime.js.map +1 -1
- package/lib/cjs/render/GraphicBranch.d.ts +3 -0
- package/lib/cjs/render/GraphicBranch.d.ts.map +1 -1
- package/lib/cjs/render/GraphicBranch.js.map +1 -1
- package/lib/cjs/render/MockRender.d.ts.map +1 -1
- package/lib/cjs/render/MockRender.js +3 -0
- package/lib/cjs/render/MockRender.js.map +1 -1
- package/lib/cjs/render/RealityMeshParams.d.ts +3 -4
- package/lib/cjs/render/RealityMeshParams.d.ts.map +1 -1
- package/lib/cjs/render/RealityMeshParams.js +9 -5
- package/lib/cjs/render/RealityMeshParams.js.map +1 -1
- package/lib/cjs/render/VisibleFeature.d.ts +5 -5
- package/lib/cjs/render/VisibleFeature.js.map +1 -1
- package/lib/cjs/render/webgl/BackgroundMapDrape.js +3 -3
- package/lib/cjs/render/webgl/BackgroundMapDrape.js.map +1 -1
- package/lib/cjs/render/webgl/BranchState.d.ts +3 -0
- package/lib/cjs/render/webgl/BranchState.d.ts.map +1 -1
- package/lib/cjs/render/webgl/BranchState.js +5 -0
- package/lib/cjs/render/webgl/BranchState.js.map +1 -1
- package/lib/cjs/render/webgl/CachedGeometry.d.ts +32 -0
- package/lib/cjs/render/webgl/CachedGeometry.d.ts.map +1 -1
- package/lib/cjs/render/webgl/CachedGeometry.js +74 -1
- package/lib/cjs/render/webgl/CachedGeometry.js.map +1 -1
- package/lib/cjs/render/webgl/DrawCommand.d.ts.map +1 -1
- package/lib/cjs/render/webgl/DrawCommand.js +6 -4
- package/lib/cjs/render/webgl/DrawCommand.js.map +1 -1
- package/lib/cjs/render/webgl/EDL.d.ts +40 -0
- package/lib/cjs/render/webgl/EDL.d.ts.map +1 -0
- package/lib/cjs/render/webgl/EDL.js +264 -0
- package/lib/cjs/render/webgl/EDL.js.map +1 -0
- package/lib/cjs/render/webgl/EdgeSettings.js +2 -2
- package/lib/cjs/render/webgl/FrameBuffer.d.ts +4 -0
- package/lib/cjs/render/webgl/FrameBuffer.d.ts.map +1 -1
- package/lib/cjs/render/webgl/FrameBuffer.js +9 -0
- package/lib/cjs/render/webgl/FrameBuffer.js.map +1 -1
- package/lib/cjs/render/webgl/FrustumUniforms.d.ts +7 -0
- package/lib/cjs/render/webgl/FrustumUniforms.d.ts.map +1 -1
- package/lib/cjs/render/webgl/FrustumUniforms.js.map +1 -1
- package/lib/cjs/render/webgl/Layer.js +2 -2
- package/lib/cjs/render/webgl/LayerCommands.js +2 -2
- package/lib/cjs/render/webgl/PlanarClassifier.d.ts.map +1 -1
- package/lib/cjs/render/webgl/PlanarClassifier.js +9 -8
- package/lib/cjs/render/webgl/PlanarClassifier.js.map +1 -1
- package/lib/cjs/render/webgl/PlanarTextureProjection.js +1 -1
- package/lib/cjs/render/webgl/PlanarTextureProjection.js.map +1 -1
- package/lib/cjs/render/webgl/PointCloud.d.ts +2 -2
- package/lib/cjs/render/webgl/PointCloud.d.ts.map +1 -1
- package/lib/cjs/render/webgl/PointCloud.js +2 -0
- package/lib/cjs/render/webgl/PointCloud.js.map +1 -1
- package/lib/cjs/render/webgl/RealityMesh.d.ts +3 -1
- package/lib/cjs/render/webgl/RealityMesh.d.ts.map +1 -1
- package/lib/cjs/render/webgl/RealityMesh.js +8 -3
- package/lib/cjs/render/webgl/RealityMesh.js.map +1 -1
- package/lib/cjs/render/webgl/RealityModelUniforms.d.ts +9 -0
- package/lib/cjs/render/webgl/RealityModelUniforms.d.ts.map +1 -1
- package/lib/cjs/render/webgl/RealityModelUniforms.js +50 -0
- package/lib/cjs/render/webgl/RealityModelUniforms.js.map +1 -1
- package/lib/cjs/render/webgl/RenderCommands.d.ts +2 -1
- package/lib/cjs/render/webgl/RenderCommands.d.ts.map +1 -1
- package/lib/cjs/render/webgl/RenderCommands.js +46 -38
- package/lib/cjs/render/webgl/RenderCommands.js.map +1 -1
- package/lib/cjs/render/webgl/RenderFlags.d.ts +19 -17
- package/lib/cjs/render/webgl/RenderFlags.d.ts.map +1 -1
- package/lib/cjs/render/webgl/RenderFlags.js +8 -6
- package/lib/cjs/render/webgl/RenderFlags.js.map +1 -1
- package/lib/cjs/render/webgl/SceneCompositor.d.ts +6 -1
- package/lib/cjs/render/webgl/SceneCompositor.d.ts.map +1 -1
- package/lib/cjs/render/webgl/SceneCompositor.js +195 -76
- package/lib/cjs/render/webgl/SceneCompositor.js.map +1 -1
- package/lib/cjs/render/webgl/SolarShadowMap.js +3 -3
- package/lib/cjs/render/webgl/SolarShadowMap.js.map +1 -1
- package/lib/cjs/render/webgl/SurfaceGeometry.js +5 -5
- package/lib/cjs/render/webgl/Target.js +7 -7
- package/lib/cjs/render/webgl/Target.js.map +1 -1
- package/lib/cjs/render/webgl/Technique.d.ts.map +1 -1
- package/lib/cjs/render/webgl/Technique.js +18 -3
- package/lib/cjs/render/webgl/Technique.js.map +1 -1
- package/lib/cjs/render/webgl/TechniqueFlags.js +4 -4
- package/lib/cjs/render/webgl/TechniqueFlags.js.map +1 -1
- package/lib/cjs/render/webgl/TechniqueId.d.ts +6 -2
- package/lib/cjs/render/webgl/TechniqueId.d.ts.map +1 -1
- package/lib/cjs/render/webgl/TechniqueId.js.map +1 -1
- package/lib/cjs/render/webgl/UniformHandle.d.ts.map +1 -1
- package/lib/cjs/render/webgl/UniformHandle.js +1 -2
- package/lib/cjs/render/webgl/UniformHandle.js.map +1 -1
- package/lib/cjs/render/webgl/VisibleTileFeatures.js +5 -5
- package/lib/cjs/render/webgl/glsl/EDL.d.ts +14 -0
- package/lib/cjs/render/webgl/glsl/EDL.d.ts.map +1 -0
- package/lib/cjs/render/webgl/glsl/EDL.js +260 -0
- package/lib/cjs/render/webgl/glsl/EDL.js.map +1 -0
- package/lib/cjs/render/webgl/glsl/RenderPass.js +12 -12
- package/lib/cjs/render/webgl/glsl/RenderPass.js.map +1 -1
- package/lib/cjs/tile/BatchedTileIdMap.js +1 -1
- package/lib/cjs/tile/BatchedTileIdMap.js.map +1 -1
- package/lib/cjs/tile/DynamicIModelTile.js +1 -1
- package/lib/cjs/tile/DynamicIModelTile.js.map +1 -1
- package/lib/cjs/tile/GltfReader.js +1 -1
- package/lib/cjs/tile/GltfReader.js.map +1 -1
- package/lib/cjs/tile/IModelTile.js +1 -1
- package/lib/cjs/tile/IModelTile.js.map +1 -1
- package/lib/cjs/tile/ImdlReader.js +5 -5
- package/lib/cjs/tile/ImdlReader.js.map +1 -1
- package/lib/cjs/tile/RealityModelTileTree.d.ts.map +1 -1
- package/lib/cjs/tile/RealityModelTileTree.js +2 -1
- package/lib/cjs/tile/RealityModelTileTree.js.map +1 -1
- package/lib/cjs/tile/RealityTileLoader.js +2 -2
- package/lib/cjs/tile/RealityTileLoader.js.map +1 -1
- package/lib/cjs/tile/RealityTileTree.d.ts +5 -0
- package/lib/cjs/tile/RealityTileTree.d.ts.map +1 -1
- package/lib/cjs/tile/RealityTileTree.js +9 -4
- package/lib/cjs/tile/RealityTileTree.js.map +1 -1
- package/lib/cjs/tile/TileDrawArgs.js +1 -1
- package/lib/cjs/tile/TileDrawArgs.js.map +1 -1
- package/lib/cjs/tile/TileTreeReference.d.ts +3 -0
- package/lib/cjs/tile/TileTreeReference.d.ts.map +1 -1
- package/lib/cjs/tile/TileTreeReference.js +3 -0
- package/lib/cjs/tile/TileTreeReference.js.map +1 -1
- package/lib/cjs/tile/map/CesiumTerrainProvider.js +9 -9
- package/lib/cjs/tile/map/CesiumTerrainProvider.js.map +1 -1
- package/lib/cjs/tile/map/ImageryProviders/ArcGISImageryProvider.d.ts.map +1 -1
- package/lib/cjs/tile/map/ImageryProviders/ArcGISImageryProvider.js +1 -2
- package/lib/cjs/tile/map/ImageryProviders/ArcGISImageryProvider.js.map +1 -1
- package/lib/cjs/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.js +2 -2
- package/lib/cjs/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.js.map +1 -1
- package/lib/cjs/tile/map/ImageryProviders/WmtsMapLayerImageryProvider.js +1 -1
- package/lib/cjs/tile/map/ImageryProviders/WmtsMapLayerImageryProvider.js.map +1 -1
- package/lib/cjs/tile/map/ImageryTileTree.d.ts +26 -1
- package/lib/cjs/tile/map/ImageryTileTree.d.ts.map +1 -1
- package/lib/cjs/tile/map/ImageryTileTree.js +54 -4
- package/lib/cjs/tile/map/ImageryTileTree.js.map +1 -1
- package/lib/cjs/tile/map/MapLayerImageryProvider.d.ts +7 -3
- package/lib/cjs/tile/map/MapLayerImageryProvider.d.ts.map +1 -1
- package/lib/cjs/tile/map/MapLayerImageryProvider.js +12 -8
- package/lib/cjs/tile/map/MapLayerImageryProvider.js.map +1 -1
- package/lib/cjs/tile/map/MapTile.d.ts +5 -0
- package/lib/cjs/tile/map/MapTile.d.ts.map +1 -1
- package/lib/cjs/tile/map/MapTile.js +33 -13
- package/lib/cjs/tile/map/MapTile.js.map +1 -1
- package/lib/cjs/tile/map/MapTileTree.d.ts +42 -3
- package/lib/cjs/tile/map/MapTileTree.d.ts.map +1 -1
- package/lib/cjs/tile/map/MapTileTree.js +126 -9
- package/lib/cjs/tile/map/MapTileTree.js.map +1 -1
- package/lib/cjs/tile/map/MapTiledGraphicsProvider.d.ts +17 -0
- package/lib/cjs/tile/map/MapTiledGraphicsProvider.d.ts.map +1 -1
- package/lib/cjs/tile/map/MapTiledGraphicsProvider.js +26 -0
- package/lib/cjs/tile/map/MapTiledGraphicsProvider.js.map +1 -1
- package/lib/cjs/tile/map/WmtsCapabilities.d.ts +23 -68
- package/lib/cjs/tile/map/WmtsCapabilities.d.ts.map +1 -1
- package/lib/cjs/tile/map/WmtsCapabilities.js +269 -260
- package/lib/cjs/tile/map/WmtsCapabilities.js.map +1 -1
- package/lib/cjs/tools/ClipViewTool.js +2 -2
- package/lib/cjs/tools/ClipViewTool.js.map +1 -1
- package/lib/cjs/tools/MeasureTool.js +2 -2
- package/lib/cjs/tools/MeasureTool.js.map +1 -1
- package/lib/esm/AccuDraw.js +1 -1
- package/lib/esm/AccuDraw.js.map +1 -1
- package/lib/esm/IModelApp.d.ts +3 -3
- package/lib/esm/IModelApp.d.ts.map +1 -1
- package/lib/esm/IModelApp.js +2 -2
- package/lib/esm/IModelApp.js.map +1 -1
- package/lib/esm/NoRenderApp.d.ts.map +1 -1
- package/lib/esm/NoRenderApp.js +3 -0
- package/lib/esm/NoRenderApp.js.map +1 -1
- package/lib/esm/Tiles.d.ts +4 -0
- package/lib/esm/Tiles.d.ts.map +1 -1
- package/lib/esm/Tiles.js +11 -0
- package/lib/esm/Tiles.js.map +1 -1
- package/lib/esm/ViewContext.js +1 -1
- package/lib/esm/ViewContext.js.map +1 -1
- package/lib/esm/ViewManager.d.ts.map +1 -1
- package/lib/esm/ViewManager.js +2 -3
- package/lib/esm/ViewManager.js.map +1 -1
- package/lib/esm/ViewState.d.ts +4 -5
- package/lib/esm/ViewState.d.ts.map +1 -1
- package/lib/esm/ViewState.js +0 -1
- package/lib/esm/ViewState.js.map +1 -1
- package/lib/esm/Viewport.d.ts +48 -3
- package/lib/esm/Viewport.d.ts.map +1 -1
- package/lib/esm/Viewport.js +57 -3
- package/lib/esm/Viewport.js.map +1 -1
- package/lib/esm/extension/ExtensionRuntime.js +5 -2
- package/lib/esm/extension/ExtensionRuntime.js.map +1 -1
- package/lib/esm/render/GraphicBranch.d.ts +3 -0
- package/lib/esm/render/GraphicBranch.d.ts.map +1 -1
- package/lib/esm/render/GraphicBranch.js.map +1 -1
- package/lib/esm/render/MockRender.d.ts.map +1 -1
- package/lib/esm/render/MockRender.js +3 -0
- package/lib/esm/render/MockRender.js.map +1 -1
- package/lib/esm/render/RealityMeshParams.d.ts +3 -4
- package/lib/esm/render/RealityMeshParams.d.ts.map +1 -1
- package/lib/esm/render/RealityMeshParams.js +10 -6
- package/lib/esm/render/RealityMeshParams.js.map +1 -1
- package/lib/esm/render/VisibleFeature.d.ts +5 -5
- package/lib/esm/render/VisibleFeature.js.map +1 -1
- package/lib/esm/render/webgl/BackgroundMapDrape.js +3 -3
- package/lib/esm/render/webgl/BackgroundMapDrape.js.map +1 -1
- package/lib/esm/render/webgl/BranchState.d.ts +3 -0
- package/lib/esm/render/webgl/BranchState.d.ts.map +1 -1
- package/lib/esm/render/webgl/BranchState.js +5 -0
- package/lib/esm/render/webgl/BranchState.js.map +1 -1
- package/lib/esm/render/webgl/CachedGeometry.d.ts +32 -0
- package/lib/esm/render/webgl/CachedGeometry.d.ts.map +1 -1
- package/lib/esm/render/webgl/CachedGeometry.js +69 -0
- package/lib/esm/render/webgl/CachedGeometry.js.map +1 -1
- package/lib/esm/render/webgl/DrawCommand.d.ts.map +1 -1
- package/lib/esm/render/webgl/DrawCommand.js +6 -4
- package/lib/esm/render/webgl/DrawCommand.js.map +1 -1
- package/lib/esm/render/webgl/EDL.d.ts +40 -0
- package/lib/esm/render/webgl/EDL.d.ts.map +1 -0
- package/lib/esm/render/webgl/EDL.js +260 -0
- package/lib/esm/render/webgl/EDL.js.map +1 -0
- package/lib/esm/render/webgl/EdgeSettings.js +2 -2
- package/lib/esm/render/webgl/FrameBuffer.d.ts +4 -0
- package/lib/esm/render/webgl/FrameBuffer.d.ts.map +1 -1
- package/lib/esm/render/webgl/FrameBuffer.js +9 -0
- package/lib/esm/render/webgl/FrameBuffer.js.map +1 -1
- package/lib/esm/render/webgl/FrustumUniforms.d.ts +7 -0
- package/lib/esm/render/webgl/FrustumUniforms.d.ts.map +1 -1
- package/lib/esm/render/webgl/FrustumUniforms.js.map +1 -1
- package/lib/esm/render/webgl/Layer.js +2 -2
- package/lib/esm/render/webgl/LayerCommands.js +2 -2
- package/lib/esm/render/webgl/PlanarClassifier.d.ts.map +1 -1
- package/lib/esm/render/webgl/PlanarClassifier.js +9 -8
- package/lib/esm/render/webgl/PlanarClassifier.js.map +1 -1
- package/lib/esm/render/webgl/PlanarTextureProjection.js +1 -1
- package/lib/esm/render/webgl/PlanarTextureProjection.js.map +1 -1
- package/lib/esm/render/webgl/PointCloud.d.ts +2 -2
- package/lib/esm/render/webgl/PointCloud.d.ts.map +1 -1
- package/lib/esm/render/webgl/PointCloud.js +2 -0
- package/lib/esm/render/webgl/PointCloud.js.map +1 -1
- package/lib/esm/render/webgl/RealityMesh.d.ts +3 -1
- package/lib/esm/render/webgl/RealityMesh.d.ts.map +1 -1
- package/lib/esm/render/webgl/RealityMesh.js +8 -3
- package/lib/esm/render/webgl/RealityMesh.js.map +1 -1
- package/lib/esm/render/webgl/RealityModelUniforms.d.ts +9 -0
- package/lib/esm/render/webgl/RealityModelUniforms.d.ts.map +1 -1
- package/lib/esm/render/webgl/RealityModelUniforms.js +50 -0
- package/lib/esm/render/webgl/RealityModelUniforms.js.map +1 -1
- package/lib/esm/render/webgl/RenderCommands.d.ts +2 -1
- package/lib/esm/render/webgl/RenderCommands.d.ts.map +1 -1
- package/lib/esm/render/webgl/RenderCommands.js +46 -38
- package/lib/esm/render/webgl/RenderCommands.js.map +1 -1
- package/lib/esm/render/webgl/RenderFlags.d.ts +19 -17
- package/lib/esm/render/webgl/RenderFlags.d.ts.map +1 -1
- package/lib/esm/render/webgl/RenderFlags.js +8 -6
- package/lib/esm/render/webgl/RenderFlags.js.map +1 -1
- package/lib/esm/render/webgl/SceneCompositor.d.ts +6 -1
- package/lib/esm/render/webgl/SceneCompositor.d.ts.map +1 -1
- package/lib/esm/render/webgl/SceneCompositor.js +194 -77
- package/lib/esm/render/webgl/SceneCompositor.js.map +1 -1
- package/lib/esm/render/webgl/SolarShadowMap.js +3 -3
- package/lib/esm/render/webgl/SolarShadowMap.js.map +1 -1
- package/lib/esm/render/webgl/SurfaceGeometry.js +5 -5
- package/lib/esm/render/webgl/Target.js +7 -7
- package/lib/esm/render/webgl/Target.js.map +1 -1
- package/lib/esm/render/webgl/Technique.d.ts.map +1 -1
- package/lib/esm/render/webgl/Technique.js +18 -3
- package/lib/esm/render/webgl/Technique.js.map +1 -1
- package/lib/esm/render/webgl/TechniqueFlags.js +4 -4
- package/lib/esm/render/webgl/TechniqueFlags.js.map +1 -1
- package/lib/esm/render/webgl/TechniqueId.d.ts +6 -2
- package/lib/esm/render/webgl/TechniqueId.d.ts.map +1 -1
- package/lib/esm/render/webgl/TechniqueId.js.map +1 -1
- package/lib/esm/render/webgl/UniformHandle.d.ts.map +1 -1
- package/lib/esm/render/webgl/UniformHandle.js +1 -2
- package/lib/esm/render/webgl/UniformHandle.js.map +1 -1
- package/lib/esm/render/webgl/VisibleTileFeatures.js +5 -5
- package/lib/esm/render/webgl/glsl/EDL.d.ts +14 -0
- package/lib/esm/render/webgl/glsl/EDL.d.ts.map +1 -0
- package/lib/esm/render/webgl/glsl/EDL.js +253 -0
- package/lib/esm/render/webgl/glsl/EDL.js.map +1 -0
- package/lib/esm/render/webgl/glsl/RenderPass.js +12 -12
- package/lib/esm/render/webgl/glsl/RenderPass.js.map +1 -1
- package/lib/esm/tile/BatchedTileIdMap.js +1 -1
- package/lib/esm/tile/BatchedTileIdMap.js.map +1 -1
- package/lib/esm/tile/DynamicIModelTile.js +1 -1
- package/lib/esm/tile/DynamicIModelTile.js.map +1 -1
- package/lib/esm/tile/GltfReader.js +1 -1
- package/lib/esm/tile/GltfReader.js.map +1 -1
- package/lib/esm/tile/IModelTile.js +1 -1
- package/lib/esm/tile/IModelTile.js.map +1 -1
- package/lib/esm/tile/ImdlReader.js +5 -5
- package/lib/esm/tile/ImdlReader.js.map +1 -1
- package/lib/esm/tile/RealityModelTileTree.d.ts.map +1 -1
- package/lib/esm/tile/RealityModelTileTree.js +2 -1
- package/lib/esm/tile/RealityModelTileTree.js.map +1 -1
- package/lib/esm/tile/RealityTileLoader.js +2 -2
- package/lib/esm/tile/RealityTileLoader.js.map +1 -1
- package/lib/esm/tile/RealityTileTree.d.ts +5 -0
- package/lib/esm/tile/RealityTileTree.d.ts.map +1 -1
- package/lib/esm/tile/RealityTileTree.js +9 -4
- package/lib/esm/tile/RealityTileTree.js.map +1 -1
- package/lib/esm/tile/TileDrawArgs.js +1 -1
- package/lib/esm/tile/TileDrawArgs.js.map +1 -1
- package/lib/esm/tile/TileTreeReference.d.ts +3 -0
- package/lib/esm/tile/TileTreeReference.d.ts.map +1 -1
- package/lib/esm/tile/TileTreeReference.js +3 -0
- package/lib/esm/tile/TileTreeReference.js.map +1 -1
- package/lib/esm/tile/map/CesiumTerrainProvider.js +9 -9
- package/lib/esm/tile/map/CesiumTerrainProvider.js.map +1 -1
- package/lib/esm/tile/map/ImageryProviders/ArcGISImageryProvider.d.ts.map +1 -1
- package/lib/esm/tile/map/ImageryProviders/ArcGISImageryProvider.js +1 -2
- package/lib/esm/tile/map/ImageryProviders/ArcGISImageryProvider.js.map +1 -1
- package/lib/esm/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.js +2 -2
- package/lib/esm/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.js.map +1 -1
- package/lib/esm/tile/map/ImageryProviders/WmtsMapLayerImageryProvider.js +2 -2
- package/lib/esm/tile/map/ImageryProviders/WmtsMapLayerImageryProvider.js.map +1 -1
- package/lib/esm/tile/map/ImageryTileTree.d.ts +26 -1
- package/lib/esm/tile/map/ImageryTileTree.d.ts.map +1 -1
- package/lib/esm/tile/map/ImageryTileTree.js +53 -4
- package/lib/esm/tile/map/ImageryTileTree.js.map +1 -1
- package/lib/esm/tile/map/MapLayerImageryProvider.d.ts +7 -3
- package/lib/esm/tile/map/MapLayerImageryProvider.d.ts.map +1 -1
- package/lib/esm/tile/map/MapLayerImageryProvider.js +12 -8
- package/lib/esm/tile/map/MapLayerImageryProvider.js.map +1 -1
- package/lib/esm/tile/map/MapTile.d.ts +5 -0
- package/lib/esm/tile/map/MapTile.d.ts.map +1 -1
- package/lib/esm/tile/map/MapTile.js +33 -13
- package/lib/esm/tile/map/MapTile.js.map +1 -1
- package/lib/esm/tile/map/MapTileTree.d.ts +42 -3
- package/lib/esm/tile/map/MapTileTree.d.ts.map +1 -1
- package/lib/esm/tile/map/MapTileTree.js +126 -9
- package/lib/esm/tile/map/MapTileTree.js.map +1 -1
- package/lib/esm/tile/map/MapTiledGraphicsProvider.d.ts +17 -0
- package/lib/esm/tile/map/MapTiledGraphicsProvider.d.ts.map +1 -1
- package/lib/esm/tile/map/MapTiledGraphicsProvider.js +26 -0
- package/lib/esm/tile/map/MapTiledGraphicsProvider.js.map +1 -1
- package/lib/esm/tile/map/WmtsCapabilities.d.ts +23 -68
- package/lib/esm/tile/map/WmtsCapabilities.d.ts.map +1 -1
- package/lib/esm/tile/map/WmtsCapabilities.js +268 -259
- package/lib/esm/tile/map/WmtsCapabilities.js.map +1 -1
- package/lib/esm/tools/ClipViewTool.js +2 -2
- package/lib/esm/tools/ClipViewTool.js.map +1 -1
- package/lib/esm/tools/MeasureTool.js +2 -2
- package/lib/esm/tools/MeasureTool.js.map +1 -1
- package/package.json +22 -23
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VisibleFeature.js","sourceRoot":"","sources":["../../../src/render/VisibleFeature.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAc,MAAM,qBAAqB,CAAC;AAKzD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AA+DhC;;GAEG;AACH,MAAM,gBAAgB;IAIpB,YAAmB,QAAkC;QAF7C,cAAS,GAAG,KAAK,CAAC;QAGxB,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;IAC5B,CAAC;IAEM,OAAO;QACZ,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;QACtB,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC;IACtB,CAAC;IAEM,CAAC,MAAM,CAAC,QAAQ,CAAC;QACtB,MAAM,CAAC,CAAC,IAAI,CAAC,SAAS,EAAE,uGAAuG,CAAC,CAAC;QACjI,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC;IAC3C,CAAC;CACF;AAED,SAAS,cAAc,CAAC,QAAkC,EAAE,QAAsC;IAChG,MAAM,QAAQ,GAAG,IAAI,gBAAgB,CAAC,QAAQ,CAAC,CAAC;IAChD,IAAI;QACF,QAAQ,CAAC,QAAQ,CAAC,CAAC;KACpB;YAAS;QACR,QAAQ,CAAC,OAAO,EAAE,CAAC;KACpB;AACH,CAAC;AAED,wDAAwD;AACxD,MAAM,cAAc;IAKlB,YAAmB,MAAoB,EAAE,IAAc,EAAE,QAAkB;QACzE,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,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MAAM,UAAU,oBAAoB,CAAC,QAAkB,EAAE,OAAoC,EAAE,QAAsC;;IACnI,MAAM,CAAC,QAAQ,KAAK,OAAO,CAAC,MAAM,IAAI,OAAO,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IAClE,QAAQ,OAAO,CAAC,MAAM,EAAE;QACtB,KAAK,QAAQ;YACX,MAAM,IAAI,GAAG,MAAA,OAAO,CAAC,IAAI,mCAAI,QAAQ,CAAC,QAAQ,CAAC;YAC/C,QAAQ,CAAC,UAAU,CAAC,IAAI,EAAE,KAAK,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,cAAc,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,QAAQ,CAAC,EAAE,IAAI,KAAK,OAAO,CAAC,mBAAmB,CAAC,CAAC;YACxL,MAAM;QACR,KAAK,OAAO;YACV,QAAQ,CAAC,MAAM,CAAC,wBAAwB,CAAC,OAAO,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,cAAc,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC;YACrH,MAAM;QACR;YACE,cAAc,CAAC,EAAE,EAAE,QAAQ,CAAC,CAAC;YAC7B,MAAM;KACT;AACH,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Rendering\r\n */\r\n\r\nimport { assert, Id64String } from \"@itwin/core-bentley\";\r\nimport { GeometryClass } from \"@itwin/core-common\";\r\nimport { ViewRect } from \"../ViewRect\";\r\nimport { Viewport } from \"../Viewport\";\r\nimport { IModelConnection } from \"../IModelConnection\";\r\nimport { Pixel } from \"./Pixel\";\r\n\r\n/** Represents a [Feature]($common) determined to be visible within a [[Viewport]].\r\n * @see [[Viewport.queryVisibleFeatures]].\r\n * @beta\r\n */\r\nexport interface VisibleFeature {\r\n /** The Id of the [Element]($backend) associated with the feature. May be invalid or transient. */\r\n readonly elementId: Id64String;\r\n /** The Id of the [SubCategory]($backend) associated with the feature. May be invalid or transient. */\r\n readonly subCategoryId: Id64String;\r\n /** The class of geometry associated with the feature. */\r\n readonly geometryClass: GeometryClass;\r\n /** The Id of the [GeometricModel]($backend) associated with the feature. May be invalid or transient. */\r\n readonly modelId: Id64String;\r\n /** The iModel associated with the feature. In some cases this may differ from the [[Viewport]]'s iModel. */\r\n iModel: IModelConnection;\r\n}\r\n\r\n/** Options specifying how to query for visible [Feature]($common)s by reading pixels rendered by a [[Viewport]].\r\n * This method of determining visibility considers a feature \"visible\" if it lit up at least one pixel.\r\n * @note A pixel that is behind another, transparent pixel is not considered visible.\r\n * @see [[QueryVisibleFeaturesOptions]].\r\n * @beta\r\n */\r\nexport interface QueryScreenFeaturesOptions {\r\n /** Union discriminator for [[QueryVisibleFeaturesOptions]]. */\r\n source: \"screen\";\r\n /** If true, non-locatable features are considered visible. */\r\n includeNonLocatable?: boolean;\r\n /** If specified, a sub-region of the [[Viewport]] to which to constrain the query. */\r\n rect?: ViewRect;\r\n}\r\n\r\n/** Options specifying how to query for visible [Feature]($common)s by inspecting the [[Tile]]s selected for display by a [[Viewport]].\r\n * This method of determining visibility considers a feature \"visible\" if it is included in at least one tile selected for display and is\r\n * not otherwise rendered invisible by the view's [[CategorySelectorState]], [SubCategoryAppearance]($common) overrides, [FeatureOverrides]($common), or\r\n * other means.\r\n * @note If a clip volume is applied to the view, features contained in tiles that *intersect* the clip volume are considered visible regardless of whether\r\n * their geometry would actually be entirely clipped out by the clip volume.\r\n * @see [[QueryVisibleFeaturesOptions]].\r\n * @beta\r\n */\r\nexport interface QueryTileFeaturesOptions {\r\n /** Union discriminator for [[QueryVisibleFeaturesOptions]]. */\r\n source: \"tiles\";\r\n /** If true, non-locatable features are considered visible. */\r\n includeNonLocatable?: boolean;\r\n}\r\n\r\n/** Options specifying how to query for visible [Feature]($common)s.\r\n * @see [[Viewport.queryVisibleFeatures]].\r\n * @beta\r\n */\r\nexport type QueryVisibleFeaturesOptions = QueryScreenFeaturesOptions | QueryTileFeaturesOptions;\r\n\r\n/** A function supplied to [[Viewport.queryVisibleFeatures]] to process the results. The iterable supplied to the callback consists of all of the\r\n * [Feature]($common)s determined to be visible. The same feature may recur multiple times.\r\n * @note The iterable supplied to the callback is usable only within the callback. Once the callback exits, the iterable becomes empty.\r\n * @beta\r\n */\r\nexport type QueryVisibleFeaturesCallback = (features: Iterable<VisibleFeature>) => void;\r\n\r\n/** Ensures that the iterable supplied to QueryVisibleFeaturesCallback becomes invalidated once the callback exits.\r\n * The iterable relies on RenderTarget state that changes from one frame to another.\r\n */\r\nclass ExpiringIterable implements Iterable<VisibleFeature> {\r\n private _features: Iterable<VisibleFeature>;\r\n private _disposed = false;\r\n\r\n public constructor(features: Iterable<VisibleFeature>) {\r\n this._features = features;\r\n }\r\n\r\n public dispose(): void {\r\n this._disposed = true;\r\n this._features = [];\r\n }\r\n\r\n public [Symbol.iterator](): Iterator<VisibleFeature> {\r\n assert(!this._disposed, \"The iterable supplied to QueryVisibleFeaturesCallback is valid only for the duration of the callback.\");\r\n return this._features[Symbol.iterator]();\r\n }\r\n}\r\n\r\nfunction invokeCallback(features: Iterable<VisibleFeature>, callback: QueryVisibleFeaturesCallback): void {\r\n const iterable = new ExpiringIterable(features);\r\n try {\r\n callback(iterable);\r\n } finally {\r\n iterable.dispose();\r\n }\r\n}\r\n\r\n/** Features read from pixels rendered by a viewport. */\r\nclass ScreenFeatures implements Iterable<VisibleFeature> {\r\n private readonly _pixels: Pixel.Buffer;\r\n private readonly _rect: ViewRect;\r\n private readonly _iModel: IModelConnection;\r\n\r\n public constructor(pixels: Pixel.Buffer, rect: ViewRect, viewport: Viewport) {\r\n this._pixels = pixels;\r\n this._rect = rect.clone();\r\n this._rect.right = viewport.cssPixelsToDevicePixels(this._rect.right);\r\n this._rect.bottom = viewport.cssPixelsToDevicePixels(this._rect.bottom);\r\n this._iModel = viewport.iModel;\r\n }\r\n\r\n public [Symbol.iterator](): Iterator<VisibleFeature> {\r\n function* iterator(pixels: Pixel.Buffer, rect: ViewRect, iModel: IModelConnection) {\r\n for (let x = rect.left; x < rect.right; x++) {\r\n for (let y = rect.top; y < rect.bottom; y++) {\r\n const pixel = pixels.getPixel(x, y);\r\n if (pixel.feature && pixel.featureTable) {\r\n yield {\r\n elementId: pixel.feature.elementId,\r\n subCategoryId: pixel.feature.subCategoryId,\r\n geometryClass: pixel.feature.geometryClass,\r\n modelId: pixel.featureTable.modelId,\r\n iModel: pixel.iModel ?? iModel,\r\n };\r\n }\r\n }\r\n }\r\n }\r\n\r\n return iterator(this._pixels, this._rect, this._iModel);\r\n }\r\n}\r\n\r\n/** Implementation of [[Viewport.queryVisibleFeatures]].\r\n * @internal\r\n */\r\nexport function queryVisibleFeatures(viewport: Viewport, options: QueryVisibleFeaturesOptions, callback: QueryVisibleFeaturesCallback): void {\r\n assert(\"screen\" === options.source || \"tiles\" === options.source);\r\n switch (options.source) {\r\n case \"screen\":\r\n const rect = options.rect ?? viewport.viewRect;\r\n viewport.readPixels(rect, Pixel.Selector.Feature, (pixels) => invokeCallback(pixels ? new ScreenFeatures(pixels, rect, viewport) : [], callback), true !== options.includeNonLocatable);\r\n break;\r\n case \"tiles\":\r\n viewport.target.queryVisibleTileFeatures(options, viewport.iModel, (features) => invokeCallback(features, callback));\r\n break;\r\n default:\r\n invokeCallback([], callback);\r\n break;\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"VisibleFeature.js","sourceRoot":"","sources":["../../../src/render/VisibleFeature.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAc,MAAM,qBAAqB,CAAC;AAKzD,OAAO,EA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AC,OAAO,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,cAAc,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,QAAQ,CAAC,EAAE,IAAI,KAAK,OAAO,CAAC,mBAAmB,CAAC,CAAC;YACxL,MAAM;QACR,KAAK,OAAO;YACV,QAAQ,CAAC,MAAM,CAAC,wBAAwB,CAAC,OAAO,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,cAAc,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC;YACrH,MAAM;QACR;YACE,cAAc,CAAC,EAAE,EAAE,QAAQ,CAAC,CAAC;YAC7B,MAAM;KACT;AACH,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Rendering\r\n */\r\n\r\nimport { assert, Id64String } from \"@itwin/core-bentley\";\r\nimport { GeometryClass } from \"@itwin/core-common\";\r\nimport { ViewRect } from \"../ViewRect\";\r\nimport { Viewport } from \"../Viewport\";\r\nimport { IModelConnection } from \"../IModelConnection\";\r\nimport { Pixel } from \"./Pixel\";\r\n\r\n/** Represents a [Feature]($common) determined to be visible within a [[Viewport]].\r\n * @see [[Viewport.queryVisibleFeatures]].\r\n * @public\r\n */\r\nexport interface VisibleFeature {\r\n /** The Id of the [Element]($backend) associated with the feature. May be invalid or transient. */\r\n readonly elementId: Id64String;\r\n /** The Id of the [SubCategory]($backend) associated with the feature. May be invalid or transient. */\r\n readonly subCategoryId: Id64String;\r\n /** The class of geometry associated with the feature. */\r\n readonly geometryClass: GeometryClass;\r\n /** The Id of the [GeometricModel]($backend) associated with the feature. May be invalid or transient. */\r\n readonly modelId: Id64String;\r\n /** The iModel associated with the feature. In some cases this may differ from the [[Viewport]]'s iModel. */\r\n iModel: IModelConnection;\r\n}\r\n\r\n/** Options specifying how to query for visible [Feature]($common)s by reading pixels rendered by a [[Viewport]].\r\n * This method of determining visibility considers a feature \"visible\" if it lit up at least one pixel.\r\n * @note A pixel that is behind another, transparent pixel is not considered visible.\r\n * @see [[QueryVisibleFeaturesOptions]].\r\n * @public\r\n */\r\nexport interface QueryScreenFeaturesOptions {\r\n /** Union discriminator for [[QueryVisibleFeaturesOptions]]. */\r\n source: \"screen\";\r\n /** If true, non-locatable features are considered visible. */\r\n includeNonLocatable?: boolean;\r\n /** If specified, a sub-region of the [[Viewport]] to which to constrain the query. */\r\n rect?: ViewRect;\r\n}\r\n\r\n/** Options specifying how to query for visible [Feature]($common)s by inspecting the [[Tile]]s selected for display by a [[Viewport]].\r\n * This method of determining visibility considers a feature \"visible\" if it is included in at least one tile selected for display and is\r\n * not otherwise rendered invisible by the view's [[CategorySelectorState]], [SubCategoryAppearance]($common) overrides, [FeatureOverrides]($common), or\r\n * other means.\r\n * @note If a clip volume is applied to the view, features contained in tiles that *intersect* the clip volume are considered visible regardless of whether\r\n * their geometry would actually be entirely clipped out by the clip volume.\r\n * @see [[QueryVisibleFeaturesOptions]].\r\n * @public\r\n */\r\nexport interface QueryTileFeaturesOptions {\r\n /** Union discriminator for [[QueryVisibleFeaturesOptions]]. */\r\n source: \"tiles\";\r\n /** If true, non-locatable features are considered visible. */\r\n includeNonLocatable?: boolean;\r\n}\r\n\r\n/** Options specifying how to query for visible [Feature]($common)s.\r\n * @see [[Viewport.queryVisibleFeatures]].\r\n * @public\r\n */\r\nexport type QueryVisibleFeaturesOptions = QueryScreenFeaturesOptions | QueryTileFeaturesOptions;\r\n\r\n/** A function supplied to [[Viewport.queryVisibleFeatures]] to process the results. The iterable supplied to the callback consists of all of the\r\n * [Feature]($common)s determined to be visible. The same feature may recur multiple times.\r\n * @note The iterable supplied to the callback is usable only within the callback. Once the callback exits, the iterable becomes empty.\r\n * @public\r\n */\r\nexport type QueryVisibleFeaturesCallback = (features: Iterable<VisibleFeature>) => void;\r\n\r\n/** Ensures that the iterable supplied to QueryVisibleFeaturesCallback becomes invalidated once the callback exits.\r\n * The iterable relies on RenderTarget state that changes from one frame to another.\r\n */\r\nclass ExpiringIterable implements Iterable<VisibleFeature> {\r\n private _features: Iterable<VisibleFeature>;\r\n private _disposed = false;\r\n\r\n public constructor(features: Iterable<VisibleFeature>) {\r\n this._features = features;\r\n }\r\n\r\n public dispose(): void {\r\n this._disposed = true;\r\n this._features = [];\r\n }\r\n\r\n public [Symbol.iterator](): Iterator<VisibleFeature> {\r\n assert(!this._disposed, \"The iterable supplied to QueryVisibleFeaturesCallback is valid only for the duration of the callback.\");\r\n return this._features[Symbol.iterator]();\r\n }\r\n}\r\n\r\nfunction invokeCallback(features: Iterable<VisibleFeature>, callback: QueryVisibleFeaturesCallback): void {\r\n const iterable = new ExpiringIterable(features);\r\n try {\r\n callback(iterable);\r\n } finally {\r\n iterable.dispose();\r\n }\r\n}\r\n\r\n/** Features read from pixels rendered by a viewport. */\r\nclass ScreenFeatures implements Iterable<VisibleFeature> {\r\n private readonly _pixels: Pixel.Buffer;\r\n private readonly _rect: ViewRect;\r\n private readonly _iModel: IModelConnection;\r\n\r\n public constructor(pixels: Pixel.Buffer, rect: ViewRect, viewport: Viewport) {\r\n this._pixels = pixels;\r\n this._rect = rect.clone();\r\n this._rect.right = viewport.cssPixelsToDevicePixels(this._rect.right);\r\n this._rect.bottom = viewport.cssPixelsToDevicePixels(this._rect.bottom);\r\n this._iModel = viewport.iModel;\r\n }\r\n\r\n public [Symbol.iterator](): Iterator<VisibleFeature> {\r\n function* iterator(pixels: Pixel.Buffer, rect: ViewRect, iModel: IModelConnection) {\r\n for (let x = rect.left; x < rect.right; x++) {\r\n for (let y = rect.top; y < rect.bottom; y++) {\r\n const pixel = pixels.getPixel(x, y);\r\n if (pixel.feature && pixel.featureTable) {\r\n yield {\r\n elementId: pixel.feature.elementId,\r\n subCategoryId: pixel.feature.subCategoryId,\r\n geometryClass: pixel.feature.geometryClass,\r\n modelId: pixel.featureTable.modelId,\r\n iModel: pixel.iModel ?? iModel,\r\n };\r\n }\r\n }\r\n }\r\n }\r\n\r\n return iterator(this._pixels, this._rect, this._iModel);\r\n }\r\n}\r\n\r\n/** Implementation of [[Viewport.queryVisibleFeatures]].\r\n * @internal\r\n */\r\nexport function queryVisibleFeatures(viewport: Viewport, options: QueryVisibleFeaturesOptions, callback: QueryVisibleFeaturesCallback): void {\r\n assert(\"screen\" === options.source || \"tiles\" === options.source);\r\n switch (options.source) {\r\n case \"screen\":\r\n const rect = options.rect ?? viewport.viewRect;\r\n viewport.readPixels(rect, Pixel.Selector.Feature, (pixels) => invokeCallback(pixels ? new ScreenFeatures(pixels, rect, viewport) : [], callback), true !== options.includeNonLocatable);\r\n break;\r\n case \"tiles\":\r\n viewport.target.queryVisibleTileFeatures(options, viewport.iModel, (features) => invokeCallback(features, callback));\r\n break;\r\n default:\r\n invokeCallback([], callback);\r\n break;\r\n }\r\n}\r\n"]}
|
|
@@ -71,7 +71,7 @@ export class BackgroundMapDrape extends TextureDrape {
|
|
|
71
71
|
this._frustum = projection.textureFrustum;
|
|
72
72
|
this._debugFrustum = projection.debugFrustum;
|
|
73
73
|
this._projectionMatrix = projection.projectionMatrix;
|
|
74
|
-
const drawArgs = GraphicsCollectorDrawArgs.create(context, this, this._mapTree,
|
|
74
|
+
const drawArgs = GraphicsCollectorDrawArgs.create(context, this, this._mapTree, FrustumPlanes.fromFrustum(this._frustum), projection.worldToViewMap);
|
|
75
75
|
if (undefined !== drawArgs)
|
|
76
76
|
tileTree.draw(drawArgs);
|
|
77
77
|
if (context.target.debugControl && context.target.debugControl.displayDrapeFrustum) {
|
|
@@ -120,7 +120,7 @@ export class BackgroundMapDrape extends TextureDrape {
|
|
|
120
120
|
target.uniforms.frustum.changeProjectionMatrix(BackgroundMapDrape._postProjectionMatrix.multiplyMatrixMatrix(prevProjMatrix));
|
|
121
121
|
target.uniforms.branch.pushState(stack.top);
|
|
122
122
|
const renderCommands = new RenderCommands(target, stack, batchState);
|
|
123
|
-
renderCommands.addGraphics(this._graphics,
|
|
123
|
+
renderCommands.addGraphics(this._graphics, 5 /* OpaqueGeneral */);
|
|
124
124
|
const system = System.instance;
|
|
125
125
|
const gl = system.context;
|
|
126
126
|
const useMRT = System.instance.capabilities.supportsDrawBuffers;
|
|
@@ -129,7 +129,7 @@ export class BackgroundMapDrape extends TextureDrape {
|
|
|
129
129
|
gl.clear(GL.BufferBit.Color);
|
|
130
130
|
if (!useMRT)
|
|
131
131
|
target.compositor.currentRenderTargetIndex = 0;
|
|
132
|
-
target.techniques.execute(target, renderCommands.getCommands(
|
|
132
|
+
target.techniques.execute(target, renderCommands.getCommands(5 /* OpaqueGeneral */), 19 /* PlanarClassification */); // Draw these with RenderPass.PlanarClassification (rather than Opaque...) so that the pick ordering is avoided.
|
|
133
133
|
});
|
|
134
134
|
target.uniforms.branch.pop();
|
|
135
135
|
batchState.reset(); // Reset the batch Ids...
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BackgroundMapDrape.js","sourceRoot":"","sources":["../../../../src/render/webgl/BackgroundMapDrape.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,4BAA4B,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACjG,OAAO,EAAE,QAAQ,EAAW,aAAa,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC1G,OAAO,EAAE,yBAAyB,EAA2C,MAAM,qBAAqB,CAAC;AAGzG,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,O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AM,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC;QAE7B,UAAU,CAAC,KAAK,EAAE,CAAC,CAAG,yBAAyB;QAC/C,MAAM,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC;QAElC,MAAM,CAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC;QACnC,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,mBAAmB;QACrF,MAAM,CAAC,OAAO,CAAC,YAAY,EAAE,CAAC;IAChC,CAAC;;AA1Jc,wCAAqB,GAAG,QAAQ,CAAC,eAAe,CAC7D,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EACV,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EACX,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EACV,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\n/** @packageDocumentation\r\n * @module WebGL\r\n */\r\n\r\nimport { assert, dispose } from \"@itwin/core-bentley\";\r\nimport { Matrix4d, Plane3dByOriginAndUnitNormal, Point3d, Vector3d } from \"@itwin/core-geometry\";\r\nimport { ColorDef, Frustum, FrustumPlanes, RenderTexture, TextureTransparency } from \"@itwin/core-common\";\r\nimport { GraphicsCollectorDrawArgs, MapTileTreeReference, TileTreeReference } from \"../../tile/internal\";\r\nimport { SceneContext } from \"../../ViewContext\";\r\nimport { ViewState3d } from \"../../ViewState\";\r\nimport { FeatureSymbology } from \"../FeatureSymbology\";\r\nimport { RenderGraphic } from \"../RenderGraphic\";\r\nimport { BatchState } from \"./BatchState\";\r\nimport { BranchStack } from \"./BranchStack\";\r\nimport { FrameBuffer } from \"./FrameBuffer\";\r\nimport { GL } from \"./GL\";\r\nimport { PlanarTextureProjection } from \"./PlanarTextureProjection\";\r\nimport { RenderCommands } from \"./RenderCommands\";\r\nimport { RenderPass } from \"./RenderFlags\";\r\nimport { System } from \"./System\";\r\nimport { Target } from \"./Target\";\r\nimport { Texture, TextureHandle } from \"./Texture\";\r\nimport { TextureDrape } from \"./TextureDrape\";\r\n\r\n/** @internal */\r\nexport class BackgroundMapDrape extends TextureDrape {\r\n private _fbo?: FrameBuffer;\r\n private readonly _graphics: RenderGraphic[] = [];\r\n private _frustum?: Frustum;\r\n private _width = 0;\r\n private _height = 0;\r\n private _mapTree: MapTileTreeReference;\r\n private _drapedTree: TileTreeReference;\r\n private static _postProjectionMatrix = Matrix4d.createRowValues(\r\n 0, 1, 0, 0,\r\n 0, 0, -1, 0,\r\n 1, 0, 0, 0,\r\n 0, 0, 0, 1);\r\n private _debugFrustum?: Frustum;\r\n private _debugFrustumGraphic?: RenderGraphic = undefined;\r\n private readonly _symbologyOverrides = new FeatureSymbology.Overrides();\r\n private readonly _bgColor = ColorDef.from(0, 0, 0, 255);\r\n private readonly _plane = Plane3dByOriginAndUnitNormal.create(Point3d.createZero(), Vector3d.create(0, 0, 1))!;\r\n\r\n private constructor(drapedTree: TileTreeReference, mapTree: MapTileTreeReference) {\r\n super();\r\n this._drapedTree = drapedTree;\r\n this._mapTree = mapTree;\r\n }\r\n\r\n public override get isDisposed(): boolean { return super.isDisposed && undefined === this._fbo; }\r\n\r\n public override dispose() {\r\n super.dispose();\r\n this._fbo = dispose(this._fbo);\r\n }\r\n\r\n public addGraphic(graphic: RenderGraphic) {\r\n this._graphics.push(graphic);\r\n }\r\n\r\n public static create(draped: TileTreeReference, map: MapTileTreeReference): BackgroundMapDrape {\r\n return new BackgroundMapDrape(draped, map);\r\n }\r\n\r\n public collectGraphics(context: SceneContext) {\r\n this._graphics.length = 0;\r\n if (undefined === context.viewingSpace)\r\n return;\r\n\r\n const viewState = context.viewingSpace.view as ViewState3d;\r\n if (undefined === viewState)\r\n return;\r\n\r\n const tileTree = this._mapTree.treeOwner.load();\r\n if (undefined === tileTree || !this._mapTree.initializeLayers(context))\r\n return;\r\n\r\n const requiredWidth = 2 * Math.max(context.target.viewRect.width, context.target.viewRect.height); // TBD - Size to textured area.\r\n const requiredHeight = requiredWidth;\r\n\r\n if (requiredWidth !== this._width || requiredHeight !== this._height)\r\n this.dispose();\r\n\r\n this._width = requiredWidth;\r\n this._height = requiredHeight;\r\n\r\n const targetTree = this._drapedTree.treeOwner.tileTree;\r\n const args = this._drapedTree.createDrawArgs(context);\r\n if (!targetTree || !args)\r\n return;\r\n\r\n const targetTiles = targetTree.selectTiles(args);\r\n\r\n const projection = PlanarTextureProjection.computePlanarTextureProjection(this._plane, context, { tiles: targetTiles, location: args.location }, [this._mapTree], viewState, this._width, this._height);\r\n if (!projection.textureFrustum || !projection.projectionMatrix || !projection.worldToViewMap)\r\n return;\r\n\r\n this._frustum = projection.textureFrustum;\r\n this._debugFrustum = projection.debugFrustum;\r\n this._projectionMatrix = projection.projectionMatrix;\r\n\r\n const drawArgs = GraphicsCollectorDrawArgs.create(context, this, this._mapTree, new FrustumPlanes(this._frustum), projection.worldToViewMap);\r\n if (undefined !== drawArgs)\r\n tileTree.draw(drawArgs);\r\n\r\n if (context.target.debugControl && context.target.debugControl.displayDrapeFrustum) {\r\n this._debugFrustumGraphic = dispose(this._debugFrustumGraphic);\r\n const builder = context.createSceneGraphicBuilder();\r\n builder.setSymbology(ColorDef.green, ColorDef.green, 1);\r\n builder.addFrustum(context.viewingSpace.getFrustum());\r\n builder.setSymbology(ColorDef.red, ColorDef.red, 1);\r\n builder.addFrustum(this._debugFrustum!);\r\n builder.setSymbology(ColorDef.white, ColorDef.white, 1);\r\n builder.addFrustum(this._frustum);\r\n this._debugFrustumGraphic = builder.finish();\r\n }\r\n }\r\n\r\n public draw(target: Target) {\r\n if (undefined !== this._debugFrustumGraphic)\r\n target.graphics.foreground.push(this._debugFrustumGraphic);\r\n\r\n if (undefined === this._frustum || this._graphics.length === 0)\r\n return;\r\n\r\n if (undefined === this._fbo) {\r\n const colorTextureHandle = TextureHandle.createForAttachment(this._width, this._height, GL.Texture.Format.Rgba, GL.Texture.DataType.UnsignedByte);\r\n if (undefined === colorTextureHandle) {\r\n assert(false, \"Failed to create planar texture\");\r\n return;\r\n }\r\n\r\n this._texture = new Texture({ ownership: \"external\", type: RenderTexture.Type.TileSection, handle: colorTextureHandle, transparency: TextureTransparency.Opaque });\r\n this._fbo = FrameBuffer.create([colorTextureHandle]);\r\n }\r\n if (undefined === this._fbo) {\r\n assert(false, \"unable to create frame buffer object\");\r\n return;\r\n }\r\n\r\n System.instance.glTimer.beginOperation(\"Terrain Projection\");\r\n\r\n const prevState = System.instance.currentRenderState.clone();\r\n System.instance.context.viewport(0, 0, this._width, this._height);\r\n\r\n const prevPlan = target.plan;\r\n const drawingParams = PlanarTextureProjection.getTextureDrawingParams(target);\r\n const stack = new BranchStack();\r\n stack.changeRenderPlan(drawingParams.viewFlags, prevPlan.is3d, prevPlan.hline);\r\n stack.setSymbologyOverrides(this._symbologyOverrides);\r\n\r\n const batchState = new BatchState(stack);\r\n System.instance.applyRenderState(drawingParams.state);\r\n\r\n target.uniforms.style.changeBackgroundColor(this._bgColor); // Avoid white on white reversal. Will be reset below in changeRenderPlan().\r\n target.changeFrustum(this._frustum, this._frustum.getFraction(), true);\r\n\r\n const prevProjMatrix = target.uniforms.frustum.projectionMatrix;\r\n target.uniforms.frustum.changeProjectionMatrix(BackgroundMapDrape._postProjectionMatrix.multiplyMatrixMatrix(prevProjMatrix));\r\n\r\n target.uniforms.branch.pushState(stack.top);\r\n\r\n const renderCommands = new RenderCommands(target, stack, batchState);\r\n renderCommands.addGraphics(this._graphics, RenderPass.OpaqueGeneral);\r\n\r\n const system = System.instance;\r\n const gl = system.context;\r\n const useMRT = System.instance.capabilities.supportsDrawBuffers;\r\n\r\n system.frameBufferStack.execute(this._fbo, true, false, () => {\r\n gl.clearColor(0, 0, 0, 0);\r\n gl.clear(GL.BufferBit.Color);\r\n if (!useMRT)\r\n target.compositor.currentRenderTargetIndex = 0;\r\n\r\n target.techniques.execute(target, renderCommands.getCommands(RenderPass.OpaqueGeneral), RenderPass.PlanarClassification); // Draw these with RenderPass.PlanarClassification (rather than Opaque...) so that the pick ordering is avoided.\r\n });\r\n\r\n target.uniforms.branch.pop();\r\n\r\n batchState.reset(); // Reset the batch Ids...\r\n target.changeRenderPlan(prevPlan);\r\n\r\n system.applyRenderState(prevState);\r\n gl.viewport(0, 0, target.viewRect.width, target.viewRect.height); // Restore viewport\r\n system.glTimer.endOperation();\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"BackgroundMapDrape.js","sourceRoot":"","sources":["../../../../src/render/webgl/BackgroundMapDrape.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,4BAA4B,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACjG,OAAO,EAAE,QAAQ,EAAW,aAAa,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC1G,OAAO,EAAE,yBAAyB,EAA2C,MAAM,qBAAqB,CAAC;AAGzG,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAC;AAC1B,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAA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AAC;QACnC,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,mBAAmB;QACrF,MAAM,CAAC,OAAO,CAAC,YAAY,EAAE,CAAC;IAChC,CAAC;;AA1Jc,wCAAqB,GAAG,QAAQ,CAAC,eAAe,CAC7D,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EACV,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EACX,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EACV,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\n/** @packageDocumentation\r\n * @module WebGL\r\n */\r\n\r\nimport { assert, dispose } from \"@itwin/core-bentley\";\r\nimport { Matrix4d, Plane3dByOriginAndUnitNormal, Point3d, Vector3d } from \"@itwin/core-geometry\";\r\nimport { ColorDef, Frustum, FrustumPlanes, RenderTexture, TextureTransparency } from \"@itwin/core-common\";\r\nimport { GraphicsCollectorDrawArgs, MapTileTreeReference, TileTreeReference } from \"../../tile/internal\";\r\nimport { SceneContext } from \"../../ViewContext\";\r\nimport { ViewState3d } from \"../../ViewState\";\r\nimport { FeatureSymbology } from \"../FeatureSymbology\";\r\nimport { RenderGraphic } from \"../RenderGraphic\";\r\nimport { BatchState } from \"./BatchState\";\r\nimport { BranchStack } from \"./BranchStack\";\r\nimport { FrameBuffer } from \"./FrameBuffer\";\r\nimport { GL } from \"./GL\";\r\nimport { PlanarTextureProjection } from \"./PlanarTextureProjection\";\r\nimport { RenderCommands } from \"./RenderCommands\";\r\nimport { RenderPass } from \"./RenderFlags\";\r\nimport { System } from \"./System\";\r\nimport { Target } from \"./Target\";\r\nimport { Texture, TextureHandle } from \"./Texture\";\r\nimport { TextureDrape } from \"./TextureDrape\";\r\n\r\n/** @internal */\r\nexport class BackgroundMapDrape extends TextureDrape {\r\n private _fbo?: FrameBuffer;\r\n private readonly _graphics: RenderGraphic[] = [];\r\n private _frustum?: Frustum;\r\n private _width = 0;\r\n private _height = 0;\r\n private _mapTree: MapTileTreeReference;\r\n private _drapedTree: TileTreeReference;\r\n private static _postProjectionMatrix = Matrix4d.createRowValues(\r\n 0, 1, 0, 0,\r\n 0, 0, -1, 0,\r\n 1, 0, 0, 0,\r\n 0, 0, 0, 1);\r\n private _debugFrustum?: Frustum;\r\n private _debugFrustumGraphic?: RenderGraphic = undefined;\r\n private readonly _symbologyOverrides = new FeatureSymbology.Overrides();\r\n private readonly _bgColor = ColorDef.from(0, 0, 0, 255);\r\n private readonly _plane = Plane3dByOriginAndUnitNormal.create(Point3d.createZero(), Vector3d.create(0, 0, 1))!;\r\n\r\n private constructor(drapedTree: TileTreeReference, mapTree: MapTileTreeReference) {\r\n super();\r\n this._drapedTree = drapedTree;\r\n this._mapTree = mapTree;\r\n }\r\n\r\n public override get isDisposed(): boolean { return super.isDisposed && undefined === this._fbo; }\r\n\r\n public override dispose() {\r\n super.dispose();\r\n this._fbo = dispose(this._fbo);\r\n }\r\n\r\n public addGraphic(graphic: RenderGraphic) {\r\n this._graphics.push(graphic);\r\n }\r\n\r\n public static create(draped: TileTreeReference, map: MapTileTreeReference): BackgroundMapDrape {\r\n return new BackgroundMapDrape(draped, map);\r\n }\r\n\r\n public collectGraphics(context: SceneContext) {\r\n this._graphics.length = 0;\r\n if (undefined === context.viewingSpace)\r\n return;\r\n\r\n const viewState = context.viewingSpace.view as ViewState3d;\r\n if (undefined === viewState)\r\n return;\r\n\r\n const tileTree = this._mapTree.treeOwner.load();\r\n if (undefined === tileTree || !this._mapTree.initializeLayers(context))\r\n return;\r\n\r\n const requiredWidth = 2 * Math.max(context.target.viewRect.width, context.target.viewRect.height); // TBD - Size to textured area.\r\n const requiredHeight = requiredWidth;\r\n\r\n if (requiredWidth !== this._width || requiredHeight !== this._height)\r\n this.dispose();\r\n\r\n this._width = requiredWidth;\r\n this._height = requiredHeight;\r\n\r\n const targetTree = this._drapedTree.treeOwner.tileTree;\r\n const args = this._drapedTree.createDrawArgs(context);\r\n if (!targetTree || !args)\r\n return;\r\n\r\n const targetTiles = targetTree.selectTiles(args);\r\n\r\n const projection = PlanarTextureProjection.computePlanarTextureProjection(this._plane, context, { tiles: targetTiles, location: args.location }, [this._mapTree], viewState, this._width, this._height);\r\n if (!projection.textureFrustum || !projection.projectionMatrix || !projection.worldToViewMap)\r\n return;\r\n\r\n this._frustum = projection.textureFrustum;\r\n this._debugFrustum = projection.debugFrustum;\r\n this._projectionMatrix = projection.projectionMatrix;\r\n\r\n const drawArgs = GraphicsCollectorDrawArgs.create(context, this, this._mapTree, FrustumPlanes.fromFrustum(this._frustum), projection.worldToViewMap);\r\n if (undefined !== drawArgs)\r\n tileTree.draw(drawArgs);\r\n\r\n if (context.target.debugControl && context.target.debugControl.displayDrapeFrustum) {\r\n this._debugFrustumGraphic = dispose(this._debugFrustumGraphic);\r\n const builder = context.createSceneGraphicBuilder();\r\n builder.setSymbology(ColorDef.green, ColorDef.green, 1);\r\n builder.addFrustum(context.viewingSpace.getFrustum());\r\n builder.setSymbology(ColorDef.red, ColorDef.red, 1);\r\n builder.addFrustum(this._debugFrustum!);\r\n builder.setSymbology(ColorDef.white, ColorDef.white, 1);\r\n builder.addFrustum(this._frustum);\r\n this._debugFrustumGraphic = builder.finish();\r\n }\r\n }\r\n\r\n public draw(target: Target) {\r\n if (undefined !== this._debugFrustumGraphic)\r\n target.graphics.foreground.push(this._debugFrustumGraphic);\r\n\r\n if (undefined === this._frustum || this._graphics.length === 0)\r\n return;\r\n\r\n if (undefined === this._fbo) {\r\n const colorTextureHandle = TextureHandle.createForAttachment(this._width, this._height, GL.Texture.Format.Rgba, GL.Texture.DataType.UnsignedByte);\r\n if (undefined === colorTextureHandle) {\r\n assert(false, \"Failed to create planar texture\");\r\n return;\r\n }\r\n\r\n this._texture = new Texture({ ownership: \"external\", type: RenderTexture.Type.TileSection, handle: colorTextureHandle, transparency: TextureTransparency.Opaque });\r\n this._fbo = FrameBuffer.create([colorTextureHandle]);\r\n }\r\n if (undefined === this._fbo) {\r\n assert(false, \"unable to create frame buffer object\");\r\n return;\r\n }\r\n\r\n System.instance.glTimer.beginOperation(\"Terrain Projection\");\r\n\r\n const prevState = System.instance.currentRenderState.clone();\r\n System.instance.context.viewport(0, 0, this._width, this._height);\r\n\r\n const prevPlan = target.plan;\r\n const drawingParams = PlanarTextureProjection.getTextureDrawingParams(target);\r\n const stack = new BranchStack();\r\n stack.changeRenderPlan(drawingParams.viewFlags, prevPlan.is3d, prevPlan.hline);\r\n stack.setSymbologyOverrides(this._symbologyOverrides);\r\n\r\n const batchState = new BatchState(stack);\r\n System.instance.applyRenderState(drawingParams.state);\r\n\r\n target.uniforms.style.changeBackgroundColor(this._bgColor); // Avoid white on white reversal. Will be reset below in changeRenderPlan().\r\n target.changeFrustum(this._frustum, this._frustum.getFraction(), true);\r\n\r\n const prevProjMatrix = target.uniforms.frustum.projectionMatrix;\r\n target.uniforms.frustum.changeProjectionMatrix(BackgroundMapDrape._postProjectionMatrix.multiplyMatrixMatrix(prevProjMatrix));\r\n\r\n target.uniforms.branch.pushState(stack.top);\r\n\r\n const renderCommands = new RenderCommands(target, stack, batchState);\r\n renderCommands.addGraphics(this._graphics, RenderPass.OpaqueGeneral);\r\n\r\n const system = System.instance;\r\n const gl = system.context;\r\n const useMRT = System.instance.capabilities.supportsDrawBuffers;\r\n\r\n system.frameBufferStack.execute(this._fbo, true, false, () => {\r\n gl.clearColor(0, 0, 0, 0);\r\n gl.clear(GL.BufferBit.Color);\r\n if (!useMRT)\r\n target.compositor.currentRenderTargetIndex = 0;\r\n\r\n target.techniques.execute(target, renderCommands.getCommands(RenderPass.OpaqueGeneral), RenderPass.PlanarClassification); // Draw these with RenderPass.PlanarClassification (rather than Opaque...) so that the pick ordering is avoided.\r\n });\r\n\r\n target.uniforms.branch.pop();\r\n\r\n batchState.reset(); // Reset the batch Ids...\r\n target.changeRenderPlan(prevPlan);\r\n\r\n system.applyRenderState(prevState);\r\n gl.viewport(0, 0, target.viewRect.width, target.viewRect.height); // Restore viewport\r\n system.glTimer.endOperation();\r\n }\r\n}\r\n"]}
|
|
@@ -36,6 +36,7 @@ export interface BranchStateOptions {
|
|
|
36
36
|
};
|
|
37
37
|
readonly appearanceProvider?: FeatureAppearanceProvider;
|
|
38
38
|
readonly realityModelDisplaySettings?: RealityModelDisplaySettings;
|
|
39
|
+
forceViewCoords?: boolean;
|
|
39
40
|
}
|
|
40
41
|
/**
|
|
41
42
|
* Represents a branch node in the scene graph, with associated view flags and transform to be applied to
|
|
@@ -48,6 +49,7 @@ export declare class BranchState {
|
|
|
48
49
|
get viewFlags(): ViewFlags;
|
|
49
50
|
set viewFlags(vf: ViewFlags);
|
|
50
51
|
get clipVolume(): ClipVolume | undefined;
|
|
52
|
+
get forceViewCoords(): boolean;
|
|
51
53
|
get planarClassifier(): PlanarClassifier | undefined;
|
|
52
54
|
get textureDrape(): TextureDrape | undefined;
|
|
53
55
|
get edgeSettings(): EdgeSettings;
|
|
@@ -67,6 +69,7 @@ export declare class BranchState {
|
|
|
67
69
|
static fromBranch(prev: BranchState, branch: Branch): BranchState;
|
|
68
70
|
getFeatureAppearance(overrides: FeatureSymbology.Overrides, elemLo: number, elemHi: number, subcatLo: number, subcatHi: number, geomClass: GeometryClass, modelLo: number, modelHi: number, type: BatchType, animationNodeId: number): FeatureAppearance | undefined;
|
|
69
71
|
static createForDecorations(): BranchState;
|
|
72
|
+
withViewCoords(): BranchState;
|
|
70
73
|
constructor(opts: BranchStateOptions);
|
|
71
74
|
}
|
|
72
75
|
//# sourceMappingURL=BranchState.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"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MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,GAAG,iBAAiB,GAAG,SAAS;WAO7P,oBAAoB,IAAI,WAAW;IAM1C,cAAc,IAAI,WAAW;gBAIjB,IAAI,EAAE,kBAAkB;CAO5C"}
|
|
@@ -25,6 +25,7 @@ export class BranchState {
|
|
|
25
25
|
get viewFlags() { return this._opts.viewFlags; }
|
|
26
26
|
set viewFlags(vf) { this._opts.viewFlags = vf.normalize(); }
|
|
27
27
|
get clipVolume() { return this._opts.clipVolume; }
|
|
28
|
+
get forceViewCoords() { return true === this._opts.forceViewCoords; }
|
|
28
29
|
get planarClassifier() { return this._opts.planarClassifier; }
|
|
29
30
|
get textureDrape() { return this._opts.textureDrape; }
|
|
30
31
|
get edgeSettings() { return this._opts.edgeSettings; }
|
|
@@ -56,6 +57,7 @@ export class BranchState {
|
|
|
56
57
|
planarClassifier: (undefined !== branch.planarClassifier && undefined !== branch.planarClassifier.texture) ? branch.planarClassifier : prev.planarClassifier,
|
|
57
58
|
textureDrape: (_c = branch.textureDrape) !== null && _c !== void 0 ? _c : prev.textureDrape,
|
|
58
59
|
clipVolume: branch.clips,
|
|
60
|
+
forceViewCoords: prev.forceViewCoords,
|
|
59
61
|
edgeSettings: (_d = branch.edgeSettings) !== null && _d !== void 0 ? _d : prev.edgeSettings,
|
|
60
62
|
is3d: (_f = (_e = branch.frustum) === null || _e === void 0 ? void 0 : _e.is3d) !== null && _f !== void 0 ? _f : prev.is3d,
|
|
61
63
|
frustumScale: (_h = (_g = branch.frustum) === null || _g === void 0 ? void 0 : _g.scale) !== null && _h !== void 0 ? _h : prev.frustumScale,
|
|
@@ -74,5 +76,8 @@ export class BranchState {
|
|
|
74
76
|
const vf = new ViewFlags({ renderMode: RenderMode.SmoothShade, lighting: false, whiteOnWhiteReversal: false });
|
|
75
77
|
return new BranchState({ viewFlags: vf, transform: Transform.createIdentity(), symbologyOverrides: new FeatureSymbology.Overrides(), edgeSettings: EdgeSettings.create(undefined), is3d: true });
|
|
76
78
|
}
|
|
79
|
+
withViewCoords() {
|
|
80
|
+
return new BranchState({ ...this._opts, forceViewCoords: true });
|
|
81
|
+
}
|
|
77
82
|
}
|
|
78
83
|
//# sourceMappingURL=BranchState.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BranchState.js","sourceRoot":"","sources":["../../../../src/render/webgl/BranchState.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAC4G,UAAU,EAAE,SAAS,GACvI,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAKvD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AA2B9C;;;;GAIG;AACH,MAAM,OAAO,WAAW;IA+DtB,YAAmB,IAAwB;QACzC,IAAI,CAAC,IAAI,CAAC,YAAY;YACpB,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;QAErC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAClB,IAAI,CAAC,KAAK,CAAC,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,SAAS,EAAE,CAAC;IAC1D,CAAC;IAlED,IAAW,SAAS,KAAK,OAAO,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC;IACvD,IAAW,SAAS,KAAK,OAAO,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC;IACvD,IAAW,SAAS,CAAC,EAAa,IAAI,IAAI,CAAC,KAAK,CAAC,SAAS,GAAG,EAAE,CAAC,SAAS,EA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MAAA,MAAM,CAAC,MAAM,CAAC,2BAA2B,mCAAI,IAAI,CAAC,2BAA2B;SAC3G,CAAC,CAAC;IACL,CAAC;IAEM,oBAAoB,CAAC,SAAqC,EAAE,MAAc,EAAE,MAAc,EAAE,QAAgB,EAAE,QAAgB,EAAE,SAAwB,EAAE,OAAe,EAAE,OAAe,EAAE,IAAe,EAAE,eAAuB;QACzO,IAAI,IAAI,CAAC,KAAK,CAAC,kBAAkB;YAC/B,OAAO,IAAI,CAAC,KAAK,CAAC,kBAAkB,CAAC,oBAAoB,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,eAAe,CAAC,CAAC;QAE/J,OAAO,SAAS,CAAC,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,eAAe,CAAC,CAAC;IACzH,CAAC;IAEM,MAAM,CAAC,oBAAoB;QAChC,MAAM,EAAE,GAAG,IAAI,SAAS,CAAC,EAAE,UAAU,EAAE,UAAU,CAAC,WAAW,EAAE,QAAQ,EAAE,KAAK,EAAE,oBAAoB,EAAE,KAAK,EAAE,CAAC,CAAC;QAE/G,OAAO,IAAI,WAAW,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE,SAAS,EAAE,SAAS,CAAC,cAAc,EAAE,EAAE,kBAAkB,EAAE,IAAI,gBAAgB,CAAC,SAAS,EAAE,EAAE,YAAY,EAAE,YAAY,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;IACnM,CAAC;CASF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module WebGL\r\n */\r\n\r\nimport { Transform } from \"@itwin/core-geometry\";\r\nimport {\r\n BatchType, FeatureAppearance, FeatureAppearanceProvider, GeometryClass, HiddenLine, RealityModelDisplaySettings, RenderMode, ViewFlags,\r\n} from \"@itwin/core-common\";\r\nimport { IModelConnection } from \"../../IModelConnection\";\r\nimport { FeatureSymbology } from \"../FeatureSymbology\";\r\nimport { ClipVolume } from \"./ClipVolume\";\r\nimport { Branch } from \"./Graphic\";\r\nimport { PlanarClassifier } from \"./PlanarClassifier\";\r\nimport { TextureDrape } from \"./TextureDrape\";\r\nimport { EdgeSettings } from \"./EdgeSettings\";\r\n\r\n/** Options used to construct a BranchState.\r\n * @internal\r\n */\r\nexport interface BranchStateOptions {\r\n readonly transform: Transform;\r\n viewFlags: ViewFlags;\r\n symbologyOverrides: FeatureSymbology.Overrides;\r\n clipVolume?: ClipVolume;\r\n readonly planarClassifier?: PlanarClassifier;\r\n readonly secondaryClassifiers?: PlanarClassifier[];\r\n readonly textureDrape?: TextureDrape;\r\n readonly edgeSettings: EdgeSettings;\r\n /** Used chiefly for readPixels() to identify context of picked Ids when graphics from multiple iModels are displayed together. */\r\n readonly iModel?: IModelConnection;\r\n /** Whether the graphics in this branch are 2d or 3d.\r\n * Sometimes we draw 3d orthographic views in the context of a 2d view (e.g., sheet view attachments).\r\n * Currently this only affects the logic for discarding surfaces (in 2d, we relay on display priority to enforce draw order between different elements;\r\n * in 3d we use the pick buffers.\r\n */\r\n is3d: boolean;\r\n frustumScale?: { x: number, y: number };\r\n readonly appearanceProvider?: FeatureAppearanceProvider;\r\n readonly realityModelDisplaySettings?: RealityModelDisplaySettings;\r\n}\r\n\r\n/**\r\n * Represents a branch node in the scene graph, with associated view flags and transform to be applied to\r\n * all sub-nodes of the branch.\r\n * @internal\r\n */\r\nexport class BranchState {\r\n private readonly _opts: BranchStateOptions;\r\n\r\n public get transform() { return this._opts.transform; }\r\n public get viewFlags() { return this._opts.viewFlags; }\r\n public set viewFlags(vf: ViewFlags) { this._opts.viewFlags = vf.normalize(); }\r\n public get clipVolume() { return this._opts.clipVolume; }\r\n public get planarClassifier() { return this._opts.planarClassifier; }\r\n public get textureDrape() { return this._opts.textureDrape; }\r\n public get edgeSettings() { return this._opts.edgeSettings; }\r\n public get iModel() { return this._opts.iModel; }\r\n public get is3d() { return this._opts.is3d; }\r\n public get frustumScale() { return this._opts.frustumScale!; }\r\n public get appearanceProvider() { return this._opts.appearanceProvider; }\r\n public get secondaryClassifiers() { return this._opts.secondaryClassifiers; }\r\n public get realityModelDisplaySettings() { return this._opts.realityModelDisplaySettings; }\r\n\r\n public get symbologyOverrides() {\r\n return this._opts.symbologyOverrides;\r\n }\r\n public set symbologyOverrides(ovrs: FeatureSymbology.Overrides) {\r\n this._opts.symbologyOverrides = ovrs;\r\n }\r\n\r\n public changeRenderPlan(viewFlags: ViewFlags, is3d: boolean, hline: HiddenLine.Settings | undefined): void {\r\n this.viewFlags = viewFlags;\r\n this._opts.is3d = is3d;\r\n this.edgeSettings.init(hline);\r\n }\r\n\r\n /** Create a BranchState from a Branch. Any properties not explicitly specified by the new Branch are inherited from the previous BranchState. */\r\n public static fromBranch(prev: BranchState, branch: Branch): BranchState {\r\n return new BranchState({\r\n viewFlags: branch.branch.getViewFlags(prev.viewFlags),\r\n transform: prev.transform.multiplyTransformTransform(branch.localToWorldTransform),\r\n symbologyOverrides: branch.branch.symbologyOverrides ?? prev.symbologyOverrides,\r\n iModel: branch.iModel ?? prev.iModel,\r\n planarClassifier: (undefined !== branch.planarClassifier && undefined !== branch.planarClassifier.texture) ? branch.planarClassifier : prev.planarClassifier,\r\n textureDrape: branch.textureDrape ?? prev.textureDrape,\r\n clipVolume: branch.clips,\r\n edgeSettings: branch.edgeSettings ?? prev.edgeSettings,\r\n is3d: branch.frustum?.is3d ?? prev.is3d,\r\n frustumScale: branch.frustum?.scale ?? prev.frustumScale,\r\n secondaryClassifiers: branch.secondaryClassifiers?? prev.secondaryClassifiers,\r\n // The branch can augment the symbology overrides. If it doesn't want to, allow its parent to do so, unless this branch supplies its own symbology overrides.\r\n appearanceProvider: branch.appearanceProvider ?? (branch.branch.symbologyOverrides ? undefined : prev.appearanceProvider),\r\n realityModelDisplaySettings: branch.branch.realityModelDisplaySettings ?? prev.realityModelDisplaySettings,\r\n });\r\n }\r\n\r\n public getFeatureAppearance(overrides: FeatureSymbology.Overrides, elemLo: number, elemHi: number, subcatLo: number, subcatHi: number, geomClass: GeometryClass, modelLo: number, modelHi: number, type: BatchType, animationNodeId: number): FeatureAppearance | undefined {\r\n if (this._opts.appearanceProvider)\r\n return this._opts.appearanceProvider.getFeatureAppearance(overrides, elemLo, elemHi, subcatLo, subcatHi, geomClass, modelLo, modelHi, type, animationNodeId);\r\n\r\n return overrides.getAppearance(elemLo, elemHi, subcatLo, subcatHi, geomClass, modelLo, modelHi, type, animationNodeId);\r\n }\r\n\r\n public static createForDecorations(): BranchState {\r\n const vf = new ViewFlags({ renderMode: RenderMode.SmoothShade, lighting: false, whiteOnWhiteReversal: false });\r\n\r\n return new BranchState({ viewFlags: vf, transform: Transform.createIdentity(), symbologyOverrides: new FeatureSymbology.Overrides(), edgeSettings: EdgeSettings.create(undefined), is3d: true });\r\n }\r\n\r\n public constructor(opts: BranchStateOptions) {\r\n if (!opts.frustumScale)\r\n opts.frustumScale = { x: 1, y: 1 };\r\n\r\n this._opts = opts;\r\n this._opts.viewFlags = this._opts.viewFlags.normalize();\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"BranchState.js","sourceRoot":"","sources":["../../../../src/render/webgl/BranchState.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAC4G,UAAU,EAAE,SAAS,GACvI,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAKvD,OAAO,EAAE,YAAY,EAAE,MA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AAC,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,eAAe,CAAC,CAAC;IACzH,CAAC;IAEM,MAAM,CAAC,oBAAoB;QAChC,MAAM,EAAE,GAAG,IAAI,SAAS,CAAC,EAAE,UAAU,EAAE,UAAU,CAAC,WAAW,EAAE,QAAQ,EAAE,KAAK,EAAE,oBAAoB,EAAE,KAAK,EAAE,CAAC,CAAC;QAE/G,OAAO,IAAI,WAAW,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE,SAAS,EAAE,SAAS,CAAC,cAAc,EAAE,EAAE,kBAAkB,EAAE,IAAI,gBAAgB,CAAC,SAAS,EAAE,EAAE,YAAY,EAAE,YAAY,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;IACnM,CAAC;IAEM,cAAc;QACnB,OAAO,IAAI,WAAW,CAAC,EAAE,GAAG,IAAI,CAAC,KAAK,EAAE,eAAe,EAAE,IAAI,EAAE,CAAC,CAAC;IACnE,CAAC;CASF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module WebGL\r\n */\r\n\r\nimport { Transform } from \"@itwin/core-geometry\";\r\nimport {\r\n BatchType, FeatureAppearance, FeatureAppearanceProvider, GeometryClass, HiddenLine, RealityModelDisplaySettings, RenderMode, ViewFlags,\r\n} from \"@itwin/core-common\";\r\nimport { IModelConnection } from \"../../IModelConnection\";\r\nimport { FeatureSymbology } from \"../FeatureSymbology\";\r\nimport { ClipVolume } from \"./ClipVolume\";\r\nimport { Branch } from \"./Graphic\";\r\nimport { PlanarClassifier } from \"./PlanarClassifier\";\r\nimport { TextureDrape } from \"./TextureDrape\";\r\nimport { EdgeSettings } from \"./EdgeSettings\";\r\n\r\n/** Options used to construct a BranchState.\r\n * @internal\r\n */\r\nexport interface BranchStateOptions {\r\n readonly transform: Transform;\r\n viewFlags: ViewFlags;\r\n symbologyOverrides: FeatureSymbology.Overrides;\r\n clipVolume?: ClipVolume;\r\n readonly planarClassifier?: PlanarClassifier;\r\n readonly secondaryClassifiers?: PlanarClassifier[];\r\n readonly textureDrape?: TextureDrape;\r\n readonly edgeSettings: EdgeSettings;\r\n /** Used chiefly for readPixels() to identify context of picked Ids when graphics from multiple iModels are displayed together. */\r\n readonly iModel?: IModelConnection;\r\n /** Whether the graphics in this branch are 2d or 3d.\r\n * Sometimes we draw 3d orthographic views in the context of a 2d view (e.g., sheet view attachments).\r\n * Currently this only affects the logic for discarding surfaces (in 2d, we relay on display priority to enforce draw order between different elements;\r\n * in 3d we use the pick buffers.\r\n */\r\n is3d: boolean;\r\n frustumScale?: { x: number, y: number };\r\n readonly appearanceProvider?: FeatureAppearanceProvider;\r\n readonly realityModelDisplaySettings?: RealityModelDisplaySettings;\r\n forceViewCoords?: boolean;\r\n}\r\n\r\n/**\r\n * Represents a branch node in the scene graph, with associated view flags and transform to be applied to\r\n * all sub-nodes of the branch.\r\n * @internal\r\n */\r\nexport class BranchState {\r\n private readonly _opts: BranchStateOptions;\r\n\r\n public get transform() { return this._opts.transform; }\r\n public get viewFlags() { return this._opts.viewFlags; }\r\n public set viewFlags(vf: ViewFlags) { this._opts.viewFlags = vf.normalize(); }\r\n public get clipVolume() { return this._opts.clipVolume; }\r\n public get forceViewCoords(): boolean { return true === this._opts.forceViewCoords; }\r\n public get planarClassifier() { return this._opts.planarClassifier; }\r\n public get textureDrape() { return this._opts.textureDrape; }\r\n public get edgeSettings() { return this._opts.edgeSettings; }\r\n public get iModel() { return this._opts.iModel; }\r\n public get is3d() { return this._opts.is3d; }\r\n public get frustumScale() { return this._opts.frustumScale!; }\r\n public get appearanceProvider() { return this._opts.appearanceProvider; }\r\n public get secondaryClassifiers() { return this._opts.secondaryClassifiers; }\r\n public get realityModelDisplaySettings() { return this._opts.realityModelDisplaySettings; }\r\n\r\n public get symbologyOverrides() {\r\n return this._opts.symbologyOverrides;\r\n }\r\n public set symbologyOverrides(ovrs: FeatureSymbology.Overrides) {\r\n this._opts.symbologyOverrides = ovrs;\r\n }\r\n\r\n public changeRenderPlan(viewFlags: ViewFlags, is3d: boolean, hline: HiddenLine.Settings | undefined): void {\r\n this.viewFlags = viewFlags;\r\n this._opts.is3d = is3d;\r\n this.edgeSettings.init(hline);\r\n }\r\n\r\n /** Create a BranchState from a Branch. Any properties not explicitly specified by the new Branch are inherited from the previous BranchState. */\r\n public static fromBranch(prev: BranchState, branch: Branch): BranchState {\r\n return new BranchState({\r\n viewFlags: branch.branch.getViewFlags(prev.viewFlags),\r\n transform: prev.transform.multiplyTransformTransform(branch.localToWorldTransform),\r\n symbologyOverrides: branch.branch.symbologyOverrides ?? prev.symbologyOverrides,\r\n iModel: branch.iModel ?? prev.iModel,\r\n planarClassifier: (undefined !== branch.planarClassifier && undefined !== branch.planarClassifier.texture) ? branch.planarClassifier : prev.planarClassifier,\r\n textureDrape: branch.textureDrape ?? prev.textureDrape,\r\n clipVolume: branch.clips,\r\n forceViewCoords: prev.forceViewCoords,\r\n edgeSettings: branch.edgeSettings ?? prev.edgeSettings,\r\n is3d: branch.frustum?.is3d ?? prev.is3d,\r\n frustumScale: branch.frustum?.scale ?? prev.frustumScale,\r\n secondaryClassifiers: branch.secondaryClassifiers?? prev.secondaryClassifiers,\r\n // The branch can augment the symbology overrides. If it doesn't want to, allow its parent to do so, unless this branch supplies its own symbology overrides.\r\n appearanceProvider: branch.appearanceProvider ?? (branch.branch.symbologyOverrides ? undefined : prev.appearanceProvider),\r\n realityModelDisplaySettings: branch.branch.realityModelDisplaySettings ?? prev.realityModelDisplaySettings,\r\n });\r\n }\r\n\r\n public getFeatureAppearance(overrides: FeatureSymbology.Overrides, elemLo: number, elemHi: number, subcatLo: number, subcatHi: number, geomClass: GeometryClass, modelLo: number, modelHi: number, type: BatchType, animationNodeId: number): FeatureAppearance | undefined {\r\n if (this._opts.appearanceProvider)\r\n return this._opts.appearanceProvider.getFeatureAppearance(overrides, elemLo, elemHi, subcatLo, subcatHi, geomClass, modelLo, modelHi, type, animationNodeId);\r\n\r\n return overrides.getAppearance(elemLo, elemHi, subcatLo, subcatHi, geomClass, modelLo, modelHi, type, animationNodeId);\r\n }\r\n\r\n public static createForDecorations(): BranchState {\r\n const vf = new ViewFlags({ renderMode: RenderMode.SmoothShade, lighting: false, whiteOnWhiteReversal: false });\r\n\r\n return new BranchState({ viewFlags: vf, transform: Transform.createIdentity(), symbologyOverrides: new FeatureSymbology.Overrides(), edgeSettings: EdgeSettings.create(undefined), is3d: true });\r\n }\r\n\r\n public withViewCoords(): BranchState {\r\n return new BranchState({ ...this._opts, forceViewCoords: true });\r\n }\r\n\r\n public constructor(opts: BranchStateOptions) {\r\n if (!opts.frustumScale)\r\n opts.frustumScale = { x: 1, y: 1 };\r\n\r\n this._opts = opts;\r\n this._opts.viewFlags = this._opts.viewFlags.normalize();\r\n }\r\n}\r\n"]}
|
|
@@ -230,6 +230,38 @@ export declare class BlurGeometry extends TexturedViewportQuadGeometry {
|
|
|
230
230
|
private constructor();
|
|
231
231
|
}
|
|
232
232
|
/** @internal */
|
|
233
|
+
export declare class EDLCalcBasicGeometry extends TexturedViewportQuadGeometry {
|
|
234
|
+
readonly texInfo: Float32Array;
|
|
235
|
+
static createGeometry(colorBuffer: WebGLTexture, depthBuffer: WebGLTexture, width: number, height: number): EDLCalcBasicGeometry | undefined;
|
|
236
|
+
get colorTexture(): WebGLTexture;
|
|
237
|
+
get depthTexture(): WebGLTexture;
|
|
238
|
+
private constructor();
|
|
239
|
+
}
|
|
240
|
+
/** @internal */
|
|
241
|
+
export declare class EDLCalcFullGeometry extends TexturedViewportQuadGeometry {
|
|
242
|
+
readonly texInfo: Float32Array;
|
|
243
|
+
static createGeometry(colorBuffer: WebGLTexture, depthBuffer: WebGLTexture, scale: number, width: number, height: number): EDLCalcFullGeometry | undefined;
|
|
244
|
+
get colorTexture(): WebGLTexture;
|
|
245
|
+
get depthTexture(): WebGLTexture;
|
|
246
|
+
private constructor();
|
|
247
|
+
}
|
|
248
|
+
/** @internal */
|
|
249
|
+
export declare class EDLFilterGeometry extends TexturedViewportQuadGeometry {
|
|
250
|
+
readonly texInfo: Float32Array;
|
|
251
|
+
static createGeometry(colorBuffer: WebGLTexture, depthBuffer: WebGLTexture, scale: number, width: number, height: number): EDLFilterGeometry | undefined;
|
|
252
|
+
get colorTexture(): WebGLTexture;
|
|
253
|
+
get depthTexture(): WebGLTexture;
|
|
254
|
+
private constructor();
|
|
255
|
+
}
|
|
256
|
+
/** @internal */
|
|
257
|
+
export declare class EDLMixGeometry extends TexturedViewportQuadGeometry {
|
|
258
|
+
static createGeometry(colorTexture1: WebGLTexture, colorTexture2: WebGLTexture, colorTexture4: WebGLTexture): EDLMixGeometry | undefined;
|
|
259
|
+
get colorTexture1(): WebGLTexture;
|
|
260
|
+
get colorTexture2(): WebGLTexture;
|
|
261
|
+
get colorTexture4(): WebGLTexture;
|
|
262
|
+
private constructor();
|
|
263
|
+
}
|
|
264
|
+
/** @internal */
|
|
233
265
|
export declare class EVSMGeometry extends TexturedViewportQuadGeometry {
|
|
234
266
|
readonly stepSize: Float32Array;
|
|
235
267
|
static createGeometry(depthBuffer: WebGLTexture, width: number, height: number): EVSMGeometry | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CachedGeometry.d.ts","sourceRoot":"","sources":["../../../../src/render/webgl/CachedGeometry.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAAkB,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAY,MAAM,sBAAsB,CAAC;AAC5F,OAAO,EAAkB,SAAS,EAAE,YAAY,EAAE,YAAY,EAAc,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACtH,OAAO,EAAE,uBAAuB,EAA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C1C,SAAgB,QAAQ,EAAE,YAAY,CAAC;IAEvC,SAAS,aAAa,QAAQ,EAAE,YAAY,EAAE,QAAQ,EAAE,YAAY;WAwBtD,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,GAAG,oBAAoB;IAqB/F,IAAI,IAAI,IAAI;IAMnB,IAAW,UAAU,IAAI,OAAO,CAAkE;IAE3F,OAAO;IAKP,iBAAiB,CAAC,KAAK,EAAE,YAAY,CAAC,UAAU,GAAG,IAAI;IAI9D,SAAS,CAAC,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO;IACpD,IAAW,WAAW,IAAI,WAAW,CAAsC;IAC3D,OAAO,IAAI,IAAI;IAC/B,IAAW,WAAW,gBAA+B;IACrD,IAAW,OAAO,iBAA2B;IAC7C,IAAW,MAAM,iBAA0B;CAC5C;AAED,gBAAgB;AAChB,qBAAa,eAAgB,YAAW,eAAe;IAC9C,OAAO,EAAE,gBAAgB,CAAC;IAC1B,OAAO,EAAE,YAAY,CAAC;IACtB,WAAW,EAAE,YAAY,CAAC;IAC1B,oBAAoB,EAAE,YAAY,CAAC;IAC1C,OAAO;WAwBO,MAAM,CAAC,QAAQ,EAAE,kBAAkB,GAAG,eAAe,GAAG,SAAS;IAOxE,iBAAiB,CAAC,KAAK,EAAE,YAAY,CAAC,UAAU,EAAE,IAAI,EAAE,YAAY,CAAC,UAAU,GAAG,IAAI;IAI7F,IAAW,UAAU,IAAI,OAAO,CAK/B;IAEM,OAAO;CAMf"}
|
|
@@ -616,6 +616,75 @@ export class BlurGeometry extends TexturedViewportQuadGeometry {
|
|
|
616
616
|
get depthAndOrderHidden() { return this._textures[2]; }
|
|
617
617
|
}
|
|
618
618
|
/** @internal */
|
|
619
|
+
export class EDLCalcBasicGeometry extends TexturedViewportQuadGeometry {
|
|
620
|
+
constructor(params, textures, width, height) {
|
|
621
|
+
super(params, 34 /* EDLCalcBasic */, textures);
|
|
622
|
+
this.texInfo = new Float32Array(3);
|
|
623
|
+
this.texInfo[0] = 1.0 / width;
|
|
624
|
+
this.texInfo[1] = 1.0 / height;
|
|
625
|
+
this.texInfo[2] = 1.0;
|
|
626
|
+
}
|
|
627
|
+
static createGeometry(colorBuffer, depthBuffer, width, height) {
|
|
628
|
+
const params = ViewportQuad.getInstance().createParams();
|
|
629
|
+
if (undefined === params)
|
|
630
|
+
return undefined;
|
|
631
|
+
return new EDLCalcBasicGeometry(params, [colorBuffer, depthBuffer], width, height);
|
|
632
|
+
}
|
|
633
|
+
get colorTexture() { return this._textures[0]; }
|
|
634
|
+
get depthTexture() { return this._textures[1]; }
|
|
635
|
+
}
|
|
636
|
+
/** @internal */
|
|
637
|
+
export class EDLCalcFullGeometry extends TexturedViewportQuadGeometry {
|
|
638
|
+
constructor(params, textures, scale, width, height) {
|
|
639
|
+
super(params, 35 /* EDLCalcFull */, textures);
|
|
640
|
+
this.texInfo = new Float32Array(3);
|
|
641
|
+
this.texInfo[0] = 1.0 / width;
|
|
642
|
+
this.texInfo[1] = 1.0 / height;
|
|
643
|
+
this.texInfo[2] = scale;
|
|
644
|
+
}
|
|
645
|
+
static createGeometry(colorBuffer, depthBuffer, scale, width, height) {
|
|
646
|
+
const params = ViewportQuad.getInstance().createParams();
|
|
647
|
+
if (undefined === params)
|
|
648
|
+
return undefined;
|
|
649
|
+
return new EDLCalcFullGeometry(params, [colorBuffer, depthBuffer], scale, width, height);
|
|
650
|
+
}
|
|
651
|
+
get colorTexture() { return this._textures[0]; }
|
|
652
|
+
get depthTexture() { return this._textures[1]; }
|
|
653
|
+
}
|
|
654
|
+
/** @internal */
|
|
655
|
+
export class EDLFilterGeometry extends TexturedViewportQuadGeometry {
|
|
656
|
+
constructor(params, textures, scale, width, height) {
|
|
657
|
+
super(params, 36 /* EDLFilter */, textures);
|
|
658
|
+
this.texInfo = new Float32Array(3);
|
|
659
|
+
this.texInfo[0] = 1.0 / width;
|
|
660
|
+
this.texInfo[1] = 1.0 / height;
|
|
661
|
+
this.texInfo[2] = scale;
|
|
662
|
+
}
|
|
663
|
+
static createGeometry(colorBuffer, depthBuffer, scale, width, height) {
|
|
664
|
+
const params = ViewportQuad.getInstance().createParams();
|
|
665
|
+
if (undefined === params)
|
|
666
|
+
return undefined;
|
|
667
|
+
return new EDLFilterGeometry(params, [colorBuffer, depthBuffer], scale, width, height);
|
|
668
|
+
}
|
|
669
|
+
get colorTexture() { return this._textures[0]; }
|
|
670
|
+
get depthTexture() { return this._textures[1]; }
|
|
671
|
+
}
|
|
672
|
+
/** @internal */
|
|
673
|
+
export class EDLMixGeometry extends TexturedViewportQuadGeometry {
|
|
674
|
+
static createGeometry(colorTexture1, colorTexture2, colorTexture4) {
|
|
675
|
+
const params = ViewportQuad.getInstance().createParams();
|
|
676
|
+
if (undefined === params)
|
|
677
|
+
return undefined;
|
|
678
|
+
return new EDLMixGeometry(params, [colorTexture1, colorTexture2, colorTexture4]);
|
|
679
|
+
}
|
|
680
|
+
get colorTexture1() { return this._textures[0]; }
|
|
681
|
+
get colorTexture2() { return this._textures[1]; }
|
|
682
|
+
get colorTexture4() { return this._textures[2]; }
|
|
683
|
+
constructor(params, textures) {
|
|
684
|
+
super(params, 37 /* EDLMix */, textures);
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
/** @internal */
|
|
619
688
|
export class EVSMGeometry extends TexturedViewportQuadGeometry {
|
|
620
689
|
constructor(params, textures, width, height) {
|
|
621
690
|
super(params, 22 /* EVSMFromDepth */, textures);
|