@arcgis/core 5.0.0-next.68 → 5.0.0-next.69
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/Ground.d.ts +3 -4
- package/WebDocument2D.d.ts +1 -1
- package/WebLinkChart.d.ts +2 -0
- package/analysis/ElevationProfile/ElevationProfileLineQuery.d.ts +3 -4
- package/analysis/types.d.ts +1 -0
- package/applications/Components/analysisUtils.d.ts +1 -3
- package/applications/Components/arcadeFeatureUtils.d.ts +1 -1
- package/applications/ExperienceBuilder/sketchUtils.d.ts +2 -2
- package/applications/KnowledgeStudio/reshape.d.ts +2 -2
- package/applications/SceneViewer/sceneViewerUtils.d.ts +11 -0
- package/applications/SceneViewer/sceneViewerUtils.js +1 -1
- package/assets/esri/core/libs/libtess/libtess-f32.wasm +0 -0
- package/assets/esri/core/libs/libtess/libtess-f64.wasm +0 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{c623918e289a09905cd1.js → 01d7542d85a453384cf1.js} +1 -1
- package/assets/esri/core/workers/chunks/{168ec8fca2702617a543.js → 09dfec3e097ebbef6a89.js} +1 -1
- package/assets/esri/core/workers/chunks/{794960ec36e11f4416c2.js → 1d1e25bb61eeeee8ee94.js} +1 -1
- package/assets/esri/core/workers/chunks/2e2c47f8a80ee9234350.js +1 -0
- package/assets/esri/core/workers/chunks/{b2a1e5e9182b643909eb.js → 4c04c54330b693892cfc.js} +47 -49
- package/assets/esri/core/workers/chunks/563933a84fc9b0e021f6.js +1 -0
- package/assets/esri/core/workers/chunks/58b3a776ef129f7f86dc.js +1 -0
- package/assets/esri/core/workers/chunks/58e8d41dcc450e6427c9.js +1 -0
- package/assets/esri/core/workers/chunks/6c9dac4a869742cc2718.js +1 -0
- package/assets/esri/core/workers/chunks/{e5aac523c37d906eece6.js → 827277e5da652bcecaf2.js} +1 -1
- package/assets/esri/core/workers/chunks/9f34cf024231f574009c.js +1 -0
- package/assets/esri/core/workers/chunks/a10c6dd3bb8b3602de68.js +1 -0
- package/assets/esri/core/workers/chunks/a64cd02ca959d511101c.js +1 -0
- package/assets/esri/core/workers/chunks/{0f8149fdcf0adeca268e.js → b28e0b89603d8b03f9e1.js} +1 -1
- package/assets/esri/core/workers/chunks/b5e4a36784d598ae6679.js +1 -0
- package/assets/esri/core/workers/chunks/{204d738c8b651314ae64.js → b899b4e7979c13b99526.js} +1 -1
- package/assets/esri/core/workers/chunks/bf05164b7a3e4f31e9db.js +1 -0
- package/assets/esri/core/workers/chunks/d0ae8752419d5b761190.js +1 -0
- package/assets/esri/core/workers/chunks/dbfb00fb28b8b9f687a1.js +1 -0
- package/assets/esri/core/workers/chunks/e071b912539304564b69.js +1 -0
- package/assets/esri/core/workers/chunks/{ab71865b94022e78035c.js → f92845eb7df1804fcd6d.js} +1 -1
- package/assets/esri/themes/base/widgets/_BatchAttributeForm.scss +108 -0
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/chunks/GaussianSplat.glsl.js +2 -2
- package/chunks/GaussianSplatDepthComposition.glsl.js +4 -5
- package/chunks/HUDMaterial.glsl.js +45 -47
- package/chunks/LineMarker.glsl.js +33 -34
- package/chunks/PointRenderer.glsl.js +6 -6
- package/chunks/RibbonLine.glsl.js +62 -54
- package/chunks/libtess-f32.js +1 -1
- package/chunks/libtess-f64.js +1 -1
- package/config.js +1 -1
- package/core/Collection.d.ts +3 -2
- package/core/Identifiable.d.ts +1 -3
- package/core/accessorSupport/types.d.ts +0 -8
- package/core/promiseUtils.d.ts +1 -1
- package/core/reactiveUtils.d.ts +2 -2
- package/core/units.d.ts +8 -2
- package/geometry/HeightModelInfo.d.ts +3 -3
- package/geometry/SpatialReference.d.ts +2 -2
- package/geometry/libtess.js +1 -1
- package/geometry/support/meshUtils/types.d.ts +2 -2
- package/geometry/types.d.ts +2 -0
- package/identity/IdentityManagerBase.d.ts +4 -4
- package/interfaces.d.ts +2937 -2954
- package/kernel.js +1 -1
- package/layers/BaseElevationLayer.d.ts +3 -4
- package/layers/ElevationLayer.d.ts +3 -4
- package/layers/FeatureLayer.d.ts +12 -11
- package/layers/FeatureLayer.js +1 -1
- package/layers/GroupLayer.d.ts +3 -3
- package/layers/ImageryLayer.d.ts +3 -3
- package/layers/ImageryTileLayer.d.ts +3 -4
- package/layers/Layer.d.ts +4 -4
- package/layers/LineOfSightLayer.d.ts +1 -1
- package/layers/LinkChartLayer.js +1 -1
- package/layers/MapImageLayer.d.ts +7 -8
- package/layers/MediaLayer.d.ts +3 -3
- package/layers/OrientedImageryLayer.d.ts +3 -3
- package/layers/ParquetLayer.d.ts +1 -1
- package/layers/ParquetLayer.js +1 -1
- package/layers/RouteLayer.d.ts +2 -3
- package/layers/SceneLayer.d.ts +167 -3
- package/layers/SceneLayer.js +1 -1
- package/layers/StreamLayer.d.ts +3 -3
- package/layers/SubtypeGroupLayer.d.ts +3 -3
- package/layers/WCSLayer.d.ts +3 -3
- package/layers/graphics/sources/ParquetSource.d.ts +1 -1
- package/layers/graphics/sources/support/QueryTask.js +1 -1
- package/layers/mixins/SceneService.d.ts +2 -2
- package/layers/orientedImagery/queries.js +1 -1
- package/layers/orientedImagery/transformations/imageToWorld.d.ts +2 -2
- package/layers/orientedImagery/transformations/types.d.ts +1 -1
- package/layers/raster/datasets/pixelReader.d.ts +1 -7
- package/layers/raster/functions/creators/createBandIndexFunctions.d.ts +29 -29
- package/layers/support/BuildingFilterMode.d.ts +3 -1
- package/layers/support/BuildingFilterMode.js +1 -1
- package/layers/support/BuildingFilterModeSolid.js +1 -1
- package/layers/support/BuildingFilterModeWireFrame.js +1 -1
- package/layers/support/BuildingFilterModeXRay.js +1 -1
- package/layers/support/CodedValue.d.ts +1 -1
- package/layers/support/ControlPoint.d.ts +6 -20
- package/layers/support/ControlPointsGeoreference.d.ts +2 -1
- package/layers/support/ElevationSampler.d.ts +2 -2
- package/layers/support/FeatureReductionBinning.d.ts +4 -4
- package/layers/support/FeatureReductionBinning.js +1 -1
- package/layers/support/FeatureReductionSelection.d.ts +3 -3
- package/layers/support/FeatureReductionSelection.js +1 -1
- package/layers/support/Field.d.ts +1 -2
- package/layers/support/ParquetGeometryEncodingLocation.d.ts +6 -4
- package/layers/support/ParquetGeometryEncodingLocation.js +1 -1
- package/layers/support/ParquetGeometryEncodingWkb.d.ts +6 -4
- package/layers/support/ParquetGeometryEncodingWkb.js +1 -1
- package/layers/support/PixelBlock.d.ts +11 -3
- package/layers/support/RangeDomain.d.ts +2 -1
- package/layers/support/SceneServiceTimeInfo.js +5 -0
- package/layers/support/SpriteSource.d.ts +1 -0
- package/layers/support/Sublayer.d.ts +17 -16
- package/layers/support/Sublayer.js +1 -1
- package/layers/support/featureReductionUtils.js +1 -1
- package/layers/support/rasterFunctionUtils.d.ts +30 -30
- package/layers/support/types.d.ts +101 -1
- package/layers/types.d.ts +12 -1
- package/layers/wms/types.d.ts +0 -4
- package/networks/CircuitManager.d.ts +5 -5
- package/networks/Network.d.ts +5 -5
- package/networks/UtilityNetwork.d.ts +2 -2
- package/package.json +2 -2
- package/popup/content/types.d.ts +1 -3
- package/portal/PortalItem.d.ts +8 -8
- package/portal/PortalItemResource.d.ts +2 -2
- package/portal/PortalUser.d.ts +3 -3
- package/portal/support/resourceUtils.d.ts +3 -3
- package/portal/types.d.ts +6 -6
- package/renderers/support/pointCloud/types.d.ts +1 -0
- package/renderers/support/raster/types.d.ts +1 -0
- package/renderers/types.d.ts +2 -0
- package/rest/knowledgeGraph/wasmInterface/WasmDataModelWrapperInterfaces.d.ts +0 -2
- package/rest/layerSources/DynamicDataLayer.d.ts +102 -0
- package/rest/layerSources/DynamicDataLayer.js +5 -0
- package/{layers/support/source/MapLayerSource.d.ts → rest/layerSources/DynamicMapLayer.d.ts} +4 -4
- package/rest/layerSources/DynamicMapLayer.js +5 -0
- package/rest/layerSources/JoinTableDataSource.d.ts +75 -0
- package/rest/layerSources/JoinTableDataSource.js +5 -0
- package/{layers/support/source → rest/layerSources}/QueryTableDataSource.d.ts +8 -7
- package/rest/layerSources/QueryTableDataSource.js +5 -0
- package/{layers/support/source → rest/layerSources}/RasterDataSource.d.ts +2 -2
- package/rest/layerSources/RasterDataSource.js +5 -0
- package/{layers/support/source → rest/layerSources}/TableDataSource.d.ts +2 -2
- package/rest/layerSources/TableDataSource.js +5 -0
- package/rest/layerSources/utils.js +5 -0
- package/rest/print.js +1 -1
- package/rest/query/executeQuery.js +1 -1
- package/rest/support/Query.js +1 -1
- package/rest/support/RelationshipQuery.js +1 -1
- package/rest/support/types.d.ts +0 -4
- package/smartMapping/heuristics/binLevel.d.ts +2 -2
- package/smartMapping/heuristics/scaleRange.d.ts +2 -2
- package/smartMapping/heuristics/sizeRange.d.ts +2 -2
- package/smartMapping/heuristics/types.d.ts +3 -3
- package/smartMapping/labels/bins.d.ts +2 -2
- package/smartMapping/labels/clusters.d.ts +2 -2
- package/smartMapping/renderers/color.d.ts +14 -14
- package/smartMapping/renderers/dotDensity.d.ts +2 -2
- package/smartMapping/renderers/heatmap.d.ts +4 -4
- package/smartMapping/renderers/location.d.ts +2 -2
- package/smartMapping/renderers/opacity.d.ts +2 -2
- package/smartMapping/renderers/pieChart.d.ts +4 -4
- package/smartMapping/renderers/predominance.d.ts +2 -2
- package/smartMapping/renderers/relationship.d.ts +4 -4
- package/smartMapping/renderers/size.d.ts +15 -15
- package/smartMapping/renderers/support/rendererUtils.d.ts +2 -2
- package/smartMapping/renderers/type.d.ts +4 -4
- package/smartMapping/renderers/univariateColorSize.d.ts +4 -4
- package/smartMapping/statistics/classBreaks.d.ts +2 -2
- package/smartMapping/statistics/heatmapStatistics.d.ts +2 -2
- package/smartMapping/statistics/histogram.d.ts +2 -2
- package/smartMapping/statistics/predominantCategories.d.ts +2 -2
- package/smartMapping/statistics/summaryStatistics.d.ts +2 -2
- package/smartMapping/statistics/summaryStatisticsForAge.d.ts +2 -2
- package/smartMapping/statistics/support/ageUtils.d.ts +2 -2
- package/smartMapping/statistics/types.d.ts +7 -7
- package/smartMapping/statistics/uniqueValues.d.ts +2 -2
- package/smartMapping/symbology/color.d.ts +8 -8
- package/smartMapping/symbology/dotDensity.d.ts +6 -6
- package/smartMapping/symbology/flow.d.ts +6 -6
- package/smartMapping/symbology/heatmap.d.ts +6 -6
- package/smartMapping/symbology/location.d.ts +2 -2
- package/smartMapping/symbology/pieChart.d.ts +6 -6
- package/smartMapping/symbology/predominance.d.ts +6 -6
- package/smartMapping/symbology/relationship.d.ts +6 -6
- package/smartMapping/symbology/size.d.ts +2 -2
- package/smartMapping/symbology/support/colorRamps.d.ts +2 -2
- package/smartMapping/symbology/type.d.ts +6 -6
- package/support/popupUtils.d.ts +2 -2
- package/support/revision.js +1 -1
- package/symbols/LineSymbol3D.d.ts +2 -2
- package/symbols/PointSymbol3D.d.ts +2 -2
- package/symbols/PolygonSymbol3D.d.ts +2 -2
- package/symbols/patterns/LinePattern3D.d.ts +8 -0
- package/symbols/patterns/LineStylePattern3D.d.ts +1 -2
- package/symbols/patterns/Pattern3D.d.ts +9 -0
- package/symbols/patterns/StylePattern3D.d.ts +1 -2
- package/symbols/types.d.ts +7 -0
- package/unionTypes.d.ts +13 -13
- package/views/2d/analysis/types.d.ts +1 -0
- package/views/2d/engine/vectorTiles/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/layers/BaseLayerView2D.d.ts +0 -5
- package/views/2d/layers/FeatureLayerView2D.js +1 -1
- package/views/2d/layers/StreamLayerView2D.js +1 -1
- package/views/2d/layers/features/Processor.js +1 -1
- package/views/2d/layers/support/MediaLayerInteractionOptions.js +1 -1
- package/views/3d/analysis/LineOfSightAnalysisView3D.d.ts +0 -2
- package/views/3d/analysis/types.d.ts +1 -0
- package/views/3d/environment/SunLighting.d.ts +1 -3
- package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
- package/views/3d/layers/support/MediaLayerInteractionOptions.d.ts +4 -0
- package/views/3d/support/QualityProfile.js +1 -1
- package/views/3d/support/QualitySettings.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatDataStore.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatFadeTexture.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Transform.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/PositionOutsideClipSpace.js +5 -0
- package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/LocalOriginManager.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/LegacyTransform.js +5 -0
- package/views/3d/webgl-engine/shaders/GaussianSplat.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplatTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/HUDMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/LineMarker.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/PointRenderer.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLine.glsl.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/View.js +1 -1
- package/views/View2D.js +1 -1
- package/views/analysis/types.d.ts +4 -0
- package/views/input/types.d.ts +2 -4
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiledFetcher.js +1 -1
- package/views/layers/CatalogLayerView.d.ts +1 -4
- package/views/layers/DimensionLayerView.d.ts +4 -6
- package/views/layers/DimensionLayerViewMixin.d.ts +0 -97
- package/views/layers/LineOfSightLayerView.d.ts +4 -6
- package/views/layers/LineOfSightLayerViewMixin.d.ts +0 -77
- package/views/layers/StreamLayerView.d.ts +31 -2
- package/views/support/WebAssemblyRequirements.js +5 -0
- package/views/support/WebGLRequirements.js +1 -1
- package/webdoc/support/SlideThumbnail.d.ts +6 -3
- package/webdoc/support/SlideThumbnail.js +1 -1
- package/webscene/spec-certification/api.js +1 -1
- package/widgets/AreaMeasurement2D/AreaMeasurement2DViewModel.d.ts +2 -2
- package/widgets/AreaMeasurement2D/AreaMeasurement2DViewModel.js +1 -1
- package/widgets/AreaMeasurement3D/AreaMeasurement3DViewModel.d.ts +2 -2
- package/widgets/AreaMeasurement3D/AreaMeasurement3DViewModel.js +1 -1
- package/widgets/BatchAttributeForm/inputs/InputBase.js +1 -1
- package/widgets/BatchAttributeForm/inputs/TextElementInput.d.ts +7 -0
- package/widgets/BatchAttributeForm/inputs/TextElementInput.js +1 -1
- package/widgets/BatchAttributeForm/inputs/support/textInputElementUtils.js +5 -0
- package/widgets/BatchAttributeForm/templates/TextElementTemplate.js +1 -1
- package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
- package/widgets/BatchAttributeForm/templates/support/hashElementTemplate.js +1 -1
- package/widgets/BatchAttributeForm.js +1 -1
- package/widgets/DirectLineMeasurement3D/DirectLineMeasurement3DViewModel.d.ts +2 -2
- package/widgets/DirectLineMeasurement3D/DirectLineMeasurement3DViewModel.js +1 -1
- package/widgets/Directions/DirectionsViewModel.d.ts +20 -4
- package/widgets/Directions/DirectionsViewModel.js +1 -1
- package/widgets/Directions.d.ts +2 -3
- package/widgets/DistanceMeasurement2D/DistanceMeasurement2DViewModel.d.ts +2 -2
- package/widgets/DistanceMeasurement2D/DistanceMeasurement2DViewModel.js +1 -1
- package/widgets/Editor/EditorViewModel.d.ts +2 -2
- package/widgets/Editor.d.ts +2 -2
- package/widgets/ElevationProfile/support/HoveredPoints.js +1 -1
- package/widgets/ElevationProfile/types.d.ts +3 -4
- package/widgets/Feature/support/arcadeFeatureUtils.js +1 -1
- package/widgets/Feature/types.d.ts +1 -5
- package/widgets/FeatureTable/Grid/types.d.ts +0 -2
- package/widgets/FeatureTable/support/types.d.ts +8 -8
- package/widgets/Features/FeaturesViewModel.d.ts +3 -3
- package/widgets/Features/FeaturesViewModel.js +1 -1
- package/widgets/LineOfSight/LineOfSightViewModel.d.ts +2 -2
- package/widgets/LineOfSight/LineOfSightViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/navigation/queries.js +1 -1
- package/widgets/Popup/types.d.ts +0 -2
- package/widgets/ShadowCast/ShadowCastVisibleElements.d.ts +2 -0
- package/widgets/Sketch/SketchViewModel.js +1 -1
- package/widgets/Sketch/types.d.ts +2 -2
- package/widgets/Slice/SliceViewModel.d.ts +2 -2
- package/widgets/Slice/SliceViewModel.js +1 -1
- package/widgets/Spinner/SpinnerViewModel.js +1 -1
- package/widgets/support/AnalysisViewModelMixin.js +5 -0
- package/widgets/support/AnchorElementViewModel.js +1 -1
- package/widgets/support/InteractiveToolViewModelMixin.js +5 -0
- package/assets/esri/core/workers/chunks/3c3d311b88f5400951ef.js +0 -1
- package/assets/esri/core/workers/chunks/4a060147d25929680ec8.js +0 -1
- package/assets/esri/core/workers/chunks/4d0eaeb4cd6cd55e25fd.js +0 -1
- package/assets/esri/core/workers/chunks/61801bb8c7be8fe77086.js +0 -1
- package/assets/esri/core/workers/chunks/62b28f73f814413c10fc.js +0 -1
- package/assets/esri/core/workers/chunks/6925f09d44cc38480d53.js +0 -1
- package/assets/esri/core/workers/chunks/98f4b44eca91c42ca08e.js +0 -1
- package/assets/esri/core/workers/chunks/990341f7c47bd656c782.js +0 -1
- package/assets/esri/core/workers/chunks/ba7f57788847cc0f68df.js +0 -1
- package/assets/esri/core/workers/chunks/bf06250be7a7a36306b1.js +0 -1
- package/assets/esri/core/workers/chunks/cd2708fb7636b3ace229.js +0 -1
- package/assets/esri/core/workers/chunks/f7d93aae350796b88562.js +0 -1
- package/assets/esri/core/workers/chunks/f95e488d2b86e320624f.js +0 -1
- package/layers/mixins/TemporalSceneLayer.d.ts +0 -177
- package/layers/mixins/TemporalSceneLayer.js +0 -5
- package/layers/mixins/properties/ILayerWithSave.d.ts +0 -11
- package/layers/support/ContingencyConstraintViolation.d.ts +0 -2
- package/layers/support/ContingentValue.d.ts +0 -2
- package/layers/support/ContingentValuesResult.d.ts +0 -2
- package/layers/support/ElevationQuery.d.ts +0 -35
- package/layers/support/ElevationQueryContext.d.ts +0 -37
- package/layers/support/FeatureReduction.d.ts +0 -3
- package/layers/support/FeatureReduction.js +0 -5
- package/layers/support/FieldGroup.d.ts +0 -2
- package/layers/support/FieldValueType.d.ts +0 -2
- package/layers/support/I3SLayer.d.ts +0 -9
- package/layers/support/ParquetGeometryEncodingBase.d.ts +0 -9
- package/layers/support/ParquetGeometryEncodingBase.js +0 -5
- package/layers/support/SimpleBandStatistics.d.ts +0 -10
- package/layers/support/source/DataLayerSource.d.ts +0 -171
- package/layers/support/source/DataLayerSource.js +0 -5
- package/layers/support/source/MapLayerSource.js +0 -5
- package/layers/support/source/QueryTableDataSource.js +0 -5
- package/layers/support/source/RasterDataSource.js +0 -5
- package/layers/support/source/TableDataSource.js +0 -5
- package/layers/support/source/types.d.ts +0 -4
- package/views/2d/layers/features/FeaturePipelineWorkerProxy.d.ts +0 -32
- package/views/3d/webgl-engine/shaders/GaussianSplatColorTechnique.js +0 -5
- package/views/3d/webgl-engine/shaders/GaussianSplatCompositionTechniqueConfiguration.js +0 -5
- package/views/3d/webgl-engine/shaders/GaussianSplatDepthTechnique.js +0 -5
- package/widgets/support/AnalysisViewModel.d.ts +0 -5
- package/widgets/support/AnalysisViewModel.js +0 -5
- package/widgets/support/AnchorElementViewModel.d.ts +0 -3
- package/widgets/support/InteractiveToolViewModel.d.ts +0 -4
- package/widgets/support/InteractiveToolViewModel.js +0 -5
- /package/webdoc/support/{thumbnailUtils.d.ts → types.d.ts} +0 -0
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{set as e}from"../core/libs/gl-matrix-2/math/vec2.js";import{create as n}from"../core/libs/gl-matrix-2/factories/vec2f64.js";import{EvaluateSceneLighting as a,addAmbientBoostFactor as i,addLightingGlobalFactor as t}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import{NormalUtils as o}from"../views/3d/webgl-engine/core/shaderLibrary/shading/NormalUtils.glsl.js";import{
|
|
5
|
+
import{set as e}from"../core/libs/gl-matrix-2/math/vec2.js";import{create as n}from"../core/libs/gl-matrix-2/factories/vec2f64.js";import{EvaluateSceneLighting as a,addAmbientBoostFactor as i,addLightingGlobalFactor as t}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import{NormalUtils as o}from"../views/3d/webgl-engine/core/shaderLibrary/shading/NormalUtils.glsl.js";import{positionOutsideClipSpace as r}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PositionOutsideClipSpace.js";import{terrainDepthTest as s}from"../views/3d/webgl-engine/core/shaderLibrary/shading/TerrainDepthTest.glsl.js";import{ComputeCovariance as c}from"../views/3d/webgl-engine/core/shaderLibrary/util/ComputeCovariance.glsl.js";import{GaussianSplatUnpackingPassParameters as l,GaussianSplatUnpacking as d}from"../views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatUnpacking.glsl.js";import{QuaternionToRotationMatrix as u}from"../views/3d/webgl-engine/core/shaderLibrary/util/QuaternionToRotationMatrix.glsl.js";import{Float2BindUniform as v}from"../views/3d/webgl-engine/core/shaderModules/Float2BindUniform.js";import{Float2PassUniform as g}from"../views/3d/webgl-engine/core/shaderModules/Float2PassUniform.js";import{Float3BindUniform as p}from"../views/3d/webgl-engine/core/shaderModules/Float3BindUniform.js";import{FloatPassUniform as h}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as f,If as m}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Matrix4BindUniform as x}from"../views/3d/webgl-engine/core/shaderModules/Matrix4BindUniform.js";import{Texture2DUintPassUniform as w}from"../views/3d/webgl-engine/core/shaderModules/Texture2DUintPassUniform.js";import{getGaussianSplatAlphaCutoffValue as y}from"../views/3d/webgl-engine/shaders/GaussianSplatTechniqueConfiguration.js";import{ShaderBuilder as b}from"../views/webgl/ShaderBuilder.js";class D extends l{constructor(){super(...arguments),this.focalLength=-1,this.minSplatRadius=-1,this.tanFov=n()}}function P(n){const l=new b;l.varyings.add("vColor","vec4"),l.varyings.add("conicOpacity","vec4"),l.varyings.add("depth","float"),l.varyings.add("gaussianCenterScreenPos","vec2"),l.varyings.add("fragScreenPos","vec2"),l.varyings.add("offsetFromCenter","vec2"),l.vertex.uniforms.add(new w("splatOrderTexture",e=>e.splatOrder),new w("splatFadingTexture",e=>e.splatFading),new w("splatAtlasTexture",e=>e.splatAtlas),new h("focalLength",e=>e.focalLength),new h("minSplatRadius",e=>e.minSplatRadius),new g("tanFov",e=>e.tanFov),new v("screenSize",({camera:n})=>e(C,n.fullWidth,n.fullHeight)),new x("proj",e=>e.camera.projectionMatrix),new x("view",e=>e.camera.viewMatrix),new v("nearFar",e=>e.camera.nearFar),new p("cameraPosition",e=>e.camera.eye)),l.vertex.include(d),l.vertex.include(u),l.vertex.include(c),l.vertex.include(a,n),l.include(o,n),i(l.vertex),t(l.vertex),l.include(s,n),l.outputs.add("fragColor","vec4",0),l.outputs.add("fragDepthColor","vec4",1);const D=y(n.alphaCutoff),P=Math.log(D),S=-2*P;return l.vertex.code.add(f`vec2 ndcToPixel(vec2 ndcCoord, vec2 screenSize) {
|
|
6
6
|
return ((ndcCoord + 1.0) * screenSize - 1.0) * 0.5;
|
|
7
|
-
}`),
|
|
7
|
+
}`),l.vertex.main.add(`\n uint instanceID = uint(gl_InstanceID);\n\n // Transform the instanceID into 2D coordinates\n uint orderTextureWidth = uint(textureSize(splatOrderTexture, 0).x);\n uint x = instanceID % orderTextureWidth;\n uint y = instanceID / orderTextureWidth;\n\n // Fetch the index of the remaining frontmost Gaussian\n uint gaussianIndex = texelFetch(splatOrderTexture, ivec2(x, y), 0).r;\n\n uint splatAtlasWidth = uint(textureSize(splatAtlasTexture, 0).x);\n\n // Fetch the packed Gaussian according to the index\n uint gaussianIndexX = gaussianIndex % splatAtlasWidth;\n uint gaussianIndexY = gaussianIndex / splatAtlasWidth;\n uvec4 packedGaussian = texelFetch(splatAtlasTexture, ivec2(gaussianIndexX, gaussianIndexY), 0);\n\n // Fetch the header associated with the packed Gaussian (contains tile origin and number of fractional bits)\n uint pageNum = gaussianIndex / 1024u;\n uint headerIndex = (pageNum + 1u) * 1024u - 1u;\n uint headerIndexX = headerIndex % splatAtlasWidth;\n uint headerIndexY = headerIndex / splatAtlasWidth;\n uvec4 packedHeader = texelFetch(splatAtlasTexture, ivec2(headerIndexX, headerIndexY), 0);\n\n // Unpack the Gaussian\n vColor = unpackColor(packedGaussian);\n\n // Handle fading\n ${m(n.fadingEnabled,"\n uint fadingTextureWidth = uint(textureSize(splatFadingTexture, 0).x);\n uint fadeX = pageNum % fadingTextureWidth;\n uint fadeY = pageNum / fadingTextureWidth;\n uint opacityModifierByte = texelFetch(splatFadingTexture, ivec2(fadeX , fadeY), 0).r;\n float opacityModifier = float(opacityModifierByte) / 255.0;\n vColor.a *= opacityModifier;\n ")}\n\n // set default position outside clipspace for early returns\n gl_Position = ${r};\n\n if(vColor.a < ${D}) {\n return;\n }\n\n vec3 scale = unpackScale(packedGaussian);\n vec4 quaternion = unpackQuaternion(packedGaussian);\n mat3 rotation = quaternionToRotationMatrix(quaternion);\n vec3 tileOriginRelativePosition = unpackTileOriginRelativePosition(packedGaussian);\n\n vec3 cameraRelativePosition = unpackCameraRelativeGaussianPosition(packedHeader, tileOriginRelativePosition);\n\n vec4 viewPos = vec4(mat3(view) * cameraRelativePosition, 1);\n\n if (viewPos.z > -nearFar.x || viewPos.z < -nearFar.y) {\n return;\n }\n\n forwardViewPosDepth(viewPos.xyz);\n\n // Handle environment (scene lighting)\n vec3 groundNormal = ${n.spherical?f`normalize(cameraRelativePosition + cameraPosition)`:f`vec3(0.0, 0.0, 1.0)`};\n float groundLightAlignment = dot(groundNormal, mainLightDirection);\n float additionalAmbientScale = additionalDirectedAmbientLight(groundLightAlignment);\n vec3 additionalLight = mainLightIntensity * additionalAmbientScale * ambientBoostFactor * lightingGlobalFactor;\n vColor.rgb = evaluateSceneLighting(groundNormal, vColor.rgb, 0.0, 0.0, mainLightIntensity);\n\n\n\n vec3 covarianceA;\n vec3 covarianceB;\n computeCovariance3D(rotation, scale.xyz, covarianceA, covarianceB);\n\n float covariance3D[6] = float[6](covarianceA.x, covarianceA.y, covarianceA.z, covarianceB.x, covarianceB.y, covarianceB.z);\n\n vec3 covariance2D = computeCovariance2D(viewPos.xyz, focalLength, tanFov, covariance3D, view);\n\n // Compute the Gaussians extent in screen space by finding the eigenvalues lambda1 and lambda2\n // of the 2D covariance matrix\n float mid = 0.5 * (covariance2D.x + covariance2D.z);\n float radius = length(vec2((covariance2D.x - covariance2D.z) * 0.5, covariance2D.y));\n float lambda1 = mid + radius;\n float lambda2 = mid - radius;\n\n // Compute the extents along the principal axes\n float l1 = ceil(sqrt(lambda1 * ${S}));\n float l2 = ceil(sqrt(lambda2 * ${S}));\n\n float maxRadius = max(l1, l2);\n\n // Ignore gaussians with very small contribution, with tolerance based on the quality profile\n if(minSplatRadius > 0.0) {\n float effectiveSize = maxRadius * vColor.a;\n if(effectiveSize < minSplatRadius) {\n return;\n }\n }\n\n vec4 projPos = proj * viewPos;\n float invW = 1. / (projPos.w + 1e-7);\n vec3 ndcPos = projPos.xyz * invW;\n\n // Screen space frustum culling\n vec2 radiusNDC = maxRadius * 2.0 / screenSize;\n\n if (any(greaterThan(abs(ndcPos.xy) - radiusNDC, vec2(1.0)))) {\n return;\n }\n\n // Compute the principal diagonal direction (eigenvector for lambda1)\n vec2 diagonalVector = normalize(vec2(covariance2D.y, lambda1 - covariance2D.x));\n\n vec2 majorAxis = l1 * diagonalVector;\n vec2 minorAxis = l2 * vec2(diagonalVector.y, -diagonalVector.x);\n\n gaussianCenterScreenPos = ndcToPixel(ndcPos.xy, screenSize);\n\n // This maps vertex IDs 0, 1, 2, 3 to (-1,-1), (1,-1), (-1,1), (1,1)\n vec2 corner = vec2((gl_VertexID << 1) & 2, gl_VertexID & 2) - 1.0;\n fragScreenPos = gaussianCenterScreenPos + corner.x * majorAxis + corner.y * minorAxis;\n\n // Invert covariance (EWA algorithm)\n float determinant = (covariance2D.x * covariance2D.z - covariance2D.y * covariance2D.y);\n if (determinant <= 0.) {\n return;\n }\n float invDeterminant = 1. / determinant;\n\n // We use a conic function to derive the opacity\n vec3 conic = vec3(covariance2D.z, -covariance2D.y, covariance2D.x) * invDeterminant;\n conicOpacity = vec4(conic, vColor.a);\n\n depth = ndcPos.z;\n\n // Convert from screen-space to clip-space\n vec2 clipPos = fragScreenPos / screenSize * 2. - 1.;\n\n offsetFromCenter = gaussianCenterScreenPos - fragScreenPos;\n\n gl_Position = vec4(clipPos, depth, 1.0);\n\n `),l.fragment.code.add("\n // we can use a relatively simple encoding since our values are\n // guaranteed to be within [-1, 1]\n vec2 encodeFloat32DepthToVec2F16(float value) {\n value = value * 1024.0; // shift by 10 bits to the left\n float high = floor(value);\n float low = value - high;\n return vec2(high, low);\n }\n "),l.fragment.main.add(`\n discardByTerrainDepth();\n\n // Evaluate the 2D elliptical Gaussian exponent using the general conic form: Ax^2+2Bxy+Cy^2\n float x = offsetFromCenter.x;\n float y = offsetFromCenter.y;\n float conic = dot(conicOpacity.xyz, vec3(x * x, 2.0 * x * y, y * y));\n float gaussianExponent = -0.5 * conic;\n\n // A positive exponent indicates alpha > 1, this should not happen\n // We also early check the alphaCutoff (i.e., ln(alphaCutoff)), to avoid unnecessary exp()\n if (gaussianExponent > 0.0 || gaussianExponent < ${P}) {\n discard;\n }\n\n float gaussianFalloff = exp(gaussianExponent);\n\n // cap at 0.99 to avoid blending issues, such as seams between overlapping Gaussians\n float alpha = min(.99f, conicOpacity.w * gaussianFalloff);\n\n fragColor = vec4(vColor.rgb * alpha, alpha);\n\n // We simulate first hit based depth using 0.25 as the opacity threshold.\n // This works because we render in front-to-back order,\n // i.e. the first hit that counts completelly saturates the alpha channel\n // and further splats do not contribute.\n float countHit = step(0.25, alpha);\n fragDepthColor = vec4(encodeFloat32DepthToVec2F16(depth) * countHit, 0.0, countHit);\n `),l}const C=n(),S=Object.freeze(Object.defineProperty({__proto__:null,GaussianSplatPassParameters:D,build:P},Symbol.toStringTag,{value:"Module"}));export{D as G,S as a,P as b};
|
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{ScreenSpacePass as e}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{glsl as t}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DPassUniform as s}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{NoParameters as
|
|
6
|
-
float ndcDepth = splatDepth.
|
|
7
|
-
|
|
8
|
-
if(splatDepth.a < depthCutOff) {
|
|
5
|
+
import{ScreenSpacePass as e}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{glsl as t}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DPassUniform as s}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{NoParameters as o}from"../views/webgl/NoParameters.js";import{ShaderBuilder as r}from"../views/webgl/ShaderBuilder.js";class a extends o{}function n(){const o=new r;o.include(e);return o.fragment.uniforms.add(new s("splatOutputDepth",e=>e.splatDepth)),o.fragment.code.add("\n // we encode near F32 precision by using two F16s \n float decodeVec2F16ToFloat32(vec2 encoded) {\n return( (encoded.x + encoded.y) / 1024.0);\n }\n "),o.fragment.main.add(t`vec4 splatDepth = texture(splatOutputDepth, uv);
|
|
6
|
+
float ndcDepth = decodeVec2F16ToFloat32(splatDepth.xy);
|
|
7
|
+
if(splatDepth.a < 1.0) {
|
|
9
8
|
discard;
|
|
10
9
|
}
|
|
11
|
-
gl_FragDepth = (ndcDepth + 1.0) * 0.5;`),
|
|
10
|
+
gl_FragDepth = (ndcDepth + 1.0) * 0.5;`),o}const d=Object.freeze(Object.defineProperty({__proto__:null,GaussianSplatDepthCompositionPassParameters:a,build:n},Symbol.toStringTag,{value:"Module"}));export{a as G,d as S,n as b};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{copy as e,set as o}from"../core/libs/gl-matrix-2/math/vec2.js";import{create as i}from"../core/libs/gl-matrix-2/factories/vec2f64.js";import{ZEROS as r,fromValues as t}from"../core/libs/gl-matrix-2/factories/vec4f64.js";import{earth as l}from"../geometry/support/Ellipsoid.js";import{RejectBySlice as a}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{ObjectAndLayerIdColor as s}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/ObjectAndLayerIdColor.glsl.js";import{AlignPixel as n}from"../views/3d/webgl-engine/core/shaderLibrary/hud/AlignPixel.glsl.js";import{HUD as c}from"../views/3d/webgl-engine/core/shaderLibrary/hud/HUD.glsl.js";import{HUDOcclusionPass as d}from"../views/3d/webgl-engine/core/shaderLibrary/hud/HUDOcclusionPass.glsl.js";import{HUDVisibility as u}from"../views/3d/webgl-engine/core/shaderLibrary/hud/HUDVisibility.glsl.js";import{OutputHighlight as f}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js";import{
|
|
5
|
+
import{copy as e,set as o}from"../core/libs/gl-matrix-2/math/vec2.js";import{create as i}from"../core/libs/gl-matrix-2/factories/vec2f64.js";import{ZEROS as r,fromValues as t}from"../core/libs/gl-matrix-2/factories/vec4f64.js";import{earth as l}from"../geometry/support/Ellipsoid.js";import{RejectBySlice as a}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{ObjectAndLayerIdColor as s}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/ObjectAndLayerIdColor.glsl.js";import{AlignPixel as n}from"../views/3d/webgl-engine/core/shaderLibrary/hud/AlignPixel.glsl.js";import{HUD as c}from"../views/3d/webgl-engine/core/shaderLibrary/hud/HUD.glsl.js";import{HUDOcclusionPass as d}from"../views/3d/webgl-engine/core/shaderLibrary/hud/HUDOcclusionPass.glsl.js";import{HUDVisibility as u}from"../views/3d/webgl-engine/core/shaderLibrary/hud/HUDVisibility.glsl.js";import{OutputHighlight as f}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js";import{positionOutsideClipSpace as p}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PositionOutsideClipSpace.js";import{VisualVariables as m}from"../views/3d/webgl-engine/core/shaderLibrary/shading/VisualVariables.glsl.js";import{ColorConversion as g}from"../views/3d/webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js";import{ScreenSizePerspective as v,addScreenSizePerspective as b,addScreenSizePerspectiveAlignment as x}from"../views/3d/webgl-engine/core/shaderLibrary/util/ScreenSizePerspective.glsl.js";import{addPixelRatio as h}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float2PassUniform as w}from"../views/3d/webgl-engine/core/shaderModules/Float2PassUniform.js";import{Float4BindUniform as C}from"../views/3d/webgl-engine/core/shaderModules/Float4BindUniform.js";import{Float4DrawUniform as z}from"../views/3d/webgl-engine/core/shaderModules/Float4DrawUniform.js";import{Float4PassUniform as P}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{FloatBindUniform as S}from"../views/3d/webgl-engine/core/shaderModules/FloatBindUniform.js";import{FloatPassUniform as j}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as y,If as A}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DBindUniform as $}from"../views/3d/webgl-engine/core/shaderModules/Texture2DBindUniform.js";import{Texture2DPassUniform as O}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{ShaderBuilder as D}from"../views/webgl/ShaderBuilder.js";import{alphaCutoff as F}from"../webscene/support/AlphaCutoff.js";function T(e){const i=new D;if(i.include(c,e),i.vertex.include(a,e),e.occlusionPass)return i.include(d,e),i;const{output:T,oitPass:L,signedDistanceFieldEnabled:V,visibilityPixelEnabled:H,horizonCullingEnabled:_,pixelSnappingEnabled:q,hasEmission:R,hasScreenSizePerspective:k,debugDrawLabelBorder:I,hasVVSize:G,hasVVColor:J,hasRotation:K,occludedFragmentFade:N,sampleSignedDistanceFieldTexelCenter:Q}=e;i.include(v),i.include(m,e),i.include(s,e),H&&i.include(u);const{vertex:W,fragment:X}=i;X.include(g),i.varyings.add("vcolor","vec4"),i.varyings.add("vtc","vec2"),i.varyings.add("vsize","vec2");const Y=8===T,Z=Y&&H;Z&&i.varyings.add("voccluded","float"),W.uniforms.add(new C("viewport",e=>e.camera.fullViewport),new w("screenOffset",(e,i)=>o(U,2*e.screenOffset[0]*i.camera.pixelRatio,2*e.screenOffset[1]*i.camera.pixelRatio)),new w("anchorPosition",e=>M(e)),new P("materialColor",e=>e.color),new j("materialRotation",e=>e.rotation),new O("tex",e=>e.texture)),h(W),V&&(W.uniforms.add(new P("outlineColor",e=>e.outlineColor)),X.uniforms.add(new P("outlineColor",e=>B(e)?e.outlineColor:r),new j("outlineSize",e=>B(e)?e.outlineSize:0))),_&&W.uniforms.add(new z("pointDistanceSphere",(e,o)=>{const i=o.camera.eye,r=e.origin;return t(r[0]-i[0],r[1]-i[1],r[2]-i[2],l.radius)})),q&&W.include(n),k&&(b(W),x(W)),I&&i.varyings.add("debugBorderCoords","vec4"),i.attributes.add("uv0","vec2"),i.attributes.add("uvi","vec4"),i.attributes.add("color","vec4"),i.attributes.add("size","vec2"),i.attributes.add("rotation","float"),(G||J)&&i.attributes.add("featureAttribute","vec4"),W.code.add(_?y`bool behindHorizon(vec3 posModel) {
|
|
6
6
|
vec3 camToEarthCenter = pointDistanceSphere.xyz - localOrigin;
|
|
7
7
|
vec3 camToPos = pointDistanceSphere.xyz + posModel;
|
|
8
8
|
float earthRadius = pointDistanceSphere.w;
|
|
@@ -10,49 +10,47 @@ float a = dot(camToPos, camToPos);
|
|
|
10
10
|
float b = dot(camToPos, camToEarthCenter);
|
|
11
11
|
float c = dot(camToEarthCenter, camToEarthCenter) - earthRadius * earthRadius;
|
|
12
12
|
return b > 0.0 && b < a && b * b > a * c;
|
|
13
|
-
}`:
|
|
13
|
+
}`:y`bool behindHorizon(vec3 posModel) { return false; }`),W.main.add(y`
|
|
14
14
|
ProjectHUDAux projectAux;
|
|
15
15
|
vec4 posProj = projectPositionHUD(projectAux);
|
|
16
16
|
forwardObjectAndLayerIdColor();
|
|
17
17
|
|
|
18
18
|
if (rejectBySlice(projectAux.posModel)) {
|
|
19
|
-
|
|
20
|
-
gl_Position = vec4(1e038, 1e038, 1e038, 1.0);
|
|
19
|
+
gl_Position = ${p};
|
|
21
20
|
return;
|
|
22
21
|
}
|
|
23
22
|
|
|
24
23
|
if (behindHorizon(projectAux.posModel)) {
|
|
25
|
-
|
|
26
|
-
gl_Position = vec4(1e038, 1e038, 1e038, 1.0);
|
|
24
|
+
gl_Position = ${p};
|
|
27
25
|
return;
|
|
28
26
|
}
|
|
29
27
|
|
|
30
28
|
vec2 inputSize;
|
|
31
|
-
${
|
|
29
|
+
${A(k,y`
|
|
32
30
|
inputSize = screenSizePerspectiveScaleVec2(size, projectAux.absCosAngle, projectAux.distanceToCamera, screenSizePerspective);
|
|
33
|
-
vec2 screenOffsetScaled = screenSizePerspectiveScaleVec2(screenOffset, projectAux.absCosAngle, projectAux.distanceToCamera, screenSizePerspectiveAlignment);`,
|
|
31
|
+
vec2 screenOffsetScaled = screenSizePerspectiveScaleVec2(screenOffset, projectAux.absCosAngle, projectAux.distanceToCamera, screenSizePerspectiveAlignment);`,y`
|
|
34
32
|
inputSize = size;
|
|
35
33
|
vec2 screenOffsetScaled = screenOffset;`)}
|
|
36
|
-
${
|
|
34
|
+
${A(G,y`inputSize *= vvScale(featureAttribute).xx;`)}
|
|
37
35
|
|
|
38
36
|
vec2 combinedSize = inputSize * pixelRatio;
|
|
39
37
|
vec4 quadOffset = vec4(0.0);
|
|
40
38
|
|
|
41
|
-
${
|
|
39
|
+
${A(H,y`
|
|
42
40
|
bool visible = testHUDVisibility(posProj);
|
|
43
41
|
if (!visible) {
|
|
44
42
|
vtc = vec2(0.0);
|
|
45
|
-
${
|
|
43
|
+
${A(I,"debugBorderCoords = vec4(0.5, 0.5, 1.5 / combinedSize);")}
|
|
46
44
|
return;
|
|
47
45
|
}`)}
|
|
48
|
-
${
|
|
49
|
-
`);const
|
|
46
|
+
${A(Z,y`voccluded = visible ? 0.0 : 1.0;`)}
|
|
47
|
+
`);const ee=y`
|
|
50
48
|
vec2 uv = mix(uvi.xy, uvi.zw, bvec2(uv0));
|
|
51
49
|
vec2 texSize = vec2(textureSize(tex, 0));
|
|
52
|
-
uv = mix(vec2(1.0), uv / texSize, lessThan(uv, vec2(${
|
|
50
|
+
uv = mix(vec2(1.0), uv / texSize, lessThan(uv, vec2(${E})));
|
|
53
51
|
quadOffset.xy = (uv0 - anchorPosition) * 2.0 * combinedSize;
|
|
54
52
|
|
|
55
|
-
${
|
|
53
|
+
${A(K,y`
|
|
56
54
|
float angle = radians(materialRotation + rotation);
|
|
57
55
|
float cosAngle = cos(angle);
|
|
58
56
|
float sinAngle = sin(angle);
|
|
@@ -62,36 +60,36 @@ return b > 0.0 && b < a && b * b > a * c;
|
|
|
62
60
|
`)}
|
|
63
61
|
|
|
64
62
|
quadOffset.xy = (quadOffset.xy + screenOffsetScaled) / viewport.zw * posProj.w;
|
|
65
|
-
`,
|
|
63
|
+
`,oe=q?V?y`posProj = alignToPixelOrigin(posProj, viewport.zw) + quadOffset;`:y`posProj += quadOffset;
|
|
66
64
|
if (inputSize.x == size.x) {
|
|
67
65
|
posProj = alignToPixelOrigin(posProj, viewport.zw);
|
|
68
|
-
}`:
|
|
69
|
-
${
|
|
70
|
-
${
|
|
66
|
+
}`:y`posProj += quadOffset;`;W.main.add(y`
|
|
67
|
+
${ee}
|
|
68
|
+
${J?"vcolor = interpolateVVColor(featureAttribute.y) * materialColor;":"vcolor = color / 255.0 * materialColor;"}
|
|
71
69
|
|
|
72
|
-
${
|
|
70
|
+
${A(9===T,y`vcolor.a = 1.0;`)}
|
|
73
71
|
|
|
74
|
-
bool alphaDiscard = vcolor.a < ${
|
|
75
|
-
${
|
|
72
|
+
bool alphaDiscard = vcolor.a < ${y.float(F)};
|
|
73
|
+
${A(V,`alphaDiscard = alphaDiscard && outlineColor.a < ${y.float(F)};`)}
|
|
76
74
|
if (alphaDiscard) {
|
|
77
75
|
// "early discard" if both symbol color (= fill) and outline color (if applicable) are transparent
|
|
78
76
|
gl_Position = vec4(1e38, 1e38, 1e38, 1.0);
|
|
79
77
|
return;
|
|
80
78
|
} else {
|
|
81
|
-
${
|
|
79
|
+
${oe}
|
|
82
80
|
gl_Position = posProj;
|
|
83
81
|
}
|
|
84
82
|
|
|
85
83
|
vtc = uv;
|
|
86
84
|
|
|
87
|
-
${
|
|
85
|
+
${A(I,y`debugBorderCoords = vec4(uv01, 1.5 / combinedSize);`)}
|
|
88
86
|
vsize = inputSize;
|
|
89
|
-
`),
|
|
90
|
-
${
|
|
87
|
+
`),X.uniforms.add(new O("tex",e=>e.texture)),N&&!Y&&X.uniforms.add(new $("depthMap",e=>e.mainDepth),new S("occludedOpacity",e=>e.hudOccludedFragmentOpacity));const ie=I?y`(isBorder > 0.0 ? 0.0 : ${y.float(F)})`:y.float(F),re=y`
|
|
88
|
+
${A(I,y`float isBorder = float(any(lessThan(debugBorderCoords.xy, debugBorderCoords.zw)) || any(greaterThan(debugBorderCoords.xy, 1.0 - debugBorderCoords.zw)));`)}
|
|
91
89
|
|
|
92
90
|
vec2 samplePos = vtc;
|
|
93
91
|
|
|
94
|
-
${
|
|
92
|
+
${A(Q,y`
|
|
95
93
|
float txSize = float(textureSize(tex, 0).x);
|
|
96
94
|
float texelSize = 1.0 / txSize;
|
|
97
95
|
|
|
@@ -99,7 +97,7 @@ posProj = alignToPixelOrigin(posProj, viewport.zw);
|
|
|
99
97
|
vec2 scaleFactor = (vsize - txSize) * texelSize;
|
|
100
98
|
samplePos += (vec2(1.0, -1.0) * texelSize) * scaleFactor;`)}
|
|
101
99
|
|
|
102
|
-
${
|
|
100
|
+
${V?y`
|
|
103
101
|
vec4 fillPixelColor = vcolor;
|
|
104
102
|
|
|
105
103
|
// Get distance in output units (i.e. pixels)
|
|
@@ -120,8 +118,8 @@ posProj = alignToPixelOrigin(posProj, viewport.zw);
|
|
|
120
118
|
outlinePixelColor.a *= outlineAlphaFactor;
|
|
121
119
|
|
|
122
120
|
if (
|
|
123
|
-
outlineAlphaFactor + fillAlphaFactor < ${
|
|
124
|
-
fillPixelColor.a + outlinePixelColor.a < ${
|
|
121
|
+
outlineAlphaFactor + fillAlphaFactor < ${ie} ||
|
|
122
|
+
fillPixelColor.a + outlinePixelColor.a < ${y.float(F)}
|
|
125
123
|
) {
|
|
126
124
|
discard;
|
|
127
125
|
}
|
|
@@ -131,39 +129,39 @@ posProj = alignToPixelOrigin(posProj, viewport.zw);
|
|
|
131
129
|
vec3 compositeColor = vec3(outlinePixelColor) * outlinePixelColor.a +
|
|
132
130
|
vec3(fillPixelColor) * fillPixelColor.a * (1.0 - outlinePixelColor.a);
|
|
133
131
|
|
|
134
|
-
${
|
|
132
|
+
${A(!Y,y`fragColor = vec4(compositeColor, compositeAlpha);`)}
|
|
135
133
|
} else {
|
|
136
|
-
if (fillAlphaFactor < ${
|
|
134
|
+
if (fillAlphaFactor < ${ie}) {
|
|
137
135
|
discard;
|
|
138
136
|
}
|
|
139
137
|
|
|
140
|
-
${
|
|
138
|
+
${A(!Y,y`fragColor = premultiplyAlpha(fillPixelColor);`)}
|
|
141
139
|
}
|
|
142
140
|
|
|
143
141
|
// visualize SDF:
|
|
144
142
|
// fragColor = vec4(clamp(-pixelDistance/vsize.x*2.0, 0.0, 1.0), clamp(pixelDistance/vsize.x*2.0, 0.0, 1.0), 0.0, 1.0);
|
|
145
|
-
`:
|
|
143
|
+
`:y`
|
|
146
144
|
vec4 texColor = texture(tex, samplePos, -0.5);
|
|
147
|
-
if (texColor.a < ${
|
|
145
|
+
if (texColor.a < ${ie}) {
|
|
148
146
|
discard;
|
|
149
147
|
}
|
|
150
|
-
${
|
|
148
|
+
${A(!Y,y`fragColor = texColor * premultiplyAlpha(vcolor);`)}
|
|
151
149
|
`}
|
|
152
150
|
|
|
153
|
-
${
|
|
151
|
+
${A(N&&!Y,y`
|
|
154
152
|
float zSample = texelFetch(depthMap, ivec2(gl_FragCoord.xy), 0).x;
|
|
155
153
|
if (zSample < gl_FragCoord.z) {
|
|
156
154
|
fragColor *= occludedOpacity;
|
|
157
155
|
}
|
|
158
156
|
`)}
|
|
159
157
|
|
|
160
|
-
${
|
|
161
|
-
`;switch(
|
|
162
|
-
${
|
|
163
|
-
${
|
|
164
|
-
${
|
|
165
|
-
${
|
|
166
|
-
${
|
|
167
|
-
outputObjectAndLayerIdColor();`);break;case 8:i.include(f,e),
|
|
168
|
-
${
|
|
169
|
-
outputHighlight(${
|
|
158
|
+
${A(!Y&&I,y`fragColor = mix(fragColor, vec4(1.0, 0.0, 1.0, 1.0), isBorder * 0.5);`)}
|
|
159
|
+
`;switch(T){case 0:i.outputs.add("fragColor","vec4",0),R&&i.outputs.add("fragEmission","vec4",1),1===L&&i.outputs.add("fragAlpha","float",R?2:1),X.main.add(y`
|
|
160
|
+
${re}
|
|
161
|
+
${A(2===L,y`fragColor.rgb /= fragColor.a;`)}
|
|
162
|
+
${A(R,y`fragEmission = vec4(0.0);`)}
|
|
163
|
+
${A(1===L,y`fragAlpha = fragColor.a;`)}`);break;case 9:X.main.add(y`
|
|
164
|
+
${re}
|
|
165
|
+
outputObjectAndLayerIdColor();`);break;case 8:i.include(f,e),X.main.add(y`
|
|
166
|
+
${re}
|
|
167
|
+
outputHighlight(${A(Z,y`voccluded == 1.0`,y`false`)});`)}return i}function B(e){return e.outlineColor[3]>0&&e.outlineSize>0}function M(o){return o.textureIsSignedDistanceField?L(o.anchorPosition,o.distanceFieldBoundingBox,U):e(U,o.anchorPosition),U}function L(e,i,r){o(r,e[0]*(i[2]-i[0])+i[0],e[1]*(i[3]-i[1])+i[1])}const U=i(),V=32e3,E=y.float(V),H=Object.freeze(Object.defineProperty({__proto__:null,build:T,calculateAnchorPosition:M,fullUV:V},Symbol.toStringTag,{value:"Module"}));export{H,T as b,M as c,V as f};
|
|
@@ -2,52 +2,52 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{markerTextureSize as e,markerSymbolSize as r,markerTipThicknessFactor as i}from"../views/3d/support/engineContent/marker.js";import{SliceDraw as o}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{RibbonVertexPosition as t}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/RibbonVertexPosition.glsl.js";import{OutputHighlight as a}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js";import{MarkerSizing as n}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MarkerSizing.glsl.js";import{
|
|
5
|
+
import{markerTextureSize as e,markerSymbolSize as r,markerTipThicknessFactor as i}from"../views/3d/support/engineContent/marker.js";import{SliceDraw as o}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{RibbonVertexPosition as t}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/RibbonVertexPosition.glsl.js";import{OutputHighlight as a}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js";import{MarkerSizing as n}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MarkerSizing.glsl.js";import{positionOutsideClipSpace as s}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PositionOutsideClipSpace.js";import{terrainDepthTest as l}from"../views/3d/webgl-engine/core/shaderLibrary/shading/TerrainDepthTest.glsl.js";import{ColorConversion as c}from"../views/3d/webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js";import{NoPerspectiveWrite as p,NoPerspectiveRead as d}from"../views/3d/webgl-engine/core/shaderLibrary/util/NoPerspective.glsl.js";import{addProjViewLocalOrigin as v,addViewNormal as m,addPixelRatio as h}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float2BindUniform as f}from"../views/3d/webgl-engine/core/shaderModules/Float2BindUniform.js";import{Float4BindUniform as g}from"../views/3d/webgl-engine/core/shaderModules/Float4BindUniform.js";import{Float4PassUniform as u}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{FloatBindUniform as w}from"../views/3d/webgl-engine/core/shaderModules/FloatBindUniform.js";import{glsl as y,If as S}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Matrix4BindUniform as x}from"../views/3d/webgl-engine/core/shaderModules/Matrix4BindUniform.js";import{Texture2DPassUniform as b}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{outputColorHighlightOLID as P}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js";import{ShaderBuilder as z}from"../views/webgl/ShaderBuilder.js";function j(j){const L=new z,{space:D,anchor:k,hasTip:M,hasScreenSizePerspective:C}=j,$=2===D,W=1===D;L.include(t,j),L.include(n,j),L.include(l,j);const{vertex:O,fragment:U,varyings:T}=L;v(O,j),L.attributes.add("position","vec3"),L.attributes.add("previousDelta","vec4"),L.attributes.add("uv0","vec2"),T.add("vColor","vec4"),T.add("vpos","vec3",{invariant:!0}),T.add("vUV","vec2"),T.add("vSize","float"),M&&T.add("vLineWidth","float"),O.uniforms.add(new f("nearFar",({camera:e})=>e.nearFar),new g("viewport",({camera:e})=>e.fullViewport)).code.add(y`vec4 projectAndScale(vec4 pos) {
|
|
6
6
|
vec4 posNdc = proj * pos;
|
|
7
7
|
posNdc.xy *= viewport.zw / posNdc.w;
|
|
8
8
|
return posNdc;
|
|
9
|
-
}`),
|
|
9
|
+
}`),O.code.add(y`void clip(vec4 pos, inout vec4 prev) {
|
|
10
10
|
float vnp = nearFar[0] * 0.99;
|
|
11
11
|
if (prev.z > -nearFar[0]) {
|
|
12
12
|
float interpolation = (-vnp - pos.z) / (prev.z - pos.z);
|
|
13
13
|
prev = mix(pos, prev, interpolation);
|
|
14
14
|
}
|
|
15
|
-
}`)
|
|
15
|
+
}`),$?(L.attributes.add("normal","vec3"),m(O),O.constants.add("tiltThreshold","float",.7),O.code.add(y`vec3 perpendicular(vec3 v) {
|
|
16
16
|
vec3 n = (viewNormal * vec4(normal.xyz, 1.0)).xyz;
|
|
17
17
|
vec3 n2 = cross(v, n);
|
|
18
18
|
vec3 forward = vec3(0.0, 0.0, 1.0);
|
|
19
19
|
float tiltDot = dot(forward, n);
|
|
20
20
|
return abs(tiltDot) < tiltThreshold ? n : n2;
|
|
21
|
-
}`)):
|
|
21
|
+
}`)):O.code.add(y`vec2 perpendicular(vec2 v) {
|
|
22
22
|
return vec2(v.y, -v.x);
|
|
23
|
-
}`);const
|
|
24
|
-
${
|
|
25
|
-
${
|
|
23
|
+
}`);const N=$?"vec3":"vec2";return O.code.add(y`
|
|
24
|
+
${N} normalizedSegment(${N} pos, ${N} prev) {
|
|
25
|
+
${N} segment = pos - prev;
|
|
26
26
|
float segmentLen = length(segment);
|
|
27
27
|
|
|
28
28
|
// normalize or zero if too short
|
|
29
|
-
return (segmentLen > 0.001) ? segment / segmentLen : ${
|
|
29
|
+
return (segmentLen > 0.001) ? segment / segmentLen : ${$?"vec3(0.0, 0.0, 0.0)":"vec2(0.0, 0.0)"};
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
${
|
|
33
|
-
${
|
|
32
|
+
${N} displace(${N} pos, ${N} prev, float displacementLen) {
|
|
33
|
+
${N} segment = normalizedSegment(pos, prev);
|
|
34
34
|
|
|
35
|
-
${
|
|
36
|
-
${
|
|
35
|
+
${N} displacementDirU = perpendicular(segment);
|
|
36
|
+
${N} displacementDirV = segment;
|
|
37
37
|
|
|
38
|
-
${1===
|
|
38
|
+
${1===k?"pos -= 0.5 * displacementLen * displacementDirV;":""}
|
|
39
39
|
|
|
40
40
|
return pos + displacementLen * (uv0.x * displacementDirU + uv0.y * displacementDirV);
|
|
41
41
|
}
|
|
42
|
-
`)
|
|
42
|
+
`),W&&(O.uniforms.add(new x("inverseProjectionMatrix",({camera:e})=>e.inverseProjectionMatrix)),O.code.add(y`vec3 inverseProject(vec4 posScreen) {
|
|
43
43
|
posScreen.xy = (posScreen.xy / viewport.zw) * posScreen.w;
|
|
44
44
|
return (inverseProjectionMatrix * posScreen).xyz;
|
|
45
|
-
}`),
|
|
45
|
+
}`),O.code.add(y`bool rayIntersectPlane(vec3 rayDir, vec3 planeOrigin, vec3 planeNormal, out vec3 intersection) {
|
|
46
46
|
float cos = dot(rayDir, planeNormal);
|
|
47
47
|
float t = dot(planeOrigin, planeNormal) / cos;
|
|
48
48
|
intersection = t * rayDir;
|
|
49
49
|
return abs(cos) > 0.001 && t > 0.0;
|
|
50
|
-
}`),
|
|
50
|
+
}`),O.uniforms.add(new w("perScreenPixelRatio",({camera:e})=>e.perScreenPixelRatio)),O.code.add(y`
|
|
51
51
|
vec4 toFront(vec4 displacedPosScreen, vec3 posLeft, vec3 posRight, vec3 prev, float lineWidth) {
|
|
52
52
|
// Project displaced position back to camera space
|
|
53
53
|
vec3 displacedPos = inverseProject(displacedPosScreen);
|
|
@@ -57,7 +57,7 @@ return abs(cos) > 0.001 && t > 0.0;
|
|
|
57
57
|
vec3 planeNormal = normalize(cross(posLeft - posRight, posLeft - prev));
|
|
58
58
|
vec3 planeOrigin = posLeft;
|
|
59
59
|
|
|
60
|
-
${
|
|
60
|
+
${S(j.hasCap,"if(prev.z > posLeft.z) {\n vec2 diff = posLeft.xy - posRight.xy;\n planeOrigin.xy += perpendicular(diff) / 2.0;\n }")};
|
|
61
61
|
|
|
62
62
|
// Move the plane towards the camera by a margin dependent on the line width (approximated in world space). This tolerance corrects for the
|
|
63
63
|
// non-planarity in most cases, but sharp joins can place the prev vertices at arbitrary positions so markers can still clip.
|
|
@@ -76,37 +76,36 @@ return abs(cos) > 0.001 && t > 0.0;
|
|
|
76
76
|
displacedPos *= minDepth / length(displacedPos);
|
|
77
77
|
return vec4(displacedPos.xyz, 1.0);
|
|
78
78
|
}
|
|
79
|
-
`)),
|
|
79
|
+
`)),h(O),L.include(p),O.main.add(y`
|
|
80
80
|
// Check for special value of uv0.y which is used by the Renderer when graphics
|
|
81
81
|
// are removed before the VBO is recompacted. If this is the case, then we just
|
|
82
82
|
// project outside of clip space.
|
|
83
83
|
if (uv0.y == 0.0) {
|
|
84
84
|
// Project out of clip space
|
|
85
|
-
gl_Position =
|
|
85
|
+
gl_Position = ${s};
|
|
86
86
|
}
|
|
87
87
|
else {
|
|
88
88
|
vec4 pos = view * vec4(position, 1.0);
|
|
89
89
|
vec4 prev = view * vec4(position + previousDelta.xyz * previousDelta.w, 1.0);
|
|
90
90
|
|
|
91
|
-
float lineWidth = getLineWidth(${
|
|
91
|
+
float lineWidth = getLineWidth(${S(C,"pos.xyz")});
|
|
92
92
|
float screenMarkerSize = getScreenMarkerSize(lineWidth);
|
|
93
93
|
|
|
94
94
|
clip(pos, prev);
|
|
95
95
|
|
|
96
|
-
${
|
|
96
|
+
${$?y`${S(j.hideOnShortSegments,y`
|
|
97
97
|
if (areWorldMarkersHidden(pos.xyz, prev.xyz)) {
|
|
98
|
-
|
|
99
|
-
gl_Position = vec4(1e038, 1e038, 1e038, 1.0);
|
|
98
|
+
gl_Position = ${s};
|
|
100
99
|
return;
|
|
101
100
|
}`)}
|
|
102
101
|
pos.xyz = displace(pos.xyz, prev.xyz, getWorldMarkerSize(pos.xyz));
|
|
103
|
-
vec4 displacedPosScreen = projectAndScale(pos);`:
|
|
102
|
+
vec4 displacedPosScreen = projectAndScale(pos);`:y`
|
|
104
103
|
vec4 posScreen = projectAndScale(pos);
|
|
105
104
|
vec4 prevScreen = projectAndScale(prev);
|
|
106
105
|
vec4 displacedPosScreen = posScreen;
|
|
107
106
|
|
|
108
107
|
displacedPosScreen.xy = displace(posScreen.xy, prevScreen.xy, screenMarkerSize);
|
|
109
|
-
${y
|
|
108
|
+
${S(W,y`
|
|
110
109
|
vec2 displacementDirU = perpendicular(normalizedSegment(posScreen.xy, prevScreen.xy));
|
|
111
110
|
|
|
112
111
|
// We need three points of the ribbon line in camera space to calculate the plane it lies in
|
|
@@ -122,8 +121,8 @@ return abs(cos) > 0.001 && t > 0.0;
|
|
|
122
121
|
|
|
123
122
|
// Convert texture coordinate into [0,1]
|
|
124
123
|
vUV = (uv0 + 1.0) / 2.0;
|
|
125
|
-
${
|
|
126
|
-
${
|
|
124
|
+
${S(!$,"vUV = noPerspectiveWrite(vUV, displacedPosScreen.w);")}
|
|
125
|
+
${S(M,"vLineWidth = noPerspectiveWrite(lineWidth, displacedPosScreen.w);")}
|
|
127
126
|
|
|
128
127
|
vSize = screenMarkerSize;
|
|
129
128
|
vColor = getColor();
|
|
@@ -132,13 +131,13 @@ return abs(cos) > 0.001 && t > 0.0;
|
|
|
132
131
|
vpos = pos.xyz;
|
|
133
132
|
|
|
134
133
|
gl_Position = displacedPosScreen;
|
|
135
|
-
}`),U.include(o,
|
|
134
|
+
}`),U.include(o,j),L.include(P,j),U.include(c),U.uniforms.add(new u("intrinsicColor",({color:e})=>e),new b("tex",({markerTexture:e})=>e)).constants.add("texelSize","float",1/e).code.add(y`float markerAlpha(vec2 samplePos) {
|
|
136
135
|
samplePos += vec2(0.5, -0.5) * texelSize;
|
|
137
136
|
float sdf = texture(tex, samplePos).r;
|
|
138
137
|
float pixelDistance = sdf * vSize;
|
|
139
138
|
pixelDistance -= 0.5;
|
|
140
139
|
return clamp(0.5 - pixelDistance, 0.0, 1.0);
|
|
141
|
-
}`),
|
|
140
|
+
}`),M&&(L.include(d),U.constants.add("relativeMarkerSize","float",r/e).constants.add("relativeTipLineWidth","float",i).code.add(y`
|
|
142
141
|
float tipAlpha(vec2 samplePos) {
|
|
143
142
|
// Convert coordinates s.t. they are in pixels and relative to the tip of an arrow marker
|
|
144
143
|
samplePos -= vec2(0.5, 0.5 + 0.5 * relativeMarkerSize);
|
|
@@ -147,18 +146,18 @@ return clamp(0.5 - pixelDistance, 0.0, 1.0);
|
|
|
147
146
|
float halfMarkerSize = 0.5 * relativeMarkerSize * vSize;
|
|
148
147
|
float halfTipLineWidth = 0.5 * max(1.0, relativeTipLineWidth * noPerspectiveRead(vLineWidth));
|
|
149
148
|
|
|
150
|
-
${
|
|
149
|
+
${S($,"halfTipLineWidth *= fwidth(samplePos.y);")}
|
|
151
150
|
|
|
152
151
|
float distance = max(abs(samplePos.x) - halfMarkerSize, abs(samplePos.y) - halfTipLineWidth);
|
|
153
152
|
return clamp(0.5 - distance, 0.0, 1.0);
|
|
154
153
|
}
|
|
155
|
-
`)),
|
|
154
|
+
`)),L.include(a,j),L.include(d),U.main.add(y`
|
|
156
155
|
discardBySlice(vpos);
|
|
157
156
|
discardByTerrainDepth();
|
|
158
157
|
|
|
159
158
|
vec4 finalColor = intrinsicColor * vColor;
|
|
160
159
|
|
|
161
160
|
// Cancel out perspective correct interpolation if in screen space or draped
|
|
162
|
-
vec2 samplePos = ${
|
|
163
|
-
finalColor.a *= ${
|
|
164
|
-
outputColorHighlightOLID(finalColor, vpos, finalColor.rgb);`),
|
|
161
|
+
vec2 samplePos = ${S(!$,"noPerspectiveRead(vUV)","vUV")};
|
|
162
|
+
finalColor.a *= ${M?"max(markerAlpha(samplePos), tipAlpha(samplePos))":"markerAlpha(samplePos)"};
|
|
163
|
+
outputColorHighlightOLID(finalColor, vpos, finalColor.rgb);`),L}const L=Object.freeze(Object.defineProperty({__proto__:null,build:j},Symbol.toStringTag,{value:"Module"}));export{L,j as b};
|
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{numberMaxFloat32 as e}from"../core/mathUtils.js";import{multiply as i,fromTranslation as o}from"../core/libs/gl-matrix-2/math/mat4.js";import{create as r}from"../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as t}from"../core/libs/gl-matrix-2/math/vec2.js";import{create as a}from"../core/libs/gl-matrix-2/factories/vec2f64.js";import{h as s}from"./vec32.js";import{create as n}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as c,positiveInfinity as l}from"../geometry/support/aaBoundingBox.js";import{isColor as p}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SlicePlaneParameters as m,RejectBySlice as d}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{OutputHighlight as f}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js";import{
|
|
5
|
+
import{numberMaxFloat32 as e}from"../core/mathUtils.js";import{multiply as i,fromTranslation as o}from"../core/libs/gl-matrix-2/math/mat4.js";import{create as r}from"../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as t}from"../core/libs/gl-matrix-2/math/vec2.js";import{create as a}from"../core/libs/gl-matrix-2/factories/vec2f64.js";import{h as s}from"./vec32.js";import{create as n}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as c,positiveInfinity as l}from"../geometry/support/aaBoundingBox.js";import{isColor as p}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SlicePlaneParameters as m,RejectBySlice as d}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{OutputHighlight as f}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js";import{positionOutsideClipSpace as g}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PositionOutsideClipSpace.js";import{Float2DrawUniform as u}from"../views/3d/webgl-engine/core/shaderModules/Float2DrawUniform.js";import{Float2PassUniform as S}from"../views/3d/webgl-engine/core/shaderModules/Float2PassUniform.js";import{Float3DrawUniform as x}from"../views/3d/webgl-engine/core/shaderModules/Float3DrawUniform.js";import{glsl as h}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Matrix4BindUniform as w}from"../views/3d/webgl-engine/core/shaderModules/Matrix4BindUniform.js";import{Matrix4DrawUniform as v}from"../views/3d/webgl-engine/core/shaderModules/Matrix4DrawUniform.js";import{NoParameters as z}from"../views/webgl/NoParameters.js";import{ShaderBuilder as b}from"../views/webgl/ShaderBuilder.js";class M extends z{constructor(){super(...arguments),this.clipBox=c(l),this.useFixedSizes=!1,this.useRealWorldSymbolSizes=!1,this.scaleFactor=1,this.minSizePx=0,this.size=0,this.sizePx=0}get fixedSize(){return this.drawScreenSpace?this.sizePx:this.size}get screenMinSize(){return this.useFixedSizes?0:this.minSizePx}get drawScreenSpace(){return this.useFixedSizes&&!this.useRealWorldSymbolSizes}}class j extends m{constructor(e,i,o){super(e),this.origin=e,this.isLeaf=i,this.splatSize=o}}function P(r){const a=new b,n=p(r.output),{vertex:c,fragment:l}=a;return a.vertex.include(d,r),a.attributes.add("position","vec3"),a.attributes.add("color","vec3"),c.uniforms.add(new v("modelView",(e,r)=>i(O,r.camera.viewMatrix,o(O,e.origin))),new w("proj",e=>e.camera.projectionMatrix),new u("screenMinMaxSize",(e,i,o)=>t(R,o.useFixedSizes?0:o.minSizePx*i.camera.pixelRatio,y(e.isLeaf)*i.camera.pixelRatio)),r.useFixedSizes?new S("pointScale",(e,i)=>t(R,e.fixedSize*i.camera.pixelRatio,i.camera.fullHeight)):new u("pointScale",(e,i,o)=>t(R,e.splatSize*o.scaleFactor*i.camera.pixelRatio,i.camera.fullHeight/i.camera.pixelRatio))),r.clippingEnabled?c.uniforms.add(new x("clipMin",(e,i,o)=>s(B,o.clipBox[0]-e.origin[0],o.clipBox[1]-e.origin[1],o.clipBox[2]-e.origin[2])),new x("clipMax",(e,i,o)=>s(B,o.clipBox[3]-e.origin[0],o.clipBox[4]-e.origin[1],o.clipBox[5]-e.origin[2]))):(c.constants.add("clipMin","vec3",[-e,-e,-e]),c.constants.add("clipMax","vec3",[e,e,e])),n&&a.varyings.add("vColor","vec3"),c.main.add(h`
|
|
6
6
|
// Move clipped points outside of clipspace
|
|
7
7
|
if (position.x < clipMin.x || position.y < clipMin.y || position.z < clipMin.z ||
|
|
8
8
|
position.x > clipMax.x || position.y > clipMax.y || position.z > clipMax.z) {
|
|
9
|
-
gl_Position =
|
|
9
|
+
gl_Position = ${g};
|
|
10
10
|
gl_PointSize = 0.0;
|
|
11
11
|
return;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
if (rejectBySlice(position)) {
|
|
15
|
-
gl_Position =
|
|
15
|
+
gl_Position = ${g};
|
|
16
16
|
gl_PointSize = 0.0;
|
|
17
17
|
return;
|
|
18
18
|
}
|
|
@@ -22,7 +22,7 @@ import{numberMaxFloat32 as e}from"../core/mathUtils.js";import{multiply as i,fro
|
|
|
22
22
|
|
|
23
23
|
float pointSize = pointScale.x;
|
|
24
24
|
vec4 position = proj * camera;
|
|
25
|
-
${r.drawScreenSize?
|
|
25
|
+
${r.drawScreenSize?h`float clampedScreenSize = pointSize;`:h`float pointRadius = 0.5 * pointSize;
|
|
26
26
|
vec4 cameraOffset = camera + vec4(0.0, pointRadius, 0.0, 0.0);
|
|
27
27
|
vec4 positionOffset = proj * cameraOffset;
|
|
28
28
|
float radius = abs(positionOffset.y - position.y);
|
|
@@ -38,7 +38,7 @@ import{numberMaxFloat32 as e}from"../core/mathUtils.js";import{multiply as i,fro
|
|
|
38
38
|
|
|
39
39
|
gl_PointSize = clampedScreenSize;
|
|
40
40
|
gl_Position = position;
|
|
41
|
-
${n?
|
|
41
|
+
${n?h`vColor = color;`:""}`),a.include(f,r),l.main.add(h`
|
|
42
42
|
vec2 vOffset = gl_PointCoord - vec2(0.5, 0.5);
|
|
43
43
|
float r2 = dot(vOffset, vOffset);
|
|
44
44
|
|
|
@@ -46,4 +46,4 @@ import{numberMaxFloat32 as e}from"../core/mathUtils.js";import{multiply as i,fro
|
|
|
46
46
|
discard;
|
|
47
47
|
}
|
|
48
48
|
calculateOcclusionAndOutputHighlight();
|
|
49
|
-
${n?
|
|
49
|
+
${n?h`fragColor = vec4(vColor, 1.0);`:""}`),a}function y(e){return e?256:64}const O=r(),B=n(),R=a(),_=Object.freeze(Object.defineProperty({__proto__:null,PointRendererDrawParameters:j,PointRendererPassParameters:M,build:P,getMaxPointSizeScreenspace:y},Symbol.toStringTag,{value:"Module"}));export{M as P,j as a,_ as b,P as c,y as g};
|