@arcgis/core 5.0.0-next.70 → 5.0.0-next.71
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/analysis/Dimension/types.d.ts +5 -1
- package/analysis/DistanceMeasurementAnalysis.d.ts +22 -3
- package/analysis/ElevationProfile/types.d.ts +10 -2
- package/analysis/ShadowCast/DiscreteOptions.d.ts +4 -0
- package/analysis/ShadowCast/MinDurationOptions.d.ts +7 -0
- package/analysis/ShadowCast/TotalDurationOptions.d.ts +4 -0
- package/analysis/ShadowCastAnalysis.d.ts +51 -8
- package/analysis/Slice/types.d.ts +5 -1
- package/analysis/VolumeMeasurement/types.d.ts +5 -1
- package/analysis/VolumeMeasurement/volumeMeasurementConfiguration.js +1 -1
- package/analysis/types.d.ts +39 -7
- package/applications/Components/QuantityFormatter.js +1 -1
- package/applications/Components/imageryUtils.d.ts +2 -2
- package/applications/Components/testUtils.d.ts +2 -0
- package/applications/KnowledgeStudio/dataModelVisualization.d.ts +1 -0
- package/applications/KnowledgeStudio/generalSdkInternalAccess.d.ts +59 -13
- package/applications/KnowledgeStudio/generalSharedKgUtils.d.ts +1 -1
- package/applications/PortalApp/layerUtils.d.ts +1 -0
- package/applications/Urban/LineImagePattern3D.d.ts +2 -0
- package/applications/Urban/imagePatternUtils.d.ts +4 -0
- package/arcade.d.ts +20 -11
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/1b284a6f32effe28aafc.js +1 -0
- package/assets/esri/core/workers/chunks/1bd5b421152fb0f46aa5.js +37 -0
- package/assets/esri/core/workers/chunks/{2e2c47f8a80ee9234350.js → 1d8fc0239c907ff5d1e8.js} +1 -1
- package/assets/esri/core/workers/chunks/{244006d4b0547d574401.js → 25abbe1663e18e677dc2.js} +143 -140
- package/assets/esri/core/workers/chunks/{c448540065690cac0744.js → 6087d5dc40bb62ec48c8.js} +1 -1
- package/assets/esri/core/workers/chunks/{866477acdf03b8a40bc9.js → bd1d159dce4094694c93.js} +1 -1
- package/assets/esri/core/workers/chunks/{401ce5cb98fa14c1a725.js → d8a7004c399d539aed09.js} +1 -1
- package/assets/esri/core/workers/chunks/{8d6641d0f7c93f83c414.js → db9c7182847e8f96ffe3.js} +1 -1
- package/assets/esri/core/workers/chunks/{6c9dac4a869742cc2718.js → e246b256347a281c13fd.js} +1 -1
- package/assets/esri/core/workers/chunks/{a10c6dd3bb8b3602de68.js → ee175fd4ec706f7878c0.js} +1 -1
- package/assets/esri/core/workers/chunks/f65b27fc0bc2f242aac7.js +1 -0
- package/assets/esri/core/workers/chunks/{5dd5be91038df8902dc4.js → f7dfbf24859f4ac2421b.js} +1 -1
- package/config.js +1 -1
- package/core/Version.d.ts +11 -2
- package/core/accessorSupport/types.d.ts +35 -5
- package/core/quantityFormatUtils.js +1 -1
- package/core/sql/types.d.ts +226 -31
- package/core/types.d.ts +24 -4
- package/editing/sharedTemplates/types.d.ts +1 -0
- package/editing/types.d.ts +2 -0
- package/effects/types.d.ts +1 -0
- package/form/ExpressionInfo.d.ts +1 -1
- package/form/FormTemplate.d.ts +4 -4
- package/form/elements/GroupElement.d.ts +1 -1
- package/form/elements/RelationshipElement.d.ts +3 -3
- package/form/elements/inputs/attachments/AttachmentInput.d.ts +2 -1
- package/form/elements/inputs/attachments/AudioInput.d.ts +1 -0
- package/form/elements/inputs/attachments/DocumentInput.d.ts +1 -0
- package/form/elements/inputs/attachments/ImageInput.d.ts +1 -0
- package/form/elements/inputs/attachments/Input.d.ts +5 -1
- package/form/elements/inputs/attachments/SignatureInput.d.ts +1 -0
- package/form/elements/inputs/attachments/VideoInput.d.ts +1 -0
- package/form/elements/inputs/attachments/types.d.ts +12 -3
- package/form/elements/inputs.d.ts +2 -2
- package/form/types.d.ts +3 -0
- package/geometry/geometryEngineTypes.d.ts +49 -9
- package/geometry/operators/types.d.ts +29 -4
- package/geometry/support/MeshVertexAttributes.d.ts +21 -2
- package/geometry/support/meshUtils/types.d.ts +126 -18
- package/geometry/types.d.ts +37 -6
- package/ground/NavigationConstraint.d.ts +3 -0
- package/identity/IdentityManagerBase.d.ts +153 -27
- package/interfaces.d.ts +27 -27
- package/intl/date.d.ts +5 -0
- package/intl/locale.d.ts +1 -0
- package/intl/messages.d.ts +12 -2
- package/intl/number.d.ts +5 -0
- package/intl/substitute.d.ts +28 -5
- package/intl/t9n.d.ts +13 -2
- package/kernel.js +1 -1
- package/layers/GaussianSplatLayer.d.ts +87 -6
- package/layers/ImageryTileLayer.d.ts +8 -8
- package/layers/LinkChartLayer.d.ts +1 -1
- package/layers/buildingSublayers/utils.d.ts +1 -0
- package/layers/effects/types.d.ts +12 -2
- package/layers/graphics/editingSupport.d.ts +202 -38
- package/layers/graphics/sources/ParquetSource.d.ts +23 -4
- package/layers/knowledgeGraph/IdTypePair.d.ts +15 -3
- package/layers/knowledgeGraph/KnowledgeGraphLayerDataManager.d.ts +61 -9
- package/layers/knowledgeGraph/LayoutMode.d.ts +1 -0
- package/layers/knowledgeGraph/dataModelVisualizationUtils.d.ts +6 -0
- package/layers/media/types.d.ts +25 -4
- package/layers/mixins/ArcGISImageService.d.ts +8 -9
- package/layers/mixins/ArcGISMapService.d.ts +5 -1
- package/layers/mixins/EditBusLayer.d.ts +3 -5
- package/layers/mixins/ImageryTileMixin.d.ts +2 -4
- package/layers/mixins/RasterJobHandlerMixin.js +1 -1
- package/layers/mixins/ScaleRange.d.ts +11 -2
- package/layers/mixins/properties/ILayerWithGetFeatureTitle.d.ts +11 -2
- package/layers/mixins/properties/ILayerWithGetField.d.ts +6 -1
- package/layers/ogc/ogcFeatureUtils.d.ts +2 -0
- package/layers/ogc/types.d.ts +55 -10
- package/layers/ogc/wcsUtils.d.ts +1 -0
- package/layers/ogc/wfsUtils.d.ts +8 -17
- package/layers/orientedImagery/core/ElevationSourceDefinitions.d.ts +6 -1
- package/layers/orientedImagery/transformations/types.d.ts +117 -21
- package/layers/orientedImagery/types.d.ts +37 -6
- package/layers/pointCloudFilters/typeUtils.d.ts +1 -0
- package/layers/raster/datasets/TIFFRaster.js +1 -1
- package/layers/raster/datasets/pixelReader.d.ts +2 -0
- package/layers/raster/datasets/types.d.ts +1 -0
- package/layers/raster/datasets/wcsCapabilitiesParser.d.ts +86 -17
- package/layers/raster/datasets/wcsCoverageParser.d.ts +601 -115
- package/layers/raster/formats/ImageCanvasDecoder.js +1 -1
- package/layers/raster/formats/JpgPlus.js +1 -1
- package/layers/raster/formats/RasterCodec.js +1 -1
- package/layers/raster/formats/Raw.js +1 -1
- package/layers/raster/formats/TiffDecoder.js +1 -1
- package/layers/raster/functions/changeDetectionUtils.d.ts +1 -0
- package/layers/raster/functions/creators/createAppearenceFunctions.d.ts +82 -15
- package/layers/raster/functions/creators/createBandIndexFunctions.d.ts +380 -70
- package/layers/raster/functions/creators/createChangeFunctions.d.ts +11 -2
- package/layers/raster/functions/creators/createConversionFunctions.d.ts +18 -3
- package/layers/raster/functions/creators/createDataManagementFunctions.d.ts +179 -35
- package/layers/raster/functions/creators/createLocalFunctions.d.ts +47 -9
- package/layers/raster/functions/creators/createMultiRasterAnalysisFunctions.d.ts +47 -9
- package/layers/raster/functions/creators/createStatisticsFunctions.d.ts +42 -8
- package/layers/raster/functions/creators/createSurfaceFunctions.d.ts +72 -11
- package/layers/raster/functions/focalStatUtils.d.ts +1 -0
- package/layers/raster/functions/rasterProjectionHelper.js +1 -1
- package/layers/raster/functions/types.d.ts +29 -5
- package/layers/raster/types.d.ts +498 -6
- package/layers/support/BuildingFilterBlock.d.ts +19 -3
- package/layers/support/BuildingFilterMode.d.ts +1 -0
- package/layers/support/BuildingFilterModeSolid.d.ts +7 -1
- package/layers/support/BuildingFilterModeWireFrame.d.ts +17 -3
- package/layers/support/BuildingFilterModeXRay.d.ts +7 -1
- package/layers/support/CodedValue.d.ts +16 -3
- package/layers/support/ControlPoint.d.ts +17 -3
- package/layers/support/EditFieldsInfo.d.ts +21 -4
- package/layers/support/EditingCapabilities.d.ts +36 -7
- package/layers/support/ElevationTileData.d.ts +25 -5
- package/layers/support/FieldFormat.d.ts +1 -0
- package/layers/support/GeoreferenceBase.d.ts +1 -0
- package/layers/support/KMLMapImage.d.ts +13 -2
- package/layers/support/LabelExpressionInfo.d.ts +9 -1
- package/layers/support/MosaicRule.d.ts +41 -1
- package/layers/support/ParquetGeometryEncodingLocation.d.ts +13 -2
- package/layers/support/ParquetGeometryEncodingWkb.d.ts +7 -0
- package/layers/support/PixelBlock.d.ts +9 -4
- package/layers/support/PurgeOptions.d.ts +15 -2
- package/layers/support/RasterInfo.d.ts +1 -2
- package/layers/support/RasterJobHandler.js +1 -1
- package/layers/support/RasterWorker.js +1 -1
- package/layers/support/SpriteSource.d.ts +28 -6
- package/layers/support/rasterFunctionConstants.d.ts +39 -0
- package/layers/support/types.d.ts +420 -225
- package/layers/types.d.ts +771 -196
- package/layers/video/types.d.ts +72 -14
- package/layers/voxel/VoxelColorStop.d.ts +17 -3
- package/layers/voxel/VoxelFormat.d.ts +15 -2
- package/layers/voxel/VoxelIsosurface.d.ts +17 -2
- package/layers/voxel/VoxelOpacityStop.d.ts +8 -1
- package/layers/voxel/VoxelRangeFilter.d.ts +12 -2
- package/layers/voxel/VoxelUniqueValue.d.ts +19 -3
- package/layers/wms/types.d.ts +104 -19
- package/layers/wmts/types.d.ts +1 -0
- package/linkChart/ChronologicalLayoutSettings.d.ts +1 -1
- package/linkChart/OrganicLayoutSettings.d.ts +1 -1
- package/linkChart/types.d.ts +2 -0
- package/networks/UtilityNetworkTraceAnalysis.d.ts +61 -10
- package/networks/support/jsonTypes.d.ts +373 -71
- package/networks/support/typeUtils.d.ts +10 -0
- package/networks/support/utils.d.ts +30 -6
- package/package.json +1 -1
- package/popup/content/types.d.ts +1 -0
- package/popup/types.d.ts +33 -5
- package/portal/jsonTypes.d.ts +231 -39
- package/portal/support/resourceUtils.d.ts +49 -9
- package/portal/types.d.ts +98 -14
- package/renderers/FlowRenderer.js +1 -1
- package/renderers/RasterStretchRenderer.d.ts +1 -1
- package/renderers/support/AuthoringInfoClassBreakInfo.d.ts +4 -0
- package/renderers/support/AuthoringInfoFieldInfo.d.ts +15 -2
- package/renderers/support/DotDensityLegendOptions.d.ts +4 -0
- package/renderers/support/HeatmapLegendOptions.d.ts +8 -0
- package/renderers/support/OthersCategory.d.ts +6 -0
- package/renderers/support/RendererLegendOptions.d.ts +14 -2
- package/renderers/support/pointCloud/ColorClassBreakInfo.d.ts +13 -1
- package/renderers/support/pointCloud/ColorModulation.d.ts +6 -0
- package/renderers/support/pointCloud/ColorUniqueValueInfo.d.ts +19 -3
- package/renderers/support/pointCloud/PointSizeAlgorithm.d.ts +1 -0
- package/renderers/support/pointCloud/PointSizeFixedSizeAlgorithm.d.ts +14 -2
- package/renderers/support/pointCloud/PointSizeSplatAlgorithm.d.ts +9 -1
- package/renderers/support/pointCloud/types.d.ts +7 -1
- package/renderers/support/raster/types.d.ts +22 -2
- package/renderers/support/types.d.ts +29 -2
- package/renderers/types.d.ts +47 -4
- package/renderers/visualVariables/support/SizeVariableLegendOptions.d.ts +4 -0
- package/renderers/visualVariables/support/VisualVariableLegendOptions.d.ts +9 -1
- package/request/types.d.ts +152 -24
- package/rest/featureService/types.d.ts +423 -77
- package/rest/geometryService/types.d.ts +23 -1
- package/rest/imageService.d.ts +5 -5
- package/rest/knowledgeGraph/DataModel.d.ts +2 -2
- package/rest/knowledgeGraph/GraphAnyValue.d.ts +1 -0
- package/rest/knowledgeGraph/GraphDataModelSingletonOperationResult.d.ts +12 -2
- package/rest/knowledgeGraph/GraphDeleteNamedTypeResult.d.ts +1 -1
- package/rest/knowledgeGraph/GraphDeletePropertyResult.d.ts +1 -1
- package/rest/knowledgeGraph/GraphQuery.d.ts +1 -1
- package/rest/knowledgeGraph/GraphSearch.d.ts +3 -3
- package/rest/knowledgeGraph/GraphSearchStreaming.d.ts +3 -3
- package/rest/knowledgeGraph/SearchIndex.d.ts +1 -1
- package/rest/knowledgeGraph/toolService/findPaths/CIMFilteredFindPathsPathFilter.d.ts +3 -3
- package/rest/knowledgeGraph/toolService/findPaths/CIMFilteredFindPathsResultJSON.d.ts +151 -29
- package/rest/knowledgeGraph/toolService/findPaths/CIMKGTraversalDirection.d.ts +1 -1
- package/rest/knowledgeGraph/wasmInterface/KnowledgeWasmInterface.d.ts +1 -0
- package/rest/knowledgeGraph/wasmInterface/WasmDataModelWrapperInterfaces.d.ts +9 -0
- package/rest/knowledgeGraphService.d.ts +4 -4
- package/rest/lastMileDelivery/types.d.ts +5 -0
- package/rest/layerSources/DynamicDataLayer.d.ts +12 -0
- package/rest/layerSources/DynamicMapLayer.d.ts +14 -2
- package/rest/layerSources/JoinTableDataSource.d.ts +21 -2
- package/rest/layerSources/QueryTableDataSource.d.ts +32 -5
- package/rest/layerSources/RasterDataSource.d.ts +17 -3
- package/rest/layerSources/TableDataSource.d.ts +22 -4
- package/rest/networks/circuits/support/ExportCircuitsParameters.d.ts +8 -1
- package/rest/networks/circuits/support/QueryCircuitsParameters.d.ts +18 -3
- package/rest/networks/support/QueryNamedTraceConfigurationsParameters.d.ts +22 -4
- package/rest/query/support/AttachmentInfo.d.ts +1 -1
- package/rest/support/AddressToLocationsParameters.d.ts +39 -3
- package/rest/support/AddressesToLocationsParameters.d.ts +14 -0
- package/rest/support/BaseImageMeasureResultValue.d.ts +21 -4
- package/rest/support/DirectionsString.d.ts +16 -3
- package/rest/support/ImageMeasureResultAngleValue.d.ts +12 -2
- package/rest/support/ImageMeasureResultAreaValue.d.ts +12 -2
- package/rest/support/ImageMeasureResultLengthValue.d.ts +12 -2
- package/rest/support/LocateSetting.d.ts +12 -2
- package/rest/support/LocateSettingBase.d.ts +14 -2
- package/rest/support/LocateSettingSource.d.ts +12 -2
- package/rest/support/LocateSettings.d.ts +22 -4
- package/rest/support/LocateSettingsOverrides.d.ts +42 -8
- package/rest/support/LocationToAddressParameters.d.ts +7 -0
- package/rest/support/NetworkAttribute.d.ts +11 -2
- package/rest/support/NetworkServiceDescription.d.ts +20 -4
- package/rest/support/QuantizationParameters.d.ts +9 -0
- package/rest/support/SuggestLocationsParameters.d.ts +10 -0
- package/rest/support/SuggestionCandidate.d.ts +14 -2
- package/rest/support/types.d.ts +53 -3
- package/rest/types.d.ts +50 -5
- package/rest/versionManagement/gdbVersion/support/AlterVersionParameters.d.ts +22 -4
- package/rest/versionManagement/gdbVersion/support/PostResult.d.ts +6 -1
- package/rest/versionManagement/gdbVersion/support/ReconcileParameters.d.ts +10 -1
- package/rest/versionManagement/gdbVersion/support/ReconcileResult.d.ts +8 -1
- package/rest/versionManagement/support/CreateVersionParameters.d.ts +13 -2
- package/rest/versionManagement/support/GetVersionInfosParameters.d.ts +8 -1
- package/smartMapping/heuristics/types.d.ts +50 -6
- package/smartMapping/popup/types.d.ts +29 -5
- package/smartMapping/raster/renderers/types.d.ts +12 -1
- package/smartMapping/raster/support/adapters/types.d.ts +1 -0
- package/smartMapping/renderers/color.d.ts +9 -3
- package/smartMapping/renderers/dotDensity.d.ts +3 -1
- package/smartMapping/renderers/heatmap.d.ts +3 -1
- package/smartMapping/renderers/location.d.ts +3 -1
- package/smartMapping/renderers/opacity.d.ts +3 -1
- package/smartMapping/renderers/pieChart.d.ts +3 -1
- package/smartMapping/renderers/predominance.d.ts +3 -1
- package/smartMapping/renderers/relationship.d.ts +3 -1
- package/smartMapping/renderers/size.d.ts +23 -7
- package/smartMapping/renderers/support/rendererUtils.d.ts +3 -1
- package/smartMapping/renderers/type.d.ts +3 -1
- package/smartMapping/renderers/univariateColorSize.d.ts +3 -1
- package/smartMapping/statistics/types.d.ts +16 -4
- package/smartMapping/symbology/type.d.ts +5 -1
- package/smartMapping/symbology/types.d.ts +1303 -241
- package/smartMapping/types.d.ts +5 -0
- package/statistics/types.d.ts +13 -2
- package/support/revision.js +1 -1
- package/symbols/callouts/LineCallout3DBorder.d.ts +4 -0
- package/symbols/cim/types.d.ts +764 -111
- package/symbols/patterns/LinePattern3D.d.ts +1 -0
- package/symbols/patterns/Pattern3D.d.ts +1 -0
- package/symbols/support/IconSymbol3DLayerResource.d.ts +7 -0
- package/symbols/support/ObjectSymbol3DLayerResource.d.ts +7 -0
- package/symbols/support/OccludedVisibility.d.ts +3 -0
- package/symbols/support/Symbol3DAnchorPosition2D.d.ts +4 -0
- package/symbols/support/Symbol3DAnchorPosition3D.d.ts +5 -0
- package/symbols/support/Symbol3DFillMaterial.d.ts +4 -0
- package/symbols/support/Symbol3DHalo.d.ts +10 -0
- package/symbols/support/Symbol3DIconOutline.d.ts +10 -0
- package/symbols/support/Symbol3DMaterial.d.ts +6 -0
- package/symbols/support/Symbol3DOutline.d.ts +21 -2
- package/symbols/support/Symbol3DTextBackground.d.ts +12 -2
- package/symbols/support/symbolUtils.d.ts +5 -1
- package/symbols/support/types.d.ts +4 -0
- package/symbols/types.d.ts +67 -7
- package/tables/AttributeTableTemplate.d.ts +2 -2
- package/tables/elements/AttributeTableAttachmentElement.d.ts +1 -1
- package/tables/elements/AttributeTableElement.d.ts +2 -2
- package/tables/elements/AttributeTableFieldElement.d.ts +1 -1
- package/tables/elements/AttributeTableGroupElement.d.ts +1 -1
- package/tables/elements/AttributeTableRelationshipElement.d.ts +1 -1
- package/tables/support/FieldOrder.d.ts +16 -3
- package/tables/support/tablesUtils.d.ts +1 -0
- package/time/types.d.ts +4 -0
- package/versionManagement/VersionManagementService.d.ts +3 -6
- package/versionManagement/VersionManager.d.ts +126 -23
- package/versionManagement/VersioningState.d.ts +1 -1
- package/versionManagement/support/jsonTypes.d.ts +152 -30
- package/versionManagement/support/type.d.ts +2 -0
- package/versionManagement/versionAdapters/types.d.ts +25 -5
- package/views/2d/MapViewConstraints.d.ts +37 -5
- package/views/2d/analysis/AnalysisView2D.d.ts +5 -1
- package/views/2d/analysis/AreaMeasurementAnalysisView2D.d.ts +28 -4
- package/views/2d/analysis/DistanceMeasurementAnalysisView2D.d.ts +28 -4
- package/views/2d/analysis/types.d.ts +5 -1
- package/views/2d/engine/flow/BrushFlow.js +1 -1
- package/views/2d/engine/flow/FlowDisplayObject.js +1 -1
- package/views/2d/engine/flow/FlowStrategy.js +1 -1
- package/views/2d/engine/flow/FlowView2D.js +1 -1
- package/views/2d/engine/flow/ProcessingTimeEstimate.js +5 -0
- package/views/2d/engine/flow/animatedValues.js +5 -0
- package/views/2d/engine/flow/dataUtils.js +1 -1
- package/views/2d/engine/flow/flowPathsIO.js +5 -0
- package/views/2d/engine/flow/styles/AFlowResources.js +5 -0
- package/views/2d/engine/flow/styles/Imagery.js +1 -1
- package/views/2d/engine/flow/styles/Particles.js +1 -1
- package/views/2d/engine/flow/styles/Stack.js +1 -1
- package/views/2d/engine/flow/styles/Streamlines.js +1 -1
- package/views/2d/engine/flow/utils.js +1 -1
- package/views/2d/engine/vectorTiles/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/layers/support/MediaLayerInteractionOptions.d.ts +1 -0
- package/views/2d/layers/types.d.ts +1 -0
- package/views/2d/types.d.ts +93 -6
- package/views/3d/analysis/AnalysisView3D.d.ts +5 -1
- package/views/3d/analysis/DirectLineMeasurement/types.d.ts +24 -4
- package/views/3d/analysis/LineOfSight/types.d.ts +1 -0
- package/views/3d/analysis/ShadowCastAnalysisView3D.d.ts +19 -3
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillVisualization.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/types.d.ts +5 -1
- package/views/3d/analysis/types.d.ts +25 -3
- package/views/3d/constraints/AltitudeConstraint.d.ts +5 -0
- package/views/3d/constraints/ClipDistanceConstraint.d.ts +13 -2
- package/views/3d/constraints/Constraints.d.ts +26 -4
- package/views/3d/constraints/TiltConstraint.d.ts +5 -0
- package/views/3d/environment/SceneViewEnvironment.d.ts +9 -0
- package/views/3d/environment/types.d.ts +3 -0
- package/views/3d/layers/ImageryLayerView3D.js +1 -1
- package/views/3d/layers/support/MediaLayerInteractionOptions.d.ts +15 -2
- package/views/3d/layers/support/MediaLayerInteractionReshapeOptions.d.ts +3 -0
- package/views/3d/types.d.ts +52 -0
- package/views/3d/webgl/ManagedColorAttachment.d.ts +2 -0
- package/views/3d/webgl/ManagedDepthAttachment.d.ts +2 -0
- package/views/3d/webgl/ManagedFBO.d.ts +4 -0
- package/views/3d/webgl/ManagedFBOAttachment.d.ts +1 -0
- package/views/3d/webgl/ManagedFBOResource.d.ts +5 -0
- package/views/3d/webgl/types.d.ts +32 -6
- package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js +20 -22
- package/views/3d/webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js +9 -5
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/TerrainTexture.glsl.js +8 -6
- package/views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js +9 -8
- package/views/MapViewOrSceneView.d.ts +1 -0
- package/views/SceneView.d.ts +59 -0
- package/views/SceneView.js +1 -1
- package/views/View.d.ts +2 -2
- package/views/View2D.d.ts +37 -0
- package/views/View2D.js +1 -1
- package/views/Viewport2DMixin.d.ts +9 -6
- package/views/analysis/AnalysisView.d.ts +2 -0
- package/views/analysis/AreaMeasurement/types.d.ts +18 -3
- package/views/analysis/DistanceMeasurement/types.d.ts +13 -2
- package/views/analysis/types.d.ts +7 -1
- package/views/animation/easing.js +1 -1
- package/views/animation/types.d.ts +3 -4
- package/views/draw/CursorUpdateEvent.d.ts +24 -4
- package/views/draw/DrawAction.d.ts +4 -6
- package/views/draw/DrawCompleteEvent.d.ts +18 -3
- package/views/draw/VertexAddEvent.d.ts +19 -3
- package/views/draw/VertexRemoveEvent.d.ts +19 -3
- package/views/draw/types.d.ts +4 -0
- package/views/input/types.d.ts +371 -57
- package/views/interactive/sketch/SketchTooltipVisibleElements.d.ts +19 -1
- package/views/interactive/sketch/Units.d.ts +5 -0
- package/views/interactive/tooltip/types.d.ts +2 -0
- package/views/layers/HighlightLayerViewMixin.d.ts +59 -1
- package/views/layers/HighlightLayerViewMixin.js +1 -1
- package/views/layers/ImageryLayerViewMixin.d.ts +60 -2
- package/views/layers/ImageryTileLayerViewMixin.d.ts +2 -0
- package/views/layers/LayerView.d.ts +6 -0
- package/views/layers/MediaLayerViewMixin.d.ts +8 -1
- package/views/layers/types.d.ts +3 -0
- package/views/navigation/types.d.ts +6 -1
- package/views/support/AttributionItem.d.ts +10 -2
- package/views/types.d.ts +306 -53
- package/views/ui/types.d.ts +42 -6
- package/webdoc/Widgets.d.ts +26 -5
- package/webdoc/geotriggersInfo/support/typeUtils.d.ts +3 -0
- package/webdoc/support/SlideThumbnail.d.ts +4 -0
- package/webdoc/support/types.d.ts +11 -2
- package/webdoc/support/webdocSaveUtils.d.ts +6 -0
- package/webdoc/widgets/FloorFilter.d.ts +25 -4
- package/webmap/Version.d.ts +1 -0
- package/webscene/Version.d.ts +1 -0
- package/webscene/support/Description.d.ts +3 -0
- package/webscene/support/SlideEnvironment.d.ts +6 -0
- package/webscene/support/SlideGround.d.ts +7 -1
- package/webscene/support/SlideVisibleLayer.d.ts +5 -0
- package/webscene/support/Title.d.ts +3 -0
- package/widgets/Attachments/types.d.ts +32 -6
- package/widgets/BasemapGallery/types.d.ts +3 -0
- package/widgets/BasemapLayerList/BasemapLayerListVisibleElements.d.ts +14 -0
- package/widgets/BasemapLayerList/types.d.ts +1 -0
- package/widgets/BatchAttributeForm/VisibleElements.d.ts +7 -1
- package/widgets/BatchAttributeForm/inputs/SingleFeatureInput.d.ts +2 -0
- package/widgets/BatchAttributeForm/inputs/TextElementInput.d.ts +14 -2
- package/widgets/BatchAttributeForm/inputs/types.d.ts +2 -0
- package/widgets/BatchAttributeForm/types.d.ts +75 -14
- package/widgets/BatchAttributeForm.d.ts +2 -2
- package/widgets/Bookmarks/BookmarksVisibleElements.d.ts +30 -9
- package/widgets/Bookmarks/types.d.ts +32 -10
- package/widgets/CatalogLayerList/CatalogLayerListVisibleElements.d.ts +11 -0
- package/widgets/CatalogLayerList/types.d.ts +1 -0
- package/widgets/Daylight/VisibleElements.d.ts +11 -1
- package/widgets/Daylight/types.d.ts +8 -2
- package/widgets/DirectionalPad/VisibleElements.d.ts +6 -0
- package/widgets/DirectionalPad/types.d.ts +13 -2
- package/widgets/Directions/DirectionsVisibleElements.d.ts +8 -0
- package/widgets/Editor/CreateFeaturesWorkflowData.d.ts +3 -3
- package/widgets/Editor/EditorViewModel.d.ts +2 -3
- package/widgets/Editor/Edits.d.ts +1 -2
- package/widgets/Editor/SplitFeatureWorkflow.d.ts +2 -2
- package/widgets/Editor/VisibleElements.d.ts +46 -13
- package/widgets/Editor/support/EditorEditingCapabilities.d.ts +46 -9
- package/widgets/Editor/types.d.ts +149 -24
- package/widgets/ElevationProfile/ElevationProfileVisibleElements.d.ts +13 -1
- package/widgets/ElevationProfile/types.d.ts +87 -14
- package/widgets/Expand.d.ts +2 -2
- package/widgets/Feature/types.d.ts +105 -18
- package/widgets/FeatureForm/GroupInput.d.ts +1 -1
- package/widgets/FeatureForm/RelationshipInput.d.ts +1 -1
- package/widgets/FeatureForm/TextElementInput.d.ts +3 -5
- package/widgets/FeatureForm/UtilityNetworkAssociationInput.d.ts +1 -1
- package/widgets/FeatureForm/VisibleElements.d.ts +7 -1
- package/widgets/FeatureForm/types.d.ts +3 -0
- package/widgets/FeatureForm.d.ts +1 -1
- package/widgets/FeatureTable/ColumnMenuVisibleElements.d.ts +4 -0
- package/widgets/FeatureTable/FeatureTableViewModel.d.ts +14 -4
- package/widgets/FeatureTable/Grid/Column.d.ts +1 -1
- package/widgets/FeatureTable/Grid/GridViewModel.d.ts +2 -0
- package/widgets/FeatureTable/Grid/types.d.ts +137 -24
- package/widgets/FeatureTable/TableMenuVisibleElements.d.ts +10 -0
- package/widgets/FeatureTable/VisibleElements.d.ts +16 -2
- package/widgets/FeatureTable/support/ColumnTemplateBase.d.ts +1 -1
- package/widgets/FeatureTable/support/types.d.ts +155 -27
- package/widgets/FeatureTable.d.ts +3 -3
- package/widgets/FeatureTemplates/VisibleElements.d.ts +4 -0
- package/widgets/FeatureTemplates/types.d.ts +17 -2
- package/widgets/Features/FeaturesVisibleElements.d.ts +12 -0
- package/widgets/FloorFilter/FloorFilterViewModel.js +1 -1
- package/widgets/Histogram/types.d.ts +14 -2
- package/widgets/HistogramRangeSlider/types.d.ts +1 -0
- package/widgets/LayerList/LayerListVisibleElements.d.ts +10 -0
- package/widgets/LayerList/types.d.ts +8 -0
- package/widgets/Legend/styles/card/CardView.d.ts +13 -2
- package/widgets/Legend/styles/classic/ClassicView.d.ts +11 -2
- package/widgets/Measurement/types.d.ts +3 -0
- package/widgets/OrientedImageryViewer/types.d.ts +15 -3
- package/widgets/Popup/PopupVisibleElements.d.ts +11 -0
- package/widgets/Popup/types.d.ts +64 -7
- package/widgets/Print/FileLink.d.ts +36 -6
- package/widgets/Print/types.d.ts +77 -13
- package/widgets/ScaleRangeSlider/types.d.ts +4 -0
- package/widgets/ScaleRangeSlider.d.ts +5 -1
- package/widgets/ShadowCast/ShadowCastVisibleElements.d.ts +15 -1
- package/widgets/ShadowCast/types.d.ts +8 -2
- package/widgets/Sketch/CreateToolVisibilityMap.d.ts +19 -4
- package/widgets/Sketch/SelectionToolVisibilityMap.d.ts +4 -0
- package/widgets/Sketch/VisibleElements.d.ts +38 -6
- package/widgets/Sketch/types.d.ts +364 -60
- package/widgets/Slider/types.d.ts +249 -46
- package/widgets/Swipe/types.d.ts +6 -0
- package/widgets/TableList/TableListVisibleElements.d.ts +11 -0
- package/widgets/TableList/types.d.ts +5 -0
- package/widgets/TimeSlider/types.d.ts +45 -7
- package/widgets/Track/types.d.ts +4 -1
- package/widgets/UtilityNetworkAssociations/VisibleElements.d.ts +23 -4
- package/widgets/UtilityNetworkAssociations/VisibleElementsSettingsPane.d.ts +7 -0
- package/widgets/UtilityNetworkTrace/types.d.ts +26 -5
- package/widgets/ValuePicker/ValuePickerBaseComponent.d.ts +2 -0
- package/widgets/ValuePicker/ValuePickerSliderVisibleElements.d.ts +7 -1
- package/widgets/ValuePicker/ValuePickerVisibleElements.d.ts +9 -1
- package/widgets/ValuePicker/types.d.ts +8 -0
- package/widgets/Weather/VisibleElements.d.ts +6 -1
- package/widgets/Weather/types.d.ts +1 -0
- package/widgets/smartMapping/types.d.ts +63 -6
- package/widgets/support/GridControls/VisibleElements.d.ts +11 -0
- package/widgets/support/GridControls/types.d.ts +1 -0
- package/widgets/support/SnappingControls/VisibleElements.d.ts +26 -4
- package/widgets/support/forms/types.d.ts +2 -0
- package/widgets/support/types.d.ts +19 -3
- package/widgets/types.d.ts +549 -89
- package/assets/esri/core/workers/chunks/329b10897c6965948b84.js +0 -1
- package/assets/esri/core/workers/chunks/35593a9790818b689455.js +0 -1
- package/assets/esri/core/workers/chunks/98d68b145226e7527c84.js +0 -33
- package/views/2d/engine/flow/FlowDisplayData.js +0 -5
|
@@ -6,6 +6,7 @@ import type { PolygonProperties } from "../../geometry/Polygon.js";
|
|
|
6
6
|
import type { ExtentProperties } from "../../geometry/Extent.js";
|
|
7
7
|
import type { LODProperties } from "../../layers/support/LOD.js";
|
|
8
8
|
|
|
9
|
+
/** @since 5.0 */
|
|
9
10
|
export interface MapViewConstraintsProperties extends Partial<Pick<MapViewConstraints, "maxScale" | "maxZoom" | "minScale" | "minZoom" | "rotationEnabled" | "snapToZoom">> {
|
|
10
11
|
/**
|
|
11
12
|
* The area in which the user is allowed to navigate laterally. Only [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) and [Polygon](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html) geometry types are supported. Z-values are ignored. This property is honored by interactive [MapView navigation](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-MapViewConstraints.html#mapview-navigation) and [MapView#goTo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#goTo). This property may be [autocast](https://developers.arcgis.com/javascript/latest/autocasting/).
|
|
@@ -17,20 +18,43 @@ export interface MapViewConstraintsProperties extends Partial<Pick<MapViewConstr
|
|
|
17
18
|
* An array of [LODs](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LOD.html). If not specified, this value is read from the [Map](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html). It is possible to generate additional LODs via the
|
|
18
19
|
* [TileInfo#create()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-TileInfo.html#create) method. This is useful in cases where the default amount of LODs provided are not sufficient. One example of when
|
|
19
20
|
* this is needed is when setting the view scale 1:1. Additionally, this property may be [autocast](https://developers.arcgis.com/javascript/latest/autocasting/).
|
|
21
|
+
*
|
|
22
|
+
* @since 5.0
|
|
20
23
|
*/
|
|
21
24
|
lods?: LODProperties[] | null;
|
|
22
25
|
}
|
|
23
26
|
|
|
27
|
+
/** @since 5.0 */
|
|
24
28
|
export default abstract class MapViewConstraints extends Accessor {
|
|
25
|
-
/**
|
|
29
|
+
/**
|
|
30
|
+
* A read-only property that specifies the levels of detail (LODs) read from the [Map](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html).
|
|
31
|
+
*
|
|
32
|
+
* @since 5.0
|
|
33
|
+
*/
|
|
26
34
|
get effectiveLODs(): LOD[] | null;
|
|
27
|
-
/**
|
|
35
|
+
/**
|
|
36
|
+
* A read-only property that specifies the maximum [scale](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#scale) the user is allowed to zoom to within the view.
|
|
37
|
+
*
|
|
38
|
+
* @since 5.0
|
|
39
|
+
*/
|
|
28
40
|
get effectiveMaxScale(): number;
|
|
29
|
-
/**
|
|
41
|
+
/**
|
|
42
|
+
* A read-only property that specifies the maximum [zoom](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#zoom) level the user is allowed to zoom to within the view.
|
|
43
|
+
*
|
|
44
|
+
* @since 5.0
|
|
45
|
+
*/
|
|
30
46
|
get effectiveMaxZoom(): number;
|
|
31
|
-
/**
|
|
47
|
+
/**
|
|
48
|
+
* A read-only property that specifies the minimum [scale](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#scale) the user is allowed to zoom to within the view.
|
|
49
|
+
*
|
|
50
|
+
* @since 5.0
|
|
51
|
+
*/
|
|
32
52
|
get effectiveMinScale(): number;
|
|
33
|
-
/**
|
|
53
|
+
/**
|
|
54
|
+
* A read-only property that specifies the minimum [zoom](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#zoom) level the user is allowed to zoom to within the view.
|
|
55
|
+
*
|
|
56
|
+
* @since 5.0
|
|
57
|
+
*/
|
|
34
58
|
get effectiveMinZoom(): number;
|
|
35
59
|
/**
|
|
36
60
|
* The area in which the user is allowed to navigate laterally. Only [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) and [Polygon](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html) geometry types are supported. Z-values are ignored. This property is honored by interactive [MapView navigation](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-MapViewConstraints.html#mapview-navigation) and [MapView#goTo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#goTo). This property may be [autocast](https://developers.arcgis.com/javascript/latest/autocasting/).
|
|
@@ -43,6 +67,8 @@ export default abstract class MapViewConstraints extends Accessor {
|
|
|
43
67
|
* An array of [LODs](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LOD.html). If not specified, this value is read from the [Map](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html). It is possible to generate additional LODs via the
|
|
44
68
|
* [TileInfo#create()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-TileInfo.html#create) method. This is useful in cases where the default amount of LODs provided are not sufficient. One example of when
|
|
45
69
|
* this is needed is when setting the view scale 1:1. Additionally, this property may be [autocast](https://developers.arcgis.com/javascript/latest/autocasting/).
|
|
70
|
+
*
|
|
71
|
+
* @since 5.0
|
|
46
72
|
*/
|
|
47
73
|
get lods(): LOD[] | null;
|
|
48
74
|
set lods(value: LODProperties[] | null);
|
|
@@ -50,36 +76,42 @@ export default abstract class MapViewConstraints extends Accessor {
|
|
|
50
76
|
* The maximum [scale](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#scale) the user is allowed to zoom to within the view. Setting this value to `0` allows the user to overzoom layer tiles.
|
|
51
77
|
*
|
|
52
78
|
* @default 0
|
|
79
|
+
* @since 5.0
|
|
53
80
|
*/
|
|
54
81
|
accessor maxScale: number;
|
|
55
82
|
/**
|
|
56
83
|
* The maximum [zoom](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#zoom) level the user is allowed to zoom to within the view. Setting this value to `0` allows the user to over-zoom layer tiles.
|
|
57
84
|
*
|
|
58
85
|
* @default -1
|
|
86
|
+
* @since 5.0
|
|
59
87
|
*/
|
|
60
88
|
accessor maxZoom: number;
|
|
61
89
|
/**
|
|
62
90
|
* The minimum [scale](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#scale) the user is allowed to zoom to within the view.
|
|
63
91
|
*
|
|
64
92
|
* @default 0
|
|
93
|
+
* @since 5.0
|
|
65
94
|
*/
|
|
66
95
|
accessor minScale: number;
|
|
67
96
|
/**
|
|
68
97
|
* The minimum [zoom](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#zoom) level the user is allowed to zoom to within the view.
|
|
69
98
|
*
|
|
70
99
|
* @default -1
|
|
100
|
+
* @since 5.0
|
|
71
101
|
*/
|
|
72
102
|
accessor minZoom: number;
|
|
73
103
|
/**
|
|
74
104
|
* Indicates whether the user can rotate the map.
|
|
75
105
|
*
|
|
76
106
|
* @default true
|
|
107
|
+
* @since 5.0
|
|
77
108
|
*/
|
|
78
109
|
accessor rotationEnabled: boolean;
|
|
79
110
|
/**
|
|
80
111
|
* When `true`, the view snaps to the next LOD when zooming in or out. When `false`, the zoom is continuous. This does not apply when zooming in/out using two finger pinch in/out.
|
|
81
112
|
*
|
|
82
113
|
* @default true
|
|
114
|
+
* @since 5.0
|
|
83
115
|
*/
|
|
84
116
|
accessor snapToZoom: boolean;
|
|
85
117
|
}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import type MapView from "../../MapView.js";
|
|
2
2
|
import type AnalysisView from "../../analysis/AnalysisView.js";
|
|
3
3
|
|
|
4
|
-
/**
|
|
4
|
+
/**
|
|
5
|
+
* Base class for 2D analysis views.
|
|
6
|
+
*
|
|
7
|
+
* @since 5.0
|
|
8
|
+
*/
|
|
5
9
|
export default abstract class AnalysisView2D extends AnalysisView<MapView> {}
|
|
@@ -31,37 +31,60 @@ import type { SnappingOptionsProperties } from "../../interactive/snapping/Snapp
|
|
|
31
31
|
* @since 5.0
|
|
32
32
|
*/
|
|
33
33
|
export default abstract class AreaMeasurementAnalysisView2D extends AnalysisView2D {
|
|
34
|
-
/**
|
|
34
|
+
/**
|
|
35
|
+
* The area measurement analysis associated with the analysis view.
|
|
36
|
+
*
|
|
37
|
+
* @since 5.0
|
|
38
|
+
*/
|
|
35
39
|
get analysis(): AreaMeasurementAnalysis;
|
|
36
40
|
/**
|
|
37
41
|
* Enables interactivity for the [analysis](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-analysis-AreaMeasurementAnalysisView2D.html#analysis). When set to `true` the input geometry can be edited interactively.
|
|
38
42
|
*
|
|
39
43
|
* @default false
|
|
44
|
+
* @since 5.0
|
|
40
45
|
*/
|
|
41
46
|
accessor interactive: boolean;
|
|
42
47
|
/**
|
|
43
48
|
* Result of the area measurement analysis. Result objects are created immediately but they are gradually updated as
|
|
44
49
|
* the analysis is computed.
|
|
50
|
+
*
|
|
51
|
+
* @since 5.0
|
|
45
52
|
*/
|
|
46
53
|
get result(): AreaMeasurementResult | null | undefined;
|
|
47
54
|
/**
|
|
48
55
|
* The [SnappingOptions](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-interactive-snapping-SnappingOptions.html) for sketching.
|
|
49
56
|
* It supports [self](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-interactive-snapping-SnappingOptions.html#selfEnabled) and
|
|
50
57
|
* [feature](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-interactive-snapping-SnappingOptions.html#featureEnabled) snapping.
|
|
58
|
+
*
|
|
59
|
+
* @since 5.0
|
|
51
60
|
*/
|
|
52
61
|
get snappingOptions(): SnappingOptions;
|
|
53
62
|
set snappingOptions(value: SnappingOptionsProperties);
|
|
54
|
-
/**
|
|
63
|
+
/**
|
|
64
|
+
* The analysis view type.
|
|
65
|
+
*
|
|
66
|
+
* @since 5.0
|
|
67
|
+
*/
|
|
55
68
|
get type(): "area-measurement-view-2d";
|
|
56
69
|
/**
|
|
57
70
|
* Unit system (imperial, metric) or specific unit used for displaying the computed area in the view. This value is
|
|
58
71
|
* useful when [AreaMeasurementAnalysis#unit](https://developers.arcgis.com/javascript/latest/api-reference/esri-analysis-AreaMeasurementAnalysis.html#unit) is not explicitly set on the
|
|
59
72
|
* [analysis](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-analysis-AreaMeasurementAnalysisView2D.html#analysis).
|
|
73
|
+
*
|
|
74
|
+
* @since 5.0
|
|
60
75
|
*/
|
|
61
76
|
get unit(): SystemOrAreaUnit;
|
|
62
|
-
/**
|
|
77
|
+
/**
|
|
78
|
+
* This property is `true` when the analysis is recomputing or updating its visualization.
|
|
79
|
+
*
|
|
80
|
+
* @since 5.0
|
|
81
|
+
*/
|
|
63
82
|
get updating(): boolean;
|
|
64
|
-
/**
|
|
83
|
+
/**
|
|
84
|
+
* When `true`, the [analysis](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-analysis-AreaMeasurementAnalysisView2D.html#analysis) is visualized in the view.
|
|
85
|
+
*
|
|
86
|
+
* @since 5.0
|
|
87
|
+
*/
|
|
65
88
|
accessor visible: boolean;
|
|
66
89
|
/**
|
|
67
90
|
* Starts an interactive placement operation to create a new [AreaMeasurementAnalysis](https://developers.arcgis.com/javascript/latest/api-reference/esri-analysis-AreaMeasurementAnalysis.html).
|
|
@@ -73,6 +96,7 @@ export default abstract class AreaMeasurementAnalysisView2D extends AnalysisView
|
|
|
73
96
|
*
|
|
74
97
|
* @param options - An object specifying additional options.
|
|
75
98
|
* @returns A promise which resolves when the operation is completed successfully or rejected if it is canceled.
|
|
99
|
+
* @since 5.0
|
|
76
100
|
*/
|
|
77
101
|
place(options?: AbortOptions | null | undefined): Promise<AreaMeasurementPlacementResult>;
|
|
78
102
|
}
|
|
@@ -31,37 +31,60 @@ import type { SnappingOptionsProperties } from "../../interactive/snapping/Snapp
|
|
|
31
31
|
* @since 5.0
|
|
32
32
|
*/
|
|
33
33
|
export default abstract class DistanceMeasurementAnalysisView2D extends AnalysisView2D {
|
|
34
|
-
/**
|
|
34
|
+
/**
|
|
35
|
+
* The distance measurement analysis associated with the analysis view.
|
|
36
|
+
*
|
|
37
|
+
* @since 5.0
|
|
38
|
+
*/
|
|
35
39
|
get analysis(): DistanceMeasurementAnalysis;
|
|
36
40
|
/**
|
|
37
41
|
* Enables interactivity for the [analysis](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-analysis-DistanceMeasurementAnalysisView2D.html#analysis). When set to `true` the input geometry can be edited interactively.
|
|
38
42
|
*
|
|
39
43
|
* @default false
|
|
44
|
+
* @since 5.0
|
|
40
45
|
*/
|
|
41
46
|
accessor interactive: boolean;
|
|
42
47
|
/**
|
|
43
48
|
* Result of the distance measurement analysis. The result object is created immediately and updated as the
|
|
44
49
|
* measurement is computed.
|
|
50
|
+
*
|
|
51
|
+
* @since 5.0
|
|
45
52
|
*/
|
|
46
53
|
get result(): DistanceMeasurementResult | null | undefined;
|
|
47
54
|
/**
|
|
48
55
|
* The [SnappingOptions](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-interactive-snapping-SnappingOptions.html) for sketching.
|
|
49
56
|
* It supports [self](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-interactive-snapping-SnappingOptions.html#selfEnabled) and
|
|
50
57
|
* [feature](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-interactive-snapping-SnappingOptions.html#featureEnabled) snapping.
|
|
58
|
+
*
|
|
59
|
+
* @since 5.0
|
|
51
60
|
*/
|
|
52
61
|
get snappingOptions(): SnappingOptions;
|
|
53
62
|
set snappingOptions(value: SnappingOptionsProperties);
|
|
54
|
-
/**
|
|
63
|
+
/**
|
|
64
|
+
* The analysis view type.
|
|
65
|
+
*
|
|
66
|
+
* @since 5.0
|
|
67
|
+
*/
|
|
55
68
|
get type(): "distance-measurement-view-2d";
|
|
56
69
|
/**
|
|
57
70
|
* Unit system (imperial, metric) or specific unit used for displaying the computed length in the view. This value is
|
|
58
71
|
* useful when [DistanceMeasurementAnalysis#unit](https://developers.arcgis.com/javascript/latest/api-reference/esri-analysis-DistanceMeasurementAnalysis.html#unit) is not explicitly set on the
|
|
59
72
|
* [analysis](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-analysis-DistanceMeasurementAnalysisView2D.html#analysis).
|
|
73
|
+
*
|
|
74
|
+
* @since 5.0
|
|
60
75
|
*/
|
|
61
76
|
get unit(): SystemOrLengthUnit;
|
|
62
|
-
/**
|
|
77
|
+
/**
|
|
78
|
+
* This property is `true` when the analysis is recomputing or updating its visualization.
|
|
79
|
+
*
|
|
80
|
+
* @since 5.0
|
|
81
|
+
*/
|
|
63
82
|
get updating(): boolean;
|
|
64
|
-
/**
|
|
83
|
+
/**
|
|
84
|
+
* When `true`, the [analysis](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-analysis-DistanceMeasurementAnalysisView2D.html#analysis) is visualized in the view.
|
|
85
|
+
*
|
|
86
|
+
* @since 5.0
|
|
87
|
+
*/
|
|
65
88
|
accessor visible: boolean;
|
|
66
89
|
/**
|
|
67
90
|
* Starts an interactive placement operation to create a new [DistanceMeasurementAnalysis](https://developers.arcgis.com/javascript/latest/api-reference/esri-analysis-DistanceMeasurementAnalysis.html).
|
|
@@ -73,6 +96,7 @@ export default abstract class DistanceMeasurementAnalysisView2D extends Analysis
|
|
|
73
96
|
*
|
|
74
97
|
* @param options - An object specifying additional options.
|
|
75
98
|
* @returns A promise which resolves when the operation is completed successfully or rejected if it is canceled.
|
|
99
|
+
* @since 5.0
|
|
76
100
|
*/
|
|
77
101
|
place(options?: AbortOptions | null | undefined): Promise<DistanceMeasurementPlacementResult>;
|
|
78
102
|
}
|
|
@@ -2,5 +2,9 @@ import type AreaMeasurementAnalysisView2D from "./AreaMeasurementAnalysisView2D.
|
|
|
2
2
|
import type DistanceMeasurementAnalysisView2D from "./DistanceMeasurementAnalysisView2D.js";
|
|
3
3
|
import type ElevationProfileAnalysisView2D from "./ElevationProfileAnalysisView2D.js";
|
|
4
4
|
|
|
5
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* Union of all possible analysis views that can be added to a [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html).
|
|
7
|
+
*
|
|
8
|
+
* @since 5.0
|
|
9
|
+
*/
|
|
6
10
|
export type AnalysisView2DUnion = AreaMeasurementAnalysisView2D | DistanceMeasurementAnalysisView2D | ElevationProfileAnalysisView2D;
|
|
@@ -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{create as t}from"../../../../core/libs/gl-matrix-2/factories/mat3f32.js";import e from"../webgl/brushes/WGLBrush.js";class
|
|
5
|
+
import{create as t}from"../../../../core/libs/gl-matrix-2/factories/mat3f32.js";import{isForeverZero as e,getEndValue as a,getValue as s}from"./animatedValues.js";import{longSafetyTime as i}from"./utils.js";import r from"../webgl/brushes/WGLBrush.js";class l extends r{constructor(){super(...arguments),this._visualState={time:0,dvsMat3:t(),displayViewMat3:t(),displayOpacity:1,startTime:0,endTime:0}}dispose(){}prepareState(t){const{context:e}=t;e.setColorMask(!0,!0,!0,!0),e.setStencilFunction(514,0,255)}draw(t,r){const{requestRender:l,allowDelayedRender:n}=t,{items:o}=r,d=[];for(const m of o){m.attached||(m.resources.attach({context:t.context,getProgram:(e,a)=>t.painter.materialManager.getProgram(e,a)}),m.attached=!0);const o=t.time/1e3;if(t.animationsEnabled?e(m.displayOpacity,o)||o>m.endTime+m.style.slideoutDuration:0===a(m.displayOpacity))m.attached&&(m.resources.detach(),m.attached=!1);else{if(d.push(m),n&&!m.resources.ready&&null!=l)return void l();this._visualState.time=t.animationsEnabled?o:i,r.updateMatrix(t.state,m.resources.query),this._visualState.dvsMat3=r.transforms.displayViewScreenMat3,this._visualState.displayViewMat3=t.state.displayViewMat3,this._visualState.displayOpacity=t.animationsEnabled?s(m.displayOpacity,o):a(m.displayOpacity),this._visualState.startTime=m.startTime,this._visualState.endTime=m.endTime,m.style.render({context:t.context,getProgram:(e,a)=>t.painter.materialManager.getProgram(e,a)},this._visualState,m.resources),m.style.animated&&null!=l&&t.animationsEnabled&&l()}}r.items.splice(0,r.items.length,...d)}}export{l 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{deg2rad as t}from"../../../../core/mathUtils.js";import{fromTranslation as
|
|
5
|
+
import{deg2rad as t}from"../../../../core/mathUtils.js";import{fromTranslation as e,scale as i,translate as s,rotate as r}from"../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as o}from"../../../../core/libs/gl-matrix-2/factories/mat3f32.js";import{DisplayObject as a}from"../DisplayObject.js";class m extends a{constructor(){super(...arguments),this.items=[]}clear(){for(const t of this.items)t.attached&&(t.resources.detach(),t.attached=!1);this.items.length=0}setTransform(t){}updateMatrix(o,a){const m=a.extent.xmin,n=a.extent.ymax,c=[0,0];o.toScreen(c,[m,n]);const x=(a.extent.xmax-a.extent.xmin)/a.size[0]/o.resolution,l=t(o.rotation),{displayViewScreenMat3:p}=this.transforms;e(p,[-1,1,0]),i(p,p,[2/(o.size[0]*o.pixelRatio),-2/(o.size[1]*o.pixelRatio),1]),s(p,p,[c[0],c[1],0]),r(p,p,l),i(p,p,[x*o.pixelRatio,x*o.pixelRatio,1])}_createTransforms(){return{displayViewScreenMat3:o()}}}export{m as FlowDisplayObject};
|
|
@@ -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
|
|
5
|
+
import{__decorate as t}from"tslib";import e from"../../../../core/Accessor.js";import i from"../../../../core/Logger.js";import{deg2rad as o}from"../../../../core/mathUtils.js";import{isAbortError as r}from"../../../../core/promiseUtils.js";import{property as s,subclass as n}from"../../../../core/accessorSupport/decorators.js";import a from"../../../../geometry/Extent.js";import l from"../../../../geometry/Point.js";import{fadeToZero as m,animate as p}from"./animatedValues.js";import{FlowDisplayObject as u}from"./FlowDisplayObject.js";import{ProcessingTimeEstimate as c}from"./ProcessingTimeEstimate.js";import{longSafetyTime as d,shortMarginTime as h}from"./utils.js";const f=1.15,y=1;let g=class extends e{constructor(t){super(t),this._flowDisplayObject=new u,this._loading=null,this._processingTimeEstimate=new c}initialize(){this.flowContainer.addChild(this._flowDisplayObject)}destroy(){this._clear(),this.flowContainer.removeAllChildren()}get updating(){return null!=this._loading}update(t){const{flowStyle:e}=this.flowContainer;if(null==e)return void this._clear();const{extent:o,rotation:s,resolution:n,pixelRatio:a}=t.state,l=x(o,s);l.expand(f);const u=[Math.round((l.xmax-l.xmin)/n),Math.round((l.ymax-l.ymin)/n)],c=performance.now()/1e3,g={extent:l,size:u,pixelRatio:a,time:c+this._processingTimeEstimate.getSafeTime()},_=new AbortController,{items:w}=this._flowDisplayObject,b=w.at(-1);if(b&&this._fastUpdate(b.style,b.resources.query,e,g))return b.style=e,void(this._loading&&(this._loading.abortController.abort(),this._loading=null));if(this._loading&&this._fastUpdate(this._loading.flowStyle,this._loading.query,e,g))return void(this._loading.flowStyle=e);const{canContinue:C,previousItem:j}=this._previousItemPrevious(b,e,g),v=e.load(g,C?j.resources:null,_.signal).then(t=>{const i=performance.now()/1e3,o=i-c;if(this._processingTimeEstimate.addSample(o),C){for(const e of w)e.endTime=t.query.time;w.push({attached:!1,startTime:t.query.time,endTime:t.query.time+d,displayOpacity:1,resources:t,style:e})}else{for(const t of w)t.displayOpacity=m(t.displayOpacity,y,i);w.push({attached:!1,startTime:i-h,endTime:i+d,displayOpacity:p(i,0,i+y,1),resources:t,style:e})}this._flowDisplayObject.requestRender(),this._loading=null},t=>{r(t)||i.getLogger(this).error("A resource failed to load.",t)});this._loading?.abortController.abort(),this._loading={abortController:_,promise:v,query:g,flowStyle:e}}_fastUpdate(t,e,i,o){if(!t.isCompatible(i))return!1;return!(!e.extent.equals(o.extent)||e.size[0]!==o.size[0]||e.size[1]!==o.size[1]||e.pixelRatio!==o.pixelRatio)}_previousItemPrevious(t,e,i){if(!t)return{canContinue:!1,previousItem:t};if(!t.style.supportsContinuation)return{canContinue:!1,previousItem:t};if(!e.supportsContinuation)return{canContinue:!1,previousItem:t};const o=Math.abs(t.resources.query.extent.width-i.extent.width)/i.extent.width,r=Math.abs(t.resources.query.extent.height-i.extent.height)/i.extent.height;return o>.1||r>.1?{canContinue:!1,previousItem:t}:{canContinue:!0,previousItem:t}}_clear(){this._flowDisplayObject.clear(),null!=this._loading&&(this._loading.abortController.abort(),this._loading=null)}};function x(t,e){const i=new l({x:(t.xmax+t.xmin)/2,y:(t.ymax+t.ymin)/2,spatialReference:t.spatialReference}),r=t.xmax-t.xmin,s=t.ymax-t.ymin,n=Math.abs(Math.cos(o(e))),m=Math.abs(Math.sin(o(e))),p=n*r+m*s,u=m*r+n*s,c=new a({xmin:i.x-p/2,ymin:i.y-u/2,xmax:i.x+p/2,ymax:i.y+u/2,spatialReference:t.spatialReference});return c.centerAt(i),c}t([s()],g.prototype,"_loading",void 0),t([s()],g.prototype,"flowContainer",void 0),t([s()],g.prototype,"updating",null),g=t([n("esri.views.2d.engine.flow.FlowStrategy")],g);export{g 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{__decorate as t}from"tslib";import e from"../../../../Graphic.js";import i from"../../../../core/Accessor.js";import{watch as o}from"../../../../core/reactiveUtils.js";import{property as r,subclass as s}from"../../../../core/accessorSupport/decorators.js";import a from"./createFlowStyle.js";import{loadImagery as n}from"./dataUtils.js";import l from"./FlowContainer.js";import h from"./FlowStrategy.js";let d=class extends i{constructor(){super(...arguments),this._loadImagery=(t,e,i,o,r)=>n(this.layer,t,e,i,o,r),this._createFlowMesh=(t,e,i,o)=>this.layer.createFlowMesh({meshType:t,flowData:i,simulationSettings:e},{signal:
|
|
5
|
+
import{__decorate as t}from"tslib";import e from"../../../../Graphic.js";import i from"../../../../core/Accessor.js";import{watch as o}from"../../../../core/reactiveUtils.js";import{property as r,subclass as s}from"../../../../core/accessorSupport/decorators.js";import a from"./createFlowStyle.js";import{loadImagery as n}from"./dataUtils.js";import l from"./FlowContainer.js";import h from"./FlowStrategy.js";let d=class extends i{constructor(){super(...arguments),this._loadImagery=(t,e,i,o,r)=>n(this.layer,t,e,i,o,r),this._createFlowMesh=(t,e,i,o,r)=>this.layer.createFlowMesh({meshType:t,flowData:i,simulationSettings:e,startInfo:o},{signal:r}),this.attached=!1,this.type="flow",this.timeExtent=null,this.redrawOrRefetch=async()=>{this._updateVisualization()}}get updating(){return!this.attached||this._strategy.updating}attach(){const{layer:t}=this,e=()=>{this._loadImagery=(e,i,o,r,s)=>n(t,e,i,o,r,s),this._updateVisualization()};"multidimensionalDefinition"in t?this.addHandles(o(()=>t.multidimensionalDefinition,e)):this.addHandles([o(()=>t.mosaicRule,e),o(()=>t.rasterFunction,e),o(()=>t.definitionExpression,e)]),this.container=new l,this._strategy=new h({flowContainer:this.container}),this._updateVisualization()}detach(){this._strategy.destroy(),this.container?.removeAllChildren(),this.container=null,this.removeHandles()}update(t){t.stationary?this._strategy.update(t):this.layerView.requestUpdate()}hitTest(t){return new e({attributes:{},geometry:t.clone(),layer:this.layer})}moveEnd(){}async doRefresh(){}_updateVisualization(){const t=this.layer.renderer;if(null==t||"flow"!==t.type)return;const e=a(t,{loadImagery:this._loadImagery,createFlowMesh:this._createFlowMesh,timeExtent:this.timeExtent});this.container.flowStyle=e,this.layerView.requestUpdate()}};t([r()],d.prototype,"_strategy",void 0),t([r()],d.prototype,"attached",void 0),t([r()],d.prototype,"container",void 0),t([r()],d.prototype,"layer",void 0),t([r()],d.prototype,"layerView",void 0),t([r()],d.prototype,"type",void 0),t([r()],d.prototype,"updating",null),t([r()],d.prototype,"timeExtent",void 0),d=t([s("esri.views.2d.engine.flow.FlowView2D")],d);export{d as default};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
class e{constructor(){this._skipInitialSamples=3,this._samples=[.35,.4,.45,.4,.35],this._maxSampleMemory=this._samples.length,this._average=this._computeAverage(),this._standardDeviation=this._computeStandardDeviation()}get average(){return this._average}get standardDeviation(){return this._standardDeviation}addSample(e){this._skipInitialSamples--,this._skipInitialSamples>0||(this._samples.push(e),this._samples.length>this._maxSampleMemory&&this._samples.splice(0,this._samples.length-this._maxSampleMemory),this._average=this._computeAverage(),this._standardDeviation=this._computeStandardDeviation())}getSafeTime(){return this._average+3*this._standardDeviation}_computeAverage(){return this._samples.reduce((e,t)=>e+t,0)/this._samples.length}_computeStandardDeviation(){return Math.sqrt(this._samples.map(e=>t(e-this._average)).reduce((e,t)=>e+t,0)/this._samples.length)}}function t(e){return e*e}export{e as ProcessingTimeEstimate};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
class t{constructor(t,e,r,n){this.startTime=t,this.startValue=e,this.endTime=r,this.endValue=n}getValue(t){if(t<=this.startTime)return this.startValue;if(t>=this.endTime)return this.endValue;const e=(t-this.startTime)/(this.endTime-this.startTime);return this.startValue+e*(this.endValue-this.startValue)}isForeverZero(t){return 0===this.startValue&&0===this.endValue||0===this.endValue&&t>=this.endTime}}function e(t,e){return"number"==typeof t?t:t.getValue(e)}function r(t){return"number"==typeof t?t:t.endValue}function n(t,e){return"number"==typeof t?0===t:t.isForeverZero(e)}function i(e,r,n,i){return e===n?e:new t(e,r,n,i)}function s(t,r,n){const s=e(t,n),u=s*r;return 0===u?0:i(n,s,n+u,0)}export{i as animate,s as fadeToZero,r as getEndValue,e as getValue,n as isForeverZero};
|
|
@@ -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 t from"../../../../core/Logger.js";import{moduloPositive as e,deg2rad as n}from"../../../../core/mathUtils.js";import{throwIfAborted as r}from"../../../../core/promiseUtils.js";import o from"../../../../core/RandomLCG.js";import{Seconds as i}from"../../../../core/time.js";import s from"../../../../geometry/Extent.js";import{getInfo as l}from"../../../../geometry/support/spatialReferenceUtils.js";const a=()=>t.getLogger("esri.views.2d.engine.flow.dataUtils"),c=10;async function f(t,e,n,o){const i=performance.now(),s=h(e,n),l=performance.now(),f=m(e,s,n.width,n.height),u=performance.now(),d=p(f,!0),w=performance.now(),x="Streamlines"===t?g(d,c):y(d),M=performance.now();return has("esri-2d-profiler")&&(a().info("I.1","_createFlowFieldFromData (ms)",Math.round(l-i)),a().info("I.2","_getStreamlines (ms)",Math.round(u-l)),a().info("I.3","createAnimatedLinesData (ms)",Math.round(w-u)),a().info("I.4","create{Streamlines|Particles}Mesh (ms)",Math.round(M-w)),a().info("I.5","createFlowMesh (ms)",Math.round(M-i)),a().info("I.6","Mesh size (bytes)",x.vertexData.buffer.byteLength+x.indexData.buffer.byteLength)),await Promise.resolve(),r(o),x}function h(t,e){const n=w(e.data,e.width,e.height,t.smoothing);if(t.interpolate){return(t,r)=>{const o=Math.floor(t),i=Math.floor(r);if(o<0||o>=e.width)return[0,0];if(i<0||i>=e.height)return[0,0];const s=t-o,l=r-i,a=o,c=i,f=o<e.width-1?o+1:o,h=i<e.height-1?i+1:i,u=n[2*(c*e.width+a)],d=n[2*(c*e.width+f)],m=n[2*(h*e.width+a)],w=n[2*(h*e.width+f)],p=n[2*(c*e.width+a)+1],g=n[2*(c*e.width+f)+1];return[(u*(1-l)+m*l)*(1-s)+(d*(1-l)+w*l)*s,(p*(1-l)+n[2*(h*e.width+a)+1]*l)*(1-s)+(g*(1-l)+n[2*(h*e.width+f)+1]*l)*s]}}return(t,r)=>{const o=Math.round(t),i=Math.round(r);return o<0||o>=e.width||i<0||i>=e.height?[0,0]:[n[2*(i*e.width+o)],n[2*(i*e.width+o)+1]]}}function u(t,n,r,o,s,l,a,c){const f=[],{raster:h,width:u,height:d,resolutionFactor:m}=c;let w=o,p=s,g=i(0),[y,x]=r(w,p);y*=n.velocityScale,x*=n.velocityScale;const M=Math.sqrt(y*y+x*x);let A,v;f.push({x:w,y:p,time:g,speed:M});for(let F=0;F<n.verticesPerLine;F++){let[o,s]=r(w,p);o*=n.velocityScale,s*=n.velocityScale;const c=Math.sqrt(o*o+s*s);if(c<n.minSpeedThreshold)return f;const y=t*o/c,x=t*s/c;w+=y*n.segmentLength,p+=x*n.segmentLength,n.wrapAround&&(w=e(w,l[0]));const M=t*n.segmentLength/c;if(g=i(g+M),Math.acos(y*A+x*v)>n.maxTurnAngle)return f;if(n.collisions){let t=Math.round(w*m);const r=Math.round(p*m);if(n.wrapAround&&(t=e(t,u)),t<0||t>u-1||r<0||r>d-1)return f;const o=h[r*u+t];if(-1!==o&&o!==a)return f;h[r*u+t]=a}f.push({x:w,y:p,time:g,speed:c}),A=y,v=x}return f}function d(t,e,n,r,o,i,s,l){const a=Math.round((.2+.6*s.getFloat())*t.verticesPerLine),c=t.verticesPerLine-a,f=u(-1,{...t,verticesPerLine:c},e,n,r,o,i,l),h=u(1,{...t,verticesPerLine:a},e,n,r,o,i,l),d=f.reverse();d.splice(-1,1);return d.concat(h)}function m(t,e,n,r,i={positions:[]}){if(t.density<=0)return[];const{positions:s}=i,l=[],a=new o,c=1/Math.max(t.lineCollisionWidth,1),f=Math.round(n*c),h=Math.round(r*c),m=new Int32Array(f*h);for(let o=0;o<m.length;o++)m[o]=-1;const w={raster:m,width:f,height:h,resolutionFactor:c},p={},g=t.lineSpacing/Math.sqrt(t.density),y=Math.floor(r/g),x=Math.floor(n/g);for(let o=0;o<y;o++){const t=o*g;for(let e=0;e<x;e++){const n=e*g;p[`${e}-${o}`]={x:n,y:t,positions:[]}}}for(const{x:o,y:u}of s){const t=p[`${Math.floor(o/g)}-${Math.floor(u/g)}`];t&&t.positions.push([o,u])}const M=[];for(const o in p){const t=p[o];if(0===t.positions.length)M.push({x:t.x+g/2,y:t.y+g/2,sort:.66+.33*a.getFloat(),stage:0});else{const[e]=t.positions.splice(0,1);M.push({x:e[0],y:e[1],sort:.33*a.getFloat(),stage:1});for(const[n,r]of t.positions)M.push({x:n,y:r,sort:.33+.33*a.getFloat(),stage:2})}}M.sort((t,e)=>t.sort-e.sort);for(const{x:o,y:A,stage:v}of M){const i=t.onlyForwardTracing?u(1,t,e,o,A,[n,r],l.length,w):d(t,e,o,A,[n,r],l.length,a,w);i.length<2||l.push({stage:v,vertices:i})}return l}function w(t,e,n,r){if(0===r)return t;const o=Math.round(3*r),i=new Array(2*o+1);let s=0;for(let c=-o;c<=o;c++){const t=Math.exp(-c*c/(r*r));i[c+o]=t,s+=t}for(let c=-o;c<=o;c++)i[c+o]/=s;const l=new Float32Array(t.length);for(let c=0;c<n;c++)for(let n=0;n<e;n++){let r=0,s=0;for(let l=-o;l<=o;l++){if(n+l<0||n+l>=e)continue;const a=i[l+o];r+=a*t[2*(c*e+(n+l))],s+=a*t[2*(c*e+(n+l))+1]}l[2*(c*e+n)]=r,l[2*(c*e+n)+1]=s}const a=new Float32Array(t.length);for(let c=0;c<e;c++)for(let t=0;t<n;t++){let r=0,s=0;for(let a=-o;a<=o;a++){if(t+a<0||t+a>=n)continue;const f=i[a+o];r+=f*l[2*((t+a)*e+c)],s+=f*l[2*((t+a)*e+c)+1]}a[2*(t*e+c)]=r,a[2*(t*e+c)+1]=s}return a}function p(t,e){const n=new o,r=t.reduce((t,e)=>t+e.vertices.length,0),i=new Float32Array(4*r),s=new Array(t.length);let l=0,a=0;for(const{vertices:o}of t){const t=l;for(const e of o)i[4*l]=e.x,i[4*l+1]=e.y,i[4*l+2]=e.time,i[4*l+3]=e.speed,l++;s[a++]={startVertex:t,numberOfVertices:o.length,totalTime:o[o.length-1].time,timeSeed:e?n.getFloat():0}}return{lineVertices:i,lineDescriptors:s}}function g(t,e){const n=9,{lineVertices:r,lineDescriptors:o}=t;let i=0,s=0;for(const d of o){i+=2*d.numberOfVertices;s+=6*(d.numberOfVertices-1)}const l=new Float32Array(i*n),a=new Uint32Array(s);let c=0,f=0;function h(){a[f++]=c-2,a[f++]=c,a[f++]=c-1,a[f++]=c,a[f++]=c+1,a[f++]=c-1}function u(t,e,r,o,i,s,a,f){const h=c*n;let u=0;l[h+u++]=t,l[h+u++]=e,l[h+u++]=1,l[h+u++]=r,l[h+u++]=s,l[h+u++]=a,l[h+u++]=o/2,l[h+u++]=i/2,l[h+u++]=f,c++,l[h+u++]=t,l[h+u++]=e,l[h+u++]=-1,l[h+u++]=r,l[h+u++]=s,l[h+u++]=a,l[h+u++]=-o/2,l[h+u++]=-i/2,l[h+u++]=f,c++}for(const d of o){const{totalTime:t,timeSeed:n}=d;let o=null,i=null,s=null,l=null,a=null,c=null;for(let f=0;f<d.numberOfVertices;f++){const m=r[4*(d.startVertex+f)],w=r[4*(d.startVertex+f)+1],p=r[4*(d.startVertex+f)+2],g=r[4*(d.startVertex+f)+3];let y=null,x=null,M=null,A=null;if(f>0){y=m-o,x=w-i;const r=Math.sqrt(y*y+x*x);if(y/=r,x/=r,f>1){let t=y+a,n=x+c;const r=Math.sqrt(t*t+n*n);t/=r,n/=r;const o=Math.min(1/(t*y+n*x),e);t*=o,n*=o,M=-n,A=t}else M=-x,A=y;null!==M&&null!==A&&(u(o,i,s,M,A,t,n,g),h())}o=m,i=w,s=p,a=y,c=x,l=g}u(o,i,s,-c,a,t,n,l)}return{vertexData:l,indexData:a}}function y(t){const e=16,n=1,r=2,{lineVertices:o,lineDescriptors:i}=t;let s=0,l=0;for(const S of i){const t=S.numberOfVertices-1;s+=4*t*2,l+=6*t*2}const a=new Float32Array(s*e),c=new Uint32Array(l);let f,h,u,d,m,w,p,g,y,x,M,A,v,F,I=0,V=0;function L(){c[V++]=I-8,c[V++]=I-7,c[V++]=I-6,c[V++]=I-7,c[V++]=I-5,c[V++]=I-6,c[V++]=I-4,c[V++]=I-3,c[V++]=I-2,c[V++]=I-3,c[V++]=I-1,c[V++]=I-2}function b(t,o,i,s,l,c,f,h,u,d,m,w,p,g){const y=I*e;let x=0;for(const e of[n,r])for(const n of[1,2,3,4])a[y+x++]=t,a[y+x++]=o,a[y+x++]=i,a[y+x++]=s,a[y+x++]=f,a[y+x++]=h,a[y+x++]=u,a[y+x++]=d,a[y+x++]=e,a[y+x++]=n,a[y+x++]=p,a[y+x++]=g,a[y+x++]=l/2,a[y+x++]=c/2,a[y+x++]=m/2,a[y+x++]=w/2,I++}function k(t,e){let n=y+M,r=x+A;const o=Math.sqrt(n*n+r*r);n/=o,r/=o;const i=y*n+x*r;n/=i,r/=i;let s=M+v,l=A+F;const a=Math.sqrt(s*s+l*l);s/=a,l/=a;const c=M*s+A*l;s/=c,l/=c,b(f,h,u,d,-r,n,m,w,p,g,-l,s,t,e),L()}function D(t,e,n,r,o,i){if(y=M,x=A,M=v,A=F,null==y&&null==x&&(y=M,x=A),null!=m&&null!=w){v=t-m,F=e-w;const n=Math.sqrt(v*v+F*F);v/=n,F/=n}null!=y&&null!=x&&k(o,i),f=m,h=w,u=p,d=g,m=t,w=e,p=n,g=r}function P(t,e){y=M,x=A,M=v,A=F,null==y&&null==x&&(y=M,x=A),null!=y&&null!=x&&k(t,e)}for(const S of i){f=null,h=null,u=null,d=null,m=null,w=null,p=null,g=null,y=null,x=null,M=null,A=null,v=null,F=null;const{totalTime:t,timeSeed:e}=S;for(let n=0;n<S.numberOfVertices;n++){D(o[4*(S.startVertex+n)],o[4*(S.startVertex+n)+1],o[4*(S.startVertex+n)+2],o[4*(S.startVertex+n)+3],t,e)}P(t,e)}return{vertexData:a,indexData:c}}function x(t,e,r=e.width,o=e.height,i=0,s=0){const l=e.pixels,a=r*o,c=2,f=new Float32Array(a*c),h=e.width,u=(t,e)=>t+i+(e+s)*h,d=(t,e)=>t+e*r;let m;if(null!=e.mask)if(r!==e.width||o!==e.height||0!==i||0!==s){m=new Uint8Array(a*c);const t=e.mask;for(let e=0;e<o;++e)for(let n=0;n<r;++n){const r=u(n,e),o=d(n,e);m[c*o]=t[c*r],m[c*o+1]=t[c*r+1]}}else m=e.mask;else m=new Uint8Array(a*c),m.fill(255);if("vector-uv"===t)for(let n=0;n<o;++n)for(let t=0;t<r;++t){const e=u(t,n),r=d(t,n);f[c*r]=l[0][e],f[c*r+1]=-l[1][e]}else if("vector-magdir"===t){const{cos:t,sin:e}=Math;for(let i=0;i<o;++i)for(let o=0;o<r;++o){const r=u(o,i),s=d(o,i),a=l[0][r],h=n(l[1][r]),m=t(h-Math.PI/2),w=e(h-Math.PI/2);f[c*s]=m*a,f[c*s+1]=w*a}}return{data:f,mask:m,width:r,height:o}}async function M(t,e,n,r,o,i){const c=performance.now(),f=l(e.spatialReference);if(!f){const s=await A(t,e,n,r,o,i);return has("esri-2d-profiler")&&a().info("I.7","loadImagery, early exit (ms)",Math.round(performance.now()-c)),has("esri-2d-profiler")&&a().info("I.9","Number of parts",1),s}const[h,u]=f.valid,d=u-h,m=Math.ceil(e.width/d),w=e.width/m,p=Math.round(n/m);let g=e.xmin;const y=[],x=performance.now();for(let l=0;l<m;l++){const n=new s({xmin:g,xmax:g+w,ymin:e.ymin,ymax:e.ymax,spatialReference:e.spatialReference});y.push(A(t,n,p,r,o,i)),g+=w}const M=await Promise.all(y);if(has("esri-2d-profiler")&&a().info("I.8","All calls to _fetchPart (ms)",Math.round(performance.now()-x)),has("esri-2d-profiler")&&a().info("I.9","Number of parts",M.length),1===M.length)return has("esri-2d-profiler")&&a().info("I.10","loadImagery, general exit without stitching back (ms)",Math.round(performance.now()-c)),M[0];const v={data:new Float32Array(n*r*2),mask:new Uint8Array(n*r),width:n,height:r};let F=0;for(const s of M){for(let t=0;t<s.height;t++)for(let e=0;e<s.width;e++)F+e>=n||(v.data[2*(t*n+F+e)]=s.data[2*(t*s.width+e)],v.data[2*(t*n+F+e)+1]=s.data[2*(t*s.width+e)+1],v.mask[t*n+F+e]=s.mask[t*s.width+e]);F+=s.width}return has("esri-2d-profiler")&&a().info("I.10","loadImagery, general exit (ms)",Math.round(performance.now()-c)),v}async function A(t,e,n,r,o,i){const s={requestProjectedLocalDirections:!0,signal:i};if(null!=o&&(s.timeExtent=o),"imagery"===t.type){await t.load({signal:i});const o=await t.internalFetchImage(e,n,r,s);if(null==o?.pixelData?.pixelBlock)return{data:new Float32Array(n*r*2),mask:new Uint8Array(n*r),width:n,height:r};return x(t.rasterInfo.dataType,o.pixelData.pixelBlock)}await t.load({signal:i});const l=await t.fetchPixels(e,n,r,s);if(null==l?.pixelBlock)return{data:new Float32Array(n*r*2),mask:new Uint8Array(n*r),width:n,height:r};return x(t.serviceRasterInfo.dataType,l.pixelBlock)}export{p as createAnimatedLinesData,h as createFlowFieldFromData,f as createFlowMesh,y as createParticlesMesh,g as createStreamlinesMesh,M as loadImagery,x as toFlowData,m as traceFlowPaths};
|
|
5
|
+
import has from"../../../../core/has.js";import t from"../../../../core/Logger.js";import{moduloPositive as e,deg2rad as n}from"../../../../core/mathUtils.js";import{throwIfAborted as r}from"../../../../core/promiseUtils.js";import o from"../../../../core/RandomLCG.js";import{Seconds as i}from"../../../../core/time.js";import s from"../../../../geometry/Extent.js";import{getInfo as l}from"../../../../geometry/support/spatialReferenceUtils.js";import{serializeFlowPaths as a}from"./flowPathsIO.js";const c=()=>t.getLogger("esri.views.2d.engine.flow.dataUtils"),f=10;async function u(t,e,n,o,i){const s=performance.now(),l=h(w(e,n),e),a=performance.now(),u=y(e,l,n.width,n.height,o),m=performance.now(),d=M(u),p=performance.now(),g="Streamlines"===t?A(d,f,u):v(d,u),x=performance.now();return has("esri-2d-profiler")&&(c().info("I.1","_createFlowFieldFromData (ms)",Math.round(a-s)),c().info("I.2","_getStreamlines (ms)",Math.round(m-a)),c().info("I.3","createAnimatedLinesData (ms)",Math.round(p-m)),c().info("I.4","create{Streamlines|Particles}Mesh (ms)",Math.round(x-p)),c().info("I.5","createFlowMesh (ms)",Math.round(x-s)),c().info("I.6","Mesh size (bytes)",g.vertexData.buffer.byteLength+g.indexData.buffer.byteLength)),await Promise.resolve(),r(i),g}function h(t,e){const{perturb:n}=e;if(n){const{rotation:e}=n;null!=e&&(t=m(t,e));const{scale:r}=n;null!=r&&(t=d(t,r))}return t}function m(t,e){const n=Math.cos(e),r=Math.sin(e);return(e,o)=>{const[i,s]=t(e,o);return[n*i+r*s,-r*i+n*s]}}function d(t,e){return(n,r)=>{const[o,i]=t(n,r);return[o*e,i*e]}}function w(t,e){const n=x(e.data,e.width,e.height,t.smoothing);if(t.interpolate){return(t,r)=>{const o=Math.floor(t),i=Math.floor(r);if(o<0||o>=e.width)return[0,0];if(i<0||i>=e.height)return[0,0];const s=t-o,l=r-i,a=o,c=i,f=o<e.width-1?o+1:o,u=i<e.height-1?i+1:i,h=n[2*(c*e.width+a)],m=n[2*(c*e.width+f)],d=n[2*(u*e.width+a)],w=n[2*(u*e.width+f)],p=n[2*(c*e.width+a)+1],g=n[2*(c*e.width+f)+1];return[(h*(1-l)+d*l)*(1-s)+(m*(1-l)+w*l)*s,(p*(1-l)+n[2*(u*e.width+a)+1]*l)*(1-s)+(g*(1-l)+n[2*(u*e.width+f)+1]*l)*s]}}return(t,r)=>{const o=Math.round(t),i=Math.round(r);return o<0||o>=e.width||i<0||i>=e.height?[0,0]:[n[2*(i*e.width+o)],n[2*(i*e.width+o)+1]]}}function p(t,n,r,o,s,l,a,c){const f=[],{raster:u,width:h,height:m,resolutionFactor:d}=c;let w=o,p=s,g=i(0),[y,x]=r(w,p);y*=n.velocityScale,x*=n.velocityScale;const M=Math.sqrt(y*y+x*x);let A,v;f.push({x:w,y:p,time:g,speed:M});for(let I=0;I<n.verticesPerLine;I++){let[o,s]=r(w,p);o*=n.velocityScale,s*=n.velocityScale;const c=Math.sqrt(o*o+s*s);if(c<n.minSpeedThreshold)return f;const y=t*o/c,x=t*s/c;w+=y*n.segmentLength,p+=x*n.segmentLength,n.wrapAround&&(w=e(w,l[0]));const M=t*n.segmentLength/c;if(g=i(g+M),Math.acos(y*A+x*v)>n.maxTurnAngle)return f;if(n.collisions){let t=Math.round(w*d);const r=Math.round(p*d);if(n.wrapAround&&(t=e(t,h)),t<0||t>h-1||r<0||r>m-1)return f;const o=u[r*h+t];if(-1!==o&&o!==a)return f;u[r*h+t]=a}f.push({x:w,y:p,time:g,speed:c}),A=y,v=x}return f}function g(t,e,n,r,o,i,s,l){const a=Math.round((.2+.6*s.getFloat())*t.verticesPerLine),c=t.verticesPerLine-a,f=p(-1,{...t,verticesPerLine:c},e,n,r,o,i,l),u=p(1,{...t,verticesPerLine:a},e,n,r,o,i,l),h=f.reverse();h.splice(-1,1);return h.concat(u)}function y(t,e,n,r,i){if(t.density<=0)return[];const{positions:s}=i,l=[],a=new o,c=1/Math.max(t.lineCollisionWidth,1),f=Math.round(n*c),u=Math.round(r*c),h=new Int32Array(f*u);for(let o=0;o<h.length;o++)h[o]=-1;const m={raster:h,width:f,height:u,resolutionFactor:c},d={},w=t.lineSpacing/Math.sqrt(t.density),y=Math.floor(r/w),x=Math.floor(n/w);for(let o=0;o<y;o++){const t=o*w;for(let e=0;e<x;e++){const n=e*w;d[`${e}-${o}`]={x:n,y:t,positions:[]}}}for(const{x:o,y:p}of s){const t=d[`${Math.floor(o/w)}-${Math.floor(p/w)}`];t&&t.positions.push([o,p])}const M=[];for(const o in d){const t=d[o];if(0===t.positions.length)M.push({x:t.x+w/2,y:t.y+w/2,sort:.66+.33*a.getFloat(),stage:0});else{const[e]=t.positions.splice(0,1);M.push({x:e[0],y:e[1],sort:.33*a.getFloat(),stage:1});for(const[n,r]of t.positions)M.push({x:n,y:r,sort:.33+.33*a.getFloat(),stage:2})}}M.sort((t,e)=>t.sort-e.sort);for(const{x:o,y:A,stage:v}of M){const i=t.onlyForwardTracing?p(1,t,e,o,A,[n,r],l.length,m):g(t,e,o,A,[n,r],l.length,a,m);i.length<2||l.push({stage:v,vertices:i})}return l}function x(t,e,n,r){if(0===r)return t;const o=Math.round(3*r),i=new Array(2*o+1);let s=0;for(let c=-o;c<=o;c++){const t=Math.exp(-c*c/(r*r));i[c+o]=t,s+=t}for(let c=-o;c<=o;c++)i[c+o]/=s;const l=new Float32Array(t.length);for(let c=0;c<n;c++)for(let n=0;n<e;n++){let r=0,s=0;for(let l=-o;l<=o;l++){if(n+l<0||n+l>=e)continue;const a=i[l+o];r+=a*t[2*(c*e+(n+l))],s+=a*t[2*(c*e+(n+l))+1]}l[2*(c*e+n)]=r,l[2*(c*e+n)+1]=s}const a=new Float32Array(t.length);for(let c=0;c<e;c++)for(let t=0;t<n;t++){let r=0,s=0;for(let a=-o;a<=o;a++){if(t+a<0||t+a>=n)continue;const f=i[a+o];r+=f*l[2*((t+a)*e+c)],s+=f*l[2*((t+a)*e+c)+1]}a[2*(t*e+c)]=r,a[2*(t*e+c)+1]=s}return a}function M(t){const e=t.reduce((t,e)=>t+e.vertices.length,0),n=new Float32Array(4*e),r=new Array(t.length);let o=0,i=0;for(const{vertices:s}of t){const t=o;for(const e of s)n[4*o]=e.x,n[4*o+1]=e.y,n[4*o+2]=e.time,n[4*o+3]=e.speed,o++;r[i++]={startVertex:t,numberOfVertices:s.length,firstTime:s[0].time,lastTime:s[s.length-1].time}}return{lineVertices:n,lineDescriptors:r}}function A(t,e,n){const r=9,{lineVertices:o,lineDescriptors:i}=t;let s=0,l=0;for(const a of i){s+=2*a.numberOfVertices;l+=6*(a.numberOfVertices-1)}const c=new Float32Array(s*r),f=new Uint32Array(l);let u=0,h=0;function m(){f[h++]=u-2,f[h++]=u,f[h++]=u-1,f[h++]=u,f[h++]=u+1,f[h++]=u-1}function d(t,e,n,o,i,s,l,a){const f=u*r;let h=0;c[f+h++]=t,c[f+h++]=e,c[f+h++]=1,c[f+h++]=n,c[f+h++]=s,c[f+h++]=l,c[f+h++]=o/2,c[f+h++]=i/2,c[f+h++]=a,u++,c[f+h++]=t,c[f+h++]=e,c[f+h++]=-1,c[f+h++]=n,c[f+h++]=s,c[f+h++]=l,c[f+h++]=-o/2,c[f+h++]=-i/2,c[f+h++]=a,u++}for(const a of i){const{firstTime:t,lastTime:n}=a;let r=null,i=null,s=null,l=null,c=null,f=null;for(let u=0;u<a.numberOfVertices;u++){const h=o[4*(a.startVertex+u)],w=o[4*(a.startVertex+u)+1],p=o[4*(a.startVertex+u)+2],g=o[4*(a.startVertex+u)+3];let y=null,x=null,M=null,A=null;if(u>0){y=h-r,x=w-i;const o=Math.sqrt(y*y+x*x);if(y/=o,x/=o,u>1){let t=y+c,n=x+f;const r=Math.sqrt(t*t+n*n);t/=r,n/=r;const o=Math.min(1/(t*y+n*x),e);t*=o,n*=o,M=-n,A=t}else M=-x,A=y;null!==M&&null!==A&&(d(r,i,s,M,A,t,n,g),m())}r=h,i=w,s=p,c=y,f=x,l=g}d(r,i,s,-f,c,t,n,l)}const w=a(n);return{vertexData:c,indexData:f,pathData:w}}function v(t,e){const n=16,r=1,o=2,{lineVertices:i,lineDescriptors:s}=t;let l=0,c=0;for(const a of s){const t=a.numberOfVertices-1;l+=4*t*2,c+=6*t*2}const f=new Float32Array(l*n),u=new Uint32Array(c);let h,m,d,w,p,g,y,x,M,A,v,I,F,V,D=0,b=0;function L(){u[b++]=D-8,u[b++]=D-7,u[b++]=D-6,u[b++]=D-7,u[b++]=D-5,u[b++]=D-6,u[b++]=D-4,u[b++]=D-3,u[b++]=D-2,u[b++]=D-3,u[b++]=D-1,u[b++]=D-2}function k(t,e,i,s,l,a,c,u,h,m,d,w,p,g){const y=D*n;let x=0;for(const n of[r,o])for(const r of[1,2,3,4])f[y+x++]=t,f[y+x++]=e,f[y+x++]=i,f[y+x++]=s,f[y+x++]=c,f[y+x++]=u,f[y+x++]=h,f[y+x++]=m,f[y+x++]=n,f[y+x++]=r,f[y+x++]=p,f[y+x++]=g,f[y+x++]=l/2,f[y+x++]=a/2,f[y+x++]=d/2,f[y+x++]=w/2,D++}function P(t,e){let n=M+v,r=A+I;const o=Math.sqrt(n*n+r*r);n/=o,r/=o;const i=M*n+A*r;n/=i,r/=i;let s=v+F,l=I+V;const a=Math.sqrt(s*s+l*l);s/=a,l/=a;const c=v*s+I*l;s/=c,l/=c,k(h,m,d,w,-r,n,p,g,y,x,-l,s,t,e),L()}function T(t,e,n,r,o,i){if(M=v,A=I,v=F,I=V,null==M&&null==A&&(M=v,A=I),null!=p&&null!=g){F=t-p,V=e-g;const n=Math.sqrt(F*F+V*V);F/=n,V/=n}null!=M&&null!=A&&P(o,i),h=p,m=g,d=y,w=x,p=t,g=e,y=n,x=r}function U(t,e){M=v,A=I,v=F,I=V,null==M&&null==A&&(M=v,A=I),null!=M&&null!=A&&P(t,e)}for(const a of s){h=null,m=null,d=null,w=null,p=null,g=null,y=null,x=null,M=null,A=null,v=null,I=null,F=null,V=null;const{firstTime:t,lastTime:e}=a;for(let n=0;n<a.numberOfVertices;n++){T(i[4*(a.startVertex+n)],i[4*(a.startVertex+n)+1],i[4*(a.startVertex+n)+2],i[4*(a.startVertex+n)+3],t,e)}U(t,e)}const j=a(e);return{vertexData:f,indexData:u,pathData:j}}function I(t,e,r=e.width,o=e.height,i=0,s=0){const l=e.pixels,a=r*o,c=2,f=new Float32Array(a*c),u=e.width,h=(t,e)=>t+i+(e+s)*u,m=(t,e)=>t+e*r;let d;if(null!=e.mask)if(r!==e.width||o!==e.height||0!==i||0!==s){d=new Uint8Array(a*c);const t=e.mask;for(let e=0;e<o;++e)for(let n=0;n<r;++n){const r=h(n,e),o=m(n,e);d[c*o]=t[c*r],d[c*o+1]=t[c*r+1]}}else d=e.mask;else d=new Uint8Array(a*c),d.fill(255);if("vector-uv"===t)for(let n=0;n<o;++n)for(let t=0;t<r;++t){const e=h(t,n),r=m(t,n);f[c*r]=l[0][e],f[c*r+1]=-l[1][e]}else if("vector-magdir"===t){const{cos:t,sin:e}=Math;for(let i=0;i<o;++i)for(let o=0;o<r;++o){const r=h(o,i),s=m(o,i),a=l[0][r],u=n(l[1][r]),d=t(u-Math.PI/2),w=e(u-Math.PI/2);f[c*s]=d*a,f[c*s+1]=w*a}}return{data:f,mask:d,width:r,height:o}}async function F(t,e,n,r,o,i){const a=performance.now(),f=l(e.spatialReference);if(!f){const s=await V(t,e,n,r,o,i);return has("esri-2d-profiler")&&c().info("I.7","loadImagery, early exit (ms)",Math.round(performance.now()-a)),has("esri-2d-profiler")&&c().info("I.9","Number of parts",1),s}const[u,h]=f.valid,m=h-u,d=Math.ceil(e.width/m),w=e.width/d,p=Math.round(n/d);let g=e.xmin;const y=[],x=performance.now();for(let l=0;l<d;l++){const n=new s({xmin:g,xmax:g+w,ymin:e.ymin,ymax:e.ymax,spatialReference:e.spatialReference});y.push(V(t,n,p,r,o,i)),g+=w}const M=await Promise.all(y);if(has("esri-2d-profiler")&&c().info("I.8","All calls to _fetchPart (ms)",Math.round(performance.now()-x)),has("esri-2d-profiler")&&c().info("I.9","Number of parts",M.length),1===M.length)return has("esri-2d-profiler")&&c().info("I.10","loadImagery, general exit without stitching back (ms)",Math.round(performance.now()-a)),M[0];const A={data:new Float32Array(n*r*2),mask:new Uint8Array(n*r),width:n,height:r};let v=0;for(const s of M){for(let t=0;t<s.height;t++)for(let e=0;e<s.width;e++)v+e>=n||(A.data[2*(t*n+v+e)]=s.data[2*(t*s.width+e)],A.data[2*(t*n+v+e)+1]=s.data[2*(t*s.width+e)+1],A.mask[t*n+v+e]=s.mask[t*s.width+e]);v+=s.width}return has("esri-2d-profiler")&&c().info("I.10","loadImagery, general exit (ms)",Math.round(performance.now()-a)),A}async function V(t,e,n,r,o,i){const s={requestProjectedLocalDirections:!0,signal:i};if(null!=o&&(s.timeExtent=o),"imagery"===t.type){await t.load({signal:i});const o=await t.internalFetchImage(e,n,r,s);if(null==o?.pixelData?.pixelBlock)return{data:new Float32Array(n*r*2),mask:new Uint8Array(n*r),width:n,height:r};return I(t.rasterInfo.dataType,o.pixelData.pixelBlock)}await t.load({signal:i});const l=await t.fetchPixels(e,n,r,s);if(null==l?.pixelBlock)return{data:new Float32Array(n*r*2),mask:new Uint8Array(n*r),width:n,height:r};return I(t.serviceRasterInfo.dataType,l.pixelBlock)}export{M as createAnimatedLinesData,w as createFlowFieldFromData,u as createFlowMesh,v as createParticlesMesh,A as createStreamlinesMesh,F as loadImagery,I as toFlowData,y as traceFlowPaths};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import{Seconds as t}from"../../../../core/time.js";function e(t){const e=new Float32Array(o(t));return o(t,e),e}function o(t,e){let o=0;e&&(e[o]=t.length),o++;for(const n of t){e&&(e[o]=n.stage),o++,e&&(e[o]=n.vertices.length),o++;for(const t of n.vertices)e&&(e[o]=t.x,e[o+1]=t.y,e[o+2]=t.time,e[o+3]=t.speed),o+=4}return o}function n(e){const o=[];let n=0;const r=e[n++];for(let s=0;s<r;s++){const r=e[n++],s=e[n++],c=[];for(let o=0;o<s;o++){const o={x:e[n++],y:e[n++],time:t(e[n++]),speed:e[n++]};c.push(o)}const f={stage:r,vertices:c};o.push(f)}return o}export{n as deserializeFlowPaths,e as serializeFlowPaths};
|
|
@@ -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{throwIfAborted as t}from"../../../../../core/promiseUtils.js";import{timeExtentsEqual as r,setUniforms as a}from"../utils.js";import{PrimitiveType as
|
|
5
|
+
import{throwIfAborted as t}from"../../../../../core/promiseUtils.js";import{timeExtentsEqual as r,setUniforms as a}from"../utils.js";import{AFlowResources as e}from"./AFlowResources.js";import{PrimitiveType as s,DataType as o}from"../../../../webgl/enums.js";import i from"../../../../webgl/Texture.js";import{TextureDescriptor as n}from"../../../../webgl/TextureDescriptor.js";import{VertexArrayObject as m}from"../../../../webgl/VertexArrayObject.js";import{fromLayout as l}from"../../../../webgl/VertexAttributeLocations.js";import{VertexBuffer as p}from"../../../../webgl/VertexBuffer.js";import{VertexElementDescriptor as c}from"../../../../webgl/VertexElementDescriptor.js";class h{constructor(t){this._params=t,this.supportsContinuation=!1,this.slideoutDuration=0,this.animated=!1}isCompatible(t){if(!(t instanceof h))return!1;if(!r(this._params.timeExtent,t._params.timeExtent))return!1;let a=!0;return a=a&&this._params.loadImagery===t._params.loadImagery,a=a&&this._params.color.kind===t._params.color.kind,a=a&&this._params.opacity.kind===t._params.opacity.kind,a}async load(r,a,e){const{extent:s,size:o}=r;t(e);const i=await this._params.loadImagery(s,o[0],o[1],this._params.timeExtent,e);return new d(i,r,[],{color:this._params.color,opacity:this._params.opacity})}render(t,r,e){const{context:o}=t,{program:i}=e;o.setFaceCullingEnabled(!1),o.setBlendingEnabled(!0),o.setBlendFunction(1,771),o.useProgram(i),i.setUniformMatrix3fv("u_dvsMat3",r.dvsMat3),o.bindTexture(e.texture,0),i.setUniform1i("u_texture",0),i.setUniform1f("u_Min",e.min),i.setUniform1f("u_Max",e.max),a(i,"color","vec4",this._params.color),a(i,"opacity","float",this._params.opacity),o.bindVAO(e.vertexArray),o.drawArrays(s.TRIANGLE_STRIP,0,4)}}const f=[new c("a_position",2,o.UNSIGNED_SHORT,0,8),new c("a_texcoord",2,o.UNSIGNED_SHORT,4,8)],u={vsPath:"raster/flow/imagery",fsPath:"raster/flow/imagery",locations:l(f)};class d extends e{constructor(t,r,a,e){super(r,a),this._flowData=t,this._values=e}attach(t){const{context:r}=t,{width:a,height:e}=this._flowData,s=new p(r,f,new Uint16Array([0,0,0,1,a,0,1,1,0,e,0,0,a,e,1,0])),o=new m(r,s),l=[];"ramp"===this._values.color.kind&&l.push("vvColor"),"ramp"===this._values.opacity.kind&&l.push("vvOpacity");const c=t.getProgram(u,l);let h=1e6,d=-1e6;for(let i=0;i<e;i++)for(let t=0;t<a;t++)if(0!==this._flowData.mask[i*a+t]){const r=this._flowData.data[2*(i*a+t)],e=this._flowData.data[2*(i*a+t)+1],s=Math.sqrt(r*r+e*e);h=Math.min(h,s),d=Math.max(d,s)}const _=new Uint8Array(4*a*e);for(let i=0;i<e;i++)for(let t=0;t<a;t++)if(0!==this._flowData.mask[i*a+t]){const r=this._flowData.data[2*(i*a+t)],e=this._flowData.data[2*(i*a+t)+1],s=(Math.sqrt(r*r+e*e)-h)/(d-h);_[4*(i*a+t)]=255*s,_[4*(i*a+t)+1]=0,_[4*(i*a+t)+2]=0,_[4*(i*a+t)+3]=255}else _[4*(i*a+t)]=0,_[4*(i*a+t)+1]=0,_[4*(i*a+t)+2]=0,_[4*(i*a+t)+3]=0;const w=new n(a,e);w.internalFormat=6408,w.wrapMode=33071,w.flipped=!0;const x=new i(r,w,_);this.vertexArray=o,this.program=c,this.texture=x,this.min=h,this.max=d,this._flowData=null}detach(){this.vertexArray.dispose(),this.texture.dispose()}get ready(){return this.program.compiled}}export{h as Imagery,d as ImageryResources};
|
|
@@ -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{throwIfAborted as t}from"../../../../../core/promiseUtils.js";import{areStreamlinesCompatible as
|
|
5
|
+
import{throwIfAborted as t}from"../../../../../core/promiseUtils.js";import{deserializeFlowPaths as e}from"../flowPathsIO.js";import{areStreamlinesCompatible as a,getPositions as s,setUniforms as r}from"../utils.js";import{AFlowResources as i}from"./AFlowResources.js";import{BufferObject as o}from"../../../../webgl/BufferObject.js";import{PrimitiveType as n,DataType as m}from"../../../../webgl/enums.js";import{VertexArrayObject as p}from"../../../../webgl/VertexArrayObject.js";import{fromLayout as l}from"../../../../webgl/VertexAttributeLocations.js";import{VertexBuffer as f}from"../../../../webgl/VertexBuffer.js";import{VertexElementDescriptor as h}from"../../../../webgl/VertexElementDescriptor.js";class c{constructor(t){this._params=t,this.supportsContinuation=!1,this.slideoutDuration=0}get animated(){return this._params.flowSpeed>0}isCompatible(t){return t instanceof c&&a(this._params,t._params)}async load(a,r,i){const{extent:o,size:n}=a;t(i);const m=await this._params.loadImagery(o,n[0],n[1],this._params.timeExtent,i),p=r&&this._params.simulationSettings.continuous?s(r.flowPaths,r.query,a,this._params.flowSpeed):[],{vertexData:l,indexData:f,pathData:h}=await this._params.createFlowMesh("Particles",this._params.simulationSettings,m,{positions:p},i),c=e(h);return new d(l,f,a,c,{color:this._params.color,opacity:this._params.opacity,size:this._params.size})}render(t,e,a){const{context:s}=t,{program:i}=a;s.setFaceCullingEnabled(!1),s.setBlendingEnabled(!0),s.setBlendFunction(1,771),s.useProgram(i),i.setUniform1f("u_time",e.time),i.setUniform1f("u_displayOpacity",e.displayOpacity),i.setUniform1f("u_trailLength",this._params.trailLength),i.setUniform1f("u_flowSpeed",this._params.flowSpeed),i.setUniform1f("u_featheringSize",this._params.featheringSize),i.setUniform1f("u_featheringOffset",this._params.featheringOffset),i.setUniform1f("u_introFade",this._params.introFade?1:0),i.setUniform1f("u_fadeToZero",this._params.fadeToZero?1:0),i.setUniform1f("u_decayRate",this._params.decayRate),i.setUniformMatrix3fv("u_dvsMat3",e.dvsMat3),i.setUniformMatrix3fv("u_displayViewMat3",e.displayViewMat3),r(i,"color","vec4",this._params.color),r(i,"opacity","float",this._params.opacity),r(i,"size","float",this._params.size),s.bindVAO(a.vertexArray),s.drawElements(n.TRIANGLES,a.indexCount,m.UNSIGNED_INT,0)}}const _=[new h("a_xyts0",4,m.FLOAT,0,64),new h("a_xyts1",4,m.FLOAT,16,64),new h("a_typeIdDurationSeed",4,m.FLOAT,32,64),new h("a_extrudeInfo",4,m.FLOAT,48,64)],u={vsPath:"raster/flow/particles",fsPath:"raster/flow/particles",locations:l(_)};class d extends i{constructor(t,e,a,s,r){super(a,s),this._vertexData=t,this._indexData=e,this._values=r}attach(t){const{context:e}=t,a=new f(e,_,this._vertexData),s=o.createIndex(e,35044,this._indexData),r=new p(e,a,s),i=[];"ramp"===this._values.color.kind&&i.push("vvColor"),"ramp"===this._values.opacity.kind&&i.push("vvOpacity"),"ramp"===this._values.size.kind&&i.push("vvSize");const n=t.getProgram(u,i);this.vertexArray=r,this.program=n,this.indexCount=this._indexData.length,this._vertexData=null,this._indexData=null}detach(){this.vertexArray.dispose()}get ready(){return this.program.compiled}}export{c as Particles,d as ParticlesResources};
|
|
@@ -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 t{constructor(
|
|
5
|
+
import{AFlowResources as s}from"./AFlowResources.js";class t{constructor(s){this._styles=s,this.supportsContinuation=!1,this.slideoutDuration=0}get animated(){return this._styles.reduce((s,t)=>s||t.animated,!1)}isCompatible(s){if(!(s instanceof t))return!1;if(this._styles.length!==s._styles.length)return!1;const e=this._styles.length;for(let t=0;t<e;t++)if(!this._styles[t].isCompatible(s._styles[t]))return!1;return!0}async load(s,t,r){const o=await Promise.all(this._styles.map(t=>t.load(s,null,r)));return new e(o,s,[])}render(s,t,e){for(let r=0;r<this._styles.length;r++)this._styles[r].render(s,t,e.resources[r])}}class e extends s{constructor(s,t,e){super(t,e),this.resources=s}attach(s){for(const t of this.resources)t.attach(s)}detach(){for(const s of this.resources)s.detach()}get ready(){return this.resources.reduce((s,t)=>s&&t.ready,!0)}}export{t as Stack,e as StackResources};
|
|
@@ -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{throwIfAborted as t}from"../../../../../core/promiseUtils.js";import{areStreamlinesCompatible as
|
|
5
|
+
import{throwIfAborted as t}from"../../../../../core/promiseUtils.js";import{deserializeFlowPaths as e}from"../flowPathsIO.js";import{areStreamlinesCompatible as s,getPositions as a,setUniforms as i}from"../utils.js";import{AFlowResources as r}from"./AFlowResources.js";import{BufferObject as o}from"../../../../webgl/BufferObject.js";import{PrimitiveType as n,DataType as m}from"../../../../webgl/enums.js";import{VertexArrayObject as p}from"../../../../webgl/VertexArrayObject.js";import{fromLayout as f}from"../../../../webgl/VertexAttributeLocations.js";import{VertexBuffer as l}from"../../../../webgl/VertexBuffer.js";import{VertexElementDescriptor as h}from"../../../../webgl/VertexElementDescriptor.js";class u{constructor(t){this._params=t,this.supportsContinuation=!1,this.slideoutDuration=20}get animated(){return this._params.flowSpeed>0}isCompatible(t){return t instanceof u&&s(this._params,t._params)}async load(s,i,r){const{extent:o,size:n}=s;t(r);const m=await this._params.loadImagery(o,n[0],n[1],this._params.timeExtent,r),p=i&&this._params.simulationSettings.continuous?a(i.flowPaths,i.query,s,this._params.flowSpeed):[],{vertexData:f,indexData:l,pathData:h}=await this._params.createFlowMesh("Streamlines",this._params.simulationSettings,m,{positions:p},r),u=e(h);return new c(f,l,s,u,{color:this._params.color,opacity:this._params.opacity,size:this._params.size})}render(t,e,s){const{context:a}=t,{program:r}=s;a.setFaceCullingEnabled(!1),a.setBlendingEnabled(!0),a.setBlendFunction(1,771),a.useProgram(r),r.setUniform1f("u_time",e.time-s.query.time),r.setUniform1f("u_startTime",e.startTime-s.query.time),r.setUniform1f("u_endTime",e.endTime-s.query.time),r.setUniform1f("u_displayOpacity",e.displayOpacity),r.setUniform1f("u_trailLength",this._params.trailLength),r.setUniform1f("u_flowSpeed",this._params.flowSpeed),r.setUniform1f("u_featheringSize",this._params.featheringSize),r.setUniform1f("u_featheringOffset",this._params.featheringOffset),r.setUniform1f("u_introFade",this._params.introFade?1:0),r.setUniform1f("u_fadeToZero",this._params.fadeToZero?1:0),r.setUniform1f("u_decayRate",this._params.decayRate),r.setUniformMatrix3fv("u_dvsMat3",e.dvsMat3),r.setUniformMatrix3fv("u_displayViewMat3",e.displayViewMat3),i(r,"color","vec4",this._params.color),i(r,"opacity","float",this._params.opacity),i(r,"size","float",this._params.size),a.bindVAO(s.vertexArray),a.drawElements(n.TRIANGLES,s.indexCount,m.UNSIGNED_INT,0)}}const _=[new h("a_positionAndSide",3,m.FLOAT,0,36),new h("a_timeInfo",3,m.FLOAT,12,36),new h("a_extrude",2,m.FLOAT,24,36),new h("a_speed",1,m.FLOAT,32,36)],d={vsPath:"raster/flow/streamlines",fsPath:"raster/flow/streamlines",locations:f(_)};class c extends r{constructor(t,e,s,a,i){super(s,a),this._vertexData=t,this._indexData=e,this._values=i}attach(t){const{context:e}=t,s=new l(e,_,this._vertexData),a=o.createIndex(e,35044,this._indexData),i=new p(e,s,a),r=[];"ramp"===this._values.color.kind&&r.push("vvColor"),"ramp"===this._values.opacity.kind&&r.push("vvOpacity"),"ramp"===this._values.size.kind&&r.push("vvSize");const n=t.getProgram(d,r);this.vertexArray=i,this.program=n,this.indexCount=this._indexData.length,this._vertexData=null,this._indexData=null}detach(){this.vertexArray.dispose()}get ready(){return this.program.compiled}}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{pt2px as e}from"../../../../core/screenUtils.js";import{Seconds as t}from"../../../../core/time.js";import{isFlowPathBuffer as n,valuesPerFlowVertex as i}from"../../../3d/support/flow/loadUtils.js";function o(t){const n=s(l(t)),i=n,o=!0,r=Math.max(n/2,5),a=Math.round(e(t.maxPathLength)/r)+1,u=10,{density:c}=t
|
|
5
|
+
import{pt2px as e}from"../../../../core/screenUtils.js";import{Seconds as t}from"../../../../core/time.js";import{isFlowPathBuffer as n,valuesPerFlowVertex as i}from"../../../3d/support/flow/loadUtils.js";function o(t){const n=s(l(t)),i=n,o=!0,r=Math.max(n/2,5),a=Math.round(e(t.maxPathLength)/r)+1,u=10,{density:c}=t,m=e(t.smoothing),p="flow-from"===t.flowRepresentation?1:-1,f=.001,h=1,d=!0,g=!1,{continuous:x,perturb:v}=t;return{smoothing:m,interpolate:d,velocityScale:p,verticesPerLine:a,minSpeedThreshold:f,segmentLength:r,maxTurnAngle:h,collisions:o,lineCollisionWidth:i,lineSpacing:u,density:c,onlyForwardTracing:g,continuous:x,perturb:v,wrapAround:!1}}function s(e){return"constant"===e.kind?e.value[0]:e.values[e.values.length-1]}function r(e){const t=e.toRgba();return[t[0]/255,t[1]/255,t[2]/255,t[3]]}function a(e){return{kind:"constant",value:[.1,.1,.1,1]}}function l(t){if(!t.hasVisualVariables("size"))return{kind:"constant",value:[e(t.trailWidth)]};const n=t.getVisualVariablesForType("size")[0],i=[],o=[];let s;if(n.stops){for(const t of n.stops)i.push(t.value),o.push(e(t.size));s=n.stops.length}else i.push(n.minDataValue,n.maxDataValue),o.push(e(n.minSize),e(n.maxSize)),s=2;return{kind:"ramp",stops:i,values:o,count:s}}function u(e){if(!e.hasVisualVariables("color"))return{kind:"constant",value:r(e.color)};const t=e.getVisualVariablesForType("color")[0],n=[],i=[];for(const o of t.stops)n.push(o.value),Array.prototype.push.apply(i,r(o.color));return{kind:"ramp",stops:n,values:i,count:t.stops.length}}function c(e){if(!e.hasVisualVariables("opacity"))return{kind:"constant",value:[1]};const t=e.getVisualVariablesForType("opacity")[0],n=[],i=[];for(const o of t.stops)n.push(o.value),i.push(o.opacity);return{kind:"ramp",stops:n,values:i,count:t.stops.length}}function m(e,t,n,i){switch(t){case"int":e.setUniform1iv(n,i);break;case"float":e.setUniform1fv(n,i);break;case"vec2":e.setUniform2fv(n,i);break;case"vec3":e.setUniform3fv(n,i);break;case"vec4":e.setUniform4fv(n,i)}}function p(e,t,n,i){"constant"===i.kind?m(e,n,`u_${t}`,i.value):(m(e,"float",`u_${t}_stops`,i.stops),m(e,n,`u_${t}_values`,i.values),e.setUniform1i(`u_${t}_count`,i.count))}function f(e,t){let n=!0;return n=n&&e.collisions===t.collisions,n=n&&e.density===t.density,n=n&&e.interpolate===t.interpolate,n=n&&e.lineCollisionWidth===t.lineCollisionWidth,n=n&&e.lineSpacing===t.lineSpacing,n=n&&e.maxTurnAngle===t.maxTurnAngle,n=n&&e.minSpeedThreshold===t.minSpeedThreshold,n=n&&e.segmentLength===t.segmentLength,n=n&&e.smoothing===t.smoothing,n=n&&e.velocityScale===t.velocityScale,n=n&&e.verticesPerLine===t.verticesPerLine,n=n&&e.onlyForwardTracing===t.onlyForwardTracing,n=n&&e.continuous===t.continuous,n=n&&h(e.perturb,t.perturb),n}function h(e,t){return!e&&!t||!(e&&!t||!e&&t)&&(e?.rotation===t?.rotation&&e?.scale===t?.scale)}function d(e,t){return e===t||null!=e&&null!=t&&e.equals(t)}function g(e,t){if(!f(e.simulationSettings,t.simulationSettings))return!1;if(!d(e.timeExtent,t.timeExtent))return!1;let n=!0;return n=n&&e.loadImagery===t.loadImagery,n=n&&e.createFlowMesh===t.createFlowMesh,n=n&&e.color.kind===t.color.kind,n=n&&e.opacity.kind===t.opacity.kind,n=n&&e.size.kind===t.size.kind,n}function x(e,t,n,i){return e/=n.size[0],t=1-(t/=n.size[1]),e*=n.extent.xmax-n.extent.xmin,t*=n.extent.ymax-n.extent.ymin,e+=n.extent.xmin,t+=n.extent.ymin,e-=i.extent.xmin,t-=i.extent.ymin,e/=i.extent.xmax-i.extent.xmin,t=1-(t/=i.extent.ymax-i.extent.ymin),{x:e*=i.size[0],y:t*=i.size[1]}}function v(e,o,s,r){if(0===e.length)return[];const a=[],l=s.time-o.time,u=n(e),c=u?i(e[0].hasMagnitude):1,m=u?({vertices:e},n)=>{const i=e,o=n*c;return{x:i[o],y:i[o+1],time:t(i[o+2]),speed:0}}:({vertices:e},t)=>e[t];for(const n of e){const{stage:e,vertices:i}=n;if(2===e)continue;const u=i.length/c,p=m(n,0),f=p.time,h=(l*r-f)%(m(n,u-1).time-f)+f;let d=p.x,g=p.y,v=p.time;for(let o=1;o<u&&v<h;o++){const e=m(n,o),i=Math.min(e.time,h)-v,s=e.time-v;d+=(e.x-d)*(i/s),g+=(e.y-g)*(i/s),v=t(v+i)}a.push(x(d,g,o,s))}return a}const y=36e5,k=3600;export{g as areStreamlinesCompatible,x as changeQuery,u as getColor,o as getFlowSimulationSettings,a as getForegroundColor,s as getMax,c as getOpacity,v as getPositions,l as getSize,y as longSafetyTime,m as setUniform,p as setUniforms,k as shortMarginTime,f as simulationSettingsEqual,d as timeExtentsEqual,r as toRgba};
|