@arcgis/core 4.33.0-next.20250526 → 4.33.0-next.20250528
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/Map.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/0716b21b1cfb8df066fa.js +1 -0
- package/assets/esri/core/workers/chunks/{b70f65ccee01d48a610e.js → 08583c74b8c538aef4d5.js} +2 -2
- package/assets/esri/core/workers/chunks/3027eb0c20e996ad374a.js +1 -0
- package/assets/esri/core/workers/chunks/{28e31ac00dc95a1318e9.js → 3916879b9ca8c6979011.js} +1 -1
- package/assets/esri/core/workers/chunks/6408b7845858cf18102f.js +1 -0
- package/assets/esri/core/workers/chunks/87623ebe32c6ae9cb223.js +1 -0
- package/assets/esri/core/workers/chunks/adf6982e2d8102669cdf.js +1 -0
- package/assets/esri/core/workers/chunks/cc9dd8924bfeb8bcd278.js +1 -0
- package/assets/esri/core/workers/chunks/cdb022ffffc6554de83a.js +1 -0
- package/assets/esri/core/workers/chunks/f5741d09fd4e1809f580.js +1 -0
- package/assets/esri/widgets/Editor/t9n/Editor.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_en.json +1 -1
- package/core/workers/Connection.js +1 -1
- package/core/workers/RemoteClient.js +1 -1
- package/core/workers/WorkerHandle.js +1 -1
- package/effects/FocusArea.d.ts +4 -0
- package/effects/FocusArea.js +1 -1
- package/effects/FocusAreaOutline.d.ts +4 -0
- package/effects/FocusAreaOutline.js +1 -1
- package/effects/FocusAreas.d.ts +4 -0
- package/effects/FocusAreas.js +1 -1
- package/interfaces.d.ts +231 -3
- package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
- package/layers/support/PromiseQueue.js +1 -1
- package/networks/support/UNTraceConfiguration.js +1 -1
- package/networks/support/typeUtils.js +1 -1
- package/package.json +1 -1
- package/rest/networks/support/CircuitTraceResult.js +5 -0
- package/rest/networks/support/TraceResult.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/animationUtils.js +1 -1
- package/symbols/cim/cimAnalyzer.js +1 -1
- package/symbols/cim/defaultCIMValues.js +1 -1
- package/symbols/cim/utils.js +1 -1
- package/views/2d/engine/webgl/animations/infos.js +1 -1
- package/views/2d/engine/webgl/animations/instructions.js +1 -1
- package/views/2d/engine/webgl/animations/utils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/GraphicInstanceStore.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/TechniqueRegistry.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/TechniqueType.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AAnimatedPolyShader.js +5 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AAnimatedShader.js +5 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedFillShader.js +5 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedLineShader.js +5 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedPolyMeshWriters.js +5 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedTechniques.js +5 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/ComputedAnimatedParams.js +5 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/attributes.js +5 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/enums.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/createGraphicSymbolMeshSchemas.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/line/LineMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriterRegistry.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/ComplexFillShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/LineShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/hittestUtils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/utils.js +1 -1
- package/views/2d/layers/MediaLayerView2D.js +1 -1
- package/views/2d/layers/TileLayerView2D.js +1 -1
- package/views/2d/layers/features/schema/processor/symbols/ComplexSymbolSchema.js +1 -1
- package/views/2d/layers/features/schema/processor/symbols/utils.js +1 -1
- package/views/3d/interactive/editingTools/reshape/ReshapeTool3D.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/PointCloudLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DSymbolCreationContext.js +1 -1
- package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
- package/views/3d/layers/i3s/I3SMaterialUtil.js +1 -1
- package/views/3d/layers/support/FeatureVisibilityFilter.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/terrain/TileRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/Texture.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/VideoView.js +1 -1
- package/views/draw/support/GraphicMover.js +1 -1
- package/views/support/TextureCompressionTracker.js +5 -0
- package/views/webgl/Texture.js +1 -1
- package/widgets/Directions/DirectionsVisibleElements.js +1 -1
- package/widgets/Directions.js +1 -1
- package/widgets/Editor/AddAssociationWorkflowData.js +1 -1
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
- package/widgets/Editor/UpdateRecordWorkflowData.js +1 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
- package/widgets/FeatureForm/featureFormUtils.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/FeatureTable/Grid/Grid.js +1 -1
- package/widgets/Features/FeaturesViewModel.js +1 -1
- package/assets/esri/core/workers/chunks/003ddb190a5cc56f7925.js +0 -1
- package/assets/esri/core/workers/chunks/0fb5de3f8a4d69b2d514.js +0 -1
- package/assets/esri/core/workers/chunks/377a7f0f7d304ff9fe5b.js +0 -1
- package/assets/esri/core/workers/chunks/5200be8bce60fa831026.js +0 -1
- package/assets/esri/core/workers/chunks/c9ab067b07d1eab974d1.js +0 -1
- package/assets/esri/core/workers/chunks/e89345c7af9d3d4d8452.js +0 -1
- package/assets/esri/core/workers/chunks/ef7955a2509be0f03ca2.js +0 -1
- package/assets/esri/core/workers/chunks/fd4c020297badcb81947.js +0 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerTechnique.js +0 -5
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedShader.js +0 -5
- package/views/support/TextureCompressionHandle.js +0 -5
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import{pt2px as e}from"../../../../../../../core/screenUtils.js";function i(i){let{pixelDimensions:t,texelDimensions:s,baseSize:r,referenceSize:n,strokeWidth:o,sizeRatio:f}=i;if(t||(t=i.sprite.sdf?[0,0]:[i.sprite.width,i.sprite.height]),s||(s=i.sprite.sdf?[0,0]:t),null!=i.patternHeight){const e=i.patternHeight/t[1];t[1]*=e,t[0]*=e}-1===r&&(r=t[1]),r=e(r),n=e(n),o=e(o);const p=(i.sprite.sdfDecodeCoeff??1)*f;return{...i,pixelDimensions:t,texelDimensions:s,baseSize:r,referenceSize:n,strokeWidth:o,sdfDecodeCoeff:p}}export{i as createComputedAnimatedMeshParams};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import{minMaxZoomPrecisionFactor as t,spritePadding as e}from"../../../definitions.js";import{assert as o}from"../../../animations/utils.js";import{packAnimatedBitset as i}from"./AnimatedMeshWriter.js";import{getMinMaxZoom as c}from"../fill/meshWriterUtils.js";import{DataType as n}from"../../../../../../webgl/enums.js";const a={type:n.SHORT,count:2,packPrecisionFactor:t,pack:({scaleInfo:t},{tileInfo:e})=>c(t,e)},s={type:n.FLOAT,count:4,packPrecisionFactor:1,packTessellation:({value1Position2Value2:t})=>(o(t),t)},p={type:n.FLOAT,count:4,packPrecisionFactor:1,packTessellation:()=>[0,0,0,1]},r={type:n.FLOAT,count:1,packPrecisionFactor:1,pack:()=>0},l={type:n.FLOAT,count:1,packPrecisionFactor:1,packTessellation:({lineLength:t})=>t},k={type:n.UNSIGNED_SHORT,count:1,packTessellation:({distance:t})=>t},u={type:n.BYTE,count:2,packPrecisionFactor:16,packTessellation:({directionX:t,directionY:e})=>[t,e]},T={type:n.FLOAT,count:2,packPrecisionFactor:16,packTessellation:({normalX:t,normalY:e})=>[t,e]},m={type:n.UNSIGNED_BYTE,count:3,pack:"id"},y={type:n.UNSIGNED_BYTE,count:1,pack:i},F={type:n.SHORT,count:2,pack:"position",packPrecisionFactor:1},f={marker:{type:n.FLOAT,count:2,packAlternating:{count:4,pack:({texelDimensions:t})=>[[-.5*t[0],-.5*t[1]],[.5*t[0],-.5*t[1]],[-.5*t[0],.5*t[1]],[.5*t[0],.5*t[1]]]}},line:{type:n.FLOAT,count:2,packTessellation:({extrusionOffsetX:t,extrusionOffsetY:e},{baseSize:o})=>[t*o/2,e*o/2]},fill:{type:n.FLOAT,count:2,packTessellation:()=>[0,0]}},O={marker:{type:n.SHORT,count:2,packPrecisionFactor:1,packAlternating:{count:4,packTessellation:({texXmax:t,texXmin:e,texYmax:o,texYmin:i})=>[[e,i],[t,i],[e,o],[t,o]]}}},S={type:n.UNSIGNED_SHORT,count:4,pack:({sprite:t})=>{const{rect:o,width:i,height:c}=t,n=o.x+e,a=o.y+e;return[n+1,a+1,n+i-1,a+c-1]}},d={type:n.UNSIGNED_SHORT,count:4,packPrecisionFactor:1,pack:({animations:t,baseSize:e,referenceSize:o})=>[t.dataColumn,t.dataRow,e,o]},x={type:n.UNSIGNED_SHORT,count:4,packPrecisionFactor:8,pack:({strokeWidth:t,pixelDimensions:e,baseSize:o,sprite:i,sizeRatio:c})=>{const n=Math.max(o*i.width/i.height,o),a=i.sdfDecodeCoeff*n*c;return[e[0],e[1],t,a]}},N={type:n.BYTE,count:1,packTessellation:({angle:t})=>t};export{k as accumulatedDistance,N as angle,d as animationPointerAndBaseSizeAndReferenceSize,y as bitset,m as id,l as lineLength,r as noLineLength,p as noTiming,T as normal,f as offset,F as pos,u as segmentDirection,x as sizing,S as tlbr,O as uv,s as value1Position2Value2,a as zoomRange};
|
|
@@ -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
|
-
var o;!function(o){o[o.transform=0]="transform",o[o.fromColor=1]="fromColor",o[o.toColor=2]="toColor",o[o.colorMix=3]="colorMix",o[o.toOpacity=4]="toOpacity",o[o.opacityMix=5]="opacityMix"}(o||(o={}));export{o as AnimationParamIndex};
|
|
5
|
+
var o;!function(o){o[o.transform=0]="transform",o[o.fromColor=1]="fromColor",o[o.toColor=2]="toColor",o[o.colorMix=3]="colorMix",o[o.toOpacity=4]="toOpacity",o[o.opacityMix=5]="opacityMix",o[o.shift=6]="shift"}(o||(o={}));export{o as AnimationParamIndex};
|
|
@@ -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{noVisualVariables as
|
|
5
|
+
import{noVisualVariables as a}from"../../../../layers/features/schema/processor/VisualVariablesSchema.js";import{getScaleInfo as s,createComplexSimpleOutlineFillMeshInfos as e,createGradientStrokeMeshInfos as i,createGradientFillMeshInfos as n,createComplexTextMeshInfos as t,createAnimatedPolyMeshInfos as r,createComplexTexturedLineMeshInfos as l,createComplexSimpleLineMeshInfos as o,createComplexSimpleFillMeshInfos as c,createComplexFillMeshInfos as m,createAnimatedMarkerMeshInfos as p,createComplexMarkerMeshInfos as h}from"../../../../layers/features/schema/processor/symbols/ComplexSymbolSchema.js";async function u(u,f,k){const b=[],d={scaleInfo:s(u),scaleExpression:null};for(const s of f)switch(s.type){case"marker":if(s.animationParams){if(s.animationParams.params.hasShiftAnimation){b.push(...p(k.instances.animatedMarkerShift,s,a,d));break}b.push(...p(k.instances.animatedMarker,s,a,d));break}b.push(...h(k.instances.marker,s,a,d));break;case"fill":if(s.animationParams){b.push(...r(k.instances.animatedPolygon,s,a,d));break}null==s.spriteRasterizationParam?b.push(...c(k.instances.fill,s,d)):b.push(...m(k.instances.complexFill,s,!1,d));break;case"line":if(s.animationParams){if(s.animationParams.params.hasShiftAnimation){b.push(...r(k.instances.animatedPolylineShift,s,a,d));break}b.push(...r(k.instances.animatedPolyline,s,a,d));break}s.spriteRasterizationParam?b.push(...l(k.instances.texturedLine,s,!1,d)):b.push(...o(k.instances.line,s,!1,d));break;case"text":b.push(...t(k.instances.text,s,a,d));break;case"gradientFill":b.push(...n(k.instances.gradientFill,s,d));break;case"gradientStroke":b.push(...i(k.instances.gradientStroke,s,d));break;case"outlineFill":b.push(...e(k.instances.outlineFill,s,d))}return b}export{u as createGraphicSymbolMeshSchemas};
|
|
@@ -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{pt2px as t}from"../../../../../../../core/screenUtils.js";import{GeometryCursor as e}from"../../../../../../../geometry/GeometryCursor.js";import{minMaxZoomPrecisionFactor as s,thinLineHalfWidthThreshold as i}from"../../../definitions.js";import{LineTessellation as r}from"../../../TurboLine.js";import{clipLinesMarshall as o}from"../../../mesh/templates/templateUtils.js";import{packRounded as n,processColorInput as a,getMinMaxZoom as c,processLineCapInput as h,processLineJoinInput as l}from"../fill/meshWriterUtils.js";import{MeshWriter as m}from"../mesh/MeshWriter.js";import{getLineClippingMargin as u}from"../mesh/utils.js";import{DataType as p}from"../../../../../../webgl/enums.js";class d{constructor(){this.extrusionOffsetX=0,this.extrusionOffsetY=0,this.normalX=0,this.normalY=0,this.directionX=0,this.directionY=0,this.distance=0,this.pathLength=0,this.distanceOffset=0}}const f={createComputedParams:t=>t,optionalAttributes:{zoomRange:{type:p.SHORT,count:2,packPrecisionFactor:s,pack:({scaleInfo:t},{tileInfo:e})=>c(t,e)}},attributes:{id:{type:p.UNSIGNED_BYTE,count:3,pack:"id"},pos:{type:p.SHORT,count:2,pack:"position",packPrecisionFactor:10},bitset:{type:p.UNSIGNED_BYTE,count:1},color:{type:p.UNSIGNED_BYTE,count:4,normalized:!0,pack:({color:t})=>a(t)},offset:{type:p.BYTE,count:2,packPrecisionFactor:16,packTessellation:({extrusionOffsetX:t,extrusionOffsetY:e})=>[n(t,16),n(e,16)]},normal:{type:p.BYTE,count:2,packPrecisionFactor:16,packTessellation:({normalX:t,normalY:e})=>[n(t,16),n(e,16)]},halfWidth:{type:p.HALF_FLOAT,count:1,pack:({width:e})=>t(.5*e)},referenceHalfWidth:{type:p.HALF_FLOAT,count:1,pack:({referenceWidth:e})=>t(.5*e)}}};class _{constructor(){this.id=0,this.bitset=0,this.indexCount=0,this.vertexCount=0,this.vertexFrom=0,this.vertexBounds=0,this.pathLength=0,this.distanceOffset=0}}const x=65535;class T extends m{constructor(t,e,s,i){super(t,e,s,i),this.vertexSpec=f,this._currentWrite=new _,this._tessellationOptions={halfWidth:0,pixelCoordRatio:1,offset:0,wrapDistance:x,textured:!1},this._tessParams=new d,this._initializeTessellator()}writeLineVertices(t,e,s){const i=this._getLines(e);null!=i&&this._writeVertices(t,s,i)}_initializeTessellator(){this._lineTessellator=new r(this._writeTesselatedVertex.bind(this),this._writeTriangle.bind(this),!0)}_write(t,s,i){const r=i??e.fromFeatureSetReaderCIM(s);r&&this._writeGeometry(t,s,r)}_writeGeometry(t,e,s,i){t.recordStart(this.instanceId,this.attributeLayout,i),this.writeLineVertices(t,s,e),t.recordEnd()}_getLines(t){return o(t,u(this.evaluatedMeshParams))}_writeVertices(e,s,r){const{_currentWrite:o,_tessellationOptions:n,evaluatedMeshParams:a}=this,{width:c,capType:m,joinType:u,miterLimit:p,hasSizeVV:d}=a,f=t(.5*c);n.halfWidth=f,n.capType=h(m),n.joinType=l(u),n.miterLimit=p;const _=!d;o.out=e,o.id=s.getDisplayId(),o.vertexCount=0,o.indexCount=0,o.vertexFrom=e.vertexCount(),o.vertexBounds=_&&f<i?0:1;for(const{line:t,start:i,pathLength:h}of r)n.initialDistance=i%x,o.pathLength=h,o.distanceOffset=Math.floor(i/x)*x,this._lineTessellator.tessellate(t,n,_)}_writeTesselatedVertex(t,e,s,i,r,o,n,a,c,h,l){const{out:m,id:u,vertexBounds:p,pathLength:d,distanceOffset:f}=this._currentWrite;return this.hasEffects&&m.recordBounds(t,e,p,p),this._tessParams.extrusionOffsetX=n,this._tessParams.extrusionOffsetY=a,this._tessParams.normalX=c,this._tessParams.normalY=h,this._tessParams.directionX=r,this._tessParams.directionY=o,this._tessParams.distance=l,this._tessParams.pathLength=d,this._tessParams.distanceOffset=f,this._writeVertex(m,u,t,e,this._tessParams),this._currentWrite.vertexFrom+this._currentWrite.vertexCount++}_writeTriangle(t,e,s){const{out:i}=this._currentWrite;i.indexEnsureSize(3),i.indexWrite(t),i.indexWrite(e),i.indexWrite(s),this._currentWrite.indexCount+=3}}export{T as LineMeshWriter,d as LineTessellationParams,f as LineVertexSpec};
|
|
5
|
+
import{pt2px as t}from"../../../../../../../core/screenUtils.js";import{GeometryCursor as e}from"../../../../../../../geometry/GeometryCursor.js";import{minMaxZoomPrecisionFactor as s,thinLineHalfWidthThreshold as i}from"../../../definitions.js";import{LineTessellation as r}from"../../../TurboLine.js";import{clipLinesMarshall as o}from"../../../mesh/templates/templateUtils.js";import{packRounded as n,processColorInput as a,getMinMaxZoom as c,processLineCapInput as h,processLineJoinInput as l}from"../fill/meshWriterUtils.js";import{MeshWriter as m}from"../mesh/MeshWriter.js";import{getLineClippingMargin as u}from"../mesh/utils.js";import{DataType as p}from"../../../../../../webgl/enums.js";class d{constructor(){this.extrusionOffsetX=0,this.extrusionOffsetY=0,this.normalX=0,this.normalY=0,this.directionX=0,this.directionY=0,this.distance=0,this.pathLength=0,this.distanceOffset=0,this.lineLength=0}}const f={createComputedParams:t=>t,optionalAttributes:{zoomRange:{type:p.SHORT,count:2,packPrecisionFactor:s,pack:({scaleInfo:t},{tileInfo:e})=>c(t,e)}},attributes:{id:{type:p.UNSIGNED_BYTE,count:3,pack:"id"},pos:{type:p.SHORT,count:2,pack:"position",packPrecisionFactor:10},bitset:{type:p.UNSIGNED_BYTE,count:1},color:{type:p.UNSIGNED_BYTE,count:4,normalized:!0,pack:({color:t})=>a(t)},offset:{type:p.BYTE,count:2,packPrecisionFactor:16,packTessellation:({extrusionOffsetX:t,extrusionOffsetY:e})=>[n(t,16),n(e,16)]},normal:{type:p.BYTE,count:2,packPrecisionFactor:16,packTessellation:({normalX:t,normalY:e})=>[n(t,16),n(e,16)]},halfWidth:{type:p.HALF_FLOAT,count:1,pack:({width:e})=>t(.5*e)},referenceHalfWidth:{type:p.HALF_FLOAT,count:1,pack:({referenceWidth:e})=>t(.5*e)}}};class _{constructor(){this.id=0,this.bitset=0,this.indexCount=0,this.vertexCount=0,this.vertexFrom=0,this.vertexBounds=0,this.pathLength=0,this.distanceOffset=0}}const x=65535;class T extends m{constructor(t,e,s,i){super(t,e,s,i),this.vertexSpec=f,this._currentWrite=new _,this._tessellationOptions={halfWidth:0,pixelCoordRatio:1,offset:0,wrapDistance:x,textured:!1},this._tessParams=new d,this._initializeTessellator()}writeLineVertices(t,e,s){const i=this._getLines(e);null!=i&&this._writeVertices(t,s,i)}_initializeTessellator(){this._lineTessellator=new r(this._writeTesselatedVertex.bind(this),this._writeTriangle.bind(this),!0)}_write(t,s,i){const r=i??e.fromFeatureSetReaderCIM(s);r&&this._writeGeometry(t,s,r)}_writeGeometry(t,e,s,i){t.recordStart(this.instanceId,this.attributeLayout,i),this.writeLineVertices(t,s,e),t.recordEnd()}_getLines(t){return o(t,u(this.evaluatedMeshParams))}_writeVertices(e,s,r){const{_currentWrite:o,_tessellationOptions:n,evaluatedMeshParams:a}=this,{width:c,capType:m,joinType:u,miterLimit:p,hasSizeVV:d}=a,f=t(.5*c);n.halfWidth=f,n.capType=h(m),n.joinType=l(u),n.miterLimit=p;const _=!d;o.out=e,o.id=s.getDisplayId(),o.vertexCount=0,o.indexCount=0,o.vertexFrom=e.vertexCount(),o.vertexBounds=_&&f<i?0:1;for(const{line:t,start:i,pathLength:h}of r)n.initialDistance=i%x,o.pathLength=h,o.distanceOffset=Math.floor(i/x)*x,this._lineTessellator.tessellate(t,n,_)}_writeTesselatedVertex(t,e,s,i,r,o,n,a,c,h,l){const{out:m,id:u,vertexBounds:p,pathLength:d,distanceOffset:f}=this._currentWrite;return this.hasEffects&&m.recordBounds(t,e,p,p),this._tessParams.extrusionOffsetX=n,this._tessParams.extrusionOffsetY=a,this._tessParams.normalX=c,this._tessParams.normalY=h,this._tessParams.directionX=r,this._tessParams.directionY=o,this._tessParams.distance=l,this._tessParams.pathLength=d,this._tessParams.distanceOffset=f,this._writeVertex(m,u,t,e,this._tessParams),this._currentWrite.vertexFrom+this._currentWrite.vertexCount++}_writeTriangle(t,e,s){const{out:i}=this._currentWrite;i.indexEnsureSize(3),i.indexWrite(t),i.indexWrite(e),i.indexWrite(s),this._currentWrite.indexCount+=3}}export{T as LineMeshWriter,d as LineTessellationParams,f as LineVertexSpec};
|
|
@@ -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,input as l,ComputeVertexInput 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{AFeatureShader as z,FeatureVertexInput as _,FeatureFragmentInput 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 _{}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 r{}t([i(
|
|
5
|
+
import{_ as t,a as e}from"../../../../../../../chunks/tslib.es6.js";import{location as i,option as o,uniform as s,input as l,ComputeVertexInput 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{AFeatureShader as z,FeatureVertexInput as _,FeatureFragmentInput 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 _{}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 r{}t([i(11,b)],Y.prototype,"offsetNextVertex1",void 0),t([i(12,b)],Y.prototype,"offsetNextVertex2",void 0),t([i(13,b)],Y.prototype,"textureUVNextVertex1",void 0),t([i(14,b)],Y.prototype,"textureUVNextVertex2",void 0);class Z extends j{}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 z{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,l(X)),e(1,l(Y))],et.prototype,"vertex",null),t([e(0,l(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{TechniqueType as
|
|
5
|
+
import{TechniqueType as e}from"../TechniqueType.js";import{AnimatedMarkerShiftMeshWriter as r,AnimatedMarkerMeshWriter as t}from"../animated/AnimatedMarkerMeshWriter.js";import{AnimatedLineMeshWriter as i,AnimatedFillMeshWriter as s}from"../animated/AnimatedPolyMeshWriters.js";import{DotDensityMeshWriter as a}from"../dotDensity/DotDensityMeshWriter.js";import{ComplexFillMeshWriter as n}from"../fill/ComplexFillMeshWriter.js";import{ComplexOutlineFillMeshWriter as l}from"../fill/ComplexOutlineFillMeshWriter.js";import{FillMeshWriter as o}from"../fill/FillMeshWriter.js";import{GradientFillMeshWriter as m}from"../fill/GradientFillMeshWriter.js";import{OutlineFillMeshWriter as u}from"../fill/OutlineFillMeshWriter.js";import{PatternFillMeshWriter as p}from"../fill/PatternFillMeshWriter.js";import{PatternOutlineFillMeshWriter as h}from"../fill/PatternOutlineFillMeshWriter.js";import{HeatmapMeshWriter as c}from"../heatmap/HeatmapMeshWriter.js";import{LabelMeshWriter as f}from"../labels/LabelMeshWriter.js";import{GradientStrokeMeshWriter as M}from"../line/GradientStrokeMeshWriter.js";import{LineMeshWriter as W}from"../line/LineMeshWriter.js";import{TexturedLineMeshWriter as j}from"../line/TexturedLineMeshWriter.js";import{MarkerMeshWriter as d}from"../markers/MarkerMeshWriter.js";import{MeshWriterInputEvaluator as F}from"./MeshWriterInputEvaluator.js";import{PieChartMeshWriter as x}from"../pieChart/PieChartMeshWriter.js";import{TextMeshWriter as k}from"../text/TextMeshWriter.js";class y{async createMeshWriter(e,r,t,i,s){const a=this._getMeshWriter(i.techniqueType),n=await F.create(e,r,i.inputParams,s),l=new a(i.id,n,i.optionalAttributes,t);return await l.loadDependencies(),l}_getMeshWriter(F){switch(F){case e.Fill:return o;case e.DotDensity:return a;case e.ComplexFill:return n;case e.PatternFill:return p;case e.GradientFill:return m;case e.OutlineFill:return u;case e.PatternOutlineFill:return h;case e.ComplexOutlineFill:return l;case e.Marker:return d;case e.PieChart:return x;case e.Text:return k;case e.Line:return W;case e.TexturedLine:return j;case e.GradientStroke:return M;case e.Heatmap:return c;case e.Label:return f;case e.AnimatedMarker:return t;case e.AnimatedMarkerShift:return r;case e.AnimatedFill:return s;case e.AnimatedLine:return i;default:throw new Error("Internal Error: Mesh writer not in the registry")}}}export{y as MeshWriterRegistry};
|
|
@@ -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{Float as l,
|
|
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{Float as l,equal as s,float as p,Vec4 as a,ifElse as n,mat3 as d,negate as m,vec2 as u,Vec2 as f,sin as c,cos as y,Vec3 as v,mod as h,mix as x,texture2D as g,greaterThan as b}from"../../graph/glsl.js";import{BaseHittestVertexInput as w,FeatureFragmentInput as j}from"./AFeatureShader.js";import{c256ToRad as O,bitsetGenericConsiderAlphaOnly as T,bitsetFillRandomPatternOffset as C}from"./constants.js";import{FillShader as F,FillVertexInput as A}from"./FillShader.js";import{LocalTileOffset as I}from"./LocalTileOffset.js";import{MosaicInfo as S}from"./MosaicInfo.js";import{getBit as z,rgba2float as M,rand as V,isNan as k}from"./utils.js";class q extends A{}t([o(5,a)],q.prototype,"tlbr",void 0),t([o(6,l)],q.prototype,"width",void 0),t([o(7,l)],q.prototype,"height",void 0),t([o(8,f)],q.prototype,"offset",void 0),t([o(9,f)],q.prototype,"scale",void 0),t([o(10,l)],q.prototype,"angle",void 0);class G extends j{}function L(t,e,o,i,r){const l=s(z(r,C),p(1)),f=M(new a(t,0));return n(l,d(i.divide(e.x),o.divide(e.y),0,m(o.divide(e.x)),i.divide(e.y),0,V(u(f,0)),V(u(0,f)),1),d(i.divide(e.x),o.divide(e.y),0,m(o.divide(e.x)),i.divide(e.y),0,0,0,1))}function P(t,e){const o=t.view.requiredZoomFactor,i=new f(e.width,e.height),r=i.multiply(e.scale).multiply(o),s=e.angle.multiply(O),p=c(s),a=y(s),d=L(e.id,r,p,a,e.bitset),m=t.localTileOffset.getPatternOffsetAtTileOrigin(i,p,a),u=o.multiply(e.scale).multiply(e.offset.subtract(m)).divide(r),h=new v(e.pos,1),x=d.multiply(h).xy.subtract(u),g=e.tlbr.divide(t.mosaicInfo.size.xyxy);let b=z(e.bitset,T);return null!=t.visualVariableColor&&(b=n(k(t.storage.getColorValue(e.id)),new l(0),b)),{tileTextureCoord:x,tlbr:g,sampleAlphaOnly:b}}function Z(t,e){const o=h(e.tileTextureCoord,new l(1)),i=x(e.tlbr.xy,e.tlbr.zw,o);let r=g(t.mosaicInfo.texture,i);return r=n(b(e.sampleAlphaOnly,new l(.5)),r.aaaa,r),e.color.multiply(r)}class _ extends F{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 l(0))}}t([i(S)],_.prototype,"mosaicInfo",void 0),t([i(I)],_.prototype,"localTileOffset",void 0),t([e(0,r(q)),e(1,r(w))],_.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,L as getPatternMatrix};
|
|
@@ -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,uniform as o,option as l,input as a,UniformGroup as r}from"../../GraphShaderModule.js";import{Vec3 as s,step as n,min as p,
|
|
5
|
+
import{_ as t,a as i}from"../../../../../../../chunks/tslib.es6.js";import{location as e,uniform as o,option as l,input as a,UniformGroup as r}from"../../GraphShaderModule.js";import{Vec3 as s,step as n,min as p,max as u,Float as m,Vec4 as d,length as y,clamp as c,Vec2 as f}from"../../graph/glsl.js";import{AFeatureShader as h,BaseHittestVertexInput as v,FeatureVertexInput as w,FeatureFragmentInput 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 w{}t([e(3,d)],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,m)],q.prototype,"halfWidth",void 0),t([e(7,m)],q.prototype,"referenceHalfWidth",void 0),t([e(8,f)],q.prototype,"zoomRange",void 0);class A extends V{}class F extends r{}function k(t){return u(new m(b).multiply(n(t,new m(S))),new m(1))}function D(t,i){const{halfWidth:e,normal:o}=t,l=k(e),a=y(o).multiply(e);return c(l.multiply(e.subtract(a)).divide(i.add(l).subtract(new m(1))),new m(0),new m(1))}function G(t,i){const{id:e,halfWidth:o,referenceHalfWidth:l}=i;if(O(t)){const i=new m(2).multiply(l),a=U(t,e,i);return new m(.5).multiply(o.divide(u(l,new m(x)))).multiply(a)}return o}function L(t,i){const{id:e,offset:o,pos:l,normal:a,zoomRange:r}=i,{displayViewScreenMat3:p,displayViewMat3:y}=t.view,c=R(t,e,i.color),f=H(t,e),h=G(t,i),v=new m(.5).multiply(t.antialiasingControls.antialiasing),w=u(h.add(v),new m(.45)).add(new m(.1).multiply(v)),V=k(w).multiply(w).multiply(o),b=y.multiply(new s(V,new m(0))),S=p.multiply(new s(l,new m(1))).add(b),x=new m(2).multiply(n(h,new m(0))).add(t.clip(e,r)),g=new d(S.xy,x,1);return{color:c,opacity:f,halfWidth:w,normal:a,scaledOffset:V,scaledHalfWidth:h,glPosition:new d(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([o(m)],F.prototype,"antialiasing",void 0),t([o(m)],F.prototype,"blur",void 0);class _ extends h{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 s(t.pos,1)),u=a.multiply(new s(i.nextPos1,1)),m=a.multiply(new s(i.nextPos2,1)),{distance:d,smallSymbolDistance:y,smallSymbolSizeThreshold:c}=this.hittestRequest,f=n(e,c.multiply(.5)).multiply(d.subtract(y)),h=this.hittestRequest.position;return p(g(h,r.xy,u.xy),g(h,r.xy,m.xy)).subtract(e).add(f)}}t([o(F)],_.prototype,"antialiasingControls",void 0),t([l(j)],_.prototype,"visualVariableColor",void 0),t([l(z)],_.prototype,"visualVariableOpacity",void 0),t([l(M)],_.prototype,"visualVariableSizeMinMaxValue",void 0),t([l(W)],_.prototype,"visualVariableSizeScaleStops",void 0),t([l(C)],_.prototype,"visualVariableSizeStops",void 0),t([l(P)],_.prototype,"visualVariableSizeUnitValue",void 0),t([i(0,a(q)),i(1,a(v))],_.prototype,"vertex",null),t([i(0,a(A))],_.prototype,"fragment",null);export{F as AntialiasingControls,A as LineFragmentInput,_ as LineShader,q as LineVertexInput,D as getLineAntialiasing,T as getLineFragmentColor,k as getLineThinFactor,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{
|
|
5
|
+
import{clamp as t,Float as u,length as n,distance as r,Vec3 as i,and as y,greaterThan as s,lessThan as l,cond as c,not as e,Mat3 as a,abs as o,step as p,dot as x,normalize as m,equal as b,min as d}from"../../graph/glsl.js";import{epsilonHitTest as w}from"./constants.js";import{cross2 as f}from"./utils.js";function v(t,u){return x(t,m(u))}function j(i,y,s){const l=s.subtract(y),c=v(i.subtract(y),l),e=t(c.divide(n(l)),new u(0),new u(1));return r(i,y.add(e.multiply(s.subtract(y))))}function g(t){const n=o(t);return p(n.x.add(n.y).add(n.z),new u(1.05))}function h(t,n,r,y){const s=new a(r.x.multiply(y.y).subtract(y.x.multiply(r.y)),y.x.multiply(n.y).subtract(n.x.multiply(y.y)),n.x.multiply(r.y).subtract(r.x.multiply(n.y)),r.y.subtract(y.y),y.y.subtract(n.y),n.y.subtract(r.y),y.x.subtract(r.x),n.x.subtract(y.x),r.x.subtract(n.x)),l=n.x.multiply(r.y.subtract(y.y)),c=r.x.multiply(y.y.subtract(n.y)),e=y.x.multiply(n.y.subtract(r.y)),o=l.add(c).add(e);return new u(1).divide(o).multiply(s.multiply(new i(1,t)))}function M(t,n,r,i){return b(g(h(t,n,r,i)),new u(1))}function P(t,n,r,i){const a=r.subtract(n),o=i.subtract(n),p=f(a,o),x=y(l(p,new u(w)),s(p,new u(-.05)));return c([y(e(x),M(t.xy,n,r,i)),new u(-1)],[!0,()=>{const u=j(t,n,r),y=j(t,r,i),s=j(t,i,n);return d(d(u,y),s)}])}function q(t){return t.distance.add(1)}function z(t,u,n){const{viewMat3:r,tileMat3:y}=t.view,s=r.multiply(y),l=s.multiply(new i(u.pos,1)),c=s.multiply(new i(n.nextPos1,1)),e=s.multiply(new i(n.nextPos2,1));return P(t.hittestRequest.position,l.xy,c.xy,e.xy)}function R(t,u,n){return r(t,n).subtract(u)}export{j as distPointSegment,P as distPointTriangle,q as failHittest,z as hittestFill,R as hittestMarker,g as inTriangle,v as projectScalar,h as xyToBarycentric};
|
|
@@ -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{maxHighlightReasons as t}from"../../../definitions.js";import{Float as n,
|
|
5
|
+
import{maxHighlightReasons as t}from"../../../definitions.js";import{Float as n,greaterThan as r,float as u,max as i,mod as c,floor as o,vec4 as e,dot as f,vec2 as s,fract as l,sin as m,equal as a,vec3 as p,divide as y}from"../../graph/glsl.js";import{nanMagicNumber as d}from"./constants.js";function b(t){const n=u(12.9898),r=u(78.233),i=u(43758.5453),o=f(t,s(n,r)),e=c(o,u(3.14));return l(m(e).multiply(i))}function w(t){return a(t,u(d))}function x(t){return y(t,u(255))}function j(t,n){return t.x.multiply(n.y).subtract(n.x.multiply(t.y))}function z(t){return t.multiply(2).subtract(1)}function g(t){return t.multiply(.5).add(.5)}function v(t,n){const r=u(2**n);return c(o(t.divide(r)),u(2))}function h(t,n){return r(v(t,n),u(.5))}function k(n,r){return v(n,r+t)}function q(t,n){return v(t,n)}function A(t){const n=v(t.z,7),r=u(1).subtract(n),i=t.xyz.subtract(p(0,0,u(128)));return r.multiply(t).add(n.multiply(i))}function B(t){const n=e(255/256,255/65536,255/16777216,255/4294967296);return f(t,n)}function C(t){return i(i(i(t.x,t.y),t.z),t.w)}function D(t){return new n(1).subtract(t)}function E(t){return t.subtract(new n(1))}function F(t){return new n(1).divide(t)}function G(t,r){return new n(t).subtract(r)}function H(t,r){return t.subtract(new n(r))}export{g as clipToUv,j as cross2,v as getBit,h as getBitBool,k as getFilterBit,q as getHighlightBit,w as isNan,C as max4,E as minusOne,H as minusScalar,x as norm,D as oneMinus,F as oneOver,b as rand,B as rgba2float,G as scalarMinus,A as unpackDisplayIdTexel,z as uvToClip};
|
|
@@ -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 e}from"../../../chunks/tslib.es6.js";import"../../../Graphic.js";import t from"../../../core/Collection.js";import i from"../../../core/Error.js";import"../../../core/has.js";import s from"../../../core/Logger.js";import{getOrCreateMapValue as r}from"../../../core/MapUtils.js";import{isAbortError as o}from"../../../core/promiseUtils.js";import{watch as n,syncAndInitial as l,on as m}from"../../../core/reactiveUtils.js";import{property as a}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/RandomLCG.js";import{subclass as p}from"../../../core/accessorSupport/decorators/subclass.js";import c from"../../../geometry/Extent.js";import{create as h}from"../../../geometry/support/aaBoundingRect.js";import{ringsContainsCoords as d}from"../../../geometry/support/contains.js";import{extentIntersectsPolygon as f}from"../../../geometry/support/intersectsBase.js";import{MediaElementView as g}from"../../../layers/support/MediaElementView.js";import"../../../renderers/SimpleRenderer.js";import"../../../symbols/SimpleFillSymbol.js";import"../../../core/scheduling.js";import"../../../core/colorUtils.js";import"../../../config.js";import"../../../symbols/cim/defaultCIMValues.js";import"../../../symbols/cim/enums.js";import"../../../core/floatRGBA.js";import"../../../geometry/Geometry.js";import"../../../geometry/Multipoint.js";import"../../../geometry/Point.js";import"../../../geometry/Polygon.js";import"../../../geometry/Polyline.js";import"../engine/webgl/definitions.js";import"../engine/webgl/animations/instructions.js";import"../../../symbols/Font.js";import"../../../core/mathUtils.js";import"../../../core/ObjectPool.js";import"../../../geometry/support/Axis.js";import"../../../geometry/support/spatialReferenceUtils.js";import"../../../geometry/support/TileClipper.js";import"../../../symbols/cim/effects/EffectAddControlPoints.js";import"../../../symbols/cim/effects/EffectArrow.js";import"../../../symbols/cim/effects/EffectBuffer.js";import"../../../symbols/cim/effects/EffectControlMeasureLine.js";import"../../../symbols/cim/effects/EffectCut.js";import"../../../symbols/cim/effects/EffectDashes.js";import"../../../symbols/cim/effects/EffectDonut.js";import"../../../symbols/cim/effects/EffectEnclosingPolygon.js";import"../../../symbols/cim/effects/EffectJog.js";import"../../../symbols/cim/effects/EffectMove.js";import"../../../symbols/cim/effects/EffectOffset.js";import"../../../symbols/cim/effects/EffectRadial.js";import"../../../symbols/cim/effects/EffectReverse.js";import"../../../symbols/cim/effects/EffectRotate.js";import"../../../symbols/cim/effects/EffectScale.js";import"../../../symbols/cim/effects/EffectSuppress.js";import"../../../symbols/cim/effects/EffectTaperedPolygon.js";import"../../../symbols/cim/effects/EffectWave.js";import"../../../symbols/cim/placements/PlacementAlongLineSameSize.js";import"../../../symbols/cim/placements/PlacementAtExtremities.js";import"../../../symbols/cim/placements/PlacementAtRatioPositions.js";import"../../../symbols/cim/placements/PlacementInsidePolygon.js";import"../../../symbols/cim/placements/PlacementOnLine.js";import"../../../symbols/cim/placements/PlacementOnVertices.js";import"../../../symbols/cim/placements/PlacementPolygonCenter.js";import"../../../symbols/cim/constants.js";import"../../../core/libs/gl-matrix-2/factories/vec2f32.js";import"../engine/webgl/alignmentUtils.js";import"../../../symbols/support/defaults.js";import"../../../symbols/cim/OverrideHelper.js";import"../../../layers/effects/EffectView.js";import"../../../core/Evented.js";import"../engine/transitions/FadeTransition.js";import"../engine/webgl/enums.js";import"../../../core/libs/gl-matrix-2/factories/vec4f32.js";import"../../webgl/enums.js";import"../engine/webgl/shaders/BackgroundPrograms.js";import"../../webgl/checkWebGLError.js";import"../engine/webgl/DefaultVertexAttributeLayouts.js";import"../engine/webgl/AFeatureTile.js";import"../engine/webgl/DisplayEntity.js";import"../engine/webgl/shaderGraph/techniques/featureTechniqueUtils.js";import"../engine/webgl/cpuMapped/MappedMesh.js";import"../engine/webgl/number.js";import"../engine/webgl/shaders/TileInfoPrograms.js";import"../../webgl/Texture.js";import"../../webgl/FBOAttachmentType.js";import"../engine/vectorTiles/style/StyleDefinition.js";import"../engine/vectorTiles/enums.js";import"../engine/webgl/shaders/BitBlitPrograms.js";import"../../../request.js";import"../../../core/urlUtils.js";import"../../../core/pbf.js";import"../engine/webgl/shaders/StencilPrograms.js";import"../engine/webgl/shaderGraph/techniques/TechniqueType.js";import"../engine/webgl/shaderGraph/techniques/shaders/BlendShader.js";import"../engine/webgl/shaderGraph/techniques/shaders/OpacityShader.js";import"../engine/webgl/shaders/HighlightPrograms.js";import"../../webgl/FramebufferObject.js";import"../engine/webgl/meshing/SimpleMesh.js";import"../engine/webgl/PooledUint32Array.js";import"../engine/webgl/Profiler.js";import"../engine/webgl/shaderGraph/techniques/TechniqueRegistry.js";import"../../../Color.js";import"../engine/webgl/shaderGraph/techniques/shaders/constants.js";import"../engine/webgl/shaderGraph/techniques/dotDensity/DotDensityMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/ComplexFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/ComplexOutlineFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/FillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/GradientFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/OutlineFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/PatternFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/PatternOutlineFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/heatmap/HeatmapMeshWriter.js";import"../../../geometry/support/aaBoundingBox.js";import"../engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/line/GradientStrokeMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/line/LineMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/line/TexturedLineMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/markers/MarkerMeshWriter.js";import"../../../arcade/ArcadeDate.js";import"../../../intl/locale.js";import"luxon";import"../../../core/sql/UnknownTimeZone.js";import"../../../layers/support/fieldUtils.js";import"../../../time/constants.js";import"../engine/webgl/shaderGraph/techniques/pieChart/PieChartMeshWriter.js";import"../../webgl/renderState.js";import"../../3d/webgl-engine/core/shaderModules/glsl.js";import"../../webgl/testSVGPremultipliedAlpha.js";import"../LabelManager.js";import"./graphics/GraphicsView2D.js";import"../../../chunks/earcut.js";import"../../../core/libs/gl-matrix-2/factories/vec3f32.js";import"../../../geometry/support/normalizeUtilsCommon.js";import"../../../geometry/SpatialReference.js";import"../../../geometry/support/Ellipsoid.js";import"../../../kernel.js";import"./support/util.js";import"../navigation/MapViewNavigation.js";import"../../../core/asyncUtils.js";import"../../../core/support/UpdatingHandles.js";import"../engine/webgl/shaderGraph/techniques/shaders/MagnifierShader.js";import"../../../core/unitUtils.js";import"../../../geometry/ellipsoidUtils.js";import"../../../chunks/pe.js";import"../../../geometry/projection/projectors.js";import"../engine/webgl/shaderGraph/techniques/shaders/GridShader.js";import"../../../geometry/support/geodesicConstants.js";import"../tiling/TileInfoView.js";import"../tiling/TileKey.js";import u from"../tiling/TileQueue.js";import y from"../tiling/TileStrategy.js";import j from"../engine/webgl/Overlay.js";import b from"../engine/webgl/OverlayContainer.js";import{LayerView2DMixin as w}from"./LayerView2D.js";import _ from"../../layers/LayerView.js";import v from"../../layers/MediaLayerView.js";import{TaskPriority as E}from"../../support/Scheduler.js";let G=class extends(w(v(_))){constructor(){super(...arguments),this._overlayContainer=null,this._fetchQueue=null,this._tileStrategy=null,this._elementReferences=new Map,this._debugGraphicsView=null,this._interaction=null,this.layer=null,this.elements=new t}initialize(){this.addHandles([n((()=>[this.interactive,this.suspended]),(async()=>{if(this.interactive&&!this._interaction){const{MediaLayerInteraction:e}=await import("./support/MediaLayerInteraction.js");this._interaction=new e({view:this.view,layer:this.layer}),this.selectedElement!==this._interaction.selectedElement&&(this._interaction.selectedElement=this.selectedElement),this.interactionOptions!==this._interaction.options&&(this._interaction.options=this.interactionOptions)}this._interaction&&(this._interaction.enabled=!this.suspended&&this.interactive)}),l),n((()=>this.interactionOptions),(e=>{this._interaction&&(this._interaction.options=e)}),l),n((()=>this.selectedElement),(e=>{this._interaction&&(this._interaction.selectedElement=e)}),l)])}attach(){this.addAttachHandles([m((()=>this.layer.effectiveSource),"refresh",(()=>{this._tileStrategy.refresh((e=>this._updateTile(e))),this.requestUpdate()})),m((()=>this.layer.effectiveSource),"change",(({element:e})=>this._elementUpdateHandler(e)))]),this._overlayContainer=new b,this.container.addChild(this._overlayContainer),this._fetchQueue=new u({tileInfoView:this.view.featuresTilingScheme,concurrency:10,process:(e,t)=>this._queryElements(e,t),scheduler:this.scheduler,priority:E.MAPVIEW_FETCH_QUEUE}),this._tileStrategy=new y({cachePolicy:"purge",resampling:!0,acquireTile:e=>this._acquireTile(e),releaseTile:e=>this._releaseTile(e),tileInfoView:this.view.featuresTilingScheme}),this.requestUpdate()}detach(){this.elements.removeAll(),this._tileStrategy.destroy(),this._fetchQueue.destroy(),this._overlayContainer.removeAllChildren(),this.container.removeAllChildren(),this._elementReferences.clear(),this._debugGraphicsView?.destroy()}supportsSpatialReference(e){return!0}viewChange(){this.requestUpdate()}moveEnd(){this.requestUpdate()}update(e){this._tileStrategy.update(e),this._debugGraphicsView?.update(e)}async hitTest(e,t){const i=[],s=e.normalize(),r=[s.x,s.y];for(const{elementView:{normalizedCoords:o,element:n}}of this._elementReferences.values())null!=o&&d(o.rings,r)&&i.push({type:"media",element:n,layer:this.layer,mapPoint:e,sourcePoint:n.toSource(e)});return i.reverse()}canResume(){return null!=this.layer.source&&super.canResume()}async doRefresh(){this._fetchQueue.reset(),this._tileStrategy.refresh((e=>this._updateTile(e)))}_acquireTile(e){const t=new M(e.clone());return this._updateTile(t),t}_updateTile(e){this._updatingHandles.addPromise(this._fetchQueue.push(e.key).then((t=>{const[i,s]=e.setElements(t);this._referenceElements(e,i),this._dereferenceElements(e,s),this.requestUpdate()}),(e=>{o(e)||s.getLogger(this).error(e)})))}_releaseTile(e){this._fetchQueue.abort(e.key.id),e.elements&&this._dereferenceElements(e,e.elements),this.requestUpdate()}async _queryElements(e,t){const i=this.layer.effectiveSource;if(null==i)return[];this.view.featuresTilingScheme.getTileBounds(S,e,!0);const s=new c({xmin:S[0],ymin:S[1],xmax:S[2],ymax:S[3],spatialReference:this.view.spatialReference});return i.queryElements(s,t)}_referenceElements(e,t){if(null!=this.layer.source)for(const i of t)this._referenceElement(e,i)}_referenceElement(e,t){r(this._elementReferences,t.uid,(()=>{const e=new g({element:t,spatialReference:this.view.spatialReference}),r=new j(e);return this._overlayContainer.addChild(r),this.elements.add(t),this._updatingHandles.addPromise(t.load().catch((e=>{s.getLogger("esri.views.2d.layers.MediaLayerView2D").error(new i("element-load-error","Element cannot be displayed",{element:t,error:e}))}))),{debugGraphic:null,elementView:e,overlay:r,tiles:new Set}})).tiles.add(e)}_dereferenceElements(e,t){for(const i of t)this._dereferenceElement(e,i)}_dereferenceElement(e,t){const i=this._elementReferences.get(t.uid);i.tiles.delete(e),i.tiles.size||(this._overlayContainer.removeChild(i.overlay),i.overlay.destroy(),i.elementView.destroy(),this._elementReferences.delete(t.uid),this.elements.remove(t),this._debugGraphicsView?.graphics.remove(i.debugGraphic))}_elementUpdateHandler(e){let t=this._elementReferences.get(e.uid);if(t){const i=t.elementView.normalizedCoords;if(null==i)return this._overlayContainer.removeChild(t.overlay),t.overlay.destroy(),t.elementView.destroy(),this._elementReferences.delete(e.uid),this.elements.remove(e),void this._debugGraphicsView?.graphics.remove(t.debugGraphic);const s=[],r=[];for(const e of this._tileStrategy.tiles){const o=T(this.view.featuresTilingScheme,e,i);t.tiles.has(e)?o||r.push(e):o&&s.push(e)}for(const t of s)this._referenceElement(t,e);for(const t of r)this._dereferenceElement(t,e);return t=this._elementReferences.get(e.uid),void(t?.debugGraphic&&(t.debugGraphic.geometry=t.elementView.normalizedCoords,this._debugGraphicsView.graphicUpdateHandler({graphic:t.debugGraphic,property:"geometry"})))}const i=new g({element:e,spatialReference:this.view.spatialReference}).normalizedCoords;if(null!=i)for(const s of this._tileStrategy.tiles){T(this.view.featuresTilingScheme,s,i)&&this._referenceElement(s,e)}}};e([a()],G.prototype,"layer",void 0),e([a({readOnly:!0})],G.prototype,"elements",void 0),G=e([p("esri.views.2d.layers.MediaLayerView2D")],G);const S=h(),q={xmin:0,ymin:0,xmax:0,ymax:0};function T(e,t,i){return e.getTileBounds(S,t.key,!0),q.xmin=S[0],q.ymin=S[1],q.xmax=S[2],q.ymax=S[3],f(q,i)}class M{constructor(e){this.key=e,this.elements=null,this.isReady=!1,this.visible=!0}setElements(e){const t=[],i=new Set(this.elements);this.elements=e;for(const s of e)i.has(s)?i.delete(s):t.push(s);return this.isReady=!0,[t,Array.from(i)]}destroy(){}}const C=G;export{C as default};
|
|
5
|
+
import{_ as e}from"../../../chunks/tslib.es6.js";import"../../../Graphic.js";import t from"../../../core/Collection.js";import i from"../../../core/Error.js";import"../../../core/has.js";import s from"../../../core/Logger.js";import{getOrCreateMapValue as r}from"../../../core/MapUtils.js";import{isAbortError as o}from"../../../core/promiseUtils.js";import{watch as n,syncAndInitial as l,on as m}from"../../../core/reactiveUtils.js";import{property as a}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/RandomLCG.js";import{subclass as p}from"../../../core/accessorSupport/decorators/subclass.js";import c from"../../../geometry/Extent.js";import{create as h}from"../../../geometry/support/aaBoundingRect.js";import{ringsContainsCoords as d}from"../../../geometry/support/contains.js";import{extentIntersectsPolygon as f}from"../../../geometry/support/intersectsBase.js";import{MediaElementView as g}from"../../../layers/support/MediaElementView.js";import"../../../renderers/SimpleRenderer.js";import"../../../symbols/SimpleFillSymbol.js";import"../../../core/scheduling.js";import"../../../core/colorUtils.js";import"../../../config.js";import"../../../symbols/cim/defaultCIMValues.js";import"../../../symbols/cim/enums.js";import"../../../core/floatRGBA.js";import"../../../geometry/Geometry.js";import"../../../geometry/Multipoint.js";import"../../../geometry/Point.js";import"../../../geometry/Polygon.js";import"../../../geometry/Polyline.js";import"../engine/webgl/definitions.js";import"../engine/webgl/animations/instructions.js";import"../../../symbols/Font.js";import"../../../core/mathUtils.js";import"../../../core/ObjectPool.js";import"../../../geometry/support/Axis.js";import"../../../geometry/support/spatialReferenceUtils.js";import"../../../geometry/support/TileClipper.js";import"../../../symbols/cim/effects/EffectAddControlPoints.js";import"../../../symbols/cim/effects/EffectArrow.js";import"../../../symbols/cim/effects/EffectBuffer.js";import"../../../symbols/cim/effects/EffectControlMeasureLine.js";import"../../../symbols/cim/effects/EffectCut.js";import"../../../symbols/cim/effects/EffectDashes.js";import"../../../symbols/cim/effects/EffectDonut.js";import"../../../symbols/cim/effects/EffectEnclosingPolygon.js";import"../../../symbols/cim/effects/EffectJog.js";import"../../../symbols/cim/effects/EffectMove.js";import"../../../symbols/cim/effects/EffectOffset.js";import"../../../symbols/cim/effects/EffectRadial.js";import"../../../symbols/cim/effects/EffectReverse.js";import"../../../symbols/cim/effects/EffectRotate.js";import"../../../symbols/cim/effects/EffectScale.js";import"../../../symbols/cim/effects/EffectSuppress.js";import"../../../symbols/cim/effects/EffectTaperedPolygon.js";import"../../../symbols/cim/effects/EffectWave.js";import"../../../symbols/cim/placements/PlacementAlongLineSameSize.js";import"../../../symbols/cim/placements/PlacementAtExtremities.js";import"../../../symbols/cim/placements/PlacementAtRatioPositions.js";import"../../../symbols/cim/placements/PlacementInsidePolygon.js";import"../../../symbols/cim/placements/PlacementOnLine.js";import"../../../symbols/cim/placements/PlacementOnVertices.js";import"../../../symbols/cim/placements/PlacementPolygonCenter.js";import"../../../symbols/cim/constants.js";import"../../../core/libs/gl-matrix-2/factories/vec2f32.js";import"../engine/webgl/alignmentUtils.js";import"../../../symbols/support/defaults.js";import"../../../symbols/cim/OverrideHelper.js";import"../../../layers/effects/EffectView.js";import"../../../core/Evented.js";import"../engine/transitions/FadeTransition.js";import"../engine/webgl/enums.js";import"../../../core/libs/gl-matrix-2/factories/vec4f32.js";import"../../webgl/enums.js";import"../engine/webgl/shaders/BackgroundPrograms.js";import"../../webgl/checkWebGLError.js";import"../engine/webgl/DefaultVertexAttributeLayouts.js";import"../engine/webgl/AFeatureTile.js";import"../engine/webgl/DisplayEntity.js";import"../engine/webgl/shaderGraph/techniques/featureTechniqueUtils.js";import"../engine/webgl/cpuMapped/MappedMesh.js";import"../engine/webgl/number.js";import"../engine/webgl/shaders/TileInfoPrograms.js";import"../../webgl/Texture.js";import"../../webgl/FBOAttachmentType.js";import"../engine/vectorTiles/style/StyleDefinition.js";import"../engine/vectorTiles/enums.js";import"../engine/webgl/shaders/BitBlitPrograms.js";import"../../../request.js";import"../../../core/urlUtils.js";import"../../../core/pbf.js";import"../engine/webgl/shaders/StencilPrograms.js";import"../engine/webgl/shaderGraph/techniques/TechniqueType.js";import"../engine/webgl/shaderGraph/techniques/shaders/BlendShader.js";import"../engine/webgl/shaderGraph/techniques/shaders/OpacityShader.js";import"../engine/webgl/shaders/HighlightPrograms.js";import"../../webgl/FramebufferObject.js";import"../engine/webgl/meshing/SimpleMesh.js";import"../engine/webgl/PooledUint32Array.js";import"../engine/webgl/Profiler.js";import"../engine/webgl/shaderGraph/techniques/TechniqueRegistry.js";import"../../../Color.js";import"../engine/webgl/shaderGraph/techniques/animated/attributes.js";import"../engine/webgl/shaderGraph/techniques/shaders/constants.js";import"../engine/webgl/mesh/templates/templateUtils.js";import"../engine/webgl/shaderGraph/techniques/line/LineMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/dotDensity/DotDensityMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/ComplexFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/ComplexOutlineFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/FillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/GradientFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/OutlineFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/PatternFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/PatternOutlineFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/heatmap/HeatmapMeshWriter.js";import"../../../geometry/support/aaBoundingBox.js";import"../engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/line/GradientStrokeMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/line/TexturedLineMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/markers/MarkerMeshWriter.js";import"../../../arcade/ArcadeDate.js";import"../../../intl/locale.js";import"luxon";import"../../../core/sql/UnknownTimeZone.js";import"../../../layers/support/fieldUtils.js";import"../../../time/constants.js";import"../engine/webgl/shaderGraph/techniques/pieChart/PieChartMeshWriter.js";import"../../webgl/renderState.js";import"../../3d/webgl-engine/core/shaderModules/glsl.js";import"../../webgl/testSVGPremultipliedAlpha.js";import"../LabelManager.js";import"./graphics/GraphicsView2D.js";import"../../../chunks/earcut.js";import"../../../core/libs/gl-matrix-2/factories/vec3f32.js";import"../../../geometry/support/normalizeUtilsCommon.js";import"../../../geometry/SpatialReference.js";import"../../../geometry/support/Ellipsoid.js";import"../../../kernel.js";import"./support/util.js";import"../navigation/MapViewNavigation.js";import"../../../core/asyncUtils.js";import"../../../core/support/UpdatingHandles.js";import"../engine/webgl/shaderGraph/techniques/shaders/MagnifierShader.js";import"../../../core/unitUtils.js";import"../../../geometry/ellipsoidUtils.js";import"../../../chunks/pe.js";import"../../../geometry/projection/projectors.js";import"../engine/webgl/shaderGraph/techniques/shaders/GridShader.js";import"../../../geometry/support/geodesicConstants.js";import"../tiling/TileInfoView.js";import"../tiling/TileKey.js";import u from"../tiling/TileQueue.js";import j from"../tiling/TileStrategy.js";import y from"../engine/webgl/Overlay.js";import b from"../engine/webgl/OverlayContainer.js";import{LayerView2DMixin as w}from"./LayerView2D.js";import _ from"../../layers/LayerView.js";import v from"../../layers/MediaLayerView.js";import{TaskPriority as E}from"../../support/Scheduler.js";let G=class extends(w(v(_))){constructor(){super(...arguments),this._overlayContainer=null,this._fetchQueue=null,this._tileStrategy=null,this._elementReferences=new Map,this._debugGraphicsView=null,this._interaction=null,this.layer=null,this.elements=new t}initialize(){this.addHandles([n((()=>[this.interactive,this.suspended]),(async()=>{if(this.interactive&&!this._interaction){const{MediaLayerInteraction:e}=await import("./support/MediaLayerInteraction.js");this._interaction=new e({view:this.view,layer:this.layer}),this.selectedElement!==this._interaction.selectedElement&&(this._interaction.selectedElement=this.selectedElement),this.interactionOptions!==this._interaction.options&&(this._interaction.options=this.interactionOptions)}this._interaction&&(this._interaction.enabled=!this.suspended&&this.interactive)}),l),n((()=>this.interactionOptions),(e=>{this._interaction&&(this._interaction.options=e)}),l),n((()=>this.selectedElement),(e=>{this._interaction&&(this._interaction.selectedElement=e)}),l)])}attach(){this.addAttachHandles([m((()=>this.layer.effectiveSource),"refresh",(()=>{this._tileStrategy.refresh((e=>this._updateTile(e))),this.requestUpdate()})),m((()=>this.layer.effectiveSource),"change",(({element:e})=>this._elementUpdateHandler(e)))]),this._overlayContainer=new b,this.container.addChild(this._overlayContainer),this._fetchQueue=new u({tileInfoView:this.view.featuresTilingScheme,concurrency:10,process:(e,t)=>this._queryElements(e,t),scheduler:this.scheduler,priority:E.MAPVIEW_FETCH_QUEUE}),this._tileStrategy=new j({cachePolicy:"purge",resampling:!0,acquireTile:e=>this._acquireTile(e),releaseTile:e=>this._releaseTile(e),tileInfoView:this.view.featuresTilingScheme}),this.requestUpdate()}detach(){this.elements.removeAll(),this._tileStrategy.destroy(),this._fetchQueue.destroy(),this._overlayContainer.removeAllChildren(),this.container.removeAllChildren(),this._elementReferences.clear(),this._debugGraphicsView?.destroy()}supportsSpatialReference(e){return!0}viewChange(){this.requestUpdate()}moveEnd(){this.requestUpdate()}update(e){this._tileStrategy.update(e),this._debugGraphicsView?.update(e)}async hitTest(e,t){const i=[],s=e.normalize(),r=[s.x,s.y];for(const{elementView:{normalizedCoords:o,element:n}}of this._elementReferences.values())null!=o&&d(o.rings,r)&&i.push({type:"media",element:n,layer:this.layer,mapPoint:e,sourcePoint:n.toSource(e)});return i.reverse()}canResume(){return null!=this.layer.source&&super.canResume()}async doRefresh(){this._fetchQueue.reset(),this._tileStrategy.refresh((e=>this._updateTile(e)))}_acquireTile(e){const t=new M(e.clone());return this._updateTile(t),t}_updateTile(e){this._updatingHandles.addPromise(this._fetchQueue.push(e.key).then((t=>{const[i,s]=e.setElements(t);this._referenceElements(e,i),this._dereferenceElements(e,s),this.requestUpdate()}),(e=>{o(e)||s.getLogger(this).error(e)})))}_releaseTile(e){this._fetchQueue.abort(e.key.id),e.elements&&this._dereferenceElements(e,e.elements),this.requestUpdate()}async _queryElements(e,t){const i=this.layer.effectiveSource;if(null==i)return[];this.view.featuresTilingScheme.getTileBounds(S,e,!0);const s=new c({xmin:S[0],ymin:S[1],xmax:S[2],ymax:S[3],spatialReference:this.view.spatialReference});return i.queryElements(s,t)}_referenceElements(e,t){if(null!=this.layer.source)for(const i of t)this._referenceElement(e,i)}_referenceElement(e,t){r(this._elementReferences,t.uid,(()=>{const e=new g({element:t,spatialReference:this.view.spatialReference}),r=new y(e);return this._overlayContainer.addChild(r),this.elements.add(t),this._updatingHandles.addPromise(t.load().catch((e=>{s.getLogger("esri.views.2d.layers.MediaLayerView2D").error(new i("element-load-error","Element cannot be displayed",{element:t,error:e}))}))),{debugGraphic:null,elementView:e,overlay:r,tiles:new Set}})).tiles.add(e)}_dereferenceElements(e,t){for(const i of t)this._dereferenceElement(e,i)}_dereferenceElement(e,t){const i=this._elementReferences.get(t.uid);i.tiles.delete(e),i.tiles.size||(this._overlayContainer.removeChild(i.overlay),i.overlay.destroy(),i.elementView.destroy(),this._elementReferences.delete(t.uid),this.elements.remove(t),this._debugGraphicsView?.graphics.remove(i.debugGraphic))}_elementUpdateHandler(e){let t=this._elementReferences.get(e.uid);if(t){const i=t.elementView.normalizedCoords;if(null==i)return this._overlayContainer.removeChild(t.overlay),t.overlay.destroy(),t.elementView.destroy(),this._elementReferences.delete(e.uid),this.elements.remove(e),void this._debugGraphicsView?.graphics.remove(t.debugGraphic);const s=[],r=[];for(const e of this._tileStrategy.tiles){const o=T(this.view.featuresTilingScheme,e,i);t.tiles.has(e)?o||r.push(e):o&&s.push(e)}for(const t of s)this._referenceElement(t,e);for(const t of r)this._dereferenceElement(t,e);return t=this._elementReferences.get(e.uid),void(t?.debugGraphic&&(t.debugGraphic.geometry=t.elementView.normalizedCoords,this._debugGraphicsView.graphicUpdateHandler({graphic:t.debugGraphic,property:"geometry"})))}const i=new g({element:e,spatialReference:this.view.spatialReference}).normalizedCoords;if(null!=i)for(const s of this._tileStrategy.tiles){T(this.view.featuresTilingScheme,s,i)&&this._referenceElement(s,e)}}};e([a()],G.prototype,"layer",void 0),e([a({readOnly:!0})],G.prototype,"elements",void 0),G=e([p("esri.views.2d.layers.MediaLayerView2D")],G);const S=h(),q={xmin:0,ymin:0,xmax:0,ymax:0};function T(e,t,i){return e.getTileBounds(S,t.key,!0),q.xmin=S[0],q.ymin=S[1],q.xmax=S[2],q.ymax=S[3],f(q,i)}class M{constructor(e){this.key=e,this.elements=null,this.isReady=!1,this.visible=!0}setElements(e){const t=[],i=new Set(this.elements);this.elements=e;for(const s of e)i.has(s)?i.delete(s):t.push(s);return this.isReady=!0,[t,Array.from(i)]}destroy(){}}const C=G;export{C as default};
|
|
@@ -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 e}from"../../../chunks/tslib.es6.js";import{makeHandle as i}from"../../../core/handleUtils.js";import t from"../../../core/Logger.js";import{isAbortError as s,waitTick as r}from"../../../core/promiseUtils.js";import{property as o}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/RandomLCG.js";import{subclass as l}from"../../../core/accessorSupport/decorators/subclass.js";import{equals as h}from"../../../geometry/support/spatialReferenceUtils.js";import{GraphicsCollection as a}from"../../../support/GraphicsCollection.js";import"../../../core/Error.js";import"../../../core/scheduling.js";import"../../../core/colorUtils.js";import"../../../config.js";import"../../../symbols/cim/defaultCIMValues.js";import"../../../symbols/cim/enums.js";import"../../../core/floatRGBA.js";import"../../../geometry/Extent.js";import"../../../geometry/Geometry.js";import"../../../geometry/Multipoint.js";import"../../../geometry/Point.js";import"../../../geometry/Polygon.js";import"../../../geometry/Polyline.js";import"../engine/webgl/definitions.js";import"../engine/webgl/animations/instructions.js";import"../../../core/mathUtils.js";import"../../../symbols/Font.js";import"../../../core/ObjectPool.js";import"../../../geometry/support/Axis.js";import"../../../geometry/support/TileClipper.js";import"../../../symbols/cim/effects/EffectAddControlPoints.js";import"../../../symbols/cim/effects/EffectArrow.js";import"../../../symbols/cim/effects/EffectBuffer.js";import"../../../symbols/cim/effects/EffectControlMeasureLine.js";import"../../../symbols/cim/effects/EffectCut.js";import"../../../symbols/cim/effects/EffectDashes.js";import"../../../symbols/cim/effects/EffectDonut.js";import"../../../symbols/cim/effects/EffectEnclosingPolygon.js";import"../../../symbols/cim/effects/EffectJog.js";import"../../../symbols/cim/effects/EffectMove.js";import"../../../symbols/cim/effects/EffectOffset.js";import"../../../symbols/cim/effects/EffectRadial.js";import"../../../symbols/cim/effects/EffectReverse.js";import"../../../symbols/cim/effects/EffectRotate.js";import"../../../symbols/cim/effects/EffectScale.js";import"../../../symbols/cim/effects/EffectSuppress.js";import"../../../symbols/cim/effects/EffectTaperedPolygon.js";import"../../../symbols/cim/effects/EffectWave.js";import"../../../symbols/cim/placements/PlacementAlongLineSameSize.js";import"../../../symbols/cim/placements/PlacementAtExtremities.js";import"../../../symbols/cim/placements/PlacementAtRatioPositions.js";import"../../../symbols/cim/placements/PlacementInsidePolygon.js";import"../../../symbols/cim/placements/PlacementOnLine.js";import"../../../symbols/cim/placements/PlacementOnVertices.js";import"../../../symbols/cim/placements/PlacementPolygonCenter.js";import"../../../symbols/cim/constants.js";import"../../../core/libs/gl-matrix-2/factories/vec2f32.js";import"../engine/webgl/alignmentUtils.js";import"../../../symbols/support/defaults.js";import"../../../symbols/cim/OverrideHelper.js";import"../../../layers/effects/EffectView.js";import"../../../core/Evented.js";import"../engine/transitions/FadeTransition.js";import"../engine/webgl/enums.js";import"../../../core/libs/gl-matrix-2/factories/vec4f32.js";import"../../webgl/enums.js";import"../engine/webgl/shaders/BackgroundPrograms.js";import"../../webgl/checkWebGLError.js";import"../engine/webgl/DefaultVertexAttributeLayouts.js";import"../engine/webgl/AFeatureTile.js";import"../engine/webgl/DisplayEntity.js";import"../engine/webgl/shaderGraph/techniques/featureTechniqueUtils.js";import"../engine/webgl/cpuMapped/MappedMesh.js";import"../engine/webgl/number.js";import"../engine/webgl/shaders/TileInfoPrograms.js";import"../../webgl/Texture.js";import"../../webgl/FBOAttachmentType.js";import"../engine/vectorTiles/style/StyleDefinition.js";import"../engine/vectorTiles/enums.js";import"../engine/webgl/shaders/BitBlitPrograms.js";import"../../../request.js";import"../../../core/urlUtils.js";import"../../../core/pbf.js";import"../engine/webgl/shaders/StencilPrograms.js";import"../engine/webgl/shaderGraph/techniques/TechniqueType.js";import"../engine/webgl/shaderGraph/techniques/shaders/BlendShader.js";import"../engine/webgl/shaderGraph/techniques/shaders/OpacityShader.js";import"../engine/webgl/shaders/HighlightPrograms.js";import"../../webgl/FramebufferObject.js";import"../engine/webgl/meshing/SimpleMesh.js";import"../engine/webgl/PooledUint32Array.js";import"../engine/webgl/Profiler.js";import"../engine/webgl/shaderGraph/techniques/TechniqueRegistry.js";import"../../../Color.js";import"../engine/webgl/shaderGraph/techniques/shaders/constants.js";import"../engine/webgl/shaderGraph/techniques/dotDensity/DotDensityMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/ComplexFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/ComplexOutlineFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/FillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/GradientFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/OutlineFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/PatternFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/PatternOutlineFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/heatmap/HeatmapMeshWriter.js";import"../../../geometry/support/aaBoundingBox.js";import"../engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/line/GradientStrokeMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/line/LineMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/line/TexturedLineMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/markers/MarkerMeshWriter.js";import"../../../arcade/ArcadeDate.js";import"../../../intl/locale.js";import"luxon";import"../../../core/sql/UnknownTimeZone.js";import"../../../layers/support/fieldUtils.js";import"../../../time/constants.js";import"../engine/webgl/shaderGraph/techniques/pieChart/PieChartMeshWriter.js";import"../../webgl/renderState.js";import"../../3d/webgl-engine/core/shaderModules/glsl.js";import"../../webgl/testSVGPremultipliedAlpha.js";import"../LabelManager.js";import p from"./graphics/GraphicsView2D.js";import"../../../core/accessorSupport/watch.js";import"../../../core/accessorSupport/tracking/SimpleTrackingTarget.js";import"../../../chunks/earcut.js";import"../../../core/libs/gl-matrix-2/factories/vec3f32.js";import"../../../geometry/support/normalizeUtilsCommon.js";import"../../../geometry/SpatialReference.js";import"../../../geometry/support/Ellipsoid.js";import"../../../kernel.js";import"./support/util.js";import"../navigation/MapViewNavigation.js";import"../../../core/asyncUtils.js";import"../../../core/support/UpdatingHandles.js";import"../engine/webgl/shaderGraph/techniques/shaders/MagnifierShader.js";import"../../../core/unitUtils.js";import"../../../geometry/ellipsoidUtils.js";import"../../../chunks/pe.js";import"../../../geometry/projection/projectors.js";import"../engine/webgl/shaderGraph/techniques/shaders/GridShader.js";import"../../../geometry/support/geodesicConstants.js";import{BitmapTileLayerView2D as n}from"./BitmapTileLayerView2D.js";import{LayerView2DMixin as m}from"./LayerView2D.js";import c from"./graphics/HighlightGraphicContainer.js";import{createBlankImage as g,resampleImage as f}from"./support/imageUtils.js";import u from"../tiling/TileInfoView.js";import d from"../tiling/TileKey.js";import j from"../tiling/TileQueue.js";import y from"../tiling/TileStrategy.js";import w from"../../layers/LayerView.js";import b from"../../layers/RefreshableLayerView.js";import{getHighlightGraphics as _}from"../../layers/support/highlightUtils.js";import{isMapServiceLayerView as T,MapServiceLayerViewHelper as G}from"../../layers/support/MapServiceLayerViewHelper.js";import{createQueryGeometry as q}from"../../support/drapedUtils.js";import{defaultHighlightName as V}from"../../support/HighlightDefaults.js";import{TaskPriority as v}from"../../support/Scheduler.js";const I=[0,0];let P=class extends(b(n(m(w)))){constructor(){super(...arguments),this._fetchQueue=null,this._highlightGraphics=new a,this._highlightView=null,this._popupHighlightHelper=null,this._tileStrategy=null,this.layer=null}get resampling(){return!("resampling"in this.layer)||!1!==this.layer.resampling}get tilemapCache(){return"tilemapCache"in this.layer?this.layer.tilemapCache:null}update(e){this._fetchQueue.pause(),this._fetchQueue.state=e.state,this._tileStrategy.update(e),this._fetchQueue.resume(),this._highlightView?.processUpdate(e)}attach(){const e="tileServers"in this.layer?this.layer.tileServers:null,i=this.tilemapCache;if(this._tileInfoView=new u(this.layer.tileInfo,this.layer.fullExtent,i?.effectiveMinLOD,i?.effectiveMaxLOD),this._fetchQueue=new j({tileInfoView:this._tileInfoView,concurrency:e&&10*e.length||10,process:(e,i)=>this.fetchTile(e,i),scheduler:this.scheduler,priority:v.MAPVIEW_FETCH_QUEUE}),this._tileStrategy=new y({cachePolicy:"keep",resampling:this.resampling,acquireTile:e=>this.acquireTile(e),releaseTile:e=>this.releaseTile(e),tileInfoView:this._tileInfoView}),T(this,this.layer)){const e=this._highlightView=new p({view:this.view,graphics:this._highlightGraphics,requestUpdateCallback:()=>this.requestUpdate(),container:new c(this.view.featuresTilingScheme),defaultPointSymbolEnabled:!1});this.container.addChild(this._highlightView.container),this._popupHighlightHelper=new G({createFetchPopupFeaturesQueryGeometry:(e,i)=>q(e,i,this.view),highlightGraphics:this._highlightGraphics,highlightGraphicUpdated:({graphic:i,property:t})=>e.graphicUpdateHandler({graphic:i,property:t}),layerView:this,updatingHandles:this._updatingHandles})}this.requestUpdate(),this.addAttachHandles(this._updatingHandles.add((()=>this.resampling),(()=>{this.doRefresh()}))),super.attach()}detach(){super.detach(),this._tileStrategy.destroy(),this._fetchQueue.clear(),this.container.removeAllChildren(),this._popupHighlightHelper?.destroy(),this._highlightView?.destroy(),this._fetchQueue=this._tileStrategy=this._tileInfoView=this._popupHighlightHelper=null}async fetchPopupFeaturesAtLocation(e,i){return this._popupHighlightHelper?this._popupHighlightHelper.fetchPopupFeaturesAtLocation(e,i):[]}highlight(e,t){const s=_(e);if(0===s.length)return i();const r=t?.name??V;return this._addHighlightGraphics(s,r),i((()=>!this.destroyed&&this._removeHighlightGraphics(s,r)))}_processHighlight(){const e=this._getHighlights();this._highlightView?.setHighlight(e)}_addHighlightGraphics(e,i){this._highlightGraphics.addMany(e),this._addHighlights(e.map((e=>e.uid)),i)}_removeHighlightGraphics(e,i){this._highlightGraphics.removeMany(e),this._removeHighlights(e.map((e=>e.uid)),i)}viewChange(){this.requestUpdate()}moveEnd(){this.requestUpdate()}supportsSpatialReference(e){return h(this.layer.tileInfo?.spatialReference,e)}async doRefresh(){if(this.attached){if(this.suspended)return this._tileStrategy.clear(),void this.requestUpdate();this._fetchQueue.reset(),this._tileStrategy.refresh((e=>this._updatingHandles.addPromise(this._enqueueTileFetch(e))))}}acquireTile(e){const i=this._bitmapView.createTile(e),t=i.bitmap;return[t.x,t.y]=this._tileInfoView.getTileCoords(I,i.key),t.resolution=this._tileInfoView.getTileResolution(i.key),[t.width,t.height]=this._tileInfoView.tileInfo.size,this._updatingHandles.addPromise(this._enqueueTileFetch(i)),this._bitmapView.addChild(i),this.requestUpdate(),i}releaseTile(e){this._fetchQueue.abort(e.key.id),this._bitmapView.removeChild(e),e.once("detach",(()=>e.destroy())),this.requestUpdate()}async fetchTile(e,i={}){return this.tilemapCache?this._fetchTileWithTilemapCache(e,i):this._fetchTileWithoutTilemapCache(e,i)}async _fetchTileWithoutTilemapCache(e,i={}){const{signal:t,resamplingLevel:r=0}=i;try{return await this._fetchImage(e,t)}catch(o){if(s(o))throw o;if(!this.resampling)return g(this._tileInfoView.tileInfo.size);if(r<3){const t=this._tileInfoView.getTileParentId(e.id);if(t){const s=new d(t),o=await this._fetchTileWithoutTilemapCache(s,{...i,resamplingLevel:r+1});return f(this._tileInfoView,o,s,e)}}return g(this._tileInfoView.tileInfo.size)}}async _fetchTileWithTilemapCache(e,i={}){const t=this.tilemapCache,{signal:o,resamplingLevel:l=0}=i,h=new d(0,0,0,0);let a,p=null;try{if(p=await t.fetchAvailabilityUpsample(e.level,e.row,e.col,h,{signal:o}),!this.resampling&&h.level!==e.level)return await r(i),g(this._tileInfoView.tileInfo.size);a=await this._fetchImage(h,o)}catch(n){if(s(n))throw n;if(this.resampling&&"unknown"===p&&l<3){const t=this._tileInfoView.getTileParentId(e.id);if(t){h.set(t);try{a=await this._fetchTileWithTilemapCache(h,{...i,resamplingLevel:l+1})}catch{}}}}return a?this.resampling?f(this._tileInfoView,a,h,e):a:g(this._tileInfoView.tileInfo.size)}async _enqueueTileFetch(e){if(!this._fetchQueue.has(e.key.id)){try{const i=await this._fetchQueue.push(e.key);e.bitmap.source=i,e.bitmap.width=this._tileInfoView.tileInfo.size[0],e.bitmap.height=this._tileInfoView.tileInfo.size[1],e.once("attach",(()=>this.requestUpdate()))}catch(i){s(i)||t.getLogger(this).error(i)}this.requestUpdate()}}async _fetchImage(e,i){return this.layer.fetchImageBitmapTile(e.level,e.row,e.col,{signal:i})}};e([o()],P.prototype,"resampling",null),e([o()],P.prototype,"tilemapCache",null),P=e([l("esri.views.2d.layers.TileLayerView2D")],P);const C=P;export{C as default};
|
|
5
|
+
import{_ as e}from"../../../chunks/tslib.es6.js";import{makeHandle as i}from"../../../core/handleUtils.js";import t from"../../../core/Logger.js";import{isAbortError as s,waitTick as r}from"../../../core/promiseUtils.js";import{property as o}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/RandomLCG.js";import{subclass as l}from"../../../core/accessorSupport/decorators/subclass.js";import{equals as h}from"../../../geometry/support/spatialReferenceUtils.js";import{GraphicsCollection as a}from"../../../support/GraphicsCollection.js";import"../../../core/Error.js";import"../../../core/scheduling.js";import"../../../core/colorUtils.js";import"../../../config.js";import"../../../symbols/cim/defaultCIMValues.js";import"../../../symbols/cim/enums.js";import"../../../core/floatRGBA.js";import"../../../geometry/Extent.js";import"../../../geometry/Geometry.js";import"../../../geometry/Multipoint.js";import"../../../geometry/Point.js";import"../../../geometry/Polygon.js";import"../../../geometry/Polyline.js";import"../engine/webgl/definitions.js";import"../engine/webgl/animations/instructions.js";import"../../../core/mathUtils.js";import"../../../symbols/Font.js";import"../../../core/ObjectPool.js";import"../../../geometry/support/Axis.js";import"../../../geometry/support/TileClipper.js";import"../../../symbols/cim/effects/EffectAddControlPoints.js";import"../../../symbols/cim/effects/EffectArrow.js";import"../../../symbols/cim/effects/EffectBuffer.js";import"../../../symbols/cim/effects/EffectControlMeasureLine.js";import"../../../symbols/cim/effects/EffectCut.js";import"../../../symbols/cim/effects/EffectDashes.js";import"../../../symbols/cim/effects/EffectDonut.js";import"../../../symbols/cim/effects/EffectEnclosingPolygon.js";import"../../../symbols/cim/effects/EffectJog.js";import"../../../symbols/cim/effects/EffectMove.js";import"../../../symbols/cim/effects/EffectOffset.js";import"../../../symbols/cim/effects/EffectRadial.js";import"../../../symbols/cim/effects/EffectReverse.js";import"../../../symbols/cim/effects/EffectRotate.js";import"../../../symbols/cim/effects/EffectScale.js";import"../../../symbols/cim/effects/EffectSuppress.js";import"../../../symbols/cim/effects/EffectTaperedPolygon.js";import"../../../symbols/cim/effects/EffectWave.js";import"../../../symbols/cim/placements/PlacementAlongLineSameSize.js";import"../../../symbols/cim/placements/PlacementAtExtremities.js";import"../../../symbols/cim/placements/PlacementAtRatioPositions.js";import"../../../symbols/cim/placements/PlacementInsidePolygon.js";import"../../../symbols/cim/placements/PlacementOnLine.js";import"../../../symbols/cim/placements/PlacementOnVertices.js";import"../../../symbols/cim/placements/PlacementPolygonCenter.js";import"../../../symbols/cim/constants.js";import"../../../core/libs/gl-matrix-2/factories/vec2f32.js";import"../engine/webgl/alignmentUtils.js";import"../../../symbols/support/defaults.js";import"../../../symbols/cim/OverrideHelper.js";import"../../../layers/effects/EffectView.js";import"../../../core/Evented.js";import"../engine/transitions/FadeTransition.js";import"../engine/webgl/enums.js";import"../../../core/libs/gl-matrix-2/factories/vec4f32.js";import"../../webgl/enums.js";import"../engine/webgl/shaders/BackgroundPrograms.js";import"../../webgl/checkWebGLError.js";import"../engine/webgl/DefaultVertexAttributeLayouts.js";import"../engine/webgl/AFeatureTile.js";import"../engine/webgl/DisplayEntity.js";import"../engine/webgl/shaderGraph/techniques/featureTechniqueUtils.js";import"../engine/webgl/cpuMapped/MappedMesh.js";import"../engine/webgl/number.js";import"../engine/webgl/shaders/TileInfoPrograms.js";import"../../webgl/Texture.js";import"../../webgl/FBOAttachmentType.js";import"../engine/vectorTiles/style/StyleDefinition.js";import"../engine/vectorTiles/enums.js";import"../engine/webgl/shaders/BitBlitPrograms.js";import"../../../request.js";import"../../../core/urlUtils.js";import"../../../core/pbf.js";import"../engine/webgl/shaders/StencilPrograms.js";import"../engine/webgl/shaderGraph/techniques/TechniqueType.js";import"../engine/webgl/shaderGraph/techniques/shaders/BlendShader.js";import"../engine/webgl/shaderGraph/techniques/shaders/OpacityShader.js";import"../engine/webgl/shaders/HighlightPrograms.js";import"../../webgl/FramebufferObject.js";import"../engine/webgl/meshing/SimpleMesh.js";import"../engine/webgl/PooledUint32Array.js";import"../engine/webgl/Profiler.js";import"../engine/webgl/shaderGraph/techniques/TechniqueRegistry.js";import"../../../Color.js";import"../engine/webgl/shaderGraph/techniques/animated/attributes.js";import"../engine/webgl/shaderGraph/techniques/shaders/constants.js";import"../engine/webgl/mesh/templates/templateUtils.js";import"../engine/webgl/shaderGraph/techniques/line/LineMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/dotDensity/DotDensityMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/ComplexFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/ComplexOutlineFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/FillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/GradientFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/OutlineFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/PatternFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/PatternOutlineFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/heatmap/HeatmapMeshWriter.js";import"../../../geometry/support/aaBoundingBox.js";import"../engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/line/GradientStrokeMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/line/TexturedLineMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/markers/MarkerMeshWriter.js";import"../../../arcade/ArcadeDate.js";import"../../../intl/locale.js";import"luxon";import"../../../core/sql/UnknownTimeZone.js";import"../../../layers/support/fieldUtils.js";import"../../../time/constants.js";import"../engine/webgl/shaderGraph/techniques/pieChart/PieChartMeshWriter.js";import"../../webgl/renderState.js";import"../../3d/webgl-engine/core/shaderModules/glsl.js";import"../../webgl/testSVGPremultipliedAlpha.js";import"../LabelManager.js";import n from"./graphics/GraphicsView2D.js";import"../../../core/accessorSupport/watch.js";import"../../../core/accessorSupport/tracking/SimpleTrackingTarget.js";import"../../../chunks/earcut.js";import"../../../core/libs/gl-matrix-2/factories/vec3f32.js";import"../../../geometry/support/normalizeUtilsCommon.js";import"../../../geometry/SpatialReference.js";import"../../../geometry/support/Ellipsoid.js";import"../../../kernel.js";import"./support/util.js";import"../navigation/MapViewNavigation.js";import"../../../core/asyncUtils.js";import"../../../core/support/UpdatingHandles.js";import"../engine/webgl/shaderGraph/techniques/shaders/MagnifierShader.js";import"../../../core/unitUtils.js";import"../../../geometry/ellipsoidUtils.js";import"../../../chunks/pe.js";import"../../../geometry/projection/projectors.js";import"../engine/webgl/shaderGraph/techniques/shaders/GridShader.js";import"../../../geometry/support/geodesicConstants.js";import{BitmapTileLayerView2D as p}from"./BitmapTileLayerView2D.js";import{LayerView2DMixin as m}from"./LayerView2D.js";import c from"./graphics/HighlightGraphicContainer.js";import{createBlankImage as g,resampleImage as f}from"./support/imageUtils.js";import u from"../tiling/TileInfoView.js";import d from"../tiling/TileKey.js";import j from"../tiling/TileQueue.js";import y from"../tiling/TileStrategy.js";import w from"../../layers/LayerView.js";import b from"../../layers/RefreshableLayerView.js";import{getHighlightGraphics as _}from"../../layers/support/highlightUtils.js";import{isMapServiceLayerView as T,MapServiceLayerViewHelper as G}from"../../layers/support/MapServiceLayerViewHelper.js";import{createQueryGeometry as q}from"../../support/drapedUtils.js";import{defaultHighlightName as V}from"../../support/HighlightDefaults.js";import{TaskPriority as v}from"../../support/Scheduler.js";const I=[0,0];let P=class extends(b(p(m(w)))){constructor(){super(...arguments),this._fetchQueue=null,this._highlightGraphics=new a,this._highlightView=null,this._popupHighlightHelper=null,this._tileStrategy=null,this.layer=null}get resampling(){return!("resampling"in this.layer)||!1!==this.layer.resampling}get tilemapCache(){return"tilemapCache"in this.layer?this.layer.tilemapCache:null}update(e){this._fetchQueue.pause(),this._fetchQueue.state=e.state,this._tileStrategy.update(e),this._fetchQueue.resume(),this._highlightView?.processUpdate(e)}attach(){const e="tileServers"in this.layer?this.layer.tileServers:null,i=this.tilemapCache;if(this._tileInfoView=new u(this.layer.tileInfo,this.layer.fullExtent,i?.effectiveMinLOD,i?.effectiveMaxLOD),this._fetchQueue=new j({tileInfoView:this._tileInfoView,concurrency:e&&10*e.length||10,process:(e,i)=>this.fetchTile(e,i),scheduler:this.scheduler,priority:v.MAPVIEW_FETCH_QUEUE}),this._tileStrategy=new y({cachePolicy:"keep",resampling:this.resampling,acquireTile:e=>this.acquireTile(e),releaseTile:e=>this.releaseTile(e),tileInfoView:this._tileInfoView}),T(this,this.layer)){const e=this._highlightView=new n({view:this.view,graphics:this._highlightGraphics,requestUpdateCallback:()=>this.requestUpdate(),container:new c(this.view.featuresTilingScheme),defaultPointSymbolEnabled:!1});this.container.addChild(this._highlightView.container),this._popupHighlightHelper=new G({createFetchPopupFeaturesQueryGeometry:(e,i)=>q(e,i,this.view),highlightGraphics:this._highlightGraphics,highlightGraphicUpdated:({graphic:i,property:t})=>e.graphicUpdateHandler({graphic:i,property:t}),layerView:this,updatingHandles:this._updatingHandles})}this.requestUpdate(),this.addAttachHandles(this._updatingHandles.add((()=>this.resampling),(()=>{this.doRefresh()}))),super.attach()}detach(){super.detach(),this._tileStrategy.destroy(),this._fetchQueue.clear(),this.container.removeAllChildren(),this._popupHighlightHelper?.destroy(),this._highlightView?.destroy(),this._fetchQueue=this._tileStrategy=this._tileInfoView=this._popupHighlightHelper=null}async fetchPopupFeaturesAtLocation(e,i){return this._popupHighlightHelper?this._popupHighlightHelper.fetchPopupFeaturesAtLocation(e,i):[]}highlight(e,t){const s=_(e);if(0===s.length)return i();const r=t?.name??V;return this._addHighlightGraphics(s,r),i((()=>!this.destroyed&&this._removeHighlightGraphics(s,r)))}_processHighlight(){const e=this._getHighlights();this._highlightView?.setHighlight(e)}_addHighlightGraphics(e,i){this._highlightGraphics.addMany(e),this._addHighlights(e.map((e=>e.uid)),i)}_removeHighlightGraphics(e,i){this._highlightGraphics.removeMany(e),this._removeHighlights(e.map((e=>e.uid)),i)}viewChange(){this.requestUpdate()}moveEnd(){this.requestUpdate()}supportsSpatialReference(e){return h(this.layer.tileInfo?.spatialReference,e)}async doRefresh(){if(this.attached){if(this.suspended)return this._tileStrategy.clear(),void this.requestUpdate();this._fetchQueue.reset(),this._tileStrategy.refresh((e=>this._updatingHandles.addPromise(this._enqueueTileFetch(e))))}}acquireTile(e){const i=this._bitmapView.createTile(e),t=i.bitmap;return[t.x,t.y]=this._tileInfoView.getTileCoords(I,i.key),t.resolution=this._tileInfoView.getTileResolution(i.key),[t.width,t.height]=this._tileInfoView.tileInfo.size,this._updatingHandles.addPromise(this._enqueueTileFetch(i)),this._bitmapView.addChild(i),this.requestUpdate(),i}releaseTile(e){this._fetchQueue.abort(e.key.id),this._bitmapView.removeChild(e),e.once("detach",(()=>e.destroy())),this.requestUpdate()}async fetchTile(e,i={}){return this.tilemapCache?this._fetchTileWithTilemapCache(e,i):this._fetchTileWithoutTilemapCache(e,i)}async _fetchTileWithoutTilemapCache(e,i={}){const{signal:t,resamplingLevel:r=0}=i;try{return await this._fetchImage(e,t)}catch(o){if(s(o))throw o;if(!this.resampling)return g(this._tileInfoView.tileInfo.size);if(r<3){const t=this._tileInfoView.getTileParentId(e.id);if(t){const s=new d(t),o=await this._fetchTileWithoutTilemapCache(s,{...i,resamplingLevel:r+1});return f(this._tileInfoView,o,s,e)}}return g(this._tileInfoView.tileInfo.size)}}async _fetchTileWithTilemapCache(e,i={}){const t=this.tilemapCache,{signal:o,resamplingLevel:l=0}=i,h=new d(0,0,0,0);let a,n=null;try{if(n=await t.fetchAvailabilityUpsample(e.level,e.row,e.col,h,{signal:o}),!this.resampling&&h.level!==e.level)return await r(i),g(this._tileInfoView.tileInfo.size);a=await this._fetchImage(h,o)}catch(p){if(s(p))throw p;if(this.resampling&&"unknown"===n&&l<3){const t=this._tileInfoView.getTileParentId(e.id);if(t){h.set(t);try{a=await this._fetchTileWithTilemapCache(h,{...i,resamplingLevel:l+1})}catch{}}}}return a?this.resampling?f(this._tileInfoView,a,h,e):a:g(this._tileInfoView.tileInfo.size)}async _enqueueTileFetch(e){if(!this._fetchQueue.has(e.key.id)){try{const i=await this._fetchQueue.push(e.key);e.bitmap.source=i,e.bitmap.width=this._tileInfoView.tileInfo.size[0],e.bitmap.height=this._tileInfoView.tileInfo.size[1],e.once("attach",(()=>this.requestUpdate()))}catch(i){s(i)||t.getLogger(this).error(i)}this.requestUpdate()}}async _fetchImage(e,i){return this.layer.fetchImageBitmapTile(e.level,e.row,e.col,{signal:i})}};e([o()],P.prototype,"resampling",null),e([o()],P.prototype,"tilemapCache",null),P=e([l("esri.views.2d.layers.TileLayerView2D")],P);const C=P;export{C as default};
|
|
@@ -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{CIMSymbolHelper as e}from"../../../../../../../symbols/cim/CIMSymbolHelper.js";import{defaultCIMValues as a}from"../../../../../../../symbols/cim/defaultCIMValues.js";import{Alignment as i}from"../../../../../../../symbols/cim/enums.js";import{Techniques as l}from"../../../../../engine/webgl/shaderGraph/techniques/TechniqueRegistry.js";import{getMaxSizeVVSize as t,noVisualVariables as o}from"../VisualVariablesSchema.js";import{hasSizeVVUniform as r}from"./utils.js";function n(e){return e.minScale||e.maxScale?{minScale:e.minScale??0,maxScale:e.maxScale??0}:null}function s(e){if(null==e)return null;if(Array.isArray(e)){const[a,i,l,t]=e;return[a,i,l,255*t]}return"string"==typeof e?e:{...e,defaultValue:s(e?.defaultValue)}}async function c(a,i){const{cimResourceManager:l,cimAnalyzer:t,scaleExpression:o}=i.schemaOptions;await Promise.all(e.fetchResources(a.symbol,l,[]));const r=t.analyzeSymbolReference(a,!1),s={scaleInfo:n(a),scaleExpression:o},c=[];for(const e of r)switch(e.type){case"marker":c.push(...u(e,i,s));break;case"fill":c.push(...z(e,i,s));break;case"outlineFill":c.push(...S(e,i,s));break;case"gradientFill":c.push(...d(e,i,s));break;case"line":c.push(...y(e,i,s));break;case"gradientStroke":c.push(...R(e,i,s));break;case"text":c.push(...k(e,i,s))}return c}function u(e,a,i){const{uniforms:t,schemaOptions:r}=a,{store:n}=r,s=e.isOutline?{...o,visualVariableSizeScaleStops:t.visualVariableSizeOutlineScaleStops}:{visualVariableColor:t.visualVariableColor,visualVariableOpacity:t.visualVariableOpacity,visualVariableSizeMinMaxValue:t.visualVariableSizeMinMaxValue,visualVariableSizeScaleStops:t.visualVariableSizeScaleStops,visualVariableSizeStops:t.visualVariableSizeStops,visualVariableSizeUnitValue:t.visualVariableSizeUnitValue,visualVariableRotation:t.visualVariableRotation};if(e.animationParams){return f(n.ensureInstance(l.animatedMarker,{uniforms:s,optionalAttributes:{zoomRange:!0}}),e,o,i)}return p(n.ensureInstance(l.marker,{uniforms:s,optionalAttributes:{zoomRange:!!i.scaleInfo}}),e,t,i)}function f(e,a,l,t){if(!a.animationParams)return[];return[e.createMeshInfo({pixelDimensions:a.pixelDimensions,texelDimensions:a.texelDimensions,effects:a.effects?{type:"cim-effect-infos",effectInfos:a.effects}:null,sprite:a.spriteRasterizationParam,animations:a.animationParams,scaleInfo:t.scaleInfo,scaleSymbolsProportionally:a.scaleSymbolsProportionally,strokeWidth:a.outlineWidth,isMapAligned:a.alignment===i.MAP,colorLocked:a.colorLocked,isStroke:a.isStroke,baseSize:a.baseSize,referenceSize:a.referenceSize,angleToLine:!!a.markerPlacement&&(a.markerPlacement.placement&&"angleToLine"in a.markerPlacement.placement&&a.markerPlacement.placement.angleToLine),sizeRatio:a.sizeRatio})]}function p(e,i,l,{scaleInfo:o,scaleExpression:n}){const c=r(l);return[e.createMeshInfo({size:i.size,scaleX:i.scaleX,anchorX:i.anchorPoint.x,anchorY:i.anchorPoint.y,angle:i.rotation,color:s(i.color)??[0,0,0,0],colorLocked:i.colorLocked,frameHeight:i.frameHeight,widthRatio:i.widthRatio,scaleInfo:o,offsetX:i.offsetX,offsetY:i.offsetY,outlineColor:s(i.outlineColor)??[0,0,0,0],outlineSize:i.outlineWidth,referenceSize:i.referenceSize||a.CIMVectorMarker.size,rotateClockwise:i.rotateClockwise,scaleFactor:n??1,sizeRatio:i.sizeRatio,alignment:i.alignment,isAbsoluteAnchorPoint:i.isAbsoluteAnchorPoint,scaleSymbolsProportionally:i.scaleSymbolsProportionally,sprite:i.spriteRasterizationParam,hasSizeVV:c,placement:i.markerPlacement,effects:i.effects?{type:"cim-effect-infos",effectInfos:i.effects}:null,transforms:i.transform,minPixelBuffer:t(l)})]}function m(e,a,i){const{uniforms:t,schemaOptions:o}=a,{store:r}=o;return V(r.ensureInstance(l.fill,{uniforms:{visualVariableColor:e.colorLocked?null:t.visualVariableColor,visualVariableOpacity:t.visualVariableOpacity},optionalAttributes:{zoomRange:!!i.scaleInfo}}),e,i)}function S(e,a,i){const{uniforms:t,schemaOptions:o}=a,{store:r}=o;return b(r.ensureInstance(l.outlineFill,{uniforms:{visualVariableColor:e.colorLocked?null:t.visualVariableColor,visualVariableOpacity:t.visualVariableOpacity,visualVariableSizeMinMaxValue:null,visualVariableSizeScaleStops:null,visualVariableSizeStops:null,visualVariableSizeUnitValue:null},optionalAttributes:{zoomRange:!!i.scaleInfo}}),e,i)}function b(e,a,i){const l=s(a.color)??[0,0,0,0],t=s(a.outlineColor)??[0,0,0,0];return[e.createMeshInfo({color:l,outlineColor:t,width:a.outlineWidth,referenceWidth:a.referenceWidth,capType:a.cap,joinType:a.join,miterLimit:a.miterLimit,outlineUsesColorVV:!a.outlineColorLocked,hasSizeVV:!1,scaleInfo:i.scaleInfo,effects:a.effects?{type:"cim-effect-infos",effectInfos:a.effects}:null,outlineEffects:a.outlineEffects?{type:"cim-effect-infos",effectInfos:a.outlineEffects}:null})]}function V(e,a,{scaleInfo:i}){return[e.createMeshInfo({color:s(a.color)??[0,0,0,0],scaleInfo:i,effects:a.effects?{type:"cim-effect-infos",effectInfos:a.effects}:null})]}function z(e,a,i){if(!e.spriteRasterizationParam)return m(e,a,i);const{uniforms:t,schemaOptions:o}=a,{store:r}=o;return h(r.ensureInstance(l.complexFill,{uniforms:{visualVariableColor:e.colorLocked?null:t.visualVariableColor,visualVariableOpacity:t.visualVariableOpacity},optionalAttributes:{zoomRange:!!i.scaleInfo}}),e,null!=t.visualVariableColor,i)}function h(e,a,i,{scaleInfo:l}){if(!a.spriteRasterizationParam)throw new Error("InternalError: Sprite should always be defined");const t=!!a.hasUnresolvedReplacementColor&&(!i||a.colorLocked),o=a.sampleAlphaOnly&&!t,r=a.spriteRasterizationParam;return[e.createMeshInfo({color:s(a.color)??[0,0,0,0],height:a.height,aspectRatio:a.scaleX,offsetX:a.offsetX,offsetY:a.offsetY,scaleX:1,scaleY:1,angle:a.angle,applyRandomOffset:a.applyRandomOffset,sampleAlphaOnly:o,scaleProportionally:"CIMHatchFill"===r.resource.type,sprite:r,scaleInfo:l,effects:a.effects?{type:"cim-effect-infos",effectInfos:a.effects}:null})]}function d(e,a,i){const{uniforms:t,schemaOptions:o}=a,{store:r}=o;return v(r.ensureInstance(l.gradientFill,{uniforms:{visualVariableColor:null,visualVariableOpacity:t.visualVariableOpacity},optionalAttributes:{zoomRange:!!i.scaleInfo}}),e,i)}function v(e,a,{scaleInfo:i}){if(!a.spriteRasterizationParam)throw new Error("InternalError: Sprite should always be defined");const l=a.spriteRasterizationParam;return[e.createMeshInfo({color:s(a.color)??[0,0,0,0],angle:a.angle,gradientMethod:a.gradientMethod,gradientSize:a.gradientSize,gradientSizeUnits:a.gradientSizeUnits,gradientType:a.gradientType,sprite:l,scaleInfo:i,effects:a.effects?{type:"cim-effect-infos",effectInfos:a.effects}:null})]}function y(e,a,i){const{uniforms:t,schemaOptions:r}=a,{store:n}=r,s=e.isOutline?{...o,visualVariableSizeScaleStops:t.visualVariableSizeOutlineScaleStops}:{visualVariableColor:e.colorLocked?null:t.visualVariableColor,visualVariableOpacity:t.visualVariableOpacity,visualVariableSizeMinMaxValue:t.visualVariableSizeMinMaxValue,visualVariableSizeScaleStops:t.visualVariableSizeScaleStops,visualVariableSizeStops:t.visualVariableSizeStops,visualVariableSizeUnitValue:t.visualVariableSizeUnitValue},c={uniforms:s,optionalAttributes:{zoomRange:!!i.scaleInfo}},u=!!(s.visualVariableSizeMinMaxValue||s.visualVariableSizeScaleStops||s.visualVariableSizeStops||s.visualVariableSizeUnitValue);if(!e.spriteRasterizationParam){return g(n.ensureInstance(l.line,c),e,u,i)}return M(n.ensureInstance(l.texturedLine,c),e,u,i)}function I(e,a,{scaleInfo:i}){return{color:s(e.color)??[0,0,0,0],width:e.width,referenceWidth:e.referenceWidth,capType:e.cap,joinType:e.join,miterLimit:e.miterLimit,scaleInfo:i,hasSizeVV:a,effects:e.effects?{type:"cim-effect-infos",effectInfos:e.effects}:null}}function g(e,a,i,l){if(a.spriteRasterizationParam)throw new Error("InternalError: Sprite should not be defined");const t=I(a,i,l);return[e.createMeshInfo(t)]}function M(e,a,i,l){const{spriteRasterizationParam:t,scaleDash:o,sampleAlphaOnly:r}=a;if(!t)throw new Error("InternalError: Sprite should be defined");return[e.createMeshInfo({...I(a,i,l),offsetAlongLine:a.offsetAlongLine??0,shouldScaleDash:o??!1,shouldSampleAlphaOnly:r,isSDF:"CIMPictureStroke"!==t.resource.type&&"CIMGradientStroke"!==t.resource.type,sprite:t})]}function R(e,a,i){const{uniforms:t,schemaOptions:r}=a,{store:n}=r;return C(n.ensureInstance(l.gradientStroke,{uniforms:e.isOutline?{...o,visualVariableSizeScaleStops:t.visualVariableSizeOutlineScaleStops}:{visualVariableColor:null,visualVariableOpacity:t.visualVariableOpacity,visualVariableSizeMinMaxValue:t.visualVariableSizeMinMaxValue,visualVariableSizeScaleStops:t.visualVariableSizeScaleStops,visualVariableSizeStops:t.visualVariableSizeStops,visualVariableSizeUnitValue:t.visualVariableSizeUnitValue},optionalAttributes:{zoomRange:!!i.scaleInfo}}),e,i)}function C(e,a,i){if(!a.spriteRasterizationParam)throw new Error("InternalError: Sprite should always be defined");const l=a.spriteRasterizationParam;return[e.createMeshInfo({...I(a,!1,i),gradientMethod:a.gradientMethod,gradientSize:a.gradientSize,gradientSizeUnits:a.gradientSizeUnits,gradientType:a.gradientType,sprite:l,effects:a.effects?{type:"cim-effect-infos",effectInfos:a.effects}:null})]}function k(e,a,i){const{uniforms:t,schemaOptions:o}=a,{store:r}=o;return O(r.ensureInstance(l.text,{uniforms:{visualVariableColor:e.colorLocked?null:t.visualVariableColor,visualVariableOpacity:t.visualVariableOpacity,visualVariableRotation:t.visualVariableRotation,visualVariableSizeMinMaxValue:t.visualVariableSizeMinMaxValue,visualVariableSizeScaleStops:t.visualVariableSizeScaleStops,visualVariableSizeStops:t.visualVariableSizeStops,visualVariableSizeUnitValue:t.visualVariableSizeUnitValue},optionalAttributes:{zoomRange:!!i.scaleInfo,referenceSymbol:!1,clipAngle:!1,visibility:!1}}),e,t,i)}function O(e,a,i,{scaleInfo:l,scaleExpression:o}){return[e.createMeshInfo({boxBackgroundColor:s(a.backgroundColor),boxBorderLineColor:s(a.borderLineColor),boxBorderLineSize:a.borderLineWidth??0,color:s(a.color)??[0,0,0,0],offsetX:a.offsetX,offsetY:a.offsetY,postAngle:a.angle,fontSize:a.size,referenceSize:a.referenceSize,decoration:a.decoration,haloColor:s(a.haloColor)??[0,0,0,0],haloSize:a.haloSize??0,outlineColor:s(a.outlineColor)??[0,0,0,0],outlineSize:a.outlineSize,lineWidth:a.lineWidth||512,lineHeightRatio:1,horizontalAlignment:a.horizontalAlignment??"center",verticalAlignment:a.verticalAlignment??"baseline",useCIMAngleBehavior:!1,glyphs:a.textRasterizationParam,scaleInfo:l,effects:a.effects?{type:"cim-effect-infos",effectInfos:a.effects}:null,placement:a.markerPlacement,transforms:a.transform,scaleFactor:o??1,minPixelBuffer:t(i),repeatLabel:null,repeatLabelDistance:null,allowOverrun:null,labelPosition:null,labelClassId:-1})]}export{f as createAnimatedMarkerMeshInfos,h as createComplexFillMeshInfos,p as createComplexMarkerMeshInfos,V as createComplexSimpleFillMeshInfos,g as createComplexSimpleLineMeshInfos,b as createComplexSimpleOutlineFillMeshInfos,c as createComplexSymbolInstances,O as createComplexTextMeshInfos,M as createComplexTexturedLineMeshInfos,v as createGradientFillMeshInfos,C as createGradientStrokeMeshInfos,n as getScaleInfo};
|
|
5
|
+
import{CIMSymbolHelper as e}from"../../../../../../../symbols/cim/CIMSymbolHelper.js";import{defaultCIMValues as a}from"../../../../../../../symbols/cim/defaultCIMValues.js";import{Alignment as i}from"../../../../../../../symbols/cim/enums.js";import{Techniques as l}from"../../../../../engine/webgl/shaderGraph/techniques/TechniqueRegistry.js";import{getMaxSizeVVSize as t,noVisualVariables as n}from"../VisualVariablesSchema.js";import{getAnimatedTechniqueSprite as o,hasSizeVVUniform as r}from"./utils.js";function s(e){return e.minScale||e.maxScale?{minScale:e.minScale??0,maxScale:e.maxScale??0}:null}function c(e){if(null==e)return null;if(Array.isArray(e)){const[a,i,l,t]=e;return[a,i,l,255*t]}return"string"==typeof e?e:{...e,defaultValue:c(e?.defaultValue)}}async function u(a,i){const{cimResourceManager:l,cimAnalyzer:t,scaleExpression:n}=i.schemaOptions;await Promise.all(e.fetchResources(a.symbol,l,[]));const o=t.analyzeSymbolReference(a,!1),r={scaleInfo:s(a),scaleExpression:n},c=[];for(const e of o)switch(e.type){case"marker":c.push(...f(e,i,r));break;case"fill":c.push(...v(e,i,r));break;case"outlineFill":c.push(...V(e,i,r));break;case"gradientFill":c.push(...y(e,i,r));break;case"line":c.push(...I(e,i,r));break;case"gradientStroke":c.push(...k(e,i,r));break;case"text":c.push(...A(e,i,r))}return c}function f(e,a,i){const{uniforms:t,schemaOptions:o}=a,{store:r}=o,s=e.isOutline?{...n,visualVariableSizeScaleStops:t.visualVariableSizeOutlineScaleStops}:{visualVariableColor:t.visualVariableColor,visualVariableOpacity:t.visualVariableOpacity,visualVariableSizeMinMaxValue:t.visualVariableSizeMinMaxValue,visualVariableSizeScaleStops:t.visualVariableSizeScaleStops,visualVariableSizeStops:t.visualVariableSizeStops,visualVariableSizeUnitValue:t.visualVariableSizeUnitValue,visualVariableRotation:t.visualVariableRotation};if(e.animationParams){const{hasShiftAnimation:a}=e.animationParams.params,t=a?l.animatedMarkerShift:l.animatedMarker;return m(r.ensureInstance(t,{uniforms:s,optionalAttributes:{zoomRange:!0,value1Position2Value2:e.animationParams.params.hasShiftAnimation,lineLength:a}}),e,n,i)}return S(r.ensureInstance(l.marker,{uniforms:s,optionalAttributes:{zoomRange:!!i.scaleInfo}}),e,t,i)}function m(e,a,l,t){if(!a.animationParams)return[];return[e.createMeshInfo({pixelDimensions:a.pixelDimensions,texelDimensions:a.texelDimensions,effects:a.effects?{type:"cim-effect-infos",effectInfos:a.effects}:null,sprite:o(a),animations:a.animationParams,scaleInfo:t.scaleInfo,scaleSymbolsProportionally:a.scaleSymbolsProportionally,strokeWidth:a.outlineWidth,isMapAligned:a.alignment===i.MAP,colorLocked:a.colorLocked,isStroke:a.isStroke,baseSize:a.baseSize,placement:a.markerPlacement,referenceSize:a.referenceSize,angleToLine:!!a.markerPlacement&&(a.markerPlacement.placement&&"angleToLine"in a.markerPlacement.placement&&a.markerPlacement.placement.angleToLine),sizeRatio:a.sizeRatio,patternHeight:null})]}function p(e,a,i,l){if(!a.animationParams)return[];return[e.createMeshInfo({effects:a.effects?{type:"cim-effect-infos",effectInfos:a.effects}:null,sprite:o(a),animations:a.animationParams,scaleInfo:l.scaleInfo,scaleSymbolsProportionally:!1,strokeWidth:1,isMapAligned:!0,colorLocked:a.colorLocked||!1,isStroke:!1,baseSize:"width"in a?a.width:-1,placement:null,referenceSize:2,angleToLine:!1,sizeRatio:1,patternHeight:"fill"===a.type&&a.spriteRasterizationParam?a.height:null,joinType:"join"in a?a.join:"round",capType:"cap"in a?a.cap:"round",miterLimit:"miterLimit"in a&&a.miterLimit||2})]}function S(e,i,l,{scaleInfo:n,scaleExpression:o}){const s=r(l);return[e.createMeshInfo({size:i.size,scaleX:i.scaleX,anchorX:i.anchorPoint.x,anchorY:i.anchorPoint.y,angle:i.rotation,color:c(i.color)??[0,0,0,0],colorLocked:i.colorLocked,frameHeight:i.frameHeight,widthRatio:i.widthRatio,scaleInfo:n,offsetX:i.offsetX,offsetY:i.offsetY,outlineColor:c(i.outlineColor)??[0,0,0,0],outlineSize:i.outlineWidth,referenceSize:i.referenceSize||a.CIMVectorMarker.size,rotateClockwise:i.rotateClockwise,scaleFactor:o??1,sizeRatio:i.sizeRatio,alignment:i.alignment,isAbsoluteAnchorPoint:i.isAbsoluteAnchorPoint,scaleSymbolsProportionally:i.scaleSymbolsProportionally,sprite:i.spriteRasterizationParam,hasSizeVV:s,placement:i.markerPlacement,effects:i.effects?{type:"cim-effect-infos",effectInfos:i.effects}:null,transforms:i.transform,minPixelBuffer:t(l)})]}function b(e,a,i){const{uniforms:t,schemaOptions:o}=a,{store:r}=o,s={visualVariableColor:e.colorLocked?null:t.visualVariableColor,visualVariableOpacity:t.visualVariableOpacity};if(e.animationParams){const a=l.animatedFill;return p(r.ensureInstance(a,{uniforms:{...s,visualVariableSizeMinMaxValue:null,visualVariableSizeStops:null,visualVariableSizeUnitValue:null,visualVariableSizeScaleStops:null,visualVariableRotation:null},optionalAttributes:{zoomRange:!0,value1Position2Value2:!1,lineLength:!1}}),e,n,i)}return h(r.ensureInstance(l.fill,{uniforms:s,optionalAttributes:{zoomRange:!!i.scaleInfo}}),e,i)}function V(e,a,i){const{uniforms:t,schemaOptions:n}=a,{store:o}=n;return z(o.ensureInstance(l.outlineFill,{uniforms:{visualVariableColor:e.colorLocked?null:t.visualVariableColor,visualVariableOpacity:t.visualVariableOpacity,visualVariableSizeMinMaxValue:null,visualVariableSizeScaleStops:null,visualVariableSizeStops:null,visualVariableSizeUnitValue:null},optionalAttributes:{zoomRange:!!i.scaleInfo}}),e,i)}function z(e,a,i){const l=c(a.color)??[0,0,0,0],t=c(a.outlineColor)??[0,0,0,0];return[e.createMeshInfo({color:l,outlineColor:t,width:a.outlineWidth,referenceWidth:a.referenceWidth,capType:a.cap,joinType:a.join,miterLimit:a.miterLimit,outlineUsesColorVV:!a.outlineColorLocked,hasSizeVV:!1,scaleInfo:i.scaleInfo,effects:a.effects?{type:"cim-effect-infos",effectInfos:a.effects}:null,outlineEffects:a.outlineEffects?{type:"cim-effect-infos",effectInfos:a.outlineEffects}:null})]}function h(e,a,{scaleInfo:i}){return[e.createMeshInfo({color:c(a.color)??[0,0,0,0],scaleInfo:i,effects:a.effects?{type:"cim-effect-infos",effectInfos:a.effects}:null})]}function v(e,a,i){if(!e.spriteRasterizationParam)return b(e,a,i);const{uniforms:t,schemaOptions:o}=a,{store:r}=o,s={visualVariableColor:e.colorLocked?null:t.visualVariableColor,visualVariableOpacity:t.visualVariableOpacity};if(e.animationParams){const a=l.animatedFill;return p(r.ensureInstance(a,{uniforms:{...s,visualVariableSizeMinMaxValue:null,visualVariableSizeStops:null,visualVariableSizeUnitValue:null,visualVariableSizeScaleStops:null,visualVariableRotation:null},optionalAttributes:{zoomRange:!0,value1Position2Value2:!1,lineLength:!1}}),e,n,i)}return d(r.ensureInstance(l.complexFill,{uniforms:s,optionalAttributes:{zoomRange:!!i.scaleInfo}}),e,null!=t.visualVariableColor,i)}function d(e,a,i,{scaleInfo:l}){if(!a.spriteRasterizationParam)throw new Error("InternalError: Sprite should always be defined");const t=!!a.hasUnresolvedReplacementColor&&(!i||a.colorLocked),n=a.sampleAlphaOnly&&!t,o=a.spriteRasterizationParam;return[e.createMeshInfo({color:c(a.color)??[0,0,0,0],height:a.height,aspectRatio:a.scaleX,offsetX:a.offsetX,offsetY:a.offsetY,scaleX:1,scaleY:1,angle:a.angle,applyRandomOffset:a.applyRandomOffset,sampleAlphaOnly:n,scaleProportionally:"CIMHatchFill"===o.resource.type,sprite:o,scaleInfo:l,effects:a.effects?{type:"cim-effect-infos",effectInfos:a.effects}:null})]}function y(e,a,i){const{uniforms:t,schemaOptions:n}=a,{store:o}=n;return g(o.ensureInstance(l.gradientFill,{uniforms:{visualVariableColor:null,visualVariableOpacity:t.visualVariableOpacity},optionalAttributes:{zoomRange:!!i.scaleInfo}}),e,i)}function g(e,a,{scaleInfo:i}){if(!a.spriteRasterizationParam)throw new Error("InternalError: Sprite should always be defined");const l=a.spriteRasterizationParam;return[e.createMeshInfo({color:c(a.color)??[0,0,0,0],angle:a.angle,gradientMethod:a.gradientMethod,gradientSize:a.gradientSize,gradientSizeUnits:a.gradientSizeUnits,gradientType:a.gradientType,sprite:l,scaleInfo:i,effects:a.effects?{type:"cim-effect-infos",effectInfos:a.effects}:null})]}function I(e,a,i){const{uniforms:t,schemaOptions:o}=a,{store:r}=o,s=e.isOutline?{...n,visualVariableSizeScaleStops:t.visualVariableSizeOutlineScaleStops}:{visualVariableColor:e.colorLocked?null:t.visualVariableColor,visualVariableOpacity:t.visualVariableOpacity,visualVariableSizeMinMaxValue:t.visualVariableSizeMinMaxValue,visualVariableSizeScaleStops:t.visualVariableSizeScaleStops,visualVariableSizeStops:t.visualVariableSizeStops,visualVariableSizeUnitValue:t.visualVariableSizeUnitValue};if(e.animationParams){const{hasShiftAnimation:a}=e.animationParams.params,t=l.animatedLine;return p(r.ensureInstance(t,{uniforms:{...s,visualVariableRotation:null},optionalAttributes:{zoomRange:!0,value1Position2Value2:!1,accumulatedDistance:!0,segmentDirection:!0,normal:!0,lineLength:a}}),e,n,i)}const c={uniforms:s,optionalAttributes:{zoomRange:!!i.scaleInfo}},u=!!(s.visualVariableSizeMinMaxValue||s.visualVariableSizeScaleStops||s.visualVariableSizeStops||s.visualVariableSizeUnitValue);if(!e.spriteRasterizationParam){return P(r.ensureInstance(l.line,c),e,u,i)}return R(r.ensureInstance(l.texturedLine,c),e,u,i)}function M(e,a,{scaleInfo:i}){return{color:c(e.color)??[0,0,0,0],width:e.width,referenceWidth:e.referenceWidth,capType:e.cap,joinType:e.join,miterLimit:e.miterLimit,scaleInfo:i,hasSizeVV:a,effects:e.effects?{type:"cim-effect-infos",effectInfos:e.effects}:null}}function P(e,a,i,l){if(a.spriteRasterizationParam)throw new Error("InternalError: Sprite should not be defined");const t=M(a,i,l);return[e.createMeshInfo(t)]}function R(e,a,i,l){const{spriteRasterizationParam:t,scaleDash:n,sampleAlphaOnly:o}=a;if(!t)throw new Error("InternalError: Sprite should be defined");return[e.createMeshInfo({...M(a,i,l),offsetAlongLine:a.offsetAlongLine??0,shouldScaleDash:n??!1,shouldSampleAlphaOnly:o,isSDF:"CIMPictureStroke"!==t.resource.type&&"CIMGradientStroke"!==t.resource.type,sprite:t})]}function k(e,a,i){const{uniforms:t,schemaOptions:o}=a,{store:r}=o;return C(r.ensureInstance(l.gradientStroke,{uniforms:e.isOutline?{...n,visualVariableSizeScaleStops:t.visualVariableSizeOutlineScaleStops}:{visualVariableColor:null,visualVariableOpacity:t.visualVariableOpacity,visualVariableSizeMinMaxValue:t.visualVariableSizeMinMaxValue,visualVariableSizeScaleStops:t.visualVariableSizeScaleStops,visualVariableSizeStops:t.visualVariableSizeStops,visualVariableSizeUnitValue:t.visualVariableSizeUnitValue},optionalAttributes:{zoomRange:!!i.scaleInfo}}),e,i)}function C(e,a,i){if(!a.spriteRasterizationParam)throw new Error("InternalError: Sprite should always be defined");const l=a.spriteRasterizationParam;return[e.createMeshInfo({...M(a,!1,i),gradientMethod:a.gradientMethod,gradientSize:a.gradientSize,gradientSizeUnits:a.gradientSizeUnits,gradientType:a.gradientType,sprite:l,effects:a.effects?{type:"cim-effect-infos",effectInfos:a.effects}:null})]}function A(e,a,i){const{uniforms:t,schemaOptions:n}=a,{store:o}=n;return L(o.ensureInstance(l.text,{uniforms:{visualVariableColor:e.colorLocked?null:t.visualVariableColor,visualVariableOpacity:t.visualVariableOpacity,visualVariableRotation:t.visualVariableRotation,visualVariableSizeMinMaxValue:t.visualVariableSizeMinMaxValue,visualVariableSizeScaleStops:t.visualVariableSizeScaleStops,visualVariableSizeStops:t.visualVariableSizeStops,visualVariableSizeUnitValue:t.visualVariableSizeUnitValue},optionalAttributes:{zoomRange:!!i.scaleInfo,referenceSymbol:!1,clipAngle:!1,visibility:!1}}),e,t,i)}function L(e,a,i,{scaleInfo:l,scaleExpression:n}){return[e.createMeshInfo({boxBackgroundColor:c(a.backgroundColor),boxBorderLineColor:c(a.borderLineColor),boxBorderLineSize:a.borderLineWidth??0,color:c(a.color)??[0,0,0,0],offsetX:a.offsetX,offsetY:a.offsetY,postAngle:a.angle,fontSize:a.size,referenceSize:a.referenceSize,decoration:a.decoration,haloColor:c(a.haloColor)??[0,0,0,0],haloSize:a.haloSize??0,outlineColor:c(a.outlineColor)??[0,0,0,0],outlineSize:a.outlineSize,lineWidth:a.lineWidth||512,lineHeightRatio:1,horizontalAlignment:a.horizontalAlignment??"center",verticalAlignment:a.verticalAlignment??"baseline",useCIMAngleBehavior:!1,glyphs:a.textRasterizationParam,scaleInfo:l,effects:a.effects?{type:"cim-effect-infos",effectInfos:a.effects}:null,placement:a.markerPlacement,transforms:a.transform,scaleFactor:n??1,minPixelBuffer:t(i),repeatLabel:null,repeatLabelDistance:null,allowOverrun:null,labelPosition:null,labelClassId:-1})]}export{m as createAnimatedMarkerMeshInfos,p as createAnimatedPolyMeshInfos,d as createComplexFillMeshInfos,S as createComplexMarkerMeshInfos,h as createComplexSimpleFillMeshInfos,P as createComplexSimpleLineMeshInfos,z as createComplexSimpleOutlineFillMeshInfos,u as createComplexSymbolInstances,L as createComplexTextMeshInfos,R as createComplexTexturedLineMeshInfos,g as createGradientFillMeshInfos,C as createGradientStrokeMeshInfos,s as getScaleInfo};
|
|
@@ -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
|
-
function
|
|
5
|
+
import{TextureFilter as A}from"../../../../../../../symbols/cim/enums.js";function e(A){return!!(A.visualVariableSizeMinMaxValue||A.visualVariableSizeScaleStops||A.visualVariableSizeStops||A.visualVariableSizeUnitValue||A.visualVariableSizeOutlineScaleStops)}function a(A){return!!A.visualVariableRotation}function i(e){return e.spriteRasterizationParam?e.spriteRasterizationParam:{type:"sprite-rasterization-param",resource:{type:"CIMPictureMarker",url:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAJOgAACToAYJjBRwAAAAsSURBVEhL7c0xAQAwDASh+jf9lcCU7TDA27ECKqACKqACKqACKqACKqDjYPuLVfSmMPfafQAAAABJRU5ErkJggg==",size:16,invertBackfaceTexture:!1,scaleX:1,textureFilter:A.Picture},overrides:[]}}export{i as getAnimatedTechniqueSprite,a as hasRotationVVUniform,e as hasSizeVVUniform};
|
|
@@ -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 e}from"../../../../../chunks/tslib.es6.js";import t from"../../../../../core/Evented.js";import{destroyMaybe as o}from"../../../../../core/maybe.js";import{property as i}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/has.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as n}from"../../../../../core/accessorSupport/decorators/subclass.js";import{ReshapeOperation as r}from"./ReshapeOperation.js";import{InteractiveToolBase as s}from"../../../../interactive/InteractiveToolBase.js";import{sketchKeys as p}from"../../../../interactive/keybindings.js";import a from"../../../../interactive/sketch/SketchOptions.js";let h=class extends s{constructor(e){super(e),this._reshapeOperation=null,this.events=new t,this.enableZShape=!0,this.enableZVertex=!0,this.enableMoveObject=!0,this.enableDeleteVertices=!0,this.autoHideManipulators=!1,this.enableMidpoints=!0,this.enableEdgeOffset=!1,this.type="reshape-3d",this.sketchOptions=new a,this.snappingManager=null,this.automaticManipulatorSelection=!1}initialize(){const e=this._reshapeOperation=new r({tool:this});this.addHandles([e.events.on("reshape",(e=>this.events.emit("reshape",e))),e.events.on("move",(e=>this.events.emit("move",e))),e.events.on("vertex-add",(e=>this.events.emit("vertex-add",e))),e.events.on("vertex-remove",(e=>this.events.emit("vertex-remove",e))),e.events.on("immediate-click",(e=>this.events.emit("immediate-click",{...e,object:this.object}))),this.view.on("pointer-down",["Shift"],(e=>e.stopPropagation()))]),this.finishToolCreation()}destroy(){this._reshapeOperation=o(this._reshapeOperation)}get updating(){return((this.object.updating??!1)||this._reshapeOperation?.updating)??!1}get activeTooltipInfo(){return this._reshapeOperation?.activeTooltipInfo??null}get tooltip(){return this._reshapeOperation?.tooltip??null}onManipulatorSelectionChanged(){this._reshapeOperation?.onManipulatorSelectionChanged()}get canUndo(){return this._reshapeOperation?.canUndo??!1}undo(){this.snappingManager?.doneSnapping(),this._reshapeOperation?.undo()}get canRedo(){return this._reshapeOperation?.canRedo??!1}redo(){this.snappingManager?.doneSnapping(),this._reshapeOperation?.redo()}onInputEvent(e){const t=this._reshapeOperation;if(t&&!t.enterInputModeIfAvailable(e)&&this.enableDeleteVertices&&"key-down"===e.type&&p.delete.includes(e.key)){t.removeSelectedVertices()>0&&e.stopPropagation()}}reset(){}};e([i()],h.prototype,"_reshapeOperation",void 0),e([i({constructOnly:!0})],h.prototype,"view",void 0),e([i({constructOnly:!0})],h.prototype,"automaticAreaMeasurementUtils",void 0),e([i({constructOnly:!0})],h.prototype,"automaticLengthMeasurementUtils",void 0),e([i({constructOnly:!0})],h.prototype,"object",void 0),e([i()],h.prototype,"enableZShape",void 0),e([i()],h.prototype,"enableZVertex",void 0),e([i()],h.prototype,"enableMoveObject",void 0),e([i()],h.prototype,"enableDeleteVertices",void 0),e([i()],h.prototype,"autoHideManipulators",void 0),e([i()],h.prototype,"enableMidpoints",void 0),e([i()],h.prototype,"enableEdgeOffset",void 0),e([i()],h.prototype,"type",void 0),e([i({type:a})],h.prototype,"sketchOptions",void 0),e([i()],h.prototype,"snappingManager",void 0),e([i()],h.prototype,"updating",null),e([i()],h.prototype,"activeTooltipInfo",null),e([i()],h.prototype,"tooltip",null),e([i()],h.prototype,"automaticManipulatorSelection",void 0),h=e([n("esri.views.3d.interactive.editingTools.reshape.ReshapeTool3D")],h);export{h as ReshapeTool3D};
|
|
5
|
+
import{_ as e}from"../../../../../chunks/tslib.es6.js";import t from"../../../../../core/Evented.js";import{destroyMaybe as o}from"../../../../../core/maybe.js";import{property as i}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/has.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as n}from"../../../../../core/accessorSupport/decorators/subclass.js";import{ReshapeOperation as r}from"./ReshapeOperation.js";import{InteractiveToolBase as s}from"../../../../interactive/InteractiveToolBase.js";import{sketchKeys as p}from"../../../../interactive/keybindings.js";import a from"../../../../interactive/sketch/SketchOptions.js";let h=class extends s{constructor(e){super(e),this._reshapeOperation=null,this.events=new t,this.enableZShape=!0,this.enableZVertex=!0,this.enableMoveObject=!0,this.enableDeleteVertices=!0,this.autoHideManipulators=!1,this.enableMidpoints=!0,this.enableEdgeOffset=!1,this.type="reshape-3d",this.sketchOptions=new a,this.snappingManager=null,this.automaticManipulatorSelection=!1}initialize(){const e=this._reshapeOperation=new r({tool:this});this.addHandles([e.events.on("reshape",(e=>this.events.emit("reshape",e))),e.events.on("move",(e=>this.events.emit("move",e))),e.events.on("vertex-add",(e=>this.events.emit("vertex-add",e))),e.events.on("vertex-remove",(e=>this.events.emit("vertex-remove",e))),e.events.on("immediate-click",(e=>this.events.emit("immediate-click",{...e,object:this.object}))),this.view.on("pointer-down",["Shift"],(e=>e.stopPropagation()))]),this.finishToolCreation()}destroy(){this._reshapeOperation=o(this._reshapeOperation)}get updating(){return((this.object.updating??!1)||this._reshapeOperation?.updating||this.snappingManager?.updating)??!1}get activeTooltipInfo(){return this._reshapeOperation?.activeTooltipInfo??null}get tooltip(){return this._reshapeOperation?.tooltip??null}onManipulatorSelectionChanged(){this._reshapeOperation?.onManipulatorSelectionChanged()}get canUndo(){return this._reshapeOperation?.canUndo??!1}undo(){this.snappingManager?.doneSnapping(),this._reshapeOperation?.undo()}get canRedo(){return this._reshapeOperation?.canRedo??!1}redo(){this.snappingManager?.doneSnapping(),this._reshapeOperation?.redo()}onInputEvent(e){const t=this._reshapeOperation;if(t&&!t.enterInputModeIfAvailable(e)&&this.enableDeleteVertices&&"key-down"===e.type&&p.delete.includes(e.key)){t.removeSelectedVertices()>0&&e.stopPropagation()}}reset(){}};e([i()],h.prototype,"_reshapeOperation",void 0),e([i({constructOnly:!0})],h.prototype,"view",void 0),e([i({constructOnly:!0})],h.prototype,"automaticAreaMeasurementUtils",void 0),e([i({constructOnly:!0})],h.prototype,"automaticLengthMeasurementUtils",void 0),e([i({constructOnly:!0})],h.prototype,"object",void 0),e([i()],h.prototype,"enableZShape",void 0),e([i()],h.prototype,"enableZVertex",void 0),e([i()],h.prototype,"enableMoveObject",void 0),e([i()],h.prototype,"enableDeleteVertices",void 0),e([i()],h.prototype,"autoHideManipulators",void 0),e([i()],h.prototype,"enableMidpoints",void 0),e([i()],h.prototype,"enableEdgeOffset",void 0),e([i()],h.prototype,"type",void 0),e([i({type:a})],h.prototype,"sketchOptions",void 0),e([i()],h.prototype,"snappingManager",void 0),e([i()],h.prototype,"updating",null),e([i()],h.prototype,"activeTooltipInfo",null),e([i()],h.prototype,"tooltip",null),e([i()],h.prototype,"automaticManipulatorSelection",void 0),h=e([n("esri.views.3d.interactive.editingTools.reshape.ReshapeTool3D")],h);export{h as ReshapeTool3D};
|