@arcgis/core 5.2.0-next.76 → 5.2.0-next.78
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/{dbdd96e558936955acdb.js → 040a73b2a23577e1eabd.js} +1 -1
- package/assets/esri/core/workers/chunks/{bad2c7219e95750906e1.js → 05663093b1d2a268b953.js} +1 -1
- package/assets/esri/core/workers/chunks/{755b2d883fba90c4e688.js → 06c8547521ce9c97b258.js} +2 -2
- package/assets/esri/core/workers/chunks/{a014c17fc210620da738.js → 17e9324a02b69733307a.js} +2 -2
- package/assets/esri/core/workers/chunks/29a20a37e7837142fa6b.js +2 -0
- package/assets/esri/core/workers/chunks/{4945d6b0ca1812864185.js → 385b23d4bd5275031fb6.js} +1 -1
- package/assets/esri/core/workers/chunks/3958d92c737b3a2a3bc2.js +1 -0
- package/assets/esri/core/workers/chunks/{9c3e6325dc60bcaf44d7.js → 4115bab15c19b4f5ae08.js} +1 -1
- package/assets/esri/core/workers/chunks/{ff578f0ca68d652fece5.js → 57e26a86d46e02c89c4f.js} +1 -1
- package/assets/esri/core/workers/chunks/{8b980c6b92cc4ea68ede.js → 81cd0cb9ae1371765d32.js} +1 -1
- package/assets/esri/core/workers/chunks/{de927b1460bc384f5b87.js → 83556c9f6f85c2a46779.js} +1 -1
- package/assets/esri/core/workers/chunks/{f4aa6e90200f61e623e5.js → 8762da315cf5086167c3.js} +1 -1
- package/assets/esri/core/workers/chunks/{46e56fac44e0fd26ba1d.js → 95956d62591d689f1135.js} +1 -1
- package/assets/esri/core/workers/chunks/{9e2e4d197a7a57c2a691.js → ac2ba5c3d613d7d5183a.js} +1 -1
- package/assets/esri/core/workers/chunks/{94b9a61b4dbb83425a78.js → b2812279662f1a5f8d06.js} +1 -1
- package/assets/esri/core/workers/chunks/b82763e9401b16121f8d.js +2 -0
- package/assets/esri/core/workers/chunks/{83e54166ba634ec2bd89.js → c69cf08da4e4c2c824ee.js} +10 -10
- package/assets/esri/core/workers/chunks/{6c740c411b085d2d08c4.js → cd74de12005834244a47.js} +1 -1
- package/assets/esri/core/workers/chunks/{6e45ecf359bce3417f5d.js → ef803fb25741e9f2a0a1.js} +1 -1
- package/assets/esri/core/workers/chunks/f3bbebedad51f776bb98.js +1 -0
- package/assets/esri/core/workers/chunks/{a91c1d782346a9c7e1ef.js → f703bc002c732d1c045d.js} +1 -1
- package/assets/esri/core/workers/chunks/fdd4f78facec6387cdb0.js +1 -0
- package/assets/esri/core/workers/chunks/ffd5285c7b2c83208f87.js +2 -0
- package/config.js +1 -1
- package/geometry/support/webMercatorUtils.d.ts +38 -14
- package/kernel.js +1 -1
- package/layers/Lyr3DWasmPerSceneView.js +1 -1
- package/layers/VectorTileLayer.d.ts +40 -22
- package/layers/mixins/RasterJobHandlerMixin.js +1 -1
- package/layers/support/RasterJobHandler.js +1 -1
- package/layers/video/VideoController.js +1 -1
- package/package.json +4 -4
- package/support/revision.js +1 -1
- package/views/2d/engine/BitmapTile.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/RasterTile.js +1 -1
- package/views/2d/engine/imagery/RasterVFTile.js +1 -1
- package/views/2d/engine/vectorTiles/TileHandler3D.js +1 -1
- package/views/2d/engine/vectorTiles/VTLPainter3D.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/FeatureDisplayList.js +1 -1
- package/views/2d/engine/webgl/Painter.js +1 -1
- package/views/2d/engine/webgl/RenderingDevice.js +1 -1
- package/views/2d/engine/webgl/TileContainer.js +1 -1
- package/views/2d/engine/webgl/TiledDisplayObject.js +1 -1
- package/views/2d/engine/webgl/normalizedTileUtils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/GraphShaderModule.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/graph/ShaderGraphContext.js +1 -1
- 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/bitmap/BitmapTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/clip/ClipTechnique.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/ComplexFillTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/ComplexOutlineFillTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/FillTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/GradientFillTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/OutlineFillTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternFillTechnique.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/heatmap/HeatmapTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/line/GradientStrokeTechnique.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/markers/MarkerTechnique.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/pieChart/PieChartTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/RasterColorizerTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/VectorFieldTechnique.js +1 -1
- 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/BlendShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/ComplexFillShader.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/PatternFillShader.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 +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TileDebugInfoShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TileInfo.js +1 -1
- 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/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/MagDirShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/ScalarShader.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/text/TextTechnique.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/MediaLayerView2D.js +1 -1
- package/views/2d/layers/TileLayerView2D.js +1 -1
- package/views/2d/layers/support/DisplayGL.js +1 -1
- package/views/3d/GroundView3D.js +1 -1
- package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/VectorTileLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DTextSymbolLayer.js +1 -1
- package/views/3d/state/HUDOccludedFragmentOpacity.js +1 -1
- package/views/3d/state/ViewState.js +1 -1
- package/views/3d/state/ViewStateManager.js +1 -1
- package/views/3d/support/GaussianSplatSortWorker.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatDataStore.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianTile.js +1 -1
- package/views/3d/terrain/OverlayManager.js +1 -1
- package/views/3d/terrain/PatchRenderDataWaterproofness.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/terrain/TerrainWaterproofnessDiagnostics.js +2 -0
- package/views/3d/terrain/TileCompositor.js +1 -1
- package/views/3d/webgl-engine/lib/Geometry.js +1 -1
- package/views/3d/webgl-engine/parts/Model.js +1 -1
- package/views/VideoView.js +1 -1
- package/views/support/waitForResources.js +1 -1
- package/views/webgl/RenderingContext.js +1 -1
- package/views/webgl/UniformBufferLayout.js +1 -1
- package/views/webgl/UniformBufferObject.js +1 -1
- package/widgets/Feature/FeatureViewModel.d.ts +4 -3
- package/widgets/Feature/FeatureViewModel.js +1 -1
- package/widgets/Feature.js +1 -1
- package/widgets/Features/FeaturesViewModel.d.ts +4 -2
- package/widgets/Features/FeaturesViewModel.js +1 -1
- package/widgets/Features.js +1 -1
- package/widgets/PanoramicViewer/PanoramicVideoViewerViewModel.js +1 -1
- package/widgets/PanoramicViewer/PanoramicViewerViewModel.js +1 -1
- package/widgets/Popup/PopupViewModel.d.ts +1 -0
- package/widgets/Popup/PopupViewModel.js +1 -1
- package/widgets/Popup.js +1 -1
- package/widgets/UtilityNetworkTrace/UtilityNetworkTraceFeature.js +1 -1
- package/assets/esri/core/workers/chunks/0502641d9a214b37ff29.js +0 -1
- package/assets/esri/core/workers/chunks/4f8ce5887102971bfa34.js +0 -2
- package/assets/esri/core/workers/chunks/532e3a59888e4cc13bd3.js +0 -2
- package/assets/esri/core/workers/chunks/a19be304219808268039.js +0 -2
- package/assets/esri/core/workers/chunks/b950ddafba8125c84a5b.js +0 -1
- package/assets/esri/core/workers/chunks/de9a1cce70581920f248.js +0 -1
- package/views/2d/engine/webgl/shaderGraph/types.js +0 -2
- package/views/2d/engine/webgl/shaderGraph/uniformBufferUtils.js +0 -2
- /package/assets/esri/core/workers/chunks/{755b2d883fba90c4e688.js.LICENSE.txt → 06c8547521ce9c97b258.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{a014c17fc210620da738.js.LICENSE.txt → 17e9324a02b69733307a.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{4f8ce5887102971bfa34.js.LICENSE.txt → 29a20a37e7837142fa6b.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{a19be304219808268039.js.LICENSE.txt → b82763e9401b16121f8d.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{532e3a59888e4cc13bd3.js.LICENSE.txt → ffd5285c7b2c83208f87.js.LICENSE.txt} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{animationDebugFlags as e}from"../../../../../../../symbols/cim/animationDebugFlags.js";import{FeatureTechnique as t}from"../FeatureTechnique.js";import{isHittest as
|
|
2
|
+
import{animationDebugFlags as e}from"../../../../../../../symbols/cim/animationDebugFlags.js";import{FeatureTechnique as t}from"../FeatureTechnique.js";import{isHittest as a,getSelectionDefines as i,getFeatureTextures as n,getLocalTileOffset as r,getFeatureUniforms as o,resolveDynamicUniforms as s,getFeaturePipelineState as u}from"../featureTechniqueUtils.js";class m extends t{render(t,m){const{context:c,painter:l}=t,{target:g}=m,{freezeGlobalTime:d}=e,f=0,x=l.textureManager.animationStore.getTexture(c,f),p=m.instance.getInput(),T=l.textureManager.getMosaicInfo(t,m.textureKey,!1),{optionalAttributes:b}=p,h=b.zoomRange,D=b.value1Position2Value2,M="accumulatedDistance"in b&&!!b.accumulatedDistance,y="segmentDirection"in b&&!!b.segmentDirection,z="normal"in b&&!!b.normal;l.setShader({shader:this.shaders.geometry,uniforms:{...s(t,m.target,p.uniforms),...o(t,m.target),mosaicInfo:T,animationInfo:{globalTime:t.animationsEnabled?!1===d?t.time/1e3:d:0,animationTextureSize:[x.descriptor.width,x.descriptor.height]},localTileOffset:r(m.target)},textures:{...n(t),mosaicTexture:l.textureManager.getMosaicTexture(t,m.textureKey,!1),animationTexture:{unit:6,texture:x}},defines:{...i(t)},optionalAttributes:{zoomRange:h,value1Position2Value2:D,accumulatedDistance:M,segmentDirection:y,normal:z},useComputeBuffer:a(t)}),l.setPipelineState({...u(t)}),l.submitDraw(t,m),!1===d&&t.animationsEnabled&&g.requestRender()}}export{m as AnimatedTechnique};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{BitmapTile as e}from"../../../../BitmapTile.js";import{textureBindingBitmap as i}from"../../../definitions.js";import{Technique as t}from"../Technique.js";import{BitmapShader as n}from"../shaders/BitmapShader.js";const
|
|
2
|
+
import{BitmapTile as e}from"../../../../BitmapTile.js";import{textureBindingBitmap as i}from"../../../definitions.js";import{Technique as t}from"../Technique.js";import{BitmapShader as n}from"../shaders/BitmapShader.js";import{getTileUniforms as r}from"../shaders/Tile.js";import{getTileContainerUniforms as o}from"../shaders/TileInfo.js";import{getViewUniforms as s}from"../shaders/ViewInfo.js";const a={nearest:{samplingMode:9728,mips:!1},bilinear:{samplingMode:9729,mips:!1},bicubic:{samplingMode:9729,mips:!1},trilinear:{samplingMode:9987,mips:!0}},l=(e,i,t)=>{if("dynamic"===t.samplingMode){const{state:t}=e,n=i.resolution/i.pixelRatio/t.resolution,r=Math.round(e.pixelRatio)!==e.pixelRatio,o=n>1.05||n<.95;return t.rotation||o||r||i.isSourceScaled||i.rotation?a.bilinear:a.nearest}return a[t.samplingMode]};class m extends t{constructor(){super(...arguments),this.name="BrushBitmap",this.type=4,this.shaders={bitmap:new n}}render(e,t){const{context:n,renderingOptions:m,painter:d}=e,f=s(e);for(const s of t.bitmaps){const t=c(s),h=t.texture;if(!t.source||!t.isReady||null==h)continue;const b=l(e,t,m);e.timeline.begin(this.name),d.setPipelineState({depth:!1,stencil:{test:{mask:255,compare:514,op:{fail:7680,zFail:7680,zPass:7680}},write:!1},color:{write:[!0,!0,!0,!0],blendMode:"additive"===t.blendFunction?"additive":"composite"}}),t.setSamplingProfile(b);const{coordScale:g,computedOpacity:M}=t,w={coordScale:g,opacity:M},x=p(s);let S;if(x){if(!u(e))throw new Error("BitmapTile requires tile render parameters");S={view:f,tileContainer:o(e),tile:r(e.tilingScheme,s),localTransform:null,config:w}}else S={view:f,tileContainer:null,tile:null,localTransform:{localToScreenMat3:t.transforms.localToScreenMat3},config:w};d.submitDrawMesh(n,{shader:this.shaders.bitmap,uniforms:S,textures:{texture:{texture:h,unit:i}},defines:{bicubic:b===a.bicubic,tiled:x},optionalAttributes:null,useComputeBuffer:!1},d.quadMesh,t),e.timeline.end(this.name)}}}function c(e){return p(e)?e.bitmap:e}function p(i){return i instanceof e}function u(e){return"normalizedTileView"in e}export{m as BitmapTechnique};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{Technique as e}from"../Technique.js";import{ClipShader as s}from"../shaders/ClipShader.js";
|
|
2
|
+
import{Technique as e}from"../Technique.js";import{ClipShader as s}from"../shaders/ClipShader.js";import{getViewUniforms as t}from"../shaders/ViewInfo.js";class i extends e{constructor(){super(...arguments),this.type=8,this.shaders={clip:new s}}render(e,s){const{context:i,painter:r,state:o}=e,n=s.getMesh(i,o);if(!n)return;r.setPipelineState({color:!1,depth:!1,stencil:{write:{mask:255},test:{compare:519,op:{fail:7680,zFail:7680,zPass:7681},mask:255}}});const a={shader:this.shaders.clip,uniforms:{view:t(e)},textures:void 0,defines:void 0,optionalAttributes:void 0,useComputeBuffer:!1};r.submitDrawMesh(i,a,n,{stencilRef:0})}}const r=new i;export{r as clipTechnique};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as t,__param as o}from"tslib";import{tileSize as e}from"../../../definitions.js";import{location as i,uniform as r,texture as s,input as d,VertexInput as n,UniformGroup as p,GraphShaderModule as
|
|
2
|
+
import{__decorate as t,__param as o}from"tslib";import{tileSize as e}from"../../../definitions.js";import{location as i,uniform as r,texture as s,input as d,VertexInput as n,UniformGroup as p,GraphShaderModule as a,FragmentOutput as l}from"../../GraphShaderModule.js";import{Vec2 as m,Float as y,Sampler2D as c,Mat3 as v,Vec3 as w,texture2D as h,max as u,step as f,Vec4 as x,length as g,smoothstep as S}from"../../graph/glsl.js";import{FeatureFragmentInput as j}from"../shaders/AFeatureShader.js";import{Tile as z}from"../shaders/Tile.js";import{TileInfo as C}from"../shaders/TileInfo.js";import{ViewInfo as P}from"../shaders/ViewInfo.js";class R extends n{}t([i(0,m)],R.prototype,"pos",void 0);class b extends j{}class D extends p{}t([r(y)],D.prototype,"dotSize",void 0);class F extends p{}t([r(y)],F.prototype,"pixelRatio",void 0),t([r(y)],F.prototype,"tileZoomFactor",void 0);const E=1e-6;class I extends a{constructor(){super(...arguments),this.type="DotDensityPointShader"}vertex(t){const o=new v(1,0,0,0,-1,0,0,1,1).multiply(new w(t.pos.xy.divide(e),1)),i=h(this.drawLocations,o.xy),r=u(this.instance.dotSize.divide(2),new y(1));let s=new y(0);s=s.add(f(i.a,new y(E)).multiply(2));let d=r.add(this.instance.dotSize);const n=this.tile.getDisplayViewScreenMat3(this.view,this.tileContainer).multiply(new w(t.pos.add(.5),1)),p=new x(n.xy,s,1),a=this.instance.dotSize.divide(d),l=new y(-1).divide(r.divide(d));return d=d.multiply(this.draw.pixelRatio.multiply(this.draw.tileZoomFactor)),{glPosition:p,glPointSize:d,color:i,ratio:a,invEdgeRatio:l}}fragment(t){const o=g(t.glPointCoord.subtract(.5)).multiply(2),e=S(new y(0),new y(1),t.invEdgeRatio.multiply(o.subtract(t.ratio)).add(1)),i=new l;return i.fragColor=t.color.multiply(e),i}}t([r(D)],I.prototype,"instance",void 0),t([r(F)],I.prototype,"draw",void 0),t([r(C)],I.prototype,"tileContainer",void 0),t([r(z)],I.prototype,"tile",void 0),t([r(P)],I.prototype,"view",void 0),t([s(c)],I.prototype,"drawLocations",void 0),t([o(0,d(R))],I.prototype,"vertex",null),t([o(0,d(b))],I.prototype,"fragment",null);export{F as DotDensityPointDrawUniforms,b as DotDensityPointFragmentInput,D as DotDensityPointInstanceUniforms,I as DotDensityPointShader,R as DotDensityPointVertexInput};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{tileSize as e,textureBindingRenderer1 as t,textureBindingRenderer0 as i}from"../../../definitions.js";import{FeatureTechnique as r}from"../FeatureTechnique.js";import{isHighlight as s,isHittest as o,getSelectionDefines as n,getFeatureTextures as a,getFeatureUniforms as
|
|
2
|
+
import{tileSize as e,textureBindingRenderer1 as t,textureBindingRenderer0 as i}from"../../../definitions.js";import{FeatureTechnique as r}from"../FeatureTechnique.js";import{isHighlight as s,isHittest as o,getSelectionDefines as n,getFeatureTextures as a,getFeatureUniforms as l,getFeaturePipelineState as d}from"../featureTechniqueUtils.js";import{DotDensityPointShader as u}from"./DotDensityPointShader.js";import{DotDensityPolygonShader as c}from"./DotDensityPolygonShader.js";import{DotDensityResources as h}from"./DotDensityResources.js";import{FillShader as p}from"../shaders/FillShader.js";import{getTileUniforms as m}from"../shaders/Tile.js";import{getTileContainerUniforms as f}from"../shaders/TileInfo.js";import{getViewUniforms as w}from"../shaders/ViewInfo.js";class g extends r{constructor(){super(...arguments),this.type=12,this.shaders={polygon:new c,point:new u,fill:new p},this._resources=new Map}render(e,t){s(e)||o(e)?this._renderPolygons(e,t):this._renderDotDensity(e,t)}_renderPolygons(e,t){const{painter:i}=e;i.setShader({shader:this.shaders.fill,uniforms:{...l(e,t.target),visualVariableColor:null,visualVariableOpacity:null},textures:a(e),defines:{...n(e)},optionalAttributes:{zoomRange:!1},useComputeBuffer:o(e)}),i.setPipelineState(d(e)),i.submitDraw(e,t)}_renderDotDensity(r,s){const{context:o,painter:u,requiredLevel:c}=r,h=s.instance.getInput().uniforms,p=this._getOrCreateResourcesRecord(o),g=p.getDotDensityTextures(o,e,h.seed),x=1/2**(c-s.target.key.level),D=e,b=D*window.devicePixelRatio*D*window.devicePixelRatio,y=1/x*(1/x),R=h.dotScale?r.state.scale/h.dotScale:1,S=h.dotValue*R*y;u.setShader({shader:this.shaders.polygon,uniforms:{...l(r,s.target),instance:{isActive:h.isActive,colors:h.colors,dotValue:Math.max(1,S)},draw:{tileZoomFactor:x,pixelRatio:window.devicePixelRatio,tileDotsOverArea:b/(e*window.devicePixelRatio*e*window.devicePixelRatio)}},textures:{...a(r),drawTextures:{dotTexture0:{unit:i,texture:g[0]},dotTexture1:{unit:t,texture:g[1]}}},defines:{...n(r),blending:h.blending},optionalAttributes:{},useComputeBuffer:!1});const v=o.getViewport();o.setViewport(0,0,e,e);const P=o.boundFramebuffer,_=p.getFBO(o);o.bindFramebuffer(_),o.setClearColor(0,0,0,0),o.clear(16384),u.setPipelineState({color:{write:[!0,!0,!0,!0],blendMode:"composite"},depth:!1,stencil:!1}),u.updatePipelineState(o),u.submitDraw(r,s),o.bindFramebuffer(P),o.setViewport(v.x,v.y,v.width,v.height);const j=p.getFBO(o).colorTexture,C={shader:this.shaders.point,uniforms:{tileContainer:f(r),tile:m(r.tilingScheme,s.target),view:w(r),instance:{dotSize:h.dotSize},draw:{tileZoomFactor:1,pixelRatio:window.devicePixelRatio}},textures:{drawLocations:{unit:i,texture:j}},defines:{...n(r)},optionalAttributes:{},useComputeBuffer:!1};u.setPipelineState(d(r)),u.submitDrawMesh(o,C,p.getDotDensityMesh(o),{stencilRef:s.getStencilReference()})}shutdown(e){super.shutdown(e),this._resources.get(e)?.destroy(),this._resources.delete(e)}_getOrCreateResourcesRecord(e){let t=this._resources.get(e);return null==t&&(t=new h,this._resources.set(e,t)),t}}export{g as DotDensityTechnique};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{disposeMaybe as e}from"../../../../../../../core/maybe.js";import{pt2px as t}from"../../../../../../../core/screenUtils.js";import{simplePipelineState as r}from"../../utils.js";import{Technique as s}from"../Technique.js";import{GaussianBlurShader as i}from"../shaders/BlurShader.js";import{DropShadowCompositeShader as o}from"../shaders/DropShadowShader.js";import{
|
|
2
|
+
import{disposeMaybe as e}from"../../../../../../../core/maybe.js";import{pt2px as t}from"../../../../../../../core/screenUtils.js";import{simplePipelineState as r}from"../../utils.js";import{Technique as s}from"../Technique.js";import{GaussianBlurShader as i}from"../shaders/BlurShader.js";import{DropShadowCompositeShader as o}from"../shaders/DropShadowShader.js";import{getViewUniforms as u}from"../shaders/ViewInfo.js";import{DisposableFramebufferObject as a}from"../../../../../../webgl/FramebufferObject.js";import l from"../../../../../../webgl/Texture.js";import{TextureDescriptor as n}from"../../../../../../webgl/TextureDescriptor.js";const h=[1,0],B=[0,1];class c extends s{constructor(){super(...arguments),this.type=13,this._layerFBOTexture=null,this._horizontalBlurFBO=null,this._verticalBlurFBO=null,this._size=[0,0],this.shaders={gaussianBlur:new i,composite:new o}}shutdown(){super.shutdown(),this._horizontalBlurFBO=e(this._horizontalBlurFBO),this._verticalBlurFBO=e(this._verticalBlurFBO),this._layerFBOTexture=e(this._layerFBOTexture)}render(e,s){const{context:i,painter:o}=e,{layerFBO:a}=s,l=a.width,n=a.height,c=[Math.round(l),Math.round(n)],{blurRadius:f,offsetX:m,offsetY:d,color:p}=s.effect,F=[t(m),t(d)];this._createOrResizeResources(e,l,n,c);const w=this._horizontalBlurFBO,x=this._verticalBlurFBO,_={color:{write:[!0,!0,!0,!0],blendMode:"none"},depth:{write:!1,test:!1},stencil:{write:{mask:0},test:!1}};o.setPipelineState(_);const O=this._layerFBOTexture;a.copyToTexture(0,0,l,n,0,0,O),i.setViewport(0,0,c[0],c[1]),i.bindFramebuffer(w),o.submitDrawMesh(i,{shader:this.shaders.gaussianBlur,uniforms:{gaussianBlurConfig:{texSize:c,direction:h,sigma:f}},textures:{texture:{texture:a.colorTexture,unit:4}},defines:{kernelRadius:Math.ceil(f)},optionalAttributes:null,useComputeBuffer:!1},o.quadMesh),i.bindFramebuffer(x),o.submitDrawMesh(i,{shader:this.shaders.gaussianBlur,uniforms:{gaussianBlurConfig:{texSize:c,direction:B,sigma:f}},textures:{texture:{texture:w?.colorTexture,unit:5}},defines:{kernelRadius:Math.ceil(f)},optionalAttributes:null,useComputeBuffer:!1},o.quadMesh),i.bindFramebuffer(a),i.setViewport(0,0,l,n),o.submitDrawMesh(i,{shader:this.shaders.composite,uniforms:{view:u(e),compositeConfig:{shadowColor:[p[3]*(p[0]/255),p[3]*(p[1]/255),p[3]*(p[2]/255),p[3]],shadowOffset:F}},textures:{blurTexture:{texture:x?.colorTexture,unit:2},layerFBOTexture:{texture:O,unit:3}},defines:null,optionalAttributes:null,useComputeBuffer:!1},o.quadMesh),o.setPipelineState({...r,stencil:{test:{mask:255,compare:514,op:{fail:7680,zFail:7680,zPass:7680}},write:!1}})}_createOrResizeResources(e,t,r,s){const{context:i}=e;if(!this._horizontalBlurFBO||this._size[0]!==t||this._size[1]!==r){if(this._size[0]=t,this._size[1]=r,this._horizontalBlurFBO)this._horizontalBlurFBO.resize(s[0],s[1]);else{const e=new n(s[0],s[1]);e.internalFormat=6408,e.wrapMode=33071,this._horizontalBlurFBO=new a(i,e)}if(this._verticalBlurFBO)this._verticalBlurFBO.resize(s[0],s[1]);else{const e=new n(s[0],s[1]);e.internalFormat=6408,e.wrapMode=33071,this._verticalBlurFBO=new a(i,e)}if(this._layerFBOTexture)this._layerFBOTexture.resize(t,r);else{const e=new n(t,r);e.internalFormat=6408,e.wrapMode=33071,this._layerFBOTexture=new l(i,e)}}}}export{c as DropShadowTechnique};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{maxRepresentableInt as t,tileSize as e}from"../../definitions.js";const
|
|
2
|
+
import{maxRepresentableInt as t,tileSize as e}from"../../definitions.js";import{getTileUniforms as i}from"./shaders/Tile.js";import{getTileContainerUniforms as n}from"./shaders/TileInfo.js";import{getViewUniforms as o}from"./shaders/ViewInfo.js";const s={color:{write:[!0,!0,!0,!0],blendMode:"composite"},depth:!1,stencil:{write:!1,test:{compare:514,mask:255,op:{fail:7680,zFail:7680,zPass:7681}}}},r={color:{write:[!0,!0,!0,!0],blendParameters:{srcRGB:1,dstRGB:1,srcAlpha:1,dstAlpha:1},blendEquation:32776,blendMode:"custom"},depth:!1,stencil:!1},l={...s,color:{write:[!0,!0,!0,!0],blendMode:"delete"}};function c(t){return"highlight"===t.passOptions?.type}function a(t){return"hittest"===t.passOptions?.type}function u(t){if(!a(t))return null;const{position:e,distance:i,smallSymbolDistance:n,smallSymbolSizeThreshold:o,tlbr:s}=t.passOptions;return{position:e,distance:i,smallSymbolDistance:n,smallSymbolSizeThreshold:o,tlbr:s}}function f(t){if(!c(t))return null;const{activeReasons:e,highlightAll:i}=t.passOptions;return{activeReasons:e,highlightAll:i?1:0}}function p(t,e,i){const n={};for(const o in i)"function"!=typeof i[o]?n[o]=i[o]:n[o]=i[o](t,e);return n}function h(t,e){return{storage:t.attributeView.getUniforms(),view:o(t),tileContainer:n(t),tile:i(t.tilingScheme,e),hittestRequest:u(t),highlight:f(t)}}function m(t){return t.attributeView.getTextures(t.context)}function d(t){return{storageTextures:m(t)}}function g(t){return{inside:2===t.selection,outside:3===t.selection}}function b(t){return a(t)?r:c(t)&&"clear"===t.passOptions.stepType?l:s}function w(i){const{row:n,col:o}=i.key,s=o*e,r=n*e;return{tileOffsetFromLocalOrigin:[s%t,r%t],maxIntsToLocalOrigin:[Math.floor(s/t),Math.floor(r/t)]}}export{b as getFeaturePipelineState,m as getFeatureStorageTextures,d as getFeatureTextures,h as getFeatureUniforms,w as getLocalTileOffset,g as getSelectionDefines,c as isHighlight,a as isHittest,p as resolveDynamicUniforms};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{FeatureTechnique as e}from"../FeatureTechnique.js";import{isHittest as t,getSelectionDefines as r,getFeatureTextures as s,getLocalTileOffset as
|
|
2
|
+
import{FeatureTechnique as e}from"../FeatureTechnique.js";import{isHittest as t,getSelectionDefines as r,getFeatureTextures as s,getLocalTileOffset as a,getFeatureUniforms as i,resolveDynamicUniforms as o,getFeaturePipelineState as u}from"../featureTechniqueUtils.js";import{ComplexFillShader as n}from"../shaders/ComplexFillShader.js";class m extends e{constructor(){super(...arguments),this.type=10,this.shaders={geometry:new n}}render(e,n){const{painter:m}=e,f=n.instance.getInput();m.setShader({shader:this.shaders.geometry,uniforms:{...o(e,n.target,f.uniforms),...i(e,n.target),mosaicInfo:m.textureManager.getMosaicInfo(e,n.textureKey),localTileOffset:a(n.target)},textures:{...s(e),mosaicTexture:m.textureManager.getMosaicTexture(e,n.textureKey)},defines:{...r(e)},optionalAttributes:f.optionalAttributes,useComputeBuffer:t(e)}),m.setPipelineState(u(e)),m.submitDraw(e,n)}}export{m as ComplexFillTechnique};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{FeatureTechnique as e}from"../FeatureTechnique.js";import{isHittest as t,getSelectionDefines as r,getFeatureTextures as s,getLocalTileOffset as i,getFeatureUniforms as
|
|
2
|
+
import{FeatureTechnique as e}from"../FeatureTechnique.js";import{isHittest as t,getSelectionDefines as r,getFeatureTextures as s,getLocalTileOffset as i,getFeatureUniforms as a,resolveDynamicUniforms as o,getFeaturePipelineState as u}from"../featureTechniqueUtils.js";import{ComplexOutlineFillShader as n}from"../shaders/ComplexOutlineFillShader.js";class m extends e{constructor(){super(...arguments),this.type=11,this.shaders={geometry:new n}}render(e,n){const{painter:m}=e,f=n.instance.getInput();m.setShader({shader:this.shaders.geometry,uniforms:{...o(e,n.target,f.uniforms),...a(e,n.target),mosaicInfo:m.textureManager.getMosaicInfo(e,n.textureKey),localTileOffset:i(n.target)},textures:{...s(e),mosaicTexture:m.textureManager.getMosaicTexture(e,n.textureKey)},defines:{...r(e)},optionalAttributes:f.optionalAttributes,useComputeBuffer:t(e)}),m.setPipelineState(u(e)),m.submitDraw(e,n)}}export{m as ComplexOutlineFillTechnique};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{FeatureTechnique as e}from"../FeatureTechnique.js";import{isHittest as t,getSelectionDefines as r,getFeatureTextures as s,getFeatureUniforms as i,resolveDynamicUniforms as o,getFeaturePipelineState as
|
|
2
|
+
import{FeatureTechnique as e}from"../FeatureTechnique.js";import{isHittest as t,getSelectionDefines as r,getFeatureTextures as s,getFeatureUniforms as i,resolveDynamicUniforms as o,getFeaturePipelineState as a}from"../featureTechniqueUtils.js";import{FillShader as n}from"../shaders/FillShader.js";class u extends e{constructor(){super(...arguments),this.type=15,this.shaders={geometry:new n}}render(e,n){const{painter:u}=e,m=n.instance.getInput();u.setShader({shader:this.shaders.geometry,uniforms:{...o(e,n.target,m.uniforms),...i(e,n.target)},textures:s(e),defines:r(e),optionalAttributes:m.optionalAttributes,useComputeBuffer:t(e)}),u.setPipelineState(a(e)),u.submitDraw(e,n)}}export{u as FillTechnique};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{FeatureTechnique as e}from"../FeatureTechnique.js";import{isHittest as t,getSelectionDefines as r,getFeatureTextures as s,getFeatureUniforms as i,resolveDynamicUniforms as
|
|
2
|
+
import{FeatureTechnique as e}from"../FeatureTechnique.js";import{isHittest as t,getSelectionDefines as r,getFeatureTextures as s,getFeatureUniforms as i,resolveDynamicUniforms as a,getFeaturePipelineState as o}from"../featureTechniqueUtils.js";import{GradientFillShader as n}from"../shaders/GradientFillShader.js";class u extends e{constructor(){super(...arguments),this.type=16,this.shaders={geometry:new n},this.symbologyPlane=0}render(e,n){const{painter:u}=e,m=n.instance.getInput();u.setShader({shader:this.shaders.geometry,uniforms:{...a(e,n.target,m.uniforms),...i(e,n.target),mosaicInfo:u.textureManager.getMosaicInfo(e,n.textureKey)},textures:{...s(e),mosaicTexture:u.textureManager.getMosaicTexture(e,n.textureKey)},defines:{...r(e)},optionalAttributes:m.optionalAttributes,useComputeBuffer:t(e)}),u.setPipelineState(o(e)),u.submitDraw(e,n)}}export{u as GradientFillTechnique};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{FeatureTechnique as e}from"../FeatureTechnique.js";import{isHittest as t,getSelectionDefines as r,getFeatureTextures as s,getFeatureUniforms as i,resolveDynamicUniforms as o,getFeaturePipelineState as n}from"../featureTechniqueUtils.js";import{OutlineFillShader as
|
|
2
|
+
import{FeatureTechnique as e}from"../FeatureTechnique.js";import{isHittest as t,getSelectionDefines as r,getFeatureTextures as s,getFeatureUniforms as i,resolveDynamicUniforms as o,getFeaturePipelineState as n}from"../featureTechniqueUtils.js";import{OutlineFillShader as a}from"../shaders/OutlineFillShader.js";class u extends e{constructor(){super(...arguments),this.type=26,this.shaders={geometry:new a}}render(e,a){const{painter:u}=e,m=a.instance.getInput();u.setShader({shader:this.shaders.geometry,uniforms:{...o(e,a.target,m.uniforms),...i(e,a.target)},textures:s(e),defines:{...r(e)},optionalAttributes:m.optionalAttributes,useComputeBuffer:t(e)}),u.setPipelineState(n(e)),u.submitDraw(e,a)}}export{u as OutlineFillTechnique};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{FeatureTechnique as e}from"../FeatureTechnique.js";import{isHittest as t,getSelectionDefines as r,getFeatureTextures as s,getLocalTileOffset as a,getFeatureUniforms as i,resolveDynamicUniforms as o,getFeaturePipelineState as n}from"../featureTechniqueUtils.js";import{PatternFillShader as u}from"../shaders/PatternFillShader.js";class m extends e{constructor(){super(...arguments),this.type=28,this.shaders={geometry:new u}}render(e,u){const{painter:m}=e,f=u.instance.getInput();m.setShader({shader:this.shaders.geometry,uniforms:{...o(e,u.target,f.uniforms),...i(e),mosaicInfo:m.textureManager.getMosaicInfo(e,u.textureKey),localTileOffset:a(u.target)},textures:{...s(e),mosaicTexture:m.textureManager.getMosaicTexture(e,u.textureKey)},defines:{...r(e)},optionalAttributes:f.optionalAttributes,useComputeBuffer:t(e)}),m.setPipelineState(n(e)),m.submitDraw(e,u)}}export{m as PatternFillTechnique};
|
|
2
|
+
import{FeatureTechnique as e}from"../FeatureTechnique.js";import{isHittest as t,getSelectionDefines as r,getFeatureTextures as s,getLocalTileOffset as a,getFeatureUniforms as i,resolveDynamicUniforms as o,getFeaturePipelineState as n}from"../featureTechniqueUtils.js";import{PatternFillShader as u}from"../shaders/PatternFillShader.js";class m extends e{constructor(){super(...arguments),this.type=28,this.shaders={geometry:new u}}render(e,u){const{painter:m}=e,f=u.instance.getInput();m.setShader({shader:this.shaders.geometry,uniforms:{...o(e,u.target,f.uniforms),...i(e,u.target),mosaicInfo:m.textureManager.getMosaicInfo(e,u.textureKey),localTileOffset:a(u.target)},textures:{...s(e),mosaicTexture:m.textureManager.getMosaicTexture(e,u.textureKey)},defines:{...r(e)},optionalAttributes:f.optionalAttributes,useComputeBuffer:t(e)}),m.setPipelineState(n(e)),m.submitDraw(e,u)}}export{m as PatternFillTechnique};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{FeatureTechnique as e}from"../FeatureTechnique.js";import{isHittest as t,getSelectionDefines as r,getFeatureTextures as s,getLocalTileOffset as
|
|
2
|
+
import{FeatureTechnique as e}from"../FeatureTechnique.js";import{isHittest as t,getSelectionDefines as r,getFeatureTextures as s,getLocalTileOffset as a,getFeatureUniforms as i,resolveDynamicUniforms as o,getFeaturePipelineState as n}from"../featureTechniqueUtils.js";import{PatternOutlineFillShader as u}from"../shaders/PatternOutlineFillShader.js";class m extends e{constructor(){super(...arguments),this.type=29,this.shaders={geometry:new u}}render(e,u){const{painter:m}=e,f=u.instance.getInput();m.setShader({shader:this.shaders.geometry,uniforms:{...o(e,u.target,f.uniforms),...i(e,u.target),mosaicInfo:m.textureManager.getMosaicInfo(e,u.textureKey),localTileOffset:a(u.target)},textures:{...s(e),mosaicTexture:m.textureManager.getMosaicTexture(e,u.textureKey)},defines:{...r(e)},optionalAttributes:f.optionalAttributes,useComputeBuffer:t(e)}),m.setPipelineState(n(e)),m.submitDraw(e,u)}}export{m as PatternOutlineFillTechnique};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{getValue as e,getEndValue as s}from"../../../../flow/animatedValues.js";import{longSafetyTime as t}from"../../../../flow/utils.js";import{Technique as r}from"../Technique.js";import{
|
|
2
|
+
import{getValue as e,getEndValue as s}from"../../../../flow/animatedValues.js";import{longSafetyTime as t}from"../../../../flow/utils.js";import{Technique as r}from"../Technique.js";import{getViewUniforms as i}from"../shaders/ViewInfo.js";import{FlowImageryShader as a}from"../shaders/flow/FlowImageryShader.js";import{FlowParticlesShader as o}from"../shaders/flow/FlowParticlesShader.js";import{FlowStreamlinesShader as n}from"../shaders/flow/FlowStreamlinesShader.js";class c extends r{constructor(){super(...arguments),this.type=14,this.drawPhase=1,this.shaders={imagery:new a,particles:new o,streamlines:new n}}render(e,s){const{painter:t}=e;t.setPipelineState({depth:!1,color:{write:[!0,!0,!0,!0],blendMode:"composite"},stencil:{write:!1,test:{compare:514,op:{fail:7680,zFail:7680,zPass:7680},mask:255}}}),this._renderResource(e,s.item.resources,this._createVisualState(e,s))}_renderResource(e,s,t){switch(s.kind){case"stack":return void this._renderStackResources(e,s,t);case"imagery":return void this._renderImageryResources(e,s,t);case"particles":return void this._renderParticlesResources(e,s,t);case"streamlines":return void this._renderStreamlinesResources(e,s,t)}}_createVisualState(r,a){const{item:o,localToScreenMat3:n}=a,c=r.time/1e3;return{time:r.animationsEnabled?c:t,view:i(r),localToScreenMat3:n,displayOpacity:r.animationsEnabled?e(o.displayOpacity,c):s(o.displayOpacity),startTime:o.startTime,endTime:o.endTime}}_renderStackResources(e,s,t){for(const r of s.resources)this._renderResource(e,r,t)}_renderImageryResources({context:e,painter:s},t,r){const i=t.getProgramSpec(r);s.submitDrawMeshUntyped(e,{shader:this.shaders.imagery,uniforms:i.uniforms,textures:i.textures,defines:i.defines,optionalAttributes:i.optionalAttributes,useComputeBuffer:!1},t.mesh,{stencilRef:0})}_renderParticlesResources({context:e,painter:s},t,r){const i=t.getProgramSpec(r);s.submitDrawMeshUntyped(e,{shader:this.shaders.particles,uniforms:i.uniforms,textures:i.textures,defines:i.defines,optionalAttributes:i.optionalAttributes,useComputeBuffer:!1},t.mesh,{stencilRef:0})}_renderStreamlinesResources({context:e,painter:s},t,r){const i=t.getProgramSpec(r);s.submitDrawMeshUntyped(e,{shader:this.shaders.streamlines,uniforms:i.uniforms,textures:i.textures,defines:i.defines,optionalAttributes:i.optionalAttributes,useComputeBuffer:!1},t.mesh,{stencilRef:0})}}export{c as FlowTechnique};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{FeatureTechnique as e}from"../FeatureTechnique.js";import{isHittest as t,getSelectionDefines as r,getFeatureTextures as s,getFeatureUniforms as i}from"../featureTechniqueUtils.js";import{HeatmapResources as n}from"./HeatmapResources.js";import{HeatmapAccumulateShader as o}from"../shaders/HeatmapAccumulateShader.js";import{HeatmapResolveShader as u}from"../shaders/HeatmapResolveShader.js";class a extends e{constructor(){super(...arguments),this.type=19,this.drawPhase=73,this.shaders={accumulate:new o,resolve:new u},this._isBound=!1,this._resources=new Map}shutdown(e){super.shutdown(e),this._resources.get(e)?.destroy(),this._resources.delete(e),this._prevFBO=null,this._unbind()}render(e,n){const{context:o,painter:u,state:a}=e,l=n.instance.getInput(),{isFieldActive:d}=l.uniforms,p=this._getOrCreateResourcesRecord(o),m=p.loadQualityProfile(o);t(e)||this._bind(e,p,l),u.setShader({shader:this.shaders.accumulate,uniforms:{...i(e),kernelControls:{radius:f(l,a),isFieldActive:d?1:0}},textures:s(e),defines:{...r(e),...m.defines},optionalAttributes:{},useComputeBuffer:t(e)});const _=t(e)?h:c;u.setPipelineState(_),u.submitDraw(e,n)}getStencilReference(e){return d(e)}renderResolvePass(e,r){if(t(e))return;const{context:s,painter:i}=e,n=this._resources.get(s);if(null==this._prevFBO||null==this._prevViewport||!n?.initialized)return;const{defines:o}=n.loadQualityProfile(s),{minDensity:u,maxDensity:a,radius:l}=r.getInput().uniforms,d=8,c=9,h=n.accumulateFramebuffer,f=n.resolveGradientTexture,m={shader:this.shaders.resolve,uniforms:{accumulatedDensity:{minAndInvRange:[u,1/(a-u)],normalization:3/(l*l*Math.PI)}},textures:{densityTexture:{unit:d,texture:h.colorTexture},gradientTexture:{unit:c,texture:f}},defines:o,optionalAttributes:{},useComputeBuffer:!1};s.bindFramebuffer(this._prevFBO),s.setViewport(0,0,this._prevViewport.width,this._prevViewport.height),s.bindTexture(h.colorTexture,d),s.bindTexture(f,c),i.setPipelineState(p),i.submitDrawMesh(s,m,i.quadMesh),this._unbind()}_getOrCreateResourcesRecord(e){let t=this._resources.get(e);return null==t&&(t=new n,this._resources.set(e,t)),t}_unbind(){this._prevFBO=null,this._prevViewport=null,this._isBound=!1}_bind(e,t,r){const{context:s,state:i,pixelRatio:n}=e,o=s.boundFramebuffer;if(this._isBound||null==o)return;const u=s.getViewport();this._prevFBO=o,this._prevViewport=u;const{gradient:a,gradientHash:d}=r.uniforms;t.ensureResolveGradientTexture(s,d,a);const{width:c,height:h}=u,p=l(f(r,i),n),m=c*p,_=h*p,w=t.ensureAccumulateFBO(s,m,_);s.blitFramebuffer(o,w,1024),s.bindFramebuffer(w),s.setViewport(0,0,w.width,w.height),s.setColorMask(!0,!0,!0,!0),s.setClearColor(0,0,0,0),s.clear(16384),this._isBound=!0}}function l(e,t){const r=t>1.5?.25:.5;return e<1/(2*r)?1:r}function d(e){return e.key.level+1}const c={color:{write:[!0,!0,!0,!0],blendMode:"additive"},depth:!1,stencil:{write:!1,test:{compare:518,mask:255,op:{fail:7680,zFail:7680,zPass:7681}}}},h={...c,stencil:!1},p={color:{write:[!0,!0,!0,!0],blendMode:"composite"},depth:!1,stencil:!1};function f(e,t){const{referenceScale:r,radius:s}=e.uniforms;return s*(0!==r?r/t.scale:1)}export{a as HeatmapTechnique};
|
|
2
|
+
import{FeatureTechnique as e}from"../FeatureTechnique.js";import{isHittest as t,getSelectionDefines as r,getFeatureTextures as s,getFeatureUniforms as i}from"../featureTechniqueUtils.js";import{HeatmapResources as n}from"./HeatmapResources.js";import{HeatmapAccumulateShader as o}from"../shaders/HeatmapAccumulateShader.js";import{HeatmapResolveShader as u}from"../shaders/HeatmapResolveShader.js";class a extends e{constructor(){super(...arguments),this.type=19,this.drawPhase=73,this.shaders={accumulate:new o,resolve:new u},this._isBound=!1,this._resources=new Map}shutdown(e){super.shutdown(e),this._resources.get(e)?.destroy(),this._resources.delete(e),this._prevFBO=null,this._unbind()}render(e,n){const{context:o,painter:u,state:a}=e,l=n.instance.getInput(),{isFieldActive:d}=l.uniforms,p=this._getOrCreateResourcesRecord(o),m=p.loadQualityProfile(o);t(e)||this._bind(e,p,l),u.setShader({shader:this.shaders.accumulate,uniforms:{...i(e,n.target),kernelControls:{radius:f(l,a),isFieldActive:d?1:0}},textures:s(e),defines:{...r(e),...m.defines},optionalAttributes:{},useComputeBuffer:t(e)});const _=t(e)?h:c;u.setPipelineState(_),u.submitDraw(e,n)}getStencilReference(e){return d(e)}renderResolvePass(e,r){if(t(e))return;const{context:s,painter:i}=e,n=this._resources.get(s);if(null==this._prevFBO||null==this._prevViewport||!n?.initialized)return;const{defines:o}=n.loadQualityProfile(s),{minDensity:u,maxDensity:a,radius:l}=r.getInput().uniforms,d=8,c=9,h=n.accumulateFramebuffer,f=n.resolveGradientTexture,m={shader:this.shaders.resolve,uniforms:{accumulatedDensity:{minAndInvRange:[u,1/(a-u)],normalization:3/(l*l*Math.PI)}},textures:{densityTexture:{unit:d,texture:h.colorTexture},gradientTexture:{unit:c,texture:f}},defines:o,optionalAttributes:{},useComputeBuffer:!1};s.bindFramebuffer(this._prevFBO),s.setViewport(0,0,this._prevViewport.width,this._prevViewport.height),s.bindTexture(h.colorTexture,d),s.bindTexture(f,c),i.setPipelineState(p),i.submitDrawMesh(s,m,i.quadMesh),this._unbind()}_getOrCreateResourcesRecord(e){let t=this._resources.get(e);return null==t&&(t=new n,this._resources.set(e,t)),t}_unbind(){this._prevFBO=null,this._prevViewport=null,this._isBound=!1}_bind(e,t,r){const{context:s,state:i,pixelRatio:n}=e,o=s.boundFramebuffer;if(this._isBound||null==o)return;const u=s.getViewport();this._prevFBO=o,this._prevViewport=u;const{gradient:a,gradientHash:d}=r.uniforms;t.ensureResolveGradientTexture(s,d,a);const{width:c,height:h}=u,p=l(f(r,i),n),m=c*p,_=h*p,w=t.ensureAccumulateFBO(s,m,_);s.blitFramebuffer(o,w,1024),s.bindFramebuffer(w),s.setViewport(0,0,w.width,w.height),s.setColorMask(!0,!0,!0,!0),s.setClearColor(0,0,0,0),s.clear(16384),this._isBound=!0}}function l(e,t){const r=t>1.5?.25:.5;return e<1/(2*r)?1:r}function d(e){return e.key.level+1}const c={color:{write:[!0,!0,!0,!0],blendMode:"additive"},depth:!1,stencil:{write:!1,test:{compare:518,mask:255,op:{fail:7680,zFail:7680,zPass:7681}}}},h={...c,stencil:!1},p={color:{write:[!0,!0,!0,!0],blendMode:"composite"},depth:!1,stencil:!1};function f(e,t){const{referenceScale:r,radius:s}=e.uniforms;return s*(0!==r?r/t.scale:1)}export{a as HeatmapTechnique};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{FeatureTechnique as e}from"../FeatureTechnique.js";import{getSelectionDefines as t,getFeaturePipelineState as s,isHittest as r,getFeatureTextures as a,getFeatureUniforms as i,resolveDynamicUniforms as n}from"../featureTechniqueUtils.js";import{TextShader as o}from"../text/TextShader.js";class u extends e{constructor(){super(...arguments),this.type=20,this.shaders={geometry:new o},this.drawPhase=14,this.symbologyPlane=3}render(e,o){const{painter:u}=e,c=t(e),d={...s(e),stencil:{write:!1,test:{compare:516,mask:255,op:{fail:7680,zFail:7680,zPass:7680}}}},m=o.instance.getInput(),f={shader:this.shaders.geometry,uniforms:{...n(e,o.target,m.uniforms),...i(e),mosaicInfo:u.textureManager.getMosaicInfo(e,o.textureKey)},textures:{...a(e),mosaicTexture:u.textureManager.getMosaicTexture(e,o.textureKey)},defines:{...c,textRenderPassType:0,isBackgroundPass:!0,isLabel:!0},optionalAttributes:m.optionalAttributes,useComputeBuffer:r(e)};u.setPipelineState(d),u.setShader(f),u.submitDraw(e,o,{stencilRef:255}),u.setShader({...f,defines:{...c,textRenderPassType:2,isBackgroundPass:!1,isLabel:!0}}),u.submitDraw(e,o,{stencilRef:255}),u.setShader({...f,defines:{...c,textRenderPassType:0,isBackgroundPass:!1,isLabel:!0}}),u.submitDraw(e,o,{stencilRef:255})}}export{u as LabelTechnique};
|
|
2
|
+
import{FeatureTechnique as e}from"../FeatureTechnique.js";import{getSelectionDefines as t,getFeaturePipelineState as s,isHittest as r,getFeatureTextures as a,getFeatureUniforms as i,resolveDynamicUniforms as n}from"../featureTechniqueUtils.js";import{TextShader as o}from"../text/TextShader.js";class u extends e{constructor(){super(...arguments),this.type=20,this.shaders={geometry:new o},this.drawPhase=14,this.symbologyPlane=3}render(e,o){const{painter:u}=e,c=t(e),d={...s(e),stencil:{write:!1,test:{compare:516,mask:255,op:{fail:7680,zFail:7680,zPass:7680}}}},m=o.instance.getInput(),f={shader:this.shaders.geometry,uniforms:{...n(e,o.target,m.uniforms),...i(e,o.target),mosaicInfo:u.textureManager.getMosaicInfo(e,o.textureKey)},textures:{...a(e),mosaicTexture:u.textureManager.getMosaicTexture(e,o.textureKey)},defines:{...c,textRenderPassType:0,isBackgroundPass:!0,isLabel:!0},optionalAttributes:m.optionalAttributes,useComputeBuffer:r(e)};u.setPipelineState(d),u.setShader(f),u.submitDraw(e,o,{stencilRef:255}),u.setShader({...f,defines:{...c,textRenderPassType:2,isBackgroundPass:!1,isLabel:!0}}),u.submitDraw(e,o,{stencilRef:255}),u.setShader({...f,defines:{...c,textRenderPassType:0,isBackgroundPass:!1,isLabel:!0}}),u.submitDraw(e,o,{stencilRef:255})}}export{u as LabelTechnique};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{FeatureTechnique as e}from"../FeatureTechnique.js";import{isHittest as t,getSelectionDefines as s,getFeatureTextures as r,getFeatureUniforms as i,resolveDynamicUniforms as a,isHighlight as o,getFeaturePipelineState as n}from"../featureTechniqueUtils.js";import{GradientStrokeShader as p}from"../shaders/GradientStrokeShader.js";class u extends e{constructor(){super(...arguments),this.type=17,this.shaders={geometry:new p},this.symbologyPlane=1}_getShaderOptions(e,o,n){const{painter:p}=e,u=o.instance.getInput();return{shader:this.shaders.geometry,uniforms:{...a(e,o.target,u.uniforms),...i(e),mosaicInfo:p.textureManager.getMosaicInfo(e,o.textureKey),technique:{isColorPass:n}},textures:{...r(e),mosaicTexture:p.textureManager.getMosaicTexture(e,o.textureKey)},defines:{...s(e)},optionalAttributes:u.optionalAttributes,useComputeBuffer:t(e)}}render(e,s){const{painter:r}=e;if(t(e)||o(e)){const t=n(e);return r.setPipelineState(t),r.setShader(this._getShaderOptions(e,s,1)),void r.submitDraw(e,s)}e.context.setClearDepth(1),e.context.clear(256);const i={color:!1,depth:{write:{zNear:0,zFar:1},test:513},stencil:{write:!1,test:{compare:514,mask:255,op:{fail:7680,zFail:7680,zPass:7680}}}};r.setShader(this._getShaderOptions(e,s,0)),r.setPipelineState(i),r.submitDraw(e,s);const a={color:{write:[!0,!0,!0,!0],blendMode:"composite"},depth:{write:!1,test:515},stencil:{write:!1,test:{compare:514,mask:255,op:{fail:7680,zFail:7680,zPass:7680}}}};r.setShader(this._getShaderOptions(e,s,1)),r.setPipelineState(a),r.submitDraw(e,s)}}export{u as GradientStrokeTechnique};
|
|
2
|
+
import{FeatureTechnique as e}from"../FeatureTechnique.js";import{isHittest as t,getSelectionDefines as s,getFeatureTextures as r,getFeatureUniforms as i,resolveDynamicUniforms as a,isHighlight as o,getFeaturePipelineState as n}from"../featureTechniqueUtils.js";import{GradientStrokeShader as p}from"../shaders/GradientStrokeShader.js";class u extends e{constructor(){super(...arguments),this.type=17,this.shaders={geometry:new p},this.symbologyPlane=1}_getShaderOptions(e,o,n){const{painter:p}=e,u=o.instance.getInput();return{shader:this.shaders.geometry,uniforms:{...a(e,o.target,u.uniforms),...i(e,o.target),mosaicInfo:p.textureManager.getMosaicInfo(e,o.textureKey),technique:{isColorPass:n}},textures:{...r(e),mosaicTexture:p.textureManager.getMosaicTexture(e,o.textureKey)},defines:{...s(e)},optionalAttributes:u.optionalAttributes,useComputeBuffer:t(e)}}render(e,s){const{painter:r}=e;if(t(e)||o(e)){const t=n(e);return r.setPipelineState(t),r.setShader(this._getShaderOptions(e,s,1)),void r.submitDraw(e,s)}e.context.setClearDepth(1),e.context.clear(256);const i={color:!1,depth:{write:{zNear:0,zFar:1},test:513},stencil:{write:!1,test:{compare:514,mask:255,op:{fail:7680,zFail:7680,zPass:7680}}}};r.setShader(this._getShaderOptions(e,s,0)),r.setPipelineState(i),r.submitDraw(e,s);const a={color:{write:[!0,!0,!0,!0],blendMode:"composite"},depth:{write:!1,test:515},stencil:{write:!1,test:{compare:514,mask:255,op:{fail:7680,zFail:7680,zPass:7680}}}};r.setShader(this._getShaderOptions(e,s,1)),r.setPipelineState(a),r.submitDraw(e,s)}}export{u as GradientStrokeTechnique};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{FeatureTechnique as e}from"../FeatureTechnique.js";import{isHittest as t,getSelectionDefines as s,getFeatureTextures as r,getFeatureUniforms as i,resolveDynamicUniforms as o,getFeaturePipelineState as n}from"../featureTechniqueUtils.js";import{LineShader as a}from"../shaders/LineShader.js";class u extends e{constructor(){super(...arguments),this.type=21,this.shaders={geometry:new a},this.symbologyPlane=1}render(e,a){const{painter:u}=e,m=a.instance.getInput();u.setShader({shader:this.shaders.geometry,uniforms:{...o(e,a.target,m.uniforms),...i(e)},textures:r(e),defines:{...s(e)},optionalAttributes:m.optionalAttributes,useComputeBuffer:t(e)}),u.setPipelineState(n(e)),u.submitDraw(e,a)}}export{u as LineTechnique};
|
|
2
|
+
import{FeatureTechnique as e}from"../FeatureTechnique.js";import{isHittest as t,getSelectionDefines as s,getFeatureTextures as r,getFeatureUniforms as i,resolveDynamicUniforms as o,getFeaturePipelineState as n}from"../featureTechniqueUtils.js";import{LineShader as a}from"../shaders/LineShader.js";class u extends e{constructor(){super(...arguments),this.type=21,this.shaders={geometry:new a},this.symbologyPlane=1}render(e,a){const{painter:u}=e,m=a.instance.getInput();u.setShader({shader:this.shaders.geometry,uniforms:{...o(e,a.target,m.uniforms),...i(e,a.target)},textures:r(e),defines:{...s(e)},optionalAttributes:m.optionalAttributes,useComputeBuffer:t(e)}),u.setPipelineState(n(e)),u.submitDraw(e,a)}}export{u as LineTechnique};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{FeatureTechnique as e}from"../FeatureTechnique.js";import{isHittest as t,getSelectionDefines as r,getFeatureTextures as s,getFeatureUniforms as i,resolveDynamicUniforms as o,getFeaturePipelineState as a}from"../featureTechniqueUtils.js";import{TexturedLineShader as n}from"../shaders/TexturedLineShader.js";class u extends e{constructor(){super(...arguments),this.type=33,this.shaders={geometry:new n},this.symbologyPlane=1}render(e,n){const{painter:u}=e,m=n.instance.getInput();u.setShader({shader:this.shaders.geometry,uniforms:{...o(e,n.target,m.uniforms),...i(e),mosaicInfo:u.textureManager.getMosaicInfo(e,n.textureKey)},textures:{...s(e),mosaicTexture:u.textureManager.getMosaicTexture(e,n.textureKey)},defines:{...r(e)},optionalAttributes:m.optionalAttributes,useComputeBuffer:t(e)}),u.setPipelineState(a(e)),u.submitDraw(e,n)}}export{u as TexturedLineTechnique};
|
|
2
|
+
import{FeatureTechnique as e}from"../FeatureTechnique.js";import{isHittest as t,getSelectionDefines as r,getFeatureTextures as s,getFeatureUniforms as i,resolveDynamicUniforms as o,getFeaturePipelineState as a}from"../featureTechniqueUtils.js";import{TexturedLineShader as n}from"../shaders/TexturedLineShader.js";class u extends e{constructor(){super(...arguments),this.type=33,this.shaders={geometry:new n},this.symbologyPlane=1}render(e,n){const{painter:u}=e,m=n.instance.getInput();u.setShader({shader:this.shaders.geometry,uniforms:{...o(e,n.target,m.uniforms),...i(e,n.target),mosaicInfo:u.textureManager.getMosaicInfo(e,n.textureKey)},textures:{...s(e),mosaicTexture:u.textureManager.getMosaicTexture(e,n.textureKey)},defines:{...r(e)},optionalAttributes:m.optionalAttributes,useComputeBuffer:t(e)}),u.setPipelineState(a(e)),u.submitDraw(e,n)}}export{u as TexturedLineTechnique};
|
|
@@ -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{location as i,option as o,uniform as s,texture as l,input as r,ComputeVertexInput as a}from"../../GraphShaderModule.js";import{Vec4 as n,Vec2 as p,Float as u,Sampler2D as d,Vec3 as m,min as h,max as y,Mat3 as c,ifElse as x,lessThan as
|
|
2
|
+
import{__decorate as t,__param as e}from"tslib";import{location as i,option as o,uniform as s,texture as l,input as r,ComputeVertexInput as a}from"../../GraphShaderModule.js";import{Vec4 as n,Vec2 as p,Float as u,Sampler2D as d,Vec3 as m,min as h,max as y,Mat3 as c,ifElse as x,lessThan as V,equal as w,texture2D as v,clamp as f,abs as g,mix as S,distance as b,greaterThan as C,negate as z}from"../../graph/glsl.js";import{MarkerConstants as M}from"./markerConstants.js";import{FeatureVertexInput as _,AFeatureShader as R,FeatureFragmentInput as j}from"../shaders/AFeatureShader.js";import{c256ToRad as U,softEdgeRatio as F,trueHit as T,noHit as D}from"../shaders/constants.js";import{isRectHittest as N,hittestMarkerScreenRect as q,distPointTriangle as O,xyToBarycentric as k,inTriangle as A}from"../shaders/hittestUtils.js";import{MosaicInfo as P}from"../shaders/MosaicInfo.js";import{getBit as I,getBitBool as H,rgba2float as G}from"../shaders/utils.js";import{VisualVariableColor as L}from"../shaders/VisualVariableColor.js";import{VisualVariableOpacity as B}from"../shaders/VisualVariableOpacity.js";import{VisualVariableRotation as E}from"../shaders/VisualVariableRotation.js";import{VisualVariableSizeMinMaxValue as J}from"../shaders/VisualVariableSizeMinMaxValue.js";import{VisualVariableSizeScaleStops as K}from"../shaders/VisualVariableSizeScaleStops.js";import{VisualVariableSizeStops as Q}from"../shaders/VisualVariableSizeStops.js";import{VisualVariableSizeUnitValue as W}from"../shaders/VisualVariableSizeUnitValue.js";import{getVisualVariableOpacity as X,getVisualVariableColor as Y,getVisualVariableSize as Z,getVisualVariableRotation as $}from"../shaders/vvUtils.js";class tt extends _{}t([i(3,n)],tt.prototype,"color",void 0),t([i(4,n)],tt.prototype,"outlineColor",void 0),t([i(5,p)],tt.prototype,"offset",void 0),t([i(6,p)],tt.prototype,"textureUV",void 0),t([i(7,n)],tt.prototype,"sizing",void 0),t([i(8,u)],tt.prototype,"placementAngle",void 0),t([i(9,u)],tt.prototype,"sdfDecodeCoeff",void 0),t([i(10,p)],tt.prototype,"zoomRange",void 0);class et extends a{}t([i(11,p)],et.prototype,"offsetNextVertex1",void 0),t([i(12,p)],et.prototype,"offsetNextVertex2",void 0),t([i(13,p)],et.prototype,"textureUVNextVertex1",void 0),t([i(14,p)],et.prototype,"textureUVNextVertex2",void 0);class it extends j{}function ot(t,e,i,o){return e.multiply(t.x).add(i.multiply(t.y)).add(o.multiply(t.z))}function st(t){return t.multiply(t).divide(128)}class lt extends R{constructor(){super(...arguments),this.type="MarkerShader",this.computeAttributes={offset:["offsetNextVertex1","offsetNextVertex2"],textureUV:["textureUVNextVertex1","textureUVNextVertex2"]}}vertex(t,e){const i=st(t.sizing.x),o=st(t.sizing.y),s=st(t.sizing.z),l=t.placementAngle,r=I(t.bitset,M.bitset.isSDF),a=I(t.bitset,M.bitset.isMapAligned),p=I(t.bitset,M.bitset.scaleSymbolsProportionally),d=H(t.bitset,M.bitset.colorLocked),x=X(this,t.id),V=Y(this,t.id,t.color,d).multiply(x),w=this.tile.getDisplayViewScreenMat3(this.view,this.tileContainer).multiply(new m(t.pos.xy,1)),v=Z(this,t.id,s).divide(s),f=i.multiply(v),g=t.offset.xy.multiply(v);let S=o.multiply(p.multiply(v.subtract(1)).add(1));S=h(S,y(f.subtract(.99),new u(0)));const b=y(S,new u(1)),C=h(S,new u(1)),z=c.fromRotation(l.multiply(U)),_=$(this,t.id),R=this._getViewRotationMatrix(a).multiply(_).multiply(z).multiply(new m(g.xy,0)).multiply(this.tileContainer.scaleFactor),j=this.clip(t.id,t.zoomRange),F=new n(w.xy.add(R.xy),j,1),T=t.textureUV.divide(this.mosaicInfo.size),D=t.outlineColor.multiply(C),N=I(t.bitset,M.bitset.overrideOutlineColor),q=t.sdfDecodeCoeff.multiply(f);return{glPosition:F,color:V,textureUV:T,outlineColor:D,outlineSize:b,distanceToPx:q,isSDF:r,overrideOutlineColor:N,...this.maybeRunHittest(t,e,{pos:t.pos,size:f,sizeCorrection:v,scaleFactor:this.tileContainer.scaleFactor,isMapAligned:a,vvRotationMat3:_,placementMat3:z,outlineSize:b,distanceToPx:q,isSDF:r})}}fragment(t){const e=this._getColor(t.textureUV,t);return this.getFragmentOutput(e,t)}hittest(t,e,i){const{pos0:o,pos1:s,pos2:l}=this.computeHittestTriangle(t,e,i),r=N(this.hittestRequest);return x(r,()=>{const{tlbr:t}=this.hittestRequest;return q(o,s,l,t)},()=>x(V(i.size,this.hittestRequest.smallSymbolSizeThreshold),this._hittestSmallMarker(t,e,i),this._hittestMarker(t,e,i)))}_getViewRotationMatrix(t){const e=this.view.displayViewMat3,i=this.view.displayMat3,o=new u(1).subtract(t);return e.multiply(t).add(i.multiply(o))}_getViewScreenMatrix(t){const e=this.tile.getTileMat3(this.view,this.tileContainer),i=this.view.viewMat3.multiply(e),o=e,s=new u(1).subtract(t);return i.multiply(t).add(o.multiply(s))}_getColor(t,e){return x(w(e.isSDF,new u(1)),this._getSDFColor(t,e),this._getSpriteColor(t,e))}_getSpriteColor(t,e){return v(this.mosaicTexture,t).multiply(e.color)}_getSDFColor(t,e){const i=v(this.mosaicTexture,t),o=new u(.5).subtract(G(i)).multiply(e.distanceToPx).multiply(F),s=f(new u(.5).subtract(o),new u(0),new u(1)),l=e.color.multiply(s);let r=e.outlineSize;this.highlight&&(r=y(r,e.overrideOutlineColor.multiply(4)));const a=r.multiply(.5),n=g(o).subtract(a),p=f(new u(.5).subtract(n),new u(0),new u(1)),d=S(e.outlineColor,e.color,e.overrideOutlineColor).multiply(p);return new u(1).subtract(d.a).multiply(l).add(d)}_hittestSmallMarker(t,e,i){const{position:o,distance:s,smallSymbolDistance:l}=this.hittestRequest,r=s.subtract(l),a=this.tile.getViewScreenMat3(this.view,this.tileContainer).multiply(new m(i.pos,1)).xy,n=i.size.multiply(.5),p=b(a,o).subtract(n).add(r);return x(C(p,this.hittestRequest.distance),new u(D),new u(T))}_hittestMarker(t,e,i){const{pos0:o,pos1:s,pos2:l}=this.computeHittestTriangle(t,e,i),r=this.hittestRequest.position,a=this.hittestRequest.distance,n=O(r,o,s,l);return x(C(n,a),new u(D),this._hittestSamples(o,s,l,t,e,i))}computeHittestTriangle(t,e,i){const{pos:o,sizeCorrection:s,scaleFactor:l,isMapAligned:r}=i,a=new m(t.offset.multiply(s).multiply(l),0),n=new m(e.offsetNextVertex1.multiply(s).multiply(l),0),p=new m(e.offsetNextVertex2.multiply(s).multiply(l),0),u=this.tile.getViewScreenMat3(this.view,this.tileContainer).multiply(new m(o,1)),d=this._getViewScreenMatrix(r).multiply(i.vvRotationMat3).multiply(i.placementMat3);return{pos0:u.add(d.multiply(a)).xy,pos1:u.add(d.multiply(n)).xy,pos2:u.add(d.multiply(p)).xy}}_hittestSamples(t,e,i,o,s,l){const{outlineSize:r,isSDF:a,distanceToPx:d}=l,m=this.hittestRequest.position,h=this.hittestRequest.distance,y=k(m.add(new p(z(h),z(h))),t,e,i),c=k(m.add(new p(0,z(h))),t,e,i),V=k(m.add(new p(h,z(h))),t,e,i),w=k(m.add(new p(z(h),0)),t,e,i),v=k(m,t,e,i),f=k(m.add(new p(h,0)),t,e,i),g=k(m.add(new p(z(h),h)),t,e,i),S=k(m.add(new p(0,h)),t,e,i),b=k(m.add(new p(h,h)),t,e,i),M=o.textureUV.divide(this.mosaicInfo.size),_=s.textureUVNextVertex1.divide(this.mosaicInfo.size),R=s.textureUVNextVertex2.divide(this.mosaicInfo.size),j={color:new n(1),outlineColor:new n(1),overrideOutlineColor:new u(1),outlineSize:r,distanceToPx:d,isSDF:a};let U=new u(0);return U=U.add(A(y).multiply(this._getColor(ot(y,M,_,R),j).a)),U=U.add(A(c).multiply(this._getColor(ot(c,M,_,R),j).a)),U=U.add(A(V).multiply(this._getColor(ot(V,M,_,R),j).a)),U=U.add(A(w).multiply(this._getColor(ot(w,M,_,R),j).a)),U=U.add(A(v).multiply(this._getColor(ot(v,M,_,R),j).a)),U=U.add(A(f).multiply(this._getColor(ot(f,M,_,R),j).a)),U=U.add(A(g).multiply(this._getColor(ot(g,M,_,R),j).a)),U=U.add(A(S).multiply(this._getColor(ot(S,M,_,R),j).a)),U=U.add(A(b).multiply(this._getColor(ot(b,M,_,R),j).a)),x(C(U,new u(.05)),new u(T),new u(D))}}t([o(L)],lt.prototype,"visualVariableColor",void 0),t([o(B)],lt.prototype,"visualVariableOpacity",void 0),t([o(E)],lt.prototype,"visualVariableRotation",void 0),t([o(J)],lt.prototype,"visualVariableSizeMinMaxValue",void 0),t([o(K)],lt.prototype,"visualVariableSizeScaleStops",void 0),t([o(Q)],lt.prototype,"visualVariableSizeStops",void 0),t([o(W)],lt.prototype,"visualVariableSizeUnitValue",void 0),t([s(P)],lt.prototype,"mosaicInfo",void 0),t([l(d)],lt.prototype,"mosaicTexture",void 0),t([e(0,r(tt)),e(1,r(et))],lt.prototype,"vertex",null),t([e(0,r(it))],lt.prototype,"fragment",null);export{it as MarkerFragmentInput,lt as MarkerShader,tt as MarkerVertexInput};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{FeatureTechnique as e}from"../FeatureTechnique.js";import{isHittest as t,getSelectionDefines as r,getFeatureTextures as s,getFeatureUniforms as o,resolveDynamicUniforms as
|
|
2
|
+
import{FeatureTechnique as e}from"../FeatureTechnique.js";import{isHittest as t,getSelectionDefines as r,getFeatureTextures as s,getFeatureUniforms as o,resolveDynamicUniforms as a,getFeaturePipelineState as i}from"../featureTechniqueUtils.js";import{MarkerShader as n}from"./MarkerShader.js";class u extends e{constructor(){super(...arguments),this.type=23,this.shaders={geometry:new n},this.symbologyPlane=2}render(e,n){const{painter:u}=e,m=n.instance.getInput();u.setShader({shader:this.shaders.geometry,uniforms:{...a(e,n.target,m.uniforms),...o(e,n.target),mosaicInfo:u.textureManager.getMosaicInfo(e,n.textureKey,!0)},textures:{...s(e),mosaicTexture:u.textureManager.getMosaicTexture(e,n.textureKey,!0)},defines:{...r(e)},optionalAttributes:m.optionalAttributes,useComputeBuffer:t(e)}),u.setPipelineState(i(e)),u.submitDraw(e,n)}}export{u as MarkerTechnique};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{destroyMaybe as e}from"../../../../../../../core/maybe.js";import{Mesh as t}from"../../../meshing/Mesh.js";import{simplePipelineState as s}from"../../utils.js";import{Technique as i}from"../Technique.js";import{OverlayShader as r}from"../shaders/OverlayShader.js";import{PrimitiveType as n,DataType as
|
|
2
|
+
import{destroyMaybe as e}from"../../../../../../../core/maybe.js";import{Mesh as t}from"../../../meshing/Mesh.js";import{simplePipelineState as s}from"../../utils.js";import{Technique as i}from"../Technique.js";import{OverlayShader as r}from"../shaders/OverlayShader.js";import{getViewUniforms as o}from"../shaders/ViewInfo.js";import{PrimitiveType as n,DataType as a}from"../../../../../../webgl/enums.js";import{VertexElementDescriptor as u}from"../../../../../../webgl/VertexElementDescriptor.js";class h extends i{constructor(){super(...arguments),this.type=27,this._mesh=null,this.shaders={overlay:new r}}render(e,t){const{context:i,painter:r}=e,n=this._getMesh(e,t);r.setPipelineState(s);const{isWrapAround:a,wrapAroundShift:u,...h}=t.config,p={...h,wrapAroundShift:0},l={shader:this.shaders.overlay,uniforms:{view:o(e),config:p},textures:{texture:t.texture},defines:null,optionalAttributes:null,useComputeBuffer:!1};r.setPipelineState({...s,stencil:{write:!1,test:{compare:514,op:{fail:7680,zFail:7680,zPass:7681},mask:255}}}),r.submitDrawMeshUntyped(i,l,n,{stencilRef:0}),a&&(p.wrapAroundShift=u,r.submitDrawMeshUntyped(i,l,n,{stencilRef:0}))}shutdown(){e(this._mesh)}_getMesh(e,s){const{context:i}=e;if(this._mesh){const e=this._mesh.vertexBuffers.get("positions");if(!e)throw new Error("Buffer not found");e.setData(s.position)}else{const e=null!=s.index?s.index.length:s.position.length/2;this._mesh=new t(i,{vertex:{positions:{data:s.position,layout:[new u("pos",2,a.FLOAT,0,8)]},uvs:{data:s.tex,layout:[new u("uv",2,a.UNSIGNED_SHORT,0,4)]}},index:null!=s.index?{index:{data:s.index}}:void 0,groups:[{index:null!=s.index?"index":void 0,primitive:n.TRIANGLE_STRIP}],parts:[{group:0,start:0,count:e}]})}return this._mesh}}export{h as OverlayTechnique};
|
|
@@ -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{uniform as r,location as o,option as i,input as s,UniformGroup as l}from"../../GraphShaderModule.js";import{Float as a,FixedArray as n,Vec4 as u,Vec2 as d,Vec3 as c,Int as h,ifElse as p,greaterThan as m,or as w,max as y,lessThan as S,and as g,greaterThanEqual as
|
|
2
|
+
import{__decorate as t,__param as e}from"tslib";import{uniform as r,location as o,option as i,input as s,UniformGroup as l}from"../../GraphShaderModule.js";import{Float as a,FixedArray as n,Vec4 as u,Vec2 as d,Vec3 as c,Int as h,ifElse as p,greaterThan as m,or as w,max as y,lessThan as S,and as g,greaterThanEqual as b,equal as f,abs as x,length as V,smoothstep as v,mix as C,step as _,not as A,mod as z,atan2 as T,min as R,clamp as D,lessThanEqual as j,distance as M}from"../../graph/glsl.js";import{FeatureVertexInput as O,AFeatureShader as F,FeatureFragmentInput as I}from"../shaders/AFeatureShader.js";import{bitsetMarkerScaleSymbolsProportionally as q,bitsetMarkerAlignmentMap as W,noHit as U,trueHit as P,epsilon as G,cRadToDeg as H}from"../shaders/constants.js";import{hittestMarker as k,isRectHittest as B}from"../shaders/hittestUtils.js";import{getBit as E,isNan as J}from"../shaders/utils.js";import{VisualVariableOpacity as K}from"../shaders/VisualVariableOpacity.js";import{VisualVariableSizeMinMaxValue as L}from"../shaders/VisualVariableSizeMinMaxValue.js";import{VisualVariableSizeScaleStops as N}from"../shaders/VisualVariableSizeScaleStops.js";import{VisualVariableSizeStops as Q}from"../shaders/VisualVariableSizeStops.js";import{VisualVariableSizeUnitValue as X}from"../shaders/VisualVariableSizeUnitValue.js";import{getVisualVariableOpacity as Y,getVisualVariableSize as Z}from"../shaders/vvUtils.js";const $=10;class tt extends l{}t([r(a)],tt.prototype,"outlineWidth",void 0),t([r(n.ofType(u,$))],tt.prototype,"colors",void 0),t([r(u)],tt.prototype,"defaultColor",void 0),t([r(u)],tt.prototype,"othersColor",void 0),t([r(u)],tt.prototype,"outlineColor",void 0),t([r(a)],tt.prototype,"donutRatio",void 0),t([r(a)],tt.prototype,"sectorThreshold",void 0),t([r(a)],tt.prototype,"fieldCount",void 0);class et extends O{}t([o(3,d)],et.prototype,"offset",void 0),t([o(4,d)],et.prototype,"texCoords",void 0),t([o(5,a)],et.prototype,"referenceSize",void 0),t([o(6,d)],et.prototype,"zoomRange",void 0);class rt extends I{}class ot extends F{constructor(){super(...arguments),this.type="PieChartShader"}vertex(t){const e=Y(this,t.id),r=Z(this,t.id,t.referenceSize).divide(t.referenceSize),o=t.referenceSize.multiply(.5).multiply(r),i=t.offset.multiply(r),s=E(t.bitset,q),l=this.chart.outlineWidth.multiply(s.multiply(r.subtract(1)).add(1)),p=this.tile.getDisplayViewScreenMat3(this.view,this.tileContainer).multiply(new c(t.pos,1)),m=this._getViewRotationMatrix(E(t.bitset,W)).multiply(new c(i,0)),w=new u(p.xy.add(m.xy),this.clip(t.id,t.zoomRange),1),y=null==this.hittestRequest?this._getSectorData(t.id):{filteredSectorToColorId:new n(new d(0),$),numberOfFilteredSectors:new h(0),maxSectorAngle:new a(0)};return{glPosition:w,color:new u(0),offset:t.texCoords.multiply(2).subtract(1),size:o,outlineWidth:l,opacity:e,filteredSectorToColorId:y.filteredSectorToColorId,numberOfFilteredSectors:y.numberOfFilteredSectors,maxSectorAngle:y.maxSectorAngle,...this.maybeRunHittest(t,{},o)}}fragment(t){return this.getFragmentOutput(null!=this.hittestRequest?new u(0):this._getColor(t),t)}hittest(t,e,r){const o=this.tile.getViewScreenMat3(this.view,this.tileContainer).multiply(new c(t.pos,1)).xy;return p(B(this.hittestRequest),this._hittestScreenRect(o,r),p(m(k(o,r,this.hittestRequest.position),this.hittestRequest.distance),new a(U),new a(P)))}_getColor(t){const e=this._getAngle(t.offset),r=m(this.chart.sectorThreshold,new a(0));let o=p(w(m(t.maxSectorAngle,new a(0)),r),this.chart.othersColor,this.chart.defaultColor);const i=y(t.numberOfFilteredSectors.subtract(1),new h(0)),s=this._getSectorColor(t.filteredSectorToColorId,i),l=this._getSectorColor(t.filteredSectorToColorId,0),n=m(t.numberOfFilteredSectors,new h(0));let u=p(n,s,o),d=p(n,l,o),c=p(n,t.maxSectorAngle,new a(0)),_=p(n,new a(360),new a(0));const A=S(e,t.maxSectorAngle),z=g(r,S(t.maxSectorAngle.add(new a(G)),new a(360)));let T=new a(0);for(let w=0;w<$;w++){const r=t.filteredSectorToColorId.get(w).x,i=S(new h(w),t.numberOfFilteredSectors),l=g(A,g(i,g(m(r,e),b(e,T)))),n=w>0?this._getSectorColor(t.filteredSectorToColorId,w-1):s,y=p(S(new h(w+1),t.numberOfFilteredSectors),new h(w+1),new h(0)),V=this._getSectorColor(t.filteredSectorToColorId,y),v=p(g(z,f(new a(w),new a(0))),this.chart.othersColor,n),C=p(g(z,S(x(r.subtract(t.maxSectorAngle)),new a(G))),this.chart.othersColor,V);o=p(l,this._getSectorColor(t.filteredSectorToColorId,w),o),u=p(l,v,u),d=p(l,C,d),c=p(l,T,c),_=p(l,r,_),T=p(i,r,T)}const R=V(t.offset),D=R.multiply(t.size),j=new a(.75),M=e.subtract(c),O=_.subtract(e),F=v(j.multiply(-1),j,M.multiply(R)),I=v(j.multiply(-1),j,O.multiply(R));o=C(u,o,F).add(C(d,o,I)).subtract(o);const q=t.size.subtract(t.outlineWidth).subtract(j),W=this.chart.donutRatio.multiply(q),U=W.subtract(t.outlineWidth),P=p(m(U,j),v(U.subtract(j),U.add(j),D),new a(1)),H=new a(1).subtract(v(t.size.subtract(j.multiply(2)),t.size,D)),k=P.multiply(H),B=g(m(q,new a(0)),m(t.outlineWidth,new a(.25))),E=v(q.subtract(j),q.add(j),D),J=p(m(W,j),new a(1).subtract(v(W.subtract(j),W.add(j),D)),new a(0));return o=p(B,C(o,this.chart.outlineColor,J.add(E)),o),t.opacity.multiply(k).multiply(o)}_getSectorData(t){const e=this._getAttributeValues(t);let r=new a(0);for(let a=0;a<$;a++)r=r.add(e[a]);const o=this.chart.sectorThreshold.multiply(360);let i=new n(new d(0),$),s=new a(0),l=new h(0);for(let n=0;n<$;n++){const t=p(m(r,new a(0)),e[n].multiply(360).divide(r),new a(0)),u=p(m(t,o),new a(1),new a(0)),c=s.add(u.multiply(t)),w=new d(c,new a(n));i=i.set(l,w),s=c,l=l.add(new h(u))}return{filteredSectorToColorId:i,numberOfFilteredSectors:l,maxSectorAngle:s}}_getAttributeValues(t){const e=this.getAttributeDataCoords(t),r=this.storageTextures.getDataDrivenData0(e),o=this.storageTextures.getDataDrivenData1(e),i=this.storageTextures.getDataDrivenData2(e);return[this._getAttributeValue(r.x,0),this._getAttributeValue(r.y,1),this._getAttributeValue(r.z,2),this._getAttributeValue(r.w,3),this._getAttributeValue(o.x,4),this._getAttributeValue(o.y,5),this._getAttributeValue(o.z,6),this._getAttributeValue(o.w,7),this._getAttributeValue(i.x,8),this._getAttributeValue(i.y,9)]}_getAttributeValue(t,e){const r=_(new a(e+1),this.chart.fieldCount);return p(g(A(J(t)),m(t,new a(0))),t,new a(0)).multiply(r)}_getAngle(t){return z(new a(90).subtract(new a(H).multiply(T(t.y,t.x))),new a(360))}_getSectorColor(t,e){return this.chart.colors.get(new h(t.get(e).y))}_getViewRotationMatrix(t){const e=this.view.displayViewMat3,r=this.view.displayMat3,o=new a(1).subtract(t);return e.multiply(t).add(r.multiply(o))}_hittestScreenRect(t,e){const r=this.hittestRequest.tlbr.xy,o=this.hittestRequest.tlbr.zw,i=R(r.x,o.x),s=R(r.y,o.y),l=y(r.x,o.x),n=y(r.y,o.y),u=new d(D(t.x,i,l),D(t.y,s,n));return p(j(M(t,u),e),new a(1),new a(0))}}t([r(tt)],ot.prototype,"chart",void 0),t([i(K)],ot.prototype,"visualVariableOpacity",void 0),t([i(L)],ot.prototype,"visualVariableSizeMinMaxValue",void 0),t([i(N)],ot.prototype,"visualVariableSizeScaleStops",void 0),t([i(Q)],ot.prototype,"visualVariableSizeStops",void 0),t([i(X)],ot.prototype,"visualVariableSizeUnitValue",void 0),t([e(0,s(et))],ot.prototype,"vertex",null),t([e(0,s(rt))],ot.prototype,"fragment",null);export{ot as PieChartShader,et as PieChartVertexInput,$ as maxPieChartFields};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{FeatureTechnique as e}from"../FeatureTechnique.js";import{getFeatureUniforms as t,getSelectionDefines as r,isHittest as s,getFeatureTextures as i,resolveDynamicUniforms as o,getFeaturePipelineState as a}from"../featureTechniqueUtils.js";import{PieChartShader as n}from"./PieChartShader.js";class u extends e{constructor(){super(...arguments),this.type=30,this.shaders={geometry:new n},this.symbologyPlane=2}render(e,n){const{painter:u}=e,{instance:h}=n,
|
|
2
|
+
import{FeatureTechnique as e}from"../FeatureTechnique.js";import{getFeatureUniforms as t,getSelectionDefines as r,isHittest as s,getFeatureTextures as i,resolveDynamicUniforms as o,getFeaturePipelineState as a}from"../featureTechniqueUtils.js";import{PieChartShader as n}from"./PieChartShader.js";class u extends e{constructor(){super(...arguments),this.type=30,this.shaders={geometry:new n},this.symbologyPlane=2}render(e,n){const{painter:u}=e,{instance:h,target:m}=n,p=h.getInput(),d=t(e,m),f=r(e);u.setShader({shader:this.shaders.geometry,uniforms:{...o(e,n.target,p.uniforms.shader),...d},textures:i(e),defines:{...f},optionalAttributes:p.optionalAttributes,useComputeBuffer:s(e)}),u.setPipelineState(a(e)),u.submitDraw(e,n)}}export{u as PieChartTechnique};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import has from"../../../../../../../core/has.js";import{disposeMaybe as e}from"../../../../../../../core/maybe.js";import{Technique as t}from"../Technique.js";import{TextureStatisticsTechnique as i}from"../TextureStatisticsTechnique.js";import{getInterpolationDefines as r}from"./processor/textureUtils.js";import{
|
|
2
|
+
import has from"../../../../../../../core/has.js";import{disposeMaybe as e}from"../../../../../../../core/maybe.js";import{Technique as t}from"../Technique.js";import{TextureStatisticsTechnique as i}from"../TextureStatisticsTechnique.js";import{getInterpolationDefines as r}from"./processor/textureUtils.js";import{getTileUniforms as s}from"../shaders/Tile.js";import{getTileContainerUniforms as o}from"../shaders/TileInfo.js";import{getViewUniforms as n}from"../shaders/ViewInfo.js";import{RasterColorizerLUTShader as a}from"../shaders/raster/RasterColorizerLUTShader.js";import{RasterColorizerShadedReliefShader as u}from"../shaders/raster/RasterColorizerShadedReliefShader.js";import{RasterColorizerStretchShader as c}from"../shaders/raster/RasterColorizerStretchShader.js";import{SizedPixelFormat as m,PixelType as l}from"../../../../../../webgl/enums.js";import{DisposableFramebufferObject as p}from"../../../../../../webgl/FramebufferObject.js";import h from"../../../../../../webgl/Texture.js";import{TextureDescriptor as d}from"../../../../../../webgl/TextureDescriptor.js";const f=160,x=new Set(["f32","f64","u16","s16","u32","s32"]);class g extends t{constructor(){super(...arguments),this.name="BrushRasterColorizer",this.type=0,this.shaders={lut:new a,stretch:new c,shadedRelief:new u},this._mosaicFbo=null,this._statisticsTechnique=null,this._draTimer=0}shutdown(t){super.shutdown(t),this._mosaicFbo=e(this._mosaicFbo),this._statisticsTechnique=e(this._statisticsTechnique)}render(t,i){const r=i.tiles.some(({bitmap:e})=>b(e));r||(this._mosaicFbo=e(this._mosaicFbo),this._statisticsTechnique=e(this._statisticsTechnique));const s=r?this._computeStatisticsTextures(t,i):void 0;for(const e of i.tiles){const{bitmap:i}=e;if(!i.source||i.suspended)continue;t.timeline.begin(this.name);const{painter:r}=t;r.setPipelineState({depth:!1,stencil:{test:{mask:255,compare:514,op:{fail:7680,zFail:7680,zPass:7680}},write:!1},color:{write:[!0,!0,!0,!0],blendMode:"composite"}}),i.updateTexture(t),i.updateProcessedTexture();const{type:o}=i.symbolizerParameters,n="stretch"===o?this._getStretchOptions(t,e,s):"lut"===o?this._getLutOptions(t,e):this._getShadedReliefOptions(t,e);"bilinear"!==i.interpolation||t.context.capabilities.textureFloatLinear||(n.defines.bilinear=!0),r.submitDrawMesh(t.context,n,r.quadMesh,i),t.timeline.end(this.name)}}_computeStatisticsTextures(e,t){this._statisticsTechnique??=new i;const r=this._statisticsTechnique;let s=has("esri-2d-dra-delay");if(null==s){const e=t.tiles.find(({bitmap:e})=>b(e)).bitmap,{stretchType:i,bandCount:r}=e.symbolizerParameters,{pixelType:o}=e.source;"minMax"===i&&r>=3&&x.has(o)&&(s=f)}if(s){const i=performance.now();(i-this._draTimer>=s||e.stationary||!r.minValuesTexture)&&(this._mosaic(e,t),r.render(e,{fbo:this._mosaicFbo}),this._draTimer=i)}else this._mosaic(e,t),r.render(e,{fbo:this._mosaicFbo});return{minTexture:r.minValuesTexture,maxTexture:r.maxValuesTexture,meanTexture:r.meanValuesTexture,stddevTexture:r.stdDevValuesTexture}}_mosaic(e,t){const{context:i,painter:r}=e,s=i.boundFramebuffer;if(null==s)return;if(this._mosaicFbo)this._mosaicFbo.resize(s.width,s.height);else{const e=T(i,s.width,s.height);this._mosaicFbo=new p(i,e)}i.bindFramebuffer(this._mosaicFbo);const o="RasterColorizerMosaic";for(const n of t.tiles){const{bitmap:t}=n;if(!b(t))continue;e.timeline.begin(o),r.setPipelineState({depth:!1,stencil:{test:{mask:255,compare:514,op:{fail:7680,zFail:7680,zPass:7680}},write:!1},color:{write:[!0,!0,!0,!0],blendMode:"composite"}});const i=t.interpolation;t.interpolation="nearest",t.updateTexture(e),t.updateProcessedTexture();const s=this._getStretchOptions(e,n,void 0,!0);s.defines.noOp=!0,r.submitDrawMesh(e.context,s,r.quadMesh,t),t.interpolation=i,e.timeline.end(o)}i.bindFramebuffer(s)}_getLutOptions(e,t){const{bitmap:i}=t,{config:a,projectionConfig:u,projectionTextures:c,colormapConfig:m,colormapTextures:l,textures:p,projectionDefines:h}=this._getCommonConfig(i),d=r(i);return{shader:this.shaders.lut,uniforms:{view:n(e),tileContainer:o(e),tile:s(e.tilingScheme,t),projectionConfig:u,config:a,colormapConfig:m},textures:{...p,projectionTextures:c,colormapTextures:l},defines:{...h,...d,applyPixelMask:!!p.pixelMaskTexture,applyPixelHighlights:!!p.highlightTexture},optionalAttributes:null,useComputeBuffer:!1}}_getStretchOptions(e,t,i,a=!1){const{bitmap:u}=t,c=u.symbolizerParameters,{config:m,projectionConfig:l,projectionTextures:p,colormapConfig:h,colormapTextures:d,textures:f,projectionDefines:x,textureUnit:g}=this._getCommonConfig(u),T=r(u),b=i?{numberOfStandardDeviations:c.numberOfStandardDeviations||2}:void 0,_=i?{minTexture:{texture:i.minTexture,unit:g},maxTexture:{texture:i.maxTexture,unit:g+1},meanTexture:{texture:i.meanTexture,unit:g+2},stddevTexture:{texture:i.stddevTexture,unit:g+3}}:void 0,C=i?"standardDeviation"===c.stretchType?2:1:0;return{shader:this.shaders.stretch,uniforms:{view:n(e),tileContainer:o(e),tile:s(e.tilingScheme,t),projectionConfig:l,config:m,stretchConfig:c,colormapConfig:h,statisticsConfig:b},textures:{...f,projectionTextures:p,colormapTextures:d,statisticsTextures:_},defines:{...x,...T,isMultiband:c.bandCount>1,applyColormap:!!h,useGamma:c.useGamma,noOp:u.isRenderedSource&&!u.processed,applyPixelMask:!!f.pixelMaskTexture,applyPixelHighlights:!a&&!!f.highlightTexture,draStretchType:C},optionalAttributes:null,useComputeBuffer:!1}}_getShadedReliefOptions(e,t){const{bitmap:i}=t,a=i.symbolizerParameters,{config:u,projectionConfig:c,projectionTextures:m,colormapConfig:l,colormapTextures:p,textures:h,projectionDefines:d}=this._getCommonConfig(i),f=r(i);return{shader:this.shaders.shadedRelief,uniforms:{view:n(e),tileContainer:o(e),tile:s(e.tilingScheme,t),projectionConfig:c,config:u,hillshadeConfig:a,colormapConfig:l},textures:{...h,projectionTextures:m,colormapTextures:p},defines:{...d,...f,isMultidirectional:a.hillshadeType>0,applyColormap:!!l,applyPixelMask:!!h.pixelMaskTexture,applyPixelHighlights:!!h.highlightTexture},optionalAttributes:null,useComputeBuffer:!1}}_getCommonConfig(e){const{coordScale:t,computedOpacity:i}=e,{names:r,textures:s}=e.getTextures({useProcessedTexture:e.processed}),o=s[r.indexOf("u_image")];let n=0;const a={coordScale:t,srcImageSize:e.getRasterTextureSize(),opacity:i},u={texture:{texture:o,unit:n++},pixelMaskTexture:null,highlightTexture:null},c=s[r.indexOf("u_transformGrid")],{transformGrid:m}=e,l=!(!c||!m),p=l?{targetImageSize:[e.width,e.height],transformSpacing:m.spacing,transformGridSize:m.size}:void 0,h=l?{transformTexture:{texture:c,unit:n++}}:void 0,d=s[r.indexOf("u_colormap")],{colormap:f,colormapOffset:x}=e.symbolizerParameters,g=d&&f?{colormapOffset:x??0,colormapMaxIndex:f.length/4-1}:void 0,T=d&&f?{colormapTexture:{texture:d,unit:n++}}:void 0,b=s[r.indexOf("u_mask")];b&&(u.pixelMaskTexture={texture:b,unit:n++});const{highlightTexture:_}=e;_&&(u.highlightTexture={texture:_,unit:n++});return{config:a,projectionConfig:p,projectionTextures:h,colormapConfig:g,colormapTextures:T,textures:u,projectionDefines:{applyProjection:l,lookupProjection:l&&1===m.spacing[0]},textureUnit:n}}}function T(e,t,i){const r=new d(t,i);return r.internalFormat=m.RGBA32F,r.samplingMode=9728,r.dataType=l.FLOAT,r.wrapMode=33071,new h(e,r)}function b(e){return!e.suspended&&null!=e.source&&!e.isRenderedSource&&"stretch"===e.symbolizerParameters.type&&!!e.symbolizerParameters.dynamicRangeAdjustment}export{g as RasterColorizerTechnique};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{RasterVFTile as e}from"../../../../imagery/RasterVFTile.js";import{Technique as t}from"../Technique.js";import{getRasterVFSamplingUniforms as r}from"./rasterVFUtils.js";import{
|
|
2
|
+
import{RasterVFTile as e}from"../../../../imagery/RasterVFTile.js";import{Technique as t}from"../Technique.js";import{getRasterVFSamplingUniforms as r}from"./rasterVFUtils.js";import{getTileUniforms as a}from"../shaders/Tile.js";import{getTileContainerUniforms as s}from"../shaders/TileInfo.js";import{getViewUniforms as i}from"../shaders/ViewInfo.js";import{MagDirShader as o}from"../shaders/raster/MagDirShader.js";import{ScalarShader as n}from"../shaders/raster/ScalarShader.js";const l=48,c=[.27058823529411763,.4588235294117647,.7098039215686275,1,.396078431372549,.5372549019607843,.7215686274509804,1,.5176470588235295,.6196078431372549,.7294117647058823,1,.6352941176470588,.7058823529411765,.7411764705882353,1,.7529411764705882,.8,.7450980392156863,1,.8705882352941177,.8901960784313725,.7490196078431373,1,1,1,.7490196078431373,1,1,.8627450980392157,.6313725490196078,1,.9803921568627451,.7254901960784313,.5176470588235295,1,.9607843137254902,.596078431372549,.4117647058823529,1,.9294117647058824,.4588235294117647,.3176470588235294,1,.9098039215686274,.08235294117647059,.08235294117647059,1],d=[0,92/255,230/255,1],m={beaufort_ft:c,beaufort_m:c,beaufort_km:c,beaufort_mi:c,beaufort_kn:[.1568627450980392,.5725490196078431,.7803921568627451,1,.34901960784313724,.6352941176470588,.7294117647058823,1,.5058823529411764,.7019607843137254,.6705882352941176,1,.6274509803921569,.7607843137254902,.6078431372549019,1,.7490196078431373,.8313725490196079,.5411764705882353,1,.8549019607843137,.9019607843137255,.4666666666666667,1,.9803921568627451,.9803921568627451,.39215686274509803,1,.9882352941176471,.8352941176470589,.3254901960784314,1,.9882352941176471,.7019607843137254,.4,1,.9803921568627451,.5529411764705883,.20392156862745098,1,.9686274509803922,.43137254901960786,.16470588235294117,1,.9411764705882353,.2784313725490196,.11372549019607843,1],classified_arrow:[.2196078431372549,.6588235294117647,0,1,.5450980392156862,1.2117647058823529,0,1,1,1,0,1,1,.5019607843137255,0,1,1,0,0,1],ocean_current_m:[.3058823529411765,.10196078431372549,.6,1,.7019607843137254,.10588235294117647,.10196078431372549,1,.792156862745098,.5019607843137255,.10196078431372549,1,.6941176470588235,.6941176470588235,.6941176470588235,1],ocean_current_kn:[0,0,0,1,0,.1450980392156863,.39215686274509803,1,.3058823529411765,.10196078431372549,.6,1,.592156862745098,0,.39215686274509803,1,.7019607843137254,.10588235294117647,.10196078431372549,1,.6941176470588235,.3058823529411765,.10196078431372549,1,.792156862745098,.5019607843137255,.10196078431372549,1,.6941176470588235,.7019607843137254,.20392156862745098,1,.6941176470588235,.6941176470588235,.6941176470588235,1],simple_scalar:d,single_arrow:d,wind_speed:[0,0,0,1]},f=[0,20];class u extends t{constructor(){super(...arguments),this.type=3,this.shaders={magDir:new o,scalar:new n},this.drawPhase=1}shutdown(){}render(e,t){const{painter:r}=e;r.setPipelineState({depth:!1,color:{write:[!0,!0,!0,!0],blendMode:"composite"},stencil:{write:{mask:0},test:{compare:514,op:{fail:7680,zFail:7680,zPass:7681},mask:255}}});for(const a of t.tiles)this._renderItem(e,a)}_renderItem(e,t){const r=this._getTileData(t);if(null!=r.source&&0!==r.source.validPixelCount){if(e.timeline.begin("Vector field"),r.updateVectorFieldMesh(e),"scalar"===e.renderPass){const a=r.meshes.scalar;a&&this._drawScalars(e,t,a)}else{const a=r.meshes.magdir;a&&this._drawTriangles(e,t,a)}e.timeline.end("Vector field")}}_drawTriangles(e,t,r){const a=this._getTileData(t),{context:s,painter:i,requestRender:o,allowDelayedRender:n}=e,{symbolizerParameters:c}=a,d=!!c.dataRange,u="geographic"===c.rotationType;if(n&&null!=o)return void o();const{coordScale:g,opacity:p}=a,{style:_,dataRange:y,symbolPercentRange:b,rotation:w}=c,S=this._getTransformUniforms(e,t),R=m[_].concat(Array(l-m[_].length).fill(0)),T={shader:this.shaders.magDir,uniforms:{...S,config:{coordScale:g,opacity:p,colors:R,dataRange:y||f,rotation:w,symbolPercentRange:b,symbolSize:this._getSymbolSize(e,t)}},textures:{},defines:{tiled:h(t),rotationGeographic:u,dataRange:d},optionalAttributes:null,useComputeBuffer:!1};i.submitDrawMeshUntyped(s,T,r,{stencilRef:a.stencilRef})}_drawScalars(e,t,r){const a=this._getTileData(t),{context:s,painter:i,requestRender:o,allowDelayedRender:n}=e,{symbolizerParameters:l}=a,c="wind_speed"===l.style,d=!!l.dataRange;if(n&&null!=o)return void o();const{coordScale:m,opacity:u}=a,{dataRange:g,symbolPercentRange:p}=l,_=this._getTransformUniforms(e,t),y={shader:this.shaders.scalar,uniforms:{..._,config:{coordScale:m,opacity:u,dataRange:g||f,symbolPercentRange:p,symbolSize:this._getSymbolSize(e,t)}},textures:{},defines:{tiled:h(t),innerCircle:c,dataRange:d},optionalAttributes:null,useComputeBuffer:!1};i.submitDrawMeshUntyped(s,y,r,{stencilRef:a.stencilRef})}_getSymbolSize(e,t){const r=this._getTileData(t),a=h(t)?2**(e.displayLevel-t.key.level):r.resolution/e.state.resolution,{symbolTileSize:s}=r.symbolizerParameters;return[s/(Math.round((r.width-r.offset[0])/s)*s)/a,s/(Math.round((r.height-r.offset[1])/s)*s)/a]}_getTransformUniforms(e,t){const o=i(e);return h(t)?{view:o,tileContainer:s(e),tile:a(e.tilingScheme,t),rasterVF:r(t),localTransform:null}:{view:o,tileContainer:null,tile:null,rasterVF:null,localTransform:{localToScreenMat3:t.transforms.localToScreenMat3}}}_getTileData(e){return h(e)?e.tileData:e}}function h(t){return t instanceof e}export{u as VectorFieldTechnique};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as t}from"tslib";import{maxHighlightReasons as e}from"../../../definitions.js";import{location as i,define as o,option as r,uniform as s,texture as l,VertexInput as a,ComputeVertexInput as
|
|
2
|
+
import{__decorate as t}from"tslib";import{maxHighlightReasons as e}from"../../../definitions.js";import{location as i,define as o,option as r,uniform as s,texture as l,VertexInput as a,ComputeVertexInput as n,GraphShaderModule as h,FragmentOutput as g,FragmentInput as u}from"../../GraphShaderModule.js";import{Vec3 as p,Float as d,Vec2 as m,float as c,step as y,Vec4 as w,equal as b,ifElse as x,or as f}from"../../graph/glsl.js";import{trueHit as v,candidateHit as C,noHit as V}from"./constants.js";import{EntityStorage as H,EntityStorageTextures as T}from"./EntityStorage.js";import{ShaderHighlight as D}from"./ShaderHighlight.js";import{ShaderHittest as j}from"./ShaderHittest.js";import{Tile as A}from"./Tile.js";import{TileInfo as _}from"./TileInfo.js";import{getFilterBit as R,getHighlightBit as S,getBit as F,uvToClip as P}from"./utils.js";import{ViewInfo as k}from"./ViewInfo.js";class O extends a{}t([i(0,p)],O.prototype,"id",void 0),t([i(1,d)],O.prototype,"bitset",void 0),t([i(2,m)],O.prototype,"pos",void 0);class z extends n{}t([i(14,m)],z.prototype,"nextPos1",void 0),t([i(15,m)],z.prototype,"nextPos2",void 0);class q extends u{}class B extends h{clip(t,e){let i=new d(0);const o=this.getFilterFlags(t);if(i=i.add(c(2).multiply(c(1).subtract(R(o,0)))),this.inside?i=i.add(c(2).multiply(c(1).subtract(R(o,1)))):this.outside?i=i.add(c(2).multiply(R(o,1))):this.highlight&&(i=i.add(c(2).multiply(c(1).subtract(this._checkHighlight(o))))),null!=e){const t=new d(1).subtract(y(e.x,this.tileContainer.currentZoom)),o=y(e.y,this.tileContainer.currentZoom);i=i.add(new d(2).multiply(t.add(o)))}return i}getFragmentOutput(t,e,i=new d(1/255)){const o=new g;return o.fragColor=this._maybeWriteHittest(e)??this._maybeHighlight(t,i)??t,o}_maybeHighlight(t,e){return this.highlight?new w(t.rgb,y(e,t.a)):null}_checkHighlight(t){let i=this._checkHighlightBit(t,0);for(let o=1;o<e;o++)i=i.add(this._checkHighlightBit(t,o));return y(new d(.1),i.add(this.highlight.highlightAll))}_checkHighlightBit(t,e){return S(t,e).multiply(F(this.highlight.activeReasons,e))}computeHittestTriangle(t,e,i){const o=this.tile.getViewScreenMat3(this.view,this.tileContainer),{nextPos1:r,nextPos2:s}=e;return{pos0:o.multiply(new p(t.pos,1)).xy,pos1:o.multiply(new p(r,1)).xy,pos2:o.multiply(new p(s,1)).xy}}maybeRunHittest(t,e,i){if(null==this.hittestRequest)return null;const o=this.hittest(t,e,i),r=b(o,new d(v)),s=b(o,new d(C)),l=x(s,()=>new w(new d(1/255),0,0,0),x(r,()=>new w(new d(2/255),0,0,0),new w(V)));let a=x(f(r,s),new d(0),new d(2));const n=this.getAttributeDataCoords(t.id),h=P(n);return a=a.add(this.clip(t.id,t.zoomRange)),{glPointSize:new d(1),glPosition:new w(h,a,1),color:l}}_maybeWriteHittest(t){return null!=this.hittestRequest?t.color:null}getAttributeDataCoords(t){return this.storage.getAttributeDataCoords(t)}getVVData(t){return this.storageTextures.getVVData(this.getAttributeDataCoords(t))}getFilterFlags(t){return this.storageTextures.getFilterFlags(this.getAttributeDataCoords(t))}getLocalTimeOrigin(t){return this.storageTextures.getLocalTimeOrigin(this.getAttributeDataCoords(t))}getSizeValue(t){return this.storageTextures.getSizeValue(this.getAttributeDataCoords(t))}getColorValue(t){return this.storageTextures.getColorValue(this.getAttributeDataCoords(t))}getOpacityValue(t){return this.storageTextures.getOpacityValue(this.getAttributeDataCoords(t))}getRotationValue(t){return this.storageTextures.getRotationValue(this.getAttributeDataCoords(t))}}t([o],B.prototype,"inside",void 0),t([o],B.prototype,"outside",void 0),t([r(D)],B.prototype,"highlight",void 0),t([s(H)],B.prototype,"storage",void 0),t([l(T)],B.prototype,"storageTextures",void 0),t([s(k)],B.prototype,"view",void 0),t([s(_)],B.prototype,"tileContainer",void 0),t([s(A)],B.prototype,"tile",void 0),t([r(j)],B.prototype,"hittestRequest",void 0);export{B as AFeatureShader,z as BaseHittestVertexInput,q as FeatureFragmentInput,O as FeatureVertexInput};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as t,__param as o}from"tslib";import{GraphShaderModule as i,FragmentOutput as e,location as r,uniform as p,option as l,texture as s,define as
|
|
2
|
+
import{__decorate as t,__param as o}from"tslib";import{GraphShaderModule as i,FragmentOutput as e,location as r,uniform as p,option as l,texture as s,define as n,input as c,VertexInput as a,UniformGroup as d,FragmentInput as m}from"../../GraphShaderModule.js";import{Vec3 as y,Vec4 as f,texture2D as h,Vec2 as u,Float as v,Mat3 as x,Sampler2D as g}from"../../graph/glsl.js";import{sampleBicubicBSpline as w}from"./bitmapUtils.js";import{Tile as S}from"./Tile.js";import{TileInfo as b}from"./TileInfo.js";import{ViewInfo as j}from"./ViewInfo.js";class T extends a{}t([r(0,u)],T.prototype,"position",void 0);class M extends m{}class C extends d{}t([p(u)],C.prototype,"coordScale",void 0),t([p(v)],C.prototype,"opacity",void 0);class V extends d{}t([p(x)],V.prototype,"localToScreenMat3",void 0);class I extends i{constructor(){super(...arguments),this.type="BitmapShader",this.tiled=!1}vertex(t){const o=new y(t.position.multiply(this.config.coordScale),1),i=this.tiled?this.tile.getDisplayViewScreenMat3(this.view,this.tileContainer).multiply(o):this.view.displayViewMat3.multiply(this.localTransform.localToScreenMat3.multiply(o));return{glPosition:new f(i,1),texcoord:t.position}}fragment(t){const o=new e;let i;return i=this.bicubic?w(this.texture,t.texcoord,this.config.coordScale):h(this.texture,t.texcoord),o.fragColor=new f(i.rgb.multiply(this.config.opacity),i.a.multiply(this.config.opacity)),o}}t([p(j)],I.prototype,"view",void 0),t([l(b)],I.prototype,"tileContainer",void 0),t([l(S)],I.prototype,"tile",void 0),t([l(V)],I.prototype,"localTransform",void 0),t([p(C)],I.prototype,"config",void 0),t([s(g)],I.prototype,"texture",void 0),t([n],I.prototype,"bicubic",void 0),t([n],I.prototype,"tiled",void 0),t([o(0,c(T))],I.prototype,"vertex",null),t([o(0,c(M))],I.prototype,"fragment",null);export{I as BitmapShader};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as t,__param as l}from"tslib";import{location as e,uniform as r,define as n,texture as i,input as a,VertexInput as o,UniformGroup as u,GraphShaderModule as p,FragmentOutput as c,FragmentInput as s}from"../../GraphShaderModule.js";import{
|
|
2
|
+
import{__decorate as t,__param as l}from"tslib";import{location as e,uniform as r,define as n,texture as i,input as a,VertexInput as o,UniformGroup as u,GraphShaderModule as p,FragmentOutput as c,FragmentInput as s}from"../../GraphShaderModule.js";import{Vec4 as d,texture2D as y,ifElse as m,equal as w,Float as b,clamp as g,Vec3 as f,abs as k,max as C,min as v,greaterThan as h,step as x,cond as T,lessThanEqual as j,dot as F,lessThan as M,Vec2 as O,Sampler2D as S,sqrt as B}from"../../graph/glsl.js";import{uvToClip as G,oneMinus as P,minusScalar as q,minusOne as z}from"./utils.js";class A extends o{}t([e(0,O)],A.prototype,"position",void 0);class D extends s{}class E extends u{}t([r(b)],E.prototype,"opacity",void 0),t([r(b)],E.prototype,"inFadeOpacity",void 0);class H extends p{constructor(){super(...arguments),this.type="BlendShader"}vertex(t){return{uv:t.position,glPosition:new d(G(t.position),0,1)}}fragment(t){const l=new c,e=y(this.layerTexture,t.uv),r=y(this.backbufferTexture,t.uv),n=m(w(e.a,new b(0)),e.rgb,e.rgb.divide(e.a)),i=m(w(r.a,new b(0)),r.rgb,r.rgb.divide(r.a)),a=this.config.opacity.multiply(e.a),o=r.a;switch(this.blendMode){case"destination-over":l.fragColor=new d(n.multiply(a).multiply(P(o)).add(i.multiply(o)),a.add(o).subtract(a.multiply(o)));break;case"source-in":{const t=new d(n.multiply(a).multiply(o),a.multiply(o)),e=new d(i.multiply(o),o).multiply(P(this.config.opacity)).multiply(this.config.inFadeOpacity);l.fragColor=t.add(e)}break;case"destination-in":{const t=new d(i.multiply(o).multiply(a),o.multiply(a)),e=new d(i.multiply(o),o).multiply(new d(P(this.config.opacity).multiply(this.config.inFadeOpacity)));l.fragColor=t.add(e)}break;case"source-out":l.fragColor=new d(n.multiply(a).multiply(P(o)),a.multiply(P(o)));break;case"destination-out":l.fragColor=new d(i.multiply(o).multiply(P(a)),o.multiply(P(a)));break;case"source-atop":l.fragColor=new d(n.multiply(a).multiply(o).add(i.multiply(o.multiply(P(a)))),o);break;case"destination-atop":l.fragColor=new d(n.multiply(a.multiply(P(o))).add(i.multiply(o).multiply(a)),a);break;case"xor":l.fragColor=new d(n.multiply(a.multiply(P(o))).add(i.multiply(o.multiply(P(a)))),a.multiply(P(o)).add(o.multiply(P(a))));break;case"multiply":l.fragColor=new d(n.multiply(a).multiply(i.multiply(o)).add(n.multiply(a).multiply(P(o))).add(i.multiply(o).multiply(P(a))),a.add(o.multiply(P(a))));break;case"screen":l.fragColor=new d(n.add(i).subtract(n.multiply(i)).multiply(a.multiply(o)).add(n.multiply(a).multiply(P(o))).add(i.multiply(o).multiply(P(a))),a.add(o.multiply(P(a))));break;case"overlay":{const t=new f(J(i.r,n.r),J(i.g,n.g),J(i.b,n.b));l.fragColor=I(t,n,i,a,o)}break;case"darken":{const t=v(n,i);l.fragColor=I(t,n,i,a,o)}break;case"lighter":l.fragColor=new d(n.multiply(a).add(i.multiply(o)),a.add(o));break;case"lighten":{const t=C(n,i);l.fragColor=I(t,n,i,a,o)}break;case"color-dodge":{const t=g(new f(K(i.r,n.r),K(i.g,n.g),K(i.b,n.b)),new f(0),new f(1));l.fragColor=I(t,n,i,a,o)}break;case"color-burn":{const t=new f(L(i.r,n.r),L(i.g,n.g),L(i.b,n.b));l.fragColor=I(t,n,i,a,o)}break;case"hard-light":{const t=new f(N(i.r,n.r),N(i.g,n.g),N(i.b,n.b));l.fragColor=I(t,n,i,a,o)}break;case"soft-light":{const t=new f(Q(i.r,n.r),Q(i.g,n.g),Q(i.b,n.b));l.fragColor=I(t,n,i,a,o)}break;case"difference":{const t=k(i.subtract(n));l.fragColor=I(t,n,i,a,o)}break;case"exclusion":{const t=n.add(i).subtract(new b(2).multiply(n).multiply(i));l.fragColor=I(t,n,i,a,o)}break;case"invert":l.fragColor=new d(new f(1).subtract(i).multiply(a).multiply(o).add(i.multiply(o).multiply(P(a))),o);break;case"vivid-light":{const t=new f(g(R(i.r,n.r),new b(0),new b(1)),g(R(i.g,n.g),new b(0),new b(1)),g(R(i.b,n.b),new b(0),new b(1)));l.fragColor=I(t,n,i,a,o)}break;case"hue":{const t=$(n,i,i);l.fragColor=I(t,n,i,a,o)}break;case"saturation":{const t=$(i,n,i);l.fragColor=I(t,n,i,a,o)}break;case"color":{const t=Z(n,i);l.fragColor=I(t,n,i,a,o)}break;case"luminosity":{const t=Z(i,n);l.fragColor=I(t,n,i,a,o)}break;case"plus":l.fragColor=g(new d(e.r.add(i.r),e.g.add(i.g),e.b.add(i.b),a.add(o)),new d(0),new d(1));break;case"minus":l.fragColor=new d(g(new f(i.r.subtract(e.r),i.g.subtract(e.g),i.b.subtract(e.b)),new f(0),new f(1)),o.multiply(a));break;case"average":{const t=i.add(n).divide(2);l.fragColor=I(t,n,i,a,o)}break;case"reflect":{const t=g(new f(_(i.r,n.r),_(i.g,n.g),_(i.b,n.b)),new f(0),new f(1));l.fragColor=I(t,n,i,a,o)}break;default:l.fragColor=e.multiply(this.config.opacity)}return l}}function I(t,l,e,r,n){return new d(t.multiply(r).multiply(n).add(l.multiply(r).multiply(P(n))).add(e.multiply(n).multiply(P(r))),r.add(n.multiply(P(r))))}function J(t,l){return new b(1).subtract(x(new b(.5),l)).multiply(P(new b(2).multiply(P(l).multiply(P(t))))).add(x(new b(.5),l).multiply(new b(2).multiply(l).multiply(t)))}function K(t,l){return m(w(t,new b(0)),new b(0),m(w(l,new b(1)),new b(1),v(new b(1),t.divide(new b(1).subtract(l)))))}function L(t,l){return m(w(t,new b(1)),new b(1),m(w(l,new b(0)),new b(0),P(v(new b(1),P(t).divide(l)))))}function N(t,l){return new b(1).subtract(x(new b(.5),l)).multiply(new b(2).multiply(l).multiply(t)).add(x(new b(.5),l).multiply(P(new b(2).multiply(P(l).multiply(P(t))))))}function Q(t,l){return T([j(l,new b(.5)),()=>{const e=new b(2).multiply(l),r=P(e),n=P(t);return t.subtract(r.multiply(t).multiply(n))}],[j(t,new b(.25)),()=>{const e=new b(2).multiply(l),r=z(e).multiply(t),n=new b(16).multiply(t).subtract(new b(12)).multiply(t).add(new b(3));return t.add(r.multiply(n))}],[!0,()=>{const e=new b(2).multiply(l),r=z(e),n=B(t).subtract(t);return t.add(r.multiply(n))}])}function R(t,l){const e=P(x(new b(.5),l)).multiply(L(t,new b(2).multiply(l))),r=x(new b(.5),l).multiply(K(t,new b(2).multiply(q(l,.5))));return e.add(r)}function U(t){return v(v(t.r,t.g),t.b)}function V(t){return C(C(t.r,t.g),t.b)}function W(t){return F(t,new f(.3,.59,.11))}function X(t){return V(t).subtract(U(t))}function Y(t){const l=W(t),e=U(t),r=V(t);return T([M(e,new b(0)),()=>{const r=t.subtract(l).multiply(l),n=l.subtract(e);return l.add(r.divide(n))}],[h(r,new b(1)),()=>{const e=t.subtract(l),n=P(l),i=e.multiply(n),a=r.subtract(l);return l.add(i.divide(a))}],[!0,t])}function Z(t,l){const e=W(t),r=W(l).subtract(e);return Y(t.add(new f(r)))}function $(t,l,e){const r=U(t),n=X(t),i=X(l);return Z(m(h(n,new b(0)),()=>t.subtract(r).multiply(i).divide(n),new f(0)),e)}function _(t,l){return m(w(l,new b(1)),l,()=>{const e=P(l),r=t.multiply(t).divide(e);return v(r,new b(1))})}t([n],H.prototype,"blendMode",void 0),t([r(E)],H.prototype,"config",void 0),t([i(S)],H.prototype,"layerTexture",void 0),t([i(S)],H.prototype,"backbufferTexture",void 0),t([l(0,a(A))],H.prototype,"vertex",null),t([l(0,a(D))],H.prototype,"fragment",null);export{H as BlendShader};
|
|
@@ -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{location as o,uniform as i,texture as r,input as l}from"../../GraphShaderModule.js";import{Vec4 as s,Float as p,Vec2 as
|
|
2
|
+
import{__decorate as t,__param as e}from"tslib";import{location as o,uniform as i,texture as r,input as l}from"../../GraphShaderModule.js";import{Vec4 as s,Float as p,Vec2 as n,Sampler2D as a,sin as d,cos as m,Vec3 as u,ifElse as f,mod as y,mix as c,texture2D as v,greaterThan as x,equal as h,float as g,mat3 as b,negate as w,vec2 as j}from"../../graph/glsl.js";import{BaseHittestVertexInput as O,FeatureFragmentInput as T}from"./AFeatureShader.js";import{c256ToRad as C,bitsetGenericConsiderAlphaOnly as F,bitsetFillRandomPatternOffset as A}from"./constants.js";import{FillVertexInput as S,FillShader as I}from"./FillShader.js";import{LocalTileOffset as z}from"./LocalTileOffset.js";import{MosaicInfo as M}from"./MosaicInfo.js";import{getBit as V,isNan as q,rgba2float as G,rand as L}from"./utils.js";class P extends S{}t([o(5,s)],P.prototype,"tlbr",void 0),t([o(6,p)],P.prototype,"width",void 0),t([o(7,p)],P.prototype,"height",void 0),t([o(8,n)],P.prototype,"offset",void 0),t([o(9,n)],P.prototype,"scale",void 0),t([o(10,p)],P.prototype,"angle",void 0);class R extends T{}function Z(t,e,o,i,r){const l=h(V(r,A),g(1)),p=G(new s(t,0));return f(l,b(i.divide(e.x),o.divide(e.y),0,w(o.divide(e.x)),i.divide(e.y),0,L(j(p,0)),L(j(0,p)),1),b(i.divide(e.x),o.divide(e.y),0,w(o.divide(e.x)),i.divide(e.y),0,0,0,1))}function k(t,e){const o=t.tile.getRequiredZoomFactor(t.tileContainer),i=new n(e.width,e.height),r=i.multiply(e.scale).multiply(o),l=e.angle.multiply(C),s=d(l),a=m(l),y=Z(e.id,r,s,a,e.bitset),c=t.localTileOffset.getPatternOffsetAtTileOrigin(i,s,a),v=o.multiply(e.scale).multiply(e.offset.subtract(c)).divide(r),x=new u(e.pos,1),h=y.multiply(x).xy.subtract(v),g=e.tlbr.divide(t.mosaicInfo.size.xyxy);let b=V(e.bitset,F);return null!=t.visualVariableColor&&(b=f(q(t.getColorValue(e.id)),new p(0),b)),{tileTextureCoord:h,tlbr:g,sampleAlphaOnly:b}}function B(t,e){const o=y(e.tileTextureCoord,new p(1)),i=c(e.tlbr.xy,e.tlbr.zw,o);let r=v(t.mosaicTexture,i);return r=f(x(e.sampleAlphaOnly,new p(.5)),r.aaaa,r),e.color.multiply(r)}class D extends I{constructor(){super(...arguments),this.type="ComplexFillShader"}vertex(t,e){return{...super.vertex(t,e),...k(this,t)}}fragment(t){const e=B(this,t);return this.getFragmentOutput(e,t,new p(0))}}t([i(M)],D.prototype,"mosaicInfo",void 0),t([r(a)],D.prototype,"mosaicTexture",void 0),t([i(z)],D.prototype,"localTileOffset",void 0),t([e(0,l(P)),e(1,l(O))],D.prototype,"vertex",null),t([e(0,l(R))],D.prototype,"fragment",null);export{R as ComplexFillFragmentInput,D as ComplexFillShader,P as ComplexFillVertexInput,B as getComplexFillFragmentColor,k as getComplexFillVertexData,Z as getPatternMatrix};
|