@arcgis/core 4.33.0-next.20250225 → 4.33.0-next.20250227
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/4253438dd3045566892d.js +1 -0
- package/assets/esri/core/workers/chunks/823bf95f42cc42f20e22.js +1 -0
- package/assets/esri/core/workers/chunks/ae25c6108918d37e61bf.js +1 -0
- package/assets/esri/core/workers/chunks/{feb656f172ec9fe64752.js → af005704f23088db3ded.js} +1 -1
- package/assets/esri/core/workers/chunks/{dea40706ca4e37d5c6e2.js → d4d011eea16a89a5aad9.js} +1 -1
- package/core/sql/StandardizedFunctions.js +1 -1
- package/core/sql/WhereClause.js +1 -1
- package/core/sql/sqlCompareUtils.js +1 -1
- package/geometry/SpatialReference.js +1 -1
- package/layers/SubtypeGroupLayer.js +1 -1
- package/package.json +1 -1
- package/support/popupUtils.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/animationUtils.js +1 -1
- package/views/2d/engine/webgl/animations/utils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/GraphShaderModule.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityPointShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityPolygonShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/BitmapShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/BlendShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/ComplexFillShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/ComplexOutlineFillShader.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/GridShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/HeatmapAccumulateShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/HeatmapResolveShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/LineShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/MagnifierShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/OpacityShader.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/TestShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TexturedLineShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/RasterColorizerLUTShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/RasterColorizerShadedReliefShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/RasterColorizerStretchShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/AspectShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/BandArithmeticShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/ColormapToRGBShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/CompositeBandShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/ComputeChangeShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/ContrastBrightnessShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/ConvolutionShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/CurvatureShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/ExtractBandShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/FocalStatisticsShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/GrayscaleShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/HillshadeShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/LocalShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/MaskShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/NDVIShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/RemapShader.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/raster/processor/ShadedReliefShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/SlopeShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/StretchShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/text/TextShader.js +1 -1
- package/views/3d/interactive/visualElements/OutlineVisualElement.js +1 -1
- package/views/3d/layers/support/FeatureTile.js +1 -1
- package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
- package/views/3d/layers/support/FeatureTileFetcher3DContext.js +1 -1
- package/views/3d/layers/support/FeatureTileTree3D.js +1 -1
- package/views/3d/webgl-engine/lib/ComponentUtils.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/RenderingContext.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
- package/views/View.js +1 -1
- package/views/support/TileTreeDebugger.js +1 -1
- package/views/webgl/capabilities/Capabilities.js +1 -1
- package/views/webgl/capabilities/DebugRendererInfo.js +1 -1
- package/views/webgl/capabilities.js +1 -1
- package/widgets/Feature/FeatureRelationship.js +1 -1
- package/widgets/Feature/FeatureUtilityNetworkAssociationList.js +1 -1
- package/widgets/Feature/FeatureUtilityNetworkAssociations.js +1 -1
- package/widgets/Feature.js +1 -1
- package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/FeatureFormUtilityNetworkAssociationList.js +1 -1
- package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationItemList.js +1 -1
- package/widgets/FeatureTable.js +1 -1
- package/widgets/Features/FeaturesDrillIn.js +1 -1
- package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/sketch/DataCaptureAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/components/ImageOverlays.js +1 -1
- package/widgets/OrientedImageryViewer/dataCaptureUtils.js +1 -1
- package/widgets/OrientedImageryViewer/symbols.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/support/UtilityNetworkAssociations/utilityNetworkUtils.js +1 -1
- package/assets/esri/core/workers/chunks/66338f008ff0992ffca2.js +0 -1
- package/assets/esri/core/workers/chunks/69c13ca7b572ad2ca3ce.js +0 -1
- package/assets/esri/core/workers/chunks/d5ebe6b7cd9c8e40b386.js +0 -1
package/support/revision.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
const
|
|
5
|
+
const c="20250227",b="ded8e3b5cba9cb2bc53faf1052d4ce00d90b751c";export{c as buildDate,b as commitHash};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import t from"../../core/Logger.js";import{animationDebugFlags as e}from"./animationDebugFlags.js";import{defaultCIMValues as r}from"./defaultCIMValues.js";import{AnimatedSymbolRepeatType as
|
|
5
|
+
import t from"../../core/Logger.js";import{animationDebugFlags as e}from"./animationDebugFlags.js";import{defaultCIMValues as r}from"./defaultCIMValues.js";import{AnimatedSymbolRepeatType as o,AnimatedSymbolEasingType as n}from"./enums.js";import{getExtent as i}from"./SDFHelper.js";import{getProcessParam as a,getValue as s,getSize as c}from"./utils.js";import{TimeOrigin as m}from"../../views/2d/engine/webgl/animations/instructions.js";function l(t,e,r){return{transform:g(t,e,r.transform),fromColor:b(t,e,r.fromColor),toColor:I(t,e,r.toColor),colorMix:T(t,e,r.colorMix),toOpacity:h(t,e,r.toOpacity),opacityMix:k(t,e,r.opacityMix),hasAnimations:r.hasAnimations||!!e.animations&&e.animations.length>0}}function p(t){return!e.forceStaticPath&&(e.forceAnimatedPath||t.hasAnimations)}function f(e,r,o){if("CIMCharacterMarker"===r.type)return t.getLogger("animationUtils").error("#handleMarker()","CIM character markers do not support animations"),o;const n=a(e,r,"OffsetX"),i=a(e,r,"OffsetY");if("CIMPictureMarker"===r.type)return{...o,transform:{type:"AnimatedTransform",relativeTranslation:!1,absoluteScale:!0,translation:R([n,i]),rotation:R(0),scale:R(a(e,r,"Size")),parent:o.transform}};const s=r.frame,c=s.ymax-s.ymin;return{...o,transform:{type:"AnimatedTransform",relativeTranslation:!1,absoluteScale:!1,translation:R([n,i]),rotation:R(0),scale:R({type:"Process",op:"Divide",left:a(e,r,"Size"),right:c}),parent:o.transform}}}function u(t,e){let r=0,o=0;const n="Absolute"!==t.anchorPointUnits;return t.anchorPoint&&(r=-t.anchorPoint.x,o=-t.anchorPoint.y),{...e,transform:{type:"AnimatedTransform",relativeTranslation:n,absoluteScale:!1,translation:R([r,o]),rotation:R(0),scale:R(1),parent:e.transform}}}function y(t,e){return"Absolute"===t.anchorPointUnits?e:u(t,e)}function C(t,e){return"Absolute"!==t.anchorPointUnits?e:u(t,e)}function M(t,e,r){return{...t,transform:{type:"AnimatedTransform",relativeTranslation:!1,absoluteScale:!1,translation:R([e,r]),rotation:R(0),scale:R(1),parent:t.transform}}}function d(t,e){const r=e?.5*-(e.xmin+e.xmax):0,o=e?.5*-(e.ymin+e.ymax):0;let n=0,a=0;if("x"in t&&"y"in t)n=t.x+r,a=t.y+o;else{const e=i(t);if(e){n=(e[0]+e[2])/2+r,a=(e[1]+e[3])/2+o}}return[n,a]}function S(t,e){switch(e.type){case"CIMPictureMarker":case"CIMVectorMarker":return a(t,e,"Rotation")}return 0}function A(t,e){switch(e.type){case"CIMPictureMarker":case"CIMVectorMarker":return a(t,e,"RotateClockwise")}return 0}function P(t,e){switch(e.type){case"CIMPointSymbol":case"CIMVectorMarker":return[1,1,1,1];case"CIMSolidStroke":case"CIMSolidFill":return a(t,e,"Color");case"CIMPictureMarker":case"CIMPictureStroke":case"CIMPictureFill":return a(t,e,"TintColor")}return[1,1,1,1]}function g(t,e,r){return{type:"AnimatedTransform",relativeTranslation:!1,absoluteScale:!1,translation:O(t,e),rotation:D(t,e),scale:x(t,e),parent:r}}function b(t,e,r){return{type:"AnimatedColor",color:R(P(t,e)),opacity:R(1),parent:r}}function I(t,e,r){const{animations:o}=e;let n=P(t,e);const i=o?.filter((t=>"CIMSymbolAnimationColor"===t.type))[0];return i&&(n=a(t,i,"ToColor")),{type:"AnimatedColor",color:R(n),opacity:R(1),parent:r}}function T(t,e,r){const{animations:o}=e,n=o?.filter((t=>"CIMSymbolAnimationColor"===t.type))[0];return n?{type:"AnimatedColor",color:R([1,1,1,1]),opacity:{from:0,to:1,timing:v(t,n?.animatedSymbolProperties)},parent:[1,1,1,1]}:r}function h(t,e,r){const{animations:o}=e;let n=R(1);const i=o?.filter((t=>"CIMSymbolAnimationTransparency"===t.type))[0];if(i){n=R({type:"Process",op:"Transparency",value:a(t,i,"ToTransparency")})}return{type:"AnimatedColor",color:R([1,1,1,1]),opacity:n,parent:r}}function k(t,e,r){const{animations:o}=e,n=o?.filter((t=>"CIMSymbolAnimationTransparency"===t.type))[0];return n?{type:"AnimatedColor",color:R([1,1,1,1]),opacity:{from:0,to:1,timing:v(t,n?.animatedSymbolProperties)},parent:[1,1,1,1]}:r}function v(t,e){if(!e)return{duration:1,startTimeOffset:0,repeatDelay:0,timeOriginSelector:m.Local,repeatType:o.Loop,easing:n.Linear,playAnimation:1,reverseAnimation:0};const i=a(t,e,"Duration");let c;if(a(t,e,"RandomizeStartTime")){c={type:"Process",op:"Random",min:0,max:i,seed:a(t,e,"RandomizeStartSeed")}}else c=a(t,e,"StartTimeOffset");const l=a(t,e,"RepeatDelay"),p=a(t,e,"PlayAnimation"),f=a(t,e,"ReverseAnimation"),u=s(e.repeatType,r.CIMAnimatedSymbolProperties.repeattype);return{duration:i,startTimeOffset:c,repeatDelay:l,timeOriginSelector:u===o.None?m.Local:m.Global,repeatType:u,easing:s(e.easing,r.CIMAnimatedSymbolProperties.easing),playAnimation:p,reverseAnimation:f}}function x(t,e){const{animations:r}=e;if("CIMPictureMarker"!==e.type&&"CIMVectorMarker"!==e.type&&"CIMPointSymbol"!==e.type)return R(1);let o;o="CIMPictureMarker"===e.type||"CIMVectorMarker"===e.type?a(t,e,"Size"):c(e)||10;const n=r?.filter((t=>"CIMSymbolAnimationScale"===t.type))[0];if(!n){const e=r?.filter((t=>"CIMSymbolAnimationSize"===t.type))[0];if(!e)return R(1);return{from:1,to:{type:"Process",op:"Divide",left:a(t,e,"ToSize"),right:o},timing:v(t,e.animatedSymbolProperties)}}return{from:1,to:a(t,n,"ScaleFactor"),timing:v(t,n.animatedSymbolProperties)}}function O(t,e){const{animations:r}=e,o=r?.filter((t=>"CIMSymbolAnimationOffset"===t.type))[0];if(!o)return R([0,0]);return{from:[0,0],to:[a(t,o,"OffsetX"),a(t,o,"OffsetY")],timing:v(t,o.animatedSymbolProperties)}}function D(t,e){const{animations:r}=e,o=A(t,e),n={type:"Process",op:"Divide",left:S(t,e),right:{type:"Process",op:"Cond",condition:o,ifTrue:-1,ifFalse:1}},i=r?.filter((t=>"CIMSymbolAnimationRotation"===t.type))[0];if(!i)return R(n);const s={type:"Process",op:"Add",left:a(t,i,"ToRotation"),right:{type:"Process",op:"Divide",left:n,right:-1}};return{from:n,to:{type:"Process",op:"Add",left:n,right:{type:"Process",op:"Cond",condition:a(t,i,"RotateClockwise"),ifTrue:{type:"Process",op:"MatchWinding",sign:-1,angle:s},ifFalse:{type:"Process",op:"MatchWinding",sign:1,angle:s}}},timing:v(t,i.animatedSymbolProperties)}}function R(t){return{from:t,to:t,timing:{duration:1,startTimeOffset:0,repeatDelay:0,timeOriginSelector:m.Local,repeatType:o.Loop,easing:n.Linear,playAnimation:1,reverseAnimation:0}}}function L(t){if(null==t)return!1;if("object"!=typeof t)return!1;if(t.animations&&Array.isArray(t.animations)&&t.animations.length>0)return!0;for(const e in t)if(L(t[e]))return!0;return!1}export{L as checkForAnimations,l as getAnimationParams,d as getFrameTranslation,R as getStaticParam,C as handleAbsoluteAnchor,u as handleAnchor,f as handleMarker,y as handleRelativeAnchor,p as shouldUseAnimatedPath,M as translate};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../../../../../Color.js";import{getStartGroup as o,getRandomValue as t}from"../grouping.js";import{hydrate as i}from"./infos.js";import{instructions as
|
|
5
|
+
import e from"../../../../../Color.js";import{getStartGroup as o,getRandomValue as t}from"../grouping.js";import{hydrate as i}from"./infos.js";import{instructions as n}from"./instructions.js";function r(e){return a(e.map((e=>f(e))).map((e=>i(e).simplify())))}function s(e){const o=[];return o.push(e.transform),o.push(e.fromColor),o.push(e.toColor),o.push(e.colorMix),o.push(e.toOpacity),o.push(e.opacityMix),o}function a(e){const o=[],t=[];let i=0;for(const r of e){const s=[...r.encode(),...n.ret.encode()];o.push([i+e.length,0,0,0]),t.push(...s),i+=s.length}return[...o,...t]}async function c(e,o){const t=e;let i;if("number"==typeof t||"string"==typeof t||"boolean"==typeof t)i=t;else if(Array.isArray(t))i=await Promise.all(t.map((e=>c(e,o))));else if("object"==typeof t)if("valueExpressionInfo"in t){const{valueExpressionInfo:e}=t,{expression:n}=e;i={...t,computed:await o.createComputedField({expression:n})}}else{i={};for(const e in t)i[e]=await c(t[e],o)}return i}function f(i,n,r){function s(o){if(!("computed"in o))return o;let t=o.computed.readWithDefault(n,r,[255*o.defaultValue[0],255*o.defaultValue[1],255*o.defaultValue[2],o.defaultValue[3]]);if("string"==typeof t){const o=e.fromString(t);o&&(t=[o.r,o.g,o.b,o.a])}return t}const a=i;let c;if("number"==typeof a||"string"==typeof a||"boolean"==typeof a)c=a;else if(Array.isArray(a))c=a.map((e=>f(e,n,r)));else if("object"==typeof a)if("type"in a&&null!=a.type&&"Process"===a.type)switch(a.op){case"ArcadeColor":{const e=f(a.value,n,r);p(Array.isArray(e)&&4===e.length);c=[e[0]/255,e[1]/255,e[2]/255,e[3]]}break;case"Transparency":{const e=f(a.value,n,r);p("number"==typeof e),c=1-e/100}break;case"Divide":case"Add":{const e=f(a.left,n,r);p("number"==typeof e);const o=f(a.right,n,r);switch(p("number"==typeof o),a.op){case"Divide":c=e/o;break;case"Add":c=e+o}}break;case"Random":{const e=f(a.seed,n,r),i=f(a.min,n,r),s=f(a.max,n,r),l=n.getObjectId(),p=o(l||0);c=i+t(p,e)*(s-i)}break;case"Cond":{const e=f(a.condition,n,r),o=f(a.ifTrue,n,r),t=f(a.ifFalse,n,r);c=e?o:t}break;case"MatchWinding":{const e=f(a.sign,n,r);let o=f(a.angle,n,r);if(e>0)for(;o<0;)o+=2*Math.PI;else for(;o>0;)o-=2*Math.PI;c=o}}else if("computed"in a)c=s(a);else{c={};for(const e in a)c[e]=f(a[e],n,r)}return c}function*l(e){const o=e;if(Array.isArray(o))for(const t of o)yield*l(t);else if("object"==typeof o)if("type"in o&&null!=o.type&&"Process"===o.type)switch(o.op){case"ArcadeColor":case"Transparency":yield*l(o.value);break;case"Divide":case"Add":yield*l(o.left),yield*l(o.right);break;case"Random":yield*l(o.seed),yield*l(o.min),yield*l(o.max);break;case"Cond":yield*l(o.condition),yield*l(o.ifTrue),yield*l(o.ifFalse);break;case"MatchWinding":yield*l(o.sign),yield*l(o.angle)}else if("computed"in o)yield o.computed;else for(const t in o)yield*l(o[t])}function p(e){if(!e)throw new Error("Assertion failed.")}export{p as assert,c as compileAnimationParam,s as createParamList,a as encodeParamList,r as fromJSON,l as getAnimationExpressions,f as resolveToAnimationInfo};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t}from"../../../../../chunks/tslib.es6.js";import"../../../../../core/has.js";import e from"../../../../../core/Logger.js";import{numericHash as r}from"../../../../../core/string.js";import{Float as o,Int as n,Vec4 as s,Vec2 as i}from"./graph/glsl.js";import{GlslShaderWriter as p}from"./graph/GlslGraphWriter.js";import{ShaderGraphContext as a}from"./graph/ShaderGraphContext.js";import{setReachableUids as u}from"./graph/ShaderGraphNode.js";import{TypedShaderProgram as c}from"./typed/TypedShaderProgram.js";import{ShaderBuilder as y}from"../../../../webgl/ShaderBuilder.js";function d(t){return new t}function h(t,e,r){const o=t.constructor[e]??[];t.constructor.hasOwnProperty(e)||Object.defineProperty(t.constructor,e,{value:o.slice()}),t.constructor[e].push(r)}function f(t,e){return(r,o)=>{h(r,"locations",{typeCtor:e,propertyKey:o,parameterIndex:null,index:t})}}const l=t=>(e,r)=>{h(e,"builtins",{builtin:t,propertyKey:r})},m=t=>(e,r,o)=>{h(e,"inputs",{inputCtor:t,propertyKey:r,parameterIndex:o})},g=t=>(e,r)=>{h(e,"uniforms",{typeCtor:t,propertyKey:r})},_=t=>(e,r)=>{h(e,"options",{typeCtor:t,propertyKey:r})},K=(t,e)=>{h(t,"defines",{propertyKey:e})};function x(t){return(e,r)=>{h(e,"transformFeedbackBindings",{propertyKey:r,parameterIndex:null,index:t})}}const b=(t,e)=>(r,o)=>{r.constructor.builtins.push({builtin:t,propertyKey:o,typeCtor:e})};class C{static{this.builtins=[]}}t([b("gl_VertexID",n)],C.prototype,"glVertexID",void 0);class I{}class v{static{this.builtins=[]}}t([b("gl_FragCoord",s)],v.prototype,"glFragCoord",void 0),t([b("gl_PointCoord",i)],v.prototype,"glPointCoord",void 0);class w{}t([l("gl_FragDepth")],w.prototype,"glFragDepth",void 0);class P{constructor(){this.type="uniform-group"}get _uniforms(){return this.constructor.uniforms??[]}}class j{constructor(){this.logShader=!1,this.computeAttributes={}}get vertexInput(){const t=this._shaderModuleClass.inputs.findLast((t=>"vertex"===t.propertyKey&&0===t.parameterIndex));if(!t)throw new Error("Unable to find vertex input parameter");return t}get computeInput(){return this._shaderModuleClass.inputs.findLast((t=>"vertex"===t.propertyKey&&1===t.parameterIndex))}get fragmentInput(){const t=this._shaderModuleClass.inputs.findLast((t=>"fragment"===t.propertyKey));if(!t)throw new Error("Unable to find fragment input parameter");return t}get transformFeedbackBindings(){return this.fragmentInput.inputCtor.transformFeedbackBindings??[]}get locations(){return[...this.vertexInput.inputCtor.locations,...this.computeInput?.inputCtor.locations??[]]}get locationsMap(){const t=new Map,r=new Set;for(const o of this.locations)r.has(o.index)?e.getLogger("esri.views.2d.engine.webgl.shaderGraph.GraphShaderModule").warnOnce("mapview-rendering",`Unable to assigned attribute ${o.propertyKey} to ${o.index}. Index already in use`,{locationsMap:t}):(t.set(o.propertyKey,o.index),r.add(o.index));return t}get locationInfo(){if(!this._locationInfo){const t=this.locationsMap,e=Array.from(t.entries()).map((([t,e])=>`${t}.${e}`)).join("."),o=r(e),n=this.computeAttributes;this._locationInfo={hash:o,stringHash:e,locations:t,computeAttributeMap:n}}return this._locationInfo}get renamedLocationsMap(){const t=new Map;for(const e of this.locations)t.set("a_"+e.propertyKey,e.index);return t}get optionPropertyKeys(){if(!this._optionPropertyKeys){const t=new Set;for(const e of this._options)t.add(e.propertyKey);this._optionPropertyKeys=t}return this._optionPropertyKeys}get _shaderModuleClass(){return this.constructor}get _defines(){return this._shaderModuleClass.defines??[]}get _options(){return this._shaderModuleClass.options??[]}get _uniforms(){return this._shaderModuleClass.uniforms??[]}getProgram(t,e,r,o){try{const{vertex:n,fragment:s,uniformBindings:i}=this._generateShaders(t,e,r,o);return new c(n,s,this.renamedLocationsMap,this.locationInfo,i,this.transformFeedbackBindings)}catch(n){return new c("","",this.renamedLocationsMap,this.locationInfo,[],this.transformFeedbackBindings)}}getDebugUniformClassInfo(t){const e=this._options.find((e=>e.propertyKey===t));if(e)return{type:"option",className:e.typeCtor};const r=this._uniforms.find((e=>e.propertyKey===t));if(!r)throw new Error(`Unable to find uniform class type for property: ${t}`);return{type:"required",className:r.typeCtor}}getShaderKey(t,e,r,o){const n=Object.keys(t).map((e=>`${e}.${t[e]}`)).join("."),s=Object.keys(r).map((t=>`${t}.${r[t]}`)).join("."),i=Object.keys(o).map((t=>`${t}.${o[t]}`)).join("."),p=Object.keys(e).filter((t=>this.optionPropertyKeys.has(t)&&e[t])).join(".");return`${this.
|
|
5
|
+
import{_ as t}from"../../../../../chunks/tslib.es6.js";import"../../../../../core/has.js";import e from"../../../../../core/Logger.js";import{numericHash as r}from"../../../../../core/string.js";import{Float as o,Int as n,Vec4 as s,Vec2 as i}from"./graph/glsl.js";import{GlslShaderWriter as p}from"./graph/GlslGraphWriter.js";import{ShaderGraphContext as a}from"./graph/ShaderGraphContext.js";import{setReachableUids as u}from"./graph/ShaderGraphNode.js";import{TypedShaderProgram as c}from"./typed/TypedShaderProgram.js";import{ShaderBuilder as y}from"../../../../webgl/ShaderBuilder.js";function d(t){return new t}function h(t,e,r){const o=t.constructor[e]??[];t.constructor.hasOwnProperty(e)||Object.defineProperty(t.constructor,e,{value:o.slice()}),t.constructor[e].push(r)}function f(t,e){return(r,o)=>{h(r,"locations",{typeCtor:e,propertyKey:o,parameterIndex:null,index:t})}}const l=t=>(e,r)=>{h(e,"builtins",{builtin:t,propertyKey:r})},m=t=>(e,r,o)=>{h(e,"inputs",{inputCtor:t,propertyKey:r,parameterIndex:o})},g=t=>(e,r)=>{h(e,"uniforms",{typeCtor:t,propertyKey:r})},_=t=>(e,r)=>{h(e,"options",{typeCtor:t,propertyKey:r})},K=(t,e)=>{h(t,"defines",{propertyKey:e})};function x(t){return(e,r)=>{h(e,"transformFeedbackBindings",{propertyKey:r,parameterIndex:null,index:t})}}const b=(t,e)=>(r,o)=>{r.constructor.builtins.push({builtin:t,propertyKey:o,typeCtor:e})};class C{static{this.builtins=[]}}t([b("gl_VertexID",n)],C.prototype,"glVertexID",void 0);class I{}class v{static{this.builtins=[]}}t([b("gl_FragCoord",s)],v.prototype,"glFragCoord",void 0),t([b("gl_PointCoord",i)],v.prototype,"glPointCoord",void 0);class w{}t([l("gl_FragDepth")],w.prototype,"glFragDepth",void 0);class P{constructor(){this.type="uniform-group"}get _uniforms(){return this.constructor.uniforms??[]}}class j{constructor(){this.logShader=!1,this.computeAttributes={}}get vertexInput(){const t=this._shaderModuleClass.inputs.findLast((t=>"vertex"===t.propertyKey&&0===t.parameterIndex));if(!t)throw new Error("Unable to find vertex input parameter");return t}get computeInput(){return this._shaderModuleClass.inputs.findLast((t=>"vertex"===t.propertyKey&&1===t.parameterIndex))}get fragmentInput(){const t=this._shaderModuleClass.inputs.findLast((t=>"fragment"===t.propertyKey));if(!t)throw new Error("Unable to find fragment input parameter");return t}get transformFeedbackBindings(){return this.fragmentInput.inputCtor.transformFeedbackBindings??[]}get locations(){return[...this.vertexInput.inputCtor.locations,...this.computeInput?.inputCtor.locations??[]]}get locationsMap(){const t=new Map,r=new Set;for(const o of this.locations)r.has(o.index)?e.getLogger("esri.views.2d.engine.webgl.shaderGraph.GraphShaderModule").warnOnce("mapview-rendering",`Unable to assigned attribute ${o.propertyKey} to ${o.index}. Index already in use`,{locationsMap:t}):(t.set(o.propertyKey,o.index),r.add(o.index));return t}get locationInfo(){if(!this._locationInfo){const t=this.locationsMap,e=Array.from(t.entries()).map((([t,e])=>`${t}.${e}`)).join("."),o=r(e),n=this.computeAttributes;this._locationInfo={hash:o,stringHash:e,locations:t,computeAttributeMap:n}}return this._locationInfo}get renamedLocationsMap(){const t=new Map;for(const e of this.locations)t.set("a_"+e.propertyKey,e.index);return t}get optionPropertyKeys(){if(!this._optionPropertyKeys){const t=new Set;for(const e of this._options)t.add(e.propertyKey);this._optionPropertyKeys=t}return this._optionPropertyKeys}get _shaderModuleClass(){return this.constructor}get _defines(){return this._shaderModuleClass.defines??[]}get _options(){return this._shaderModuleClass.options??[]}get _uniforms(){return this._shaderModuleClass.uniforms??[]}getProgram(t,e,r,o){try{const{vertex:n,fragment:s,uniformBindings:i}=this._generateShaders(t,e,r,o);return new c(n,s,this.renamedLocationsMap,this.locationInfo,i,this.transformFeedbackBindings)}catch(n){return new c("","",this.renamedLocationsMap,this.locationInfo,[],this.transformFeedbackBindings)}}getDebugUniformClassInfo(t){const e=this._options.find((e=>e.propertyKey===t));if(e)return{type:"option",className:e.typeCtor};const r=this._uniforms.find((e=>e.propertyKey===t));if(!r)throw new Error(`Unable to find uniform class type for property: ${t}`);return{type:"required",className:r.typeCtor}}getShaderKey(t,e,r,o){const n=Object.keys(t).map((e=>`${e}.${t[e]}`)).join("."),s=Object.keys(r).map((t=>`${t}.${r[t]}`)).join("."),i=Object.keys(o).map((t=>`${t}.${o[t]}`)).join("."),p=Object.keys(e).filter((t=>this.optionPropertyKeys.has(t)&&e[t])).join(".");return`${this.type}.${n}.${s}.${i}.${p}`}_generateShaders(t,e,r,o){const n=[];this._setDefines(r),this._setOptionalUniforms(n,e),this._setRequiredUniforms(n);const s=this._hydrateVertexInput(o),i=this._injectPackPrecisionFactor(s,t),c=this._hydrateComputeInput(),y=c&&this._injectComputePackPrecisionFactor(c,t),d=this.vertex(i,y),h=this._hydrateFragmentInput(d),f=this.fragment(h),l=new Set;for(const p in f){const t=f[p];u(l,t)}const m=this._getVertexInputBuiltins(),g=a.createVertex({...s,...c},d,m,n,this.transformFeedbackBindings,l);(new p).write(g);const _=this._getFragmentInputBuiltins(f);_.set("glPointCoord","gl_PointCoord");const K=a.createFragment(h,f,_,n,g,this.transformFeedbackBindings);(new p).write(K);const x=this._createShaderBuilder(g,K),b=x.generate("vertex"),C=x.generate("fragment");return this.logShader&&(console.log(b),console.log(C)),{vertex:b,fragment:C,uniformBindings:n}}_setDefines(t){for(const e in t)this[e]=t[e]}_setOptionalUniforms(t,e){for(const r of this._options){e[r.propertyKey]?this[r.propertyKey]=this._hydrateUniformGroup(t,r):this[r.propertyKey]=null}}_setRequiredUniforms(t){for(const e of this._uniforms)this[e.propertyKey]=this._hydrateUniformGroup(t,e)}_hydrateUniformGroup(t,e){const r=new(0,e.typeCtor);for(const o of r._uniforms??[]){const n=d(o.typeCtor),s=`u_${e.propertyKey}_${o.propertyKey}`,i=n.type,p=[e.propertyKey,o.propertyKey].join(".");if("type"in o.typeCtor&&"array"===o.typeCtor.type){const e=n;t.push({shaderModulePath:p,uniformName:s,uniformType:i,uniformArrayLength:e.size,uniformArrayElementType:e.elementType.type,uniformHydrated:n})}else if("type"in o.typeCtor&&"array-2d"===o.typeCtor.type){const e=n;t.push({shaderModulePath:p,uniformName:s,uniformType:i,uniformArrayLength:e.size,uniformArrayElementType:e.elementType.type,uniformHydrated:n})}else t.push({shaderModulePath:p,uniformName:s,uniformType:i,uniformHydrated:n});r[o.propertyKey]=n}return r}_hydrateVertexInput(t){const e=this.vertexInput.inputCtor,r=e.locations.reduce(((e,r)=>!1===t[r.propertyKey]?e:{...e,[r.propertyKey]:d(r.typeCtor)}),{});for(const{propertyKey:o,typeCtor:n}of e.builtins){const t=d(n);r[o]=t}return r}_hydrateComputeInput(){if(null==this.computeInput)return null;return this.computeInput.inputCtor.locations.reduce(((t,e)=>({...t,[e.propertyKey]:d(e.typeCtor)})),{})}_injectPackPrecisionFactor(t,e){const r={};for(const n in t){const s=t[n],i=e[n];if(i){if("float"!==s.type&&"vec2"!==s.type&&"vec3"!==s.type&&"vec4"!==s.type)throw new Error(`InternalError: packPrecisionFactor requires GenType, but found ${s.type}`);r[n]=s.divide(new o(i))}else r[n]=s}return r}_injectComputePackPrecisionFactor(t,e){const r={},n=new Map;for(const o in this.computeAttributes)for(const t of this.computeAttributes[o]??[])n.set(t,o);for(const s in t){const i=t[s],p=n.get(s);if(!p)continue;const a=e[p];if(a){if("float"!==i.type&&"vec2"!==i.type&&"vec3"!==i.type&&"vec4"!==i.type)throw new Error(`InternalError: packPrecisionFactor requires GenType, but found ${i.type}`);r[s]=i.divide(new o(a))}else r[s]=i}return r}_hydrateFragmentInput(t){const e={};for(const r in t)e[r]=t[r];for(const{propertyKey:r,typeCtor:o}of v.builtins){const t=d(o);e[r]=t}return e}_getVertexInputBuiltins(){const t=this.vertexInput.inputCtor,e=new Map;for(const{builtin:r,propertyKey:o}of t.builtins)e.set(o,r);return e}_getFragmentInputBuiltins(t){const e=t.constructor,r=new Map;for(const o of e.builtins??[])r.set(o.propertyKey,o.builtin);return r}_createShaderBuilder(t,e){const r=new y;return this._insertDebugInfo(r),t.insertVertexShader(r),e.insertFragmentShader(r),r}_insertDebugInfo(t){t.vertex.code.add("// DEFINES: "),t.vertex.code.add("// --------------------------------------------------------- ");for(const e of this._defines)this[e.propertyKey]?t.vertex.code.add(`// ${e.propertyKey}: true`):t.vertex.code.add(`// ${e.propertyKey}: false`);t.vertex.code.add(""),t.vertex.code.add("// OPTIONS: "),t.vertex.code.add("// --------------------------------------------------------- ");for(const e of this._options)this[e.propertyKey]?t.vertex.code.add(`// ${e.propertyKey}: true`):t.vertex.code.add(`// ${e.propertyKey}: false`)}}export{I as ComputeVertexInput,v as FragmentInput,w as FragmentOutput,j as GraphShaderModule,P as UniformGroup,C as VertexInput,l as builtin,K as define,m as input,f as location,_ as option,x as transformFeedback,g as uniform};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t,a as e}from"../../../../../../../chunks/tslib.es6.js";import{animationDebugFlags as i}from"../../../../../../../symbols/cim/animationDebugFlags.js";import{location as s,ComputeVertexInput as o,input as r}from"../../GraphShaderModule.js";import{cond as l,Float as a,equal as n,Mat2 as d,cos as m,sin as u,Vec4 as p,or as h,Bool as c,mix as x,Mat3 as y,ifElse as v,lessThan as f,Vec3 as w,distance as
|
|
5
|
+
import{_ as t,a as e}from"../../../../../../../chunks/tslib.es6.js";import{animationDebugFlags as i}from"../../../../../../../symbols/cim/animationDebugFlags.js";import{location as s,ComputeVertexInput as o,input as r}from"../../GraphShaderModule.js";import{cond as l,Float as a,equal as n,Mat2 as d,cos as m,sin as u,Vec4 as p,or as h,Bool as c,mix as x,Mat3 as y,ifElse as v,lessThan as f,Vec3 as w,distance as S,greaterThan as b,Vec2 as g,negate as z,step as P}from"../../graph/glsl.js";import{AAnimatedVertexInput as _,AAnimatedFragmentInput as V,AAnimatedShader as C,getValue as M}from"./AnimatedShader.js";import{AnimationParamIndex as N}from"./enums.js";import{MarkerConstants as k}from"../markers/markerConstants.js";import{c256ToRad as D}from"../shaders/constants.js";import{distPointTriangle as j,xyToBarycentric as F,inTriangle as R,failHittest as U}from"../shaders/hittestUtils.js";import{getBit as T,getBitBool as A}from"../shaders/utils.js";import{getVisualVariableSize as q,getVisualVariableColor as I,getVisualVariableOpacity as O}from"../shaders/vvUtils.js";class W extends _{}t([s(5,g)],W.prototype,"offset",void 0),t([s(6,g)],W.prototype,"uv",void 0),t([s(7,p)],W.prototype,"sizing",void 0),t([s(8,a)],W.prototype,"angle",void 0);class B extends o{}t([s(12,g)],B.prototype,"offsetNextVertex1",void 0),t([s(13,g)],B.prototype,"offsetNextVertex2",void 0),t([s(14,g)],B.prototype,"textureUVNextVertex1",void 0),t([s(15,g)],B.prototype,"textureUVNextVertex2",void 0);class E extends V{}function G(t,e,i,s){return e.multiply(t.x).add(i.multiply(t.y)).add(s.multiply(t.z))}class H extends C{constructor(){super(...arguments),this.type="AnimatedMarkerShader",this.computeAttributes={offset:["offsetNextVertex1","offsetNextVertex2"],uv:["textureUVNextVertex1","textureUVNextVertex2"]}}_vertexPreamble(t){const{id:e,pos:i,offset:s,animationPointerAndBaseSizeAndReferenceSize:o,uv:r,sizing:p,angle:h}=t,c=o.xy,x=o.z,y=o.w,v=p.xy,f=p.z,w=T(t.bitset,k.bitset.isStroke),S=p.w,b=T(t.bitset,k.bitset.scaleSymbolsProportionally),g=this._getEvalParams(t,v),z=M(c,N.transform,g),P=l([n(T(t.bitset,k.bitset.isMapAligned),new a(1)),this.view.rotation.divide(180).multiply(Math.PI)],[!0,new a(0)]),_=new d(m(P),u(P.multiply(-1)),u(P),m(P)).multiply(z.xy),V=z.z.subtract(P).subtract(h.multiply(D)),C=z.w,j=T(t.bitset,k.bitset.isSDF),F=q(this,e,new a(y)).divide(new a(y));return{baseSize:x,animationPointer:c,strokeWidth:f,isOutline:w,unscaledDistanceToPx:S,scaleSymbolsProportionally:b,isSDF:j,position:this._getScreenPosition({id:e,pos:i,offset:s,referenceSize:y,translation:_,rotation:V,scale:C,vvScale:F}),uv:r,evalParams:g,vvScale:F,scale:C}}vertex(t,e){const{position:i,animationPointer:s,evalParams:o,isOutline:r,unscaledDistanceToPx:l,vvScale:n,uv:d,strokeWidth:m,scaleSymbolsProportionally:u,scale:v,isSDF:f,baseSize:w}=this._vertexPreamble(t),S=this._toNdc(i);let b=M(s,N.fromColor,o);b=new p(b.rgb.multiply(b.a),b.a);let g=M(s,N.toColor,o);g=new p(g.rgb.multiply(g.a),g.a);let z=M(s,N.colorMix,o);z=new p(z.rgb.multiply(z.a),z.a);const P=M(s,N.toOpacity,o).a,_=M(s,N.opacityMix,o).a,V=I(this,t.id,b,h(A(t.bitset,k.bitset.colorLocked),new c(r))),C=x(V,g,z),D=O(this,t.id),j=x(D,P,_),F=C.multiply(j),R=this.clip(t.id,t.zoomRange),U=l.multiply(n);return{glPosition:new p(S,R,1),uv:d.divide(this.mosaicInfo.size),color:F.multiply(new a(1).subtract(r)),outlineColor:F.multiply(r),distanceToPx:U,strokeWidth:m.multiply(x(new a(1),v,u)),isOutline:r,isSDF:f,...this.maybeRunHittest(t,e,{pos:t.pos,size:w,sizeCorrection:new a(1),isMapAligned:new a(1),vvRotationMat3:new y(1,0,0,0,1,0,0,0,1),placementMat3:new y(1,0,0,0,1,0,0,0,1),outlineSize:new a(1),distanceToPx:U,isSDF:f})}}fragment(t){let e=this._getColor(t.uv,{color:t.color,distanceToPx:t.distanceToPx,isSDF:t.isSDF,outlineColor:t.outlineColor,outlineSize:t.strokeWidth});return i.spotlightAnimatedSymbols&&(e=e.add(new p(0,.3,0,.3))),this.getFragmentOutput(e,t)}hittest(t,e,i){return v(f(i.size,this.hittestRequest.smallSymbolSizeThreshold),this._hittestSmallMarker(t,e,i),this._hittestMarker(t,e,i))}_hittestSmallMarker(t,e,i){const{position:s,distance:o,smallSymbolDistance:r}=this.hittestRequest,l=o.subtract(r),{viewMat3:a,tileMat3:n}=this.view,d=a.multiply(n).multiply(new w(i.pos,1)).xy,m=i.size.multiply(.5);return S(d,s).subtract(m).add(l)}_hittestMarker(t,e,i){const s=this._vertexPreamble({...t}).position,o=this._vertexPreamble({...t,offset:e.offsetNextVertex1,uv:e.textureUVNextVertex1}).position,r=this._vertexPreamble({...t,offset:e.offsetNextVertex2,uv:e.textureUVNextVertex2}).position,l=this.hittestRequest.position,a=this.hittestRequest.distance,n=j(l,s,o,r);return v(b(n,a),n,this._hittestSamples(s,o,r,t,e,i))}_hittestSamples(t,e,i,s,o,r){const{outlineSize:l,isSDF:n,distanceToPx:d}=r,m=this.hittestRequest.position,u=this.hittestRequest.distance,h=F(m.add(new g(z(u),z(u))),t,e,i),c=F(m.add(new g(0,z(u))),t,e,i),x=F(m.add(new g(u,z(u))),t,e,i),y=F(m.add(new g(z(u),0)),t,e,i),v=F(m,t,e,i),f=F(m.add(new g(u,0)),t,e,i),w=F(m.add(new g(z(u),u)),t,e,i),S=F(m.add(new g(0,u)),t,e,i),b=F(m.add(new g(u,u)),t,e,i),_=s.uv.divide(this.mosaicInfo.size),V=o.textureUVNextVertex1.divide(this.mosaicInfo.size),C=o.textureUVNextVertex2.divide(this.mosaicInfo.size),M={color:new p(1,1,1,1),outlineSize:l,outlineColor:new p(1,1,1,1),isSDF:n,distanceToPx:d};let N=new a(0);return N=N.add(R(h).multiply(this._getColor(G(h,_,V,C),M).a)),N=N.add(R(c).multiply(this._getColor(G(c,_,V,C),M).a)),N=N.add(R(x).multiply(this._getColor(G(x,_,V,C),M).a)),N=N.add(R(y).multiply(this._getColor(G(y,_,V,C),M).a)),N=N.add(R(v).multiply(this._getColor(G(v,_,V,C),M).a)),N=N.add(R(f).multiply(this._getColor(G(f,_,V,C),M).a)),N=N.add(R(w).multiply(this._getColor(G(w,_,V,C),M).a)),N=N.add(R(S).multiply(this._getColor(G(S,_,V,C),M).a)),N=N.add(R(b).multiply(this._getColor(G(b,_,V,C),M).a)),P(N,new a(.05)).multiply(U(this.hittestRequest))}}t([e(0,r(W)),e(1,r(B))],H.prototype,"vertex",null),t([e(0,r(E))],H.prototype,"fragment",null);export{E as AnimatedMarkerFragmentInput,H as AnimatedMarkerShader,W as AnimatedMarkerVertexInput};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t,a as o}from"../../../../../../../chunks/tslib.es6.js";import{tileSize as e}from"../../../definitions.js";import{VertexInput as i,location as s,UniformGroup as r,uniform as d,GraphShaderModule as n,FragmentOutput as a,input as
|
|
5
|
+
import{_ as t,a as o}from"../../../../../../../chunks/tslib.es6.js";import{tileSize as e}from"../../../definitions.js";import{VertexInput as i,location as s,UniformGroup as r,uniform as d,GraphShaderModule as n,FragmentOutput as a,input as p}from"../../GraphShaderModule.js";import{Mat3 as l,Vec3 as c,texture2D as m,max as y,Float as u,step as v,Vec4 as w,length as h,smoothstep as x,Vec2 as f,Sampler2D as g}from"../../graph/glsl.js";import{FeatureFragmentInput as S}from"../shaders/AFeatureShader.js";import{ViewInfo as j}from"../shaders/ViewInfo.js";class z extends i{}t([s(0,f)],z.prototype,"pos",void 0);class P extends S{}class R extends r{}t([d(u)],R.prototype,"dotSize",void 0);class b extends r{}t([d(g)],b.prototype,"locations",void 0),t([d(u)],b.prototype,"pixelRatio",void 0),t([d(u)],b.prototype,"tileZoomFactor",void 0);const F=1e-6;class C extends n{constructor(){super(...arguments),this.type="DotDensityPointShader"}vertex(t){const o=new l(1,0,0,0,-1,0,0,1,1).multiply(new c(t.pos.xy.divide(e),1)),i=m(this.draw.locations,o.xy),s=y(this.instance.dotSize.divide(2),new u(1));let r=new u(0);r=r.add(v(i.a,new u(F)).multiply(2));let d=s.add(this.instance.dotSize);const n=this.view.displayViewScreenMat3.multiply(new c(t.pos.add(.5),1)),a=new w(n.xy,r,1),p=this.instance.dotSize.divide(d),h=new u(-1).divide(s.divide(d));return d=d.multiply(this.draw.pixelRatio.multiply(this.draw.tileZoomFactor)),{glPosition:a,glPointSize:d,color:i,ratio:p,invEdgeRatio:h}}fragment(t){const o=h(t.glPointCoord.subtract(.5)).multiply(2),e=x(new u(0),new u(1),t.invEdgeRatio.multiply(o.subtract(t.ratio)).add(1)),i=new a;return i.fragColor=t.color.multiply(e),i}}t([d(R)],C.prototype,"instance",void 0),t([d(b)],C.prototype,"draw",void 0),t([d(j)],C.prototype,"view",void 0),t([o(0,p(z))],C.prototype,"vertex",null),t([o(0,p(P))],C.prototype,"fragment",null);export{b as DotDensityPointDrawUniforms,P as DotDensityPointFragmentInput,R as DotDensityPointInstanceUniforms,C as DotDensityPointShader,z as DotDensityPointVertexInput};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t,a as e}from"../../../../../../../chunks/tslib.es6.js";import{tileSize as o}from"../../../definitions.js";import{uniform as s,location as i,UniformGroup as r,define as l,FragmentOutput as d,input as
|
|
5
|
+
import{_ as t,a as e}from"../../../../../../../chunks/tslib.es6.js";import{tileSize as o}from"../../../definitions.js";import{uniform as s,location as i,UniformGroup as r,define as l,FragmentOutput as d,input as n}from"../../GraphShaderModule.js";import{FixedArray as a,Vec4 as p,Mat3 as h,Vec3 as c,texture2D as u,Mat4 as m,step as y,Float as v,dot as w,max as x,Sampler2D as f}from"../../graph/glsl.js";import{FeatureVertexInput as g,FeatureFragmentInput as A,AFeatureShader as D}from"../shaders/AFeatureShader.js";import{failHittest as T}from"../shaders/hittestUtils.js";import{max4 as b}from"../shaders/utils.js";class j extends g{}t([i(3,v)],j.prototype,"inverseArea",void 0);class C extends A{}class V extends r{}t([s(a.ofType(p,2))],V.prototype,"isActive",void 0),t([s(a.ofType(p,8))],V.prototype,"colors",void 0),t([s(v)],V.prototype,"dotValue",void 0);class _ extends r{}t([s(f)],_.prototype,"dotTexture0",void 0),t([s(f)],_.prototype,"dotTexture1",void 0),t([s(v)],_.prototype,"tileZoomFactor",void 0),t([s(v)],_.prototype,"pixelRatio",void 0),t([s(v)],_.prototype,"tileDotsOverArea",void 0);class F extends D{constructor(){super(...arguments),this.type="DotDensityPolygonShader"}_dotThreshold(t,e,o){return t.divide(e).divide(o)}vertex(t){const e=new h(2/o,0,0,0,-2/o,0,-1,1,1).multiply(new c(t.pos,1)),s=this.clip(t.id),i=new p(e.xy,s,1),r=this.storage.getVVData(t.id).multiply(this.instance.isActive.get(0)).multiply(t.inverseArea),l=this.storage.getDataDrivenData0(t.id).multiply(this.instance.isActive.get(1)).multiply(t.inverseArea),d=this.draw.tileZoomFactor.multiply(o).divide(this.draw.pixelRatio),n=this._dotThreshold(r,this.instance.dotValue,this.draw.tileDotsOverArea),a=this._dotThreshold(l,this.instance.dotValue,this.draw.tileDotsOverArea),u=t.pos.add(.5).divide(d);return{glPosition:i,color:new p(0,0,0,0),textureCoords:u,thresholds0:n,thresholds1:a}}fragment(t){const e=new d,o=u(this.draw.dotTexture0,t.textureCoords),s=u(this.draw.dotTexture1,t.textureCoords),i=t.thresholds0.subtract(o),r=t.thresholds1.subtract(s);let l;const n=m.fromColumns(this.instance.colors[0],this.instance.colors[1],this.instance.colors[2],this.instance.colors[3]),a=m.fromColumns(this.instance.colors[4],this.instance.colors[5],this.instance.colors[6],this.instance.colors[7]);if(this.blending){const t=y(new v(0),i),e=y(new v(0),r),o=w(t,i).add(w(e,r)),s=y(o,new v(0)),d=new v(1).subtract(s),p=o.add(s),h=i.multiply(t).divide(p),c=r.multiply(e).divide(p),u=n.multiply(h).add(a.multiply(c));l=d.multiply(u)}else{const t=x(b(i),b(r)),e=y(t,new v(0)),o=new v(1).subtract(e),s=y(t,i),d=y(t,r),p=n.multiply(s).add(a.multiply(d));l=o.multiply(p)}return e.fragColor=l,e}hittest(t){return T(this.hittestRequest)}}t([l],F.prototype,"blending",void 0),t([s(V)],F.prototype,"instance",void 0),t([s(_)],F.prototype,"draw",void 0),t([e(0,n(j))],F.prototype,"vertex",null),t([e(0,n(A))],F.prototype,"fragment",null);export{_ as DotDensityPolygonDrawUniforms,C as DotDensityPolygonFragmentInput,V as DotDensityPolygonInstanceUniforms,F as DotDensityPolygonShader,j as DotDensityPolygonVertexInput};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t,a as e}from"../../../../../../../chunks/tslib.es6.js";import{location as i,option as o,uniform as s,ComputeVertexInput as l,input as r}from"../../GraphShaderModule.js";import{Vec3 as a,min as p,max as n,Float as u,Mat3 as d,Vec4 as m,ifElse as y,lessThan as h,equal as c,texture2D as x,clamp as v,abs as f,mix as V,distance as w,greaterThan as S,Vec2 as b,negate as g,step as C}from"../../graph/glsl.js";import{MarkerConstants as
|
|
5
|
+
import{_ as t,a as e}from"../../../../../../../chunks/tslib.es6.js";import{location as i,option as o,uniform as s,ComputeVertexInput as l,input as r}from"../../GraphShaderModule.js";import{Vec3 as a,min as p,max as n,Float as u,Mat3 as d,Vec4 as m,ifElse as y,lessThan as h,equal as c,texture2D as x,clamp as v,abs as f,mix as V,distance as w,greaterThan as S,Vec2 as b,negate as g,step as C}from"../../graph/glsl.js";import{MarkerConstants as M}from"./markerConstants.js";import{FeatureVertexInput as z,FeatureFragmentInput as _,AFeatureShader as j}from"../shaders/AFeatureShader.js";import{c256ToRad as R,softEdgeRatio as U}from"../shaders/constants.js";import{distPointTriangle as N,xyToBarycentric as D,inTriangle as F,failHittest as k}from"../shaders/hittestUtils.js";import{MosaicInfo as I}from"../shaders/MosaicInfo.js";import{getBit as O,getBitBool as q,rgba2float as A}from"../shaders/utils.js";import{VisualVariableColor as P}from"../shaders/VisualVariableColor.js";import{VisualVariableOpacity as T}from"../shaders/VisualVariableOpacity.js";import{VisualVariableRotation as G}from"../shaders/VisualVariableRotation.js";import{VisualVariableSizeMinMaxValue as H}from"../shaders/VisualVariableSizeMinMaxValue.js";import{VisualVariableSizeScaleStops as L}from"../shaders/VisualVariableSizeScaleStops.js";import{VisualVariableSizeStops as B}from"../shaders/VisualVariableSizeStops.js";import{VisualVariableSizeUnitValue as E}from"../shaders/VisualVariableSizeUnitValue.js";import{getVisualVariableOpacity as J,getVisualVariableColor as K,getVisualVariableSize as Q,getVisualVariableRotation as W}from"../shaders/vvUtils.js";class X extends z{}t([i(3,m)],X.prototype,"color",void 0),t([i(4,m)],X.prototype,"outlineColor",void 0),t([i(5,b)],X.prototype,"offset",void 0),t([i(6,b)],X.prototype,"textureUV",void 0),t([i(7,m)],X.prototype,"sizing",void 0),t([i(8,u)],X.prototype,"placementAngle",void 0),t([i(9,u)],X.prototype,"sdfDecodeCoeff",void 0),t([i(10,b)],X.prototype,"zoomRange",void 0);class Y extends l{}t([i(12,b)],Y.prototype,"offsetNextVertex1",void 0),t([i(13,b)],Y.prototype,"offsetNextVertex2",void 0),t([i(14,b)],Y.prototype,"textureUVNextVertex1",void 0),t([i(15,b)],Y.prototype,"textureUVNextVertex2",void 0);class Z extends _{}function $(t,e,i,o){return e.multiply(t.x).add(i.multiply(t.y)).add(o.multiply(t.z))}function tt(t){return t.multiply(t).divide(128)}class et extends j{constructor(){super(...arguments),this.type="MarkerShader",this.computeAttributes={offset:["offsetNextVertex1","offsetNextVertex2"],textureUV:["textureUVNextVertex1","textureUVNextVertex2"]}}vertex(t,e){const i=tt(t.sizing.x),o=tt(t.sizing.y),s=tt(t.sizing.z),l=t.placementAngle,r=O(t.bitset,M.bitset.isSDF),y=O(t.bitset,M.bitset.isMapAligned),h=O(t.bitset,M.bitset.scaleSymbolsProportionally),c=q(t.bitset,M.bitset.colorLocked),x=J(this,t.id),v=K(this,t.id,t.color,c).multiply(x),f=this.view.displayViewScreenMat3.multiply(new a(t.pos.xy,1)),V=Q(this,t.id,s).divide(s),w=i.multiply(V),S=t.offset.xy.multiply(V);let b=o.multiply(h.multiply(V.subtract(1)).add(1));b=p(b,n(w.subtract(.99),new u(0)));const g=n(b,new u(1)),C=p(b,new u(1)),z=d.fromRotation(l.multiply(R)),_=W(this,t.id),j=this._getViewRotationMatrix(y).multiply(_).multiply(z).multiply(new a(S.xy,0)),U=this.clip(t.id,t.zoomRange),N=new m(f.xy.add(j.xy),U,1),D=t.textureUV.divide(this.mosaicInfo.size),F=t.outlineColor.multiply(C),k=O(t.bitset,M.bitset.overrideOutlineColor),I=t.sdfDecodeCoeff.multiply(w);return{glPosition:N,color:v,textureUV:D,outlineColor:F,outlineSize:g,distanceToPx:I,isSDF:r,overrideOutlineColor:k,...this.maybeRunHittest(t,e,{pos:t.pos,size:w,sizeCorrection:V,isMapAligned:y,vvRotationMat3:_,placementMat3:z,outlineSize:g,distanceToPx:I,isSDF:r})}}fragment(t){const e=this._getColor(t.textureUV,t);return this.getFragmentOutput(e,t)}hittest(t,e,i){return y(h(i.size,this.hittestRequest.smallSymbolSizeThreshold),this._hittestSmallMarker(t,e,i),this._hittestMarker(t,e,i))}_getViewRotationMatrix(t){const e=this.view.displayViewMat3,i=this.view.displayMat3,o=new u(1).subtract(t);return e.multiply(t).add(i.multiply(o))}_getViewScreenMatrix(t){const e=this.view.viewMat3.multiply(this.view.tileMat3),i=this.view.tileMat3,o=new u(1).subtract(t);return e.multiply(t).add(i.multiply(o))}_getColor(t,e){return y(c(e.isSDF,new u(1)),this._getSDFColor(t,e),this._getSpriteColor(t,e))}_getSpriteColor(t,e){return x(this.mosaicInfo.texture,t).multiply(e.color)}_getSDFColor(t,e){const i=x(this.mosaicInfo.texture,t),o=new u(.5).subtract(A(i)).multiply(e.distanceToPx).multiply(U),s=v(new u(.5).subtract(o),new u(0),new u(1)),l=e.color.multiply(s);let r=e.outlineSize;this.highlight&&(r=n(r,e.overrideOutlineColor.multiply(4)));const a=r.multiply(.5),p=f(o).subtract(a),d=v(new u(.5).subtract(p),new u(0),new u(1)),m=V(e.outlineColor,e.color,e.overrideOutlineColor).multiply(d);return new u(1).subtract(m.a).multiply(l).add(m)}_hittestSmallMarker(t,e,i){const{position:o,distance:s,smallSymbolDistance:l}=this.hittestRequest,r=s.subtract(l),{viewMat3:p,tileMat3:n}=this.view,u=p.multiply(n).multiply(new a(i.pos,1)).xy,d=i.size.multiply(.5);return w(u,o).subtract(d).add(r)}_hittestMarker(t,e,i){const{pos:o,sizeCorrection:s,isMapAligned:l}=i,r=new a(t.offset.multiply(s),0),p=new a(e.offsetNextVertex1.multiply(s),0),n=new a(e.offsetNextVertex2.multiply(s),0),{viewMat3:u,tileMat3:d}=this.view,m=u.multiply(d).multiply(new a(o,1)),h=this._getViewScreenMatrix(l).multiply(i.vvRotationMat3).multiply(i.placementMat3),c=m.add(h.multiply(r)).xy,x=m.add(h.multiply(p)).xy,v=m.add(h.multiply(n)).xy,f=this.hittestRequest.position,V=this.hittestRequest.distance,w=N(f,c,x,v);return y(S(w,V),w,this._hittestSamples(c,x,v,t,e,i))}_hittestSamples(t,e,i,o,s,l){const{outlineSize:r,isSDF:a,distanceToPx:p}=l,n=this.hittestRequest.position,d=this.hittestRequest.distance,y=D(n.add(new b(g(d),g(d))),t,e,i),h=D(n.add(new b(0,g(d))),t,e,i),c=D(n.add(new b(d,g(d))),t,e,i),x=D(n.add(new b(g(d),0)),t,e,i),v=D(n,t,e,i),f=D(n.add(new b(d,0)),t,e,i),V=D(n.add(new b(g(d),d)),t,e,i),w=D(n.add(new b(0,d)),t,e,i),S=D(n.add(new b(d,d)),t,e,i),M=o.textureUV.divide(this.mosaicInfo.size),z=s.textureUVNextVertex1.divide(this.mosaicInfo.size),_=s.textureUVNextVertex2.divide(this.mosaicInfo.size),j={color:new m(1),outlineColor:new m(1),overrideOutlineColor:new u(1),outlineSize:r,distanceToPx:p,isSDF:a};let R=new u(0);return R=R.add(F(y).multiply(this._getColor($(y,M,z,_),j).a)),R=R.add(F(h).multiply(this._getColor($(h,M,z,_),j).a)),R=R.add(F(c).multiply(this._getColor($(c,M,z,_),j).a)),R=R.add(F(x).multiply(this._getColor($(x,M,z,_),j).a)),R=R.add(F(v).multiply(this._getColor($(v,M,z,_),j).a)),R=R.add(F(f).multiply(this._getColor($(f,M,z,_),j).a)),R=R.add(F(V).multiply(this._getColor($(V,M,z,_),j).a)),R=R.add(F(w).multiply(this._getColor($(w,M,z,_),j).a)),R=R.add(F(S).multiply(this._getColor($(S,M,z,_),j).a)),C(R,new u(.05)).multiply(k(this.hittestRequest))}}t([o(P)],et.prototype,"visualVariableColor",void 0),t([o(T)],et.prototype,"visualVariableOpacity",void 0),t([o(G)],et.prototype,"visualVariableRotation",void 0),t([o(H)],et.prototype,"visualVariableSizeMinMaxValue",void 0),t([o(L)],et.prototype,"visualVariableSizeScaleStops",void 0),t([o(B)],et.prototype,"visualVariableSizeStops",void 0),t([o(E)],et.prototype,"visualVariableSizeUnitValue",void 0),t([s(I)],et.prototype,"mosaicInfo",void 0),t([e(0,r(X)),e(1,r(Y))],et.prototype,"vertex",null),t([e(0,r(Z))],et.prototype,"fragment",null);export{Z as MarkerFragmentInput,et as MarkerShader,X as MarkerVertexInput};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as
|
|
5
|
+
import{_ as t,a as o}from"../../../../../../../chunks/tslib.es6.js";import{location as i,uniform as e,GraphShaderModule as r,define as s,VertexInput as p,UniformGroup as c,FragmentOutput as n,input as l,FragmentInput as a}from"../../GraphShaderModule.js";import{Vec3 as d,Vec4 as u,texture2D as y,Vec2 as m,Sampler2D as f,Mat3 as g,Float as h}from"../../graph/glsl.js";import{sampleBicubicBSpline as x}from"./bitmapUtils.js";class v extends p{}t([i(0,m)],v.prototype,"position",void 0);class b extends a{}class S extends c{}t([e(f)],S.prototype,"texture",void 0),t([e(g)],S.prototype,"dvsMat3",void 0),t([e(m)],S.prototype,"coordScale",void 0),t([e(h)],S.prototype,"opacity",void 0);class j extends r{constructor(){super(...arguments),this.type="BitmapShader"}vertex(t){const o=this.config.dvsMat3.multiply(new d(t.position.multiply(this.config.coordScale),1));return{glPosition:new u(o,1),texcoord:t.position}}fragment(t){const o=new n;let i;return i=this.bicubic?x(this.config.texture,t.texcoord,this.config.coordScale):y(this.config.texture,t.texcoord),o.fragColor=new u(i.rgb.multiply(this.config.opacity),i.a.multiply(this.config.opacity)),o}}t([e(S)],j.prototype,"config",void 0),t([s],j.prototype,"bicubic",void 0),t([o(0,l(v))],j.prototype,"vertex",null),t([o(0,l(b))],j.prototype,"fragment",null);export{j as BitmapShader};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t,a as l}from"../../../../../../../chunks/tslib.es6.js";import{location as e,uniform as r,GraphShaderModule as n,define as i,VertexInput as a,UniformGroup as o,FragmentOutput as u,input as p,FragmentInput as s}from"../../GraphShaderModule.js";import{Vec4 as c,texture2D as
|
|
5
|
+
import{_ as t,a as l}from"../../../../../../../chunks/tslib.es6.js";import{location as e,uniform as r,GraphShaderModule as n,define as i,VertexInput as a,UniformGroup as o,FragmentOutput as u,input as p,FragmentInput as s}from"../../GraphShaderModule.js";import{Vec4 as c,texture2D as d,ifElse as y,equal as m,Float as w,clamp as b,Vec3 as g,abs as f,max as k,min as C,step as v,cond as h,sqrt as x,lessThanEqual as j,greaterThan as T,dot as F,lessThan as M,Vec2 as O,Sampler2D as S}from"../../graph/glsl.js";import{uvToClip as B,oneMinus as G,minusOne as P,minusScalar as _}from"./utils.js";class q extends a{}t([e(0,O)],q.prototype,"position",void 0);class z extends s{}class A extends o{}t([r(S)],A.prototype,"layerTexture",void 0),t([r(S)],A.prototype,"backbufferTexture",void 0),t([r(w)],A.prototype,"opacity",void 0),t([r(w)],A.prototype,"inFadeOpacity",void 0);class D extends n{constructor(){super(...arguments),this.type="BlendShader"}vertex(t){return{uv:t.position,glPosition:new c(B(t.position),0,1)}}fragment(t){const l=new u,e=d(this.config.layerTexture,t.uv),r=d(this.config.backbufferTexture,t.uv),n=y(m(e.a,new w(0)),e.rgb,e.rgb.divide(e.a)),i=y(m(r.a,new w(0)),r.rgb,r.rgb.divide(r.a)),a=this.config.opacity.multiply(e.a),o=r.a;switch(this.blendMode){case"destination-over":l.fragColor=new c(n.multiply(a).multiply(G(o)).add(i.multiply(o)),a.add(o).subtract(a.multiply(o)));break;case"source-in":{const t=new c(n.multiply(a).multiply(o),a.multiply(o)),e=new c(i.multiply(o),o).multiply(G(this.config.opacity)).multiply(this.config.inFadeOpacity);l.fragColor=t.add(e)}break;case"destination-in":{const t=new c(i.multiply(o).multiply(a),o.multiply(a)),e=new c(i.multiply(o),o).multiply(new c(G(this.config.opacity).multiply(this.config.inFadeOpacity)));l.fragColor=t.add(e)}break;case"source-out":l.fragColor=new c(n.multiply(a).multiply(G(o)),a.multiply(G(o)));break;case"destination-out":l.fragColor=new c(i.multiply(o).multiply(G(a)),o.multiply(G(a)));break;case"source-atop":l.fragColor=new c(n.multiply(a).multiply(o).add(i.multiply(o.multiply(G(a)))),o);break;case"destination-atop":l.fragColor=new c(n.multiply(a.multiply(G(o))).add(i.multiply(o).multiply(a)),a);break;case"xor":l.fragColor=new c(n.multiply(a.multiply(G(o))).add(i.multiply(o.multiply(G(a)))),a.multiply(G(o)).add(o.multiply(G(a))));break;case"multiply":l.fragColor=new c(n.multiply(a).multiply(i.multiply(o)).add(n.multiply(a).multiply(G(o))).add(i.multiply(o).multiply(G(a))),a.add(o.multiply(G(a))));break;case"screen":l.fragColor=new c(n.add(i).subtract(n.multiply(i)).multiply(a.multiply(o)).add(n.multiply(a).multiply(G(o))).add(i.multiply(o).multiply(G(a))),a.add(o.multiply(G(a))));break;case"overlay":{const t=new g(H(i.r,n.r),H(i.g,n.g),H(i.b,n.b));l.fragColor=E(t,n,i,a,o)}break;case"darken":{const t=C(n,i);l.fragColor=E(t,n,i,a,o)}break;case"lighter":l.fragColor=new c(n.multiply(a).add(i.multiply(o)),a.add(o));break;case"lighten":{const t=k(n,i);l.fragColor=E(t,n,i,a,o)}break;case"color-dodge":{const t=b(new g(I(i.r,n.r),I(i.g,n.g),I(i.b,n.b)),new g(0),new g(1));l.fragColor=E(t,n,i,a,o)}break;case"color-burn":{const t=new g(J(i.r,n.r),J(i.g,n.g),J(i.b,n.b));l.fragColor=E(t,n,i,a,o)}break;case"hard-light":{const t=new g(K(i.r,n.r),K(i.g,n.g),K(i.b,n.b));l.fragColor=E(t,n,i,a,o)}break;case"soft-light":{const t=new g(L(i.r,n.r),L(i.g,n.g),L(i.b,n.b));l.fragColor=E(t,n,i,a,o)}break;case"difference":{const t=f(i.subtract(n));l.fragColor=E(t,n,i,a,o)}break;case"exclusion":{const t=n.add(i).subtract(new w(2).multiply(n).multiply(i));l.fragColor=E(t,n,i,a,o)}break;case"invert":l.fragColor=new c(new g(1).subtract(i).multiply(a).multiply(o).add(i.multiply(o).multiply(G(a))),o);break;case"vivid-light":{const t=new g(b(N(i.r,n.r),new w(0),new w(1)),b(N(i.g,n.g),new w(0),new w(1)),b(N(i.b,n.b),new w(0),new w(1)));l.fragColor=E(t,n,i,a,o)}break;case"hue":{const t=Y(n,i,i);l.fragColor=E(t,n,i,a,o)}break;case"saturation":{const t=Y(i,n,i);l.fragColor=E(t,n,i,a,o)}break;case"color":{const t=X(n,i);l.fragColor=E(t,n,i,a,o)}break;case"luminosity":{const t=X(i,n);l.fragColor=E(t,n,i,a,o)}break;case"plus":l.fragColor=b(new c(e.r.add(i.r),e.g.add(i.g),e.b.add(i.b),a.add(o)),new c(0),new c(1));break;case"minus":l.fragColor=new c(b(new g(i.r.subtract(e.r),i.g.subtract(e.g),i.b.subtract(e.b)),new g(0),new g(1)),o.multiply(a));break;case"average":{const t=i.add(n).divide(2);l.fragColor=E(t,n,i,a,o)}break;case"reflect":{const t=b(new g(Z(i.r,n.r),Z(i.g,n.g),Z(i.b,n.b)),new g(0),new g(1));l.fragColor=E(t,n,i,a,o)}break;default:l.fragColor=e.multiply(this.config.opacity)}return l}}function E(t,l,e,r,n){return new c(t.multiply(r).multiply(n).add(l.multiply(r).multiply(G(n))).add(e.multiply(n).multiply(G(r))),r.add(n.multiply(G(r))))}function H(t,l){return new w(1).subtract(v(new w(.5),l)).multiply(G(new w(2).multiply(G(l).multiply(G(t))))).add(v(new w(.5),l).multiply(new w(2).multiply(l).multiply(t)))}function I(t,l){return y(m(t,new w(0)),new w(0),y(m(l,new w(1)),new w(1),C(new w(1),t.divide(new w(1).subtract(l)))))}function J(t,l){return y(m(t,new w(1)),new w(1),y(m(l,new w(0)),new w(0),G(C(new w(1),G(t).divide(l)))))}function K(t,l){return new w(1).subtract(v(new w(.5),l)).multiply(new w(2).multiply(l).multiply(t)).add(v(new w(.5),l).multiply(G(new w(2).multiply(G(l).multiply(G(t))))))}function L(t,l){return h([j(l,new w(.5)),()=>{const e=new w(2).multiply(l),r=G(e),n=G(t);return t.subtract(r.multiply(t).multiply(n))}],[j(t,new w(.25)),()=>{const e=new w(2).multiply(l),r=P(e).multiply(t),n=new w(16).multiply(t).subtract(new w(12)).multiply(t).add(new w(3));return t.add(r.multiply(n))}],[!0,()=>{const e=new w(2).multiply(l),r=P(e),n=x(t).subtract(t);return t.add(r.multiply(n))}])}function N(t,l){const e=G(v(new w(.5),l)).multiply(J(t,new w(2).multiply(l))),r=v(new w(.5),l).multiply(I(t,new w(2).multiply(_(l,.5))));return e.add(r)}function Q(t){return C(C(t.r,t.g),t.b)}function R(t){return k(k(t.r,t.g),t.b)}function U(t){return F(t,new g(.3,.59,.11))}function V(t){return R(t).subtract(Q(t))}function W(t){const l=U(t),e=Q(t),r=R(t);return h([M(e,new w(0)),()=>{const r=t.subtract(l).multiply(l),n=l.subtract(e);return l.add(r.divide(n))}],[T(r,new w(1)),()=>{const e=t.subtract(l),n=G(l),i=e.multiply(n),a=r.subtract(l);return l.add(i.divide(a))}],[!0,t])}function X(t,l){const e=U(t),r=U(l).subtract(e);return W(t.add(new g(r)))}function Y(t,l,e){const r=Q(t),n=V(t),i=V(l);return X(y(T(n,new w(0)),(()=>t.subtract(r).multiply(i).divide(n)),new g(0)),e)}function Z(t,l){return y(m(l,new w(1)),l,(()=>{const e=G(l),r=t.multiply(t).divide(e);return C(r,new w(1))}))}t([i],D.prototype,"blendMode",void 0),t([r(A)],D.prototype,"config",void 0),t([l(0,p(q))],D.prototype,"vertex",null),t([l(0,p(z))],D.prototype,"fragment",null);export{D as BlendShader};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t,a as e}from"../../../../../../../chunks/tslib.es6.js";import{location as o,uniform as i,input as r}from"../../GraphShaderModule.js";import{Vec2 as l,sin as s,cos as p,Vec3 as a,ifElse as n,Float as d,mod as m,mix as u,texture2D as f,greaterThan as
|
|
5
|
+
import{_ as t,a as e}from"../../../../../../../chunks/tslib.es6.js";import{location as o,uniform as i,input as r}from"../../GraphShaderModule.js";import{Vec2 as l,sin as s,cos as p,Vec3 as a,ifElse as n,Float as d,mod as m,mix as u,texture2D as f,greaterThan as c,equal as y,float as v,Vec4 as h,mat3 as x,negate as g,vec2 as b}from"../../graph/glsl.js";import{FeatureFragmentInput as w,BaseHittestVertexInput as j}from"./AFeatureShader.js";import{c256ToRad as O,bitsetGenericConsiderAlphaOnly as T,bitsetFillRandomPatternOffset as C}from"./constants.js";import{FillVertexInput as F,FillShader as A}from"./FillShader.js";import{LocalTileOffset as I}from"./LocalTileOffset.js";import{MosaicInfo as S}from"./MosaicInfo.js";import{getBit as z,isNan as M,rgba2float as V,rand as k}from"./utils.js";class q extends F{}t([o(5,h)],q.prototype,"tlbr",void 0),t([o(6,d)],q.prototype,"width",void 0),t([o(7,d)],q.prototype,"height",void 0),t([o(8,l)],q.prototype,"offset",void 0),t([o(9,l)],q.prototype,"scale",void 0),t([o(10,d)],q.prototype,"angle",void 0);class G extends w{}function L(t,e,o,i,r){const l=y(z(r,C),v(1)),s=V(new h(t,0));return n(l,x(i.divide(e.x),o.divide(e.y),0,g(o.divide(e.x)),i.divide(e.y),0,k(b(s,0)),k(b(0,s)),1),x(i.divide(e.x),o.divide(e.y),0,g(o.divide(e.x)),i.divide(e.y),0,0,0,1))}function P(t,e){const o=t.view.requiredZoomFactor,i=new l(e.width,e.height),r=i.multiply(e.scale).multiply(o),m=e.angle.multiply(O),u=s(m),f=p(m),c=L(e.id,r,u,f,e.bitset),y=t.localTileOffset.getPatternOffsetAtTileOrigin(i,u,f),v=o.multiply(e.scale).multiply(e.offset.subtract(y)).divide(r),h=new a(e.pos,1),x=c.multiply(h).xy.subtract(v),g=e.tlbr.divide(t.mosaicInfo.size.xyxy);let b=z(e.bitset,T);return null!=t.visualVariableColor&&(b=n(M(t.storage.getColorValue(e.id)),new d(0),b)),{tileTextureCoord:x,tlbr:g,sampleAlphaOnly:b}}function Z(t,e){const o=m(e.tileTextureCoord,new d(1)),i=u(e.tlbr.xy,e.tlbr.zw,o);let r=f(t.mosaicInfo.texture,i);return r=n(c(e.sampleAlphaOnly,new d(.5)),r.aaaa,r),e.color.multiply(r)}class _ extends A{constructor(){super(...arguments),this.type="ComplexFillShader"}vertex(t,e){return{...super.vertex(t,e),...P(this,t)}}fragment(t){const e=Z(this,t);return this.getFragmentOutput(e,t,new d(0))}}t([i(S)],_.prototype,"mosaicInfo",void 0),t([i(I)],_.prototype,"localTileOffset",void 0),t([e(0,r(q)),e(1,r(j))],_.prototype,"vertex",null),t([e(0,r(G))],_.prototype,"fragment",null);export{G as ComplexFillFragmentInput,_ as ComplexFillShader,q as ComplexFillVertexInput,Z as getComplexFillFragmentColor,P as getComplexFillVertexData};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t,a as o}from"../../../../../../../chunks/tslib.es6.js";import{location as e,uniform as r,input as i}from"../../GraphShaderModule.js";import{greaterThan as s,Float as
|
|
5
|
+
import{_ as t,a as o}from"../../../../../../../chunks/tslib.es6.js";import{location as e,uniform as r,input as i}from"../../GraphShaderModule.js";import{greaterThan as s,Float as l,ifElse as p,Vec4 as a,Vec2 as n}from"../../graph/glsl.js";import{FeatureVertexInput as m,BaseHittestVertexInput as u}from"./AFeatureShader.js";import{getComplexFillVertexData as h,getComplexFillFragmentColor as f}from"./ComplexFillShader.js";import{hittestFill as d,failHittest as c}from"./hittestUtils.js";import{getLineFragmentColor as x}from"./LineShader.js";import{LocalTileOffset as y}from"./LocalTileOffset.js";import{MosaicInfo as v}from"./MosaicInfo.js";import{AOutlineFillShader as j,getOutlineFillVertexData as g}from"./OutlineFillShader.js";import{PatternOutlineFillFragmentInput as O}from"./PatternOutlineFillShader.js";const S=16,F=1/S,b=128;class w extends m{}t([e(3,a)],w.prototype,"color",void 0),t([e(4,a)],w.prototype,"tlbr",void 0),t([e(5,l)],w.prototype,"angle",void 0),t([e(6,l)],w.prototype,"aux1",void 0),t([e(7,l)],w.prototype,"aux2",void 0),t([e(8,n)],w.prototype,"aux3",void 0),t([e(9,n)],w.prototype,"aux4",void 0),t([e(10,n)],w.prototype,"zoomRange",void 0);class C extends O{}class R extends j{constructor(){super(...arguments),this.type="ComplexOutlineFillShader"}vertex(t,o){const{aux1:e,aux2:r,aux3:i,aux4:p}=t,a={...t,width:e,height:r,offset:i,scale:p.multiply(F)},n={...t,halfWidth:e,referenceHalfWidth:r,offset:i,normal:p.subtract(b).multiply(F)},m=g(this,n),u=h(this,a),f=s(m.isOutline,new l(.5));return{...m,...u,...this.maybeRunHittest(t,o,f)}}fragment(t){const{isOutline:o}=t,e=s(o,new l(.5)),r=x(t,this.antialiasingControls.blur),i=f(this,t),a=p(e,r,i),n=p(e,new l(1/255),new l(0));return this.getFragmentOutput(a,t,n)}hittest(t,o,e){return p(e,c(this.hittestRequest),d(this,t,o))}}t([r(v)],R.prototype,"mosaicInfo",void 0),t([r(y)],R.prototype,"localTileOffset",void 0),t([o(0,i(w)),o(1,i(u))],R.prototype,"vertex",null),t([o(0,i(C))],R.prototype,"fragment",null);export{R as ComplexOutlineFillShader,w as ComplexOutlineFillVertexInput,S as packPrecision,b as signedToUnsignedByte};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t,a as o}from"../../../../../../../chunks/tslib.es6.js";import{location as r,option as e,input as i}from"../../GraphShaderModule.js";import{Vec3 as s,Vec4 as l,Float as p,Vec2 as a}from"../../graph/glsl.js";import{FeatureVertexInput as m,AFeatureShader as n,BaseHittestVertexInput as u,FeatureFragmentInput as
|
|
5
|
+
import{_ as t,a as o}from"../../../../../../../chunks/tslib.es6.js";import{location as r,option as e,input as i}from"../../GraphShaderModule.js";import{Vec3 as s,Vec4 as l,Float as p,Vec2 as a}from"../../graph/glsl.js";import{FeatureVertexInput as m,AFeatureShader as n,BaseHittestVertexInput as u,FeatureFragmentInput as h}from"./AFeatureShader.js";import{hittestFill as c}from"./hittestUtils.js";import{VisualVariableColor as y}from"./VisualVariableColor.js";import{VisualVariableOpacity as d}from"./VisualVariableOpacity.js";import{getVisualVariableOpacity as v,getVisualVariableColor as f}from"./vvUtils.js";class g extends m{}t([r(3,l)],g.prototype,"color",void 0),t([r(4,a)],g.prototype,"zoomRange",void 0);class x extends n{constructor(){super(...arguments),this.type="FillShader",this.computeAttributes={pos:["nextPos1","nextPos2"]}}vertex(t,o){const r=v(this,t.id),e=f(this,t.id,t.color).multiply(r),i=this.view.displayViewScreenMat3.multiply(new s(t.pos.xy,1)),p=this.clip(t.id,t.zoomRange);return{glPosition:new l(i.xy,p,1),color:e,...this.maybeRunHittest(t,o,null)}}fragment(t){return this.getFragmentOutput(t.color,t,new p(0))}hittest(t,o){return c(this,t,o)}}t([e(y)],x.prototype,"visualVariableColor",void 0),t([e(d)],x.prototype,"visualVariableOpacity",void 0),t([o(0,i(g)),o(1,i(u))],x.prototype,"vertex",null),t([o(0,i(h))],x.prototype,"fragment",null);export{x as FillShader,g as FillVertexInput};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t,a as e}from"../../../../../../../chunks/tslib.es6.js";import{location as i,uniform as r,input as o}from"../../GraphShaderModule.js";import{ifElse as s,Float as a,Vec2 as n,greaterThan as d,cond as l,equal as p,sqrt as m,dot as c,abs as u,max as v,clamp as
|
|
5
|
+
import{_ as t,a as e}from"../../../../../../../chunks/tslib.es6.js";import{location as i,uniform as r,input as o}from"../../GraphShaderModule.js";import{ifElse as s,Float as a,Vec2 as n,greaterThan as d,cond as l,equal as p,sqrt as m,dot as c,abs as u,max as v,clamp as h,mix as f,texture2D as x,Vec4 as g}from"../../graph/glsl.js";import{bitset as y,gradientFillMethods as w}from"../fill/gradientFillConstants.js";import{FeatureFragmentInput as b,BaseHittestVertexInput as j}from"./AFeatureShader.js";import{FillVertexInput as S,FillShader as z}from"./FillShader.js";import{MosaicInfo as F}from"./MosaicInfo.js";import{getBitBool as M,getBit as G,oneMinus as I}from"./utils.js";class P extends S{}t([i(5,g)],P.prototype,"tlbr",void 0),t([i(6,n)],P.prototype,"relativePosition",void 0),t([i(7,a)],P.prototype,"gradientMethod",void 0),t([i(8,n)],P.prototype,"relativeGradientSize",void 0);class D extends b{}class A extends z{constructor(){super(...arguments),this.type="GradientFillShader"}vertex(t,e){const{tlbr:i,relativePosition:r,gradientMethod:o,relativeGradientSize:n}=t,d=s(M(t.bitset,y.isAbsolute),this.view.displayZoomFactor,new a(1));return{...super.vertex(t,e),tlbr:i,relativePosition:r,gradientMethod:o,gradientSize:n.multiply(d),isDiscrete:G(t.bitset,y.isDiscrete)}}fragment(t){const{tlbr:e,relativePosition:i,gradientMethod:r,gradientSize:o,isDiscrete:g}=t,y=s(d(g,new a(.5)),o.subtract(1),new n(0)),b=l([p(r,new a(w.rectangular)),()=>{const t=u(i).add(y).divide(o);return I(v(t.x,t.y))}],[p(r,new a(w.circular)),I(m(c(i,i)).add(y.x).divide(o.x))],[!0,I(i.x.add(y.x).divide(o.x))]),j=new n(h(b,new a(0),new a(1)),.5),S=f(e.xy,e.zw,j).divide(this.mosaicInfo.size),z=x(this.mosaicInfo.texture,S),F=t.color.a;return this.getFragmentOutput(z.multiply(F),t,new a(0))}}t([r(F)],A.prototype,"mosaicInfo",void 0),t([e(0,o(P)),e(1,o(j))],A.prototype,"vertex",null),t([e(0,o(D))],A.prototype,"fragment",null);export{D as GradientFillFragmentInput,A as GradientFillShader,P as GradientFillVertexInput};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t,a as e}from"../../../../../../../chunks/tslib.es6.js";import has from"../../../../../../../core/has.js";import{location as i,uniform as o,UniformGroup as s,input as r}from"../../GraphShaderModule.js";import{ifElse as n,greaterThan as a,Float as
|
|
5
|
+
import{_ as t,a as e}from"../../../../../../../chunks/tslib.es6.js";import has from"../../../../../../../core/has.js";import{location as i,uniform as o,UniformGroup as s,input as r}from"../../GraphShaderModule.js";import{ifElse as n,greaterThan as a,Float as d,dot as l,mix as p,Vec2 as m,clamp as c,texture2D as h,step as u,length as y,Vec4 as g}from"../../graph/glsl.js";import{bitset as v}from"../line/gradientStrokeConstants.js";import{BaseHittestVertexInput as f}from"./AFeatureShader.js";import{LineVertexInput as w,LineFragmentInput as b,LineShader as x,getLineVertexData as S,getLineAntialiasing as j}from"./LineShader.js";import{MosaicInfo as L}from"./MosaicInfo.js";import{getBit as A,getBitBool as D,oneMinus as z}from"./utils.js";class F extends w{}t([i(9,d)],F.prototype,"accumulatedDistance",void 0),t([i(10,d)],F.prototype,"totalLength",void 0),t([i(11,d)],F.prototype,"gradientSize",void 0),t([i(12,m)],F.prototype,"segmentDirection",void 0),t([i(13,g)],F.prototype,"tlbr",void 0);class C extends b{}class G extends s{}t([o(d)],G.prototype,"isColorPass",void 0);class I extends x{constructor(){super(...arguments),this.type="GradientStrokeShader"}vertex(t,e){const{totalLength:i,gradientSize:o,segmentDirection:s,tlbr:r}=t,p=S(this,t),m=A(t.bitset,v.isAlongLine),c=i.divide(this.view.displayZoomFactor),h=n(D(t.bitset,v.isAbsoluteSize),(()=>{const t=n(a(m,new d(.5)),c,p.halfWidth);return o.divide(t)}),o),u=t.accumulatedDistance.divide(this.view.displayZoomFactor).add(l(s,p.scaledOffset)).divide(c),y=r.divide(this.mosaicInfo.size.xyxy);return{...p,tlbr:y,relativePositionAlongLine:u,relativeGradientSize:h,isAlongLine:A(t.bitset,v.isAlongLine),isDiscrete:A(t.bitset,v.isDiscrete),...this.maybeRunHittest(t,e,p.halfWidth)}}fragment(t){const{isAlongLine:e,isDiscrete:i,relativePositionAlongLine:o,relativeGradientSize:s,normal:r,tlbr:l}=t,g=j(t,this.antialiasingControls.blur),v=new d(.5).multiply(r.y).add(new d(.5)),f=n(a(e,new d(.5)),o,v),w=n(a(i,new d(.5)),s.subtract(1),new d(0)),b=z(f.add(w).divide(s)),x=p(l.xy,l.zw,new m(c(b,new d(0),new d(1)),.5)),S=h(this.mosaicInfo.texture,x),L=t.opacity.multiply(g),A=this.getFragmentOutput(S.multiply(L),t),D=u(new d(.5),this.technique.isColorPass).multiply(has("gradient-depth-epsilon")),F=u(new d(0),r.y).multiply(new d(has("gradient-depth-bias")).subtract(D));return A.glFragDepth=c(y(r).add(F),new d(0),new d(1)),A}}t([o(L)],I.prototype,"mosaicInfo",void 0),t([o(G)],I.prototype,"technique",void 0),t([e(0,r(F)),e(1,r(f))],I.prototype,"vertex",null);export{C as GradientStrokeFragmentInput,I as GradientStrokeShader,F as GradientStrokeVertexInput};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as
|
|
5
|
+
import{_ as t,a as o}from"../../../../../../../chunks/tslib.es6.js";import{location as e,uniform as r,GraphShaderModule as i,VertexInput as n,UniformGroup as s,FragmentOutput as a,input as p,FragmentInput as l}from"../../GraphShaderModule.js";import{Vec3 as d,Vec4 as c,abs as h,fract as y,min as m,Float as f,Vec2 as g,smoothstep as u,Int as v,round as x,intMod as w,ifElse as j,lessThan as C,greaterThan as L,multiply as b,step as W,mix as P,Mat3 as I}from"../../graph/glsl.js";class G extends n{}t([e(0,g)],G.prototype,"position",void 0);class S extends l{}class k extends s{}t([r(I)],k.prototype,"dvs",void 0);class M extends s{}t([r(f)],M.prototype,"halfWidth",void 0),t([r(f)],M.prototype,"aaWidth",void 0),t([r(f)],M.prototype,"pxPerCell",void 0),t([r(c)],M.prototype,"minorLineColor",void 0),t([r(c)],M.prototype,"majorLineColor",void 0),t([r(v)],M.prototype,"majorLineInterval",void 0);class _ extends i{constructor(){super(...arguments),this.type="GridShader"}vertex(t){const o=t.position.multiply(2).subtract(1);return{gridPos:this.transform.dvs.multiply(new d(o,1)).xy,glPosition:new c(o,0,1)}}fragment(t){const o=h(t.gridPos),e=y(o),r=m(e.x,new f(1).subtract(e.x)),i=m(e.y,new f(1).subtract(e.y)),n=new g(r,i).multiply(this.config.pxPerCell).subtract(this.config.halfWidth),s=m(n.x,n.y),p=new f(1).subtract(u(new f(0),this.config.aaWidth,s)),l=new v(x(o.x)),d=new v(x(o.y)),c=new f(w(l,this.config.majorLineInterval)),I=new f(w(d,this.config.majorLineInterval)),G=j(C(n.x,n.y),c,I),S=L(b(W(n.x,this.config.aaWidth),W(n.y,this.config.aaWidth)),new f(.5)),k=m(c,I),M=j(S,k,G),_=P(this.config.majorLineColor,this.config.minorLineColor,m(M,new f(1))),q=new a;return q.fragColor=_.multiply(p),q}}t([r(k)],_.prototype,"transform",void 0),t([r(M)],_.prototype,"config",void 0),t([o(0,p(G))],_.prototype,"vertex",null),t([o(0,p(S))],_.prototype,"fragment",null);export{_ as GridShader};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t,a as e}from"../../../../../../../chunks/tslib.es6.js";import{location as s,uniform as i,define as
|
|
5
|
+
import{_ as t,a as e}from"../../../../../../../chunks/tslib.es6.js";import{location as s,uniform as i,define as l,UniformGroup as o,input as r}from"../../GraphShaderModule.js";import{Float as a,Vec3 as p,Vec4 as n,length as u,step as m,Vec2 as d}from"../../graph/glsl.js";import{FeatureVertexInput as y,FeatureFragmentInput as h,AFeatureShader as c}from"./AFeatureShader.js";import{getHeatmapCompressionFactor as f}from"./heatmapUtils.js";import{hittestMarker as w}from"./hittestUtils.js";class v extends y{}t([s(5,d)],v.prototype,"offset",void 0);class x extends h{}class g extends o{}t([i(a)],g.prototype,"radius",void 0),t([i(a)],g.prototype,"isFieldActive",void 0);class F extends c{constructor(){super(...arguments),this.type="HeatmapAccumulateShader",this.usesHalfFloatPrecision=!1}vertex(t){const{radius:e,isFieldActive:s}=this.kernelControls,i=t.offset,l=s.multiply(this.storage.getVVData(t.id).x).add(new a(1).subtract(s)),o=this.view.displayViewScreenMat3.multiply(new p(t.pos,1)).add(this.view.displayViewMat3.multiply(new p(i,0)).multiply(e)),r=this.clip(t.id);return{glPosition:new n(o.xy,r,1),offset:i,fieldValue:l,color:new n(0),...this.maybeRunHittest(t,{},null)}}fragment(t){const{offset:e,fieldValue:s}=t,i=u(e),l=m(i,new a(1)),o=new a(1).subtract(i.multiply(i)),r=o.multiply(o),p=l.multiply(r).multiply(s).multiply(new a(f(this.usesHalfFloatPrecision)));return this.getFragmentOutput(new n(p),t)}hittest(t){const{viewMat3:e,tileMat3:s}=this.view,i=e.multiply(s).multiply(new p(t.pos,1));return w(i.xy,this.kernelControls.radius,this.hittestRequest.position)}}t([l],F.prototype,"usesHalfFloatPrecision",void 0),t([i(g)],F.prototype,"kernelControls",void 0),t([e(0,r(v))],F.prototype,"vertex",null),t([e(0,r(x))],F.prototype,"fragment",null);export{x as HeatmapAccumulateFragmentInput,F as HeatmapAccumulateShader,v as HeatmapAccumulateVertexInput};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t,a as e}from"../../../../../../../chunks/tslib.es6.js";import{VertexInput as o,location as
|
|
5
|
+
import{_ as t,a as e}from"../../../../../../../chunks/tslib.es6.js";import{VertexInput as o,location as s,FragmentInput as r,UniformGroup as i,uniform as n,GraphShaderModule as a,define as p,FragmentOutput as l,input as u}from"../../GraphShaderModule.js";import{Vec4 as d,texture2D as m,Float as c,Vec2 as y,Sampler2D as v}from"../../graph/glsl.js";import{getHeatmapCompressionFactor as x}from"./heatmapUtils.js";class g extends o{}t([s(0,y)],g.prototype,"position",void 0);class f extends r{}class h extends i{}t([n(v)],h.prototype,"texture",void 0),t([n(y)],h.prototype,"minAndInvRange",void 0),t([n(c)],h.prototype,"normalization",void 0);class w extends i{}t([n(v)],w.prototype,"texture",void 0);class b extends a{constructor(){super(...arguments),this.type="HeatmapResolveShader",this.usesHalfFloatPrecision=!1}vertex(t){return{glPosition:new d(t.position.multiply(2).subtract(1),1,1),uv:t.position}}fragment(t){const{accumulatedDensity:e,gradient:o}=this;let s=m(e.texture,t.uv).r.divide(new c(x(this.usesHalfFloatPrecision)));s=s.multiply(e.normalization),s=s.subtract(e.minAndInvRange.x).multiply(e.minAndInvRange.y);const r=m(o.texture,new y(s,.5)),i=new l;return i.fragColor=new d(r.rgb.multiply(r.a),r.a),i}}t([p],b.prototype,"usesHalfFloatPrecision",void 0),t([n(h)],b.prototype,"accumulatedDensity",void 0),t([n(w)],b.prototype,"gradient",void 0),t([e(0,u(g))],b.prototype,"vertex",null),t([e(0,u(f))],b.prototype,"fragment",null);export{h as AccumulatedDensity,w as Gradient,f as HeatmapResolveFragmentInput,b as HeatmapResolveShader,g as HeatmapResolveVertexInput};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t,a as i}from"../../../../../../../chunks/tslib.es6.js";import{location as e,UniformGroup as o,uniform as l,option as a,input as r}from"../../GraphShaderModule.js";import{length as s,clamp as n,Float as p,max as u,Vec3 as m,step as d,Vec4 as y,min as c,Vec2 as f}from"../../graph/glsl.js";import{FeatureVertexInput as h,FeatureFragmentInput as v,AFeatureShader as w,BaseHittestVertexInput as V}from"./AFeatureShader.js";import{thinLineWidthFactor as b,thinLineHalfWidth as S,epsilon as x}from"./constants.js";import{distPointSegment as g}from"./hittestUtils.js";import{VisualVariableColor as j}from"./VisualVariableColor.js";import{VisualVariableOpacity as z}from"./VisualVariableOpacity.js";import{VisualVariableSizeMinMaxValue as M}from"./VisualVariableSizeMinMaxValue.js";import{VisualVariableSizeScaleStops as W}from"./VisualVariableSizeScaleStops.js";import{VisualVariableSizeStops as C}from"./VisualVariableSizeStops.js";import{VisualVariableSizeUnitValue as P}from"./VisualVariableSizeUnitValue.js";import{getVisualVariableColor as R,getVisualVariableOpacity as H,hasVisualVariableSize as O,getVisualVariableSize as U}from"./vvUtils.js";class q extends h{}t([e(3,y)],q.prototype,"color",void 0),t([e(4,f)],q.prototype,"offset",void 0),t([e(5,f)],q.prototype,"normal",void 0),t([e(6,p)],q.prototype,"halfWidth",void 0),t([e(7,p)],q.prototype,"referenceHalfWidth",void 0),t([e(8,f)],q.prototype,"zoomRange",void 0);class A extends v{}class F extends o{}function k(t){return u(new p(b).multiply(d(t,new p(S))),new p(1))}function D(t,i){const{halfWidth:e,normal:o}=t,l=k(e),a=s(o).multiply(e);return n(l.multiply(e.subtract(a)).divide(i.add(l).subtract(new p(1))),new p(0),new p(1))}function G(t,i){const{id:e,halfWidth:o,referenceHalfWidth:l}=i;if(O(t)){const i=new p(2).multiply(l),a=U(t,e,i);return new p(.5).multiply(o.divide(u(l,new p(x)))).multiply(a)}return o}function
|
|
5
|
+
import{_ as t,a as i}from"../../../../../../../chunks/tslib.es6.js";import{location as e,UniformGroup as o,uniform as l,option as a,input as r}from"../../GraphShaderModule.js";import{length as s,clamp as n,Float as p,max as u,Vec3 as m,step as d,Vec4 as y,min as c,Vec2 as f}from"../../graph/glsl.js";import{FeatureVertexInput as h,FeatureFragmentInput as v,AFeatureShader as w,BaseHittestVertexInput as V}from"./AFeatureShader.js";import{thinLineWidthFactor as b,thinLineHalfWidth as S,epsilon as x}from"./constants.js";import{distPointSegment as g}from"./hittestUtils.js";import{VisualVariableColor as j}from"./VisualVariableColor.js";import{VisualVariableOpacity as z}from"./VisualVariableOpacity.js";import{VisualVariableSizeMinMaxValue as M}from"./VisualVariableSizeMinMaxValue.js";import{VisualVariableSizeScaleStops as W}from"./VisualVariableSizeScaleStops.js";import{VisualVariableSizeStops as C}from"./VisualVariableSizeStops.js";import{VisualVariableSizeUnitValue as P}from"./VisualVariableSizeUnitValue.js";import{getVisualVariableColor as R,getVisualVariableOpacity as H,hasVisualVariableSize as O,getVisualVariableSize as U}from"./vvUtils.js";class q extends h{}t([e(3,y)],q.prototype,"color",void 0),t([e(4,f)],q.prototype,"offset",void 0),t([e(5,f)],q.prototype,"normal",void 0),t([e(6,p)],q.prototype,"halfWidth",void 0),t([e(7,p)],q.prototype,"referenceHalfWidth",void 0),t([e(8,f)],q.prototype,"zoomRange",void 0);class A extends v{}class F extends o{}function k(t){return u(new p(b).multiply(d(t,new p(S))),new p(1))}function D(t,i){const{halfWidth:e,normal:o}=t,l=k(e),a=s(o).multiply(e);return n(l.multiply(e.subtract(a)).divide(i.add(l).subtract(new p(1))),new p(0),new p(1))}function G(t,i){const{id:e,halfWidth:o,referenceHalfWidth:l}=i;if(O(t)){const i=new p(2).multiply(l),a=U(t,e,i);return new p(.5).multiply(o.divide(u(l,new p(x)))).multiply(a)}return o}function L(t,i){const{id:e,offset:o,pos:l,normal:a,zoomRange:r}=i,{displayViewScreenMat3:s,displayViewMat3:n}=t.view,c=R(t,e,i.color),f=H(t,e),h=G(t,i),v=new p(.5).multiply(t.antialiasingControls.antialiasing),w=u(h.add(v),new p(.45)).add(new p(.1).multiply(v)),V=k(w).multiply(w).multiply(o),b=n.multiply(new m(V,new p(0))),S=s.multiply(new m(l,new p(1))).add(b),x=new p(2).multiply(d(h,new p(0))).add(t.clip(e,r)),g=new y(S.xy,x,1);return{color:c,opacity:f,halfWidth:w,normal:a,scaledOffset:V,scaledHalfWidth:h,glPosition:new y(g.xy,x,1)}}function T(t,i){const{opacity:e,color:o}=t,l=D(t,i);return e.multiply(o).multiply(l)}t([l(p)],F.prototype,"antialiasing",void 0),t([l(p)],F.prototype,"blur",void 0);class _ extends w{constructor(){super(...arguments),this.type="LineShader",this.computeAttributes={pos:["nextPos1","nextPos2"]}}vertex(t,i){const e=L(this,t);return{...e,...this.maybeRunHittest(t,i,e.halfWidth)}}fragment(t){const i=T(t,this.antialiasingControls.blur);return this.getFragmentOutput(i,t)}hittest(t,i,e){const{viewMat3:o,tileMat3:l}=this.view,a=o.multiply(l),r=a.multiply(new m(t.pos,1)),s=a.multiply(new m(i.nextPos1,1)),n=a.multiply(new m(i.nextPos2,1)),{distance:p,smallSymbolDistance:u,smallSymbolSizeThreshold:y}=this.hittestRequest,f=d(e,y.multiply(.5)).multiply(p.subtract(u)),h=this.hittestRequest.position;return c(g(h,r.xy,s.xy),g(h,r.xy,n.xy)).subtract(e).add(f)}}t([l(F)],_.prototype,"antialiasingControls",void 0),t([a(j)],_.prototype,"visualVariableColor",void 0),t([a(z)],_.prototype,"visualVariableOpacity",void 0),t([a(M)],_.prototype,"visualVariableSizeMinMaxValue",void 0),t([a(W)],_.prototype,"visualVariableSizeScaleStops",void 0),t([a(C)],_.prototype,"visualVariableSizeStops",void 0),t([a(P)],_.prototype,"visualVariableSizeUnitValue",void 0),t([i(0,r(q)),i(1,r(V))],_.prototype,"vertex",null),t([i(0,r(A))],_.prototype,"fragment",null);export{F as AntialiasingControls,A as LineFragmentInput,_ as LineShader,q as LineVertexInput,D as getLineAntialiasing,T as getLineFragmentColor,L as getLineVertexData};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t,a as o}from"../../../../../../../chunks/tslib.es6.js";import{location as e,uniform as r,GraphShaderModule as n,VertexInput as s,UniformGroup as
|
|
5
|
+
import{_ as t,a as o}from"../../../../../../../chunks/tslib.es6.js";import{location as e,uniform as r,GraphShaderModule as n,VertexInput as s,UniformGroup as i,FragmentOutput as a,input as p,FragmentInput as d}from"../../GraphShaderModule.js";import{Vec2 as l,Vec4 as c,texture2D as u,Float as y,ifElse as m,equal as w,atan as x,pow as f,length as g,cos as v,sin as h,Sampler2D as b}from"../../graph/glsl.js";import{magnifierBarrelFactor as k}from"./constants.js";class T extends s{}t([e(0,l)],T.prototype,"position",void 0);class C extends d{}class j extends i{}t([r(b)],j.prototype,"readbackTexture",void 0),t([r(b)],j.prototype,"maskTexture",void 0),t([r(b)],j.prototype,"overlayTexture",void 0),t([r(c)],j.prototype,"background",void 0),t([r(c)],j.prototype,"drawPos",void 0),t([r(y)],j.prototype,"maskEnabled",void 0),t([r(y)],j.prototype,"overlayEnabled",void 0);class E extends n{constructor(){super(...arguments),this.type="MagnifierShader"}vertex(t){const o=t.position,e=t.position.subtract(new l(.5)).multiply(this.config.drawPos.zw),r=this.config.drawPos.xy.add(e);return{glPosition:new c(r,0,1),texCoord:o}}fragment(t){let o=u(this.config.readbackTexture,P(t.texCoord));o=o.add(new y(1).subtract(o.a)).multiply(this.config.background);const e=m(w(this.config.maskEnabled,new y(1)),u(this.config.maskTexture,t.texCoord).a,new y(1));o=o.multiply(e);const r=m(w(this.config.overlayEnabled,new y(1)),u(this.config.overlayTexture,t.texCoord),new c(0)),n=new a;return n.fragColor=r.add(new y(1).subtract(r.a).multiply(o)),n}}function P(t){const o=t.multiply(new l(2)).subtract(1);return m(w(o.x,new y(0)).and(w(o.y,new y(0))),new l(.5),(()=>{const t=x(o.y,o.x),e=f(g(o),new y(k)),r=new l(v(t),h(t));return e.multiply(r).multiply(new l(.5)).add(new y(.5))}))}t([r(j)],E.prototype,"config",void 0),t([o(0,p(T))],E.prototype,"vertex",null),t([o(0,p(C))],E.prototype,"fragment",null);export{E as MagnifierShader};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t,a as o}from"../../../../../../../chunks/tslib.es6.js";import{location as e,uniform as r,GraphShaderModule as s,VertexInput as
|
|
5
|
+
import{_ as t,a as o}from"../../../../../../../chunks/tslib.es6.js";import{location as e,uniform as r,GraphShaderModule as s,VertexInput as p,UniformGroup as i,FragmentOutput as n,input as a,FragmentInput as l}from"../../GraphShaderModule.js";import{Vec4 as c,Vec2 as u,texture2D as y,Sampler2D as d,Float as m}from"../../graph/glsl.js";class f extends p{}t([e(0,u)],f.prototype,"position",void 0);class g extends l{}class x extends i{}t([r(d)],x.prototype,"layerTexture",void 0),t([r(m)],x.prototype,"opacity",void 0);class h extends s{constructor(){super(...arguments),this.type="OpacityShader"}vertex(t){return{uv:t.position,glPosition:new c(t.position.subtract(new u(.5)).multiply(2),0,1)}}fragment(t){const o=new n;return o.fragColor=y(this.config.layerTexture,t.uv).multiply(this.config.opacity),o}}t([r(x)],h.prototype,"config",void 0),t([o(0,a(f))],h.prototype,"vertex",null),t([o(0,a(g))],h.prototype,"fragment",null);export{h as OpacityShader};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t,a as o}from"../../../../../../../chunks/tslib.es6.js";import{location as i,uniform as e,option as r,input as s}from"../../GraphShaderModule.js";import{greaterThan as a,Float as l,ifElse as p,Vec3 as n,Vec4 as
|
|
5
|
+
import{_ as t,a as o}from"../../../../../../../chunks/tslib.es6.js";import{location as i,uniform as e,option as r,input as s}from"../../GraphShaderModule.js";import{greaterThan as a,Float as l,ifElse as p,Vec3 as n,Vec4 as u,Vec2 as m}from"../../graph/glsl.js";import{FeatureVertexInput as d,AFeatureShader as c,BaseHittestVertexInput as f}from"./AFeatureShader.js";import{bitsetTypeFillOutline as y}from"./constants.js";import{hittestFill as h,failHittest as v}from"./hittestUtils.js";import{LineFragmentInput as V,getLineVertexData as S,getLineFragmentColor as b,AntialiasingControls as j}from"./LineShader.js";import{getBit as x}from"./utils.js";import{VisualVariableColor as g}from"./VisualVariableColor.js";import{VisualVariableOpacity as w}from"./VisualVariableOpacity.js";import{VisualVariableSizeMinMaxValue as z}from"./VisualVariableSizeMinMaxValue.js";import{VisualVariableSizeScaleStops as M}from"./VisualVariableSizeScaleStops.js";import{VisualVariableSizeStops as O}from"./VisualVariableSizeStops.js";import{VisualVariableSizeUnitValue as C}from"./VisualVariableSizeUnitValue.js";import{getVisualVariableOpacity as P,getVisualVariableColor as U}from"./vvUtils.js";class W extends d{}t([i(3,m)],W.prototype,"offset",void 0),t([i(4,u)],W.prototype,"color",void 0),t([i(5,m)],W.prototype,"normal",void 0),t([i(6,l)],W.prototype,"halfWidth",void 0),t([i(7,l)],W.prototype,"referenceHalfWidth",void 0),t([i(8,m)],W.prototype,"zoomRange",void 0);class F extends V{}function R(t,o,i){const{id:e,bitset:r}=o,s=x(r,y),m=a(s,new l(.5)),d=S(t,o),c=p(m,d.halfWidth,new l(0)),f=P(t,e),h=U(t,e,o.color),v=p(m,o.color,h.multiply(f)),V=t.view.displayViewScreenMat3.multiply(new n(o.pos.xy,1)),b=t.clip(o.id),j=new u(V.xy,b,1),g=p(m,d.glPosition,j),w=i&&t.maybeRunHittest(o,i,m);return{isOutline:s,color:v,opacity:new l(1),halfWidth:c,normal:d.normal,glPosition:g,...w}}class A extends c{constructor(){super(...arguments),this.computeAttributes={pos:["nextPos1","nextPos2"]}}}t([e(j)],A.prototype,"antialiasingControls",void 0),t([r(g)],A.prototype,"visualVariableColor",void 0),t([r(w)],A.prototype,"visualVariableOpacity",void 0),t([r(z)],A.prototype,"visualVariableSizeMinMaxValue",void 0),t([r(M)],A.prototype,"visualVariableSizeScaleStops",void 0),t([r(O)],A.prototype,"visualVariableSizeStops",void 0),t([r(C)],A.prototype,"visualVariableSizeUnitValue",void 0);class H extends A{constructor(){super(...arguments),this.type="OutlineFillShader"}vertex(t,o){return R(this,t,o)}fragment(t){const{color:o,isOutline:i}=t,e=a(i,new l(.5)),r=b(t,this.antialiasingControls.blur),s=p(e,r,o),n=p(e,new l(1/255),new l(0));return this.getFragmentOutput(s,t,n)}hittest(t,o,i){return p(i,v(this.hittestRequest),h(this,t,o))}}t([o(0,s(W)),o(1,s(f))],H.prototype,"vertex",null),t([o(0,s(F))],H.prototype,"fragment",null);export{A as AOutlineFillShader,F as OutlineFillFragmentInput,H as OutlineFillShader,W as OutlineFillVertexInput,R as getOutlineFillVertexData};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t,a as o}from"../../../../../../../chunks/tslib.es6.js";import{location as e,uniform as r,GraphShaderModule as p,VertexInput as
|
|
5
|
+
import{_ as t,a as o}from"../../../../../../../chunks/tslib.es6.js";import{location as e,uniform as r,GraphShaderModule as p,VertexInput as s,UniformGroup as i,FragmentOutput as n,input as d,FragmentInput as a}from"../../GraphShaderModule.js";import{Float as l,dot as v,Vec3 as c,Vec2 as y,Vec4 as u,texture2D as f,Mat3 as h,Sampler2D as m}from"../../graph/glsl.js";class x extends s{}t([e(0,y)],x.prototype,"pos",void 0),t([e(1,y)],x.prototype,"uv",void 0);class g extends a{}class w extends i{}t([r(h)],w.prototype,"dvs",void 0);class S extends i{}t([r(y)],S.prototype,"perspective",void 0),t([r(y)],S.prototype,"texSize",void 0),t([r(l)],S.prototype,"wrapAroundShift",void 0),t([r(l)],S.prototype,"opacity",void 0),t([r(m)],S.prototype,"texture",void 0);class j extends p{constructor(){super(...arguments),this.type="OverlayShader"}vertex(t){const o=t.uv.divide(this.config.texSize),e=new l(1).add(v(o,this.config.perspective)),r=new c(t.pos.add(new y(this.config.wrapAroundShift,0)),1),p=this.transform.dvs.multiply(r);return{uv:o,glPosition:new u(p.xy.multiply(e),0,e)}}fragment(t){const o=f(this.config.texture,t.uv).multiply(this.config.opacity),e=new n;return e.fragColor=o,e}}t([r(w)],j.prototype,"transform",void 0),t([r(S)],j.prototype,"config",void 0),t([o(0,d(x))],j.prototype,"vertex",null),t([o(0,d(g))],j.prototype,"fragment",null);export{j as OverlayShader};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t,a as e}from"../../../../../../../chunks/tslib.es6.js";import{location as r,uniform as o,input as i}from"../../GraphShaderModule.js";import{Vec2 as s,Vec3 as l,mod as n,Float as a,mix as p,texture2D as u,Mat3 as
|
|
5
|
+
import{_ as t,a as e}from"../../../../../../../chunks/tslib.es6.js";import{location as r,uniform as o,input as i}from"../../GraphShaderModule.js";import{Vec2 as s,Vec3 as l,mod as n,Float as a,mix as p,texture2D as u,Mat3 as c,negate as d,Vec4 as m}from"../../graph/glsl.js";import{FeatureFragmentInput as f,BaseHittestVertexInput as y}from"./AFeatureShader.js";import{FillVertexInput as x,FillShader as v}from"./FillShader.js";import{LocalTileOffset as b}from"./LocalTileOffset.js";import{MosaicInfo as h}from"./MosaicInfo.js";class w extends x{}t([r(5,m)],w.prototype,"tlbr",void 0),t([r(6,a)],w.prototype,"inverseRasterizationScale",void 0);class g extends f{}function j(t){const e=new a(1),r=new a(0);return new c(e.divide(t.x),r.divide(t.y),0,d(r.divide(t.x)),e.divide(t.y),0,0,0,1)}function O(t,e){const r=e.tlbr.xy,o=e.tlbr.zw,i=o.x.subtract(r.x),n=r.y.subtract(o.y),a=new s(i,n).multiply(e.inverseRasterizationScale),p=a.multiply(t.view.requiredZoomFactor),u=j(p),c=t.localTileOffset.getPatternOffsetAtTileOrigin(a).divide(p),d=new l(e.pos,1);return{tileTextureCoord:u.multiply(d).xy.subtract(c),tlbr:e.tlbr.divide(t.mosaicInfo.size.xyxy)}}function S(t,e){const r=n(t.tileTextureCoord,new a(1)),o=p(t.tlbr.xy,t.tlbr.zw,r),i=u(e.texture,o);return t.color.multiply(i)}class T extends v{constructor(){super(...arguments),this.type="PatternFillShader"}vertex(t,e){return{...super.vertex(t,e),...O(this,t)}}fragment(t){const e=S(t,this.mosaicInfo);return this.getFragmentOutput(e,t,new a(0))}}t([o(h)],T.prototype,"mosaicInfo",void 0),t([o(b)],T.prototype,"localTileOffset",void 0),t([e(0,i(w)),e(1,i(y))],T.prototype,"vertex",null),t([e(0,i(g))],T.prototype,"fragment",null);export{g as PatternFillFragmentInput,T as PatternFillShader,w as PatternFillVertexInput,S as getPatternFillFragmentColor,O as getPatternFillVertexData};
|