@arcgis/core 5.1.0-next.50 → 5.1.0-next.52
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/applications/Components/imageryUtils.d.ts +6 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/001492854799c35b53bb.js +1 -0
- package/assets/esri/core/workers/chunks/004f991251f09b36fb09.js +1 -0
- package/assets/esri/core/workers/chunks/027d733a99f50cadcf22.js +1 -0
- package/assets/esri/core/workers/chunks/03d85a706669aaf24d49.js +1 -0
- package/assets/esri/core/workers/chunks/0450133e81bce4b48b84.js +1 -0
- package/assets/esri/core/workers/chunks/07e791530677f7e70f32.js +30 -0
- package/assets/esri/core/workers/chunks/085778ecd39f46324a6b.js +1 -0
- package/assets/esri/core/workers/chunks/08dce0019b52042b01fa.js +1 -0
- package/assets/esri/core/workers/chunks/0d8294982853308225da.js +1 -0
- package/assets/esri/core/workers/chunks/156aecac067213642aae.js +1 -0
- package/assets/esri/core/workers/chunks/{942e4d69b140bc2f97c9.js → 15a45e26964c2eb381a6.js} +1 -1
- package/assets/esri/core/workers/chunks/184e9147f7a2f0ae5915.js +1 -0
- package/assets/esri/core/workers/chunks/19f59a2a97c33ff92650.js +1 -0
- package/assets/esri/core/workers/chunks/{54420b66fd53d6e19ba5.js → 278eecd729bed2832702.js} +1 -1
- package/assets/esri/core/workers/chunks/{74814678942a47fd48fb.js → 28ac3a75130fe2b57ac7.js} +1 -1
- package/assets/esri/core/workers/chunks/{a3174b23aabcef2fa98c.js → 29c91b5c9ddcea85f39a.js} +1 -1
- package/assets/esri/core/workers/chunks/2b7d020367cb4ebb3c3d.js +1 -0
- package/assets/esri/core/workers/chunks/30654845ca1334f1c206.js +1 -0
- package/assets/esri/core/workers/chunks/3104b10770903c265626.js +1 -0
- package/assets/esri/core/workers/chunks/33f00633131581e06328.js +1 -0
- package/assets/esri/core/workers/chunks/{32a51ce8e1a362115c89.js → 354b309c8225336bc1e5.js} +1 -1
- package/assets/esri/core/workers/chunks/{569e4479707bc6881d97.js → 35dbe1eeb6932b03aea2.js} +1 -1
- package/assets/esri/core/workers/chunks/386435341e949f5573b4.js +2 -0
- package/assets/esri/core/workers/chunks/3874362bf7d43adc41bb.js +1 -0
- package/assets/esri/core/workers/chunks/38dc1c4b8721efd4a165.js +1 -0
- package/assets/esri/core/workers/chunks/39f3bea123f20c816ab2.js +1 -0
- package/assets/esri/core/workers/chunks/3fa5f102b6f77c523a76.js +1 -0
- package/assets/esri/core/workers/chunks/{a422cfe1e2afe0722acd.js → 3fcc8c455af56ae89030.js} +1 -1
- package/assets/esri/core/workers/chunks/42f3fdad1728433b3510.js +1 -0
- package/assets/esri/core/workers/chunks/436941ec88439667022e.js +1 -0
- package/assets/esri/core/workers/chunks/{25946077568ab14c7bfc.js → 440f76c397a813b0dcf9.js} +1 -1
- package/assets/esri/core/workers/chunks/4812482f28f7205b0938.js +1 -0
- package/assets/esri/core/workers/chunks/5317cbef0aac29761575.js +1 -0
- package/assets/esri/core/workers/chunks/54a9e17d6c0fef6a9146.js +1 -0
- package/assets/esri/core/workers/chunks/55985c9c48b8e1d1c634.js +1 -0
- package/assets/esri/core/workers/chunks/55edd712c6d2d044e550.js +1 -0
- package/assets/esri/core/workers/chunks/5a573fa1012092328b88.js +1 -0
- package/assets/esri/core/workers/chunks/5f06a57b4f7d7de16bbf.js +1 -0
- package/assets/esri/core/workers/chunks/60ad54e5707d4414d8b9.js +1 -0
- package/assets/esri/core/workers/chunks/{55070344f08ef0ed2a30.js → 60cee9a44929decd2474.js} +1 -1
- package/assets/esri/core/workers/chunks/63b9e4a7dad358605c38.js +1 -0
- package/assets/esri/core/workers/chunks/{d0adf059085ddf7151dd.js → 64845b1f53eca9db1229.js} +1 -1
- package/assets/esri/core/workers/chunks/66d4cbb35d0c290150bf.js +1 -0
- package/assets/esri/core/workers/chunks/677d3674cb2c0c05fb7e.js +1 -0
- package/assets/esri/core/workers/chunks/7100c9038739121c2c4b.js +1 -0
- package/assets/esri/core/workers/chunks/{6c49ac7888679b9f7823.js → 720a33a7f118d2769133.js} +1 -1
- package/assets/esri/core/workers/chunks/{9f7b5749f3ceca8d5978.js → 7480bd6f892abf444cac.js} +31 -31
- package/assets/esri/core/workers/chunks/{3a7c02616d942c81257d.js → 792219a079c28bcdc003.js} +1 -1
- package/assets/esri/core/workers/chunks/794f604d4267e374f7dd.js +1 -0
- package/assets/esri/core/workers/chunks/7ae8f73c8e2afae98ecb.js +1 -0
- package/assets/esri/core/workers/chunks/7d4af7e2cb2f234e12eb.js +1 -0
- package/assets/esri/core/workers/chunks/807b12ace0099300b9b9.js +1 -0
- package/assets/esri/core/workers/chunks/{b98dd9fc9a7e3ff6bd49.js → 816a4b03f2ea49238a6c.js} +1 -1
- package/assets/esri/core/workers/chunks/842b442cc012d0797333.js +1 -0
- package/assets/esri/core/workers/chunks/8903ff28896bd6f34b0d.js +1 -0
- package/assets/esri/core/workers/chunks/89e9bc8789b100316136.js +1 -0
- package/assets/esri/core/workers/chunks/8afe32d3db9669f972bc.js +1 -0
- package/assets/esri/core/workers/chunks/91fd28f50477d16e294e.js +1 -0
- package/assets/esri/core/workers/chunks/{278409028bc5af45b507.js → 93ceb74ac88ef460fe5f.js} +1 -1
- package/assets/esri/core/workers/chunks/98011b93acf3d5f0b5a2.js +1 -0
- package/assets/esri/core/workers/chunks/{cd491c37ba1ac381178c.js → 987dc23fdc0a8c7150b9.js} +1 -1
- package/assets/esri/core/workers/chunks/{25509953f19fbc4949a1.js → 992e74570b76f3f9e52e.js} +1 -1
- package/assets/esri/core/workers/chunks/{b1c5f69bd1400e66c635.js → 9ae90a4b281d4103e8bb.js} +1 -1
- package/assets/esri/core/workers/chunks/9c7fd5db0813bdc38582.js +1 -0
- package/assets/esri/core/workers/chunks/9f272445c285ee9abb7b.js +1 -0
- package/assets/esri/core/workers/chunks/a2fee1611319665e6aed.js +1 -0
- package/assets/esri/core/workers/chunks/a644e30f65347ce846ed.js +1 -0
- package/assets/esri/core/workers/chunks/a64daa4945923a178fe5.js +1 -0
- package/assets/esri/core/workers/chunks/a85575a8d1da09280cd7.js +1 -0
- package/assets/esri/core/workers/chunks/ac4f7309a249132c22da.js +1 -0
- package/assets/esri/core/workers/chunks/aeb1900cfdd0e51cc5f8.js +1 -0
- package/assets/esri/core/workers/chunks/ba62f3aa811430787863.js +1 -0
- package/assets/esri/core/workers/chunks/{7b48c102a44606291f82.js → bb659dcd297b895830df.js} +1 -1
- package/assets/esri/core/workers/chunks/c03d0091a6f385b9ce8d.js +1 -0
- package/assets/esri/core/workers/chunks/c48d1ee37c207bfb0aac.js +1 -0
- package/assets/esri/core/workers/chunks/c4a9006cc6d2938570e0.js +1 -0
- package/assets/esri/core/workers/chunks/c692ea68509bddbf7b42.js +1 -0
- package/assets/esri/core/workers/chunks/{a4a4ce33de6432ba4dc3.js → c6a0e770c1a89d3b5913.js} +1 -1
- package/assets/esri/core/workers/chunks/{b49b608c0d58a9b55fa2.js → cc1f3a2f281a2f6e0f94.js} +1 -1
- package/assets/esri/core/workers/chunks/{73e384fd93cf22503d84.js → cdf6ad970dc1893dac58.js} +1 -1
- package/assets/esri/core/workers/chunks/{b45fdc04d399d2849d63.js → daf65bccc45dc5c400ae.js} +1 -1
- package/assets/esri/core/workers/chunks/df3e79b56c37156e7895.js +1 -0
- package/assets/esri/core/workers/chunks/df8b80b17e371c9be4e6.js +1 -0
- package/assets/esri/core/workers/chunks/e77198f8ab47441423c5.js +1 -0
- package/assets/esri/core/workers/chunks/e786da40a1c87bed64ca.js +1 -0
- package/assets/esri/core/workers/chunks/e8aafef6342c50340a27.js +1 -0
- package/assets/esri/core/workers/chunks/ec00348d74e29f48613a.js +1 -0
- package/assets/esri/core/workers/chunks/{284ce99af7bdd73dc7e9.js → ec65c9c72507ef9a9cf9.js} +1 -1
- package/assets/esri/core/workers/chunks/{cdec811b66d98e76be9e.js → eedeff8b344ff699b0b9.js} +1 -1
- package/assets/esri/core/workers/chunks/f4201e7dcae224d0caf0.js +1 -0
- package/assets/esri/core/workers/chunks/f4d31d96681b649ddc95.js +1 -0
- package/assets/esri/core/workers/chunks/{08d76c600926d7642a8b.js → f5fd59291cb161fdc05b.js} +1 -1
- package/assets/esri/core/workers/chunks/f7cc05fbfc97b4d36eba.js +1 -0
- package/assets/esri/core/workers/chunks/{6aba8c3bce5f68568e3a.js → f7fb121169b7e5a5adbc.js} +1 -1
- package/assets/esri/core/workers/chunks/f9d369a4683f88ee9d76.js +1 -0
- package/assets/esri/core/workers/chunks/fc534c94d55331578195.js +1 -0
- package/assets/esri/core/workers/chunks/{3e61e7805dc6ff284831.js → fdf8fe0f50a9ae548c16.js} +1 -1
- package/chunks/Fog.glsl.js +1 -1
- package/chunks/GlowBlur.glsl.js +2 -2
- package/chunks/GlowComposition.glsl.js +6 -6
- package/chunks/HUDMaterial.glsl.js +1 -1
- package/chunks/OITBlend.glsl.js +9 -9
- package/config.js +1 -1
- package/core/timeUtils.d.ts +68 -0
- package/geometry/support/aaBoundingBox.js +1 -1
- package/geometry/support/sphere.js +1 -1
- package/kernel.js +1 -1
- package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
- package/layers/raster/datasets/pixelReader.js +1 -1
- package/layers/support/Sublayer.d.ts +15 -0
- package/layers/support/Sublayer.js +1 -1
- package/package.json +3 -3
- package/support/revision.js +1 -1
- package/symbols/cim/CIMSymbolDrawHelper.js +1 -1
- package/symbols/cim/utils.js +1 -1
- package/views/2d/engine/Stage.js +1 -1
- package/views/2d/engine/brushes.js +1 -1
- package/views/2d/engine/webgl/TileContainer.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/TextureStatisticsTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TileDebugInfoShader.js +2 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TileStencilShader.js +2 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/tile/TileDebugInfoTechnique.js +2 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/tile/TileDebugInfoTexture.js +2 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/tile/TileStencilTechnique.js +2 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueBackground.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueCircle.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueFill.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueLine.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueSymbol.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/videoScreenRenderer/VideoScreenTechnique.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/layers/MediaLayerView2D.js +1 -1
- package/views/2d/layers/TileLayerView2D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/support/Tiles3DBVH.js +2 -0
- package/views/3d/layers/support/Tiles3DMeshIntersectionHandler.js +1 -1
- package/views/3d/support/ElevationRange.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatFadeHelper.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatFadeTexture.js +1 -1
- package/views/3d/support/orientedBoundingBox.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/terrain/TileCompositor.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterialGlobalParameters.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterialRepository.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/ShaderOutputConfiguration.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/output/Emissions.glsl.js +5 -5
- package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
- package/views/3d/webgl-engine/effects/fboFormatUtils.js +2 -0
- package/views/3d/webgl-engine/effects/fog/Fog.js +1 -1
- package/views/3d/webgl-engine/effects/fog/FogTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/effects/glow/GlowBlurTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/effects/glow/GlowCompositionTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/effects/glow/GlowRenderNode.js +1 -1
- package/views/3d/webgl-engine/effects/precipitation/Precipitation.js +1 -1
- package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
- package/views/3d/webgl-engine/effects/transparency/OITBlend.js +1 -1
- package/views/3d/webgl-engine/effects/transparency/OITBlendTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
- package/views/3d/webgl-engine/lib/MainFramebuffer.js +1 -1
- package/views/3d/webgl-engine/lib/Material.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/Dithering.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js +3 -3
- package/views/3d/webgl-engine/shaders/oitResolution.glsl.js +1 -1
- package/views/3d/webgl-engine/statistics/RendererPerformanceInfo.js +1 -1
- package/views/3d/webgl.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/SelectionManager.js +1 -1
- package/views/VideoView.js +1 -1
- package/views/selection/types.d.ts +92 -1
- package/views/support/selectionUtils.js +1 -1
- package/views/support/waitForResources.js +1 -1
- package/views/webgl/FramebufferObject.js +1 -1
- package/views/webgl/InstanceCounter.js +1 -1
- package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
- package/widgets/Editor/UpdateFeaturesWorkflowData.d.ts +2 -2
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
- package/widgets/FeatureTable/support/FeatureStore.js +1 -1
- package/widgets/LayerList/ListItemPanel.js +1 -1
- package/widgets/Legend/LegendViewModel.js +1 -1
- package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
- package/widgets/Sketch/SketchViewModel.js +1 -1
- package/widgets/support/SelectionList/FeatureItem.js +1 -1
- package/widgets/support/SelectionList/LayerItem.js +1 -1
- package/widgets/support/SelectionList/SelectionListViewModel.js +1 -1
- package/widgets/support/Selector2D/selectorUtils.js +1 -1
- package/assets/esri/core/workers/chunks/04b04548d4eb0941a01e.js +0 -1
- package/assets/esri/core/workers/chunks/06223d5d8281e5af14c5.js +0 -1
- package/assets/esri/core/workers/chunks/07bdcb622ea59fdbb3a6.js +0 -1
- package/assets/esri/core/workers/chunks/0d59f5cd3fdd7d6fd693.js +0 -1
- package/assets/esri/core/workers/chunks/0eb57ef4a1b387c951d6.js +0 -1
- package/assets/esri/core/workers/chunks/136859ef29a3269c4128.js +0 -1
- package/assets/esri/core/workers/chunks/1e018de43becf66cceaa.js +0 -1
- package/assets/esri/core/workers/chunks/236b4ab3da0bc8f788a2.js +0 -1
- package/assets/esri/core/workers/chunks/2379c64b0ca30814a815.js +0 -1
- package/assets/esri/core/workers/chunks/35d115bde474c380c791.js +0 -1
- package/assets/esri/core/workers/chunks/3f6ebd82551c2000912e.js +0 -1
- package/assets/esri/core/workers/chunks/4577df99c92c7ec0f9de.js +0 -1
- package/assets/esri/core/workers/chunks/4869e2f35aaf6b058281.js +0 -1
- package/assets/esri/core/workers/chunks/4b3545965b11a54184d4.js +0 -2
- package/assets/esri/core/workers/chunks/4c6fc6d19fe519ce7bfc.js +0 -1
- package/assets/esri/core/workers/chunks/58f47dea6d8665611eff.js +0 -1
- package/assets/esri/core/workers/chunks/5b2fe488a461bc433f59.js +0 -1
- package/assets/esri/core/workers/chunks/5c0b3c76a7bc971c61dc.js +0 -1
- package/assets/esri/core/workers/chunks/5df9d2a255c9d63ae7df.js +0 -1
- package/assets/esri/core/workers/chunks/5f53d7d6bc9b67b2f357.js +0 -1
- package/assets/esri/core/workers/chunks/5ffe664eda334ad73175.js +0 -1
- package/assets/esri/core/workers/chunks/64fd3561bc94570ee954.js +0 -1
- package/assets/esri/core/workers/chunks/650614a9e4871714c42e.js +0 -1
- package/assets/esri/core/workers/chunks/66e35e38aea978f91a0c.js +0 -1
- package/assets/esri/core/workers/chunks/696f645349249f26090c.js +0 -1
- package/assets/esri/core/workers/chunks/6d5bb00157e20ad90fc0.js +0 -1
- package/assets/esri/core/workers/chunks/70f0d66e5e6d5d2163f3.js +0 -1
- package/assets/esri/core/workers/chunks/768bbc910be6c65ac107.js +0 -1
- package/assets/esri/core/workers/chunks/76effcc35b3962cd5535.js +0 -1
- package/assets/esri/core/workers/chunks/777390e820b3824dc265.js +0 -1
- package/assets/esri/core/workers/chunks/7948d6f14ae44d346d88.js +0 -1
- package/assets/esri/core/workers/chunks/797bf402489b3677a5f7.js +0 -1
- package/assets/esri/core/workers/chunks/7a4cc1133e4410271b00.js +0 -1
- package/assets/esri/core/workers/chunks/7dba4b04c148f03fdf21.js +0 -1
- package/assets/esri/core/workers/chunks/87c9a1fc9f2a392b78f5.js +0 -1
- package/assets/esri/core/workers/chunks/88426877d625ea333143.js +0 -1
- package/assets/esri/core/workers/chunks/8967a02f394a63f11030.js +0 -1
- package/assets/esri/core/workers/chunks/8c210529a28addb94ea0.js +0 -1
- package/assets/esri/core/workers/chunks/8d3c508995253cbe083f.js +0 -1
- package/assets/esri/core/workers/chunks/8e18ac7b22d8dca1e1e2.js +0 -1
- package/assets/esri/core/workers/chunks/8e3cb1c584951c3d1eb7.js +0 -1
- package/assets/esri/core/workers/chunks/908f171b9c512d738dea.js +0 -1
- package/assets/esri/core/workers/chunks/922484b43803ab4e4319.js +0 -1
- package/assets/esri/core/workers/chunks/947a715b608c8affd812.js +0 -1
- package/assets/esri/core/workers/chunks/9bd68abc6b5b07b2add3.js +0 -1
- package/assets/esri/core/workers/chunks/9e55f97291062985560b.js +0 -1
- package/assets/esri/core/workers/chunks/a90883ff02c0cc6450c2.js +0 -1
- package/assets/esri/core/workers/chunks/ac9722a7897c994f11ab.js +0 -1
- package/assets/esri/core/workers/chunks/b1ac09d8fa340d194aa2.js +0 -1
- package/assets/esri/core/workers/chunks/c04c457f5295febb3c39.js +0 -1
- package/assets/esri/core/workers/chunks/cb2fbe585c0827eecf70.js +0 -1
- package/assets/esri/core/workers/chunks/cf74d1605ad2f21699e7.js +0 -1
- package/assets/esri/core/workers/chunks/d50e6681ecb9612e4528.js +0 -1
- package/assets/esri/core/workers/chunks/d6eddb94f5f2e9759bd0.js +0 -1
- package/assets/esri/core/workers/chunks/dcc3285e4ab2c38709bd.js +0 -1
- package/assets/esri/core/workers/chunks/e25bbd7cc553b1d2e208.js +0 -1
- package/assets/esri/core/workers/chunks/e72ca52d930afb5650af.js +0 -30
- package/assets/esri/core/workers/chunks/e96529e144c3268a04f7.js +0 -1
- package/assets/esri/core/workers/chunks/f379f94adbe79dc305a2.js +0 -1
- package/assets/esri/core/workers/chunks/f4e5163efa2a0567ee19.js +0 -1
- package/assets/esri/core/workers/chunks/f76833254f842fb0cd9a.js +0 -1
- package/assets/esri/core/workers/chunks/f9abae8d07002fe04a08.js +0 -1
- package/assets/esri/core/workers/chunks/ff6c4f8420140b9f9577.js +0 -1
- package/assets/esri/core/workers/chunks/ff75fb0fce51ac12e656.js +0 -1
- package/assets/esri/core/workers/chunks/ffe9fa5111c149ddef49.js +0 -1
- package/views/2d/engine/webgl/brushes/WGLBrushStencil.js +0 -2
- package/views/2d/engine/webgl/brushes/WGLBrushTileDebugInfo.js +0 -2
- /package/assets/esri/core/workers/chunks/{4b3545965b11a54184d4.js.LICENSE.txt → 386435341e949f5573b4.js.LICENSE.txt} +0 -0
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 l=" /-,\n";function i(e){let t=e.length;for(;t--;)if(!l.includes(e.charAt(t)))return!1;return!0}function a(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,i(t)])}if(n=o+1,o=e.indexOf("]",n),o>=n){if(o>n){const l=t[e.slice(n,o)];l&&r.push([null,l,!1])}n=o+1}}}while(-1!==o);if(n<e.length){const t=e.slice(n);r.push([t,null,i(t)])}return r}function s(e,t,r){let n="",o=null;for(const l of t){const[t,r,i]=l;if(null!=t&&""!==t)i?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 c(n,r)}function u(e,t,r,n){let o="",l=null;for(const i of t){const[t,n,a]=i;if(null!=t&&""!==t)a?l=t:(null!=l&&(o+=l,l=null),o+=t);else{let t=n;null!=r&&(t=W(n,r));const i=e.attributes[t];null!=i&&""!==i&&(null!=l&&(o+=l,l=null),o+=i)}}return c(o,n)}function c(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,l,i=!0){const a=t/o,s=r/l,u=Math.ceil(a/2),c=Math.ceil(s/2);for(let f=0;f<l;f++)for(let r=0;r<o;r++){const M=4*(r+(i?l-f-1:f)*o);let y=0,m=0,C=0,h=0,p=0,I=0,b=0;const d=(f+.5)*s;for(let n=Math.floor(f*s);n<(f+1)*s;n++){const o=Math.abs(d-(n+.5))/c,l=(r+.5)*a,i=o*o;for(let s=Math.floor(r*a);s<(r+1)*a;s++){let r=Math.abs(l-(s+.5))/u;const o=Math.sqrt(i+r*r);o>=-1&&o<=1&&(y=2*o*o*o-3*o*o+1,y>0&&(r=4*(s+n*t),b+=y*e[r+3],C+=y,e[r+3]<255&&(y=y*e[r+3]/250),h+=y*e[r],p+=y*e[r+1],I+=y*e[r+2],m+=y))}}n[M]=h/m,n[M+1]=p/m,n[M+2]=I/m,n[M+3]=b/C}}function M(e){return e?[e[0],e[1],e[2],e[3]/255]:[0,0,0,0]}function y(e){return e.data?.symbol??null}function m(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 p(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 I=(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 S{constructor(e){this._import=e}getImportPromise(){return null==this._promise&&(this._promise=this._import().then(e=>this.module=e)),this._promise}}function P(e){return new S(e)}function g(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 T(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 A(e){if(e)switch(e.type){case"CIMPolygonSymbol":case"CIMLineSymbol":{const t=e.symbolLayers;if(t)for(const e of t){const t=A(e);if(null!=t)return t}break}case"CIMTextSymbol":return A(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 v(e){if(e)switch(e.type){case"CIMPolygonSymbol":case"CIMLineSymbol":if(e.symbolLayers)for(const t of e.symbolLayers){const e=v(t);if(void 0!==e)return e}break;case"CIMTextSymbol":return v(e.symbol);case"CIMSolidStroke":case"CIMGradientStroke":case"CIMPictureStroke":return e.width}}function F(e){switch(e){case"Left":default:return"left";case"Right":return"right";case"Center":case"Justify":return"center"}}function z(e){switch(e){case"Top":default:return"top";case"Center":return"middle";case"Baseline":return"baseline";case"Bottom":return"bottom"}}function V(e){return(e?Object.keys(e):[]).map(t=>({name:t,alias:t,type:"string"==typeof e[t]?"esriFieldTypeString":"esriFieldTypeDouble"}))}const G=e=>e.includes("data:image/svg+xml");function E(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,l,i=!0){const{infos:a}=l;let s=1,u=0,c=0,f=0,M=1;for(const{absoluteAnchorPoint:C,offsetX:h,offsetY:p,rotation:I,size:b,frameHeight:d,rotateClockWise:k,scaleSymbolsProportionally:S}of a){M=C?1:s;c=J(h,p,u,M,c),f=$(h,p,u,M,f),d&&(S||i)&&(s*=b/d),u=K(I,k,u)}const y=J(n,o,u,M,c),m=$(n,o,u,M,f);return{size:e*s,rotation:K(t,r,u),offsetX:y,offsetY:m}}function D(e){if(null==e)return!1;if(Array.isArray(e))return e.every(e=>D(e));switch(typeof e){case"string":return!!e;case"number":return!isNaN(e)}}function q(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 R(e){return e.split(" ").map(e=>Number(e))}function _(e){return"string"==typeof e?R(e):e}function j(e){return e?.dashTemplate&&(e.dashTemplate=_(e.dashTemplate)),e}function H(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 H(e)}break;case"CIMVectorMarker":{const t=e.markerGraphics;if(!t)return"Normal";for(const e of t)if(e.symbol)return H(e.symbol)}}return"Normal"}function U(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&&p(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 W(e,t){if(null!==t){const r=t.get(e);return r?r.name:e}return e}function X(e){return e.map(e=>({...e,propertyName:O(e.propertyName)}))}function Y(e){const t={};for(const r in e){const n=e[r];t[O(r)]=n}return t}function $(e,t,r,n,o){const l=r*Math.PI/180;if(l){const r=Math.cos(l);return(Math.sin(l)*e+r*t)*n+o}return t*n+o}function J(e,t,r,n,o){const l=r*Math.PI/180;if(l){return(Math.cos(l)*e-Math.sin(l)*t)*n+o}return e*n+o}function K(e,t,r){return t?r-e:r+e}function Q(e,t,r){const n="Color"===r||"TintColor"===r||"ToColor"===r,o="Rotation"===r||"Angle"===r||"ToRotation"===r;let l=t[O(r)];if(null!=l&&(n?l=[l[0]/255,l[1]/255,l[2]/255,l[3]/255]:o&&(l*=Math.PI/180)),null==l&&(l=q(t.type,r.toLowerCase()),null!=l&&(n?l=[l[0]/255,l[1]/255,l[2]/255,l[3]]:o&&(l*=Math.PI/180))),null!=t.primitiveName){const i=e[t.primitiveName];if(null!=i){const e=i[r];null==e||("string"==typeof e||"number"==typeof e||Array.isArray(e)?(l=e,null!=l&&(n?l=[l[0]/255,l[1]/255,l[2]/255,l[3]/255]:o&&(l*=Math.PI/180))):(l={valueExpressionInfo:e,defaultValue:l},null!=l&&(n?l={type:"Process",op:"ArcadeColor",value:l}:o&&(l={type:"Process",op:"Divide",left:l,right:180/Math.PI}))))}}if(null==l)throw new Error(`Failed to derive a value or an expression for "${r}".`);return l}function Z(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 ee(e,t){return Math.max(Math.min((e??t)/100,1),0)}function te(e){if(!e)return 3;switch(e){case"Begin":return 0;case"End":return 2;case"Both":return 1;default:return 3}}function re(e){if(!e)return 2;switch(e){case"Tolerance":return 0;case"Text":return 1;default:return 2}}function ne(e){if(!e)return 2;switch(e){case"MoveBegin":return 0;case"MoveEnd":return 1;default:return 2}}function oe(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}export{c as adjustTextCase,a as analyzeTextParts,B as applyParentTransform,u as assignTextValuesFromFeature,V as attributesToFields,o as colorToArray,n as evaluateValueOrFunction,T as fromCIMFontDecoration,L as fromCIMFontStyle,F as fromCIMHorizontalAlignment,z as fromCIMVerticalAlignment,q as getDefaultCIMValue,d as getEnum,W as getFieldName,x as getFillColor,g as getFontStyle,w as getFontWeight,I as getNumericValue,Q as getProcessParam,ee as getRelativeGradientSize,U as getSize,A as getStrokeColor,v as getStrokeWidth,H as getTextCasing,s as getTextValuesFromFeatureHandle,k as getTintColor,b as getValue,Z as hasProcessParam,N as hasStrokeLayer,P as importLazily,h as isCIMFill,m as isCIMMarker,p as isCIMMarkerStrokePlacement,C as isCIMStroke,r as isFeatureValueFn,le as isGeometricLinearEffect,G as isSVGImage,D as isValidCIMValue,E as mapCIMSymbolToGeometryType,M as normalizeAlpha,j as normalizeDashEffectTemplate,_ as normalizeDashTemplate,X as normalizePrimitiveOverrideProps,R as parseDashTemplate,f as resampleHermite,re as stringToDimensionMarkerFit,te as stringToDimensionPartOptions,ne as stringToDimensionTextFit,oe as stringToDimensionTextOptions,y as toCIMSymbolJSON,Y 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 l=" /-,\n";function i(e){let t=e.length;for(;t--;)if(!l.includes(e.charAt(t)))return!1;return!0}function a(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,i(t)])}if(n=o+1,o=e.indexOf("]",n),o>=n){if(o>n){const l=t[e.slice(n,o)];l&&r.push([null,l,!1])}n=o+1}}}while(-1!==o);if(n<e.length){const t=e.slice(n);r.push([t,null,i(t)])}return r}function u(e,t,r){let n="",o=null;for(const l of t){const[t,r,i]=l;if(null!=t&&""!==t)i?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 s(n,r)}function c(e,t,r,n){let o="",l=null;for(const i of t){const[t,n,a]=i;if(null!=t&&""!==t)a?l=t:(null!=l&&(o+=l,l=null),o+=t);else{let t=n;null!=r&&(t=W(n,r));const i=e.attributes[t];null!=i&&""!==i&&(null!=l&&(o+=l,l=null),o+=i)}}return s(o,n)}function s(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,l,i=!0){const a=t/o,u=r/l,c=Math.ceil(a/2),s=Math.ceil(u/2);for(let f=0;f<l;f++)for(let r=0;r<o;r++){const M=4*(r+(i?l-f-1:f)*o);let y=0,m=0,C=0,h=0,p=0,I=0,b=0;const d=(f+.5)*u;for(let n=Math.floor(f*u);n<(f+1)*u;n++){const o=Math.abs(d-(n+.5))/s,l=(r+.5)*a,i=o*o;for(let u=Math.floor(r*a);u<(r+1)*a;u++){let r=Math.abs(l-(u+.5))/c;const o=Math.sqrt(i+r*r);o>=-1&&o<=1&&(y=2*o*o*o-3*o*o+1,y>0&&(r=4*(u+n*t),b+=y*e[r+3],C+=y,e[r+3]<255&&(y=y*e[r+3]/250),h+=y*e[r],p+=y*e[r+1],I+=y*e[r+2],m+=y))}}n[M]=h/m,n[M+1]=p/m,n[M+2]=I/m,n[M+3]=b/C}}function M(e){return e?[e[0],e[1],e[2],e[3]/255]:[0,0,0,0]}function y(e){return e.data?.symbol??null}function m(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 p(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 I=(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 S{constructor(e){this._import=e}getImportPromise(){return null==this._promise&&(this._promise=this._import().then(e=>this.module=e)),this._promise}}function P(e){return new S(e)}function g(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 T(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 A(e){if(e)switch(e.type){case"CIMPolygonSymbol":case"CIMLineSymbol":{const t=e.symbolLayers;if(t)for(const e of t){const t=A(e);if(null!=t)return t}break}case"CIMTextSymbol":return A(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 v(e){if(e)switch(e.type){case"CIMPolygonSymbol":case"CIMLineSymbol":if(e.symbolLayers)for(const t of e.symbolLayers){const e=v(t);if(void 0!==e)return e}break;case"CIMTextSymbol":return v(e.symbol);case"CIMSolidStroke":case"CIMGradientStroke":case"CIMPictureStroke":return e.width}}function F(e){switch(e){case"Left":default:return"left";case"Right":return"right";case"Center":case"Justify":return"center"}}function V(e){switch(e){case"Top":default:return"top";case"Center":return"middle";case"Baseline":return"baseline";case"Bottom":return"bottom"}}function z(e){return(e?Object.keys(e):[]).map(t=>({name:t,alias:t,type:"string"==typeof e[t]?"esriFieldTypeString":"esriFieldTypeDouble"}))}const G=e=>e.includes("data:image/svg+xml");function E(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,l,i=!0){const{infos:a}=l;let u=1,c=0,s=0,f=0,M=1;for(const{absoluteAnchorPoint:C,offsetX:h,offsetY:p,rotation:I,size:b,frameHeight:d,rotateClockWise:k,scaleSymbolsProportionally:S}of a){M=C?1:u;s=J(h,p,c,M,s),f=$(h,p,c,M,f),d&&(S||i)&&(u*=b/d),c=K(I,k,c)}const y=J(n,o,c,M,s),m=$(n,o,c,M,f);return{size:e*u,rotation:K(t,r,c),offsetX:y,offsetY:m}}function D(e){if(null==e)return!1;if(Array.isArray(e))return e.every(e=>D(e));switch(typeof e){case"string":return!!e;case"number":return!isNaN(e)}}function q(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 R(e){return e.split(" ").map(e=>Number(e))}function _(e){return"string"==typeof e?R(e):e}function j(e){return e?.dashTemplate&&(e.dashTemplate=_(e.dashTemplate)),e}function H(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 H(e)}break;case"CIMVectorMarker":{const t=e.markerGraphics;if(!t)return"Normal";for(const e of t)if(e.symbol)return H(e.symbol)}}return"Normal"}function U(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&&p(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 W(e,t){if(null!==t){const r=t.get(e);return r?r.name:e}return e}function X(e){return e.map(e=>({...e,propertyName:O(e.propertyName)}))}function Y(e){const t={};for(const r in e){const n=e[r];t[O(r)]=n}return t}function $(e,t,r,n,o){const l=r*Math.PI/180;if(l){const r=Math.cos(l);return(Math.sin(l)*e+r*t)*n+o}return t*n+o}function J(e,t,r,n,o){const l=r*Math.PI/180;if(l){return(Math.cos(l)*e-Math.sin(l)*t)*n+o}return e*n+o}function K(e,t,r){return t?r-e:r+e}function Q(e,t,r){const n="Color"===r||"TintColor"===r||"ToColor"===r,o="Rotation"===r||"Angle"===r||"ToRotation"===r;let l=t[O(r)];if(null!=l&&(n?l=[l[0]/255,l[1]/255,l[2]/255,l[3]/255]:o&&(l*=Math.PI/180)),null==l&&(l=q(t.type,r.toLowerCase()),null!=l&&(n?l=[l[0]/255,l[1]/255,l[2]/255,l[3]]:o&&(l*=Math.PI/180))),null!=t.primitiveName){const i=e[t.primitiveName];if(null!=i){const e=i[r];null==e||("string"==typeof e||"number"==typeof e||Array.isArray(e)?(l=e,null!=l&&(n?l=[l[0]/255,l[1]/255,l[2]/255,l[3]/255]:o&&(l*=Math.PI/180))):(l={valueExpressionInfo:e,defaultValue:l},null!=l&&(n?l={type:"Process",op:"ArcadeColor",value:l}:o&&(l={type:"Process",op:"Divide",left:l,right:180/Math.PI}))))}}if(null==l)throw new Error(`Failed to derive a value or an expression for "${r}".`);return l}function Z(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 ee(e,t){return Math.max(Math.min((e??t)/100,1),0)}function te(e){if(!e)return 3;switch(e){case"Begin":return 0;case"End":return 2;case"Both":return 1;default:return 3}}function re(e){if(!e)return 2;switch(e){case"Tolerance":return 0;case"Text":return 1;default:return 2}}function ne(e){if(!e)return 2;switch(e){case"MoveBegin":return 0;case"MoveEnd":return 1;default:return 2}}function oe(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 ie(e){if("CIMPictureMarker"!==e.type&&"CIMVectorMarker"!==e.type)return!1;const t=e.markerPlacement;return!(p(t)&&!0===t.angleToLine)}export{s as adjustTextCase,a as analyzeTextParts,B as applyParentTransform,c as assignTextValuesFromFeature,z as attributesToFields,o as colorToArray,n as evaluateValueOrFunction,T as fromCIMFontDecoration,L as fromCIMFontStyle,F as fromCIMHorizontalAlignment,V as fromCIMVerticalAlignment,q as getDefaultCIMValue,d as getEnum,W as getFieldName,x as getFillColor,g as getFontStyle,w as getFontWeight,I as getNumericValue,Q as getProcessParam,ee as getRelativeGradientSize,U as getSize,A as getStrokeColor,v as getStrokeWidth,H as getTextCasing,u as getTextValuesFromFeatureHandle,k as getTintColor,b as getValue,Z as hasProcessParam,N as hasStrokeLayer,P as importLazily,h as isCIMFill,m as isCIMMarker,p as isCIMMarkerStrokePlacement,C as isCIMStroke,r as isFeatureValueFn,le as isGeometricLinearEffect,ie as isMarkerScreenAligned,G as isSVGImage,D as isValidCIMValue,E as mapCIMSymbolToGeometryType,M as normalizeAlpha,j as normalizeDashEffectTemplate,_ as normalizeDashTemplate,X as normalizePrimitiveOverrideProps,R as parseDashTemplate,f as resampleHermite,re as stringToDimensionMarkerFit,te as stringToDimensionPartOptions,ne as stringToDimensionTextFit,oe as stringToDimensionTextOptions,y as toCIMSymbolJSON,Y as toLowerCaseProps,O as uncapitalize};
|
package/views/2d/engine/Stage.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import e from"../../../core/Error.js";import has from"../../../core/has.js";import{removeMaybe as t}from"../../../core/maybe.js";import{addFrameTask as r}from"../../../core/scheduling.js";import{signal as s}from"../../../core/signal.js";import{create as i}from"../../../core/libs/gl-matrix-2/factories/mat3f32.js";import{CIMAnalyzer as n}from"../../../symbols/cim/cimAnalyzer.js";import{Container as a}from"./Container.js";import{MAX_TILE_RESHUFFLES_PER_FRAME as o}from"./webgl/definitions.js";import h from"./webgl/Painter.js";import{ArrayBufferPool as d}from"./webgl/PooledUint32Array.js";import{Profiler as l}from"./webgl/Profiler.js";import{TileReshuffleManager as m}from"./webgl/TileReshuffleManager.js";import{startup as u,shutdown as c}from"./webgl/shaderGraph/techniques/TechniqueRegistry.js";import{MeshWriterRegistry as p}from"./webgl/shaderGraph/techniques/mesh/MeshWriterRegistry.js";import{Timeline as g}from"../support/Timeline.js";import{SizedPixelFormat as f,SizedDepthStencilFormat as _,PixelType as b}from"../../webgl/enums.js";import{FramebufferObject as w}from"../../webgl/FramebufferObject.js";import{RenderbufferDescriptor as R}from"../../webgl/RenderbufferDescriptor.js";import{RenderingContext as y}from"../../webgl/RenderingContext.js";import{RenderingContextOptions as x}from"../../webgl/RenderingContextOptions.js";import{TextureDescriptor as C}from"../../webgl/TextureDescriptor.js";const P=2e3;class j extends a{constructor(t,i,a){super(),this.meshWriterRegistry=new p,this._trash=new Set,this._renderRemainingTime=0,this._lastFrameRenderTime=0,this._renderRequested=s(!1),this.stage=this,this._stationary=!0,this._animationsEnabled=!0,this._reshuffleManager=new m,this._managedCanvas=a,this.context=new y(this._managedCanvas.gl,i.contextOptions??new x),this.painter=new h(this.context,this),this._cimAnalyzer=new n(this.painter.textureManager.resourceManager),has("esri-2d-profiler")&&null!=t&&(this._debugOutput=document.createElement("div"),this._debugOutput.setAttribute("style","margin: 24px 64px; position: absolute; color: red;"),t.appendChild(this._debugOutput));const o=()=>this.highlightGradient;this._renderParameters={drawPhase:0,state:this.state,pixelRatio:window.devicePixelRatio,stationary:!1,globalOpacity:1,blendMode:null,deltaTime:-1,time:0,inFadeTransition:!1,effects:null,context:this.context,painter:this.painter,timeline:i.timeline||new g,renderingOptions:i.renderingOptions,requestRender:()=>this.requestRender(),allowDelayedRender:!1,requireFBO:!1,profiler:new l(this.context,this._debugOutput),dataUploadCounter:0,get highlightGradient(){return o()},reshuffleManager:this._reshuffleManager,backgroundColor:i.backgroundColor,animationsEnabled:!0};let c=e=>this.renderFrame(e);null!=i.renderFrame&&(c=i.renderFrame),this._taskHandle=r({render:e=>c(e)}),this._taskHandle.pause(),this._lostWebGLContextHandle=this._managedCanvas.events.on("webgl-context-lost",t=>this.emit("webgl-error",{error:new e("webgl-context-lost",t.statusMessage)})),this._bufferPool=new d,u()}destroy(){super.destroy(),c(this.context),this.removeAllChildren(),this._emptyTrash(),this._taskHandle=t(this._taskHandle),this._lostWebGLContextHandle=t(this._lostWebGLContextHandle),this._managedCanvas.destroy(),this._debugOutput?.parentNode?.removeChild(this._debugOutput),this._bufferPool.destroy(),this.painter.dispose(),this.context.dispose(),this._managedCanvas=null}get textureManager(){return this.painter.textureManager}get profiler(){return this._renderParameters.profiler}get backgroundColor(){return this._renderParameters.backgroundColor}set backgroundColor(e){this._renderParameters.backgroundColor=e,this.requestRender()}get canvas(){return this._managedCanvas.canvas}get bufferPool(){return this._bufferPool}get cimAnalyzer(){return this._cimAnalyzer}get effectiveVisible(){return this.visible}get renderingOptions(){return this._renderingOptions}set renderingOptions(e){this._renderingOptions=e,this.requestRender()}get renderRequested(){return this._renderRequested.value}get state(){return this._state}set state(e){this._state=e,this.requestRender()}get stationary(){return this._stationary}set stationary(e){this._stationary!==e&&(this._stationary=e,this.requestRender())}get animationsEnabled(){return this._animationsEnabled}set animationsEnabled(e){this._animationsEnabled!==e&&(this._animationsEnabled=e,this._animationsEnabled&&this.requestRender())}trashDisplayObject(e){this._trash.add(e),this.requestRender()}untrashDisplayObject(e){return this._trash.delete(e)}requestRender(){this._renderRemainingTime=P,this.renderRequested||(this._renderRequested.value=!0,this._taskHandle.resume())}renderFrame(e){const t=this._lastFrameRenderTime?e.time-this._lastFrameRenderTime:0;this._renderRemainingTime-=t,this._renderRemainingTime<=0&&this._taskHandle.pause(),this._lastFrameRenderTime=e.time,this._renderRequested.value=!1,this._renderParameters.state=this._state,this._renderParameters.stationary=this.stationary,this._renderParameters.pixelRatio=window.devicePixelRatio,this._renderParameters.globalOpacity=1,this._renderParameters.time=e.time,this._renderParameters.deltaTime=e.deltaTime,this._renderParameters.effects=null,this._renderParameters.animationsEnabled=this._animationsEnabled,this.processRender(this._renderParameters),this._emptyTrash()}_createTransforms(){return{displayViewScreenMat3:i()}}renderChildren(e){this._reshuffleManager.reshuffle(o),this._managedCanvas.render(e,()=>this._renderChildren(this.children,e))}_renderChildren(e,t){for(const s of e)s.beforeRender(t);const r=this.context;this.painter.textureUploadManager.upload(),r.resetInfo(),t.profiler.recordStart("drawLayers"),t.dataUploadCounter=0,this.painter.beforeRenderPhases(t,t.backgroundColor,this.state.padding),t.drawPhase=1;for(const s of e)s.processRender(t);if(this.children.some(e=>e.hasHighlight)){t.drawPhase=16;for(const r of e)r.processRender(t)}if(this.children.some(e=>e.hasLabels)){t.drawPhase=2;for(const r of e)r.processRender(t)}if(has("esri-tiles-debug")){t.drawPhase=64;for(const r of e)r.processRender(t)}t.drawPhase=128;for(const s of e)s.processRender(t);this.painter.afterRenderPhases(t),t.profiler.recordEnd("drawLayers"),r.logInfo();for(const s of e)s.afterRender(t)}doRender(e){const t=this.context,{state:r,pixelRatio:s}=e;this._managedCanvas.resize(e),t.setViewport(0,0,s*r.size[0],s*r.size[1]),t.setDepthWriteEnabled(!0),t.setStencilWriteMask(255),this.renderChildren(e)}async takeScreenshot(e,t,r,s){const i=Math.round(this.state.size[0]*e.resolutionScale),n=Math.round(this.state.size[1]*e.resolutionScale),a=e.resolutionScale,o=this.context,h=this._state.clone();if(null!=s){const e=h.viewpoint;h.viewpoint.rotation=s,h.viewpoint=e}const d={...this._renderParameters,drawPhase:null,globalOpacity:1,stationary:!0,state:h,pixelRatio:a,time:performance.now(),deltaTime:0,blendMode:null,effects:null,inFadeTransition:!1,backgroundColor:r},l=new C(i,n);l.wrapMode=33071,l.internalFormat=f.RGBA8,l.isImmutable=!0;const m=new w(o,l,new R(_.DEPTH24_STENCIL8,i,n)),u=o.getBoundFramebufferObject(),c=o.getViewport();o.bindFramebuffer(m),o.setViewport(0,0,i,n),this._renderChildren(t??this.children,d);const p=this._readbackScreenshot(m,{...e.cropArea,y:n-(e.cropArea.y+e.cropArea.height)});o.bindFramebuffer(u),o.setViewport(c.x,c.y,c.width,c.height),this.requestRender();const g=await p;let b;return 1===e.outputScale?b=g:(b=new ImageData(Math.round(g.width*e.outputScale),Math.round(g.height*e.outputScale)),(await import("../../support/screenshotUtils.js")).resampleHermite(g,b,!0)),m.dispose(),b}async _readbackScreenshot(e,t){const r=(await import("../../support/screenshotUtils.js")).createEmptyImageData(t.width,t.height,document.createElement("canvas"));return await e.readPixelsAsync(t.x,t.y,t.width,t.height,6408,b.UNSIGNED_BYTE,new Uint8Array(r.data.buffer)),r}_emptyTrash(){for(;this._trash.size>0;){const e=Array.from(this._trash);this._trash.clear();for(const t of e)t.processDetach()}}}export{j as Stage,P as extraRenderTime};
|
|
2
|
+
import e from"../../../core/Error.js";import has from"../../../core/has.js";import{removeMaybe as t}from"../../../core/maybe.js";import{addFrameTask as r}from"../../../core/scheduling.js";import{signal as s}from"../../../core/signal.js";import{create as i}from"../../../core/libs/gl-matrix-2/factories/mat3f32.js";import{CIMAnalyzer as n}from"../../../symbols/cim/cimAnalyzer.js";import{Container as a}from"./Container.js";import{MAX_TILE_RESHUFFLES_PER_FRAME as o}from"./webgl/definitions.js";import h from"./webgl/Painter.js";import{ArrayBufferPool as d}from"./webgl/PooledUint32Array.js";import{Profiler as l}from"./webgl/Profiler.js";import{TileReshuffleManager as m}from"./webgl/TileReshuffleManager.js";import{startup as u,shutdown as c}from"./webgl/shaderGraph/techniques/TechniqueRegistry.js";import{MeshWriterRegistry as p}from"./webgl/shaderGraph/techniques/mesh/MeshWriterRegistry.js";import{Timeline as g}from"../support/Timeline.js";import{SizedPixelFormat as f,SizedDepthStencilFormat as _,PixelType as b}from"../../webgl/enums.js";import{FramebufferObject as w}from"../../webgl/FramebufferObject.js";import{RenderbufferDescriptor as R}from"../../webgl/RenderbufferDescriptor.js";import{RenderingContext as y}from"../../webgl/RenderingContext.js";import{RenderingContextOptions as x}from"../../webgl/RenderingContextOptions.js";import{TextureDescriptor as C}from"../../webgl/TextureDescriptor.js";const P=2e3;class j extends a{constructor(t,i,a){super(),this.meshWriterRegistry=new p,this._trash=new Set,this._renderRemainingTime=0,this._lastFrameRenderTime=0,this._renderRequested=s(!1),this.stage=this,this._stationary=!0,this._animationsEnabled=!0,this._reshuffleManager=new m,this._managedCanvas=a,this.context=new y(this._managedCanvas.gl,i.contextOptions??new x),this.painter=new h(this.context,this),this._cimAnalyzer=new n(this.painter.textureManager.resourceManager),has("esri-2d-profiler")&&null!=t&&(this._debugOutput=document.createElement("div"),this._debugOutput.setAttribute("style","margin: 24px 64px; position: absolute; color: red;"),t.appendChild(this._debugOutput));const o=()=>this.highlightGradient;this._renderParameters={drawPhase:0,state:this.state,pixelRatio:window.devicePixelRatio,stationary:!1,globalOpacity:1,blendMode:null,deltaTime:-1,time:0,inFadeTransition:!1,effects:null,context:this.context,painter:this.painter,timeline:i.timeline||new g,renderingOptions:i.renderingOptions,requestRender:()=>this.requestRender(),allowDelayedRender:!1,requireFBO:!1,profiler:new l(this.context,this._debugOutput),dataUploadCounter:0,get highlightGradient(){return o()},reshuffleManager:this._reshuffleManager,backgroundColor:i.backgroundColor,animationsEnabled:!0};let c=e=>this.renderFrame(e);null!=i.renderFrame&&(c=i.renderFrame),this._taskHandle=r({render:e=>c(e)}),this._taskHandle.pause(),this._lostWebGLContextHandle=this._managedCanvas.events.on("webgl-context-lost",t=>this.emit("webgl-error",{error:new e("webgl-context-lost",t.statusMessage||"WebGL context lost")})),this._bufferPool=new d,u()}destroy(){super.destroy(),c(this.context),this.removeAllChildren(),this._emptyTrash(),this._taskHandle=t(this._taskHandle),this._lostWebGLContextHandle=t(this._lostWebGLContextHandle),this._managedCanvas.destroy(),this._debugOutput?.parentNode?.removeChild(this._debugOutput),this._bufferPool.destroy(),this.painter.dispose(),this.context.dispose(),this._managedCanvas=null}get textureManager(){return this.painter.textureManager}get profiler(){return this._renderParameters.profiler}get backgroundColor(){return this._renderParameters.backgroundColor}set backgroundColor(e){this._renderParameters.backgroundColor=e,this.requestRender()}get canvas(){return this._managedCanvas.canvas}get bufferPool(){return this._bufferPool}get cimAnalyzer(){return this._cimAnalyzer}get effectiveVisible(){return this.visible}get renderingOptions(){return this._renderingOptions}set renderingOptions(e){this._renderingOptions=e,this.requestRender()}get renderRequested(){return this._renderRequested.value}get state(){return this._state}set state(e){this._state=e,this.requestRender()}get stationary(){return this._stationary}set stationary(e){this._stationary!==e&&(this._stationary=e,this.requestRender())}get animationsEnabled(){return this._animationsEnabled}set animationsEnabled(e){this._animationsEnabled!==e&&(this._animationsEnabled=e,this._animationsEnabled&&this.requestRender())}trashDisplayObject(e){this._trash.add(e),this.requestRender()}untrashDisplayObject(e){return this._trash.delete(e)}requestRender(){this._renderRemainingTime=P,this.renderRequested||(this._renderRequested.value=!0,this._taskHandle.resume())}renderFrame(e){const t=this._lastFrameRenderTime?e.time-this._lastFrameRenderTime:0;this._renderRemainingTime-=t,this._renderRemainingTime<=0&&this._taskHandle.pause(),this._lastFrameRenderTime=e.time,this._renderRequested.value=!1,this._renderParameters.state=this._state,this._renderParameters.stationary=this.stationary,this._renderParameters.pixelRatio=window.devicePixelRatio,this._renderParameters.globalOpacity=1,this._renderParameters.time=e.time,this._renderParameters.deltaTime=e.deltaTime,this._renderParameters.effects=null,this._renderParameters.animationsEnabled=this._animationsEnabled,this.processRender(this._renderParameters),this._emptyTrash()}_createTransforms(){return{displayViewScreenMat3:i()}}renderChildren(e){this._reshuffleManager.reshuffle(o),this._managedCanvas.render(e,()=>this._renderChildren(this.children,e))}_renderChildren(e,t){for(const s of e)s.beforeRender(t);const r=this.context;this.painter.textureUploadManager.upload(),r.resetInfo(),t.profiler.recordStart("drawLayers"),t.dataUploadCounter=0,this.painter.beforeRenderPhases(t,t.backgroundColor,this.state.padding),t.drawPhase=1;for(const s of e)s.processRender(t);if(this.children.some(e=>e.hasHighlight)){t.drawPhase=16;for(const r of e)r.processRender(t)}if(this.children.some(e=>e.hasLabels)){t.drawPhase=2;for(const r of e)r.processRender(t)}if(has("esri-tiles-debug")){t.drawPhase=64;for(const r of e)r.processRender(t)}t.drawPhase=128;for(const s of e)s.processRender(t);this.painter.afterRenderPhases(t),t.profiler.recordEnd("drawLayers"),r.logInfo();for(const s of e)s.afterRender(t)}doRender(e){const t=this.context,{state:r,pixelRatio:s}=e;this._managedCanvas.resize(e),t.setViewport(0,0,s*r.size[0],s*r.size[1]),t.setDepthWriteEnabled(!0),t.setStencilWriteMask(255),this.renderChildren(e)}async takeScreenshot(e,t,r,s){const i=Math.round(this.state.size[0]*e.resolutionScale),n=Math.round(this.state.size[1]*e.resolutionScale),a=e.resolutionScale,o=this.context,h=this._state.clone();if(null!=s){const e=h.viewpoint;h.viewpoint.rotation=s,h.viewpoint=e}const d={...this._renderParameters,drawPhase:null,globalOpacity:1,stationary:!0,state:h,pixelRatio:a,time:performance.now(),deltaTime:0,blendMode:null,effects:null,inFadeTransition:!1,backgroundColor:r},l=new C(i,n);l.wrapMode=33071,l.internalFormat=f.RGBA8,l.isImmutable=!0;const m=new w(o,l,new R(_.DEPTH24_STENCIL8,i,n)),u=o.getBoundFramebufferObject(),c=o.getViewport();o.bindFramebuffer(m),o.setViewport(0,0,i,n),this._renderChildren(t??this.children,d);const p=this._readbackScreenshot(m,{...e.cropArea,y:n-(e.cropArea.y+e.cropArea.height)});o.bindFramebuffer(u),o.setViewport(c.x,c.y,c.width,c.height),this.requestRender();const g=await p;let b;return 1===e.outputScale?b=g:(b=new ImageData(Math.round(g.width*e.outputScale),Math.round(g.height*e.outputScale)),(await import("../../support/screenshotUtils.js")).resampleHermite(g,b,!0)),m.dispose(),b}async _readbackScreenshot(e,t){const r=(await import("../../support/screenshotUtils.js")).createEmptyImageData(t.width,t.height,document.createElement("canvas"));return await e.readPixelsAsync(t.x,t.y,t.width,t.height,6408,b.UNSIGNED_BYTE,new Uint8Array(r.data.buffer)),r}_emptyTrash(){for(;this._trash.size>0;){const e=Array.from(this._trash);this._trash.clear();for(const t of e)t.processDetach()}}}export{j as Stage,P as extraRenderTime};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
|
|
2
|
+
const o={};export{o as brushes};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import has from"../../../../core/has.js";import e from"./WGLContainer.js";import
|
|
2
|
+
import has from"../../../../core/has.js";import e from"./WGLContainer.js";import{TileDebugInfoTechnique as t}from"./shaderGraph/techniques/tile/TileDebugInfoTechnique.js";import{TileStencilTechnique as i}from"./shaderGraph/techniques/tile/TileStencilTechnique.js";const r=(e,t)=>e.key.level-t.key.level!==0?e.key.level-t.key.level:e.key.row-t.key.row!==0?e.key.row-t.key.row:e.key.col-t.key.col;class n extends e{constructor(e){super(),this.tilingScheme=e,this._tileStencilTechnique=new i,this._tileDebugInfoTechnique=new t,this.sortFunction=r}renderChildren(e){this.setStencilReference(e),super.renderChildren(e);for(const t of this.getStencilTarget())this._tileStencilTechnique.render(e,t);if(has("esri-tiles-debug"))for(const t of this.children)this._tileDebugInfoTechnique.render(e,t)}createRenderParams(e){const{state:t}=e,i=super.createRenderParams(e);return i.requiredLevel=this.tilingScheme.getClosestInfoForScale(t.scale).level,i.displayLevel=this.tilingScheme.scaleToZoom(t.scale),i}onDetach(){super.onDetach(),this._tileStencilTechnique.shutdown(),this._tileDebugInfoTechnique.shutdown()}getStencilTarget(){return this.children}setStencilReference(e){let t=1;for(const i of this.children)i.stencilRef=t++}}export{n as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import"../../../../../../core/has.js";import{isPowerOfTwo as e,nextPowerOfTwo as t}from"../../../../../../core/mathUtils.js";import{disposeMaybe as r}from"../../../../../../core/maybe.js";import{simplePipelineState as s}from"../utils.js";import{Technique as u}from"./Technique.js";import{TextureStatisticsDiffShader as o}from"./shaders/TextureStatisticsDiffShader.js";import{TextureStatisticsMinMaxSumShader as i}from"./shaders/TextureStatisticsMinMaxSumShader.js";import{TextureStatisticsStdDevShader as a}from"./shaders/TextureStatisticsStdDevShader.js";import{TextureStatisticsSumOfSquaredDiffShader as n}from"./shaders/TextureStatisticsSumOfSquaredDiffShader.js";import{getWebGLCapabilities as f}from"../../../../../webgl/capabilities.js";import{ColorAttachment2 as l,ColorAttachment3 as h,ColorAttachment0 as m,ColorAttachment1 as x,SizedPixelFormat as c,PixelType as T}from"../../../../../webgl/enums.js";import{FramebufferObject as d}from"../../../../../webgl/FramebufferObject.js";import p from"../../../../../webgl/Texture.js";import{TextureDescriptor as b}from"../../../../../webgl/TextureDescriptor.js";const _=1048576;class F extends u{constructor(){super(...arguments),this.type=
|
|
2
|
+
import"../../../../../../core/has.js";import{isPowerOfTwo as e,nextPowerOfTwo as t}from"../../../../../../core/mathUtils.js";import{disposeMaybe as r}from"../../../../../../core/maybe.js";import{simplePipelineState as s}from"../utils.js";import{Technique as u}from"./Technique.js";import{TextureStatisticsDiffShader as o}from"./shaders/TextureStatisticsDiffShader.js";import{TextureStatisticsMinMaxSumShader as i}from"./shaders/TextureStatisticsMinMaxSumShader.js";import{TextureStatisticsStdDevShader as a}from"./shaders/TextureStatisticsStdDevShader.js";import{TextureStatisticsSumOfSquaredDiffShader as n}from"./shaders/TextureStatisticsSumOfSquaredDiffShader.js";import{getWebGLCapabilities as f}from"../../../../../webgl/capabilities.js";import{ColorAttachment2 as l,ColorAttachment3 as h,ColorAttachment0 as m,ColorAttachment1 as x,SizedPixelFormat as c,PixelType as T}from"../../../../../webgl/enums.js";import{FramebufferObject as d}from"../../../../../webgl/FramebufferObject.js";import p from"../../../../../webgl/Texture.js";import{TextureDescriptor as b}from"../../../../../webgl/TextureDescriptor.js";const _=1048576;class F extends u{constructor(){super(...arguments),this.type=35,this._width=0,this._height=0,this._framebuffers=null,this._minTexture=null,this._maxTexture=null,this._sumTexture=null,this._numOfNoDataTexture=null,this._resultsFramebuffer=null,this._startFramebuffer=null,this._diffFramebuffer=null,this._scaleFbo=null,this.shaders={textureStatisticsMinMaxSum:new i,textureStatisticsSum:new n,textureStatisticsDiff:new o,textureStatisticsStdDev:new a}}dispose(){this.shaders.textureStatisticsMinMaxSum=null,this._framebuffers&&(this._framebuffers.forEach(e=>r(e)),this._framebuffers=null),r(this._resultsFramebuffer),r(this._startFramebuffer),r(this._diffFramebuffer),r(this._scaleFbo),r(this._minTexture),r(this._maxTexture),r(this._sumTexture),r(this._numOfNoDataTexture)}get minValuesTexture(){return this._minTexture||null}get maxValuesTexture(){return this._maxTexture||null}get meanValuesTexture(){return this._resultsFramebuffer?.getColorTexture(l)||null}get stdDevValuesTexture(){return this._resultsFramebuffer?.getColorTexture(h)||null}get statsFbo(){return this._resultsFramebuffer}render(t,r){const{context:u,painter:o}=t;let i=r.fbo.width,a=r.fbo.height,n=r.fbo;const f=u.gl,l=u.getBoundFramebufferObject();if(i*a>_||!e(i)||!e(a)){const t=i/a;if(i*a>_){const e=Math.max(Math.floor(Math.sqrt(_/t)),1);i=Math.max(Math.floor(t*e),1),a=e}if(e(i)||(i=S(i)),e(a)||(a=S(a)),this._scaleFbo)this._scaleFbo.resize(i,a);else{const{dataType:e,internalFormat:t}=r.fbo.getColorTexture(m).descriptor,s=t??c.RGBA8;this._scaleFbo=w(u,i,a,e,s)}u.bindFramebuffer(this._scaleFbo),u.setViewport(0,0,i,a),o.blitTexture(u,n.getColorTexture(m),9728),n=this._scaleFbo}this._updateResources(t,n),o.setPipelineState({...s,color:{write:[!0,!0,!0,!0],blendMode:"none"}});const h=this._applyReductionPass(t);f.readBuffer(f.COLOR_ATTACHMENT3),h.copyToTexture(0,0,1,1,0,0,this._numOfNoDataTexture),f.readBuffer(f.COLOR_ATTACHMENT2),h.copyToTexture(0,0,1,1,0,0,this._sumTexture),f.readBuffer(f.COLOR_ATTACHMENT1),h.copyToTexture(0,0,1,1,0,0,this._maxTexture),f.readBuffer(f.COLOR_ATTACHMENT0),h.copyToTexture(0,0,1,1,0,0,this._minTexture);const x=r.fbo.getColorTexture(m);if(!x)throw new Error("Start buffer color texture is not available, cannot compute diff.");this._computeDiff(t,x,this._sumTexture,this._numOfNoDataTexture,i,a);const T=this._applySecondReductionPass(t,i,a).getColorTexture(m);this._computeSdtDev(t,this._minTexture,this._maxTexture,this._sumTexture,this._numOfNoDataTexture,T,i,a),u.bindFramebuffer(l),u.setViewport(0,0,r.fbo.width,r.fbo.height),o.setPipelineState(s)}_applyReductionPass(e){const{context:t,painter:r}=e,s=this.shaders.textureStatisticsMinMaxSum,u=this._framebuffers;if(null===u)throw new Error("Framebuffers are not initialized, cannot apply reduction pass.");const o=this._startFramebuffer;let i=o.getColorTexture(m),a=o.getColorTexture(x),n=o.getColorTexture(l),f=o.getColorTexture(h);const c=u;let T=0;for(const d of c){t.setViewport(0,0,d.width,d.height),t.bindFramebuffer(d),t.setClearColor(0,0,0,0),t.clear(16384);const e={shader:s,uniforms:{config:{minTexture:{texture:i,unit:1},maxTexture:{texture:a,unit:2},sumTexture:{texture:n,unit:3},numOfNoDataTexture:{texture:f,unit:4},width:d.width,height:d.height,isFirstPass:0===T?1:0}},defines:null,optionalAttributes:null,useComputeBuffer:!1};r.submitDrawMesh(t,e,r.quadMesh),i=d.getColorTexture(m),a=d.getColorTexture(x),n=d.getColorTexture(l),f=d.getColorTexture(h),T++}return u.at(-1)}_applySecondReductionPass(e,t,r){const{context:s,painter:u}=e,o=this.shaders.textureStatisticsSum,i=this._framebuffers;if(null===i||null==this._diffFramebuffer)throw new Error("Framebuffers are not initialized, cannot apply reduction pass.");let a=this._diffFramebuffer.getColorTexture(m);const n=i;for(const f of n){s.setViewport(0,0,f.width,f.height),s.bindFramebuffer(f),s.setClearColor(0,0,0,0),s.clear(16384);const e={shader:o,uniforms:{config:{sumTexture:{texture:a,unit:2},width:f.width,height:f.height}},defines:null,optionalAttributes:null,useComputeBuffer:!1};u.submitDrawMesh(s,e,u.quadMesh),a=f.getColorTexture(m)}return i.at(-1)}_updateResources(e,t){const{context:r}=e,s=t.width,u=t.height;if(null===this._startFramebuffer){if(!f().supportsColorBufferFloat)throw new Error("WebGL does not support color buffer float, cannot compute texture statistics.");const e=t.getColorTexture(m);if(!e)throw new Error("Input FBO does not have a color attachment 0, cannot compute texture statistics.");const o=e.descriptor,{dataType:i,internalFormat:a}=o,n=w(r,s,u,i,a??c.RGBA8,4),d=n.getColorTexture(m),p=n.getColorTexture(x),b=n.getColorTexture(l),_=n.getColorTexture(h);t.copyToTexture(0,0,s,u,0,0,d),t.copyToTexture(0,0,s,u,0,0,p),t.copyToTexture(0,0,s,u,0,0,b),t.copyToTexture(0,0,s,u,0,0,_),this._startFramebuffer=n,this._diffFramebuffer=w(r,s,u,T.FLOAT,c.RGBA32F),this._resultsFramebuffer=w(r,1,1,T.FLOAT,c.RGBA32F,4),this._minTexture=C(r,1,1,T.FLOAT,c.RGBA32F),this._maxTexture=C(r,1,1,T.FLOAT,c.RGBA32F),this._sumTexture=C(r,1,1,T.FLOAT,c.RGBA32F),this._numOfNoDataTexture=C(r,1,1,T.FLOAT,c.R32F)}else{const e=this._startFramebuffer;e.resize(s,u);const r=e.getColorTexture(m),o=e.getColorTexture(x),i=e.getColorTexture(l),a=e.getColorTexture(h);t.copyToTexture(0,0,s,u,0,0,r),t.copyToTexture(0,0,s,u,0,0,o),t.copyToTexture(0,0,s,u,0,0,i),t.copyToTexture(0,0,s,u,0,0,a),this._diffFramebuffer.resize(s,u)}if(this._width===s&&this._height===u&&null!==this._framebuffers)return;const o=(this._framebuffers||[]).reverse();this._framebuffers=null,this._width=s,this._height=u,this._framebuffers=this._updateFramebuffers(r,s,u,o,4)}_updateFramebuffers(e,t,s,u,o=1){const i=[];let a=t,n=s;for(;a>1||n>1;){const t=Math.max(1,Math.floor(a/2)),r=Math.max(1,Math.floor(n/2)),s=g(e,t,r,u,o);i.push(s),a=t,n=r}return i.at(-1),u.forEach(e=>r(e)),u.length=0,i}_computeDiff(e,t,r,s,u,o){const{context:i,painter:a}=e;i.bindFramebuffer(this._diffFramebuffer),i.setViewport(0,0,u,o),i.setClearColor(0,0,0,0),i.clear(16384);const n={shader:this.shaders.textureStatisticsDiff,uniforms:{config:{inputTexture:{texture:t,unit:1},sumTexture:{texture:r,unit:2},numOfNoDataTexture:{texture:s,unit:3},numTexels:u*o}},defines:null,optionalAttributes:null,useComputeBuffer:!1};a.submitDrawMesh(i,n,a.quadMesh)}_computeSdtDev(e,t,r,s,u,o,i,a){const{context:n,painter:f}=e;n.bindFramebuffer(this._resultsFramebuffer),n.setViewport(0,0,1,1),n.setClearColor(0,0,0,0),n.clear(16384);const l={shader:this.shaders.textureStatisticsStdDev,uniforms:{config:{minTexture:{texture:t,unit:1},maxTexture:{texture:r,unit:2},sumTexture:{texture:s,unit:3},numOfNoDataTexture:{texture:u,unit:4},diffSqTexture:{texture:o,unit:5},numTexels:i*a}},defines:null,optionalAttributes:null,useComputeBuffer:!1};f.submitDrawMesh(n,l,f.quadMesh)}}function g(e,t,r,s,u=1){let o=s.pop();return void 0!==o?o.resize(t,r):o=w(e,t,r,T.FLOAT,c.RGBA32F,u),o}function w(e,t,r,s,u,o=1){if(o<1||o>4)throw new Error("Number of color attachments must be between 1 and 4.");const i=new d(e,C(e,t,r,s,u));for(let a=1;a<o;a++){const o=C(e,t,r,s,u);i.attachColorTexture(o,m+a)}return i}function C(e,t,r,s,u){const o=new b(t,r);return o.samplingMode=9728,o.wrapMode=33071,o.pixelFormat=6408,o.dataType=s,o.internalFormat=u,new p(e,o)}function S(e){const r=t(e),s=r/2;return Math.abs(r-e)<Math.abs(s-e)?r:s}export{F as TextureStatisticsTechnique};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import{__decorate as o,__param as t}from"tslib";import{GraphShaderModule as e,FragmentOutput as i,location as r,uniform as n,input as p,FragmentInput as s,VertexInput as d,UniformGroup as l}from"../../GraphShaderModule.js";import{Vec3 as c,Vec4 as a,texture2D as g,Vec2 as y,Mat3 as u,Float as f,Sampler2D as v}from"../../graph/glsl.js";class h extends d{}o([r(0,y)],h.prototype,"position",void 0);class m extends s{}class x extends l{}o([n(u)],x.prototype,"dvsMat3",void 0),o([n(y)],x.prototype,"coordRange",void 0),o([n(f)],x.prototype,"depth",void 0),o([n(a)],x.prototype,"color",void 0);class w extends l{}o([n(u)],w.prototype,"dvsMat3",void 0),o([n(f)],w.prototype,"depth",void 0),o([n(y)],w.prototype,"coordRatio",void 0),o([n(y)],w.prototype,"delta",void 0),o([n(y)],w.prototype,"dimensions",void 0),o([n(v)],w.prototype,"texture",void 0);class M extends e{constructor(){super(...arguments),this.type="TileDebugInfoOutlineShader"}vertex(o){const t=this.config.dvsMat3.multiply(new c(o.position.multiply(this.config.coordRange),1));return{glPosition:new a(t.xy,this.config.depth,1)}}fragment(o){const t=new i;return t.fragColor=this.config.color,t}}o([n(x)],M.prototype,"config",void 0),o([t(0,p(h))],M.prototype,"vertex",null),o([t(0,p(s))],M.prototype,"fragment",null);class b extends e{constructor(){super(...arguments),this.type="TileDebugInfoShader"}vertex(o){const t=this.config.coordRatio.multiply(this.config.delta.add(o.position.multiply(this.config.dimensions))),e=this.config.dvsMat3.multiply(new c(t,1));return{glPosition:new a(e.xy,this.config.depth,1),uv:o.position}}fragment(o){const t=new i,e=g(this.config.texture,o.uv);return t.fragColor=new a(e.rgb.multiply(e.a),e.a),t}}o([n(w)],b.prototype,"config",void 0),o([t(0,p(h))],b.prototype,"vertex",null),o([t(0,p(m))],b.prototype,"fragment",null);export{M as TileDebugInfoOutlineShader,b as TileDebugInfoShader};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import{__decorate as o,__param as t}from"tslib";import{GraphShaderModule as e,FragmentOutput as r,location as i,uniform as p,input as s,FragmentInput as n,VertexInput as l,UniformGroup as d}from"../../GraphShaderModule.js";import{Vec3 as c,Vec4 as a,Vec2 as g,Mat3 as y,Float as f}from"../../graph/glsl.js";class h extends l{}o([i(0,g)],h.prototype,"position",void 0);class m extends d{}o([p(y)],m.prototype,"dvsMat3",void 0),o([p(g)],m.prototype,"coordRange",void 0),o([p(f)],m.prototype,"depth",void 0),o([p(a)],m.prototype,"color",void 0);class v extends e{constructor(){super(...arguments),this.type="TileStencilShader"}vertex(o){const t=this.config.dvsMat3.multiply(new c(o.position.multiply(this.config.coordRange),1));return{glPosition:new a(t.xy,this.config.depth,1)}}fragment(o){const t=new r;return t.fragColor=this.config.color,t}}o([p(m)],v.prototype,"config",void 0),o([t(0,s(h))],v.prototype,"vertex",null),o([t(0,s(n))],v.prototype,"fragment",null);export{v as TileStencilShader};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import{destroyMaybe as e}from"../../../../../../../core/maybe.js";import{fromValues as t}from"../../../../../../../core/libs/gl-matrix-2/factories/vec4f32.js";import{FeatureTile as s}from"../../../FeatureTile.js";import{Mesh as i}from"../../../meshing/Mesh.js";import{Technique as r}from"../Technique.js";import{TileDebugInfoShader as o,TileDebugInfoOutlineShader as n}from"../shaders/TileDebugInfoShader.js";import{TileDebugInfoTexture as h}from"./TileDebugInfoTexture.js";import{PrimitiveType as a,DataType as u}from"../../../../../../webgl/enums.js";import{VertexElementDescriptor as d}from"../../../../../../webgl/VertexElementDescriptor.js";class l extends r{constructor(){super(...arguments),this.type=33,this.drawPhase=64,this.shaders={outline:new n,tileInfo:new o},this._outlineMesh=null,this._color=t(1,0,0,1),this._texture=new h}render(e,t){if(!(this.drawPhase&e.drawPhase))return;const{context:i,painter:r}=e;if(!t.isReady&&t instanceof s&&t.hasData)return;const o=this._getOutlineMesh(i);r.setPipelineState({color:{write:[!0,!0,!0,!0],blendMode:"composite"},depth:!1,stencil:!1});const n={shader:this.shaders.outline,uniforms:{config:{dvsMat3:t.transforms.displayViewScreenMat3,coordRange:[t.rangeX,t.rangeY],depth:0,color:this._color}},defines:void 0,optionalAttributes:void 0,useComputeBuffer:!1};r.submitDrawMeshUntyped(i,n,o);const h=this._texture.getTexture(i,t);r.setPipelineState({color:{write:[!0,!0,!0,!0],blendMode:"composite"},depth:!1,stencil:!1});const a={shader:this.shaders.tileInfo,uniforms:{config:{dvsMat3:t.transforms.displayViewScreenMat3,depth:0,coordRatio:[t.rangeX/t.width,t.rangeY/t.height],delta:[0,0],dimensions:[h.descriptor.width,h.descriptor.height],texture:{texture:h,unit:0}}},defines:void 0,optionalAttributes:void 0,useComputeBuffer:!1};r.submitDrawMesh(i,a,r.quadMesh)}shutdown(){this._outlineMesh=e(this._outlineMesh),this._texture.shutdown()}_getOutlineMesh(e){return this._outlineMesh||(this._outlineMesh=new i(e,{vertex:{geometry:{data:new Int8Array([0,0,1,0,1,1,0,1]),layout:[new d("position",2,u.BYTE,0,2)]}},groups:[{primitive:a.LINE_STRIP}],parts:[{group:0,start:0,count:4}]})),this._outlineMesh}}export{l as TileDebugInfoTechnique};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import e from"../../../../../../webgl/Texture.js";import{TextureDescriptor as t}from"../../../../../../webgl/TextureDescriptor.js";const n=512,o=512,s=16,l=8,i=(o-2*l)/5;class r{shutdown(){this._ctx=null}getTexture(r,c){if(!this._ctx){const e=document.createElement("canvas");e.width=n,e.height=o,this._ctx=e.getContext("2d")}if(!c.tileDebugInfoTexture){const s=new t(n,o);s.wrapMode=33071,s.samplingMode=9729,s.isImmutable=!0,c.tileDebugInfoTexture=new e(r,s)}const f=this._ctx;f.clearRect(0,0,f.canvas.width,f.canvas.height),f.textAlign="left",f.textBaseline="top",f.font=s-2+"px sans-serif",f.lineWidth=2,f.fillStyle="white",f.strokeStyle="black";const{debugSlot:x}=c;let a=l+i*x;const d=`${x}) ${c.key.id} (${c.constructor.name})`;f.strokeText(d,l,a),f.fillText(d,l,a),a+=s;const{debugInfo:g}=c;if(g){const{length:e,minOrderedLength:t,minUnorderedLength:n,triangleCount:o}=g.display;if(e>0){const t=`Length: ${e}`;f.strokeText(t,l,a),f.fillText(t,l,a),a+=s}if(t){const e=`Min ordered length: ${t}`;f.strokeText(e,l,a),f.fillText(e,l,a),a+=s}if(n){const e=`Min unordered length: ${n}`;f.strokeText(e,l,a),f.fillText(e,l,a),a+=s}if(o>0){o>1e5&&(f.fillStyle="red",f.strokeStyle="white");const e=`Triangle count: ${o}`;f.strokeText(e,l,a),f.fillText(e,l,a),a+=s}const{bytesUsed:i,bytesReserved:r}=g.memory;if(f.fillStyle="white",f.strokeStyle="black",i>0||r>0){const e=`Memory usage: ${i} of ${r} bytes`;f.strokeText(e,l,a),f.fillText(e,l,a),a+=s}}return c.tileDebugInfoTexture.setData(f.canvas),c.tileDebugInfoTexture}}export{r as TileDebugInfoTexture};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import{fromValues as e}from"../../../../../../../core/libs/gl-matrix-2/factories/vec4f32.js";import{Technique as s}from"../Technique.js";import{TileStencilShader as t}from"../shaders/TileStencilShader.js";class r extends s{constructor(){super(...arguments),this.type=34,this.drawPhase=211,this.shaders={tileStencil:new t},this._color=e(1,0,0,1)}render(e,s){if(!(this.drawPhase&e.drawPhase))return;const{context:t,painter:r}=e;r.setPipelineState({color:!1,depth:!1,stencil:{write:{mask:255},test:{compare:516,op:{fail:7680,zFail:7680,zPass:7681},mask:255}}});const i={shader:this.shaders.tileStencil,uniforms:{config:{dvsMat3:s.transforms.displayViewScreenMat3,coordRange:[s.rangeX,s.rangeY],depth:0,color:this._color}},defines:void 0,optionalAttributes:void 0,useComputeBuffer:!1};r.submitDrawMesh(t,i,r.quadMesh,{stencilRef:s.stencilRef})}}export{r as TileStencilTechnique};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{nextPowerOfTwo as t}from"../../../../../../../core/mathUtils.js";import{create as e}from"../../../../../../../core/libs/gl-matrix-2/factories/mat3f32.js";import{fromValues as r}from"../../../../../../../core/libs/gl-matrix-2/factories/vec4f32.js";import{getDefinesKey as s}from"../../../../vectorTiles/shaders/vtlMaterialUtils.js";import{vtlTextureBindingUnitSprites as o,vtlHighResCutoff as i}from"../../../definitions.js";import{Mesh as a}from"../../../meshing/Mesh.js";import{simplePipelineState as n}from"../../utils.js";import{Technique as l}from"../Technique.js";import{VTLShaderBackground as c}from"../shaders/vector-tiles/VTLShaderBackground.js";import{PrimitiveType as h}from"../../../../../../webgl/enums.js";class m extends l{constructor(){super(...arguments),this.type=
|
|
2
|
+
import{nextPowerOfTwo as t}from"../../../../../../../core/mathUtils.js";import{create as e}from"../../../../../../../core/libs/gl-matrix-2/factories/mat3f32.js";import{fromValues as r}from"../../../../../../../core/libs/gl-matrix-2/factories/vec4f32.js";import{getDefinesKey as s}from"../../../../vectorTiles/shaders/vtlMaterialUtils.js";import{vtlTextureBindingUnitSprites as o,vtlHighResCutoff as i}from"../../../definitions.js";import{Mesh as a}from"../../../meshing/Mesh.js";import{simplePipelineState as n}from"../../utils.js";import{Technique as l}from"../Technique.js";import{VTLShaderBackground as c}from"../shaders/vector-tiles/VTLShaderBackground.js";import{PrimitiveType as h}from"../../../../../../webgl/enums.js";class m extends l{constructor(){super(...arguments),this.type=37,this._color=r(1,0,0,1),this._patternMatrix=e(),this._mesh=null,this.shaders={background:new c}}render(r,a){if(0===a.tiles.length)return;this._loadResources(r);const{context:l,displayLevel:c,painter:h,spriteMosaic:m,state:u,styleLayer:d}=r,p=d,f=p.backgroundMaterial,g=p.getPaintValue("background-color",c),y=p.getPaintValue("background-opacity",c),M=p.getPaintValue("background-pattern",c),_=void 0!==M,b=1|window.devicePixelRatio;let x,v;const w=f.key+s({hasPattern:_}),j=b>i?2:1,k={layerInfo:{depth:p.z,coordRange:a.tiles[0].rangeX},tileInfo:{dvsMat:u.displayViewMat3},solidColor:null,pattern:null,patternMat:{mat:e()}};if(_){const t=m.getMosaicItemPosition(M,!0);if(null!=t){const{tl:e,br:r,page:s}=t;x=r[0]-e[0],v=r[1]-e[1];const i=m.getPageSize(s);null!=i&&(m.bind(l,9729,s,o),k.pattern={tlbr:[e[0],e[1],r[0],r[1]],mosaicSize:i,texture:{texture:m.getTexture(s),unit:o},opacity:y})}}else{const t=g[3]*y;this._color[0]=t*g[0],this._color[1]=t*g[1],this._color[2]=t*g[2],this._color[3]=t,k.solidColor={color:this._color}}h.setPipelineState(n);for(const e of a.tiles){if(k.tileInfo.dvsMat=e.transforms.displayViewScreenMat3,k.layerInfo.coordRange=e.rangeX,_){const r=Math.max(2**(Math.round(c)-e.key.level),1),s=j*e.width*r,o=s/t(x),i=s/t(v);this._patternMatrix[0]=o,this._patternMatrix[4]=i,k.patternMat={mat:this._patternMatrix}}const r={shader:this.shaders.background,uniforms:k,defines:{renderMode:_?1:0},optionalAttributes:f.getUsedAttributes(),useComputeBuffer:!1,precisionFactors:f.getPrecisionFactors(),materialKey:w};h.submitDrawMeshUntyped(l,r,this._mesh,{stencilRef:e.stencilRef})}}shutdown(){this._mesh&&(this._mesh.destroy(),this._mesh=null)}_loadResources(t){if(this._mesh)return;const{context:e,styleLayer:r}=t,s=r,o=new Int16Array([0,0,1,0,0,1,1,1]),i=s.backgroundMaterial.geometryLayout;if(!i)return;const n={vertex:{geometryVB:{data:o,layout:i}},groups:[{primitive:h.TRIANGLE_STRIP}],parts:[{group:0,start:0,count:4}]};this._mesh=new a(e,n)}}export{m as VTLTechniqueBackground};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{simplePipelineState as e}from"../../utils.js";import{Technique as t}from"../Technique.js";import{VTLShaderCircle as s}from"../shaders/vector-tiles/VTLShaderCircle.js";class l extends t{constructor(){super(...arguments),this.type=
|
|
2
|
+
import{simplePipelineState as e}from"../../utils.js";import{Technique as t}from"../Technique.js";import{VTLShaderCircle as s}from"../shaders/vector-tiles/VTLShaderCircle.js";class l extends t{constructor(){super(...arguments),this.type=38,this._mesh=null,this.shaders={circle:new s}}shutdown(){this._mesh&&(this._mesh.destroy(),this._mesh=null)}render(t,s){const{context:l,displayLevel:i,drawPhase:r,painter:n,requiredLevel:a,spriteMosaic:o,state:c,styleLayer:u,styleLayerUID:h}=t,{tiles:d}=s;if(!d.some(e=>e.layerData.get(h)?.circleIndexCount??!1))return;const p=u,{circleMaterial:f}=p,m=1.2,y=p.getPaintValue("circle-translate",i),M={transform:{dvsMat:null,displayMat:1===p.getPaintValue("circle-translate-anchor",i)?c.displayMat3:c.displayViewMat3},config:{circleTranslation:y,depth:p.z,antialiasingWidth:m,tileOpacity:1},radius:null,radiusMix:null,blur:null,blurMix:null,opacity:null,opacityMix:null,strokeOpacity:null,strokeOpacityMix:null,strokeWidth:null,strokeWidthMix:null,color:null,colorMix:null,strokeColor:null,strokeColorMix:null};let g=-1;for(const x of d){if(!x.layerData.has(h))continue;if(M.transform.dvsMat=x.transforms.displayViewScreenMat3,x.key.level!==g){g=x.key.level;const e=f.getUniforms();for(const t of e){const e=t.getValue(p,i,g,o);t.name in M&&(M[t.name]={value:e})}}const t=x.layerData.get(h);if(!t.circleIndexCount)continue;if(this._mesh=t.getMesh(l),!this._mesh)continue;const s=a!==x.key.level?514:516,c=a!==x.key.level?x.stencilRef:255;M.config.tileOpacity=1===r?x.fader.value():1,n.setPipelineState({...e,stencil:{write:!1,test:{compare:s,op:{fail:7680,zFail:7680,zPass:7681},mask:255}}});const u={shader:this.shaders.circle,uniforms:M,defines:null,optionalAttributes:f.getUsedAttributes(),useComputeBuffer:!1,precisionFactors:f.getPrecisionFactors()};n.submitDrawMeshUntyped(l,u,this._mesh,{stencilRef:c}),x.triangleCount+=t.circleIndexCount/3}}}export{l as VTLTechniqueCircle};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{getDefinesKey as t}from"../../../../vectorTiles/shaders/vtlMaterialUtils.js";import{vtlTextureBindingUnitSprites as e,vtlHighResCutoff as i}from"../../../definitions.js";import{Technique as l}from"../Technique.js";import{VTLShaderFill as s}from"../shaders/vector-tiles/VTLShaderFill.js";import{VTLShaderOutline as n}from"../shaders/vector-tiles/VTLShaderOutline.js";const a=1/65536;class o extends l{constructor(){super(...arguments),this.type=
|
|
2
|
+
import{getDefinesKey as t}from"../../../../vectorTiles/shaders/vtlMaterialUtils.js";import{vtlTextureBindingUnitSprites as e,vtlHighResCutoff as i}from"../../../definitions.js";import{Technique as l}from"../Technique.js";import{VTLShaderFill as s}from"../shaders/vector-tiles/VTLShaderFill.js";import{VTLShaderOutline as n}from"../shaders/vector-tiles/VTLShaderOutline.js";const a=1/65536;class o extends l{constructor(){super(...arguments),this.type=39,this._fillMesh=null,this._outlineMesh=null,this.shaders={fill:new s,outline:new n}}shutdown(){this._fillMesh&&(this._fillMesh.destroy(),this._fillMesh=null),this._outlineMesh&&(this._outlineMesh.destroy(),this._outlineMesh=null)}render(t,e){const{displayLevel:i,is3D:l,renderPass:s,spriteMosaic:n,styleLayer:a,styleLayerUID:o}=t,{tiles:r}=e;let u=!1;for(const P of r)if(P.layerData.has(o)){const t=P.layerData.get(o);if(t.fillIndexCount>0||t.outlineIndexCount>0){u=!0;break}}if(!u)return;const c=a,f=c.getPaintProperty("fill-pattern"),p=void 0!==f,h=p&&f.isDataDriven;let d;if(p&&!h){const t=f.getValue(i);d=n.getMosaicItemPosition(t,!0)}const y=!p&&c.getPaintValue("fill-antialias",i);let M=!l||p,g=1;if(!p){const t=c.getPaintProperty("fill-color"),e=c.getPaintProperty("fill-opacity");if(!t?.isDataDriven&&!e?.isDataDriven){const t=c.getPaintValue("fill-color",i);g=c.getPaintValue("fill-opacity",i)*t[3],g<1&&(M=!0)}}if(M&&"opaque"===s)return;const m=c.getPaintValue("fill-translate",i),v=c.getPaintValue("fill-translate-anchor",i);("opaque"===s&&!M||"translucent"===s&&M)&&this._drawFill(t,o,c,r,m,v,p,d,h);const x=!c.hasDataDrivenOutlineColor&&c.outlineUsesFillColor&&g<1;y&&"translucent"===s&&!x&&this._drawOutline(t,o,c,r,m,v)}_drawFill(l,s,n,o,r,u,c,f,p){if(c&&!p&&null==f)return;const{context:h,displayLevel:d,drawPhase:y,is3D:M,state:g,painter:m,pixelRatio:v,spriteMosaic:x}=l,P=v>i?2:1,D=n.fillMaterial,w={transform:{dvsMat:null,displayMat:1===u?g.displayMat3:g.displayViewMat3},config:{depth:n.z+a,fillTranslation:r,tileOpacity:1},patternOptions:p||c&&null!=f?{mosaicSize:[0,0],patternFactor:1,tlbr:[0,0,0,0],texture:{texture:null,unit:0}}:null,color:null,opacity:null,colorMix:null,opacityMix:null},_=c?1:0,b=D.key+t({hasPattern:c});if(null!=f){const{page:t,tl:i,br:l}=f,s=i[0],n=l[1],a=l[0],o=i[1],r=x.getPageSize(t);null!=r&&(x.bind(h,9729,t,e),w.patternOptions={mosaicSize:[r[0],r[1]],patternFactor:1,tlbr:[s,n,a,o],texture:{texture:x.getTexture(t),unit:e}})}if(M){const t=h.getPipelineState(),{depthWrite:e}=t;let i=0,l=1;void 0!==e?.zNear&&void 0!==e.zFar&&(i=e.zNear,l=e.zFar),m.setPipelineState({color:{write:[!0,!0,!0,!0],blendMode:"composite"},stencil:!1,depth:{write:{zNear:i,zFar:l},test:515}})}let F=-1;for(const t of o){if(!t.layerData.has(s))continue;if(t.key.level!==F){F=t.key.level;const e=D.getUniforms();for(const t of e){const e=t.getValue(n,d,F,x);w[t.name]={value:e}}if(c&&null!=w.patternOptions){const e=Math.max(2**(Math.round(d)-t.key.level),1),i=t.rangeX/(P*t.width*e);w.patternOptions.patternFactor=i}}const i=t.layerData.get(s);if(this._fillMesh=i.getMesh(h,{value:0}),!this._fillMesh)continue;const{transform:l,config:a}=w;l.dvsMat=t.transforms.displayViewScreenMat3,a.tileOpacity=1===y?t.fader.value():1;const o={shader:this.shaders.fill,uniforms:w,defines:{fillType:_},optionalAttributes:D.getUsedAttributes(),useComputeBuffer:!1,precisionFactors:D.getPrecisionFactors(),materialKey:b};if(p){const l=w.patternOptions,s=i.patternMap;if(!s||null==l)continue;let n=0;for(const[i,a]of s){const s=x.getPageSize(i);null!=s&&(x.bind(h,9729,i,e),l.mosaicSize=s,l.texture={texture:x.getTexture(i),unit:e},m.submitDrawMeshUntyped(h,o,this._fillMesh,{stencilRef:t.stencilRef,parts:[n++]}))}}else m.submitDrawMeshUntyped(h,o,this._fillMesh,{stencilRef:t.stencilRef});t.triangleCount+=i.fillIndexCount/3}}_drawOutline(t,e,i,l,s,n){const{context:o,displayLevel:r,drawPhase:u,state:c,spriteMosaic:f,painter:p,pixelRatio:h}=t,d=i.outlineMaterial,y=d.key,M=.75/h,g={transform:{dvsMat3:null,displayMat3:1===n?c.displayMat3:c.displayViewMat3},config:{depth:i.z+a,fillTranslation:s,outlineWidth:M,tileOpacity:1},color:null,opacity:null,colorMix:null,opacityMix:null};let m=-1;for(const a of l){if(!a.layerData.has(e))continue;if(a.key.level!==m){m=a.key.level;const t=d.getUniforms();for(const e of t){const t=e.getValue(i,r,m,f);e.name in g&&(g[e.name]={value:t})}}const t=a.layerData.get(e);if(this._outlineMesh=t.getMesh(o,{value:1}),null==this._outlineMesh)continue;const{transform:l,config:s}=g;l.dvsMat3=a.transforms.displayViewScreenMat3,s.tileOpacity=1===u?a.fader.value():1;const n={shader:this.shaders.outline,uniforms:g,defines:{},optionalAttributes:d.getUsedAttributes(),useComputeBuffer:!1,precisionFactors:d.getPrecisionFactors(),materialKey:y};p.submitDrawMeshUntyped(o,n,this._outlineMesh,{stencilRef:a.stencilRef}),a.triangleCount+=t.outlineIndexCount/3}}}export{o as VTLTechniqueFill};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{getDefinesKey as e}from"../../../../vectorTiles/shaders/vtlMaterialUtils.js";import{vtlTextureBindingUnitSprites as t}from"../../../definitions.js";import{Technique as i}from"../Technique.js";import{VTLShaderLine as s}from"../shaders/vector-tiles/VTLShaderLine.js";class n extends i{constructor(){super(...arguments),this.type=
|
|
2
|
+
import{getDefinesKey as e}from"../../../../vectorTiles/shaders/vtlMaterialUtils.js";import{vtlTextureBindingUnitSprites as t}from"../../../definitions.js";import{Technique as i}from"../Technique.js";import{VTLShaderLine as s}from"../shaders/vector-tiles/VTLShaderLine.js";class n extends i{constructor(){super(...arguments),this.type=40,this._mesh=null,this.shaders={line:new s}}shutdown(){this._mesh&&(this._mesh.destroy(),this._mesh=null)}render(i,s){const{context:n,displayLevel:l,drawPhase:a,is3D:o,painter:r,pixelRatio:u,spriteMosaic:c,state:p,styleLayer:f,styleLayerUID:d}=i,{tiles:h}=s;if(!h.some(e=>e.layerData.get(d)?.lineIndexCount??!1))return;const m=f,y=m.lineMaterial,g=m.getPaintValue("line-translate",l),M=m.getPaintValue("line-translate-anchor",l),x=1/u,v={layerInfo:{displayViewMat3:p.displayViewMat3,displayMat3:1===M?p.displayMat3:p.displayViewMat3,lineTranslation:g,depth:m.z,antialiasing:x},tileInfo:{dvsMat3:null,zoomFactor:1,tileOpacity:1},page:null,color:null,width:null,opacity:null,blur:null,offset:null,colorMix:null,widthMix:null,opacityMix:null,blurMix:null,offsetMix:null,tlbr:null},w=m.getPaintProperty("line-pattern"),P=void 0!==w,D=P&&w.isDataDriven;let V,b;if(P&&!D){const e=w.getValue(l);V=c.getMosaicItemPosition(e)}let z=!1;if(!P){const e=m.getPaintProperty("line-dasharray");if(b=void 0!==e,z=b&&e.isDataDriven,b&&!z){const t=e.getValue(l),i=m.getDashKey(t,m.getLayoutValue("line-cap",l));if(V=c.getMosaicItemPosition(i),null==V)return}}const I=P?1:b?2:0,T=y.key+e({lineType:I});if(null!=V){const{page:e}=V,i=c.getPageSize(e);if(null!=i){c.bind(n,9729,e,t);const s={texture:{texture:c.getTexture(e),unit:t},mosaicSize:[i[0],i[1]]};v.page=s}}o||r.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}});const{tileInfo:_}=v;let S=-1;for(const e of h){if(!e.layerData.has(d))continue;if(_.dvsMat3=e.transforms.displayViewScreenMat3,e.key.level!==S){S=e.key.level;const t=y.getUniforms();for(const e of t){const t=e.getValue(m,l,S,c);e.name in v&&(v[e.name]={value:t})}}const i=2**(l-S)/u;_.zoomFactor=i;const s=e.layerData.get(d);if(!s.lineIndexCount)continue;if(this._mesh=s.getMesh(n),!this._mesh)continue;_.tileOpacity=1===a?e.fader.value():1;const o={shader:this.shaders.line,uniforms:v,defines:{lineType:I},optionalAttributes:y.getUsedAttributes(),useComputeBuffer:!1,precisionFactors:y.getPrecisionFactors(),materialKey:T};if(D||z){const i=s.patternMap;if(!i)continue;let l=0;for(const s of i.keys()){const i=c.getPageSize(s);null!=i&&(c.bind(n,9729,s,t),v.page={texture:{texture:c.getTexture(s),unit:t},mosaicSize:[i[0],i[1]]},r.submitDrawMeshUntyped(n,o,this._mesh,{stencilRef:e.stencilRef,parts:[l++]}))}}else r.submitDrawMeshUntyped(n,o,this._mesh,{stencilRef:e.stencilRef});e.triangleCount+=s.lineIndexCount/3}}}export{n as VTLTechniqueLine};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{fadeDuration as e}from"../../../../vectorTiles/decluttering/config.js";import{getDefinesKey as t}from"../../../../vectorTiles/shaders/vtlMaterialUtils.js";import{vtlTextureBindingUnitSprites as i,vtlTextureBindingUnitGlyphs as a}from"../../../definitions.js";import{degToByte as l}from"../../../GeometryUtils.js";import{Technique as n}from"../Technique.js";import{VTLShaderIcon as s}from"../shaders/vector-tiles/VTLShaderIcon.js";import{VTLShaderText as o}from"../shaders/vector-tiles/VTLShaderText.js";const r=1/65536;class c extends n{constructor(){super(...arguments),this.type=
|
|
2
|
+
import{fadeDuration as e}from"../../../../vectorTiles/decluttering/config.js";import{getDefinesKey as t}from"../../../../vectorTiles/shaders/vtlMaterialUtils.js";import{vtlTextureBindingUnitSprites as i,vtlTextureBindingUnitGlyphs as a}from"../../../definitions.js";import{degToByte as l}from"../../../GeometryUtils.js";import{Technique as n}from"../Technique.js";import{VTLShaderIcon as s}from"../shaders/vector-tiles/VTLShaderIcon.js";import{VTLShaderText as o}from"../shaders/vector-tiles/VTLShaderText.js";const r=1/65536;class c extends n{constructor(){super(...arguments),this.type=41,this._iconMesh=null,this._textMesh=null,this.shaders={icon:new s,text:new o}}shutdown(){this._iconMesh&&(this._iconMesh.destroy(),this._iconMesh=null),this._textMesh&&(this._textMesh.destroy(),this._textMesh=null)}render(e,t){const{painter:i}=e,a=e.styleLayer,{tiles:l}=t,n=i.getPipelineState();this._setRenderState(e),this._drawIcons(e,a,l),this._drawText(e,a,l),i.setPipelineState(n)}_drawIcons(t,a,n){const{context:s,displayLevel:o,drawPhase:r,spriteMosaic:c,state:u,styleLayerUID:h}=t,p=a.iconMaterial;let y,d=!1;for(const e of n)if(e.layerData.has(h)&&(y=e.layerData.get(h),y.iconPerPageElementsMap.size>0)){d=!0;break}if(!d)return;const g=a.getPaintValue("icon-translate",o),f=a.getPaintValue("icon-translate-anchor",o);let m=a.getLayoutValue("icon-rotation-alignment",o);2===m&&(m=0===a.getLayoutValue("symbol-placement",o)?1:0);const M=0===m,x=a.getLayoutValue("icon-keep-upright",o)&&M,P=y.isIconSDF,v={transform:{dvsMat3:null,displayViewMat3:0===m?u.displayViewMat3:u.displayMat3,displayMat3:1===f?u.displayMat3:u.displayViewMat3,mapRotation:l(u.rotation)},config:{depth:a.z,iconTranslation:g,level:10*o,keepUpright:x?1:0,fadeDuration:e/1e3,isStencilPass:t.stencilSymbols?1:0,time:null,tileOpacity:1},page:{mosaicSize:null,texture:{texture:null,unit:i}},color:null,opacity:null,haloBlur:null,haloColor:null,haloWidth:null,size:null,colorMix:null,opacityMix:null,haloBlurMix:null,haloColorMix:null,haloWidthMix:null,sizeMix:null};let w=-1;for(const e of n){if(!e.layerData.has(h))continue;if(e.key.level!==w){w=e.key.level;const t=p.getUniforms();for(const e of t){const t=e.getValue(a,o,w,c);v[e.name]={value:t}}}if(y=e.layerData.get(h),0===y.iconPerPageElementsMap.size)continue;if(this._iconMesh=y.getMesh(s,{value:0}),!this._iconMesh)continue;y.updateOpacityInfo(),v.transform.dvsMat3=e.transforms.displayViewScreenMat3,v.config.time=(performance.now()-y.lastOpacityUpdate)/1e3,v.config.tileOpacity=1===r?e.fader.value():1;let i=0;for(const[a,l]of y.iconPerPageElementsMap)this._renderIconRange(t,p,l,a,e,v,this._iconMesh,P,i++)}}_drawText(t,i,n){const{context:s,displayLevel:o,drawPhase:c,glyphMosaic:u,spriteMosaic:h,pixelRatio:p,state:y,styleLayerUID:d,requestRender:g,allowDelayedRender:f}=t,m=i.textMaterial;let M,x=!1;for(const e of n)if(e.layerData.has(d)&&(M=e.layerData.get(d),M.glyphPerPageElementsMap.size>0)){x=!0;break}if(!x)return;const P=i.getPaintProperty("text-opacity");if(P&&!P.isDataDriven&&0===P.getValue(o))return;const v=i.getPaintProperty("text-color"),w=v&&v.getValue(o),D=!v||v.isDataDriven||w&&4===w.length&&w[3]>0,_=i.getPaintProperty("text-halo-width"),V=i.getPaintProperty("text-halo-color"),S=V&&V.getValue(o),z=(!_||_.isDataDriven||_.getValue(o)>0)&&(!V||V.isDataDriven||S&&4===S.length&&S[3]>0);if(!D&&!z)return;const b=24/8;let R=i.getLayoutValue("text-rotation-alignment",o);2===R&&(R=0===i.getLayoutValue("symbol-placement",o)?1:0);const T=0===R,U=i.getLayoutValue("text-keep-upright",o)&&T,k=.8*b/p;this._glyphTextureSize||(this._glyphTextureSize=[u.width/4,u.height/4]);const L=i.getPaintValue("text-translate",o),I=i.getPaintValue("text-translate-anchor",o);if(f&&null!=g)return void g();const C={transform:{dvsMat3:null,displayViewMat3:0===R?y.displayViewMat3:y.displayMat3,displayMat3:1===I?y.displayMat3:y.displayViewMat3,mapRotation:l(y.rotation)},config:{depth:i.z+r,textTranslation:L,keepUpright:U?1:0,level:10*o,fadeDuration:e/1e3,antialiasingWidth:k,time:null,halo:null,isStencilPass:t.stencilSymbols?1:0,tileOpacity:1},page:{mosaicSize:null,texture:{texture:null,unit:a}},size:null,color:null,haloColor:null,opacity:null,haloWidth:null,haloBlur:null,sizeMix:null,colorMix:null,haloColorMix:null,opacityMix:null,haloWidthMix:null,haloBlurMix:null};let O=-1;for(const e of n){if(!e.layerData.has(d))continue;if(e.key.level!==O){O=e.key.level;const t=m.getUniforms();for(const e of t){const t=e.getValue(i,o,O,h);e.name in C&&(C[e.name]={value:t})}}if(M=e.layerData.get(d),0===M.glyphPerPageElementsMap.size)continue;if(C.transform.dvsMat3=e.transforms.displayViewScreenMat3,C.config.time=(performance.now()-M.lastOpacityUpdate)/1e3,C.config.tileOpacity=1===c?e.fader.value():1,this._textMesh=M.getMesh(s,{value:1}),!this._textMesh)continue;M.updateOpacityInfo();let a=0;M.glyphPerPageElementsMap.forEach((i,l)=>{this._renderGlyphRange(t,i,l,z,D,e,C,m,this._textMesh,a++)})}}_renderIconRange(e,a,l,n,s,o,r,c,u){const{context:h,is3D:p,painter:y,spriteMosaic:d}=e,g={iconType:c?1:0},f=a.key+t(g);d.bind(h,9729,n,i),o.page={mosaicSize:[d.getWidth(n)/4,d.getHeight(n)/4],texture:{texture:d.getTexture(n),unit:i}};const m={shader:this.shaders.icon,uniforms:o,defines:g,optionalAttributes:a.getUsedAttributes(),useComputeBuffer:!1,precisionFactors:a.getPrecisionFactors(),materialKey:f};y.submitDrawMeshUntyped(h,m,r,{stencilRef:p?s.stencilRef:255,parts:[u]}),s.triangleCount+=l[1]/3}_renderGlyphRange(e,t,i,l,n,s,o,r,c,u){const{context:h,is3D:p,painter:y,glyphMosaic:d}=e;d.bind(h,9729,i,a),o.page={mosaicSize:this._glyphTextureSize,texture:{texture:d.getTexture(h,i),unit:a}};const g={shader:this.shaders.text,uniforms:o,defines:null,optionalAttributes:r.getUsedAttributes(),useComputeBuffer:!1,precisionFactors:r.getPrecisionFactors(),materialKey:r.key};l&&(o.config.halo=1,y.submitDrawMeshUntyped(h,g,c,{stencilRef:p?s.stencilRef:255,parts:[u]}),s.triangleCount+=t[1]/3),n&&(o.config.halo=0,y.submitDrawMeshUntyped(h,g,c,{stencilRef:p?s.stencilRef:255,parts:[u]}),s.triangleCount+=t[1]/3)}_setRenderState(e){const{is3D:t,painter:i,stencilSymbols:a}=e;i.setPipelineState({color:{write:[!a,!a,!a,!a],blendMode:a?"none":"composite"},stencil:{write:!!a&&{mask:255},test:{compare:a?519:t?514:516,op:{fail:7680,zFail:7680,zPass:7681},mask:255}},depth:{write:!1,test:515}})}}export{c as VTLTechniqueSymbol};
|
package/views/2d/engine/webgl/shaderGraph/techniques/videoScreenRenderer/VideoScreenTechnique.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{destroyMaybe as e}from"../../../../../../../core/maybe.js";import{Mesh as t}from"../../../meshing/Mesh.js";import{simplePipelineState as r}from"../../utils.js";import{Technique as s}from"../Technique.js";import{VideoScreenShader as o}from"../shaders/VideoScreenShader.js";import{PrimitiveType as n,DataType as i}from"../../../../../../webgl/enums.js";import{VertexElementDescriptor as m}from"../../../../../../webgl/VertexElementDescriptor.js";class c extends s{constructor(){super(...arguments),this.type=
|
|
2
|
+
import{destroyMaybe as e}from"../../../../../../../core/maybe.js";import{Mesh as t}from"../../../meshing/Mesh.js";import{simplePipelineState as r}from"../../utils.js";import{Technique as s}from"../Technique.js";import{VideoScreenShader as o}from"../shaders/VideoScreenShader.js";import{PrimitiveType as n,DataType as i}from"../../../../../../webgl/enums.js";import{VertexElementDescriptor as m}from"../../../../../../webgl/VertexElementDescriptor.js";class c extends s{constructor(){super(...arguments),this.type=36,this._mesh=null,this.shaders={geometry:new o}}render(e,t){const{context:s,painter:o}=e,{texture:n,textureCoords:i}=t,m=this._getMesh(e),c=t.ndcRect[2],a=t.ndcRect[3],h=t.ndcRect[0],u=t.ndcRect[1],d=new Float32Array(180);for(let r=0;r<6;r++){const e=a*r/5;for(let t=0;t<6;t++){const s=c*t/5,{u:o,v:n}=i[6*r+t];d[5*(6*r+t)]=h+s,d[5*(6*r+t)+1]=u-e,d[5*(6*r+t)+2]=o,d[5*(6*r+t)+3]=n,d[5*(6*r+t)+4]=1}}m.vertexBuffers.get("geometry")?.setData(d);const p={texture:{texture:n,unit:0},opacity:t.opacity},l={shader:this.shaders.geometry,uniforms:{config:p},defines:{},optionalAttributes:null,useComputeBuffer:!1};o.setPipelineState(r),o.submitDrawMeshUntyped(s,l,m)}shutdown(){e(this._mesh)}_getMesh(e){const{context:r}=e,s=new Uint32Array(150);for(let t=0;t<5;t++)for(let e=0;e<5;e++){const r=6*(5*t+e),o=6*(t+1)+e+1,n=o-1,i=o-6,m=o-7;s[r]=o,s[r+1]=n,s[r+2]=i,s[r+3]=n,s[r+4]=m,s[r+5]=i}return this._mesh||(this._mesh=new t(r,{vertex:{geometry:{data:new Float32Array(180),layout:[new m("position",2,i.FLOAT,0,20),new m("texcoord",2,i.FLOAT,8,20),new m("w",1,i.FLOAT,16,20)]}},index:{index:{data:s}},groups:[{primitive:n.TRIANGLES,index:"index"}],parts:[{group:0,start:0,count:s.length}]})),this._mesh}}export{c as VideoScreenTechnique};
|