@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{__decorate as t,__param as e}from"tslib";import{location as o,option as
|
|
2
|
+
import{__decorate as t,__param as e}from"tslib";import{location as o,option as i,input as s}from"../../GraphShaderModule.js";import{Vec4 as r,Vec2 as l,Vec3 as p,Float as n,ifElse as a,greaterThan as m}from"../../graph/glsl.js";import{BaseHittestVertexInput as u,FeatureFragmentInput as h,FeatureVertexInput as c,AFeatureShader as y}from"./AFeatureShader.js";import{noHit as d,trueHit as f}from"./constants.js";import{isRectHittest as g,hittestFill as v,hittestScreenRect as x}from"./hittestUtils.js";import{VisualVariableColor as b}from"./VisualVariableColor.js";import{VisualVariableOpacity as j}from"./VisualVariableOpacity.js";import{getVisualVariableOpacity as w,getVisualVariableColor as V}from"./vvUtils.js";class R extends c{}t([o(3,r)],R.prototype,"color",void 0),t([o(4,l)],R.prototype,"zoomRange",void 0);class S extends y{constructor(){super(...arguments),this.type="FillShader",this.computeAttributes={pos:["nextPos1","nextPos2"]}}vertex(t,e){const o=w(this,t.id),i=V(this,t.id,t.color).multiply(o),s=this.tile.getDisplayViewScreenMat3(this.view,this.tileContainer).multiply(new p(t.pos.xy,1)),l=this.clip(t.id,t.zoomRange);return{glPosition:new r(s.xy,l,1),color:i,...this.maybeRunHittest(t,e,null)}}fragment(t){return this.getFragmentOutput(t.color,t,new n(0))}hittest(t,e){const{pos0:o,pos1:i,pos2:s}=this.computeHittestTriangle(t,e,null),r=g(this.hittestRequest);return a(r,()=>{const{tlbr:t}=this.hittestRequest;return x(o,i,s,t)},()=>{const o=v(this,t,e);return a(m(o,this.hittestRequest.distance),new n(d),new n(f))})}}t([i(b)],S.prototype,"visualVariableColor",void 0),t([i(j)],S.prototype,"visualVariableOpacity",void 0),t([e(0,s(R)),e(1,s(u))],S.prototype,"vertex",null),t([e(0,s(h))],S.prototype,"fragment",null);export{S as FillShader,R as FillVertexInput};
|
|
@@ -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,uniform as r,texture as o,input as s}from"../../GraphShaderModule.js";import{Vec4 as a,Vec2 as n,Float as d,Sampler2D as l,ifElse as p,greaterThan as m,cond as c,equal as u,sqrt as v,dot as h,abs as x,max as
|
|
2
|
+
import{__decorate as t,__param as e}from"tslib";import{location as i,uniform as r,texture as o,input as s}from"../../GraphShaderModule.js";import{Vec4 as a,Vec2 as n,Float as d,Sampler2D as l,ifElse as p,greaterThan as m,cond as c,equal as u,sqrt as v,dot as h,abs as x,max as g,clamp as f,mix as y,texture2D as w}from"../../graph/glsl.js";import{bitset as b,gradientFillMethods as S}from"../fill/gradientFillConstants.js";import{BaseHittestVertexInput as j,FeatureFragmentInput as z}from"./AFeatureShader.js";import{FillVertexInput as F,FillShader as M}from"./FillShader.js";import{MosaicInfo as D}from"./MosaicInfo.js";import{getBitBool as G,getBit as P,oneMinus as I}from"./utils.js";class A extends F{}t([i(5,a)],A.prototype,"tlbr",void 0),t([i(6,n)],A.prototype,"relativePosition",void 0),t([i(7,d)],A.prototype,"gradientMethod",void 0),t([i(8,n)],A.prototype,"relativeGradientSize",void 0);class C extends z{}class T extends M{constructor(){super(...arguments),this.type="GradientFillShader"}vertex(t,e){const{tlbr:i,relativePosition:r,gradientMethod:o,relativeGradientSize:s}=t,a=p(G(t.bitset,b.isAbsolute),this.tile.getDisplayZoomFactor(this.tileContainer),new d(1));return{...super.vertex(t,e),tlbr:i,relativePosition:r,gradientMethod:o,gradientSize:s.multiply(a),isDiscrete:P(t.bitset,b.isDiscrete)}}fragment(t){const{tlbr:e,relativePosition:i,gradientMethod:r,gradientSize:o,isDiscrete:s}=t,a=p(m(s,new d(.5)),o.subtract(1),new n(0)),l=c([u(r,new d(S.rectangular)),()=>{const t=x(i).add(a).divide(o);return I(g(t.x,t.y))}],[u(r,new d(S.circular)),I(v(h(i,i)).add(a.x).divide(o.x))],[!0,I(i.x.add(a.x).divide(o.x))]),b=new n(f(l,new d(0),new d(1)),.5),j=y(e.xy,e.zw,b).divide(this.mosaicInfo.size),z=w(this.mosaicTexture,j),F=t.color.a;return this.getFragmentOutput(z.multiply(F),t,new d(0))}}t([r(D)],T.prototype,"mosaicInfo",void 0),t([o(l)],T.prototype,"mosaicTexture",void 0),t([e(0,s(A)),e(1,s(j))],T.prototype,"vertex",null),t([e(0,s(C))],T.prototype,"fragment",null);export{C as GradientFillFragmentInput,T as GradientFillShader,A as GradientFillVertexInput};
|
|
@@ -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 has from"../../../../../../../core/has.js";import{location as i,uniform as o,texture as
|
|
2
|
+
import{__decorate as t,__param as e}from"tslib";import has from"../../../../../../../core/has.js";import{location as i,uniform as o,texture as r,input as s,UniformGroup as n}from"../../GraphShaderModule.js";import{Float as a,Vec2 as l,Vec4 as d,Sampler2D as p,ifElse as m,greaterThan as c,dot as u,min as h,length as y,mix as g,clamp as v,texture2D as w,step as f}from"../../graph/glsl.js";import{bitset as b}from"../line/gradientStrokeConstants.js";import{BaseHittestVertexInput as x}from"./AFeatureShader.js";import{LineVertexInput as S,LineShader as D,getLineVertexData as L,getLineAntialiasing as j,LineFragmentInput as A}from"./LineShader.js";import{MosaicInfo as z}from"./MosaicInfo.js";import{getBit as C,getBitBool as F,oneMinus as G}from"./utils.js";function P(t){return f(new a(0),t).multiply(2).subtract(1)}class I extends S{}t([i(9,a)],I.prototype,"accumulatedDistance",void 0),t([i(10,a)],I.prototype,"totalLength",void 0),t([i(11,a)],I.prototype,"gradientSize",void 0),t([i(12,l)],I.prototype,"segmentDirection",void 0),t([i(13,d)],I.prototype,"tlbr",void 0);class k extends A{}class q extends n{}t([o(a)],q.prototype,"isColorPass",void 0);class M extends D{constructor(){super(...arguments),this.type="GradientStrokeShader"}vertex(t,e){const{totalLength:i,gradientSize:o,segmentDirection:r,tlbr:s}=t,n=L(this,t),l=C(t.bitset,b.isAlongLine),d=i.divide(this.tile.getDisplayZoomFactor(this.tileContainer)),p=m(F(t.bitset,b.isAbsoluteSize),()=>{const t=m(c(l,new a(.5)),d,n.halfWidth);return o.divide(t)},o),h=t.accumulatedDistance.add(u(r,n.scaledOffset).divide(d)),y=s.divide(this.mosaicInfo.size.xyxy);return{...n,tlbr:y,relativePositionAlongLine:h,relativeGradientSize:p,isAlongLine:C(t.bitset,b.isAlongLine),isDiscrete:C(t.bitset,b.isDiscrete),...this.maybeRunHittest(t,e,n.halfWidth)}}fragment(t){const{isAlongLine:e,isDiscrete:i,relativePositionAlongLine:o,relativeGradientSize:r,normal:s,tlbr:n}=t,d=j(t,this.view.antialiasing),p=P(s.y).multiply(h(y(s),new a(1))),u=new a(.5).multiply(p).add(new a(.5)),b=m(c(e,new a(.5)),o,u),x=m(c(i,new a(.5)),r.subtract(1),new a(0));let S=b.add(x).divide(r);S=m(c(e,new a(.5)),S,G(S));const D=g(n.xy,n.zw,new l(v(S,new a(0),new a(1)),.5)),L=w(this.mosaicTexture,D),A=t.opacity.multiply(d),z=this.getFragmentOutput(L.multiply(A),t),C=f(new a(.5),this.technique.isColorPass).multiply(has("gradient-depth-epsilon")),F=f(new a(0),s.y).multiply(new a(has("gradient-depth-bias")).subtract(C));return z.glFragDepth=v(y(s).add(F),new a(0),new a(1)),z}}t([o(z)],M.prototype,"mosaicInfo",void 0),t([r(p)],M.prototype,"mosaicTexture",void 0),t([o(q)],M.prototype,"technique",void 0),t([e(0,s(I)),e(1,s(x))],M.prototype,"vertex",null);export{k as GradientStrokeFragmentInput,M as GradientStrokeShader,I as GradientStrokeVertexInput};
|
|
@@ -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,uniform as s,define as o,input as l,UniformGroup as r}from"../../GraphShaderModule.js";import{Vec2 as n,Float as
|
|
2
|
+
import{__decorate as t,__param as e}from"tslib";import{location as i,uniform as s,define as o,input as l,UniformGroup as r}from"../../GraphShaderModule.js";import{Vec2 as n,Float as a,Vec3 as p,Vec4 as u,length as m,step as d,ifElse as h,greaterThan as c}from"../../graph/glsl.js";import{FeatureVertexInput as y,AFeatureShader as f,FeatureFragmentInput as w}from"./AFeatureShader.js";import{trueHit as v,noHit as g}from"./constants.js";import{getHeatmapCompressionFactor as x}from"./heatmapUtils.js";import{hittestMarker as F}from"./hittestUtils.js";class V extends y{}t([i(5,n)],V.prototype,"offset",void 0);class j extends w{}class C extends r{}t([s(a)],C.prototype,"radius",void 0),t([s(a)],C.prototype,"isFieldActive",void 0);class H extends f{constructor(){super(...arguments),this.type="HeatmapAccumulateShader",this.usesHalfFloatPrecision=!1}vertex(t){const{radius:e,isFieldActive:i}=this.kernelControls,s=t.offset,o=i.multiply(this.getVVData(t.id).x).add(new a(1).subtract(i)),l=this.tile.getDisplayViewScreenMat3(this.view,this.tileContainer).multiply(new p(t.pos,1)).add(this.view.displayViewMat3.multiply(new p(s,0)).multiply(e)),r=this.clip(t.id);return{glPosition:new u(l.xy,r,1),offset:s,fieldValue:o,color:new u(0),...this.maybeRunHittest(t,{},null)}}fragment(t){const{offset:e,fieldValue:i}=t,s=m(e),o=d(s,new a(1)),l=new a(1).subtract(s.multiply(s)),r=l.multiply(l),n=o.multiply(r).multiply(i).multiply(new a(x(this.usesHalfFloatPrecision)));return this.getFragmentOutput(new u(n),t)}hittest(t){const e=this.tile.getViewScreenMat3(this.view,this.tileContainer).multiply(new p(t.pos,1)),i=F(e.xy,this.kernelControls.radius,this.hittestRequest.position);return h(c(i,this.hittestRequest.distance),new a(g),new a(v))}}t([o],H.prototype,"usesHalfFloatPrecision",void 0),t([s(C)],H.prototype,"kernelControls",void 0),t([e(0,l(V))],H.prototype,"vertex",null),t([e(0,l(j))],H.prototype,"fragment",null);export{j as HeatmapAccumulateFragmentInput,H as HeatmapAccumulateShader,V as HeatmapAccumulateVertexInput};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as t,__param as i}from"tslib";import{location as e,option as o,input as l}from"../../GraphShaderModule.js";import{Vec4 as r,Vec2 as a,Float as s,step as n,min as p,ifElse as u,greaterThan as m,max as d,Vec3 as c,length as y,clamp as f}from"../../graph/glsl.js";import{BaseHittestVertexInput as h,FeatureVertexInput as w,AFeatureShader as v,FeatureFragmentInput as V}from"./AFeatureShader.js";import{noHit as b,trueHit as S,epsilon as g,thinLineWidthFactor as j,thinLineHalfWidth as x}from"./constants.js";import{isRectHittest as z,distPointSegment as W,hittestScreenRect as M}from"./hittestUtils.js";import{VisualVariableColor as R}from"./VisualVariableColor.js";import{VisualVariableOpacity as H}from"./VisualVariableOpacity.js";import{VisualVariableSizeMinMaxValue as
|
|
2
|
+
import{__decorate as t,__param as i}from"tslib";import{location as e,option as o,input as l}from"../../GraphShaderModule.js";import{Vec4 as r,Vec2 as a,Float as s,step as n,min as p,ifElse as u,greaterThan as m,max as d,Vec3 as c,length as y,clamp as f}from"../../graph/glsl.js";import{BaseHittestVertexInput as h,FeatureVertexInput as w,AFeatureShader as v,FeatureFragmentInput as V}from"./AFeatureShader.js";import{noHit as b,trueHit as S,epsilon as g,thinLineWidthFactor as j,thinLineHalfWidth as x}from"./constants.js";import{isRectHittest as z,distPointSegment as W,hittestScreenRect as M}from"./hittestUtils.js";import{VisualVariableColor as R}from"./VisualVariableColor.js";import{VisualVariableOpacity as H}from"./VisualVariableOpacity.js";import{VisualVariableSizeMinMaxValue as C}from"./VisualVariableSizeMinMaxValue.js";import{VisualVariableSizeScaleStops as O}from"./VisualVariableSizeScaleStops.js";import{VisualVariableSizeStops as U}from"./VisualVariableSizeStops.js";import{VisualVariableSizeUnitValue as q}from"./VisualVariableSizeUnitValue.js";import{getVisualVariableColor as F,getVisualVariableOpacity as P,hasVisualVariableSize as A,getVisualVariableSize as D}from"./vvUtils.js";class T extends w{}t([e(3,r)],T.prototype,"color",void 0),t([e(4,a)],T.prototype,"offset",void 0),t([e(5,a)],T.prototype,"normal",void 0),t([e(6,s)],T.prototype,"halfWidth",void 0),t([e(7,s)],T.prototype,"referenceHalfWidth",void 0),t([e(8,a)],T.prototype,"zoomRange",void 0);class G extends V{}function L(t){return d(new s(j).multiply(n(t,new s(x))),new s(1))}function k(t,i){const{halfWidth:e,normal:o}=t,l=L(e),r=y(o).multiply(e);return f(l.multiply(e.subtract(r)).divide(i.add(l).subtract(new s(1))),new s(0),new s(1))}function B(t,i){const{id:e,halfWidth:o,referenceHalfWidth:l}=i;if(A(t)){const i=new s(2).multiply(l),r=D(t,e,i),a=new s(g),n=u(m(o,a),o.divide(d(l,a)),new s(1));return new s(.5).multiply(n).multiply(r)}return o}function E(t,i){const{id:e,offset:o,pos:l,normal:a,zoomRange:p}=i,{displayViewMat3:u}=t.view,m=t.tile.getDisplayViewScreenMat3(t.view,t.tileContainer),y=F(t,e,i.color),f=P(t,e),h=B(t,i),w=new s(.5).multiply(t.view.antialiasing),v=d(h.add(w),new s(.45)).add(new s(.1).multiply(w)),V=L(v).multiply(v).multiply(o).multiply(t.tileContainer.scaleFactor),b=u.multiply(new c(V,new s(0))),S=m.multiply(new c(l,new s(1))).add(b),g=new s(2).multiply(n(h,new s(0))).add(t.clip(e,p)),j=new r(S.xy,g,1);return{color:y,opacity:f,halfWidth:v,normal:a,scaledOffset:V,scaledHalfWidth:h,glPosition:new r(j.xy,g,1)}}function I(t,i){const{opacity:e,color:o}=t,l=k(t,i);return e.multiply(o).multiply(l)}class J extends v{constructor(){super(...arguments),this.type="LineShader",this.computeAttributes={pos:["nextPos1","nextPos2"]}}vertex(t,i){const e=E(this,t);return{...e,...this.maybeRunHittest(t,i,e.halfWidth)}}fragment(t){const i=I(t,this.view.antialiasing);return this.getFragmentOutput(i,t)}hittest(t,i,e){const{pos0:o,pos1:l,pos2:r}=this.computeHittestTriangle(t,i,null),a=z(this.hittestRequest),{distance:d,smallSymbolDistance:c,smallSymbolSizeThreshold:y,tlbr:f}=this.hittestRequest,h=n(e,y.multiply(.5)).multiply(d.subtract(c)),w=this.hittestRequest.position,v=p(W(w,o,l),W(w,o,r)).subtract(e).add(h);return u(a,M(o,l,r,f),u(m(v,d),new s(b),new s(S)))}}t([o(R)],J.prototype,"visualVariableColor",void 0),t([o(H)],J.prototype,"visualVariableOpacity",void 0),t([o(C)],J.prototype,"visualVariableSizeMinMaxValue",void 0),t([o(O)],J.prototype,"visualVariableSizeScaleStops",void 0),t([o(U)],J.prototype,"visualVariableSizeStops",void 0),t([o(q)],J.prototype,"visualVariableSizeUnitValue",void 0),t([i(0,l(T)),i(1,l(h))],J.prototype,"vertex",null),t([i(0,l(G))],J.prototype,"fragment",null);export{G as LineFragmentInput,J as LineShader,T as LineVertexInput,k as getLineAntialiasing,I as getLineFragmentColor,L as getLineThinFactor,E as getLineVertexData};
|
|
@@ -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
|
|
2
|
+
import{__decorate as t,__param as e}from"tslib";import{location as i,option as o,input as r}from"../../GraphShaderModule.js";import{Vec2 as s,Vec4 as a,Float as l,greaterThan as p,ifElse as n,or as u,Vec3 as m}from"../../graph/glsl.js";import{BaseHittestVertexInput as c,FeatureVertexInput as d,AFeatureShader as h}from"./AFeatureShader.js";import{noHit as f,trueHit as v,bitsetTypeFillOutline as y,bitsetOutlineUsesColorVV as V}from"./constants.js";import{isRectHittest as S,hittestFill as b,hittestScreenRect as j}from"./hittestUtils.js";import{getLineFragmentColor as w,LineFragmentInput as x,getLineVertexData as g}from"./LineShader.js";import{getBit as z,getBitBool as M}from"./utils.js";import{VisualVariableColor as O}from"./VisualVariableColor.js";import{VisualVariableOpacity as R}from"./VisualVariableOpacity.js";import{VisualVariableSizeMinMaxValue as P}from"./VisualVariableSizeMinMaxValue.js";import{VisualVariableSizeScaleStops as U}from"./VisualVariableSizeScaleStops.js";import{VisualVariableSizeStops as W}from"./VisualVariableSizeStops.js";import{VisualVariableSizeUnitValue as q}from"./VisualVariableSizeUnitValue.js";import{getVisualVariableOpacity as C,getVisualVariableColor as F}from"./vvUtils.js";class H extends d{}t([i(3,s)],H.prototype,"offset",void 0),t([i(4,a)],H.prototype,"color",void 0),t([i(5,s)],H.prototype,"normal",void 0),t([i(6,l)],H.prototype,"halfWidth",void 0),t([i(7,l)],H.prototype,"referenceHalfWidth",void 0),t([i(8,s)],H.prototype,"zoomRange",void 0);class A extends x{}function D(t,e,i){const{id:o,bitset:r}=e,s=z(r,y),u=p(s,new l(.5)),c=g(t,e),d=n(u,c.halfWidth,new l(0)),h=C(t,o),f=F(t,o,e.color),v=n(u,n(M(r,V),f,e.color),f.multiply(h)),S=t.tile.getDisplayViewScreenMat3(t.view,t.tileContainer).multiply(new m(e.pos.xy,1)),b=t.clip(e.id),j=new a(S.xy,b,1),w=n(u,c.glPosition,j),x=i&&t.maybeRunHittest(e,i,u);return{isOutline:s,color:v,opacity:new l(1),halfWidth:d,normal:c.normal,glPosition:w,...x}}class G extends h{constructor(){super(...arguments),this.computeAttributes={pos:["nextPos1","nextPos2"]}}}t([o(O)],G.prototype,"visualVariableColor",void 0),t([o(R)],G.prototype,"visualVariableOpacity",void 0),t([o(P)],G.prototype,"visualVariableSizeMinMaxValue",void 0),t([o(U)],G.prototype,"visualVariableSizeScaleStops",void 0),t([o(W)],G.prototype,"visualVariableSizeStops",void 0),t([o(q)],G.prototype,"visualVariableSizeUnitValue",void 0);class L extends G{constructor(){super(...arguments),this.type="OutlineFillShader"}vertex(t,e){return D(this,t,e)}fragment(t){const{color:e,isOutline:i}=t,o=p(i,new l(.5)),r=w(t,this.view.antialiasing),s=n(o,r,e),a=n(o,new l(1/255),new l(0));return this.getFragmentOutput(s,t,a)}hittest(t,e,i){const{pos0:o,pos1:r,pos2:s}=this.computeHittestTriangle(t,e,null),a=S(this.hittestRequest);return n(a,()=>{const{tlbr:t}=this.hittestRequest;return j(o,r,s,t)},()=>{const o=b(this,t,e);return n(u(i,p(o,this.hittestRequest.distance)),new l(f),new l(v))})}}t([e(0,r(H)),e(1,r(c))],L.prototype,"vertex",null),t([e(0,r(A))],L.prototype,"fragment",null);export{G as AOutlineFillShader,A as OutlineFillFragmentInput,L as OutlineFillShader,H as OutlineFillVertexInput,D as getOutlineFillVertexData};
|
|
@@ -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 r,uniform as o,texture as i,input as l}from"../../GraphShaderModule.js";import{Vec4 as s,Float as n,Sampler2D as a,Vec2 as p,Vec3 as u,mod as d,mix as c,texture2D as m,Mat3 as f,negate as y}from"../../graph/glsl.js";import{BaseHittestVertexInput as x,FeatureFragmentInput as v}from"./AFeatureShader.js";import{FillVertexInput as b,FillShader as h}from"./FillShader.js";import{LocalTileOffset as g}from"./LocalTileOffset.js";import{MosaicInfo as w}from"./MosaicInfo.js";class T extends b{}t([r(5,s)],T.prototype,"tlbr",void 0),t([r(6,n)],T.prototype,"inverseRasterizationScale",void 0);class j extends v{}function O(t){const e=new n(1),r=new n(0);return new f(e.divide(t.x),r.divide(t.y),0,y(r.divide(t.x)),e.divide(t.y),0,0,0,1)}function S(t,e){const r=e.tlbr.xy,o=e.tlbr.zw,i=o.x.subtract(r.x),l=r.y.subtract(o.y),s=new p(i,l).multiply(e.inverseRasterizationScale),n=s.multiply(t.tile.getRequiredZoomFactor(t.
|
|
2
|
+
import{__decorate as t,__param as e}from"tslib";import{location as r,uniform as o,texture as i,input as l}from"../../GraphShaderModule.js";import{Vec4 as s,Float as n,Sampler2D as a,Vec2 as p,Vec3 as u,mod as d,mix as c,texture2D as m,Mat3 as f,negate as y}from"../../graph/glsl.js";import{BaseHittestVertexInput as x,FeatureFragmentInput as v}from"./AFeatureShader.js";import{FillVertexInput as b,FillShader as h}from"./FillShader.js";import{LocalTileOffset as g}from"./LocalTileOffset.js";import{MosaicInfo as w}from"./MosaicInfo.js";class T extends b{}t([r(5,s)],T.prototype,"tlbr",void 0),t([r(6,n)],T.prototype,"inverseRasterizationScale",void 0);class j extends v{}function O(t){const e=new n(1),r=new n(0);return new f(e.divide(t.x),r.divide(t.y),0,y(r.divide(t.x)),e.divide(t.y),0,0,0,1)}function S(t,e){const r=e.tlbr.xy,o=e.tlbr.zw,i=o.x.subtract(r.x),l=r.y.subtract(o.y),s=new p(i,l).multiply(e.inverseRasterizationScale),n=s.multiply(t.tile.getRequiredZoomFactor(t.tileContainer)),a=O(n),d=t.localTileOffset.getPatternOffsetAtTileOrigin(s).divide(n),c=new u(e.pos,1);return{tileTextureCoord:a.multiply(c).xy.subtract(d),tlbr:e.tlbr.divide(t.mosaicInfo.size.xyxy)}}function z(t,e){const r=d(t.tileTextureCoord,new n(1)),o=c(t.tlbr.xy,t.tlbr.zw,r),i=m(e.mosaicTexture,o);return t.color.multiply(i)}class F extends h{constructor(){super(...arguments),this.type="PatternFillShader"}vertex(t,e){return{...super.vertex(t,e),...S(this,t)}}fragment(t){const e=z(t,this);return this.getFragmentOutput(e,t,new n(0))}}t([o(w)],F.prototype,"mosaicInfo",void 0),t([i(a)],F.prototype,"mosaicTexture",void 0),t([o(g)],F.prototype,"localTileOffset",void 0),t([e(0,l(T)),e(1,l(x))],F.prototype,"vertex",null),t([e(0,l(j))],F.prototype,"fragment",null);export{j as PatternFillFragmentInput,F as PatternFillShader,T as PatternFillVertexInput,z as getPatternFillFragmentColor,S as getPatternFillVertexData};
|
|
@@ -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{pt2px as i}from"../../../../../../../core/screenUtils.js";import{dashSdfRasterizationScale as o,dashSdfDistanceNormalization as s}from"../../../../../../../symbols/cim/constants.js";import{location as a,uniform as r,texture as l,input as n}from"../../GraphShaderModule.js";import{Float as p,Vec2 as c,Vec4 as m,Sampler2D as u,max as d,fract as y,mix as h,texture2D as f,cond as w,equal as g,sqrt as x,pow as b,clamp as v,ifElse as D,greaterThan as S,dot as T}from"../../graph/glsl.js";import{BaseHittestVertexInput as j}from"./AFeatureShader.js";import{bitsetLineScaleDash as A,bitsetLineIsSdf as z,bitsetGenericConsiderAlphaOnly as F}from"./constants.js";import{LineVertexInput as L,LineShader as _,getLineVertexData as
|
|
2
|
+
import{__decorate as t,__param as e}from"tslib";import{pt2px as i}from"../../../../../../../core/screenUtils.js";import{dashSdfRasterizationScale as o,dashSdfDistanceNormalization as s}from"../../../../../../../symbols/cim/constants.js";import{location as a,uniform as r,texture as l,input as n}from"../../GraphShaderModule.js";import{Float as p,Vec2 as c,Vec4 as m,Sampler2D as u,max as d,fract as y,mix as h,texture2D as f,cond as w,equal as g,sqrt as x,pow as b,clamp as v,ifElse as D,greaterThan as S,dot as T}from"../../graph/glsl.js";import{BaseHittestVertexInput as j}from"./AFeatureShader.js";import{bitsetLineScaleDash as A,bitsetLineIsSdf as z,bitsetGenericConsiderAlphaOnly as F}from"./constants.js";import{LineVertexInput as L,LineShader as _,getLineVertexData as C,getLineAntialiasing as O,LineFragmentInput as P}from"./LineShader.js";import{MosaicInfo as W}from"./MosaicInfo.js";import{getBit as I,rgba2float as R}from"./utils.js";class H extends L{}t([a(9,p)],H.prototype,"accumulatedDistance",void 0),t([a(10,c)],H.prototype,"segmentDirection",void 0),t([a(11,p)],H.prototype,"offsetAlongLine",void 0),t([a(12,p)],H.prototype,"capType",void 0),t([a(13,m)],H.prototype,"tlbr",void 0);class M extends P{}class G extends _{constructor(){super(...arguments),this.type="TexturedLineShader"}_getDistanceRatio(t,e){const o=I(t.bitset,A);return o.multiply(d(e,new p(.25)).multiply(new p(2))).add(new p(1).subtract(o).multiply(i(1)))}_getSDFAlpha(t){const{halfWidth:e,normal:i,tlbr:a,patternSize:r,accumulatedDistance:l,offsetAlongLine:n,dashToPx:u,capType:D}=t,S=r.x.divide(o).multiply(u),T=y(l.add(n).divide(S)),j=h(a.xy,a.zw,new c(T,.5)),A=R(f(this.mosaicTexture,j)).multiply(2).subtract(1).multiply(s).multiply(u),z=i.y.multiply(e),F=w([g(D,new p(1)),A.subtract(e)],[g(D,new p(2)),x(b(d(A,new p(0)),new p(2)).add(z.multiply(z))).subtract(e)],[!0,A]),L=v(new p(.25).subtract(F),new p(0),new p(1));return new m(L)}_getPatternColor(t){const{halfWidth:e,normal:i,color:o,accumulatedDistance:s,patternSize:a,sampleAlphaOnly:r,tlbr:l}=t,n=a.y.multiply(new p(2).multiply(e).divide(a.x)),u=y(s.divide(n)),d=new p(.5).multiply(i.y).add(new p(.5)),w=h(l.xy,l.zw,new c(d,u));let g=f(this.mosaicTexture,w);return null!=this.visualVariableColor&&(g=D(S(r,new p(.5)),new m(o.a),o)),g}vertex(t,e){const{segmentDirection:i,tlbr:o,bitset:s}=t,a=C(this,t),r=t.accumulatedDistance.divide(this.tile.getDisplayZoomFactor(this.tileContainer)).add(T(i,a.scaledOffset)),l=new c(o.z.subtract(o.x),o.w.subtract(o.y)),n=o.divide(this.mosaicInfo.size.xyxy),m=I(s,z),u=I(s,F),d=D(S(m,new p(.5)),this._getDistanceRatio(t,a.scaledHalfWidth),new p(1));return{...a,tlbr:n,patternSize:l,accumulatedDistance:r,isSDF:m,sampleAlphaOnly:u,dashToPx:d,offsetAlongLine:t.offsetAlongLine,capType:t.capType,...this.maybeRunHittest(t,e,a.halfWidth)}}fragment(t){const{color:e,opacity:i,isSDF:o}=t,s=O(t,this.view.antialiasing),a=D(S(o,new p(.5)),this._getSDFAlpha(t),this._getPatternColor(t)),r=e.multiply(i).multiply(s).multiply(a);return this.getFragmentOutput(r,t)}}t([r(W)],G.prototype,"mosaicInfo",void 0),t([l(u)],G.prototype,"mosaicTexture",void 0),t([e(0,n(H)),e(1,n(j))],G.prototype,"vertex",null);export{M as TexturedLineFragmentInput,G as TexturedLineShader,H as TexturedLineVertexInput};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{normalizedTileWorldSize as i,getNormalizedTileOrigin as
|
|
2
|
+
import{__decorate as e}from"tslib";import{normalizedTileWorldSize as i,getNormalizedTileOrigin as r,toFloat32 as t}from"../../../normalizedTileUtils.js";import{uniform as l,UniformGroup as o}from"../../GraphShaderModule.js";import{Float as a,Vec2 as n,exp2 as d,Mat3 as s,abs as m}from"../../graph/glsl.js";class p extends o{getDisplayZoomFactor(e){return d(this.level.subtract(e.currentZoom))}getRequiredZoomFactor(e){return d(this.level.subtract(e.requiredLevel))}getZoomFactor(e,i){return d(i.currentZoom.subtract(this.level)).divide(e.pixelRatio)}getTileMat3(e,i){const r=this._getNormalizedOriginScreenDelta(i),t=this.localToMap.divide(e.resolution);return new s(t.x,0,0,0,t.y,0,r.x,r.y,1)}getViewScreenMat3(e,i){return e.viewMat3.multiply(this.getTileMat3(e,i))}getDisplayViewScreenMat3(e,i){return e.displayViewMat3.multiply(this.getTileMat3(e,i))}_getNormalizedOriginScreenDelta(e){const r=new n(this.normalizedWorldWrapId,0).subtract(e.normalizedTileWorldWrapId).multiply(i),t=this.normalizedOriginOffset.multiply(m(e.normalizedTileUnitsToPixels));return this.normalizedOrigin.add(r).subtract(e.normalizedTileOrigin).multiply(e.normalizedTileUnitsToPixels).add(e.normalizedTileOriginOffsetPixels).add(t)}}function u(e,i){const l=null!=e?r(e,i):[0,0],o=t(l),a=null!=e?i.key.world:0;return{level:i.key.level,normalizedOrigin:o,normalizedOriginOffset:[l[0]-o[0],l[1]-o[1]],normalizedWorldWrapId:a,localToMap:[i.width/i.rangeX*i.resolution,i.height/i.rangeY*i.resolution]}}e([l(a)],p.prototype,"level",void 0),e([l(n)],p.prototype,"normalizedOrigin",void 0),e([l(n)],p.prototype,"normalizedOriginOffset",void 0),e([l(a)],p.prototype,"normalizedWorldWrapId",void 0),e([l(n)],p.prototype,"localToMap",void 0);export{p as Tile,u as getTileUniforms};
|
|
@@ -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{location as e,uniform as i,input as r,FragmentInput as p,texture as n,VertexInput as s,UniformGroup as l,GraphShaderModule as d,FragmentOutput as
|
|
2
|
+
import{__decorate as t,__param as o}from"tslib";import{location as e,uniform as i,input as r,FragmentInput as p,texture as n,VertexInput as s,UniformGroup as l,GraphShaderModule as d,FragmentOutput as a}from"../../GraphShaderModule.js";import{Vec2 as y,Float as c,Vec4 as v,Sampler2D as g,Vec3 as u,texture2D as f}from"../../graph/glsl.js";import{Tile as h}from"./Tile.js";import{TileInfo as m}from"./TileInfo.js";import{ViewInfo as x}from"./ViewInfo.js";class w extends s{}t([e(0,y)],w.prototype,"position",void 0);class C extends p{}class j extends l{}t([i(y)],j.prototype,"coordRange",void 0),t([i(c)],j.prototype,"depth",void 0),t([i(v)],j.prototype,"color",void 0);class S extends l{}t([i(c)],S.prototype,"depth",void 0),t([i(y)],S.prototype,"coordRatio",void 0),t([i(y)],S.prototype,"delta",void 0),t([i(y)],S.prototype,"dimensions",void 0);class b extends d{constructor(){super(...arguments),this.type="TileDebugInfoOutlineShader"}vertex(t){const o=this.tile.getDisplayViewScreenMat3(this.view,this.tileContainer).multiply(new u(t.position.multiply(this.config.coordRange),1));return{glPosition:new v(o.xy,this.config.depth,1)}}fragment(t){const o=new a;return o.fragColor=this.config.color,o}}t([i(x)],b.prototype,"view",void 0),t([i(m)],b.prototype,"tileContainer",void 0),t([i(h)],b.prototype,"tile",void 0),t([i(j)],b.prototype,"config",void 0),t([o(0,r(w))],b.prototype,"vertex",null),t([o(0,r(p))],b.prototype,"fragment",null);class D extends d{constructor(){super(...arguments),this.type="TileDebugInfoShader"}vertex(t){const o=this.config.coordRatio.multiply(this.config.delta.add(t.position.multiply(this.config.dimensions))),e=this.tile.getDisplayViewScreenMat3(this.view,this.tileContainer).multiply(new u(o,1));return{glPosition:new v(e.xy,this.config.depth,1),uv:t.position}}fragment(t){const o=new a,e=f(this.texture,t.uv);return o.fragColor=new v(e.rgb.multiply(e.a),e.a),o}}t([i(x)],D.prototype,"view",void 0),t([i(m)],D.prototype,"tileContainer",void 0),t([i(h)],D.prototype,"tile",void 0),t([i(S)],D.prototype,"config",void 0),t([n(g)],D.prototype,"texture",void 0),t([o(0,r(w))],D.prototype,"vertex",null),t([o(0,r(C))],D.prototype,"fragment",null);export{b as TileDebugInfoOutlineShader,D as TileDebugInfoShader};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as
|
|
2
|
+
import{__decorate as e}from"tslib";import{toFloat32 as i}from"../../../normalizedTileUtils.js";import{uniform as o,UniformGroup as r}from"../../GraphShaderModule.js";import{Float as l,Vec2 as t}from"../../graph/glsl.js";class n extends r{}function d({displayLevel:e,normalizedTileView:o,referenceScale:r,requiredLevel:l,state:t}){const n=i(o.origin),d=[(n[0]-o.origin[0])*o.unitsToPixels,(n[1]-o.origin[1])*o.unitsToPixels];return{currentZoom:e,requiredLevel:l,scaleFactor:null!=r?r/t.scale:1,normalizedTileOrigin:n,normalizedTileWorldWrapId:o.worldWrapId,normalizedTileOriginOffsetPixels:d,normalizedTileUnitsToPixels:o.unitsToPixels}}e([o(l)],n.prototype,"currentZoom",void 0),e([o(l)],n.prototype,"requiredLevel",void 0),e([o(l)],n.prototype,"scaleFactor",void 0),e([o(t)],n.prototype,"normalizedTileOrigin",void 0),e([o(t)],n.prototype,"normalizedTileWorldWrapId",void 0),e([o(t)],n.prototype,"normalizedTileOriginOffsetPixels",void 0),e([o(l)],n.prototype,"normalizedTileUnitsToPixels",void 0);export{n as TileInfo,d as getTileContainerUniforms};
|
|
@@ -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{location as e,uniform as r,define as i,option as s,input as p,FragmentInput as
|
|
2
|
+
import{__decorate as t,__param as o}from"tslib";import{location as e,uniform as r,define as i,option as s,input as p,FragmentInput as n,VertexInput as l,UniformGroup as a,GraphShaderModule as d,FragmentOutput as m}from"../../GraphShaderModule.js";import{Vec2 as f,Float as c,Vec4 as y,Vec3 as h}from"../../graph/glsl.js";import{Tile as g}from"./Tile.js";import{TileInfo as v}from"./TileInfo.js";import{ViewInfo as u}from"./ViewInfo.js";import{RasterVFSampling as V}from"./raster/RasterVFTransform.js";class w extends l{}t([e(0,f)],w.prototype,"position",void 0);class x extends a{}t([r(f)],x.prototype,"coordRange",void 0),t([r(c)],x.prototype,"depth",void 0),t([r(y)],x.prototype,"color",void 0);class j extends d{constructor(){super(...arguments),this.type="TileStencilShader",this.isRasterVF=!1}vertex(t){let o=t.position.multiply(this.config.coordRange);if(this.isRasterVF){const{samplingOffset:t,samplingScale:e}=this.rasterVF;o=o.multiply(e).add(t)}const e=this.tile.getDisplayViewScreenMat3(this.view,this.tileContainer).multiply(new h(o,1));return{glPosition:new y(e.xy,this.config.depth,1)}}fragment(t){const o=new m;return o.fragColor=this.config.color,o}}t([i],j.prototype,"isRasterVF",void 0),t([r(u)],j.prototype,"view",void 0),t([r(v)],j.prototype,"tileContainer",void 0),t([r(g)],j.prototype,"tile",void 0),t([r(x)],j.prototype,"config",void 0),t([s(V)],j.prototype,"rasterVF",void 0),t([o(0,p(w))],j.prototype,"vertex",null),t([o(0,p(n))],j.prototype,"fragment",null);export{j as TileStencilShader};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as t}from"tslib";import{getMetersPerUnitForSR as o}from"../../../../../../../core/units.js";import{uniform as i,
|
|
2
|
+
import{__decorate as t}from"tslib";import{getMetersPerUnitForSR as o}from"../../../../../../../core/units.js";import{uniform as i,UniformGroup as e}from"../../GraphShaderModule.js";import{Mat3 as r,Float as a}from"../../graph/glsl.js";class p extends e{}function s({pixelRatio:t,state:i}){const e=1/t;return{displayMat3:i.displayMat3,displayViewMat3:i.displayViewMat3,viewMat3:i.viewMat3,currentScale:i.scale,metersPerSRUnit:o(i.spatialReference),resolution:i.resolution,rotation:i.rotation,pixelRatio:t,antialiasing:e}}t([i(r)],p.prototype,"displayViewMat3",void 0),t([i(r)],p.prototype,"displayMat3",void 0),t([i(r)],p.prototype,"viewMat3",void 0),t([i(a)],p.prototype,"currentScale",void 0),t([i(a)],p.prototype,"metersPerSRUnit",void 0),t([i(a)],p.prototype,"resolution",void 0),t([i(a)],p.prototype,"rotation",void 0),t([i(a)],p.prototype,"pixelRatio",void 0),t([i(a)],p.prototype,"antialiasing",void 0);export{p as ViewInfo,s as getViewUniforms};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{and as t,greaterThanEqual as n,Float as e,Vec3 as y,ifElse as r,or as u,greaterThan as i,lessThan as s,cond as x,min as l,not as c,Vec2 as a,max as w,equal as o,clamp as d,length as b,distance as m,Mat3 as p,abs as f,step as g,lessThanEqual as I,dot as h,normalize as v}from"../../graph/glsl.js";import{noHit as
|
|
2
|
+
import{and as t,greaterThanEqual as n,Float as e,Vec3 as y,ifElse as r,or as u,greaterThan as i,lessThan as s,cond as x,min as l,not as c,Vec2 as a,max as w,equal as o,clamp as d,length as b,distance as m,Mat3 as p,abs as f,step as g,lessThanEqual as I,dot as h,normalize as v}from"../../graph/glsl.js";import{noHit as C,trueHit as R,epsilonHitTest as S,candidateHit as V}from"./constants.js";import{cross2 as j}from"./utils.js";function z(t,n){return h(t,v(n))}function T(t,n,y){const r=y.subtract(n),u=z(t.subtract(n),r),i=d(u.divide(b(r)),new e(0),new e(1));return m(t,n.add(i.multiply(y.subtract(n))))}function P(t){const n=f(t);return g(n.x.add(n.y).add(n.z),new e(1.05))}function q(t,n,r,u){const i=new p(r.x.multiply(u.y).subtract(u.x.multiply(r.y)),u.x.multiply(n.y).subtract(n.x.multiply(u.y)),n.x.multiply(r.y).subtract(r.x.multiply(n.y)),r.y.subtract(u.y),u.y.subtract(n.y),n.y.subtract(r.y),u.x.subtract(r.x),n.x.subtract(u.x),r.x.subtract(n.x)),s=n.x.multiply(r.y.subtract(u.y)),x=r.x.multiply(u.y.subtract(n.y)),l=u.x.multiply(n.y.subtract(r.y)),c=s.add(x).add(l);return new e(1).divide(c).multiply(i.multiply(new y(1,t)))}function M(t,n,y,r){return o(P(q(t,n,y,r)),new e(1))}function k(n,y,r,u){const a=r.subtract(y),w=u.subtract(y),o=j(a,w),d=t(s(o,new e(S)),i(o,new e(-S)));return x([t(c(d),M(n.xy,y,r,u)),new e(-1)],[!0,()=>{const t=T(n,y,r),e=T(n,r,u),i=T(n,u,y);return l(l(t,e),i)}])}function A(t,n,e){const r=t.tile.getViewScreenMat3(t.view,t.tileContainer),u=r.multiply(new y(n.pos,1)),i=r.multiply(new y(e.nextPos1,1)),s=r.multiply(new y(e.nextPos2,1));return k(t.hittestRequest.position,u.xy,i.xy,s.xy)}function B(t,n,e){return m(t,e).subtract(n)}function D(y,u,i,s){const x=y.x,l=y.y,a=u.x,w=u.y,d=i.x,b=i.y,m=s.x,p=s.y,f=m.subtract(d),g=x.subtract(d),h=a.subtract(x),v=p.subtract(b),C=l.subtract(b),R=w.subtract(l),S=v.multiply(h).subtract(f.multiply(R)),V=f.multiply(C).subtract(v.multiply(g)).divide(S),j=h.multiply(C).subtract(R.multiply(g)).divide(S),z=t(c(o(S,new e(0))),t(t(n(V,new e(0)),I(V,new e(1))),t(n(j,new e(0)),I(j,new e(1)))));return r(z,new e(1),new e(0))}function E(e,y,r,u,i){return t(t(n(e.x,y),n(e.y,r)),t(s(e.x,u),I(e.y,i)))}function F(n,y,r,s){const x=s.xy,c=s.zw,d=new a(c.x,x.y),b=new a(x.x,c.y),m=l(x.x,c.x),p=l(x.y,c.y),f=w(x.x,c.x),g=w(x.y,c.y),I=q(new a(m,p),n,y,r),h=q(new a(f,g),n,y,r),v=q(new a(m,g),n,y,r),C=q(new a(f,p),n,y,r),R=t(o(P(I),new e(1)),t(o(P(h),new e(1)),t(o(P(v),new e(1)),o(P(C),new e(1))))),S=D(x,d,n.xy,y.xy).add(D(d,c,n.xy,y.xy)).add(D(b,c,n.xy,y.xy)).add(D(b,x,n.xy,y.xy)),V=D(x,d,n.xy,r.xy).add(D(d,c,n.xy,r.xy)).add(D(b,c,n.xy,r.xy)).add(D(b,x,n.xy,r.xy)),j=D(x,d,y.xy,r.xy).add(D(d,c,y.xy,r.xy)).add(D(b,c,y.xy,r.xy)).add(D(b,x,y.xy,r.xy)),z=E(n.xy,m,p,f,g),T=E(y.xy,m,p,f,g),M=E(r.xy,m,p,f,g),k=t(z,t(T,M));return{hasIntersectingSegments:u(i(S,new e(0)),u(i(V,new e(0)),i(j,new e(0)))),allTriangleVerticesInside:k,triangleContainsRect:R}}function G(t,n,y,i){const{hasIntersectingSegments:s,allTriangleVerticesInside:x,triangleContainsRect:l}=F(t,n,y,i);return r(s,new e(V),r(u(x,l),new e(R),new e(C)))}function H(t,n,y,i){const{hasIntersectingSegments:s,allTriangleVerticesInside:x,triangleContainsRect:l}=F(t,n,y,i);return r(u(s,u(x,l)),new e(R),new e(C))}function J(y){return t(n(y.tlbr.x,new e(0)),n(y.tlbr.y,new e(0)),n(y.tlbr.z,new e(0)),n(y.tlbr.w,new e(0)))}export{T as distPointSegment,k as distPointTriangle,A as hittestFill,B as hittestMarker,G as hittestMarkerScreenRect,H as hittestScreenRect,P as inTriangle,F as intersectsScreenRect,J as isRectHittest,E as pointInRect,z as projectScalar,D as segmentIntersects,q as xyToBarycentric};
|
package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/BaseRasterColorizerShader.js
CHANGED
|
@@ -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,define as s,option as l,texture as n,input as
|
|
2
|
+
import{__decorate as t,__param as o}from"tslib";import{GraphShaderModule as i,FragmentOutput as e,location as r,uniform as p,define as s,option as l,texture as n,input as a,VertexInput as c,UniformGroup as h,FragmentInput as y}from"../../../GraphShaderModule.js";import{Vec4 as u,ifElse as g,texture2D as d,sign as v,mix as x,Vec3 as m,Vec2 as P,Float as f,Sampler2D as j}from"../../../graph/glsl.js";import{Tile as b}from"../Tile.js";import{TileInfo as k}from"../TileInfo.js";import{ViewInfo as w}from"../ViewInfo.js";import{getPixelLocation as M,isOutside as T,getPixel as S,ProjectionConfig as _,ProjectionTextures as C}from"./projection.js";class I extends c{}t([r(0,P)],I.prototype,"position",void 0);class z extends y{}class E extends h{}t([p(P)],E.prototype,"coordScale",void 0),t([p(P)],E.prototype,"srcImageSize",void 0),t([p(f)],E.prototype,"opacity",void 0);class O extends i{constructor(){super(...arguments),this.applyProjection=!0,this.lookupProjection=!1,this.bilinear=!1,this.bicubic=!1,this.nearestOnEdge=!1,this.applyPixelMask=!1,this.applyPixelHighlights=!1}fragment(t){const o=new e,i=M(t.uv,this.applyProjection?this.projectionConfig:void 0,this.applyProjection?this.projectionTextures:void 0,this.lookupProjection);let r=this._colorize(i,t.uv);this.applyPixelHighlights&&(r=this._highlightPixels(t.uv,r));const p=g(T(i),new u(0),r);let s=p.a.multiply(this.config.opacity);if(this.applyPixelMask){const o=this._getPixelMask(t.uv);s=s.multiply(o)}return o.fragColor=new u(p.rgb,1).multiply(s),o}_getPixel(t){const{config:o,bicubic:i,bilinear:e,nearestOnEdge:r}=this;return S(t,{texture:this.texture,srcImageSize:o.srcImageSize},{bicubic:i,bilinear:e,nearestOnEdge:r})}_getPixelMask(t){const o=d(this.pixelMaskTexture,t);return v(o.a)}_highlightPixels(t,o){const i=d(this.highlightTexture,t),e=v(i.a);return x(o,i,e)}}t([s],O.prototype,"applyProjection",void 0),t([s],O.prototype,"lookupProjection",void 0),t([s],O.prototype,"bilinear",void 0),t([s],O.prototype,"bicubic",void 0),t([s],O.prototype,"nearestOnEdge",void 0),t([s],O.prototype,"applyPixelMask",void 0),t([s],O.prototype,"applyPixelHighlights",void 0),t([p(E)],O.prototype,"config",void 0),t([l(_)],O.prototype,"projectionConfig",void 0),t([n(j)],O.prototype,"texture",void 0),t([n(C)],O.prototype,"projectionTextures",void 0),t([n(j)],O.prototype,"pixelMaskTexture",void 0),t([n(j)],O.prototype,"highlightTexture",void 0),t([o(0,a(z))],O.prototype,"fragment",null);class H extends O{vertex(t){const o=t.position,i=new m(o.multiply(this.config.coordScale),1),e=this.tile.getDisplayViewScreenMat3(this.view,this.tileContainer).multiply(i);return{uv:o,glPosition:new u(e,1)}}}t([p(w)],H.prototype,"view",void 0),t([p(k)],H.prototype,"tileContainer",void 0),t([p(b)],H.prototype,"tile",void 0),t([o(0,a(I))],H.prototype,"vertex",null);class V extends O{vertex(t){const o=t.position,i=o.multiply(2).subtract(1);return{uv:o,glPosition:new u(i,0,1)}}}t([o(0,a(I))],V.prototype,"vertex",null);export{H as BaseRasterColorizerShader,V as BaseRasterFullscreenShader,z as RasterColorizerFragmentInput,E as RasterConfig};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as o,__param as t}from"tslib";import{GraphShaderModule as e,FragmentOutput as i,location as r,uniform as p,define as s,option as a,input as n,VertexInput as l,UniformGroup as d,FragmentInput as y}from"../../../GraphShaderModule.js";import{Float as c,clamp as m,Vec2 as v,cos as f,sin as g,Int as h,Vec4 as u,FixedArray as x}from"../../../graph/glsl.js";import{Tile as w}from"../Tile.js";import{TileInfo as b}from"../TileInfo.js";import{ViewInfo as R}from"../ViewInfo.js";import{transformRasterVFPosition as j,RasterVFSampling as S,RasterVFLocalTransform as T}from"./RasterVFTransform.js";class G extends l{}o([r(0,v)],G.prototype,"position",void 0),o([r(1,v)],G.prototype,"offset",void 0),o([r(2,v)],G.prototype,"vv",void 0);class
|
|
2
|
+
import{__decorate as o,__param as t}from"tslib";import{GraphShaderModule as e,FragmentOutput as i,location as r,uniform as p,define as s,option as a,input as n,VertexInput as l,UniformGroup as d,FragmentInput as y}from"../../../GraphShaderModule.js";import{Float as c,clamp as m,Vec2 as v,cos as f,sin as g,Int as h,Vec4 as u,FixedArray as x}from"../../../graph/glsl.js";import{Tile as w}from"../Tile.js";import{TileInfo as b}from"../TileInfo.js";import{ViewInfo as R}from"../ViewInfo.js";import{transformRasterVFPosition as j,RasterVFSampling as S,RasterVFLocalTransform as T}from"./RasterVFTransform.js";class G extends l{}o([r(0,v)],G.prototype,"position",void 0),o([r(1,v)],G.prototype,"offset",void 0),o([r(2,v)],G.prototype,"vv",void 0);class V extends y{}class C extends d{}o([p(v)],C.prototype,"coordScale",void 0),o([p(v)],C.prototype,"symbolSize",void 0),o([p(v)],C.prototype,"symbolPercentRange",void 0),o([p(v)],C.prototype,"dataRange",void 0),o([p(c)],C.prototype,"rotation",void 0),o([p(x.ofType(u,48))],C.prototype,"colors",void 0),o([p(c)],C.prototype,"opacity",void 0);const F=new c(3.14159265359);class P extends e{constructor(){super(...arguments),this.type="MagDirShader",this.rotationGeographic=!1,this.dataRange=!1,this.tiled=!1}vertex(o){const{position:t,offset:e,vv:i}=o,{dataRange:r,rotation:p,symbolSize:s,symbolPercentRange:a,colors:n,coordScale:l}=this.config;let d,y=e.y.add(p);if(this.rotationGeographic||(y=F.multiply(new c(2)).subtract(y).subtract(F.divide(new c(2)))),this.dataRange){const o=m(i.y.subtract(r.x).divide(r.y.subtract(r.x)),new c(0),new c(1)),t=a.x.add(o.multiply(a.y.subtract(a.x)));d=m(t,a.x,a.y)}else d=a.x.add(a.y).divide(new c(2));const x=new v(f(y),g(y)).multiply(e.x),w=t.add(x.multiply(d.multiply(s))),b=n.get(new h(i.x)),R=j(this.tiled,w.multiply(l),this.view,this.tileContainer,this.tile,this.rasterVF,this.localTransform);return{glPosition:new u(R,1),color:b}}fragment(o){const t=new i;return t.fragColor=o.color.multiply(this.config.opacity),t}}o([s],P.prototype,"rotationGeographic",void 0),o([s],P.prototype,"dataRange",void 0),o([s],P.prototype,"tiled",void 0),o([p(R)],P.prototype,"view",void 0),o([a(b)],P.prototype,"tileContainer",void 0),o([a(w)],P.prototype,"tile",void 0),o([a(S)],P.prototype,"rasterVF",void 0),o([a(T)],P.prototype,"localTransform",void 0),o([p(C)],P.prototype,"config",void 0),o([t(0,n(G))],P.prototype,"vertex",null),o([t(0,n(V))],P.prototype,"fragment",null);export{P as MagDirShader};
|
|
@@ -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 e,FragmentOutput as i,location as r,uniform as p,define as n,option as s,input as d,VertexInput as l,UniformGroup as a,FragmentInput as y}from"../../../GraphShaderModule.js";import{clamp as m,Float as c,Vec4 as v,length as f,smoothstep as w,ifElse as u,lessThan as h,abs as g,Vec2 as x}from"../../../graph/glsl.js";import{Tile as b}from"../Tile.js";import{TileInfo as j}from"../TileInfo.js";import{oneMinus as R}from"../utils.js";import{ViewInfo as S}from"../ViewInfo.js";import{transformRasterVFPosition as
|
|
2
|
+
import{__decorate as t,__param as o}from"tslib";import{GraphShaderModule as e,FragmentOutput as i,location as r,uniform as p,define as n,option as s,input as d,VertexInput as l,UniformGroup as a,FragmentInput as y}from"../../../GraphShaderModule.js";import{clamp as m,Float as c,Vec4 as v,length as f,smoothstep as w,ifElse as u,lessThan as h,abs as g,Vec2 as x}from"../../../graph/glsl.js";import{Tile as b}from"../Tile.js";import{TileInfo as j}from"../TileInfo.js";import{oneMinus as R}from"../utils.js";import{ViewInfo as S}from"../ViewInfo.js";import{transformRasterVFPosition as C,RasterVFSampling as T,RasterVFLocalTransform as V}from"./RasterVFTransform.js";class F extends l{}t([r(0,x)],F.prototype,"position",void 0),t([r(1,x)],F.prototype,"offset",void 0),t([r(2,x)],F.prototype,"vv",void 0);class P extends y{}class z extends a{}t([p(x)],z.prototype,"coordScale",void 0),t([p(x)],z.prototype,"symbolSize",void 0),t([p(x)],z.prototype,"symbolPercentRange",void 0),t([p(x)],z.prototype,"dataRange",void 0),t([p(c)],z.prototype,"opacity",void 0);const I=new v(new c(.2),new c(.2),new c(.2),new c(1)),G=new c(.02),M=new c(.25),k=new c(.42),q=new c(.15);class A extends e{constructor(){super(...arguments),this.type="ScalarShader",this.innerCircle=!1,this.dataRange=!1,this.tiled=!1}vertex(t){const{position:o,offset:e,vv:i}=t,{dataRange:r,symbolSize:p,symbolPercentRange:n,coordScale:s}=this.config;let d;if(r){const t=m(i.y.subtract(r.x).divide(r.y.subtract(r.x)),new c(0),new c(1)),o=n.y.subtract(n.x).multiply(t).add(n.x);d=m(o,n.x,n.y)}else d=n.x.add(n.y).divide(new c(2));const l=p.multiply(d),a=o.add(e.multiply(l)),y=C(this.tiled,a.multiply(s),this.view,this.tileContainer,this.tile,this.rasterVF,this.localTransform);return{glPosition:new v(y,1),pos:e}}fragment(t){const o=new i,{opacity:e}=this.config,{pos:r}=t,p=f(r);let n,s=w(k,k.add(G),p);return s=s.multiply(R(w(k.add(G),k.add(new c(.1).add(G)),p))),this.innerCircle?(n=w(M,M.add(G),p),n=n.multiply(R(w(M.add(G),M.add(new c(.1).add(G)),p)))):n=u(h(g(r.x),q),new c(1),new c(0)).multiply(u(h(g(r.y),q),new c(1),new c(0))),o.fragColor=I.multiply(e).multiply(n.add(s)),o}}t([n],A.prototype,"innerCircle",void 0),t([n],A.prototype,"dataRange",void 0),t([n],A.prototype,"tiled",void 0),t([p(S)],A.prototype,"view",void 0),t([s(j)],A.prototype,"tileContainer",void 0),t([s(b)],A.prototype,"tile",void 0),t([s(T)],A.prototype,"rasterVF",void 0),t([s(V)],A.prototype,"localTransform",void 0),t([p(z)],A.prototype,"config",void 0),t([o(0,d(F))],A.prototype,"vertex",null),t([o(0,d(P))],A.prototype,"fragment",null);export{A as ScalarShader};
|
package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderBackground.js
CHANGED
|
@@ -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 e,FragmentOutput as r,location as i,uniform as p,define as l,option as s,texture as n,input as d,FragmentInput as a,VertexInput as y,UniformGroup as c}from"../../../GraphShaderModule.js";import{Vec3 as h,Vec4 as m,Vec2 as v,fract as u,mix as
|
|
2
|
+
import{__decorate as t,__param as o}from"tslib";import{GraphShaderModule as e,FragmentOutput as r,location as i,uniform as p,define as l,option as s,texture as n,input as d,FragmentInput as a,VertexInput as y,UniformGroup as c}from"../../../GraphShaderModule.js";import{Vec3 as h,Vec4 as m,Vec2 as v,fract as u,mix as x,texture2D as f,Float as g,Mat3 as w,Sampler2D as C}from"../../../graph/glsl.js";import{Tile as b}from"../Tile.js";import{TileInfo as M}from"../TileInfo.js";import{ViewInfo as S}from"../ViewInfo.js";class T extends y{}t([i(0,v)],T.prototype,"position",void 0);class j extends c{}t([p(g)],j.prototype,"coordRange",void 0),t([p(g)],j.prototype,"depth",void 0);class I extends c{}t([p(m)],I.prototype,"tlbr",void 0),t([p(v)],I.prototype,"mosaicSize",void 0),t([p(g)],I.prototype,"opacity",void 0);class z extends c{}t([p(w)],z.prototype,"mat",void 0);class V extends c{}t([p(m)],V.prototype,"color",void 0);class k extends e{constructor(){super(...arguments),this.type="VTLShaderBackground"}vertex(t){const o=new h(this.layerInfo.coordRange.multiply(t.position),1),e=this.tile.getDisplayViewScreenMat3(this.view,this.tileContainer).multiply(o).xy,r=new m(e,this.layerInfo.depth,1);let i,p=null;if(1===this.renderMode){const o=this.pattern,{tlbr:e,mosaicSize:r}=o;p=this.patternMat.mat.multiply(new h(t.position,1)).xy,i=e.divide(r.xyxy)}else i=new m(0),p=new v(0);return{glPosition:r,tlbr:i,tileTextureCoord:p}}fragment(t){const o=new r;switch(this.renderMode){case 1:{const e=u(t.tileTextureCoord),{opacity:r}=this.pattern,i=x(t.tlbr.xy,t.tlbr.zw,e),p=f(this.patternTexture,i);o.fragColor=r.multiply(p);break}default:o.fragColor=this.getSolidColor()}return o}getSolidColor(){return null!=this.solidColor?this.solidColor.color:new m(1,0,0,1)}}t([l],k.prototype,"renderMode",void 0),t([p(j)],k.prototype,"layerInfo",void 0),t([p(S)],k.prototype,"view",void 0),t([p(M)],k.prototype,"tileContainer",void 0),t([p(b)],k.prototype,"tile",void 0),t([s(V)],k.prototype,"solidColor",void 0),t([s(I)],k.prototype,"pattern",void 0),t([s(z)],k.prototype,"patternMat",void 0),t([n(C)],k.prototype,"patternTexture",void 0),t([o(0,d(T))],k.prototype,"vertex",null),t([o(0,d(a))],k.prototype,"fragment",null);export{k as VTLShaderBackground};
|
package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderCircle.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as o,__param as t}from"tslib";import{GraphShaderModule as e,FragmentOutput as i,location as r,uniform as s,define as p,option as l,input as a,VertexInput as d,UniformGroup as y,FragmentInput as u}from"../../../GraphShaderModule.js";import{max as v,mod as c,Vec2 as n,Float as h,Vec3 as k,Vec4 as x,length as w,smoothstep as g,negate as T,cond as M,lessThan as m,mix as
|
|
2
|
+
import{__decorate as o,__param as t}from"tslib";import{GraphShaderModule as e,FragmentOutput as i,location as r,uniform as s,define as p,option as l,input as a,VertexInput as d,UniformGroup as y,FragmentInput as u}from"../../../GraphShaderModule.js";import{max as v,mod as c,Vec2 as n,Float as h,Vec3 as k,Vec4 as x,length as w,smoothstep as g,negate as T,cond as M,lessThan as m,mix as C}from"../../../graph/glsl.js";import{Tile as b}from"../Tile.js";import{TileInfo as f}from"../TileInfo.js";import{ViewInfo as W}from"../ViewInfo.js";class O extends d{}o([r(0,n)],O.prototype,"position",void 0),o([r(1,h)],O.prototype,"radius",void 0),o([r(2,x)],O.prototype,"color",void 0),o([r(3,h)],O.prototype,"opacity",void 0),o([r(4,h)],O.prototype,"strokeWidth",void 0),o([r(5,x)],O.prototype,"strokeColor",void 0),o([r(6,h)],O.prototype,"strokeOpacity",void 0),o([r(7,h)],O.prototype,"blur",void 0),o([r(8,h)],O.prototype,"radiusTo",void 0),o([r(9,x)],O.prototype,"colorTo",void 0),o([r(10,h)],O.prototype,"opacityTo",void 0),o([r(11,h)],O.prototype,"strokeWidthTo",void 0),o([r(12,x)],O.prototype,"strokeColorTo",void 0),o([r(13,h)],O.prototype,"strokeOpacityTo",void 0),o([r(14,h)],O.prototype,"blurTo",void 0);class S extends u{}class V extends y{}o([s(n)],V.prototype,"circleTranslation",void 0),o([s(h)],V.prototype,"depth",void 0),o([s(h)],V.prototype,"antialiasingWidth",void 0),o([s(h)],V.prototype,"tileOpacity",void 0);class j extends y{}o([s(h)],j.prototype,"value",void 0);class A extends y{}o([s(h)],A.prototype,"value",void 0);class B extends y{}o([s(h)],B.prototype,"value",void 0);class I extends y{}o([s(h)],I.prototype,"value",void 0);class R extends y{}o([s(h)],R.prototype,"value",void 0);class D extends y{}o([s(h)],D.prototype,"value",void 0);class G extends y{}o([s(h)],G.prototype,"value",void 0);class L extends y{}o([s(h)],L.prototype,"value",void 0);class P extends y{}o([s(h)],P.prototype,"value",void 0);class q extends y{}o([s(h)],q.prototype,"value",void 0);class z extends y{}o([s(x)],z.prototype,"value",void 0);class E extends y{}o([s(h)],E.prototype,"value",void 0);class F extends y{}o([s(x)],F.prototype,"value",void 0);class H extends y{}o([s(h)],H.prototype,"value",void 0);class J extends e{constructor(){super(...arguments),this.type="VTLShaderCircle"}vertex(o){const t=this.getColor(o).multiply(this.getOpacity(o)),e=this.getStrokeColor(o).multiply(this.getStrokeOpacity(o)),i=this.getStrokeWidth(o),r=this.getRadius(o),s=this.getBlur(o),p=r.add(i),l=v(s,this.config.antialiasingWidth.divide(p)),a=c(o.position,new n(2)).multiply(new h(2)).subtract(new h(1)),d=this.translateAnchorViewport?this.view.displayMat3:this.view.displayViewMat3,y=this.tile.getDisplayViewScreenMat3(this.view,this.tileContainer).multiply(new k(o.position.multiply(.5),new h(1))).add(d.multiply(new k(a.multiply(p).add(this.config.circleTranslation),new h(0))));return{glPosition:new x(y.xy,this.config.depth,1),strokeWidth:i,radius:r,blur:l,color:t,offset:a,strokeColor:e}}fragment(o){const t=new i,e=w(o.offset),r=g(new h(0),T(o.blur),e.subtract(new h(1))),s=M([m(o.strokeWidth,new h(.01)),()=>new h(0)],[!0,g(T(o.blur),new h(0),e.subtract(o.radius.divide(o.radius.add(o.strokeWidth))))]);return t.fragColor=C(o.color,o.strokeColor,s).multiply(r).multiply(this.config.tileOpacity),t}getRadius(o){return this.radiusMix?.value&&o.radius&&o.radiusTo?C(o.radius,o.radiusTo,this.radiusMix.value):o.radius?o.radius:this.radius?.value||new h(0)}getBlur(o){return this.blurMix?.value&&o.blur&&o.blurTo?C(o.blur,o.blurTo,this.blurMix.value):o.blur?o.blur:this.blur?.value||new h(0)}getOpacity(o){return this.opacityMix?.value&&o.opacity&&o.opacityTo?C(o.opacity,o.opacityTo,this.opacityMix.value):o.opacity?o.opacity:this.opacity?.value||new h(1)}getStrokeWidth(o){return this.strokeWidthMix?.value&&o.strokeWidth&&o.strokeWidthTo?C(o.strokeWidth,o.strokeWidthTo,this.strokeWidthMix.value):o.strokeWidth?o.strokeWidth:this.strokeWidth?.value||new h(0)}getColor(o){return this.colorMix?.value&&o.color&&o.colorTo?C(o.color,o.colorTo,this.colorMix.value):o.color?o.color:this.color?.value||new x(0)}getStrokeColor(o){return this.strokeColorMix?.value&&o.strokeColor&&o.strokeColorTo?C(o.strokeColor,o.strokeColorTo,this.strokeColorMix.value):o.strokeColor?o.strokeColor:this.strokeColor?.value||new x(0)}getStrokeOpacity(o){return this.strokeOpacityMix?.value&&o.strokeOpacity&&o.strokeOpacityTo?C(o.strokeOpacity,o.strokeOpacityTo,this.strokeOpacityMix.value):o.strokeOpacity?o.strokeOpacity:this.strokeOpacity?.value||new h(0)}}o([s(W)],J.prototype,"view",void 0),o([s(f)],J.prototype,"tileContainer",void 0),o([s(b)],J.prototype,"tile",void 0),o([s(V)],J.prototype,"config",void 0),o([p],J.prototype,"translateAnchorViewport",void 0),o([l(j)],J.prototype,"radius",void 0),o([l(A)],J.prototype,"radiusMix",void 0),o([l(B)],J.prototype,"blur",void 0),o([l(I)],J.prototype,"blurMix",void 0),o([l(R)],J.prototype,"opacity",void 0),o([l(D)],J.prototype,"opacityMix",void 0),o([l(G)],J.prototype,"strokeOpacity",void 0),o([l(L)],J.prototype,"strokeOpacityMix",void 0),o([l(P)],J.prototype,"strokeWidth",void 0),o([l(q)],J.prototype,"strokeWidthMix",void 0),o([l(z)],J.prototype,"color",void 0),o([l(E)],J.prototype,"colorMix",void 0),o([l(F)],J.prototype,"strokeColor",void 0),o([l(H)],J.prototype,"strokeColorMix",void 0),o([t(0,a(O))],J.prototype,"vertex",null),o([t(0,a(S))],J.prototype,"fragment",null);export{J as VTLShaderCircle};
|
|
@@ -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 e,FragmentOutput as i,location as r,uniform as p,option as l,texture as s,define as n,input as a,VertexInput as y,UniformGroup as c,FragmentInput as d}from"../../../GraphShaderModule.js";import{Vec2 as v,Float as u,Mat3 as h,negate as w,Vec3 as
|
|
2
|
+
import{__decorate as t,__param as o}from"tslib";import{GraphShaderModule as e,FragmentOutput as i,location as r,uniform as p,option as l,texture as s,define as n,input as a,VertexInput as y,UniformGroup as c,FragmentInput as d}from"../../../GraphShaderModule.js";import{Vec2 as v,Float as u,Mat3 as h,negate as w,Vec3 as x,Vec4 as f,fract as m,mix as g,texture2D as T,pow as b,ceil as C,log2 as M,abs as O,Sampler2D as V}from"../../../graph/glsl.js";import{Tile as j}from"../Tile.js";import{TileInfo as S}from"../TileInfo.js";import{ViewInfo as z}from"../ViewInfo.js";class F extends y{}t([r(0,v)],F.prototype,"position",void 0),t([r(1,f)],F.prototype,"color",void 0),t([r(2,u)],F.prototype,"opacity",void 0),t([r(3,f)],F.prototype,"tlbr",void 0),t([r(4,f)],F.prototype,"colorTo",void 0),t([r(5,u)],F.prototype,"opacityTo",void 0);class L extends d{}class A extends c{}t([p(u)],A.prototype,"depth",void 0),t([p(v)],A.prototype,"fillTranslation",void 0),t([p(u)],A.prototype,"tileOpacity",void 0);class B extends c{}t([p(v)],B.prototype,"mosaicSize",void 0),t([p(u)],B.prototype,"patternFactor",void 0),t([p(f)],B.prototype,"tlbr",void 0);class I extends c{}t([p(u)],I.prototype,"value",void 0);class R extends c{}t([p(u)],R.prototype,"value",void 0);class D extends c{}t([p(f)],D.prototype,"value",void 0);class G extends c{}t([p(u)],G.prototype,"value",void 0);class P extends e{constructor(){super(...arguments),this.type="VTLShaderFill"}vertex(t){const o=this.getColor(t).multiply(this.getOpacity(t));let e=new v(0),i=this.getTLBR(t);if(1===this.fillType){const{mosaicSize:o,patternFactor:r}=this.patternOptions,p=k(i.z.subtract(i.x)),l=k(i.w.subtract(i.y)),s=new u(1).divide(p.multiply(r)),n=new u(1).divide(l.multiply(r));e=new h(s,new u(0),new u(0),new u(0),w(n),new u(0),new u(0),new u(0),new u(1)).multiply(new x(t.position,new u(1))).xy,i=i.divide(o.xyxy)}const r=this.translateAnchorViewport?this.view.displayMat3:this.view.displayViewMat3,p=this.tile.getDisplayViewScreenMat3(this.view,this.tileContainer).multiply(new x(t.position,1)).add(r.multiply(new x(this.config.fillTranslation,0)));return{glPosition:new f(p.xy,this.config.depth,1),color:o,tlbr:i,tileTextureCoord:e}}fragment(t){const o=new i;if(1===this.fillType){const{tlbr:e,tileTextureCoord:i}=t,r=m(i),p=g(e.xy,e.zw,r),l=T(this.patternTexture,p);o.fragColor=t.color.a.multiply(l)}else o.fragColor=t.color;return o.fragColor=this.config.tileOpacity.multiply(o.fragColor),o}getColor(t){return this.colorMix?.value&&t.color&&t.colorTo?g(t.color,t.colorTo,this.colorMix.value):t.color?t.color:this.color?.value||new f(0)}getOpacity(t){return this.opacityMix?.value&&t.opacity&&t.opacityTo?g(t.opacity,t.opacityTo,this.opacityMix.value):t.opacity?t.opacity:this.opacity?.value||new u(1)}getTLBR(t){return t.tlbr?t.tlbr:this.patternOptions?.tlbr||new f(0)}}function k(t){return b(new u(2),C(M(O(t))))}t([p(z)],P.prototype,"view",void 0),t([p(S)],P.prototype,"tileContainer",void 0),t([p(j)],P.prototype,"tile",void 0),t([p(A)],P.prototype,"config",void 0),t([l(B)],P.prototype,"patternOptions",void 0),t([l(I)],P.prototype,"opacity",void 0),t([l(R)],P.prototype,"opacityMix",void 0),t([l(D)],P.prototype,"color",void 0),t([l(G)],P.prototype,"colorMix",void 0),t([s(V)],P.prototype,"patternTexture",void 0),t([n],P.prototype,"fillType",void 0),t([n],P.prototype,"translateAnchorViewport",void 0),t([o(0,a(F))],P.prototype,"vertex",null),t([o(0,a(L))],P.prototype,"fragment",null);export{P as VTLShaderFill};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as o,__param as t}from"tslib";import{GraphShaderModule as e,FragmentOutput as i,location as l,uniform as p,texture as r,option as a,define as s,input as n,VertexInput as d,UniformGroup as y,FragmentInput as c}from"../../../GraphShaderModule.js";import{mod as h,Float as v,unpackVec4 as u,clamp as w,step as m,abs as x,Vec3 as g,Vec4 as f,texture2D as T,max as C,ifElse as M,greaterThan as z,and as W,lessThan as b,equal as
|
|
2
|
+
import{__decorate as o,__param as t}from"tslib";import{GraphShaderModule as e,FragmentOutput as i,location as l,uniform as p,texture as r,option as a,define as s,input as n,VertexInput as d,UniformGroup as y,FragmentInput as c}from"../../../GraphShaderModule.js";import{mod as h,Float as v,unpackVec4 as u,clamp as w,step as m,abs as x,Vec3 as g,Vec4 as f,texture2D as T,max as C,ifElse as M,greaterThan as z,and as W,lessThan as b,equal as S,min as O,mix as I,Vec2 as V,Sampler2D as j}from"../../../graph/glsl.js";import{Tile as A}from"../Tile.js";import{TileInfo as B}from"../TileInfo.js";import{oneMinus as H,rgba2float as D}from"../utils.js";import{ViewInfo as P}from"../ViewInfo.js";const k=new v(1/8),U=new v(120/86),G=new v(256/360),L=new v(1/255.5),q=new v(16/86),E=new v(.248062016);class F extends d{}o([l(0,f)],F.prototype,"positionAndOffset",void 0),o([l(1,f)],F.prototype,"iconInfo",void 0),o([l(2,f)],F.prototype,"color",void 0),o([l(3,v)],F.prototype,"opacity",void 0),o([l(4,f)],F.prototype,"haloColor",void 0),o([l(5,v)],F.prototype,"haloWidth",void 0),o([l(6,v)],F.prototype,"haloBlur",void 0),o([l(7,v)],F.prototype,"size",void 0),o([l(8,f)],F.prototype,"colorTo",void 0),o([l(9,v)],F.prototype,"opacityTo",void 0),o([l(10,f)],F.prototype,"haloColorTo",void 0),o([l(11,v)],F.prototype,"haloWidthTo",void 0),o([l(12,v)],F.prototype,"haloBlurTo",void 0),o([l(13,v)],F.prototype,"sizeTo",void 0),o([l(14,v)],F.prototype,"opacityInfo",void 0);class J extends c{}class K extends y{}o([p(V)],K.prototype,"mosaicSize",void 0);class N extends y{}o([p(V)],N.prototype,"iconTranslation",void 0),o([p(v)],N.prototype,"depth",void 0),o([p(v)],N.prototype,"level",void 0),o([p(v)],N.prototype,"keepUpright",void 0),o([p(v)],N.prototype,"fadeDuration",void 0),o([p(v)],N.prototype,"time",void 0),o([p(v)],N.prototype,"isStencilPass",void 0),o([p(v)],N.prototype,"tileOpacity",void 0);class Q extends y{}o([p(v)],Q.prototype,"value",void 0);class R extends y{}o([p(v)],R.prototype,"value",void 0);class X extends y{}o([p(v)],X.prototype,"value",void 0);class Y extends y{}o([p(v)],Y.prototype,"value",void 0);class Z extends y{}o([p(f)],Z.prototype,"value",void 0);class $ extends y{}o([p(v)],$.prototype,"value",void 0);class _ extends y{}o([p(f)],_.prototype,"value",void 0);class oo extends y{}o([p(v)],oo.prototype,"value",void 0);class to extends y{}o([p(v)],to.prototype,"value",void 0);class eo extends y{}o([p(v)],eo.prototype,"value",void 0);class io extends e{constructor(){super(...arguments),this.type="VTLShaderIcon",this.iconType=0}vertex(o){const t=this.getSize(o),e=this.getColor(o),i=this.getHaloColor(o),l=this.getHaloWidth(o);let p=this.getOpacity(o);const{iconInfo:r,opacityInfo:a,positionAndOffset:s}=o,{depth:n,fadeDuration:d,iconTranslation:y,keepUpright:c,level:T,time:C}=this.config,{mosaicSize:M}=this.page,z=this.rotationAlignmentMap?this.view.displayViewMat3:this.view.displayMat3,W=this.translateAnchorViewport?this.view.displayMat3:this.view.displayViewMat3,b=h(a,new v(128)),S=a.subtract(b).divide(new v(128)),O=b.divide(new v(127)),[I,V]=u(r,8),j=w(O.add(new v(2).multiply(S.subtract(new v(.5)).multiply(C.divide(d)))),new v(0),new v(1));p=p.multiply(j);const A=V[1],B=V[2],D=V[3],P=I.xy.divide(M);let L=new v(0);const q=h(this.view.rotation.multiply(G),new v(256)),E=h(A.add(q),new v(256));L=L.add(new v(1).subtract(m(c,new v(0))).multiply(m(new v(64),E).multiply(H(m(new v(192),E))))),L=L.add(H(m(B,T))),L=L.add(m(D,T)),L=L.add(m(p,new v(0)));let F=k.multiply(s.zw);const J=x(F);1===this.iconType&&(F=F.multiply(U));const K=this.tile.getDisplayViewScreenMat3(this.view,this.tileContainer).multiply(new g(s.xy,new v(1))).add(z.multiply(new g(t.multiply(F),0))).add(W.multiply(new g(y,0)));return{glPosition:new f(K.xy,n.add(L),new v(1)),color:e,opacity:p,haloWidth:l,haloColor:i,size:J,tex:P}}fragment(o){const t=new i,{color:e,tex:l,opacity:p,size:r,haloWidth:a,haloColor:s}=o,{isStencilPass:n,tileOpacity:d}=this.config;if(1===this.iconType){let o=e;const i=D(T(this.pageTexture,l)).subtract(new v(.5)).multiply(E).multiply(C(r.x,r.y));o=o.multiply(w(new v(.5).subtract(i),new v(0),new v(1))),t.fragColor=M(z(a,new v(.25)),this.getColorWithOutline(i,r,a,o,s,p),o.multiply(p)).multiply(d)}else{const o=T(this.pageTexture,l);W(S(n,new v(1)),b(o.a,L)),t.discard=W(S(n,new v(1)),b(o.a,L)),t.fragColor=o.multiply(p).multiply(d)}return t}getColorWithOutline(o,t,e,i,l,p){const r=E.multiply(O(e,q.multiply(C(t.x,t.y))));let a=l;return a=a.multiply(w(new v(.5).subtract(x(o).subtract(r)),new v(0),new v(1))),p.multiply(lo(i,a))}getSize(o){return this.sizeMix?.value&&o.size&&o.sizeTo?I(o.size,o.sizeTo,this.sizeMix.value):o.size?o.size:this.size?.value||new v(0)}getColor(o){return this.colorMix?.value&&o.color&&o.colorTo?I(o.color,o.colorTo,this.colorMix.value):o.color?o.color:this.color?.value||new f(0)}getOpacity(o){return this.opacityMix?.value&&o.opacity&&o.opacityTo?I(o.opacity,o.opacityTo,this.opacityMix.value):o.opacity?o.opacity:this.opacity?.value||new v(1)}getHaloColor(o){return this.haloColorMix?.value&&o.haloColor&&o.haloColorTo?I(o.haloColor,o.haloColorTo,this.haloColorMix.value):o.haloColor?o.haloColor:this.haloColor?.value||new f(1)}getHaloWidth(o){if(1===this.iconType){if(this.opacityMix?.value&&o.haloWidth&&o.haloWidthTo)return I(o.haloWidth,o.haloWidthTo,this.opacityMix.value);if(o.haloWidth)return o.haloWidth}return new v(0)}}function lo(o,t){const e=t.a.add(o.a.multiply(H(t.a))),i=t.rgb.add(o.rgb.multiply(H(t.a)));return new f(i,e)}o([p(P)],io.prototype,"view",void 0),o([p(B)],io.prototype,"tileContainer",void 0),o([p(A)],io.prototype,"tile",void 0),o([p(K)],io.prototype,"page",void 0),o([r(j)],io.prototype,"pageTexture",void 0),o([p(N)],io.prototype,"config",void 0),o([a(Q)],io.prototype,"size",void 0),o([a(R)],io.prototype,"sizeMix",void 0),o([a(X)],io.prototype,"opacity",void 0),o([a(Y)],io.prototype,"opacityMix",void 0),o([a(Z)],io.prototype,"color",void 0),o([a($)],io.prototype,"colorMix",void 0),o([a(_)],io.prototype,"haloColor",void 0),o([a(oo)],io.prototype,"haloColorMix",void 0),o([a(to)],io.prototype,"haloBlur",void 0),o([a(eo)],io.prototype,"haloBlurMix",void 0),o([s],io.prototype,"iconType",void 0),o([s],io.prototype,"rotationAlignmentMap",void 0),o([s],io.prototype,"translateAnchorViewport",void 0),o([t(0,n(F))],io.prototype,"vertex",null),o([t(0,n(J))],io.prototype,"fragment",null);export{io as VTLShaderIcon};
|
|
@@ -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{GraphShaderModule as o,FragmentOutput as i,location as l,uniform as
|
|
2
|
+
import{__decorate as t,__param as e}from"tslib";import{GraphShaderModule as o,FragmentOutput as i,location as l,uniform as r,define as p,option as a,texture as s,input as d,FragmentInput as n,VertexInput as y,UniformGroup as u}from"../../../GraphShaderModule.js";import{Vec2 as v,Float as c,Vec3 as h,Vec4 as w,dot as f,length as m,clamp as x,fract as g,mix as T,texture2D as b,Sampler2D as M}from"../../../graph/glsl.js";import{Tile as C}from"../Tile.js";import{TileInfo as z}from"../TileInfo.js";import{rgba2float as L}from"../utils.js";import{ViewInfo as O}from"../ViewInfo.js";const S=1/31,V=15.5,W=8;class j extends y{}t([l(0,v)],j.prototype,"position",void 0),t([l(1,w)],j.prototype,"extrudeOffset",void 0),t([l(2,w)],j.prototype,"directionNormal",void 0),t([l(3,v)],j.prototype,"accumulatedDistance",void 0),t([l(4,w)],j.prototype,"color",void 0),t([l(5,c)],j.prototype,"width",void 0),t([l(6,c)],j.prototype,"opacity",void 0),t([l(7,c)],j.prototype,"blur",void 0),t([l(8,c)],j.prototype,"offset",void 0),t([l(9,w)],j.prototype,"tlbr",void 0),t([l(10,w)],j.prototype,"colorTo",void 0),t([l(11,c)],j.prototype,"widthTo",void 0),t([l(12,c)],j.prototype,"opacityTo",void 0),t([l(13,c)],j.prototype,"blurTo",void 0),t([l(14,c)],j.prototype,"offsetTo",void 0);class D extends u{}t([r(v)],D.prototype,"lineTranslation",void 0),t([r(c)],D.prototype,"depth",void 0);class R extends u{}t([r(v)],R.prototype,"mosaicSize",void 0);class I extends u{}t([r(c)],I.prototype,"tileOpacity",void 0);class B extends u{}t([r(w)],B.prototype,"value",void 0);class N extends u{}t([r(c)],N.prototype,"value",void 0);class A extends u{}t([r(c)],A.prototype,"value",void 0);class F extends u{}t([r(c)],F.prototype,"value",void 0);class G extends u{}t([r(c)],G.prototype,"value",void 0);class P extends u{}t([r(c)],P.prototype,"value",void 0);class Z extends u{}t([r(c)],Z.prototype,"value",void 0);class k extends u{}t([r(c)],k.prototype,"value",void 0);class q extends u{}t([r(c)],q.prototype,"value",void 0);class E extends u{}t([r(c)],E.prototype,"value",void 0);class H extends u{}t([r(w)],H.prototype,"value",void 0);class J extends o{constructor(){super(...arguments),this.type="VTLShaderLine"}vertex(t){const e=this.getColor(t).multiply(this.getOpacity(t)),o=this.getBlur(t).add(this.view.antialiasing),i=t.directionNormal.zw.multiply(S);let l=this.getTLBR(t);const r=this.getWidth(t);let p=new v(0),a=new c(1);1!==this.lineType&&2!==this.lineType||(p=new v(l.z.subtract(l.x),l.y.subtract(l.w)),l=l.divide(this.page.mosaicSize.xyxy),a=1===this.lineType?r.divide(p.y):r.divide(V).multiply(.5));const s=new c(r.add(this.view.antialiasing)).multiply(.5),d=t.directionNormal.xy.multiply(S),n=t.extrudeOffset.zw.multiply(S).multiply(this.getOffset(t)),y=s.multiply(S).multiply(t.extrudeOffset.xy),u=this.tile.getZoomFactor(this.view,this.tileContainer),m=new c(W).divide(u),x=this.tile.getDisplayViewScreenMat3(this.view,this.tileContainer).multiply(new h(t.position.add(n.multiply(m)),1)),g=this.translateAnchorViewport?this.view.displayMat3:this.view.displayViewMat3,T=new h(this.view.displayViewMat3.multiply(new h(y,0))).add(g.multiply(new h(this.layerInfo.lineTranslation,0))),b=x.add(T),M=new w(b.xy,this.layerInfo.depth,1);let C=new c(0);return 1!==this.lineType&&2!==this.lineType||(C=t.accumulatedDistance.x.multiply(u.divide(new c(W))).add(f(d,y.add(n)))),{glPosition:M,color:e,tlbr:l,normal:i,patternSize:p,widthRatio:a,halfLineWidth:s,blur:o,accumulatedDistance:C}}fragment(t){const e=new i,o=m(t.normal).multiply(t.halfLineWidth),l=new c(t.halfLineWidth.subtract(o)).divide(t.blur),r=x(l,new c(0),new c(1));if(1===this.lineType){const o=g(t.accumulatedDistance.divide(t.patternSize.x.multiply(t.widthRatio))),i=new c(.5).add(t.normal.y.multiply(t.halfLineWidth.divide(t.patternSize.y.multiply(t.widthRatio)))),l=T(t.tlbr.xy,t.tlbr.zw,new v(o,i)),p=b(this.pageTexture,l);e.fragColor=p.multiply(r).multiply(t.color.a)}else if(2===this.lineType){const o=g(t.accumulatedDistance.multiply(.5).divide(t.patternSize.x.multiply(t.widthRatio))),i=new c(.5).add(new c(.25).multiply(t.normal.y)),l=T(t.tlbr.xy,t.tlbr.zw,new v(o,i)),p=L(b(this.pageTexture,l)).subtract(new c(.5)).multiply(t.halfLineWidth.add(this.view.antialiasing.multiply(.5)));e.fragColor=r.multiply(x(new c(.5).subtract(p),new c(0),new c(1))).multiply(t.color)}else e.fragColor=t.color.multiply(r);return e.fragColor=this.tileConfig.tileOpacity.multiply(e.fragColor),e}getColor(t){return this.colorMix?.value&&t.color&&t.colorTo?T(t.color,t.colorTo,this.colorMix.value):t.color?t.color:this.color?.value||new w(0)}getWidth(t){return this.widthMix?.value&&t.width&&t.widthTo?T(t.width,t.widthTo,this.widthMix.value):t.width?t.width:this.width?.value||new c(0)}getBlur(t){return this.blurMix?.value&&t.blur&&t.blurTo?T(t.blur,t.blurTo,this.blurMix.value):t.blur?t.blur:this.blur?.value||new c(0)}getOpacity(t){return this.opacityMix?.value&&t.opacity&&t.opacityTo?T(t.opacity,t.opacityTo,this.opacityMix.value):t.opacity?t.opacity:this.opacity?.value||new c(1)}getOffset(t){return this.offsetMix?.value&&t.offset&&t.offsetTo?T(t.offset,t.offsetTo,this.offsetMix.value):t.offset?t.offset:this.offset?.value||new c(0)}getTLBR(t){return t.tlbr?t.tlbr:this.tlbr?.value||new w(0)}}t([p],J.prototype,"lineType",void 0),t([p],J.prototype,"translateAnchorViewport",void 0),t([r(O)],J.prototype,"view",void 0),t([r(z)],J.prototype,"tileContainer",void 0),t([r(C)],J.prototype,"tile",void 0),t([r(D)],J.prototype,"layerInfo",void 0),t([r(I)],J.prototype,"tileConfig",void 0),t([a(R)],J.prototype,"page",void 0),t([a(B)],J.prototype,"color",void 0),t([a(N)],J.prototype,"colorMix",void 0),t([a(A)],J.prototype,"width",void 0),t([a(F)],J.prototype,"widthMix",void 0),t([a(G)],J.prototype,"opacity",void 0),t([a(P)],J.prototype,"opacityMix",void 0),t([a(Z)],J.prototype,"blur",void 0),t([a(k)],J.prototype,"blurMix",void 0),t([a(q)],J.prototype,"offset",void 0),t([a(E)],J.prototype,"offsetMix",void 0),t([a(H)],J.prototype,"tlbr",void 0),t([s(M)],J.prototype,"pageTexture",void 0),t([e(0,d(j))],J.prototype,"vertex",null),t([e(0,d(n))],J.prototype,"fragment",null);export{J as VTLShaderLine};
|
package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderOutline.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as o,__param as t}from"tslib";import{GraphShaderModule as e,FragmentOutput as i,location as p,uniform as r,option as l,define as s,input as a,VertexInput as n,UniformGroup as y,FragmentInput as c}from"../../../GraphShaderModule.js";import{Float as d,Vec3 as v,Vec4 as u,length as h,smoothstep as m,mix as
|
|
2
|
+
import{__decorate as o,__param as t}from"tslib";import{GraphShaderModule as e,FragmentOutput as i,location as p,uniform as r,option as l,define as s,input as a,VertexInput as n,UniformGroup as y,FragmentInput as c}from"../../../GraphShaderModule.js";import{Float as d,Vec3 as v,Vec4 as u,length as h,smoothstep as m,mix as w,Vec2 as f}from"../../../graph/glsl.js";import{Tile as x}from"../Tile.js";import{TileInfo as g}from"../TileInfo.js";import{ViewInfo as T}from"../ViewInfo.js";const M=new d(1/15);class V extends n{}o([p(0,f)],V.prototype,"position",void 0),o([p(1,f)],V.prototype,"offset",void 0),o([p(2,f)],V.prototype,"normal",void 0),o([p(3,u)],V.prototype,"color",void 0),o([p(4,d)],V.prototype,"opacity",void 0),o([p(5,u)],V.prototype,"colorTo",void 0),o([p(6,d)],V.prototype,"opacityTo",void 0);class j extends c{}class C extends y{}o([r(f)],C.prototype,"fillTranslation",void 0),o([r(d)],C.prototype,"depth",void 0),o([r(d)],C.prototype,"outlineWidth",void 0);class O extends y{}o([r(d)],O.prototype,"value",void 0);class S extends y{}o([r(d)],S.prototype,"value",void 0);class A extends y{}o([r(u)],A.prototype,"value",void 0);class I extends y{}o([r(d)],I.prototype,"value",void 0);class W extends e{constructor(){super(...arguments),this.type="VTLShaderOutline"}vertex(o){const t=this.getColor(o).multiply(this.getOpacity(o)),{normal:e,offset:i}=o,{depth:p,outlineWidth:r,fillTranslation:l}=this.config,s=r.multiply(M).multiply(i),a=this.translateAnchorViewport?this.view.displayMat3:this.view.displayViewMat3,n=new v(this.tile.getDisplayViewScreenMat3(this.view,this.tileContainer).multiply(new v(o.position,1))).add(a.multiply(new v(s.add(l),0)));return{glPosition:new u(n.xy,p,new d(1)),color:t,normal:e}}fragment(o){const t=new i,{color:e,normal:p}=o,r=h(p),l=m(new d(1),new d(0),r);return t.fragColor=e.multiply(l),t}getColor(o){return this.colorMix?.value&&o.color&&o.colorTo?w(o.color,o.colorTo,this.colorMix.value):o.color?o.color:this.color?.value||new u(0)}getOpacity(o){return this.opacityMix?.value&&o.opacity&&o.opacityTo?w(o.opacity,o.opacityTo,this.opacityMix.value):o.opacity?o.opacity:this.opacity?.value||new d(1)}}o([r(T)],W.prototype,"view",void 0),o([r(g)],W.prototype,"tileContainer",void 0),o([r(x)],W.prototype,"tile",void 0),o([r(C)],W.prototype,"config",void 0),o([l(O)],W.prototype,"opacity",void 0),o([l(S)],W.prototype,"opacityMix",void 0),o([l(A)],W.prototype,"color",void 0),o([l(I)],W.prototype,"colorMix",void 0),o([s],W.prototype,"translateAnchorViewport",void 0),o([t(0,a(V))],W.prototype,"vertex",null),o([t(0,a(j))],W.prototype,"fragment",null);export{W as VTLShaderOutline};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as o,__param as t}from"tslib";import{GraphShaderModule as e,FragmentOutput as i,location as l,uniform as p,option as a,texture as r,define as s,input as d,VertexInput as n,UniformGroup as h,FragmentInput as y}from"../../../GraphShaderModule.js";import{mod as v,Float as u,unpackVec4 as c,ifElse as w,greaterThan as x,clamp as m,step as g,lessThan as
|
|
2
|
+
import{__decorate as o,__param as t}from"tslib";import{GraphShaderModule as e,FragmentOutput as i,location as l,uniform as p,option as a,texture as r,define as s,input as d,VertexInput as n,UniformGroup as h,FragmentInput as y}from"../../../GraphShaderModule.js";import{mod as v,Float as u,unpackVec4 as c,ifElse as w,greaterThan as x,clamp as m,step as g,lessThan as M,Vec3 as T,Vec4 as f,texture2D as C,smoothstep as z,mix as W,Vec2 as B,Sampler2D as S}from"../../../graph/glsl.js";import{Tile as V}from"../Tile.js";import{TileInfo as j}from"../TileInfo.js";import{oneMinus as A}from"../utils.js";import{ViewInfo as H}from"../ViewInfo.js";class I extends n{}o([l(0,f)],I.prototype,"positionAndOffset",void 0),o([l(1,f)],I.prototype,"iconInfo",void 0),o([l(2,u)],I.prototype,"size",void 0),o([l(3,u)],I.prototype,"opacity",void 0),o([l(4,f)],I.prototype,"color",void 0),o([l(5,f)],I.prototype,"haloColor",void 0),o([l(6,u)],I.prototype,"haloWidth",void 0),o([l(7,u)],I.prototype,"haloBlur",void 0),o([l(8,u)],I.prototype,"sizeTo",void 0),o([l(9,u)],I.prototype,"opacityTo",void 0),o([l(10,f)],I.prototype,"colorTo",void 0),o([l(11,f)],I.prototype,"haloColorTo",void 0),o([l(12,u)],I.prototype,"haloWidthTo",void 0),o([l(13,u)],I.prototype,"haloBlurTo",void 0),o([l(14,u)],I.prototype,"opacityInfo",void 0);class O extends y{}class b extends h{}o([p(u)],b.prototype,"halo",void 0),o([p(u)],b.prototype,"depth",void 0),o([p(u)],b.prototype,"level",void 0),o([p(u)],b.prototype,"keepUpright",void 0),o([p(u)],b.prototype,"fadeDuration",void 0),o([p(u)],b.prototype,"time",void 0),o([p(u)],b.prototype,"isStencilPass",void 0),o([p(u)],b.prototype,"antialiasingWidth",void 0),o([p(B)],b.prototype,"textTranslation",void 0),o([p(u)],b.prototype,"tileOpacity",void 0);class D extends h{}o([p(B)],D.prototype,"mosaicSize",void 0);class k extends h{}o([p(u)],k.prototype,"value",void 0);class P extends h{}o([p(u)],P.prototype,"value",void 0);class U extends h{}o([p(f)],U.prototype,"value",void 0);class G extends h{}o([p(u)],G.prototype,"value",void 0);class L extends h{}o([p(f)],L.prototype,"value",void 0);class q extends h{}o([p(u)],q.prototype,"value",void 0);class E extends h{}o([p(u)],E.prototype,"value",void 0);class F extends h{}o([p(u)],F.prototype,"value",void 0);class J extends h{}o([p(u)],J.prototype,"value",void 0);class K extends h{}o([p(u)],K.prototype,"value",void 0);class N extends h{}o([p(u)],N.prototype,"value",void 0);class Q extends h{}o([p(u)],Q.prototype,"value",void 0);const R=new u(1/8),X=new u(1/24),Y=new u(3),Z=new u(256/360),$=new u(.75);class _ extends e{constructor(){super(...arguments),this.type="VTLShaderText"}vertex(o){const t=this.getSize(o),e=this.getHaloColor(o),i=this.getColor(o);let l=this.getHaloWidth(o),p=this.getHaloBlur(o);const a=this.getOpacity(o),{iconInfo:r,opacityInfo:s,positionAndOffset:d}=o,{antialiasingWidth:n,depth:h,halo:y,level:C,keepUpright:z,fadeDuration:W,textTranslation:B,time:S}=this.config,{mosaicSize:V}=this.page,j=this.rotationAlignmentMap?this.view.displayViewMat3:this.view.displayMat3,H=this.translateAnchorViewport?this.view.displayMat3:this.view.displayViewMat3,I=v(s,new u(128)),O=s.subtract(I).divide(new u(128)),b=I.divide(new u(127)),[D,k]=c(r,8);let P=w(x(y,new u(.5)),e.multiply(a),i.multiply(a));l=w(x(y,new u(.5)),l.multiply(Y),new u(0)),p=w(x(y,new u(.5)),p.multiply(Y),new u(0));const U=m(b.add(new u(2).multiply(O.subtract(new u(.5)).multiply(S.divide(W)))),new u(0),new u(1));P=P.multiply(U);const G=k[1],L=k[2],q=k[3],E=D.xy.divide(V),F=D.z,J=D.w,K=v(this.view.rotation.multiply(Z),new u(256)),N=v(G.add(K),new u(256));let Q=new u(0);Q=w(M(F,J),A(g(z,new u(0))).multiply(g(J,N).add(A(g(F,N)))),A(g(z,new u(0))).multiply(g(J,N).multiply(A(g(F,N))))),Q=Q.add(A(g(L,C))),Q=Q.add(g(q,C)),Q=Q.add(g(P[3],new u(0)));const _=$.subtract(l.divide(t)),oo=n.add(p).divide(t),to=this.tile.getDisplayViewScreenMat3(this.view,this.tileContainer).multiply(new T(d.xy,new u(1))).add(j.multiply(X).multiply(new T(R.multiply(t.multiply(d.zw)),new u(0)))).add(H.multiply(new T(B,0)));return{glPosition:new f(to.xy,h.add(Q),new u(1)),color:P,tex:E,edgeDistance:_,edgeWidth:oo}}fragment(o){const t=new i,{color:e,tex:l,edgeDistance:p,edgeWidth:a}=o,{tileOpacity:r}=this.config,s=C(this.pageTexture,l).a,d=z(p.subtract(a),p.add(a),s);return t.fragColor=e.multiply(d).multiply(r),t}getSize(o){return this.sizeMix?.value&&o.size&&o.sizeTo?W(o.size,o.sizeTo,this.sizeMix.value):o.size?o.size:this.size?.value||new u(0)}getHaloColor(o){return this.haloColorMix?.value&&o.haloColor&&o.haloColorTo?W(o.haloColor,o.haloColorTo,this.haloColorMix.value):o.haloColor?o.haloColor:this.haloColor?.value||new f(0)}getHaloBlur(o){return this.haloBlurMix?.value&&o.haloBlur&&o.haloBlurTo?W(o.haloBlur,o.haloBlurTo,this.haloBlurMix.value):o.haloBlur?o.haloBlur:this.haloBlur?.value||new u(0)}getHaloWidth(o){return this.haloWidthMix?.value&&o.haloWidth&&o.haloWidthTo?W(o.haloWidth,o.haloWidthTo,this.haloWidthMix.value):o.haloWidth?o.haloWidth:this.haloWidth?.value||new u(0)}getColor(o){return this.colorMix?.value&&o.color&&o.colorTo?W(o.color,o.colorTo,this.colorMix.value):o.color?o.color:this.color?.value||new f(0)}getOpacity(o){return this.opacityMix?.value&&o.opacity&&o.opacityTo?W(o.opacity,o.opacityTo,this.opacityMix.value):o.opacity?o.opacity:this.opacity?.value||new u(1)}}o([p(H)],_.prototype,"view",void 0),o([p(j)],_.prototype,"tileContainer",void 0),o([p(V)],_.prototype,"tile",void 0),o([p(b)],_.prototype,"config",void 0),o([p(D)],_.prototype,"page",void 0),o([a(N)],_.prototype,"size",void 0),o([a(U)],_.prototype,"color",void 0),o([a(L)],_.prototype,"haloColor",void 0),o([a(E)],_.prototype,"haloWidth",void 0),o([a(F)],_.prototype,"haloBlur",void 0),o([a(k)],_.prototype,"opacity",void 0),o([a(Q)],_.prototype,"sizeMix",void 0),o([a(G)],_.prototype,"colorMix",void 0),o([a(q)],_.prototype,"haloColorMix",void 0),o([a(J)],_.prototype,"haloWidthMix",void 0),o([a(K)],_.prototype,"haloBlurMix",void 0),o([a(P)],_.prototype,"opacityMix",void 0),o([r(S)],_.prototype,"pageTexture",void 0),o([s],_.prototype,"rotationAlignmentMap",void 0),o([s],_.prototype,"translateAnchorViewport",void 0),o([t(0,d(I))],_.prototype,"vertex",null),o([t(0,d(O))],_.prototype,"fragment",null);export{_ as VTLShaderText};
|
|
@@ -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{labelU16ZoomPrecisionFactor as i,labelPlacementOffsetPadding as o,packDegreesU8 as s}from"../../../definitions.js";import{location as l,option as a,uniform as r,texture as n,define as p,input as d,ComputeVertexInput as u}from"../../GraphShaderModule.js";import{Vec4 as y,Vec2 as c,Float as m,Sampler2D as h,mod as f,floor as v,step as w,and as b,lessThan as x,greaterThanEqual as V,Vec3 as S,Mat3 as g,ifElse as z,equal as R,greaterThan as j,Bool as A,texture2D as
|
|
2
|
+
import{__decorate as t,__param as e}from"tslib";import{labelU16ZoomPrecisionFactor as i,labelPlacementOffsetPadding as o,packDegreesU8 as s}from"../../../definitions.js";import{location as l,option as a,uniform as r,texture as n,define as p,input as d,ComputeVertexInput as u}from"../../GraphShaderModule.js";import{Vec4 as y,Vec2 as c,Float as m,Sampler2D as h,mod as f,floor as v,step as w,and as b,lessThan as x,greaterThanEqual as V,Vec3 as S,Mat3 as g,ifElse as z,equal as R,greaterThan as j,Bool as A,texture2D as C,smoothstep as M,Int as O,bitRShift as T,bitAnd as H}from"../../graph/glsl.js";import{FeatureVertexInput as L,AFeatureShader as P,FeatureFragmentInput as F}from"../shaders/AFeatureShader.js";import{bitsetTextIsBackground as N,bitsetTextIsMapAligned as U,noHit as _,trueHit as k}from"../shaders/constants.js";import{isRectHittest as D,distPointTriangle as q,hittestScreenRect as I}from"../shaders/hittestUtils.js";import{MosaicInfo as B}from"../shaders/MosaicInfo.js";import{getBit as E}from"../shaders/utils.js";import{VisualVariableColor as W}from"../shaders/VisualVariableColor.js";import{VisualVariableOpacity as G}from"../shaders/VisualVariableOpacity.js";import{VisualVariableRotation as Z}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 X}from"../shaders/VisualVariableSizeUnitValue.js";import{getVisualVariableSize as Y,getVisualVariableRotation as $}from"../shaders/vvUtils.js";const tt=1/s;class et extends L{}t([l(3,y)],et.prototype,"color",void 0),t([l(4,c)],et.prototype,"offset",void 0),t([l(5,c)],et.prototype,"textureUV",void 0),t([l(6,y)],et.prototype,"fontAndReferenceSize",void 0),t([l(7,y)],et.prototype,"outlineColor",void 0),t([l(8,y)],et.prototype,"haloColor",void 0),t([l(9,c)],et.prototype,"outlineAndHaloSize",void 0),t([l(10,c)],et.prototype,"zoomRange",void 0),t([l(11,m)],et.prototype,"clipAngle",void 0),t([l(12,y)],et.prototype,"referenceSymbol",void 0),t([l(15,m)],et.prototype,"visibility",void 0);class it extends u{}t([l(13,c)],it.prototype,"offsetNextVertex1",void 0),t([l(14,c)],it.prototype,"offsetNextVertex2",void 0);class ot extends F{}class st extends P{constructor(){super(...arguments),this.type="TextShader",this.computeAttributes={offset:["offsetNextVertex1","offsetNextVertex2"]},this.textRenderPassType=0,this.isBackgroundPass=!1,this.isLabel=!1}clipLabel(t,e){const{clipAngle:o,zoomRange:s,visibility:l}=t,a=o.multiply(tt),r=f(a.subtract(this.view.rotation),new m(360));let n=new m(0);const p=i,d=v(this.tileContainer.currentZoom.multiply(p)).divide(p),u=s.x,y=s.y,c=new m(1).subtract(w(u,d)).multiply(2),h=new m(b(V(r,new m(90)),x(r,new m(270)))).multiply(2),S=new m(2).multiply(new m(1).subtract(w(d,y)));return n=n.add(e.multiply(c)),n=n.add(e.multiply(h)),n=n.add(S),l&&(n=n.add(l)),n}vertex(t,e){const i=E(t.bitset,N),s=new m(1).subtract(i);let l=t.fontAndReferenceSize[0];const a=t.fontAndReferenceSize[1],r=t.fontAndReferenceSize[2],n=t.fontAndReferenceSize[3];let p=l.divide(r);const d=1===this.textRenderPassType?t.outlineColor:2===this.textRenderPassType?t.haloColor:this._getVertexColor(t),u=this.tile.getDisplayViewScreenMat3(this.view,this.tileContainer).multiply(new S(t.pos,1));let h=t.offset,f=new m(1),v=g.identity(),w=new c(0);if(this.isLabel){if(!t.referenceSymbol)throw new Error("InternalError: Optional attribute 'referenceSymbol' expected for labels");const e=t.referenceSymbol,i=e.xy,s=e.z,l=this._unpackDirection(e.w),a=Y(this,t.id,s).divide(2),r=l.multiply(a.add(o));w=i.add(r),h=h.add(w)}else{f=Y(this,t.id,a).divide(a),l=l.multiply(f),p=p.multiply(f),h=h.multiply(f),v=$(this,t.id),h=v.multiply(new S(h,0)).xy}const b=E(t.bitset,U),x=this._getViewRotationMatrix(b).multiply(new S(h,0)).multiply(this.tileContainer.scaleFactor);let V=this.isLabel?this.clipLabel(t,b):this.clip(t.id,t.zoomRange);V=this.isBackgroundPass?V.add(s.multiply(2)):V.add(i.multiply(2));let C=new m(0);if(1===this.textRenderPassType){V=V.add(z(R(t.outlineAndHaloSize.x,new m(0)),new m(2),new m(0)));C=new m(t.outlineAndHaloSize.x).divide(p).divide(n)}if(2===this.textRenderPassType){const e=t.outlineAndHaloSize.x,i=new m(t.outlineAndHaloSize.y);V=V.add(z(R(i,new m(0)),new m(2),new m(0)));C=i.add(e).divide(p).divide(n)}const M=this.isLabel?j(V,new m(1)):new A(!1);return{glPosition:new y(u.xy.add(x.xy),V,1),color:d,size:p,textureUV:t.textureUV.divide(this.mosaicInfo.size),antialiasingWidth:new m(.105).multiply(r).divide(l).divide(this.view.pixelRatio),outlineDistanceOffset:C,...this.maybeRunHittest(t,e,{vvSizeAdjustment:f,vvRotation:v,labelOffset:w,labelClipped:M,scaleFactor:this.tileContainer.scaleFactor})}}_getViewRotationMatrix(t){const e=this.view.displayViewMat3,i=this.view.displayMat3,o=new m(1).subtract(t);return e.multiply(t).add(i.multiply(o))}_getHittestAlignmentMatrix(t){const e=this.tile.getTileMat3(this.view,this.tileContainer),i=this.view.viewMat3.multiply(e),o=e,s=new m(1).subtract(t);return i.multiply(t).add(o.multiply(s))}fragment(t){const e=new m(2/8),i=new m(1).subtract(e),o=C(this.mosaicTexture,t.textureUV).a;let s=i.subtract(t.outlineDistanceOffset);this.highlight&&(s=s.divide(2));const l=t.antialiasingWidth,a=M(s.subtract(l),s.add(l),o);return this.getFragmentOutput(t.color.multiply(a),t)}computeHittestTriangle(t,e,{vvSizeAdjustment:i,vvRotation:o,labelOffset:s,scaleFactor:l}){let a,r,n;this.isLabel?(a=new S(t.offset.multiply(l).add(s),0),r=new S(e.offsetNextVertex1.multiply(l).add(s),0),n=new S(e.offsetNextVertex2.multiply(l).add(s),0)):(a=o.multiply(new S(t.offset.multiply(l).multiply(i),0)),r=o.multiply(new S(e.offsetNextVertex1.multiply(l).multiply(i),0)),n=o.multiply(new S(e.offsetNextVertex2.multiply(l).multiply(i),0)));const p=this.tile.getViewScreenMat3(this.view,this.tileContainer).multiply(new S(t.pos,1)),d=E(t.bitset,U),u=this._getHittestAlignmentMatrix(d);return{pos0:p.add(u.multiply(a)).xy,pos1:p.add(u.multiply(r)).xy,pos2:p.add(u.multiply(n)).xy}}hittest(t,e,i){const{vvSizeAdjustment:o,vvRotation:s,labelOffset:l,labelClipped:a,scaleFactor:r}=i,n=D(this.hittestRequest),{pos0:p,pos1:d,pos2:u}=this.computeHittestTriangle(t,e,{vvSizeAdjustment:o,vvRotation:s,labelOffset:l,scaleFactor:r});return z(n,()=>{const{tlbr:t}=this.hittestRequest;return this.isLabel?z(a,new m(_),I(p,d,u,t)):I(p,d,u,t)},()=>{const t=q(this.hittestRequest.position,p,d,u),e=this.isLabel?a:new A(!1);return z(e,new m(_),z(j(t,this.hittestRequest.distance),new m(_),new m(k)))})}_unpackDirection(t){const e=new O(t),i=T(e,new O(2)),o=H(e,new O(3));return new c(new m(i).subtract(1),new m(o).subtract(1))}_getVertexColor(t){let e=t.color;if(this.visualVariableColor){const i=this.getColorValue(t.id);e=this.visualVariableColor.getColor(i,t.color,new A(!1))}if(this.visualVariableOpacity){const i=this.getOpacityValue(t.id),o=this.visualVariableOpacity.getOpacity(i);e=e.multiply(o)}return e}}t([a(W)],st.prototype,"visualVariableColor",void 0),t([a(G)],st.prototype,"visualVariableOpacity",void 0),t([a(Z)],st.prototype,"visualVariableRotation",void 0),t([a(J)],st.prototype,"visualVariableSizeMinMaxValue",void 0),t([a(K)],st.prototype,"visualVariableSizeScaleStops",void 0),t([a(Q)],st.prototype,"visualVariableSizeStops",void 0),t([a(X)],st.prototype,"visualVariableSizeUnitValue",void 0),t([r(B)],st.prototype,"mosaicInfo",void 0),t([n(h)],st.prototype,"mosaicTexture",void 0),t([p],st.prototype,"textRenderPassType",void 0),t([p],st.prototype,"isBackgroundPass",void 0),t([p],st.prototype,"isLabel",void 0),t([e(0,d(et)),e(1,d(it))],st.prototype,"vertex",null),t([e(0,d(ot))],st.prototype,"fragment",null);export{ot as TextFragmentInput,st as TextShader,et as TextVertexInput};
|