@arcgis/core 5.0.0-next.67 → 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/ElevationProfile/ElevationProfileLineViewOptions.d.ts +9 -6
- package/analysis/ElevationProfile/ElevationProfileLineViewOptions.js +1 -1
- 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/arcade/arcadeAsyncRuntime.js +1 -1
- package/arcade/arcadeCompiler.js +1 -1
- package/arcade/arcadeRuntime.js +1 -1
- package/arcade/batchExec.js +1 -1
- package/arcade/compilerUtils.js +1 -1
- package/arcade/featureset/actions/SpatialFilter.js +1 -1
- package/arcade/geometry/unitConversion.js +1 -1
- package/arcade/treeAnalysis.js +1 -1
- package/arcade.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/01d7542d85a453384cf1.js +1 -0
- package/assets/esri/core/workers/chunks/{251eb6e00f99a816d55c.js → 0326314947734b8e640a.js} +1 -1
- package/assets/esri/core/workers/chunks/04176244b0a3539c9681.js +1 -0
- package/assets/esri/core/workers/chunks/{168ec8fca2702617a543.js → 09dfec3e097ebbef6a89.js} +1 -1
- package/assets/esri/core/workers/chunks/{942fad4ec96295672ce8.js → 10e474d664b20adcd917.js} +1 -1
- package/assets/esri/core/workers/chunks/12f9a55253084a910b2e.js +1 -0
- package/assets/esri/core/workers/chunks/{0629087bd5bb8048493e.js → 14dedd80fb797303f91f.js} +1 -1
- package/assets/esri/core/workers/chunks/{81d89107ff82604a3ea0.js → 1b445981fbc8373f4dd8.js} +1 -1
- package/assets/esri/core/workers/chunks/{794960ec36e11f4416c2.js → 1d1e25bb61eeeee8ee94.js} +1 -1
- package/assets/esri/core/workers/chunks/{6ba3c2b9f699d94d62b8.js → 1ec1a1997b5577619040.js} +1 -1
- package/assets/esri/core/workers/chunks/2085084324cd5a81783f.js +1 -0
- package/assets/esri/core/workers/chunks/2c2c0f66cffc521df736.js +1 -0
- package/assets/esri/core/workers/chunks/2dd347aa2a061d536e69.js +1 -0
- package/assets/esri/core/workers/chunks/2dfa7abf2d39fa5a3874.js +1 -0
- package/assets/esri/core/workers/chunks/{6cb44cd319cb6c2539c8.js → 2e2c47f8a80ee9234350.js} +1 -1
- package/assets/esri/core/workers/chunks/322085d63719da6e443c.js +1 -0
- package/assets/esri/core/workers/chunks/{76086517591d0eb35156.js → 34a2e0462eb05986cdd1.js} +1 -1
- package/assets/esri/core/workers/chunks/{a6dcd13c792b6538ac50.js → 35593a9790818b689455.js} +1 -1
- package/assets/esri/core/workers/chunks/3a04153ca9d8e4f01185.js +1 -0
- package/assets/esri/core/workers/chunks/{4e9a8fce55cad841c731.js → 3b25f5d9c8f78bb6e011.js} +1 -1
- package/assets/esri/core/workers/chunks/3e7ea06b342e33bc48a5.js +1 -0
- package/assets/esri/core/workers/chunks/3ed317900f0edf635508.js +1 -0
- package/assets/esri/core/workers/chunks/401ce5cb98fa14c1a725.js +1 -0
- package/assets/esri/core/workers/chunks/4319b89cfa02894a8cae.js +1 -0
- package/assets/esri/core/workers/chunks/{7bed14d9bcd7fc5e2eec.js → 4bcd74951477e8977ba1.js} +1 -1
- package/assets/esri/core/workers/chunks/4c04c54330b693892cfc.js +314 -0
- package/assets/esri/core/workers/chunks/{687d2b761dc5b5cf0c31.js → 4d4d71d24c1a9cb342b8.js} +1 -1
- package/assets/esri/core/workers/chunks/4fa230dc6e5e87b0dec1.js +1 -0
- package/assets/esri/core/workers/chunks/50f03813fba4b752ca9f.js +1 -0
- package/assets/esri/core/workers/chunks/{abc236e99b52be1c83b9.js → 52a14266fe239b95c5ce.js} +1 -1
- package/assets/esri/core/workers/chunks/53b5c77832df7df4d4e3.js +1 -0
- package/assets/esri/core/workers/chunks/{34178ace79e8dea3567d.js → 562cddaf63985e53ee6e.js} +1 -1
- 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/{6599cc702a46f81a5634.js → 5dd5be91038df8902dc4.js} +1 -1
- package/assets/esri/core/workers/chunks/{49a1b7f700b8a42de817.js → 60c7f896f2246a8aa6d7.js} +19 -19
- package/assets/esri/core/workers/chunks/60f363ee2add089e8f0b.js +1 -0
- package/assets/esri/core/workers/chunks/68074a484d7f9bc713c0.js +1 -0
- package/assets/esri/core/workers/chunks/6acfa51b81e6f4255118.js +1 -0
- package/assets/esri/core/workers/chunks/{3fe7be535affae31de7e.js → 6b85a8776ec2beff63cb.js} +1 -1
- package/assets/esri/core/workers/chunks/{0dc3a04ce717b7ddd957.js → 6c9dac4a869742cc2718.js} +1 -1
- package/assets/esri/core/workers/chunks/6df484faf54e90a6cc77.js +1 -0
- package/assets/esri/core/workers/chunks/6ea6ad894ac634aa4391.js +1 -0
- package/assets/esri/core/workers/chunks/6f8098f9fe233833245a.js +1 -0
- package/assets/esri/core/workers/chunks/75fd2ef1236a9364ca7f.js +1 -0
- package/assets/esri/core/workers/chunks/7be9bbae23895d1cfa92.js +1 -0
- package/assets/esri/core/workers/chunks/7ea48661f1087d06aa41.js +1 -0
- package/assets/esri/core/workers/chunks/{47e5149765beee46f208.js → 7ee68f67f9cc48a328f0.js} +1 -1
- package/assets/esri/core/workers/chunks/{e5aac523c37d906eece6.js → 827277e5da652bcecaf2.js} +1 -1
- package/assets/esri/core/workers/chunks/866477acdf03b8a40bc9.js +1 -0
- package/assets/esri/core/workers/chunks/8e83c133b201b9b61e70.js +1 -0
- package/assets/esri/core/workers/chunks/9086a4933d3d3d9ffa72.js +1 -0
- package/assets/esri/core/workers/chunks/94174d40de39dbe7d0bf.js +1 -0
- package/assets/esri/core/workers/chunks/{dd99b77a7c0a052507bb.js → 9d88b4ba8e511da64583.js} +3 -3
- package/assets/esri/core/workers/chunks/9f34cf024231f574009c.js +1 -0
- package/assets/esri/core/workers/chunks/{e705d041f6c1632bfbcc.js → a10c6dd3bb8b3602de68.js} +1 -1
- package/assets/esri/core/workers/chunks/a64cd02ca959d511101c.js +1 -0
- package/assets/esri/core/workers/chunks/a808be466812db51813d.js +1 -0
- package/assets/esri/core/workers/chunks/{6b4a24248182245167ca.js → a931515a2569713e743b.js} +1 -1
- package/assets/esri/core/workers/chunks/a95e28ade258b144cbb5.js +1 -0
- package/assets/esri/core/workers/chunks/adc68e2c6d2698a52bfe.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/bb4574a87ca21e719f0d.js +1 -0
- package/assets/esri/core/workers/chunks/{07639f406b71bb49ffd6.js → bdbb5b33f0f49661bf6d.js} +1 -1
- package/assets/esri/core/workers/chunks/bf05164b7a3e4f31e9db.js +1 -0
- package/assets/esri/core/workers/chunks/c042269586921e337be9.js +1 -0
- package/assets/esri/core/workers/chunks/c7391b0b5a9c916a53f7.js +1 -0
- package/assets/esri/core/workers/chunks/{43d28c6509c21b8917a8.js → ca7523c14d81c470e92e.js} +1 -1
- package/assets/esri/core/workers/chunks/d0ae8752419d5b761190.js +1 -0
- package/assets/esri/core/workers/chunks/d445e9399fe4ca3d2a50.js +1 -0
- package/assets/esri/core/workers/chunks/d7683a95775c9f401a7e.js +1 -0
- package/assets/esri/core/workers/chunks/{9d6945cda99d14af83ac.js → d7d9656b990ce8be2152.js} +1 -1
- package/assets/esri/core/workers/chunks/dbfb00fb28b8b9f687a1.js +1 -0
- package/assets/esri/core/workers/chunks/df4a0af329ce94a47a7b.js +1 -0
- package/assets/esri/core/workers/chunks/e071b912539304564b69.js +1 -0
- package/assets/esri/core/workers/chunks/e10d6e511921394474ca.js +1 -0
- package/assets/esri/core/workers/chunks/e4b6aa8f67c2bd285020.js +1 -0
- package/assets/esri/core/workers/chunks/e6ca02f98f855024f74b.js +1 -0
- package/assets/esri/core/workers/chunks/{892157696e8f9e38c472.js → e6e837e43b9348050832.js} +1 -1
- package/assets/esri/core/workers/chunks/{d3325ed8d224e2350db7.js → e8a3ad00936f2ccaf362.js} +1 -1
- package/assets/esri/core/workers/chunks/ef7063ee790d2d64d4b2.js +1 -0
- package/assets/esri/core/workers/chunks/{b65fcfde62d49de1fa54.js → ef977be20a647aeded0a.js} +1 -1
- package/assets/esri/core/workers/chunks/efb631371b6bb3f043bb.js +1 -0
- package/assets/esri/core/workers/chunks/{0f5693541111fcae0c2f.js → f0914715e90e43466f8c.js} +1 -1
- package/assets/esri/core/workers/chunks/{ab71865b94022e78035c.js → f92845eb7df1804fcd6d.js} +1 -1
- package/assets/esri/core/workers/chunks/{bfc063d4431bfa162160.js → fd09f38fb4d99bf34988.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/boundedPlane.js +1 -1
- 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/ensureType.js +1 -1
- package/core/accessorSupport/types.d.ts +0 -8
- package/core/compilerUtils.js +1 -1
- package/core/promiseUtils.d.ts +1 -1
- package/core/reactiveUtils.d.ts +2 -2
- package/core/typedArrayUtil.js +1 -1
- package/core/units.d.ts +8 -2
- package/core/units.js +1 -1
- package/core/workers/loaderConfig.js +1 -1
- package/editing/sharedTemplates/SharedTemplate.js +1 -1
- package/geometry/HeightModelInfo.d.ts +3 -3
- package/geometry/SpatialReference.d.ts +2 -2
- package/geometry/libtess.js +1 -1
- package/geometry/support/MeshTexture.js +1 -1
- package/geometry/support/aaBoundingRect.js +1 -1
- package/geometry/support/boundedPlane.js +1 -1
- package/geometry/support/heightModelInfoUtils.js +1 -1
- package/geometry/support/meshUtils/External.js +1 -1
- package/geometry/support/meshUtils/exporters/gltf/imageutils.js +1 -1
- package/geometry/support/meshUtils/loadExternal.js +1 -1
- package/geometry/support/meshUtils/types.d.ts +2 -2
- package/geometry/support/rotate.js +1 -1
- package/geometry/types.d.ts +2 -0
- package/identity/IdentityManagerBase.d.ts +4 -4
- package/interfaces.d.ts +2937 -2955
- package/kernel.js +1 -1
- package/layers/BaseElevationLayer.d.ts +3 -4
- package/layers/BuildingSceneLayer.d.ts +1 -1
- 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/buildingSublayers/BuildingGroupSublayer.d.ts +1 -1
- package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
- package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
- package/layers/graphics/dehydratedFeatureComparison.js +1 -1
- package/layers/graphics/dehydratedFeatures.js +1 -1
- package/layers/graphics/hydratedFeatures.js +1 -1
- 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/rectifyMapPoint.js +1 -1
- package/layers/orientedImagery/transformations/types.d.ts +1 -1
- package/layers/raster/datasets/pixelReader.d.ts +1 -7
- package/layers/raster/functions/changeDetectionUtils.js +1 -1
- package/layers/raster/functions/creators/createBandIndexFunctions.d.ts +29 -29
- package/layers/raster/functions/customBandIndexUtils.js +1 -1
- package/layers/raster/functions/focalStatUtils.js +1 -1
- package/layers/raster/functions/pixelTransformUtils.js +1 -1
- package/layers/save/featureLayerUtils.js +1 -1
- 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/ElevationSampler.js +1 -1
- 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/SubtypeSublayer.js +1 -1
- package/layers/support/domains.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/networks/support/TopologyValidationJobInfo.js +1 -1
- package/networks/support/TraceJobInfo.js +1 -1
- 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/RasterSymbolizer.js +1 -1
- package/renderers/support/pointCloud/types.d.ts +1 -0
- package/renderers/support/raster/types.d.ts +1 -0
- package/renderers/support/rendererConversion.js +1 -1
- package/renderers/types.d.ts +2 -0
- package/renderers/visualVariables/support/visualVariableUtils.js +1 -1
- 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/query/operations/pbfDehydratedFeatureSet.js +1 -1
- package/rest/support/JobInfo.js +1 -1
- package/rest/support/Query.js +1 -1
- package/rest/support/RelationshipQuery.js +1 -1
- package/rest/support/ServiceAreaParameters.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/sizeRange.js +1 -1
- 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/support/utils.js +1 -1
- 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/support/statsWorker.js +1 -1
- package/smartMapping/statistics/support/utils.js +1 -1
- package/smartMapping/statistics/types.d.ts +7 -7
- package/smartMapping/statistics/uniqueValues.d.ts +2 -2
- package/smartMapping/support/adapters/FeatureLayerAdapter.js +1 -1
- package/smartMapping/support/adapters/InMemoryLayerAdapter.js +1 -1
- package/smartMapping/support/adapters/support/histogramUtils.js +1 -1
- package/smartMapping/support/utils.js +1 -1
- 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/support/ElevationInfo.d.ts +2 -2
- package/symbols/support/IconSymbol3DLayerResource.d.ts +1 -1
- package/symbols/support/defaults.js +1 -1
- package/symbols/support/defaults3D.js +1 -1
- package/symbols/support/previewSymbol3D.js +1 -1
- package/symbols/support/symbolLayerUtils3D.js +1 -1
- package/symbols/support/symbolUtils.js +1 -1
- package/symbols/support/utils.js +1 -1
- package/symbols/types.d.ts +7 -0
- package/unionTypes.d.ts +13 -13
- package/views/2d/analysis/ElevationProfile/ElevationProfileLineVisualization2D.js +1 -1
- package/views/2d/analysis/ElevationProfileAnalysisView2D.d.ts +16 -11
- package/views/2d/analysis/ElevationProfileAnalysisView2D.js +1 -1
- package/views/2d/analysis/types.d.ts +1 -0
- package/views/2d/engine/imagery/RasterVFDisplayObject.js +1 -1
- package/views/2d/engine/vectorTiles/VectorTile.js +1 -1
- package/views/2d/engine/webgl/TextureUploadManager.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/input/handlers/DoubleTapDragZoom.js +1 -1
- package/views/2d/input/handlers/KeyZoom.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/TileLayerView2D.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/AreaMeasurement/support/utils.js +1 -1
- package/views/3d/analysis/Dimension/lengthDimensionConstraintUtils.js +1 -1
- package/views/3d/analysis/ElevationProfile/ElevationProfileLineVisualization3D.js +1 -1
- package/views/3d/analysis/ElevationProfileAnalysisView3D.d.ts +16 -11
- package/views/3d/analysis/ElevationProfileAnalysisView3D.js +1 -1
- package/views/3d/analysis/LineOfSightAnalysisView3D.d.ts +0 -2
- package/views/3d/analysis/Slice/sliceToolUtils.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementTool.js +1 -1
- package/views/3d/analysis/VolumeMeasurementAnalysisView3D.js +1 -1
- package/views/3d/analysis/types.d.ts +1 -0
- package/views/3d/camera/constraintUtils/tilt.js +1 -1
- package/views/3d/environment/CloudsParameters.js +1 -1
- package/views/3d/environment/CloudsRenderer.js +1 -1
- package/views/3d/environment/SceneViewEnvironment.js +1 -1
- package/views/3d/environment/SunLighting.d.ts +1 -3
- package/views/3d/glTF/internal/Resource.js +1 -1
- package/views/3d/glTF/internal/fillDefaults.js +1 -1
- package/views/3d/interactive/Manipulator3D.js +1 -1
- package/views/3d/interactive/SnappingVisualizer3D.js +1 -1
- package/views/3d/interactive/editingTools/isSupportedObjectUtils.js +1 -1
- package/views/3d/interactive/editingTools/move/isSupportedObject.js +1 -1
- package/views/3d/interactive/editingTools/transform/isSupportedGraphic.js +1 -1
- package/views/3d/interactive/visualElements/ExtendedLineVisualElement.js +1 -1
- package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DFeatureProcessor.js +1 -1
- package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/LabelInfo.js +1 -1
- package/views/3d/layers/graphics/defaultSymbolComplexity.js +1 -1
- package/views/3d/layers/graphics/lineUtils.js +1 -1
- package/views/3d/layers/graphics/pipeline/rendering/FeaturePipelineRenderManager.js +1 -1
- package/views/3d/layers/graphics/pipeline/symbolization/primitiveObjectUtils.js +1 -1
- package/views/3d/layers/graphics/primitiveObjectSymbolUtils.js +1 -1
- package/views/3d/layers/i3s/BuildingFilterUtil.js +1 -1
- package/views/3d/layers/i3s/I3SIntersectionHandler.js +1 -1
- package/views/3d/layers/i3s/I3SNode.js +1 -1
- package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
- package/views/3d/layers/i3s/PointCloudWorkerUtil.js +1 -1
- package/views/3d/layers/i3s/SphereCone.js +5 -0
- package/views/3d/layers/support/FastSymbolUpdates.js +1 -1
- package/views/3d/layers/support/MediaLayerInteractionOptions.d.ts +4 -0
- package/views/3d/layers/support/edgeUtils.js +1 -1
- package/views/3d/layers/support/featureReference.js +1 -1
- package/views/3d/layers/support/featureTileQuery3D.js +1 -1
- package/views/3d/layers/support/patternUtils.js +1 -1
- package/views/3d/state/controllers/GamepadKeyboardController.js +1 -1
- package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
- package/views/3d/support/FrustumExtentIntersection.js +1 -1
- package/views/3d/support/QualityProfile.js +1 -1
- package/views/3d/support/QualitySettings.js +1 -1
- package/views/3d/support/buffer/glUtil.js +1 -1
- package/views/3d/support/engineContent/sdfPrimitives.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatDataStore.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatFadeTexture.js +1 -1
- package/views/3d/support/viewpointUtils.js +1 -1
- package/views/3d/terrain/isTerrainSurfaceLayer.js +1 -1
- package/views/3d/webgl/RenderNode.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentData.glsl.js +8 -8
- package/views/3d/webgl-engine/collections/Component/Transform.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBufferFields.glsl.js +3 -3
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/NormalAttribute.glsl.js +4 -4
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexNormal.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ComputeFragmentNormals.glsl.js +6 -6
- package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/Normals.glsl.js +5 -5
- package/views/3d/webgl-engine/core/shaderLibrary/shading/PositionOutsideClipSpace.js +5 -0
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/TileBackground.glsl.js +3 -3
- package/views/3d/webgl-engine/core/shaderLibrary/util/BlendModes.glsl.js +1 -1
- 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/ManagedTexture.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/materials/lineStippleUtils.js +1 -1
- package/views/3d/webgl-engine/shaders/CompositingTechnique.js +1 -1
- 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/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/sources/edgeRenderer/LineAmplitude.glsl.js +4 -4
- package/views/3d/webgl-engine/shaders/sources/edgeRenderer/LineOffset.glsl.js +8 -8
- package/views/SceneView.js +1 -1
- package/views/VideoView.js +1 -1
- package/views/View.js +1 -1
- package/views/View2D.js +1 -1
- package/views/analysis/ElevationProfile/ElevationProfileController.js +1 -1
- package/views/analysis/ElevationProfile/ElevationProfileIndicatorPointVisualization.js +5 -0
- package/views/analysis/ElevationProfile/ElevationProfileLineComputation.js +1 -1
- package/views/analysis/ElevationProfile/ElevationProfileResult.js +1 -1
- package/views/analysis/ElevationProfile/ElevationProfileTool.js +1 -1
- package/views/analysis/ElevationProfile/constants.js +1 -1
- package/views/analysis/types.d.ts +4 -0
- package/views/draw/Draw.js +1 -1
- package/views/input/ViewEvents.js +1 -1
- package/views/input/types.d.ts +2 -4
- package/views/interactive/editGeometry/EditGeometry.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiledFetcher.js +1 -1
- package/views/interactive/snapping/featureSources/snappingCandidateElevationAlignment.js +1 -1
- package/views/interactive/snapping/featureSources/snappingCandidateElevationFilter.js +1 -1
- package/views/interactive/snapping/featureSources/symbologySnappingCandidates.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/PromiseQueue.js +1 -1
- package/views/support/WebAssemblyRequirements.js +5 -0
- package/views/support/WebGLRequirements.js +1 -1
- package/views/support/screenUtils.js +1 -1
- package/views/support/screenshotUtils.js +1 -1
- package/views/webgl/FramebufferObject.js +1 -1
- package/views/webgl/Uniform.js +1 -1
- package/views/webgl/Util.js +1 -1
- package/webdoc/support/SlideThumbnail.d.ts +6 -3
- package/webdoc/support/SlideThumbnail.js +1 -1
- package/webscene/Slide.d.ts +2 -2
- 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/batchAttributeFormUtils.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/workflowUtils.js +1 -1
- 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/FeatureForm/FeatureFormViewModel.js +1 -1
- package/widgets/FeatureForm/featureFormUtils.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- 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/ShadowCastViewModel.js +1 -1
- package/widgets/ShadowCast/ShadowCastVisibleElements.d.ts +2 -0
- package/widgets/Sketch/SketchViewModel.js +1 -1
- package/widgets/Sketch/support/OperationHandle.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/TimeSlider.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/widgets/support/SelectionList/GroupLayerItem.js +1 -1
- package/widgets/support/dateUtils.js +1 -1
- package/assets/esri/core/workers/chunks/055fdc5134d54174444d.js +0 -316
- package/assets/esri/core/workers/chunks/058fb2cd6387acfd458c.js +0 -1
- package/assets/esri/core/workers/chunks/08359ae020238a565955.js +0 -1
- package/assets/esri/core/workers/chunks/0ae018098906d6a88904.js +0 -1
- package/assets/esri/core/workers/chunks/0cd3acfbf9ee991bdab4.js +0 -1
- package/assets/esri/core/workers/chunks/0e5cd0cf6ab7cb37d723.js +0 -1
- package/assets/esri/core/workers/chunks/0ee407b8db5c07a00d82.js +0 -1
- package/assets/esri/core/workers/chunks/10373885604655f673df.js +0 -1
- package/assets/esri/core/workers/chunks/119822a646834c1cebc0.js +0 -1
- package/assets/esri/core/workers/chunks/13d61d34e55c80e4ecdf.js +0 -1
- package/assets/esri/core/workers/chunks/17dea03fc4eb414f0022.js +0 -1
- package/assets/esri/core/workers/chunks/1967239713b58dccfd81.js +0 -1
- package/assets/esri/core/workers/chunks/1c350a2c4014146dbcd9.js +0 -1
- package/assets/esri/core/workers/chunks/2266a8f2c2ec37c19bb4.js +0 -1
- package/assets/esri/core/workers/chunks/226acd251ad7d7ee3b57.js +0 -1
- package/assets/esri/core/workers/chunks/22b07c54a5fcc27771b0.js +0 -1
- package/assets/esri/core/workers/chunks/22ca80f491e070b2a5e7.js +0 -1
- package/assets/esri/core/workers/chunks/2402d305a77fef4694a0.js +0 -1
- package/assets/esri/core/workers/chunks/27f096c434f049b8df01.js +0 -1
- package/assets/esri/core/workers/chunks/3371935a4fd6346d3a17.js +0 -1
- package/assets/esri/core/workers/chunks/3c3d311b88f5400951ef.js +0 -1
- package/assets/esri/core/workers/chunks/3c4f8597f602779174f1.js +0 -1
- package/assets/esri/core/workers/chunks/3da53c017f9c5d2d778a.js +0 -1
- package/assets/esri/core/workers/chunks/4773a358832f87963766.js +0 -1
- package/assets/esri/core/workers/chunks/492515860198f38dd698.js +0 -1
- package/assets/esri/core/workers/chunks/4f33a2ecb154a2c2449c.js +0 -1
- package/assets/esri/core/workers/chunks/4f6f181ee83b4d484518.js +0 -1
- package/assets/esri/core/workers/chunks/52726458f590e726d52c.js +0 -1
- package/assets/esri/core/workers/chunks/536c492fdda30f2f1288.js +0 -1
- package/assets/esri/core/workers/chunks/600e2e6b51e2fb9c598c.js +0 -1
- package/assets/esri/core/workers/chunks/62b28f73f814413c10fc.js +0 -1
- package/assets/esri/core/workers/chunks/63b8cd7d5cafbaeed894.js +0 -1
- package/assets/esri/core/workers/chunks/6925f09d44cc38480d53.js +0 -1
- package/assets/esri/core/workers/chunks/7f4fa2f2e85863d3cfb9.js +0 -1
- package/assets/esri/core/workers/chunks/8f4c480c418eba299c2b.js +0 -1
- package/assets/esri/core/workers/chunks/990341f7c47bd656c782.js +0 -1
- package/assets/esri/core/workers/chunks/a3836f6a93924ee4816e.js +0 -1
- package/assets/esri/core/workers/chunks/ab520fd1ae917daf07d8.js +0 -1
- package/assets/esri/core/workers/chunks/acc7ff44bfcb5c195114.js +0 -1
- package/assets/esri/core/workers/chunks/b25a131c04092c3ab75d.js +0 -1
- package/assets/esri/core/workers/chunks/b7960ab9a9da7f88184c.js +0 -1
- package/assets/esri/core/workers/chunks/b9909264cfea68d5f2a1.js +0 -1
- package/assets/esri/core/workers/chunks/ba7f57788847cc0f68df.js +0 -1
- package/assets/esri/core/workers/chunks/bb08359610a41e304b55.js +0 -1
- package/assets/esri/core/workers/chunks/bf06250be7a7a36306b1.js +0 -1
- package/assets/esri/core/workers/chunks/bfbbcaa1fb04f17fc869.js +0 -1
- package/assets/esri/core/workers/chunks/d30cfc5fa302cc08d862.js +0 -1
- package/assets/esri/core/workers/chunks/d75adfd4acb3c92accc9.js +0 -1
- package/assets/esri/core/workers/chunks/da99fd0d3106dd357743.js +0 -1
- package/assets/esri/core/workers/chunks/de71db3b0fb947b13c97.js +0 -1
- package/assets/esri/core/workers/chunks/dfbbead4c24d13682891.js +0 -1
- package/assets/esri/core/workers/chunks/e4ba850e8344ac2c5fc0.js +0 -1
- package/assets/esri/core/workers/chunks/f7d93aae350796b88562.js +0 -1
- package/assets/esri/core/workers/chunks/f9370830051865a3435b.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/views/analysis/ElevationProfile/ElevationProfileHoveredPointVisualization.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,4 +2,4 @@
|
|
|
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{__decorate as t}from"tslib";import{neverReached as e}from"../../../../core/compilerUtils.js";import{clamp as i,acosClamped as a,deg2rad as r}from"../../../../core/mathUtils.js";import{property as o,subclass as n}from"../../../../core/accessorSupport/decorators.js";import{translate as s,rotate as c,identity as l}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as m}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{e as h,p,i as d,j as u,d as f,q as _,b as v,h as C,n as g,f as y,B as w,C as b,g as S}from"../../../../chunks/vec32.js";import{create as O}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as x}from"../../../../geometry/ellipsoidUtils.js";import{wrap as M}from"../../../../geometry/support/ray.js";import{Sphere as j}from"../../../../geometry/support/sphere.js";import{angle as z}from"../../../../geometry/support/vector.js";import{sv3d as T}from"../../../../geometry/support/vectorStacks.js";import{applyAll as A}from"../../camera/constraintUtils.js";import{ConstraintOptions as D}from"../../camera/constraintUtils/ConstraintOptions.js";import{TiltRange as R}from"../Constraints.js";import{InteractiveController as H}from"./InteractiveController.js";import{panMotionToRotationMatrix as E,onSurfaceTiltToEyeTiltGlobal as U,offSurfaceTiltToEyeTiltGlobal as k}from"../utils/navigationUtils.js";import{viewAngle as F}from"../utils/viewUtils.js";import{headingTiltToDirectionUp as G}from"../../support/cameraUtils.js";import{createDirectionUp as P}from"../../support/cameraUtilsInternal.js";import B from"../../webgl/RenderCamera.js";import{extractTransformation as I,isZeroTransformation as V,extractTransformationKeyboard as q}from"../../../navigation/gamepadAndKeyboardUtils.js";let L=class extends H{constructor(t){super(t),this._filteredSurfaceElevation=0,this._transformation={translation:[0,0,0],heading:0,tilt:0,zoom:0},this._keysButtonState=[0,0,0,0,0,0,0,0,0,0,0,0],this._tmpCamera=new B,this._headingStart=0,this._constraintOptions=new D(15,0,0,new B,null,1)}handleEventGamepad(t){const e=I(t,this.view.navigation.gamepad,this._transformation);("end"===t.action||V(e))&&this.finishController()}activateDirection(t){this._keysButtonState[t]=1,q(this._keysButtonState,this._transformation)}directionActive(t){return 1===this._keysButtonState[t]}countActiveDirections(){return this._keysButtonState.reduce((t,e)=>e>0?t+1:t,0)}deactivateDirection(t){this._keysButtonState[t]=0;const e=q(this._keysButtonState,this._transformation);V(e)&&this.finishController()}onControllerStart(t){this._filteredSurfaceElevation=this.view.pointsOfInterest.cameraOnSurface.location.z,this._headingStart=this.view.camera.heading,super.onControllerStart(t)}_updateFilteredSurfaceElevation(t){const e=this.view.pointsOfInterest.cameraOnSurface.location.z,i=1;this._filteredSurfaceElevation+=i*(e-this._filteredSurfaceElevation)*t}stepController(t,e){this._updateStartHeading(),this._updateFilteredSurfaceElevation(t),this.currentCamera.copyViewFrom(e),this._updateCameraCenter(),this._constraintOptions.interactionStartCamera?.copyFrom(this.currentCamera),this._calculateControlTransformation(t,this.currentCamera,Y),this._applyDisabledMovementTypes(Y),this._applyPan(Y.pan),this._applyRotate(Y.rotate),this._applyZoom(Y.zoom),this._applyAscend(Y.ascend),this._constraintOptions.interactionType=0,this._constraintOptions.selection=8,A(this.view,this.currentCamera,this._constraintOptions),super.stepController(t,e)}_updateStartHeading(){0!==this._transformation.heading&&(this._headingStart=this.view.camera.heading)}_applyRotate(t){if(!t.enabled)return;const e=this.currentCamera;h($,e.center,e.eye),p($,$,t.matrix),e.center=d($,$,e.eye),e.up=p($,e.up,t.matrix),this._constraintOptions.interactionType=3,this._constraintOptions.selection=7,A(this.view,e,this._constraintOptions)}_applyPan(t,e=this.currentCamera){if(!t.enabled)return;e.eye=p($,e.eye,t.matrix),e.center=p($,e.center,t.matrix);this.view.state.isGlobal&&(e.up=p($,e.up,t.matrix)),this._constraintOptions.interactionType=4,this._constraintOptions.selection=15,A(this.view,e,this._constraintOptions)}_applyZoom(t){if(!t)return;const e=this.currentCamera.viewForward;this.currentCamera.eye=d($,this.currentCamera.eye,u(T.get(),e,t)),f(tt,e),_(tt,tt),this._constraintOptions.interactionDirection=tt,this._constraintOptions.interactionType=1,this._constraintOptions.selection=7,A(this.view,this.currentCamera,this._constraintOptions),this._constraintOptions.interactionDirection=null}_applyAscend(t){if(!t)return;const e=this.view.renderCoordsHelper.worldUpAtPosition(this.currentCamera.eye,T.get());this._constraintOptions.interactionDirection=f(tt,e);if(this.view.state.isGlobal){const e=v(this.currentCamera.eye),i=(e+t)/e;this.currentCamera.eye=u($,this.currentCamera.eye,i),this.currentCamera.center=u($,this.currentCamera.center,i)}else{const i=u(T.get(),e,t);this.currentCamera.eye=d($,this.currentCamera.eye,i),this.currentCamera.center=d($,this.currentCamera.center,i)}this._updateCameraCenter(),this._constraintOptions.interactionType=5,this._constraintOptions.selection=8,A(this.view,this.currentCamera,this._constraintOptions)&&this._updateCameraCenter(),this._constraintOptions.selection=7,A(this.view,this.currentCamera,this._constraintOptions),this._constraintOptions.interactionDirection=null}_calculateControlTransformation(t,e,i){at(i);const a=this._computeVelocities(t);this.view.state.isLocal?this._calculateControlTransformationLocal(a,e,i):this._calculateControlTransformationGlobal(a,e,i)}_updateCameraCenter(){const t=this.view.pointsOfInterest.centerOnSurfaceFrequent.estimatedSurfaceAltitude,e=this.view.renderCoordsHelper,i=this.currentCamera.ray;this.currentCamera.center=e.intersectManifoldClosestSilhouette(i,t,$)}_calculateControlTransformationLocal(t,a,r){const{viewRight:o,viewForward:n}=a,l=this._transformation,m=this.view.navigation.gamepad,h=C(T.get(),n[0],n[1],0);g(h,h);const p=l.translation[0]*t.pan;if(0!==p){const t=u(T.get(),o,p);s(r.pan.matrix,r.pan.matrix,t),r.pan.enabled=!0}switch(m.mode){case"pan":{const e=-l.translation[1]*t.pan;if(0!==e){const t=u(T.get(),h,e);s(r.pan.matrix,r.pan.matrix,t),r.pan.enabled=!0}r.zoom=l.zoom*t.zoom;break}case"zoom":r.zoom=(-l.translation[1]+l.zoom)*t.zoom;break;default:e(m.mode)}const d=l.translation[2]*t.ascend;r.ascend=d;const f=-l.heading*t.rotate;0!==f&&(c(r.rotate.matrix,r.rotate.matrix,f,this.view.renderCoordsHelper.worldUpAtPosition(a.eye,T.get())),r.rotate.enabled=!0);const _=l.tilt*t.rotate,v=F(this.view.renderCoordsHelper,a.center,a.eye),y=i(v+_,R.min,R.max)-v;y&&(c(r.rotate.matrix,r.rotate.matrix,y,o),r.rotate.enabled=!0)}_calculateControlTransformationGlobal(t,e,i){const{eye:a,viewRight:r}=e,o=this._transformation,n=this.view.navigation.gamepad,s=y(T.get(),r,a);g(s,s),_(s,s),E(this.startCamera,e,o,t,this.view.camera.heading,this._headingStart,this.view.camera.tilt,i,n),this._tmpCamera.copyFrom(this.currentCamera),this._applyPan(Y.pan,this._tmpCamera);const l=this.view.pointsOfInterest.centerOnSurfaceFrequent.estimatedSurfaceAltitude,m=o.translation[2]*t.ascend;i.ascend=m;const h=-o.heading*t.rotate;0!==h&&(c(i.rotate.matrix,i.rotate.matrix,h,this._tmpCamera.eye),i.rotate.enabled=!0);const p=o.tilt*t.rotate,d=this._clampTiltDeltaGlobalToValidRange(p,e.ray,l);0!==d&&(c(i.rotate.matrix,i.rotate.matrix,d,this._tmpCamera.viewRight),i.rotate.enabled=!0),i.zoom+=o.zoom*t.zoom}_clampTiltDeltaGlobalToValidRange(t,e,a){const r=x(this.view.spatialReference),o=U(R.min,e.origin,a,r);let n=0,s=0;const c=T.get();if(this.view.renderCoordsHelper.intersectManifold(e,a,c)){const t=F(this.view.renderCoordsHelper,c,e.origin);n=U(t,e.origin,a,r),s=U(R.max,e.origin,a,r)}else{it.radius=a+r.radius,it.closestPointOnSilhouette(e,c);const t=Math.PI+z(e.direction,c);n=k(t,e.origin,a,r),s=k(R.max,e.origin,a,r)}return i(n+t,o,s)-n}_getPointAbsoluteSurfaceElevation(t,e,i){const{renderCoordsHelper:a}=this.view,r=a.getAltitude(t),o=e+Math.abs(r-e);return a.setAltitude(i,o,t),o}_clampedDistanceToSurface(t,e){const{renderCoordsHelper:i}=this.view,{camera:a}=this.view.state,{direction:r}=G(this.view,e,0,Z,et),o=i.intersectManifoldClosestSilhouette(M(e,r),t,T.get()),n=w(e,o),s=i.intersectManifoldClosestSilhouette(M(e,b(T.get(),e,a.center)),t,T.get()),c=w(e,s);return Math.min(n,c)}_computeHeadingRotateRadius(t){const{renderCoordsHelper:e,state:i}=this.view,{camera:r,isGlobal:o}=i,n=e.intersectManifoldClosestSilhouette(r.ray,this._filteredSurfaceElevation,T.get());if(o){const e=h(T.get(),t,n),i=v(e);u(e,e,1/i);const r=g(T.get(),t),o=a(S(r,e));return i*Math.sin(Math.min(X,o))}{const i=f(T.get(),t);return e.setAltitude(i,this._filteredSurfaceElevation),w(n,i)}}_minimumAscendVelocity(){return this.view.state.constraints.collision.enabled?0:N}_computeVelocities(t){const e=this._filteredSurfaceElevation,a=e+x(this.view.spatialReference).radius,{camera:r,isGlobal:o}=this.view.state,n=T.get(),s=this._getPointAbsoluteSurfaceElevation(r.eye,e,n),c=this._clampedDistanceToSurface(e,n),l=r.width/2,m=J*r.width,h=J*r.width,p=c*Math.tan(.5*r.fovX)/l,d=p/a,u=p/this._computeHeadingRotateRadius(n),f=s-e;return{pan:(o?d:p)*m*t,ascend:Math.max(this._minimumAscendVelocity()*t,2**(m*t/l)*f-f),zoom:2**(m*t/l)*c-c,rotate:i(u*h,Q,W)*t}}_applyDisabledMovementTypes(t){null==this.disableMovements||void 0!==this.disableMovements.mode&&this.view.state.viewingMode!==this.disableMovements.mode||(t.zoom=this.disableMovements.zoom?0:t.zoom,t.ascend=this.disableMovements.ascend?0:t.ascend,t.pan.enabled=!this.disableMovements.pan,this.disableMovements.pan&&l(t.pan.matrix),t.rotate.enabled=!this.disableMovements.rotate,this.disableMovements.rotate&&l(t.rotate.matrix))}static activatesFor(t,e){const i=I(e,t.navigation.gamepad,K);return!("end"===e.action||V(i))}};t([o({constructOnly:!0})],L.prototype,"gamepadDevice",void 0),t([o({constructOnly:!0})],L.prototype,"disableMovements",void 0),L=t([n("esri.views.3d.state.controllers.GamepadKeyboardController")],L);const K={translation:[0,0,0],heading:0,tilt:0,zoom:0},Z=80,X=r(Z),J=.75,N=5,Q=r(30),W=r(80),Y={zoom:0,ascend:0,pan:{enabled:!1,matrix:m()},rotate:{enabled:!1,matrix:m()}},$=O(),tt=O(),et=P(),it=new j;function at(t){t.zoom=0,t.ascend=0,t.pan.enabled=!1,l(t.pan.matrix),t.rotate.enabled=!1,l(t.rotate.matrix)}export{L as GamepadKeyboardController};
|
|
5
|
+
import{__decorate as t}from"tslib";import{clamp as e,acosClamped as i,deg2rad as a}from"../../../../core/mathUtils.js";import{property as r,subclass as o}from"../../../../core/accessorSupport/decorators.js";import{translate as n,rotate as s,identity as c}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as l}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{e as m,p as h,i as p,j as d,d as u,q as f,b as _,h as v,n as C,f as g,B as y,C as w,g as b}from"../../../../chunks/vec32.js";import{create as S}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as O}from"../../../../geometry/ellipsoidUtils.js";import{wrap as x}from"../../../../geometry/support/ray.js";import{Sphere as M}from"../../../../geometry/support/sphere.js";import{angle as j}from"../../../../geometry/support/vector.js";import{sv3d as z}from"../../../../geometry/support/vectorStacks.js";import{applyAll as T}from"../../camera/constraintUtils.js";import{ConstraintOptions as A}from"../../camera/constraintUtils/ConstraintOptions.js";import{TiltRange as D}from"../Constraints.js";import{InteractiveController as R}from"./InteractiveController.js";import{panMotionToRotationMatrix as H,onSurfaceTiltToEyeTiltGlobal as E,offSurfaceTiltToEyeTiltGlobal as k}from"../utils/navigationUtils.js";import{viewAngle as U}from"../utils/viewUtils.js";import{headingTiltToDirectionUp as F}from"../../support/cameraUtils.js";import{createDirectionUp as G}from"../../support/cameraUtilsInternal.js";import P from"../../webgl/RenderCamera.js";import{extractTransformation as B,isZeroTransformation as I,extractTransformationKeyboard as V}from"../../../navigation/gamepadAndKeyboardUtils.js";let q=class extends R{constructor(t){super(t),this._filteredSurfaceElevation=0,this._transformation={translation:[0,0,0],heading:0,tilt:0,zoom:0},this._keysButtonState=[0,0,0,0,0,0,0,0,0,0,0,0],this._tmpCamera=new P,this._headingStart=0,this._constraintOptions=new A(15,0,0,new P,null,1)}handleEventGamepad(t){const e=B(t,this.view.navigation.gamepad,this._transformation);("end"===t.action||I(e))&&this.finishController()}activateDirection(t){this._keysButtonState[t]=1,V(this._keysButtonState,this._transformation)}directionActive(t){return 1===this._keysButtonState[t]}countActiveDirections(){return this._keysButtonState.reduce((t,e)=>e>0?t+1:t,0)}deactivateDirection(t){this._keysButtonState[t]=0;const e=V(this._keysButtonState,this._transformation);I(e)&&this.finishController()}onControllerStart(t){this._filteredSurfaceElevation=this.view.pointsOfInterest.cameraOnSurface.location.z,this._headingStart=this.view.camera.heading,super.onControllerStart(t)}_updateFilteredSurfaceElevation(t){const e=this.view.pointsOfInterest.cameraOnSurface.location.z,i=1;this._filteredSurfaceElevation+=i*(e-this._filteredSurfaceElevation)*t}stepController(t,e){this._updateStartHeading(),this._updateFilteredSurfaceElevation(t),this.currentCamera.copyViewFrom(e),this._updateCameraCenter(),this._constraintOptions.interactionStartCamera?.copyFrom(this.currentCamera),this._calculateControlTransformation(t,this.currentCamera,W),this._applyDisabledMovementTypes(W),this._applyPan(W.pan),this._applyRotate(W.rotate),this._applyZoom(W.zoom),this._applyAscend(W.ascend),this._constraintOptions.interactionType=0,this._constraintOptions.selection=8,T(this.view,this.currentCamera,this._constraintOptions),super.stepController(t,e)}_updateStartHeading(){0!==this._transformation.heading&&(this._headingStart=this.view.camera.heading)}_applyRotate(t){if(!t.enabled)return;const e=this.currentCamera;m(Y,e.center,e.eye),h(Y,Y,t.matrix),e.center=p(Y,Y,e.eye),e.up=h(Y,e.up,t.matrix),this._constraintOptions.interactionType=3,this._constraintOptions.selection=7,T(this.view,e,this._constraintOptions)}_applyPan(t,e=this.currentCamera){if(!t.enabled)return;e.eye=h(Y,e.eye,t.matrix),e.center=h(Y,e.center,t.matrix);this.view.state.isGlobal&&(e.up=h(Y,e.up,t.matrix)),this._constraintOptions.interactionType=4,this._constraintOptions.selection=15,T(this.view,e,this._constraintOptions)}_applyZoom(t){if(!t)return;const e=this.currentCamera.viewForward;this.currentCamera.eye=p(Y,this.currentCamera.eye,d(z.get(),e,t)),u($,e),f($,$),this._constraintOptions.interactionDirection=$,this._constraintOptions.interactionType=1,this._constraintOptions.selection=7,T(this.view,this.currentCamera,this._constraintOptions),this._constraintOptions.interactionDirection=null}_applyAscend(t){if(!t)return;const e=this.view.renderCoordsHelper.worldUpAtPosition(this.currentCamera.eye,z.get());this._constraintOptions.interactionDirection=u($,e);if(this.view.state.isGlobal){const e=_(this.currentCamera.eye),i=(e+t)/e;this.currentCamera.eye=d(Y,this.currentCamera.eye,i),this.currentCamera.center=d(Y,this.currentCamera.center,i)}else{const i=d(z.get(),e,t);this.currentCamera.eye=p(Y,this.currentCamera.eye,i),this.currentCamera.center=p(Y,this.currentCamera.center,i)}this._updateCameraCenter(),this._constraintOptions.interactionType=5,this._constraintOptions.selection=8,T(this.view,this.currentCamera,this._constraintOptions)&&this._updateCameraCenter(),this._constraintOptions.selection=7,T(this.view,this.currentCamera,this._constraintOptions),this._constraintOptions.interactionDirection=null}_calculateControlTransformation(t,e,i){it(i);const a=this._computeVelocities(t);this.view.state.isLocal?this._calculateControlTransformationLocal(a,e,i):this._calculateControlTransformationGlobal(a,e,i)}_updateCameraCenter(){const t=this.view.pointsOfInterest.centerOnSurfaceFrequent.estimatedSurfaceAltitude,e=this.view.renderCoordsHelper,i=this.currentCamera.ray;this.currentCamera.center=e.intersectManifoldClosestSilhouette(i,t,Y)}_calculateControlTransformationLocal(t,i,a){const{viewRight:r,viewForward:o}=i,c=this._transformation,l=this.view.navigation.gamepad,m=v(z.get(),o[0],o[1],0);C(m,m);const h=c.translation[0]*t.pan;if(0!==h){const t=d(z.get(),r,h);n(a.pan.matrix,a.pan.matrix,t),a.pan.enabled=!0}switch(l.mode){case"pan":{const e=-c.translation[1]*t.pan;if(0!==e){const t=d(z.get(),m,e);n(a.pan.matrix,a.pan.matrix,t),a.pan.enabled=!0}a.zoom=c.zoom*t.zoom;break}case"zoom":a.zoom=(-c.translation[1]+c.zoom)*t.zoom;break;default:l.mode}const p=c.translation[2]*t.ascend;a.ascend=p;const u=-c.heading*t.rotate;0!==u&&(s(a.rotate.matrix,a.rotate.matrix,u,this.view.renderCoordsHelper.worldUpAtPosition(i.eye,z.get())),a.rotate.enabled=!0);const f=c.tilt*t.rotate,_=U(this.view.renderCoordsHelper,i.center,i.eye),g=e(_+f,D.min,D.max)-_;g&&(s(a.rotate.matrix,a.rotate.matrix,g,r),a.rotate.enabled=!0)}_calculateControlTransformationGlobal(t,e,i){const{eye:a,viewRight:r}=e,o=this._transformation,n=this.view.navigation.gamepad,c=g(z.get(),r,a);C(c,c),f(c,c),H(this.startCamera,e,o,t,this.view.camera.heading,this._headingStart,this.view.camera.tilt,i,n),this._tmpCamera.copyFrom(this.currentCamera),this._applyPan(W.pan,this._tmpCamera);const l=this.view.pointsOfInterest.centerOnSurfaceFrequent.estimatedSurfaceAltitude,m=o.translation[2]*t.ascend;i.ascend=m;const h=-o.heading*t.rotate;0!==h&&(s(i.rotate.matrix,i.rotate.matrix,h,this._tmpCamera.eye),i.rotate.enabled=!0);const p=o.tilt*t.rotate,d=this._clampTiltDeltaGlobalToValidRange(p,e.ray,l);0!==d&&(s(i.rotate.matrix,i.rotate.matrix,d,this._tmpCamera.viewRight),i.rotate.enabled=!0),i.zoom+=o.zoom*t.zoom}_clampTiltDeltaGlobalToValidRange(t,i,a){const r=O(this.view.spatialReference),o=E(D.min,i.origin,a,r);let n=0,s=0;const c=z.get();if(this.view.renderCoordsHelper.intersectManifold(i,a,c)){const t=U(this.view.renderCoordsHelper,c,i.origin);n=E(t,i.origin,a,r),s=E(D.max,i.origin,a,r)}else{et.radius=a+r.radius,et.closestPointOnSilhouette(i,c);const t=Math.PI+j(i.direction,c);n=k(t,i.origin,a,r),s=k(D.max,i.origin,a,r)}return e(n+t,o,s)-n}_getPointAbsoluteSurfaceElevation(t,e,i){const{renderCoordsHelper:a}=this.view,r=a.getAltitude(t),o=e+Math.abs(r-e);return a.setAltitude(i,o,t),o}_clampedDistanceToSurface(t,e){const{renderCoordsHelper:i}=this.view,{camera:a}=this.view.state,{direction:r}=F(this.view,e,0,K,tt),o=i.intersectManifoldClosestSilhouette(x(e,r),t,z.get()),n=y(e,o),s=i.intersectManifoldClosestSilhouette(x(e,w(z.get(),e,a.center)),t,z.get()),c=y(e,s);return Math.min(n,c)}_computeHeadingRotateRadius(t){const{renderCoordsHelper:e,state:a}=this.view,{camera:r,isGlobal:o}=a,n=e.intersectManifoldClosestSilhouette(r.ray,this._filteredSurfaceElevation,z.get());if(o){const e=m(z.get(),t,n),a=_(e);d(e,e,1/a);const r=C(z.get(),t),o=i(b(r,e));return a*Math.sin(Math.min(Z,o))}{const i=u(z.get(),t);return e.setAltitude(i,this._filteredSurfaceElevation),y(n,i)}}_minimumAscendVelocity(){return this.view.state.constraints.collision.enabled?0:J}_computeVelocities(t){const i=this._filteredSurfaceElevation,a=i+O(this.view.spatialReference).radius,{camera:r,isGlobal:o}=this.view.state,n=z.get(),s=this._getPointAbsoluteSurfaceElevation(r.eye,i,n),c=this._clampedDistanceToSurface(i,n),l=r.width/2,m=X*r.width,h=X*r.width,p=c*Math.tan(.5*r.fovX)/l,d=p/a,u=p/this._computeHeadingRotateRadius(n),f=s-i;return{pan:(o?d:p)*m*t,ascend:Math.max(this._minimumAscendVelocity()*t,2**(m*t/l)*f-f),zoom:2**(m*t/l)*c-c,rotate:e(u*h,N,Q)*t}}_applyDisabledMovementTypes(t){null==this.disableMovements||void 0!==this.disableMovements.mode&&this.view.state.viewingMode!==this.disableMovements.mode||(t.zoom=this.disableMovements.zoom?0:t.zoom,t.ascend=this.disableMovements.ascend?0:t.ascend,t.pan.enabled=!this.disableMovements.pan,this.disableMovements.pan&&c(t.pan.matrix),t.rotate.enabled=!this.disableMovements.rotate,this.disableMovements.rotate&&c(t.rotate.matrix))}static activatesFor(t,e){const i=B(e,t.navigation.gamepad,L);return!("end"===e.action||I(i))}};t([r({constructOnly:!0})],q.prototype,"gamepadDevice",void 0),t([r({constructOnly:!0})],q.prototype,"disableMovements",void 0),q=t([o("esri.views.3d.state.controllers.GamepadKeyboardController")],q);const L={translation:[0,0,0],heading:0,tilt:0,zoom:0},K=80,Z=a(K),X=.75,J=5,N=a(30),Q=a(80),W={zoom:0,ascend:0,pan:{enabled:!1,matrix:l()},rotate:{enabled:!1,matrix:l()}},Y=S(),$=S(),tt=G(),et=new M;function it(t){t.zoom=0,t.ascend=0,t.pan.enabled=!1,c(t.pan.matrix),t.rotate.enabled=!1,c(t.rotate.matrix)}export{q as GamepadKeyboardController};
|
|
@@ -2,4 +2,4 @@
|
|
|
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
|
|
5
|
+
import e from"../../../../core/PooledArray.js";import{createRenderScreenPointArray3 as t,castRenderScreenPointArray3 as r}from"../../../../core/screenUtils.js";import{getMetersPerVerticalUnitForSR as i}from"../../../../core/units.js";import{i as n,n as s,g as o}from"../../../../chunks/vec32.js";import{create as l}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as a,copy as c,negativeInfinity as u,width as h,height as d,expandPointInPlace as p}from"../../../../geometry/support/aaBoundingRect.js";import{create as m}from"../../../../geometry/support/ray.js";import{sv3d as y}from"../../../../geometry/support/vectorStacks.js";import{getElevationOffsetInMeters as f}from"../../../../support/elevationInfoUtils.js";import{computeMapPointFromVec3d as g}from"../../support/hitTest.js";import{fromRenderAtEye as _,fromScreen as b}from"../../support/geometryUtils/ray.js";import{defaultTolerance as w,Intersector as R}from"../../webgl-engine/lib/Intersector.js";import{isValidIntersectorResult as v}from"../../webgl-engine/lib/IntersectorResult.js";import{sliceFilterPredicate as P}from"../../webgl-engine/lib/intersectorUtils.js";import{HUDMaterial as I}from"../../webgl-engine/materials/HUDMaterial.js";class x{constructor(t,r,i){this.viewingMode=t,this._forEachLayer=r,this._view=i,this._externalIntersectionHandlers=new e,this._tolerance=w,this._tmpRay=m(),this._tmpRegion=a(),this._validateHUDIntersector=new R(this.viewingMode),this._validateHUDIntersector.options.hud=!1}destroy(){this._externalIntersectionHandlers.prune()}intersectScreen(e,t,r){return this.intersectRay(this._getPickRay(e,this._tmpRay),L(this.viewingMode),t,r)}intersectScreenFreePointFallback(e,t,r){return this.intersectRayFreePointFallback(this._getPickRay(e,this._tmpRay),t,r)}intersectRayFreePointFallback(e,t,r){return this.intersectRay(e,L(this.viewingMode),t,r)||this._intersectRayFreePointLocal(e,t)}intersectRay(e,t,r,i){return t.options.selectionMode=!1,t.options.store=0,this.computeIntersection(e,t,!1,i),!!t.results.min&&t.results.min.getIntersectionPoint(r)}getCenterRayWithSubpixelOffset(e,t,r=.5,i=.5){return e.getRenderCenter(T,r,i),T[0]+=.0466,T[1]-=.0123,_(e,T,t)}intersectIntersectorScreen(e,t,r){this.computeIntersection(this._getPickRay(e,this._tmpRay),t,!1,r)}intersectToolIntersectorScreen(e,t,r){const i=this._getPickRay(e,this._tmpRay);this.intersectToolIntersectorRay(i,t,r)}intersectToolIntersectorRay(e,t,r){t.options.selectionMode=!0,this.computeIntersection(e,t,!1,r);const i=t.results.min;!!this._view.basemapTerrain&&this._view.basemapTerrain.opaque||v(i)&&7!==i.intersector||(t.options.selectionMode=!1,this.computeIntersection(e,t,!1,r))}setTolerance(e=w){this._tolerance=e}addIntersectionHandler(e){this._externalIntersectionHandlers.push(e),this._externalIntersectionHandlers.sort((e,t)=>7===e.type?1:7===t.type?-1:0)}removeIntersectionHandler(e){null!=this._externalIntersectionHandlers.removeUnordered(e)&&this._externalIntersectionHandlers.sort((e,t)=>7===e.type?1:7===t.type?-1:0)}_getPickRay(e,t){const r=this._view.state.camera;return b(r,e,t)}_intersectRayFreePointLocal(e,t){return 2!==this.viewingMode||null==e||n(t,e.origin,s(y.get(),e.direction)),!1}intersectElevationFromScreen(e,t,r=0,i=null){return this._intersectElevation(this._getPickRay(e,this._tmpRay),t,r,i)}_intersectElevation(e,t,l=0,a=null){if(null==e)return null;const c=this._view,{renderCoordsHelper:u}=c,h=i(c.spatialReference),d=null!=t?t.mode:"absolute-height",p=f(t)/h,m=("on-the-ground"!==d?p+l:0)*h/u.unitInMeters,{camera:_}=c.state;if("absolute-height"===d){const t=u?.getAltitude(_.eye),r=o(s(E,e.direction),u.worldUpAtPosition(_.eye,F));if(t<m&&r<0||t>=m&&r>0)return null;if(u.intersectInfiniteManifold(e,m,E)){const e=g(c,E);return e.z??=0,e.z-=p,e}return null}const b=_.projectToRenderScreen(e.origin,r(y.get())),w=new V(null,this._forEachLayer),v=c.slice.plane,I=v?P(v):null,x=new R(this.viewingMode);x.options.store=0,x.options.verticalOffset=m,x.options.normalRequired=!1;const j=e.origin,M=n(y.get(),j,e.direction);x.reset(j,M,_),x.point=b;let U=null;if(a&&"type"in a&&"graphics"===a.type){const e=c.allLayerViews.find(e=>e.layer===a)?.uid;U=e?t=>t.layerViewUid===e:null}else a&&(U=e=>e.graphicUid!==a.uid);switch(d){case"relative-to-scene":{const e=e=>(!U||U(e))&&!!e.lastValidElevationBB;x.intersect(w.layers,b,this._tolerance,null,e),this._externalIntersectionHandlers.forAll(e=>{if(2===e.type||7===e.type||8===e.type){const t=e.slicePlaneEnabled?I:null;e.intersect(x,t,x.rayBegin,x.rayEnd,b,!1)}});break}case"on-the-ground":case"relative-to-ground":this._externalIntersectionHandlers.forAll(e=>{if(e.isGround){const t=e.slicePlaneEnabled?I:null;e.intersect(x,t,x.rayBegin,x.rayEnd,b,!1)}})}if(x.results.min.getIntersectionPoint(E)){const e=g(c,E);return e.z=l,e}return null}computeIntersection(e,t,i,s){if(null==e)return;const o=this._view.state.camera,l=o.projectToRenderScreen(e.origin,r(y.get())),a=new V(s,this._forEachLayer);t.options.selectOpaqueTerrainOnly=!s||!("include"in s||"exclude"in s);const c=e.origin,u=n(y.get(),e.origin,e.direction);t.reset(c,u,o),t.intersect(a.layers,l,this._tolerance);const h=this._view.slice.plane,d=null!=h?P(h):null;t.intersect(a.sliceableLayers,l,this._tolerance,d);const p=s&&(s.requiresGroundFeedback||s.enableDraped);this._externalIntersectionHandlers.forAll(e=>{const r=e.layerViewUid,n=e.sublayerId,s=Array.isArray(r),o=s?r:[r];s&&(t.options.filteredLayerViewUids=[]);let h=!1;for(const i of o)a.filterLayerViewUid(i,n)?h=!0:s&&t.options.filteredLayerViewUids.push(i);if(t.options.isFiltered=!h,e.isGround&&p||!t.options.isFiltered){const r=e.slicePlaneEnabled?d:null;e.intersect(t,r,c,u,l,i)}});const m=y.get(),f=this._view,g=f.basemapTerrain;if(s&&s.enableDraped&&null!=g.spatialReference&&t.results.ground.getIntersectionPoint(m)){const e=f.overlayManager.renderer,r=f.renderCoordsHelper.spatialReference,i=y.get();f.renderCoordsHelper.fromRenderCoords(m,i,g.spatialReference),i[2]=f.elevationProvider?.getElevation(m[0],m[1],m[2],r,"ground")??0,e.intersect(t,i,t.results.ground,e=>a.filterRenderGeometry(e))}t.sortResults(),this._processHUDResults(t)}_processHUDResults(e){const t=e.results.hud;c(this._tmpRegion,u);const r=this._view.state.camera,i=[],n=this._tmpRegion,s=e=>{const t=new U(e),s=t.result.target.object.geometries.every(e=>e.material instanceof I&&e.material.parameters.useVisibilityPixel);i.push({item:t,useVisibilityPixel:s}),s&&(r.projectToRenderScreen(e.target.center,t.screenPoint),t.screenPoint[0]=Math.floor(t.screenPoint[0]),t.screenPoint[1]=Math.floor(t.screenPoint[1]),p(n,t.screenPoint))};e.sortResults(t.all),null!=t.min.distance&&s(t.min);for(const c of t.all)t.min.target.object!==c.target.object&&t.max.target.object!==c.target.object&&s(c);if(null!=t.max.distance&&t.max.target.object!==t.min.target.object&&s(t.max),!i.length)return;n[0]===n[2]&&(n[2]+=1),n[1]===n[3]&&(n[3]+=1);const o=r.fullWidth,l=r.fullHeight,a=Math.max(0,n[0]-j),m=Math.max(0,n[1]-j),y=Math.min(h(n)+2*j,o-a),f=Math.min(d(n)+2*j,l-m),g=y>0&&f>0?new Uint8Array(y*f*4):null;g&&this._view.stage.renderer.readHUDVisibility(a,m,y,f,g);let _=!0;const b=null==e.results.max.distance;let w=0;for(const{item:c,useVisibilityPixel:u}of i){let t=!u;if(u&&g)for(const e of M){const r=4*(Math.min(c.screenPoint[0]+e[0],o)-n[0]+(Math.min(c.screenPoint[1]+e[1],l)-n[1])*y);if(r>=0&&r<g.length&&g[r]){t=!0;break}}t&&(_&&(e.results.min.copy(c.result),_=!1),b&&e.results.max.copy(c.result),2===e.options.store&&e.results.all.splice(w++,0,c.result))}}}const j=1,M=(()=>{const e=[],t=j;for(let r=-t;r<=t;r++)for(let i=-t;i<=t;i++)e.push([i+t,r+t]);return e})();class U{constructor(e){this.result=e,this.screenPoint=t()}}let H;function L(e){return H&&H.viewingMode===e||(H=new R(e)),H}class V{constructor(e,t){this.layers=new Array,this.sliceableLayers=new Array,this.include=e?.include,this.exclude=e?.exclude,t(e=>{e.pickable&&this.filterLayerViewUid(e.apiLayerViewUid)&&(e.sliceable?this.sliceableLayers:this.layers).push(e)})}filterLayerViewUid(e,t){const{include:r,exclude:i}=this;if(null==e)return null==r&&null==i;const n=r instanceof Map?r.get(e)??!1:r?.has(e),s=i instanceof Map?i.get(e)??!1:i?.has(e);return(null==n||("boolean"==typeof n?n:null!=t&&n.has(t)))&&(null==s||!("boolean"==typeof s?s:null!=t&&s.has(t)))}filterRenderGeometry(e){return this.filterLayerViewUid(e.layerViewUid)}}function k(e){return"object"==typeof e&&"intersect"in e}const E=l(),F=l(),T=t();export{x as SceneIntersectionHelper,k as isIntersectionHandler};
|
|
@@ -2,4 +2,4 @@
|
|
|
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{
|
|
5
|
+
import{lerp as t}from"../../../core/mathUtils.js";import{invert as e}from"../../../core/libs/gl-matrix-2/math/mat4.js";import{create as i}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{i as r,j as n,C as o,p as s,h as a,g as c}from"../../../chunks/vec32.js";import{create as l}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as p}from"../../../geometry/ellipsoidUtils.js";import{computeTranslationToOriginAndRotation as h}from"../../../geometry/projection/computeTranslationToOriginAndRotation.js";import{projectBoundingRect as d}from"../../../geometry/projection/projectBoundingRect.js";import{projectVectorToVector as _}from"../../../geometry/projection/projectVectorToVector.js";import{empty as m,create as g,expandWithVec3 as x}from"../../../geometry/support/aaBoundingBox.js";import{center as u,create as f}from"../../../geometry/support/aaBoundingRect.js";import{fromPoints as y,create as j}from"../../../geometry/support/lineSegment.js";import{create as R,fromVectorsAndPoint as b,copy as S,negate as C,signedDistance as B}from"../../../geometry/support/plane.js";import{wrap as H}from"../../../geometry/support/ray.js";import{frustumLineSegment as w}from"./intersectionUtils.js";const M=.5*Math.PI,A=M/Math.PI*180;class G{constructor(t){this._extent=new Array(4),this._planes=new Array(6),this._maxSpan=0,this._center={origin:l(),direction:l()},this._renderCoordsHelper=t.renderCoordsHelper;for(let e=0;e<4;e++)this._extent[e]={origin:l(),direction:l(),cap:{next:null,direction:l()}},this._planes[e]=R();this._planes[4]=R(),this._planes[5]=R(),this._planesWithoutFar=this._planes.slice(0,5)}update(t,e,i,s=!0){const a=this._extent;this._toRenderBoundingExtent(t,e,i),r(this._center.origin,a[0].origin,a[2].origin),n(this._center.origin,this._center.origin,.5),this._renderCoordsHelper.worldUpAtPosition(this._center.origin,this._center.direction),s||n(this._center.direction,this._center.direction,-1);for(let r=0;r<4;r++){const t=a[r];this._renderCoordsHelper.worldUpAtPosition(t.origin,t.direction);const e=a[3===r?0:r+1];t.cap.next=e.origin,o(t.cap.direction,t.origin,e.origin),b(t.direction,t.cap.direction,t.origin,this._planes[r]),s||n(t.direction,t.direction,-1)}b(a[0].cap.direction,a[1].cap.direction,a[0].origin,this._planes[4]),s?C(this._planes[4],this._planes[5]):(S(this._planes[5],this._planes[4]),C(this._planes[4],this._planes[4])),this._maxSpan=Math.max(Math.abs(t[0]-t[2]),Math.abs(t[1]-t[3])),this._maxSpanSpatialReference=e,this._minGlobalAltitude=.9*p(this._maxSpanSpatialReference).radius}isVisibleInFrustum(t,e,i=!1){if(null==t)return!1;if(1===this._renderCoordsHelper.viewingMode){const i=this._maxSpanSpatialReference.isGeographic?A:M*e;if(this._maxSpan>i)return!0;if(null!=t.altitude&&t.altitude>=this._minGlobalAltitude)return this._isVisibleInFrustumGlobal(t)}if(0===this._maxSpan){const e=this._extent[0];return!(i||!t.intersectsRay(H(e.origin,e.direction)))}for(let n=0;n<this._extent.length;n++){const e=this._extent[n];if(!i&&t.intersectsRay(H(e.origin,e.direction)))return!0;if(t.intersectsLineSegment(y(e.origin,e.cap.next,P),e.cap.direction))return!0}const r=i?this._planes:this._planesWithoutFar;for(let n=0;n<t.lines.length;n++){const e=t.lines[n];if(w(r,e.origin,e.endpoint,e.direction))return!0}return!1}_toRenderBoundingExtentGlobal(i,r,n){const o=5;u(i,v),v[2]=n,h(r,v,F,this._renderCoordsHelper.spatialReference),e(I,F),m(U);for(const{x0:e,x1:a,y0:c,y1:l}of E)for(let p=0;p<o;p++){const h=p/(o-1);v[0]=t(i[e],i[a],h),v[1]=t(i[c],i[l],h),v[2]=n,_(v,r,v,this._renderCoordsHelper.spatialReference),s(v,v,I),x(U,v)}a(this._extent[0].origin,U[0],U[1],U[2]),a(this._extent[1].origin,U[3],U[1],U[2]),a(this._extent[2].origin,U[3],U[4],U[2]),a(this._extent[3].origin,U[0],U[4],U[2]);for(let t=0;t<4;++t)s(this._extent[t].origin,this._extent[t].origin,F)}_toRenderBoundingExtentLocal(t,e,i){d(t,e,V,this._renderCoordsHelper.spatialReference),a(this._extent[0].origin,V[0],V[1],i),a(this._extent[1].origin,V[2],V[1],i),a(this._extent[2].origin,V[2],V[3],i),a(this._extent[3].origin,V[0],V[3],i)}_toRenderBoundingExtent(t,e,i){switch(this._renderCoordsHelper.viewingMode){case 1:this._toRenderBoundingExtentGlobal(t,e,i);break;case 2:this._toRenderBoundingExtentLocal(t,e,i);break;default:this._renderCoordsHelper.viewingMode}}_isVisibleInFrustumGlobal(t){if(B(t.planes[4],this._center.origin)<0&&c(this._center.direction,t.direction)<0)return!0;for(let e=0;e<4;e++){const i=this._extent[e];if(B(t.planes[4],i.origin)<0&&c(i.direction,t.direction)<0)return!0}return!1}}const E=[{x0:0,y0:1,x1:2,y1:1},{x0:0,y0:3,x1:2,y1:3},{x0:0,y0:1,x1:0,y1:3},{x0:2,y0:1,x1:2,y1:3}],v=l(),F=i(),I=i(),U=g(),V=f(),P=j();export{G as FrustumExtentIntersection};
|
|
@@ -2,4 +2,4 @@
|
|
|
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 has from"../../../core/has.js";import{Milliseconds as e}from"../../../core/time.js";function a(e){return
|
|
5
|
+
import has from"../../../core/has.js";import{Milliseconds as e}from"../../../core/time.js";function a(e){return l[e]}function o(){return has("esri-iPhone")?"low":"medium"}const i={reset(){const e=m();for(const a of Object.keys(e))l[a]=e[a]}},t={IPhone12Pro:120,GalaxyS20:200,FullHD:240,SurfacePro7:300,FullHDRetina:430},l=m();function m(){const a=!!has("esri-mobile"),o=!!has("ios"),i=e(400);return{low:{graphics3D:{maxTotalNumberOfFeatures:5e4,maxNumberOfDrawCalls:8e3,maxTotalNumberOfVertices:255e4,polygonLodFactor:.5,polylineLodFactor:1,snapshotAvailable:!1,skipHighSymbolLods:!0},heatmap:{pixelRatio:.125},sceneService:{objectLoDFactor:.2,pointLoDFactor:1,meshLoDFactor:.6,pointCloudLoDFactor:.5},gaussianSplat:{minimumSplatPixelRadius:2,minimumOpacity:0,maximumNumberOfGaussians:1e6},flow:{maxTotalNumberOfStreamlines:25e3,maxTracingResolution:1024},tiledSurface:{lodBias:-1,angledSplitBias:.5,vtlContentZoom:.75,elevationLevelDelta:3,reduceTileLevelDifferences:!0},fadeDuration:e(0),physicallyBasedRenderingEnabled:!1,maxTexturePixels:a?1048576:4194304,memoryLimit:200+t.IPhone12Pro,additionalCacheMemory:0,frameRate:0,maximumPixelRatio:1},medium:{graphics3D:{maxTotalNumberOfFeatures:15e4,maxNumberOfDrawCalls:17e3,maxTotalNumberOfVertices:625e4,polygonLodFactor:a?.8:1,polylineLodFactor:a?1.2:1.5,snapshotAvailable:!o,skipHighSymbolLods:!1},heatmap:{pixelRatio:.25},sceneService:{objectLoDFactor:1,pointLoDFactor:1,meshLoDFactor:1,pointCloudLoDFactor:1},gaussianSplat:{minimumSplatPixelRadius:1,minimumOpacity:1,maximumNumberOfGaussians:2e6},flow:{maxTotalNumberOfStreamlines:1e5,maxTracingResolution:2048},tiledSurface:{lodBias:0,angledSplitBias:1,vtlContentZoom:1.5,elevationLevelDelta:3,reduceTileLevelDifferences:!0},fadeDuration:i,physicallyBasedRenderingEnabled:!0,maxTexturePixels:a?4194304:4096**2,memoryLimit:a?600+t.GalaxyS20:750+t.FullHD,additionalCacheMemory:a?-100:150,frameRate:0,maximumPixelRatio:1},high:{graphics3D:{maxTotalNumberOfFeatures:3e5,maxNumberOfDrawCalls:17e3,maxTotalNumberOfVertices:125e5,polygonLodFactor:a?1.2:2,polylineLodFactor:a?1.2:2,snapshotAvailable:!o,skipHighSymbolLods:!1},heatmap:{pixelRatio:.5},sceneService:{objectLoDFactor:1,pointLoDFactor:1,meshLoDFactor:1,pointCloudLoDFactor:1},gaussianSplat:{minimumSplatPixelRadius:.5,minimumOpacity:2,maximumNumberOfGaussians:8e6},flow:{maxTotalNumberOfStreamlines:1e5,maxTracingResolution:2048},tiledSurface:{lodBias:0,angledSplitBias:1,vtlContentZoom:1.5,elevationLevelDelta:2,reduceTileLevelDifferences:!0},fadeDuration:i,physicallyBasedRenderingEnabled:!0,maxTexturePixels:a?4096**2:1/0,memoryLimit:a?900+t.SurfacePro7:1500+t.FullHDRetina,additionalCacheMemory:a?-150:0,frameRate:0,maximumPixelRatio:a?1:1/0}}}export{i as QualityProfileTest,o as getDefaultQualityProfileName,a as getQualityProfileSettings};
|
|
@@ -2,4 +2,4 @@
|
|
|
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{__decorate as t}from"tslib";import e from"../../../core/Accessor.js";import{Milliseconds as o}from"../../../core/time.js";import{property as i,subclass as s}from"../../../core/accessorSupport/decorators.js";let r=class extends e{constructor(t={}){super(t),this.minTotalNumberOfFeatures=2e3,this.maxTotalNumberOfFeatures=5e4,this.maxNumberOfDrawCalls=17e3,this.maxTotalNumberOfVertices=17e5,this.snapshotAvailable=!0,this.polygonLodFactor=1,this.polylineLodFactor=1,this.skipHighSymbolLods=!1}};t([i()],r.prototype,"maxTotalNumberOfFeatures",void 0),t([i()],r.prototype,"maxNumberOfDrawCalls",void 0),t([i()],r.prototype,"maxTotalNumberOfVertices",void 0),t([i()],r.prototype,"snapshotAvailable",void 0),t([i()],r.prototype,"polygonLodFactor",void 0),t([i()],r.prototype,"polylineLodFactor",void 0),t([i()],r.prototype,"skipHighSymbolLods",void 0),r=t([s("esri.views.3d.support.QualitySettings.Graphics3DSettings")],r);let p=class extends e{constructor(t={}){super(t),this.objectLoDFactor=1,this.pointLoDFactor=1,this.meshLoDFactor=1,this.pointCloudLoDFactor=1}};t([i()],p.prototype,"objectLoDFactor",void 0),t([i()],p.prototype,"pointLoDFactor",void 0),t([i()],p.prototype,"meshLoDFactor",void 0),t([i()],p.prototype,"pointCloudLoDFactor",void 0),p=t([s("esri.views.3d.support.QualitySettings.SceneServiceSettings")],p);let a=class extends e{constructor(t={}){super(t),this.lodBias=0,this.angledSplitBias=1,this.vtlContentZoom=1,this.elevationLevelDelta=3,this.reduceTileLevelDifferences=!0}};t([i()],a.prototype,"lodBias",void 0),t([i()],a.prototype,"angledSplitBias",void 0),t([i()],a.prototype,"vtlContentZoom",void 0),t([i()],a.prototype,"elevationLevelDelta",void 0),t([i()],a.prototype,"reduceTileLevelDifferences",void 0),a=t([s("esri.views.3d.support.QualitySettings.TiledSurfaceSettings")],a);let l=class extends e{constructor(t={}){super(t),this.minimumSplatPixelRadius=1,this.minimumOpacity=1,this.
|
|
5
|
+
import{__decorate as t}from"tslib";import e from"../../../core/Accessor.js";import{Milliseconds as o}from"../../../core/time.js";import{property as i,subclass as s}from"../../../core/accessorSupport/decorators.js";let r=class extends e{constructor(t={}){super(t),this.minTotalNumberOfFeatures=2e3,this.maxTotalNumberOfFeatures=5e4,this.maxNumberOfDrawCalls=17e3,this.maxTotalNumberOfVertices=17e5,this.snapshotAvailable=!0,this.polygonLodFactor=1,this.polylineLodFactor=1,this.skipHighSymbolLods=!1}};t([i()],r.prototype,"maxTotalNumberOfFeatures",void 0),t([i()],r.prototype,"maxNumberOfDrawCalls",void 0),t([i()],r.prototype,"maxTotalNumberOfVertices",void 0),t([i()],r.prototype,"snapshotAvailable",void 0),t([i()],r.prototype,"polygonLodFactor",void 0),t([i()],r.prototype,"polylineLodFactor",void 0),t([i()],r.prototype,"skipHighSymbolLods",void 0),r=t([s("esri.views.3d.support.QualitySettings.Graphics3DSettings")],r);let p=class extends e{constructor(t={}){super(t),this.objectLoDFactor=1,this.pointLoDFactor=1,this.meshLoDFactor=1,this.pointCloudLoDFactor=1}};t([i()],p.prototype,"objectLoDFactor",void 0),t([i()],p.prototype,"pointLoDFactor",void 0),t([i()],p.prototype,"meshLoDFactor",void 0),t([i()],p.prototype,"pointCloudLoDFactor",void 0),p=t([s("esri.views.3d.support.QualitySettings.SceneServiceSettings")],p);let a=class extends e{constructor(t={}){super(t),this.lodBias=0,this.angledSplitBias=1,this.vtlContentZoom=1,this.elevationLevelDelta=3,this.reduceTileLevelDifferences=!0}};t([i()],a.prototype,"lodBias",void 0),t([i()],a.prototype,"angledSplitBias",void 0),t([i()],a.prototype,"vtlContentZoom",void 0),t([i()],a.prototype,"elevationLevelDelta",void 0),t([i()],a.prototype,"reduceTileLevelDifferences",void 0),a=t([s("esri.views.3d.support.QualitySettings.TiledSurfaceSettings")],a);let l=class extends e{constructor(t={}){super(t),this.minimumSplatPixelRadius=1,this.minimumOpacity=1,this.maximumNumberOfGaussians=8e6}};t([i()],l.prototype,"minimumSplatPixelRadius",void 0),t([i()],l.prototype,"minimumOpacity",void 0),t([i()],l.prototype,"maximumNumberOfGaussians",void 0),l=t([s("esri.views.3d.support.QualitySettings.GaussianSplatSettings")],l);let d=class extends e{constructor(t={}){super(t),this.pixelRatio=1}};t([i()],d.prototype,"pixelRatio",void 0),d=t([s("esri.views.3d.support.QualitySettings.HeatmapSettings")],d);let n=class extends e{constructor(){super(...arguments),this.maxTotalNumberOfStreamlines=1e5,this.maxTracingResolution=2048}};t([i()],n.prototype,"maxTotalNumberOfStreamlines",void 0),t([i()],n.prototype,"maxTracingResolution",void 0),n=t([s("esri.views.3d.support.QualitySettings.FlowSettings")],n);let m=class extends e{constructor(t){super(t),this.graphics3D=new r,this.sceneService=new p,this.tiledSurface=new a,this.gaussianSplat=new l,this.heatmap=new d,this.flow=new n,this.fadeDuration=o(400),this.physicallyBasedRenderingEnabled=!1,this.glow=!1,this.maxTexturePixels=1/0,this.memoryLimit=750,this.additionalCacheMemory=0,this.frameRate=0,this.maximumPixelRatio=1/0}};t([i({type:r})],m.prototype,"graphics3D",void 0),t([i({type:p})],m.prototype,"sceneService",void 0),t([i({type:a})],m.prototype,"tiledSurface",void 0),t([i({type:l})],m.prototype,"gaussianSplat",void 0),t([i({type:d})],m.prototype,"heatmap",void 0),t([i({type:n})],m.prototype,"flow",void 0),t([i()],m.prototype,"fadeDuration",void 0),t([i()],m.prototype,"physicallyBasedRenderingEnabled",void 0),t([i()],m.prototype,"glow",void 0),t([i()],m.prototype,"maxTexturePixels",void 0),t([i()],m.prototype,"memoryLimit",void 0),t([i()],m.prototype,"additionalCacheMemory",void 0),t([i()],m.prototype,"frameRate",void 0),t([i()],m.prototype,"maximumPixelRatio",void 0),m=t([s("esri.views.3d.support.QualitySettings")],m);const u=m;export{u as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
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
|
|
5
|
+
import{DataType as e}from"../../../webgl/enums.js";import{VertexElementDescriptor as r}from"../../../webgl/VertexElementDescriptor.js";function t(e,t=0){const o=e.stride;return Array.from(e.fields.keys()).map(s=>{const u=e.fields.get(s),c=u.constructor.ElementCount,i=n(u.constructor.ElementType),a=u.offset,f=u.optional?.glNormalized??!1,l=u.optional?.integer??!1;return new r(s,c,i,a,o,f,t,l)})}function n(r){switch(r){case"u8":return e.UNSIGNED_BYTE;case"u16":return e.UNSIGNED_SHORT;case"u32":return e.UNSIGNED_INT;case"i8":return e.BYTE;case"i16":return e.SHORT;case"i32":return e.INT;case"f16":return e.HALF_FLOAT;case"f32":return e.FLOAT;default:throw new Error("BufferType not supported in WebGL")}}export{t as glLayout};
|
|
@@ -2,4 +2,4 @@
|
|
|
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
|
|
5
|
+
import{freeze as t}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{ManagedTexture as r}from"../../webgl-engine/lib/ManagedTexture.js";import{SizedPixelFormat as n,PixelType as e}from"../../../webgl/enums.js";const a=128,o=.5,u=t(o/2,o/2,1-o/2,1-o/2);function c(t){return"cross"===t||"x"===t}function s(t,n=a,e=n*o,u=0){const{data:c,parameters:s}=i(t,n,e,u);return new r(c,s)}function i(t,r=a,u=r*o,c=0){return{data:f(t,r,u,c),parameters:{mipmap:!1,wrap:{s:33071,t:33071},width:r,height:r,noUnpackFlip:!0,dataType:e.FLOAT,pixelFormat:6403,internalFormat:n.R16F,reloadable:!0}}}function f(t,r=a,n=r*o,e=0){switch(t){case"circle":default:return h(r,n);case"square":return M(r,n);case"cross":return m(r,n,e);case"x":return p(r,n,e);case"kite":return l(r,n);case"triangle":return b(r,n);case"arrow":return x(r,n)}}function h(t,r){const n=t/2-.5;return R(t,d(n,n,r/2))}function M(t,r){return T(t,r,!1)}function l(t,r){return T(t,r,!0)}function m(t,r,n=0){return w(t,r,!1,n)}function p(t,r,n=0){return w(t,r,!0,n)}function b(t,r){return R(t,g(t/2,r,r/2))}function x(t,r){const n=r,e=r/2,a=t/2,o=.8*n,u=d(a,(t-r)/2-o,Math.sqrt(o*o+e*e)),c=g(a,n,e);return R(t,(t,r)=>Math.max(c(t,r),-u(t,r)))}function T(t,r,n){return n&&(r/=Math.SQRT2),R(t,(e,a)=>{let o=e-.5*t+.25,u=.5*t-a-.75;if(n){const t=(o+u)/Math.SQRT2;u=(u-o)/Math.SQRT2,o=t}return Math.max(Math.abs(o),Math.abs(u))-.5*r})}function w(t,r,n,e=0){r-=e,n&&(r*=Math.SQRT2);const a=.5*r;return R(t,(r,o)=>{let u,c=r-.5*t,s=.5*t-o-1;if(n){const t=(c+s)/Math.SQRT2;s=(s-c)/Math.SQRT2,c=t}return c=Math.abs(c),s=Math.abs(s),u=c>s?c>a?Math.sqrt((c-a)*(c-a)+s*s):s:s>a?Math.sqrt(c*c+(s-a)*(s-a)):c,u-=e/2,u})}function d(t,r,n){return(e,a)=>{const o=e-t,u=a-r;return Math.sqrt(o*o+u*u)-n}}function g(t,r,n){const e=Math.sqrt(r*r+n*n);return(a,o)=>{const u=Math.abs(a-t)-n,c=o-t+r/2+.75,s=(r*u+n*c)/e,i=-c;return Math.max(s,i)}}function R(t,r){const n=new Float32Array(t*t);for(let e=0;e<t;e++)for(let a=0;a<t;a++){n[a+t*e]=r(a,e)/t}return n}export{x as createArrow,h as createCircle,m as createCross,l as createKite,f as createPrimitive,M as createSquare,s as createTexture,i as createTextureInfo,b as createTriangle,p as createX,u as defaultBoundingBox,o as defaultSymbolSizeRatio,a as defaultTexSize,c as requiresHalfTexelOffset};
|
|
@@ -2,4 +2,4 @@
|
|
|
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{reallocGrowthFactor as e}from"../../../../core/arrayUtils.js";import{signal as r}from"../../../../core/signal.js";import{n as t}from"../../../../chunks/vec32.js";import{create as s}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{intersectsSphere as i}from"../../../../geometry/support/frustum.js";import{Sphere as n}from"../../../../geometry/support/sphere.js";import{makeScheduleFunction as a}from"../../layers/support/makeScheduleFunction.js";import{GaussianSplatSortWorkerHandle as o}from"../GaussianSplatWorkerHandle.js";import{GaussianSplatFadeTexture as u}from"./GaussianSplatFadeTexture.js";import{GaussianSplatOrderTexture as h}from"./GaussianSplatOrderTexture.js";import{GaussianSplatTextureAtlas as d}from"./GaussianSplatTextureAtlas.js";class l{constructor(e){this._updating=r(!1),this._useDeterministicSort=!1,this.visibleGaussians=0,this._visibleGaussianTiles=new Array,this._workerHandle=null,this._isSorting=!1,this._pendingSortTask=!1,this._bufferCapacity=0,this._minimumBoundingSphere=new n,this._cameraDirectionNormalized=s(),this._renderer=e,this._orderTexture=new h(this._renderer.renderingContext),this._fadingTexture=new u(this._renderer.renderingContext),this._textureAtlas=new d(this._renderer.renderingContext,this._renderer.view.resourceController.memoryController,this._renderer.fboCache);const{resourceController:t}=this._renderer.view;this._workerHandle=new o(a(t))}get textureAtlas(){return this._textureAtlas}get orderTexture(){return this._orderTexture}get fadingTexture(){return this._fadingTexture}get visibleGaussianTiles(){return this._visibleGaussianTiles}updateGaussianVisibility(e){this._visibleGaussianTiles=e,this.requestSort()}isUpdating(){return this._updating.value}destroy(){this._pendingSortTask=!1,this._workerHandle?.destroyWorkerAndSelf(),this._textureAtlas.destroy(),this._orderTexture.destroy(),this._fadingTexture.destroy()}requestSort(){this._updating.value=!0,this._isSorting?this._pendingSortTask=!0:(this._isSorting=!0,this._pendingSortTask=!1,this._sortOnWorker().then(()=>this._handleSortComplete()).catch(()=>this._handleSortComplete()))}_handleSortComplete(){this._isSorting=!1,this._pendingSortTask?this.requestSort():this._updating.value=!1}_clearBuffersAndTextures(){this._bufferCapacity=0,this._orderTexture.clear(),this._textureAtlas.clear()}_ensureBufferCapacity(r){if(this._bufferCapacity<r){const t=Math.ceil(r*e);this._atlasIndicesBuffer=new Uint32Array(t),this._sortedAtlasIndicesBuffer=new Uint32Array(t),this._distancesBuffer=new Float64Array(t),this._sortOrderBuffer=new Uint32Array(t),this._bufferCapacity=t}}async _sortOnWorker(){if(0===this._visibleGaussianTiles.length)return this.visibleGaussians=0,this._clearBuffersAndTextures(),void this._renderer.requestRender(1);this._useDeterministicSort&&this._visibleGaussianTiles.sort((e,r)=>e.obb.centerX-r.obb.centerX||e.obb.centerY-r.obb.centerY||e.obb.centerZ-r.obb.centerZ);let e=this._visibleGaussianTiles.reduce((e,r)=>e+r.gaussianAtlasIndices.length,0);this._ensureBufferCapacity(e),this._textureAtlas.ensureTextureAtlas();const{frustum:r}=this._renderer.camera;t(this._cameraDirectionNormalized,this._renderer.camera.ray.direction);const s=this._cameraDirectionNormalized[0],n=this._cameraDirectionNormalized[1],a=this._cameraDirectionNormalized[2];let o=0;if(this._visibleGaussianTiles.forEach(t=>{const{gaussianAtlasIndices:u,positions:h}=t;if(this._minimumBoundingSphere.center=t.obb.center,this._minimumBoundingSphere.radius=t.obb.radius+t.maxScale,i(r,this._minimumBoundingSphere))for(let e=0;e<u.length;e++){this._atlasIndicesBuffer[o]=u[e];const r=3*e,t=h[r],i=h[r+1],d=h[r+2];this._distancesBuffer[o]=t*s+i*n+d*a,this._sortOrderBuffer[o]=o,o++}else e-=u.length}),0===e)return this.visibleGaussians=0,this._clearBuffersAndTextures(),void this._renderer.requestRender(1);const u={distances:this._distancesBuffer,sortOrderIndices:this._sortOrderBuffer,numGaussians:e,preciseSort:this._useDeterministicSort};await(this._workerHandle?.sort(u).then(r=>{this._distancesBuffer=r.distances,this._sortOrderBuffer=r.sortedOrderIndices;const t=this._sortedAtlasIndicesBuffer.subarray(0,e);for(let
|
|
5
|
+
import{reallocGrowthFactor as e}from"../../../../core/arrayUtils.js";import{signal as r}from"../../../../core/signal.js";import{n as t}from"../../../../chunks/vec32.js";import{create as s}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{intersectsSphere as i}from"../../../../geometry/support/frustum.js";import{Sphere as n}from"../../../../geometry/support/sphere.js";import{makeScheduleFunction as a}from"../../layers/support/makeScheduleFunction.js";import{GaussianSplatSortWorkerHandle as o}from"../GaussianSplatWorkerHandle.js";import{GaussianSplatFadeTexture as u}from"./GaussianSplatFadeTexture.js";import{GaussianSplatOrderTexture as h}from"./GaussianSplatOrderTexture.js";import{GaussianSplatTextureAtlas as d}from"./GaussianSplatTextureAtlas.js";class l{constructor(e){this._updating=r(!1),this._useDeterministicSort=!1,this.visibleGaussians=0,this._visibleGaussianTiles=new Array,this._workerHandle=null,this._isSorting=!1,this._pendingSortTask=!1,this._bufferCapacity=0,this._minimumBoundingSphere=new n,this._cameraDirectionNormalized=s(),this._renderer=e,this._orderTexture=new h(this._renderer.renderingContext),this._fadingTexture=new u(this._renderer.renderingContext),this._textureAtlas=new d(this._renderer.renderingContext,this._renderer.view.resourceController.memoryController,this._renderer.fboCache);const{resourceController:t}=this._renderer.view;this._workerHandle=new o(a(t))}get textureAtlas(){return this._textureAtlas}get orderTexture(){return this._orderTexture}get fadingTexture(){return this._fadingTexture}get visibleGaussianTiles(){return this._visibleGaussianTiles}updateGaussianVisibility(e){this._visibleGaussianTiles=e,this.requestSort()}isUpdating(){return this._updating.value}destroy(){this._pendingSortTask=!1,this._workerHandle?.destroyWorkerAndSelf(),this._textureAtlas.destroy(),this._orderTexture.destroy(),this._fadingTexture.destroy()}requestSort(){this._updating.value=!0,this._isSorting?this._pendingSortTask=!0:(this._isSorting=!0,this._pendingSortTask=!1,this._sortOnWorker().then(()=>this._handleSortComplete()).catch(()=>this._handleSortComplete()))}_handleSortComplete(){this._isSorting=!1,this._pendingSortTask?this.requestSort():this._updating.value=!1}_clearBuffersAndTextures(){this._bufferCapacity=0,this._orderTexture.clear(),this._textureAtlas.clear()}_ensureBufferCapacity(r){if(this._bufferCapacity<r){const t=Math.ceil(r*e);this._atlasIndicesBuffer=new Uint32Array(t),this._sortedAtlasIndicesBuffer=new Uint32Array(t),this._distancesBuffer=new Float64Array(t),this._sortOrderBuffer=new Uint32Array(t),this._bufferCapacity=t}}async _sortOnWorker(){if(0===this._visibleGaussianTiles.length)return this.visibleGaussians=0,this._clearBuffersAndTextures(),void this._renderer.requestRender(1);this._useDeterministicSort&&this._visibleGaussianTiles.sort((e,r)=>e.obb.centerX-r.obb.centerX||e.obb.centerY-r.obb.centerY||e.obb.centerZ-r.obb.centerZ);let e=this._visibleGaussianTiles.reduce((e,r)=>e+r.gaussianAtlasIndices.length,0);this._ensureBufferCapacity(e),this._textureAtlas.ensureTextureAtlas();const{frustum:r}=this._renderer.camera;t(this._cameraDirectionNormalized,this._renderer.camera.ray.direction);const s=this._cameraDirectionNormalized[0],n=this._cameraDirectionNormalized[1],a=this._cameraDirectionNormalized[2];let o=0;if(this._visibleGaussianTiles.forEach(t=>{const{gaussianAtlasIndices:u,positions:h}=t;if(this._minimumBoundingSphere.center=t.obb.center,this._minimumBoundingSphere.radius=t.obb.radius+t.maxScale,i(r,this._minimumBoundingSphere))for(let e=0;e<u.length;e++){this._atlasIndicesBuffer[o]=u[e];const r=3*e,t=h[r],i=h[r+1],d=h[r+2];this._distancesBuffer[o]=t*s+i*n+d*a,this._sortOrderBuffer[o]=o,o++}else e-=u.length}),0===e)return this.visibleGaussians=0,this._clearBuffersAndTextures(),void this._renderer.requestRender(1);const u={distances:this._distancesBuffer,sortOrderIndices:this._sortOrderBuffer,numGaussians:e,preciseSort:this._useDeterministicSort};await(this._workerHandle?.sort(u).then(r=>{this._distancesBuffer=r.distances,this._sortOrderBuffer=r.sortedOrderIndices;const t=this._sortedAtlasIndicesBuffer.subarray(0,e);for(let s=0;s<e;s++)t[s]=this._atlasIndicesBuffer[r.sortedOrderIndices[s]];this._orderTexture.setData(t,e),this.visibleGaussians=e,this._renderer.requestRender(1)}))}set useDeterministicSort(e){this._useDeterministicSort=e}}export{l as GaussianSplatDataStore};
|
|
@@ -2,4 +2,4 @@
|
|
|
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{reallocGrowthFactor as e}from"../../../../core/arrayUtils.js";import{fromValues as t}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import"../../../webgl/BufferObject.js";import"../../../webgl/FramebufferObject.js";import"../../../webgl/Program.js";import"../../../../core/has.js";import"../../../webgl/Renderbuffer.js";import r from"../../../webgl/Texture.js";import"../../../../core/Logger.js";import{PixelType as i,SizedPixelFormat as s}from"../../../webgl/enums.js";import"../../../webgl/Util.js";import{
|
|
5
|
+
import{reallocGrowthFactor as e}from"../../../../core/arrayUtils.js";import{fromValues as t}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import"../../../webgl/BufferObject.js";import"../../../webgl/FramebufferObject.js";import"../../../webgl/Program.js";import"../../../../core/has.js";import"../../../webgl/Renderbuffer.js";import r from"../../../webgl/Texture.js";import"../../../../core/Logger.js";import{PixelType as i,SizedPixelFormat as s}from"../../../webgl/enums.js";import"../../../webgl/Util.js";import{initialSplatAtlasTexturePages as a}from"./GaussianSplatAtlasPages.js";import{TextureDescriptor as o}from"../../../webgl/TextureDescriptor.js";class u{constructor(e){this.texture=null,this._fadeTextureCapacity=0,this._rctx=e}ensureCapacity(t){if(this._fadeTextureCapacity>t)return;const u=Math.max(Math.ceil(t*e),a),[f,p]=this._evalTextureSize(u),c=f*p,h=this._fadeBuffer,m=new Uint8Array(c);h&&m.set(h.subarray(0,this._fadeTextureCapacity)),this._fadeBuffer=m,this._fadeTextureCapacity=c,this.texture?.dispose();const l=new o;l.width=f,l.height=p,l.pixelFormat=36244,l.dataType=i.UNSIGNED_BYTE,l.internalFormat=s.R8UI,l.unpackAlignment=1,l.wrapMode=33071,l.samplingMode=9728,l.isImmutable=!0,this.texture=new r(this._rctx,l)}updateTexture(e){this.ensureCapacity(e);const t=this.texture.descriptor.width,r=Math.ceil(e/t),i=t*r;this.texture.updateData(0,0,0,t,r,this._fadeBuffer.subarray(0,i))}updateBuffer(e,t){this.ensureCapacity(t+1),this._fadeBuffer&&(this._fadeBuffer[t]=e)}destroy(){this.texture?.dispose()}_evalTextureSize(e){const r=Math.ceil(Math.sqrt(e)),i=Math.ceil(e/r);return t(r,i)}}export{u as GaussianSplatFadeTexture};
|
|
@@ -2,4 +2,4 @@
|
|
|
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 t from"../../../Camera.js";import e from"../../../Graphic.js";import n from"../../../Viewpoint.js";import{result as a}from"../../../core/asyncUtils.js";import"../../../core/has.js";import{cyclicalDegrees as r}from"../../../core/Cyclical.js";import o from"../../../core/Error.js";import{throwIfAborted as i}from"../../../core/promiseUtils.js";import{fromMat4 as s,transpose as c}from"../../../core/libs/gl-matrix-2/math/mat3.js";import{create as l}from"../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{create as m}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{j as u,i as f,B as p,d as g,e as y,h,t as d}from"../../../chunks/vec32.js";import{create as w}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import x from"../../../geometry/Extent.js";import j from"../../../geometry/Geometry.js";import v from"../../../geometry/Multipoint.js";import b from"../../../geometry/Point.js";import{projectAsync as R,tryProject as z}from"../../../geometry/projectionUtils.js";import G from"../../../geometry/SpatialReference.js";import{computeTranslationToOriginAndRotation as B}from"../../../geometry/projection/computeTranslationToOriginAndRotation.js";import{projectPointToVectorAsync as M}from"../../../geometry/projection/projectPointToVector.js";import{projectVectorToPoint as S}from"../../../geometry/projection/projectVectorToPoint.js";import{projectVectorToVector as Z}from"../../../geometry/projection/projectVectorToVector.js";import{create as F,center as T,toRect as P,isPoint as A,empty as E,expandWithVec3 as V,expandWithAABB as k,width as O,height as U,depth as N}from"../../../geometry/support/aaBoundingBox.js";import{create as I,isPoint as C}from"../../../geometry/support/aaBoundingRect.js";import{polygonCentroidPoint as W}from"../../../geometry/support/centroid.js";import{intersectsPoint as Y}from"../../../geometry/support/frustum.js";import{getResolutionInMetersForScale as q}from"../../../geometry/support/scaleUtils.js";import{fromRenderCamera as D,toRenderCamera as J}from"../webgl.js";import{cameraOnContentAlongViewDirection as X}from"../camera/intersectionUtils.js";import{getViewSR as _,fromExtentAsync as H,scaleToDistance as K,fromCenterDistanceAsync as L,fromExtentSync as Q,distanceToScale as $,fromCenterDistanceSync as tt,fromCenterScale as et,zoomToScale as nt}from"./cameraUtils.js";import{getElevationAtPoint as at}from"./ElevationProvider.js";import{directionToHeadingTilt as rt}from"./viewingModeUtils.js";const ot=.66;function it(t){return 360-r.normalize(t)}function st(t){return r.normalize(360-t)}function ct(t,e,n){const a=e.camera;if(null!=a)return mt(a,_(t));const{targetGeometry:r}=e;if(null==r)return null;const{camera:o,mode:i}=ft(t,e.rotation,n);if("point"===r.type)return pt(t,e,r,o,i);const s=r.extent;return null==s?null:Q(t,s,o.heading,o.tilt,i)}async function lt(t,e,n,a){const r=e.camera;if(null!=r)return ut(r,_(t),a);const{targetGeometry:o}=e;if(null==o)throw new Error("Viewpoint has no targetGeometry!");const{camera:i,mode:s}=ft(t,e.rotation,n);if("point"===o.type)return gt(t,e,o,i,s,a);const c=o.extent;if(null==c)throw new Error("Target geometry has no extent!");return H(t,c,i.heading,i.tilt,s,a)}function mt(t,e){const n=t.position,a=z(n,e);if(!a)return null;const r=t.clone();return r.position=a.clone(),r}async function ut(t,e,n){const a=t.position,r=await R(a,e,{signal:n});i(n);const o=t.clone();return o.position=r.clone(),o}function ft(t,e,n){const a=D(t,t.state.camera);let r=1;return null!=e&&(a.heading=it(e),r=0),null!=n&&(a.tilt=n),{camera:a,mode:r}}function pt(t,e,n,a,r){const o=t.spatialReference,i=z(n.clone(),o);if(!i)return null;const s=null!=e.scale?K(t,e.scale):t.state.camera.distance;return tt(t,i,s,a,r)}async function gt(t,e,n,a,r,o){const s=t.spatialReference,c=await R(n.clone(),s,{signal:o});i(o);const l=null!=e.scale?K(t,e.scale):t.state.camera.distance;return L(t,c,l,a,r,o)}function yt(t,e,a=null){return null==a&&(a=new n),jt(t,null,e.clone(),a)}async function ht(e,a,r){const i=At(e,a);if(!i)throw new o("viewpointutils-create:no-target","Missing target for creating viewpoint");const s=new t({fov:e.camera.fov}),c=new n({camera:s});if(i.target instanceof n){return Et(await zt(e,i.target,i,r,c))}if(i.target instanceof t)return Et(await Gt(e,i.target,r,c));const l=null!=i.scale||null!=i.zoom;if(i.target instanceof x){const t=i.target.xmin===i.target.xmax||i.target.ymin===i.target.ymax;return Et(l||t?await Mt(e,i,i.target.center,s,r,c):await Ft(e,i,i.target,s,r,c))}const m=new kt,u=l?wt(e,i):void 0;if(await Rt(e,i.target,u,m,r),isFinite(m.boundingBox[0])){let t;if(T(m.boundingBox,Ot),Jt.x=Ot[0],Jt.y=Ot[1],Jt.z=Ot[2],Jt.spatialReference=e.spatialReference,isFinite(Jt.z)&&m.hasZ?t=A(m.boundingBox):(Jt.z=void 0,t=C(P(m.boundingBox,Ct))),l||t)return Et(await Mt(e,i,Jt,s,r,c));const n=Vt(e,m.screenSpaceObjects);return Et(await Pt(e,i,Jt,m.boundingBox,n,s,r,c))}return i.position?Et(await St(e,i,s,c,r)):Et(await Zt(e,i,s,r,c))}function dt(t,e){return null==e.scale&&null!=e.zoom?nt(t,e.zoom):e.scale}function wt(t,e){const n=dt(t,e);return n?q(n):void 0}function xt(t,e){let n=!1;return null!=e.heading?(t.heading=e.heading,n=!0):null!=e.rotation&&(t.heading=it(e.rotation),n=!0),null!=e.tilt&&(t.tilt=e.tilt,n=!0),null!=e.fov&&(t.fov=e.fov),n}function jt(t,e,n,a){const r=t.spatialReference||G.WGS84;if(e??=J(t,n),null==e)return a;const o=new b({spatialReference:r});return S(e.center,t.renderSpatialReference,o)?(a.targetGeometry=o,a.scale=$(t,e.distance),a.rotation=st(n.heading),a.camera=n,a):a}async function vt(t,e,n,a){const r=()=>new o("viewpointutils:invalid-geometry","The target is missing a valid geometry");if(!e)throw r();"mesh"===e.type&&(e=e.extent);const i=t.basemapTerrain.spatialReference;if(!e.hasZ&&t.basemapTerrain){let n;switch(e.type){case"point":n=e;break;case"multipoint":case"polyline":n=e.extent?.center;break;case"extent":n=e.center;break;case"polygon":{const t=W(e);n=t?b.fromJSON(t):null;break}}null!=n&&i&&t.elevationProvider?(n=await R(n,i,{signal:a}),Ot[2]=at(t.elevationProvider,n)??0):Ot[2]=0}const s=Xt[e.type],c=new Array;if(s(e,e.hasZ?t=>{c.push([t[0],t[1],t[2]])}:t=>{c.push([t[0],t[1]])},Ot),0===c.length)throw r();const l=e.spatialReference,m=t.spatialReference,u=await R(new v({spatialReference:l,hasZ:e.hasZ,hasM:!1,points:c}),m,{signal:a});if(e.hasZ&&(n.hasZ=!0),e.hasZ)for(const[o,f,p]of u.points)Ot[0]=o,Ot[1]=f,Ot[2]=p,V(n.boundingBox,Ot);else for(const[o,f]of u.points)Ot[0]=o,Ot[1]=f,V(n.boundingBox,Ot)}async function bt(t,e,n,r,o){const i=await a(t.whenViewForGraphic(e));if(!1===i.ok||null==i.value||!("whenGraphicBounds"in i.value))return void await vt(t,e.geometry,r,o);const s=i.value,c=await a(s.whenGraphicBounds(e,{minDemResolution:n}));if(!1===c.ok||!c.value)return void await vt(t,e.geometry,r,o);const{screenSpaceObjects:l,boundingBox:m}=c.value;k(r.boundingBox,m),l&&l.forEach(t=>{r.screenSpaceObjects.push(t)}),isFinite(m[2])&&(r.hasZ=!0)}async function Rt(t,n,a,r,o){if(Array.isArray(n)&&2===n.length){const e=n[0],a=n[1];if("number"==typeof e&&"number"==typeof a)return Jt.x=e,Jt.y=a,Jt.z=void 0,Jt.spatialReference=t.spatialReference?.isGeographic?t.spatialReference:G.WGS84,void await vt(t,Jt,r,o)}n&&"map"in n&&"function"==typeof n.map?await Promise.allSettled(n.map(e=>Rt(t,e,a,r,o))):n instanceof j?await vt(t,n,r,o):n instanceof e&&await bt(t,n,a,r,o)}async function zt(t,e,n,a,r){if(e.camera)return Gt(t,e.camera,a,r);r.scale=e.scale,r.rotation=e.rotation,r.targetGeometry=null!=e.targetGeometry?e.targetGeometry.clone():null,r.camera=null,null!=n.heading?r.rotation=st(n.heading):null!=n.rotation&&(r.rotation=n.rotation);const o=dt(t,n);return null!=o&&(r.scale=o),r.camera=await lt(t,r,n.tilt,a),r}async function Gt(t,e,n,a){const r=t.spatialReference,o=await R(e.position,r,{signal:n}),i=e.clone();return i.position=o,jt(t,null,i,a)}async function Bt(t,e,n,a,r,o,i){const s=t.renderSpatialReference;return await M(e,qt,s,{signal:i}),await M(n,Yt,s,{signal:i}),o.targetGeometry=new b(e),r.position=new b(n),y(Wt,qt,Yt),rt(t,Yt,Wt,a.up,r),o.scale=$(t,p(Yt,qt)),o.rotation=st(r.heading),o.camera=r,o}async function Mt(t,e,n,a,r,o){o.targetGeometry=n.clone();const i=X(t);if(e.position)return Bt(t,o.targetGeometry,e.position,i,a,o,r);if(e.zoomFactor){const n=i.distance/e.zoomFactor,a=u(Ot,i.viewForward,-n);i.eye=f(Ot,i.center,a),o.scale=$(t,n)}D(t,i,a);const s=xt(a,e)?0:1;if(!e.zoomFactor){const n=dt(t,e);if(null==n){await M(o.targetGeometry,Ot,t.renderSpatialReference,{signal:r});const e=Y(i.frustum,Ot)?p(i.eye,Ot):i.distance;o.camera=await L(t,o.targetGeometry,e,a,s),o.scale=$(t,e)}else o.scale=n,o.camera=await et(t,o.targetGeometry,o.scale,a,s,r)}return o}async function St(t,e,n,a,r){const o=X(t);g(Wt,o.viewForward),rt(t,o.eye,Wt,o.up,Dt);const i=t.spatialReference,{position:s}=e;if(s){const t=await R(s,i,{signal:r});n.position=t}else n.position=new b;return n.heading=null!=e.heading?e.heading:Dt.heading,n.tilt=null!=e.tilt?e.tilt:Dt.tilt,jt(t,null,n,a)}async function Zt(t,e,n,a,r){if(null!=e.heading||null!=e.rotation||null!=e.scale||null!=e.tilt||null!=e.zoom||null!=e.zoomFactor){const o=X(t),{spatialReference:i,renderSpatialReference:s}=t,c=new b({spatialReference:i});return S(o.center,s,c)?Mt(t,e,c,n,a,r):r}return r.scale=t.scale,r.camera=t.camera.clone(),xt(r.camera,e),r}async function Ft(t,e,n,a,r,o){o.targetGeometry=n.clone();const i=X(t);D(t,i,a);const s=xt(a,e)?0:1;return o.camera=await H(t,n,a.heading,a.tilt,s,r),o}function Tt(t,e,n,a,r){let o=0;null!=n.z?o=n.z:t.basemapTerrain&&t.elevationProvider&&(o=at(t.elevationProvider,n)),h(Ot,n.x,n.y,o),B(t.spatialReference,Ot,Ut,t.renderSpatialReference),s(Nt,Ut),c(Nt,Nt),E(It);const i=[[0,1,2],[3,1,2],[0,4,2],[3,4,2],[0,1,5],[3,1,5],[0,4,5],[3,4,5]];for(let s=0;s<i.length;s++){const e=i[s];let n=a[e[2]];isFinite(n)||(n=o),h(Ot,a[e[0]],a[e[1]],n),Z(Ot,t.spatialReference,Ot,t.renderSpatialReference),V(It,d(Ot,Ot,Nt))}const l=O(It),m=U(It),u=N(It),f=1/Math.tan(e.fovX/2),p=1/Math.tan(e.fovY/2),g=.5*Math.sqrt(l*l+u*u)*Math.max(p,f)+.5*m,y=.5*m*p+.5*Math.max(l,u);return Math.max(g,y)/r}async function Pt(t,e,n,a,r,o,i,s){s.targetGeometry=n.clone();const c=X(t),l=Tt(t,c,n,a,r);D(t,c,o);const m=xt(o,e)?0:1;return s.camera=await L(t,s.targetGeometry,l,o,m,i),s.scale=$(t,l),s}function At(t,e){if(!e||!t.spatialReference)return null;const n={target:void 0};return"declaredClass"in e||Array.isArray(e)?n.target=e:(Object.assign(n,e),!n.target&&"center"in e&&e.center&&(n.target=e.center)),n}function Et(t){return null!=t?.camera&&(t.rotation=st(t.camera.heading)),t}function Vt(t,e){const n=ot;if(!e.length)return n;let a=Number.NEGATIVE_INFINITY;for(let r=0;r<e.length;r++){const t=e[r].screenSpaceBoundingRect;a=Math.max(a,Math.abs(t[0]),Math.abs(t[1]),Math.abs(t[2]),Math.abs(t[3]))}return n-a/Math.min(t.width,t.height)*2}class kt{constructor(){this.hasZ=!1,this.boundingBox=E(),this.screenSpaceObjects=new Array}}const Ot=w(),Ut=m(),Nt=l(),It=F(),Ct=I(),Wt=w(),Yt=w(),qt=w(),Dt={heading:0,tilt:0},Jt=new b,Xt={point(t,e,n){n[0]=t.x,n[1]=t.y,null!=t.z&&(n[2]=t.z),e(n)},polygon(t,e,n){const a=t.hasZ;for(let r=0;r<t.rings.length;r++){const o=t.rings[r];for(let t=0;t<o.length;t++)n[0]=o[t][0],n[1]=o[t][1],a&&(n[2]=o[t][2]),e(n)}},polyline(t,e,n){const a=t.hasZ;for(let r=0;r<t.paths.length;r++){const o=t.paths[r];for(let t=0;t<o.length;t++)n[0]=o[t][0],n[1]=o[t][1],a&&(n[2]=o[t][2]),e(n)}},multipoint(t,e,n){const a=t.points,r=t.hasZ;for(let o=0;o<a.length;o++)n[0]=a[o][0],n[1]=a[o][1],r&&(n[2]=a[o][2]),e(n)},extent(t,e,n){null!=t.zmin&&null!=t.zmax?(e(h(n,t.xmin,t.ymin,t.zmin)),e(h(n,t.xmax,t.ymin,t.zmin)),e(h(n,t.xmin,t.ymax,t.zmin)),e(h(n,t.xmax,t.ymax,t.zmin)),e(h(n,t.xmin,t.ymin,t.zmax)),e(h(n,t.xmax,t.ymin,t.zmax)),e(h(n,t.xmin,t.ymax,t.zmax)),e(h(n,t.xmax,t.ymax,t.zmax))):(e(h(n,t.xmin,t.ymin,n[2])),e(h(n,t.xmax,t.ymin,n[2])),e(h(n,t.xmin,t.ymax,n[2])),e(h(n,t.xmax,t.ymax,n[2])))}};export{ht as create,yt as fromCamera,lt as toCameraAsync,ct as toCameraSync};
|
|
5
|
+
import t from"../../../Camera.js";import e from"../../../Graphic.js";import n from"../../../Viewpoint.js";import{result as a}from"../../../core/asyncUtils.js";import{cyclicalDegrees as r}from"../../../core/Cyclical.js";import o from"../../../core/Error.js";import{throwIfAborted as i}from"../../../core/promiseUtils.js";import{fromMat4 as s,transpose as c}from"../../../core/libs/gl-matrix-2/math/mat3.js";import{create as l}from"../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{create as m}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{j as u,i as f,B as p,d as g,e as y,h,t as d}from"../../../chunks/vec32.js";import{create as w}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import x from"../../../geometry/Extent.js";import j from"../../../geometry/Geometry.js";import v from"../../../geometry/Multipoint.js";import b from"../../../geometry/Point.js";import{projectAsync as R,tryProject as z}from"../../../geometry/projectionUtils.js";import G from"../../../geometry/SpatialReference.js";import{computeTranslationToOriginAndRotation as B}from"../../../geometry/projection/computeTranslationToOriginAndRotation.js";import{projectPointToVectorAsync as M}from"../../../geometry/projection/projectPointToVector.js";import{projectVectorToPoint as S}from"../../../geometry/projection/projectVectorToPoint.js";import{projectVectorToVector as Z}from"../../../geometry/projection/projectVectorToVector.js";import{create as F,center as T,toRect as P,isPoint as A,empty as E,expandWithVec3 as V,expandWithAABB as k,width as O,height as U,depth as N}from"../../../geometry/support/aaBoundingBox.js";import{create as I,isPoint as C}from"../../../geometry/support/aaBoundingRect.js";import{polygonCentroidPoint as W}from"../../../geometry/support/centroid.js";import{intersectsPoint as Y}from"../../../geometry/support/frustum.js";import{getResolutionInMetersForScale as q}from"../../../geometry/support/scaleUtils.js";import{fromRenderCamera as D,toRenderCamera as J}from"../webgl.js";import{cameraOnContentAlongViewDirection as X}from"../camera/intersectionUtils.js";import{getViewSR as _,fromExtentAsync as H,scaleToDistance as K,fromCenterDistanceAsync as L,fromExtentSync as Q,distanceToScale as $,fromCenterDistanceSync as tt,fromCenterScale as et,zoomToScale as nt}from"./cameraUtils.js";import{getElevationAtPoint as at}from"./ElevationProvider.js";import{directionToHeadingTilt as rt}from"./viewingModeUtils.js";const ot=.66;function it(t){return 360-r.normalize(t)}function st(t){return r.normalize(360-t)}function ct(t,e,n){const a=e.camera;if(null!=a)return mt(a,_(t));const{targetGeometry:r}=e;if(null==r)return null;const{camera:o,mode:i}=ft(t,e.rotation,n);if("point"===r.type)return pt(t,e,r,o,i);const s=r.extent;return null==s?null:Q(t,s,o.heading,o.tilt,i)}async function lt(t,e,n,a){const r=e.camera;if(null!=r)return ut(r,_(t),a);const{targetGeometry:o}=e;if(null==o)throw new Error("Viewpoint has no targetGeometry!");const{camera:i,mode:s}=ft(t,e.rotation,n);if("point"===o.type)return gt(t,e,o,i,s,a);const c=o.extent;if(null==c)throw new Error("Target geometry has no extent!");return H(t,c,i.heading,i.tilt,s,a)}function mt(t,e){const n=t.position,a=z(n,e);if(!a)return null;const r=t.clone();return r.position=a.clone(),r}async function ut(t,e,n){const a=t.position,r=await R(a,e,{signal:n});i(n);const o=t.clone();return o.position=r.clone(),o}function ft(t,e,n){const a=D(t,t.state.camera);let r=1;return null!=e&&(a.heading=it(e),r=0),null!=n&&(a.tilt=n),{camera:a,mode:r}}function pt(t,e,n,a,r){const o=t.spatialReference,i=z(n.clone(),o);if(!i)return null;const s=null!=e.scale?K(t,e.scale):t.state.camera.distance;return tt(t,i,s,a,r)}async function gt(t,e,n,a,r,o){const s=t.spatialReference,c=await R(n.clone(),s,{signal:o});i(o);const l=null!=e.scale?K(t,e.scale):t.state.camera.distance;return L(t,c,l,a,r,o)}function yt(t,e,a=null){return null==a&&(a=new n),jt(t,null,e.clone(),a)}async function ht(e,a,r){const i=At(e,a);if(!i)throw new o("viewpointutils-create:no-target","Missing target for creating viewpoint");const s=new t({fov:e.camera.fov}),c=new n({camera:s});if(i.target instanceof n){return Et(await zt(e,i.target,i,r,c))}if(i.target instanceof t)return Et(await Gt(e,i.target,r,c));const l=null!=i.scale||null!=i.zoom;if(i.target instanceof x){const t=i.target.xmin===i.target.xmax||i.target.ymin===i.target.ymax;return Et(l||t?await Mt(e,i,i.target.center,s,r,c):await Ft(e,i,i.target,s,r,c))}const m=new kt,u=l?wt(e,i):void 0;if(await Rt(e,i.target,u,m,r),isFinite(m.boundingBox[0])){let t;if(T(m.boundingBox,Ot),Jt.x=Ot[0],Jt.y=Ot[1],Jt.z=Ot[2],Jt.spatialReference=e.spatialReference,isFinite(Jt.z)&&m.hasZ?t=A(m.boundingBox):(Jt.z=void 0,t=C(P(m.boundingBox,Ct))),l||t)return Et(await Mt(e,i,Jt,s,r,c));const n=Vt(e,m.screenSpaceObjects);return Et(await Pt(e,i,Jt,m.boundingBox,n,s,r,c))}return i.position?Et(await St(e,i,s,c,r)):Et(await Zt(e,i,s,r,c))}function dt(t,e){return null==e.scale&&null!=e.zoom?nt(t,e.zoom):e.scale}function wt(t,e){const n=dt(t,e);return n?q(n):void 0}function xt(t,e){let n=!1;return null!=e.heading?(t.heading=e.heading,n=!0):null!=e.rotation&&(t.heading=it(e.rotation),n=!0),null!=e.tilt&&(t.tilt=e.tilt,n=!0),null!=e.fov&&(t.fov=e.fov),n}function jt(t,e,n,a){const r=t.spatialReference||G.WGS84;if(e??=J(t,n),null==e)return a;const o=new b({spatialReference:r});return S(e.center,t.renderSpatialReference,o)?(a.targetGeometry=o,a.scale=$(t,e.distance),a.rotation=st(n.heading),a.camera=n,a):a}async function vt(t,e,n,a){const r=()=>new o("viewpointutils:invalid-geometry","The target is missing a valid geometry");if(!e)throw r();"mesh"===e.type&&(e=e.extent);const i=t.basemapTerrain.spatialReference;if(!e.hasZ&&t.basemapTerrain){let n;switch(e.type){case"point":n=e;break;case"multipoint":case"polyline":n=e.extent?.center;break;case"extent":n=e.center;break;case"polygon":{const t=W(e);n=t?b.fromJSON(t):null;break}}null!=n&&i&&t.elevationProvider?(n=await R(n,i,{signal:a}),Ot[2]=at(t.elevationProvider,n)??0):Ot[2]=0}const s=Xt[e.type],c=new Array;if(s(e,e.hasZ?t=>{c.push([t[0],t[1],t[2]])}:t=>{c.push([t[0],t[1]])},Ot),0===c.length)throw r();const l=e.spatialReference,m=t.spatialReference,u=await R(new v({spatialReference:l,hasZ:e.hasZ,hasM:!1,points:c}),m,{signal:a});if(e.hasZ&&(n.hasZ=!0),e.hasZ)for(const[o,f,p]of u.points)Ot[0]=o,Ot[1]=f,Ot[2]=p,V(n.boundingBox,Ot);else for(const[o,f]of u.points)Ot[0]=o,Ot[1]=f,V(n.boundingBox,Ot)}async function bt(t,e,n,r,o){const i=await a(t.whenViewForGraphic(e));if(!1===i.ok||null==i.value||!("whenGraphicBounds"in i.value))return void await vt(t,e.geometry,r,o);const s=i.value,c=await a(s.whenGraphicBounds(e,{minDemResolution:n}));if(!1===c.ok||!c.value)return void await vt(t,e.geometry,r,o);const{screenSpaceObjects:l,boundingBox:m}=c.value;k(r.boundingBox,m),l&&l.forEach(t=>{r.screenSpaceObjects.push(t)}),isFinite(m[2])&&(r.hasZ=!0)}async function Rt(t,n,a,r,o){if(Array.isArray(n)&&2===n.length){const e=n[0],a=n[1];if("number"==typeof e&&"number"==typeof a)return Jt.x=e,Jt.y=a,Jt.z=void 0,Jt.spatialReference=t.spatialReference?.isGeographic?t.spatialReference:G.WGS84,void await vt(t,Jt,r,o)}n&&"map"in n&&"function"==typeof n.map?await Promise.allSettled(n.map(e=>Rt(t,e,a,r,o))):n instanceof j?await vt(t,n,r,o):n instanceof e&&await bt(t,n,a,r,o)}async function zt(t,e,n,a,r){if(e.camera)return Gt(t,e.camera,a,r);r.scale=e.scale,r.rotation=e.rotation,r.targetGeometry=null!=e.targetGeometry?e.targetGeometry.clone():null,r.camera=null,null!=n.heading?r.rotation=st(n.heading):null!=n.rotation&&(r.rotation=n.rotation);const o=dt(t,n);return null!=o&&(r.scale=o),r.camera=await lt(t,r,n.tilt,a),r}async function Gt(t,e,n,a){const r=t.spatialReference,o=await R(e.position,r,{signal:n}),i=e.clone();return i.position=o,jt(t,null,i,a)}async function Bt(t,e,n,a,r,o,i){const s=t.renderSpatialReference;return await M(e,qt,s,{signal:i}),await M(n,Yt,s,{signal:i}),o.targetGeometry=new b(e),r.position=new b(n),y(Wt,qt,Yt),rt(t,Yt,Wt,a.up,r),o.scale=$(t,p(Yt,qt)),o.rotation=st(r.heading),o.camera=r,o}async function Mt(t,e,n,a,r,o){o.targetGeometry=n.clone();const i=X(t);if(e.position)return Bt(t,o.targetGeometry,e.position,i,a,o,r);if(e.zoomFactor){const n=i.distance/e.zoomFactor,a=u(Ot,i.viewForward,-n);i.eye=f(Ot,i.center,a),o.scale=$(t,n)}D(t,i,a);const s=xt(a,e)?0:1;if(!e.zoomFactor){const n=dt(t,e);if(null==n){await M(o.targetGeometry,Ot,t.renderSpatialReference,{signal:r});const e=Y(i.frustum,Ot)?p(i.eye,Ot):i.distance;o.camera=await L(t,o.targetGeometry,e,a,s),o.scale=$(t,e)}else o.scale=n,o.camera=await et(t,o.targetGeometry,o.scale,a,s,r)}return o}async function St(t,e,n,a,r){const o=X(t);g(Wt,o.viewForward),rt(t,o.eye,Wt,o.up,Dt);const i=t.spatialReference,{position:s}=e;if(s){const t=await R(s,i,{signal:r});n.position=t}else n.position=new b;return n.heading=null!=e.heading?e.heading:Dt.heading,n.tilt=null!=e.tilt?e.tilt:Dt.tilt,jt(t,null,n,a)}async function Zt(t,e,n,a,r){if(null!=e.heading||null!=e.rotation||null!=e.scale||null!=e.tilt||null!=e.zoom||null!=e.zoomFactor){const o=X(t),{spatialReference:i,renderSpatialReference:s}=t,c=new b({spatialReference:i});return S(o.center,s,c)?Mt(t,e,c,n,a,r):r}return r.scale=t.scale,r.camera=t.camera.clone(),xt(r.camera,e),r}async function Ft(t,e,n,a,r,o){o.targetGeometry=n.clone();const i=X(t);D(t,i,a);const s=xt(a,e)?0:1;return o.camera=await H(t,n,a.heading,a.tilt,s,r),o}function Tt(t,e,n,a,r){let o=0;null!=n.z?o=n.z:t.basemapTerrain&&t.elevationProvider&&(o=at(t.elevationProvider,n)),h(Ot,n.x,n.y,o),B(t.spatialReference,Ot,Ut,t.renderSpatialReference),s(Nt,Ut),c(Nt,Nt),E(It);const i=[[0,1,2],[3,1,2],[0,4,2],[3,4,2],[0,1,5],[3,1,5],[0,4,5],[3,4,5]];for(let s=0;s<i.length;s++){const e=i[s];let n=a[e[2]];isFinite(n)||(n=o),h(Ot,a[e[0]],a[e[1]],n),Z(Ot,t.spatialReference,Ot,t.renderSpatialReference),V(It,d(Ot,Ot,Nt))}const l=O(It),m=U(It),u=N(It),f=1/Math.tan(e.fovX/2),p=1/Math.tan(e.fovY/2),g=.5*Math.sqrt(l*l+u*u)*Math.max(p,f)+.5*m,y=.5*m*p+.5*Math.max(l,u);return Math.max(g,y)/r}async function Pt(t,e,n,a,r,o,i,s){s.targetGeometry=n.clone();const c=X(t),l=Tt(t,c,n,a,r);D(t,c,o);const m=xt(o,e)?0:1;return s.camera=await L(t,s.targetGeometry,l,o,m,i),s.scale=$(t,l),s}function At(t,e){if(!e||!t.spatialReference)return null;const n={target:void 0};return"declaredClass"in e||Array.isArray(e)?n.target=e:(Object.assign(n,e),!n.target&&"center"in e&&e.center&&(n.target=e.center)),n}function Et(t){return null!=t?.camera&&(t.rotation=st(t.camera.heading)),t}function Vt(t,e){const n=ot;if(!e.length)return n;let a=Number.NEGATIVE_INFINITY;for(let r=0;r<e.length;r++){const t=e[r].screenSpaceBoundingRect;a=Math.max(a,Math.abs(t[0]),Math.abs(t[1]),Math.abs(t[2]),Math.abs(t[3]))}return n-a/Math.min(t.width,t.height)*2}class kt{constructor(){this.hasZ=!1,this.boundingBox=E(),this.screenSpaceObjects=new Array}}const Ot=w(),Ut=m(),Nt=l(),It=F(),Ct=I(),Wt=w(),Yt=w(),qt=w(),Dt={heading:0,tilt:0},Jt=new b,Xt={point(t,e,n){n[0]=t.x,n[1]=t.y,null!=t.z&&(n[2]=t.z),e(n)},polygon(t,e,n){const a=t.hasZ;for(let r=0;r<t.rings.length;r++){const o=t.rings[r];for(let t=0;t<o.length;t++)n[0]=o[t][0],n[1]=o[t][1],a&&(n[2]=o[t][2]),e(n)}},polyline(t,e,n){const a=t.hasZ;for(let r=0;r<t.paths.length;r++){const o=t.paths[r];for(let t=0;t<o.length;t++)n[0]=o[t][0],n[1]=o[t][1],a&&(n[2]=o[t][2]),e(n)}},multipoint(t,e,n){const a=t.points,r=t.hasZ;for(let o=0;o<a.length;o++)n[0]=a[o][0],n[1]=a[o][1],r&&(n[2]=a[o][2]),e(n)},extent(t,e,n){null!=t.zmin&&null!=t.zmax?(e(h(n,t.xmin,t.ymin,t.zmin)),e(h(n,t.xmax,t.ymin,t.zmin)),e(h(n,t.xmin,t.ymax,t.zmin)),e(h(n,t.xmax,t.ymax,t.zmin)),e(h(n,t.xmin,t.ymin,t.zmax)),e(h(n,t.xmax,t.ymin,t.zmax)),e(h(n,t.xmin,t.ymax,t.zmax)),e(h(n,t.xmax,t.ymax,t.zmax))):(e(h(n,t.xmin,t.ymin,n[2])),e(h(n,t.xmax,t.ymin,n[2])),e(h(n,t.xmin,t.ymax,n[2])),e(h(n,t.xmax,t.ymax,n[2])))}};export{ht as create,yt as fromCamera,lt as toCameraAsync,ct as toCameraSync};
|
|
@@ -2,4 +2,4 @@
|
|
|
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
|
-
|
|
5
|
+
function e(e){switch(e.type){case"building-scene":case"catalog":case"catalog-dynamic-group":case"catalog-footprint":case"csv":case"dimension":case"feature":case"gaussian-splat":case"geo-rss":case"geojson":case"graphics":case"group":case"integrated-mesh":case"integrated-mesh-3dtiles":case"kml":case"knowledge-graph":case"link-chart":case"knowledge-graph-sublayer":case"line-of-sight":case"map-notes":case"ogc-feature":case"oriented-imagery":case"point-cloud":case"route":case"scene":case"stream":case"viewshed":case"voxel":case"subtype-group":case"unknown":case"unsupported":case"wfs":case"parquet":case null:case"imagery":case"imagery-tile":return!1;case"base-dynamic":case"base-elevation":case"base-tile":case"bing-maps":case"elevation":case"map-image":case"media":case"open-street-map":case"tile":case"vector-tile":case"video":case"wcs":case"web-tile":case"wms":case"wmts":return!0;default:return e.type,!1}}export{e as isTerrainSurfaceLayer};
|
|
@@ -2,4 +2,4 @@
|
|
|
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{__decorate as e}from"tslib";import r from"../../../core/Accessor.js";import
|
|
5
|
+
import{__decorate as e}from"tslib";import r from"../../../core/Accessor.js";import t from"../../../core/Error.js";import{watch as i,initial as s}from"../../../core/reactiveUtils.js";import{property as n}from"../../../core/accessorSupport/decorators/property.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import{RenderCategory as d}from"../webgl.js";let a=class extends r{constructor(e){super(e),this.view=null,this.consumes={required:[]},this.produces=d.COMPOSITE,this.requireGeometryDepth=!1,this._dirty=!0}initialize(){this.addHandles([i(()=>this.view.ready,e=>{e&&this.view.stage?.renderer.addRenderNode(this)},s)])}destroy(){this.view.stage?.renderer?.removeRenderNode(this)}precompile(){}render(){throw new t("RenderNode:render-function-not-implemented","render() is not implemented.")}get camera(){return this.view.state.camera.clone()}get sunLight(){return this.bindParameters.lighting.legacy}get gl(){return this.view.stage.renderView.renderingContext.gl}get techniques(){return this.view.stage.renderView.techniques}acquireOutputFramebuffer(){const e=this._frameBuffer?.getTexture()?.descriptor,r=this.view.stage.renderer.fboCache.acquire(e?.width??640,e?.height??480,this.produces);return r.fbo?.initializeAndBind(),r}bindRenderTarget(){return this._frameBuffer?.fbo?.initializeAndBind(),this._frameBuffer}requestRender(e){switch(e){case 2:this.view.state.fading=!0;case 1:this.view.stage?.renderView.requestRender(e);case 0:case void 0:this._dirty=!0}}resetWebGLState(){this.renderingContext.resetState(),this.renderingContext.bindFramebuffer(this._frameBuffer?.fbo)}get fboCache(){return this.view.stage.renderer.fboCache}get bindParameters(){return this.renderContext.bind}get renderingContext(){return this.view.stage.renderView.renderingContext}get renderContext(){return this.view.stage?.renderer.renderContext}updateAnimation(e){return!!this._dirty&&(this._dirty=!1,!0)}doRender(e){this._frameBuffer=e.find(({name:e})=>e===this.produces);try{return this.render(e)}finally{this._frameBuffer=null}}};e([n({constructOnly:!0})],a.prototype,"view",void 0),e([n({constructOnly:!0})],a.prototype,"consumes",void 0),e([n()],a.prototype,"produces",void 0),e([n({readOnly:!0})],a.prototype,"techniques",null),a=e([o("esri.views.3d.webgl.RenderNode")],a);export{a as default};
|
|
@@ -2,18 +2,18 @@
|
|
|
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{
|
|
5
|
+
import{DecodeSymbolColor as o}from"./DecodeSymbolColor.glsl.js";import{TextureBackedBufferModule as e}from"../../../core/shaderLibrary/TextureBackedBuffer.glsl.js";import{Float4DrawUniform as r}from"../../../core/shaderModules/Float4DrawUniform.js";import{FloatDrawUniform as t}from"../../../core/shaderModules/FloatDrawUniform.js";import{glsl as d,If as n}from"../../../core/shaderModules/glsl.js";import{IntegerDrawUniform as a}from"../../../core/shaderModules/IntegerDrawUniform.js";import{Texture2DUintDrawUniform as l}from"../../../core/shaderModules/Texture2DUintDrawUniform.js";import{olidEnabled as i}from"../../../effects/geometry/olidUtils.js";import{componentDataLayout as s,componentDataOlidLayout as c}from"../../../materials/DefaultLayouts.js";function u(o,e){switch(e.componentData){case 1:return p(o,e);case 0:return M(o,e);case 2:return;default:e.componentData}}const m=(o,e)=>"emissiveSourceMode"===o||"emissiveStrength"===o?e.hasEmission:"olidColor"!==o||9===e.output,v=new l("componentTextureBuffer",o=>o.textureBackedBuffer?.texture),C=new e(s,"componentIndex",v,m),f=new e(c,"componentIndex",v,m);function x(){return i()?f:C}function p(e,r){const{vertex:t,fragment:a}=e,{output:l,hasEmission:i}=r,s=9===l,{getTextureAttribute:c,TextureBackedBufferModule:u}=x();e.include(u,r),e.attributes.add("componentIndex","uint"),e.varyings.add("vExternalColorMixMode","mediump float"),e.varyings.add("vExternalColor","vec4"),s&&e.varyings.add("vObjectAndLayerIdColor","vec4"),i&&(e.varyings.add("emissiveStrength","float"),e.varyings.add("emissiveSource","int")),e.include(o),t.code.add(d`
|
|
6
6
|
float readElevationOffset() {
|
|
7
7
|
return ${c("elevationOffset")};
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
void forwardEmissiveStrength() {
|
|
11
|
-
${
|
|
11
|
+
${n(i,d`emissiveStrength = ${c("emissiveStrength")};
|
|
12
12
|
emissiveSource = ${c("emissiveSourceMode")} == 0u ? 0 : 1;`)}
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
void forwardObjectAndLayerIdColor() {
|
|
16
|
-
${
|
|
16
|
+
${n(s,d`vObjectAndLayerIdColor = vec4(${c("olidColor")})/255.0;`)}
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
void decodeColorAndCastShadow(uvec4 colorAndCastShadowEncoded, out vec4 color, out bool castShadow) {
|
|
@@ -33,16 +33,16 @@ import{neverReached as o}from"../../../../../../core/compilerUtils.js";import{De
|
|
|
33
33
|
|
|
34
34
|
return vExternalColor;
|
|
35
35
|
}
|
|
36
|
-
`),
|
|
36
|
+
`),a.code.add(d`
|
|
37
37
|
void readExternalColor(out vec4 externalColor, out int externalColorMixMode) {
|
|
38
38
|
externalColor = vExternalColor;
|
|
39
39
|
externalColorMixMode = int(vExternalColorMixMode);
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
void outputObjectAndLayerIdColor() {
|
|
43
|
-
${s?
|
|
43
|
+
${s?d`fragColor = vObjectAndLayerIdColor;`:""}
|
|
44
44
|
}
|
|
45
|
-
`)}function
|
|
45
|
+
`)}function M(o,e){const{vertex:l,fragment:i}=o;o.varyings.add("vExternalColor","vec4"),i.uniforms.add(new t("emissiveStrength",o=>o.componentParameters.emissiveStrength)),l.uniforms.add(new r("externalColor",o=>o.componentParameters.externalColor)).code.add(d`float readElevationOffset() {
|
|
46
46
|
return 0.0;
|
|
47
47
|
}
|
|
48
48
|
void forwardObjectAndLayerIdColor() {}
|
|
@@ -51,13 +51,13 @@ vec4 forwardExternalColor(out bool castShadows) {
|
|
|
51
51
|
vExternalColor = externalColor;
|
|
52
52
|
castShadows = true;
|
|
53
53
|
return externalColor;
|
|
54
|
-
}`);const s=9===e.output;i.uniforms.add(new
|
|
54
|
+
}`);const s=9===e.output;i.uniforms.add(new a("externalColorMixMode",o=>o.componentParameters.externalColorMixMode)).code.add(d`
|
|
55
55
|
void readExternalColor(out vec4 color, out int colorMixMode) {
|
|
56
56
|
color = vExternalColor;
|
|
57
57
|
colorMixMode = externalColorMixMode;
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
void outputObjectAndLayerIdColor() {
|
|
61
|
-
${
|
|
61
|
+
${n(s,"fragColor = vec4(0, 0, 0, 0);")}
|
|
62
62
|
}
|
|
63
63
|
`)}export{u as ComponentData};
|
|
@@ -2,4 +2,4 @@
|
|
|
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
|
-
class
|
|
5
|
+
class t{constructor(t,o){this.position=t,this.rotationScale=o}}export{t as Transform};
|
|
@@ -2,10 +2,10 @@
|
|
|
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{
|
|
5
|
+
import{hasNativeFloat16Array as t}from"../../../../../geometry/support/float16.js";import{glsl as e}from"../shaderModules/glsl.js";function n(t){switch(t.elementType){case"float":switch(t.elementCount){case 1:return e`float`;case 2:return e`vec2`;case 3:return e`vec3`;case 4:return e`vec4`;default:t.elementCount}break;case"int":switch(t.elementCount){case 1:return e`int`;case 2:return e`ivec2`;case 3:return e`ivec3`;case 4:return e`ivec4`;default:t.elementCount}break;case"uint":switch(t.elementCount){case 1:return e`uint`;case 2:return e`uvec2`;case 3:return e`uvec3`;case 4:return e`uvec4`;default:t.elementCount}break;default:t.elementType}throw new Error("unsupported field")}function u(t){t.code.add(e`mediump float unpackHalf2x8(highp uint bits0, highp uint bits1) {
|
|
6
6
|
highp uint halfBits = (bits1 << 8u) | bits0;
|
|
7
7
|
return unpackHalf2x16(halfBits).x;
|
|
8
|
-
}`)}function
|
|
8
|
+
}`)}function i(t){t.code.add(e`highp float unpackFloat4x8(highp uint bits0, highp uint bits1, highp uint bits2, highp uint bits3) {
|
|
9
9
|
highp uint floatBits = (bits3 << 24u) |(bits2 << 16u) | (bits1 << 8u) | bits0;
|
|
10
10
|
return uintBitsToFloat(floatBits);
|
|
11
|
-
}`)}function
|
|
11
|
+
}`)}function r(t){const{fieldType:e,glslDecodeArgumentString:n}=t;return`${(0,a[e])(n)}`}const a={u8:t=>e`${t}`,unorm8:t=>e`float(${t})/255.0`,vec4unorm8:t=>e`vec4(${t})/255.0`,f16:t?t=>e`unpackHalf2x8(${t})`:t=>e`unpackFloat4x8(${t})`,f32:t=>e`unpackFloat4x8(${t})`,vec4u8:t=>e`uvec4(${t})`};export{r as glslDecodeField,n as glslType,i as unpackFloat4x8,u as unpackHalf2x8};
|
|
@@ -2,14 +2,14 @@
|
|
|
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{
|
|
5
|
+
import{glsl as e}from"../../shaderModules/glsl.js";function r(r,o){switch(r.fragment.code.add(e`vec3 screenDerivativeNormal(vec3 positionView) {
|
|
6
6
|
return normalize(cross(dFdx(positionView), dFdy(positionView)));
|
|
7
|
-
}`),
|
|
7
|
+
}`),o.normalType){case 1:r.attributes.add("normalCompressed","vec2"),r.vertex.code.add(e`vec3 decompressNormal(vec2 normal) {
|
|
8
8
|
float z = 1.0 - abs(normal.x) - abs(normal.y);
|
|
9
9
|
return vec3(normal + sign(normal) * min(z, 0.0), z);
|
|
10
10
|
}
|
|
11
11
|
vec3 normalModel() {
|
|
12
12
|
return decompressNormal(normalCompressed);
|
|
13
|
-
}`);break;case 0:
|
|
13
|
+
}`);break;case 0:r.attributes.add("normal","vec3"),r.vertex.code.add(e`vec3 normalModel() {
|
|
14
14
|
return normal;
|
|
15
|
-
}`);break;default:
|
|
15
|
+
}`);break;default:o.normalType;case 2:case 3:}}export{r as NormalAttribute};
|
package/views/3d/webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js
CHANGED
|
@@ -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{
|
|
5
|
+
import{glsl as e}from"../../shaderModules/glsl.js";function d(d,r){switch(r.textureCoordinateType){case 1:return d.attributes.add("uv0","vec2"),d.varyings.add("vuv0","vec2"),void d.vertex.code.add(e`void forwardTextureCoordinates() { vuv0 = uv0; }`);case 2:return d.attributes.add("uv0","vec2"),d.attributes.add("uvRegion","vec4"),d.varyings.add("vuv0","vec2"),d.varyings.add("vuvRegion","vec4"),void d.vertex.code.add(e`void forwardTextureCoordinates() {
|
|
6
6
|
vuv0 = uv0;
|
|
7
7
|
vuvRegion = uvRegion;
|
|
8
|
-
}`);default:
|
|
8
|
+
}`);default:r.textureCoordinateType;case 0:return void d.vertex.code.add(e`void forwardTextureCoordinates() {}`);case 3:return}}export{d as TextureCoordinateAttribute};
|
|
@@ -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{
|
|
5
|
+
import{create as r}from"../../../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{create as o}from"../../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{NormalAttribute as a}from"./NormalAttribute.glsl.js";import{VertexPositionPassParameters as l,VertexPositionDrawParameters as e}from"./VertexPosition.glsl.js";import{glsl as m}from"../../shaderModules/glsl.js";import{Matrix3DrawUniform as s}from"../../shaderModules/Matrix3DrawUniform.js";import{Matrix3PassUniform as t}from"../../shaderModules/Matrix3PassUniform.js";function i(r,o){switch(o.normalType){case 0:case 1:r.include(a,o),r.varyings.add("vNormalWorld","vec3"),r.varyings.add("vNormalView","vec3"),r.vertex.uniforms.add(new s("transformNormalGlobalFromModel",r=>r.transformNormalGlobalFromModel),new t("transformNormalViewFromGlobal",r=>r.transformNormalViewFromGlobal)).code.add(m`void forwardNormal() {
|
|
6
6
|
vNormalWorld = transformNormalGlobalFromModel * normalModel();
|
|
7
7
|
vNormalView = transformNormalViewFromGlobal * vNormalWorld;
|
|
8
|
-
}`);break;case 2:
|
|
8
|
+
}`);break;case 2:r.vertex.code.add(m`void forwardNormal() {}`);break;default:o.normalType;case 3:}}class d extends l{constructor(){super(...arguments),this.transformNormalViewFromGlobal=r()}}class f extends e{constructor(){super(...arguments),this.transformNormalGlobalFromModel=r(),this.toMapSpace=o()}}export{i as VertexNormal,f as VertexNormalDrawParameters,d as VertexNormalPassParameters};
|
|
@@ -2,12 +2,12 @@
|
|
|
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{
|
|
5
|
+
import{VertexNormal as e}from"../attributes/VertexNormal.glsl.js";import{VertexPosition as a}from"../attributes/VertexPosition.glsl.js";import{glsl as o}from"../../shaderModules/glsl.js";function r(r,d){const i=r.fragment;switch(d.doubleSidedMode){case 0:i.code.add(o`vec3 _adjustDoublesided(vec3 normal) {
|
|
6
6
|
return normal;
|
|
7
|
-
}`);break;case 1:
|
|
7
|
+
}`);break;case 1:r.include(a,d),i.code.add(o`vec3 _adjustDoublesided(vec3 normal) {
|
|
8
8
|
return dot(normal, vPositionWorldCameraRelative) > 0.0 ? -normal : normal;
|
|
9
|
-
}`);break;case 2:
|
|
9
|
+
}`);break;case 2:i.code.add(o`vec3 _adjustDoublesided(vec3 normal) {
|
|
10
10
|
return gl_FrontFacing ? normal : -normal;
|
|
11
|
-
}`);break;default:
|
|
12
|
-
vec3 fragmentFaceNormalView = gl_FrontFacing ? normalize(vNormalView) : -normalize(vNormalView);`);break;case 2:
|
|
13
|
-
vec3 fragmentFaceNormalView = normalize(cross(dFdx(vPosition_view), dFdy(vPosition_view)));`)}
|
|
11
|
+
}`);break;default:d.doubleSidedMode;case 3:}switch(d.normalType){case 0:case 1:r.include(e,d),i.main.add(o`vec3 fragmentFaceNormal = _adjustDoublesided(normalize(vNormalWorld));
|
|
12
|
+
vec3 fragmentFaceNormalView = gl_FrontFacing ? normalize(vNormalView) : -normalize(vNormalView);`);break;case 2:r.include(a,d),i.main.add(o`vec3 fragmentFaceNormal = normalize(cross(dFdx(vPositionWorldCameraRelative), dFdy(vPositionWorldCameraRelative)));
|
|
13
|
+
vec3 fragmentFaceNormalView = normalize(cross(dFdx(vPosition_view), dFdy(vPosition_view)));`)}d.shadeNormals?i.main.add(o`vec3 fragmentShadingNormal = fragmentFaceNormal;`):d.spherical?(r.include(a,d),i.main.add(o`vec3 fragmentShadingNormal = normalize(positionWorld());`)):i.main.add(o`vec3 fragmentShadingNormal = vec3(0.0, 0.0, 1.0);`)}export{r as computeFragmentNormals};
|
|
@@ -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{colorGamma as i}from"../../../../../../colorUtils.js";import
|
|
5
|
+
import{colorGamma as i}from"../../../../../../colorUtils.js";import{EvaluateAmbientLighting as n}from"./EvaluateAmbientLighting.glsl.js";import{EvaluateAmbientOcclusion as o}from"./EvaluateAmbientOcclusion.glsl.js";import{addMainLightDirection as e,addMainLightIntensity as t,applyShading as a}from"./MainLighting.glsl.js";import{PhysicallyBasedRendering as r}from"./PhysicallyBasedRendering.glsl.js";import{PiUtils as l}from"./PiUtils.glsl.js";import{BooleanBindUniform as c}from"../../shaderModules/BooleanBindUniform.js";import{FloatBindUniform as d}from"../../shaderModules/FloatBindUniform.js";import{glsl as m,If as s}from"../../shaderModules/glsl.js";import{ambientBoost as g}from"../../../lighting/SceneLighting.js";import{BlackLevelLightSoftCompression as h}from"../../../shaders/BlackLevelLightSoftCompression.glsl.js";import{ToneMapping as u}from"../../../shaders/ToneMapping.glsl.js";function p(i){i.constants.add("ambientBoostFactor","float",g)}function v(i){i.uniforms.add(new d("lightingGlobalFactor",i=>i.lighting.globalFactor))}function f(g,f){const{pbrMode:L,spherical:b,hasColorTexture:C}=f;g.include(o,f),0!==L&&g.include(r,f),g.include(n,f),g.include(l),g.include(u,f);const N=!(2===L&&!C);switch(N&&g.include(h),g.code.add(m`
|
|
6
6
|
const float GAMMA_SRGB = ${m.float(i)};
|
|
7
7
|
const float INV_GAMMA_SRGB = 0.4761904;
|
|
8
8
|
${s(0!==L,"const float GROUND_REFLECTANCE = 0.2;")}
|
|
@@ -2,13 +2,13 @@
|
|
|
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{
|
|
5
|
+
import{glsl as a}from"../../shaderModules/glsl.js";function r(r,e){const m=r.fragment;switch(m.code.add(a`struct ShadingNormalParameters {
|
|
6
6
|
vec3 normalView;
|
|
7
7
|
vec3 viewDirection;
|
|
8
|
-
} shadingParams;`),
|
|
8
|
+
} shadingParams;`),e.doubleSidedMode){case 0:m.code.add(a`vec3 shadingNormal(ShadingNormalParameters params) {
|
|
9
9
|
return normalize(params.normalView);
|
|
10
|
-
}`);break;case 1:m.code.add(
|
|
10
|
+
}`);break;case 1:m.code.add(a`vec3 shadingNormal(ShadingNormalParameters params) {
|
|
11
11
|
return dot(params.normalView, params.viewDirection) > 0.0 ? normalize(-params.normalView) : normalize(params.normalView);
|
|
12
|
-
}`);break;case 2:m.code.add(
|
|
12
|
+
}`);break;case 2:m.code.add(a`vec3 shadingNormal(ShadingNormalParameters params) {
|
|
13
13
|
return gl_FrontFacing ? normalize(params.normalView) : normalize(-params.normalView);
|
|
14
|
-
}`);break;default:
|
|
14
|
+
}`);break;default:e.doubleSidedMode;case 3:}}export{r as Normals};
|