@arcgis/core 5.2.0-next.71 → 5.2.0-next.73
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/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/00cbff0b785e24e87d97.js +1 -0
- package/assets/esri/core/workers/chunks/{359584a8fb5687a7d098.js → 014f9fd2818e2c9d9a3b.js} +1 -1
- package/assets/esri/core/workers/chunks/{3b3a8a6167f2e1eeb828.js → 0823961e5d0bdedbf8cf.js} +2 -2
- package/assets/esri/core/workers/chunks/{a62f1b8ed065b2a38f1a.js → 0dbf31a663b5220a3136.js} +1 -1
- package/assets/esri/core/workers/chunks/{fe10a95ebe1da2322af6.js → 0df660dfd941cff3ea1d.js} +1 -1
- package/assets/esri/core/workers/chunks/{d93d0cb69f3a9a722510.js → 1418c03c4ab87f7ab5f4.js} +1 -1
- package/assets/esri/core/workers/chunks/{c03da138651ac53cadcb.js → 186bedc377cc97731ca2.js} +2 -2
- package/assets/esri/core/workers/chunks/{fff23b2682590c4b21e3.js → 2a2ed7bd44010f24c2dd.js} +1 -1
- package/assets/esri/core/workers/chunks/2e44978ee677aa23163d.js +256 -0
- package/assets/esri/core/workers/chunks/{fc2cae359d571690d754.js → 35fd2f765d2cb3f59a22.js} +4 -4
- package/assets/esri/core/workers/chunks/{6b208bac120bcfecd9e4.js → 3e2b4e734aa20a308f3e.js} +1 -1
- package/assets/esri/core/workers/chunks/{fa19d5923276418096da.js → 44b50d4716a2567ab6f1.js} +1 -1
- package/assets/esri/core/workers/chunks/{50e0dd74795978468625.js → 4cf2b0558a4acc141429.js} +1 -1
- package/assets/esri/core/workers/chunks/{2d3a18d56e2e5669c562.js → 64176f7ae719289a2f79.js} +1 -1
- package/assets/esri/core/workers/chunks/{9684ab5e8254fdfcb7bb.js → 67f54586156d1ab80257.js} +1 -1
- package/assets/esri/core/workers/chunks/{2cfe6f41865ffb3a4645.js → 7e373d9c98ce910db9d2.js} +1 -1
- package/assets/esri/core/workers/chunks/{4da993c79b373b9d304e.js → 8302bffd28cc6720e0fe.js} +2 -2
- package/assets/esri/core/workers/chunks/{9dda9414104f585560a4.js → ad1d06a91121ebfe9162.js} +2 -2
- package/assets/esri/core/workers/chunks/{065e3353124fc5ac44ce.js → b33d870cbfa238762c5e.js} +1 -1
- package/assets/esri/core/workers/chunks/ba4f419f46be09a9a55c.js +1 -0
- package/assets/esri/core/workers/chunks/{684d3cb4fb233180b2d0.js → cd892c9603710d6130a9.js} +1 -1
- package/assets/esri/core/workers/chunks/{fa5d27e47d47ff8fcb96.js → d03e7be74c57c3dbf003.js} +2 -2
- package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
- package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
- package/chunks/Component.glsl.js +3 -3
- package/chunks/HUDMaterial.glsl.js +8 -8
- package/chunks/lyr3DMain.js +1 -1
- package/config.js +1 -1
- package/kernel.js +1 -1
- package/layers/ILyr3DWasmPerSceneView.js +1 -1
- package/layers/Lyr3DWasmPerSceneView.js +1 -1
- package/layers/support/tiles3DUtils.js +1 -1
- package/layers/video/VideoController.js +1 -1
- package/package.json +3 -3
- package/support/revision.js +1 -1
- package/views/2d/engine/Bitmap.js +1 -1
- package/views/2d/engine/BitmapTile.js +1 -1
- package/views/2d/engine/BitmapTileContainer.js +1 -1
- package/views/2d/engine/flow/FlowContainer.js +1 -1
- package/views/2d/engine/flow/FlowDisplayObject.js +1 -1
- 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/Streamlines.js +1 -1
- package/views/2d/engine/imagery/RasterBitmap.js +1 -1
- package/views/2d/engine/imagery/RasterTile.js +1 -1
- package/views/2d/engine/imagery/RasterTileContainer.js +1 -1
- package/views/2d/engine/imagery/RasterVFDisplayObject.js +1 -1
- package/views/2d/engine/imagery/RasterVFTile.js +1 -1
- package/views/2d/engine/imagery/RasterVFTileContainer.js +1 -1
- package/views/2d/engine/vectorTiles/VectorTileContainer.js +1 -1
- package/views/2d/engine/vectorTiles/VectorTileRendererHelper3D.js +1 -1
- package/views/2d/engine/webgl/Overlay.js +1 -1
- package/views/2d/engine/webgl/OverlayContainer.js +1 -1
- package/views/2d/engine/webgl/OverlayMultipoint.js +1 -1
- package/views/2d/engine/webgl/TileContainer.js +1 -1
- package/views/2d/engine/webgl/normalizedTileUtils.js +2 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AAnimatedShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedFillShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedLineShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimationUniformInfo.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/bitmap/BitmapTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/clip/ClipTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/createGraphicSymbolMeshSchemas.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityPointShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/drop-shadow/DropShadowTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/featureTechniqueUtils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/ComplexOutlineFillTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/FillMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/GradientFillMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/OutlineFillTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternOutlineFillTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/flow/FlowTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/line/GradientStrokeTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/line/LineMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/line/LineTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/line/TexturedLineTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/overlay/OverlayTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/pieChart/PieChartShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/RasterColorizerTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/RasterHighlightTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/VectorFieldTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/ReprojectTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/rasterVFUtils.js +2 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/AFeatureShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/BitmapShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/ClipShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/ComplexFillShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/ComplexOutlineFillShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/DebugOverlayShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/DropShadowShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/FillShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/GradientFillShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/GradientStrokeShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/HeatmapAccumulateShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/LineShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/OutlineFillShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/OverlayShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/PatternFillShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/PatternOutlineFillShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TexturedLineShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/Tile.js +2 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TileDebugInfoShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TileInfo.js +2 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TileStencilShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/ViewInfo.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/flow/FlowImageryShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/flow/FlowParticlesShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/flow/FlowStreamlinesShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/flow/FlowUtils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/hittestUtils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/BaseRasterColorizerShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/BaseRasterHighlightShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/MagDirShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/RasterVFTransform.js +2 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/ScalarShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/ReprojectShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderBackground.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderCircle.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderFill.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderIcon.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderLine.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderOutline.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderText.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/text/TextShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/tile/TileDebugInfoTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/tile/TileStencilTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/utility/DebugOverlayTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueBackground.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueCircle.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueFill.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueLine.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueSymbol.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/typed/TypedShaderProgram.js +1 -1
- package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
- package/views/2d/layers/MediaLayerView2D.js +1 -1
- package/views/2d/layers/TileLayerView2D.js +1 -1
- package/views/2d/layers/features/layerAdapters/AnnotationLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/DimensionLayerAdapter.js +1 -1
- package/views/2d/layers/features/schema/processor/symbols/ComplexSymbolSchema.js +1 -1
- package/views/2d/layers/support/DebugOverlay.js +1 -1
- package/views/3d/analysis/Dimension/LengthDimensionSubTool.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightAggregateManipulatedObject3D.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightPlacementController.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightReshapeTool3D.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightTool.js +1 -1
- package/views/3d/analysis/LineOfSight/lineOfSightPlacementUtils.js +1 -1
- package/views/3d/analysis/Slice/SliceTool.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedEditTool.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedTool.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillVisualization.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementShiftTool.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementTool.js +1 -1
- package/views/3d/interactive/editingTools/draw/DrawGraphicTool3D.js +1 -1
- package/views/3d/interactive/editingTools/move/MoveTool3D.js +1 -1
- package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +1 -1
- package/views/3d/interactive/editingTools/settings.js +1 -1
- package/views/3d/interactive/editingTools/transform/TransformTool3D.js +1 -1
- package/views/3d/interactive/manipulatorUtils.js +1 -1
- package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DTool.js +1 -1
- package/views/3d/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiles3D.js +1 -1
- package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/support/lyr3dTypeConversions.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/Component.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/NormalFromDepth.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/output/DepthConversion.glsl.js +14 -0
- package/views/3d/webgl-engine/core/shaderLibrary/output/ReadDepth.glsl.js +3 -15
- package/views/3d/webgl-engine/core/shaderLibrary/output/ReadDepthLastFrame.glsl.js +1 -1
- package/views/3d/webgl-engine/lib/BasisUtil.js +1 -1
- package/views/3d/webgl-engine/lib/ManagedTexture.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
- package/views/3d/webgl-engine/parts/RenderView.js +1 -1
- package/views/3d/webgl-engine/shaders/HUDMaterial.glsl.js +1 -1
- package/views/3d/webgl.js +1 -1
- package/views/VideoView.js +1 -1
- package/views/View.js +1 -1
- package/views/draw/DrawOperation.js +1 -1
- package/views/support/imageReprojection.js +1 -1
- package/assets/esri/core/workers/chunks/6357c7cac401aee9fe77.js +0 -1
- package/assets/esri/core/workers/chunks/d2faac81142586cf7509.js +0 -1
- package/assets/esri/core/workers/chunks/fd6107f95082e05f016a.js +0 -256
- package/views/2d/engine/webgl/shaderGraph/techniques/line/utils.js +0 -2
- /package/assets/esri/core/workers/chunks/{3b3a8a6167f2e1eeb828.js.LICENSE.txt → 0823961e5d0bdedbf8cf.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{c03da138651ac53cadcb.js.LICENSE.txt → 186bedc377cc97731ca2.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{4da993c79b373b9d304e.js.LICENSE.txt → 8302bffd28cc6720e0fe.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{9dda9414104f585560a4.js.LICENSE.txt → ad1d06a91121ebfe9162.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{fa5d27e47d47ff8fcb96.js.LICENSE.txt → d03e7be74c57c3dbf003.js.LICENSE.txt} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcgis/core",
|
|
3
|
-
"version": "5.2.0-next.
|
|
3
|
+
"version": "5.2.0-next.73",
|
|
4
4
|
"description": "ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ArcGIS",
|
|
@@ -20,10 +20,10 @@
|
|
|
20
20
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@amcharts/amcharts5": "~5.20.1",
|
|
23
|
-
"@arcgis/toolkit": "^5.2.0-next.
|
|
23
|
+
"@arcgis/toolkit": "^5.2.0-next.69",
|
|
24
24
|
"@esri/arcgis-html-sanitizer": "~4.1.0",
|
|
25
25
|
"@esri/calcite-components": "^5.2.0-next.43",
|
|
26
|
-
"@vaadin/grid": "~25.2.
|
|
26
|
+
"@vaadin/grid": "~25.2.7",
|
|
27
27
|
"@zip.js/zip.js": "~2.8.34",
|
|
28
28
|
"luxon": "~3.7.2",
|
|
29
29
|
"marked": "~18.0.9",
|
package/support/revision.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
const
|
|
2
|
+
const d="20260811",b="9e72381f5bd2da0557d6826b708782f0dedb52c0";export{d as buildDate,b as commitHash};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{onAbortOrThrow as t,throwIfNotAbortError as e}from"../../../core/promiseUtils.js";import{identity as i,translate as s,rotate as r,scaleByVec2 as h
|
|
2
|
+
import{onAbortOrThrow as t,throwIfNotAbortError as e}from"../../../core/promiseUtils.js";import{identity as i,translate as s,rotate as r,scaleByVec2 as h}from"../../../core/libs/gl-matrix-2/math/mat3.js";import{create as o}from"../../../core/libs/gl-matrix-2/factories/mat3f32.js";import{fromValues as u}from"../../../core/libs/gl-matrix-2/factories/vec2f32.js";import{DisplayObject as a}from"./DisplayObject.js";import n from"./ImageryBitmapSource.js";import{SizedPixelFormat as l}from"../../webgl/enums.js";import c from"../../webgl/Texture.js";import{TextureDescriptor as d}from"../../webgl/TextureDescriptor.js";function _(t){t instanceof ImageBitmap&&t.close()}function m(t){return t&&"render"in t}function p(t){const e=document.createElement("canvas");return e.width=t.width,e.height=t.height,t.render(e.getContext("2d")),e}function x(t){return m(t)?t instanceof n?t.getRenderedRasterPixels()?.renderedRasterPixels:p(t):t}class g extends a{constructor(t=null,e=!1){super(),this.blendFunction="standard",this._sourceWidth=0,this._sourceHeight=0,this._textureInvalidated=!1,this.stencilRef=0,this.coordScale=[1,1],this._height=void 0,this.pixelRatio=1,this.resolution=0,this.rotation=0,this._source=null,this._texture=null,this._width=void 0,this.x=0,this.y=0,this.immutable=e,this.source=t,this.requestRender=this.requestRender.bind(this)}destroy(){super.destroy(),this._texture&&(this._texture.dispose(),this._texture=null),this._source&&_(this._source),null!=this._uploadStatus&&(this._uploadStatus.controller.abort(),this._uploadStatus=null)}get isSourceScaled(){return this.width!==this._sourceWidth||this.height!==this._sourceHeight}get height(){return void 0!==this._height?this._height:this._sourceHeight}set height(t){this._height=t}get source(){return this._source}set source(t){null==t&&null==this._source||(this._source&&_(this._source),this._source=t,this.invalidateTexture(),this.requestRender())}get texture(){return this._texture}get width(){return void 0!==this._width?this._width:this._sourceWidth}set width(t){this._width=t}beforeRender(t){super.beforeRender(t),this.updateTexture(t)}async setSourceAsync(e,i){null!=this._uploadStatus&&this._uploadStatus.controller.abort();const s=new AbortController,r=Promise.withResolvers();return t(i,()=>s.abort()),t(s,t=>r.reject(t)),this._uploadStatus={controller:s,resolver:r},this.source=e,r.promise}invalidateTexture(){this._textureInvalidated||(this._textureInvalidated=!0,this._source instanceof HTMLImageElement?(this._sourceHeight=this._source.naturalHeight,this._sourceWidth=this._source.naturalWidth):this._source&&(this._sourceHeight=this._source.height,this._sourceWidth=this._source.width))}transitionStep(t,e){t>=64&&(this.fadeTransitionEnabled=!1),super.transitionStep(t,e)}setTransform(t){const e=i(this.transforms.localToScreenMat3),[o,a]=t.toScreenNoRotation([0,0],[this.x,this.y]),n=this.resolution/this.pixelRatio/t.resolution,l=n*this.width,c=n*this.height,d=Math.PI*this.rotation/180;s(e,e,u(o,a)),s(e,e,u(l/2,c/2)),r(e,e,-d),s(e,e,u(-l/2,-c/2)),h(e,e,u(l,c))}setSamplingProfile(t){this._texture&&(t.mips&&!this._texture.descriptor.hasMipmap&&this._texture.generateMipmap(),this._texture.setSamplingMode(t.samplingMode))}bind(t,e){this._texture&&t.bindTexture(this._texture,e)}async updateTexture({context:t,painter:i}){if(!this._textureInvalidated)return;if(this._textureInvalidated=!1,this._texture||(this._texture=this._createTexture(t)),!this.source)return void this._texture.setData(null);this._texture.resize(this._sourceWidth,this._sourceHeight);const s=x(this.source);try{if(null!=this._uploadStatus){const{controller:t,resolver:e}=this._uploadStatus,r={signal:t.signal},{width:h,height:o}=this,u=this._texture,a=i.textureUploadManager;await a.enqueueTextureUpdate({data:s,texture:u,width:h,height:o},r),e.resolve(),this._uploadStatus=null}else this._texture.setData(s);this.ready()}catch(r){e(r)}}onDetach(){this.destroy()}_createTransforms(){return{displayViewScreenMat3:o(),localToScreenMat3:o()}}_createTexture(t){const e=this.immutable,i=new d(this._sourceWidth,this._sourceHeight);return i.internalFormat=e?l.RGBA8:6408,i.wrapMode=33071,i.isImmutable=e,new c(t,i)}}export{g as Bitmap,m as isImageSource,p as rasterize};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{create as e}from"../../../core/libs/gl-matrix-2/factories/mat3f32.js";import{Bitmap as t}from"./Bitmap.js";import{TiledDisplayObject as s}from"./webgl/TiledDisplayObject.js";class
|
|
2
|
+
import{create as e}from"../../../core/libs/gl-matrix-2/factories/mat3f32.js";import{Bitmap as t}from"./Bitmap.js";import{TiledDisplayObject as s}from"./webgl/TiledDisplayObject.js";class i extends s{constructor(e,s,i,r,a,o,n=null){super(e,s,i,r,a,o),this.bitmap=new t(n),this.bitmap.coordScale=[a,o],this.bitmap.once("isReady",()=>this.ready())}destroy(){super.destroy(),this.bitmap.destroy()}beforeRender(e){this.bitmap.beforeRender(e),super.beforeRender(e)}afterRender(e){this.bitmap.afterRender(e),super.afterRender(e)}set stencilRef(e){this.bitmap.stencilRef=e}get stencilRef(){return this.bitmap.stencilRef}_createTransforms(){return{displayViewScreenMat3:e(),tileMat3:e()}}onAttach(){this.bitmap.stage=this.stage}onDetach(){this.bitmap&&(this.bitmap.stage=null)}}export{i as BitmapTile};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{create as e}from"../../../geometry/support/aaBoundingRect.js";import{BitmapTile as i}from"./BitmapTile.js";import t from"./webgl/TileContainer.js";import{BitmapTechnique as n}from"./webgl/shaderGraph/techniques/bitmap/BitmapTechnique.js";class r extends t{constructor(){super(...arguments),this._bitmapTechnique=null}get requiresDedicatedFBO(){return this.children.some(e=>"additive"===e.bitmap.blendFunction)}createTile(t){const n=this.tilingScheme.getTileBounds(e(),t),r=this.tilingScheme.getTileResolution(t.level),[s,h]=this.tilingScheme.size;return new i(t,r,n[0],n[3],s,h)}onAttach(){super.onAttach(),this._bitmapTechnique=new n}onDetach(){super.onDetach(),this._bitmapTechnique?.shutdown(),this._bitmapTechnique=null}renderChildren(e){
|
|
2
|
+
import{create as e}from"../../../geometry/support/aaBoundingRect.js";import{BitmapTile as i}from"./BitmapTile.js";import t from"./webgl/TileContainer.js";import{BitmapTechnique as n}from"./webgl/shaderGraph/techniques/bitmap/BitmapTechnique.js";class r extends t{constructor(){super(...arguments),this._bitmapTechnique=null}get requiresDedicatedFBO(){return this.children.some(e=>"additive"===e.bitmap.blendFunction)}createTile(t){const n=this.tilingScheme.getTileBounds(e(),t),r=this.tilingScheme.getTileResolution(t.level),[s,h]=this.tilingScheme.size;return new i(t,r,n[0],n[3],s,h)}onAttach(){super.onAttach(),this._bitmapTechnique=new n}onDetach(){super.onDetach(),this._bitmapTechnique?.shutdown(),this._bitmapTechnique=null}renderChildren(e){super.renderChildren(e),this.visible&&1===e.drawPhase&&null!=this._bitmapTechnique&&this._bitmapTechnique.render(e,{bitmaps:this.children})}}export{r as BitmapTileContainer};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{isForeverZero as e,getEndValue as t}from"./animatedValues.js";import s from"../webgl/WGLContainer.js";import{Techniques as r}from"../webgl/shaderGraph/techniques/TechniqueRegistry.js";class
|
|
2
|
+
import{isForeverZero as e,getEndValue as t}from"./animatedValues.js";import s from"../webgl/WGLContainer.js";import{Techniques as r}from"../webgl/shaderGraph/techniques/TechniqueRegistry.js";class a extends s{constructor(){super(...arguments),this.flowStyle=null}renderChildren(e){if(super.renderChildren(e),this.visible&&1===e.drawPhase)for(const t of this.children)this._renderDisplayObject(e,t)}_renderDisplayObject(s,a){const{requestRender:i}=s,n=[];for(const o of a.items){o.attached||(o.resources.attach({context:s.context}),o.attached=!0);const c=s.time/1e3;(s.animationsEnabled?e(o.displayOpacity,c)||c>o.endTime+o.style.slideoutDuration:0===t(o.displayOpacity))?o.attached&&(o.resources.detach(),o.attached=!1):(n.push(o),a.updateMatrix(s.state,o.resources.query),r.flow.render(s,{item:o,localToScreenMat3:a.transforms.localToScreenMat3}),o.style.animated&&null!=i&&s.animationsEnabled&&i())}a.items.splice(0,a.items.length,...n)}getFlowResources(e,t=!1){const s=this.children.filter(e=>e.visible).flatMap(e=>e.items.map(e=>e.resources)).find(t=>t.query.extent.contains(e));return s&&t&&"stack"===s.kind?s.resources.find(e=>"imagery"!==e.kind&&"stack"!==e.kind):s}}export{a as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{
|
|
2
|
+
import{fromTranslation as t,scaleByVec2 as e}from"../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as r}from"../../../../core/libs/gl-matrix-2/factories/mat3f32.js";import{fromValues as o}from"../../../../core/libs/gl-matrix-2/factories/vec2f32.js";import{DisplayObject as s}from"../DisplayObject.js";class a extends s{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(r,s){const a=s.extent.xmin,i=s.extent.ymax,c=[0,0];r.toScreenNoRotation(c,[a,i]);const m=(s.extent.xmax-s.extent.xmin)/s.size[0]/r.resolution,{localToScreenMat3:n}=this.transforms;t(n,[c[0],c[1],0]),e(n,n,o(m*r.pixelRatio,m*r.pixelRatio))}_createTransforms(){return{displayViewScreenMat3:r(),localToScreenMat3:r()}}}export{a as FlowDisplayObject};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{throwIfAborted as t}from"../../../../../core/promiseUtils.js";import{timeExtentsEqual as a,getFlowFloatUniforms as
|
|
2
|
+
import{throwIfAborted as t}from"../../../../../core/promiseUtils.js";import{timeExtentsEqual as a,getFlowFloatUniforms as e,getFlowColorUniforms as s}from"../utils.js";import{AFlowResources as r}from"./AFlowResources.js";import{Mesh as i}from"../../webgl/meshing/Mesh.js";import{FlowImageryShader as o}from"../../webgl/shaderGraph/techniques/shaders/flow/FlowImageryShader.js";import{PrimitiveType as m,DataType as n}from"../../../../webgl/enums.js";import l from"../../../../webgl/Texture.js";import{TextureDescriptor as p}from"../../../../webgl/TextureDescriptor.js";import{VertexElementDescriptor as h}from"../../../../webgl/VertexElementDescriptor.js";class c{constructor(t){this._params=t,this.supportsContinuation=!1,this.slideoutDuration=0,this.animated=!1}isCompatible(t){if(!(t instanceof c))return!1;if(!a(this._params.timeExtent,t._params.timeExtent))return!1;let e=!0;return e=e&&this._params.loadImagery===t._params.loadImagery,e=e&&this._params.color.kind===t._params.color.kind,e=e&&this._params.opacity.kind===t._params.opacity.kind,e}updateResource(t){t.update(this._params.color,this._params.opacity)}async load(a,e,s){const{extent:r,size:i}=a;t(s);const o=await this._params.loadImagery(r,i[0],i[1],this._params.timeExtent,s);return new d(o,a,[],o,{color:this._params.color,opacity:this._params.opacity})}}const u=[new h("position",2,n.UNSIGNED_SHORT,0,8),new h("texcoord",2,n.UNSIGNED_SHORT,4,8)];class d extends r{static{this._shader=new o}constructor(t,a,e,s,r){super(a,e,s),this._flowData=t,this._values=r,this.kind="imagery"}attach(t){const{context:a}=t,{width:e,height:s}=this._flowData;this.mesh=new i(a,{vertex:{geometry:{data:new Uint16Array([0,0,0,1,e,0,1,1,0,s,0,0,e,s,1,0]),layout:u}},groups:[{primitive:m.TRIANGLE_STRIP}],parts:[{group:0,start:0,count:4}]});let r=1e6,o=-1e6;for(let i=0;i<s;i++)for(let t=0;t<e;t++)if(0!==this._flowData.mask[i*e+t]){const a=this._flowData.data[2*(i*e+t)],s=this._flowData.data[2*(i*e+t)+1],m=Math.sqrt(a*a+s*s);r=Math.min(r,m),o=Math.max(o,m)}const n=new Uint8Array(4*e*s);for(let i=0;i<s;i++)for(let t=0;t<e;t++)if(0!==this._flowData.mask[i*e+t]){const a=this._flowData.data[2*(i*e+t)],s=this._flowData.data[2*(i*e+t)+1],m=(Math.sqrt(a*a+s*s)-r)/(o-r);n[4*(i*e+t)]=255*m,n[4*(i*e+t)+1]=0,n[4*(i*e+t)+2]=0,n[4*(i*e+t)+3]=255}else n[4*(i*e+t)]=0,n[4*(i*e+t)+1]=0,n[4*(i*e+t)+2]=0,n[4*(i*e+t)+3]=0;const h=new p(e,s);h.internalFormat=6408,h.wrapMode=33071,h.flipped=!0;const c=new l(a,h,n);this.texture=c,this.min=r,this.max=o,this._flowData=null}detach(){this.mesh.destroy(),this.texture.dispose()}get ready(){return!0}update(t,a){this._values={color:t,opacity:a}}getProgramSpec(t){return{shader:d._shader,uniforms:{view:t.view,transform:{localToScreenMat3:t.localToScreenMat3},state:{time:t.time,displayOpacity:t.displayOpacity,startTime:t.startTime,endTime:t.endTime},config:{min:this.min,max:this.max},color:s(this._values.color),opacity:e(this._values.opacity)},textures:{texture:{texture:this.texture,unit:0}},defines:{vvColor:"ramp"===this._values.color.kind,vvOpacity:"ramp"===this._values.opacity.kind},optionalAttributes:null}}}export{c as Imagery,d as ImageryResources};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{throwIfAborted as t}from"../../../../../core/promiseUtils.js";import{deserializeFlowPaths as
|
|
2
|
+
import{throwIfAborted as t}from"../../../../../core/promiseUtils.js";import{deserializeFlowPaths as e}from"../flowPathsIO.js";import{areStreamlinesCompatible as s,getFlowFloatUniforms as a,getFlowColorUniforms as i}from"../utils.js";import{AFlowResources as r}from"./AFlowResources.js";import{Mesh as o}from"../../webgl/meshing/Mesh.js";import{FlowParticlesShader as n}from"../../webgl/shaderGraph/techniques/shaders/flow/FlowParticlesShader.js";import{getPositions as p}from"../../../../support/flow/utils.js";import{PrimitiveType as m,DataType as h}from"../../../../webgl/enums.js";import{VertexElementDescriptor as l}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&&s(this._params,t._params)}updateResource(t){t.update(this._params)}async load(s,a,i){const{extent:r,size:o}=s;t(i);const n=await this._params.loadImagery(r,o[0],o[1],this._params.timeExtent,i),m={...n,data:n.data.slice(),mask:n.mask?.slice()},h=a&&this._params.simulationSettings.continuous?p(a.flowPaths,a.query,s,this._params.flowSpeed):[],{vertexData:l,indexData:c,pathData:d}=await this._params.createFlowMesh("Particles",this._params.simulationSettings,n,{positions:h},i),_=e(d);return new u(l,c,s,_,m,this._params)}}const d=[new l("xyts0",4,h.FLOAT,0,64),new l("xyts1",4,h.FLOAT,16,64),new l("typeIdFirstTimeLastTime",4,h.FLOAT,32,64),new l("extrudeInfo",4,h.FLOAT,48,64)];class u extends r{static{this._shader=new n}constructor(t,e,s,a,i,r){super(s,a,i),this._vertexData=t,this._indexData=e,this._params=r,this.kind="particles",this.update(r)}attach(t){const{context:e}=t;this.mesh=new o(e,{vertex:{geometry:{data:this._vertexData,layout:d}},index:{indices:{data:this._indexData}},groups:[{index:"indices",primitive:m.TRIANGLES}],parts:[{group:0,start:0,count:this._indexData.length}]}),this._vertexData=null,this._indexData=null}detach(){this.mesh.destroy()}get ready(){return!0}update(t){this._params=t,this._values={color:this._params.color,opacity:this._params.opacity,size:this._params.size}}getProgramSpec(t){return{shader:u._shader,uniforms:{view:t.view,transform:{localToScreenMat3:t.localToScreenMat3},state:{time:t.time,displayOpacity:t.displayOpacity,startTime:t.startTime,endTime:t.endTime},config:{trailLength:this._params.trailLength,flowSpeed:this._params.flowSpeed,featheringSize:this._params.featheringSize,featheringOffset:this._params.featheringOffset,introFade:this._params.introFade?1:0,fadeToZero:this._params.fadeToZero?1:0,decayRate:this._params.decayRate},color:i(this._values.color),opacity:a(this._values.opacity),size:a(this._values.size)},textures:{},defines:{vvColor:"ramp"===this._values.color.kind,vvOpacity:"ramp"===this._values.opacity.kind,vvSize:"ramp"===this._values.size.kind},optionalAttributes:null}}}export{c as Particles,u as ParticlesResources};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{throwIfAborted as t}from"../../../../../core/promiseUtils.js";import{deserializeFlowPaths as e}from"../flowPathsIO.js";import{areStreamlinesCompatible as s,getFlowFloatUniforms as a,getFlowColorUniforms as i}from"../utils.js";import{AFlowResources as r}from"./AFlowResources.js";import{Mesh as o}from"../../webgl/meshing/Mesh.js";import{FlowStreamlinesShader as n}from"../../webgl/shaderGraph/techniques/shaders/flow/FlowStreamlinesShader.js";import{getPositions as m}from"../../../../support/flow/utils.js";import{PrimitiveType as p,DataType as h}from"../../../../webgl/enums.js";import{VertexElementDescriptor as l}from"../../../../webgl/VertexElementDescriptor.js";class d{constructor(t){this._params=t,this.supportsContinuation=!1,this.slideoutDuration=20}get animated(){return this._params.flowSpeed>0}isCompatible(t){return t instanceof d&&s(this._params,t._params)}updateResource(t){t.update(this._params)}async load(s,a,i){const{extent:r,size:o}=s;t(i);const n=await this._params.loadImagery(r,o[0],o[1],this._params.timeExtent,i),p={...n,data:n.data.slice(),mask:n.mask?.slice()},h=a&&this._params.simulationSettings.continuous?m(a.flowPaths,a.query,s,this._params.flowSpeed):[],{vertexData:l,indexData:d,pathData:u}=await this._params.createFlowMesh("Streamlines",this._params.simulationSettings,n,{positions:h},i),_=e(u);return new c(l,d,s,_,p,this._params)}}const u=[new l("positionAndSide",3,h.FLOAT,0,36),new l("timeInfo",3,h.FLOAT,12,36),new l("extrude",2,h.FLOAT,24,36),new l("speed",1,h.FLOAT,32,36)];class c extends r{static{this._shader=new n}constructor(t,e,s,a,i,r){super(s,a,i),this._vertexData=t,this._indexData=e,this._params=r,this.kind="streamlines",this.update(r)}attach(t){const{context:e}=t;this.mesh=new o(e,{vertex:{geometry:{data:this._vertexData,layout:u}},index:{indices:{data:this._indexData}},groups:[{index:"indices",primitive:p.TRIANGLES}],parts:[{group:0,start:0,count:this._indexData.length}]}),this._vertexData=null,this._indexData=null}detach(){this.mesh.destroy()}get ready(){return!0}update(t){this._params=t,this._values={color:this._params.color,opacity:this._params.opacity,size:this._params.size}}getProgramSpec(t){return{shader:c._shader,uniforms:{state:{time:t.time-this.query.time,
|
|
2
|
+
import{throwIfAborted as t}from"../../../../../core/promiseUtils.js";import{deserializeFlowPaths as e}from"../flowPathsIO.js";import{areStreamlinesCompatible as s,getFlowFloatUniforms as a,getFlowColorUniforms as i}from"../utils.js";import{AFlowResources as r}from"./AFlowResources.js";import{Mesh as o}from"../../webgl/meshing/Mesh.js";import{FlowStreamlinesShader as n}from"../../webgl/shaderGraph/techniques/shaders/flow/FlowStreamlinesShader.js";import{getPositions as m}from"../../../../support/flow/utils.js";import{PrimitiveType as p,DataType as h}from"../../../../webgl/enums.js";import{VertexElementDescriptor as l}from"../../../../webgl/VertexElementDescriptor.js";class d{constructor(t){this._params=t,this.supportsContinuation=!1,this.slideoutDuration=20}get animated(){return this._params.flowSpeed>0}isCompatible(t){return t instanceof d&&s(this._params,t._params)}updateResource(t){t.update(this._params)}async load(s,a,i){const{extent:r,size:o}=s;t(i);const n=await this._params.loadImagery(r,o[0],o[1],this._params.timeExtent,i),p={...n,data:n.data.slice(),mask:n.mask?.slice()},h=a&&this._params.simulationSettings.continuous?m(a.flowPaths,a.query,s,this._params.flowSpeed):[],{vertexData:l,indexData:d,pathData:u}=await this._params.createFlowMesh("Streamlines",this._params.simulationSettings,n,{positions:h},i),_=e(u);return new c(l,d,s,_,p,this._params)}}const u=[new l("positionAndSide",3,h.FLOAT,0,36),new l("timeInfo",3,h.FLOAT,12,36),new l("extrude",2,h.FLOAT,24,36),new l("speed",1,h.FLOAT,32,36)];class c extends r{static{this._shader=new n}constructor(t,e,s,a,i,r){super(s,a,i),this._vertexData=t,this._indexData=e,this._params=r,this.kind="streamlines",this.update(r)}attach(t){const{context:e}=t;this.mesh=new o(e,{vertex:{geometry:{data:this._vertexData,layout:u}},index:{indices:{data:this._indexData}},groups:[{index:"indices",primitive:p.TRIANGLES}],parts:[{group:0,start:0,count:this._indexData.length}]}),this._vertexData=null,this._indexData=null}detach(){this.mesh.destroy()}get ready(){return!0}update(t){this._params=t,this._values={color:this._params.color,opacity:this._params.opacity,size:this._params.size}}getProgramSpec(t){return{shader:c._shader,uniforms:{view:t.view,transform:{localToScreenMat3:t.localToScreenMat3},state:{time:t.time-this.query.time,displayOpacity:t.displayOpacity,startTime:t.startTime-this.query.time,endTime:t.endTime-this.query.time},config:{trailLength:this._params.trailLength,flowSpeed:this._params.flowSpeed,featheringSize:this._params.featheringSize,featheringOffset:this._params.featheringOffset,introFade:this._params.introFade?1:0,fadeToZero:this._params.fadeToZero?1:0,decayRate:this._params.decayRate},color:i(this._values.color),opacity:a(this._values.opacity),size:a(this._values.size)},textures:{},defines:{vvColor:"ramp"===this._values.color.kind,vvOpacity:"ramp"===this._values.opacity.kind,vvSize:"ramp"===this._values.size.kind},optionalAttributes:null}}}export{d as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{disposeMaybe as t}from"../../../../core/maybe.js";import{
|
|
2
|
+
import{disposeMaybe as t}from"../../../../core/maybe.js";import{create as e}from"../../../../core/libs/gl-matrix-2/factories/mat3f32.js";import{DisplayObject as s}from"../DisplayObject.js";import{createTransformTexture as r,createPixelMaskTexture as i,createRasterTexture as h,createColormapTexture as a}from"../../../webgl/rasterUtils.js";const u={bandCount:3,minOutput:0,maxOutput:1,minCutOff:[0,0,0],maxCutOff:[255,255,255],factor:[1/255,1/255,1/255],useGamma:!1,gamma:[1,1,1],gammaCorrection:[1,1,1],colormap:null,colormapOffset:null,stretchType:"none",type:"stretch"};class o extends s{constructor(t=null,e=null,s=null){super(),this._textureInvalidated=!0,this._colormapTextureInvalidated=!0,this._rasterTexture=null,this._maskTexture=null,this._rasterTextureBandIds=null,this._transformGridTexture=null,this._colormapTexture=null,this._colormap=null,this._supportsBilinearTexture=!0,this._processedTexture=null,this._highlightTexture=null,this.functionTextures=[],this.projected=!1,this.stencilRef=0,this.coordScale=[1,1],this._processed=!1,this._highlighted=!1,this._symbolizerParameters=null,this.height=null,this.isRenderedSource=!1,this.pixelRatio=1,this.resolution=0,this.rotation=0,this._source=null,this._mask=null,this.rawPixelData=null,this._suspended=!1,this._bandIds=null,this._interpolation=null,this._transformGrid=null,this.width=null,this.x=0,this.y=0,this.source=t,this.transformGrid=e,this.interpolation=s}destroy(){super.destroy(),this._disposeTextures()}get processedTexture(){return this._processedTexture}set processedTexture(t){this._processedTexture!==t&&(this._disposeTextures(!0),this._processedTexture=t)}get highlightTexture(){return this._highlightTexture}set highlightTexture(t){this._highlightTexture!==t&&(this._highlightTexture?.dispose(),this._highlightTexture=t),null==t&&(this._highlighted=!1)}get rasterTexture(){return this._rasterTexture}set rasterTexture(t){this._rasterTexture!==t&&(this._rasterTexture?.dispose(),this._rasterTexture=t),null==t&&(this.projected=!1)}get processed(){return this._processed}set processed(e){this._processed=e,e||(this.processedTexture=t(this.processedTexture),this.invalidateTexture())}get highlighted(){return this._highlighted}get symbolizerParameters(){return this._symbolizerParameters||u}set symbolizerParameters(t){this._symbolizerParameters!==t&&(this._symbolizerParameters=t,this._colormapTextureInvalidated=!0)}get source(){return this._source}set source(e){this._source!==e&&(this._source=e,this._rasterTexture&&(this._rasterTexture=t(this._rasterTexture),this._rasterTextureBandIds=null),this.projected=!1,this.invalidateTexture())}get mask(){return this._mask}set mask(e){this._mask!==e&&(this._mask=e,this._maskTexture=t(this._maskTexture))}get suspended(){return this._suspended}set suspended(t){this._suspended&&!t&&this.stage&&(this.ready(),this.requestRender()),this._suspended=t}get bandIds(){return this._bandIds}set bandIds(t){this._bandIds=t,this._isBandIdsChanged(t)&&(this.projected=!1,this.invalidateTexture())}get interpolation(){return this._interpolation||"nearest"}set interpolation(t){this._interpolation=t,this._rasterTexture&&this._rasterTexture.setSamplingMode("bilinear"===this._getTextureSamplingMethod(t||"nearest")?9729:9728)}get transformGrid(){return this._transformGrid}set transformGrid(e){this._transformGrid!==e&&(this._transformGrid=e,this._transformGridTexture=t(this._transformGridTexture))}invalidateTexture(){this._textureInvalidated||(this._textureInvalidated=!0,this.requestRender())}getRasterTextureSize(t=!1){const e=t||this.projected;return[e?this.width:this.source?.width||this.width,e?this.height:this.source?.height||this.height]}getRasterCellSize(){const t=this.rawPixelData?.srcPixelSize,{projected:e,resolution:s}=this;return t&&!e?[t.x,t.y]:[s,s]}_createTransforms(){return{displayViewScreenMat3:e()}}getTextures({forProcessing:t=!1,useProcessedTexture:e=!1}={}){const s=e?this._processedTexture??this._rasterTexture:this._rasterTexture,r=[],i=[];return s?(this._transformGridTexture&&!this.projected&&(i.push(this._transformGridTexture),r.push("u_transformGrid")),i.push(s),r.push("u_image"),!this._colormapTexture||!e&&t||(i.push(this._colormapTexture),r.push("u_colormap")),this._maskTexture&&(i.push(this._maskTexture),r.push("u_mask")),{names:r,textures:i}):{names:r,textures:i}}onAttach(){this.invalidateTexture()}onDetach(){this.invalidateTexture()}updateTexture({context:t}){if(!this.stage)return void this._disposeTextures();const e=this._isValidSource(this.source);e&&this._colormapTextureInvalidated&&(this._colormapTextureInvalidated=!1,this._updateColormapTexture(t)),this._textureInvalidated&&(this._textureInvalidated=!1,this._createOrDestroyRasterTexture(t),this._rasterTexture&&(e?(this.transformGrid&&!this._transformGridTexture&&(this._transformGridTexture=r(t,this.transformGrid)),this._mask&&!this._maskTexture&&(this._maskTexture=i(t,this._mask,[this.width,this.height]))):this._rasterTexture.setData(null)),this.suspended||(this.ready(),this.requestRender()))}updateProcessedTexture(t=!0){t&&(this._highlighted=null!=this.highlightTexture);const{functionTextures:e}=this;0!==e.length&&(this.processedTexture=e.shift(),e.forEach(t=>t?.dispose()),e.length=0,this.processed=!!this.processedTexture)}_createOrDestroyRasterTexture(e){const s=this.source?.extractBands(this.bandIds);if(!this._isValidSource(s))return void(this._rasterTexture&&(this._rasterTexture=t(this._rasterTexture),this._rasterTextureBandIds=null));const r=!this._isBandIdsChanged(this.bandIds);if(this._rasterTexture){if(r)return;this._rasterTexture=t(this._rasterTexture),this._rasterTextureBandIds=null}this._supportsBilinearTexture=!!e.capabilities.textureFloatLinear;const i=this._getTextureSamplingMethod(this.interpolation),a=this.isRenderedSource;this._rasterTexture=h(e,s,i,a),this.projected=!1,this._processed=!1,this._rasterTextureBandIds=this.bandIds?[...this.bandIds]:null}_isBandIdsChanged(t){const e=this._rasterTextureBandIds;return!(null==e&&null==t||e&&e.join("")===t?.join(""))}_isValidSource(t){return null!=t&&t.pixels?.length>0}_getTextureSamplingMethod(t){const{type:e}=this.symbolizerParameters,s="lut"===e&&!this.symbolizerParameters.isClassBreaks||"hillshade"===e||"stretch"===e&&1===this.symbolizerParameters.bandCount;return!this._supportsBilinearTexture||s||"bilinear"!==t&&"cubic"!==t?"nearest":"bilinear"}_updateColormapTexture(e){const s=this._colormap,r=this.symbolizerParameters.colormap;return r?s?r.length!==s.length||r.some((t,e)=>t!==s[e])?(this._colormapTexture&&(this._colormapTexture=t(this._colormapTexture)),this._colormapTexture=a(e,r),void(this._colormap=r)):void 0:(this._colormapTexture=a(e,r),void(this._colormap=r)):(this._colormapTexture&&(this._colormapTexture=t(this._colormapTexture)),void(this._colormap=null))}_disposeTextures(e=!1){e?this.projected&&(this._transformGridTexture=t(this._transformGridTexture)):(this._rasterTexture=t(this._rasterTexture),this._colormapTexture=t(this._colormapTexture),this._transformGridTexture=t(this._transformGridTexture),this._maskTexture=t(this._maskTexture),this._rasterTextureBandIds=null,this._colormap=null,this._colormapTextureInvalidated=!0),this._processedTexture=t(this._processedTexture),this._highlightTexture=t(this._highlightTexture)}}class n extends o{get source(){return this._source}}export{o as RasterBitmap,n as RasterBitmapWithSource};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{create as t}from"../../../../core/libs/gl-matrix-2/factories/mat3f32.js";import{RasterBitmap as
|
|
2
|
+
import{create as t}from"../../../../core/libs/gl-matrix-2/factories/mat3f32.js";import{RasterBitmap as e}from"./RasterBitmap.js";import{TiledDisplayObject as s}from"../webgl/TiledDisplayObject.js";class i extends s{constructor(t,s,i,a,r,l,n=null){super(t,s,i,a,r,l),this.bitmap=null,this.bitmap=new e(n,null,null),this.bitmap.coordScale=[r,l],this.bitmap.once("isReady",()=>this.ready())}destroy(){super.destroy(),this.bitmap.destroy(),this.bitmap=null,this.stage=null}set stencilRef(t){this.bitmap.stencilRef=t}get stencilRef(){return this.bitmap.stencilRef}_createTransforms(){return{displayViewScreenMat3:t(),tileMat3:t()}}onAttach(){this.bitmap.stage=this.stage}onDetach(){this.bitmap.stage=null}}export{i as RasterTile};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{create as e}from"../../../../geometry/support/aaBoundingRect.js";import{getWorldWidth as i}from"../../viewpointUtils.js";import{RasterTile as t}from"./RasterTile.js";import s from"../webgl/TileContainer.js";import{RasterColorizerTechnique as
|
|
2
|
+
import{create as e}from"../../../../geometry/support/aaBoundingRect.js";import{getWorldWidth as i}from"../../viewpointUtils.js";import{RasterTile as t}from"./RasterTile.js";import s from"../webgl/TileContainer.js";import{RasterColorizerTechnique as r}from"../webgl/shaderGraph/techniques/raster/RasterColorizerTechnique.js";import{RasterHighlightTechnique as h}from"../webgl/shaderGraph/techniques/raster/RasterHighlightTechnique.js";import{RasterProcessorTechnique as n}from"../webgl/shaderGraph/techniques/raster/RasterProcessorTechnique.js";class o extends s{constructor(){super(...arguments),this.isCustomTilingScheme=!1}get pixelHighlights(){return this._pixelHighlights}set pixelHighlights(e){this._pixelHighlights=e,this.children.forEach(({bitmap:e})=>e.highlightTexture=null),this.requestRender()}createTile(e){const i=this._getTileBounds(e),[s,r]=this.tilingScheme.size,h=this.tilingScheme.getTileResolution(e.level);return new t(e,h,i[0],i[3],s,r)}onAttach(){super.onAttach(),this._colorizerTechnique=new r,this._processorTechnique=new n,this._highlightTechnique=new h}onDetach(){super.onDetach(),this._colorizerTechnique?.shutdown(),this._colorizerTechnique=void 0,this._processorTechnique?.shutdown(),this._processorTechnique=void 0,this._highlightTechnique?.shutdown(),this._highlightTechnique=void 0}doRender(e){if(!this.visible||1!==e.drawPhase||!this._colorizerTechnique)return;const{rasterFunctionChain:i}=this;if(i?.functions?.length){if(!this._processorTechnique)return;const{functions:t,hasBranches:s}=i;for(const i of t){if("Constant"===i.name||"Identity"===i.name)continue;e.rasterFunction=i,e.hasBranches=s,super.doRender(e);const t=this.children.map(e=>e.bitmap);this._processorTechnique.render(this._createRasterRenderParams(e),{bitmaps:t})}}if(this._pixelHighlights?.length&&this._highlightTechnique)for(const t of this._pixelHighlights){e.pixelHighlightOptions=t,super.doRender(e);const i=this.children.map(e=>e.bitmap);this._highlightTechnique.render(this._createRasterRenderParams(e),{bitmaps:i})}e.rasterFunction=null,e.pixelHighlightOptions=void 0,super.doRender(e),this._colorizerTechnique.render(this._createRasterRenderParams(e),{tiles:this.children})}_createRasterRenderParams(e){return{...e,...this.createRenderParams(e)}}_getTileBounds(t){const s=this.tilingScheme.getTileBounds(e(),t);if(this.isCustomTilingScheme&&t.world){const e=i(this.tilingScheme.spatialReference);if(e){const i=this.tilingScheme.getLODInfoAt(t.level);if(!i)return s;const{resolution:r}=i,h=r*this.tilingScheme.size[0];s[0]=e*t.world+this.tilingScheme.origin.x+t.col*h,s[2]=s[0]+h}}return s}}export{o as RasterTileContainer};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{identity as e,translate as s,scaleByVec2 as t
|
|
2
|
+
import{identity as e,translate as s,scaleByVec2 as t}from"../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as i}from"../../../../core/libs/gl-matrix-2/factories/mat3f32.js";import{fromValues as r}from"../../../../core/libs/gl-matrix-2/factories/vec2f32.js";import{createVFMeshData as a,createVFScalarData as o}from"../../../../layers/raster/functions/vectorFieldUtils.js";import{DisplayObject as h}from"../DisplayObject.js";import{Mesh as l}from"../webgl/meshing/Mesh.js";import{PrimitiveType as n,DataType as c}from"../../../webgl/enums.js";import{VertexElementDescriptor as m}from"../../../webgl/VertexElementDescriptor.js";class u extends h{constructor(e=null){super(),this._source=null,this._symbolizerParameters=null,this._meshesInvalidated=!0,this.coordScale=[1,1],this.height=null,this.key=null,this.offset=null,this.stencilRef=0,this.resolution=null,this.pixelRatio=1,this.x=0,this.y=0,this.rotation=0,this.rawPixelData=null,this.meshes=null,this.width=null,this.source=e}destroy(){super.destroy(),null!=this.meshes&&(this.meshes.magdir?.destroy(),this.meshes.scalar?.destroy(),this.meshes=null)}get symbolizerParameters(){return this._symbolizerParameters}set symbolizerParameters(e){JSON.stringify(this._symbolizerParameters)!==JSON.stringify(e)&&(this._symbolizerParameters=e,this.invalidateMeshes())}get source(){return this._source}set source(e){this._source=e,this.invalidateMeshes()}invalidateMeshes(){this._meshesInvalidated||null==this.meshes||(this.meshes.magdir?.destroy(),this.meshes.scalar?.destroy(),this.meshes=null,this._meshesInvalidated=!0,this.requestRender())}updateVectorFieldMesh(e){if(this._meshesInvalidated){if(this._meshesInvalidated=!1,null!=this.source&&null==this.meshes){const{style:s}=this.symbolizerParameters;switch(s){case"beaufort_ft":case"beaufort_km":case"beaufort_kn":case"beaufort_m":case"beaufort_mi":case"classified_arrow":case"ocean_current_kn":case"ocean_current_m":case"single_arrow":{const s=a(this.source,this.symbolizerParameters),t=this._createVectorFieldMesh(e,s);this.meshes={magdir:t}}break;case"simple_scalar":{const s=o(this.source,this.symbolizerParameters),t=this._createVectorFieldMesh(e,s);this.meshes={scalar:t}}break;case"wind_speed":{const s=a(this.source,this.symbolizerParameters),t=this._createVectorFieldMesh(e,s),i=o(this.source,this.symbolizerParameters),r=this._createVectorFieldMesh(e,i);this.meshes={scalar:r,magdir:t}}}}this.ready(),this.requestRender()}}_createTransforms(){return{displayViewScreenMat3:i(),localToScreenMat3:i()}}setTransform(i){const a=e(this.transforms.localToScreenMat3),[o,h]=i.toScreenNoRotation([0,0],[this.x,this.y]),l=this.resolution/this.pixelRatio/i.resolution,n=l*this.width,c=l*this.height;s(a,a,r(o,h)),t(a,a,r(n,c))}onAttach(){this.invalidateMeshes()}onDetach(){this.invalidateMeshes()}_createVectorFieldMesh(e,s){const{vertexData:t,indexData:i}=s,r={vertex:{geometry:{data:t,layout:[new m("position",2,c.FLOAT,0,24),new m("offset",2,c.FLOAT,8,24),new m("vv",2,c.FLOAT,16,24)]}},index:{indices:{data:i}},groups:[{index:"indices",primitive:n.TRIANGLES}],parts:[{group:0,start:0,count:i.length}]};return new l(e.context,r)}}export{u as RasterVFDisplayObject};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{
|
|
2
|
+
import{create as t}from"../../../../core/libs/gl-matrix-2/factories/mat3f32.js";import{RasterVFDisplayObject as e}from"./RasterVFDisplayObject.js";import{TiledDisplayObject as s}from"../webgl/TiledDisplayObject.js";class a extends s{constructor(t,s,a,i,l,r,o=null){super(t,s,a,i,l,r),this.tileData=new e(o),this.tileData.coordScale=[l,r],this.tileData.once("isReady",()=>this.ready())}destroy(){super.destroy(),this.tileData.destroy(),this.tileData=null,this.stage=null}set stencilRef(t){this.tileData.stencilRef=t}get stencilRef(){return this.tileData.stencilRef}_createTransforms(){return{displayViewScreenMat3:t(),tileMat3:t()}}onAttach(){this.tileData.stage=this.stage}onDetach(){this.tileData.stage=null}}export{a as RasterVFTile};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{create as e}from"../../../../geometry/support/aaBoundingRect.js";import{RasterVFTile as t}from"./RasterVFTile.js";import
|
|
2
|
+
import{create as e}from"../../../../geometry/support/aaBoundingRect.js";import{RasterVFTile as t}from"./RasterVFTile.js";import r from"../webgl/TileContainer.js";import{getRasterVFSamplingUniforms as i}from"../webgl/shaderGraph/techniques/raster/rasterVFUtils.js";import{VectorFieldTechnique as s}from"../webgl/shaderGraph/techniques/raster/VectorFieldTechnique.js";class n extends r{constructor(){super(...arguments),this.isCustomTilingScheme=!1,this.symbolTypes=["triangle"]}createTile(r){const i=this.tilingScheme.getTileBounds(e(),r),[s,n]=this.tilingScheme.size,o=this.tilingScheme.getTileResolution(r.level);return new t(r,o,i[0],i[3],s,n)}getTileStencilOptions(e){return{rasterVF:i(e)}}onAttach(){super.onAttach(),this._vectorFieldTechnique=new s}onDetach(){super.onDetach(),this._vectorFieldTechnique?.shutdown(),this._vectorFieldTechnique=void 0}doRender(e){this.visible&&1===e.drawPhase&&this._vectorFieldTechnique&&this.symbolTypes.forEach(t=>{e.renderPass=t,super.doRender(e),this._vectorFieldTechnique.render(this._createVectorFieldRenderParams(e),{tiles:this.children})})}_createVectorFieldRenderParams(e){return{...e,...this.createRenderParams(e)}}}export{n as RasterVFTileContainer};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{create as e}from"../../../../geometry/support/aaBoundingRect.js";import t from"../../../../layers/support/TileInfo.js";import{tileSizeInTileUnits as s,tileSizeInPixels as r}from"./constants.js";import{SymbolFader as i}from"./decluttering/SymbolFader.js";import{writeOpacityToBuffers as o}from"./decluttering/util.js";import{RenderableTile as l}from"../webgl/RenderableTile.js";import n from"../webgl/TileContainer.js";import{simplePipelineState as a}from"../webgl/shaderGraph/utils.js";import{VTLTechniquesRepo as d}from"../webgl/shaderGraph/techniques/vectorTiles/VTLTechniques.js";import h from"../../tiling/TileCoverage.js";import c from"../../tiling/TileKey.js";const u=1e-6;function y(e,t){if(e){const s=e.getLayoutProperty("visibility");if(!s||1!==s.getValue()&&(void 0===e.minzoom||e.minzoom<t+u)&&(void 0===e.maxzoom||e.maxzoom>=t-u))return!0}return!1}class m extends n{constructor(e){super(e),this._backgroundTiles=[],this._techniques=new d,this._computeDisplayInfoView(e),this._techniques.startup()}destroy(){super.destroy(),this.removeAllChildren(),this._spriteMosaic?.dispose(),this._spriteMosaic=null,null!=this._symbolFader&&(this._symbolFader.clear(),this._symbolFader=null);const e=this.stage?.context;e&&this._techniques.shutdown(e),this._styleRepository=null,this._backgroundTiles=[]}get fading(){return this._symbolFader?.fading??!1}get symbolFader(){return this._symbolFader}get symbolRepository(){return this._symbolFader?.symbolRepository}setStyleResources(e,t,r,l){if(this._spriteMosaic=e,this._glyphMosaic=t,this._styleRepository=r,this.tilingScheme=l,this._computeDisplayInfoView(l),null==this._symbolFader){const e=(e,t)=>{e.allSymbolsFadingOut=!0,e.lastOpacityUpdate=t,o(e,t,!0),e.decluttered=!0,e.requestRender()};this._symbolFader=new i("vector-tile",this._styleRepository,e,this.children,s)}this._symbolFader.styleRepository=r}setSpriteMosaic(e){this._spriteMosaic?.dispose(),this._spriteMosaic=e}deleteStyleLayers(e){null!=this._symbolFader&&this._symbolFader.deleteStyleLayers(e)}createRenderParams(e){return{...super.createRenderParams(e),renderPass:null,styleLayer:null,styleLayerUID:-1,glyphMosaic:this._glyphMosaic,spriteMosaic:this._spriteMosaic}}doRender(e){const{drawPhase:t}=e,s=1===t||64===t;this.visible&&s&&void 0!==this._spriteMosaic&&super.doRender(e)}addChild(e){return super.addChild(e),null!=this._symbolFader?this._symbolFader.addTile(e):e.decluttered=!0,this.requestRender(),e}removeChild(e){return null!=this._symbolFader&&this._symbolFader.removeTile(e),this.requestRender(),super.removeChild(e)}renderChildren(e){const{drawPhase:t}=e;64!==t?this._doRender(e):super.renderChildren(e)}removeAllChildren(){for(let e=0;e<this.children.length;e++){const t=this.children[e];null!=this._symbolFader&&this._symbolFader.removeTile(t),t.dispose()}super.removeAllChildren()}getStencilTarget(){return this.children.filter(e=>e.neededForCoverage&&e.hasData())}restartDeclutter(){null!=this._symbolFader&&this._symbolFader.restartDeclutter()}_doRender(e){const{context:t,painter:s,state:r}=e,i=this._styleRepository;if(!i)return;const o=i.layers,l=this._displayInfo.scaleToZoom(r.scale);this.children.forEach(e=>e.disposeLayerData()),super.renderChildren(e),i.backgroundBucketIds.length>0&&(e.renderPass="background",this._renderBackgroundLayers(e,i.backgroundBucketIds,l)),1===e.drawPhase&&this._fade(l,r);const n=this.children.filter(t=>(1===e.drawPhase&&t.fader.fade()<1&&this.requestRender(),t.visible&&t.hasData()));if(n&&0!==n.length){for(const e of n)e.triangleCount=0;t.setClearDepth(1),t.clear(256),s.setPipelineState({color:{write:[!0,!0,!0,!0],blendMode:"composite"},stencil:{write:!1,test:{compare:514,op:{fail:7680,zFail:7680,zPass:7681},mask:255}},depth:{write:!1,test:515}}),e.renderPass="translucent";for(let t=0;t<o.length;t++)this._renderStyleLayer(o[t],e,n);t.bindVAO(null),s.setPipelineState(a);for(const e of n)e.debugInfo.display.triangleCount=e.triangleCount}else t.bindVAO(null)}_fade(e,t){null!=this._symbolFader&&(this._symbolFader.update(e,t)||this.requestRender())}_renderStyleLayer(e,t,s){const{displayLevel:r,renderPass:i}=t;if(void 0===e)return;const o=e.getLayoutProperty("visibility");if(o&&1===o.getValue())return;switch(e.type){case 0:return;case 1:case 2:case 4:case 3:if("translucent"!==i)return}if(s=3===e.type?s.filter(e=>e.decluttered):s.filter(e=>e.neededForCoverage),3!==e.type&&(0===s.length||void 0!==e.minzoom&&e.minzoom>=r+u||void 0!==e.maxzoom&&e.maxzoom<r-u))return;const l=e.uid;t.styleLayerUID=l,t.styleLayer=e;const n=this._techniques.getTechnique(e.type);null!=n&&n.render(t,{tiles:s})}_renderBackgroundLayers(t,
|
|
2
|
+
import{create as e}from"../../../../geometry/support/aaBoundingRect.js";import t from"../../../../layers/support/TileInfo.js";import{tileSizeInTileUnits as s,tileSizeInPixels as r}from"./constants.js";import{SymbolFader as i}from"./decluttering/SymbolFader.js";import{writeOpacityToBuffers as o}from"./decluttering/util.js";import{RenderableTile as l}from"../webgl/RenderableTile.js";import n from"../webgl/TileContainer.js";import{simplePipelineState as a}from"../webgl/shaderGraph/utils.js";import{VTLTechniquesRepo as d}from"../webgl/shaderGraph/techniques/vectorTiles/VTLTechniques.js";import h from"../../tiling/TileCoverage.js";import c from"../../tiling/TileKey.js";const u=1e-6;function y(e,t){if(e){const s=e.getLayoutProperty("visibility");if(!s||1!==s.getValue()&&(void 0===e.minzoom||e.minzoom<t+u)&&(void 0===e.maxzoom||e.maxzoom>=t-u))return!0}return!1}class m extends n{constructor(e){super(e),this._backgroundTiles=[],this._techniques=new d,this._computeDisplayInfoView(e),this._techniques.startup()}destroy(){super.destroy(),this.removeAllChildren(),this._spriteMosaic?.dispose(),this._spriteMosaic=null,null!=this._symbolFader&&(this._symbolFader.clear(),this._symbolFader=null);const e=this.stage?.context;e&&this._techniques.shutdown(e),this._styleRepository=null,this._backgroundTiles=[]}get fading(){return this._symbolFader?.fading??!1}get symbolFader(){return this._symbolFader}get symbolRepository(){return this._symbolFader?.symbolRepository}setStyleResources(e,t,r,l){if(this._spriteMosaic=e,this._glyphMosaic=t,this._styleRepository=r,this.tilingScheme=l,this._computeDisplayInfoView(l),null==this._symbolFader){const e=(e,t)=>{e.allSymbolsFadingOut=!0,e.lastOpacityUpdate=t,o(e,t,!0),e.decluttered=!0,e.requestRender()};this._symbolFader=new i("vector-tile",this._styleRepository,e,this.children,s)}this._symbolFader.styleRepository=r}setSpriteMosaic(e){this._spriteMosaic?.dispose(),this._spriteMosaic=e}deleteStyleLayers(e){null!=this._symbolFader&&this._symbolFader.deleteStyleLayers(e)}createRenderParams(e){return{...super.createRenderParams(e),renderPass:null,styleLayer:null,styleLayerUID:-1,glyphMosaic:this._glyphMosaic,spriteMosaic:this._spriteMosaic}}doRender(e){const{drawPhase:t}=e,s=1===t||64===t;this.visible&&s&&void 0!==this._spriteMosaic&&super.doRender(e)}addChild(e){return super.addChild(e),null!=this._symbolFader?this._symbolFader.addTile(e):e.decluttered=!0,this.requestRender(),e}removeChild(e){return null!=this._symbolFader&&this._symbolFader.removeTile(e),this.requestRender(),super.removeChild(e)}renderChildren(e){const{drawPhase:t}=e;64!==t?this._doRender(e):super.renderChildren(e)}removeAllChildren(){for(let e=0;e<this.children.length;e++){const t=this.children[e];null!=this._symbolFader&&this._symbolFader.removeTile(t),t.dispose()}super.removeAllChildren()}getStencilTarget(){return this.children.filter(e=>e.neededForCoverage&&e.hasData())}restartDeclutter(){null!=this._symbolFader&&this._symbolFader.restartDeclutter()}_doRender(e){const{context:t,painter:s,state:r}=e,i=this._styleRepository;if(!i)return;const o=i.layers,l=this._displayInfo.scaleToZoom(r.scale);this.children.forEach(e=>e.disposeLayerData()),super.renderChildren(e),i.backgroundBucketIds.length>0&&(e.renderPass="background",this._renderBackgroundLayers(e,i.backgroundBucketIds,l)),1===e.drawPhase&&this._fade(l,r);const n=this.children.filter(t=>(1===e.drawPhase&&t.fader.fade()<1&&this.requestRender(),t.visible&&t.hasData()));if(n&&0!==n.length){for(const e of n)e.triangleCount=0;t.setClearDepth(1),t.clear(256),s.setPipelineState({color:{write:[!0,!0,!0,!0],blendMode:"composite"},stencil:{write:!1,test:{compare:514,op:{fail:7680,zFail:7680,zPass:7681},mask:255}},depth:{write:!1,test:515}}),e.renderPass="translucent";for(let t=0;t<o.length;t++)this._renderStyleLayer(o[t],e,n);t.bindVAO(null),s.setPipelineState(a);for(const e of n)e.debugInfo.display.triangleCount=e.triangleCount}else t.bindVAO(null)}_fade(e,t){null!=this._symbolFader&&(this._symbolFader.update(e,t)||this.requestRender())}_renderStyleLayer(e,t,s){const{displayLevel:r,renderPass:i}=t;if(void 0===e)return;const o=e.getLayoutProperty("visibility");if(o&&1===o.getValue())return;switch(e.type){case 0:return;case 1:case 2:case 4:case 3:if("translucent"!==i)return}if(s=3===e.type?s.filter(e=>e.decluttered):s.filter(e=>e.neededForCoverage),3!==e.type&&(0===s.length||void 0!==e.minzoom&&e.minzoom>=r+u||void 0!==e.maxzoom&&e.maxzoom<r-u))return;const l=e.uid;t.styleLayerUID=l,t.styleLayer=e;const n=this._techniques.getTechnique(e.type);null!=n&&n.render(t,{tiles:s})}_renderBackgroundLayers(e,t,s){const{displayLevel:r,state:i}=e,o=this._styleRepository;let l=!1;for(const h of t){const e=o.getLayerById(h);if(e&&0===e.type&&y(o.getLayerById(h),s)){l=!0;break}}if(!l)return;const n=this.tilingScheme.getTileCoverage(e.state,0,!0,"smallest"),{spans:a,lodInfo:d}=n,{level:m}=d,p=[];let g=0;for(const{row:h,colFrom:u,colTo:y}of a)for(let e=u;e<=y;e++){const t=new c(m,h,d.normalizeCol(e),d.getWorldForColumn(e)),s=this._getOrCreateBackgroundTile(g,t);s.setTransform(i),p.push(s),g++}const f=this._techniques.getTechnique(0);for(const h of t){const t=o.getLayerById(h);0!==t.type||!y(t,s)||void 0!==t.minzoom&&t.minzoom>=r+u||void 0!==t.maxzoom&&t.maxzoom<r-u||(e.styleLayerUID=t.uid,e.styleLayer=t,f.render(e,{tiles:p}))}h.pool.release(n)}_getOrCreateBackgroundTile(t,i){const o=this._backgroundTiles[t];if(o?.key.equals(i))return o;const n=this.tilingScheme.getTileBounds(e(),i),a=this.tilingScheme.getTileResolution(i.level),d=new l(i,a,n[0],n[3],r,r,s,s);return o?(o.destroy(),this._backgroundTiles[t]=d):this._backgroundTiles.push(d),d}_computeDisplayInfoView(e){let s=e.tileInfo.lods[0].scale;const i=Math.max(25,e.tileInfo.lods.length),o=[];for(let t=0;t<=i;t++)o.push(s),s/=2;this._displayInfo=t.create({scales:o,size:r,spatialReference:e.spatialReference,numLODs:i})}}export{m as VectorTileContainer};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{set as e,identity as t,translate as i,rotate as s,multiply as l}from"../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as n}from"../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{toRadian as r}from"../../../../core/libs/gl-matrix-2/math/common.js";import"../../tiling/TileInfoView.js";import a from"../../tiling/TileKey.js";import"../../tiling/TileQueue.js";import"../../tiling/TileStrategy.js";import{tileSizeInPixels as o,tileSizeInTileUnits as d,tileCoordinateScale as c}from"./constants.js";import{declutterSingleTile as h}from"./decluttering/jobsUtil.js";import{RenderableTile as u}from"../webgl/RenderableTile.js";import{TileReshuffleManager as m}from"../webgl/TileReshuffleManager.js";class p{constructor(){this._renderParams={reshuffleManager:new m,context:null,drawPhase:1,state:new g,stationary:!0,pixelRatio:1,displayLevel:-1,requiredLevel:-1,globalOpacity:1,renderPass:"background",styleLayer:null,styleLayerUID:-1,painter:null,glyphMosaic:null,spriteMosaic:null,profiler:null,renderingOptions:null,requestRender:null,allowDelayedRender:!1,deltaTime:-1,timeline:null,time:0,blendMode:null,dataUploadCounter:0,effects:null,inFadeTransition:!1,requireFBO:!1,highlightGradient:null,stencilSymbols:!0,is3D:!0,backgroundColor:null,animationsEnabled:!0},this._backgroundTile=new u(new a(0,0,0,0),
|
|
2
|
+
import{set as e,identity as t,translate as i,rotate as s,multiply as l}from"../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as n}from"../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{toRadian as r}from"../../../../core/libs/gl-matrix-2/math/common.js";import"../../tiling/TileInfoView.js";import a from"../../tiling/TileKey.js";import"../../tiling/TileQueue.js";import"../../tiling/TileStrategy.js";import{tileSizeInPixels as o,tileSizeInTileUnits as d,tileCoordinateScale as c}from"./constants.js";import{declutterSingleTile as h}from"./decluttering/jobsUtil.js";import{RenderableTile as u}from"../webgl/RenderableTile.js";import{TileReshuffleManager as m}from"../webgl/TileReshuffleManager.js";class p{constructor(){this._renderParams={reshuffleManager:new m,context:null,drawPhase:1,state:new g,stationary:!0,pixelRatio:1,displayLevel:-1,requiredLevel:-1,normalizedTileView:{origin:[0,0],worldWrapId:[0,0],unitsToPixels:1},tilingScheme:null,globalOpacity:1,renderPass:"background",styleLayer:null,styleLayerUID:-1,painter:null,glyphMosaic:null,spriteMosaic:null,profiler:null,renderingOptions:null,requestRender:null,allowDelayedRender:!1,deltaTime:-1,timeline:null,time:0,blendMode:null,dataUploadCounter:0,effects:null,inFadeTransition:!1,requireFBO:!1,highlightGradient:null,stencilSymbols:!0,is3D:!0,backgroundColor:null,animationsEnabled:!0},this._backgroundTile=new u(new a(0,0,0,0),1,0,0,o,o,d,d),this._heading=0,this._declutteredForHeading=new WeakMap}dispose(){this._renderParams=null}renderBackground(e,t,i,s,l,n,r,a,o,d){const c=this._backgroundTile;this._updateRenderParameters(e,t,c,i,l,n,r,a,o,d),this._renderParams.stencilSymbols=!1,i.drawBackground(this._renderParams,c,s)}renderContent(e,t,i,s,l,n,r,a,o,d,c,h){this._declutter(i),s.forAll(({sourceLayerInfo:{data:e}})=>this._declutter(e));const u=s.length>0;u&&this._stencilSymbols(e,t,i,s,l,n,r,a,o,d,c,h);let m=1;i.stencilRef=u?m:0,e.setStencilFunction(514,i.stencilRef,255),this._render(e,t,i,l,n,r,a,o,d,c,h),s.forAll(({sourceLod:t,offset:i,sourceLayerInfo:{data:s}})=>{s.stencilRef=++m,this._renderSymbols(e,t,s,l,n,r,a,i,d,c,h)})}_stencilSymbols(e,t,i,s,l,n,r,a,o,d,c,h){let u=1;i.stencilRef=u,e.setDepthTestEnabled(!1),e.setDepthWriteEnabled(!1),e.setStencilTestEnabled(!0),e.setBlendingEnabled(!1),e.setColorMask(!1,!1,!1,!1),e.setStencilOp(7680,7680,7681),e.setStencilWriteMask(255),e.setStencilFunction(519,i.stencilRef,255),this._stencilTileSymbols(e,t,i,l,n,r,a,o,d,c,h),s.forAll(({sourceLod:t,offset:i,sourceLayerInfo:{data:s}})=>{s.stencilRef=++u,e.setStencilFunction(519,s.stencilRef,255),this._stencilTileSymbols(e,t,s,l,n,r,a,i,d,c,h)}),e.setStencilWriteMask(0),e.setBlendingEnabled(!0),e.setDepthTestEnabled(!0),e.setColorMask(!0,!0,!0,!0)}_renderSymbols(e,t,i,s,l,n,r,a,o,d,c){e.setStencilFunction(514,i.stencilRef,255),this._render(e,t,i,s,l,n,r,a,o,d,c,3)}_render(e,t,i,s,l,n,r,a,o,d,c,h){this._updateRenderParameters(e,t,i,s,n,r,a,o,d,c),this._renderParams.stencilSymbols=!1,s.drawTile(this._renderParams,i,l,h)}_stencilTileSymbols(e,t,i,s,l,n,r,a,o,d,c){this._updateRenderParameters(e,t,i,s,n,r,a,o,d,c),this._renderParams.stencilSymbols=!0,i.triangleCount=0,s.drawSymbols(this._renderParams,i,l)}_updateRenderParameters(n,a,o,d,h,u,m,p,g,f){"type"in o&&"vector-tile"===o.type&&!o.stage&&o.attachWithContext(n);const _=a[0]-h.getLevelShift(a[0]),y=this._renderParams;y.context=n,y.painter=d,y.glyphMosaic=d.glyphMosaic,y.spriteMosaic=d.spriteMosaic,y.pixelRatio=g*f,y.displayLevel=_,y.requiredLevel=_;const b=h.getScale(a[0]),[S,w]=h.getOffset(a,u*b),M=c*u*b/p,T=-1-S-m[0]*u*2,R=1+w+(1-m[1])*u*2-2,P=y.state,x=p/f;P.size[0]=x,P.size[1]=x,P.pixelRatio=f,P.rotation=(360-this._heading)%360;const j=2/x;e(P.displayViewMat3,j,0,0,0,-j,0,-1,1,1);const L=M/j,k=[(T+1)/j,(1-R)/j],v=o.width/o.rangeX*o.resolution;P.resolution=v/L,y.normalizedTileView.origin[0]=-k[0],y.normalizedTileView.origin[1]=-k[1];const F=t(P.displayMat3),C=t(P.viewMat3),E=r(this._heading);i(F,F,[x/2,x/2]),s(F,F,E),i(F,F,[-x/2,-x/2]),l(F,P.displayViewMat3,F),i(C,C,[x/2,x/2]),s(C,C,-E),i(C,C,[-x/2,-x/2])}updateHeading(e){this._heading=e}_declutter(e){this._declutteredForHeading.get(e)!==this._heading&&(h(e,(360-this._heading)%360),this._declutteredForHeading.set(e,this._heading))}}class g{constructor(){this.size=[0,0],this.pixelRatio=1,this.rotation=0,this.displayMat3=n(),this.displayViewMat3=n(),this.viewMat3=n(),this.transform=null,this.inverseTransform=null,this.viewMat2d=null,this.id=0,this.extent=null,this.center=[0,0],this.scale=1,this.resolution=0,this.worldScreenWidth=0,this.spatialReference=null,this.viewpoint=null,this.getScreenTransform=null,this.toMap=null,this.toScreen=null,this.clone=null,this.copy=null,this.toJSON=null}}export{p as VectorTileRendererHelper3D};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import e from"../../../../core/Error.js";import{on as t}from"../../../../core/events.js";import r from"../../../../core/Handles.js";import i from"../../../../core/Logger.js";import{disposeMaybe as s}from"../../../../core/maybe.js";import{getProjectiveTransform as n}from"../../../../core/perspectiveUtils.js";import{watch as o,initial as a,when as d}from"../../../../core/reactiveUtils.js";import{create as l}from"../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{set as m}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as h}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{isVideoElement as p}from"../../../../support/mediaLayerUtils.js";import{DisplayObject as u}from"../DisplayObject.js";import{createPlayer as c,updateIfNeeded as f}from"./animatedFormats/utils.js";import y from"../../../webgl/Texture.js";import{TextureDescriptor as w}from"../../../webgl/TextureDescriptor.js";const x=[1,1],
|
|
2
|
+
import e from"../../../../core/Error.js";import{on as t}from"../../../../core/events.js";import r from"../../../../core/Handles.js";import i from"../../../../core/Logger.js";import{disposeMaybe as s}from"../../../../core/maybe.js";import{getProjectiveTransform as n}from"../../../../core/perspectiveUtils.js";import{watch as o,initial as a,when as d}from"../../../../core/reactiveUtils.js";import{create as l}from"../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{set as m}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as h}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{isVideoElement as p}from"../../../../support/mediaLayerUtils.js";import{DisplayObject as u}from"../DisplayObject.js";import{createPlayer as c,updateIfNeeded as f}from"./animatedFormats/utils.js";import y from"../../../webgl/Texture.js";import{TextureDescriptor as w}from"../../../webgl/TextureDescriptor.js";const x=[1,1],_=l(),v={none:"None",loop:"Loop",oscillate:"Oscillate"};function A(e){return e?{type:"CIMAnimatedSymbolProperties",...e,playAnimation:e.playing,repeatType:e.repeatType?v[e.repeatType]:void 0}:{type:"CIMAnimatedSymbolProperties"}}class g extends u{constructor(n){super(),this.elementView=n,this.isWrapAround=!1,this.wrapAroundShift=0,this.perspectiveTransform=h(),this._handles=new r,this._vertices=new Float32Array(8),this._indices=new Uint16Array([0,0,0,1,1,0,1,1,1,1,0,0,0,0,0,1,1,0,1,1]),this._playAnimation=!0,this._handles.add([o(()=>this.elementView.element.opacity,e=>this.opacity=e,a),o(()=>[this.elementView.coords],()=>{this.requestRender()},a),o(()=>["animationOptions"in this.elementView.element&&this.elementView.element.animationOptions],()=>{this.texture=s(this.texture),this.requestRender()},a),d(()=>this.elementView.element.loaded,()=>{const e=this.elementView.element;this.ready(),p(e)&&null!=e.content&&(this._handles.add([t(e.content,"play",()=>this.requestRender()),t(e.content,"loadeddata",()=>this.requestRender()),t(e.content,"loaded",()=>this.requestRender())]),"requestVideoFrameCallback"in e.content?e.content.requestVideoFrameCallback(()=>this.requestRender()):this._handles.add([t(e.content,"seeked",()=>this.requestRender())]),this.requestRender())},a)]),n.element.load().catch(t=>{i.getLogger("esri.views.2d.layers.MediaLayerView2D").error(new e("element-load-error","Element cannot be displayed",{element:n,error:t}))})}getMesh(e){throw new Error("Method not implemented.")}destroy(){super.destroy(),this._handles.destroy(),this.texture=s(this.texture)}get textureSize(){return x}beforeRender(e){const{context:t}=e,r=this.elementView.element.content;if(null!=r){const i=r instanceof HTMLImageElement,s=r instanceof HTMLVideoElement,n=i?r.naturalWidth:s?r.videoWidth:r.width,o=i?r.naturalHeight:s?r.videoHeight:r.height;if(this._updatePerspectiveTransform(n,o),this.texture)if(s)if(r.readyState>=r.HAVE_CURRENT_DATA)e.animationsEnabled&&this._updateTextureAndRequestRender(r);else{const e=()=>{this._updateTextureAndRequestRender(r),r.removeEventListener("canplay",e),r.removeEventListener("seeked",e)};r.addEventListener("canplay",e),r.addEventListener("seeked",e)}else"getFrame"in r&&e.animationsEnabled&&this.requestRender();else{const e=new w(n,o);if(e.wrapMode=33071,e.preMultiplyAlpha=!0,"getFrame"in r){const i=r=>{this.texture?this.texture.setData(r):this.texture=new y(t,e,r)};if("animationOptions"in this.elementView.element){const e=A(this.elementView.element.animationOptions);this._playAnimation=e.playAnimation??!1,this._player=c(r,e,null,i)}}else this.texture=new y(t,e,r);this.texture.generateMipmap(),s&&this._requestVideoFrame(r)}}super.beforeRender(e)}_updateTextureAndRequestRender(e){this.texture.setData(e),this.texture.generateMipmap(),this._requestVideoFrame(e)}_requestVideoFrame(e){"requestVideoFrameCallback"in e?e.requestVideoFrameCallback(()=>this.requestRender()):e.paused||this.requestRender()}_createTransforms(){return null}draw(e,t){this.isReady&&null!=this.texture?(this._playAnimation&&f(e,this._player),t.render(e,{config:{perspective:this.perspectiveTransform,texSize:x,wrapAroundShift:this.wrapAroundShift,isWrapAround:this.isWrapAround,opacity:this.opacity},texture:{texture:this.texture,unit:0},position:this._vertices,tex:this._indices})):this.requestRender()}updateDrawCoords(e,t,r,i){const{coords:s,bounds:n}=this.elementView;if(null==s||null==n)return;const[o,a,d,l]=s.rings[0],m=this._vertices,{x:h,y:p}=e;m.set([a[0]-h,a[1]-p,o[0]-h,o[1]-p,d[0]-h,d[1]-p,l[0]-h,l[1]-p]);let u=t;if(i){const[e,,t]=n,{worldWidth:r,xBounds:s}=i,[o,a]=s;e<o&&t>o?u=r:t>a&&e<a&&(u=-r)}this.wrapAroundShift=u,this.isWrapAround=0!==u}_updatePerspectiveTransform(e,t){const r=this._vertices;n(_,[0,0,e,0,0,t,e,t],[r[0],r[1],r[4],r[5],r[2],r[3],r[6],r[7]]),m(this.perspectiveTransform,_[6]/_[8]*e,_[7]/_[8]*t)}}export{g as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{toRadian as
|
|
2
|
+
import{toRadian as e}from"../../../../core/libs/gl-matrix-2/math/common.js";import{normalizeMapX as t}from"../../../../geometry/support/normalizeUtils.js";import{getInfo as o}from"../../../../geometry/support/spatialReferenceUtils.js";import{getWorldWidth as i}from"../../viewpointUtils.js";import r from"./WGLContainer.js";import{OverlayTechnique as s}from"./shaderGraph/techniques/overlay/OverlayTechnique.js";class a extends r{constructor(){super(...arguments),this._viewStateId=-1,this._overlayTechnique=new s}beforeRender(e){this._updateLocalOrigin(e),this._updateOverlays(e,this.children);for(const t of this.children)t.beforeRender(e)}doRender(e){if(1!==e.drawPhase||!this.visible)return;super.doRender(e);const t=this._overlayTechnique;for(const o of this.children)o.draw(e,t)}onDetach(){this._overlayTechnique.shutdown()}_updateLocalOrigin(e){const{state:o}=e,{id:i,viewpoint:r}=o;this._viewStateId!==i&&(this._localOrigin=r.targetGeometry.clone(),this._localOrigin.x=t(this._localOrigin.x,o.spatialReference),this._viewStateId=i)}_updateOverlays(t,r){const{state:s}=t,{rotation:a,spatialReference:n,worldScreenWidth:l,size:h,viewpoint:c}=s,d=this._localOrigin;let p,f=0;const m=o(n);if(m&&n.isWrappable){const t=h[0],o=h[1],r=e(a),d=Math.abs(Math.cos(r)),u=Math.abs(Math.sin(r)),v=Math.round(t*d+o*u),[_,w]=m.valid,y=i(n),{x:g,y:O}=c.targetGeometry,M=[g,O],b=[0,0];s.toScreen(b,M);const x=[0,0];let R;R=v>l?.5*l:.5*v;const j=Math.floor((g+.5*y)/y),q=_+j*y,S=w+j*y,G=[b[0]+R,0];s.toMap(x,G),x[0]>S&&(f=y),G[0]=b[0]-R,s.toMap(x,G),x[0]<q&&(f=-y),p={worldWidth:y,xBounds:[_,w]}}for(const e of r)e.updateDrawCoords(d,f,s,p)}}export{a as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{on as t}from"../../../../core/events.js";import e from"../../../../core/Handles.js";import{disposeMaybe as r}from"../../../../core/maybe.js";import{when as i,initial as
|
|
2
|
+
import{on as t}from"../../../../core/events.js";import e from"../../../../core/Handles.js";import{disposeMaybe as r}from"../../../../core/maybe.js";import{when as i,initial as o}from"../../../../core/reactiveUtils.js";import{createScreenPoint as s}from"../../../../core/screenUtils.js";import{create as n}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import a from"../../../../geometry/Point.js";import l from"../../../../geometry/Polygon.js";import{project as h}from"../../../../geometry/projectionUtils.js";import u from"../../../../layers/support/ControlPoint.js";import{DisplayObject as p}from"../DisplayObject.js";import c from"../../../layers/support/GeometryClipArea.js";import m from"../../../webgl/Texture.js";import{TextureDescriptor as d}from"../../../webgl/TextureDescriptor.js";const f=2;class x extends p{constructor(r){super(),this.element=r,this._handles=new e,this.isWrapAround=!1,this.perspectiveTransform=n(),this.wrapAroundShift=0,this.clipGeometry=null,this._handles.add(i(()=>this.element,()=>{const e=this.element;this.ready(),e&&this._handles.add(t(e,"play",()=>this.requestRender()))},o))}getMesh(t){throw new Error("Method not implemented.")}destroy(){super.destroy(),this._handles.destroy(),this.texture=r(this.texture)}get textureSize(){if(!this.texture)return[1,1];const t=this.texture.descriptor;return[t.width,t.height]}beforeRender(t){const e=this.element;if(null==e)return;const{context:r}=t,{videoWidth:i,videoHeight:o}=e;if(0!==i&&0!==o){if(this.texture)e.paused||t.animationsEnabled&&this.texture.setData(e);else{const t=new d(i,o);t.wrapMode=33071,t.preMultiplyAlpha=!0,this.texture=new m(r,t,e)}e.paused||null==this._vertices||this.texture.generateMipmap(),super.beforeRender(t)}}_createTransforms(){return null}updateDrawCoords(t,e,r,i){const o=this.element,s=this._getFrameInfo();if(!o||!s)return;const{spatialReference:n}=r;this._initializeData(t,s,n);const{controlPoints:a,horizon:u}=s,p=Math.sqrt(a.length),m=p,{x:d,y:x}=t,y=this._vertices,g=a[0],w=a[p-1],P=a[(m-1)*p],_=a[(m-1)*p+p-1],v=h(u?u[0].mapPoint:g.mapPoint,n),j=h(u?u[1].mapPoint:w.mapPoint,n),A=h(P.mapPoint,n),M=h(_.mapPoint,n);this.clipGeometry=u?new c({geometry:l.fromJSON({rings:[[[A.x,A.y],[M.x,M.y],[j.x,j.y],[v.x,v.y],[A.x,A.y]]],spatialReference:n})}):null;for(let l=0;l<a.length;l++){const t=a[l],{sourcePoint:e,mapPoint:r}=t;if(null==e||null==r)continue;const i=h(r,n);y[l*f+0]=i.x-d,y[l*f+1]=i.y-x}let C=e;if(i){const t=Math.min(v.x,j.x,A.x,M.x),e=Math.max(v.x,j.x,A.x,M.x),{worldWidth:r,xBounds:o}=i,[s,n]=o;t<s&&e>s?C=r:e>n&&t<n&&(C=-r)}this.wrapAroundShift=C,this.isWrapAround=0!==C}draw(t,e){if(!this.visible)return;if(!(this.isReady&&this._vertices&&this._indices&&this._texCoords))return void this.requestRender();this.stage||console.warn("OverlayMultipoint: stage is null"),e.render(t,{config:{perspective:this.perspectiveTransform,texSize:this.textureSize,wrapAroundShift:this.wrapAroundShift,isWrapAround:this.isWrapAround,opacity:this.opacity},texture:{texture:this.texture,unit:0},position:this._vertices,tex:this._texCoords,index:this._indices})}_initializeData(t,e,r){if(null!=this._vertices&&null!=this._indices)return;const{controlPoints:i}=e,o=Math.sqrt(i.length),s=o,n=new Float32Array(f*i.length),a=new Uint16Array(2*i.length);for(let p=0;p<i.length;p++){const e=i[p],{sourcePoint:o,mapPoint:s}=e;if(null==o||null==s)continue;const l=h(s,r);n[p*f+0]=l.x-t.x,n[p*f+1]=l.y-t.y,a[2*p+0]=o.x,a[2*p+1]=o.y}const l=new Uint16Array(s*o+(s-2)*(o+2));let u=0;for(let h=0;h<s;h++){for(let t=0;t<o;t++)l[u++]=h*o+t,l[u++]=(h+1)*o+t;h<s-2&&(l[u++]=(h+1)*o+(o-1),l[u++]=(h+1)*o)}this._vertices=n,this._texCoords=a,this._indices=l}_getFrameInfo(){if(!this.groundControlPoints)return null;const t=this._getFrameControlPoints(),e=this.frameHorizonPoints;let r=null;if(e){const t=e.startX,i=e.startY,o=e.endX,n=e.endY;r=[new u({sourcePoint:s(t,i),mapPoint:new a(e.startLongitude,e.startLatitude)}),new u({sourcePoint:s(o,n),mapPoint:new a(e.endLongitude,e.endLatitude)})]}return{controlPoints:t,horizon:r}}_getFrameControlPoints(){const t=this.groundControlPoints,e=t?.length;if(!e)return[];const r=new Array(e),i=Math.max(...t.map(({x:t})=>t)),o=this.element.videoWidth/i;for(let n=0;n<e;n++){const{x:e,y:i,lat:l,lon:h}=t[n];r[n]=new u({sourcePoint:s(e*o,-i*o),mapPoint:new a(h,l)})}return r}}export{x as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import has from"../../../../core/has.js";import e from"./WGLContainer.js";import{TileDebugInfoTechnique as t}from"./shaderGraph/techniques/tile/TileDebugInfoTechnique.js";import{TileStencilTechnique as
|
|
2
|
+
import has from"../../../../core/has.js";import{createNormalizedTileView as e}from"./normalizedTileUtils.js";import i from"./WGLContainer.js";import{TileDebugInfoTechnique as t}from"./shaderGraph/techniques/tile/TileDebugInfoTechnique.js";import{TileStencilTechnique as n}from"./shaderGraph/techniques/tile/TileStencilTechnique.js";const l=(e,i)=>e.key.level-i.key.level!==0?e.key.level-i.key.level:e.key.row-i.key.row!==0?e.key.row-i.key.row:e.key.col-i.key.col;class r extends i{constructor(e){super(),this._tileStencilTechnique=new n,this._tileDebugInfoTechnique=new t,this.tilingScheme=e,this.sortFunction=l}get tilingScheme(){return this._tilingScheme}set tilingScheme(e){this._tilingScheme=e}renderChildren(e){this.setStencilReference(e),super.renderChildren(e);for(const i of this.getStencilTarget())this._tileStencilTechnique.render(e,i,this.getTileStencilOptions(i));if(has("esri-tiles-debug"))for(const i of this.children)this._tileDebugInfoTechnique.render(e,i)}getTileStencilOptions(e){return null}createRenderParams(i){const{state:t}=i,n=super.createRenderParams(i);return n.requiredLevel=this.tilingScheme.getClosestInfoForScale(t.scale).level,n.displayLevel=this.tilingScheme.scaleToZoom(t.scale),n.normalizedTileView=e(t,this.tilingScheme),n.tilingScheme=this.tilingScheme,n}onDetach(){super.onDetach(),this._tileStencilTechnique.shutdown(),this._tileDebugInfoTechnique.shutdown()}getStencilTarget(){return this.children}setStencilReference(e){let i=1;for(const t of this.children)t.stencilRef=i++}}export{r as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import{getWorldWidth as n,getScaleToResolutionFactor as o}from"../../viewpointUtils.js";const r=65536;function t(n,o){const r=c(n),t=n.getLODInfoAt(o.key.level),e=u(n);return[(t.getXForColumn(o.key.col)-r[0])*e,(r[1]-t.getYForRow(o.key.row))*e]}function e([n,o]){return[Math.fround(n),Math.fround(o)]}function i(n,r){const t=c(r),e=u(r),i=n.scale*o(r.spatialReference),a=1/(i*e),d=n.size[0]*i/2,f=n.size[1]*i/2,s=l(n.center[0]-d-t[0],e),p=l(t[1]-n.center[1]-f,e);return{origin:[s.coordinate,p.coordinate],worldWrapId:[s.worldWrapId,p.worldWrapId],unitsToPixels:a}}function c(n){return[n.tileInfo.origin.x,n.tileInfo.origin.y]}function u(o){const t=n(o.spatialReference);return t>0?r/t:1}function l(n,o){const t=r/o,e=n%t;let i=Math.round((n-e)/t),c=e*o;return c<0&&(i-=1,c+=r),c>=r&&(i+=1,c-=r),{coordinate:c,worldWrapId:i}}export{i as createNormalizedTileView,t as getNormalizedTileOrigin,r as normalizedTileWorldSize,e as toFloat32};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as i}from"tslib";import{animationDebugFlags as t}from"../../../../../../../symbols/cim/animationDebugFlags.js";import{generateVirtualMachineSource as e}from"../../../animations/instructions.js";import{location as o,uniform as a,texture as s,option as r}from"../../GraphShaderModule.js";import{Vec2 as l,Vec4 as n,Float as
|
|
2
|
+
import{__decorate as i}from"tslib";import{animationDebugFlags as t}from"../../../../../../../symbols/cim/animationDebugFlags.js";import{generateVirtualMachineSource as e}from"../../../animations/instructions.js";import{location as o,uniform as a,texture as s,option as r}from"../../GraphShaderModule.js";import{Vec2 as l,Vec4 as n,Float as p,Sampler2D as m,step as u,negate as d,cond as c,equal as y,Mat2 as v,cos as h,sin as f,Mat3 as b,Vec3 as S,lessThanEqual as w,ifElse as g,texture2D as V,clamp as x,abs as z,block as T}from"../../graph/glsl.js";import{AnimationUniformInfo as P}from"./AnimationUniformInfo.js";import{MarkerConstants as j}from"../markers/markerConstants.js";import{FeatureVertexInput as _,AFeatureShader as C,FeatureFragmentInput as M}from"../shaders/AFeatureShader.js";import{softEdgeRatio as O}from"../shaders/constants.js";import{LocalTileOffset as D}from"../shaders/LocalTileOffset.js";import{MosaicInfo as F}from"../shaders/MosaicInfo.js";import{getBit as A,rgba2float as I}from"../shaders/utils.js";import{VisualVariableColor as L}from"../shaders/VisualVariableColor.js";import{VisualVariableOpacity as R}from"../shaders/VisualVariableOpacity.js";import{VisualVariableRotation as k}from"../shaders/VisualVariableRotation.js";import{VisualVariableSizeMinMaxValue as U}from"../shaders/VisualVariableSizeMinMaxValue.js";import{VisualVariableSizeScaleStops as E}from"../shaders/VisualVariableSizeScaleStops.js";import{VisualVariableSizeStops as B}from"../shaders/VisualVariableSizeStops.js";import{VisualVariableSizeUnitValue as G}from"../shaders/VisualVariableSizeUnitValue.js";import{getVisualVariableSize as q,getVisualVariableAngle as N}from"../shaders/vvUtils.js";class W extends _{}i([o(3,l)],W.prototype,"offset",void 0),i([o(4,n)],W.prototype,"sizing",void 0),i([o(5,n)],W.prototype,"value1Position2Value2",void 0),i([o(6,n)],W.prototype,"animationPointerAndBaseSizeAndReferenceSize",void 0),i([o(7,l)],W.prototype,"zoomRange",void 0),i([o(8,p)],W.prototype,"lineLength",void 0);class Z extends M{}class H extends C{_vertexPreamble(i,t,e){const{id:o,offset:a,animationPointerAndBaseSizeAndReferenceSize:s,sizing:r}=i,l=s.xy,n=s.z,m=s.w,b=r.xy,S=this._getEvalParams(i,b,e);let w,g;if(i.value1Position2Value2){let t;t=this.hittestRequest?new p(0):J(l,6,S).a.multiply(this.tile.getDisplayZoomFactor(this.tileContainer));const e=i.pos,o=i.value1Position2Value2.yz,a=i.value1Position2Value2.x,s=i.value1Position2Value2.w,r=t.subtract(a).divide(s.subtract(a));g=e.add(o.subtract(e).multiply(r)),w=u(new p(1),r).add(u(new p(0),d(r)))}else g=i.pos,w=new p(0);const V=r.z,x=A(i.bitset,j.bitset.isStroke),z=r.w,T=A(i.bitset,j.bitset.scaleSymbolsProportionally),P=J(l,0,S),_=c([y(A(i.bitset,j.bitset.isMapAligned),new p(1)),this.view.rotation.divide(180).multiply(Math.PI)],[!0,new p(0)]),C=new v(h(_),f(_.multiply(-1)),f(_),h(_)).multiply(P.xy),M=P.z.subtract(_).subtract(t),O=P.w,D=A(i.bitset,j.bitset.isSDF),F=q(this,o,new p(m)).divide(new p(m));return{baseSize:n,animationPointer:l,strokeWidth:V,isOutline:x,unscaledDistanceToPx:z,scaleSymbolsProportionally:T,isSDF:D,position:this._getScreenPosition({id:o,pos:g,offset:a,referenceSize:m,translation:C,rotation:M,scale:O,vvScale:F}),evalParams:S,vvScale:F,scale:O,clip:w}}_getScreenPosition(i){const{pos:t,translation:e,rotation:o,scale:a,offset:s,id:r,vvScale:l}=i,n=N(this,r).multiply(Math.PI/180),m=e.x.multiply(4/3),u=e.y.multiply(-1).multiply(4/3),c=f(n),y=h(n),v=y.multiply(m).add(d(c).multiply(u)),w=c.multiply(m).add(y.multiply(u)),g=f(o.subtract(n)),V=h(o.subtract(n)),x=new p(0),z=new p(1),{pixelRatio:T}=this.view,P=new b(z,x,x,x,z,x,v.multiply(T),w.multiply(T),z),j=new b(V,g.multiply(-1),x,g,V,x,0,0,z),_=a.multiply(l).multiply(T).multiply(4/3),C=j.multiply(_),M=this.tile.getViewScreenMat3(this.view,this.tileContainer).multiply(new S(t,1)),O=P.multiply(M).xy,D=C.multiply(new S(s,0)).xy;return O.add(D)}_clip(i,e){let o=super.clip(i,e);const a=w(this._getLocalTimeOrigin(i),new p(0));return t.forceGlobalTimeOrigin||(o=o.add(c([a,()=>new p(2)],[!0,()=>new p(0)]))),o}_getLocalTimeOrigin(i){return this.getLocalTimeOrigin(i)}_toNdc(i){return this.view.displayMat3.multiply(new S(i,1)).xy}_getEvalParams(i,t,e){const{globalTime:o,animationTextureSize:a}=this.animationInfo;return{globalTime:o,localTimeOrigin:this._getLocalTimeOrigin(i.id),animationTextureSize:a,animationTexture:this.animationTexture,pixelDimensions:t,lineLength:e}}_getColor(i,t){return g(y(t.isSDF,new p(1)),this._getSDFColor(i,t),this._getSpriteColor(i,t))}_getSpriteColor(i,t){return V(this.mosaicTexture,i).multiply(t.color)}_getSDFColor(i,t){const e=V(this.mosaicTexture,i),o=new p(.5).subtract(I(e)).multiply(t.distanceToPx).multiply(O),a=x(new p(.5).subtract(o),new p(0),new p(1)),s=t.color.multiply(a),r=t.outlineSize.multiply(.5),l=z(o).subtract(r),n=x(new p(.5).subtract(l),new p(0),new p(1)),m=t.outlineColor.multiply(n);return new p(1).subtract(m.a).multiply(s).add(m)}}function J(i,t,o){const a=i.add(new l(t,0)),s=V(o.animationTexture,a.add(.5).divide(o.animationTextureSize)).xy;return i=i.add(s),T({animationPointer:i,...o},n,null,i=>{const{out:t}=i;if(!t)throw new Error("out is null");return e({...i,out:t})})}i([a(F)],H.prototype,"mosaicInfo",void 0),i([a(P)],H.prototype,"animationInfo",void 0),i([a(D)],H.prototype,"localTileOffset",void 0),i([s(m)],H.prototype,"mosaicTexture",void 0),i([r(L)],H.prototype,"visualVariableColor",void 0),i([r(R)],H.prototype,"visualVariableOpacity",void 0),i([r(U)],H.prototype,"visualVariableSizeMinMaxValue",void 0),i([r(E)],H.prototype,"visualVariableSizeScaleStops",void 0),i([r(B)],H.prototype,"visualVariableSizeStops",void 0),i([r(G)],H.prototype,"visualVariableSizeUnitValue",void 0),i([r(k)],H.prototype,"visualVariableRotation",void 0),i([s(m)],H.prototype,"animationTexture",void 0);export{Z as AAnimatedFragmentInput,H as AAnimatedShader,W as AAnimatedVertexInput,J as getValue};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as t,__param as e}from"tslib";import{input as s}from"../../GraphShaderModule.js";import{Float as i,sin as r,cos as o,Vec3 as l,Vec4 as n,mix as a,ifElse as m,greaterThan as u}from"../../graph/glsl.js";import{PolyVertexInput as p,PolyHittestVertexInput as h,PolyFragmentInput as c,AAnimatedPolyShader as d}from"./AAnimatedPolyShader.js";import{getPatternMatrix as y}from"../shaders/ComplexFillShader.js";import{c256ToRad as f,noHit as g,trueHit as x}from"../shaders/constants.js";import{isRectHittest as b,hittestFill as
|
|
2
|
+
import{__decorate as t,__param as e}from"tslib";import{input as s}from"../../GraphShaderModule.js";import{Float as i,sin as r,cos as o,Vec3 as l,Vec4 as n,mix as a,ifElse as m,greaterThan as u}from"../../graph/glsl.js";import{PolyVertexInput as p,PolyHittestVertexInput as h,PolyFragmentInput as c,AAnimatedPolyShader as d}from"./AAnimatedPolyShader.js";import{getPatternMatrix as y}from"../shaders/ComplexFillShader.js";import{c256ToRad as f,noHit as g,trueHit as x}from"../shaders/constants.js";import{isRectHittest as b,hittestFill as P,hittestScreenRect as w}from"../shaders/hittestUtils.js";class S extends d{constructor(){super(...arguments),this.type="AnimatedFillShader"}vertex(t,e){const{distanceToPx:s,ndc:m,z:u,color:p,isOutline:h,strokeWidth:c,isSDF:d,scale:g,scaleSymbolsProportionally:x}=this._vertexPoly(t),b=this.tile.getRequiredZoomFactor(this.tileContainer),P=t.sizing.xy,w=P.multiply(b),S=t.angle?t.angle.multiply(f):new i(0),j=r(S),v=o(S),F=y(t.id,w,j,v,t.bitset),O=this.localTileOffset.getPatternOffsetAtTileOrigin(P,j,v),R=b.multiply(t.offset.subtract(O)).divide(w),T=new l(t.pos,1),q=F.multiply(T).xy.subtract(R),A=t.tlbr.divide(this.mosaicInfo.size.xyxy);return{glPosition:new n(m,u,1),tlbr:A,uv:q,color:p.multiply(new i(1).subtract(h)),outlineColor:p.multiply(h),distanceToPx:s,strokeWidth:c.multiply(a(new i(1),g,x)),isOutline:h,isSDF:d,...this.maybeRunHittest(t,e,{})}}fragment(t){const e=this._fragmentPoly(t);return this.getFragmentOutput(e,t)}hittest(t,e,s){const{pos0:r,pos1:o,pos2:l}=this.computeHittestTriangle(t,e,null),n=b(this.hittestRequest);return m(n,()=>{const{tlbr:t}=this.hittestRequest;return w(r,o,l,t)},()=>{const s=P(this,t,e);return m(u(s,this.hittestRequest.distance),new i(g),new i(x))})}}t([e(0,s(p)),e(1,s(h))],S.prototype,"vertex",null),t([e(0,s(c))],S.prototype,"fragment",null);export{S as AnimatedFillShader};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as t,__param as
|
|
2
|
+
import{__decorate as t,__param as e}from"tslib";import{location as i,input as s}from"../../GraphShaderModule.js";import{Float as o,Vec2 as l,dot as r,max as a,Vec4 as n,mix as m,length as d,clamp as p,step as u,min as h,ifElse as c,greaterThan as y}from"../../graph/glsl.js";import{PolyHittestVertexInput as f,PolyVertexInput as v,AAnimatedPolyShader as b,PolyFragmentInput as g}from"./AAnimatedPolyShader.js";import{getValue as w}from"./AAnimatedShader.js";import{noHit as x,trueHit as S}from"../shaders/constants.js";import{isRectHittest as P,distPointSegment as D,hittestScreenRect as j}from"../shaders/hittestUtils.js";import{getLineAntialiasing as z,getLineThinFactor as A}from"../shaders/LineShader.js";class R extends v{}t([i(10,o)],R.prototype,"accumulatedDistance",void 0),t([i(11,l)],R.prototype,"normal",void 0),t([i(12,l)],R.prototype,"segmentDirection",void 0);class F extends g{}class T extends b{constructor(){super(...arguments),this.type="AnimatedLineShader"}vertex(t,e){const{animationPointerAndBaseSizeAndReferenceSize:i}=t,s=i.xy,{distanceToPx:d,ndc:p,z:u,color:h,isOutline:c,strokeWidth:y,isSDF:f,baseSize:v,scale:b,scaleSymbolsProportionally:g,evalParams:x}=this._vertexPoly(t),S=t.sizing.xy,P=S.x.multiply(v).divide(S.y),D=this.tile.getDisplayZoomFactor(this.tileContainer),j=w(s,6,x).a.multiply(D),z=t.accumulatedDistance.subtract(j),{normal:A}=t,R=t.normal.y,F=z.divide(D).add(r(t.segmentDirection,t.offset)).divide(P),T=R.add(1).divide(2),W=new l(F,T),q=t.tlbr.divide(this.mosaicInfo.size.xyxy),O=v.divide(2),k=new o(.5).multiply(this.view.antialiasing),C=a(O.add(k),new o(.45)).add(new o(.1).multiply(k));return{glPosition:new n(p,u,1),tlbr:q,uv:W,color:h.multiply(new o(1).subtract(c)),outlineColor:h.multiply(c),distanceToPx:d,strokeWidth:y.multiply(m(new o(1),b,g)),isOutline:c,isSDF:f,halfWidth:C,normal:A,...this.maybeRunHittest(t,e,C)}}fragment(t){const e=this._fragmentPoly(t),i=z(t,this.view.antialiasing),{halfWidth:s,normal:l}=t,r=A(s),a=d(l).multiply(s),n=p(r.multiply(s.subtract(a)).divide(r.subtract(new o(1))),new o(0),new o(1));return this.getFragmentOutput(e.multiply(n).multiply(i),t)}hittest(t,e,i){const{pos0:s,pos1:l,pos2:r}=this.computeHittestTriangle(t,e,null),a=P(this.hittestRequest),{distance:n,smallSymbolDistance:m,smallSymbolSizeThreshold:d,tlbr:p}=this.hittestRequest,f=u(i,d.multiply(.5)).multiply(n.subtract(m)),v=this.hittestRequest.position,b=h(D(v,s,l),D(v,s,r)).subtract(i).add(f);return c(a,j(s,l,r,p),c(y(b,n),new o(x),new o(S)))}}t([e(0,s(R)),e(1,s(f))],T.prototype,"vertex",null),t([e(0,s(F))],T.prototype,"fragment",null);export{T as AnimatedLineShader};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as t,__param as e}from"tslib";import{animationDebugFlags as i}from"../../../../../../../symbols/cim/animationDebugFlags.js";import{location as s,input as o,ComputeVertexInput as
|
|
2
|
+
import{__decorate as t,__param as e}from"tslib";import{animationDebugFlags as i}from"../../../../../../../symbols/cim/animationDebugFlags.js";import{location as s,input as o,ComputeVertexInput as r}from"../../GraphShaderModule.js";import{Vec2 as l,Float as n,Vec4 as a,ifElse as d,or as u,Bool as m,mix as p,Mat3 as h,lessThan as c,Vec3 as x,distance as y,greaterThan as w,negate as f}from"../../graph/glsl.js";import{AAnimatedVertexInput as g,AAnimatedShader as v,getValue as S,AAnimatedFragmentInput as b}from"./AAnimatedShader.js";import{MarkerConstants as _}from"../markers/markerConstants.js";import{trueHit as V,noHit as C}from"../shaders/constants.js";import{isRectHittest as z,hittestMarkerScreenRect as P,distPointTriangle as N,xyToBarycentric as k,inTriangle as R}from"../shaders/hittestUtils.js";import{getBitBool as D}from"../shaders/utils.js";import{getVisualVariableColor as M,getVisualVariableOpacity as j}from"../shaders/vvUtils.js";class q extends g{}t([s(9,l)],q.prototype,"uv",void 0),t([s(10,n)],q.prototype,"angle",void 0);class F extends r{}t([s(11,l)],F.prototype,"offsetNextVertex1",void 0),t([s(12,l)],F.prototype,"offsetNextVertex2",void 0),t([s(13,l)],F.prototype,"textureUVNextVertex1",void 0),t([s(14,l)],F.prototype,"textureUVNextVertex2",void 0);class T extends b{}function U(t,e,i,s){return e.multiply(t.x).add(i.multiply(t.y)).add(s.multiply(t.z))}class A extends v{constructor(){super(...arguments),this.type="AnimatedMarkerShader",this.computeAttributes={offset:["offsetNextVertex1","offsetNextVertex2"],uv:["textureUVNextVertex1","textureUVNextVertex2"]}}vertex(t,e){const i=t.uv.divide(this.mosaicInfo.size),{position:s,animationPointer:o,evalParams:r,isOutline:l,unscaledDistanceToPx:c,vvScale:x,strokeWidth:y,scaleSymbolsProportionally:w,scale:f,isSDF:g,baseSize:v,clip:b}=this._vertexPreamble(t,t.angle,t.lineLength||new n(0)),V=this._toNdc(s);let C=S(o,1,r);C=new a(C.rgb.multiply(C.a),C.a);let z=d(D(t.bitset,_.bitset.colorLocked),C,S(o,2,r));z=new a(z.rgb.multiply(z.a),z.a);let P=S(o,3,r);P=new a(P.rgb.multiply(P.a),P.a);const N=S(o,4,r).a,k=S(o,5,r).a,R=M(this,t.id,C,u(D(t.bitset,_.bitset.colorLocked),new m(l))),q=p(R,z,P),F=j(this,t.id),T=p(F,N,k),U=q.multiply(T),A=this.clip(t.id,t.zoomRange).add(b.multiply(2)),I=c.multiply(x);return{glPosition:new a(V,A,1),uv:i,color:U.multiply(new n(1).subtract(l)),outlineColor:U.multiply(l),distanceToPx:I,strokeWidth:y.multiply(p(new n(1),f,w)),isOutline:l,isSDF:g,...this.maybeRunHittest(t,e,{pos:t.pos,size:v,sizeCorrection:new n(1),isMapAligned:new n(1),vvRotationMat3:new h(1,0,0,0,1,0,0,0,1),placementMat3:new h(1,0,0,0,1,0,0,0,1),outlineSize:new n(1),distanceToPx:I,isSDF:g})}}fragment(t){let e=this._getColor(t.uv,{color:t.color,distanceToPx:t.distanceToPx,isSDF:t.isSDF,outlineColor:t.outlineColor,outlineSize:t.strokeWidth});return i.spotlightAnimatedSymbols&&(e=e.add(new a(0,.3,0,.3))),this.getFragmentOutput(e,t)}hittest(t,e,i){const{pos0:s,pos1:o,pos2:r}=this.computeHittestTriangle(t,e,i),l=z(this.hittestRequest);return d(l,()=>{const{tlbr:t}=this.hittestRequest;return P(s,o,r,t)},()=>d(c(i.size,this.hittestRequest.smallSymbolSizeThreshold),this._hittestSmallMarker(t,e,i),this._hittestMarker(t,e,i)))}_hittestSmallMarker(t,e,i){const{position:s,distance:o,smallSymbolDistance:r}=this.hittestRequest,l=o.subtract(r),a=this.tile.getViewScreenMat3(this.view,this.tileContainer).multiply(new x(i.pos,1)).xy,u=i.size.multiply(.5),m=y(a,s).subtract(u).add(l);return d(w(m,this.hittestRequest.distance),new n(C),new n(V))}_hittestMarker(t,e,i){const s=this._vertexPreamble({...t},t.angle,new n(0)).position,o=this._vertexPreamble({...t,offset:e.offsetNextVertex1},t.angle,new n(0)).position,r=this._vertexPreamble({...t,offset:e.offsetNextVertex2},t.angle,new n(0)).position,l=this.hittestRequest.position,a=this.hittestRequest.distance,u=N(l,s,o,r);return d(w(u,a),new n(C),this._hittestSamples(s,o,r,t,e,i))}_hittestSamples(t,e,i,s,o,r){const{outlineSize:u,isSDF:m,distanceToPx:p}=r,h=this.hittestRequest.position,c=this.hittestRequest.distance,x=k(h.add(new l(f(c),f(c))),t,e,i),y=k(h.add(new l(0,f(c))),t,e,i),g=k(h.add(new l(c,f(c))),t,e,i),v=k(h.add(new l(f(c),0)),t,e,i),S=k(h,t,e,i),b=k(h.add(new l(c,0)),t,e,i),_=k(h.add(new l(f(c),c)),t,e,i),z=k(h.add(new l(0,c)),t,e,i),P=k(h.add(new l(c,c)),t,e,i),N=s.uv.divide(this.mosaicInfo.size),D=o.textureUVNextVertex1.divide(this.mosaicInfo.size),M=o.textureUVNextVertex2.divide(this.mosaicInfo.size),j={color:new a(1,1,1,1),outlineSize:u,outlineColor:new a(1,1,1,1),isSDF:m,distanceToPx:p};let q=new n(0);return q=q.add(R(x).multiply(this._getColor(U(x,N,D,M),j).a)),q=q.add(R(y).multiply(this._getColor(U(y,N,D,M),j).a)),q=q.add(R(g).multiply(this._getColor(U(g,N,D,M),j).a)),q=q.add(R(v).multiply(this._getColor(U(v,N,D,M),j).a)),q=q.add(R(S).multiply(this._getColor(U(S,N,D,M),j).a)),q=q.add(R(b).multiply(this._getColor(U(b,N,D,M),j).a)),q=q.add(R(_).multiply(this._getColor(U(_,N,D,M),j).a)),q=q.add(R(z).multiply(this._getColor(U(z,N,D,M),j).a)),q=q.add(R(P).multiply(this._getColor(U(P,N,D,M),j).a)),d(w(q,new n(.05)),new n(V),new n(C))}}t([e(0,o(q)),e(1,o(F))],A.prototype,"vertex",null),t([e(0,o(T))],A.prototype,"fragment",null);export{T as AnimatedMarkerFragmentInput,A as AnimatedMarkerShader,q as AnimatedMarkerVertexInput};
|