@arcgis/core 5.2.0-next.120 → 5.2.0-next.121
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/arcade/containerUtils.js +1 -1
- package/arcade/functions/feature.js +1 -1
- package/arcade/functions/featuresetstring.js +1 -1
- package/arcade/languageUtils.js +1 -1
- package/arcgisGlobal.d.ts +7 -0
- package/assets/components/assets/icon/addCellAbove16.json +1 -0
- package/assets/components/assets/icon/addCellAbove24.json +1 -0
- package/assets/components/assets/icon/addCellAbove32.json +1 -0
- package/assets/components/assets/icon/addCellBelow16.json +1 -0
- package/assets/components/assets/icon/addCellBelow24.json +1 -0
- package/assets/components/assets/icon/addCellBelow32.json +1 -0
- package/assets/components/assets/icon/linkedChart16.json +1 -0
- package/assets/components/assets/icon/linkedChart24.json +1 -0
- package/assets/components/assets/icon/linkedChart32.json +1 -0
- package/assets/components/assets/icon/polygonFromFeature16.json +1 -0
- package/assets/components/assets/icon/polygonFromFeature24.json +1 -0
- package/assets/components/assets/icon/polygonFromFeature32.json +1 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/015cb790262a59857c5f.js +1 -0
- package/assets/esri/core/workers/chunks/025da54eef112d7e8f66.js +1 -0
- package/assets/esri/core/workers/chunks/033debcbf6b3683dc4fe.js +2 -0
- package/assets/esri/core/workers/chunks/064445e6f9512817ac87.js +2 -0
- package/assets/esri/core/workers/chunks/{304462b049116f59accc.js → 09676cfa99b90fe0cc63.js} +1 -1
- package/assets/esri/core/workers/chunks/0aadee0437fa061e4ff5.js +1 -0
- package/assets/esri/core/workers/chunks/{b0058619e0363002ad86.js → 0e9f54d7f158195bd203.js} +1 -1
- package/assets/esri/core/workers/chunks/1086f190f94c715bbfe4.js +1 -0
- package/assets/esri/core/workers/chunks/1846296be959e28c42bb.js +1 -0
- package/assets/esri/core/workers/chunks/{ea9e770efc85594e4dd2.js → 216d8cb86548e92a8196.js} +1 -1
- package/assets/esri/core/workers/chunks/{d629708bf23da24ee523.js → 298f234f11a10c5120a2.js} +1 -1
- package/assets/esri/core/workers/chunks/29ae19206bbeb480be0f.js +1 -0
- package/assets/esri/core/workers/chunks/{dc1944a7601b518a9c48.js → 2ca49fb4590cc34a02bd.js} +1 -1
- package/assets/esri/core/workers/chunks/{f890359d972cce54459e.js → 2f829321bfbd3bacd64f.js} +1 -1
- package/assets/esri/core/workers/chunks/{7232fc11b23777b6be94.js → 369012c032ea6882607c.js} +1 -1
- package/assets/esri/core/workers/chunks/39c5e0f6262f69a62c66.js +1 -0
- package/assets/esri/core/workers/chunks/{9f760dc4492a03e0504c.js → 45d87af48a21644590c2.js} +1 -1
- package/assets/esri/core/workers/chunks/463d69f596d1d34ef275.js +2 -0
- package/assets/esri/core/workers/chunks/49affbed22e201f7c32b.js +1 -0
- package/assets/esri/core/workers/chunks/4adad3312caa24af98ac.js +1 -0
- package/assets/esri/core/workers/chunks/{8f0ecf4d06ec7b67d4ed.js → 52744dfd430cd0c0edfb.js} +1 -1
- package/assets/esri/core/workers/chunks/58a17fb3c0dd07c63d57.js +2 -0
- package/assets/esri/core/workers/chunks/5993db944b9e7825e0bc.js +1 -0
- package/assets/esri/core/workers/chunks/{090c9c2dbf92f2cac0b8.js → 770ca70d363184e39d60.js} +1 -1
- package/assets/esri/core/workers/chunks/83c7c4218bc6ba2f16ee.js +1 -0
- package/assets/esri/core/workers/chunks/{cfd8317ecd2e63af7c40.js → 8a103b6e9534516421e2.js} +1 -1
- package/assets/esri/core/workers/chunks/{49e8ff5ed079a9e3be4b.js → 91a51d959ee5c6123c46.js} +1 -1
- package/assets/esri/core/workers/chunks/92f35b2c3c5f13778308.js +1 -0
- package/assets/esri/core/workers/chunks/97cd4145c016cf379120.js +1 -0
- package/assets/esri/core/workers/chunks/99ebc99e8d1bca105b5e.js +1 -0
- package/assets/esri/core/workers/chunks/{e18b8646c7378213b618.js → 9b3813e39992b1b99941.js} +1 -1
- package/assets/esri/core/workers/chunks/{32fc7d1db4b311f6b880.js → 9e5b30b907102bc0c201.js} +1 -1
- package/assets/esri/core/workers/chunks/a005efcde3ca9def4e6b.js +1 -0
- package/assets/esri/core/workers/chunks/a3c1a5a5c5cbf27b376d.js +1 -0
- package/assets/esri/core/workers/chunks/a70c59129ea808857d07.js +1 -0
- package/assets/esri/core/workers/chunks/b5b30c8447a0f967fa79.js +1 -0
- package/assets/esri/core/workers/chunks/bb5ed2a796a45c41b0b4.js +1 -0
- package/assets/esri/core/workers/chunks/bcb06a0643b4c83535ee.js +1 -0
- package/assets/esri/core/workers/chunks/{066b7f6866d602f963e0.js → c3008b20cb5fd38bd900.js} +1 -1
- package/assets/esri/core/workers/chunks/{22e85819e23202a8ba90.js → c39ebd8d469f1e8bb61e.js} +1 -1
- package/assets/esri/core/workers/chunks/{7f2ac03efaa4a4898ba2.js → c3b96d1d43afccd23e45.js} +2 -2
- package/assets/esri/core/workers/chunks/{cb983f65995e57fff7a1.js → c44cbe04efddbbbaec13.js} +1 -1
- package/assets/esri/core/workers/chunks/{8ce14dd209462f88b163.js → c70a32ac0fa49f4493ca.js} +1 -1
- package/assets/esri/core/workers/chunks/ce08e3369641da0d7a27.js +2 -0
- package/assets/esri/core/workers/chunks/d1b5be1aeab16d36d4b1.js +1 -0
- package/assets/esri/core/workers/chunks/{da6583e8d88441a1c02a.js → d38252956c3d9e2168f7.js} +1 -1
- package/assets/esri/core/workers/chunks/{1742dbc6a827cfda471b.js → d3d48401462ef3bf0ad9.js} +1 -1
- package/assets/esri/core/workers/chunks/d9b761104ab6e4acaf91.js +1 -0
- package/assets/esri/core/workers/chunks/{723478607badcde5706b.js → d9d5f50af047ee7af129.js} +87 -86
- package/assets/esri/core/workers/chunks/{354912041363502c6a89.js → da161f8cbe1cfc5fcf7c.js} +1 -1
- package/assets/esri/core/workers/chunks/{862e1acd80c4e43831dc.js → dc923e50958b68a50014.js} +1 -1
- package/assets/esri/core/workers/chunks/e86f83a6514a35255f64.js +1 -0
- package/assets/esri/core/workers/chunks/ea49721fdd2172d1c799.js +1 -0
- package/assets/esri/core/workers/chunks/{98a5327fd96d9542b39f.js → f90cad9f007a11154c0d.js} +1 -1
- package/assets/esri/core/workers/chunks/{f18ee2eaa96d103627a6.js → fa3f824c874f29d24953.js} +1 -1
- package/assets/esri/core/workers/chunks/fbb390c0d92d1536fce3.js +1 -0
- package/assets/esri/core/workers/chunks/fbc5f275c4e5e6bfffaa.js +1 -0
- package/assets/esri/core/workers/chunks/{6ab7bb3834841834f839.js → fd5e61cb6f936eadcfe3.js} +1 -1
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/basemaps/BasemapCollection.d.ts +148 -0
- package/basemaps/BasemapCollection.js +2 -0
- package/basemaps/BasemapsSource.d.ts +39 -0
- package/basemaps/BasemapsSource.js +2 -0
- package/basemaps/LocalBasemapsSource.d.ts +55 -0
- package/basemaps/LocalBasemapsSource.js +2 -0
- package/basemaps/PortalBasemapsSource.d.ts +98 -0
- package/basemaps/PortalBasemapsSource.js +2 -0
- package/basemaps/support/BasemapItem.d.ts +74 -0
- package/basemaps/support/BasemapItem.js +2 -0
- package/basemaps/support/basemapCompatibilityUtils.js +2 -0
- package/basemaps/types.d.ts +42 -0
- package/chunks/CheckerBoard.glsl.js +1 -1
- package/chunks/ColorMaterial.glsl.js +1 -1
- package/chunks/Component.glsl.js +11 -11
- package/chunks/DeepSky.glsl.js +1 -1
- package/chunks/DefaultMaterial.glsl.js +4 -4
- package/chunks/EdgeShader.glsl.js +1 -1
- package/chunks/FocusArea.glsl.js +1 -1
- package/chunks/GaussianSplat.glsl.js +9 -9
- package/chunks/HUDMaterial.glsl.js +1 -1
- package/chunks/ImageMaterial.glsl.js +1 -1
- package/chunks/LineCallout.glsl.js +1 -1
- package/chunks/LineMarker.glsl.js +97 -89
- package/chunks/NativeLine.glsl.js +1 -1
- package/chunks/Path.glsl.js +8 -7
- package/chunks/Pattern.glsl.js +1 -1
- package/chunks/PointRenderer.glsl.js +1 -1
- package/chunks/RealisticTree.glsl.js +4 -4
- package/chunks/RibbonLine.glsl.js +58 -56
- package/chunks/ShadowCastAccumulate.glsl.js +3 -3
- package/chunks/ShadowHighlight.glsl.js +4 -4
- package/chunks/ShadowHighlightBuffer.glsl.js +3 -3
- package/chunks/Terrain.glsl.js +12 -14
- package/chunks/Viewshed.glsl.js +1 -1
- package/chunks/Water.glsl.js +3 -3
- package/chunks/languageUtils.js +1 -1
- package/config.js +1 -1
- package/core/Accessor.d.ts +10 -0
- package/kernel.js +1 -1
- package/layers/CSVLayer.js +1 -1
- package/layers/GeoJSONLayer.d.ts +1 -1
- package/layers/GeoJSONLayer.js +1 -1
- package/layers/OGCFeatureLayer.js +1 -1
- package/layers/StreamLayer.js +1 -1
- package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
- package/layers/mixins/FeatureLayerBase.js +1 -1
- package/layers/support/LabelClass.d.ts +13 -4
- package/layers/support/LabelClass.js +1 -1
- package/layers/support/commonProperties.js +1 -1
- package/legend/ActiveLayerInfo.d.ts +130 -0
- package/legend/ActiveLayerInfo.js +2 -0
- package/legend/LegendContent.d.ts +118 -0
- package/legend/LegendContent.js +2 -0
- package/legend/support/clusterUtils.js +2 -0
- package/legend/support/colorRampUtils.js +2 -0
- package/legend/support/heatmapRampUtils.js +2 -0
- package/legend/support/relationshipRampUtils.js +2 -0
- package/legend/support/sizeRampUtils.js +2 -0
- package/legend/support/utils.js +2 -0
- package/legend/types.d.ts +403 -0
- package/libs/i3s/I3SModule.js +1 -1
- package/package.json +5 -5
- package/support/revision.js +1 -1
- package/support/userTypeGuards/isBasemapsSource.js +2 -0
- package/symbols/cim/CIMOperators.js +1 -1
- package/symbols/cim/callouts/effects/BackgroundCallout.js +2 -0
- package/symbols/cim/callouts/effects/BalloonCallout.js +2 -0
- package/symbols/cim/callouts/effects/PointSymbolCallout.js +2 -0
- package/symbols/cim/callouts/effects/SimpleLineCallout.js +2 -0
- package/symbols/cim/callouts/effects/calloutUtils.js +2 -0
- package/symbols/cim/cimAnalyzer.js +1 -1
- package/symbols/cim/utils.js +1 -1
- package/symbols/support/typeUtils.js +1 -1
- package/views/2d/LabelManager.js +1 -1
- package/views/2d/engine/AFeatureContainer.js +1 -1
- package/views/2d/engine/vectorTiles/decluttering/SymbolRepository.js +1 -1
- package/views/2d/engine/webgl/FeatureDisplayList.js +1 -1
- package/views/2d/engine/webgl/FeatureTile.js +1 -1
- package/views/2d/engine/webgl/GlyphWorker.js +1 -1
- package/views/2d/engine/webgl/TileCpuState.js +1 -1
- package/views/2d/engine/webgl/TileGpuState.js +1 -1
- package/views/2d/engine/webgl/collisions/LabelMetric.js +1 -1
- package/views/2d/engine/webgl/collisions/LabelStore.js +2 -0
- package/views/2d/engine/webgl/cpuMapped/CpuBuffer.js +1 -1
- package/views/2d/engine/webgl/cpuMapped/CpuMeshData.js +1 -1
- package/views/2d/engine/webgl/cpuMapped/GpuMeshState.js +1 -1
- package/views/2d/engine/webgl/definitions.js +1 -1
- package/views/2d/engine/webgl/mesh/MeshData.js +1 -1
- package/views/2d/engine/webgl/mesh/MultiTileMeshData.js +1 -1
- package/views/2d/engine/webgl/mesh/factories/CalloutMeshWriterCoordinator.js +2 -0
- package/views/2d/engine/webgl/mesh/factories/FeatureMeshFactory.js +1 -1
- package/views/2d/engine/webgl/mesh/factories/MeshWriterGroupCoordinator.js +2 -0
- package/views/2d/engine/webgl/mesh/templates/segmentUtils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/graph/glsl.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/FeatureInstanceStore.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/GraphicInstanceStore.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/TechniqueInstance.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/TestDisplayObject.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AAnimatedPolyShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AAnimatedShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedFillShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/createGraphicSymbolMeshSchemas.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityPolygonShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/featureTechniqueUtils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/AFillMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/ComplexOutlineFillMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/OutlineFillMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternOutlineFillMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/line/GradientStrokeTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/line/LineMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/markers/ComputedMarkerParams.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/mesh/CalloutMeshWriterPolicy.js +2 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriterReferences.js +2 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriterVertexPack.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/mesh/dataViewUtils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/pieChart/PieChartShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/AFeatureShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/ComplexFillShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/FillShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/HeatmapAccumulateShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/LineShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/OutlineFillShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/constants.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/text/TextShader.js +1 -1
- package/views/2d/engine/webgl/util/AnnotationMatcher.js +1 -1
- package/views/2d/engine/webgl/util/DimensionMatcher.js +1 -1
- package/views/2d/engine/webgl/util/IntervalMatcher.js +1 -1
- package/views/2d/engine/webgl/util/LabelMatcher.js +1 -1
- package/views/2d/engine/webgl/util/MapMatcher.js +1 -1
- package/views/2d/engine/webgl/util/Matcher.js +1 -1
- package/views/2d/engine/webgl/util/MatcherContext.js +1 -1
- package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
- package/views/2d/layers/MediaLayerView2D.js +1 -1
- package/views/2d/layers/TileLayerView2D.js +1 -1
- package/views/2d/layers/features/FeatureContainer.js +1 -1
- package/views/2d/layers/features/FeaturePipelineWorker.js +1 -1
- package/views/2d/layers/features/RenderState.js +1 -1
- package/views/2d/layers/features/schema/processor/symbols/ComplexSymbolSchema.js +1 -1
- package/views/2d/layers/features/schema/processor/symbols/SymbolSchema.js +1 -1
- package/views/2d/layers/features/support/GraphicsReader.js +1 -1
- package/views/2d/layers/graphics/AGraphicContainer.js +1 -1
- package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
- package/views/2d/layers/support/annodime/MatcherGeometryOverride.js +1 -1
- package/views/2d/layers/support/annodime/PrivateMatcherGeometryOverrideEffect.js +1 -1
- package/views/2d/layers/support/annodime/annotationGraphic.js +1 -1
- package/views/2d/layers/support/annodime/cimAnnotations.js +1 -1
- package/views/2d/layers/support/annodime/debugUtils.js +1 -1
- package/views/2d/layers/support/annodime/virtualFields.js +1 -1
- package/views/3d/input/SceneInputManager.js +1 -1
- package/views/3d/input/handlers/ground/GroundDoubleClickMove.js +2 -0
- package/views/3d/interactive/editingTools/move/MoveTool3D.js +1 -1
- package/views/3d/layers/SceneLayerWorker.js +1 -1
- package/views/3d/support/MemoryController.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatOrderTexture.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/Component.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepth.glsl.js +1 -3
- package/views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js +8 -8
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/PathVertexPosition.glsl.js +6 -6
- package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/forwardLinearDepthToReadShadow.glsl.js +4 -0
- package/views/3d/webgl-engine/core/shaderLibrary/{ForwardLinearDepthToWriteShadowMap.glsl.js → forwardLinearDepthToWriteShadow.glsl.js} +5 -5
- package/views/3d/webgl-engine/core/shaderLibrary/shading/WaterDistortion.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/calculateUVZShadow.glsl.js +3 -4
- package/views/3d/webgl-engine/core/shaderLibrary/shading/calculateUVZShadowFromDepth.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/shading/readFragmentShadow.glsl.js +5 -0
- package/views/3d/webgl-engine/core/shaderLibrary/shading/readShadow.glsl.js +24 -0
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/TerrainTexture.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/util/cameraUniforms.js +1 -1
- package/views/3d/webgl-engine/effects/focusArea/FocusArea.js +1 -1
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/ShadowHighlightBuffer.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/ShadowHighlightTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowAccumulator.js +1 -1
- package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastAccumulate.glsl.js +1 -1
- package/views/3d/webgl-engine/lib/LineMaterial.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
- package/views/3d/webgl-engine/materials/DrawParameters.js +1 -1
- package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/Path.glsl.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/Water.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplat.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplatPass.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/LineMarker.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/LineTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/RealisticTree.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLine.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLineTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/ScreenSpacePassAtmosphere.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/Terrain.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/{AnimatedLine.glsl.js → animatedAlpha.glsl.js} +11 -17
- package/views/ToolViewManager.js +1 -1
- package/views/VideoView.js +1 -1
- package/widgets/BasemapGallery/BasemapGalleryViewModel.d.ts +3 -0
- package/widgets/BasemapGallery/support/BasemapGalleryItem.d.ts +3 -0
- package/widgets/BasemapGallery/support/LocalBasemapsSource.d.ts +2 -0
- package/widgets/BasemapGallery/support/PortalBasemapsSource.d.ts +2 -0
- package/widgets/BasemapGallery/types.d.ts +6 -1
- package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.d.ts +2 -0
- package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/EditorViewModel.d.ts +2 -1
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/Editor/legacy/CreateFeaturesWorkflow.js +1 -1
- package/widgets/Editor.d.ts +2 -1
- package/widgets/Editor.js +1 -1
- package/widgets/HistogramRangeSlider/HistogramRangeSliderViewModel.d.ts +1 -0
- package/widgets/HistogramRangeSlider/HistogramRangeSliderViewModel.js +1 -1
- package/widgets/HistogramRangeSlider.js +1 -1
- package/widgets/Legend/LegendViewModel.d.ts +1 -0
- package/widgets/Legend/LegendViewModel.js +1 -1
- package/widgets/Legend/styles/card/CardView.d.ts +1 -0
- package/widgets/Legend/styles/card/CardView.js +1 -1
- package/widgets/Legend/styles/classic/ClassicView.d.ts +1 -0
- package/widgets/Legend/styles/classic/ClassicView.js +1 -1
- package/widgets/Legend/support/ActiveLayerInfo.d.ts +2 -0
- package/widgets/Legend.js +1 -1
- package/assets/esri/core/workers/chunks/03918a862455191a8910.js +0 -1
- package/assets/esri/core/workers/chunks/1630913399384030d0b9.js +0 -1
- package/assets/esri/core/workers/chunks/1a39335aa2dce6d564d9.js +0 -1
- package/assets/esri/core/workers/chunks/25bb07d3c32b16a08813.js +0 -1
- package/assets/esri/core/workers/chunks/25cc6d7178a52f2f46b7.js +0 -1
- package/assets/esri/core/workers/chunks/2e999b05ce179dd9fa08.js +0 -1
- package/assets/esri/core/workers/chunks/36792b8a85e88044cb49.js +0 -1
- package/assets/esri/core/workers/chunks/3acc1299c1382c3b034d.js +0 -1
- package/assets/esri/core/workers/chunks/430802108b63194b7ddd.js +0 -2
- package/assets/esri/core/workers/chunks/4396ef5ab3eb9e9a7df2.js +0 -1
- package/assets/esri/core/workers/chunks/4efe5827a5c61db3b19d.js +0 -2
- package/assets/esri/core/workers/chunks/5938d5f6e37f49867d5a.js +0 -1
- package/assets/esri/core/workers/chunks/70347d25968975126fa7.js +0 -1
- package/assets/esri/core/workers/chunks/8628c027198982baed7c.js +0 -1
- package/assets/esri/core/workers/chunks/8c521caf050a486b6548.js +0 -1
- package/assets/esri/core/workers/chunks/a6d4132a16c51323a38a.js +0 -1
- package/assets/esri/core/workers/chunks/add834f867900a7091d2.js +0 -1
- package/assets/esri/core/workers/chunks/b56c5883a5468b18b122.js +0 -1
- package/assets/esri/core/workers/chunks/b5a102cf9f4377fb9842.js +0 -1
- package/assets/esri/core/workers/chunks/b6409d89914030d5854a.js +0 -1
- package/assets/esri/core/workers/chunks/c118b88a7c4359e68d9b.js +0 -1
- package/assets/esri/core/workers/chunks/c5e288d57bacb8451e2d.js +0 -2
- package/assets/esri/core/workers/chunks/ce3fb992f6c6ae7378a3.js +0 -1
- package/assets/esri/core/workers/chunks/ceda1e08c9ff26248db0.js +0 -1
- package/assets/esri/core/workers/chunks/d5e3f8e5b8d2576d3cb3.js +0 -2
- package/assets/esri/core/workers/chunks/ddb5d29a8998d0a76fd4.js +0 -1
- package/assets/esri/core/workers/chunks/de8a3a0796bd115426c0.js +0 -1
- package/assets/esri/core/workers/chunks/e707534a700a2de687ca.js +0 -1
- package/assets/esri/core/workers/chunks/f465fb26541372fdc908.js +0 -2
- package/assets/esri/core/workers/chunks/f5423006fb07db7dd6ee.js +0 -1
- package/assets/esri/core/workers/chunks/fdad31bbe8aee68a6eaf.js +0 -1
- package/views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepthToReadShadowMap.glsl.js +0 -4
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js +0 -18
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ShadowmapFiltering.glsl.js +0 -4
- /package/assets/esri/core/workers/chunks/{430802108b63194b7ddd.js.LICENSE.txt → 033debcbf6b3683dc4fe.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{4efe5827a5c61db3b19d.js.LICENSE.txt → 064445e6f9512817ac87.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{c5e288d57bacb8451e2d.js.LICENSE.txt → 463d69f596d1d34ef275.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{d5e3f8e5b8d2576d3cb3.js.LICENSE.txt → 58a17fb3c0dd07c63d57.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{7f2ac03efaa4a4898ba2.js.LICENSE.txt → c3b96d1d43afccd23e45.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{f465fb26541372fdc908.js.LICENSE.txt → ce08e3369641da0d7a27.js.LICENSE.txt} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{labelPlacementOffsetPadding as e}from"../definitions.js";import
|
|
2
|
+
import{pt2px as i}from"../../../../../core/screenUtils.js";import{labelPlacementOffsetPadding as e}from"../definitions.js";import t from"./BoundingBox.js";import{serializeList as s,deserializeList as r}from"../util/serializationUtils.js";const n=2;class o{constructor(i,e,t,s,r,n,o,l,h,a,d,c=[],u=0,f=0,m=[]){this.displayId=i,this.labelClassId=e,this.labelIdHash=t,this.hash=s,this.anchorX=r,this.anchorY=n,this.directionX=o,this.directionY=l,this.maxScale=h,this.minScale=a,this.referenceBounds=d,this.bounds=c,this.recordStart=u,this.recordCount=f,this.additionalRecordRanges=m,this.priority=0,this._colliders=null,this.referenceSymbolVVOffset=[0,0],this.uniqueSymbol=null,this.labelStoreId=null,this.selectedForRendering=!1,this._calloutCollisionBounds=null}get xTile(){return this.anchorX}get yTile(){return this.anchorY}colliders(t){if(!this._colliders){if(!t)throw new Error("InternalError: Label collision context is required to compute colliders");const s=t.attributeView,r=e;let o=this.referenceBounds?.size??0;const l=Math.round(i(o)),h=t.labelingCollisionInfos[0].vvEvaluators[0];if(null!=h){const i=h(s.getVisualVariableData(this.displayId,0));if(!isNaN(i)&&null!=i&&i!==1/0){o=i;const e=(o-l)/2;this.referenceSymbolVVOffset=[this.directionX*e,this.directionY*e]}}const a=this.minScale?t.tilingScheme.scaleToZoom(this.minScale):0,d=this.maxScale?t.tilingScheme.scaleToZoom(this.maxScale):25,c=i(this.referenceBounds?.offsetX??0)+this.directionX*(r+o/2),u=-i(this.referenceBounds?.offsetY??0)+this.directionY*(r+o/2);this._colliders=this.bounds.map(i=>({labelId:this.labelIdHash,xTile:this.anchorX,yTile:this.anchorY,dxPixels:i.x-i.halfWidth+c,dyPixels:i.y-i.halfHeight+u,hard:!0,partIndex:1,width:i.width+n,height:i.height+n,angle:0,xScreen:0,yScreen:0,dxScreen:0,dyScreen:0,enabled:!0,minLod:a,maxLod:d}))}return this._colliders}get id(){return this.displayId}includeRecordRange(i,e){0!==e&&(i!==this.recordStart+this.recordCount?this.additionalRecordRanges.push({recordStart:i,recordCount:e}):this.recordCount+=e)}includeCalloutCollisionBounds(i){const e=l(i);e&&(this._calloutCollisionBounds?this._calloutCollisionBounds.extend(e):(this._calloutCollisionBounds=e,this.bounds.push(e)),this._colliders=null)}includeCalloutPartCollisionBounds(i){const e=l(i);e&&!this.bounds.some(i=>i.x===e.x&&i.y===e.y&&i.width===e.width&&i.height===e.height)&&(this.bounds.push(e),this._colliders=null)}serialize(i){i.push(this.displayId),i.push(this.labelClassId),i.push(this.labelIdHash),i.push(this.hash),i.push(this.recordStart),i.push(this.recordCount),i.push(this.additionalRecordRanges.length);for(const e of this.additionalRecordRanges)i.push(e.recordStart),i.push(e.recordCount);i.writeF32(this.anchorX),i.writeF32(this.anchorY),i.writeF32(this.directionX),i.writeF32(this.directionY),i.writeF32(this.maxScale),i.writeF32(this.minScale),this.referenceBounds?(i.writeF32(this.referenceBounds.size),i.writeF32(this.referenceBounds.offsetX),i.writeF32(this.referenceBounds.offsetY)):(i.writeF32(0),i.writeF32(0),i.writeF32(0)),s(i,this.bounds)}static deserialize(i){const e=i.readInt32(),s=i.readInt32(),n=i.readInt32(),l=i.readInt32(),h=i.readInt32(),a=i.readInt32(),d=i.readInt32(),c=[];for(let t=0;t<d;t++)c.push({recordStart:i.readInt32(),recordCount:i.readInt32()});const u=i.readF32(),f=i.readF32(),m=i.readF32(),x=i.readF32(),p=i.readF32(),S=i.readF32(),y=i.readF32(),I=i.readF32(),F=i.readF32(),b=r(i,t)??[];return new o(e,s,n,l,u,f,m,x,p,S,{size:y,offsetX:I,offsetY:F},b,h,a,c)}}function l(i){const e=i.xmax-i.xmin,s=i.ymax-i.ymin;return null==i.xmin||isNaN(i.xmin)||null==i.ymin||isNaN(i.ymin)||null==i.xmax||isNaN(i.xmax)||null==i.ymax||isNaN(i.ymax)||e<=0||s<=0?null:new t(i.xmin+e/2,-(i.ymin+s/2),e,s)}export{o as LabelMetric};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import t from"../../../../../core/Logger.js";import{labelAnchorStoreUnit as e,labelStoreUnit as r}from"../definitions.js";import{PixelType as s}from"../../../../webgl/enums.js";import i from"../../../../webgl/Texture.js";import{TextureDescriptor as h}from"../../../../webgl/TextureDescriptor.js";const a=32,n=4,o=()=>t.getLogger("esri.views.2d.engine.webgl.collisions.LabelStore");class _{constructor(){this._data=new Uint8Array(a*a*n),this._anchors=new Float32Array(a*a*n),this._dirtyStart=0,this._dirtyEnd=0,this._entries=new Map,this._freeIds=[],this._nextId=1,this._size=a,this._data[3]=255}get size(){return this._size}get usedMemory(){return this._data.byteLength+this._anchors.byteLength}destroy(){this._entries.size&&o().warn("InternalError: Leaking label store entries"),this._texture?.dispose(),this._anchorTexture?.dispose(),this._texture=null,this._anchorTexture=null,this._entries.clear(),this._freeIds.length=0}acquire(t){if(null!=t.labelStoreId)return t.labelStoreId;const e=this._freeIds.pop()??this._nextId++;return this._ensureCapacity(e),this._entries.set(e,t),this._writeFeatureId(e,t.displayId),this._writeAnchor(e,t.anchorX,t.anchorY),this._data[e*n+3]=255,this._markDirty(e),t.labelStoreId=e,e}release(t){const e=t.labelStoreId;if(null==e)return;if(this._entries.get(e)!==t)throw new Error("InternalError: expected label store entry");this._entries.delete(e),this._data.fill(0,e*n,e*n+n),this._data[e*n+3]=255,this._anchors.fill(0,e*n,e*n+n),this._markDirty(e),t.labelStoreId=null,this._freeIds.push(e)}setVisibility(t,e){const r=t.labelStoreId;if(null==r||this._entries.get(r)!==t)throw new Error("InternalError: expected label metric to have a store id");const s=e?0:255,i=r*n+3;this._writeReferenceSymbolVVOffset(r,t.referenceSymbolVVOffset),this._data[i]!==s&&(this._data[i]=s,this._markDirty(r))}getVisibility(t){const e=t.labelStoreId;return null==e?255:this._data[e*n+3]}has(t){return null!=t.labelStoreId&&this._entries.get(t.labelStoreId)===t}getAnchor(t){if(!this._entries.has(t))return null;const e=t*n;return[this._anchors[e],this._anchors[e+1]]}getReferenceSymbolVVOffset(t){if(!this._entries.has(t))return null;const e=t*n;return[this._anchors[e+2],this._anchors[e+3]]}upload(t){const e=this._texture??this._createTexture(t,!1),r=this._anchorTexture??this._createTexture(t,!0);this._uploadDirty(e,r)}getTexture(t){const s=this._texture??this._createTexture(t,!1),i=this._anchorTexture??this._createTexture(t,!0);if(this._dirtyStart!==1/0)throw new Error("InternalError: expected label store to be uploaded before rendering");return{labelStoreTexture:{texture:s,unit:r},labelAnchorStoreTexture:{texture:i,unit:e}}}_createTexture(t,e){const r=new h(this._size);r.wrapMode=33071,r.samplingMode=9728,r.pixelFormat=6408,r.dataType=e?s.FLOAT:s.UNSIGNED_BYTE;const a=new i(t,r,e?this._anchors:this._data);return e?this._anchorTexture=a:this._texture=a,a}_ensureCapacity(t){if(t<this._size*this._size)return;let e=this._size;for(;t>=e*e;)e*=2;const r=new Uint8Array(e*e*n);r.set(this._data),this._data=r;const s=new Float32Array(e*e*n);s.set(this._anchors),this._anchors=s,this._size=e,this._texture?.dispose(),this._anchorTexture?.dispose(),this._texture=null,this._anchorTexture=null,this._dirtyStart=0,this._dirtyEnd=t}_writeFeatureId(t,e){const r=t*n;this._data[r]=255&e,this._data[r+1]=e>>8&255,this._data[r+2]=e>>16&255,this._markDirty(t)}_writeAnchor(t,e,r){const s=t*n;this._anchors[s]=e,this._anchors[s+1]=r,this._markDirty(t)}_writeReferenceSymbolVVOffset(t,[e,r]){const s=t*n;this._anchors[s+2]===e&&this._anchors[s+3]===r||(this._anchors[s+2]=e,this._anchors[s+3]=r,this._markDirty(t))}_markDirty(t){this._dirtyStart=Math.min(this._dirtyStart,t),this._dirtyEnd=Math.max(this._dirtyEnd,t)}_uploadDirty(t,e){if(this._dirtyStart===1/0)return;const r=Math.floor(this._dirtyStart/this._size),s=Math.floor(this._dirtyEnd/this._size),i=r*this._size*n,h=(s+1)*this._size*n;t.updateData(0,0,r,this._size,s-r+1,this._data.subarray(i,h)),e.updateData(0,0,r,this._size,s-r+1,this._anchors.subarray(i,h)),this._dirtyStart=1/0,this._dirtyEnd=0}}export{_ as LabelStore};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import"../../../../../core/has.js";import{assertIsSome as t}from"../../../../../core/maybe.js";import{asArrayBuffer as e}from"../../../../../core/typedArrayUtil.js";import{toUint32 as i,toFloat32 as r}from"../number.js";import{ResizableUint32Array as s}from"../ResizableUint32Array.js";import{FreeList as n}from"./FreeList.js";const h=1.25,a=32767,d=a<<16|a;class u{constructor(t,e,i){this.bufferType=t,this.size=e,this.strideInt=i,this._dirtyStart=1/0,this._dirtyEnd=0,this._needsGpuRebuild=!1,this._needsComputeRebuild=!1,this._cpu=s.create(e*i*Uint32Array.BYTES_PER_ELEMENT),this.memoryStats={bytesUsed:0,bytesReserved:e*i*Uint32Array.BYTES_PER_ELEMENT},this.clear()}get array(){return this._cpu.array}get elementSize(){return this._cpu.length/this.strideInt}get intSize(){return this.fillPointer}get byteSize(){return this.fillPointer*Uint32Array.BYTES_PER_ELEMENT}get usedMemory(){return this._cpu.array.byteLength}get dirtyStart(){return this._dirtyStart}get dirtyEnd(){return this._dirtyEnd}get hasDirtyRange(){return this._dirtyStart!==1/0}get needsGpuRebuild(){return this._needsGpuRebuild}get needsComputeRebuild(){return this._needsComputeRebuild}destroy(){this._cpu.destroy()}clear(){this._dirtyStart=1/0,this._dirtyEnd=0,this._needsGpuRebuild=!1,this._needsComputeRebuild=!1,this.freeList=new n({start:0,end:this._cpu.length/this.strideInt}),this.fillPointer=0}ensure(t){if(this.maxAvailableSpace()>=t)return;if(t*this.strideInt>this._cpu.length-this.fillPointer){const e=this._cpu.length/this.strideInt,i=Math.round((e+t)*h),r=i*this.strideInt;this._cpu.expand(r*Uint32Array.BYTES_PER_ELEMENT),this.freeList.free(e,i-e),this.memoryStats.bytesReserved+=(i-e)*this.strideInt*Uint32Array.BYTES_PER_ELEMENT,this._needsGpuRebuild=!0,this._markComputeRebuild()}}setU32(t,e){this._cpu.array[t]!==e&&(this._cpu.array[t]=e,this._markDirtyRange(t,t+1),this._markComputeRebuild())}setF32(t,e){this.setU32(t,i(e))}setF32Range(t,e,r){const s=i(r);this._cpu.array.fill(s,t,e),this._markDirtyRange(t,e),this._markComputeRebuild()}getF32(t){return r(this._cpu.array[t])}getView(t,e){return this._cpu.getUint32View(t,e/Uint32Array.BYTES_PER_ELEMENT)}get bufferSize(){return this._cpu.length/this.strideInt}maxAvailableSpace(){return this.freeList.maxAvailableSpace()}markGpuUploadComplete(){this._dirtyStart=1/0,this._dirtyEnd=0,this._needsGpuRebuild=!1}markComputeUploadComplete(){this._needsComputeRebuild=!1}insert(i,r,s,n){const h=s*this.strideInt;if(!h)return 0;const a=r*this.strideInt*Uint32Array.BYTES_PER_ELEMENT,d=new Uint32Array(e(i),a,h),u=this.freeList.firstFit(s);t(u,"First fit region must be defined");const
|
|
2
|
+
import"../../../../../core/has.js";import{assertIsSome as t}from"../../../../../core/maybe.js";import{asArrayBuffer as e}from"../../../../../core/typedArrayUtil.js";import{toUint32 as i,toFloat32 as r}from"../number.js";import{ResizableUint32Array as s}from"../ResizableUint32Array.js";import{FreeList as n}from"./FreeList.js";const h=1.25,a=32767,d=a<<16|a;class u{constructor(t,e,i){this.bufferType=t,this.size=e,this.strideInt=i,this._dirtyStart=1/0,this._dirtyEnd=0,this._needsGpuRebuild=!1,this._needsComputeRebuild=!1,this._cpu=s.create(e*i*Uint32Array.BYTES_PER_ELEMENT),this.memoryStats={bytesUsed:0,bytesReserved:e*i*Uint32Array.BYTES_PER_ELEMENT},this.clear()}get array(){return this._cpu.array}get elementSize(){return this._cpu.length/this.strideInt}get intSize(){return this.fillPointer}get byteSize(){return this.fillPointer*Uint32Array.BYTES_PER_ELEMENT}get usedMemory(){return this._cpu.array.byteLength}get dirtyStart(){return this._dirtyStart}get dirtyEnd(){return this._dirtyEnd}get hasDirtyRange(){return this._dirtyStart!==1/0}get needsGpuRebuild(){return this._needsGpuRebuild}get needsComputeRebuild(){return this._needsComputeRebuild}destroy(){this._cpu.destroy()}clear(){this._dirtyStart=1/0,this._dirtyEnd=0,this._needsGpuRebuild=!1,this._needsComputeRebuild=!1,this.freeList=new n({start:0,end:this._cpu.length/this.strideInt}),this.fillPointer=0}ensure(t){if(this.maxAvailableSpace()>=t)return;if(t*this.strideInt>this._cpu.length-this.fillPointer){const e=this._cpu.length/this.strideInt,i=Math.round((e+t)*h),r=i*this.strideInt;this._cpu.expand(r*Uint32Array.BYTES_PER_ELEMENT),this.freeList.free(e,i-e),this.memoryStats.bytesReserved+=(i-e)*this.strideInt*Uint32Array.BYTES_PER_ELEMENT,this._needsGpuRebuild=!0,this._markComputeRebuild()}}setU32(t,e){this._cpu.array[t]!==e&&(this._cpu.array[t]=e,this._markDirtyRange(t,t+1),this._markComputeRebuild())}setF32(t,e){this.setU32(t,i(e))}setF32Range(t,e,r){const s=i(r);this._cpu.array.fill(s,t,e),this._markDirtyRange(t,e),this._markComputeRebuild()}setU24StrideRange(t,e,i,r){const s=new Uint8Array(this._cpu.array.buffer),n=this.strideInt*Uint32Array.BYTES_PER_ELEMENT,h=255&r,a=r>>8&255,d=r>>16&255;for(let u=t;u<e;u++){const t=u*n+i;s[t]=h,s[t+1]=a,s[t+2]=d}this._markDirtyRange(t*this.strideInt,e*this.strideInt),this._markComputeRebuild()}getF32(t){return r(this._cpu.array[t])}getView(t,e){return this._cpu.getUint32View(t,e/Uint32Array.BYTES_PER_ELEMENT)}get bufferSize(){return this._cpu.length/this.strideInt}maxAvailableSpace(){return this.freeList.maxAvailableSpace()}markGpuUploadComplete(){this._dirtyStart=1/0,this._dirtyEnd=0,this._needsGpuRebuild=!1}markComputeUploadComplete(){this._needsComputeRebuild=!1}insert(i,r,s,n){const h=s*this.strideInt;if(!h)return 0;const a=r*this.strideInt*Uint32Array.BYTES_PER_ELEMENT,d=new Uint32Array(e(i),a,h),u=this.freeList.firstFit(s);t(u,"First fit region must be defined");const _=u*this.strideInt,o=h;if(this._cpu.array.set(d,_),0!==n)for(let t=0;t<d.length;t++)this._cpu.array[t+_]+=n;return this._markDirtyRange(_,_+o),this.fillPointer=Math.max(this.fillPointer,_+o),this.memoryStats.bytesUsed+=s*this.strideInt*Uint32Array.BYTES_PER_ELEMENT,this._markComputeRebuild(),u}copyFrom(e,i,r,s,n){const h=r*this.strideInt;if(!h)return 0;const a=i*this.strideInt*Uint32Array.BYTES_PER_ELEMENT,d=e._cpu.getUint32View(a,h),u=this.freeList.firstFit(r);t(u,"First fit region must be defined");const _=u*this.strideInt,o=h;if(this._cpu.array.set(d,_),0!==s)for(let t=0;t<h;t++)this._cpu.array[_+t*this.strideInt+n]+=s;return this._markDirtyRange(_,_+o),this.fillPointer=Math.max(this.fillPointer,_+o),this.memoryStats.bytesUsed+=r*this.strideInt*Uint32Array.BYTES_PER_ELEMENT,this._markComputeRebuild(),u}free(t,e,i){const r=t*this.strideInt,s=(t+e)*this.strideInt;if(!0===i)for(let n=t;n!==t+e;n++)this._cpu.array[n*this.strideInt]=d;this._markDirtyRange(r,s),this.freeList.free(t,e),this.memoryStats.bytesUsed-=e*this.strideInt*Uint32Array.BYTES_PER_ELEMENT,this._markComputeRebuild()}reshuffle(t,e){if(0===e.length)return;const i=this._cpu.array.byteLength,r=t*this.strideInt*Uint32Array.BYTES_PER_ELEMENT,n=i!==r,h=this._cpu,a=s.create(r);n||a.array.set(this._cpu.getUint32View(0,this.intSize));for(const s of e)if(n||s.srcFrom!==s.dstFrom||0!==s.mutate){this._markDirtyRange(s.dstFrom*this.strideInt,(s.dstFrom+s.count)*this.strideInt);for(let t=0;t<s.count;t++){const e=(s.dstFrom+t)*this.strideInt,i=(s.srcFrom+t)*this.strideInt;for(let t=0;t<this.strideInt;t++)a.array[e+t]=h.array[i+t]+s.mutate}}this._cpu.destroy(),this._cpu=a,n&&(this._needsGpuRebuild=!0),this.freeList.clear(),this.fillPointer=t*this.strideInt,this.memoryStats.bytesUsed=this.memoryStats.bytesReserved=r,this._markComputeRebuild()}_markDirtyRange(t,e){this._dirtyStart=Math.min(this._dirtyStart,t),this._dirtyEnd=Math.max(this._dirtyEnd,e)}_markComputeRebuild(){"index"===this.bufferType&&(this._needsComputeRebuild=!0)}}export{u as CpuBuffer};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import
|
|
2
|
+
import{destroyMaybe as e}from"../../../../../core/maybe.js";import{i1616to32 as t}from"../number.js";import{CpuBuffer as r}from"./CpuBuffer.js";import{unpackDataView as s}from"../shaderGraph/techniques/mesh/dataViewUtils.js";const i=1e3;class o{constructor(e){if(this._layout=e,this._position=this._layout.attributes.find(e=>"pos"===e.name||"position"===e.name),this._id=this._layout.attributes.find(e=>"id"===e.name&&3===e.count),!this._position||!this._id)throw new Error("InternalError: Unable to find required mesh attributes");const t=this._layout.stride/Uint32Array.BYTES_PER_ELEMENT;this._indexBuffer=new r("index",i,1),this._vertexBuffer=new r("vertex",i,t)}destroy(){this._indexBuffer=e(this._indexBuffer),this._vertexBuffer=e(this._vertexBuffer)}get layout(){return this._layout}get usedMemory(){let e=0;return e+=this._indexBuffer.usedMemory,e+=this._vertexBuffer.usedMemory,e}get memoryStats(){return{bytesUsed:this._vertexBuffer.memoryStats.bytesUsed+this._indexBuffer.memoryStats.bytesUsed,bytesReserved:this._vertexBuffer.memoryStats.bytesReserved+this._indexBuffer.memoryStats.bytesReserved,vertex:this._vertexBuffer.memoryStats,index:this._indexBuffer.memoryStats}}get vertexBuffer(){return this._vertexBuffer}get indexBuffer(){return this._indexBuffer}getAttributePrecisionPackFactors(){const e={};for(const t of this.layout.attributes)t.packPrecisionFactor&&(e[t.name]=t.packPrecisionFactor);return e}getDebugVertexInfo(e=!1,t){const r=this._layout,i=r.stride,o=this._vertexBuffer.getView(0,this._vertexBuffer.byteSize),n=this._createComputeDebugAttributes(e,t),f=new DataView(o.slice().buffer);let u=o.byteLength/i;e&&(u=this._indexBuffer.fillPointer/3);const a=this._indexBuffer.getView(0,this._indexBuffer.byteSize);let c=0;const h=[];for(let d=0;d<u;d++){let t=d;e&&(t=a[3*d],c=t*i);const o={};for(const e of[...r.attributes,...n]){let t=`${e.offset} ${e.name}`;const r=s(f,e,c);if(e.packPrecisionFactor)if(t+=` (precision: ${e.packPrecisionFactor})`,"number"==typeof r)o[t]=r/e.packPrecisionFactor;else{const s=[...r];for(let t=0;t<s.length;t++)s[t]/=e.packPrecisionFactor;o[t]=s}else o[t]=r;if("id"===e.name&&3===e.count&&Array.isArray(r)){const t=r[0]|r[1]<<8|r[2]<<16;o.id=e.packPrecisionFactor?t/e.packPrecisionFactor:t}}c+=i,h.push(o)}return{vertices:h,layout:r}}append(e){const t=e.layout.stride,r=e.indices.byteLength/Uint32Array.BYTES_PER_ELEMENT,s=e.vertices.byteLength/t;this._ensure(r,s);const{vertices:i,indices:o}=e,n=this._vertexBuffer.insert(i,0,i.byteLength/t,0);return{vertexFrom:n,indexFrom:this._indexBuffer.insert(o,0,o.byteLength/4,n)}}setRecordLabelId(e,t,r){const{recordStart:s,recordCount:i}=t;if(s+i>e.length)throw new Error("InternalError: label record range is out of bounds");for(let o=s;o<s+i;o++){const{vertexStart:t,vertexCount:s}=e[o];this._vertexBuffer.setU24StrideRange(t,t+s,this._id.offset,r)}}getRecordId(e){const t=e.vertexStart*this._vertexBuffer.strideInt+this._id.offset/Uint32Array.BYTES_PER_ELEMENT;return 16777215&this._vertexBuffer.array[t]}copyRecordFrom(e,r,s,i){const{indexStart:o,indexCount:n,vertexStart:f,vertexCount:u}=r;this._ensure(n,u);const a=e._position,c=s*(a.packPrecisionFactor??1),h=i*(a.packPrecisionFactor??1),d=a.offset,_=t(c,h),x=this._vertexBuffer.copyFrom(e._vertexBuffer,f,u,_,d),m=this._indexBuffer.copyFrom(e._indexBuffer,o,n,x-f,0),l=r.clone();return l.vertexStart=x,l.indexStart=m,l.overlaps=0,l}remove(e,t,r,s){this._indexBuffer.free(e,t),this._vertexBuffer.free(r,s)}reshuffle(e){this._vertexBuffer.reshuffle(e.vertex.count,e.vertex.operations),this._indexBuffer.reshuffle(e.index.count,e.index.operations)}_createComputeDebugAttributes(e,t){const r=[];if(!e)return r;if(null==t)return console.log("must provide location info to see compute attributes"),r;for(const s of this._layout.attributes){const e=t.computeAttributeMap[s.name];null!=e&&2===e.length&&(r.push({...s,name:e[0],offset:s.offset+this._layout.stride}),r.push({...s,name:e[1],offset:s.offset+2*this._layout.stride}))}return r}_ensure(e,t){this._indexBuffer.ensure(Math.max(e,i)),this._vertexBuffer.ensure(Math.max(t,i))}}export{o as CpuMeshData};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{unique as e}from"../../../../../core/arrayUtils.js";import{
|
|
2
|
+
import{unique as e}from"../../../../../core/arrayUtils.js";import{BufferObject as t}from"../../../../webgl/BufferObject.js";import{VertexArrayObject as r}from"../../../../webgl/VertexArrayObject.js";import{VertexBuffer as s}from"../../../../webgl/VertexBuffer.js";import{VertexElementDescriptor as u}from"../../../../webgl/VertexElementDescriptor.js";function i(t,r){return e(t.attributes,(e,t)=>e.name===t.name).filter(e=>r.locations.has(e.name)).map(e=>new u(e.name,e.count,e.type,e.offset,t.stride,e.normalized??!1)).sort((e,t)=>r.locations.get(e.name)-r.locations.get(t.name))}function o(t,r){const s=[],i=e(t.attributes,(e,t)=>e.name===t.name).filter(e=>r.locations.has(e.name));for(const e of i){s.push(new u(e.name,e.count,e.type,e.offset,t.stride,e.normalized??!1));const i=r.computeAttributeMap[e.name];null!=i&&2===i.length&&(s.push(new u(i[0],e.count,e.type,e.offset+t.stride,t.stride,e.normalized??!1)),s.push(new u(i[1],e.count,e.type,e.offset+2*t.stride,t.stride,e.normalized??!1)))}return s.sort((e,t)=>r.locations.get(e.name)-r.locations.get(t.name))}class n{constructor(e){this._layout=e}destroy(){this._uploadedMeshData=null,this._vertexBuffer?.dispose(),this._computeVertexBuffer?.dispose(),this._indexBuffer?.dispose(),this._computeIndexBuffer?.dispose(),this._computeVAO?.disposeVAOOnly(),this._geometryVAO?.disposeVAOOnly()}upload(e){if(e.layout.hash!==this._layout.hash)throw new Error("InternalError: Tried to update buffer with differing layout");const t=e.vertexBuffer,r=e.indexBuffer;if(!t||!r||!t.bufferSize)return;this._uploadedMeshData=e;const s=this._syncVertexGpuBuffer(t),u=this._syncIndexGpuBuffer(r),i=s||u,o=this._syncComputeBuffers(t,r);i&&(this._geometryVAO?.disposeVAOOnly(),this._geometryVAO=null),o&&(this._computeVAO?.disposeVAOOnly(),this._computeVAO=null),t.markGpuUploadComplete(),r.markGpuUploadComplete(),r.markComputeUploadComplete()}getAttributePrecisionPackFactors(){const e={};for(const t of this._layout.attributes)t.packPrecisionFactor&&(e[t.name]=t.packPrecisionFactor);return e}getDebugVertexInfo(e=!1,t){return this._uploadedMeshData?.getDebugVertexInfo(e,t)??null}getGeometryVAO(e,u){const o=this._uploadedMeshData;if(!o)return null;const n=o.vertexBuffer,f=o.indexBuffer;if(!n||!f||!n.bufferSize)return null;if(this._vertexBuffer??=new s(e,i(this._layout,u),n.array,35048),this._indexBuffer??=t.createIndex(e,35048,f.array),!this._geometryVAO){const t=new Map([["geometry",this._vertexBuffer]]);this._geometryVAO=new r(e,t,this._indexBuffer)}return this._geometryVAO}getComputeVAO(e,t){const u=this._uploadedMeshData;if(!u)return null;const i=u.vertexBuffer,n=u.indexBuffer;if(!i||!n||!i.bufferSize)return null;if(this._computeVertexBuffer??=new s(e,o(this._layout,t),i.array,35048),this._computeIndexBuffer??=this._createComputeIndexBuffer(e,n),!this._computeVAO){const t=new Map([["geometry",this._computeVertexBuffer]]);this._computeVAO=new r(e,t,this._computeIndexBuffer)}return this._computeVAO}_syncVertexGpuBuffer(e){let t=!1;return e.needsGpuRebuild?(this._vertexBuffer?.dispose(),this._computeVertexBuffer?.dispose(),this._vertexBuffer=null,this._computeVertexBuffer=null,t=!0):e.hasDirtyRange&&(this._vertexBuffer?.setSubData(e.array,e.dirtyStart,e.dirtyStart,e.dirtyEnd),this._computeVertexBuffer?.setSubData(e.array,e.dirtyStart,e.dirtyStart,e.dirtyEnd)),t}_syncIndexGpuBuffer(e){return e.needsGpuRebuild?(this._indexBuffer?.dispose(),this._indexBuffer=null,!0):(e.hasDirtyRange&&this._indexBuffer?.setSubData(e.array,e.dirtyStart,e.dirtyStart,e.dirtyEnd),!1)}_syncComputeBuffers(e,t){let r=!1;return e.needsGpuRebuild&&(this._computeVertexBuffer?.dispose(),this._computeVertexBuffer=null,r=!0),(t.needsGpuRebuild||t.needsComputeRebuild)&&(this._computeIndexBuffer?.dispose(),this._computeIndexBuffer=null,r=!0),r}_createComputeIndexBuffer(e,r){const s=new Uint32Array(r.fillPointer/3);for(let t=0;t<r.fillPointer;t+=3)s[t/3]=r.array[t];return t.createIndex(e,35048,s)}}export{n as GpuMeshState};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
const t=8,e=t-2,c=1e-30,h=64,i=4294967295,o=512,a=256,d=256/360,n=128,p=16777216,r=!1,s=128,f=8,g=10,l=29,m=.25,v=4,w=10,x=1,b=16,j=16,k=o/s,q=8,u=50,y=10,z=24,A=3,B=24,C=8,D=3,E=24,F=8,G=4,H={metrics:{width:15,height:17,left:0,top:-7,advance:14}},I=1024,J=0,K=0,L=0,M=1,N=2,O=3,P=4,Q=5,R=6,S=
|
|
2
|
+
const t=8,e=t-2,c=1e-30,h=64,i=4294967295,o=512,a=256,d=256/360,n=128,p=16777216,r=!1,s=128,f=8,g=10,l=29,m=.25,v=4,w=10,x=1,b=16,j=16,k=o/s,q=8,u=50,y=10,z=24,A=3,B=24,C=8,D=3,E=24,F=8,G=4,H={metrics:{width:15,height:17,left:0,top:-7,advance:14}},I=1024,J=0,K=0,L=0,M=1,N=2,O=3,P=4,Q=5,R=6,S=7,T=8,U=11,V=12,W=13,X=5,Y=6,Z=5,$=6,_=6,tt=_+1,et=1<<_,ct=1<<tt,ht=!1,it=1.05,ot=3,at=1,dt=3,nt=3,pt=512,rt=5,st=6,ft=1.15,gt=2,lt=4,mt=128,vt=256,wt=vt-2*lt,xt=2,bt=128,jt=1,kt=8,qt=500,ut=4,yt=128,zt=1024,At=2,Bt=0,Ct=1,Dt=4,Et=8,Ft=16,Gt=4,Ht=1,It=4,Jt=8,Kt=32,Lt=64,Mt=128,Nt=4,Ot=1,Pt=1<<20,Qt=.75,Rt=10,St=.75,Tt=12,Ut=256,Vt=32,Wt=512,Xt=0,Yt=1;export{Ot as MAX_TILE_RESHUFFLES_PER_FRAME,Rt as RESHUFFLING_EXEMPT_DRAW_CALLS,Pt as RESHUFFLING_EXEMPT_MEMORY_BYTES,St as RESHUFFLING_TARGET_DRAW_EFFICIENCY,Qt as RESHUFFLING_TARGET_MEMORY_EFFICIENCY,N as animationUnit,Ut as attributeStoreInitialSize,I as attributeStoreTextureSize,H as averageGlyphMosaicItem,Yt as backbufferStencilClipped,Xt as backbufferStencilVisible,Kt as bitsetFillHasPatternHeightPrecisionFactor,Lt as bitsetFillHasPatternWidthPrecisionFactor,Jt as bitsetFillHasUnresolvedReplacementColor,It as bitsetFillRandomPatternOffset,Ft as bitsetGenericConsiderAlphaOnly,At as bitsetGenericLockColor,Gt as bitsetLineScaleDash,Ct as bitsetMarkerAlignmentMap,Bt as bitsetMarkerAlignmentScreen,Dt as bitsetMarkerOutlineAllowColorOverride,Et as bitsetMarkerScaleSymbolsProportionally,Ht as bitsetTypeFillOutline,yt as bufferDataMinimumSize,ut as bufferDataPoolSize,g as chartMaxFields,j as collisionBoxPadding,s as collisionBucketSize,b as collisionEarlyRejectBucketSize,x as collisionMaxZoomDelta,q as collisionPlacementPadding,k as collisionTileBoxSize,n as compressionFactorForU16,P as dataDrivenUnit0,Q as dataDrivenUnit1,R as dataDrivenUnit2,r as debugLabels,mt as defaultSdfTextureSize,kt as displayRecordIntPerElement,f as dotDensityMaxFields,tt as effectBitIndex,ct as effectFlag0,ht as enableEarlyLabelDiscard,h as extrudeScale,et as filterFlag0,M as filterFlagsUnit,z as glyphSize,V as gpgpuUnit,jt as gradientTextureExternalPadding,y as heuristicGlyphsPerFeature,u as heuristicGlyphsPerLine,pt as hittestMaskTextureSize,U as hittestMaskTextureUnit,nt as hittestSmallSymbolThreshold,at as hittestToleranceDesktop,ot as hittestToleranceMobile,dt as hittestToleranceSmallSymbol,T as labelAnchorStoreUnit,G as labelPlacementOffsetPadding,S as labelStoreUnit,w as labelU16ZoomPrecisionFactor,W as localTimeOriginUnit,l as magicLabelLineHeight,Tt as maxGeohashLevel,gt as maxGpuUploadsPerFrame,_ as maxHighlightGroups,v as maxLineHeightRatio,p as maxRepresentableInt,Wt as maxTextLineWidth,m as minLineHeightRatio,Vt as minTextLineWidth,c as nanMagicNumber,d as packDegreesU8,qt as patchPixelBufferAllocSize,xt as patternFillRasterizationScale,i as pictureFillColor,zt as randomInsidePolygonTextureSize,a as rasterTileSize,bt as rasterizedVectorMarkerMinSize,D as sdfBufferGlyphSDFCreator,A as sdfBufferServer,F as sdfRadiusComplex,C as sdfRadiusSimple,E as sdfSizeComplex,B as sdfSizeSimple,lt as spritePadding,wt as svgSdfTextureInnerSize,vt as svgSdfTextureSize,L as textureBindingBitmap,K as textureBindingGlyphAtlas,X as textureBindingHighlight0,Y as textureBindingHighlight1,Z as textureBindingRenderer0,$ as textureBindingRenderer1,J as textureBindingSpriteAtlas,Nt as textureUploadManagerBudget,Mt as textureUploadManagerChunkSize,it as thinLineHalfWidthThreshold,o as tileSize,O as visualVariableUnit,ft as vtlHighResCutoff,st as vtlTextureBindingUnitGlyphs,rt as vtlTextureBindingUnitSprites,e as webglMaxInnerStops,t as webglMaxStops};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import t from"../DisplayEntity.js";import e from"../DisplayRecord.js";import{VertexDataWriter as r}from"./VertexDataWriter.js";import i from"../util/Writer.js";class n{constructor(e,r=0){this._id=e,this._sizeHint=r,this._entityRecordCountOffset=0,this._entityCountOffset=0,this._entityIdIndex=0,this._entitySortKeyIndex=0,this._didEntityStart=!1,this._instanceIdToVertexData=new Map,this._recordIndexStart=0,this._recordIndexCount=0,this._recordVertexStart=0,this._recordVertexCount=0,this._current={metric:null,writer:null,start:0,sortKey:0,instanceId:0,layoutHash:0,indexStart:0,vertexStart:0,textureKey:0,metricBoxLenPointer:0},this._requiresRefresh=!1,this._entities=new i(Uint32Array,this._sizeHint*t.byteSizeHint),this._entityCountOffset=this._entities.push(0)}get id(){return this._id}serialize(){const t=new Array,e=[],r=this._entities.buffer();for(const i of this._instanceIdToVertexData.values())e.push(i.serialize(t));return{message:{data:e,entities:r},transferList:t}}get requiresRefresh(){return this._requiresRefresh}set requiresRefresh(t){this._requiresRefresh=t}vertexStart(){return this._current.vertexStart??0}vertexCount(){return this._current.writer?.vertexCount??0}indexCount(){return this._current.writer?.indexCount??0}vertexEnsureSize(t){this._current.writer.vertexEnsureSize(t)}indexEnsureSize(t){this._current.writer.indexEnsureSize(t)}vertexWrite(t){this._current.writer.writeVertex(t)}vertexWriteRegion(t){this._current.writer.writeVertexRegion(t)}vertexWriteF32(t){this._current.writer.writeVertexF32(t)}recordBounds(t,e,r,i){}indexWrite(t){this._current.writer.writeIndex(t)}metricStart(t){this._current.metric=t,this._current.metric.recordStart=this.recordCount()}metricEnd(){const t=this._current.writer;this._current.metric&&(this._current.metric.recordCount=this.recordCount()-this._current.metric.recordStart),this._current.metric?.bounds.length&&this._current.metric?.recordCount?(
|
|
2
|
+
import t from"../DisplayEntity.js";import e from"../DisplayRecord.js";import{VertexDataWriter as r}from"./VertexDataWriter.js";import i from"../util/Writer.js";class n{constructor(e,r=0){this._id=e,this._sizeHint=r,this._entityRecordCountOffset=0,this._entityCountOffset=0,this._entityIdIndex=0,this._entitySortKeyIndex=0,this._didEntityStart=!1,this._instanceIdToVertexData=new Map,this._recordIndexStart=0,this._recordIndexCount=0,this._recordVertexStart=0,this._recordVertexCount=0,this._pendingMetrics=[],this._current={metric:null,writer:null,start:0,sortKey:0,instanceId:0,layoutHash:0,indexStart:0,vertexStart:0,textureKey:0,metricBoxLenPointer:0},this._requiresRefresh=!1,this._entities=new i(Uint32Array,this._sizeHint*t.byteSizeHint),this._entityCountOffset=this._entities.push(0)}get id(){return this._id}serialize(){const t=new Array,e=[],r=this._entities.buffer();for(const i of this._instanceIdToVertexData.values())e.push(i.serialize(t));return{message:{data:e,entities:r},transferList:t}}get requiresRefresh(){return this._requiresRefresh}set requiresRefresh(t){this._requiresRefresh=t}vertexStart(){return this._current.vertexStart??0}vertexCount(){return this._current.writer?.vertexCount??0}indexCount(){return this._current.writer?.indexCount??0}vertexEnsureSize(t){this._current.writer.vertexEnsureSize(t)}indexEnsureSize(t){this._current.writer.indexEnsureSize(t)}vertexWrite(t){this._current.writer.writeVertex(t)}vertexWriteRegion(t){this._current.writer.writeVertexRegion(t)}vertexWriteF32(t){this._current.writer.writeVertexF32(t)}recordBounds(t,e,r,i){}indexWrite(t){this._current.writer.writeIndex(t)}metricStart(t){this._current.metric=t,this._current.metric.recordStart=this.recordCount()}metricEnd(){const t=this._current.writer;this._current.metric&&(this._current.metric.recordCount=this.recordCount()-this._current.metric.recordStart),this._current.metric?.bounds.length&&this._current.metric?.recordCount?(this._pendingMetrics.push({metric:this._current.metric,writer:t}),this._current.metric=null):this._current.metric=null}metricBoxWrite(t){this._current.metric.bounds.push(t)}entityStart(t,e=t){this._entityIdIndex=this._entities.push(t),this._entitySortKeyIndex=this._entities.writeF32(e),this._entityRecordCountOffset=this._entities.push(0),this._didEntityStart=!0}entityRecordCount(){return this._entities.getValue(this._entityRecordCountOffset)}entityEnd(){if(!this._didEntityStart)return;for(const{metric:t,writer:e}of this._pendingMetrics)e.writeMetric(t);this._pendingMetrics.length=0;0===this.entityRecordCount()?this._entities.seek(this._entityIdIndex):this._entities.incr(this._entityCountOffset),this._didEntityStart=!1}recordCount(){return this._entities.getValue(this._entityRecordCountOffset)}recordStart(t,e,r=0){this._current.writer=this._getVertexWriter(t,e),this._current.indexStart=this._current.writer.indexCount,this._current.vertexStart=this._current.writer.vertexCount,this._current.instanceId=t,this._current.layoutHash=e.hash,this._current.textureKey=r}withRecord(t,e,r,i){return this.recordStart(t,e,r??void 0),i(),this.recordEnd()}writeWithoutBuffering(t){t()}recordEnd(t=0){const r=this._current.vertexStart,i=this._current.writer.vertexCount-r;if(!i)return!1;const n=this._current.indexStart,s=this._current.writer.indexCount-n;return this._recordIndexStart=n,this._recordIndexCount=s,this._recordVertexStart=r,this._recordVertexCount=i,this._entities.incr(this._entityRecordCountOffset),e.write(this._entities,this._current.instanceId,this._current.textureKey,n,s,r,i,t),!0}copyLast(t,r){const i=this._recordVertexStart+this._recordVertexCount;this._entities.incr(this._entityRecordCountOffset),e.write(this._entities,this._current.instanceId,this._current.textureKey,this._recordIndexStart+this._recordIndexCount,this._recordIndexCount,i,this._recordVertexCount,0);const n=this._current.writer.indexWriter,s=this._current.writer.vertexWriter,c=this._recordIndexStart+this._recordIndexCount,o=this._recordVertexCount;for(let e=this._recordIndexStart;e!==c;e++){const t=n.getValue(e);n.push(t+o)}const u=this._current.writer.layout.stride/Uint32Array.BYTES_PER_ELEMENT,h=this._recordVertexStart*u,_=(this._recordVertexStart+this._recordVertexCount)*u;for(let e=h;e!==_;e++){const t=s.getValue(e);s.push(t)}const d=this._current.writer.layout.position,a=d.packPrecisionFactor??1,x=d.offset/Uint32Array.BYTES_PER_ELEMENT,y=t*a,f=r*a;for(let e=i*u;e<=s.length;e+=u)s.i1616Add(e+x,y,f)}copyLastFrom(t,e,r){const i=t._entities.getValue(t._entityIdIndex),n=this._entities.getValue(this._entityIdIndex);if(!this._didEntityStart||i!==n){const e=t._entities.getValueF32(t._entitySortKeyIndex);this.entityStart(i,e)}this.recordStart(t._current.instanceId,t._current.writer.layout,t._current.textureKey);const s=this._current.writer.layout.stride/Uint32Array.BYTES_PER_ELEMENT,c=this._current.vertexStart,o=t._current.vertexStart-c,u=this._current.writer.indexWriter,h=this._current.writer.vertexWriter,_=t._current.writer.indexWriter,d=t._current.writer.vertexWriter;for(let l=t._current.indexStart;l!==_.length;l++){const t=_.getValue(l);u.push(t-o)}for(let l=t._current.vertexStart*s;l!==d.length;l++){const t=d.getValue(l);h.push(t)}const a=this._current.writer.layout.position,x=a.packPrecisionFactor??1,y=a.offset/Uint32Array.BYTES_PER_ELEMENT,f=e*x,S=r*x;for(let l=c*s;l<=h.length;l+=s)h.i1616Add(l+y,f,S);this.recordEnd()}_getVertexWriter(t,e){const i=this._instanceIdToVertexData;return i.has(t)||i.set(t,new r(t,e,this._sizeHint)),i.get(t)}}export{n as MeshData};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import has from"../../../../../core/has.js";import"../../../tiling/TileInfoView.js";import e from"../../../tiling/TileKey.js";import"../../../tiling/TileQueue.js";import"../../../tiling/TileStrategy.js";import{tileSize as s}from"../definitions.js";import{MeshData as t}from"./MeshData.js";const r=!!has("featurelayer-pixel-buffering-enabled"),i=1,n=2,h=4,o=8,c=16,
|
|
2
|
+
import has from"../../../../../core/has.js";import"../../../tiling/TileInfoView.js";import e from"../../../tiling/TileKey.js";import"../../../tiling/TileQueue.js";import"../../../tiling/TileStrategy.js";import{tileSize as s}from"../definitions.js";import{MeshData as t}from"./MeshData.js";const r=!!has("featurelayer-pixel-buffering-enabled"),i=1,n=2,h=4,o=8,c=16,f=32,u=64,a=128;function l(e){switch(e){case i:case o:case f:return-1;case n:case u:return 0;case h:case c:case a:return 1}}function m(e){switch(e){case i:case n:case h:return-1;case o:case c:return 0;case f:case u:case a:return 1}}const _=i|o|f,d=h|c|a,p=i|n|h,g=f|u|a;class y{constructor(e,s,i,n=0){this.tileKey=e,this._sizeHint=n,this._meshes={self:new t(this.id,this._sizeHint),neighbors:new Array},this._currentRecordOverlaps=0,this._currentEntityOverlaps=0,this._suppressPixelBuffering=!1;const h=i?1:0;this._copyBufferedDataIntoSelf=s&&r&&e.level===h}get id(){return this.tileKey.id}get requiresRefresh(){return this._meshes.self.requiresRefresh||this._meshes.neighbors.some(e=>e.requiresRefresh)}set requiresRefresh(e){this._meshes.self.requiresRefresh=e}vertexStart(){return this._meshes.self.vertexStart()??0}vertexCount(){return this._meshes.self.vertexCount()}indexCount(){return this._meshes.self.indexCount()}indexEnsureSize(e){this._meshes.self.indexEnsureSize(e)}entityStart(e,s=e){this._currentEntityOverlaps=0,this._meshes.self.entityStart(e,s)}entityRecordCount(){return this._meshes.self.entityRecordCount()}entityEnd(){if(this._meshes.self.entityEnd(),r){if(this._copyBufferedDataIntoSelf)return;for(let e=0;e<8;e++){const s=1<<e;!!(this._currentEntityOverlaps&s)&&this._meshes.neighbors[e].entityEnd()}}}recordStart(e,s,t){this._currentRecordOverlaps=0,this._meshes.self.recordStart(e,s,t)}withRecord(e,s,t,r){return this.recordStart(e,s,t??void 0),r(),this.recordEnd()}writeWithoutBuffering(e){const s=this._suppressPixelBuffering;this._suppressPixelBuffering=!0;try{e()}finally{this._suppressPixelBuffering=s}}recordEnd(e=0){const s=this._meshes.self.recordEnd(this._currentRecordOverlaps);return s&&!this._suppressPixelBuffering&&0!==this._currentRecordOverlaps?(this._copyIntoNeighbors(),this._currentEntityOverlaps|=this._currentRecordOverlaps,!0):s}recordBounds(e,s,t,i){r&&!this._suppressPixelBuffering&&this._addOverlap(e,s,t,i)}recordCount(){return this._meshes.self.recordCount()}metricStart(e){this._meshes.self.metricStart(e)}metricBoxWrite(e){this._meshes.self.metricBoxWrite(e)}metricEnd(){this._meshes.self.metricEnd()}vertexWrite(e){this._meshes.self.vertexWrite(e)}vertexWriteF32(e){this._meshes.self.vertexWriteF32(e)}vertexWriteRegion(e){this._meshes.self.vertexWriteRegion(e)}indexWrite(e){this._meshes.self.indexWrite(e)}serialize(s){const t={message:[],transferList:[]},r=this._meshes.self.serialize();return t.message.push({tileId:this.tileKey.id,requiresRefresh:this.requiresRefresh,...r.message}),t.transferList.push(...r.transferList),this._meshes.neighbors.forEach((r,i)=>{const n=r.serialize(),h=1<<i,o=l(h),c=m(h),f=new e(this.tileKey).getNormalizedNeighbor(o,c,s);t.message.push({tileId:f.id,requiresRefresh:this.requiresRefresh,...n.message}),t.transferList.push(...n.transferList)}),t}_addOverlap(e,t,r,i){const n=Math.min(s/2,r),h=Math.min(s/2,i),o=255^((e<0+n?d:e>=s-n?_:d|_)|(t<0+h?g:t>=s-h?p:g|p));this._currentRecordOverlaps|=o}_copyIntoNeighbors(){for(let e=0;e<8;e++){const r=1<<e;if(!!(this._currentRecordOverlaps&r)){if(this._copyBufferedDataIntoSelf){const e=-l(r)*s,t=-m(r)*s;if(0!==t)continue;this._meshes.self.copyLast(e,t);continue}if(!this._meshes.neighbors[e]){const s=Math.floor(this._sizeHint/16);this._meshes.neighbors[e]=new t(r,s)}const i=this._meshes.neighbors[e],n=-l(r)*s,h=-m(r)*s;i.copyLastFrom(this._meshes.self,n,h)}}}}export{y as MultiTileMeshData};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
const t=t=>new o(t.out,t.scaleFactor);class o{constructor(t,o){this._out=t,this._scaleFactor=o}handles(t){return null!=t.calloutReference}coordinateWrite(t,o,l,e){const s=o.calloutReference,u=s?.getCalloutVisualCount?.()??1;for(let n=0;n<u;n++)s?.setCalloutVisualIndex?.(n),this._writeVisual(t,s,e)}_writeVisual(t,o,l){const e=this._out.recordCount();o?.calloutRecordsUseLabelPhase?this._out.writeWithoutBuffering(l):l();const s=this._out.recordCount()-e;if(0===s)return;o?.includeCalloutRecordRange?.(e,s);const u=t.getCalloutCollisionBounds(this._scaleFactor);u&&o?.includeCalloutCollisionBounds?.(u);for(const n of t.getCalloutPartCollisionBounds(this._scaleFactor))o?.includeCalloutPartCollisionBounds?.(n)}}export{t as createCalloutMeshWriterCoordinator};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{
|
|
2
|
+
import{createCalloutMeshWriterCoordinator as e}from"./CalloutMeshWriterCoordinator.js";import{AMeshFactory as t}from"./MeshFactory.js";import{MeshWriterGroupCoordinator as o}from"./MeshWriterGroupCoordinator.js";import{createMatcher as r}from"../../util/createMatcher.js";class s extends t{static async create(e,t){const o=await r(e,t.symbology),i=t.labels?await r(e,t.labels):null;return new s(o,i)}constructor(e,t){super(),this._symbology=e,this._labels=t}destroy(){}async enqueueMatcherRequests(e,t,o,r){await Promise.all([this._symbology.fetchResources(e,t,o,r),this._labels?.fetchResources(e,t,o,r)])}enqueueWriterRequests(e,t,o,r,s){const i=this._symbology.match(t,o,r,s);if(i){for(const r of i.writers)r.enqueueRequest(e,t,o);if(this._labels)for(const i of this._labels.matchGroups(t,o,r,s))for(const r of i.writers)r.enqueueRequest(e,t,o)}}write(t,r,s,i,n,a,c,l){const u=null!=l?l/i.$view.scale:void 0,h=this._symbology.match(s,i,n,t.id);if(!h)return;let y=null;h.requiresCoordination?(y=new o({out:t,proxy:r,feature:s,options:i,level:a,viewExtent:c,scaleFactor:u,coordinatorFactories:[e]}),y.coordinateAndWrite(h,{matcher:this._symbology})):this._writeUncoordinated(h,t,r,s,i,a,c,u,this._symbology),this._symbology.cleanup(r,s,t.id,i,n);if(t.entityRecordCount()>=1&&this._labels)for(const d of this._labels.matchGroups(s,i,n,t.id))d.requiresCoordination?(y??=new o({out:t,proxy:r,feature:s,options:i,level:a,viewExtent:c,scaleFactor:u,coordinatorFactories:[e]}),y.coordinateAndWrite(d,{externalReferences:h.exports})):this._writeUncoordinated(d,t,r,s,i,a,c,u)}getSortKey(e,t){return this._symbology.getSortKey(e,t)}hasArcadeDependency(e){return!(!this._symbology.hasArcadeDependency(e)&&!this._labels?.hasArcadeDependency(e))}_writeUncoordinated(e,t,o,r,s,i,n,a,c){for(const l of e.writers)l.setReferences(null),l.write(t,o,r,s,i,n,a,c)}}export{s as FeatureMeshFactory};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
class e{constructor(e){this._context=e,this._coordinators=(e.coordinatorFactories??[]).map(t=>t({out:e.out,scaleFactor:e.scaleFactor}))}coordinateAndWrite(e,t={}){const r=[...e.writers],n=new Set;for(;r.length>0;){const o=this._getNextWriter(e,r,n,t.externalReferences);if(!o)throw new Error("InternalError: mesh writer dependency graph contains a cycle");const[s]=r.splice(o.index,1),c=o.references;s.setReferences(c.writers.length?[...c.writers]:null),this._coordinateWrite(s,c,t.matcher),n.add(s)}}_getNextWriter(e,t,r,n){for(let o=0;o<t.length;o++){const s=t[o],c=this._getReferences(e,s,n);if(c.internal.every(e=>r.has(e)))return{index:o,references:c}}return null}_write(e,t){const{out:r,proxy:n,feature:o,options:s,level:c,viewExtent:i,scaleFactor:a}=this._context;e.write(r,n,o,s,c,i,a,t)}_coordinateWrite(e,t,r){const n=this._coordinators.filter(e=>e.handles(t)),o=s=>{const c=n[s];c?c.coordinateWrite(e,t,r,()=>o(s+1)):this._write(e,r)};o(0)}_getReferences(e,t,r){const n=[],o=[];let s=null;for(const c of e.dependencies.get(t)??[]){if(c.external){const e=r?.get(c.type);if(!e)continue;n.push(e);continue}const e=c.writer;o.push(e),n.push(e),"callout-body"===c.type&&(s=e)}return{writers:n,internal:o,calloutReference:s}}}export{e as MeshWriterGroupCoordinator};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
function t(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function e(t,e){return Math.sqrt(t*t+e*e)}function n(t){const n=e(t[0],t[1]);t[0]/=n,t[1]/=n}function s(t,n){return e(t[0]-n[0],t[1]-n[1])}function i(t,e){
|
|
2
|
+
function t(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function e(t,e){return Math.sqrt(t*t+e*e)}function n(t){const n=e(t[0],t[1]);t[0]/=n,t[1]/=n}function s(t,n){return e(t[0]-n[0],t[1]-n[1])}function i(t,e,n){let s=e,i=n,r=1/0;for(const h of t)for(let t=0;t<h.length;t++){const a=h[t],d=h[t+1];if(!d){const t=e-a[0],h=n-a[1],d=t*t+h*h;d<r&&(s=a[0],i=a[1],r=d);continue}const u=d[0]-a[0],c=d[1]-a[1],o=u*u+c*c,_=0===o?0:Math.max(0,Math.min(1,((e-a[0])*u+(n-a[1])*c)/o)),g=a[0]+_*u,l=a[1]+_*c,x=e-g,f=n-l,y=x*x+f*f;y<r&&(s=g,i=l,r=y)}return[s,i]}function r(t,e){return t[e+1]}function h(t){return t.length-1}function a(t){let e=0;for(let n=0;n<h(t);n++)e+=d(t,n);return e}function d(t,e,n=1){let[s,i]=r(t,e);return[s,i]=[Math.round(s),Math.round(i)],Math.sqrt(s*s+i*i)*n}class u{constructor(t,e,n,s,i){this._segments=t,this._index=e,this._distance=n,this._xStart=s,this._yStart=i,this._done=!1}static create(t){return new u(t,0,0,t[0][0],t[0][1])}clone(){return new u(this._segments,this._index,this._distance,this.xStart,this.yStart)}equals(t){return this._index===t._index||t._index===this._index-1&&(0===this._distance||1===t._distance)||t._index===this._index+1&&(1===this._distance||0===t._distance)}leq(t){return this._index<t._index||this._index===t._index&&this._distance<=t._distance}geq(t){return this._index>t._index||this._index===t._index&&this._distance>=t._distance}get _segment(){return this._segments[this._index+1]}get angle(){const t=this.dy,e=(0*t+-1*-this.dx)/(1*this.length);let n=Math.acos(e);return t>0&&(n=2*Math.PI-n),n}get xStart(){return this._xStart}get yStart(){return this._yStart}get x(){return this.xStart+this.distance*this.dx}get y(){return this.yStart+this.distance*this.dy}get dx(){return this._segment[0]}get dy(){return this._segment[1]}get xMidpoint(){return this.xStart+.5*this.dx}get yMidpoint(){return this.yStart+.5*this.dy}get xEnd(){return this.xStart+this.dx}get yEnd(){return this.yStart+this.dy}get length(){const{dx:t,dy:e}=this;return Math.sqrt(t*t+e*e)}get remainingLength(){return this.length*(1-this._distance)}get backwardLength(){return this.length*this._distance}get distance(){return this._distance}get done(){return this._done}hasPrev(){return this._index-1>=0}hasNext(){return this._index+1<h(this._segments)}next(){return this.hasNext()?(this._xStart+=this.dx,this._yStart+=this.dy,this._distance=0,this._index+=1,this):null}prev(){return this.hasPrev()?(this._index-=1,this._xStart-=this.dx,this._yStart-=this.dy,this._distance=1,this):(this._done=!0,null)}_seekBackwards(t,e){const n=this.backwardLength;if(t<=n)return this._distance=(n-t)/this.length,this;let s=this.backwardLength;for(;this.prev();){if(s+this.length>t)return this._seekBackwards(t-s);s+=this.length}return this._distance=0,e?this:null}seek(t,e=!1){if(t<0)return this._seekBackwards(Math.abs(t),e);if(t<=this.remainingLength)return this._distance=(this.backwardLength+t)/this.length,this;let n=this.remainingLength;for(;this.next();){if(n+this.length>t)return this.seek(t-n,e);n+=this.length}return this._distance=1,e?this:null}}function c(t,e,n,s=!0){const i=a(t);if(0===i)return;const r=u.create(t),h=i/2;if(!s)return r.seek(h),void n(r.clone(),0,h+0*e,i);const d=Math.max((i-e)/2,0),c=Math.floor(d/e),o=h-c*e;r.seek(o);for(let a=-c;a<=c;a++)n(r.clone(),a,h+a*e,i),r.seek(e)}function o(t,e){const n=e;for(let s=0;s<t.length;s++){let e=t[s];_(e,n);const i=[];i.push(e[0]);for(let t=1;t<e.length;t++){const[n,s]=e[t-1],[r,h]=e[t],a=r-n,d=h-s;i.push([a,d])}t[s]=i,e=i}return t}function _(e,i){const r=1e-6;if(i<=0)return;const h=e.length;if(h<3)return;const a=[];let d=0;a.push(0);for(let t=1;t<h;t++)d+=s(e[t],e[t-1]),a.push(d);i=Math.min(i,.2*d);const u=[];u.push(e[0][0]),u.push(e[0][1]);const c=e[h-1][0],o=e[h-1][1],_=t([0,0],e[0],e[1]);n(_),e[0][0]+=i*_[0],e[0][1]+=i*_[1],t(_,e[h-1],e[h-2]),n(_),e[h-1][0]+=i*_[0],e[h-1][1]+=i*_[1];for(let t=1;t<h;t++)a[t]+=i;a[h-1]+=i;const g=.5*i;for(let t=1;t<h-1;t++){let n=0,s=0,d=0;for(let h=t-1;h>=0&&!(a[h+1]<a[t]-g);h--){const u=g+a[h+1]-a[t],c=a[h+1]-a[h],o=a[t]-a[h]<g?1:u/c;if(Math.abs(o)<r)break;const _=o*o,l=o*u-.5*_*c,x=o*c/i,f=e[h+1],y=e[h][0]-f[0],S=e[h][1]-f[1];n+=x/l*(f[0]*o*u+.5*_*(u*y-c*f[0])-_*o*c*y/3),s+=x/l*(f[1]*o*u+.5*_*(u*S-c*f[1])-_*o*c*S/3),d+=x}for(let u=t+1;u<h&&!(a[u-1]>a[t]+g);u++){const h=g-a[u-1]+a[t],c=a[u]-a[u-1],o=a[u]-a[t]<g?1:h/c;if(Math.abs(o)<r)break;const _=o*o,l=o*h-.5*_*c,x=o*c/i,f=e[u-1],y=e[u][0]-f[0],S=e[u][1]-f[1];n+=x/l*(f[0]*o*h+.5*_*(h*y-c*f[0])-_*o*c*y/3),s+=x/l*(f[1]*o*h+.5*_*(h*S-c*f[1])-_*o*c*S/3),d+=x}u.push(n/d),u.push(s/d)}u.push(c),u.push(o);for(let t=0,n=0;t<h;t++)e[t][0]=u[n++],e[t][1]=u[n++]}export{u as SegmentCursor,i as closestPointOnPaths,c as pathDivide,a as pathLength,r as segmentAt,h as segmentCount,d as segmentLength,o as smoothPaths};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as t}from"tslib";import{ShaderPrimitiveNode as e,cloneShaderNode as n,ShaderPropertyAccessNode as r,ShaderPropertyAccess2DNode as i,ShaderFunctionNode as c,ShaderConditionNode as s,ShaderArrayWriteNode as u,ShaderArrayReadNode as o,ShaderBlockNode as h,ShaderScopeNode as l}from"./ShaderGraphNode.js";var a,p,f,d,y,w,m,v,b,g,x,I,E;function $(t){switch(t.type){case"uint":return C;case"uvec2":return X;case"uvec3":return Y;case"uvec4":return _;default:throw new Error("Found unexpected type")}}function z(t){switch(t.type){case"float":return A;case"vec2":return G;case"vec3":return H;case"vec4":return V;default:throw new Error("Found unexpected type")}}function T(t){switch(t.type){case"int":return C;case"ivec2":return X;case"ivec3":return Y;case"ivec4":return _;default:throw new Error("Found unexpected type")}}function N(t){switch(t.type){case"float":return W;case"vec2":return Z;case"vec3":return tt;case"vec4":return et;default:throw new Error("Found unexpected type")}}function D(t){switch(t.type){case"bool":case"float":case"int":case"uint":return J;case"bvec2":case"vec2":case"ivec2":case"uvec2":return K;case"bvec3":case"vec3":case"ivec3":case"uvec3":return L;case"bvec4":case"vec4":case"ivec4":case"uvec4":return Q;default:throw new Error("Unable to handle type")}}function F(t){switch(t.type){case"bool":case"bvec2":case"bvec3":case"bvec4":return J;case"float":case"vec2":case"vec3":case"vec4":return C;case"int":case"ivec2":case"ivec3":case"ivec4":return W;case"uint":case"uvec2":case"uvec3":case"uvec4":return A;default:throw new Error("Unable to handle type")}}function k(t){switch(t.type){case"float":case"int":case"uint":case"bool":case"sampler2D":return 1;case"vec2":case"ivec2":case"uvec2":case"bvec2":return 2;case"vec3":case"ivec3":case"uvec3":case"bvec3":return 3;case"vec4":case"ivec4":case"uvec4":case"bvec4":case"mat2":return 4;case"mat3":return 9;case"mat4":return 16;case"array":case"array-2d":return t.size*k(t.elementType)}}function M(t){const e=[["float","vec2","vec3","vec4"],["int","ivec2","ivec3","ivec4"],["uint","uvec2","uvec3","uvec4"],["bool","bvec2","bvec3","bvec4"]];for(const n of e)if(n.includes(t))return n.map(t=>ct[t]);throw new Error("Unable to find type family")}function S(t){return new Proxy(t,{get(e,n){if("constructor"===n)return new Proxy(e.constructor,{construct:(t,e,n)=>S(new t(...e))});if(n in e)return e[n];if("string"==typeof n){const e=M(t.type);return dt(t,n,e[n.length-1])}}})}function R(t){return new Proxy(t,{construct:(t,e,n)=>S(new t(...e))})}function j(t,e){if(!Number.isSafeInteger(t)||t<0||t>=e)throw new B}class B extends Error{}class q extends e{static{this.type="array"}constructor(t,e,n=null){super(),this.elementType=t,this.size=e,this.writeNode=n,this.type="array"}get children(){return this.writeNode?[this.writeNode]:[this.elementType]}clone(){const t=this.writeNode?n(this.writeNode):null,e=new q(n(this.elementType),this.size,t);return super.cloneInto(e),e}set(t,e){return"number"==typeof t&&j(t,this.size),new q(n(this.elementType),this.size,new u(this,t,e))}get(t,e){"number"==typeof t&&j(t,this.size);const n=null!=e?new W(e):null;if(null!=n){const e=F(this.elementType.constructor);return yt(this,new W(t),n,e)}return wt(this,t,this.elementType.constructor)}last(){return this.get(this.size-1)}first(){return this.get(0)}findIndex(t,e,n){return $t(this,t,e,n)}glslFindIndex(t,e,n){return zt(this,t,e,n)}static ofType(t,e){const n=t;return class extends q{static{this.elementType=t}static{this.size=e}constructor(){super(new n,e)}}}}class U extends e{static{this.type="array-2d"}constructor(t,e,n,r=!1){super(),this.elementType=t,this.xSize=e,this.ySize=n,this.isRowMajor=r,this.type="array-2d",this.children=Array(e*n).fill(t)}clone(){const t=new U(n(this.elementType),this.xSize,this.ySize,this.isRowMajor);return t.children=this.children.map(n),super.cloneInto(t),t}get size(){return this.xSize*this.ySize}get(t,e){return this.isRowMajor?this._getRowMajor(t,e):this._getColumnMajor(t,e)}_getColumnMajor(t,e){const n=new W(t);return dt(this,new W(e).add(n.multiply(this.xSize)),this.elementType.constructor)}_getRowMajor(t,e){const n=new W(t),r=new W(e);return dt(this,n.add(r.multiply(this.ySize)),this.elementType.constructor)}static ofType(t,e,n,r=!1){return new Proxy(q,{construct:(i,c)=>new U(new t,e,n,r)})}}class P extends e{constructor(){super(...arguments),this.type="sampler2D",this.children=[]}static{this.type="sampler2D"}clone(){const t=new P;return t.children=this.children.map(n),super.cloneInto(t),t}}class C extends e{static{this.type="float"}constructor(t){super(),this.type="float",this.children=[t]}clone(){const t=new C(n(this.children[0]));return super.cloneInto(t),t}multiply(t){return Ft(this,"number"==typeof t?O(t,C):t)}divide(t){return kt(this,"number"==typeof t?O(t,C):t)}add(t){return Mt(this,"number"==typeof t?O(t,C):t)}subtract(t){return St(this,"number"==typeof t?O(t,C):t)}}let X=class extends e{static{a=this}static{this.type="vec2"}constructor(t,e){super(),this.type="vec2",this.children=[t,e].filter(t=>null!=t)}clone(){const t=new a(n(this.children[0]),n(this.children[1]));return super.cloneInto(t),t}get 0(){return dt(this,"[0]",C)}get 1(){return dt(this,"[1]",C)}get 2(){throw new B}get 3(){throw new B}multiply(t){return Ft(this,"number"==typeof t?O(t,C):t)}divide(t){return kt(this,"number"==typeof t?O(t,C):t)}add(t){return Mt(this,"number"==typeof t?O(t,C):t)}subtract(t){return St(this,"number"==typeof t?O(t,C):t)}};X=a=t([R],X);let Y=class extends e{static{p=this}static{this.type="vec3"}constructor(t,e,n){super(),this.type="vec3",this.children=[t,e,n].filter(t=>null!=t)}get 0(){return dt(this,"[0]",C)}get 1(){return dt(this,"[1]",C)}get 2(){return dt(this,"[2]",C)}get 3(){throw new B}clone(){const t=new p(n(this.children[0]),n(this.children[1]),n(this.children[2]));return super.cloneInto(t),t}multiply(t){return Ft(this,"number"==typeof t?O(t,C):t)}divide(t){return kt(this,"number"==typeof t?O(t,C):t)}add(t){return Mt(this,"number"==typeof t?O(t,C):t)}subtract(t){return St(this,"number"==typeof t?O(t,C):t)}};Y=p=t([R],Y);let _=class extends e{static{f=this}static{this.type="vec4"}constructor(t,e,n,r){super(),this.type="vec4",this.children=[t,e,n,r].filter(t=>null!=t)}clone(){const t=new f(n(this.children[0]),n(this.children[1]),n(this.children[2]),n(this.children[3]));return super.cloneInto(t),t}get 0(){return dt(this,"[0]",C)}get 1(){return dt(this,"[1]",C)}get 2(){return dt(this,"[2]",C)}get 3(){return dt(this,"[3]",C)}multiply(t){return Ft(this,"number"==typeof t?O(t,C):t)}divide(t){return kt(this,"number"==typeof t?O(t,C):t)}add(t){return Mt(this,"number"==typeof t?O(t,C):t)}subtract(t){return St(this,"number"==typeof t?O(t,C):t)}};_=f=t([R],_);let A=class extends e{static{d=this}static{this.type="uint"}constructor(t){super(),this.type="uint",this.children=[t]}clone(){const t=new d(n(this.children[0]));return super.cloneInto(t),t}multiply(t){return Ft(this,O(t,d))}add(t){return Mt(this,O(t,d))}subtract(t){return St(this,O(t,d))}divide(t){return kt(this,O(t,d))}};A=d=t([R],A);let G=class extends e{static{y=this}static{this.type="uvec2"}constructor(t,e){super(),this.type="uvec2",this.children=[t,e].filter(t=>null!=t)}clone(){const t=new y(n(this.children[0]),n(this.children[1]));return super.cloneInto(t),t}get 0(){return dt(this,"[0]",W)}get 1(){return dt(this,"[1]",W)}get 2(){throw new B}get 3(){throw new B}multiply(t){return Ft(this,"number"==typeof t?O(t,A):t)}divide(t){return kt(this,"number"==typeof t?O(t,A):t)}add(t){return Mt(this,"number"==typeof t?O(t,A):t)}subtract(t){return St(this,"number"==typeof t?O(t,A):t)}};G=y=t([R],G);let H=class extends e{static{w=this}static{this.type="uvec3"}constructor(t,e,n){super(),this.type="uvec3",this.children=[t,e,n].filter(t=>null!=t)}clone(){const t=new w(n(this.children[0]),n(this.children[1]),n(this.children[2]));return super.cloneInto(t),t}get 0(){return dt(this,"[0]",A)}get 1(){return dt(this,"[1]",A)}get 2(){return dt(this,"[2]",A)}get 3(){throw new B}multiply(t){return Ft(this,"number"==typeof t?O(t,A):t)}divide(t){return kt(this,"number"==typeof t?O(t,A):t)}add(t){return Mt(this,"number"==typeof t?O(t,A):t)}subtract(t){return St(this,"number"==typeof t?O(t,A):t)}};H=w=t([R],H);let V=class extends e{static{m=this}static{this.type="uvec4"}constructor(t,e,n,r){super(),this.type="uvec4",this.children=[t,e,n,r].filter(t=>null!=t)}clone(){const t=new m(n(this.children[0]),n(this.children[1]),n(this.children[2]),n(this.children[3]));return super.cloneInto(t),t}get 0(){return dt(this,"[0]",A)}get 1(){return dt(this,"[1]",A)}get 2(){return dt(this,"[2]",A)}get 3(){return dt(this,"[3]",A)}multiply(t){return Ft(this,"number"==typeof t?O(t,A):t)}divide(t){return kt(this,"number"==typeof t?O(t,A):t)}add(t){return Mt(this,"number"==typeof t?O(t,A):t)}subtract(t){return St(this,"number"==typeof t?O(t,A):t)}};V=m=t([R],V);class J extends e{static{this.type="bool"}constructor(t){super(),this.type="bool",this.children=[t]}and(t){return Ot(this,t)}or(t){return Vt(this,t)}xor(t){return Kt(this,t)}clone(){const t=new J(n(this.children[0]));return super.cloneInto(t),t}}let K=class extends e{static{v=this}static{this.type="bvec2"}constructor(t,e){super(),this.type="bvec2",this.children=[t,e].filter(t=>null!=t)}all(){return ee(this)}any(){return ne(this)}clone(){const t=new v(n(this.children[0]),n(this.children[1]));return super.cloneInto(t),t}};K=v=t([R],K);let L=class extends e{static{b=this}static{this.type="bvec3"}constructor(t,e,n){super(),this.type="bvec3",this.children=[t,e,n].filter(t=>null!=t)}all(){return ee(this)}any(){return ne(this)}clone(){const t=new b(n(this.children[0]),n(this.children[1]),n(this.children[2]));return super.cloneInto(t),t}};function O(t,e){if("number"==typeof t){return new e(t)}return t}L=b=t([R],L);let Q=class extends e{static{g=this}static{this.type="bvec4"}constructor(t,e,n,r){super(),this.type="bvec4",this.children=[t,e,n,r].filter(t=>null!=t)}all(){return ee(this)}any(){return ne(this)}clone(){const t=new g(n(this.children[0]),n(this.children[1]),n(this.children[2]),n(this.children[3]));return super.cloneInto(t),t}};Q=g=t([R],Q);class W extends e{static{this.type="int"}constructor(t){super(),this.type="int",this.children=[t]}multiply(t){return Ft(this,O(t,W))}add(t){return Mt(this,O(t,W))}subtract(t){return St(this,O(t,W))}divide(t){return kt(this,O(t,W))}clone(){const t=new W(n(this.children[0]));return super.cloneInto(t),t}}let Z=class extends e{static{x=this}static{this.type="ivec2"}constructor(t,e){super(),this.type="ivec2",this.children=[t,e].filter(t=>null!=t)}clone(){const t=new x(n(this.children[0]),n(this.children[1]));return super.cloneInto(t),t}get 0(){return dt(this,"[0]",W)}get 1(){return dt(this,"[1]",W)}get 2(){throw new B}get 3(){throw new B}multiply(t){return Ft(this,"number"==typeof t?O(t,W):t)}divide(t){return kt(this,"number"==typeof t?O(t,W):t)}add(t){return Mt(this,"number"==typeof t?O(t,W):t)}subtract(t){return St(this,"number"==typeof t?O(t,W):t)}};Z=x=t([R],Z);let tt=class extends e{static{I=this}static{this.type="ivec3"}constructor(t,e,n){super(),this.type="ivec3",this.children=[t,e,n].filter(t=>null!=t)}clone(){const t=new I(n(this.children[0]),n(this.children[1]),n(this.children[2]));return super.cloneInto(t),t}get 0(){return dt(this,"[0]",W)}get 1(){return dt(this,"[1]",W)}get 2(){return dt(this,"[2]",W)}get 3(){throw new B}multiply(t){return Ft(this,"number"==typeof t?O(t,W):t)}divide(t){return kt(this,"number"==typeof t?O(t,W):t)}add(t){return Mt(this,"number"==typeof t?O(t,W):t)}subtract(t){return St(this,"number"==typeof t?O(t,W):t)}};tt=I=t([R],tt);let et=class extends e{static{E=this}static{this.type="ivec4"}constructor(t,e,n,r){super(),this.type="ivec4",this.children=[t,e,n,r].filter(t=>null!=t)}clone(){const t=new E(n(this.children[0]),n(this.children[1]),n(this.children[2]),n(this.children[3]));return super.cloneInto(t),t}get 0(){return dt(this,"[0]",W)}get 1(){return dt(this,"[1]",W)}get 2(){return dt(this,"[2]",W)}get 3(){return dt(this,"[3]",W)}multiply(t){return Ft(this,"number"==typeof t?O(t,W):t)}divide(t){return kt(this,"number"==typeof t?O(t,W):t)}add(t){return Mt(this,"number"==typeof t?O(t,W):t)}subtract(t){return St(this,"number"==typeof t?O(t,W):t)}};et=E=t([R],et);class nt extends e{static{this.type="mat2"}constructor(t,e,n,r){super(),this.type="mat2",this.children=[t,e,n,r]}clone(){const t=new nt(n(this.children[0]),n(this.children[1]),n(this.children[2]),n(this.children[3]));return super.cloneInto(t),t}get(t,e){return yt(this,new W(t),new W(e),C)}multiply(t){return Ft(this,t)}}class rt extends e{static{this.type="mat3"}static identity(){return new rt(1,0,0,0,1,0,0,0,1)}static fromRotation(t){const e=on(t),n=le(t);return new rt(n,e,0,xt(e),n,0,0,0,1)}constructor(t,e,n,r,i,c,s,u,o){super(),this.type="mat3",this.children=[t,e,n,r,i,c,s,u,o]}add(t){return Mt(this,t)}multiply(t){return Ft(this,t)}get(t,e){return yt(this,new W(t),new W(e),C)}clone(){const t=new rt(n(this.children[0]),n(this.children[1]),n(this.children[2]),n(this.children[3]),n(this.children[4]),n(this.children[5]),n(this.children[6]),n(this.children[7]),n(this.children[8]));return super.cloneInto(t),t}}class it extends e{static{this.type="mat4"}static identity(){return new it(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)}constructor(t,e,n,r,i,c,s,u,o,h,l,a,p,f,d,y){super(),this.type="mat4",this.children=[t,e,n,r,i,c,s,u,o,h,l,a,p,f,d,y]}static fromColumns(t,e,n,r){return new it(t.x,t.y,t.z,t.w,e.x,e.y,e.z,e.w,n.x,n.y,n.z,n.w,r.x,r.y,r.z,r.w)}multiply(t){return Ft(this,t)}get(t,e){return yt(this,new W(t),new W(e),C)}clone(){const t=new it(n(this.children[0]),n(this.children[1]),n(this.children[2]),n(this.children[3]),n(this.children[4]),n(this.children[5]),n(this.children[6]),n(this.children[7]),n(this.children[8]),n(this.children[9]),n(this.children[10]),n(this.children[11]),n(this.children[12]),n(this.children[13]),n(this.children[14]),n(this.children[15]));return super.cloneInto(t),t}}const ct={float:C,vec2:X,vec3:Y,vec4:_,int:W,ivec2:Z,ivec3:tt,ivec4:et,uint:A,uvec2:G,uvec3:H,uvec4:V,bool:J,bvec2:K,bvec3:L,bvec4:Q},st=(...t)=>new W(...t),ut=(...t)=>new C(...t),ot=(...t)=>new X(...t),ht=(...t)=>new Y(...t),lt=(...t)=>new _(...t),at=(...t)=>new nt(...t),pt=(...t)=>new rt(...t),ft=(...t)=>new it(...t);function dt(t,e,n){const i=new n(new r(e,t,n));return i.isImplicit=!0,i}function yt(t,e,n,r){const c=new r(new i(e,n,t,r));return c.isImplicit=!0,c}function wt(t,e,n){const r=new n(new o(t,e,n));return r.isImplicit=!0,r}function mt(t,e,n,r=null){if(r){const i=new r,s=new r(new c(t,[e,n],!0,!1,i));return s.isImplicit=!0,s}if("float"===e.type||"int"===e.type){const r=new n.constructor(new c(t,[e,n],!0,!1,n.constructor));return r.isImplicit=!0,r}if(("mat2"===e.type||"mat3"===e.type||"mat4"===e.type)&&"float"!==n.type){const r=new n.constructor(new c(t,[e,n],!0,!1,n.constructor));return r.isImplicit=!0,r}const i=new e.constructor(new c(t,[e,n],!0,!1,e.constructor));return i.isImplicit=!0,i}function vt(t,e,n=e.constructor){const r=new n(new c(t,[e],!1,!1,n));return r.isImplicit=!0,r}function bt(t,e,n,r=e.constructor){const i=new r(new c(t,[e,n],!1,!1,r));return i.isImplicit=!0,i}function gt(t,e,n,r,i=e.constructor){const s=new i(new c(t,[e,n,r],!1,!1,i));return s.isImplicit=!0,s}function xt(t){return Ft(t,ut(-1))}function It(t,e,n,r){return new e(new h(t,e,n,r))}function Et(t,e){const n="function"==typeof t?t():t,r=new n.constructor(new l(n).setDebugName(e));return r.isImplicit=!0,r}function $t(t,e,n=0,r=t.size){const i=new W(n).setMutable().setDebugName("FindIndexIterator"),c=e(t.get(i)).setDebugName("FindIndexPredicate"),s=It({iter:i},W,c,({out:t,iter:e,subgraph:n})=>`\n${t} = -1;\n\nfor (; ${e} < ${r}; ${e}++) {\n\n${n.body}\n\n if (${n.varName}) {\n ${t} = ${e};\n break;\n }\n\n}\n`).setDebugName("FindIndexBlock");return s}function zt(t,e,n=0,r=t.size){const i=It({array:t},W,null,({out:t,array:i})=>`\n${t} = -1;\nfor (int i = ${n}; i < ${r}; i++) {\n bool condition;\n ${e({array:i,i:"i",out:"condition"})}\n if (condition) {\n ${t} = i;\n break;\n }\n}\n`).setDebugName("GlslFindIndexBlock");return i}function Tt(t,e,n){const r="function"==typeof e?e():e,i="function"==typeof n?n():n,c=new r.constructor(new s(t,r,i));return c.isImplicit=!0,c}function Nt(...t){const e=t.map(([t,e])=>"function"==typeof e?[t,e()]:[t,e]),n=e[0][1].constructor,r=e.findIndex(t=>!0===t[0]);if(-1===r)throw new Error("A cond must have a fallthrough case with `true`/; ");const i=e.slice(0,r),c=e[r][1],s=new n(i.reduceRight((t,e)=>Tt(e[0],e[1],t),c));return s.isImplicit=!0,s}function Dt(t,e){const n=new e.constructor(new s(t,e,null));return n.isImplicit=!0,n}function Ft(t,e){return mt("*",t,e)}function kt(t,e){return mt("/",t,e)}function Mt(t,e){return mt("+",t,e)}function St(t,e){return mt("-",t,e)}function Rt(t,e){return mt("%",t,e)}function jt(t,e){return mt("<<",t,e)}function Bt(t,e){return mt(">>",t,e)}function qt(t,e){return mt("&",t,e)}function Ut(t,e){return mt("|",t,e)}function Pt(t,e){return mt("^",t,e)}function Ct(t){return vt("~",t)}function Xt(t,e){return mt("==",t,e,J)}function Yt(t,e){return mt("!=",t,e,J)}function _t(t,e){return mt("<",t,e,J)}function At(t,e){return mt("<=",t,e,J)}function Gt(t,e){return mt(">",t,e,J)}function Ht(t,e){return mt(">=",t,e,J)}function Vt(...t){return t.length<=1?t[0]:t.slice(1).reduce((t,e)=>Jt(t,e),t[0])}function Jt(t,e){return mt("||",t,e,J)}function Kt(...t){return t.length<=1?t[0]:t.slice(1).reduce((t,e)=>Lt(t,e),t[0])}function Lt(t,e){return mt("^^",t,e,J)}function Ot(...t){return t.length<=1?t[0]:t.slice(1).reduce((t,e)=>Qt(t,e),t[0])}function Qt(t,e){return mt("&&",t,e,J)}function Wt(t){return vt("abs",t)}function Zt(t){return vt("acos",t)}function te(t){return vt("acosh",t)}function ee(t){return vt("all",t,J)}function ne(t){return vt("any",t,J)}function re(t){return vt("asin",t)}function ie(t){return vt("asinh",t)}function ce(t,e){return null==e?vt("atan",t):bt("atan",t,e,t.constructor)}function se(t,e){const n=Wt(e),r=Wt(t),i=_e(n,r),c=Ae(n,r);let s=new C(1).divide(i);s=c.multiply(s);const u=s.multiply(s);let o=new C(-.01348047);return o=o.multiply(u).add(.057477314),o=o.multiply(u).subtract(.121239071),o=o.multiply(u).add(.195635925),o=o.multiply(u).subtract(.332994597),o=o.multiply(u).add(.99999563),s=o.multiply(s),s=Tt(Gt(r,n),new C(1.570796327).subtract(s),s),s=Tt(_t(e,new C(0)),new C(3.141592654).subtract(s),s),Tt(_t(t,new C(0)),s.multiply(-1),s)}function ue(t){return vt("atanh",t)}function oe(t){return vt("ceil",t)}function he(t,e,n){return gt("clamp",t,e,n,t.constructor)}function le(t){return vt("cos",t)}function ae(t){return vt("cosh",t)}function pe(t,e){return bt("cross",t,e,t.constructor)}function fe(t){return vt("dFdX",t)}function de(t){return vt("dFdY",t)}function ye(t){return vt("degrees",t)}function we(t){return vt("determinant",t,C)}function me(t,e){return bt("distance",t,e,C)}function ve(t,e){return bt("dot",t,e,C)}function be(t,e){return bt("equal",t,e,D(t))}function ge(t,e){return bt("greaterThan",t,e,D(t))}function xe(t,e){return bt("greaterThanEqual",t,e,D(t))}function Ie(t){return vt("exp",t)}function Ee(t){return vt("exp2",t)}function $e(t,e,n){return gt("faceforward",t,e,n)}function ze(t){return vt("floatBitsToInt",t,N(t))}function Te(t){return vt("floatBitsToUint",t,z(t))}function Ne(t){return vt("floor",t)}function De(t){return vt("fract",t)}function Fe(t){return vt("fwidth",t)}function ke(t){return vt("intBitsToFloat",t,T(t))}function Me(t){return vt("uintBitsToFloat",t,$(t))}function Se(t){return vt("inverse",t,C)}function Re(t){return vt("inversesqrt",t)}function je(t){return vt("isinf",t,D(t))}function Be(t){return vt("isnan",t,D(t))}function qe(t){return vt("length",t,C)}function Ue(t,e){return bt("lessThan",t,e,D(t))}function Pe(t,e){return bt("lessThanEqual",t,e,D(t))}function Ce(t){return vt("log",t)}function Xe(t){return vt("log2",t)}function Ye(t,e){return bt("matrixCompMult",t,e)}function _e(t,e){return bt("max",t,e)}function Ae(t,e){return bt("min",t,e)}function Ge(t,e,n){return gt("mix",t,e,n)}function He(t,e){return bt("mod",t,e)}function Ve(t,e){throw new Error("modf not implemented")}function Je(t){return vt("normalize",t)}function Ke(t){return"bool"===t.type?vt("!",t):vt("not",t)}function Le(t,e){return bt("notEqual",t,e,D(t))}function Oe(t,e){throw new Error("Impl type?")}function Qe(t){return vt("packHalf2x16",t,A)}function We(t){return vt("packUnorm2x16",t,A)}function Ze(t){return vt("packSnorm2x16",t,A)}function tn(t,e){return bt("pow",t,e)}function en(t){return vt("radians",t)}function nn(t,e){return bt("reflect",t,e)}function rn(t,e,n){return gt("refract",t,e,n)}function cn(t){return vt("round",t)}function sn(t){return vt("roundEven",t)}function un(t){return vt("sign",t)}function on(t){return vt("sin",t)}function hn(t){return vt("sinh",t)}function ln(t,e,n){return gt("smoothstep",t,e,n)}function an(t){return vt("sqrt",t)}function pn(t,e){return bt("step",t,e,e.constructor)}function fn(t){return vt("tan",t)}function dn(t){return vt("tanh",t)}function yn(t,e,n){return gt("texelFetch",t,e,n,_)}function wn(t,e,n,r){throw new Error("Impl type")}function mn(t,e,n){throw new Error("Impl type")}function vn(t,e){return bt("texture",t,e,_)}function bn(t,e,n,r){throw new Error("Impl type")}function gn(t,e,n,r,i){throw new Error("Impl type")}function xn(t,e,n){throw new Error("Impl type")}function In(t,e,n,r){throw new Error("Impl type")}function En(t,e,n,r){throw new Error("Impl type")}function $n(t,e,n){throw new Error("Impl type")}function zn(t,e,n,r){throw new Error("Impl type")}function Tn(t,e,n,r,i){throw new Error("Impl type")}function Nn(t,e,n){throw new Error("Impl type")}function Dn(t,e,n,r){throw new Error("Impl type")}function Fn(t,e,n,r){throw new Error("Impl type")}function kn(t,e){throw new Error("Impl type")}function Mn(t){return vt("transpose",t)}function Sn(t){return vt("trunc",t)}function Rn(t){return vt("unpackHalf2x16",t,X)}function jn(t){return vt("unpackUnorm2x16",t,X)}function Bn(t){return vt("unpackSnorm2x16",t,X)}function qn(t,e){const n=tn(new C(2),new C(e));return[new _(He(t.x,n),Ne(t.x.divide(n)),He(t.y,n),Ne(t.y.divide(n))),new _(He(t.z,n),Ne(t.z.divide(n)),He(t.w,n),Ne(t.w.divide(n)))]}function Un(t,e){const{initialValue:n,xRange:r,yRange:i,callback:c}=e,[s,u]=r,[o,h]=i,l=new W(0).setMutable().setDebugName("iterX"),a=new W(0).setMutable().setDebugName("iterY"),p=n.setMutable().setDebugName("accumulator"),f=c(p,t.get(l,a),l,a).setDebugName("callback"),d=It({iterX:l,iterY:a,accumulator:p},n.constructor,f,({out:t,iterX:e,iterY:n,accumulator:r,subgraph:i})=>`\nfor (${n} = ${o}; ${n} < ${h}; ${n}++) {\n for (${e} = ${s}; ${e} < ${u}; ${e}++) {\n\n ${i.body}\n\n ${r} = ${i.varName};\n }\n}\n${t} = ${r};\n`).setDebugName("reduce2DBody");return d}export{K as BVec2,L as BVec3,Q as BVec4,J as Bool,q as FixedArray,U as FixedArray2D,C as Float,Z as IVec2,tt as IVec3,et as IVec4,W as Int,nt as Mat2,rt as Mat3,it as Mat4,P as Sampler2D,A as UInt,G as UVec2,H as UVec3,V as UVec4,X as Vec2,Y as Vec3,_ as Vec4,Jt as _or,Lt as _xor,Wt as abs,Zt as acos,te as acosh,Mt as add,ee as all,Ot as and,ne as any,re as asin,ie as asinh,ce as atan,se as atan2,ue as atanh,qt as bitAnd,Ct as bitNot,Ut as bitOr,Bt as bitRShift,jt as bitShift,Pt as bitXor,It as block,oe as ceil,he as clamp,Nt as cond,le as cos,ae as cosh,pe as cross,fe as dFdx,de as dFdy,wt as defineArrayRead,dt as definePropertyAccess,yt as definePropertyAccess2D,ye as degrees,we as determinant,me as distance,kt as divide,ve as dot,Xt as equal,be as equalComponent,Ie as exp,Ee as exp2,$e as faceforward,$t as findIndex,ut as float,ze as floatBitsToInt,Te as floatBitsToUint,Ne as floor,De as fract,Fe as fwidth,k as getTypeElementLengthForType,zt as glslFindIndex,Gt as greaterThan,ge as greaterThanComponent,Ht as greaterThanEqual,xe as greaterThanEqualComponent,Tt as ifElse,st as int,ke as intBitsToFloat,Rt as intMod,Se as inverse,Re as inversesqrt,je as isinf,Be as isnan,qe as length,_t as lessThan,Ue as lessThanComponent,At as lessThanEqual,Pe as lessThanEqualComponent,Ce as log,Xe as log2,at as mat2,pt as mat3,ft as mat4,Ye as matrixCompMult,_e as max,Ae as min,Ge as mix,He as mod,Ve as modf,Ft as multiply,Et as namedScope,xt as negate,Je as normalize,Ke as not,Yt as notEqual,Le as notEqualComponent,Vt as or,Oe as outerProduct,Qe as packHalf2x16,Ze as packSnorm2x16,We as packUnorm2x16,tn as pow,en as radians,Un as reduce2D,nn as reflect,rn as refract,cn as round,sn as roundEven,un as sign,on as sin,hn as sinh,ln as smoothstep,an as sqrt,pn as step,St as subtract,fn as tan,dn as tanh,yn as texelFetch,wn as texelFetchOffset,mn as texture,vn as texture2D,bn as textureGrad,gn as textureGradOffset,xn as textureLod,In as textureLodOffset,En as textureOffset,$n as textureProj,zn as textureProjGrad,Tn as textureProjGradOffset,Nn as textureProjLod,Dn as textureProjLodOffset,Fn as textureProjOffset,kn as textureSize,N as transformFloatToInt,z as transformFloatToUInt,T as transformIntToFloat,D as transformTypeToBooleanType,$ as transformUIntToFloat,Mn as transpose,Sn as trunc,Me as uintBitsToFloat,Rn as unpackHalf2x16,Bn as unpackSnorm2x16,jn as unpackUnorm2x16,qn as unpackVec4,ot as vec2,ht as vec3,lt as vec4,Dt as when,Kt as xor};
|
|
2
|
+
import{__decorate as t}from"tslib";import{ShaderPrimitiveNode as e,cloneShaderNode as n,ShaderPropertyAccessNode as r,ShaderPropertyAccess2DNode as i,ShaderFunctionNode as c,ShaderConditionNode as s,ShaderArrayWriteNode as u,ShaderArrayReadNode as o,ShaderBlockNode as h,ShaderScopeNode as l}from"./ShaderGraphNode.js";var a,p,f,d,y,w,m,v,b,g,x,I,E;function $(t){switch(t.type){case"uint":return C;case"uvec2":return X;case"uvec3":return Y;case"uvec4":return _;default:throw new Error("Found unexpected type")}}function z(t){switch(t.type){case"float":return A;case"vec2":return G;case"vec3":return H;case"vec4":return V;default:throw new Error("Found unexpected type")}}function T(t){switch(t.type){case"int":return C;case"ivec2":return X;case"ivec3":return Y;case"ivec4":return _;default:throw new Error("Found unexpected type")}}function N(t){switch(t.type){case"float":return W;case"vec2":return Z;case"vec3":return tt;case"vec4":return et;default:throw new Error("Found unexpected type")}}function D(t){switch(t.type){case"bool":case"float":case"int":case"uint":return J;case"bvec2":case"vec2":case"ivec2":case"uvec2":return K;case"bvec3":case"vec3":case"ivec3":case"uvec3":return L;case"bvec4":case"vec4":case"ivec4":case"uvec4":return Q;default:throw new Error("Unable to handle type")}}function F(t){switch(t.type){case"bool":case"bvec2":case"bvec3":case"bvec4":return J;case"float":case"vec2":case"vec3":case"vec4":return C;case"int":case"ivec2":case"ivec3":case"ivec4":return W;case"uint":case"uvec2":case"uvec3":case"uvec4":return A;default:throw new Error("Unable to handle type")}}function S(t){switch(t.type){case"float":case"int":case"uint":case"bool":case"sampler2D":return 1;case"vec2":case"ivec2":case"uvec2":case"bvec2":return 2;case"vec3":case"ivec3":case"uvec3":case"bvec3":return 3;case"vec4":case"ivec4":case"uvec4":case"bvec4":case"mat2":return 4;case"mat3":return 9;case"mat4":return 16;case"array":case"array-2d":return t.size*S(t.elementType)}}function k(t){const e=[["float","vec2","vec3","vec4"],["int","ivec2","ivec3","ivec4"],["uint","uvec2","uvec3","uvec4"],["bool","bvec2","bvec3","bvec4"]];for(const n of e)if(n.includes(t))return n.map(t=>ct[t]);throw new Error("Unable to find type family")}function M(t){return new Proxy(t,{get(e,n){if("constructor"===n)return new Proxy(e.constructor,{construct:(t,e,n)=>M(new t(...e))});if(n in e)return e[n];if("string"==typeof n){const e=k(t.type);return dt(t,n,e[n.length-1])}}})}function R(t){return new Proxy(t,{construct:(t,e,n)=>M(new t(...e))})}function j(t,e){if(!Number.isSafeInteger(t)||t<0||t>=e)throw new B}class B extends Error{}class q extends e{static{this.type="array"}constructor(t,e,n=null){super(),this.elementType=t,this.size=e,this.writeNode=n,this.type="array"}get children(){return this.writeNode?[this.writeNode]:[this.elementType]}clone(){const t=this.writeNode?n(this.writeNode):null,e=new q(n(this.elementType),this.size,t);return super.cloneInto(e),e}set(t,e){return"number"==typeof t&&j(t,this.size),new q(n(this.elementType),this.size,new u(this,t,e))}get(t,e){"number"==typeof t&&j(t,this.size);const n=null!=e?new W(e):null;if(null!=n){const e=F(this.elementType.constructor);return yt(this,new W(t),n,e)}return wt(this,t,this.elementType.constructor)}last(){return this.get(this.size-1)}first(){return this.get(0)}findIndex(t,e,n){return $t(this,t,e,n)}glslFindIndex(t,e,n){return zt(this,t,e,n)}static ofType(t,e){const n=t;return class extends q{static{this.elementType=t}static{this.size=e}constructor(){super(new n,e)}}}}class U extends e{static{this.type="array-2d"}constructor(t,e,n,r=!1){super(),this.elementType=t,this.xSize=e,this.ySize=n,this.isRowMajor=r,this.type="array-2d",this.children=Array(e*n).fill(t)}clone(){const t=new U(n(this.elementType),this.xSize,this.ySize,this.isRowMajor);return t.children=this.children.map(n),super.cloneInto(t),t}get size(){return this.xSize*this.ySize}get(t,e){return this.isRowMajor?this._getRowMajor(t,e):this._getColumnMajor(t,e)}_getColumnMajor(t,e){const n=new W(t);return dt(this,new W(e).add(n.multiply(this.xSize)),this.elementType.constructor)}_getRowMajor(t,e){const n=new W(t),r=new W(e);return dt(this,n.add(r.multiply(this.ySize)),this.elementType.constructor)}static ofType(t,e,n,r=!1){return new Proxy(q,{construct:(i,c)=>new U(new t,e,n,r)})}}class P extends e{constructor(){super(...arguments),this.type="sampler2D",this.children=[]}static{this.type="sampler2D"}clone(){const t=new P;return t.children=this.children.map(n),super.cloneInto(t),t}}class C extends e{static{this.type="float"}constructor(t){super(),this.type="float",this.children=[t]}clone(){const t=new C(n(this.children[0]));return super.cloneInto(t),t}multiply(t){return Ft(this,"number"==typeof t?O(t,C):t)}divide(t){return St(this,"number"==typeof t?O(t,C):t)}add(t){return kt(this,"number"==typeof t?O(t,C):t)}subtract(t){return Mt(this,"number"==typeof t?O(t,C):t)}}let X=class extends e{static{a=this}static{this.type="vec2"}constructor(t,e){super(),this.type="vec2",this.children=[t,e].filter(t=>null!=t)}clone(){const t=new a(n(this.children[0]),n(this.children[1]));return super.cloneInto(t),t}get 0(){return dt(this,"[0]",C)}get 1(){return dt(this,"[1]",C)}get 2(){throw new B}get 3(){throw new B}multiply(t){return Ft(this,"number"==typeof t?O(t,C):t)}divide(t){return St(this,"number"==typeof t?O(t,C):t)}add(t){return kt(this,"number"==typeof t?O(t,C):t)}subtract(t){return Mt(this,"number"==typeof t?O(t,C):t)}};X=a=t([R],X);let Y=class extends e{static{p=this}static{this.type="vec3"}constructor(t,e,n){super(),this.type="vec3",this.children=[t,e,n].filter(t=>null!=t)}get 0(){return dt(this,"[0]",C)}get 1(){return dt(this,"[1]",C)}get 2(){return dt(this,"[2]",C)}get 3(){throw new B}clone(){const t=new p(n(this.children[0]),n(this.children[1]),n(this.children[2]));return super.cloneInto(t),t}multiply(t){return Ft(this,"number"==typeof t?O(t,C):t)}divide(t){return St(this,"number"==typeof t?O(t,C):t)}add(t){return kt(this,"number"==typeof t?O(t,C):t)}subtract(t){return Mt(this,"number"==typeof t?O(t,C):t)}};Y=p=t([R],Y);let _=class extends e{static{f=this}static{this.type="vec4"}constructor(t,e,n,r){super(),this.type="vec4",this.children=[t,e,n,r].filter(t=>null!=t)}clone(){const t=new f(n(this.children[0]),n(this.children[1]),n(this.children[2]),n(this.children[3]));return super.cloneInto(t),t}get 0(){return dt(this,"[0]",C)}get 1(){return dt(this,"[1]",C)}get 2(){return dt(this,"[2]",C)}get 3(){return dt(this,"[3]",C)}multiply(t){return Ft(this,"number"==typeof t?O(t,C):t)}divide(t){return St(this,"number"==typeof t?O(t,C):t)}add(t){return kt(this,"number"==typeof t?O(t,C):t)}subtract(t){return Mt(this,"number"==typeof t?O(t,C):t)}};_=f=t([R],_);let A=class extends e{static{d=this}static{this.type="uint"}constructor(t){super(),this.type="uint",this.children=[t]}clone(){const t=new d(n(this.children[0]));return super.cloneInto(t),t}multiply(t){return Ft(this,O(t,d))}add(t){return kt(this,O(t,d))}subtract(t){return Mt(this,O(t,d))}divide(t){return St(this,O(t,d))}};A=d=t([R],A);let G=class extends e{static{y=this}static{this.type="uvec2"}constructor(t,e){super(),this.type="uvec2",this.children=[t,e].filter(t=>null!=t)}clone(){const t=new y(n(this.children[0]),n(this.children[1]));return super.cloneInto(t),t}get 0(){return dt(this,"[0]",W)}get 1(){return dt(this,"[1]",W)}get 2(){throw new B}get 3(){throw new B}multiply(t){return Ft(this,"number"==typeof t?O(t,A):t)}divide(t){return St(this,"number"==typeof t?O(t,A):t)}add(t){return kt(this,"number"==typeof t?O(t,A):t)}subtract(t){return Mt(this,"number"==typeof t?O(t,A):t)}};G=y=t([R],G);let H=class extends e{static{w=this}static{this.type="uvec3"}constructor(t,e,n){super(),this.type="uvec3",this.children=[t,e,n].filter(t=>null!=t)}clone(){const t=new w(n(this.children[0]),n(this.children[1]),n(this.children[2]));return super.cloneInto(t),t}get 0(){return dt(this,"[0]",A)}get 1(){return dt(this,"[1]",A)}get 2(){return dt(this,"[2]",A)}get 3(){throw new B}multiply(t){return Ft(this,"number"==typeof t?O(t,A):t)}divide(t){return St(this,"number"==typeof t?O(t,A):t)}add(t){return kt(this,"number"==typeof t?O(t,A):t)}subtract(t){return Mt(this,"number"==typeof t?O(t,A):t)}};H=w=t([R],H);let V=class extends e{static{m=this}static{this.type="uvec4"}constructor(t,e,n,r){super(),this.type="uvec4",this.children=[t,e,n,r].filter(t=>null!=t)}clone(){const t=new m(n(this.children[0]),n(this.children[1]),n(this.children[2]),n(this.children[3]));return super.cloneInto(t),t}get 0(){return dt(this,"[0]",A)}get 1(){return dt(this,"[1]",A)}get 2(){return dt(this,"[2]",A)}get 3(){return dt(this,"[3]",A)}multiply(t){return Ft(this,"number"==typeof t?O(t,A):t)}divide(t){return St(this,"number"==typeof t?O(t,A):t)}add(t){return kt(this,"number"==typeof t?O(t,A):t)}subtract(t){return Mt(this,"number"==typeof t?O(t,A):t)}};V=m=t([R],V);class J extends e{static{this.type="bool"}constructor(t){super(),this.type="bool",this.children=[t]}and(t){return Ot(this,t)}or(t){return Vt(this,t)}xor(t){return Kt(this,t)}clone(){const t=new J(n(this.children[0]));return super.cloneInto(t),t}}let K=class extends e{static{v=this}static{this.type="bvec2"}constructor(t,e){super(),this.type="bvec2",this.children=[t,e].filter(t=>null!=t)}all(){return ee(this)}any(){return ne(this)}clone(){const t=new v(n(this.children[0]),n(this.children[1]));return super.cloneInto(t),t}};K=v=t([R],K);let L=class extends e{static{b=this}static{this.type="bvec3"}constructor(t,e,n){super(),this.type="bvec3",this.children=[t,e,n].filter(t=>null!=t)}all(){return ee(this)}any(){return ne(this)}clone(){const t=new b(n(this.children[0]),n(this.children[1]),n(this.children[2]));return super.cloneInto(t),t}};function O(t,e){if("number"==typeof t){return new e(t)}return t}L=b=t([R],L);let Q=class extends e{static{g=this}static{this.type="bvec4"}constructor(t,e,n,r){super(),this.type="bvec4",this.children=[t,e,n,r].filter(t=>null!=t)}all(){return ee(this)}any(){return ne(this)}clone(){const t=new g(n(this.children[0]),n(this.children[1]),n(this.children[2]),n(this.children[3]));return super.cloneInto(t),t}};Q=g=t([R],Q);class W extends e{static{this.type="int"}constructor(t){super(),this.type="int",this.children=[t]}multiply(t){return Ft(this,O(t,W))}add(t){return kt(this,O(t,W))}subtract(t){return Mt(this,O(t,W))}divide(t){return St(this,O(t,W))}clone(){const t=new W(n(this.children[0]));return super.cloneInto(t),t}}let Z=class extends e{static{x=this}static{this.type="ivec2"}constructor(t,e){super(),this.type="ivec2",this.children=[t,e].filter(t=>null!=t)}clone(){const t=new x(n(this.children[0]),n(this.children[1]));return super.cloneInto(t),t}get 0(){return dt(this,"[0]",W)}get 1(){return dt(this,"[1]",W)}get 2(){throw new B}get 3(){throw new B}multiply(t){return Ft(this,"number"==typeof t?O(t,W):t)}divide(t){return St(this,"number"==typeof t?O(t,W):t)}add(t){return kt(this,"number"==typeof t?O(t,W):t)}subtract(t){return Mt(this,"number"==typeof t?O(t,W):t)}};Z=x=t([R],Z);let tt=class extends e{static{I=this}static{this.type="ivec3"}constructor(t,e,n){super(),this.type="ivec3",this.children=[t,e,n].filter(t=>null!=t)}clone(){const t=new I(n(this.children[0]),n(this.children[1]),n(this.children[2]));return super.cloneInto(t),t}get 0(){return dt(this,"[0]",W)}get 1(){return dt(this,"[1]",W)}get 2(){return dt(this,"[2]",W)}get 3(){throw new B}multiply(t){return Ft(this,"number"==typeof t?O(t,W):t)}divide(t){return St(this,"number"==typeof t?O(t,W):t)}add(t){return kt(this,"number"==typeof t?O(t,W):t)}subtract(t){return Mt(this,"number"==typeof t?O(t,W):t)}};tt=I=t([R],tt);let et=class extends e{static{E=this}static{this.type="ivec4"}constructor(t,e,n,r){super(),this.type="ivec4",this.children=[t,e,n,r].filter(t=>null!=t)}clone(){const t=new E(n(this.children[0]),n(this.children[1]),n(this.children[2]),n(this.children[3]));return super.cloneInto(t),t}get 0(){return dt(this,"[0]",W)}get 1(){return dt(this,"[1]",W)}get 2(){return dt(this,"[2]",W)}get 3(){return dt(this,"[3]",W)}multiply(t){return Ft(this,"number"==typeof t?O(t,W):t)}divide(t){return St(this,"number"==typeof t?O(t,W):t)}add(t){return kt(this,"number"==typeof t?O(t,W):t)}subtract(t){return Mt(this,"number"==typeof t?O(t,W):t)}};et=E=t([R],et);class nt extends e{static{this.type="mat2"}constructor(t,e,n,r){super(),this.type="mat2",this.children=[t,e,n,r]}clone(){const t=new nt(n(this.children[0]),n(this.children[1]),n(this.children[2]),n(this.children[3]));return super.cloneInto(t),t}get(t,e){return yt(this,new W(t),new W(e),C)}multiply(t){return Ft(this,t)}}class rt extends e{static{this.type="mat3"}static identity(){return new rt(1,0,0,0,1,0,0,0,1)}static fromRotation(t){const e=on(t),n=le(t);return new rt(n,e,0,xt(e),n,0,0,0,1)}constructor(t,e,n,r,i,c,s,u,o){super(),this.type="mat3",this.children=[t,e,n,r,i,c,s,u,o]}add(t){return kt(this,t)}multiply(t){return Ft(this,t)}get(t,e){return yt(this,new W(t),new W(e),C)}clone(){const t=new rt(n(this.children[0]),n(this.children[1]),n(this.children[2]),n(this.children[3]),n(this.children[4]),n(this.children[5]),n(this.children[6]),n(this.children[7]),n(this.children[8]));return super.cloneInto(t),t}}class it extends e{static{this.type="mat4"}static identity(){return new it(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)}constructor(t,e,n,r,i,c,s,u,o,h,l,a,p,f,d,y){super(),this.type="mat4",this.children=[t,e,n,r,i,c,s,u,o,h,l,a,p,f,d,y]}static fromColumns(t,e,n,r){return new it(t.x,t.y,t.z,t.w,e.x,e.y,e.z,e.w,n.x,n.y,n.z,n.w,r.x,r.y,r.z,r.w)}multiply(t){return Ft(this,t)}get(t,e){return yt(this,new W(t),new W(e),C)}clone(){const t=new it(n(this.children[0]),n(this.children[1]),n(this.children[2]),n(this.children[3]),n(this.children[4]),n(this.children[5]),n(this.children[6]),n(this.children[7]),n(this.children[8]),n(this.children[9]),n(this.children[10]),n(this.children[11]),n(this.children[12]),n(this.children[13]),n(this.children[14]),n(this.children[15]));return super.cloneInto(t),t}}const ct={float:C,vec2:X,vec3:Y,vec4:_,int:W,ivec2:Z,ivec3:tt,ivec4:et,uint:A,uvec2:G,uvec3:H,uvec4:V,bool:J,bvec2:K,bvec3:L,bvec4:Q},st=(...t)=>new W(...t),ut=(...t)=>new C(...t),ot=(...t)=>new X(...t),ht=(...t)=>new Y(...t),lt=(...t)=>new _(...t),at=(...t)=>new nt(...t),pt=(...t)=>new rt(...t),ft=(...t)=>new it(...t);function dt(t,e,n){const i=new n(new r(e,t,n));return i.isImplicit=!0,i}function yt(t,e,n,r){const c=new r(new i(e,n,t,r));return c.isImplicit=!0,c}function wt(t,e,n){const r=new n(new o(t,e,n));return r.isImplicit=!0,r}function mt(t,e,n,r=null){if(r){const i=new r,s=new r(new c(t,[e,n],!0,!1,i));return s.isImplicit=!0,s}if("float"===e.type||"int"===e.type){const r=new n.constructor(new c(t,[e,n],!0,!1,n.constructor));return r.isImplicit=!0,r}if(("mat2"===e.type||"mat3"===e.type||"mat4"===e.type)&&"float"!==n.type){const r=new n.constructor(new c(t,[e,n],!0,!1,n.constructor));return r.isImplicit=!0,r}const i=new e.constructor(new c(t,[e,n],!0,!1,e.constructor));return i.isImplicit=!0,i}function vt(t,e,n=e.constructor){const r=new n(new c(t,[e],!1,!1,n));return r.isImplicit=!0,r}function bt(t,e,n,r=e.constructor){const i=new r(new c(t,[e,n],!1,!1,r));return i.isImplicit=!0,i}function gt(t,e,n,r,i=e.constructor){const s=new i(new c(t,[e,n,r],!1,!1,i));return s.isImplicit=!0,s}function xt(t){return Ft(t,ut(-1))}function It(t,e,n,r){return new e(new h(t,e,n,r))}function Et(t,e){const n="function"==typeof t?t():t,r=new n.constructor(new l(n).setDebugName(e));return r.isImplicit=!0,r}function $t(t,e,n=0,r=t.size){const i=new W(n).setMutable().setDebugName("FindIndexIterator"),c=e(t.get(i)).setDebugName("FindIndexPredicate"),s=It({iter:i},W,c,({out:t,iter:e,subgraph:n})=>`\n${t} = -1;\n\nfor (; ${e} < ${r}; ${e}++) {\n\n${n.body}\n\n if (${n.varName}) {\n ${t} = ${e};\n break;\n }\n\n}\n`).setDebugName("FindIndexBlock");return s}function zt(t,e,n=0,r=t.size){const i=It({array:t},W,null,({out:t,array:i})=>`\n${t} = -1;\nfor (int i = ${n}; i < ${r}; i++) {\n bool condition;\n ${e({array:i,i:"i",out:"condition"})}\n if (condition) {\n ${t} = i;\n break;\n }\n}\n`).setDebugName("GlslFindIndexBlock");return i}function Tt(t,e,n){const r="function"==typeof e?e():e,i="function"==typeof n?n():n,c=new r.constructor(new s(t,r,i));return c.isImplicit=!0,c}function Nt(...t){const e=t.map(([t,e])=>"function"==typeof e?[t,e()]:[t,e]),n=e[0][1].constructor,r=e.findIndex(t=>!0===t[0]);if(-1===r)throw new Error("A cond must have a fallthrough case with `true`/; ");const i=e.slice(0,r),c=e[r][1],s=new n(i.reduceRight((t,e)=>Tt(e[0],e[1],t),c));return s.isImplicit=!0,s}function Dt(t,e){const n=new e.constructor(new s(t,e,null));return n.isImplicit=!0,n}function Ft(t,e){return mt("*",t,e)}function St(t,e){return mt("/",t,e)}function kt(t,e){return mt("+",t,e)}function Mt(t,e){return mt("-",t,e)}function Rt(t,e){return mt("%",t,e)}function jt(t,e){return mt("<<",t,e)}function Bt(t,e){return mt(">>",t,e)}function qt(t,e){return mt("&",t,e)}function Ut(t,e){return mt("|",t,e)}function Pt(t,e){return mt("^",t,e)}function Ct(t){return vt("~",t)}function Xt(t,e){return mt("==",t,e,J)}function Yt(t,e){return mt("!=",t,e,J)}function _t(t,e){return mt("<",t,e,J)}function At(t,e){return mt("<=",t,e,J)}function Gt(t,e){return mt(">",t,e,J)}function Ht(t,e){return mt(">=",t,e,J)}function Vt(...t){return t.length<=1?t[0]:t.slice(1).reduce((t,e)=>Jt(t,e),t[0])}function Jt(t,e){return mt("||",t,e,J)}function Kt(...t){return t.length<=1?t[0]:t.slice(1).reduce((t,e)=>Lt(t,e),t[0])}function Lt(t,e){return mt("^^",t,e,J)}function Ot(...t){return t.length<=1?t[0]:t.slice(1).reduce((t,e)=>Qt(t,e),t[0])}function Qt(t,e){return mt("&&",t,e,J)}function Wt(t){return vt("abs",t)}function Zt(t){return vt("acos",t)}function te(t){return vt("acosh",t)}function ee(t){return vt("all",t,J)}function ne(t){return vt("any",t,J)}function re(t){return vt("asin",t)}function ie(t){return vt("asinh",t)}function ce(t,e){return null==e?vt("atan",t):bt("atan",t,e,t.constructor)}function se(t,e){const n=Wt(e),r=Wt(t),i=_e(n,r),c=Ae(n,r);let s=new C(1).divide(i);s=c.multiply(s);const u=s.multiply(s);let o=new C(-.01348047);return o=o.multiply(u).add(.057477314),o=o.multiply(u).subtract(.121239071),o=o.multiply(u).add(.195635925),o=o.multiply(u).subtract(.332994597),o=o.multiply(u).add(.99999563),s=o.multiply(s),s=Tt(Gt(r,n),new C(1.570796327).subtract(s),s),s=Tt(_t(e,new C(0)),new C(3.141592654).subtract(s),s),Tt(_t(t,new C(0)),s.multiply(-1),s)}function ue(t){return vt("atanh",t)}function oe(t){return vt("ceil",t)}function he(t,e,n){return gt("clamp",t,e,n,t.constructor)}function le(t){return vt("cos",t)}function ae(t){return vt("cosh",t)}function pe(t,e){return bt("cross",t,e,t.constructor)}function fe(t){return vt("dFdX",t)}function de(t){return vt("dFdY",t)}function ye(t){return vt("degrees",t)}function we(t){return vt("determinant",t,C)}function me(t,e){return bt("distance",t,e,C)}function ve(t,e){return bt("dot",t,e,C)}function be(t,e){return bt("equal",t,e,D(t))}function ge(t,e){return bt("greaterThan",t,e,D(t))}function xe(t,e){return bt("greaterThanEqual",t,e,D(t))}function Ie(t){return vt("exp",t)}function Ee(t){return vt("exp2",t)}function $e(t,e,n){return gt("faceforward",t,e,n)}function ze(t){return vt("floatBitsToInt",t,N(t))}function Te(t){return vt("floatBitsToUint",t,z(t))}function Ne(t){return vt("floor",t)}function De(t){return vt("fract",t)}function Fe(t){return vt("fwidth",t)}function Se(t){return vt("intBitsToFloat",t,T(t))}function ke(t){return vt("uintBitsToFloat",t,$(t))}function Me(t){return vt("inverse",t,C)}function Re(t){return vt("inversesqrt",t)}function je(t){return vt("isinf",t,D(t))}function Be(t){return vt("isnan",t,D(t))}function qe(t){return vt("length",t,C)}function Ue(t,e){return bt("lessThan",t,e,D(t))}function Pe(t,e){return bt("lessThanEqual",t,e,D(t))}function Ce(t){return vt("log",t)}function Xe(t){return vt("log2",t)}function Ye(t,e){return bt("matrixCompMult",t,e)}function _e(t,e){return bt("max",t,e)}function Ae(t,e){return bt("min",t,e)}function Ge(t,e,n){return gt("mix",t,e,n)}function He(t,e){return bt("mod",t,e)}function Ve(t,e){throw new Error("modf not implemented")}function Je(t){return vt("normalize",t)}function Ke(t){return"bool"===t.type?vt("!",t):vt("not",t)}function Le(t,e){return bt("notEqual",t,e,D(t))}function Oe(t,e){throw new Error("Impl type?")}function Qe(t){return vt("packHalf2x16",t,A)}function We(t){return vt("packUnorm2x16",t,A)}function Ze(t){return vt("packSnorm2x16",t,A)}function tn(t,e){return bt("pow",t,e)}function en(t){return vt("radians",t)}function nn(t,e){return bt("reflect",t,e)}function rn(t,e,n){return gt("refract",t,e,n)}function cn(t){return vt("round",t)}function sn(t){return vt("roundEven",t)}function un(t){return vt("sign",t)}function on(t){return vt("sin",t)}function hn(t){return vt("sinh",t)}function ln(t,e,n){return gt("smoothstep",t,e,n)}function an(t){return vt("sqrt",t)}function pn(t,e){return bt("step",t,e,e.constructor)}function fn(t){return vt("tan",t)}function dn(t){return vt("tanh",t)}function yn(t,e,n){return gt("texelFetch",t,e,n,_)}function wn(t,e,n,r){throw new Error("Impl type")}function mn(t,e,n){throw new Error("Impl type")}function vn(t,e){return bt("texture",t,e,_)}function bn(t,e,n,r){throw new Error("Impl type")}function gn(t,e,n,r,i){throw new Error("Impl type")}function xn(t,e,n){throw new Error("Impl type")}function In(t,e,n,r){throw new Error("Impl type")}function En(t,e,n,r){throw new Error("Impl type")}function $n(t,e,n){throw new Error("Impl type")}function zn(t,e,n,r){throw new Error("Impl type")}function Tn(t,e,n,r,i){throw new Error("Impl type")}function Nn(t,e,n){throw new Error("Impl type")}function Dn(t,e,n,r){throw new Error("Impl type")}function Fn(t,e,n,r){throw new Error("Impl type")}function Sn(t,e){return bt("textureSize",t,e,Z)}function kn(t){return vt("transpose",t)}function Mn(t){return vt("trunc",t)}function Rn(t){return vt("unpackHalf2x16",t,X)}function jn(t){return vt("unpackUnorm2x16",t,X)}function Bn(t){return vt("unpackSnorm2x16",t,X)}function qn(t,e){const n=tn(new C(2),new C(e));return[new _(He(t.x,n),Ne(t.x.divide(n)),He(t.y,n),Ne(t.y.divide(n))),new _(He(t.z,n),Ne(t.z.divide(n)),He(t.w,n),Ne(t.w.divide(n)))]}function Un(t,e){const{initialValue:n,xRange:r,yRange:i,callback:c}=e,[s,u]=r,[o,h]=i,l=new W(0).setMutable().setDebugName("iterX"),a=new W(0).setMutable().setDebugName("iterY"),p=n.setMutable().setDebugName("accumulator"),f=c(p,t.get(l,a),l,a).setDebugName("callback"),d=It({iterX:l,iterY:a,accumulator:p},n.constructor,f,({out:t,iterX:e,iterY:n,accumulator:r,subgraph:i})=>`\nfor (${n} = ${o}; ${n} < ${h}; ${n}++) {\n for (${e} = ${s}; ${e} < ${u}; ${e}++) {\n\n ${i.body}\n\n ${r} = ${i.varName};\n }\n}\n${t} = ${r};\n`).setDebugName("reduce2DBody");return d}export{K as BVec2,L as BVec3,Q as BVec4,J as Bool,q as FixedArray,U as FixedArray2D,C as Float,Z as IVec2,tt as IVec3,et as IVec4,W as Int,nt as Mat2,rt as Mat3,it as Mat4,P as Sampler2D,A as UInt,G as UVec2,H as UVec3,V as UVec4,X as Vec2,Y as Vec3,_ as Vec4,Jt as _or,Lt as _xor,Wt as abs,Zt as acos,te as acosh,kt as add,ee as all,Ot as and,ne as any,re as asin,ie as asinh,ce as atan,se as atan2,ue as atanh,qt as bitAnd,Ct as bitNot,Ut as bitOr,Bt as bitRShift,jt as bitShift,Pt as bitXor,It as block,oe as ceil,he as clamp,Nt as cond,le as cos,ae as cosh,pe as cross,fe as dFdx,de as dFdy,wt as defineArrayRead,dt as definePropertyAccess,yt as definePropertyAccess2D,ye as degrees,we as determinant,me as distance,St as divide,ve as dot,Xt as equal,be as equalComponent,Ie as exp,Ee as exp2,$e as faceforward,$t as findIndex,ut as float,ze as floatBitsToInt,Te as floatBitsToUint,Ne as floor,De as fract,Fe as fwidth,S as getTypeElementLengthForType,zt as glslFindIndex,Gt as greaterThan,ge as greaterThanComponent,Ht as greaterThanEqual,xe as greaterThanEqualComponent,Tt as ifElse,st as int,Se as intBitsToFloat,Rt as intMod,Me as inverse,Re as inversesqrt,je as isinf,Be as isnan,qe as length,_t as lessThan,Ue as lessThanComponent,At as lessThanEqual,Pe as lessThanEqualComponent,Ce as log,Xe as log2,at as mat2,pt as mat3,ft as mat4,Ye as matrixCompMult,_e as max,Ae as min,Ge as mix,He as mod,Ve as modf,Ft as multiply,Et as namedScope,xt as negate,Je as normalize,Ke as not,Yt as notEqual,Le as notEqualComponent,Vt as or,Oe as outerProduct,Qe as packHalf2x16,Ze as packSnorm2x16,We as packUnorm2x16,tn as pow,en as radians,Un as reduce2D,nn as reflect,rn as refract,cn as round,sn as roundEven,un as sign,on as sin,hn as sinh,ln as smoothstep,an as sqrt,pn as step,Mt as subtract,fn as tan,dn as tanh,yn as texelFetch,wn as texelFetchOffset,mn as texture,vn as texture2D,bn as textureGrad,gn as textureGradOffset,xn as textureLod,In as textureLodOffset,En as textureOffset,$n as textureProj,zn as textureProjGrad,Tn as textureProjGradOffset,Nn as textureProjLod,Dn as textureProjLodOffset,Fn as textureProjOffset,Sn as textureSize,N as transformFloatToInt,z as transformFloatToUInt,T as transformIntToFloat,D as transformTypeToBooleanType,$ as transformUIntToFloat,kn as transpose,Mn as trunc,ke as uintBitsToFloat,Rn as unpackHalf2x16,Bn as unpackSnorm2x16,jn as unpackUnorm2x16,qn as unpackVec4,ot as vec2,ht as vec3,lt as vec4,Dt as when,Kt as xor};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{numericHash as t}from"../../../../../../core/string.js";import{FeatureTechniqueInstance as e}from"./TechniqueInstance.js";import{castInstanceId as n}from"./mesh/instanceIdUtils.js";class s{constructor(){this._instanceById=new Map}destroy(){this._instanceById.clear()}get size(){return this._instanceById.size}entries(){return this._instanceById.entries()}find(t){for(const e of this.values())if(e.techniqueRef.type===t)return e;return null}updateStart(t){t&&(this._instanceByIdNext=new Map,this._shaderCountByMesh=new Map,this._shaderIndices=new Map,this._instanceIdToOrder=null)}updateEnd(t){if(t){if(!this._instanceByIdNext)throw new Error("InternalError: Found updateEnd call without corresponding updateStart");for(const t of this._instanceById.keys())this._instanceByIdNext.has(t)||this._instanceById.delete(t);for(const[t,e]of this._instanceByIdNext.entries()){const n=this._instanceById.get(t);n?n.setInput(e.getInput()):this._instanceById.set(t,e)}this._instanceByIdNext=null,this._shaderCountByMesh=null,this._shaderIndices=null}}values(){return this._instanceById.values()}ensureInstance(s,i,r){let a;if("object"==typeof i&&"optionalAttributes"in i&&"uniforms"in i&&null==r){const t=`${s.type}.${JSON.stringify(i.optionalAttributes)}`,e=t+`.${JSON.stringify(i.uniforms)}`;let n=0;null!=this._instanceByIdNext&&(this._shaderIndices.has(e)?n=this._shaderIndices.get(e):(n=this._shaderCountByMesh.get(t)??0,this._shaderCountByMesh.set(t,n+1),this._shaderIndices.set(e,n))),a=t+`.${n}`}else{const t=r?`${r.name}.${r.index}`:"";a=`${s.type}.${JSON.stringify(i)}.${t}`}const d=t(a);if(null!=r&&this._ensureInstanceIdToOrder(d,r),this._instanceByIdNext){const t=new e(n(d),s,i);return this._instanceByIdNext.set(d,t),t}if(!this._instanceById.has(d)){const t=new e(n(d),s,i);this._instanceById.set(d,t)}return this._instanceById.get(d)}getInstance(t){const e=this._instanceById.get(t);if(null==e)throw new Error(`InternalError: Unable to get instance for ${t}`);return e}getInstanceOrder(){return this._instanceIdToOrder}_ensureInstanceIdToOrder(t,e){null==this._instanceIdToOrder&&(this._instanceIdToOrder=new Map),this._instanceIdToOrder.set(t,e.index)}}export{s as default};
|
|
2
|
+
import{numericHash as t}from"../../../../../../core/string.js";import{FeatureTechniqueInstance as e}from"./TechniqueInstance.js";import{castInstanceId as n}from"./mesh/instanceIdUtils.js";class s{constructor(){this._instanceById=new Map}destroy(){this._instanceById.clear()}get size(){return this._instanceById.size}entries(){return this._instanceById.entries()}find(t){for(const e of this.values())if(e.techniqueRef.type===t)return e;return null}updateStart(t){t&&(this._instanceByIdNext=new Map,this._shaderCountByMesh=new Map,this._shaderIndices=new Map,this._instanceIdToOrder=null)}updateEnd(t){if(t){if(!this._instanceByIdNext)throw new Error("InternalError: Found updateEnd call without corresponding updateStart");for(const t of this._instanceById.keys())this._instanceByIdNext.has(t)||this._instanceById.delete(t);for(const[t,e]of this._instanceByIdNext.entries()){const n=this._instanceById.get(t);n?n.setInput(e.getInput()):this._instanceById.set(t,e)}this._instanceByIdNext=null,this._shaderCountByMesh=null,this._shaderIndices=null}}values(){return this._instanceById.values()}ensureInstance(s,i,r){let a;if("object"==typeof i&&"optionalAttributes"in i&&"uniforms"in i&&null==r){const t=`${s.type}.${JSON.stringify(i.optionalAttributes)}`,e=t+`.${JSON.stringify(i.uniforms)}`;let n=0;null!=this._instanceByIdNext&&(this._shaderIndices.has(e)?n=this._shaderIndices.get(e):(n=this._shaderCountByMesh.get(t)??0,this._shaderCountByMesh.set(t,n+1),this._shaderIndices.set(e,n))),a=t+`.${n}`}else{const t=r?`${r.name}.${r.index}`:"";a=`${s.type}.${JSON.stringify(i)}.${t}`}const d=t(a);if(null!=r&&this._ensureInstanceIdToOrder(d,r),this._instanceByIdNext){const t=new e(n(d),s,i);return this._instanceByIdNext.set(d,t),t}if(!this._instanceById.has(d)){const t=new e(n(d),s,i);this._instanceById.set(d,t)}return this._instanceById.get(d)}getInstance(t){const e=this._instanceById.get(t);if(null==e)throw new Error(`InternalError: Unable to get instance for ${t}`);return e}ensureLabelPhaseInstanceId(s){const i=this._instanceByIdNext?.get(s)??this._instanceById.get(s);if(null==i)throw new Error(`InternalError: Unable to create label-phase instance for ${s}`);const r=t(`${s}.label`),a=this._instanceByIdNext??this._instanceById;a.has(r)||a.set(r,new e(n(r),i.techniqueRef,i.getInput(),{drawPhase:6,stencilReference:255}));const d=this._instanceIdToOrder?.get(s);return null!=d&&this._instanceIdToOrder.set(r,d),r}getInstanceOrder(){return this._instanceIdToOrder}_ensureInstanceIdToOrder(t,e){null==this._instanceIdToOrder&&(this._instanceIdToOrder=new Map),this._instanceIdToOrder.set(t,e.index)}}export{s as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{FeatureTechniqueInstance as e}from"./TechniqueInstance.js";import{Techniques as i}from"./TechniqueRegistry.js";import{castInstanceId as t}from"./mesh/instanceIdUtils.js";let n=0;function a(i,a){return new e(t(n++),i,a)}const o={visualVariableColor:null,visualVariableOpacity:null,visualVariableSizeMinMaxValue:null,visualVariableSizeScaleStops:null,visualVariableSizeStops:null,visualVariableSizeUnitValue:null,visualVariableRotation:null,visualVariableSizeOutlineScaleStops:null};class l{constructor(){this.instances={fill:a(i.fill,{uniforms:o,optionalAttributes:{zoomRange:!0}}),marker:a(i.marker,{uniforms:o,optionalAttributes:{zoomRange:!0}}),line:a(i.line,{uniforms:o,optionalAttributes:{zoomRange:!0}}),text:a(i.text,{uniforms:o,optionalAttributes:{zoomRange:!0,referenceSymbol:!1,clipAngle:!1
|
|
2
|
+
import{FeatureTechniqueInstance as e}from"./TechniqueInstance.js";import{Techniques as i}from"./TechniqueRegistry.js";import{castInstanceId as t}from"./mesh/instanceIdUtils.js";let n=0;function a(i,a){return new e(t(n++),i,a)}const o={visualVariableColor:null,visualVariableOpacity:null,visualVariableSizeMinMaxValue:null,visualVariableSizeScaleStops:null,visualVariableSizeStops:null,visualVariableSizeUnitValue:null,visualVariableRotation:null,visualVariableSizeOutlineScaleStops:null};class l{constructor(){this.instances={fill:a(i.fill,{uniforms:o,optionalAttributes:{zoomRange:!0}}),marker:a(i.marker,{uniforms:o,optionalAttributes:{zoomRange:!0}}),line:a(i.line,{uniforms:o,optionalAttributes:{zoomRange:!0}}),text:a(i.text,{uniforms:o,optionalAttributes:{zoomRange:!0,referenceSymbol:!1,clipAngle:!1}}),outlineFill:a(i.outlineFill,{uniforms:o,optionalAttributes:{zoomRange:!0}}),complexFill:a(i.complexFill,{uniforms:o,optionalAttributes:{zoomRange:!0}}),gradientFill:a(i.gradientFill,{uniforms:o,optionalAttributes:{zoomRange:!0}}),texturedLine:a(i.texturedLine,{uniforms:o,optionalAttributes:{zoomRange:!0}}),gradientStroke:a(i.gradientStroke,{uniforms:o,optionalAttributes:{zoomRange:!0}}),animatedMarker:a(i.animatedMarker,{uniforms:o,optionalAttributes:{zoomRange:!0,value1Position2Value2:!1,lineLength:!1}}),animatedMarkerShift:a(i.animatedMarkerShift,{uniforms:o,optionalAttributes:{zoomRange:!0,value1Position2Value2:!0,lineLength:!0}}),animatedPolygon:a(i.animatedFill,{uniforms:o,optionalAttributes:{zoomRange:!0,value1Position2Value2:!1,lineLength:!1,angle:!0}}),animatedPolyline:a(i.animatedLine,{uniforms:o,optionalAttributes:{zoomRange:!0,value1Position2Value2:!1,accumulatedDistance:!0,segmentDirection:!0,normal:!0,lineLength:!1,angle:!1}}),animatedPolylineShift:a(i.animatedLine,{uniforms:o,optionalAttributes:{zoomRange:!0,value1Position2Value2:!1,accumulatedDistance:!0,segmentDirection:!0,normal:!0,lineLength:!0,angle:!1}})},this._instancesById=Object.values(this.instances).reduce((e,i)=>(e.set(i.instanceId,i),e),new Map)}getInstance(e){return this._instancesById.get(e)}getInstanceOrder(){}}export{l as GraphicInstanceStore};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{castStrictInstanceId as
|
|
2
|
+
import{castStrictInstanceId as e}from"./mesh/instanceIdUtils.js";class t{constructor(e,t,i,r){this._instanceId=e,this.techniqueRef=t,this._input=i,this._renderOverrides=r}get instanceId(){return e(this._instanceId)}get drawPhase(){return this._renderOverrides?.drawPhase??this.techniqueRef.drawPhase}get stencilReferenceOverride(){return this._renderOverrides?.stencilReference}createMeshInfo(t){return{id:e(this._instanceId),techniqueType:this.techniqueRef.type,inputParams:t,optionalAttributes:this._input.optionalAttributes}}getInput(){return this._input}setInput(e){this._input=e}}export{t as FeatureTechniqueInstance};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{DisplayObject as t}from"../../../DisplayObject.js";import e from"../../DisplayEntity.js";import{CpuMeshData as s}from"../../cpuMapped/CpuMeshData.js";import{GpuMeshState as n}from"../../cpuMapped/GpuMeshState.js";import r from"../../util/Reader.js";import{deserializeList as a}from"../../util/serializationUtils.js";import{PrimitiveType as o,DataType as i}from"../../../../../webgl/enums.js";class c extends t{static fromMeshData(t,o){const i=new Map,d=new Map;for(const e of t.data){const t=new s(e.layout
|
|
2
|
+
import{DisplayObject as t}from"../../../DisplayObject.js";import e from"../../DisplayEntity.js";import{CpuMeshData as s}from"../../cpuMapped/CpuMeshData.js";import{GpuMeshState as n}from"../../cpuMapped/GpuMeshState.js";import r from"../../util/Reader.js";import{deserializeList as a}from"../../util/serializationUtils.js";import{PrimitiveType as o,DataType as i}from"../../../../../webgl/enums.js";class c extends t{static fromMeshData(t,o){const i=new Map,d=new Map;for(const e of t.data){const t=new s(e.layout),r=new n(e.layout);t.append(e),r.upload(t),i.set(e.instanceId,t),d.set(e.instanceId,r)}const p=new r(t.entities),u=a(p,e,{})??[];return new c(u,i,d,o)}constructor(t,e,s,n){super(),this.displayObjects=t,this._instanceIdToCpuMeshData=e,this._instanceIdToGpuMeshState=s,this._store=n}draw(t,e){if(null==this._activeInstanceId)throw new Error("InternalError: No active instanceId");for(const s of this.displayObjects)for(const n of s.records){if(n.instanceId!==this._activeInstanceId)continue;const s=t.context,r=this._instanceIdToGpuMeshState.get(this._activeInstanceId).getGeometryVAO(s,e),a=n.indexStart*Uint32Array.BYTES_PER_ELEMENT;s.bindVAO(r),s.drawElements(o.TRIANGLES,n.indexCount,i.UNSIGNED_INT,a),s.bindVAO(null)}}getStencilReference(){return 0}getAttributePrecisionPackFactors(){return{}}destroy(){super.destroy();for(const t of this._instanceIdToGpuMeshState.values())t.destroy();for(const t of this._instanceIdToCpuMeshData.values())t.destroy();this._instanceIdToCpuMeshData.clear(),this._instanceIdToGpuMeshState.clear()}setActiveMesh(t){this._activeInstanceId=t}getInput(){if(null==this._activeInstanceId)throw new Error("InternalError: No active instanceId");return this._store.getInstance(this._activeInstanceId).getInput()}_createTransforms(){throw new Error("Method not implemented.")}}export{c as TestDisplayObject};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as t}from"tslib";import{location as e,ComputeVertexInput as o}from"../../GraphShaderModule.js";import{Vec4 as s,Float as i,Vec2 as r,mod as l,mix as a,ifElse as n,or as c,Bool as m}from"../../graph/glsl.js";import{AAnimatedVertexInput as p,AAnimatedFragmentInput as d,AAnimatedShader as u,getValue as b}from"./AAnimatedShader.js";import{MarkerConstants as h}from"../markers/markerConstants.js";import{getBitBool as x}from"../shaders/utils.js";import{getVisualVariableColor as y,getVisualVariableOpacity as P}from"../shaders/vvUtils.js";class v extends p{}t([e(9,s)],v.prototype,"tlbr",void 0),t([e(10,i)],v.prototype,"angle",void 0);class S extends o{}t([e(14,r)],S.prototype,"nextPos1",void 0),t([e(15,r)],S.prototype,"nextPos2",void 0);class g extends d{}class f extends u{constructor(){super(...arguments),this.computeAttributes={pos:["nextPos1","nextPos2"]}}_fragmentPoly(t){const e=l(t.uv,new i(1)),o=a(t.tlbr.xy,t.tlbr.zw,e);return this._getColor(o,{color:t.color,distanceToPx:t.distanceToPx,isSDF:t.isSDF,outlineColor:t.outlineColor,outlineSize:t.strokeWidth})}_vertexPoly(t){const{position:e,animationPointer:o,evalParams:r,isOutline:l,unscaledDistanceToPx:p,vvScale:d,strokeWidth:u,scaleSymbolsProportionally:v,scale:S,isSDF:g,baseSize:f,clip:w}=this._vertexPreamble(t,new i(0),t.lineLength||new i(0)),k=this._toNdc(e);let j=b(o,1,r);j=new s(j.rgb.multiply(j.a),j.a);let z=n(x(t.bitset,h.bitset.colorLocked),j,b(o,2,r));z=new s(z.rgb.multiply(z.a),z.a);let D=b(o,3,r);D=new s(D.rgb.multiply(D.a),D.a);const
|
|
2
|
+
import{__decorate as t}from"tslib";import{location as e,ComputeVertexInput as o}from"../../GraphShaderModule.js";import{Vec4 as s,Float as i,Vec2 as r,mod as l,mix as a,ifElse as n,or as c,Bool as m}from"../../graph/glsl.js";import{AAnimatedVertexInput as p,AAnimatedFragmentInput as d,AAnimatedShader as u,getValue as b}from"./AAnimatedShader.js";import{MarkerConstants as h}from"../markers/markerConstants.js";import{getBitBool as x}from"../shaders/utils.js";import{getVisualVariableColor as y,getVisualVariableOpacity as P}from"../shaders/vvUtils.js";class v extends p{}t([e(9,s)],v.prototype,"tlbr",void 0),t([e(10,i)],v.prototype,"angle",void 0);class S extends o{}t([e(14,r)],S.prototype,"nextPos1",void 0),t([e(15,r)],S.prototype,"nextPos2",void 0);class g extends d{}class f extends u{constructor(){super(...arguments),this.computeAttributes={pos:["nextPos1","nextPos2"]}}_fragmentPoly(t){const e=l(t.uv,new i(1)),o=a(t.tlbr.xy,t.tlbr.zw,e);return this._getColor(o,{color:t.color,distanceToPx:t.distanceToPx,isSDF:t.isSDF,outlineColor:t.outlineColor,outlineSize:t.strokeWidth})}_vertexPoly(t){const{position:e,animationPointer:o,evalParams:r,isOutline:l,unscaledDistanceToPx:p,vvScale:d,strokeWidth:u,scaleSymbolsProportionally:v,scale:S,isSDF:g,baseSize:f,clip:w}=this._vertexPreamble(t,new i(0),t.lineLength||new i(0)),k=this._toNdc(e);let j=b(o,1,r);j=new s(j.rgb.multiply(j.a),j.a);let z=n(x(t.bitset,h.bitset.colorLocked),j,b(o,2,r));z=new s(z.rgb.multiply(z.a),z.a);let D=b(o,3,r);D=new s(D.rgb.multiply(D.a),D.a);const F=b(o,4,r).a,T=b(o,5,r).a,_=this.getFeatureId(t.id,t.bitset),C=y(this,_,j,c(x(t.bitset,h.bitset.colorLocked),new m(l))),A=a(C,z,D),L=P(this,_),W=a(L,F,T),O=A.multiply(W),G=this.clip(t.id,t.bitset,t.zoomRange).add(w.multiply(2)),I=p.multiply(d);return{unscaledDistanceToPx:p,vvScale:d,strokeWidth:u,scaleSymbolsProportionally:v,scale:S,isSDF:g,baseSize:f,ndc:k,color:O,z:G,isOutline:l,evalParams:r,distanceToPx:I}}}export{f as AAnimatedPolyShader,g as PolyFragmentInput,S as PolyHittestVertexInput,v as PolyVertexInput};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as
|
|
2
|
+
import{__decorate as t}from"tslib";import{animationDebugFlags as i}from"../../../../../../../symbols/cim/animationDebugFlags.js";import{generateVirtualMachineSource as e}from"../../../animations/instructions.js";import{location as o,uniform as a,texture as s,option as r}from"../../GraphShaderModule.js";import{Vec2 as l,Vec4 as n,Float as m,Sampler2D as p,cond as u,equal as d,negate as c,step as y,sin as v,cos as b,Mat3 as h,Vec3 as f,lessThanEqual as S,ifElse as g,texture2D as w,clamp as V,abs as x,block as z}from"../../graph/glsl.js";import{AnimationUniformInfo as P}from"./AnimationUniformInfo.js";import{MarkerConstants as T}from"../markers/markerConstants.js";import{FeatureVertexInput as j,AFeatureShader as _,FeatureFragmentInput as M}from"../shaders/AFeatureShader.js";import{softEdgeRatio as O}from"../shaders/constants.js";import{LocalTileOffset as F}from"../shaders/LocalTileOffset.js";import{MosaicInfo as I}from"../shaders/MosaicInfo.js";import{getBit as C,rgba2float as D}from"../shaders/utils.js";import{VisualVariableColor as L}from"../shaders/VisualVariableColor.js";import{VisualVariableOpacity as R}from"../shaders/VisualVariableOpacity.js";import{VisualVariableRotation as A}from"../shaders/VisualVariableRotation.js";import{VisualVariableSizeMinMaxValue as k}from"../shaders/VisualVariableSizeMinMaxValue.js";import{VisualVariableSizeScaleStops as U}from"../shaders/VisualVariableSizeScaleStops.js";import{VisualVariableSizeStops as E}from"../shaders/VisualVariableSizeStops.js";import{VisualVariableSizeUnitValue as B}from"../shaders/VisualVariableSizeUnitValue.js";import{getVisualVariableSize as G,getVisualVariableAngle as q}from"../shaders/vvUtils.js";class N extends j{}t([o(3,l)],N.prototype,"offset",void 0),t([o(4,n)],N.prototype,"sizing",void 0),t([o(5,n)],N.prototype,"value1Position2Value2",void 0),t([o(6,n)],N.prototype,"animationPointerAndBaseSizeAndReferenceSize",void 0),t([o(7,l)],N.prototype,"zoomRange",void 0),t([o(8,m)],N.prototype,"lineLength",void 0);class W extends M{}class Z extends _{_vertexPreamble(t,i,e,o){const{animationPointerAndBaseSizeAndReferenceSize:a,sizing:s}=t,r=o??t.offset,l=this.getFeatureId(t.id,t.bitset),n=a.xy,p=a.z,v=a.w,b=s.xy,h=u([d(C(t.bitset,T.bitset.isMapAligned),new m(1)),this.view.getRotation().divide(180).multiply(Math.PI)],[!0,new m(0)]),f=c(h.add(i)),S=this._getEvalParams(t,b,e,f);let g,w;if(t.value1Position2Value2){let i;i=this.hittestRequest?new m(0):H(n,6,S).a.multiply(this.tile.getDisplayZoomFactor(this.tileInfo));const e=t.pos,o=t.value1Position2Value2.yz,a=t.value1Position2Value2.x,s=t.value1Position2Value2.w,r=i.subtract(a).divide(s.subtract(a));w=e.add(o.subtract(e).multiply(r)),g=y(new m(1),r).add(y(new m(0),c(r)))}else w=t.pos,g=new m(0);w=this.getLabelPosition(w,t.id,t.bitset);const V=s.z,x=C(t.bitset,T.bitset.isStroke),z=s.w,P=C(t.bitset,T.bitset.scaleSymbolsProportionally),j=H(n,0,S),_=j.xy,M=j.z,O=j.w,F=C(t.bitset,T.bitset.isSDF),I=G(this,l,new m(v)).divide(new m(v));return{baseSize:p,animationPointer:n,strokeWidth:V,isOutline:x,unscaledDistanceToPx:z,scaleSymbolsProportionally:P,isSDF:F,position:this._getScreenPosition({id:l,pos:w,offset:r,referenceSize:v,translation:_,rotation:M,scale:O,vvScale:I}),evalParams:S,vvScale:I,scale:O,clip:g}}_getScreenPosition(t){const{pos:i,translation:e,rotation:o,scale:a,offset:s,id:r,vvScale:l}=t,n=q(this,r).multiply(Math.PI/180),p=e.x.multiply(4/3),u=e.y.multiply(-1).multiply(4/3),d=v(n),y=b(n),S=y.multiply(p).add(c(d).multiply(u)),g=d.multiply(p).add(y.multiply(u)),w=v(o.subtract(n)),V=b(o.subtract(n)),x=new m(0),z=new m(1),P=new h(z,x,x,x,z,x,S,g,z),T=new h(V,w.multiply(-1),x,w,V,x,0,0,z),j=a.multiply(l).multiply(4/3),_=T.multiply(j),M=this.tile.getViewScreenMat3(this.view).multiply(new f(i,1)),O=P.multiply(M).xy,F=_.multiply(new f(s,0)).xy;return O.add(F)}_clip(t,e,o){let a=super.clip(t,e,o);const s=S(this._getLocalTimeOrigin(t),new m(0));return i.forceGlobalTimeOrigin||(a=a.add(u([s,()=>new m(2)],[!0,()=>new m(0)]))),a}_getLocalTimeOrigin(t){return this.getLocalTimeOrigin(t)}_toNdc(t){return this.view.displayMat3.multiply(new f(t,1)).xy}_getEvalParams(t,i,e,o){const{globalTime:a,animationTextureSize:s}=this.animationInfo;return{globalTime:a,localTimeOrigin:this._getLocalTimeOrigin(this.getFeatureId(t.id,t.bitset)),animationTextureSize:s,animationTexture:this.animationTexture,pixelDimensions:i,lineLength:e,globalRotation:o}}_getColor(t,i){return g(d(i.isSDF,new m(1)),this._getSDFColor(t,i),this._getSpriteColor(t,i))}_getSpriteColor(t,i){return w(this.mosaicTexture,t).multiply(i.color)}_getSDFColor(t,i){const e=w(this.mosaicTexture,t),o=new m(.5).subtract(D(e)).multiply(i.distanceToPx).multiply(O),a=V(new m(.5).subtract(o),new m(0),new m(1)),s=i.color.multiply(a),r=i.outlineSize.multiply(.5),l=x(o).subtract(r),n=V(new m(.5).subtract(l),new m(0),new m(1)),p=i.outlineColor.multiply(n);return new m(1).subtract(p.a).multiply(s).add(p)}}function H(t,i,o){const a=t.add(new l(i,0)),s=w(o.animationTexture,a.add(.5).divide(o.animationTextureSize)).xy;return t=t.add(s),z({animationPointer:t,...o},n,null,t=>{const{out:i}=t;if(!i)throw new Error("out is null");return e({...t,out:i})})}t([a(I)],Z.prototype,"mosaicInfo",void 0),t([a(P)],Z.prototype,"animationInfo",void 0),t([a(F)],Z.prototype,"localTileOffset",void 0),t([s(p)],Z.prototype,"mosaicTexture",void 0),t([r(L)],Z.prototype,"visualVariableColor",void 0),t([r(R)],Z.prototype,"visualVariableOpacity",void 0),t([r(k)],Z.prototype,"visualVariableSizeMinMaxValue",void 0),t([r(U)],Z.prototype,"visualVariableSizeScaleStops",void 0),t([r(E)],Z.prototype,"visualVariableSizeStops",void 0),t([r(B)],Z.prototype,"visualVariableSizeUnitValue",void 0),t([r(A)],Z.prototype,"visualVariableRotation",void 0),t([s(p)],Z.prototype,"animationTexture",void 0);export{W as AAnimatedFragmentInput,Z as AAnimatedShader,N as AAnimatedVertexInput,H as getValue};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as t,__param as e}from"tslib";import{input as s}from"../../GraphShaderModule.js";import{Float as i,sin as r,cos as o,Vec3 as l,Vec4 as n,mix as h,ifElse as u,greaterThan as a}from"../../graph/glsl.js";import{PolyVertexInput as m,PolyHittestVertexInput as p,PolyFragmentInput as c,AAnimatedPolyShader as d}from"./AAnimatedPolyShader.js";import{getPatternMatrix as y}from"../shaders/ComplexFillShader.js";import{c256ToRad as f,noHit as g,trueHit as x}from"../shaders/constants.js";import{isRectHittest as
|
|
2
|
+
import{__decorate as t,__param as e}from"tslib";import{input as s}from"../../GraphShaderModule.js";import{Float as i,sin as r,cos as o,Vec3 as l,Vec4 as n,mix as h,ifElse as u,greaterThan as a}from"../../graph/glsl.js";import{PolyVertexInput as m,PolyHittestVertexInput as p,PolyFragmentInput as c,AAnimatedPolyShader as d}from"./AAnimatedPolyShader.js";import{getPatternMatrix as y}from"../shaders/ComplexFillShader.js";import{c256ToRad as f,noHit as g,trueHit as x}from"../shaders/constants.js";import{isRectHittest as b,hittestRect as w,isPolygonHittest as R,hittestPolygon as q,hittestFill as P,isPointHittest as S}from"../shaders/hittestUtils.js";class v extends d{constructor(){super(...arguments),this.type="AnimatedFillShader"}vertex(t,e){const{distanceToPx:s,ndc:u,z:a,color:m,isOutline:p,strokeWidth:c,isSDF:d,scale:g,scaleSymbolsProportionally:x}=this._vertexPoly(t),b=this.tile.getRequiredZoomFactor(this.tileInfo),w=t.sizing.xy,R=w.multiply(b),q=t.angle?t.angle.multiply(f):new i(0),P=r(q),S=o(q),v=this.getFeatureId(t.id,t.bitset),F=y(v,R,P,S,t.bitset),j=this.localTileOffset.getPatternOffsetAtTileOrigin(w,P,S),O=b.multiply(t.offset.subtract(j)).divide(R),T=new l(t.pos,1),z=F.multiply(T).xy.subtract(O),A=t.tlbr.divide(this.mosaicInfo.size.xyxy);return{glPosition:new n(u,a,1),tlbr:A,uv:z,color:m.multiply(new i(1).subtract(p)),outlineColor:m.multiply(p),distanceToPx:s,strokeWidth:c.multiply(h(new i(1),g,x)),isOutline:p,isSDF:d,...this.maybeRunHittest(t,e,{})}}fragment(t){const e=this._fragmentPoly(t);return this.getFragmentOutput(e,t)}hittest(t,e,s){const r=this.computeHittestTriangle(t,e,null);return u(S(this.hittestRequest),()=>{const s=P(this,t,e);return u(a(s,this.hittestRequest.distance),new i(g),new i(x))},()=>u(b(this.hittestRequest),w(r,this.hittestRequest.rect.xy,this.hittestRequest.rect.zw),u(R(this.hittestRequest),q(r,this.hittestRequest.viewSize,this.hittestMaskTexture),new i(g))))}}t([e(0,s(m)),e(1,s(p))],v.prototype,"vertex",null),t([e(0,s(c))],v.prototype,"fragment",null);export{v as AnimatedFillShader};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as t,__param as e}from"tslib";import{animationDebugFlags as i}from"../../../../../../../symbols/cim/animationDebugFlags.js";import{location as s,input as o,ComputeVertexInput as r}from"../../GraphShaderModule.js";import{Vec2 as l,Float as a,Vec4 as n,ifElse as d,or as
|
|
2
|
+
import{__decorate as t,__param as e}from"tslib";import{animationDebugFlags as i}from"../../../../../../../symbols/cim/animationDebugFlags.js";import{location as s,input as o,ComputeVertexInput as r}from"../../GraphShaderModule.js";import{Vec2 as l,Float as a,Vec4 as n,ifElse as d,or as u,Bool as h,mix as p,Mat3 as m,lessThan as c,Vec3 as x,distance as y,greaterThan as w,negate as g}from"../../graph/glsl.js";import{AAnimatedVertexInput as f,AAnimatedShader as v,getValue as b,AAnimatedFragmentInput as S}from"./AAnimatedShader.js";import{MarkerConstants as _}from"../markers/markerConstants.js";import{noHit as V,trueHit as z}from"../shaders/constants.js";import{isRectHittest as C,hittestMarkerRect as P,isPolygonHittest as R,hittestPolygon as k,isPointHittest as q,distPointTriangle as N,xyToBarycentric as T,inTriangle as M}from"../shaders/hittestUtils.js";import{getBitBool as D}from"../shaders/utils.js";import{getVisualVariableColor as F,getVisualVariableOpacity as j}from"../shaders/vvUtils.js";class U extends f{}t([s(9,l)],U.prototype,"uv",void 0),t([s(10,a)],U.prototype,"angle",void 0);class A extends r{}t([s(11,l)],A.prototype,"offsetNextVertex1",void 0),t([s(12,l)],A.prototype,"offsetNextVertex2",void 0),t([s(13,l)],A.prototype,"textureUVNextVertex1",void 0),t([s(14,l)],A.prototype,"textureUVNextVertex2",void 0);class I extends S{}function H(t,e,i,s){return e.multiply(t.x).add(i.multiply(t.y)).add(s.multiply(t.z))}class L extends v{constructor(){super(...arguments),this.type="AnimatedMarkerShader",this.computeAttributes={offset:["offsetNextVertex1","offsetNextVertex2"],uv:["textureUVNextVertex1","textureUVNextVertex2"]}}vertex(t,e){const i=t.uv.divide(this.mosaicInfo.size),{position:s,animationPointer:o,evalParams:r,isOutline:l,unscaledDistanceToPx:c,vvScale:x,strokeWidth:y,scaleSymbolsProportionally:w,scale:g,isSDF:f,baseSize:v,clip:S}=this._vertexPreamble(t,t.angle,t.lineLength||new a(0)),V=this._toNdc(s);let z=b(o,1,r);z=new n(z.rgb.multiply(z.a),z.a);let C=d(D(t.bitset,_.bitset.colorLocked),z,b(o,2,r));C=new n(C.rgb.multiply(C.a),C.a);let P=b(o,3,r);P=new n(P.rgb.multiply(P.a),P.a);const R=b(o,4,r).a,k=b(o,5,r).a,q=this.getFeatureId(t.id,t.bitset),N=F(this,q,z,u(D(t.bitset,_.bitset.colorLocked),new h(l))),T=p(N,C,P),M=j(this,q),U=p(M,R,k),A=T.multiply(U),I=this.clip(t.id,t.bitset,t.zoomRange).add(S.multiply(2)),H=c.multiply(x);return{glPosition:new n(V,I,1),uv:i,color:A.multiply(new a(1).subtract(l)),outlineColor:A.multiply(l),distanceToPx:H,strokeWidth:y.multiply(p(new a(1),g,w)),isOutline:l,isSDF:f,...this.maybeRunHittest(t,e,{pos:this.getLabelPosition(t.pos,t.id,t.bitset),size:v,sizeCorrection:new a(1),isMapAligned:new a(1),vvRotationMat3:new m(1,0,0,0,1,0,0,0,1),placementMat3:new m(1,0,0,0,1,0,0,0,1),outlineSize:new a(1),distanceToPx:H,isSDF:f})}}computeHittestTriangle(t,e,i){const s=new a(0);return{pos0:this._vertexPreamble(t,t.angle,s).position,pos1:this._vertexPreamble(t,t.angle,s,e.offsetNextVertex1).position,pos2:this._vertexPreamble(t,t.angle,s,e.offsetNextVertex2).position}}fragment(t){let e=this._getColor(t.uv,{color:t.color,distanceToPx:t.distanceToPx,isSDF:t.isSDF,outlineColor:t.outlineColor,outlineSize:t.strokeWidth});return i.spotlightAnimatedSymbols&&(e=e.add(new n(0,.3,0,.3))),this.getFragmentOutput(e,t)}hittest(t,e,i){const s=this.computeHittestTriangle(t,e,i);return d(q(this.hittestRequest),()=>d(c(i.size,this.hittestRequest.smallSymbolSizeThreshold),this._hittestSmallMarker(t,e,i),this._hittestMarker(t,e,i)),()=>d(C(this.hittestRequest),P(s,this.hittestRequest.rect.xy,this.hittestRequest.rect.zw),d(R(this.hittestRequest),k(s,this.hittestRequest.viewSize,this.hittestMaskTexture),new a(V))))}_hittestSmallMarker(t,e,i){const{position:s,distance:o,smallSymbolDistance:r}=this.hittestRequest,l=o.subtract(r),n=this.tile.getViewScreenMat3(this.view).multiply(new x(i.pos,1)).xy,u=i.size.multiply(.5),h=y(n,s).subtract(u).add(l);return d(w(h,this.hittestRequest.distance),new a(V),new a(z))}_hittestMarker(t,e,i){const{pos0:s,pos1:o,pos2:r}=this.computeHittestTriangle(t,e,i),l=this.hittestRequest.position,n=this.hittestRequest.distance,u=N(l,s,o,r);return d(w(u,n),new a(V),this._hittestSamples(s,o,r,t,e,i))}_hittestSamples(t,e,i,s,o,r){const{outlineSize:u,isSDF:h,distanceToPx:p}=r,m=this.hittestRequest.position,c=this.hittestRequest.distance,x=T(m.add(new l(g(c),g(c))),t,e,i),y=T(m.add(new l(0,g(c))),t,e,i),f=T(m.add(new l(c,g(c))),t,e,i),v=T(m.add(new l(g(c),0)),t,e,i),b=T(m,t,e,i),S=T(m.add(new l(c,0)),t,e,i),_=T(m.add(new l(g(c),c)),t,e,i),C=T(m.add(new l(0,c)),t,e,i),P=T(m.add(new l(c,c)),t,e,i),R=s.uv.divide(this.mosaicInfo.size),k=o.textureUVNextVertex1.divide(this.mosaicInfo.size),q=o.textureUVNextVertex2.divide(this.mosaicInfo.size),N={color:new n(1,1,1,1),outlineSize:u,outlineColor:new n(1,1,1,1),isSDF:h,distanceToPx:p};let D=new a(0);return D=D.add(M(x).multiply(this._getColor(H(x,R,k,q),N).a)),D=D.add(M(y).multiply(this._getColor(H(y,R,k,q),N).a)),D=D.add(M(f).multiply(this._getColor(H(f,R,k,q),N).a)),D=D.add(M(v).multiply(this._getColor(H(v,R,k,q),N).a)),D=D.add(M(b).multiply(this._getColor(H(b,R,k,q),N).a)),D=D.add(M(S).multiply(this._getColor(H(S,R,k,q),N).a)),D=D.add(M(_).multiply(this._getColor(H(_,R,k,q),N).a)),D=D.add(M(C).multiply(this._getColor(H(C,R,k,q),N).a)),D=D.add(M(P).multiply(this._getColor(H(P,R,k,q),N).a)),d(w(D,new a(.05)),new a(z),new a(V))}}t([e(0,o(U)),e(1,o(A))],L.prototype,"vertex",null),t([e(0,o(I))],L.prototype,"fragment",null);export{I as AnimatedMarkerFragmentInput,L as AnimatedMarkerShader,U as AnimatedMarkerVertexInput};
|