@arcgis/core 5.2.0-next.72 → 5.2.0-next.73
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/00cbff0b785e24e87d97.js +1 -0
- package/assets/esri/core/workers/chunks/{359584a8fb5687a7d098.js → 014f9fd2818e2c9d9a3b.js} +1 -1
- package/assets/esri/core/workers/chunks/{3b3a8a6167f2e1eeb828.js → 0823961e5d0bdedbf8cf.js} +2 -2
- package/assets/esri/core/workers/chunks/{a62f1b8ed065b2a38f1a.js → 0dbf31a663b5220a3136.js} +1 -1
- package/assets/esri/core/workers/chunks/{fe10a95ebe1da2322af6.js → 0df660dfd941cff3ea1d.js} +1 -1
- package/assets/esri/core/workers/chunks/{d93d0cb69f3a9a722510.js → 1418c03c4ab87f7ab5f4.js} +1 -1
- package/assets/esri/core/workers/chunks/{c03da138651ac53cadcb.js → 186bedc377cc97731ca2.js} +2 -2
- package/assets/esri/core/workers/chunks/{fff23b2682590c4b21e3.js → 2a2ed7bd44010f24c2dd.js} +1 -1
- package/assets/esri/core/workers/chunks/2e44978ee677aa23163d.js +256 -0
- package/assets/esri/core/workers/chunks/{fc2cae359d571690d754.js → 35fd2f765d2cb3f59a22.js} +4 -4
- package/assets/esri/core/workers/chunks/{6b208bac120bcfecd9e4.js → 3e2b4e734aa20a308f3e.js} +1 -1
- package/assets/esri/core/workers/chunks/{fa19d5923276418096da.js → 44b50d4716a2567ab6f1.js} +1 -1
- package/assets/esri/core/workers/chunks/{50e0dd74795978468625.js → 4cf2b0558a4acc141429.js} +1 -1
- package/assets/esri/core/workers/chunks/{2d3a18d56e2e5669c562.js → 64176f7ae719289a2f79.js} +1 -1
- package/assets/esri/core/workers/chunks/{9684ab5e8254fdfcb7bb.js → 67f54586156d1ab80257.js} +1 -1
- package/assets/esri/core/workers/chunks/{2cfe6f41865ffb3a4645.js → 7e373d9c98ce910db9d2.js} +1 -1
- package/assets/esri/core/workers/chunks/{4da993c79b373b9d304e.js → 8302bffd28cc6720e0fe.js} +2 -2
- package/assets/esri/core/workers/chunks/{9dda9414104f585560a4.js → ad1d06a91121ebfe9162.js} +2 -2
- package/assets/esri/core/workers/chunks/{065e3353124fc5ac44ce.js → b33d870cbfa238762c5e.js} +1 -1
- package/assets/esri/core/workers/chunks/ba4f419f46be09a9a55c.js +1 -0
- package/assets/esri/core/workers/chunks/{684d3cb4fb233180b2d0.js → cd892c9603710d6130a9.js} +1 -1
- package/assets/esri/core/workers/chunks/{fa5d27e47d47ff8fcb96.js → d03e7be74c57c3dbf003.js} +2 -2
- package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
- package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
- package/chunks/Component.glsl.js +3 -3
- package/chunks/HUDMaterial.glsl.js +8 -8
- package/chunks/lyr3DMain.js +1 -1
- package/config.js +1 -1
- package/kernel.js +1 -1
- package/layers/ILyr3DWasmPerSceneView.js +1 -1
- package/layers/Lyr3DWasmPerSceneView.js +1 -1
- package/layers/support/tiles3DUtils.js +1 -1
- package/layers/video/VideoController.js +1 -1
- package/package.json +3 -3
- package/support/revision.js +1 -1
- package/views/2d/engine/Bitmap.js +1 -1
- package/views/2d/engine/BitmapTile.js +1 -1
- package/views/2d/engine/BitmapTileContainer.js +1 -1
- package/views/2d/engine/flow/FlowContainer.js +1 -1
- package/views/2d/engine/flow/FlowDisplayObject.js +1 -1
- package/views/2d/engine/flow/styles/Imagery.js +1 -1
- package/views/2d/engine/flow/styles/Particles.js +1 -1
- package/views/2d/engine/flow/styles/Streamlines.js +1 -1
- package/views/2d/engine/imagery/RasterBitmap.js +1 -1
- package/views/2d/engine/imagery/RasterTile.js +1 -1
- package/views/2d/engine/imagery/RasterTileContainer.js +1 -1
- package/views/2d/engine/imagery/RasterVFDisplayObject.js +1 -1
- package/views/2d/engine/imagery/RasterVFTile.js +1 -1
- package/views/2d/engine/imagery/RasterVFTileContainer.js +1 -1
- package/views/2d/engine/vectorTiles/VectorTileContainer.js +1 -1
- package/views/2d/engine/vectorTiles/VectorTileRendererHelper3D.js +1 -1
- package/views/2d/engine/webgl/Overlay.js +1 -1
- package/views/2d/engine/webgl/OverlayContainer.js +1 -1
- package/views/2d/engine/webgl/OverlayMultipoint.js +1 -1
- package/views/2d/engine/webgl/TileContainer.js +1 -1
- package/views/2d/engine/webgl/normalizedTileUtils.js +2 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AAnimatedShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedFillShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedLineShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimationUniformInfo.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/bitmap/BitmapTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/clip/ClipTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/createGraphicSymbolMeshSchemas.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityPointShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/drop-shadow/DropShadowTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/featureTechniqueUtils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/ComplexOutlineFillTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/FillMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/GradientFillMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/OutlineFillTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternOutlineFillTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/flow/FlowTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/line/GradientStrokeTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/line/LineMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/line/LineTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/line/TexturedLineTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/overlay/OverlayTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/pieChart/PieChartShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/RasterColorizerTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/RasterHighlightTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/VectorFieldTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/ReprojectTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/rasterVFUtils.js +2 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/AFeatureShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/BitmapShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/ClipShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/ComplexFillShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/ComplexOutlineFillShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/DebugOverlayShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/DropShadowShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/FillShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/GradientFillShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/GradientStrokeShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/HeatmapAccumulateShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/LineShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/OutlineFillShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/OverlayShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/PatternFillShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/PatternOutlineFillShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TexturedLineShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/Tile.js +2 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TileDebugInfoShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TileInfo.js +2 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TileStencilShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/ViewInfo.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/flow/FlowImageryShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/flow/FlowParticlesShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/flow/FlowStreamlinesShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/flow/FlowUtils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/hittestUtils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/BaseRasterColorizerShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/BaseRasterHighlightShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/MagDirShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/RasterVFTransform.js +2 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/ScalarShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/ReprojectShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderBackground.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderCircle.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderFill.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderIcon.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderLine.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderOutline.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderText.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/text/TextShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/tile/TileDebugInfoTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/tile/TileStencilTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/utility/DebugOverlayTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueBackground.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueCircle.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueFill.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueLine.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueSymbol.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/typed/TypedShaderProgram.js +1 -1
- package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
- package/views/2d/layers/MediaLayerView2D.js +1 -1
- package/views/2d/layers/TileLayerView2D.js +1 -1
- package/views/2d/layers/features/layerAdapters/AnnotationLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/DimensionLayerAdapter.js +1 -1
- package/views/2d/layers/features/schema/processor/symbols/ComplexSymbolSchema.js +1 -1
- package/views/2d/layers/support/DebugOverlay.js +1 -1
- package/views/3d/analysis/Dimension/LengthDimensionSubTool.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightAggregateManipulatedObject3D.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightPlacementController.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightReshapeTool3D.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightTool.js +1 -1
- package/views/3d/analysis/LineOfSight/lineOfSightPlacementUtils.js +1 -1
- package/views/3d/analysis/Slice/SliceTool.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedEditTool.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedTool.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillVisualization.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementShiftTool.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementTool.js +1 -1
- package/views/3d/interactive/editingTools/draw/DrawGraphicTool3D.js +1 -1
- package/views/3d/interactive/editingTools/move/MoveTool3D.js +1 -1
- package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +1 -1
- package/views/3d/interactive/editingTools/settings.js +1 -1
- package/views/3d/interactive/editingTools/transform/TransformTool3D.js +1 -1
- package/views/3d/interactive/manipulatorUtils.js +1 -1
- package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DTool.js +1 -1
- package/views/3d/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiles3D.js +1 -1
- package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/support/lyr3dTypeConversions.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/Component.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/NormalFromDepth.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/output/DepthConversion.glsl.js +14 -0
- package/views/3d/webgl-engine/core/shaderLibrary/output/ReadDepth.glsl.js +3 -15
- package/views/3d/webgl-engine/core/shaderLibrary/output/ReadDepthLastFrame.glsl.js +1 -1
- package/views/3d/webgl-engine/lib/BasisUtil.js +1 -1
- package/views/3d/webgl-engine/lib/ManagedTexture.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
- package/views/3d/webgl-engine/parts/RenderView.js +1 -1
- package/views/3d/webgl-engine/shaders/HUDMaterial.glsl.js +1 -1
- package/views/3d/webgl.js +1 -1
- package/views/VideoView.js +1 -1
- package/views/View.js +1 -1
- package/views/draw/DrawOperation.js +1 -1
- package/views/support/imageReprojection.js +1 -1
- package/assets/esri/core/workers/chunks/6357c7cac401aee9fe77.js +0 -1
- package/assets/esri/core/workers/chunks/d2faac81142586cf7509.js +0 -1
- package/assets/esri/core/workers/chunks/fd6107f95082e05f016a.js +0 -256
- package/views/2d/engine/webgl/shaderGraph/techniques/line/utils.js +0 -2
- /package/assets/esri/core/workers/chunks/{3b3a8a6167f2e1eeb828.js.LICENSE.txt → 0823961e5d0bdedbf8cf.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{c03da138651ac53cadcb.js.LICENSE.txt → 186bedc377cc97731ca2.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{4da993c79b373b9d304e.js.LICENSE.txt → 8302bffd28cc6720e0fe.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{9dda9414104f585560a4.js.LICENSE.txt → ad1d06a91121ebfe9162.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{fa5d27e47d47ff8fcb96.js.LICENSE.txt → d03e7be74c57c3dbf003.js.LICENSE.txt} +0 -0
package/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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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,
|
|
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,input as d,VertexInput 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
|
|
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};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{destroyMaybe as e}from"../../../../../../../core/maybe.js";import{fromValues as t}from"../../../../../../../core/libs/gl-matrix-2/factories/vec4f32.js";import{FeatureTile as
|
|
2
|
+
import{destroyMaybe as e}from"../../../../../../../core/maybe.js";import{fromValues as t}from"../../../../../../../core/libs/gl-matrix-2/factories/vec4f32.js";import{FeatureTile as i}from"../../../FeatureTile.js";import{Mesh as s}from"../../../meshing/Mesh.js";import{Technique as r}from"../Technique.js";import{getTileUniforms as o}from"../shaders/Tile.js";import{TileDebugInfoShader as n,TileDebugInfoOutlineShader as h}from"../shaders/TileDebugInfoShader.js";import{getTileContainerUniforms as u}from"../shaders/TileInfo.js";import{getViewUniforms as a}from"../shaders/ViewInfo.js";import{TileDebugInfoTexture as l}from"./TileDebugInfoTexture.js";import{PrimitiveType as d,DataType as m}from"../../../../../../webgl/enums.js";import{VertexElementDescriptor as p}from"../../../../../../webgl/VertexElementDescriptor.js";class c extends r{constructor(){super(...arguments),this.type=34,this.drawPhase=64,this.shaders={outline:new h,tileInfo:new n},this._outlineMesh=null,this._color=t(1,0,0,1),this._texture=new l}render(e,t){if(!(this.drawPhase&e.drawPhase))return;const{context:s,painter:r}=e;if(!t.isReady&&t instanceof i&&t.hasData)return;const n=this._getOutlineMesh(s),h=a(e),l=u(e),d=o(e.tilingScheme,t);r.setPipelineState({color:{write:[!0,!0,!0,!0],blendMode:"composite"},depth:!1,stencil:!1});const m={shader:this.shaders.outline,uniforms:{view:h,tileContainer:l,tile:d,config:{coordRange:[t.rangeX,t.rangeY],depth:0,color:this._color}},textures:void 0,defines:void 0,optionalAttributes:void 0,useComputeBuffer:!1};r.submitDrawMeshUntyped(s,m,n);const p=this._texture.getTexture(s,t);r.setPipelineState({color:{write:[!0,!0,!0,!0],blendMode:"composite"},depth:!1,stencil:!1});const c={shader:this.shaders.tileInfo,uniforms:{view:h,tileContainer:l,tile:d,config:{depth:0,coordRatio:[t.rangeX/t.width,t.rangeY/t.height],delta:[0,0],dimensions:[p.descriptor.width,p.descriptor.height]}},textures:{texture:{texture:p,unit:0}},defines:void 0,optionalAttributes:void 0,useComputeBuffer:!1};r.submitDrawMesh(s,c,r.quadMesh)}shutdown(){this._outlineMesh=e(this._outlineMesh),this._texture.shutdown()}_getOutlineMesh(e){return this._outlineMesh||(this._outlineMesh=new s(e,{vertex:{geometry:{data:new Int8Array([0,0,1,0,1,1,0,1]),layout:[new p("position",2,m.BYTE,0,2)]}},groups:[{primitive:d.LINE_LOOP}],parts:[{group:0,start:0,count:4}]})),this._outlineMesh}}export{c as TileDebugInfoTechnique};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{fromValues as e}from"../../../../../../../core/libs/gl-matrix-2/factories/vec4f32.js";import{Technique as s}from"../Technique.js";import{
|
|
2
|
+
import{fromValues as e}from"../../../../../../../core/libs/gl-matrix-2/factories/vec4f32.js";import{Technique as s}from"../Technique.js";import{getTileUniforms as t}from"../shaders/Tile.js";import{getTileContainerUniforms as r}from"../shaders/TileInfo.js";import{TileStencilShader as i}from"../shaders/TileStencilShader.js";import{getViewUniforms as o}from"../shaders/ViewInfo.js";class a extends s{constructor(){super(...arguments),this.type=35,this.drawPhase=211,this.shaders={tileStencil:new i},this._color=e(1,0,0,1)}render(e,s,i){if(!(this.drawPhase&e.drawPhase&&s.visible))return;const{context:a,painter:n}=e,l=i?.rasterVF??null;n.setPipelineState({color:!1,depth:!1,stencil:{write:{mask:255},test:{compare:516,op:{fail:7680,zFail:7680,zPass:7681},mask:255}}});const c={shader:this.shaders.tileStencil,uniforms:{view:o(e),tileContainer:r(e),tile:t(e.tilingScheme,s),config:{coordRange:[s.rangeX,s.rangeY],depth:0,color:this._color},rasterVF:l},textures:void 0,defines:{isRasterVF:null!=l},optionalAttributes:void 0,useComputeBuffer:!1};n.submitDrawMesh(a,c,n.quadMesh,{stencilRef:s.stencilRef})}}export{a as TileStencilTechnique};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{destroyMaybe as e}from"../../../../../../../core/maybe.js";import{Mesh as t}from"../../../meshing/Mesh.js";import{Technique as s}from"../Technique.js";import{DebugOverlayShader as i}from"../shaders/DebugOverlayShader.js";import{PrimitiveType as
|
|
2
|
+
import{destroyMaybe as e}from"../../../../../../../core/maybe.js";import{Mesh as t}from"../../../meshing/Mesh.js";import{Technique as s}from"../Technique.js";import{DebugOverlayShader as i}from"../shaders/DebugOverlayShader.js";import{getViewUniforms as r}from"../shaders/ViewInfo.js";import{PrimitiveType as o,DataType as n}from"../../../../../../webgl/enums.js";import{VertexElementDescriptor as a}from"../../../../../../webgl/VertexElementDescriptor.js";class h extends s{constructor(){super(...arguments),this.type=27,this.shaders={debugOverlay:new i},this._mesh=null}shutdown(){this._mesh=e(this._mesh)}render(e,t){const{context:s,painter:i}=e,o=this._getMesh(e,t.mesh);i.setPipelineState({color:{write:[!0,!0,!0,!0],blendMode:"composite"},depth:!1,stencil:!1}),i.submitDrawMeshUntyped(s,{shader:this.shaders.debugOverlay,uniforms:{view:r(e),config:{colors:m(t.colors),opacities:t.opacities}},textures:void 0,defines:void 0,optionalAttributes:void 0,useComputeBuffer:!1},o)}_getMesh(e,s){return this._mesh?(this._mesh.vertexBuffers.get("vertices")?.setData(s.vertexData),this._mesh.indexBuffers.get("indices")?.setData(s.indexData),this._mesh.parts[0].count=s.indexData.length):this._mesh=new t(e.context,{vertex:{vertices:{data:s.vertexData,layout:[new a("positionAndFlags",3,n.SHORT,0,6)]}},index:{indices:{data:s.indexData}},groups:[{index:"indices",primitive:o.TRIANGLES}],parts:[{group:0,start:0,count:s.indexData.length}]}),this._mesh}}function m(e){return[[e[0],e[1],e[2],e[3]],[e[4],e[5],e[6],e[7]],[e[8],e[9],e[10],e[11]],[e[12],e[13],e[14],e[15]]]}export{h as DebugOverlayTechnique};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{nextPowerOfTwo as t}from"../../../../../../../core/mathUtils.js";import{create as e}from"../../../../../../../core/libs/gl-matrix-2/factories/mat3f32.js";import{fromValues as r}from"../../../../../../../core/libs/gl-matrix-2/factories/vec4f32.js";import{getDefinesKey as o}from"../../../../vectorTiles/shaders/vtlMaterialUtils.js";import{vtlTextureBindingUnitSprites as s,vtlHighResCutoff as i}from"../../../definitions.js";import{Mesh as a}from"../../../meshing/Mesh.js";import{simplePipelineState as n}from"../../utils.js";import{Technique as l}from"../Technique.js";import{
|
|
2
|
+
import{nextPowerOfTwo as t}from"../../../../../../../core/mathUtils.js";import{create as e}from"../../../../../../../core/libs/gl-matrix-2/factories/mat3f32.js";import{fromValues as r}from"../../../../../../../core/libs/gl-matrix-2/factories/vec4f32.js";import{getDefinesKey as o}from"../../../../vectorTiles/shaders/vtlMaterialUtils.js";import{vtlTextureBindingUnitSprites as s,vtlHighResCutoff as i}from"../../../definitions.js";import{Mesh as a}from"../../../meshing/Mesh.js";import{simplePipelineState as n}from"../../utils.js";import{Technique as l}from"../Technique.js";import{getTileUniforms as c}from"../shaders/Tile.js";import{getTileContainerUniforms as m}from"../shaders/TileInfo.js";import{getViewUniforms as h}from"../shaders/ViewInfo.js";import{VTLShaderBackground as u}from"../shaders/vector-tiles/VTLShaderBackground.js";import{PrimitiveType as p}from"../../../../../../webgl/enums.js";function d(t,e){return{color:t.getPaintValue("background-color",e),opacity:t.getPaintValue("background-opacity",e),pattern:t.getPaintValue("background-pattern",Math.floor(e))}}class f extends l{constructor(){super(...arguments),this.type=38,this._color=r(1,0,0,1),this._patternMatrix=e(),this._mesh=null,this.shaders={background:new u}}render(r,a){if(0===a.tiles.length)return;this._loadResources(r);const{context:l,displayLevel:u,painter:p,spriteMosaic:f,styleLayer:g}=r,y=g,_=y.backgroundMaterial,{color:x,opacity:M,pattern:b}=d(y,u),j=void 0!==b,v=1|window.devicePixelRatio;let w,k;const P=_.key+o({hasPattern:j}),R=v>i?2:1,T={layerInfo:{depth:y.z,coordRange:a.tiles[0].rangeX},tileContainer:m(r),tile:c(r.tilingScheme,a.tiles[0]),view:h(r),solidColor:null,pattern:null,patternMat:{mat:e()}};let I=null;if(j){const t=f.getMosaicItemPosition(b,!0);if(null==t)return;{const{tl:e,br:r,page:o}=t;w=r[0]-e[0],k=r[1]-e[1];const i=f.getPageSize(o);null!=i&&(f.bind(l,9729,o,s),T.pattern={tlbr:[e[0],e[1],r[0],r[1]],mosaicSize:i,opacity:M},I={patternTexture:{texture:f.getTexture(o),unit:s}})}}else{const t=x[3]*M;this._color[0]=t*x[0],this._color[1]=t*x[1],this._color[2]=t*x[2],this._color[3]=t,T.solidColor={color:this._color}}p.setPipelineState(n);for(const e of a.tiles){if(T.tile=c(r.tilingScheme,e),T.layerInfo.coordRange=e.rangeX,j){const r=Math.max(2**(Math.round(u)-e.key.level),1),o=R*e.width*r,s=o/t(w),i=o/t(k);this._patternMatrix[0]=s,this._patternMatrix[4]=i,T.patternMat={mat:this._patternMatrix}}const o={shader:this.shaders.background,uniforms:T,textures:I,defines:{renderMode:j?1:0},optionalAttributes:_.getUsedAttributes(),useComputeBuffer:!1,precisionFactors:_.getPrecisionFactors(),materialKey:P};p.submitDrawMeshUntyped(l,o,this._mesh,{stencilRef:e.stencilRef})}}shutdown(){this._mesh&&(this._mesh.destroy(),this._mesh=null)}_loadResources(t){if(this._mesh)return;const{context:e,styleLayer:r}=t,o=r,s=new Int16Array([0,0,1,0,0,1,1,1]),i=o.backgroundMaterial.geometryLayout;if(!i)return;const n={vertex:{geometryVB:{data:s,layout:i}},groups:[{primitive:p.TRIANGLE_STRIP}],parts:[{group:0,start:0,count:4}]};this._mesh=new a(e,n)}}export{f as VTLTechniqueBackground,d as getBackgroundPaintValues};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{simplePipelineState as e}from"../../utils.js";import{Technique as t}from"../Technique.js";import{
|
|
2
|
+
import{simplePipelineState as e}from"../../utils.js";import{Technique as t}from"../Technique.js";import{getTileUniforms as i}from"../shaders/Tile.js";import{getTileContainerUniforms as l}from"../shaders/TileInfo.js";import{getViewUniforms as s}from"../shaders/ViewInfo.js";import{VTLShaderCircle as r}from"../shaders/vector-tiles/VTLShaderCircle.js";class n extends t{constructor(){super(...arguments),this.type=39,this._mesh=null,this.shaders={circle:new r}}shutdown(){this._mesh=null}render(t,r){const{context:n,displayLevel:o,drawPhase:a,painter:c,requiredLevel:u,spriteMosaic:h,styleLayer:d,styleLayerUID:f}=t,{tiles:m}=r;if(!m.some(e=>e.layerData.get(f)?.circleIndexCount??!1))return;const p=d,{circleMaterial:y}=p,g=1.2,x=p.getPaintValue("circle-translate",o),k=1===p.getPaintValue("circle-translate-anchor",o),M={view:s(t),tileContainer:l(t),tile:i(t.tilingScheme,m[0]),config:{circleTranslation:x,depth:p.z,antialiasingWidth:g,tileOpacity:1},radius:null,radiusMix:null,blur:null,blurMix:null,opacity:null,opacityMix:null,strokeOpacity:null,strokeOpacityMix:null,strokeWidth:null,strokeWidthMix:null,color:null,colorMix:null,strokeColor:null,strokeColorMix:null};let v=-1;for(const l of m){if(!l.layerData.has(f))continue;if(M.tile=i(t.tilingScheme,l),l.key.level!==v){v=l.key.level;const e=y.getUniforms();for(const t of e){const e=t.getValue(p,o,v,h);t.name in M&&(M[t.name]={value:e})}}const s=l.layerData.get(f);if(!s.circleIndexCount||s.isDestroyed)continue;if(this._mesh=s.getMesh(n),!this._mesh)continue;const r=u!==l.key.level?514:516,d=u!==l.key.level?l.stencilRef:255;M.config.tileOpacity=1===a?l.fader.value():1,c.setPipelineState({...e,stencil:{write:!1,test:{compare:r,op:{fail:7680,zFail:7680,zPass:7681},mask:255}}});const m={shader:this.shaders.circle,uniforms:M,textures:null,defines:{translateAnchorViewport:k},optionalAttributes:y.getUsedAttributes(),useComputeBuffer:!1,precisionFactors:y.getPrecisionFactors()};c.submitDrawMeshUntyped(n,m,this._mesh,{stencilRef:d}),l.triangleCount+=s.circleIndexCount/3}}}export{n as VTLTechniqueCircle};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{getDefinesKey as t}from"../../../../vectorTiles/shaders/vtlMaterialUtils.js";import{vtlTextureBindingUnitSprites as e,vtlHighResCutoff as i}from"../../../definitions.js";import{Technique as l}from"../Technique.js";import{
|
|
2
|
+
import{getDefinesKey as t}from"../../../../vectorTiles/shaders/vtlMaterialUtils.js";import{vtlTextureBindingUnitSprites as e,vtlHighResCutoff as i}from"../../../definitions.js";import{Technique as l}from"../Technique.js";import{getTileUniforms as n}from"../shaders/Tile.js";import{getTileContainerUniforms as s}from"../shaders/TileInfo.js";import{getViewUniforms as o}from"../shaders/ViewInfo.js";import{VTLShaderFill as a}from"../shaders/vector-tiles/VTLShaderFill.js";import{VTLShaderOutline as r}from"../shaders/vector-tiles/VTLShaderOutline.js";const u=1/65536;class c extends l{constructor(){super(...arguments),this.type=40,this._fillMesh=null,this._outlineMesh=null,this.shaders={fill:new a,outline:new r}}shutdown(){this._fillMesh=null,this._outlineMesh=null}render(t,e){const{displayLevel:i,is3D:l,renderPass:n,spriteMosaic:s,styleLayer:o,styleLayerUID:a}=t,{tiles:r}=e;let u=!1;for(const D of r)if(D.layerData.has(a)){const t=D.layerData.get(a);if(t.fillIndexCount>0||t.outlineIndexCount>0){u=!0;break}}if(!u)return;const c=o,f=c.getPaintProperty("fill-pattern"),p=void 0!==f,h=p&&f.isDataDriven;let d;if(p&&!h){const t=f.getValue(i);d=s.getMosaicItemPosition(t,!0)}const y=!p&&c.getPaintValue("fill-antialias",i);let g=!l||p,m=1;if(!p){const t=c.getPaintProperty("fill-color"),e=c.getPaintProperty("fill-opacity");if(!t?.isDataDriven&&!e?.isDataDriven){const t=c.getPaintValue("fill-color",i);m=c.getPaintValue("fill-opacity",i)*t[3],m<1&&(g=!0)}}if((c.hasDataDrivenColor||c.hasDataDrivenOpacity)&&(g=!0),g&&"opaque"===n)return;const M=c.getPaintValue("fill-translate",i),v=c.getPaintValue("fill-translate-anchor",i);("opaque"===n&&!g||"translucent"===n&&g)&&this._drawFill(t,a,c,r,M,v,p,d,h);const x=!c.hasDataDrivenOutlineColor&&c.outlineUsesFillColor&&m<1;y&&"translucent"===n&&!x&&this._drawOutline(t,a,c,r,M,v)}_drawFill(l,a,r,c,f,p,h,d,y){if(h&&!y&&null==d)return;const{context:g,displayLevel:m,drawPhase:M,painter:v,pixelRatio:x,spriteMosaic:D}=l,P=x>i?2:1,w=r.fillMaterial,C=1===p,_={view:o(l),tileContainer:s(l),tile:n(l.tilingScheme,c[0]),config:{depth:r.z+u,fillTranslation:f,tileOpacity:1},patternOptions:y||h&&null!=d?{mosaicSize:[0,0],patternFactor:1,tlbr:[0,0,0,0]}:null,color:null,opacity:null,colorMix:null,opacityMix:null},T={patternTexture:null},b={fillType:h?1:0,translateAnchorViewport:C},V=w.key+t(b);if(null!=d){const{page:t,tl:i,br:l}=d,n=i[0],s=l[1],o=l[0],a=i[1],r=D.getPageSize(t);null!=r&&(D.bind(g,9729,t,e),_.patternOptions={mosaicSize:[r[0],r[1]],patternFactor:1,tlbr:[n,s,o,a]},T.patternTexture={texture:D.getTexture(t),unit:e})}let O=-1;for(const t of c){if(!t.layerData.has(a))continue;if(t.key.level!==O){O=t.key.level;const e=w.getUniforms();for(const t of e){const e=t.getValue(r,m,O,D);_[t.name]={value:e}}if(h&&null!=_.patternOptions){const e=Math.max(2**(Math.round(m)-t.key.level),1),i=t.rangeX/(P*t.width*e);_.patternOptions.patternFactor=i}}const i=t.layerData.get(a);if(i.isDestroyed||0===i.fillIndexCount)continue;if(this._fillMesh=i.getMesh(g,{value:0}),!this._fillMesh)continue;const{config:s}=_;_.tile=n(l.tilingScheme,t),s.tileOpacity=1===M?t.fader.value():1;const o={shader:this.shaders.fill,uniforms:_,textures:T,defines:b,optionalAttributes:w.getUsedAttributes(),useComputeBuffer:!1,precisionFactors:w.getPrecisionFactors(),materialKey:V};if(y){const l=_.patternOptions,n=i.patternMap;if(!n||null==l)continue;let s=0;for(const[i,a]of n){const n=D.getPageSize(i);null!=n&&(D.bind(g,9729,i,e),l.mosaicSize=n,T.patternTexture={texture:D.getTexture(i),unit:e},v.submitDrawMeshUntyped(g,o,this._fillMesh,{stencilRef:t.stencilRef,parts:[s++]}))}}else v.submitDrawMeshUntyped(g,o,this._fillMesh,{stencilRef:t.stencilRef});t.triangleCount+=i.fillIndexCount/3}}_drawOutline(e,i,l,a,r,c){const{context:f,displayLevel:p,spriteMosaic:h,painter:d,pixelRatio:y}=e,g=l.outlineMaterial,m={translateAnchorViewport:1===c},M=g.key+t(m),v=.75/y,x={view:o(e),tileContainer:s(e),tile:n(e.tilingScheme,a[0]),config:{depth:l.z+u,fillTranslation:r,outlineWidth:v},color:null,opacity:null,colorMix:null,opacityMix:null};let D=-1;for(const t of a){if(!t.layerData.has(i))continue;if(t.key.level!==D){D=t.key.level;const e=g.getUniforms();for(const t of e){const e=t.getValue(l,p,D,h);t.name in x&&(x[t.name]={value:e})}}const s=t.layerData.get(i);if(s.isDestroyed||0===s.outlineIndexCount)continue;if(this._outlineMesh=s.getMesh(f,{value:1}),null==this._outlineMesh)continue;x.tile=n(e.tilingScheme,t);const o={shader:this.shaders.outline,uniforms:x,textures:{},defines:m,optionalAttributes:g.getUsedAttributes(),useComputeBuffer:!1,precisionFactors:g.getPrecisionFactors(),materialKey:M};d.submitDrawMeshUntyped(f,o,this._outlineMesh,{stencilRef:t.stencilRef}),t.triangleCount+=s.outlineIndexCount/3}}}export{c as VTLTechniqueFill};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{getDefinesKey as e}from"../../../../vectorTiles/shaders/vtlMaterialUtils.js";import{vtlTextureBindingUnitSprites as t}from"../../../definitions.js";import{Technique as i}from"../Technique.js";import{
|
|
2
|
+
import{getDefinesKey as e}from"../../../../vectorTiles/shaders/vtlMaterialUtils.js";import{vtlTextureBindingUnitSprites as t}from"../../../definitions.js";import{Technique as i}from"../Technique.js";import{getTileUniforms as n}from"../shaders/Tile.js";import{getTileContainerUniforms as s}from"../shaders/TileInfo.js";import{getViewUniforms as l}from"../shaders/ViewInfo.js";import{VTLShaderLine as o}from"../shaders/vector-tiles/VTLShaderLine.js";class a extends i{constructor(){super(...arguments),this.type=41,this._mesh=null,this.shaders={line:new o}}shutdown(){this._mesh=null}render(i,o){const{context:a,displayLevel:r,drawPhase:u,is3D:c,painter:f,spriteMosaic:p,styleLayer:h,styleLayerUID:m}=i,{tiles:d}=o;if(!d.some(e=>e.layerData.get(m)?.lineIndexCount??!1))return;const g=h,y=g.lineMaterial,x=g.getPaintValue("line-translate",r),M=1===g.getPaintValue("line-translate-anchor",r),P={view:l(i),tileContainer:s(i),tile:n(i.tilingScheme,d[0]),layerInfo:{lineTranslation:x,depth:g.z},tileConfig:{tileOpacity:1},page:null,color:null,width:null,opacity:null,blur:null,offset:null,colorMix:null,widthMix:null,opacityMix:null,blurMix:null,offsetMix:null,tlbr:null},v=g.getPaintProperty("line-pattern"),w=void 0!==v,D=w&&v.isDataDriven;let T,b;if(w&&!D){const e=v.getValue(r);T=p.getMosaicItemPosition(e)}let I=!1;if(!w){const e=g.getPaintProperty("line-dasharray");if(b=void 0!==e,I=b&&e.isDataDriven,b&&!I){const t=e.getValue(r),i=g.getDashKey(t,g.getLayoutValue("line-cap",r));if(T=p.getMosaicItemPosition(i),null==T)return}}const V={lineType:w?1:b?2:0,translateAnchorViewport:M},C=y.key+e(V),S={pageTexture:null};if(null!=T){const{page:e}=T,i=p.getPageSize(e);if(null!=i){p.bind(a,9729,e,t);const n={mosaicSize:[i[0],i[1]]};S.pageTexture={texture:p.getTexture(e),unit:t},P.page=n}}c||f.setPipelineState({color:{write:[!0,!0,!0,!0],blendMode:"composite"},stencil:{write:!1,test:{compare:514,op:{fail:7680,zFail:7680,zPass:7681},mask:255}},depth:{write:!1,test:515}});let j=-1;for(const e of d){if(!e.layerData.has(m))continue;if(P.tile=n(i.tilingScheme,e),e.key.level!==j){j=e.key.level;const t=y.getUniforms();for(const e of t){const t=e.getValue(g,r,j,p);e.name in P&&(P[e.name]={value:t})}}const s=e.layerData.get(m);if(!s.lineIndexCount||s.isDestroyed)continue;if(this._mesh=s.getMesh(a),!this._mesh)continue;P.tileConfig.tileOpacity=1===u?e.fader.value():1;const l={shader:this.shaders.line,uniforms:P,textures:S,defines:V,optionalAttributes:y.getUsedAttributes(),useComputeBuffer:!1,precisionFactors:y.getPrecisionFactors(),materialKey:C};if(D||I){const i=s.patternMap;if(!i)continue;let n=0;for(const s of i.keys()){const i=p.getPageSize(s);null!=i&&(p.bind(a,9729,s,t),P.page={mosaicSize:[i[0],i[1]]},S.pageTexture={texture:p.getTexture(s),unit:t},f.submitDrawMeshUntyped(a,l,this._mesh,{stencilRef:e.stencilRef,parts:[n++]}))}}else f.submitDrawMeshUntyped(a,l,this._mesh,{stencilRef:e.stencilRef});e.triangleCount+=s.lineIndexCount/3}}}export{a as VTLTechniqueLine};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{fadeDuration as e}from"../../../../vectorTiles/decluttering/config.js";import{getDefinesKey as t}from"../../../../vectorTiles/shaders/vtlMaterialUtils.js";import{vtlTextureBindingUnitSprites as i,vtlTextureBindingUnitGlyphs as a}from"../../../definitions.js";import{
|
|
2
|
+
import{fadeDuration as e}from"../../../../vectorTiles/decluttering/config.js";import{getDefinesKey as t}from"../../../../vectorTiles/shaders/vtlMaterialUtils.js";import{vtlTextureBindingUnitSprites as i,vtlTextureBindingUnitGlyphs as a}from"../../../definitions.js";import{Technique as n}from"../Technique.js";import{getTileUniforms as l}from"../shaders/Tile.js";import{getTileContainerUniforms as o}from"../shaders/TileInfo.js";import{getViewUniforms as s}from"../shaders/ViewInfo.js";import{VTLShaderIcon as r}from"../shaders/vector-tiles/VTLShaderIcon.js";import{VTLShaderText as c}from"../shaders/vector-tiles/VTLShaderText.js";const u=1/65536;class h extends n{constructor(){super(...arguments),this.type=42,this._iconMesh=null,this._textMesh=null,this.shaders={icon:new r,text:new c}}shutdown(){this._iconMesh=null,this._textMesh=null}render(e,t){const{painter:i}=e,a=e.styleLayer,{tiles:n}=t,l=i.getPipelineState();this._setRenderState(e),this._drawIcons(e,a,n),this._drawText(e,a,n),i.setPipelineState(l)}_drawIcons(t,i,a){const{context:n,displayLevel:r,drawPhase:c,spriteMosaic:u,styleLayerUID:h}=t,p=i.iconMaterial;let g,f=!1;for(const e of a)if(e.layerData.has(h)&&(g=e.layerData.get(h),g.iconPerPageElementsMap.size>0)){f=!0;break}if(!f)return;const y=i.getPaintValue("icon-translate",r),d=i.getPaintValue("icon-translate-anchor",r);let m=i.getLayoutValue("icon-rotation-alignment",r);2===m&&(m=0===i.getLayoutValue("symbol-placement",r)?1:0);const x=0===m,M=i.getLayoutValue("icon-keep-upright",r)&&x,P=g.isIconSDF,D={rotationAlignmentMap:x,translateAnchorViewport:1===d},v={view:s(t),tileContainer:o(t),tile:l(t.tilingScheme,a[0]),config:{depth:i.z,iconTranslation:y,level:10*r,keepUpright:M?1:0,fadeDuration:e/1e3,isStencilPass:t.stencilSymbols?1:0,time:null,tileOpacity:1},page:{mosaicSize:null},color:null,opacity:null,haloBlur:null,haloColor:null,haloWidth:null,size:null,colorMix:null,opacityMix:null,haloBlurMix:null,haloColorMix:null,haloWidthMix:null,sizeMix:null};let w=-1;for(const e of a){if(!e.layerData.has(h))continue;if(e.key.level!==w){w=e.key.level;const t=p.getUniforms();for(const e of t){const t=e.getValue(i,r,w,u);v[e.name]={value:t}}}if(g=e.layerData.get(h),0===g.iconPerPageElementsMap.size||g.isDestroyed)continue;if(this._iconMesh=g.getMesh(n,{value:0}),!this._iconMesh)continue;g.updateOpacityInfo(),v.tile=l(t.tilingScheme,e),v.config.time=(performance.now()-g.lastOpacityUpdate)/1e3,v.config.tileOpacity=1===c?e.fader.value():1;let a=0;for(const[i,n]of g.iconPerPageElementsMap)this._renderIconRange(t,p,n,i,e,v,this._iconMesh,P,D,a++)}}_drawText(t,i,a){const{context:n,displayLevel:r,drawPhase:c,glyphMosaic:h,spriteMosaic:p,pixelRatio:g,styleLayerUID:f,requestRender:y,allowDelayedRender:d}=t,m=i.textMaterial;let x,M=!1;for(const e of a)if(e.layerData.has(f)&&(x=e.layerData.get(f),x.glyphPerPageElementsMap.size>0)){M=!0;break}if(!M)return;const P=i.getPaintProperty("text-opacity");if(P&&!P.isDataDriven&&0===P.getValue(r))return;const D=i.getPaintProperty("text-color"),v=D&&D.getValue(r),w=!D||D.isDataDriven||v&&4===v.length&&v[3]>0,S=i.getPaintProperty("text-halo-width"),_=i.getPaintProperty("text-halo-color"),V=_&&_.getValue(r),T=(!S||S.isDataDriven||S.getValue(r)>0)&&(!_||_.isDataDriven||V&&4===V.length&&V[3]>0);if(!w&&!T)return;const z=24/8;let b=i.getLayoutValue("text-rotation-alignment",r);2===b&&(b=0===i.getLayoutValue("symbol-placement",r)?1:0);const R=0===b,k=i.getLayoutValue("text-keep-upright",r)&&R,U=.8*z/g;this._glyphTextureSize||(this._glyphTextureSize=[h.width/4,h.height/4]);const L=i.getPaintValue("text-translate",r),I={rotationAlignmentMap:R,translateAnchorViewport:1===i.getPaintValue("text-translate-anchor",r)};if(d&&null!=y)return void y();const C={view:s(t),tileContainer:o(t),tile:l(t.tilingScheme,a[0]),config:{depth:i.z+u,textTranslation:L,keepUpright:k?1:0,level:10*r,fadeDuration:e/1e3,antialiasingWidth:U,time:null,halo:null,isStencilPass:t.stencilSymbols?1:0,tileOpacity:1},page:{mosaicSize:null},size:null,color:null,haloColor:null,opacity:null,haloWidth:null,haloBlur:null,sizeMix:null,colorMix:null,haloColorMix:null,opacityMix:null,haloWidthMix:null,haloBlurMix:null};let j=-1;for(const e of a){if(!e.layerData.has(f))continue;if(e.key.level!==j){j=e.key.level;const t=m.getUniforms();for(const e of t){const t=e.getValue(i,r,j,p);e.name in C&&(C[e.name]={value:t})}}if(x=e.layerData.get(f),0===x.glyphPerPageElementsMap.size||x.isDestroyed)continue;if(C.tile=l(t.tilingScheme,e),C.config.time=(performance.now()-x.lastOpacityUpdate)/1e3,C.config.tileOpacity=1===c?e.fader.value():1,this._textMesh=x.getMesh(n,{value:1}),!this._textMesh)continue;x.updateOpacityInfo();let a=0;x.glyphPerPageElementsMap.forEach((i,n)=>{this._renderGlyphRange(t,i,n,T,w,e,C,m,this._textMesh,I,a++)})}}_renderIconRange(e,a,n,l,o,s,r,c,u,h){const{context:p,is3D:g,painter:f,spriteMosaic:y}=e,d={...u,iconType:c?1:0},m=a.key+t(d);y.bind(p,9729,l,i),s.page={mosaicSize:[y.getWidth(l)/4,y.getHeight(l)/4]};const x={shader:this.shaders.icon,uniforms:s,textures:{pageTexture:{texture:y.getTexture(l),unit:i}},defines:d,optionalAttributes:a.getUsedAttributes(),useComputeBuffer:!1,precisionFactors:a.getPrecisionFactors(),materialKey:m};f.submitDrawMeshUntyped(p,x,r,{stencilRef:g?o.stencilRef:255,parts:[h]}),o.triangleCount+=n[1]/3}_renderGlyphRange(e,i,n,l,o,s,r,c,u,h,p){const{context:g,is3D:f,painter:y,glyphMosaic:d}=e;d.bind(g,9729,n,a),r.page={mosaicSize:this._glyphTextureSize};const m={shader:this.shaders.text,uniforms:r,textures:{pageTexture:{texture:d.getTexture(g,n),unit:a}},defines:h,optionalAttributes:c.getUsedAttributes(),useComputeBuffer:!1,precisionFactors:c.getPrecisionFactors(),materialKey:c.key+t(h)};l&&(r.config.halo=1,y.submitDrawMeshUntyped(g,m,u,{stencilRef:f?s.stencilRef:255,parts:[p]}),s.triangleCount+=i[1]/3),o&&(r.config.halo=0,y.submitDrawMeshUntyped(g,m,u,{stencilRef:f?s.stencilRef:255,parts:[p]}),s.triangleCount+=i[1]/3)}_setRenderState(e){const{is3D:t,painter:i,stencilSymbols:a}=e;i.setPipelineState({color:{write:[!a,!a,!a,!a],blendMode:a?"none":"composite"},stencil:{write:!!a&&{mask:255},test:{compare:a?519:t?514:516,op:{fail:7680,zFail:7680,zPass:7681},mask:255}},depth:{write:!1,test:515}})}}export{h as VTLTechniqueSymbol};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import e from"../../../../../../core/Error.js";import r from"../../../../../../core/Logger.js";import{disposeMaybe as t}from"../../../../../../core/maybe.js";import{getDeepValue as o}from"../../../../../../core/object.js";import{createTexture as i}from"../../textureUtils.js";import{DisposableProgram as n}from"../../../../../webgl/Program.js";import{transpileShader as a}from"../../../../../webgl/ShaderTranspiler.js";const s=()=>r.getLogger("esri.views.2d.engine.webgl.shaderGraph.typed.TypedShaderProgram");function f(r,t,o){const i=t.length;if(i!==o){const n=new e("Invalid Uniform",`Invalid length, expected ${o} but got ${i}`,{uniformName:r,values:t});s().errorOnce(n)}}class m{constructor(e,r,t,o,i,n,a){this.debugName=e,this.vertexShader=r,this.fragmentShader=t,this._locations=o,this._uniformBindings=i,this._textureBindings=n,this._transformFeedbackBindings=a,this._vao=null,this._temporaryTextures=[]}destroy(){this._program=t(this._program),this.cleanupTemporaryTextures()}[Symbol.dispose](){this.destroy()}setUniforms(e){this._uniforms=e}setTextures(e){this._textures=e}validate(e){if(!this._validation){const r=this._validateWebGL2(e);"error"===r.type&&(r.error=`Validation failed for ShaderModule '${this.debugName}'\n${r.error}`),this._validation=r}return this._validation}cleanupTemporaryTextures(){for(const e of this._temporaryTextures)e.dispose();this._temporaryTextures=[]}prepare(e){if(!this._program){const r=[];for(const e of this._transformFeedbackBindings??[]){const{index:t,propertyKey:o}=e;r[t]=`v_${o}`}this._program=new n(e,this.vertexShader,this.fragmentShader,this._locations,new Map,r)}}get compiled(){return this._program?.compiled??!1}bind(e){const r=this._uniforms,t=this._textures;this.prepare(e);const n=this._program;e.useProgram(n);for(const i of this._uniformBindings){const{shaderModulePath:e,uniformName:t,uniformType:a,uniformArrayLength:s}=i,m=o(e,r);if(null==m)throw new Error(`Failed to find uniform value for ${e}`);switch("array"===a||"array-2d"===a?i.uniformArrayElementType:a){case"int":if(!s){n.setUniform1i(t,m);break}f(i.uniformName,m,s),n.setUniform1iv(t,m);break;case"float":if(!s){n.setUniform1f(t,m);break}f(i.uniformName,m,s),n.setUniform1fv(t,m);break;case"vec2":if(!s){n.setUniform2f(t,m[0],m[1]);break}f(i.uniformName,m,s),n.setUniform2fv(t,m.flat());break;case"vec3":if(!s){n.setUniform3f(t,m[0],m[1],m[2]);break}f(i.uniformName,m,s),n.setUniform3fv(t,m.flat());break;case"vec4":if(!s){n.setUniform4f(t,m[0],m[1],m[2],m[3]);break}f(i.uniformName,m,s),n.setUniform4fv(t,m.flat());break;case"mat3":n.setUniformMatrix3fv(t,m);break;case"mat4":n.setUniformMatrix4fv(t,m);break;default:throw new Error(`Unable to set uniform for type ${a}`)}}for(const a of this._textureBindings){const r=o(a.shaderModulePath,t);if(null==r)continue;const{unit:s,texture:f}=r;if(n.setUniform1i(a.textureName,s),"type"in f)e.bindTexture(f,s);else{const r=i(e,f.descriptor,f.data);e.bindTexture(r,s)}}}_validateWebGL2(e){const r=e.gl,t=d(r,35633,this.vertexShader);if("error"===t.type)return t;const o=d(r,35632,this.fragmentShader);if("error"===o.type)return o;const i=t.value,n=o.value,a=r.createProgram();if(r.attachShader(a,i),r.attachShader(a,n),r.linkProgram(a),!r.getProgramParameter(a,r.LINK_STATUS)){return{type:"error",error:`Failed to link shader:\nvalidated: ${r.getProgramParameter(a,r.VALIDATE_STATUS)}, gl error ${r.getError()}, vertex: ${r.getShaderParameter(i,r.COMPILE_STATUS)}, fragment: ${r.getShaderParameter(n,r.COMPILE_STATUS)}, info log: ${r.getProgramInfoLog(a)}, vertex source: ${this.vertexShader}, fragment source: ${this.fragmentShader}`}}return r.deleteProgram(a),{type:"ok",value:null}}}function h(e){const r=e.match(/\d+:(\d+):/);if(void 0!==r?.index&&r?.length>1){const e=r.index+r[0].length;return{lineNumber:parseInt(r[1],10),offset:e}}return null}function d(e,r,t){const o=e.createShader(r),i=a(t,r);if(e.shaderSource(o,i),e.compileShader(o),!e.getShaderParameter(o,e.COMPILE_STATUS)){const i=e.getShaderInfoLog(o)??"";let n="";const a=i.split("\n"),s=new Map,f=[];for(const e of a){const r=h(i);if(!r){f.push(e);continue}let t=s.get(r.lineNumber);t||(t=[],s.set(r.lineNumber,t)),t.push({text:e,offset:r.offset})}const m=Array.from(s.entries()).sort();for(const[e,r]of m){const o=t.split("\n"),i=Math.max(e-2,0),a=Math.min(e+2,o.length);for(let t=i;t!==a;t++){if(n+=`${(t+1).toString().padEnd(4)}${o[t]}\n`,t===e-1){const e=o[t].length;n+=" "+new Array(e).join("^")+"\n";for(const{text:t,offset:o}of r)n+=" "+t.slice(o).trim()+"\n"}}}for(const e of f)n+=e+"\n";const d=`Failed to compile ${35633===r?"vertex":"fragment"} shader:\n\n${n}`;return e.deleteShader(o),{type:"error",error:d}}return{type:"ok",value:o}}export{m as TypedShaderProgram};
|
|
2
|
+
import e from"../../../../../../core/Error.js";import r from"../../../../../../core/Logger.js";import{disposeMaybe as t}from"../../../../../../core/maybe.js";import{getDeepValue as o}from"../../../../../../core/object.js";import{createTexture as i}from"../../textureUtils.js";import{DisposableProgram as n}from"../../../../../webgl/Program.js";import{transpileShader as a}from"../../../../../webgl/ShaderTranspiler.js";const s=()=>r.getLogger("esri.views.2d.engine.webgl.shaderGraph.typed.TypedShaderProgram");function f(r,t,o){const i=t.length;if(i!==o){const n=new e("Invalid Uniform",`Invalid length, expected ${o} but got ${i}`,{uniformName:r,values:t});s().errorOnce(n)}}class m{constructor(e,r,t,o,i,n,a){this.debugName=e,this.vertexShader=r,this.fragmentShader=t,this._locations=o,this._uniformBindings=i,this._textureBindings=n,this._transformFeedbackBindings=a,this._vao=null,this._temporaryTextures=[]}destroy(){this._program=t(this._program),this.cleanupTemporaryTextures()}[Symbol.dispose](){this.destroy()}setUniforms(e){this._uniforms=e}setTextures(e){this._textures=e}validate(e){if(!this._validation){const r=this._validateWebGL2(e);"error"===r.type&&(r.error=`Validation failed for ShaderModule '${this.debugName}'\n${r.error}`),this._validation=r}return this._validation}cleanupTemporaryTextures(){for(const e of this._temporaryTextures)e.dispose();this._temporaryTextures=[]}prepare(e){if(!this._program){const r=[];for(const e of this._transformFeedbackBindings??[]){const{index:t,propertyKey:o}=e;r[t]=`v_${o}`}this._program=new n(e,this.vertexShader,this.fragmentShader,this._locations,new Map,r)}}get compiled(){return this._program?.compiled??!1}bind(e){const r=this._uniforms,t=this._textures;this.prepare(e);const n=this._program;e.useProgram(n);for(const i of this._uniformBindings){const{shaderModulePath:e,uniformName:t,uniformType:a,uniformArrayLength:s}=i,m=o(e,r);if(null==m)throw new Error(`Failed to find uniform value for ${e}`);switch("array"===a||"array-2d"===a?i.uniformArrayElementType:a){case"int":if(!s){n.setUniform1i(t,m);break}f(i.uniformName,m,s),n.setUniform1iv(t,m);break;case"ivec2":if(!s){n.setUniform2iv(t,m);break}f(i.uniformName,m,s),n.setUniform2iv(t,m.flat());break;case"float":if(!s){n.setUniform1f(t,m);break}f(i.uniformName,m,s),n.setUniform1fv(t,m);break;case"vec2":if(!s){n.setUniform2f(t,m[0],m[1]);break}f(i.uniformName,m,s),n.setUniform2fv(t,m.flat());break;case"vec3":if(!s){n.setUniform3f(t,m[0],m[1],m[2]);break}f(i.uniformName,m,s),n.setUniform3fv(t,m.flat());break;case"vec4":if(!s){n.setUniform4f(t,m[0],m[1],m[2],m[3]);break}f(i.uniformName,m,s),n.setUniform4fv(t,m.flat());break;case"mat3":n.setUniformMatrix3fv(t,m);break;case"mat4":n.setUniformMatrix4fv(t,m);break;default:throw new Error(`Unable to set uniform for type ${a}`)}}for(const a of this._textureBindings){const r=o(a.shaderModulePath,t);if(null==r)continue;const{unit:s,texture:f}=r;if(n.setUniform1i(a.textureName,s),"type"in f)e.bindTexture(f,s);else{const r=i(e,f.descriptor,f.data);e.bindTexture(r,s)}}}_validateWebGL2(e){const r=e.gl,t=d(r,35633,this.vertexShader);if("error"===t.type)return t;const o=d(r,35632,this.fragmentShader);if("error"===o.type)return o;const i=t.value,n=o.value,a=r.createProgram();if(r.attachShader(a,i),r.attachShader(a,n),r.linkProgram(a),!r.getProgramParameter(a,r.LINK_STATUS)){return{type:"error",error:`Failed to link shader:\nvalidated: ${r.getProgramParameter(a,r.VALIDATE_STATUS)}, gl error ${r.getError()}, vertex: ${r.getShaderParameter(i,r.COMPILE_STATUS)}, fragment: ${r.getShaderParameter(n,r.COMPILE_STATUS)}, info log: ${r.getProgramInfoLog(a)}, vertex source: ${this.vertexShader}, fragment source: ${this.fragmentShader}`}}return r.deleteProgram(a),{type:"ok",value:null}}}function h(e){const r=e.match(/\d+:(\d+):/);if(void 0!==r?.index&&r?.length>1){const e=r.index+r[0].length;return{lineNumber:parseInt(r[1],10),offset:e}}return null}function d(e,r,t){const o=e.createShader(r),i=a(t,r);if(e.shaderSource(o,i),e.compileShader(o),!e.getShaderParameter(o,e.COMPILE_STATUS)){const i=e.getShaderInfoLog(o)??"";let n="";const a=i.split("\n"),s=new Map,f=[];for(const e of a){const r=h(i);if(!r){f.push(e);continue}let t=s.get(r.lineNumber);t||(t=[],s.set(r.lineNumber,t)),t.push({text:e,offset:r.offset})}const m=Array.from(s.entries()).sort();for(const[e,r]of m){const o=t.split("\n"),i=Math.max(e-2,0),a=Math.min(e+2,o.length);for(let t=i;t!==a;t++){if(n+=`${(t+1).toString().padEnd(4)}${o[t]}\n`,t===e-1){const e=o[t].length;n+=" "+new Array(e).join("^")+"\n";for(const{text:t,offset:o}of r)n+=" "+t.slice(o).trim()+"\n"}}}for(const e of f)n+=e+"\n";const d=`Failed to compile ${35633===r?"vertex":"fragment"} shader:\n\n${n}`;return e.deleteShader(o),{type:"error",error:d}}return{type:"ok",value:o}}export{m as TypedShaderProgram};
|