@arcgis/core 5.1.0-next.113 → 5.1.0-next.115
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/Graphic.d.ts +1 -0
- package/Map.js +1 -1
- package/analysis/ShadowCast/MinDurationOptions.d.ts +3 -5
- package/analysis/ShadowCastAnalysis.d.ts +1 -1
- package/arcgisGlobal.d.ts +4 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{31a8bc25aa1441c70caa.js → 009250a7bded12099dd1.js} +1 -1
- package/assets/esri/core/workers/chunks/05c47ca3a266a271974b.js +1 -0
- package/assets/esri/core/workers/chunks/{29bbc0d6d847b065d10e.js → 062aadf426fe97a76bbb.js} +1 -1
- package/assets/esri/core/workers/chunks/0954e82f739d25001bcb.js +1 -0
- package/assets/esri/core/workers/chunks/0a530fbbb4486c670ea2.js +1 -0
- package/assets/esri/core/workers/chunks/0aaee272520c6e5bb617.js +1 -0
- package/assets/esri/core/workers/chunks/{12053c1213465d07d2f6.js → 0b445c1cf281f158c1f1.js} +1 -1
- package/assets/esri/core/workers/chunks/{14b7b55c42af65ffa024.js → 0bd2b035c6ee89c725f9.js} +1 -1
- package/assets/esri/core/workers/chunks/0ded5c114cbb7574f2f4.js +1 -0
- package/assets/esri/core/workers/chunks/102ff3710db4ba5f083d.js +1 -0
- package/assets/esri/core/workers/chunks/{7dafe608c224b9d48ffa.js → 115664cb7d7b22a315bb.js} +1 -1
- package/assets/esri/core/workers/chunks/123a67e84ed68b96ac59.js +1 -0
- package/assets/esri/core/workers/chunks/163ce1be8bfe20e77f97.js +1 -0
- package/assets/esri/core/workers/chunks/16713986893adfbc9331.js +1 -0
- package/assets/esri/core/workers/chunks/{054ae729e7cefa2c7778.js → 170f8dc97614e9609443.js} +1 -1
- package/assets/esri/core/workers/chunks/{9bd713d96502ddc2ce25.js → 1765042635084f75d2b3.js} +1 -1
- package/assets/esri/core/workers/chunks/185c670eb99474906836.js +1 -0
- package/assets/esri/core/workers/chunks/18ebf1d3ed05c8057f7d.js +1 -0
- package/assets/esri/core/workers/chunks/{4a65bc9091d7ea7e80df.js → 19f07c8d0f32ec889861.js} +1 -1
- package/assets/esri/core/workers/chunks/1da2c34743897d1b6a24.js +1 -0
- package/assets/esri/core/workers/chunks/{ca92176d5348e2c533d7.js → 224a9f39876aa426a9bc.js} +1 -1
- package/assets/esri/core/workers/chunks/22d4521637806a8b828f.js +1 -0
- package/assets/esri/core/workers/chunks/233ff588798c8a5eedf4.js +1 -0
- package/assets/esri/core/workers/chunks/24d9e4f1c7b8ff0d2cce.js +1 -0
- package/assets/esri/core/workers/chunks/2562d8905bd05ef6fd07.js +1 -0
- package/assets/esri/core/workers/chunks/{8aac1155b8ac071cd2ad.js → 2855357a2c1f2ab03fb7.js} +1 -1
- package/assets/esri/core/workers/chunks/{e5d969214d9eda5c0b4c.js → 2a5dbed88bbd96cfac9f.js} +1 -1
- package/assets/esri/core/workers/chunks/{33329f5d88e60b4ec568.js → 2a8f198f6c272f92bad5.js} +1 -1
- package/assets/esri/core/workers/chunks/{cb3004998eff7c60930e.js → 2b2a09ce14d00b4b1187.js} +1 -1
- package/assets/esri/core/workers/chunks/2bcd4d395bfe6a19ccc8.js +1 -0
- package/assets/esri/core/workers/chunks/{bd17ac2e6f1eb8cf7abf.js → 2fa080539d039c92ce08.js} +1 -1
- package/assets/esri/core/workers/chunks/{ee635172be7fdea69367.js → 3109b05fe4fc40d4f25b.js} +1 -1
- package/assets/esri/core/workers/chunks/{92db9a6d273ae2862883.js → 315bf08dff4757ffbed3.js} +1 -1
- package/assets/esri/core/workers/chunks/3192586ec7fc73ed1165.js +1 -0
- package/assets/esri/core/workers/chunks/{593772bd8b19ac664b29.js → 35527a01d61cabbfd33e.js} +1 -1
- package/assets/esri/core/workers/chunks/38ca59db0e8f45bd7811.js +1 -0
- package/assets/esri/core/workers/chunks/3b10a962e4ff2f3da5bc.js +1 -0
- package/assets/esri/core/workers/chunks/3e9709e61015993b1c7d.js +1 -0
- package/assets/esri/core/workers/chunks/41074d383af3662673ca.js +1 -0
- package/assets/esri/core/workers/chunks/425c04b26a6ec6d04b08.js +1 -0
- package/assets/esri/core/workers/chunks/4364a3e706294bb6ae41.js +1 -0
- package/assets/esri/core/workers/chunks/44e52fe98ffafe6a2807.js +1 -0
- package/assets/esri/core/workers/chunks/49675e77a351abda2728.js +1 -0
- package/assets/esri/core/workers/chunks/4cecc582513b8a83f194.js +1 -0
- package/assets/esri/core/workers/chunks/5022413f5a41b5d435ea.js +1 -0
- package/assets/esri/core/workers/chunks/{8ade869fa9bae446266a.js → 51816d79c6be15e4bfcf.js} +1 -1
- package/assets/esri/core/workers/chunks/{cf9b0ba30a75c030ca92.js → 5524a71d1abc9568ce26.js} +1 -1
- package/assets/esri/core/workers/chunks/{ba31616de9d73d83d867.js → 557e39e5156b313597f9.js} +1 -1
- package/assets/esri/core/workers/chunks/{5ef37f37e405b3bb5450.js → 59dafa1e1340ea4043e6.js} +1 -1
- package/assets/esri/core/workers/chunks/{77ac243d4dcd901c2eec.js → 621d71d26bd20e296138.js} +1 -1
- package/assets/esri/core/workers/chunks/624b1bb269744142b835.js +1 -0
- package/assets/esri/core/workers/chunks/{52a91c314afec70199bc.js → 62b5972d0ef9bf173308.js} +1 -1
- package/assets/esri/core/workers/chunks/641b8622fbb93c84671d.js +1 -0
- package/assets/esri/core/workers/chunks/643c7506f8fe8e06acd2.js +1 -0
- package/assets/esri/core/workers/chunks/65f02eca694cc1c9f5a7.js +1 -0
- package/assets/esri/core/workers/chunks/{7e203e947846d40f897e.js → 67dffb896b6ef4b2038b.js} +1 -1
- package/assets/esri/core/workers/chunks/696967c8c6f53b94f851.js +1 -0
- package/assets/esri/core/workers/chunks/6d696beddcc5fbed5875.js +1 -0
- package/assets/esri/core/workers/chunks/7014e73dfd3c8baa704c.js +1 -0
- package/assets/esri/core/workers/chunks/728ad5bbbcbf88d6249f.js +1 -0
- package/assets/esri/core/workers/chunks/76a9b64fd573775bf6cd.js +1 -0
- package/assets/esri/core/workers/chunks/{0d2bc1be5802681666a4.js → 77859a61d059738d057f.js} +1 -1
- package/assets/esri/core/workers/chunks/{03a4543b94f9adeb1852.js → 7a3b05e25de2ff150f38.js} +1 -1
- package/assets/esri/core/workers/chunks/7bbffe07e62897928773.js +1 -0
- package/assets/esri/core/workers/chunks/7c292f7b181f3b93352b.js +1 -0
- package/assets/esri/core/workers/chunks/7c2d7df4ef4d775cd648.js +1 -0
- package/assets/esri/core/workers/chunks/{6d20d741b8ae1a45b422.js → 7dc2c21d61ba66a3f461.js} +1 -1
- package/assets/esri/core/workers/chunks/7df05c3c82cd27b77300.js +1 -0
- package/assets/esri/core/workers/chunks/{6c79e8e840c1d027fbb2.js → 7e0daf0864005cdd63c5.js} +1 -1
- package/assets/esri/core/workers/chunks/7eb94fc75926bc739233.js +1 -0
- package/assets/esri/core/workers/chunks/8461f50e9875db4ccfec.js +1 -0
- package/assets/esri/core/workers/chunks/{71e12db99589c98a4357.js → 8477b5fdd99c6ac5c27b.js} +1 -1
- package/assets/esri/core/workers/chunks/{be1e4c3ec53fc92a26f1.js → 8598997340682113a2a5.js} +1 -1
- package/assets/esri/core/workers/chunks/{2dc2487d05381de07e3f.js → 86229634bf008f53dad4.js} +1 -1
- package/assets/esri/core/workers/chunks/86443e47ad99e555753a.js +1 -0
- package/assets/esri/core/workers/chunks/8795c4895df229cb471c.js +1 -0
- package/assets/esri/core/workers/chunks/87a40e7f79f97ca637a9.js +1 -0
- package/assets/esri/core/workers/chunks/{7bc746ea17f4e336e0b0.js → 8b5ee6be52e892fbd325.js} +1 -1
- package/assets/esri/core/workers/chunks/{27d6ad4ca5ab8c9d62cd.js → 8c443c52c846a096a250.js} +1 -1
- package/assets/esri/core/workers/chunks/{86161025b53b916328ff.js → 8ca88cfc0b9f84dc5832.js} +1 -1
- package/assets/esri/core/workers/chunks/{340f2c996f62f7f5ceae.js → 8e7ce4835b3106349684.js} +1 -1
- package/assets/esri/core/workers/chunks/90b0fe5584fb6fc99766.js +1 -0
- package/assets/esri/core/workers/chunks/9133c1b7cc1c9da27deb.js +1 -0
- package/assets/esri/core/workers/chunks/{d4749eb8a47869477037.js → 9250615c78f8570a9cda.js} +1 -1
- package/assets/esri/core/workers/chunks/927c8ca7fd385b28a1b7.js +640 -0
- package/assets/esri/core/workers/chunks/92a7735973b2f82a66ce.js +1 -0
- package/assets/esri/core/workers/chunks/942e527b9b92999886c7.js +1 -0
- package/assets/esri/core/workers/chunks/94a5a834e32fc6cc6ed4.js +1 -0
- package/assets/esri/core/workers/chunks/986d8c3907aeeb18c4f6.js +1 -0
- package/assets/esri/core/workers/chunks/98e489c2b85feded7776.js +1 -0
- package/assets/esri/core/workers/chunks/{eb1d6614eeac6d26bb9c.js → 9a3344f1dd22c425b8cc.js} +1 -1
- package/assets/esri/core/workers/chunks/9a6e62ef984e9c5babc4.js +1 -0
- package/assets/esri/core/workers/chunks/{271e42b7cd3c3441839e.js → 9eab1e1535494ff2050d.js} +10 -22
- package/assets/esri/core/workers/chunks/{466c250537415f12eb59.js → a01f0ffbe555f690bdca.js} +1 -1
- package/assets/esri/core/workers/chunks/a03c4c0bf138734a002e.js +1 -0
- package/assets/esri/core/workers/chunks/a0b6eef4890cc61609dc.js +1 -0
- package/assets/esri/core/workers/chunks/{f37be7e517f0892014e3.js → a320c69bc7528ff0d0cf.js} +1 -1
- package/assets/esri/core/workers/chunks/{660713adb5a845dfa2ef.js → a40003dfe3c081d1a1d2.js} +1 -1
- package/assets/esri/core/workers/chunks/a814069325125466506b.js +1 -0
- package/assets/esri/core/workers/chunks/{e4b2120d7ee1c998b1fc.js → aa03f770178693167aa0.js} +1 -1
- package/assets/esri/core/workers/chunks/aea439d4c2308f88b295.js +1 -0
- package/assets/esri/core/workers/chunks/{7995e6983456c779adf9.js → b002304a45856b024b46.js} +1 -1
- package/assets/esri/core/workers/chunks/b0c242c4f5412e4cce73.js +1 -0
- package/assets/esri/core/workers/chunks/b44f1d08784f2e50c853.js +1 -0
- package/assets/esri/core/workers/chunks/b5937ce657c1fff3864f.js +1 -0
- package/assets/esri/core/workers/chunks/b7a0a5b895ddd2d3d038.js +1 -0
- package/assets/esri/core/workers/chunks/{f3161c47a572194f6017.js → c06ae3a6ecc4a4fc67b2.js} +1 -1
- package/assets/esri/core/workers/chunks/c1b6de0d728d25d7905a.js +1 -0
- package/assets/esri/core/workers/chunks/{970e91de5dfbbc247afb.js → c5b7ff8650235c464dbf.js} +1 -1
- package/assets/esri/core/workers/chunks/c8dedc010fcc2382af24.js +1 -0
- package/assets/esri/core/workers/chunks/{f8b884b529064df4a30a.js → caf80facb0322be054ab.js} +1 -1
- package/assets/esri/core/workers/chunks/{5a6523c903b11dea77d4.js → cdef9c3f80588ae45a04.js} +1 -1
- package/assets/esri/core/workers/chunks/{25d795a1697803d77e56.js → ce0e627a5e1cb78adce8.js} +1 -1
- package/assets/esri/core/workers/chunks/{e973cab79ec2541cb81b.js → d19600336cb6023d3e34.js} +1 -1
- package/assets/esri/core/workers/chunks/{10491b5b106bc5ad0b2b.js → d66f68a811c90739951a.js} +1 -1
- package/assets/esri/core/workers/chunks/{63378b0b4265a547656b.js → d8ec0afb2b91ccf32e55.js} +1 -1
- package/assets/esri/core/workers/chunks/d97c0c18202b8c578f8c.js +1 -0
- package/assets/esri/core/workers/chunks/da3c54e27a808f4fcc18.js +1 -0
- package/assets/esri/core/workers/chunks/db012650fb34c10cecd0.js +1 -0
- package/assets/esri/core/workers/chunks/dc6d50e1097a920ff820.js +1 -0
- package/assets/esri/core/workers/chunks/dce37324a2382d2eef0d.js +1 -0
- package/assets/esri/core/workers/chunks/e0bd550b10dd402c48f1.js +1 -0
- package/assets/esri/core/workers/chunks/{63513e706fe55a1def15.js → e227ae2c1a63e30e62d9.js} +1 -1
- package/assets/esri/core/workers/chunks/{e4c350dc65aae121171d.js → e29d182460564c2a52ad.js} +1 -1
- package/assets/esri/core/workers/chunks/e2ba57f7119b7182ba02.js +279 -0
- package/assets/esri/core/workers/chunks/e755477dc78e9d6038d4.js +1 -0
- package/assets/esri/core/workers/chunks/ea4057090cf15d602585.js +1 -0
- package/assets/esri/core/workers/chunks/ea8f642b1db933d2c26f.js +1 -0
- package/assets/esri/core/workers/chunks/eabd4a78221b7e733793.js +1 -0
- package/assets/esri/core/workers/chunks/eb16976b4eb7f1300f4a.js +1 -0
- package/assets/esri/core/workers/chunks/efae58f746b108163a50.js +1 -0
- package/assets/esri/core/workers/chunks/f0b5c140a5ba174572b6.js +1 -0
- package/assets/esri/core/workers/chunks/f231548c8ac7ecb59927.js +1 -0
- package/assets/esri/core/workers/chunks/{ce3b5b83237cf37ff523.js → f286680e363eefdf27df.js} +1 -1
- package/assets/esri/core/workers/chunks/f7698c855800e0af3038.js +1 -0
- package/assets/esri/core/workers/chunks/f931d560f3f14598f454.js +1 -0
- package/assets/esri/core/workers/chunks/fe2325efd0d8ad8369ed.js +1 -0
- package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core-simd.wasm +0 -0
- package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core.wasm +0 -0
- package/assets/esri/themes/base/widgets/_BatchAttributeForm.scss +26 -3
- package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +4 -13
- 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/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_en.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_en.json +1 -1
- package/chunks/GlobalIllumination.glsl.js +22 -34
- package/chunks/Path.glsl.js +22 -17
- package/config.js +1 -1
- package/core/screenUtils.js +1 -1
- package/core/typedArrayUtil.js +1 -1
- package/editing/templates/TemplateListing.d.ts +32 -0
- package/editing/templates/TemplateListing.js +2 -0
- package/geometry/support/DoubleArray.js +1 -1
- package/geometry/support/Indices.js +1 -1
- package/geometry/support/buffer/BufferView.js +1 -1
- package/geometry/support/heightModelInfoUtils.js +1 -1
- package/interfaces.d.ts +14 -0
- package/kernel.js +1 -1
- package/layers/AnnotationLayer.d.ts +42 -0
- package/layers/AnnotationLayer.js +2 -0
- package/layers/DimensionFeatureLayer.d.ts +36 -1
- package/layers/DimensionFeatureLayer.js +1 -1
- package/layers/DimensionLayer.d.ts +22 -0
- package/layers/FeatureLayer.d.ts +15 -12
- package/layers/FeatureLayer.js +1 -1
- package/layers/GaussianSplatLayer.d.ts +22 -0
- package/layers/LineOfSightLayer.d.ts +22 -0
- package/layers/Lyr3DWasmPerSceneView.js +1 -1
- package/layers/PointCloudLayer.d.ts +22 -0
- package/layers/ViewshedLayer.d.ts +22 -0
- package/layers/graphics/sources/FeatureLayerSource.js +1 -1
- package/layers/graphics/sources/support/MemorySourceWorker.js +1 -1
- package/layers/support/Field.d.ts +1 -0
- package/layers/support/Field.js +1 -1
- package/layers/support/SceneModification.js +1 -1
- package/layers/support/types.d.ts +1 -1
- package/layers/types.d.ts +2 -1
- package/networks/support/networkFieldUtils.js +1 -1
- package/package.json +1 -1
- package/rest/support/OutDistance.js +1 -1
- package/rest/support/Query.d.ts +1 -0
- package/rest/support/Query.js +1 -1
- package/support/basemapEnsureType.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/CIMOperators.js +1 -1
- package/symbols/cim/CIMSymbolHelper.js +1 -1
- package/symbols/cim/animationUtils.js +1 -1
- package/symbols/cim/defaultCIMValues.js +1 -1
- package/symbols/cim/utils.js +1 -1
- package/views/2d/engine/vectorTiles/VectorTileContainer.js +1 -1
- package/views/2d/engine/webgl/animations/instructions.js +1 -1
- package/views/2d/engine/webgl/mesh/factories/FeatureMeshFactory.js +1 -1
- package/views/2d/engine/webgl/mesh/factories/ResourceProxy.js +1 -1
- package/views/2d/engine/webgl/mesh/templates/shapingUtils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/createTestMeshData.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/featureTechniqueUtils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/LineShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/ViewInfo.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/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/engine/webgl/util/AnnotationMatcher.js +2 -0
- package/views/2d/engine/webgl/util/DimensionMatcher.js +2 -0
- package/views/2d/engine/webgl/util/Matcher.js +1 -1
- package/views/2d/engine/webgl/util/createMatcher.js +1 -1
- package/views/2d/layerViewModuleImportUtils.js +1 -1
- package/views/2d/layers/AnnotationLayerView2D.js +2 -0
- package/views/2d/layers/{DimensionLayerView2D.js → DimensionFeatureLayerView2D.js} +1 -1
- package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
- package/views/2d/layers/MapImageLayerView2D.js +1 -1
- package/views/2d/layers/RouteLayerView2D.js +1 -1
- package/views/2d/layers/TileLayerView2D.js +1 -1
- package/views/2d/layers/VectorTileLayerView2D.js +1 -1
- package/views/2d/layers/features/FeatureContainer.js +1 -1
- package/views/2d/layers/features/Processor.js +1 -1
- package/views/2d/layers/features/layerAdapters/AnnotationLayerAdapter.js +2 -0
- package/views/2d/layers/features/layerAdapters/CatalogFootprintLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/DimensionLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/FeatureLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/InMemoryLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/KnowledgeGraphSublayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/OGCFeatureLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/OrientedImageryLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/ParquetLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/StreamLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/SubtypeGroupLayerAdapter.js +1 -1
- package/views/2d/layers/features/schema/processor/SimpleProcessorSchema.js +1 -1
- package/views/2d/layers/features/sources/strategies/support/queryAdapters.js +1 -1
- package/views/2d/layers/features/support/FeatureMetadata.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderAnnotationJSON.js +2 -0
- package/views/2d/layers/features/support/FeatureSetReaderDimensionJSON.js +2 -0
- package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
- package/views/2d/layers/support/annodime/DimensionInfo.js +2 -0
- package/views/2d/layers/support/annodime/DimensionMatcherSchema.js +2 -0
- package/views/2d/layers/support/annodime/PrivateDimensionEffect.js +2 -0
- package/views/2d/layers/support/annodime/PrivatePlacementMultipoint.js +2 -0
- package/views/2d/layers/support/annodime/annotationGraphic.js +2 -0
- package/views/2d/layers/support/annodime/annotationSchema.js +2 -0
- package/views/2d/layers/support/annodime/annotationUtils.js +2 -0
- package/views/2d/layers/support/annodime/cimAnnotations.js +2 -0
- package/views/2d/layers/support/annodime/dimensionSchema.js +2 -0
- package/views/2d/layers/support/annodime/dimensionSymbols.js +2 -0
- package/views/2d/layers/support/annodime/dimensionUtils.js +2 -0
- package/views/2d/layers/support/annodime/fields.js +2 -0
- package/views/2d/layers/support/annodime/unsupported.js +2 -0
- package/views/2d/layers/support/annodime/utils.js +2 -0
- package/views/2d/layers/support/annodime/virtualFields.js +2 -0
- package/views/2d/support/clippingUtils.js +1 -1
- package/views/2d/support/hitTestUtils.js +1 -1
- package/views/2d/types.d.ts +5 -1
- package/views/3d/analysis/ShadowCast/ShadowCastTooltip.js +1 -1
- package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
- package/views/3d/input/SceneInputManager.js +1 -1
- package/views/3d/layerViewModuleImportUtils.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerWorkerHandle.js +1 -1
- package/views/3d/layers/MapImageLayerView3D.js +1 -1
- package/views/3d/layers/TileLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/extrudeUtils.js +1 -1
- package/views/3d/layers/graphics/tessellationUtils.js +1 -1
- package/views/3d/support/engineContent/line.js +1 -1
- package/views/3d/support/renderInfoUtils/polygon.js +1 -1
- package/views/3d/terrain/isTerrainSurfaceLayer.js +1 -1
- package/views/3d/types.d.ts +2 -0
- package/views/3d/webgl-engine/collections/Component/RenderSubmitSystem.js +1 -1
- package/views/3d/webgl-engine/core/renderPasses/RenderPass.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBufferFields.glsl.js +8 -8
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/PathEvaluate.glsl.js +225 -0
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/PathVertexInfo.glsl.js +19 -0
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/PathVertexPosition.glsl.js +55 -40
- package/views/3d/webgl-engine/core/shaderModules/Float2sPassUniform.js +2 -0
- package/views/3d/webgl-engine/core/shaderModules/IntegersPassUniform.js +2 -0
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
- package/views/3d/webgl-engine/lib/PathBuilder.js +1 -1
- package/views/3d/webgl-engine/lib/PathEvaluator.js +1 -1
- package/views/3d/webgl-engine/lib/PathExtruder.js +1 -1
- package/views/3d/webgl-engine/lib/PathGeometryData.js +1 -1
- package/views/3d/webgl-engine/lib/PathProfile.js +1 -1
- package/views/3d/webgl-engine/lib/PathVertex.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
- package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBufferFieldCreation.js +1 -1
- package/views/3d/webgl-engine/materials/PathLayouts.js +1 -1
- package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
- package/views/3d/webgl-engine/shaders/ditherNoise.glsl.js +18 -1
- package/views/PopupView.d.ts +3 -3
- package/views/PopupView.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/View2D.d.ts +1 -1
- package/views/View2D.js +1 -1
- package/views/draw/DrawTool.d.ts +34 -1
- package/views/input/EventMatch.js +1 -1
- package/views/layers/AnnotationLayerView.d.ts +18 -0
- package/views/layers/AnnotationLayerView.js +2 -0
- package/views/layers/DimensionFeatureLayerView.d.ts +18 -0
- package/views/layers/DimensionFeatureLayerView.js +2 -0
- package/views/layers/FeatureLikeLayerView.d.ts +2 -1
- package/views/layers/FeatureLikeLayerView.js +1 -1
- package/views/layers/ImageryLayerView.js +1 -1
- package/views/layers/ImageryTileLayerView.js +1 -1
- package/views/layers/WMSLayerView.js +1 -1
- package/views/layers/support/MapServiceLayerViewHelper.js +1 -1
- package/widgets/BasemapToggle/BasemapToggleViewModel.js +1 -1
- package/widgets/BatchAttributeForm/css.js +1 -1
- package/widgets/BatchAttributeForm/rendered-content/RelationshipDetails.js +2 -0
- package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
- package/widgets/BatchAttributeForm.js +1 -1
- package/widgets/Directions/DirectionsViewModel.js +1 -1
- package/widgets/Directions.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.d.ts +7 -1
- package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
- package/widgets/FeatureTable/support/FeatureStore.js +1 -1
- package/widgets/FeatureTable/support/types.d.ts +11 -1
- package/widgets/FeatureTable.d.ts +7 -1
- package/widgets/FeatureTable.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/css.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/support/iconUtils.js +1 -1
- package/assets/esri/core/workers/chunks/0175098da590a7109539.js +0 -1
- package/assets/esri/core/workers/chunks/01c70c27aa3a955e2928.js +0 -262
- package/assets/esri/core/workers/chunks/02c0640005b09007bb70.js +0 -1
- package/assets/esri/core/workers/chunks/040884cec4b84dd1bb17.js +0 -1
- package/assets/esri/core/workers/chunks/04ea806b933d4dd41609.js +0 -1
- package/assets/esri/core/workers/chunks/0550dc63b6b1274242b8.js +0 -1
- package/assets/esri/core/workers/chunks/0c8e6ccb5a8174718d62.js +0 -640
- package/assets/esri/core/workers/chunks/13a8346abe5509167578.js +0 -1
- package/assets/esri/core/workers/chunks/13d43a0683c42b94feb6.js +0 -1
- package/assets/esri/core/workers/chunks/13f0e08de2dfab07d212.js +0 -1
- package/assets/esri/core/workers/chunks/1c0e8808d14d8e6dde2c.js +0 -1
- package/assets/esri/core/workers/chunks/1c8c8050d60205cf2156.js +0 -1
- package/assets/esri/core/workers/chunks/1ebb613bbe09fcf274d8.js +0 -1
- package/assets/esri/core/workers/chunks/23119a1b1310b7dab2aa.js +0 -1
- package/assets/esri/core/workers/chunks/282f3d364411efac7b80.js +0 -1
- package/assets/esri/core/workers/chunks/2b9661700743d1f9717e.js +0 -1
- package/assets/esri/core/workers/chunks/2f0a3b22fc46d832e240.js +0 -1
- package/assets/esri/core/workers/chunks/2ffffc1931b2e27c6617.js +0 -1
- package/assets/esri/core/workers/chunks/313a89b334e3518d30a4.js +0 -1
- package/assets/esri/core/workers/chunks/34c11e7c8762fe0c19fb.js +0 -1
- package/assets/esri/core/workers/chunks/3835097520296b0517af.js +0 -1
- package/assets/esri/core/workers/chunks/389e57aab12d52d72695.js +0 -1
- package/assets/esri/core/workers/chunks/3fed503185ea1913fb84.js +0 -1
- package/assets/esri/core/workers/chunks/4020f95d8131493f799e.js +0 -1
- package/assets/esri/core/workers/chunks/4255ad7601c7a7621b71.js +0 -1
- package/assets/esri/core/workers/chunks/453c3b265481c80fc625.js +0 -1
- package/assets/esri/core/workers/chunks/4605a68e40c5c3ac6e3e.js +0 -1
- package/assets/esri/core/workers/chunks/4a41f98210f1da3b5041.js +0 -1
- package/assets/esri/core/workers/chunks/4afe76de6e82e86fe697.js +0 -1
- package/assets/esri/core/workers/chunks/4b130db9b7b4e2e32ea4.js +0 -1
- package/assets/esri/core/workers/chunks/4c5cdd2712c938fafc5d.js +0 -1
- package/assets/esri/core/workers/chunks/4fa3840672c33adb9171.js +0 -1
- package/assets/esri/core/workers/chunks/5a85cbc04c64091d7f46.js +0 -1
- package/assets/esri/core/workers/chunks/5d60253ea3d247cdb3d1.js +0 -1
- package/assets/esri/core/workers/chunks/5e5c7cc74ff1c9603aff.js +0 -1
- package/assets/esri/core/workers/chunks/5ea0096a282e87a269bd.js +0 -1
- package/assets/esri/core/workers/chunks/601edefd8da4eb2eda28.js +0 -1
- package/assets/esri/core/workers/chunks/63ea9035dcf9ce45560c.js +0 -1
- package/assets/esri/core/workers/chunks/66fe1634c6e8f72fc653.js +0 -1
- package/assets/esri/core/workers/chunks/6b66a6f69aa03338c346.js +0 -1
- package/assets/esri/core/workers/chunks/6d59a9cf533ebc590f70.js +0 -1
- package/assets/esri/core/workers/chunks/6f02681bcaa9bef501fc.js +0 -1
- package/assets/esri/core/workers/chunks/7b66691d133dabd87ce6.js +0 -1
- package/assets/esri/core/workers/chunks/7c077e1a63ab97bf3e87.js +0 -1
- package/assets/esri/core/workers/chunks/7dc9ff66e1eceadbae24.js +0 -1
- package/assets/esri/core/workers/chunks/825db2ea15308ee6e5dc.js +0 -1
- package/assets/esri/core/workers/chunks/85a200aecc7a844c9566.js +0 -1
- package/assets/esri/core/workers/chunks/89250d268dc2554a9ece.js +0 -1
- package/assets/esri/core/workers/chunks/8c8fed53c12fb80ef2ed.js +0 -1
- package/assets/esri/core/workers/chunks/8ff83c59462dea6e3427.js +0 -1
- package/assets/esri/core/workers/chunks/958617c3a9854ea04e06.js +0 -1
- package/assets/esri/core/workers/chunks/9890c85a238879490926.js +0 -1
- package/assets/esri/core/workers/chunks/a001e7e8a39f27284d87.js +0 -1
- package/assets/esri/core/workers/chunks/a5b9ae4c93f9af7589f2.js +0 -1
- package/assets/esri/core/workers/chunks/a93a058678c8c8996d54.js +0 -1
- package/assets/esri/core/workers/chunks/a9c9c00432ee41ec91ba.js +0 -1
- package/assets/esri/core/workers/chunks/acb8cff06142f828fb78.js +0 -1
- package/assets/esri/core/workers/chunks/af762422a65c551dcd54.js +0 -1
- package/assets/esri/core/workers/chunks/b041c22885193bdd3004.js +0 -1
- package/assets/esri/core/workers/chunks/b3e8ab68fc38306f13c6.js +0 -1
- package/assets/esri/core/workers/chunks/b432a5a829e309837db6.js +0 -1
- package/assets/esri/core/workers/chunks/b4badbcf1bdb7823d825.js +0 -1
- package/assets/esri/core/workers/chunks/b891d95b7858665cd6c1.js +0 -1
- package/assets/esri/core/workers/chunks/bb2f6b0fcdfb8b158e26.js +0 -1
- package/assets/esri/core/workers/chunks/c0c693c2e0043ecba4a5.js +0 -1
- package/assets/esri/core/workers/chunks/c5ab346a226df1894302.js +0 -1
- package/assets/esri/core/workers/chunks/c91d4f1b42cfe474df52.js +0 -1
- package/assets/esri/core/workers/chunks/cedf3e316d6f89cf7005.js +0 -1
- package/assets/esri/core/workers/chunks/d33a08e5f589355c57a3.js +0 -1
- package/assets/esri/core/workers/chunks/d52172439db02a349542.js +0 -1
- package/assets/esri/core/workers/chunks/dd29fd1b3da90d3ca6b1.js +0 -1
- package/assets/esri/core/workers/chunks/e393fd61deb2e7f22ee6.js +0 -1
- package/assets/esri/core/workers/chunks/e8518bd3596543b387f8.js +0 -1
- package/assets/esri/core/workers/chunks/ecf4d07917efc97eb991.js +0 -1
- package/assets/esri/core/workers/chunks/eda51e512eff551ad858.js +0 -1
- package/assets/esri/core/workers/chunks/ee56290e600cbeb25a00.js +0 -1
- package/assets/esri/core/workers/chunks/f14e3693cd644265f909.js +0 -1
- package/assets/esri/core/workers/chunks/f52c6efc5a2abf5ac845.js +0 -1
- package/assets/esri/core/workers/chunks/f635a8e3b0bfeda99ed5.js +0 -1
- package/assets/esri/core/workers/chunks/f91a2c69a93295cf4de6.js +0 -1
- package/assets/esri/core/workers/chunks/fec3fffcf854a6226df4.js +0 -1
- package/symbols/dimensions/effects/LinearDimensionArrowEffect.js +0 -2
- package/symbols/dimensions/effects/LinearDimensionExtensionLineEffect.js +0 -2
- package/symbols/dimensions/effects/LinearDimensionLeaderLineEffect.js +0 -2
- package/symbols/dimensions/effects/LinearDimensionLineEffect.js +0 -2
- package/symbols/dimensions/effects/LinearDimensionPointEffect.js +0 -2
- package/symbols/dimensions/effects/LinearDimensionTextEffect.js +0 -2
- package/views/2d/layers/features/support/FeatureSetReaderDimension.js +0 -2
- package/views/3d/webgl-engine/effects/globalIllumination/BlueNoise.js +0 -2
- package/views/layers/support/dimensionUtils.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{CIMSymbolUnits as e}from"./types.js";const t={color:[128,128,128,1],outlinecolor:[0,0,0,1],backgroundcolor:[128,128,128,1],borderlinecolor:[0,0,0,1],tintcolor:[255,255,255,1]},o={CIMVectorMarker:{scalesymbolsproportionally:!1,respectframe:!0,anchorpointunits:"Relative",offsetx:0,offsety:0,rotateclockwise:!1,rotation:0,size:10,enable:!0,colorlocked:!1},CIMPictureMarker:{scalex:1,texturefilter:"Draft",anchorpointunits:"Relative",offsetx:0,offsety:0,rotateclockwise:!1,rotation:0,size:10,enable:!0,colorlocked:!1},CIMTextSymbol:{angle:0,anglex:0,angley:0,halosize:1,height:10,horizontalalignment:"Left",kerning:!0,letterspacing:0,letterwidth:100,ligatures:!0,linegap:0,offsetx:0,offsety:0,strikethrough:!1,textcase:"Normal",textstring:"",underline:!1,verticalalignment:"Bottom",enable:!0,colorlocked:!1},CIMSolidStroke:{capstyle:"Round",joinstyle:"Round",miterlimit:4,width:4,enable:!0,colorlocked:!1},CIMPictureStroke:{texturefilter:"Draft",capstyle:"Round",joinstyle:"Round",miterlimit:4,width:4,enable:!0,colorlocked:!1},CIMGradientStroke:{capstyle:"Round",joinstyle:"Round",miterlimit:4,width:4,enable:!0,colorlocked:!1,gradientMethod:"AcrossLine",gradientSize:75,gradientSizeUnits:e.Relative,gradientType:"Discrete",interval:5},CIMSolidFill:{enable:!0,colorlocked:!1},CIMPictureFill:{offsetx:0,offsety:0,rotation:0,scalex:1,height:10,texturefilter:"Draft",enable:!0,colorlocked:!1},CIMHatchFill:{offsetx:0,offsety:0,rotation:0,separation:4,enable:!0,colorlocked:!1},CIMGradientFill:{enable:!0,angle:90,gradientMethod:"Linear",gradientSize:75,gradientSizeUnits:e.Relative,gradientType:"Discrete",interval:5},CIMGeometricEffectAddControlPoints:{angletolerance:120},CIMGeometricEffectArrow:{arrowtype:"OpenEnded",width:5},CIMGeometricEffectBuffer:{size:1},CIMGeometricEffectCut:{begincut:1,endcut:1,middlecut:0,invert:!1},CIMGeometricEffectDashes:{customendingoffset:0,linedashending:"NoConstraint",offsetalongline:0},CIMGeometricEffectDonut:{method:"Mitered",option:"Accurate",width:2},CIMGeometricEffectJog:{angle:225,length:20,position:50},CIMGeometricEffectControlMeasureLine:{rule:"FullGeometry",width:25},CIMGeometricEffectMove:{offsetx:1,offsety:-1},CIMGeometricEffectOffset:{method:"Square",offset:1,option:"Fast"},CIMGeometricEffectRadial:{angle:0,length:5},CIMGeometricEffectRotate:{angle:15},CIMGeometricEffectScale:{xscalefactor:1.15,yscalefactor:1.15},CIMGeometricEffectWave:{amplitude:2,period:3,seed:1,waveform:"Sinus"},CIMMarkerPlacementAlongLine:{customendingoffset:0,endings:"WithHalfGap",offsetalongline:0,placeperpart:!0,angletoline:!0,offset:0},CIMMarkerPlacementAtExtremities:{extremityplacement:"Both",offsetalongline:0,angletoline:!0,offset:0},CIMMarkerPlacementAtRatioPositions:{beginposition:0,endposition:0,flipfirst:!0,angletoline:!0,offset:0},CIMMarkerPlacementInsidePolygon:{gridangle:0,gridtype:"Fixed",offsetx:0,offsety:0,randomness:100,seed:0,shiftoddrows:!1,stepx:16,stepy:16,clipping:"ClipAtBoundary"},CIMMarkerPlacementOnLine:{relativeto:"LineMiddle",startpointoffset:0,angletoline:!0,offset:0},CIMMarkerPlacementOnVertices:{placeperpart:!0,placeoncontrolpoints:!0,placeonendpoints:!0,placeonregularvertices:!0,angletoline:!0,offset:0},CIMMarkerPlacementPolygonCenter:{method:"OnPolygon",offsetx:0,offsety:0,clipatboundary:!1},CIMAnimatedSymbolProperties:{playanimation:!1,reverseanimation:!1,randomizestarttime:!1,randomizestartseed:0,starttimeoffset:0,duration:3,endingduration:3,useendingduration:!1,repeattype:"Loop",repeatdelay:0,easing:"Linear"},CIMSymbolAnimationSize:{tosize:10},CIMSymbolAnimationScale:{scalefactor:1},CIMSymbolAnimationColor:{tocolor:[255,255,255,1],colormode:"Multiply"},CIMSymbolAnimationTransparency:{totransparency:0},CIMSymbolAnimationRotation:{torotation:0,rotateclockwise:!1},CIMSymbolAnimationOffset:{offsetx:0,offsety:0},CIMSymbolAnimationMoveAlongLine:{speed:30,
|
|
2
|
+
import{CIMSymbolUnits as e}from"./types.js";const t={color:[128,128,128,1],outlinecolor:[0,0,0,1],backgroundcolor:[128,128,128,1],borderlinecolor:[0,0,0,1],tintcolor:[255,255,255,1]},o={CIMVectorMarker:{scalesymbolsproportionally:!1,respectframe:!0,anchorpointunits:"Relative",offsetx:0,offsety:0,rotateclockwise:!1,rotation:0,size:10,enable:!0,colorlocked:!1},CIMPictureMarker:{scalex:1,texturefilter:"Draft",anchorpointunits:"Relative",offsetx:0,offsety:0,rotateclockwise:!1,rotation:0,size:10,enable:!0,colorlocked:!1},CIMTextSymbol:{angle:0,anglex:0,angley:0,halosize:1,height:10,horizontalalignment:"Left",kerning:!0,letterspacing:0,letterwidth:100,ligatures:!0,linegap:0,offsetx:0,offsety:0,strikethrough:!1,textcase:"Normal",textstring:"",underline:!1,verticalalignment:"Bottom",enable:!0,colorlocked:!1},CIMSolidStroke:{capstyle:"Round",joinstyle:"Round",miterlimit:4,width:4,enable:!0,colorlocked:!1},CIMPictureStroke:{texturefilter:"Draft",capstyle:"Round",joinstyle:"Round",miterlimit:4,width:4,enable:!0,colorlocked:!1},CIMGradientStroke:{capstyle:"Round",joinstyle:"Round",miterlimit:4,width:4,enable:!0,colorlocked:!1,gradientMethod:"AcrossLine",gradientSize:75,gradientSizeUnits:e.Relative,gradientType:"Discrete",interval:5},CIMSolidFill:{enable:!0,colorlocked:!1},CIMPictureFill:{offsetx:0,offsety:0,rotation:0,scalex:1,height:10,texturefilter:"Draft",enable:!0,colorlocked:!1},CIMHatchFill:{offsetx:0,offsety:0,rotation:0,separation:4,enable:!0,colorlocked:!1},CIMGradientFill:{enable:!0,angle:90,gradientMethod:"Linear",gradientSize:75,gradientSizeUnits:e.Relative,gradientType:"Discrete",interval:5},CIMGeometricEffectAddControlPoints:{angletolerance:120},CIMGeometricEffectArrow:{arrowtype:"OpenEnded",width:5},CIMGeometricEffectBuffer:{size:1},CIMGeometricEffectCut:{begincut:1,endcut:1,middlecut:0,invert:!1},CIMGeometricEffectDashes:{customendingoffset:0,linedashending:"NoConstraint",offsetalongline:0},CIMGeometricEffectDonut:{method:"Mitered",option:"Accurate",width:2},CIMGeometricEffectJog:{angle:225,length:20,position:50},CIMGeometricEffectControlMeasureLine:{rule:"FullGeometry",width:25},CIMGeometricEffectMove:{offsetx:1,offsety:-1},CIMGeometricEffectOffset:{method:"Square",offset:1,option:"Fast"},CIMGeometricEffectRadial:{angle:0,length:5},CIMGeometricEffectRotate:{angle:15},CIMGeometricEffectScale:{xscalefactor:1.15,yscalefactor:1.15},CIMGeometricEffectWave:{amplitude:2,period:3,seed:1,waveform:"Sinus"},CIMMarkerPlacementAlongLine:{customendingoffset:0,endings:"WithHalfGap",offsetalongline:0,placeperpart:!0,angletoline:!0,offset:0},CIMMarkerPlacementAtExtremities:{extremityplacement:"Both",offsetalongline:0,angletoline:!0,offset:0},CIMMarkerPlacementAtRatioPositions:{beginposition:0,endposition:0,flipfirst:!0,angletoline:!0,offset:0},CIMMarkerPlacementInsidePolygon:{gridangle:0,gridtype:"Fixed",offsetx:0,offsety:0,randomness:100,seed:0,shiftoddrows:!1,stepx:16,stepy:16,clipping:"ClipAtBoundary"},CIMMarkerPlacementOnLine:{relativeto:"LineMiddle",startpointoffset:0,angletoline:!0,offset:0},CIMMarkerPlacementOnVertices:{placeperpart:!0,placeoncontrolpoints:!0,placeonendpoints:!0,placeonregularvertices:!0,angletoline:!0,offset:0},CIMMarkerPlacementPolygonCenter:{method:"OnPolygon",offsetx:0,offsety:0,clipatboundary:!1},CIMAnimatedSymbolProperties:{playanimation:!1,reverseanimation:!1,randomizestarttime:!1,randomizestartseed:0,starttimeoffset:0,duration:3,endingduration:3,useendingduration:!1,repeattype:"Loop",repeatdelay:0,easing:"Linear"},CIMSymbolAnimationSize:{tosize:10},CIMSymbolAnimationScale:{scalefactor:1},CIMSymbolAnimationColor:{tocolor:[255,255,255,1],colormode:"Multiply"},CIMSymbolAnimationTransparency:{totransparency:0},CIMSymbolAnimationRotation:{torotation:0,rotateclockwise:!1},CIMSymbolAnimationOffset:{offsetx:0,offsety:0},CIMSymbolAnimationMoveAlongLine:{speed:30,distancealong:100,movementtype:"Distance"}};export{t as defaultCIMColor,o as defaultCIMValues};
|
package/symbols/cim/utils.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{defaultCIMValues as e,defaultCIMColor as t}from"./defaultCIMValues.js";function r(e){return"function"==typeof e}function n(e,t,n,o){return r(e)?e(t,n,o):e}function o(e){return[e.r,e.g,e.b,e.a]}const i=" /-,\n";function a(e){let t=e.length;for(;t--;)if(!i.includes(e.charAt(t)))return!1;return!0}function l(e,t){const r=[];let n=0,o=-1;do{if(o=e.indexOf("[",n),o>=n){if(o>n){const t=e.slice(n,o);r.push([t,null,a(t)])}if(n=o+1,o=e.indexOf("]",n),o>=n){if(o>n){const i=t[e.slice(n,o)];i&&r.push([null,i,!1])}n=o+1}}}while(-1!==o);if(n<e.length){const t=e.slice(n);r.push([t,null,a(t)])}return r}function c(e,t,r){let n="",o=null;for(const i of t){const[t,r,a]=i;if(null!=t&&""!==t)a?o=t:(null!=o&&(n+=o,o=null),n+=t);else{const t=e.readAttribute(r);null!=t&&""!==t&&(null!==o&&(n+=o,o=null),n+=t)}}return u(n,r)}function s(e,t,r,n){let o="",i=null;for(const a of t){const[t,n,l]=a;if(null!=t&&""!==t)l?i=t:(null!=i&&(o+=i,i=null),o+=t);else{let t=n;null!=r&&(t=Y(n,r));const a=e.attributes[t];null!=a&&""!==a&&(null!=i&&(o+=i,i=null),o+=a)}}return u(o,n)}function u(e,t){switch("string"!=typeof e&&(e=String(e)),t){case"LowerCase":return e.toLowerCase();case"Allcaps":return e.toUpperCase();default:return e}}function f(e,t,r,n,o,i,a=!0){const l=t/o,c=r/i,s=Math.ceil(l/2),u=Math.ceil(c/2);for(let f=0;f<i;f++)for(let r=0;r<o;r++){const M=4*(r+(a?i-f-1:f)*o);let m=0,y=0,C=0,h=0,I=0,p=0,b=0;const d=(f+.5)*c;for(let n=Math.floor(f*c);n<(f+1)*c;n++){const o=Math.abs(d-(n+.5))/u,i=(r+.5)*l,a=o*o;for(let c=Math.floor(r*l);c<(r+1)*l;c++){let r=Math.abs(i-(c+.5))/s;const o=Math.sqrt(a+r*r);o>=-1&&o<=1&&(m=2*o*o*o-3*o*o+1,m>0&&(r=4*(c+n*t),b+=m*e[r+3],C+=m,e[r+3]<255&&(m=m*e[r+3]/250),h+=m*e[r],I+=m*e[r+1],p+=m*e[r+2],y+=m))}}n[M]=h/y,n[M+1]=I/y,n[M+2]=p/y,n[M+3]=b/C}}function M(e){return e?[e[0],e[1],e[2],e[3]/255]:[0,0,0,0]}function m(e){return e.data?.symbol??null}function y(e){return"CIMVectorMarker"===e.type||"CIMPictureMarker"===e.type||"CIMBarChartMarker"===e.type||"CIMCharacterMarker"===e.type||"CIMPieChartMarker"===e.type||"CIMStackedBarChartMarker"===e.type}function C(e){return"CIMGradientStroke"===e.type||"CIMPictureStroke"===e.type||"CIMSolidStroke"===e.type}function h(e){return null!=e&&("CIMGradientFill"===e.type||"CIMHatchFill"===e.type||"CIMPictureFill"===e.type||"CIMSolidFill"===e.type||"CIMWaterFill"===e.type)}function I(e){return null!=e&&("CIMMarkerPlacementAlongLineRandomSize"===e.type||"CIMMarkerPlacementAlongLineSameSize"===e.type||"CIMMarkerPlacementAlongLineVariableSize"===e.type||"CIMMarkerPlacementAtExtremities"===e.type||"CIMMarkerPlacementAtMeasuredUnits"===e.type||"CIMMarkerPlacementAtRatioPositions"===e.type||"CIMMarkerPlacementOnLine"===e.type||"CIMMarkerPlacementOnVertices"===e.type)}const p=(e,t=0)=>null==e||isNaN(e)?t:e,b=(e,t)=>null!=e?e:t,d=(e,t)=>e??t,k=e=>e.tintColor?M(e.tintColor):[255,255,255,1];class g{constructor(e){this._import=e}getImportPromise(){return null==this._promise&&(this._promise=this._import().then(e=>this.module=e)),this._promise}}function S(e){return new g(e)}function P(e){if(!e)return"normal";switch(e.toLowerCase()){case"italic":return"italic";case"oblique":return"oblique";default:return"normal"}}function w(e){if(!e)return"normal";switch(e.toLowerCase()){case"bold":return"bold";case"bolder":return"bolder";case"lighter":return"lighter";default:return"normal"}}function L(e){let t="normal",r="normal";if(e){const n=e.toLowerCase();n.includes("italic")?t="italic":n.includes("oblique")&&(t="oblique"),n.includes("bold")?r="bold":n.includes("light")&&(r="lighter")}return{style:t,weight:r}}function E(e){return e.underline?"underline":e.strikethrough?"line-through":"none"}function G(e){if(!e)return null;switch(e.type){case"CIMPolygonSymbol":if(e.symbolLayers)for(const t of e.symbolLayers){const e=G(t);if(null!=e)return e}break;case"CIMTextSymbol":return G(e.symbol);case"CIMSolidFill":return e.color}return null}function x(e){if(e)switch(e.type){case"CIMPolygonSymbol":case"CIMLineSymbol":{const t=e.symbolLayers;if(t)for(const e of t){const t=x(e);if(null!=t)return t}break}case"CIMTextSymbol":return x(e.symbol);case"CIMSolidStroke":return e.color}}function T(e){for(const t of e)if(t.enable)switch(t.type){case"CIMSolidStroke":case"CIMGradientStroke":case"CIMPictureStroke":return!0}return!1}function A(e){if(e)switch(e.type){case"CIMPolygonSymbol":case"CIMLineSymbol":if(e.symbolLayers)for(const t of e.symbolLayers){const e=A(t);if(void 0!==e)return e}break;case"CIMTextSymbol":return A(e.symbol);case"CIMSolidStroke":case"CIMGradientStroke":case"CIMPictureStroke":return e.width}}function v(e){switch(e){case"Left":default:return"left";case"Right":return"right";case"Center":return"center";case"Justify":return"justify"}}function N(e){switch(e){default:case"Bottom":return"bottom";case"Top":return"top";case"Center":return"middle";case"Baseline":return"baseline"}}function z(e){return(e?Object.keys(e):[]).map(t=>({name:t,alias:t,type:"string"==typeof e[t]?"esriFieldTypeString":"esriFieldTypeDouble"}))}const F=e=>e.includes("data:image/svg+xml");function V(e){if(!e)return null;switch(e.type){case"CIMPointSymbol":case"CIMTextSymbol":return"esriGeometryPoint";case"CIMLineSymbol":return"esriGeometryPolyline";case"CIMPolygonSymbol":return"esriGeometryPolygon";default:return null}}function O(e){return e?e.charAt(0).toLowerCase()+e.slice(1):e}function B(e,t,r,n,o,i,a=!0){const{infos:l}=i;let c=1,s=0,u=0,f=0,M=1;for(const{absoluteAnchorPoint:C,offsetX:h,offsetY:I,rotation:p,size:b,frameHeight:d,rotateClockWise:k,scaleSymbolsProportionally:g}of l){M=C?1:c;u=Q(h,I,s,M,u),f=K(h,I,s,M,f),d&&(g||a)&&(c*=b/d),s=Z(p,k,s)}const m=Q(n,o,s,M,u),y=K(n,o,s,M,f);return{size:e*c,rotation:Z(t,r,s),offsetX:m,offsetY:y}}function R(e){if(null==e)return!1;if(Array.isArray(e))return e.every(e=>R(e));switch(typeof e){case"string":return!!e;case"number":return!isNaN(e)}}function D(r,n){if("color"===n||"outlinecolor"===n||"backgroundcolor"===n||"borderlinecolor"===n||"tintcolor"===n)return[...t[n]];const o=e[r];if(!o)throw new Error(`InternalError: default value for type ${r}.`);return o[n]}function j(e){return e.split(" ").map(e=>Number(e))}function q(e){return"string"==typeof e?j(e):e}function W(e){return e?.dashTemplate&&(e.dashTemplate=q(e.dashTemplate)),e}function _(e){if(null==e)return"Normal";switch(e.type){case"CIMTextSymbol":return e.textCase??"Normal";case"CIMPointSymbol":case"CIMLineSymbol":case"CIMPolygonSymbol":{const t=e.symbolLayers;if(!t)return"Normal";for(const e of t)if("CIMVectorMarker"===e.type)return _(e)}break;case"CIMVectorMarker":{const t=e.markerGraphics;if(!t)return"Normal";for(const e of t)if(e.symbol)return _(e.symbol)}}return"Normal"}function X(t){if(t)switch(t.type){case"CIMTextSymbol":return t.height;case"CIMPointSymbol":{let r=0;if(t.symbolLayers)for(const n of t.symbolLayers)if(n)switch(n.type){case"CIMCharacterMarker":case"CIMPictureMarker":case"CIMVectorMarker":case"CIMObjectMarker3D":case"CIMglTFMarker3D":{const t=n.size??e.CIMVectorMarker.size;t>r&&(r=t);break}}return r}case"CIMLineSymbol":case"CIMPolygonSymbol":{let r=0;if(t.symbolLayers)for(const n of t.symbolLayers)if(n)switch(n.type){case"CIMSolidStroke":case"CIMPictureStroke":case"CIMGradientStroke":{const e=n.width;null!=e&&e>r&&(r=e);break}case"CIMCharacterMarker":case"CIMPictureMarker":case"CIMVectorMarker":case"CIMObjectMarker3D":case"CIMglTFMarker3D":if(n.markerPlacement&&I(n.markerPlacement)){const t=n.size??e.CIMVectorMarker.size;t>r&&(r=t)}break;case"CIMPictureFill":{const e=n.height;null!=e&&e>r&&(r=e)}}return r}}}function Y(e,t){if(null!==t){const r=t.get(e);return r?r.name:e}return e}function H(e){return e.map(e=>({...e,propertyName:O(e.propertyName)}))}function J(e){const t={};for(const r in e){const n=e[r];t[O(r)]=n}return t}function U(e){if(!e)return 0;let t=0;for(const r of e)t+=$(r);return t}function $(e){if(!e)return 0;if(le(e))return e.inflateSize??256;switch(e.type){case"CIMGeometricEffectArrow":return Math.abs(.5*e.width);case"CIMGeometricEffectBuffer":return Math.abs(e.size);case"CIMGeometricEffectControlMeasureLine":return 500;case"CIMGeometricEffectExtension":return Math.abs(e.length);case"CIMGeometricEffectJog":return Math.abs(.5*e.length);case"CIMGeometricEffectMove":return Math.max(Math.abs(p(e.offsetX)),Math.abs(p(e.offsetY)));case"CIMGeometricEffectOffset":case"CIMGeometricEffectOffsetTangent":return Math.abs(e.offset);case"CIMGeometricEffectRadial":return Math.abs(e.length??5);case"CIMGeometricEffectRegularPolygon":return Math.abs(e.radius);case"CIMGeometricEffectRotate":case"CIMGeometricEffectScale":default:return 0;case"CIMGeometricEffectTaperedPolygon":return.5*Math.max(Math.abs(e.fromWidth),Math.abs(e.toWidth));case"CIMGeometricEffectWave":return Math.abs(e.amplitude);case"CIMGeometricEffectDonut":return Math.abs(e.width)}}function K(e,t,r,n,o){const i=r*Math.PI/180;if(i){const r=Math.cos(i);return(Math.sin(i)*e+r*t)*n+o}return t*n+o}function Q(e,t,r,n,o){const i=r*Math.PI/180;if(i){return(Math.cos(i)*e-Math.sin(i)*t)*n+o}return e*n+o}function Z(e,t,r){return t?r-e:r+e}function ee(e,t,r){const n="Color"===r||"TintColor"===r||"ToColor"===r,o="Rotation"===r||"Angle"===r||"ToRotation"===r;let i=t[O(r)];if(null!=i&&(n?i=[i[0]/255,i[1]/255,i[2]/255,i[3]/255]:o&&(i*=Math.PI/180)),null==i&&(i=D(t.type,r.toLowerCase()),null!=i&&(n?i=[i[0]/255,i[1]/255,i[2]/255,i[3]]:o&&(i*=Math.PI/180))),null!=t.primitiveName){const a=e[t.primitiveName];if(null!=a){const e=a[r];null==e||("string"==typeof e||"number"==typeof e||Array.isArray(e)?(i=e,null!=i&&(n?i=[i[0]/255,i[1]/255,i[2]/255,i[3]/255]:o&&(i*=Math.PI/180))):(i={valueExpressionInfo:e,defaultValue:i},null!=i&&(n?i={type:"Process",op:"ArcadeColor",value:i}:o&&(i={type:"Process",op:"Divide",left:i,right:180/Math.PI}))))}}if(null==i)throw new Error(`Failed to derive a value or an expression for "${r}".`);return i}function te(e,t,r){if(null!=t[O(r)])return!0;if(null!=t.primitiveName){const n=e[t.primitiveName];if(null!=n){if(null!=n[r])return!0}}return!1}function re(e,t){return Math.max(Math.min((e??t)/100,1),0)}function ne(e){if(!e)return 3;switch(e){case"Begin":return 0;case"End":return 2;case"Both":return 1;default:return 3}}function oe(e){if(!e)return 2;switch(e){case"Tolerance":return 0;case"Text":return 1;default:return 2}}function ie(e){if(!e)return 2;switch(e){case"MoveBegin":return 0;case"MoveEnd":return 1;default:return 2}}function ae(e){if(!e)return 3;switch(e){case"Only":return 0;case"Suffix":return 1;case"Expression":return 2;default:return 3}}function le(e){return null!=e&&"inflateSize"in e&&null!=e.inflateSize}function ce(e){return null!=e&&se(e)?e:void 0}function se(e){return"setControlPoint"in e&&"getControlPoint"in e&&"setControlPointAt"in e&&"getControlPointAt"in e}export{u as adjustTextCase,l as analyzeTextParts,B as applyParentTransform,ce as asCIMGeometryCursor,s as assignTextValuesFromFeature,z as attributesToFields,o as colorToArray,n as evaluateValueOrFunction,E as fromCIMFontDecoration,L as fromCIMFontStyle,v as fromCIMHorizontalAlignment,N as fromCIMVerticalAlignment,D as getDefaultCIMValue,U as getEffectsInflateSize,d as getEnum,Y as getFieldName,G as getFillColor,P as getFontStyle,w as getFontWeight,p as getNumericValue,ee as getProcessParam,re as getRelativeGradientSize,X as getSize,x as getStrokeColor,A as getStrokeWidth,_ as getTextCasing,c as getTextValuesFromFeatureHandle,k as getTintColor,b as getValue,te as hasProcessParam,T as hasStrokeLayer,S as importLazily,h as isCIMFill,y as isCIMMarker,I as isCIMMarkerStrokePlacement,C as isCIMStroke,r as isFeatureValueFn,le as isGeometricLinearEffect,F as isSVGImage,R as isValidCIMValue,V as mapCIMSymbolToGeometryType,M as normalizeAlpha,W as normalizeDashEffectTemplate,q as normalizeDashTemplate,H as normalizePrimitiveOverrideProps,j as parseDashTemplate,f as resampleHermite,oe as stringToDimensionMarkerFit,ne as stringToDimensionPartOptions,ie as stringToDimensionTextFit,ae as stringToDimensionTextOptions,m as toCIMSymbolJSON,J as toLowerCaseProps,O as uncapitalize};
|
|
2
|
+
import{defaultCIMValues as e,defaultCIMColor as t}from"./defaultCIMValues.js";function r(e){return"function"==typeof e}function n(e,t,n,o){return r(e)?e(t,n,o):e}function o(e){return[e.r,e.g,e.b,e.a]}const i=" /-,\n";function a(e){let t=e.length;for(;t--;)if(!i.includes(e.charAt(t)))return!1;return!0}function l(e,t){const r=[];let n=0,o=-1;do{if(o=e.indexOf("[",n),o>=n){if(o>n){const t=e.slice(n,o);r.push([t,null,a(t)])}if(n=o+1,o=e.indexOf("]",n),o>=n){if(o>n){const i=t[e.slice(n,o)];i&&r.push([null,i,!1])}n=o+1}}}while(-1!==o);if(n<e.length){const t=e.slice(n);r.push([t,null,a(t)])}return r}function c(e,t,r){let n="",o=null;for(const i of t){const[t,r,a]=i;if(null!=t&&""!==t)a?o=t:(null!=o&&(n+=o,o=null),n+=t);else{const t=e.readAttribute(r);null!=t&&""!==t&&(null!==o&&(n+=o,o=null),n+=t)}}return u(n,r)}function s(e,t,r,n){let o="",i=null;for(const a of t){const[t,n,l]=a;if(null!=t&&""!==t)l?i=t:(null!=i&&(o+=i,i=null),o+=t);else{let t=n;null!=r&&(t=Y(n,r));const a=e.attributes[t];null!=a&&""!==a&&(null!=i&&(o+=i,i=null),o+=a)}}return u(o,n)}function u(e,t){switch("string"!=typeof e&&(e=String(e)),t){case"LowerCase":return e.toLowerCase();case"Allcaps":return e.toUpperCase();default:return e}}function f(e,t,r,n,o,i,a=!0){const l=t/o,c=r/i,s=Math.ceil(l/2),u=Math.ceil(c/2);for(let f=0;f<i;f++)for(let r=0;r<o;r++){const M=4*(r+(a?i-f-1:f)*o);let m=0,y=0,C=0,h=0,I=0,p=0,b=0;const d=(f+.5)*c;for(let n=Math.floor(f*c);n<(f+1)*c;n++){const o=Math.abs(d-(n+.5))/u,i=(r+.5)*l,a=o*o;for(let c=Math.floor(r*l);c<(r+1)*l;c++){let r=Math.abs(i-(c+.5))/s;const o=Math.sqrt(a+r*r);o>=-1&&o<=1&&(m=2*o*o*o-3*o*o+1,m>0&&(r=4*(c+n*t),b+=m*e[r+3],C+=m,e[r+3]<255&&(m=m*e[r+3]/250),h+=m*e[r],I+=m*e[r+1],p+=m*e[r+2],y+=m))}}n[M]=h/y,n[M+1]=I/y,n[M+2]=p/y,n[M+3]=b/C}}function M(e){return e?[e[0],e[1],e[2],e[3]/255]:[0,0,0,0]}function m(e){return e.data?.symbol??null}function y(e){return"CIMVectorMarker"===e.type||"CIMPictureMarker"===e.type||"CIMBarChartMarker"===e.type||"CIMCharacterMarker"===e.type||"CIMPieChartMarker"===e.type||"CIMStackedBarChartMarker"===e.type}function C(e){return"CIMGradientStroke"===e.type||"CIMPictureStroke"===e.type||"CIMSolidStroke"===e.type}function h(e){return null!=e&&("CIMGradientFill"===e.type||"CIMHatchFill"===e.type||"CIMPictureFill"===e.type||"CIMSolidFill"===e.type||"CIMWaterFill"===e.type)}function I(e){return null!=e&&("CIMMarkerPlacementAlongLineRandomSize"===e.type||"CIMMarkerPlacementAlongLineSameSize"===e.type||"CIMMarkerPlacementAlongLineVariableSize"===e.type||"CIMMarkerPlacementAtExtremities"===e.type||"CIMMarkerPlacementAtMeasuredUnits"===e.type||"CIMMarkerPlacementAtRatioPositions"===e.type||"CIMMarkerPlacementOnLine"===e.type||"CIMMarkerPlacementOnVertices"===e.type)}const p=(e,t=0)=>null==e||isNaN(e)?t:e,b=(e,t)=>null!=e?e:t,d=(e,t)=>e??t,k=e=>e.tintColor?M(e.tintColor):[255,255,255,1];class g{constructor(e){this._import=e}getImportPromise(){return null==this._promise&&(this._promise=this._import().then(e=>this.module=e)),this._promise}}function S(e){return new g(e)}function P(e){if(!e)return"normal";switch(e.toLowerCase()){case"italic":return"italic";case"oblique":return"oblique";default:return"normal"}}function w(e){if(!e)return"normal";switch(e.toLowerCase()){case"bold":return"bold";case"bolder":return"bolder";case"lighter":return"lighter";default:return"normal"}}function L(e){let t="normal",r="normal";if(e){const n=e.toLowerCase();n.includes("italic")?t="italic":n.includes("oblique")&&(t="oblique"),n.includes("bold")?r="bold":n.includes("light")&&(r="lighter")}return{style:t,weight:r}}function E(e){return e.underline?"underline":e.strikethrough?"line-through":"none"}function x(e){if(!e)return null;switch(e.type){case"CIMPolygonSymbol":if(e.symbolLayers)for(const t of e.symbolLayers){const e=x(t);if(null!=e)return e}break;case"CIMTextSymbol":return x(e.symbol);case"CIMSolidFill":return e.color}return null}function G(e){if(e)switch(e.type){case"CIMPolygonSymbol":case"CIMLineSymbol":{const t=e.symbolLayers;if(t)for(const e of t){const t=G(e);if(null!=t)return t}break}case"CIMTextSymbol":return G(e.symbol);case"CIMSolidStroke":return e.color}}function N(e){for(const t of e)if(t.enable)switch(t.type){case"CIMSolidStroke":case"CIMGradientStroke":case"CIMPictureStroke":return!0}return!1}function T(e){if(e)switch(e.type){case"CIMPolygonSymbol":case"CIMLineSymbol":if(e.symbolLayers)for(const t of e.symbolLayers){const e=T(t);if(void 0!==e)return e}break;case"CIMTextSymbol":return T(e.symbol);case"CIMSolidStroke":case"CIMGradientStroke":case"CIMPictureStroke":return e.width}}function v(e){switch(e){case"Left":default:return"left";case"Right":return"right";case"Center":return"center";case"Justify":return"justify"}}function A(e){switch(e){default:case"Bottom":return"bottom";case"Top":return"top";case"Center":return"middle";case"Baseline":return"baseline"}}function F(e){return(e?Object.keys(e):[]).map(t=>({name:t,alias:t,type:"string"==typeof e[t]?"esriFieldTypeString":"esriFieldTypeDouble"}))}const z=e=>e.includes("data:image/svg+xml");function B(e){if(!e)return null;switch(e.type){case"CIMPointSymbol":case"CIMTextSymbol":return"esriGeometryPoint";case"CIMLineSymbol":return"esriGeometryPolyline";case"CIMPolygonSymbol":return"esriGeometryPolygon";default:return null}}function O(e){return e?e.charAt(0).toLowerCase()+e.slice(1):e}function V(e,t,r,n,o,i,a=!0){const{infos:l}=i;let c=1,s=0,u=0,f=0,M=1;for(const{absoluteAnchorPoint:C,offsetX:h,offsetY:I,rotation:p,size:b,frameHeight:d,rotateClockWise:k,scaleSymbolsProportionally:g}of l){M=C?1:c;u=Q(h,I,s,M,u),f=K(h,I,s,M,f),d&&(g||a)&&(c*=b/d),s=Z(p,k,s)}const m=Q(n,o,s,M,u),y=K(n,o,s,M,f);return{size:e*c,rotation:Z(t,r,s),offsetX:m,offsetY:y}}function R(e){if(null==e)return!1;if(Array.isArray(e))return e.every(e=>R(e));switch(typeof e){case"string":return!!e;case"number":return!isNaN(e)}}function D(r,n){if("color"===n||"outlinecolor"===n||"backgroundcolor"===n||"borderlinecolor"===n||"tintcolor"===n)return[...t[n]];const o=e[r];if(!o)throw new Error(`InternalError: default value for type ${r}.`);return o[n]}function W(e){return e.split(" ").map(e=>Number(e))}function j(e){return"string"==typeof e?W(e):e}function q(e){return e?.dashTemplate&&(e.dashTemplate=j(e.dashTemplate)),e}function _(e){if(null==e)return"Normal";switch(e.type){case"CIMTextSymbol":return e.textCase??"Normal";case"CIMPointSymbol":case"CIMLineSymbol":case"CIMPolygonSymbol":{const t=e.symbolLayers;if(!t)return"Normal";for(const e of t)if("CIMVectorMarker"===e.type)return _(e)}break;case"CIMVectorMarker":{const t=e.markerGraphics;if(!t)return"Normal";for(const e of t)if(e.symbol)return _(e.symbol)}}return"Normal"}function X(t){if(t)switch(t.type){case"CIMTextSymbol":return t.height;case"CIMPointSymbol":{let r=0;if(t.symbolLayers)for(const n of t.symbolLayers)if(n)switch(n.type){case"CIMCharacterMarker":case"CIMPictureMarker":case"CIMVectorMarker":case"CIMObjectMarker3D":case"CIMglTFMarker3D":{const t=n.size??e.CIMVectorMarker.size;t>r&&(r=t);break}}return r}case"CIMLineSymbol":case"CIMPolygonSymbol":{let r=0;if(t.symbolLayers)for(const n of t.symbolLayers)if(n)switch(n.type){case"CIMSolidStroke":case"CIMPictureStroke":case"CIMGradientStroke":{const e=n.width;null!=e&&e>r&&(r=e);break}case"CIMCharacterMarker":case"CIMPictureMarker":case"CIMVectorMarker":case"CIMObjectMarker3D":case"CIMglTFMarker3D":if(n.markerPlacement&&I(n.markerPlacement)){const t=n.size??e.CIMVectorMarker.size;t>r&&(r=t)}break;case"CIMPictureFill":{const e=n.height;null!=e&&e>r&&(r=e)}}return r}}}function Y(e,t){if(null!==t){const r=t.get(e);return r?r.name:e}return e}function H(e){return e.map(e=>({...e,propertyName:O(e.propertyName)}))}function J(e){const t={};for(const r in e){const n=e[r];t[O(r)]=n}return t}function U(e){if(!e)return 0;let t=0;for(const r of e)t+=$(r);return t}function $(e){if(!e)return 0;if(le(e))return e.inflateSize??256;switch(e.type){case"CIMGeometricEffectArrow":return Math.abs(.5*e.width);case"CIMGeometricEffectBuffer":return Math.abs(e.size);case"CIMGeometricEffectControlMeasureLine":return 500;case"CIMGeometricEffectExtension":return Math.abs(e.length);case"CIMGeometricEffectJog":return Math.abs(.5*e.length);case"CIMGeometricEffectMove":return Math.max(Math.abs(p(e.offsetX)),Math.abs(p(e.offsetY)));case"CIMGeometricEffectOffset":case"CIMGeometricEffectOffsetTangent":return Math.abs(e.offset);case"CIMGeometricEffectRadial":return Math.abs(e.length??5);case"CIMGeometricEffectRegularPolygon":return Math.abs(e.radius);case"CIMGeometricEffectRotate":case"CIMGeometricEffectScale":default:return 0;case"CIMGeometricEffectTaperedPolygon":return.5*Math.max(Math.abs(e.fromWidth),Math.abs(e.toWidth));case"CIMGeometricEffectWave":return Math.abs(e.amplitude);case"CIMGeometricEffectDonut":return Math.abs(e.width)}}function K(e,t,r,n,o){const i=r*Math.PI/180;if(i){const r=Math.cos(i);return(Math.sin(i)*e+r*t)*n+o}return t*n+o}function Q(e,t,r,n,o){const i=r*Math.PI/180;if(i){return(Math.cos(i)*e-Math.sin(i)*t)*n+o}return e*n+o}function Z(e,t,r){return t?r-e:r+e}function ee(e,t,r){const n="Color"===r||"TintColor"===r||"ToColor"===r,o="Rotation"===r||"Angle"===r||"ToRotation"===r;let i=t[O(r)];if(null!=i&&(n?i=[i[0]/255,i[1]/255,i[2]/255,i[3]/255]:o&&(i*=Math.PI/180)),null==i&&(i=D(t.type,r.toLowerCase()),null!=i&&(n?i=[i[0]/255,i[1]/255,i[2]/255,i[3]]:o&&(i*=Math.PI/180))),null!=t.primitiveName){const a=e[t.primitiveName];if(null!=a){const e=a[r];null==e||("string"==typeof e||"number"==typeof e||Array.isArray(e)?(i=e,null!=i&&(n?i=[i[0]/255,i[1]/255,i[2]/255,i[3]/255]:o&&(i*=Math.PI/180))):(i={valueExpressionInfo:e,defaultValue:i},null!=i&&(n?i={type:"Process",op:"ArcadeColor",value:i}:o&&(i={type:"Process",op:"Divide",left:i,right:180/Math.PI}))))}}if(null==i)throw new Error(`Failed to derive a value or an expression for "${r}".`);return i}function te(e,t,r){if(null!=t[O(r)])return!0;if(null!=t.primitiveName){const n=e[t.primitiveName];if(null!=n){if(null!=n[r])return!0}}return!1}function re(e,t){return Math.max(Math.min((e??t)/100,1),0)}function ne(e){if(!e)return"None";switch(e){case"Begin":return"Begin";case"End":return"End";case"Both":return"Both";default:return"None"}}function oe(e){if(!e)return"None";switch(e){case"Tolerance":return"Tolerance";case"Text":return"Text";default:return"None"}}function ie(e){if(!e)return"None";switch(e){case"MoveBegin":return"MoveBegin";case"MoveEnd":return"MoveEnd";default:return"None"}}function ae(e){if(!e)return"None";switch(e){case"Only":return"Only";case"Suffix":return"Suffix";case"Expression":return"Expression";default:return"None"}}function le(e){return e.type.startsWith("PRI")}function ce(e){return null!=e&&se(e)?e:void 0}function se(e){return"setControlPoint"in e&&"getControlPoint"in e&&"setControlPointAt"in e&&"getControlPointAt"in e}export{u as adjustTextCase,l as analyzeTextParts,V as applyParentTransform,ce as asCIMGeometryCursor,s as assignTextValuesFromFeature,F as attributesToFields,o as colorToArray,n as evaluateValueOrFunction,E as fromCIMFontDecoration,L as fromCIMFontStyle,v as fromCIMHorizontalAlignment,A as fromCIMVerticalAlignment,D as getDefaultCIMValue,U as getEffectsInflateSize,d as getEnum,Y as getFieldName,x as getFillColor,P as getFontStyle,w as getFontWeight,p as getNumericValue,ee as getProcessParam,re as getRelativeGradientSize,X as getSize,G as getStrokeColor,T as getStrokeWidth,_ as getTextCasing,c as getTextValuesFromFeatureHandle,k as getTintColor,b as getValue,te as hasProcessParam,N as hasStrokeLayer,S as importLazily,h as isCIMFill,y as isCIMMarker,I as isCIMMarkerStrokePlacement,C as isCIMStroke,r as isFeatureValueFn,le as isPrivateEffect,z as isSVGImage,R as isValidCIMValue,B as mapCIMSymbolToGeometryType,M as normalizeAlpha,q as normalizeDashEffectTemplate,j as normalizeDashTemplate,H as normalizePrimitiveOverrideProps,W as parseDashTemplate,f as resampleHermite,oe as stringToDimensionMarkerFit,ne as stringToDimensionPartOptions,ie as stringToDimensionTextFit,ae as stringToDimensionTextOptions,m as toCIMSymbolJSON,J as toLowerCaseProps,O as uncapitalize};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{create as e}from"../../../../geometry/support/aaBoundingRect.js";import t from"../../../../layers/support/TileInfo.js";import{tileSizeInTileUnits as s,tileSizeInPixels as r}from"./constants.js";import{SymbolFader as i}from"./decluttering/SymbolFader.js";import{writeOpacityToBuffers as o}from"./decluttering/util.js";import{RenderableTile as l}from"../webgl/RenderableTile.js";import n from"../webgl/TileContainer.js";import{simplePipelineState as a}from"../webgl/shaderGraph/utils.js";import{VTLTechniquesRepo as d}from"../webgl/shaderGraph/techniques/vectorTiles/VTLTechniques.js";import h from"../../tiling/TileCoverage.js";import c from"../../tiling/TileKey.js";const u=1e-6;function y(e,t){if(e){const s=e.getLayoutProperty("visibility");if(!s||1!==s.getValue()&&(void 0===e.minzoom||e.minzoom<t+u)&&(void 0===e.maxzoom||e.maxzoom>=t-u))return!0}return!1}class m extends n{constructor(e){super(e),this._backgroundTiles=[],this._techniques=new d,this._computeDisplayInfoView(e),this._techniques.startup()}destroy(){super.destroy(),this.removeAllChildren(),this._spriteMosaic?.dispose(),this._spriteMosaic=null,this._glyphMosaic?.dispose(),this._glyphMosaic=null,null!=this._symbolFader&&(this._symbolFader.clear(),this._symbolFader=null);const e=this.stage?.context;e&&this._techniques.shutdown(e),this._styleRepository=null,this._backgroundTiles=[]}get fading(){return this._symbolFader?.fading??!1}get symbolFader(){return this._symbolFader}get symbolRepository(){return this._symbolFader?.symbolRepository}setStyleResources(e,t,r,l){if(this._spriteMosaic=e,this._glyphMosaic=t,this._styleRepository=r,this.tilingScheme=l,this._computeDisplayInfoView(l),null==this._symbolFader){const e=(e,t)=>{e.allSymbolsFadingOut=!0,e.lastOpacityUpdate=t,o(e,t,!0),e.decluttered=!0,e.requestRender()};this._symbolFader=new i("vector-tile",this._styleRepository,e,this.children,s)}this._symbolFader.styleRepository=r}setSpriteMosaic(e){this._spriteMosaic?.dispose(),this._spriteMosaic=e}deleteStyleLayers(e){null!=this._symbolFader&&this._symbolFader.deleteStyleLayers(e)}createRenderParams(e){return{...super.createRenderParams(e),renderPass:null,styleLayer:null,styleLayerUID:-1,glyphMosaic:this._glyphMosaic,spriteMosaic:this._spriteMosaic}}doRender(e){const{drawPhase:t}=e,s=1===t||64===t;this.visible&&s&&void 0!==this._spriteMosaic&&super.doRender(e)}addChild(e){return super.addChild(e),null!=this._symbolFader?this._symbolFader.addTile(e):e.decluttered=!0,this.requestRender(),e}removeChild(e){return null!=this._symbolFader&&this._symbolFader.removeTile(e),this.requestRender(),super.removeChild(e)}renderChildren(e){const{drawPhase:t}=e;64!==t?this._doRender(e):super.renderChildren(e)}removeAllChildren(){for(let e=0;e<this.children.length;e++){const t=this.children[e];null!=this._symbolFader&&this._symbolFader.removeTile(t),t.dispose()}super.removeAllChildren()}getStencilTarget(){return this.children.filter(e=>e.neededForCoverage&&e.hasData())}restartDeclutter(){null!=this._symbolFader&&this._symbolFader.restartDeclutter()}_doRender(e){const{context:t,painter:s,state:r}=e,i=this._styleRepository;if(!i)return;const o=i.layers,l=this._displayInfo.scaleToZoom(r.scale);this.children.forEach(e=>e.disposeLayerData()),super.renderChildren(e),i.backgroundBucketIds.length>0&&(e.renderPass="background",this._renderBackgroundLayers(e,i.backgroundBucketIds,l)),1===e.drawPhase&&this._fade(l,r);const n=this.children.filter(
|
|
2
|
+
import{create as e}from"../../../../geometry/support/aaBoundingRect.js";import t from"../../../../layers/support/TileInfo.js";import{tileSizeInTileUnits as s,tileSizeInPixels as r}from"./constants.js";import{SymbolFader as i}from"./decluttering/SymbolFader.js";import{writeOpacityToBuffers as o}from"./decluttering/util.js";import{RenderableTile as l}from"../webgl/RenderableTile.js";import n from"../webgl/TileContainer.js";import{simplePipelineState as a}from"../webgl/shaderGraph/utils.js";import{VTLTechniquesRepo as d}from"../webgl/shaderGraph/techniques/vectorTiles/VTLTechniques.js";import h from"../../tiling/TileCoverage.js";import c from"../../tiling/TileKey.js";const u=1e-6;function y(e,t){if(e){const s=e.getLayoutProperty("visibility");if(!s||1!==s.getValue()&&(void 0===e.minzoom||e.minzoom<t+u)&&(void 0===e.maxzoom||e.maxzoom>=t-u))return!0}return!1}class m extends n{constructor(e){super(e),this._backgroundTiles=[],this._techniques=new d,this._computeDisplayInfoView(e),this._techniques.startup()}destroy(){super.destroy(),this.removeAllChildren(),this._spriteMosaic?.dispose(),this._spriteMosaic=null,this._glyphMosaic?.dispose(),this._glyphMosaic=null,null!=this._symbolFader&&(this._symbolFader.clear(),this._symbolFader=null);const e=this.stage?.context;e&&this._techniques.shutdown(e),this._styleRepository=null,this._backgroundTiles=[]}get fading(){return this._symbolFader?.fading??!1}get symbolFader(){return this._symbolFader}get symbolRepository(){return this._symbolFader?.symbolRepository}setStyleResources(e,t,r,l){if(this._spriteMosaic=e,this._glyphMosaic=t,this._styleRepository=r,this.tilingScheme=l,this._computeDisplayInfoView(l),null==this._symbolFader){const e=(e,t)=>{e.allSymbolsFadingOut=!0,e.lastOpacityUpdate=t,o(e,t,!0),e.decluttered=!0,e.requestRender()};this._symbolFader=new i("vector-tile",this._styleRepository,e,this.children,s)}this._symbolFader.styleRepository=r}setSpriteMosaic(e){this._spriteMosaic?.dispose(),this._spriteMosaic=e}deleteStyleLayers(e){null!=this._symbolFader&&this._symbolFader.deleteStyleLayers(e)}createRenderParams(e){return{...super.createRenderParams(e),renderPass:null,styleLayer:null,styleLayerUID:-1,glyphMosaic:this._glyphMosaic,spriteMosaic:this._spriteMosaic}}doRender(e){const{drawPhase:t}=e,s=1===t||64===t;this.visible&&s&&void 0!==this._spriteMosaic&&super.doRender(e)}addChild(e){return super.addChild(e),null!=this._symbolFader?this._symbolFader.addTile(e):e.decluttered=!0,this.requestRender(),e}removeChild(e){return null!=this._symbolFader&&this._symbolFader.removeTile(e),this.requestRender(),super.removeChild(e)}renderChildren(e){const{drawPhase:t}=e;64!==t?this._doRender(e):super.renderChildren(e)}removeAllChildren(){for(let e=0;e<this.children.length;e++){const t=this.children[e];null!=this._symbolFader&&this._symbolFader.removeTile(t),t.dispose()}super.removeAllChildren()}getStencilTarget(){return this.children.filter(e=>e.neededForCoverage&&e.hasData())}restartDeclutter(){null!=this._symbolFader&&this._symbolFader.restartDeclutter()}_doRender(e){const{context:t,painter:s,state:r}=e,i=this._styleRepository;if(!i)return;const o=i.layers,l=this._displayInfo.scaleToZoom(r.scale);this.children.forEach(e=>e.disposeLayerData()),super.renderChildren(e),i.backgroundBucketIds.length>0&&(e.renderPass="background",this._renderBackgroundLayers(e,i.backgroundBucketIds,l)),1===e.drawPhase&&this._fade(l,r);const n=this.children.filter(t=>(1===e.drawPhase&&t.fader.fade()<1&&this.requestRender(),t.visible&&t.hasData()));if(n&&0!==n.length){for(const e of n)e.triangleCount=0;t.setClearDepth(1),t.clear(256),s.setPipelineState({color:{write:[!0,!0,!0,!0],blendMode:"composite"},stencil:{write:!1,test:{compare:514,op:{fail:7680,zFail:7680,zPass:7681},mask:255}},depth:{write:!1,test:515}}),e.renderPass="translucent";for(let t=0;t<o.length;t++)this._renderStyleLayer(o[t],e,n);t.bindVAO(null),s.setPipelineState(a);for(const e of n)e.debugInfo.display.triangleCount=e.triangleCount}else t.bindVAO(null)}_fade(e,t){null!=this._symbolFader&&(this._symbolFader.update(e,t)||this.requestRender())}_renderStyleLayer(e,t,s){const{displayLevel:r,renderPass:i}=t;if(void 0===e)return;const o=e.getLayoutProperty("visibility");if(o&&1===o.getValue())return;switch(e.type){case 0:return;case 1:case 2:case 4:case 3:if("translucent"!==i)return}if(s=3===e.type?s.filter(e=>e.decluttered):s.filter(e=>e.neededForCoverage),3!==e.type&&(0===s.length||void 0!==e.minzoom&&e.minzoom>=r+u||void 0!==e.maxzoom&&e.maxzoom<r-u))return;const l=e.uid;t.styleLayerUID=l,t.styleLayer=e;const n=this._techniques.getTechnique(e.type);null!=n&&n.render(t,{tiles:s})}_renderBackgroundLayers(t,i,o){const{state:n}=t,a=this._styleRepository;let d=!1;for(const e of i){const t=a.getLayerById(e);if(t&&0===t.type&&y(a.getLayerById(e),o)){d=!0;break}}if(!d)return;const u=this.tilingScheme,m=u.getTileCoverage(t.state,0,!0,"smallest"),{spans:p,lodInfo:g}=m,{level:f}=g,_=e(),b=[],F=this._backgroundTiles;let R,v=0;for(const{row:h,colFrom:y,colTo:C}of p)for(let t=y;t<=C;t++){if(v<F.length)R=F[v],R.key.set(f,h,g.normalizeCol(t),g.getWorldForColumn(t)),u.getTileBounds(_,R.key,!1),R.x=_[0],R.y=_[3],R.resolution=u.getTileResolution(f);else{const i=new c(f,h,g.normalizeCol(t),g.getWorldForColumn(t)),o=u.getTileBounds(e(),i),n=u.getTileResolution(f);R=new l(i,n,o[0],o[3],r,r,s,s),F.push(R)}R.setTransform(n),b.push(R),v++}const T=this._techniques.getTechnique(0);for(const e of i){const s=a.getLayerById(e);0===s.type&&y(s,o)&&(t.styleLayerUID=s.uid,t.styleLayer=s,T.render(t,{tiles:b}))}h.pool.release(m)}_computeDisplayInfoView(e){let s=e.tileInfo.lods[0].scale;const i=Math.max(25,e.tileInfo.lods.length),o=[];for(let t=0;t<=i;t++)o.push(s),s/=2;this._displayInfo=t.create({scales:o,size:r,spatialReference:e.spatialReference,numLODs:i})}}export{m as VectorTileContainer};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
class t{generateSource(t){const o=[];for(let a=1;a<this.length;a++)o.push(`vec4 atom${a} = texture(${t.animationTexture}, (pointer + 0.5) / size);`),o.push("pointer.x += 1.0;");for(let a=0;a<this.ins;a++)o.push("top--;"),o.push(`vec4 in${this.ins-a-1} = stack[top];`);for(let a=0;a<this.outs;a++)o.push(`vec4 out${a};`);const{microcode:e}=this;for(const a of e)o.push(a);for(let a=0;a<this.outs;a++)o.push(`stack[top] = out${a};`),o.push("top++;"),o.push(`if (top >= ${d}) { top = ${d-1}; }`);return o}}let o=128;class e extends t{constructor(){super(...arguments),this.opcode=++o,this.length=1,this.ins=0,this.outs=0,this.microcode=["break;"]}encode(){return[[this.opcode,0,0,0]]}}class a extends t{constructor(){super(...arguments),this.opcode=++o,this.length=1,this.ins=0,this.outs=1,this.microcode=["out0 = vec4(atom0.y, atom0.y, atom0.y, atom0.y);"]}encode(t){return[[this.opcode,t,0,0]]}}class i extends t{constructor(){super(...arguments),this.opcode=++o,this.length=1,this.ins=0,this.outs=1,this.microcode=["out0 = vec4(atom0.yzw, 0.0);"]}encode(t){return[[this.opcode,t[0]||0,t[1]||0,t[2]||0]]}}class n extends t{constructor(){super(...arguments),this.opcode=++o,this.length=2,this.ins=0,this.outs=1,this.microcode=["out0 = atom1;"]}encode(t){return[[this.opcode,0,0,0],t]}}function r(t){return[`float duration = clamp(${t.duration}, 0.05, 3600.0);`,`float startTimeOffset = ${t.startTimeOffset};`,`float repeatDelay = ${t.repeatDelay};`,`float timeOriginSelector = ${t.timeOriginSelector};`,`float repeatType = ${t.repeatType};`,`float easing = ${t.easing};`,`float playAnimation = ${t.playAnimation} * (1.0 - step(0.0, -${t.duration}));`,`float reverseAnimation = ${t.reverseAnimation};`,"float time = globalTime - (timeOriginSelector == 1.0 ? localTimeOrigin : 0.0);","time *= playAnimation;","time *= 1.0 - reverseAnimation * 2.0;","float period = duration + repeatDelay;","time += reverseAnimation == 1.0 ? (period - startTimeOffset - 0.001) : startTimeOffset + 0.001;","float omega = time / period;","float oi = floor(omega);","omega = repeatType == 1.0 || repeatType == 3.0 ? omega - oi : omega;","float of = omega * period;","of = (clamp(of, reverseAnimation * repeatDelay, period - (1.0 - reverseAnimation) * repeatDelay) - reverseAnimation * repeatDelay) / duration;","of = easing == 2.0 ? pow(of, 3.0) : of;","of = easing == 3.0 ? 1.0 - pow(1.0 - of, 3.0) : of;","of = easing == 4.0 ? of < 0.5 ? 4.0 * pow(of, 3.0) : 1.0 - pow(-2.0 * of + 2.0, 3.0) / 2.0 : of;","bool oscillate = repeatType == 3.0 && mod(oi, 2.0) == 1.0;",`${t.out} = oscillate ? 1.0 - of : of;`]}const s={Linear:1,EaseIn:2,EaseOut:3,EaseInOut:4},l={Loop:1,None:2,Oscillate:3},m={Local:1,Global:2};function c(t){const o=s[t.easing],e=l[t.repeatType],a=m[t.timeOriginSelector];return[[t.duration,t.startTimeOffset,t.repeatDelay,a],[e,o,t.playAnimation,t.reverseAnimation]]}class f extends t{constructor(){super(...arguments),this.opcode=++o,this.length=10,this.ins=1,this.outs=1,this.microcode=["vec2 fromTranslation = atom1.xy;","vec2 toTranslation = atom1.zw;","float fromRotation = atom2.x;","float toRotation = atom2.y;","float fromScale = atom2.z;","float toScale = atom2.w;","bool relativeTranslation = atom9.x == 1.0;","bool absoluteScale = atom9.y == 1.0;","vec2 translationMultiplier = relativeTranslation ? pixelDimensions : vec2(1.0, 1.0);","float scaleDivisor = absoluteScale ? pixelDimensions.y : 1.0;","float fTranslation;","{",...r({duration:"atom3.x",startTimeOffset:"atom3.y",repeatDelay:"atom3.z",timeOriginSelector:"atom3.w",repeatType:"atom4.x",easing:"atom4.y",playAnimation:"atom4.z",reverseAnimation:"atom4.w",out:"fTranslation"}),"}","float fRotation;","{",...r({duration:"atom5.x",startTimeOffset:"atom5.y",repeatDelay:"atom5.z",timeOriginSelector:"atom5.w",repeatType:"atom6.x",easing:"atom6.y",playAnimation:"atom6.z",reverseAnimation:"atom6.w",out:"fRotation"}),"}","float fScale;","{",...r({duration:"atom7.x",startTimeOffset:"atom7.y",repeatDelay:"atom7.z",timeOriginSelector:"atom7.w",repeatType:"atom8.x",easing:"atom8.y",playAnimation:"atom8.z",reverseAnimation:"atom8.w",out:"fScale"}),"}","vec2 aTranslation = mix(fromTranslation, toTranslation, fTranslation);","float aRotation = mix(fromRotation, toRotation, fRotation);","float aScale = mix(fromScale, toScale, fScale);","vec2 pTranslation = in0.xy;","float pRotation = in0.z;","float pScale = in0.w;","aTranslation *= translationMultiplier;","aScale /= scaleDivisor;","float rotation = pRotation + aRotation;","float scale = pScale * aScale;","float sin1 = sin(pRotation);","float cos1 = cos(pRotation);","float s1 = pScale;","float x1 = pTranslation.x;","float y1 = pTranslation.y;","float x2 = aTranslation.x;","float y2 = aTranslation.y;","\n vec2 translation = vec2(\n cos1 * s1 * x2 - sin1 * s1 * y2 + x1,\n sin1 * s1 * x2 + cos1 * s1 * y2 + y1\n );\n ","out0 = vec4(translation, rotation, scale);"]}encode(t){return[[this.opcode,0,0,0],[t.translation.from[0],t.translation.from[1],t.translation.to[0],t.translation.to[1]],[t.rotation.from,t.rotation.to,t.scale.from,t.scale.to],...c(t.translation.timing),...c(t.rotation.timing),...c(t.scale.timing),[t.relativeTranslation?1:0,t.absoluteScale?1:0,0,0]]}}class p extends t{constructor(){super(...arguments),this.opcode=++o,this.length=7,this.ins=1,this.outs=1,this.microcode=["float fromOpacity = atom0.y;","float toOpacity = atom0.z;","vec4 fromColor = atom1;","vec4 toColor = atom2;","float fColor;","{",...r({duration:"atom3.x",startTimeOffset:"atom3.y",repeatDelay:"atom3.z",timeOriginSelector:"atom3.w",repeatType:"atom4.x",easing:"atom4.y",playAnimation:"atom4.z",reverseAnimation:"atom4.w",out:"fColor"}),"}","float fOpacity;","{",...r({duration:"atom5.x",startTimeOffset:"atom5.y",repeatDelay:"atom5.z",timeOriginSelector:"atom5.w",repeatType:"atom6.x",easing:"atom6.y",playAnimation:"atom6.z",reverseAnimation:"atom6.w",out:"fOpacity"}),"}","vec4 aColor = mix(fromColor, toColor, fColor);","aColor.a *= mix(fromOpacity, toOpacity, fOpacity);","vec4 pColor = in0;","out0 = aColor * pColor;"]}encode(t){return[[this.opcode,t.opacity.from,t.opacity.to,0],[t.color.from[0],t.color.from[1],t.color.from[2],t.color.from[3]],[t.color.to[0],t.color.to[1],t.color.to[2],t.color.to[3]],...c(t.color.timing),...c(t.opacity.timing)]}}class u extends t{constructor(){super(...arguments),this.opcode=++o,this.length=4,this.ins=1,this.outs=1,this.microcode=["float fromShift = atom0.y;","float toShift = atom0.z;","float duration = atom1.x;","bool
|
|
2
|
+
class t{generateSource(t){const o=[];for(let a=1;a<this.length;a++)o.push(`vec4 atom${a} = texture(${t.animationTexture}, (pointer + 0.5) / size);`),o.push("pointer.x += 1.0;");for(let a=0;a<this.ins;a++)o.push("top--;"),o.push(`vec4 in${this.ins-a-1} = stack[top];`);for(let a=0;a<this.outs;a++)o.push(`vec4 out${a};`);const{microcode:e}=this;for(const a of e)o.push(a);for(let a=0;a<this.outs;a++)o.push(`stack[top] = out${a};`),o.push("top++;"),o.push(`if (top >= ${d}) { top = ${d-1}; }`);return o}}let o=128;class e extends t{constructor(){super(...arguments),this.opcode=++o,this.length=1,this.ins=0,this.outs=0,this.microcode=["break;"]}encode(){return[[this.opcode,0,0,0]]}}class a extends t{constructor(){super(...arguments),this.opcode=++o,this.length=1,this.ins=0,this.outs=1,this.microcode=["out0 = vec4(atom0.y, atom0.y, atom0.y, atom0.y);"]}encode(t){return[[this.opcode,t,0,0]]}}class i extends t{constructor(){super(...arguments),this.opcode=++o,this.length=1,this.ins=0,this.outs=1,this.microcode=["out0 = vec4(atom0.yzw, 0.0);"]}encode(t){return[[this.opcode,t[0]||0,t[1]||0,t[2]||0]]}}class n extends t{constructor(){super(...arguments),this.opcode=++o,this.length=2,this.ins=0,this.outs=1,this.microcode=["out0 = atom1;"]}encode(t){return[[this.opcode,0,0,0],t]}}function r(t){return[`float duration = clamp(${t.duration}, 0.05, 3600.0);`,`float startTimeOffset = ${t.startTimeOffset};`,`float repeatDelay = ${t.repeatDelay};`,`float timeOriginSelector = ${t.timeOriginSelector};`,`float repeatType = ${t.repeatType};`,`float easing = ${t.easing};`,`float playAnimation = ${t.playAnimation} * (1.0 - step(0.0, -${t.duration}));`,`float reverseAnimation = ${t.reverseAnimation};`,"float time = globalTime - (timeOriginSelector == 1.0 ? localTimeOrigin : 0.0);","time *= playAnimation;","time *= 1.0 - reverseAnimation * 2.0;","float period = duration + repeatDelay;","time += reverseAnimation == 1.0 ? (period - startTimeOffset - 0.001) : startTimeOffset + 0.001;","float omega = time / period;","float oi = floor(omega);","omega = repeatType == 1.0 || repeatType == 3.0 ? omega - oi : omega;","float of = omega * period;","of = (clamp(of, reverseAnimation * repeatDelay, period - (1.0 - reverseAnimation) * repeatDelay) - reverseAnimation * repeatDelay) / duration;","of = easing == 2.0 ? pow(of, 3.0) : of;","of = easing == 3.0 ? 1.0 - pow(1.0 - of, 3.0) : of;","of = easing == 4.0 ? of < 0.5 ? 4.0 * pow(of, 3.0) : 1.0 - pow(-2.0 * of + 2.0, 3.0) / 2.0 : of;","bool oscillate = repeatType == 3.0 && mod(oi, 2.0) == 1.0;",`${t.out} = oscillate ? 1.0 - of : of;`]}const s={Linear:1,EaseIn:2,EaseOut:3,EaseInOut:4},l={Loop:1,None:2,Oscillate:3},m={Local:1,Global:2};function c(t){const o=s[t.easing],e=l[t.repeatType],a=m[t.timeOriginSelector];return[[t.duration,t.startTimeOffset,t.repeatDelay,a],[e,o,t.playAnimation,t.reverseAnimation]]}class f extends t{constructor(){super(...arguments),this.opcode=++o,this.length=10,this.ins=1,this.outs=1,this.microcode=["vec2 fromTranslation = atom1.xy;","vec2 toTranslation = atom1.zw;","float fromRotation = atom2.x;","float toRotation = atom2.y;","float fromScale = atom2.z;","float toScale = atom2.w;","bool relativeTranslation = atom9.x == 1.0;","bool absoluteScale = atom9.y == 1.0;","vec2 translationMultiplier = relativeTranslation ? pixelDimensions : vec2(1.0, 1.0);","float scaleDivisor = absoluteScale ? pixelDimensions.y : 1.0;","float fTranslation;","{",...r({duration:"atom3.x",startTimeOffset:"atom3.y",repeatDelay:"atom3.z",timeOriginSelector:"atom3.w",repeatType:"atom4.x",easing:"atom4.y",playAnimation:"atom4.z",reverseAnimation:"atom4.w",out:"fTranslation"}),"}","float fRotation;","{",...r({duration:"atom5.x",startTimeOffset:"atom5.y",repeatDelay:"atom5.z",timeOriginSelector:"atom5.w",repeatType:"atom6.x",easing:"atom6.y",playAnimation:"atom6.z",reverseAnimation:"atom6.w",out:"fRotation"}),"}","float fScale;","{",...r({duration:"atom7.x",startTimeOffset:"atom7.y",repeatDelay:"atom7.z",timeOriginSelector:"atom7.w",repeatType:"atom8.x",easing:"atom8.y",playAnimation:"atom8.z",reverseAnimation:"atom8.w",out:"fScale"}),"}","vec2 aTranslation = mix(fromTranslation, toTranslation, fTranslation);","float aRotation = mix(fromRotation, toRotation, fRotation);","float aScale = mix(fromScale, toScale, fScale);","vec2 pTranslation = in0.xy;","float pRotation = in0.z;","float pScale = in0.w;","aTranslation *= translationMultiplier;","aScale /= scaleDivisor;","float rotation = pRotation + aRotation;","float scale = pScale * aScale;","float sin1 = sin(pRotation);","float cos1 = cos(pRotation);","float s1 = pScale;","float x1 = pTranslation.x;","float y1 = pTranslation.y;","float x2 = aTranslation.x;","float y2 = aTranslation.y;","\n vec2 translation = vec2(\n cos1 * s1 * x2 - sin1 * s1 * y2 + x1,\n sin1 * s1 * x2 + cos1 * s1 * y2 + y1\n );\n ","out0 = vec4(translation, rotation, scale);"]}encode(t){return[[this.opcode,0,0,0],[t.translation.from[0],t.translation.from[1],t.translation.to[0],t.translation.to[1]],[t.rotation.from,t.rotation.to,t.scale.from,t.scale.to],...c(t.translation.timing),...c(t.rotation.timing),...c(t.scale.timing),[t.relativeTranslation?1:0,t.absoluteScale?1:0,0,0]]}}class p extends t{constructor(){super(...arguments),this.opcode=++o,this.length=7,this.ins=1,this.outs=1,this.microcode=["float fromOpacity = atom0.y;","float toOpacity = atom0.z;","vec4 fromColor = atom1;","vec4 toColor = atom2;","float fColor;","{",...r({duration:"atom3.x",startTimeOffset:"atom3.y",repeatDelay:"atom3.z",timeOriginSelector:"atom3.w",repeatType:"atom4.x",easing:"atom4.y",playAnimation:"atom4.z",reverseAnimation:"atom4.w",out:"fColor"}),"}","float fOpacity;","{",...r({duration:"atom5.x",startTimeOffset:"atom5.y",repeatDelay:"atom5.z",timeOriginSelector:"atom5.w",repeatType:"atom6.x",easing:"atom6.y",playAnimation:"atom6.z",reverseAnimation:"atom6.w",out:"fOpacity"}),"}","vec4 aColor = mix(fromColor, toColor, fColor);","aColor.a *= mix(fromOpacity, toOpacity, fOpacity);","vec4 pColor = in0;","out0 = aColor * pColor;"]}encode(t){return[[this.opcode,t.opacity.from,t.opacity.to,0],[t.color.from[0],t.color.from[1],t.color.from[2],t.color.from[3]],[t.color.to[0],t.color.to[1],t.color.to[2],t.color.to[3]],...c(t.color.timing),...c(t.opacity.timing)]}}class u extends t{constructor(){super(...arguments),this.opcode=++o,this.length=4,this.ins=1,this.outs=1,this.microcode=["float fromShift = atom0.y;","float toShift = atom0.z;","float duration = atom1.x;","bool multiplyToByLineLength = atom3.x == 1.0;","bool multiplyDurationByLineLength = atom3.y == 1.0;","duration *= multiplyDurationByLineLength ? lineLength : 1.0;","float fShift;","{",...r({duration:"duration",startTimeOffset:"atom1.y",repeatDelay:"atom1.z",timeOriginSelector:"atom1.w",repeatType:"atom2.x",easing:"atom2.y",playAnimation:"atom2.z",reverseAnimation:"atom2.w",out:"fShift"}),"}","toShift *= multiplyToByLineLength ? lineLength : 1.0;","float aShift = mix(fromShift, toShift, fShift);","vec4 pShift = in0;","out0 = mod(aShift + pShift, lineLength);"]}encode(t){return[[this.opcode,t.shift.from,t.shift.to,0],...c(t.shift.timing),[t.multiplyToByLineLength?1:0,t.multiplyDurationByLineLength?1:0,0,0]]}}const h={scalar:new a,vector3:new i,vector4:new n,animatedTransform:new f,animatedColor:new p,animatedShift:new u,ret:new e},y=40,d=4;function g(t){const o=[];o.push(`float globalTime = ${t.globalTime};`),o.push(`float localTimeOrigin = ${t.localTimeOrigin};`),o.push(`float lineLength = ${t.lineLength};`),o.push(`vec2 pointer = ${t.animationPointer};`),o.push(`vec2 size = ${t.animationTextureSize};`),o.push("int top = 0;"),o.push(`vec4 stack[${d}];`),o.push(`for (int counter = 0; counter < ${y}; counter++) {`),o.push(`vec4 atom0 = texture(${t.animationTexture}, (pointer + 0.5) / size);`),o.push("pointer.x += 1.0;"),o.push(`vec2 pixelDimensions = ${t.pixelDimensions};`),o.push("if (false) {");for(const e in h){const a=h[e];o.push(`} else if (int(atom0.x) == ${a.opcode}) {`);for(const e of a.generateSource(t))o.push(e)}return o.push("} // End if-else."),o.push("} // End for."),o.push(`${t.out} = top > 0 ? stack[top - 1] : vec4(0.0);`),o.join("\n")}export{t as AAnimationInstruction,p as AnimatedColorInstruction,u as AnimatedShiftInstruction,f as AnimatedTransformInstruction,e as RetInstruction,a as ScalarInstruction,i as Vector3Instruction,n as Vector4Instruction,s as easingCodes,g as generateVirtualMachineSource,r as getTweenFactor,h as instructions,l as repeatTypeCodes,m as timeOriginSelectorCodes};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{AMeshFactory as e}from"./MeshFactory.js";import{createMatcher as
|
|
2
|
+
import{AMeshFactory as e}from"./MeshFactory.js";import{createMatcher as s}from"../../util/createMatcher.js";class t extends e{static async create(e,o){const r=await s(e,o.symbology),c=o.labels?await s(e,o.labels):null;return new t(r,c)}constructor(e,s){super(),this._symbology=e,this._labels=s}destroy(){}async enqueueMatcherRequests(e,s,t,o){await Promise.all([this._symbology.fetchResources(e,s,t,o),this._labels?.fetchResources(e,s,t,o)])}enqueueWriterRequests(e,s,t,o){const r=this._symbology.match(s,t,o);if(r){for(const o of r)o.enqueueRequest(e,s,t);if(this._labels){const r=this._labels.match(s,t,o);if(!r)return;for(const o of r)o.enqueueRequest(e,s,t)}}}write(e,s,t,o,r,c,a,i){const l=null!=i?i/o.$view.scale:void 0,n=this._symbology.match(t,o,r);if(!n)return;for(const y of n)y.write(e,s,t,o,c,a,l,this._symbology);this._symbology.cleanup(s,t,e.id,o,r);if(e.entityRecordCount()>=1&&this._labels){const i=this._labels.match(t,o,r);if(!i)return;for(const r of i)r.setReferences(n),r.write(e,s,t,o,c,a,l)}}getSortKey(e,s){return this._symbology.getSortKey(e,s)}hasArcadeDependency(e){return!(!this._symbology.hasArcadeDependency(e)&&!this._labels?.hasArcadeDependency(e))}}export{t as FeatureMeshFactory};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{cyrb53 as e}from"../../../../../../core/string.js";import{discardUrlIfHasUrlHash as t}from"../../urlUtils.js";import{AResourceProxy as r}from"../../shaderGraph/techniques/mesh/AResourceProxy.js";class s extends r{constructor(e){super(),this._fetcher=e,this._controller=new AbortController,this._pendingRequests=new Map,this._resourceIdToResource=new Map}destroy(){this._controller.abort()}get _abortOptions(){return{signal:this._controller.signal}}enqueueRequest(r){const s=t(r.resource),o=e(JSON.stringify(s));return this._pendingRequests.has(o)||this._pendingRequests.set(o,r),o}async fetchEnqueuedResources(){const e=Array.from(this._pendingRequests.entries()),t=e.map(e=>e[1]);if(0===t.length)return;const r=await this._fetcher.fetch(t,this._abortOptions);for(let s=0;s<r.length;s++){const t=e[s][0];this._resourceIdToResource.set(t,r[s])}this._pendingRequests.clear()}async fetchResourceImmediate(e){const t=await this._fetcher.fetch([e]);if(1!==t.length)throw new Error("FeaturePipelineResourceProxy: failed to fetch resources");return t[0]}async fetchDictionaryResourceImmediate(e){const t=await this._fetcher.fetchDictionary([e]);if(1!==t.length)throw new Error("FeaturePipelineResourceProxy: failed to fetch dictionary resources");return t[0]}getResource(e){return this._resourceIdToResource.get(e)}}export{s as ResourceProxy};
|
|
2
|
+
import{cyrb53 as e}from"../../../../../../core/string.js";import{discardUrlIfHasUrlHash as t}from"../../urlUtils.js";import{AResourceProxy as r}from"../../shaderGraph/techniques/mesh/AResourceProxy.js";class s extends r{constructor(e){super(),this._fetcher=e,this._controller=new AbortController,this._pendingRequests=new Map,this._resourceIdToResource=new Map}destroy(){this._controller.abort()}get _abortOptions(){return{signal:this._controller.signal}}enqueueRequest(r){const s=t(r.resource),o=e(JSON.stringify(s));return this._pendingRequests.has(o)||this._pendingRequests.set(o,r),o}async fetchEnqueuedResources(){const e=Array.from(this._pendingRequests.entries()),t=e.map(e=>e[1]);if(0===t.length)return;const r=await this._fetcher.fetch(t,this._abortOptions);for(let s=0;s<r.length;s++){const t=e[s][0];this._resourceIdToResource.set(t,r[s])}this._pendingRequests.clear()}async fetchResourceImmediate(e){const t=await this._fetcher.fetch([e]);if(1!==t.length)throw new Error("FeaturePipelineResourceProxy: failed to fetch resources");return t[0]}async fetchDictionaryResourceImmediate(e){const t=await this._fetcher.fetchDictionary([e]);if(1!==t.length)throw new Error("FeaturePipelineResourceProxy: failed to fetch dictionary resources");return t[0]}async fetchMeshResourceImmediate(e){const t=await this._fetcher.fetchMesh([e]),[r]=t;if(!r)throw new Error("FeaturePipelineResourceProxy: failed to fetch mesh resources");return r}getResource(e){return this._resourceIdToResource.get(e)}}export{s as ResourceProxy};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{fromRotation as t,multiply as e,translate as
|
|
2
|
+
import{fromRotation as t,multiply as e,translate as s,rotate as i}from"../../../../../../core/libs/gl-matrix-2/math/mat2d.js";import{create as n}from"../../../../../../core/libs/gl-matrix-2/factories/mat2df32.js";import{transformMat2d as o,set as h}from"../../../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as r}from"../../../../../../core/libs/gl-matrix-2/factories/vec2f32.js";import{getXAnchorDirection as a,getYAnchorDirection as f}from"../../alignmentUtils.js";import c from"../../Rect.js";import l from"../../collisions/BoundingBox.js";const d=22,g=4,m=d+g,u=d-6,x=Math.PI/180,p=8,_=1.5;class w{constructor(t,e,s,i){this._rotationT=n(),this._transform=n(),this._angle=0,this._bounds=null;const{mosaicItem:o,rect:h,shaping:r,code:a}=s,f=o.rect;this.width=0===a?h.width:f.width*i,this.height=0===a?h.height:f.height*i,this.x=i*(t+r.xOffset+h.left),this.y=i*(e+r.yOffset-h.top),this.textureBinding=o.textureBinding,this.texcoords={topLeft:[f.x,f.y],topRight:[f.x+f.width,f.y],bottomLeft:[f.x,f.y+f.height],bottomRight:[f.x+f.width,f.y+f.height]}}set angle(e){this._angle=e,t(this._rotationT,-e),this._offsets=this._bounds=null}get angle(){return this._angle}get offsets(){if(!this._offsets){const{x:s,y:i,width:h,height:r}=this,a=t(n(),-this.angle),f=e(n(),a,this._transform);this._offsets={topLeft:o([0,0],[s,i],f),topRight:o([0,0],[s+h,i],f),bottomLeft:o([0,0],[s,i+r],f),bottomRight:o([0,0],[s+h,i+r],f)}}return this._offsets}get bounds(){if(this.width<=0)return null;if(!this._bounds){const t=this.offsets;let e=1/0,s=1/0,i=-1/0,n=-1/0;for(const[f,c]of[t.topLeft,t.topRight,t.bottomLeft,t.bottomRight])e=Math.min(e,f),s=Math.min(s,c),i=Math.max(i,f),n=Math.max(n,c);const o=i-e,h=n-s,r=e+o/2,a=s+h/2;this._bounds=new l(r,a,o,h)}return this._bounds}setTransform(t){this._transform=t,this._offsets=null}}const y=(t,e)=>({code:0,mosaicItem:{rect:new c(0,0,11,8),sdf:!0,page:0,textureBinding:e},rect:{height:4,width:t,left:0,top:0},shaping:{xOffset:0,yOffset:0,xAdvance:0,yAdvance:0}});function b(t,e){return t.forEach(t=>o(t,t,e)),{topLeft:t[0],topRight:t[1],bottomLeft:t[2],bottomRight:t[3]}}class M{constructor(t,e,s,i){this._rotation=0,this._decorate(t,e,s,i),this.glyphs=t,this.bounds=this._createBounds(t),this.isMultiline=e.length>1,this._hasRotation=0!==s.angle,this._transform=this._createGlyphTransform(this.bounds,s),this._borderLineSizePx=s.borderLineSizePx,(s.borderLineSizePx||s.hasBackground)&&([this.bounds,this.textBox]=this.shapeBackground(this._transform));for(const n of t)n.setTransform(this._transform)}setRotation(s){if(0===s&&0===this._rotation)return;this._rotation=s;const i=this._transform,o=t(n(),s);e(i,o,i);for(const t of this.glyphs)t.setTransform(this._transform)}_decorate(t,e,s,i){if(!s.decoration||"none"===s.decoration||!t.length)return;const n=s.scale,o="underline"===s.decoration?i?.baseline??m:i?.midline??u,h=t[0].textureBinding;for(const r of e){const e=r.startX*n,s=r.startY*n,i=(r.width+r.glyphWidthEnd)*n;t.push(new w(e,s+o*n,y(i,h),1))}}shapeBackground(t){const e=this._borderLineSizePx||0,s=(_+e)/2,i=this._borderLineSizePx?s:0,{xmin:n,ymin:o,xmax:h,ymax:r,x:a,y:f,width:c,height:d}=this.bounds,g=[n-p,o-p],m=[h+p,o-p],u=[n-p,r+p],x=[h+p,r+p],w=b([[g[0]-s,g[1]-s],[m[0]+s,m[1]-s],[g[0]+i,g[1]+i],[m[0]-i,m[1]+i]],t),y=b([[u[0]+i,u[1]-i],[x[0]-i,x[1]-i],[u[0]-s,u[1]+s],[x[0]+s,x[1]+s]],t),M=b([[g[0]-s,g[1]-s],[g[0]+i,g[1]+i],[u[0]-s,u[1]+s],[u[0]+i,u[1]-i]],t),L=b([[m[0]-i,m[1]+i],[m[0]+s,m[1]-s],[x[0]-i,x[1]-i],[x[0]+s,x[1]+s]],t),A={main:b([g,m,u,x],t),top:w,bot:y,left:M,right:L};return[new l(a,f,c+2*s,d+2*s),A]}get boundsT(){const t=this.bounds,e=h(r(),t.x,t.y);if(o(e,e,this._transform),this._hasRotation){const s=Math.max(t.width,t.height);return new l(e[0],e[1],s,s)}return new l(e[0],e[1],t.width,t.height)}_createBounds(t){let e=1/0,s=1/0,i=0,n=0;for(const r of t)e=Math.min(e,r.offsets.topLeft[0]),s=Math.min(s,r.offsets.topLeft[1]),i=Math.max(i,r.offsets.bottomRight[0]),n=Math.max(n,r.offsets.bottomRight[1]);const o=i-e,h=n-s;return new l(e+o/2,s+h/2,o,h)}_createGlyphTransform(t,e){const o=x*e.angle,a=n(),f=r();return s(a,a,h(f,e.xOffset,-e.yOffset)),e.useCIMAngleBehavior?i(a,a,o):(s(a,a,h(f,t.x,t.y)),i(a,a,o),s(a,a,h(f,-t.x,-t.y))),a}}class L{constructor(t,e,s,i,n,o){this.glyphWidthEnd=0,this.startX=0,this.startY=0,this.start=Math.max(0,Math.min(e,s)),this.end=Math.max(0,Math.max(e,s)),this.end<t.length&&(this.glyphWidthEnd=t[this.end].rect.width),this.width=i,this.yMin=n,this.yMax=o}}const A=t=>10===t,R=t=>32===t;function v(t,e,s){const i=new Array,n=1/s.scale,o=s.maxLineWidth*n,h=e?t.length-1:0,r=e?-1:t.length,a=e?-1:1;let f=h,c=0,l=0,d=f,g=d,m=0,u=1/0,x=0;for(;f!==r;){const{code:e,rect:s,shaping:n}=t[f],r=Math.abs(s.top);if(A(e)||R(e)||(u=Math.min(u,r),x=Math.max(x,r+s.height)),A(e))f!==h&&(i.push(new L(t,d,f-a,c,u===1/0?0:u,x)),u=1/0,x=0),c=0,d=f+a,g=f+a,l=0;else if(R(e))g=f+a,l=0,m=n.xAdvance,c+=n.xAdvance;else if(c>o){if(g!==d){const e=g-2*a;c-=m,i.push(new L(t,d,e,c-l,u,x)),u=1/0,x=0,d=g,c=l}else i.push(new L(t,d,f-a,c,u,x)),u=1/0,x=0,d=f,g=f,c=0;c+=n.xAdvance,l+=n.xAdvance}else c+=n.xAdvance,l+=n.xAdvance;f+=a}const p=new L(t,d,f-a,c,u,x);return p.start>=0&&p.end<t.length&&i.push(p),i}function B(t,e){let s=0;for(let o=0;o<t.length;o++){const{width:e}=t[o];s=Math.max(e,s)}const i="underline"===e.decoration?g:0,n=t[0].yMin;return{x:0,y:n,height:t[t.length-1].yMax+e.lineHeight*(t.length-1)+i-n,width:s}}function T(t,e,s){let i=0;for(let n=e;n<s;n++)R(t[n].code)&&!A(t[n+1].code)&&i++;return i}function j(t,e){const s=e.scale,i=new Array,n=t.sdfPadding,{faceInfo:o,glyphs:h,isRightToLeft:r}=t,c="justify"===e.horizontalAlignment||"Justify"===e.horizontalAlignment,l=v(h,r,e),g=l.length?B(l,e):{y:0,height:0,width:0},m=c?r?1:-1:a(e.horizontalAlignment),u=f(e.verticalAlignment),x=2===u?1:0,p=x?0:u-1,_=o?.baseline??d,y=l.length>1,b=x?y?-g.y-g.height:-_:-g.y+p*(g.height/2);for(let a=0;a<l.length;a++){const{start:o,end:r,width:f}=l[a],d=c&&a<l.length-1?T(h,o,r):0,u=d>0?(g.width-f)/d:0;let x=-1*(m+1)*((u>0?g.width:f)/2)-n;const p=(t.isRightToLeft?l.length-1-a:a)*e.lineHeight+b-n;l[a].startX=x,l[a].startY=p;for(let t=o;t<=r;t++){const e=h[t];if(A(e.code))continue;const n=new w(x,p,e,s);x+=e.shaping.xAdvance,u>0&&R(e.code)&&(x+=u),i.push(n)}}return new M(i,l,e,o)}function z(t,e){const s=e.scale,{faceInfo:i,glyphs:n}=t,o=n.map(t=>new w(0,0,t,s));return new M(o,[],e,i)}export{w as ShapedGlyph,M as ShapingInfo,j as shapeGlyphs,z as shapeGlyphsForMultipoint};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import e from"../../../../../../geometry/SpatialReference.js";import{getJsonType as t}from"../../../../../../geometry/support/jsonTypeUtils.js";import r from"../../../../../../layers/support/FieldsIndex.js";import{MeshData as o}from"../../mesh/MeshData.js";import{createMeshWriter as s}from"./createMeshWriter.js";import{AResourceProxy as n}from"./mesh/AResourceProxy.js";import{ComputedAttributeStorage as
|
|
2
|
+
import e from"../../../../../../geometry/SpatialReference.js";import{getJsonType as t}from"../../../../../../geometry/support/jsonTypeUtils.js";import r from"../../../../../../layers/support/FieldsIndex.js";import{MeshData as o}from"../../mesh/MeshData.js";import{createMeshWriter as s}from"./createMeshWriter.js";import{AResourceProxy as n}from"./mesh/AResourceProxy.js";import{ComputedAttributeStorage as m}from"../../../../layers/features/support/ComputedAttributeStorage.js";import{FeatureMetadata as a}from"../../../../layers/features/support/FeatureMetadata.js";import{FeatureSetReaderJSON as i}from"../../../../layers/features/support/FeatureSetReaderJSON.js";async function u(n){const u=new o("0.0.0.0"),d=new p,l={},c={fields:new r,spatialReference:e.WebMercator},f={$view:{scale:0,timeZone:null,timeProperties:{currentStart:null,currentEnd:null}}},h=new m(c);for(const e of n){const r=await s(h,d,l,e.instanceId,e.meshParams,e.meshWriterClass);e.feature.displayId=e.feature.attributes.objectId;const o=i.fromFeatures([e.feature],a.minimal(t(e.feature.geometry),"objectId",[]));o.next(),u.entityStart(o.getDisplayId(),0),r.write(u,d,o,f,0,null),u.entityEnd()}return u.serialize().message}class p extends n{fetchMeshResourceImmediate(e){throw new Error("Method not implemented.")}fetchDictionaryResourceImmediate(e){throw new Error("Method not implemented.")}fetchResourceImmediate(e){throw new Error("Method not implemented.")}enqueueRequest(e){throw new Error("Method not implemented.")}fetchEnqueuedResources(){throw new Error("Method not implemented.")}getResource(e){throw new Error("Method not implemented.")}}export{u as createTestMeshData};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{getMetersPerUnitForSR as t}from"../../../../../../core/units.js";import{maxRepresentableInt as e,tileSize as i}from"../../definitions.js";const o={color:{write:[!0,!0,!0,!0],blendMode:"composite"},depth:!1,stencil:{write:!1,test:{compare:514,mask:255,op:{fail:7680,zFail:7680,zPass:7681}}}},n={color:{write:[!0,!0,!0,!0],blendParameters:{srcRGB:1,dstRGB:1,srcAlpha:1,dstAlpha:1},blendEquation:32776,blendMode:"custom"},depth:!1,stencil:!1},
|
|
2
|
+
import{getMetersPerUnitForSR as t}from"../../../../../../core/units.js";import{maxRepresentableInt as e,tileSize as i}from"../../definitions.js";const o={color:{write:[!0,!0,!0,!0],blendMode:"composite"},depth:!1,stencil:{write:!1,test:{compare:514,mask:255,op:{fail:7680,zFail:7680,zPass:7681}}}},n={color:{write:[!0,!0,!0,!0],blendParameters:{srcRGB:1,dstRGB:1,srcAlpha:1,dstAlpha:1},blendEquation:32776,blendMode:"custom"},depth:!1,stencil:!1},r={...o,color:{write:[!0,!0,!0,!0],blendMode:"delete"}};function s({pixelRatio:e,state:i,displayLevel:o,requiredLevel:n,referenceScale:r},s){const l=1/2**(o-s.key.level),a=1/2**(n-s.key.level),c=null!=r?r/i.scale:1;return{displayMat3:i.displayMat3,displayViewMat3:i.displayViewMat3,displayViewScreenMat3:s.transforms.displayViewScreenMat3,viewMat3:i.viewMat3,tileMat3:s.transforms.tileMat3,displayZoomFactor:l,requiredZoomFactor:a,tileOffset:[s.x,s.y],currentScale:i.scale,currentZoom:o,metersPerSRUnit:t(i.spatialReference),rotation:i.rotation,pixelRatio:e,scaleFactor:c}}function l(t){return"highlight"===t.passOptions?.type}function a(t){return"hittest"===t.passOptions?.type}function c(t){if(!a(t))return null;const{position:e,distance:i,smallSymbolDistance:o,smallSymbolSizeThreshold:n,tlbr:r}=t.passOptions;return{position:e,distance:i,smallSymbolDistance:o,smallSymbolSizeThreshold:n,tlbr:r}}function u(t){if(!l(t))return null;const{activeReasons:e,highlightAll:i}=t.passOptions;return{activeReasons:e,highlightAll:i?1:0}}function p(t,e,i){const o={};for(const n in i)"function"!=typeof i[n]?o[n]=i[n]:o[n]=i[n](t,e);return o}function f(t,e){return{storage:t.attributeView.getUniforms(),view:s(t,e),hittestRequest:c(t),highlight:u(t)}}function d(t){return t.attributeView.getTextures(t.context)}function m(t){return{storageTextures:d(t)}}function h(t){return{inside:2===t.selection,outside:3===t.selection}}function y(t){return a(t)?n:l(t)&&"clear"===t.passOptions.stepType?r:o}function M(t){const{row:o,col:n}=t.key,r=n*i,s=o*i;return{tileOffsetFromLocalOrigin:[r%e,s%e],maxIntsToLocalOrigin:[Math.floor(r/e),Math.floor(s/e)]}}export{y as getFeaturePipelineState,d as getFeatureStorageTextures,m as getFeatureTextures,f as getFeatureUniforms,M as getLocalTileOffset,h as getSelectionDefines,s as getViewUniforms,l as isHighlight,a as isHittest,p as resolveDynamicUniforms};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as t,__param as e}from"tslib";import{location as i,option as o,uniform as s,texture as
|
|
2
|
+
import{__decorate as t,__param as e}from"tslib";import{location as i,option as o,uniform as s,texture as l,input as r,ComputeVertexInput as a}from"../../GraphShaderModule.js";import{Vec3 as p,min as n,max as u,Float as d,Mat3 as m,Vec4 as y,ifElse as h,lessThan as c,greaterThan as x,equal as v,texture2D as w,clamp as V,abs as f,mix as S,distance as b,Vec2 as g,negate as C,step as M,Sampler2D as z}from"../../graph/glsl.js";import{MarkerConstants as _}from"./markerConstants.js";import{AFeatureShader as R,FeatureVertexInput as j,FeatureFragmentInput as U}from"../shaders/AFeatureShader.js";import{c256ToRad as N,noHit as T,trueHit as D,softEdgeRatio as F}from"../shaders/constants.js";import{isRectHittest as q,hittestScreenRect as O,distPointTriangle as k,xyToBarycentric as A,inTriangle as P,failHittest as I}from"../shaders/hittestUtils.js";import{MosaicInfo as H}from"../shaders/MosaicInfo.js";import{getBit as G,getBitBool as L,rgba2float as B}from"../shaders/utils.js";import{VisualVariableColor as E}from"../shaders/VisualVariableColor.js";import{VisualVariableOpacity as J}from"../shaders/VisualVariableOpacity.js";import{VisualVariableRotation as K}from"../shaders/VisualVariableRotation.js";import{VisualVariableSizeMinMaxValue as Q}from"../shaders/VisualVariableSizeMinMaxValue.js";import{VisualVariableSizeScaleStops as W}from"../shaders/VisualVariableSizeScaleStops.js";import{VisualVariableSizeStops as X}from"../shaders/VisualVariableSizeStops.js";import{VisualVariableSizeUnitValue as Y}from"../shaders/VisualVariableSizeUnitValue.js";import{getVisualVariableOpacity as Z,getVisualVariableColor as $,getVisualVariableSize as tt,getVisualVariableRotation as et}from"../shaders/vvUtils.js";class it extends j{}t([i(3,y)],it.prototype,"color",void 0),t([i(4,y)],it.prototype,"outlineColor",void 0),t([i(5,g)],it.prototype,"offset",void 0),t([i(6,g)],it.prototype,"textureUV",void 0),t([i(7,y)],it.prototype,"sizing",void 0),t([i(8,d)],it.prototype,"placementAngle",void 0),t([i(9,d)],it.prototype,"sdfDecodeCoeff",void 0),t([i(10,g)],it.prototype,"zoomRange",void 0);class ot extends a{}t([i(11,g)],ot.prototype,"offsetNextVertex1",void 0),t([i(12,g)],ot.prototype,"offsetNextVertex2",void 0),t([i(13,g)],ot.prototype,"textureUVNextVertex1",void 0),t([i(14,g)],ot.prototype,"textureUVNextVertex2",void 0);class st extends U{}function lt(t,e,i,o){return e.multiply(t.x).add(i.multiply(t.y)).add(o.multiply(t.z))}function rt(t){return t.multiply(t).divide(128)}class at extends R{constructor(){super(...arguments),this.type="MarkerShader",this.computeAttributes={offset:["offsetNextVertex1","offsetNextVertex2"],textureUV:["textureUVNextVertex1","textureUVNextVertex2"]}}vertex(t,e){const i=rt(t.sizing.x),o=rt(t.sizing.y),s=rt(t.sizing.z),l=t.placementAngle,r=G(t.bitset,_.bitset.isSDF),a=G(t.bitset,_.bitset.isMapAligned),h=G(t.bitset,_.bitset.scaleSymbolsProportionally),c=L(t.bitset,_.bitset.colorLocked),x=Z(this,t.id),v=$(this,t.id,t.color,c).multiply(x),w=this.view.displayViewScreenMat3.multiply(new p(t.pos.xy,1)),V=tt(this,t.id,s).divide(s),f=i.multiply(V),S=t.offset.xy.multiply(V);let b=o.multiply(h.multiply(V.subtract(1)).add(1));b=n(b,u(f.subtract(.99),new d(0)));const g=u(b,new d(1)),C=n(b,new d(1)),M=m.fromRotation(l.multiply(N)),z=et(this,t.id),R=this._getViewRotationMatrix(a).multiply(z).multiply(M).multiply(new p(S.xy,0)).multiply(this.view.scaleFactor),j=this.clip(t.id,t.zoomRange),U=new y(w.xy.add(R.xy),j,1),T=t.textureUV.divide(this.mosaicInfo.size),D=t.outlineColor.multiply(C),F=G(t.bitset,_.bitset.overrideOutlineColor),q=t.sdfDecodeCoeff.multiply(f);return{glPosition:U,color:v,textureUV:T,outlineColor:D,outlineSize:g,distanceToPx:q,isSDF:r,overrideOutlineColor:F,...this.maybeRunHittest(t,e,{pos:t.pos,size:f,sizeCorrection:V,isMapAligned:a,vvRotationMat3:z,placementMat3:M,outlineSize:g,distanceToPx:q,isSDF:r})}}fragment(t){const e=this._getColor(t.textureUV,t);return this.getFragmentOutput(e,t)}hittest(t,e,i){const{pos0:o,pos1:s,pos2:l}=this.computeHittestTriangle(t,e,i),r=q(this.hittestRequest);return h(r,()=>{const{tlbr:t}=this.hittestRequest;return O(o,s,l,t)},()=>{const o=h(c(i.size,this.hittestRequest.smallSymbolSizeThreshold),this._hittestSmallMarker(t,e,i),this._hittestMarker(t,e,i));return h(x(o,this.hittestRequest.distance),new d(T),new d(D))})}_getViewRotationMatrix(t){const e=this.view.displayViewMat3,i=this.view.displayMat3,o=new d(1).subtract(t);return e.multiply(t).add(i.multiply(o))}_getViewScreenMatrix(t){const e=this.view.viewMat3.multiply(this.view.tileMat3),i=this.view.tileMat3,o=new d(1).subtract(t);return e.multiply(t).add(i.multiply(o))}_getColor(t,e){return h(v(e.isSDF,new d(1)),this._getSDFColor(t,e),this._getSpriteColor(t,e))}_getSpriteColor(t,e){return w(this.mosaicTexture,t).multiply(e.color)}_getSDFColor(t,e){const i=w(this.mosaicTexture,t),o=new d(.5).subtract(B(i)).multiply(e.distanceToPx).multiply(F),s=V(new d(.5).subtract(o),new d(0),new d(1)),l=e.color.multiply(s);let r=e.outlineSize;this.highlight&&(r=u(r,e.overrideOutlineColor.multiply(4)));const a=r.multiply(.5),p=f(o).subtract(a),n=V(new d(.5).subtract(p),new d(0),new d(1)),m=S(e.outlineColor,e.color,e.overrideOutlineColor).multiply(n);return new d(1).subtract(m.a).multiply(l).add(m)}_hittestSmallMarker(t,e,i){const{position:o,distance:s,smallSymbolDistance:l}=this.hittestRequest,r=s.subtract(l),{viewMat3:a,tileMat3:n}=this.view,u=a.multiply(n).multiply(new p(i.pos,1)).xy,d=i.size.multiply(.5);return b(u,o).subtract(d).add(r)}_hittestMarker(t,e,i){const{pos0:o,pos1:s,pos2:l}=this.computeHittestTriangle(t,e,i),r=this.hittestRequest.position,a=this.hittestRequest.distance,p=k(r,o,s,l);return h(x(p,a),p,this._hittestSamples(o,s,l,t,e,i))}computeHittestTriangle(t,e,i){const{pos:o,sizeCorrection:s,isMapAligned:l}=i,r=new p(t.offset.multiply(s),0),a=new p(e.offsetNextVertex1.multiply(s),0),n=new p(e.offsetNextVertex2.multiply(s),0),{viewMat3:u,tileMat3:d}=this.view,m=u.multiply(d).multiply(new p(o,1)),y=this._getViewScreenMatrix(l).multiply(i.vvRotationMat3).multiply(i.placementMat3);return{pos0:m.add(y.multiply(r)).xy,pos1:m.add(y.multiply(a)).xy,pos2:m.add(y.multiply(n)).xy}}_hittestSamples(t,e,i,o,s,l){const{outlineSize:r,isSDF:a,distanceToPx:p}=l,n=this.hittestRequest.position,u=this.hittestRequest.distance,m=A(n.add(new g(C(u),C(u))),t,e,i),h=A(n.add(new g(0,C(u))),t,e,i),c=A(n.add(new g(u,C(u))),t,e,i),x=A(n.add(new g(C(u),0)),t,e,i),v=A(n,t,e,i),w=A(n.add(new g(u,0)),t,e,i),V=A(n.add(new g(C(u),u)),t,e,i),f=A(n.add(new g(0,u)),t,e,i),S=A(n.add(new g(u,u)),t,e,i),b=o.textureUV.divide(this.mosaicInfo.size),z=s.textureUVNextVertex1.divide(this.mosaicInfo.size),_=s.textureUVNextVertex2.divide(this.mosaicInfo.size),R={color:new y(1),outlineColor:new y(1),overrideOutlineColor:new d(1),outlineSize:r,distanceToPx:p,isSDF:a};let j=new d(0);return j=j.add(P(m).multiply(this._getColor(lt(m,b,z,_),R).a)),j=j.add(P(h).multiply(this._getColor(lt(h,b,z,_),R).a)),j=j.add(P(c).multiply(this._getColor(lt(c,b,z,_),R).a)),j=j.add(P(x).multiply(this._getColor(lt(x,b,z,_),R).a)),j=j.add(P(v).multiply(this._getColor(lt(v,b,z,_),R).a)),j=j.add(P(w).multiply(this._getColor(lt(w,b,z,_),R).a)),j=j.add(P(V).multiply(this._getColor(lt(V,b,z,_),R).a)),j=j.add(P(f).multiply(this._getColor(lt(f,b,z,_),R).a)),j=j.add(P(S).multiply(this._getColor(lt(S,b,z,_),R).a)),M(j,new d(.05)).multiply(I(this.hittestRequest))}}t([o(E)],at.prototype,"visualVariableColor",void 0),t([o(J)],at.prototype,"visualVariableOpacity",void 0),t([o(K)],at.prototype,"visualVariableRotation",void 0),t([o(Q)],at.prototype,"visualVariableSizeMinMaxValue",void 0),t([o(W)],at.prototype,"visualVariableSizeScaleStops",void 0),t([o(X)],at.prototype,"visualVariableSizeStops",void 0),t([o(Y)],at.prototype,"visualVariableSizeUnitValue",void 0),t([s(H)],at.prototype,"mosaicInfo",void 0),t([l(z)],at.prototype,"mosaicTexture",void 0),t([e(0,r(it)),e(1,r(ot))],at.prototype,"vertex",null),t([e(0,r(st))],at.prototype,"fragment",null);export{st as MarkerFragmentInput,at as MarkerShader,it as MarkerVertexInput};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{GeometryCursor as e}from"../../../../../../../geometry/GeometryCursor.js";import{loadGeometryOperatorsForEffect as t,loadGeometryOperatorsForPlacement as a}from"../../../../../../../symbols/cim/CIMEffects.js";import{getEffectsInflateSize as r}from"../../../../../../../symbols/cim/utils.js";import{EffectHelper as s}from"../../../../../../../symbols/cim/effects/EffectHelper.js";import{MeshWriterVertexPack as i}from"./MeshWriterVertexPack.js";const n=96/72;class c{constructor(e,t,a,r){this._instanceId=e,this._evaluator=t,this._enabledOptionalAttributes=a,this._viewParams=r,this._evaluator.evaluator=e=>this.vertexSpec.createComputedParams(e)}get _vertexPack(){if(!this._cachedVertexPack){const e=i.fromVertexSpec(this.vertexSpec,this._enabledOptionalAttributes);this._evaluator.hasDynamicProperties||e.pack(this._evaluator.evaluatedMeshParams,this._viewParams),this._cachedVertexPack=e}return this._cachedVertexPack}get evaluatedMeshParams(){return this._evaluator.evaluatedMeshParams}get hasEffects(){return!!this.evaluatedMeshParams.effects}get effectInfos(){return this._evaluator.inputMeshParams.effects?.effectInfos}get placementInfo(){return this._evaluator.inputMeshParams.placement}get instanceId(){return this._instanceId}get attributeLayout(){return this._vertexPack.attributeLayout}get _preventEffectClipping(){return!1}setReferences(e){this._references=e}getBoundsInfo(){return null}getTileInfo(){return this._viewParams.tileInfo}async loadDependencies(){for(const{effect:e}of this.effectInfos||[])await t(e);this.placementInfo&&await a(this.placementInfo.placement)}enqueueRequest(e,t,a){this._evaluator.hasDynamicProperties&&this._evaluator.enqueueRequest(e,t,a)}write(e,t,a,r,s,i){this.ensurePacked(t,a,r);const
|
|
2
|
+
import{GeometryCursor as e}from"../../../../../../../geometry/GeometryCursor.js";import{loadGeometryOperatorsForEffect as t,loadGeometryOperatorsForPlacement as a}from"../../../../../../../symbols/cim/CIMEffects.js";import{getEffectsInflateSize as r}from"../../../../../../../symbols/cim/utils.js";import{EffectHelper as s}from"../../../../../../../symbols/cim/effects/EffectHelper.js";import{MeshWriterVertexPack as i}from"./MeshWriterVertexPack.js";const n=96/72;class c{constructor(e,t,a,r){this._instanceId=e,this._evaluator=t,this._enabledOptionalAttributes=a,this._viewParams=r,this._evaluator.evaluator=e=>this.vertexSpec.createComputedParams(e)}get _vertexPack(){if(!this._cachedVertexPack){const e=i.fromVertexSpec(this.vertexSpec,this._enabledOptionalAttributes);this._evaluator.hasDynamicProperties||e.pack(this._evaluator.evaluatedMeshParams,this._viewParams),this._cachedVertexPack=e}return this._cachedVertexPack}get evaluatedMeshParams(){return this._evaluator.evaluatedMeshParams}get hasEffects(){return!!this.evaluatedMeshParams.effects}get effectInfos(){return this._evaluator.inputMeshParams.effects?.effectInfos}get placementInfo(){return this._evaluator.inputMeshParams.placement}get instanceId(){return this._instanceId}get attributeLayout(){return this._vertexPack.attributeLayout}get _preventEffectClipping(){return!1}setReferences(e){this._references=e}getBoundsInfo(){return null}getTileInfo(){return this._viewParams.tileInfo}async loadDependencies(){for(const{effect:e}of this.effectInfos||[])await t(e);this.placementInfo&&await a(this.placementInfo.placement)}enqueueRequest(e,t,a){this._evaluator.hasDynamicProperties&&this._evaluator.enqueueRequest(e,t,a)}write(e,t,a,r,s,i,n,c){this.ensurePacked(t,a,r);const o=e.id||"",f=this.evaluatedMeshParams.effects,u=this._createEffectExecutionContext(a,r,o,n,c),h={target:a,options:r,level:s,viewExtent:i};if(!f||0===f.length)return void this._write(e,h);const l=this.getEffectCursor(a,f,u);if(!l)return;let m;for(;m=l.next();)m.invertY(),this._write(e,{...h,effectGeometry:m})}ensurePacked(e,t,a){if(!this._evaluator.hasDynamicProperties)return;const r=this._evaluator.evaluateMeshParams(e,t,a);this._vertexPack.pack(r,this._viewParams)}hasArcadeDependency(e){return this._evaluator.hasArcadeDependency(e)}_writeVertex(e,t,a,r,s){const i=this.evaluatedMeshParams;this._vertexPack.writeVertex(e,t,a,r,i,s)}_createEffectExecutionContext(e,t,a,s,i){return{geomUnitsPerPoint:n,maxInflateSize:r(this.evaluatedMeshParams.effects),scale:t.$view.scale,spatialReference:e.metadata.outSpatialReference??e.metadata.spatialReference,preventClipping:this._preventEffectClipping,tileKey:a,scaleFactor:s,matcher:i,target:e}}getEffectCursor(t,a,r){null==r.scaleFactor&&(r={...r,scaleFactor:1});const i=t.readGeometryForDisplay()?.clone();if(!i)return;const n=e.fromOptimizedCIM(i,t.geometryType);return n.invertY(),s.executeEffects(a,n,r)}}export{c as MeshWriter};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as t,__param as i}from"tslib";import{location as e,uniform as o,option as l,input as r,UniformGroup as a}from"../../GraphShaderModule.js";import{step as s,min as n,ifElse as p,greaterThan as u,Float as m,length as d,clamp as y,max as c,Vec3 as f,Vec4 as h,Vec2 as v}from"../../graph/glsl.js";import{AFeatureShader as w,BaseHittestVertexInput as b,FeatureVertexInput as V,FeatureFragmentInput as S}from"./AFeatureShader.js";import{noHit as g,trueHit as x,thinLineWidthFactor as j,thinLineHalfWidth as z,epsilon as W}from"./constants.js";import{isRectHittest as M,distPointSegment as R,hittestScreenRect as C}from"./hittestUtils.js";import{VisualVariableColor as H}from"./VisualVariableColor.js";import{VisualVariableOpacity as O}from"./VisualVariableOpacity.js";import{VisualVariableSizeMinMaxValue as U}from"./VisualVariableSizeMinMaxValue.js";import{VisualVariableSizeScaleStops as q}from"./VisualVariableSizeScaleStops.js";import{VisualVariableSizeStops as
|
|
2
|
+
import{__decorate as t,__param as i}from"tslib";import{location as e,uniform as o,option as l,input as r,UniformGroup as a}from"../../GraphShaderModule.js";import{step as s,min as n,ifElse as p,greaterThan as u,Float as m,length as d,clamp as y,max as c,Vec3 as f,Vec4 as h,Vec2 as v}from"../../graph/glsl.js";import{AFeatureShader as w,BaseHittestVertexInput as b,FeatureVertexInput as V,FeatureFragmentInput as S}from"./AFeatureShader.js";import{noHit as g,trueHit as x,thinLineWidthFactor as j,thinLineHalfWidth as z,epsilon as W}from"./constants.js";import{isRectHittest as M,distPointSegment as R,hittestScreenRect as C}from"./hittestUtils.js";import{VisualVariableColor as H}from"./VisualVariableColor.js";import{VisualVariableOpacity as O}from"./VisualVariableOpacity.js";import{VisualVariableSizeMinMaxValue as U}from"./VisualVariableSizeMinMaxValue.js";import{VisualVariableSizeScaleStops as q}from"./VisualVariableSizeScaleStops.js";import{VisualVariableSizeStops as F}from"./VisualVariableSizeStops.js";import{VisualVariableSizeUnitValue as P}from"./VisualVariableSizeUnitValue.js";import{getVisualVariableColor as A,getVisualVariableOpacity as T,hasVisualVariableSize as D,getVisualVariableSize as G}from"./vvUtils.js";class L extends V{}t([e(3,h)],L.prototype,"color",void 0),t([e(4,v)],L.prototype,"offset",void 0),t([e(5,v)],L.prototype,"normal",void 0),t([e(6,m)],L.prototype,"halfWidth",void 0),t([e(7,m)],L.prototype,"referenceHalfWidth",void 0),t([e(8,v)],L.prototype,"zoomRange",void 0);class k extends S{}class B extends a{}function E(t){return c(new m(j).multiply(s(t,new m(z))),new m(1))}function I(t,i){const{halfWidth:e,normal:o}=t,l=E(e),r=d(o).multiply(e);return y(l.multiply(e.subtract(r)).divide(i.add(l).subtract(new m(1))),new m(0),new m(1))}function J(t,i){const{id:e,halfWidth:o,referenceHalfWidth:l}=i;if(D(t)){const i=new m(2).multiply(l),r=G(t,e,i);return new m(.5).multiply(o.divide(c(l,new m(W)))).multiply(r)}return o}function K(t,i){const{id:e,offset:o,pos:l,normal:r,zoomRange:a}=i,{displayViewScreenMat3:n,displayViewMat3:p}=t.view,u=A(t,e,i.color),d=T(t,e),y=J(t,i),v=new m(.5).multiply(t.antialiasingControls.antialiasing),w=c(y.add(v),new m(.45)).add(new m(.1).multiply(v)),b=E(w).multiply(w).multiply(o).multiply(t.view.scaleFactor),V=p.multiply(new f(b,new m(0))),S=n.multiply(new f(l,new m(1))).add(V),g=new m(2).multiply(s(y,new m(0))).add(t.clip(e,a)),x=new h(S.xy,g,1);return{color:u,opacity:d,halfWidth:w,normal:r,scaledOffset:b,scaledHalfWidth:y,glPosition:new h(x.xy,g,1)}}function N(t,i){const{opacity:e,color:o}=t,l=I(t,i);return e.multiply(o).multiply(l)}t([o(m)],B.prototype,"antialiasing",void 0),t([o(m)],B.prototype,"blur",void 0);class Q extends w{constructor(){super(...arguments),this.type="LineShader",this.computeAttributes={pos:["nextPos1","nextPos2"]}}vertex(t,i){const e=K(this,t);return{...e,...this.maybeRunHittest(t,i,e.halfWidth)}}fragment(t){const i=N(t,this.antialiasingControls.blur);return this.getFragmentOutput(i,t)}hittest(t,i,e){const{pos0:o,pos1:l,pos2:r}=this.computeHittestTriangle(t,i,null),a=M(this.hittestRequest),{distance:d,smallSymbolDistance:y,smallSymbolSizeThreshold:c,tlbr:f}=this.hittestRequest,h=s(e,c.multiply(.5)).multiply(d.subtract(y)),v=this.hittestRequest.position,w=n(R(v,o,l),R(v,o,r)).subtract(e).add(h);return p(a,C(o,l,r,f),p(u(w,d),new m(g),new m(x)))}}t([o(B)],Q.prototype,"antialiasingControls",void 0),t([l(H)],Q.prototype,"visualVariableColor",void 0),t([l(O)],Q.prototype,"visualVariableOpacity",void 0),t([l(U)],Q.prototype,"visualVariableSizeMinMaxValue",void 0),t([l(q)],Q.prototype,"visualVariableSizeScaleStops",void 0),t([l(F)],Q.prototype,"visualVariableSizeStops",void 0),t([l(P)],Q.prototype,"visualVariableSizeUnitValue",void 0),t([i(0,r(L)),i(1,r(b))],Q.prototype,"vertex",null),t([i(0,r(k))],Q.prototype,"fragment",null);export{B as AntialiasingControls,k as LineFragmentInput,Q as LineShader,L as LineVertexInput,I as getLineAntialiasing,N as getLineFragmentColor,E as getLineThinFactor,K as getLineVertexData};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as o}from"tslib";import{uniform as t,UniformGroup as p}from"../../GraphShaderModule.js";import{Mat3 as e,Float as r,Vec2 as i}from"../../graph/glsl.js";class d extends p{}o([t(e)],d.prototype,"displayViewScreenMat3",void 0),o([t(e)],d.prototype,"displayViewMat3",void 0),o([t(e)],d.prototype,"displayMat3",void 0),o([t(e)],d.prototype,"viewMat3",void 0),o([t(e)],d.prototype,"tileMat3",void 0),o([t(r)],d.prototype,"displayZoomFactor",void 0),o([t(r)],d.prototype,"requiredZoomFactor",void 0),o([t(i)],d.prototype,"tileOffset",void 0),o([t(r)],d.prototype,"currentScale",void 0),o([t(r)],d.prototype,"currentZoom",void 0),o([t(r)],d.prototype,"metersPerSRUnit",void 0),o([t(r)],d.prototype,"rotation",void 0),o([t(r)],d.prototype,"pixelRatio",void 0);export{d as ViewInfo};
|
|
2
|
+
import{__decorate as o}from"tslib";import{uniform as t,UniformGroup as p}from"../../GraphShaderModule.js";import{Mat3 as e,Float as r,Vec2 as i}from"../../graph/glsl.js";class d extends p{}o([t(e)],d.prototype,"displayViewScreenMat3",void 0),o([t(e)],d.prototype,"displayViewMat3",void 0),o([t(e)],d.prototype,"displayMat3",void 0),o([t(e)],d.prototype,"viewMat3",void 0),o([t(e)],d.prototype,"tileMat3",void 0),o([t(r)],d.prototype,"displayZoomFactor",void 0),o([t(r)],d.prototype,"requiredZoomFactor",void 0),o([t(i)],d.prototype,"tileOffset",void 0),o([t(r)],d.prototype,"currentScale",void 0),o([t(r)],d.prototype,"currentZoom",void 0),o([t(r)],d.prototype,"metersPerSRUnit",void 0),o([t(r)],d.prototype,"rotation",void 0),o([t(r)],d.prototype,"pixelRatio",void 0),o([t(r)],d.prototype,"scaleFactor",void 0);export{d as ViewInfo};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{clamp as t}from"../../../../../../../core/mathUtils.js";import{pt2px as e}from"../../../../../../../core/screenUtils.js";import{GeometryCursor as o}from"../../../../../../../geometry/GeometryCursor.js";import{asCIMGeometryCursor as i}from"../../../../../../../symbols/cim/utils.js";import{CIMMarkerPlacementHelper as r}from"../../../../../../../symbols/cim/placements/CIMMarkerPlacementHelper.js";import{getXDirection as s,getYDirection as n}from"../../../alignmentUtils.js";import{maxTextLineWidth as a,minTextLineWidth as l,magicLabelLineHeight as
|
|
2
|
+
import{clamp as t}from"../../../../../../../core/mathUtils.js";import{pt2px as e}from"../../../../../../../core/screenUtils.js";import{GeometryCursor as o}from"../../../../../../../geometry/GeometryCursor.js";import{asCIMGeometryCursor as i}from"../../../../../../../symbols/cim/utils.js";import{CIMMarkerPlacementHelper as r}from"../../../../../../../symbols/cim/placements/CIMMarkerPlacementHelper.js";import{getXDirection as s,getYDirection as n}from"../../../alignmentUtils.js";import{maxTextLineWidth as a,minTextLineWidth as l,magicLabelLineHeight as d}from"../../../definitions.js";import{shapeGlyphs as c,shapeGlyphsForMultipoint as h}from"../../../mesh/templates/shapingUtils.js";import{getMinMaxZoom as f,processColorInput as u,packBitset as m}from"../fill/meshWriterUtils.js";import{MeshWriter as p}from"../mesh/MeshWriter.js";import{bitsetTextIsBackground as g,bitsetTextIsMapAligned as x}from"../shaders/constants.js";import{TextMeshTransformProps as y}from"./TextParams.js";import{DataType as S}from"../../../../../../webgl/enums.js";const z=28,b=[4,4],_=[16,4],P={topLeft:_,topRight:_,bottomLeft:_,bottomRight:_},M=[4,2],L=[4,6],B={topLeft:M,topRight:M,bottomLeft:L,bottomRight:L},R={topLeft:M,topRight:L,bottomLeft:M,bottomRight:L},T={topLeft:L,topRight:L,bottomLeft:b,bottomRight:b},k={topLeft:b,topRight:b,bottomLeft:L,bottomRight:L},A={topLeft:L,topRight:b,bottomLeft:L,bottomRight:b},v={topLeft:b,topRight:L,bottomLeft:b,bottomRight:L};function w(t){return{backgroundColor:t.boxBackgroundColor??t.backgroundColor??null,borderLineColor:t.boxBorderLineColor??t.borderLineColor??null,borderLineSize:t.boxBorderLineSize>0?t.boxBorderLineSize:t.borderLineWidth??0}}const I={createComputedParams:t=>t,optionalAttributes:{zoomRange:{type:S.HALF_FLOAT,count:2,packTessellation:({minZoom:t,maxZoom:e})=>[t||0,e||z]},clipAngle:{type:S.UNSIGNED_BYTE,count:1,packTessellation:({clipAngle:t})=>G(t||0)},referenceSymbol:{type:S.BYTE,count:4,packTessellation:(t,o)=>{const i=t.isLineLabel||!t.referenceBounds,r=s(i?"center":o.horizontalAlignment),a=n(i?"middle":o.verticalAlignment),{offsetX:l,offsetY:d,size:c}=i?{offsetX:0,offsetY:0,size:0}:t.referenceBounds;return[e(l),-e(d),Math.round(e(c)),r+1<<2|a+1]}},visibility:{type:S.FLOAT,count:1,otherSource:!0}},attributes:{pos:{type:S.SHORT,count:2,pack:"position",packPrecisionFactor:10},id:{type:S.UNSIGNED_BYTE,count:3,pack:"id"},bitset:{type:S.UNSIGNED_BYTE,count:1,packTessellation:({isBackground:t,mapAligned:e})=>m([[g,t],[x,!!e]])},offset:{type:S.SHORT,count:2,packPrecisionFactor:8,packAlternating:{count:4,packTessellation:({offsets:t})=>{const{bottomLeft:e,bottomRight:o,topLeft:i,topRight:r}=t;return[i,r,e,o]}}},textureUV:{type:S.UNSIGNED_SHORT,count:2,packAlternating:{count:4,packTessellation:({texcoords:t})=>{const{bottomLeft:e,bottomRight:o,topLeft:i,topRight:r}=t;return[i,r,e,o]}}},color:{type:S.UNSIGNED_BYTE,count:4,normalized:!0,packTessellation:({color:t})=>t},fontAndReferenceSize:{type:S.UNSIGNED_SHORT,count:4,packPrecisionFactor:4,packTessellation:({fontSize:t,sdfSize:o,sdfRadius:i},{referenceSize:r})=>[Math.round(e(t)),Math.round(e(r??t)),o,i]},outlineColor:{type:S.UNSIGNED_BYTE,count:4,normalized:!0,pack:({outlineColor:t})=>u(t)},haloColor:{type:S.UNSIGNED_BYTE,count:4,normalized:!0,pack:({haloColor:t})=>u(t)},outlineAndHaloSize:{type:S.UNSIGNED_SHORT,count:2,packPrecisionFactor:4,packTessellation:({outlineSize:t,haloSize:o})=>[Math.round(e(t)),Math.round(e(o))]}}};class C extends p{constructor(){super(...arguments),this.vertexSpec=I,this._textMeshParamsPropsInitialized=!1}ensurePacked(t,e,o){super.ensurePacked(t,e,o),this._textMeshParamsPropsInitialized&&!this._evaluator.hasDynamicProperties||(this._textMeshTransformProps=new y(this.evaluatedMeshParams),this._textMeshParamsPropsInitialized=!0)}_write(t,{target:e,effectGeometry:o}){const r=this._getShaping();if(!r)return;const s=1===this.evaluatedMeshParams.alignment,n=e.getDisplayId(),{placement:a}=this.evaluatedMeshParams;if(null!=a){if("PrivatePlacementMultipoint"!==a.type)this._writePlacedTextMarkers(t,e,r,i(o));else{const o=this._getMultipointShaping();o&&this._writeMultipointText(t,e,o)}return}if(o?.nextPath())return o.nextPoint(),this._writeGlyphs(t,n,o.x,o.y,r,0,void 0,{mapAligned:s});if("esriGeometryPolygon"===e.geometryType){const o=e.readCentroidForDisplay();if(!o)return;const[i,a]=o.coords;return this._writeGlyphs(t,n,i,a,r,0,void 0,{mapAligned:s})}if("esriGeometryMultipoint"===e.geometryType){const o=e.readGeometryForDisplay();return void o?.forEachVertex((e,o)=>this._writeGlyphs(t,n,e,o,r,0,void 0,{mapAligned:s}))}const l=e.readXForDisplay(),d=e.readYForDisplay();return this._writeGlyphs(t,n,l,d,r,0,void 0,{mapAligned:s})}_writePlacedTextMarkers(t,i,s,n){const a=n??o.fromFeatureSetReaderCIM(i);if(!a)return;const l=-1,d=r.getPlacement(a,l,this.evaluatedMeshParams.placement,e(1),t.id);if(!d)return;const c=i.getDisplayId();let h=d.next();for(;null!=h;){const e=-h.getAngle(),o=h.tx,i=-h.ty;this._writeGlyphs(t,c,o,i,s,e,void 0,{mapAligned:1===this.evaluatedMeshParams.alignment}),h=d.next()}}_writeMultipointText(t,i,s){const n=o.fromFeatureSetReaderCIM(i);if(!n)return;const a=-1,l=r.getPlacement(n,a,this.evaluatedMeshParams.placement,e(1),t.id);if(!l)return;const d=i.getDisplayId();let c=l.next(),h=0;for(;null!=c;){const e=c.tx,o=-c.ty,i=-c.getAngle();this._writeGlyph(t,d,e,o,s,h,i,void 0,{mapAligned:1===this.evaluatedMeshParams.alignment}),c=l.next(),h++}}_getShaping(o){const i=this._textMeshTransformProps,r=this.evaluatedMeshParams;if(!r.glyphs?.glyphs.length)return null;const s=e(i.fontSize),n=e(i.offsetX),h=e(i.offsetY),f=r.glyphs.sdfSize,u=t(e(r.lineWidth),l,a),m=f/24*d*t(r.lineHeightRatio,.25,4),{backgroundColor:p,borderLineSize:g}=w(r);return c(r.glyphs,{scale:s/f,angle:i.postAngle,xOffset:n,yOffset:h,horizontalAlignment:r.horizontalAlignment,verticalAlignment:o||r.verticalAlignment,maxLineWidth:u,lineHeight:m,decoration:r.decoration,borderLineSizePx:e(g),hasBackground:!!p,useCIMAngleBehavior:r.useCIMAngleBehavior})}_getMultipointShaping(){const o=this._textMeshTransformProps,i=this.evaluatedMeshParams;if(!i.glyphs?.glyphs.length)return null;const r=e(o.fontSize),s=e(o.offsetX),n=e(o.offsetY),c=i.glyphs.sdfSize,f=t(e(i.lineWidth),l,a),u=c/24*d*t(i.lineHeightRatio,.25,4),{backgroundColor:m,borderLineSize:p}=w(i);return h(i.glyphs,{scale:r/c,angle:o.postAngle,xOffset:s,yOffset:n,horizontalAlignment:i.horizontalAlignment,verticalAlignment:i.verticalAlignment,maxLineWidth:f,lineHeight:u,decoration:i.decoration,borderLineSizePx:e(p),hasBackground:!!m,useCIMAngleBehavior:i.useCIMAngleBehavior})}_writeGlyphs(t,o,i,r,s,n,a,l,d=!0){const c=this.evaluatedMeshParams,h=this._textMeshTransformProps,m=e(h.fontSize),p=h.haloSize,g=h.outlineSize,x=e(h.offsetX),y=e(h.offsetY),{sdfSize:S,sdfRadius:z}=c.glyphs,[b,_]=f(c.scaleInfo,this.getTileInfo());0!==n&&s.setRotation(n);const P=s.bounds,M=i+P.x+x,L=r+P.y-y,B=2*(c.minPixelBuffer?c.minPixelBuffer/m:1),R=Math.max(P.width,P.height)*B;s.textBox&&(t.recordStart(this.instanceId,this.attributeLayout,s.glyphs[0].textureBinding),d&&t.recordBounds(M,L,R,R),this._writeTextBox(t,o,i,r,s.textBox,a,l),t.recordEnd());for(const e of s.glyphs){t.recordStart(this.instanceId,this.attributeLayout,e.textureBinding),d&&t.recordBounds(M,L,R,R);const{texcoords:s,offsets:n}=e;this._writeQuad(t,o,i,r,{texcoords:s,offsets:n,fontSize:m,haloSize:p,outlineSize:g,sdfSize:S,sdfRadius:z,color:u(c.color),isBackground:!1,referenceBounds:a,minZoom:b,maxZoom:_,...l}),t.recordEnd()}0!==n&&s.setRotation(-n)}_writeGlyph(t,o,i,r,s,n,a,l,d,c=!0){const h=this.evaluatedMeshParams,f=this._textMeshTransformProps,m=e(f.fontSize),p=f.haloSize,g=f.outlineSize,x=e(f.offsetX),y=e(f.offsetY),{sdfSize:S,sdfRadius:z}=h.glyphs;0!==a&&s.setRotation(a);const b=s.bounds,_=i+b.x+x,P=r+b.y-y,M=2*(h.minPixelBuffer?h.minPixelBuffer/m:1),L=Math.max(b.width,b.height)*M,B=s.glyphs[n];t.recordStart(this.instanceId,this.attributeLayout,B.textureBinding),c&&t.recordBounds(_,P,L,L);const{texcoords:R,offsets:T}=B;this._writeQuad(t,o,i,r,{texcoords:R,offsets:T,fontSize:m,haloSize:p,outlineSize:g,sdfSize:S,sdfRadius:z,color:u(h.color),isBackground:!1,referenceBounds:l,minZoom:0,maxZoom:30,...d}),t.recordEnd(),0!==a&&s.setRotation(-a)}_writeTextBox(t,e,o,i,r,s,n){const a=this.evaluatedMeshParams,{fontSize:l,haloSize:d,outlineSize:c}=this._textMeshTransformProps,{backgroundColor:h,borderLineColor:f,borderLineSize:m}=w(a),{sdfSize:p,sdfRadius:g}=a.glyphs,x=!!f&&m>0,y={isBackground:!0,fontSize:l,haloSize:d,outlineSize:c,referenceBounds:s,sdfSize:p,sdfRadius:g,...n};h&&(this._writeQuad(t,e,o,i,{texcoords:P,offsets:r.main,color:u(h),...y}),x||(this._writeQuad(t,e,o,i,{texcoords:T,offsets:r.top,color:u(h),...y}),this._writeQuad(t,e,o,i,{texcoords:k,offsets:r.bot,color:u(h),...y}),this._writeQuad(t,e,o,i,{texcoords:A,offsets:r.left,color:u(h),...y}),this._writeQuad(t,e,o,i,{texcoords:v,offsets:r.right,color:u(h),...y}))),x&&(this._writeQuad(t,e,o,i,{texcoords:B,offsets:r.top,color:u(f),...y}),this._writeQuad(t,e,o,i,{texcoords:B,offsets:r.bot,color:u(f),...y}),this._writeQuad(t,e,o,i,{texcoords:R,offsets:r.left,color:u(f),...y}),this._writeQuad(t,e,o,i,{texcoords:R,offsets:r.right,color:u(f),...y}))}_writeQuad(t,e,o,i,r){const s=t.vertexCount();this._writeVertex(t,e,o,i,r),t.indexWrite(s+0),t.indexWrite(s+1),t.indexWrite(s+2),t.indexWrite(s+1),t.indexWrite(s+3),t.indexWrite(s+2)}}const G=t=>Math.round(t*(256/360));export{C as TextMeshWriter,I as TextVertexSpec,w as getTextBoxStyle,z as maxLabelZoom};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as t,__param as e}from"tslib";import{labelPlacementOffsetPadding as i}from"../../../definitions.js";import{location as o,option as s,uniform as l,texture as r,define as a,input as n,ComputeVertexInput as p}from"../../GraphShaderModule.js";import{mod as d,Float as u,step as y,and as m,lessThan as c,greaterThanEqual as h,Vec3 as f,Mat3 as v,Vec2 as w,ifElse as b,equal as x,greaterThan as V,Bool as S,Vec4 as R,texture2D as g,smoothstep as z,Int as j,bitRShift as A,bitAnd as C,Sampler2D as O}from"../../graph/glsl.js";import{AFeatureShader as M,FeatureVertexInput as T,FeatureFragmentInput as L}from"../shaders/AFeatureShader.js";import{noHit as P,trueHit as H,bitsetTextIsBackground as N,bitsetTextIsMapAligned as U}from"../shaders/constants.js";import{isRectHittest as q,distPointTriangle as _,failHittest as k,hittestScreenRect as D}from"../shaders/hittestUtils.js";import{MosaicInfo as I}from"../shaders/MosaicInfo.js";import{getBit as B}from"../shaders/utils.js";import{VisualVariableColor as
|
|
2
|
+
import{__decorate as t,__param as e}from"tslib";import{labelPlacementOffsetPadding as i}from"../../../definitions.js";import{location as o,option as s,uniform as l,texture as r,define as a,input as n,ComputeVertexInput as p}from"../../GraphShaderModule.js";import{mod as d,Float as u,step as y,and as m,lessThan as c,greaterThanEqual as h,Vec3 as f,Mat3 as v,Vec2 as w,ifElse as b,equal as x,greaterThan as V,Bool as S,Vec4 as R,texture2D as g,smoothstep as z,Int as j,bitRShift as A,bitAnd as C,Sampler2D as O}from"../../graph/glsl.js";import{AFeatureShader as M,FeatureVertexInput as T,FeatureFragmentInput as L}from"../shaders/AFeatureShader.js";import{noHit as P,trueHit as H,bitsetTextIsBackground as N,bitsetTextIsMapAligned as U}from"../shaders/constants.js";import{isRectHittest as q,distPointTriangle as _,failHittest as k,hittestScreenRect as D}from"../shaders/hittestUtils.js";import{MosaicInfo as I}from"../shaders/MosaicInfo.js";import{getBit as B}from"../shaders/utils.js";import{VisualVariableColor as F}from"../shaders/VisualVariableColor.js";import{VisualVariableOpacity as E}from"../shaders/VisualVariableOpacity.js";import{VisualVariableRotation as W}from"../shaders/VisualVariableRotation.js";import{VisualVariableSizeMinMaxValue as G}from"../shaders/VisualVariableSizeMinMaxValue.js";import{VisualVariableSizeScaleStops as Z}from"../shaders/VisualVariableSizeScaleStops.js";import{VisualVariableSizeStops as J}from"../shaders/VisualVariableSizeStops.js";import{VisualVariableSizeUnitValue as K}from"../shaders/VisualVariableSizeUnitValue.js";import{getVisualVariableSize as Q,getVisualVariableRotation as X}from"../shaders/vvUtils.js";const Y=360/254;class $ extends T{}t([o(3,R)],$.prototype,"color",void 0),t([o(4,w)],$.prototype,"offset",void 0),t([o(5,w)],$.prototype,"textureUV",void 0),t([o(6,R)],$.prototype,"fontAndReferenceSize",void 0),t([o(7,R)],$.prototype,"outlineColor",void 0),t([o(8,R)],$.prototype,"haloColor",void 0),t([o(9,w)],$.prototype,"outlineAndHaloSize",void 0),t([o(10,w)],$.prototype,"zoomRange",void 0),t([o(11,u)],$.prototype,"clipAngle",void 0),t([o(12,R)],$.prototype,"referenceSymbol",void 0),t([o(15,u)],$.prototype,"visibility",void 0);class tt extends p{}t([o(13,w)],tt.prototype,"offsetNextVertex1",void 0),t([o(14,w)],tt.prototype,"offsetNextVertex2",void 0);class et extends L{}class it extends M{constructor(){super(...arguments),this.type="TextShader",this.computeAttributes={offset:["offsetNextVertex1","offsetNextVertex2"]},this.textRenderPassType=0,this.isBackgroundPass=!1,this.isLabel=!1}clipLabel(t,e){const{clipAngle:i,zoomRange:o,visibility:s}=t,l=i.multiply(Y),r=d(l.subtract(this.view.rotation),new u(360));let a=new u(0);const n=this.view.currentZoom,p=o.x,f=o.y,v=new u(1).subtract(y(p,n)).multiply(2),w=new u(m(h(r,new u(90)),c(r,new u(270)))).multiply(2),b=new u(2).multiply(new u(1).subtract(y(n,f)));return a=a.add(e.multiply(v)),a=a.add(e.multiply(w)),a=a.add(b),s&&(a=a.add(s)),a}vertex(t,e){const o=B(t.bitset,N),s=new u(1).subtract(o);let l=t.fontAndReferenceSize[0];const r=t.fontAndReferenceSize[1],a=t.fontAndReferenceSize[2],n=t.fontAndReferenceSize[3];let p=l.divide(a);const d=1===this.textRenderPassType?t.outlineColor:2===this.textRenderPassType?t.haloColor:this._getVertexColor(t),y=this.view.displayViewScreenMat3.multiply(new f(t.pos,1));let m=t.offset,c=new u(1),h=v.identity(),g=new w(0);if(this.isLabel){if(!t.referenceSymbol)throw new Error("InternalError: Optional attribute 'referenceSymbol' expected for labels");const e=t.referenceSymbol,o=e.xy,s=e.z,l=this._unpackDirection(e.w),r=Q(this,t.id,s).divide(2),a=l.multiply(r.add(i));g=o.add(a),m=m.add(g)}else{c=Q(this,t.id,r).divide(r),l=l.multiply(c),p=p.multiply(c),m=m.multiply(c),h=X(this,t.id),m=h.multiply(new f(m,0)).xy}const z=B(t.bitset,U),j=this._getViewRotationMatrix(z).multiply(new f(m,0)).multiply(this.view.scaleFactor);let A=this.isLabel?this.clipLabel(t,z):this.clip(t.id,t.zoomRange);A=this.isBackgroundPass?A.add(s.multiply(2)):A.add(o.multiply(2));let C=new u(0);if(1===this.textRenderPassType){A=A.add(b(x(t.outlineAndHaloSize.x,new u(0)),new u(2),new u(0)));C=new u(t.outlineAndHaloSize.x).divide(p).divide(n)}if(2===this.textRenderPassType){const e=t.outlineAndHaloSize.x,i=new u(t.outlineAndHaloSize.y);A=A.add(b(x(i,new u(0)),new u(2),new u(0)));C=i.add(e).divide(p).divide(n)}const O=this.isLabel?V(A,new u(1)):new S(!1);return{glPosition:new R(y.xy.add(j.xy),A,1),color:d,size:p,textureUV:t.textureUV.divide(this.mosaicInfo.size),antialiasingWidth:new u(.105).multiply(a).divide(l).divide(this.view.pixelRatio),outlineDistanceOffset:C,...this.maybeRunHittest(t,e,{vvSizeAdjustment:c,vvRotation:h,labelOffset:g,labelClipped:O})}}_getViewRotationMatrix(t){const e=this.view.displayViewMat3,i=this.view.displayMat3,o=new u(1).subtract(t);return e.multiply(t).add(i.multiply(o))}fragment(t){const e=new u(2/8),i=new u(1).subtract(e),o=g(this.mosaicTexture,t.textureUV).a;let s=i.subtract(t.outlineDistanceOffset);this.highlight&&(s=s.divide(2));const l=t.antialiasingWidth,r=z(s.subtract(l),s.add(l),o);return this.getFragmentOutput(t.color.multiply(r),t)}computeHittestTriangle(t,e,{vvSizeAdjustment:i,vvRotation:o,labelOffset:s}){let l,r,a;this.isLabel?(l=new f(t.offset.add(s),0),r=new f(e.offsetNextVertex1.add(s),0),a=new f(e.offsetNextVertex2.add(s),0)):(l=o.multiply(new f(t.offset.multiply(i),0)),r=o.multiply(new f(e.offsetNextVertex1.multiply(i),0)),a=o.multiply(new f(e.offsetNextVertex2.multiply(i),0)));const{viewMat3:n,tileMat3:p}=this.view,d=n.multiply(p).multiply(new f(t.pos,1));return{pos0:d.add(p.multiply(l)).xy,pos1:d.add(p.multiply(r)).xy,pos2:d.add(p.multiply(a)).xy}}hittest(t,e,i){const{vvSizeAdjustment:o,vvRotation:s,labelOffset:l,labelClipped:r}=i,a=q(this.hittestRequest),{pos0:n,pos1:p,pos2:d}=this.computeHittestTriangle(t,e,{vvSizeAdjustment:o,vvRotation:s,labelOffset:l});return b(a,()=>{const{tlbr:t}=this.hittestRequest;return this.isLabel?b(r,k(this.hittestRequest),D(n,p,d,t)):D(n,p,d,t)},()=>{const t=_(this.hittestRequest.position,n,p,d),e=this.isLabel?b(r,k(this.hittestRequest),t):t;return b(V(e,this.hittestRequest.distance),new u(P),new u(H))})}_unpackDirection(t){const e=new j(t),i=A(e,new j(2)),o=C(e,new j(3));return new w(new u(i).subtract(1),new u(o).subtract(1))}_getVertexColor(t){let e=t.color;if(this.visualVariableColor){const i=this.getColorValue(t.id);e=this.visualVariableColor.getColor(i,t.color,new S(!1))}if(this.visualVariableOpacity){const i=this.getOpacityValue(t.id),o=this.visualVariableOpacity.getOpacity(i);e=e.multiply(o)}return e}}t([s(F)],it.prototype,"visualVariableColor",void 0),t([s(E)],it.prototype,"visualVariableOpacity",void 0),t([s(W)],it.prototype,"visualVariableRotation",void 0),t([s(G)],it.prototype,"visualVariableSizeMinMaxValue",void 0),t([s(Z)],it.prototype,"visualVariableSizeScaleStops",void 0),t([s(J)],it.prototype,"visualVariableSizeStops",void 0),t([s(K)],it.prototype,"visualVariableSizeUnitValue",void 0),t([l(I)],it.prototype,"mosaicInfo",void 0),t([r(O)],it.prototype,"mosaicTexture",void 0),t([a],it.prototype,"textRenderPassType",void 0),t([a],it.prototype,"isBackgroundPass",void 0),t([a],it.prototype,"isLabel",void 0),t([e(0,n($)),e(1,n(tt))],it.prototype,"vertex",null),t([e(0,n(et))],it.prototype,"fragment",null);export{et as TextFragmentInput,it as TextShader,$ as TextVertexInput};
|