@arcgis/core 5.1.0-next.78 → 5.1.0-next.79
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/analysis/ShadowCast/DiscreteOptions.d.ts +33 -6
- package/analysis/ShadowCast/DiscreteOptions.js +1 -1
- package/analysis/ShadowCast/MinDurationOptions.d.ts +6 -4
- package/analysis/ShadowCast/TotalDurationOptions.d.ts +33 -6
- package/analysis/ShadowCast/TotalDurationOptions.js +1 -1
- package/analysis/ShadowCast/colorStopsUtils.js +2 -0
- package/analysis/ShadowCastAnalysis.d.ts +24 -1
- package/analysis/ShadowCastAnalysis.js +1 -1
- package/analysis/Viewshed.d.ts +27 -0
- package/analysis/Viewshed.js +1 -1
- package/analysis/ViewshedAnalysis.js +1 -1
- package/arcade/FunctionWrapper.js +1 -1
- package/arcade/arcadeAsyncRuntime.js +1 -1
- package/arcade/arcadeCompiler.js +1 -1
- package/arcade/arcadeRuntime.js +1 -1
- package/arcade/compilerUtils.js +1 -1
- package/arcade/debug.d.ts +139 -0
- package/arcade/debug.js +2 -0
- package/arcade/featureSetCollection.js +1 -1
- package/arcade/featureSetUtils.js +1 -1
- package/arcade/featureset/actions/GroupBy.js +1 -1
- package/arcade/featureset/actions/OrderBy.js +1 -1
- package/arcade/functions/featuresetstring.js +1 -1
- package/arcade/languageUtils.js +1 -1
- package/arcade.d.ts +46 -2
- package/arcade.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{1c7183551f5269bdcf13.js → 01bd1b86ba899c6aa4c0.js} +1 -1
- package/assets/esri/core/workers/chunks/{1f8ccf96069ac3a40c3d.js → 01ee18782a50279f907e.js} +1 -1
- package/assets/esri/core/workers/chunks/{f81c6f6ccc201f584970.js → 022067e807905cabeaa1.js} +1 -1
- package/assets/esri/core/workers/chunks/{11ea4be441a26134ce1f.js → 052cdc7aaa803b5873f0.js} +1 -1
- package/assets/esri/core/workers/chunks/{b7bb7072dbee978f3ca3.js → 056fd7847caaff2c9514.js} +1 -1
- package/assets/esri/core/workers/chunks/{8acee3fba488f202f82f.js → 05c3146d87d917606193.js} +1 -1
- package/assets/esri/core/workers/chunks/{a8ca5d8740cc7e39197b.js → 0aebcbf41cb193e76809.js} +5 -5
- package/assets/esri/core/workers/chunks/{54023458195549f66215.js → 0b77c124b743067e4155.js} +1 -1
- package/assets/esri/core/workers/chunks/10408183681fd6c7b4ed.js +2 -0
- package/assets/esri/core/workers/chunks/{7595ceba529ed01c7590.js → 2c87c3112a43db8624f6.js} +1 -1
- package/assets/esri/core/workers/chunks/{13e60f19f436b8d683ae.js → 3c9482764c9e4f8bcbb0.js} +1 -1
- package/assets/esri/core/workers/chunks/{322c54081b25f1c53661.js → 3e37019eee1c49d2bf64.js} +1 -1
- package/assets/esri/core/workers/chunks/45c83eb7c2a06166e3b0.js +1 -0
- package/assets/esri/core/workers/chunks/48acd146bf0241d87647.js +1 -0
- package/assets/esri/core/workers/chunks/5818f1f526577068d6ca.js +2 -0
- package/assets/esri/core/workers/chunks/{34fe97bcacc0dfc5bce6.js → 5ccc325d83cec4f5ccdb.js} +1 -1
- package/assets/esri/core/workers/chunks/{30e710ec4d22c43d4e7e.js → 5cffc7b49966201eccdb.js} +1 -1
- package/assets/esri/core/workers/chunks/{1a87e9bbd85ba29b1514.js → 5da2051f548c2942e01a.js} +1 -1
- package/assets/esri/core/workers/chunks/5ec66e39e53c11e75179.js +2 -0
- package/assets/esri/core/workers/chunks/{0b1454a77a6a682541dc.js.LICENSE.txt → 5ec66e39e53c11e75179.js.LICENSE.txt} +9 -1
- package/assets/esri/core/workers/chunks/5f6fd20a7f4e80eafa25.js +1 -0
- package/assets/esri/core/workers/chunks/{abc06d10c7ac8ba5b0e4.js → 67ec1694d6e18b7c234c.js} +1 -1
- package/assets/esri/core/workers/chunks/{32e22d6eee9fed1f70b0.js → 6d696beddcc5fbed5875.js} +1 -1
- package/assets/esri/core/workers/chunks/{f590b60fca607d66001a.js → 716a4d7e8b908b81870b.js} +1 -1
- package/assets/esri/core/workers/chunks/71fe127734f33d020a44.js +1 -0
- package/assets/esri/core/workers/chunks/7cdd0492b2191df95102.js +2 -0
- package/assets/esri/core/workers/chunks/7cea68257d24ffd205bb.js +1 -0
- package/assets/esri/core/workers/chunks/7e530e635325dba07864.js +1 -0
- package/assets/esri/core/workers/chunks/8f6f5dad52747d252aac.js +596 -0
- package/assets/esri/core/workers/chunks/{d950d5c2844206502ff0.js → 992cd87ba0ab6346f692.js} +1 -1
- package/assets/esri/core/workers/chunks/{73c87eb9bd8f0f848481.js → 9c11e1fe785e1385fdb1.js} +1 -1
- package/assets/esri/core/workers/chunks/{5ed8d8b5336c81fbcda3.js → 9d216e30d04ea21fc8a2.js} +1 -1
- package/assets/esri/core/workers/chunks/a54aa93b6012a2597f82.js +1 -0
- package/assets/esri/core/workers/chunks/{cf14b3a44705dacefac4.js → a9b5ce00323cd5574bf7.js} +1 -1
- package/assets/esri/core/workers/chunks/ae6b3dfe5f757df539d6.js +1 -0
- package/assets/esri/core/workers/chunks/b14c4c3f295970f731ab.js +1 -0
- package/assets/esri/core/workers/chunks/{c70df6ed190f9ebcf6aa.js → bf2c202dec5ab7bc770b.js} +1 -1
- package/assets/esri/core/workers/chunks/c1d4110aa494a1dba3c4.js +1 -0
- package/assets/esri/core/workers/chunks/{85d8c7cc7f8decbe975d.js → c442916805975744dd92.js} +1 -1
- package/assets/esri/core/workers/chunks/dacc2e5fa462495ed1cc.js +2 -0
- package/assets/esri/core/workers/chunks/f227b34cce6843df0fb6.js +1 -0
- package/assets/esri/core/workers/chunks/{dda2cb5c073d1e65f14f.js → f43d628d47eec7d530c7.js} +1 -1
- package/assets/esri/core/workers/chunks/f7531aa69a87814c60d1.js +1 -0
- package/assets/esri/core/workers/chunks/{4ccb56333de0247dcb6f.js → fb100935fd8948d779f5.js} +1 -1
- package/assets/esri/core/workers/chunks/{5ee4b630ad39c21d11db.js → fb9e3e7cd532ac4353f1.js} +12 -12
- package/assets/esri/core/workers/chunks/fc6ca7ffb9f1b875059c.js +1 -0
- package/assets/esri/core/workers/chunks/{3d9fcbe95dd22dbe730e.js → ffc4f3406ce383b9bd88.js} +1 -1
- package/assets/esri/themes/base/widgets/_BatchAttributeForm.scss +6 -0
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ar.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bg.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bs.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ca.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_cs.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_da.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_de.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_el.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_es.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_et.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fi.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fr.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_he.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hr.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hu.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_id.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_it.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ja.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ko.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lt.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lv.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_nl.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_no.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pl.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-BR.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-PT.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ro.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ru.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sk.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sl.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sr.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sv.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_th.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_tr.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_uk.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_vi.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-CN.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-HK.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-TW.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_ar.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_bg.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_bs.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_ca.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_cs.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_da.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_de.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_el.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_es.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_et.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_fi.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_fr.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_he.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_hr.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_hu.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_id.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_it.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_ja.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_ko.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_lt.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_lv.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_nl.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_no.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_pl.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_pt-BR.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_pt-PT.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_ro.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_ru.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_sk.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_sl.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_sr.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_sv.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_th.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_tr.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_uk.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_vi.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_zh-CN.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_zh-HK.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_zh-TW.json +1 -1
- package/chunks/ImageMaterial.glsl.js +7 -5
- package/chunks/SlicePlaneMaterial.glsl.js +21 -13
- package/chunks/arcade.js +1 -1
- package/chunks/languageUtils.js +1 -1
- package/config.js +1 -1
- package/core/MapUtils.js +1 -1
- package/core/arrayUtils.js +1 -1
- package/kernel.js +1 -1
- package/layers/IntegratedMeshLayer.d.ts +18 -14
- package/layers/SceneLayer.d.ts +35 -1
- package/layers/SceneLayer.js +1 -1
- package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
- package/layers/scene/ModelFileInfo.d.ts +29 -0
- package/layers/scene/ModelFileInfo.js +2 -0
- package/layers/scene/ModelInfo.d.ts +38 -0
- package/layers/scene/ModelInfo.js +2 -0
- package/layers/scene/modelQuerySupport.js +2 -0
- package/layers/scene/types.d.ts +14 -0
- package/layers/support/infoFor3D.js +1 -1
- package/layers/support/serviceCapabilitiesUtils.js +1 -1
- package/layers/types.d.ts +13 -1
- package/package.json +3 -3
- package/popup/Features.d.ts +1 -6
- package/popup/Features.js +1 -1
- package/popup/actions.js +1 -1
- package/renderers/visualVariables/support/ColorStop.js +1 -1
- package/support/arcadeUtils.js +1 -1
- package/support/revision.js +1 -1
- package/views/2d/engine/flow/styles/Imagery.js +1 -1
- package/views/2d/engine/flow/styles/Particles.js +1 -1
- package/views/2d/engine/flow/styles/Streamlines.js +1 -1
- package/views/2d/engine/vectorTiles/Placement.js +1 -1
- package/views/2d/engine/vectorTiles/TextShaping.js +1 -1
- package/views/2d/engine/webgl/AttributeStoreView.js +1 -1
- package/views/2d/engine/webgl/GlyphMosaic.js +1 -1
- package/views/2d/engine/webgl/GlyphSource.js +1 -1
- package/views/2d/engine/webgl/Overlay.js +1 -1
- package/views/2d/engine/webgl/OverlayMultipoint.js +1 -1
- package/views/2d/engine/webgl/RenderingDevice.js +1 -1
- package/views/2d/engine/webgl/TextureManager.js +1 -1
- package/views/2d/engine/webgl/mesh/templates/shapingUtils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/GLSLShaderModule.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/GraphShaderModule.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/graph/ShaderGraphContext.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/TechniqueProgramCache.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/TestTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/TextureStatisticsTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AAnimatedShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimationUniformInfo.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/bitmap/BitmapTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/blend/BlendTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/bloom/BloomTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/blur/BlurTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/clip/ClipTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/colorize/ColorizeTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityPointShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityPolygonShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/drop-shadow/DropShadowTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/featureTechniqueUtils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/ComplexFillTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/ComplexOutlineFillTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/FillTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/GradientFillTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/OutlineFillTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternFillTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternOutlineFillTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/flow/FlowTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/grid/GridTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/heatmap/HeatmapTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/line/GradientStrokeTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/line/LineTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/line/TexturedLineTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/magnifier/MagnifierTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/opacity/OpacityTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/overlay/OverlayTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/pieChart/PieChartShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/pieChart/PieChartTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/RasterColorizerTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/RasterHighlightTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/VectorFieldTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/AspectTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/BandArithmeticTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/BaseRasterProcessorTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/ColormapToRGBTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/CompositeBandTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/ComputeChangeTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/ContrastBrightnessTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/ConvolutionTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/CurvatureTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/ExtractBandTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/FocalStatisticsTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/GrayscaleTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/HillshadeTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/LocalTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/MaskTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/NDVITechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/RemapTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/ReprojectTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/ShadedReliefTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/SlopeTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/SpectralConversionTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/StretchTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/AFeatureShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/BitmapShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/BlendShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/BlitShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/BloomShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/BlurShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/ColorizeShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/ComplexFillShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/ComplexOutlineFillShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/DropShadowShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/EntityStorage.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/GradientFillShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/GradientStrokeShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/HeatmapAccumulateShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/HeatmapResolveShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/MagnifierShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/MosaicInfo.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/OpacityShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/OverlayShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/PatternFillShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/PatternOutlineFillShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TextureStatisticsDiffShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TextureStatisticsMinMaxSumShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TextureStatisticsStdDevShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TextureStatisticsSumOfSquaredDiffShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TexturedLineShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TileDebugInfoShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/VideoScreenShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/flow/FlowImageryShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/flow/FlowUtils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/BaseRasterColorizerShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/BaseRasterHighlightShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/RasterColorizerLUTShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/RasterColorizerShadedReliefShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/RasterColorizerStretchShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/RasterXYBandHighlightShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/lut.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/AspectShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/BaseRasterProcessorShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/ColormapToRGBShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/ConvolutionShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/CurvatureShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/FocalStatisticsShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/HillshadeShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/MultiRasterMixin.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/ShadedReliefShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/SlopeShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/projection.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/stretch.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderBackground.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderFill.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderIcon.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderLine.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderText.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vvUtils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/text/TextShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/text/TextTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/tile/TileDebugInfoTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/tile/TileStencilTechnique.js +1 -1
- 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/shaderGraph/typed/TypedShaderProgram.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/3d/FocusAreasView.js +1 -1
- package/views/3d/StencilGeometry.js +2 -0
- package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedComputedData.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedConfiguration.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedFieldOfViewManipulation.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedScaleOrientManipulation.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedShapeVisualElement.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedSubVisualization.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedTool.js +1 -1
- package/views/3d/analysis/Viewshed/viewshedToolUtils.js +1 -1
- package/views/3d/analysis/ViewshedAnalysisView3D.js +1 -1
- package/views/3d/focusAreaUtils.js +2 -0
- package/views/3d/layers/BuildingComponentSublayerView3D.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/IntegratedMeshLayerView3D.js +1 -1
- package/views/3d/layers/IntegratedMeshNormals.js +1 -1
- package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
- package/views/3d/layers/SceneLayerView3D.js +1 -1
- package/views/3d/layers/SceneLayerWorker.js +1 -1
- package/views/3d/layers/i3s/I3SQueryEngine.js +1 -1
- package/views/3d/layers/i3s/I3SUtil.js +1 -1
- package/views/3d/layers/support/DefinitionExpressionSceneLayerView.js +1 -1
- package/views/3d/layers/support/TemporalSceneLayerView.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/core/shaderTechnique/ShaderTechniqueRepository.js +1 -1
- package/views/3d/webgl-engine/effects/atmosphere/ChapmanAtmosphere.js +1 -1
- package/views/3d/webgl-engine/effects/atmosphere/LocalAtmosphere.js +1 -1
- package/views/3d/webgl-engine/effects/atmosphere/MarsAtmosphere.js +1 -1
- package/views/3d/webgl-engine/effects/blit/Blit.js +1 -1
- package/views/3d/webgl-engine/effects/clouds/CloudsComposition.js +1 -1
- package/views/3d/webgl-engine/effects/clouds/CloudsRenderer.js +1 -1
- package/views/3d/webgl-engine/effects/clouds/CloudsTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/clouds/NoiseTextureAtlas.js +1 -1
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaColorNode.js +1 -1
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +1 -1
- package/views/3d/webgl-engine/effects/focusArea/focusAreaMaskUtils.js +2 -0
- package/views/3d/webgl-engine/effects/fog/Fog.js +1 -1
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
- package/views/3d/webgl-engine/effects/glow/GlowRenderNode.js +1 -1
- package/views/3d/webgl-engine/effects/haze/Haze.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/ShadowHighlightBuffer.js +1 -1
- package/views/3d/webgl-engine/effects/laserlines/LaserLineRenderer.js +1 -1
- package/views/3d/webgl-engine/effects/laserlines/LaserlinePathTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/magnifier/Magnifier.js +1 -1
- package/views/3d/webgl-engine/effects/precipitation/Precipitation.js +1 -1
- package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
- package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
- package/views/3d/webgl-engine/effects/stars/Stars.js +1 -1
- package/views/3d/webgl-engine/effects/stars/StarsTechnique.js +1 -1
- package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
- package/views/3d/webgl-engine/lib/Compositor.js +1 -1
- package/views/3d/webgl-engine/lib/CutFillComputationRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/CutFillVisualizationRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/Material.js +1 -1
- package/views/3d/webgl-engine/lib/Normals.js +1 -1
- package/views/3d/webgl-engine/lib/OrderIndependentTransparency.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
- package/views/3d/webgl-engine/lib/Viewshed.js +1 -1
- package/views/3d/webgl-engine/lib/ViewshedShadowMap.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/CheckerBoardTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ColorMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/CompositingTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ImageMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/LineMarkerTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/MeasurementArrowTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js +10 -10
- package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadedColorMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/SlicePlaneMaterialTechnique.js +1 -1
- package/views/View2D.js +1 -1
- package/views/draw/support/GraphicMover.js +1 -1
- package/views/draw/support/Reshape.js +1 -1
- package/views/draw/support/editingSessionUtils.js +1 -1
- package/views/webgl/FramebufferObject.js +1 -1
- package/widgets/BatchAttributeForm/css.js +1 -1
- package/widgets/BatchAttributeForm/inputs/GroupInput.d.ts +2 -1
- package/widgets/BatchAttributeForm/inputs/RelationshipElementInput.d.ts +54 -0
- package/widgets/BatchAttributeForm/inputs/RelationshipElementInput.js +2 -0
- package/widgets/BatchAttributeForm/inputs/support/createBatchFormInputs.js +1 -1
- package/widgets/BatchAttributeForm/inputs/support/inputUtils.js +1 -1
- package/widgets/BatchAttributeForm/inputs/types.d.ts +4 -3
- package/widgets/BatchAttributeForm/templates/AttachmentElementTemplate.js +1 -1
- package/widgets/BatchAttributeForm/templates/RelationshipElementTemplate.js +2 -0
- package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
- package/widgets/BatchAttributeForm/templates/support/hashElementTemplate.js +1 -1
- package/widgets/BatchAttributeForm/templates/support/templateUtils.js +1 -1
- package/widgets/BatchAttributeForm.js +1 -1
- package/widgets/CoordinateConversion/CoordinateConversionViewModel.d.ts +21 -1
- package/widgets/CoordinateConversion/CoordinateConversionViewModel.js +1 -1
- package/widgets/CoordinateConversion/support/Format.js +1 -1
- package/widgets/CoordinateConversion/support/coordinateConversionUtils.js +1 -1
- package/widgets/CoordinateConversion.d.ts +21 -1
- package/widgets/CoordinateConversion.js +1 -1
- package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/SplitFeatureWorkflow.js +1 -1
- package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
- package/widgets/Editor/support/SketchController.js +1 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
- package/widgets/Sketch/SketchViewModel.js +1 -1
- package/widgets/support/ContingentValuesManager.js +1 -1
- package/widgets/types.d.ts +1 -1
- package/assets/esri/core/workers/chunks/07eff82916681fcff069.js +0 -1
- package/assets/esri/core/workers/chunks/0b1454a77a6a682541dc.js +0 -2
- package/assets/esri/core/workers/chunks/1c7fd0a229a8112b0539.js +0 -596
- package/assets/esri/core/workers/chunks/3697e51e1e4cf442f39a.js +0 -1
- package/assets/esri/core/workers/chunks/3cce9dad8ee0e4971d50.js +0 -1
- package/assets/esri/core/workers/chunks/3df8493b91aa3bce824d.js +0 -1
- package/assets/esri/core/workers/chunks/68a313155ddc29bd024d.js +0 -1
- package/assets/esri/core/workers/chunks/751609831b283903ba48.js +0 -1
- package/assets/esri/core/workers/chunks/7bacdd65a6cc4d284e0a.js +0 -2
- package/assets/esri/core/workers/chunks/7e97684e851274efd11f.js +0 -1
- package/assets/esri/core/workers/chunks/85aac8539996372f1ee8.js +0 -1
- package/assets/esri/core/workers/chunks/99d298d0039c536fcf3e.js +0 -1
- package/assets/esri/core/workers/chunks/9aaf78b831f8739bc127.js +0 -1
- package/assets/esri/core/workers/chunks/9b9916864b6575c42c8a.js +0 -1
- package/assets/esri/core/workers/chunks/bf7e019437a3b6036300.js +0 -2
- package/assets/esri/core/workers/chunks/d304343a781acfa3ff96.js +0 -1
- package/assets/esri/core/workers/chunks/dbb9bb28696ff9536678.js +0 -2
- package/assets/esri/core/workers/chunks/f09a41ad239d467d9438.js +0 -2
- package/assets/esri/core/workers/chunks/f6912532aae1638cbe8f.js +0 -1
- /package/assets/esri/core/workers/chunks/{7bacdd65a6cc4d284e0a.js.LICENSE.txt → 10408183681fd6c7b4ed.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{f09a41ad239d467d9438.js.LICENSE.txt → 5818f1f526577068d6ca.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{dbb9bb28696ff9536678.js.LICENSE.txt → 7cdd0492b2191df95102.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{bf7e019437a3b6036300.js.LICENSE.txt → dacc2e5fa462495ed1cc.js.LICENSE.txt} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import"../../../core/has.js";import t from"../../../core/Logger.js";import{destroyMaybe as r}from"../../../core/maybe.js";import{estimateNumberArrayMemory as i}from"../../../core/memoryEstimations.js";import{throwIfAborted as s}from"../../../core/promiseUtils.js";import{initial as o,watch as a,sync as n}from"../../../core/reactiveUtils.js";import{generateUID as l}from"../../../core/uid.js";import{property as d,subclass as u}from"../../../core/accessorSupport/decorators.js";import{set as h}from"../../../core/libs/gl-matrix-2/math/vec3.js";import{ZEROS as p,create as c}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{projectBuffer as g}from"../../../geometry/projection/projectBuffer.js";import{projectVectorToVector as m}from"../../../geometry/projection/projectVectorToVector.js";import{extentContainsCoords3D as y,extentContainsCoords2D as f}from"../../../geometry/support/contains.js";import{newDoubleArray as _,doubleArrayFrom as b}from"../../../geometry/support/DoubleArray.js";import{getGeometryZScaler as v}from"../../../geometry/support/zscale.js";import{fallbackObjectIDAttribute as I}from"../../../layers/LayerConstants.js";import{estimateSize as x}from"../../../layers/graphics/dehydratedFeatures.js";import{ImmutableDehydratedPoint as E}from"../../../layers/graphics/dehydratedPoint.js";import{hydrateGraphic as w}from"../../../layers/graphics/hydratedFeatures.js";import O from"../../../layers/graphics/controllers/I3SOnDemandController.js";import j from"../../../layers/support/FeatureFilter.js";import N from"../../../rest/support/Query.js";import{isBasemapLayerView as C}from"../../../support/basemapUtils.js";import{isGraphic as D}from"../../../support/graphicInstanceUtils.js";import{I3SPointsWorkerHandle as F}from"./I3SPointsWorkerHandle.js";import{LayerView3D as S}from"./LayerView3D.js";import{Graphics3DFeatureProcessor as G}from"./graphics/Graphics3DFeatureProcessor.js";import{QueryEngine as A}from"./graphics/QueryEngine.js";import{QueryEngineContext as V}from"./graphics/QueryEngineContext.js";import{createInteractiveEditSession as P,normalizeEditResultsEvent as L,processAttributeEdits as R}from"./i3s/featureEditing.js";import{getCachedAttributeValue as H}from"./i3s/I3SBinaryReader.js";import{I3SGraphicsMap as M}from"./i3s/I3SGraphicsMap.js";import{I3SOverrides as U}from"./i3s/I3SOverrides.js";import{checkRecyclable as Q,checkSpatialReferences as q,containsDraco as T,whenGraphicAttributes as B}from"./i3s/I3SUtil.js";import{attributeLookup as k}from"./support/attributeUtils.js";import{DefinitionExpressionSceneLayerView as z}from"./support/DefinitionExpressionSceneLayerView.js";import{defineFieldProperties as W}from"./support/fieldProperties.js";import{normalizeHighlightTarget as K,emptyHighlightHandle as Z,isObjectId as $}from"./support/highlightUtils.js";import{LayerViewPerformanceInfo as Y}from"./support/LayerViewPerformanceInfo.js";import{PopupSceneLayerView as J}from"./support/PopupSceneLayerView.js";import{SceneLayerViewRequiredFields as X}from"./support/SceneLayerViewRequiredFields.js";import{TemporalSceneLayerView as ee}from"./support/TemporalSceneLayerView.js";import{debugFlags as te}from"../support/debugFlags.js";import{compute as re}from"../support/orientedBoundingBox.js";import{updatingProgress as ie}from"../support/updatingProperties.js";import{Vertices as se}from"../webgl-engine/lib/Attribute.js";import oe from"../../layers/SceneLayerView.js";import{hasPopupTemplate as ae}from"../../layers/support/popupUtils.js";import{getHighlightName as ne}from"../../support/highlightOptionsUtils.js";import{hasLayerBasedScaleVisibility as le,isInEffectiveScaleRange as de}from"../../support/layerViewUtils.js";import{TaskPriority as ue}from"../../support/Scheduler.js";const he=W();class pe{constructor(e,t,r,i){this.graphics=e,this.featureIds=t,this.attributeInfo=r,this.node=i}get usedMemory(){return this.graphics.reduce((e,t)=>x(t)+e,i(this.featureIds)+1024)}}let ce=class extends(ee(z(J(S(oe))))){constructor(){super(...arguments),this.type="scene-layer-graphics-3d",this._queryEngine=null,this._memCache=null,this._interactiveEditingSessions=new Map,this._pendingEditsQueue=Promise.resolve(),this.loadedGraphics=new M((e,t,r)=>fe(e,t,r),e=>this.processor.graphicsCore.recreateGraphics(e),this.logError),this.holeFilling="always",this.progressiveLoadFactor=1,this.supportsHeightUnitConversion=!0,this._coordinatesOutsideExtentErrors=0,this._maxCoordinatesOutsideExtentErrors=20}tryRecycleWith(e,t){return e.url===this.layer.url&&this._i3sOverrides.isEmpty?e.load(t).then(()=>{s(t),Q(this.layer,e,this._i3sOverrides),this.layer=e,this._i3sOverrides.destroy();const i=this.view.resourceController?.memoryController;this._i3sOverrides=new U({view:this.view,layer:e,memoryController:i}),r(this._queryEngine),this._setupQueryEngine(),this.processor.resetObjectStates()}):null}initialize(){this.addResolvingPromise(this.layer.indexInfo);const e=this.view.resourceController?.memoryController;this._i3sOverrides=new U({view:this.view,layer:this.layer,memoryController:e}),q(this.layer,this.view.spatialReference,this.view.viewingMode),this._fieldsHelper=new X({layerView:this}),this._updatingHandles.add(()=>this.layer.rangeInfos,e=>this._rangeInfosChanged(e),o),this._updatingHandles.add(()=>this.layer.renderer,(e,t)=>this._rendererChange(e,t)),this._updatingHandles.add(()=>[this.parsedDefinitionExpression,this.layer.excludeObjectIds],()=>this._filterChange()),this._set("processor",new G({owner:this,preferredUpdatePolicy:0,scaleVisibilityEnabled:!le(),filterVisibilityEnabled:!0,timeExtentEnabled:!1,frustumVisibilityEnabled:!1,elevationAlignmentEnabled:!0,elevationFeatureExpressionEnabled:!1,setUidToIdOnAdd:!1,dataExtent:this.layer.fullExtent,updateClippingExtent:e=>this._updateClippingExtent(e)})),this.processor.elevationAlignment?.events.on("invalidate-elevation",({extent:e,spatialReference:t})=>this._controller.updateElevationChanged(e,t)),this.supportsHeightUnitConversion&&(this._verticalScale=v("point",this.layer.spatialReference,this.view.spatialReference)),this.addResolvingPromise(this.processor.when()),this._memCache=this.view.resourceController.memoryController.newCache(`psl-${this.uid}`),this._controller=new O({layerView:this}),T(this.layer.geometryDefinitions)&&(this._workerHandle=new F(e=>this.view.resourceController.immediate.schedule(e))),this.addHandles(this.layer.on("apply-edits",e=>this._updatingHandles.addPromise(e.result))),this.addHandles([this.layer.on("edits",e=>{const t=this._pendingEditsQueue.then(()=>this._handleEdits(e)).then();this._pendingEditsQueue=t,this._updatingHandles.consumePromise(t)}),a(()=>te.I3S_TREE_SHOW_TILES,e=>{if(e&&!this._treeDebugger){const e=this._controller.crsIndex;import("./support/I3STreeDebugger.js").then(({I3STreeDebugger:t})=>{!this._treeDebugger&&te.I3S_TREE_SHOW_TILES&&(this._treeDebugger=new t({lv:this,view:this.view,nodeSR:e}))})}else e||!this._treeDebugger||te.I3S_TREE_SHOW_TILES||(this._treeDebugger.destroy(),this._treeDebugger=null)},o)]),this.when(()=>{this._setupQueryEngine(),this._updatingHandles.add(()=>this.availableFields,()=>this._queryEngine?.clear(),n),this._updatingHandles.add(()=>this.maximumNumberOfFeatures,e=>this._controller.featureTarget=e,o),this._updatingHandles.add(()=>this.suspended,e=>{e&&this._removeAllNodeData()})})}destroy(){this._treeDebugger=r(this._treeDebugger),this._i3sOverrides=r(this._i3sOverrides),this._set("processor",r(this.processor)),this._controller=r(this._controller),this._queryEngine=r(this._queryEngine),this._workerHandle=r(this._workerHandle),this._memCache=r(this._memCache),this.loadedGraphics.clear(),this._fieldsHelper=r(this._fieldsHelper)}get i3slayer(){return this.layer}get layerViewUid(){return this.uid}get updatingProgressValue(){return this._controller?.updatingProgress??1}get visibleAtCurrentScale(){return le()?de(this.layer.effectiveScaleRange,this.view.scale):!this.processor?.scaleVisibilitySuspended}get requiredFields(){return this._fieldsHelper?.requiredFields??[]}get maximumNumberOfFeatures(){const e=this.processor?.graphicsCore?.displayFeatureLimit;return e?.maximumNumberOfFeatures??0}set maximumNumberOfFeatures(e){null!=e?(this._override("maximumNumberOfFeatures",e),this._controller.fixedFeatureTarget=!0):(this._clearOverride("maximumNumberOfFeatures"),this._controller.fixedFeatureTarget=!1)}get maximumNumberOfFeaturesExceeded(){return!this.suspended&&(!!this._controller?.useMaximumNumberOfFeatures&&!this._controller.leavesReached)}get _excludeObjectIds(){return new Set(this.layer.excludeObjectIds)}get lodFactor(){return"Labels"===this.layer.semantic?1:this.view.qualitySettings.sceneService.pointLoDFactor}get hasM(){return!1}get hasZ(){return!0}get contentVisible(){return!this.suspended&&!!this._controller?.rootNodeVisible}get legendEnabled(){return this.contentVisible&&!0===this.i3slayer?.legendEnabled}get _graphicOrigin(){return this.layer.graphicOrigin}async whenGraphicAttributes(e,t){return B(this.layer,e,this._getObjectIdField(),t,()=>[...this.loadedGraphics.nodes()])}getHit(e){if(!this.loadedGraphics)return null;const t=w(this.loadedGraphics.find(t=>t.uid===e),this.layer,this._graphicOrigin),r=this._getObjectIdField();return null==t?.attributes?.[r]?null:{type:"graphic",graphic:t,layer:t.layer}}whenGraphicBounds(e,t){return this.processor.whenGraphicBounds(e,t)}computeAttachmentOrigin(e,t){return this.processor.computeAttachmentOrigin(e,t)}isUpdating(){return!!(this._controller?.updating||this.processor?.updating||this._fieldsHelper?.updating||this.layerFilterUpdating)}highlight(e,t){const r=ne(t),i=this.layer.objectIdField,s=K(e);if(0===s.length)return Z;if(D(s[0])){const e=s;if(null!=k(this.layer.fieldsIndex,e[0].attributes,i)){const t=e.map(e=>k(this.layer.fieldsIndex,e.attributes,i));return this.processor.highlightByObjectIds(t,i,r)}return this.processor.highlightByGraphics(e,r)}return $(s[0])?this.processor.highlightByObjectIds(s,i,r):Z}get updatePolicy(){return this.processor.graphicsCore.effectiveUpdatePolicy}createInteractiveEditSession(e){return P(this._attributeEditingContext,e)}async _decompressBinaryPointData(e,t){const r={geometryBuffer:e.geometryBuffer};null==this._workerHandle&&(this._workerHandle=new F(e=>this.view.resourceController.immediate.schedule(e)));const i=await this._workerHandle.invoke(r,t);if(null==i)throw new Error("Failed to decompress Draco point data");return{positionData:i.positions,featureIds:i.featureIds}}async addNode(e,r,i){if(!ye(r)&&!me(r))throw new Error;if(this.loadedGraphics.hasNode(e.index))return void t.getLogger(this).error("I3S node "+e.id+" already added");const s=null!=this.layer.fullExtent?be(this.layer.fullExtent.clone(),.5):null,{featureIds:o,pointPositions:a}=ye(r)?await this._extractBinaryPointPositions(e,r,i):this._extractLegacyPointPositions(r),n=new Array;this._validatePositions(e,o,a,s,n);const l=this._controller.crsVertex,d=this.view.spatialReference;g(a,l,0,a,d,0,o.length);const u=ye(r)?e.level:0,h=this._createGraphics(o,a,e.index,u),p=new pe(h,o,r.attributeDataInfo,e);if(await this._i3sOverrides.applyAttributeOverrides(p.featureIds,r.attributeDataInfo,i),e.numFeatures=p.graphics.length,this._updateNodeMemory(e),_e(p),n.length>0&&(this._computeObb(e,n,l),this._controller.updateVisibility(e.index)),!this._controller.isGeometryVisible(e))return void this._cacheNodeData(p);if(null!=this._verticalScale)for(const t of p.graphics)this._verticalScale(t.geometry);const c=this.view.stage.renderView.olidRenderHelper;if(c){const e=C(this.view,this.uid);for(let t=0;t<p.featureIds.length;t++){const r=p.featureIds[t];c.setUidToObjectAndLayerId(r,p.graphics[t].uid,this.layer.id,this.uid,this.layer.popupEnabled&&!e&&ae(this.layer,this.view.popup?.defaultPopupTemplateEnabled),p.node.resources.attributes,t)}}this.loadedGraphics.addNode(e.index,p),this._controller.updateLoadStatus(e.index,!0),this._filterNode(p),this._treeDebugger&&this._treeDebugger.update()}_computeObb(e,t,r){const i=this._controller.crsIndex,s=i.isGeographic?this.view.renderSpatialReference:i;g(t,r,0,t,s,0),e.serviceObbInIndexSR=re(new se(t,3)),i.isGeographic&&(m(e.serviceObbInIndexSR.center,s,Ie,i),e.serviceObbInIndexSR.center=Ie)}isNodeLoaded(e){return this.loadedGraphics.hasNode(e)}isNodeReloading(){return!1}updateNodeState(){}getNodeComponentHandle(){}async _extractBinaryPointPositions(e,t,r){const i=await this._decompressBinaryPointData(t,r),s=i.positionData,o=3,a=s.length/o,n=_(3*a),l=null!=e.serviceObbInIndexSR?e.serviceObbInIndexSR.center:p,d=Math.abs(l[2])*2**-20;for(let u=0;u<a;u++){const e=u*o;n[e]=s[e]+l[0],n[e+1]=s[e+1]+l[1],n[e+2]=s[e+2]+l[2],Math.abs(n[e+2])<d&&(n[e+2]=0)}return{featureIds:i.featureIds?b(i.featureIds):[],pointPositions:n}}_extractLegacyPointPositions(e){const t=e.pointData.length,r=_(3*t),i=new Array;for(let s=0;s<t;s++){const t=e.pointData[s],o=t.featureDataPosition,a=o.length,n=t.geometries?.[0]??ve[a],l=t.featureIds[0];if("Embedded"!==n.type||"points"!==n.params.type||a<2||a>3)continue;const d=n.params.vertexAttributes?.position??[0,0,0],u=3*i.length;r[u]=o[0]+d[0],r[u+1]=o[1]+d[1],r[u+2]=3===a?o[2]+d[2]:NaN,i.push(l)}return{featureIds:i,pointPositions:r}}_validatePositions(e,r,i,s,o){if(null==s&&e.serviceObbInIndexSR)return;const a=r.length,n=3;for(let l=0;l<a;l++){const r=l*n;h(Ie,i[r],i[r+1],i[r+2]);const a=!Number.isNaN(i[2]);null==s||(a?y(s,Ie):f(s,Ie))||(this._coordinatesOutsideExtentErrors<this._maxCoordinatesOutsideExtentErrors&&t.getLogger(this).error("Service Error: Coordinates outside of layer extent"),this._coordinatesOutsideExtentErrors+1===this._maxCoordinatesOutsideExtentErrors&&t.getLogger(this).error("Maximum number of errors reached. Further errors are ignored."),this._coordinatesOutsideExtentErrors++),e.serviceObbInIndexSR||o.push(Ie[0],Ie[1],Ie[2])}}_createGraphics(e,t,r,i){const s=e.length,o=3,a=this._getObjectIdField(),n=this.processor.graphicsCore,d=new Array,u=this.view.spatialReference;for(let h=0;h<s;h++){const s=e[h],p={};null!=s&&(p[a]=s);const c=s??l(),g=h*o,m=isNaN(t[g+2])?void 0:t[g+2],y=new E(u,t[g],t[g+1],m),f=this.loadedGraphics.get(c);if(null!=f)(null==f.level||f.level<i)&&(xe.property="geometry",xe.graphic=f,xe.oldValue=f.geometry,xe.newValue=y,f.geometry=y,f.level=i,n.graphicUpdateHandler(xe),Ee()),d.push(f);else{const e=l();d.push({objectId:c,uid:e,geometry:y,attributes:p,visible:!0,nodeIndex:r,level:i})}}return d}_updateNodeMemory(e){e.memory=4096+(e.numFeatures??0)*this.processor.graphicsCore.usedMemoryPerGraphic}_cacheNodeData(e){this._memCache.put(this._getMemCacheKey(e.node),e)}_getMemCacheKey(e){return`${e.index}`}_removeAllNodeData(){this.loadedGraphics.forEachNode((e,t)=>{if(e){const t=e.node;this._updateNodeMemory(t),this._cacheNodeData(e)}this._controller.updateLoadStatus(t,!1)}),this._treeDebugger&&this._treeDebugger.update(),this.loadedGraphics.clear()}removeNode(e){const t=this._removeNodeStageData(e);t&&(this._updateNodeMemory(t.node),this._cacheNodeData(t))}_removeNodeStageData(e){const t=this.loadedGraphics.getNode(e);return null==t?null:(this._controller.updateLoadStatus(e,!1),this.loadedGraphics.removeNode(e),this._treeDebugger&&this._treeDebugger.update(),t)}async loadCachedNodeData(e){return this._memCache?.pop(this._getMemCacheKey(e))}async addCachedNodeData(e,r,i,s){this.loadedGraphics.hasNode(e.index)?t.getLogger(this).error("I3S node "+e.id+" already added"):(await this._i3sOverrides.applyAttributeOverrides(r.featureIds,i,s),r.attributeInfo=i,this.loadedGraphics.addNode(e.index,r),this._controller.updateLoadStatus(e.index,!0),this._updateNodeMemory(e),_e(r),this._filterNode(r),this._treeDebugger&&this._treeDebugger.update())}getLoadedNodeIds(){const e=[];return this.loadedGraphics.forEachNode(t=>e.push(t.node.id)),e.sort()}getVisibleNodes(){const e=new Array;return this.loadedGraphics.forEachNode(t=>e.push(t.node)),e}getLoadedNodeIndices(e){this.loadedGraphics.forEachNode((t,r)=>e.push(r))}getLoadedAttributes(e){const t=this.loadedGraphics.getNode(e);if(null!=t?.attributeInfo)return t.attributeInfo.loadedAttributes}getAttributeData(e){const t=this.loadedGraphics.getNode(e);if(null!=t?.attributeInfo)return t.attributeInfo.attributeData}_setAttributeData(e,t){const r=this.loadedGraphics.getNode(e);null!=r?.attributeInfo&&(r.attributeInfo.attributeData=t,this._attributeValuesChanged(r))}async updateAttributes(e,t,r){const i=this.loadedGraphics.getNode(e);null!=i&&(await this._i3sOverrides.applyAttributeOverrides(i.featureIds,t,r),i.attributeInfo=t,this._attributeValuesChanged(i))}_attributeValuesChanged(e){_e(e),this._filterNode(e);const{processor:t}=this,{graphicsCore:r}=t;if(r.labelsEnabled){const t=e.node.index,i=new Array;e.graphics.forEach(e=>e.nodeIndex===t&&i.push(e.uid)),r.updateLabelingInfo(i)}t.refreshFilter()}_updateClippingExtent(e){return this._controller&&this._controller.updateClippingArea(e),!1}_getObjectIdField(){return this.layer.objectIdField||I}_getGlobalIdField(){return this.layer.globalIdField}async _rendererChange(e,t){const{layer:{fieldsIndex:r}}=this,i=new Set;let s,o;e?(await e.collectRequiredFields(i,r),s=Array.from(i).sort()):s=[],i.clear(),t?(await t.collectRequiredFields(i,r),o=Array.from(i).sort()):o=[],s.length===o.length&&s.every((e,t)=>s[t]===o[t])||this._reloadAllNodes()}_rangeInfosChanged(e){null!=e&&e.length>0&&t.getLogger(this).warn("Unsupported property: rangeInfos are currently only serialized to and from web scenes but do not affect rendering.")}_filterChange(){this.loadedGraphics.forEachNode(e=>this._filterNode(e))}_reloadAllNodes(){this._removeAllNodeData(),this._controller&&this._controller.restartNodeLoading()}_filterNode(e){const t=this.parsedDefinitionExpression,r=this._excludeObjectIds,i=this._getObjectIdField();for(const s of e.graphics){const e=s.visible,o=this._evaluateClause(t,s),a=!r.has(s.attributes[i]);s.visible=o&&a,e!==s.visible&&(xe.graphic=s,xe.property="visible",xe.oldValue=e,xe.newValue=s.visible,this.processor.graphicsCore.graphicUpdateHandler(xe),Ee())}}createQuery(){const e={outFields:["*"],returnGeometry:!0,outSpatialReference:this.view.spatialReference};return this.filter?.createQuery(e)??new N(e)}queryFeatures(e,t){return this._queryEngine.executeQuery(this._ensureQuery(e),t?.signal)}queryObjectIds(e,t){return this._queryEngine.executeQueryForIds(this._ensureQuery(e),t?.signal)}queryFeatureCount(e,t){return this._queryEngine.executeQueryForCount(this._ensureQuery(e),t?.signal)}queryExtent(e,t){return this._queryEngine.executeQueryForExtent(this._ensureQuery(e),t?.signal)}_ensureQuery(e){return this._addDefinitionExpressionToQuery(null==e?this.createQuery():N.from(e))}_setupQueryEngine(){const{layer:e,view:t,hasM:r,hasZ:i}=this,{spatialReference:s,resourceController:o}=t,a=new V(s,e,o,()=>this.processor.featureStore,i,r,()=>this.availableFields);this._queryEngine=new A({context:a,priority:ue.FEATURE_QUERY_ENGINE})}get usedMemory(){return this.processor?.graphicsCore?.usedMemory??0}get unloadedMemory(){return.8*((this._controller?.unloadedMemoryEstimate??0)+(this.processor?.graphicsCore?.unprocessedMemoryEstimate??0))}get ignoresMemoryFactor(){return this._controller&&this._controller.fixedFeatureTarget}async _handleEdits(e){const t=this._attributeEditingContext,r=await L(t,e);R(t,r)}get _attributeEditingContext(){const e=this._getObjectIdField(),t=this._getGlobalIdField();return{sessions:this._interactiveEditingSessions,fieldsIndex:this.layer.fieldsIndex,objectIdField:e,globalIdField:t,forEachNode:e=>this.loadedGraphics.forEachNode(t=>e(t.node,t.featureIds)),attributeStorageInfo:this.i3slayer.attributeStorageInfo??[],i3sOverrides:this._i3sOverrides,getAttributeData:e=>this.getAttributeData(e),setAttributeData:(t,r,i)=>{this._setAttributeData(t,r);const s=this.loadedGraphics.getNode(t);if(null!=i){const t=this.loadedGraphics.get(i.attributes[e]);null!=t&&this.processor.graphicsCore.recreateGraphics([t])}else null!=s&&this.processor.graphicsCore.recreateGraphics(s.graphics)},clearMemCache:()=>{}}}get performanceInfo(){return new Y(this.usedMemory,this.loadedGraphics.length,-1,this.maximumNumberOfFeatures,this.loadedGraphics.nodeCount,this.processor.graphicsCore.performanceInfo)}get test(){}};e([d()],ce.prototype,"processor",void 0),e([d({type:j})],ce.prototype,"filter",void 0),e([d()],ce.prototype,"loadedGraphics",void 0),e([d()],ce.prototype,"i3slayer",null),e([d()],ce.prototype,"layerViewUid",null),e([d()],ce.prototype,"_controller",void 0),e([d()],ce.prototype,"updating",void 0),e([d()],ce.prototype,"suspended",void 0),e([d(ie)],ce.prototype,"updatingProgress",void 0),e([d()],ce.prototype,"updatingProgressValue",null),e([d({readOnly:!0})],ce.prototype,"visibleAtCurrentScale",null),e([d(he.requiredFields)],ce.prototype,"requiredFields",null),e([d(he.availableFields)],ce.prototype,"availableFields",void 0),e([d()],ce.prototype,"_fieldsHelper",void 0),e([d({type:Number})],ce.prototype,"maximumNumberOfFeatures",null),e([d({readOnly:!0})],ce.prototype,"maximumNumberOfFeaturesExceeded",null),e([d()],ce.prototype,"_excludeObjectIds",null),e([d({readOnly:!0})],ce.prototype,"lodFactor",null),e([d({readOnly:!0})],ce.prototype,"hasM",null),e([d({readOnly:!0})],ce.prototype,"hasZ",null),e([d()],ce.prototype,"contentVisible",null),e([d({readOnly:!0})],ce.prototype,"legendEnabled",null),e([d()],ce.prototype,"_graphicOrigin",null),ce=e([u("esri.views.3d.layers.SceneLayerGraphicsView3D")],ce);const ge=ce;function me(e){return"pointData"in e}function ye(e){return"geometryBuffer"in e&&null!==e.geometryBuffer}function fe(e,t,r){const i=t.attributeInfo;if(null==i?.loadedAttributes||null==i.attributeData)return!1;let s=!1;for(const{name:o}of i.loadedAttributes)if(i.attributeData[o]){const t=H(i.attributeData[o],r);t!==e.attributes[o]&&(e.attributes[o]=t,s=!0)}return s}function _e(e){const t=e.attributeInfo;if(null==t?.loadedAttributes||null==t.attributeData)return;const r=e.node.index;for(let i=0;i<e.graphics.length;i++){const s=e.graphics[i];if(s.nodeIndex===r){s.attributes||(s.attributes={});for(const{name:e}of t.loadedAttributes)t.attributeData[e]&&(s.attributes[e]=H(t.attributeData[e],i))}}}function be(e,t){return e.xmin-=t,e.ymin-=t,e.xmax+=t,e.ymax+=t,null!=e.zmin&&null!=e.zmax&&(e.zmin-=t,e.zmax+=t),null!=e.mmin&&null!=e.mmax&&(e.mmin-=t,e.mmax+=t),e}const ve={2:{type:"Embedded",params:{type:"points",vertexAttributes:{position:[0,0]}}},3:{type:"Embedded",params:{type:"points",vertexAttributes:{position:[0,0,0]}}}},Ie=c(),xe={graphic:null,property:null,oldValue:null,newValue:null};function Ee(){xe.graphic=null,xe.property=null,xe.oldValue=null,xe.newValue=null}export{ge as default};
|
|
2
|
+
import{__decorate as e}from"tslib";import"../../../core/has.js";import t from"../../../core/Logger.js";import{destroyMaybe as r}from"../../../core/maybe.js";import{estimateNumberArrayMemory as i}from"../../../core/memoryEstimations.js";import{throwIfAborted as s}from"../../../core/promiseUtils.js";import{initial as o,watch as a,sync as n}from"../../../core/reactiveUtils.js";import{generateUID as l}from"../../../core/uid.js";import{property as d,subclass as u}from"../../../core/accessorSupport/decorators.js";import{set as h}from"../../../core/libs/gl-matrix-2/math/vec3.js";import{ZEROS as p,create as c}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{projectBuffer as g}from"../../../geometry/projection/projectBuffer.js";import{projectVectorToVector as m}from"../../../geometry/projection/projectVectorToVector.js";import{extentContainsCoords3D as y,extentContainsCoords2D as f}from"../../../geometry/support/contains.js";import{newDoubleArray as _,doubleArrayFrom as b}from"../../../geometry/support/DoubleArray.js";import{getGeometryZScaler as v}from"../../../geometry/support/zscale.js";import{fallbackObjectIDAttribute as I}from"../../../layers/LayerConstants.js";import{estimateSize as x}from"../../../layers/graphics/dehydratedFeatures.js";import{ImmutableDehydratedPoint as E}from"../../../layers/graphics/dehydratedPoint.js";import{hydrateGraphic as w}from"../../../layers/graphics/hydratedFeatures.js";import O from"../../../layers/graphics/controllers/I3SOnDemandController.js";import j from"../../../layers/support/FeatureFilter.js";import N from"../../../rest/support/Query.js";import{isBasemapLayerView as C}from"../../../support/basemapUtils.js";import{isGraphic as D}from"../../../support/graphicInstanceUtils.js";import{I3SPointsWorkerHandle as F}from"./I3SPointsWorkerHandle.js";import{LayerView3D as S}from"./LayerView3D.js";import{Graphics3DFeatureProcessor as G}from"./graphics/Graphics3DFeatureProcessor.js";import{QueryEngine as A}from"./graphics/QueryEngine.js";import{QueryEngineContext as V}from"./graphics/QueryEngineContext.js";import{createInteractiveEditSession as P,normalizeEditResultsEvent as L,processAttributeEdits as R}from"./i3s/featureEditing.js";import{getCachedAttributeValue as H}from"./i3s/I3SBinaryReader.js";import{I3SGraphicsMap as M}from"./i3s/I3SGraphicsMap.js";import{I3SOverrides as U}from"./i3s/I3SOverrides.js";import{checkRecyclable as Q,checkSpatialReferences as q,containsDraco as T,whenGraphicAttributes as B}from"./i3s/I3SUtil.js";import{attributeLookup as k}from"./support/attributeUtils.js";import{DefinitionExpressionSceneLayerView as z}from"./support/DefinitionExpressionSceneLayerView.js";import{defineFieldProperties as W}from"./support/fieldProperties.js";import{normalizeHighlightTarget as K,emptyHighlightHandle as Z,isObjectId as $}from"./support/highlightUtils.js";import{LayerViewPerformanceInfo as Y}from"./support/LayerViewPerformanceInfo.js";import{PopupSceneLayerView as J}from"./support/PopupSceneLayerView.js";import{SceneLayerViewRequiredFields as X}from"./support/SceneLayerViewRequiredFields.js";import{TemporalSceneLayerView as ee}from"./support/TemporalSceneLayerView.js";import{debugFlags as te}from"../support/debugFlags.js";import{compute as re}from"../support/orientedBoundingBox.js";import{updatingProgress as ie}from"../support/updatingProperties.js";import{Vertices as se}from"../webgl-engine/lib/Attribute.js";import oe from"../../layers/SceneLayerView.js";import{hasPopupTemplate as ae}from"../../layers/support/popupUtils.js";import{getHighlightName as ne}from"../../support/highlightOptionsUtils.js";import{hasLayerBasedScaleVisibility as le,isInEffectiveScaleRange as de}from"../../support/layerViewUtils.js";import{TaskPriority as ue}from"../../support/Scheduler.js";const he=W();class pe{constructor(e,t,r,i){this.graphics=e,this.featureIds=t,this.attributeInfo=r,this.node=i}get usedMemory(){return this.graphics.reduce((e,t)=>x(t)+e,i(this.featureIds)+1024)}}let ce=class extends(ee(z(J(S(oe))))){constructor(){super(...arguments),this.type="scene-layer-graphics-3d",this._queryEngine=null,this._memCache=null,this._interactiveEditingSessions=new Map,this._pendingEditsQueue=Promise.resolve(),this.loadedGraphics=new M((e,t,r)=>fe(e,t,r),e=>this.processor.graphicsCore.recreateGraphics(e),this.logError),this.holeFilling="always",this.progressiveLoadFactor=1,this.supportsHeightUnitConversion=!0,this._coordinatesOutsideExtentErrors=0,this._maxCoordinatesOutsideExtentErrors=20}tryRecycleWith(e,t){return e.url===this.layer.url&&this._i3sOverrides.isEmpty?e.load(t).then(()=>{s(t),Q(this.layer,e,this._i3sOverrides),this.layer=e,this._i3sOverrides.destroy();const i=this.view.resourceController?.memoryController;this._i3sOverrides=new U({view:this.view,layer:e,memoryController:i}),r(this._queryEngine),this._setupQueryEngine(),this.processor.resetObjectStates()}):null}initialize(){this.addResolvingPromise(this.layer.indexInfo);const e=this.view.resourceController?.memoryController;this._i3sOverrides=new U({view:this.view,layer:this.layer,memoryController:e}),q(this.layer,this.view.spatialReference,this.view.viewingMode),this._fieldsHelper=new X({layerView:this}),this._updatingHandles.add(()=>this.layer.rangeInfos,e=>this._rangeInfosChanged(e),o),this._updatingHandles.add(()=>this.layer.renderer,(e,t)=>this._rendererChange(e,t)),this._updatingHandles.add(()=>[this.parsedDefinitionExpression,this.layer.excludeObjectIds],()=>this._filterChange()),this._set("processor",new G({owner:this,preferredUpdatePolicy:0,scaleVisibilityEnabled:!le(),filterVisibilityEnabled:!0,timeExtentEnabled:!1,frustumVisibilityEnabled:!1,elevationAlignmentEnabled:!0,elevationFeatureExpressionEnabled:!1,setUidToIdOnAdd:!1,dataExtent:this.layer.fullExtent,updateClippingExtent:e=>this._updateClippingExtent(e)})),this.processor.elevationAlignment?.events.on("invalidate-elevation",({extent:e,spatialReference:t})=>this._controller.updateElevationChanged(e,t)),this.supportsHeightUnitConversion&&(this._verticalScale=v("point",this.layer.spatialReference,this.view.spatialReference)),this.addResolvingPromise(this.processor.when()),this._memCache=this.view.resourceController.memoryController.newCache(`psl-${this.uid}`),this._controller=new O({layerView:this}),T(this.layer.geometryDefinitions)&&(this._workerHandle=new F(e=>this.view.resourceController.immediate.schedule(e))),this.addHandles(this.layer.on("apply-edits",e=>this._updatingHandles.addPromise(e.result))),this.addHandles([this.layer.on("edits",e=>{const t=this._pendingEditsQueue.then(()=>this._handleEdits(e)).then();this._pendingEditsQueue=t,this._updatingHandles.consumePromise(t)}),a(()=>te.I3S_TREE_SHOW_TILES,e=>{if(e&&!this._treeDebugger){const e=this._controller.crsIndex;import("./support/I3STreeDebugger.js").then(({I3STreeDebugger:t})=>{!this._treeDebugger&&te.I3S_TREE_SHOW_TILES&&(this._treeDebugger=new t({lv:this,view:this.view,nodeSR:e}))})}else e||!this._treeDebugger||te.I3S_TREE_SHOW_TILES||(this._treeDebugger.destroy(),this._treeDebugger=null)},o)]),this.when(()=>{this._setupQueryEngine(),this._updatingHandles.add(()=>this.availableFields,()=>this._queryEngine?.clear(),n),this._updatingHandles.add(()=>this.maximumNumberOfFeatures,e=>this._controller.featureTarget=e,o),this._updatingHandles.add(()=>this.suspended,e=>{e&&this._removeAllNodeData()})})}destroy(){this._treeDebugger=r(this._treeDebugger),this._i3sOverrides=r(this._i3sOverrides),this._set("processor",r(this.processor)),this._controller=r(this._controller),this._queryEngine=r(this._queryEngine),this._workerHandle=r(this._workerHandle),this._memCache=r(this._memCache),this.loadedGraphics.clear(),this._fieldsHelper=r(this._fieldsHelper)}get layerViewUid(){return this.uid}get updatingProgressValue(){return this._controller?.updatingProgress??1}get visibleAtCurrentScale(){return le()?de(this.layer.effectiveScaleRange,this.view.scale):!this.processor?.scaleVisibilitySuspended}get requiredFields(){return this._fieldsHelper?.requiredFields??[]}get maximumNumberOfFeatures(){const e=this.processor?.graphicsCore?.displayFeatureLimit;return e?.maximumNumberOfFeatures??0}set maximumNumberOfFeatures(e){null!=e?(this._override("maximumNumberOfFeatures",e),this._controller.fixedFeatureTarget=!0):(this._clearOverride("maximumNumberOfFeatures"),this._controller.fixedFeatureTarget=!1)}get maximumNumberOfFeaturesExceeded(){return!this.suspended&&(!!this._controller?.useMaximumNumberOfFeatures&&!this._controller.leavesReached)}get _excludeObjectIds(){return new Set(this.layer.excludeObjectIds)}get lodFactor(){return"Labels"===this.layer.semantic?1:this.view.qualitySettings.sceneService.pointLoDFactor}get hasM(){return!1}get hasZ(){return!0}get contentVisible(){return!this.suspended&&!!this._controller?.rootNodeVisible}get legendEnabled(){return this.contentVisible&&!0===this.layer?.legendEnabled}get _graphicOrigin(){return this.layer.graphicOrigin}async whenGraphicAttributes(e,t){return B(this.layer,e,this._getObjectIdField(),t,()=>[...this.loadedGraphics.nodes()])}getHit(e){if(!this.loadedGraphics)return null;const t=w(this.loadedGraphics.find(t=>t.uid===e),this.layer,this._graphicOrigin),r=this._getObjectIdField();return null==t?.attributes?.[r]?null:{type:"graphic",graphic:t,layer:t.layer}}whenGraphicBounds(e,t){return this.processor.whenGraphicBounds(e,t)}computeAttachmentOrigin(e,t){return this.processor.computeAttachmentOrigin(e,t)}isUpdating(){return!!(this._controller?.updating||this.processor?.updating||this._fieldsHelper?.updating||this.layerFilterUpdating)}highlight(e,t){const r=ne(t),i=this.layer.objectIdField,s=K(e);if(0===s.length)return Z;if(D(s[0])){const e=s;if(null!=k(this.layer.fieldsIndex,e[0].attributes,i)){const t=e.map(e=>k(this.layer.fieldsIndex,e.attributes,i));return this.processor.highlightByObjectIds(t,i,r)}return this.processor.highlightByGraphics(e,r)}return $(s[0])?this.processor.highlightByObjectIds(s,i,r):Z}get updatePolicy(){return this.processor.graphicsCore.effectiveUpdatePolicy}createInteractiveEditSession(e){return P(this._attributeEditingContext,e)}async _decompressBinaryPointData(e,t){const r={geometryBuffer:e.geometryBuffer};null==this._workerHandle&&(this._workerHandle=new F(e=>this.view.resourceController.immediate.schedule(e)));const i=await this._workerHandle.invoke(r,t);if(null==i)throw new Error("Failed to decompress Draco point data");return{positionData:i.positions,featureIds:i.featureIds}}async addNode(e,r,i){if(!ye(r)&&!me(r))throw new Error;if(this.loadedGraphics.hasNode(e.index))return void t.getLogger(this).error("I3S node "+e.id+" already added");const s=null!=this.layer.fullExtent?be(this.layer.fullExtent.clone(),.5):null,{featureIds:o,pointPositions:a}=ye(r)?await this._extractBinaryPointPositions(e,r,i):this._extractLegacyPointPositions(r),n=new Array;this._validatePositions(e,o,a,s,n);const l=this._controller.crsVertex,d=this.view.spatialReference;g(a,l,0,a,d,0,o.length);const u=ye(r)?e.level:0,h=this._createGraphics(o,a,e.index,u),p=new pe(h,o,r.attributeDataInfo,e);if(await this._i3sOverrides.applyAttributeOverrides(p.featureIds,r.attributeDataInfo,i),e.numFeatures=p.graphics.length,this._updateNodeMemory(e),_e(p),n.length>0&&(this._computeObb(e,n,l),this._controller.updateVisibility(e.index)),!this._controller.isGeometryVisible(e))return void this._cacheNodeData(p);if(null!=this._verticalScale)for(const t of p.graphics)this._verticalScale(t.geometry);const c=this.view.stage.renderView.olidRenderHelper;if(c){const e=C(this.view,this.uid);for(let t=0;t<p.featureIds.length;t++){const r=p.featureIds[t];c.setUidToObjectAndLayerId(r,p.graphics[t].uid,this.layer.id,this.uid,this.layer.popupEnabled&&!e&&ae(this.layer,this.view.popup?.defaultPopupTemplateEnabled),p.node.resources.attributes,t)}}this.loadedGraphics.addNode(e.index,p),this._controller.updateLoadStatus(e.index,!0),this._filterNode(p),this._treeDebugger&&this._treeDebugger.update()}_computeObb(e,t,r){const i=this._controller.crsIndex,s=i.isGeographic?this.view.renderSpatialReference:i;g(t,r,0,t,s,0),e.serviceObbInIndexSR=re(new se(t,3)),i.isGeographic&&(m(e.serviceObbInIndexSR.center,s,Ie,i),e.serviceObbInIndexSR.center=Ie)}isNodeLoaded(e){return this.loadedGraphics.hasNode(e)}isNodeReloading(){return!1}updateNodeState(){}getNodeComponentHandle(){}async _extractBinaryPointPositions(e,t,r){const i=await this._decompressBinaryPointData(t,r),s=i.positionData,o=3,a=s.length/o,n=_(3*a),l=null!=e.serviceObbInIndexSR?e.serviceObbInIndexSR.center:p,d=Math.abs(l[2])*2**-20;for(let u=0;u<a;u++){const e=u*o;n[e]=s[e]+l[0],n[e+1]=s[e+1]+l[1],n[e+2]=s[e+2]+l[2],Math.abs(n[e+2])<d&&(n[e+2]=0)}return{featureIds:i.featureIds?b(i.featureIds):[],pointPositions:n}}_extractLegacyPointPositions(e){const t=e.pointData.length,r=_(3*t),i=new Array;for(let s=0;s<t;s++){const t=e.pointData[s],o=t.featureDataPosition,a=o.length,n=t.geometries?.[0]??ve[a],l=t.featureIds[0];if("Embedded"!==n.type||"points"!==n.params.type||a<2||a>3)continue;const d=n.params.vertexAttributes?.position??[0,0,0],u=3*i.length;r[u]=o[0]+d[0],r[u+1]=o[1]+d[1],r[u+2]=3===a?o[2]+d[2]:NaN,i.push(l)}return{featureIds:i,pointPositions:r}}_validatePositions(e,r,i,s,o){if(null==s&&e.serviceObbInIndexSR)return;const a=r.length,n=3;for(let l=0;l<a;l++){const r=l*n;h(Ie,i[r],i[r+1],i[r+2]);const a=!Number.isNaN(i[2]);null==s||(a?y(s,Ie):f(s,Ie))||(this._coordinatesOutsideExtentErrors<this._maxCoordinatesOutsideExtentErrors&&t.getLogger(this).error("Service Error: Coordinates outside of layer extent"),this._coordinatesOutsideExtentErrors+1===this._maxCoordinatesOutsideExtentErrors&&t.getLogger(this).error("Maximum number of errors reached. Further errors are ignored."),this._coordinatesOutsideExtentErrors++),e.serviceObbInIndexSR||o.push(Ie[0],Ie[1],Ie[2])}}_createGraphics(e,t,r,i){const s=e.length,o=3,a=this._getObjectIdField(),n=this.processor.graphicsCore,d=new Array,u=this.view.spatialReference;for(let h=0;h<s;h++){const s=e[h],p={};null!=s&&(p[a]=s);const c=s??l(),g=h*o,m=isNaN(t[g+2])?void 0:t[g+2],y=new E(u,t[g],t[g+1],m),f=this.loadedGraphics.get(c);if(null!=f)(null==f.level||f.level<i)&&(xe.property="geometry",xe.graphic=f,xe.oldValue=f.geometry,xe.newValue=y,f.geometry=y,f.level=i,n.graphicUpdateHandler(xe),Ee()),d.push(f);else{const e=l();d.push({objectId:c,uid:e,geometry:y,attributes:p,visible:!0,nodeIndex:r,level:i})}}return d}_updateNodeMemory(e){e.memory=4096+(e.numFeatures??0)*this.processor.graphicsCore.usedMemoryPerGraphic}_cacheNodeData(e){this._memCache.put(this._getMemCacheKey(e.node),e)}_getMemCacheKey(e){return`${e.index}`}_removeAllNodeData(){this.loadedGraphics.forEachNode((e,t)=>{if(e){const t=e.node;this._updateNodeMemory(t),this._cacheNodeData(e)}this._controller.updateLoadStatus(t,!1)}),this._treeDebugger&&this._treeDebugger.update(),this.loadedGraphics.clear()}removeNode(e){const t=this._removeNodeStageData(e);t&&(this._updateNodeMemory(t.node),this._cacheNodeData(t))}_removeNodeStageData(e){const t=this.loadedGraphics.getNode(e);return null==t?null:(this._controller.updateLoadStatus(e,!1),this.loadedGraphics.removeNode(e),this._treeDebugger&&this._treeDebugger.update(),t)}async loadCachedNodeData(e){return this._memCache?.pop(this._getMemCacheKey(e))}async addCachedNodeData(e,r,i,s){this.loadedGraphics.hasNode(e.index)?t.getLogger(this).error("I3S node "+e.id+" already added"):(await this._i3sOverrides.applyAttributeOverrides(r.featureIds,i,s),r.attributeInfo=i,this.loadedGraphics.addNode(e.index,r),this._controller.updateLoadStatus(e.index,!0),this._updateNodeMemory(e),_e(r),this._filterNode(r),this._treeDebugger&&this._treeDebugger.update())}getLoadedNodeIds(){const e=[];return this.loadedGraphics.forEachNode(t=>e.push(t.node.id)),e.sort()}getVisibleNodes(){const e=new Array;return this.loadedGraphics.forEachNode(t=>e.push(t.node)),e}getLoadedNodeIndices(e){this.loadedGraphics.forEachNode((t,r)=>e.push(r))}getLoadedAttributes(e){const t=this.loadedGraphics.getNode(e);if(null!=t?.attributeInfo)return t.attributeInfo.loadedAttributes}getAttributeData(e){const t=this.loadedGraphics.getNode(e);if(null!=t?.attributeInfo)return t.attributeInfo.attributeData}_setAttributeData(e,t){const r=this.loadedGraphics.getNode(e);null!=r?.attributeInfo&&(r.attributeInfo.attributeData=t,this._attributeValuesChanged(r))}async updateAttributes(e,t,r){const i=this.loadedGraphics.getNode(e);null!=i&&(await this._i3sOverrides.applyAttributeOverrides(i.featureIds,t,r),i.attributeInfo=t,this._attributeValuesChanged(i))}_attributeValuesChanged(e){_e(e),this._filterNode(e);const{processor:t}=this,{graphicsCore:r}=t;if(r.labelsEnabled){const t=e.node.index,i=new Array;e.graphics.forEach(e=>e.nodeIndex===t&&i.push(e.uid)),r.updateLabelingInfo(i)}t.refreshFilter()}_updateClippingExtent(e){return this._controller&&this._controller.updateClippingArea(e),!1}_getObjectIdField(){return this.layer.objectIdField||I}_getGlobalIdField(){return this.layer.globalIdField}async _rendererChange(e,t){const{layer:{fieldsIndex:r}}=this,i=new Set;let s,o;e?(await e.collectRequiredFields(i,r),s=Array.from(i).sort()):s=[],i.clear(),t?(await t.collectRequiredFields(i,r),o=Array.from(i).sort()):o=[],s.length===o.length&&s.every((e,t)=>s[t]===o[t])||this._reloadAllNodes()}_rangeInfosChanged(e){null!=e&&e.length>0&&t.getLogger(this).warn("Unsupported property: rangeInfos are currently only serialized to and from web scenes but do not affect rendering.")}_filterChange(){this.loadedGraphics.forEachNode(e=>this._filterNode(e))}_reloadAllNodes(){this._removeAllNodeData(),this._controller&&this._controller.restartNodeLoading()}_filterNode(e){const t=this.parsedDefinitionExpression,r=this._excludeObjectIds,i=this._getObjectIdField();for(const s of e.graphics){const e=s.visible,o=this._evaluateClause(t,s),a=!r.has(s.attributes[i]);s.visible=o&&a,e!==s.visible&&(xe.graphic=s,xe.property="visible",xe.oldValue=e,xe.newValue=s.visible,this.processor.graphicsCore.graphicUpdateHandler(xe),Ee())}}createQuery(){const e={outFields:["*"],returnGeometry:!0,outSpatialReference:this.view.spatialReference};return this.filter?.createQuery(e)??new N(e)}queryFeatures(e,t){return this._queryEngine.executeQuery(this._ensureQuery(e),t?.signal)}queryObjectIds(e,t){return this._queryEngine.executeQueryForIds(this._ensureQuery(e),t?.signal)}queryFeatureCount(e,t){return this._queryEngine.executeQueryForCount(this._ensureQuery(e),t?.signal)}queryExtent(e,t){return this._queryEngine.executeQueryForExtent(this._ensureQuery(e),t?.signal)}_ensureQuery(e){return this._addDefinitionExpressionToQuery(null==e?this.createQuery():N.from(e))}_setupQueryEngine(){const{layer:e,view:t,hasM:r,hasZ:i}=this,{spatialReference:s,resourceController:o}=t,a=new V(s,e,o,()=>this.processor.featureStore,i,r,()=>this.availableFields);this._queryEngine=new A({context:a,priority:ue.FEATURE_QUERY_ENGINE})}get usedMemory(){return this.processor?.graphicsCore?.usedMemory??0}get unloadedMemory(){return.8*((this._controller?.unloadedMemoryEstimate??0)+(this.processor?.graphicsCore?.unprocessedMemoryEstimate??0))}get ignoresMemoryFactor(){return this._controller&&this._controller.fixedFeatureTarget}async _handleEdits(e){const t=this._attributeEditingContext,r=await L(t,e);R(t,r)}get _attributeEditingContext(){const e=this._getObjectIdField(),t=this._getGlobalIdField();return{sessions:this._interactiveEditingSessions,fieldsIndex:this.layer.fieldsIndex,objectIdField:e,globalIdField:t,forEachNode:e=>this.loadedGraphics.forEachNode(t=>e(t.node,t.featureIds)),attributeStorageInfo:this.layer.attributeStorageInfo??[],i3sOverrides:this._i3sOverrides,getAttributeData:e=>this.getAttributeData(e),setAttributeData:(t,r,i)=>{this._setAttributeData(t,r);const s=this.loadedGraphics.getNode(t);if(null!=i){const t=this.loadedGraphics.get(i.attributes[e]);null!=t&&this.processor.graphicsCore.recreateGraphics([t])}else null!=s&&this.processor.graphicsCore.recreateGraphics(s.graphics)},clearMemCache:()=>{}}}get performanceInfo(){return new Y(this.usedMemory,this.loadedGraphics.length,-1,this.maximumNumberOfFeatures,this.loadedGraphics.nodeCount,this.processor.graphicsCore.performanceInfo)}get test(){}};e([d()],ce.prototype,"processor",void 0),e([d({type:j})],ce.prototype,"filter",void 0),e([d()],ce.prototype,"loadedGraphics",void 0),e([d()],ce.prototype,"layerViewUid",null),e([d()],ce.prototype,"_controller",void 0),e([d()],ce.prototype,"updating",void 0),e([d()],ce.prototype,"suspended",void 0),e([d(ie)],ce.prototype,"updatingProgress",void 0),e([d()],ce.prototype,"updatingProgressValue",null),e([d({readOnly:!0})],ce.prototype,"visibleAtCurrentScale",null),e([d(he.requiredFields)],ce.prototype,"requiredFields",null),e([d(he.availableFields)],ce.prototype,"availableFields",void 0),e([d()],ce.prototype,"_fieldsHelper",void 0),e([d({type:Number})],ce.prototype,"maximumNumberOfFeatures",null),e([d({readOnly:!0})],ce.prototype,"maximumNumberOfFeaturesExceeded",null),e([d()],ce.prototype,"_excludeObjectIds",null),e([d({readOnly:!0})],ce.prototype,"lodFactor",null),e([d({readOnly:!0})],ce.prototype,"hasM",null),e([d({readOnly:!0})],ce.prototype,"hasZ",null),e([d()],ce.prototype,"contentVisible",null),e([d({readOnly:!0})],ce.prototype,"legendEnabled",null),e([d()],ce.prototype,"_graphicOrigin",null),ce=e([u("esri.views.3d.layers.SceneLayerGraphicsView3D")],ce);const ge=ce;function me(e){return"pointData"in e}function ye(e){return"geometryBuffer"in e&&null!==e.geometryBuffer}function fe(e,t,r){const i=t.attributeInfo;if(null==i?.loadedAttributes||null==i.attributeData)return!1;let s=!1;for(const{name:o}of i.loadedAttributes)if(i.attributeData[o]){const t=H(i.attributeData[o],r);t!==e.attributes[o]&&(e.attributes[o]=t,s=!0)}return s}function _e(e){const t=e.attributeInfo;if(null==t?.loadedAttributes||null==t.attributeData)return;const r=e.node.index;for(let i=0;i<e.graphics.length;i++){const s=e.graphics[i];if(s.nodeIndex===r){s.attributes||(s.attributes={});for(const{name:e}of t.loadedAttributes)t.attributeData[e]&&(s.attributes[e]=H(t.attributeData[e],i))}}}function be(e,t){return e.xmin-=t,e.ymin-=t,e.xmax+=t,e.ymax+=t,null!=e.zmin&&null!=e.zmax&&(e.zmin-=t,e.zmax+=t),null!=e.mmin&&null!=e.mmax&&(e.mmin-=t,e.mmax+=t),e}const ve={2:{type:"Embedded",params:{type:"points",vertexAttributes:{position:[0,0]}}},3:{type:"Embedded",params:{type:"points",vertexAttributes:{position:[0,0,0]}}}},Ie=c(),xe={graphic:null,property:null,oldValue:null,newValue:null};function Ee(){xe.graphic=null,xe.property=null,xe.oldValue=null,xe.newValue=null}export{ge as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../../../Graphic.js";import i from"../../../core/Logger.js";import{destroyMaybe as r}from"../../../core/maybe.js";import{throwIfAborted as s}from"../../../core/promiseUtils.js";import l from"../../../core/ReactiveSet.js";import{initial as n}from"../../../core/reactiveUtils.js";import{property as o,subclass as a}from"../../../core/accessorSupport/decorators.js";import d from"../../../core/sql/WhereClause.js";import u from"../../../layers/support/FeatureFilter.js";import{getFloorFilterClause as h}from"../../../layers/support/floorFilterUtils.js";import p from"../../../rest/support/Query.js";import{isNumber as y}from"../../../support/guards.js";import{I3SMeshView3D as c}from"./I3SMeshView3D.js";import{LayerView3D as g}from"./LayerView3D.js";import{createInteractiveEditSession as f,normalizeEditResultsEvent as m,processGeometryEdits as _,processAttributeEdits as F}from"./i3s/featureEditing.js";import{createGetFeatureExtent as v}from"./i3s/I3SGeometryUtil.js";import{I3SMeshViewFilter as w}from"./i3s/I3SMeshViewFilter.js";import{I3SOverrides as b}from"./i3s/I3SOverrides.js";import{I3SQueryEngine as j}from"./i3s/I3SQueryEngine.js";import{I3SQueryFeatureAdapter as I,I3SQueryFeature as S}from"./i3s/I3SQueryFeatureAdapter.js";import{I3SQueryFeatureStore as E}from"./i3s/I3SQueryFeatureStore.js";import{checkRecyclable as O,getIndexCrs as H,objectIdFilter as x}from"./i3s/I3SUtil.js";import{DefinitionExpressionSceneLayerView as C}from"./support/DefinitionExpressionSceneLayerView.js";import{defineFieldProperties as Q}from"./support/fieldProperties.js";import{PopupSceneLayerView as V}from"./support/PopupSceneLayerView.js";import{SceneLayerViewRequiredFields as R}from"./support/SceneLayerViewRequiredFields.js";import{TemporalSceneLayerView as q}from"./support/TemporalSceneLayerView.js";import{updatingProgress as L}from"../support/updatingProperties.js";import A from"../../layers/SceneLayerView.js";import{hasPopupTemplate as D}from"../../layers/support/popupUtils.js";import{isInEffectiveScaleRange as G}from"../../support/layerViewUtils.js";import{TaskPriority as U}from"../../support/Scheduler.js";const P=Q();let M=class extends(c(q(C(V(g(A)))))){constructor(){super(...arguments),this.type="scene-layer-3d",this.viewFilter=null,this._setVisibilityHiddenObjectIds=new l,this.progressiveLoadFactor=1,this._elevationContext=2,this._supportsLabeling=!0,this._pendingEditsQueue=Promise.resolve(),this._interactiveEditingSessions=new Map,this._queryEngine=null}get i3slayer(){return this.layer}tryRecycleWith(e,t){return e.url===this.layer.url&&this.i3sOverrides.isEmpty?e.load(t).then(()=>{s(t),O(this.layer,e,this.i3sOverrides),this.layer=e,this.i3sOverrides.destroy();const i=this.view.resourceController?.memoryController;this.i3sOverrides=new b({view:this.view,layer:e,memoryController:i}),this.resetHighlights()}):null}get layerPopupEnabledAndHasTemplate(){return this.layer.popupEnabled&&D(this.layer,this.view.popup?.defaultPopupTemplateEnabled)}get filter(){return this._get("filter")}set filter(e){this._set("filter",w.checkSupport(e)?e:null)}get requiredFields(){return this._fieldsHelper?.requiredFields??[]}get _floorFilterClause(){const e=h(this);return null!=e?d.create(e,{fieldsIndex:this.layer.fieldsIndex}):null}get _excludeObjectIdsSorted(){const e=this.layer.excludeObjectIds.toArray();return e.length?e.sort((e,t)=>e-t):null}get _setVisibilityHiddenObjectIdsSorted(){return this._setVisibilityHiddenObjectIds.size?Array.from(this._setVisibilityHiddenObjectIds).sort((e,t)=>e-t):null}get lodFactor(){return this.view?.qualitySettings?.sceneService?.objectLoDFactor??1}get lodCrossfadeUncoveredDuration(){return this.view?.qualitySettings?.fadeDuration??0}get updatingProgressValue(){return this._controller?.updatingProgress??0}get visibleAtCurrentScale(){return G(this.i3slayer.effectiveScaleRange,this.view.scale)}get _graphicOrigin(){return this.layer.graphicOrigin}initialize(){this._fieldsHelper=new R({layerView:this}),this._updatingHandles.add(()=>this.layer.rangeInfos,e=>this._rangeInfosChanged(e),n),this._updatingHandles.add(()=>this.layer.renderer,e=>this._updatingHandles.addPromise(this._rendererChange(e)),n);const e=()=>this._filterChange();this._updatingHandles.add(()=>this.parsedDefinitionExpression,e),this._updatingHandles.add(()=>this.mergedFilter,e),this._updatingHandles.add(()=>this._floorFilterClause,e),this._updatingHandles.add(()=>this._excludeObjectIdsSorted,e),this._updatingHandles.add(()=>this._setVisibilityHiddenObjectIdsSorted,e),this._updatingHandles.add(()=>this.viewFilter?.sortedObjectIds,e),this._updatingHandles.add(()=>this.viewFilter?.parsedWhereClause,e),this._updatingHandles.add(()=>this.getTimeFilterDependencies(),e),this._updatingHandles.add(()=>[this.viewFilter?.parsedGeometry,this.mergedFilter?.spatialRelationship,this.layer.filter?.spatialRelationship],()=>this._geometryFilterChange()),this._updatingHandles.add(()=>({layerViewFilter:this.mergedFilter,layerFilter:this.layerFilter}),({layerViewFilter:e,layerFilter:t})=>{if(null==e&&null==t)return void this._set("viewFilter",null);const i=this.viewFilter;if(i)return i.viewFilter=e,i.layerFilter=t,void this._filterChange();this._set("viewFilter",new w({layerFilter:t,viewFilter:e,layerFieldsIndex:this.layer.fieldsIndex,loadAsyncModule:e=>this._loadAsyncModule(e),addSqlFilter:(e,t)=>this.addSqlFilter(e,t,this.logError),addTimeFilter:(e,t)=>this.addTimeFilter(e,t)}))},n),this.i3sOverrides.is3DOFL&&this._updatingHandles.add(()=>this.i3sOverrides.sortedGeometryChangedObjectIds,e),this.addHandles(this.layer.on("apply-edits",e=>this._updatingHandles.addPromise(e.result))),this.addHandles(this.layer.on("edits",e=>{const t=this._pendingEditsQueue.then(()=>this._handleEdits(e)).then();this._pendingEditsQueue=t,this._updatingHandles.consumePromise(t)}))}destroy(){this._fieldsHelper=r(this._fieldsHelper)}_rangeInfosChanged(e){null!=e&&e.length>0&&i.getLogger(this).warn("Unsupported property: rangeInfos are currently only serialized to and from web scenes but do not affect rendering.")}createQuery(){const e={outFields:["*"],returnGeometry:!0,returnZ:!0,outSpatialReference:this.view.spatialReference};return this.mergedFilter?.createQuery(e)??new p(e)}queryExtent(e,t){return this._ensureQueryEngine().executeQueryForExtent(this._ensureQuery(e),t?.signal)}queryFeatureCount(e,t){return this._ensureQueryEngine().executeQueryForCount(this._ensureQuery(e),t?.signal)}queryFeatures(e,t){return this._ensureQueryEngine().executeQuery(this._ensureQuery(e),t?.signal).then(e=>{if(!e?.features)return e;const t=this.layer,i=this._graphicOrigin;for(const r of e.features)r.layer=t,r.sourceLayer=t,r.origin=i;return e})}async queryObjectIds(e,t){return(await this._ensureQueryEngine().executeQueryForIds(this._ensureQuery(e),t?.signal)).filter(y)}_ensureQueryEngine(){return this._queryEngine??=this._createQueryEngine(),this._queryEngine}_createQueryEngine(){const e=v(this.view.spatialReference,this.view.renderSpatialReference,this._collection);return new j({layerView:this,priority:U.FEATURE_QUERY_ENGINE,spatialIndex:new E({featureAdapter:new I({objectIdField:this.layer.objectIdField,attributeStorageInfo:this.layer.attributeStorageInfo??[],getFeatureExtent:e}),forAllFeatures:(e,t)=>this._forAllFeatures((t,i,r)=>e(new S(t,i,r)),t,2),getFeatureExtent:e,sourceSpatialReference:H(this.layer),viewSpatialReference:this.view.spatialReference})})}createInteractiveEditSession(e){return f(this._attributeEditingContext,e)}_createLayerGraphic(e){return new t({attributes:e,layer:this.layer,sourceLayer:this.layer,origin:this._graphicOrigin})}getFilters(){const e=super.getFilters();this.i3sOverrides.is3DOFL&&this.i3sOverrides.sortedGeometryChangedObjectIds.length>0&&e.push((e,t)=>{t.node.index>=0&&x(this.i3sOverrides.sortedGeometryChangedObjectIds,!1,e)});const t=this._setVisibilityHiddenObjectIdsSorted;null!=t&&e.push(e=>x(t,!1,e));const i=this._excludeObjectIdsSorted;return null!=i&&e.push(e=>x(i,!1,e)),this._floorFilterClause&&this.addSqlFilter(e,this._floorFilterClause,this.logError),this.addSqlFilter(e,this.parsedDefinitionExpression,this.logError),null!=this.viewFilter&&this.viewFilter.addFilters(e,this.view,this._controller.crsIndex,this._collection),e}setVisibility(e,t){t?this._setVisibilityHiddenObjectIds.delete(e):this._setVisibilityHiddenObjectIds.add(e)}isUpdating(){return super.isUpdating()||!!this._fieldsHelper?.updating||this.layerFilterUpdating||null!=this.viewFilter&&this.viewFilter.updating||null!=this.i3sOverrides&&this.i3sOverrides.updating}_ensureQuery(e){return this._validateQuery(this._addDefinitionExpressionToQuery(null==e?this.createQuery():p.from(e)))}_validateQuery(e){return e.outSpatialReference&&!e.outSpatialReference.equals(this.view.spatialReference)&&(i.getLogger(this).warn("query: outSpatialReference different from the view's spatial reference is not supported"),e.outSpatialReference=this.view.spatialReference),e.returnGeometry&&(e.returnZ=!0),e.returnCentroid=!1,e}get _attributeEditingContext(){return{sessions:this._interactiveEditingSessions,fieldsIndex:this.layer.fieldsIndex,objectIdField:this._getObjectIdField(),globalIdField:this._getGlobalIdField(),forEachNode:e=>this._forAllNodes(t=>null!=t?e(t.node,t.featureIds):null),attributeStorageInfo:this.i3slayer.attributeStorageInfo??[],i3sOverrides:this.i3sOverrides,getAttributeData:e=>this.getAttributeData(e),setAttributeData:(e,t)=>this.setAttributeData(e,t),clearMemCache:()=>this.clearMemCache()}}async _handleEdits(e){const t=this._attributeEditingContext,i=await m(t,e);_(t,i),F(t,i)}get hasGeometryFilter(){return null!=this.viewFilter?.parsedGeometry}computeNodeFiltering(e){const t=this.viewFilter;return null==t||!this.view.spatialReference||t.isMBSGeometryVisible(e,this.view.spatialReference,this._controller.crsIndex)?0:1}};e([o()],M.prototype,"i3slayer",null),e([o(L)],M.prototype,"updatingProgress",void 0),e([o({type:u})],M.prototype,"filter",null),e([o({readOnly:!0})],M.prototype,"viewFilter",void 0),e([o(P.requiredFields)],M.prototype,"requiredFields",null),e([o(P.availableFields)],M.prototype,"availableFields",void 0),e([o()],M.prototype,"_fieldsHelper",void 0),e([o()],M.prototype,"_floorFilterClause",null),e([o()],M.prototype,"_excludeObjectIdsSorted",null),e([o()],M.prototype,"_setVisibilityHiddenObjectIds",void 0),e([o()],M.prototype,"_setVisibilityHiddenObjectIdsSorted",null),e([o()],M.prototype,"lodFactor",null),e([o()],M.prototype,"updatingProgressValue",null),e([o({readOnly:!0})],M.prototype,"visibleAtCurrentScale",null),e([o()],M.prototype,"_graphicOrigin",null),M=e([a("esri.views.3d.layers.SceneLayerView3D")],M);const T=M;export{T as default};
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../../../Graphic.js";import i from"../../../core/Logger.js";import{destroyMaybe as r}from"../../../core/maybe.js";import{throwIfAborted as s}from"../../../core/promiseUtils.js";import l from"../../../core/ReactiveSet.js";import{initial as n}from"../../../core/reactiveUtils.js";import{property as o,subclass as a}from"../../../core/accessorSupport/decorators.js";import d from"../../../core/sql/WhereClause.js";import u from"../../../layers/support/FeatureFilter.js";import{getFloorFilterClause as h}from"../../../layers/support/floorFilterUtils.js";import p from"../../../rest/support/Query.js";import{isNumber as c}from"../../../support/guards.js";import{I3SMeshView3D as y}from"./I3SMeshView3D.js";import{LayerView3D as g}from"./LayerView3D.js";import{createInteractiveEditSession as f,normalizeEditResultsEvent as m,processGeometryEdits as _,processAttributeEdits as F}from"./i3s/featureEditing.js";import{createGetFeatureExtent as v}from"./i3s/I3SGeometryUtil.js";import{I3SMeshViewFilter as w}from"./i3s/I3SMeshViewFilter.js";import{I3SOverrides as b}from"./i3s/I3SOverrides.js";import{I3SQueryEngine as j}from"./i3s/I3SQueryEngine.js";import{I3SQueryFeatureAdapter as I,I3SQueryFeature as S}from"./i3s/I3SQueryFeatureAdapter.js";import{I3SQueryFeatureStore as E}from"./i3s/I3SQueryFeatureStore.js";import{checkRecyclable as O,getIndexCrs as H,objectIdFilter as x}from"./i3s/I3SUtil.js";import{DefinitionExpressionSceneLayerView as C}from"./support/DefinitionExpressionSceneLayerView.js";import{defineFieldProperties as Q}from"./support/fieldProperties.js";import{PopupSceneLayerView as V}from"./support/PopupSceneLayerView.js";import{SceneLayerViewRequiredFields as R}from"./support/SceneLayerViewRequiredFields.js";import{TemporalSceneLayerView as q}from"./support/TemporalSceneLayerView.js";import{updatingProgress as L}from"../support/updatingProperties.js";import A from"../../layers/SceneLayerView.js";import{hasPopupTemplate as D}from"../../layers/support/popupUtils.js";import{isInEffectiveScaleRange as G}from"../../support/layerViewUtils.js";import{TaskPriority as U}from"../../support/Scheduler.js";const P=Q();let M=class extends(y(q(C(V(g(A)))))){constructor(){super(...arguments),this.type="scene-layer-3d",this.viewFilter=null,this._setVisibilityHiddenObjectIds=new l,this.progressiveLoadFactor=1,this._elevationContext=2,this._supportsLabeling=!0,this._pendingEditsQueue=Promise.resolve(),this._interactiveEditingSessions=new Map,this._queryEngine=null}tryRecycleWith(e,t){return e.url===this.layer.url&&this.i3sOverrides.isEmpty?e.load(t).then(()=>{s(t),O(this.layer,e,this.i3sOverrides),this.layer=e,this.i3sOverrides.destroy();const i=this.view.resourceController?.memoryController;this.i3sOverrides=new b({view:this.view,layer:e,memoryController:i}),this.resetHighlights()}):null}get layerPopupEnabledAndHasTemplate(){return this.layer.popupEnabled&&D(this.layer,this.view.popup?.defaultPopupTemplateEnabled)}get filter(){return this._get("filter")}set filter(e){this._set("filter",w.checkSupport(e)?e:null)}get requiredFields(){return this._fieldsHelper?.requiredFields??[]}get _floorFilterClause(){const e=h(this);return null!=e?d.create(e,{fieldsIndex:this.layer.fieldsIndex}):null}get _excludeObjectIdsSorted(){const e=this.layer.excludeObjectIds.toArray();return e.length?e.sort((e,t)=>e-t):null}get _setVisibilityHiddenObjectIdsSorted(){return this._setVisibilityHiddenObjectIds.size?Array.from(this._setVisibilityHiddenObjectIds).sort((e,t)=>e-t):null}get lodFactor(){return this.view?.qualitySettings?.sceneService?.objectLoDFactor??1}get lodCrossfadeUncoveredDuration(){return this.view?.qualitySettings?.fadeDuration??0}get updatingProgressValue(){return this._controller?.updatingProgress??0}get visibleAtCurrentScale(){return G(this.layer.effectiveScaleRange,this.view.scale)}get _graphicOrigin(){return this.layer.graphicOrigin}initialize(){this._fieldsHelper=new R({layerView:this}),this._updatingHandles.add(()=>this.layer.rangeInfos,e=>this._rangeInfosChanged(e),n),this._updatingHandles.add(()=>this.layer.renderer,e=>this._updatingHandles.addPromise(this._rendererChange(e)),n);const e=()=>this._filterChange();this._updatingHandles.add(()=>this.parsedDefinitionExpression,e),this._updatingHandles.add(()=>this.mergedFilter,e),this._updatingHandles.add(()=>this._floorFilterClause,e),this._updatingHandles.add(()=>this._excludeObjectIdsSorted,e),this._updatingHandles.add(()=>this._setVisibilityHiddenObjectIdsSorted,e),this._updatingHandles.add(()=>this.viewFilter?.sortedObjectIds,e),this._updatingHandles.add(()=>this.viewFilter?.parsedWhereClause,e),this._updatingHandles.add(()=>this.getTimeFilterDependencies(),e),this._updatingHandles.add(()=>[this.viewFilter?.parsedGeometry,this.mergedFilter?.spatialRelationship,this.layer.filter?.spatialRelationship],()=>this._geometryFilterChange()),this._updatingHandles.add(()=>({layerViewFilter:this.mergedFilter,layerFilter:this.layerFilter}),({layerViewFilter:e,layerFilter:t})=>{if(null==e&&null==t)return void this._set("viewFilter",null);const i=this.viewFilter;if(i)return i.viewFilter=e,i.layerFilter=t,void this._filterChange();this._set("viewFilter",new w({layerFilter:t,viewFilter:e,layerFieldsIndex:this.layer.fieldsIndex,loadAsyncModule:e=>this._loadAsyncModule(e),addSqlFilter:(e,t)=>this.addSqlFilter(e,t,this.logError),addTimeFilter:(e,t)=>this.addTimeFilter(e,t)}))},n),this.i3sOverrides.is3DOFL&&this._updatingHandles.add(()=>this.i3sOverrides.sortedGeometryChangedObjectIds,e),this.addHandles(this.layer.on("apply-edits",e=>this._updatingHandles.addPromise(e.result))),this.addHandles(this.layer.on("edits",e=>{const t=this._pendingEditsQueue.then(()=>this._handleEdits(e)).then();this._pendingEditsQueue=t,this._updatingHandles.consumePromise(t)}))}destroy(){this._fieldsHelper=r(this._fieldsHelper)}_rangeInfosChanged(e){null!=e&&e.length>0&&i.getLogger(this).warn("Unsupported property: rangeInfos are currently only serialized to and from web scenes but do not affect rendering.")}createQuery(){const e={outFields:["*"],returnGeometry:!0,returnZ:!0,outSpatialReference:this.view.spatialReference};return this.mergedFilter?.createQuery(e)??new p(e)}queryExtent(e,t){return this._ensureQueryEngine().executeQueryForExtent(this._ensureQuery(e),t?.signal)}queryFeatureCount(e,t){return this._ensureQueryEngine().executeQueryForCount(this._ensureQuery(e),t?.signal)}queryFeatures(e,t){return this._ensureQueryEngine().executeQuery(this._ensureQuery(e),t?.signal).then(e=>{if(!e?.features)return e;const t=this.layer,i=this._graphicOrigin;for(const r of e.features)r.layer=t,r.sourceLayer=t,r.origin=i;return e})}async queryObjectIds(e,t){return(await this._ensureQueryEngine().executeQueryForIds(this._ensureQuery(e),t?.signal)).filter(c)}_ensureQueryEngine(){return this._queryEngine??=this._createQueryEngine(),this._queryEngine}_createQueryEngine(){const e=v(this.view.spatialReference,this.view.renderSpatialReference,this._collection);return new j({layerView:this,priority:U.FEATURE_QUERY_ENGINE,spatialIndex:new E({featureAdapter:new I({objectIdField:this.layer.objectIdField,attributeStorageInfo:this.layer.attributeStorageInfo??[],getFeatureExtent:e}),forAllFeatures:(e,t)=>this._forAllFeatures((t,i,r)=>e(new S(t,i,r)),t,2),getFeatureExtent:e,sourceSpatialReference:H(this.layer),viewSpatialReference:this.view.spatialReference})})}createInteractiveEditSession(e){return f(this._attributeEditingContext,e)}_createLayerGraphic(e){return new t({attributes:e,layer:this.layer,sourceLayer:this.layer,origin:this._graphicOrigin})}getFilters(){const e=super.getFilters();this.i3sOverrides.is3DOFL&&this.i3sOverrides.sortedGeometryChangedObjectIds.length>0&&e.push((e,t)=>{t.node.index>=0&&x(this.i3sOverrides.sortedGeometryChangedObjectIds,!1,e)});const t=this._setVisibilityHiddenObjectIdsSorted;null!=t&&e.push(e=>x(t,!1,e));const i=this._excludeObjectIdsSorted;return null!=i&&e.push(e=>x(i,!1,e)),this._floorFilterClause&&this.addSqlFilter(e,this._floorFilterClause,this.logError),this.addSqlFilter(e,this.parsedDefinitionExpression,this.logError),null!=this.viewFilter&&this.viewFilter.addFilters(e,this.view,this._controller.crsIndex,this._collection),e}setVisibility(e,t){t?this._setVisibilityHiddenObjectIds.delete(e):this._setVisibilityHiddenObjectIds.add(e)}isUpdating(){return super.isUpdating()||!!this._fieldsHelper?.updating||this.layerFilterUpdating||null!=this.viewFilter&&this.viewFilter.updating||null!=this.i3sOverrides&&this.i3sOverrides.updating}_ensureQuery(e){return this._validateQuery(this._addDefinitionExpressionToQuery(null==e?this.createQuery():p.from(e)))}_validateQuery(e){return e.outSpatialReference&&!e.outSpatialReference.equals(this.view.spatialReference)&&(i.getLogger(this).warn("query: outSpatialReference different from the view's spatial reference is not supported"),e.outSpatialReference=this.view.spatialReference),e.returnGeometry&&(e.returnZ=!0),e.returnCentroid=!1,e}get _attributeEditingContext(){return{sessions:this._interactiveEditingSessions,fieldsIndex:this.layer.fieldsIndex,objectIdField:this._getObjectIdField(),globalIdField:this._getGlobalIdField(),forEachNode:e=>this._forAllNodes(t=>null!=t?e(t.node,t.featureIds):null),attributeStorageInfo:this.layer.attributeStorageInfo??[],i3sOverrides:this.i3sOverrides,getAttributeData:e=>this.getAttributeData(e),setAttributeData:(e,t)=>this.setAttributeData(e,t),clearMemCache:()=>this.clearMemCache()}}async _handleEdits(e){const t=this._attributeEditingContext,i=await m(t,e);_(t,i),F(t,i)}get hasGeometryFilter(){return null!=this.viewFilter?.parsedGeometry}computeNodeFiltering(e){const t=this.viewFilter;return null==t||!this.view.spatialReference||t.isMBSGeometryVisible(e,this.view.spatialReference,this._controller.crsIndex)?0:1}};e([o(L)],M.prototype,"updatingProgress",void 0),e([o({type:u})],M.prototype,"filter",null),e([o({readOnly:!0})],M.prototype,"viewFilter",void 0),e([o(P.requiredFields)],M.prototype,"requiredFields",null),e([o(P.availableFields)],M.prototype,"availableFields",void 0),e([o()],M.prototype,"_fieldsHelper",void 0),e([o()],M.prototype,"_floorFilterClause",null),e([o()],M.prototype,"_excludeObjectIdsSorted",null),e([o()],M.prototype,"_setVisibilityHiddenObjectIds",void 0),e([o()],M.prototype,"_setVisibilityHiddenObjectIdsSorted",null),e([o()],M.prototype,"lodFactor",null),e([o()],M.prototype,"updatingProgressValue",null),e([o({readOnly:!0})],M.prototype,"visibleAtCurrentScale",null),e([o()],M.prototype,"_graphicOrigin",null),M=e([a("esri.views.3d.layers.SceneLayerView3D")],M);const T=M;export{T as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{hasScaling as e}from"../../../core/mathUtils.js";import{fromMat4 as r}from"../../../core/libs/gl-matrix-2/math/mat3.js";import{create as t}from"../../../core/libs/gl-matrix-2/factories/mat3f64.js";import o from"../../../geometry/SpatialReference.js";import{ensurePackedMat4f64 as n,ensurePackedArray as s}from"../../../geometry/support/DoubleArray.js";import i from"../../../geometry/support/MeshGeoreferencedVertexSpace.js";import a from"../../../geometry/support/MeshLocalVertexSpace.js";import{b as f,n as c}from"../../../chunks/vec3.js";import{get as l,cleanup as u}from"../../../libs/i3s/I3SModule.js";import{
|
|
2
|
+
import{hasScaling as e}from"../../../core/mathUtils.js";import{fromMat4 as r}from"../../../core/libs/gl-matrix-2/math/mat3.js";import{create as t}from"../../../core/libs/gl-matrix-2/factories/mat3f64.js";import o from"../../../geometry/SpatialReference.js";import{ensurePackedMat4f64 as n,ensurePackedArray as s}from"../../../geometry/support/DoubleArray.js";import i from"../../../geometry/support/MeshGeoreferencedVertexSpace.js";import a from"../../../geometry/support/MeshLocalVertexSpace.js";import{b as f,n as c}from"../../../chunks/vec3.js";import{get as l,cleanup as u}from"../../../libs/i3s/I3SModule.js";import{processNormals as m}from"./IntegratedMeshNormals.js";import{TransformedGeometry as p,TransformedData as y}from"./SceneLayerWorkerHandle.js";async function d(e){E=await M();const r=[e.geometryBuffer];return{result:U(E,e,r),transferList:r}}async function h(e){E=await M();const r=[e.geometryBuffer],{geometryBuffer:t}=e,o=t.byteLength,n=E._malloc(o),s=new Uint8Array(E.HEAPU8.buffer,n,o);s.set(new Uint8Array(t));const i=E.dracoDecompressPointCloudData(n,s.byteLength);if(E._free(n),i.error.length>0)throw new Error(`i3s.wasm: ${i.error}`);const a=i.featureIds?.length>0?i.featureIds.slice():null,f=i.positions.slice();return a&&r.push(a.buffer),r.push(f.buffer),{result:{positions:f,featureIds:a},transferList:r}}async function g(e){await M(),P(e);const r={buffer:e.buffer};return{result:r,transferList:[r.buffer]}}async function b(e){await M(),S(e)}async function w(e){E=await M(),E.setLegacySchema(e.context,e.jsonSchema)}async function j(e){const{localMatrix:r,origin:t,positions:f,vertexSpace:c}=e,l=o.fromJSON(e.inSpatialReference),u=o.fromJSON(e.outSpatialReference),m=r?n(r):void 0,p=s(t);let y;const[{projectBuffer:d},{initializeProjection:h}]=await Promise.all([import("../../../geometry/projection/projectBuffer.js"),import("../../../geometry/projectionUtils.js")]);await h(l,u);const g=[0,0,0];if(!d(p,l,0,g,u,0))throw new Error("Failed to project");if("georeferenced"===c.type&&null==c.origin){if(y=new Float64Array(f.length),!d(f,l,0,y,u,0,y.length/3))throw new Error("Failed to project")}else{const e="georeferenced"===c.type?i.fromJSON(c):a.fromJSON(c),{projectMeshVertexPositions:r}=await import("../../../geometry/support/meshUtils/projectMeshVertexPositions.js"),t=r({vertexAttributes:{position:f},transform:m?{localMatrix:m}:void 0,vertexSpace:e,spatialReference:l},u);if(!t)throw new Error("Failed to project");y=t}const b=y.length,[w,j,A]=g;for(let o=0;o<b;o+=3)y[o]-=w,y[o+1]-=j,y[o+2]-=A;return{result:{projected:y,original:f,projectedOrigin:g},transferList:[y.buffer,f.buffer]}}async function A({normalMatrix:r,normals:t}){const o=new Float32Array(t.length);return f(o,t,r),e(r)&&c(o,o),{result:{transformed:o,original:t},transferList:[o.buffer,t.buffer]}}function x(e){_(e)}let L,E;function S(e){if(!E)return;const r=e.modifications,t=E._malloc(8*r.length),o=new Float64Array(E.HEAPU8.buffer,t,r.length);for(let n=0;n<r.length;++n)o[n]=r[n];E.setModifications(e.context,t,r.length,e.isGeodetic),E._free(t)}function U(e,o,n){const{context:s,globalTrafo:i,mbs:a,obbData:f,layouts:c,needNormals:l,computeNormals:u,elevationOffset:d,geometryBuffer:h,geometryDescriptor:g,indexToVertexProjector:b,vertexToRenderProjector:w,normalReferenceFrame:j}=o,A=e._malloc(h.byteLength),x=33,L=e._malloc(x*Float64Array.BYTES_PER_ELEMENT),E=new Uint8Array(e.HEAPU8.buffer,A,h.byteLength);E.set(new Uint8Array(h));const S=new Float64Array(e.HEAPU8.buffer,L,x);v(S,[NaN,NaN,NaN],0);let U=3;v(S,i,U),U+=16,v(S,a.center,U),U+=3,S[U++]=a.radius,f&&v(S,f,U++);const N={isDraco:!1,isLegacy:!1,color:c.some(e=>e.some(e=>"color"===e.name)),normal:l&&c.some(e=>e.some(e=>"normalCompressed"===e.name)),uv0:c.some(e=>e.some(e=>"uv0"===e.name)),uvRegion:c.some(e=>e.some(e=>"uvRegion"===e.name)),featureIndex:g.featureIndex},P=e.process(s,!!f,A,E.byteLength,g,N,L,d,b,w,j);if(e._free(L),e._free(A),P.error.length>0)throw new Error(`i3s.wasm: ${P.error}`);if(P.discarded)return null;const _=P.componentOffsets.length>0?P.componentOffsets.slice():null,I=P.featureIds.length>0?P.featureIds.slice():null,M=P.anchorIds.length>0?Array.from(P.anchorIds):null,F=P.anchors.length>0?Array.from(P.anchors):null,O=1===P.indicesType?new Uint16Array(P.indices.buffer,P.indices.byteOffset,P.indices.byteLength/2).slice():new Uint32Array(P.indices.buffer,P.indices.byteOffset,P.indices.byteLength/4).slice(),B=c[0].slice(),R=r(t(),i),T=m(P.interleavedVertedData,O,B,u&&!N.normal,R),D=P.positions.slice(),{buffer:H,byteOffset:V,byteLength:J}=P.positionIndices,C=1===P.positionIndicesType?new Uint16Array(H,V,J/2).slice():new Uint32Array(H,V,J/4).slice(),k=new p(B,T.data,T.indices,P.hasColors,P.hasModifications,{data:D,indices:C});return I&&n.push(I.buffer),_&&n.push(_.buffer),n.push(T.data),n.push(T.indices.buffer),n.push(D.buffer),n.push(C.buffer),new y(_,I,M,F,k,i,P.obb)}function N(e){return 0===e?0:1===e?1:2===e?2:3}function P(e){if(!E)return;const{context:r,buffer:t}=e,o=E._malloc(t.byteLength),n=t.byteLength/Float64Array.BYTES_PER_ELEMENT,s=new Float64Array(E.HEAPU8.buffer,o,n),i=new Float64Array(t);s.set(i),E.filterOBBs(r,o,n),i.set(s),E._free(o)}function _(e){0===E?.destroy(e)&&(E=null,L=null,u())}function v(e,r,t){for(let o=0;o<r.length;++o)e[o+t]=r[o]}async function I(){E||await M()}async function M(){return E||(E=await(L??=l())),E}const F={transform:(e,r)=>E&&U(E,e,r),destroy:_};export{x as destroyContext,h as dracoDecompressPointCloudData,g as filterObbsForModifications,P as filterObbsForModificationsSync,I as initialize,N as interpretObbModificationResults,d as process,j as project,w as setLegacySchema,b as setModifications,S as setModificationsSync,F as test,A as transformNormals};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import{destroyMaybe as r}from"../../../../core/maybe.js";import{watch as s,sync as n}from"../../../../core/reactiveUtils.js";import{property as i,subclass as a}from"../../../../core/accessorSupport/decorators.js";import o from"../../../../geometry/Extent.js";import{fallbackObjectIDAttribute as u}from"../../../../layers/LayerConstants.js";import{QueryEngine as y}from"../../../../layers/graphics/data/QueryEngine.js";import l from"../../../../layers/support/FieldsIndex.js";import c from"../../../../rest/support/FeatureSet.js";import d from"../../../../rest/support/Query.js";const p=y;let h=class extends t{constructor(e){super(e)}initialize(){this.addHandles(this.layerView.on("visible-geometry-changed",()=>this.spatialIndex.events.emit("changed"))),this.addHandles(s(()=>this.layerView.availableFields,()=>this._dataQueryEngineInstance=r(this._dataQueryEngineInstance),n))}destroy(){this._dataQueryEngineInstance=r(this._dataQueryEngineInstance),this._set("layerView",null)}get spatialReference(){return this.layerView.view.spatialReference}get layer(){return this.layerView.
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import{destroyMaybe as r}from"../../../../core/maybe.js";import{watch as s,sync as n}from"../../../../core/reactiveUtils.js";import{property as i,subclass as a}from"../../../../core/accessorSupport/decorators.js";import o from"../../../../geometry/Extent.js";import{fallbackObjectIDAttribute as u}from"../../../../layers/LayerConstants.js";import{QueryEngine as y}from"../../../../layers/graphics/data/QueryEngine.js";import l from"../../../../layers/support/FieldsIndex.js";import c from"../../../../rest/support/FeatureSet.js";import d from"../../../../rest/support/Query.js";const p=y;let h=class extends t{constructor(e){super(e)}initialize(){this.addHandles(this.layerView.on("visible-geometry-changed",()=>this.spatialIndex.events.emit("changed"))),this.addHandles(s(()=>this.layerView.availableFields,()=>this._dataQueryEngineInstance=r(this._dataQueryEngineInstance),n))}destroy(){this._dataQueryEngineInstance=r(this._dataQueryEngineInstance),this._set("layerView",null)}get spatialReference(){return this.layerView.view.spatialReference}get layer(){return this.layerView.layer}get defaultQueryJSON(){return new d({outSpatialReference:this.spatialReference}).toJSON()}get _dataQueryEngine(){return this._ensureDataQueryEngine()}async executeQueryForCount(e,t){return this._dataQueryEngine.executeQueryForCount(this._ensureQueryJSON(e),t)}async executeQueryForExtent(e,t){const{count:r,extent:s}=await this._dataQueryEngine.executeQueryForExtent(this._ensureQueryJSON(e),t);return{count:r,extent:o.fromJSON(s)}}async executeQueryForIds(e,t){return this._dataQueryEngine.executeQueryForIds(this._ensureQueryJSON(e),t)}async executeQuery(e,t){const r=this._ensureQueryJSON(e),s=await this._dataQueryEngine.executeQuery(r,t);if(e?.returnGeometry){const{processQueryGeometries:e}=await import("./I3SQueryResultGeometry.js");return e(this.layerView,s)}return c.fromJSON(s)}_ensureQueryJSON(e){return null==e?this.defaultQueryJSON:e.toJSON()}_ensureDataQueryEngine(){if(this._dataQueryEngineInstance)return this._dataQueryEngineInstance;const e=this.layer.objectIdField||u,t="esriGeometryPolygon",r=this.layer.fieldsIndex?.toJSON()||new l([]),s=this.layerView.view.resourceController.scheduler,n=this.spatialReference.toJSON(),i=this.priority,a=this.spatialIndex,o=this.layerView.availableFields??[];return this._dataQueryEngineInstance=new p({hasZ:!0,hasM:!1,geometryType:t,fieldsIndex:r,timeInfo:null,spatialReference:n,featureIdInfo:{type:"object-id",fieldName:e},featureStore:a,scheduler:s,priority:i,availableFields:o}),this._dataQueryEngineInstance}};e([i({constructOnly:!0})],h.prototype,"layerView",void 0),e([i({constructOnly:!0})],h.prototype,"priority",void 0),e([i({constructOnly:!0})],h.prototype,"spatialIndex",void 0),e([i()],h.prototype,"spatialReference",null),e([i()],h.prototype,"layer",null),e([i()],h.prototype,"defaultQueryJSON",null),h=e([a("esri.views.3d.layers.i3s.I3SQueryEngine")],h);export{h as I3SQueryEngine};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import e from"../../../../request.js";import{binaryIndexOf as t}from"../../../../core/arrayUtils.js";import r from"../../../../core/Error.js";import has from"../../../../core/has.js";import{invert as o}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as n}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{transformMat4 as i,copy as s}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as a}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{canProjectWithoutEngine as l}from"../../../../geometry/projectionUtils.js";import c from"../../../../geometry/SpatialReference.js";import{projectVectorToVector as u}from"../../../../geometry/projection/projectVectorToVector.js";import{create as f,empty as p,expandPointInPlace as m,intersects as d}from"../../../../geometry/support/aaBoundingRect.js";import{fetchFeaturePopupFeatures as h}from"../../../../layers/support/featurePopupQueryUtils.js";import y from"../../../../rest/support/Query.js";import{readBinaryAttribute as g,getCachedAttributeValue as b}from"./I3SBinaryReader.js";import{computeGlobalTransformation as w}from"./I3SProjectionUtil.js";import{createSolidEdgeMaterial as v,createMaterialFromEdges as x}from"../support/edgeUtils.js";import{parseColorMixMode as S}from"../support/symbolColorUtils.js";import{Obb as M,compute as R}from"../../support/orientedBoundingBox.js";import{emissiveStrengthDefault as j}from"../../webgl-engine/core/shaderLibrary/output/Emissions.glsl.js";import{spatialReferenceIncompatibleError as I}from"../../../support/layerViewUtils.js";function T(e){return e?parseInt(e.slice(e.lastIndexOf("/")+1),10):void 0}function k(e){if(has("disable-feature:i3s-draco")||!e)return!1;for(const t of e)for(const e of t.geometryBuffers)if("draco"===e.compressedAttributes?.encoding)return!0;return!1}function U(e,t,r,o){r.traverse(t,t=>{const r=t.serviceMbsInIndexSR;return 0!==(null!=r&&L(e,r))&&(o(t),!0)})}function W(e,t,r){let o=0,n=0;for(let i=0;i<t.length&&o<e.length;i++)e[o]===t[i]&&(r(i)&&(e[n]=e[o],n++),o++);e.length=n}function C(e,r,o){let n=0,i=0;for(;n<o.length;){t(e,o[n])>=0===r&&(o[i]=o[n],i++),n++}o.length=i}function A(e,t){if(0===t.rotationScale[1]&&0===t.rotationScale[2]&&0===t.rotationScale[3]&&0===t.rotationScale[5]&&0===t.rotationScale[6]&&0===t.rotationScale[7])return K[0]=(e[0]-t.position[0])/t.rotationScale[0],K[1]=(e[1]-t.position[1])/t.rotationScale[4],K[2]=(e[2]-t.position[0])/t.rotationScale[0],K[3]=(e[3]-t.position[1])/t.rotationScale[4],K}const K=f();function L(e,t){const r=t.center[0],o=t.center[1],n=t.radius,i=e[0]-r,s=r-e[2],a=e[1]-o,l=o-e[3],c=Math.max(i,s,0),u=Math.max(a,l,0),f=c*c+u*u;if(f>n*n)return 0;if(f>0)return 1;return-Math.max(i,s,a,l)>n?3:2}function q(e,t,r){const o=[],n=r?.missingFields,i=r?.originalFields;let s=!1;for(const a of e){const e=t.get(a);e?(i?.push(a),o.push(e.name),a!==e.name&&(s=!0)):n?.push(a)}return r&&"hasMismatchedCasing"in r&&(r.hasMismatchedCasing=s),o}async function F(e,t,o,n,i,s){if(0===t.length)return[];const a=e.attributeStorageInfo;if(null!=e.associatedLayer)try{return await B(e.associatedLayer,t,n,s)}catch(l){if(e.associatedLayer.loaded)throw l}if(a){const r=G(e,t,o,i),l=e.parsedUrl.path;return await Promise.allSettled(r.map(t=>O(l,a,t.node,t.indices,n,e.apiKey,e.customParameters,s).then(e=>{for(let r=0;r<t.graphics.length;r++){const o=t.graphics[r],n=e[r];if(o.attributes)for(const e in o.attributes)e in n||(n[e]=o.attributes[e]);o.attributes=n}}))),t}throw new r("scenelayer:no-attribute-source","This scene layer does not have a source for attributes available")}function G({globalIdField:e},t,r,o){const n=new Map,i=[],s=o();for(const a of t){const t=a.attributes?.[r],o=null==t?a.getGlobalId():void 0;for(let r=0;r<s.length;r++){const l=s[r],c=P(l,t,e,o);if(c<0)continue;let u=n.get(l.node);u||(u={node:l.node,indices:[],graphics:[]},i.push(u),n.set(l.node,u)),u.indices.push(c),u.graphics.push(a);for(let e=r;e>0;e--)s[e]=s[e-1];s[0]=l;break}}return i}function P(e,t,r,o){if(null!=t&&"number"==typeof t)return e.featureIds.indexOf(t);if(null==o||null==r)return-1;const n=e.attributeInfo?.attributeData?.[r];return n?n.indexOf(o):-1}async function B(e,t,r,o){const n=[],i={hasMismatchedCasing:!1,originalFields:n},s=q(r,e.fieldsIndex,i),a=new y({outFields:[...s]});if(await h(e,t,a,{updateSourceAttributes:!0,...o}),!i.hasMismatchedCasing)return t;for(let l=0;l<t.length;l++){const e=t[l];if(e.attributes)for(let t=0;t<n.length;t++){const r=n[t],o=s[t];o in e.attributes&&(e.attributes[r]=e.attributes[o],delete e.attributes[o])}}return t}function O(e,t,r,o,n,i,s,a){return E(e,t,r.resources.attributes,o,n,i,s,a)}async function E(t,r,o,n,i,s,a,l){const c=[];for(const e of r)if(e&&i.includes(e.name)){const r=`${t}/nodes/${o}/attributes/${e.key}/0`;c.push({url:r,storageInfo:e})}const u=await Promise.allSettled(c.map(t=>e(t.url,{responseType:"array-buffer",query:{...a,token:s},signal:l?.signal}).then(e=>g(t.storageInfo,e.data)))),f=[];for(const e of n){const t={};for(let r=0;r<u.length;r++){const o=u[r];if("fulfilled"===o.status){const n=o.value;t[c[r].storageInfo.name]=b(n,e)}}f.push(t)}return f}function V(e){const t=e.store,o=t.indexCRS||t.geographicCRS,n=void 0===o?t.indexWKT:void 0;if(n){if(!e.spatialReference)throw new r("layerview:no-store-spatial-reference-wkt-index-and-no-layer-spatial-reference","Found indexWKT in the scene layer store but no layer spatial reference",{});if(n!==e.spatialReference.wkt)throw new r("layerview:store-spatial-reference-wkt-index-incompatible","The indexWKT of the scene layer store does not match the WKT of the layer spatial reference",{})}const i=o?new c(T(o)):e.spatialReference;return i.equals(e.spatialReference)?e.spatialReference:i}function $(e){const t=e.store,o=t.vertexCRS||t.projectedCRS,n=void 0===o?t.vertexWKT:void 0;if(n){if(!e.spatialReference)throw new r("layerview:no-store-spatial-reference-wkt-vertex-and-no-layer-spatial-reference","Found vertexWKT in the scene layer store but no layer spatial reference",{});if(n!==e.spatialReference.wkt)throw new r("layerview:store-spatial-reference-wkt-vertex-incompatible","The vertexWKT of the scene layer store does not match the WKT of the layer spatial reference",{})}const i=o?new c(T(o)):e.spatialReference;return i.equals(e.spatialReference)?e.spatialReference:i}function z(e,t,r){if(!l(e,t))throw I("scene layer",e?.wkid,t?.wkid);if("local"===r&&!D(e,t))throw I("scene layer",e?.wkid,t?.wkid)}function Q(e,t,o){if(e.serviceUpdateTimeStamp?.lastUpdate!==t.serviceUpdateTimeStamp?.lastUpdate||!o.isEmpty||e.associatedLayer?.url!==t.associatedLayer?.url)throw new r("layerview:recycle-failed","Could not recycle layerview")}function D(e,t){return e.equals(t)||e.isWGS84&&t.isWebMercator||e.isWebMercator&&t.isWGS84}function Z(e,t,r){const o=V(e),n=$(e);z(o,t,r),z(n,t,r)}function H(e){return(null==e.geometryType||"triangles"===e.geometryType)&&((null==e.topology||"PerAttributeArray"===e.topology)&&null!=e.vertexAttributes?.position)}function J(e){if(null==e.store?.defaultGeometrySchema||!H(e.store.defaultGeometrySchema))throw new r("scenelayer:unsupported-geometry-schema","The geometry schema of this scene layer is not supported.",{url:e.parsedUrl.path})}function N(e,t){Z(e,t.spatialReference,t.viewingMode)}function X(e){return null!=e.geometryType&&"points"===e.geometryType&&((null==e.topology||"PerAttributeArray"===e.topology)&&((null==e.encoding||""===e.encoding||"lepcc-xyz"===e.encoding)&&null!=e.vertexAttributes?.position))}function Y(e){if(null==e.store?.defaultGeometrySchema||!X(e.store.defaultGeometrySchema))throw new r("pointcloud:unsupported-geometry-schema","The geometry schema of this point cloud scene layer is not supported.",{})}function _(e,t){z(e.spatialReference,t.spatialReference,t.viewingMode)}function ee(e){return"simple"===e.type||"class-breaks"===e.type||"unique-value"===e.type}function te(e){return"mesh-3d"===e.type}function re(e){if(null==e||!ee(e))return!0;if(("unique-value"===e.type||"class-breaks"===e.type)&&null==e.defaultSymbol)return!0;const t=e.symbols;if(0===t.length)return!0;for(const r of t){if(!te(r)||0===r.symbolLayers.length)return!0;for(const e of r.symbolLayers.items)if("fill"!==e.type||null==e.material?.color||"replace"!==e.material.colorMixMode)return!0}return!1}const oe=v({color:[0,0,0,0],opacity:0});class ne{constructor(){this.edgeMaterial=null,this.material=null,this.castShadows=!0}}function ie(e){const t=new ne;let r=!1,o=!1;for(const n of e.symbolLayers.items)if("fill"===n.type&&n.enabled){const e=n.material,i=n.edges;if(null!=e&&!r){const o=e.color,i=S(e.colorMixMode),s={strength:e.emissive?.strength??j,source:"color"===e.emissive?.source?1:0};t.material=null!=o?{color:[o.r/255,o.g/255,o.b/255],alpha:o.a,colorMixMode:i,emissive:s}:{color:[1,1,1],alpha:1,colorMixMode:1,emissive:s},t.castShadows=n.castShadows,r=!0}null==i||o||(t.edgeMaterial=x(i,{}),o=!0)}return t.material||(t.material={color:[1,1,1],alpha:1,colorMixMode:1,emissive:{strength:j,source:0}}),t}function se(e,t){return(0|e)+(0|t)|0}function ae(e,t,r,n,a,l,c){if(!l||0===l.length||null==t||!e.serviceMbsInIndexSR)return null;const f=w(e.serviceMbsInIndexSR,a,"none",r,t);o(de,f);let h=null;const y=()=>{if(!h)if(h=le,p(ue),null!=e.serviceObbInIndexSR){e.serviceObbInIndexSR.transform(fe,r,t,a,c),fe.getCorners(h);for(const e of h)i(e,e,de),m(ue,e)}else{const o=e.serviceMbsInIndexSR;if(!o)return;const n=o.radius;u(o.center,r,pe,t),i(pe,pe,de),pe[2]+=a;for(let e=0;e<8;++e){const t=1&e?n:-n,r=2&e?n:-n,o=4&e?n:-n,i=h[e];s(i,[pe[0]+t,pe[1]+r,pe[2]+o]),m(ue,i)}}};let g=1/0,b=-1/0;const v=e=>{if("replace"!==e.type)return;const r=e.geometry;if(!r?.hasZ)return;p(ce);const o=r.spatialReference||n,s=r.rings.reduce((e,r)=>r.reduce((e,r)=>(u(r,o,pe,t),i(pe,pe,de),m(ce,pe),Math.min(pe[2],e)),e),1/0);y(),d(ue,ce)&&(g=Math.min(g,s),b=Math.max(b,s))};if(l.forEach(e=>v(e)),g===1/0)return null;const x=(e,t,r)=>{i(pe,r,f),e[t]=pe[0],e[t+1]=pe[1],e[t+2]=pe[2],t+=24,r[2]=g,i(pe,r,f),e[t]=pe[0],e[t+1]=pe[1],e[t+2]=pe[2],t+=24,r[2]=b,i(pe,r,f),e[t]=pe[0],e[t+1]=pe[1],e[t+2]=pe[2]};for(let o=0;o<8;++o)x(me.data,3*o,h[o]);return R(me)}const le=[a(),a(),a(),a(),a(),a(),a(),a()],ce=f(),ue=f(),fe=new M,pe=a(),me={data:new Array(72),size:3,exclusive:!0,stride:3},de=n();export{ne as SymbolInfo,se as addWraparound,_ as checkPointCloudLayerCompatibleWithView,Y as checkPointCloudLayerValid,Q as checkRecyclable,N as checkSceneLayerCompatibleWithView,J as checkSceneLayerValid,z as checkSpatialReference,Z as checkSpatialReferences,ae as computeVisibilityObb,k as containsDraco,T as extractWkid,W as filterInPlace,q as findFieldsCaseInsensitive,U as findIntersectingNodes,A as getClipRect,V as getIndexCrs,ie as getSymbolInfo,$ as getVertexCrs,L as intersectBoundingRectWithMbs,D as isSupportedLocalModeProjection,C as objectIdFilter,E as queryAttributesFromCachedAttributesId,re as rendererNeedsTextures,oe as transparentEdgeMaterial,F as whenGraphicAttributes};
|
|
2
|
+
import e from"../../../../request.js";import{binaryIndexOf as t}from"../../../../core/arrayUtils.js";import r from"../../../../core/Error.js";import has from"../../../../core/has.js";import{invert as o}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as n}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{transformMat4 as i,copy as s}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as a}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{canProjectWithoutEngine as l}from"../../../../geometry/projectionUtils.js";import c from"../../../../geometry/SpatialReference.js";import{projectVectorToVector as u}from"../../../../geometry/projection/projectVectorToVector.js";import{create as f,empty as p,expandPointInPlace as m,intersects as d}from"../../../../geometry/support/aaBoundingRect.js";import{fetchFeaturePopupFeatures as h}from"../../../../layers/support/featurePopupQueryUtils.js";import y from"../../../../rest/support/Query.js";import{readBinaryAttribute as g,getCachedAttributeValue as b}from"./I3SBinaryReader.js";import{computeGlobalTransformation as w}from"./I3SProjectionUtil.js";import{createSolidEdgeMaterial as v,createMaterialFromEdges as x}from"../support/edgeUtils.js";import{parseColorMixMode as S}from"../support/symbolColorUtils.js";import{Obb as M,compute as R}from"../../support/orientedBoundingBox.js";import{emissiveStrengthDefault as j}from"../../webgl-engine/core/shaderLibrary/output/Emissions.glsl.js";import{spatialReferenceIncompatibleError as I}from"../../../support/layerViewUtils.js";function T(e){return e?parseInt(e.slice(e.lastIndexOf("/")+1),10):void 0}function k(e){if(has("disable-feature:i3s-draco")||!e)return!1;for(const t of e)for(const e of t.geometryBuffers)if("draco"===e.compressedAttributes?.encoding)return!0;return!1}function U(e,t,r,o){r.traverse(t,t=>{const r=t.serviceMbsInIndexSR;return 0!==(null!=r&&L(e,r))&&(o(t),!0)})}function W(e,t,r){let o=0,n=0;for(let i=0;i<t.length&&o<e.length;i++)e[o]===t[i]&&(r(i)&&(e[n]=e[o],n++),o++);e.length=n}function C(e,r,o){let n=0,i=0;for(;n<o.length;){t(e,o[n])>=0===r&&(o[i]=o[n],i++),n++}o.length=i}function A(e,t){if(0===t.rotationScale[1]&&0===t.rotationScale[2]&&0===t.rotationScale[3]&&0===t.rotationScale[5]&&0===t.rotationScale[6]&&0===t.rotationScale[7])return K[0]=(e[0]-t.position[0])/t.rotationScale[0],K[1]=(e[1]-t.position[1])/t.rotationScale[4],K[2]=(e[2]-t.position[0])/t.rotationScale[0],K[3]=(e[3]-t.position[1])/t.rotationScale[4],K}const K=f();function L(e,t){const r=t.center[0],o=t.center[1],n=t.radius,i=e[0]-r,s=r-e[2],a=e[1]-o,l=o-e[3],c=Math.max(i,s,0),u=Math.max(a,l,0),f=c*c+u*u;if(f>n*n)return 0;if(f>0)return 1;return-Math.max(i,s,a,l)>n?3:2}function q(e,t,r){const o=new Array,n=r?.missingFields,i=r?.originalFields;let s=!1;for(const a of e){const e=t?.get(a);e?(i?.push(a),o.push(e.name),a!==e.name&&(s=!0)):n?.push(a)}return r&&"hasMismatchedCasing"in r&&(r.hasMismatchedCasing=s),o}async function F(e,t,o,n,i,s){if(0===t.length)return[];const a=e.attributeStorageInfo;if(null!=e.associatedLayer)try{return await B(e.associatedLayer,t,n,s)}catch(l){if(e.associatedLayer.loaded)throw l}if(a){const r=G(e,t,o,i),l=e.parsedUrl.path;return await Promise.allSettled(r.map(t=>O(l,a,t.node,t.indices,n,e.apiKey,e.customParameters,s).then(e=>{for(let r=0;r<t.graphics.length;r++){const o=t.graphics[r],n=e[r];if(o.attributes)for(const e in o.attributes)e in n||(n[e]=o.attributes[e]);o.attributes=n}}))),t}throw new r("scenelayer:no-attribute-source","This scene layer does not have a source for attributes available")}function G({globalIdField:e},t,r,o){const n=new Map,i=[],s=o();for(const a of t){const t=a.attributes?.[r],o=null==t?a.getGlobalId():void 0;for(let r=0;r<s.length;r++){const l=s[r],c=P(l,t,e,o);if(c<0)continue;let u=n.get(l.node);u||(u={node:l.node,indices:[],graphics:[]},i.push(u),n.set(l.node,u)),u.indices.push(c),u.graphics.push(a);for(let e=r;e>0;e--)s[e]=s[e-1];s[0]=l;break}}return i}function P(e,t,r,o){if(null!=t&&"number"==typeof t)return e.featureIds.indexOf(t);if(null==o||null==r)return-1;const n=e.attributeInfo?.attributeData?.[r];return n?n.indexOf(o):-1}async function B(e,t,r,o){const n=[],i={hasMismatchedCasing:!1,originalFields:n},s=q(r,e.fieldsIndex,i),a=new y({outFields:[...s]});if(await h(e,t,a,{updateSourceAttributes:!0,...o}),!i.hasMismatchedCasing)return t;for(let l=0;l<t.length;l++){const e=t[l];if(e.attributes)for(let t=0;t<n.length;t++){const r=n[t],o=s[t];o in e.attributes&&(e.attributes[r]=e.attributes[o],delete e.attributes[o])}}return t}function O(e,t,r,o,n,i,s,a){return E(e,t,r.resources.attributes,o,n,i,s,a)}async function E(t,r,o,n,i,s,a,l){const c=[];for(const e of r)if(e&&i.includes(e.name)){const r=`${t}/nodes/${o}/attributes/${e.key}/0`;c.push({url:r,storageInfo:e})}const u=await Promise.allSettled(c.map(t=>e(t.url,{responseType:"array-buffer",query:{...a,token:s},signal:l?.signal}).then(e=>g(t.storageInfo,e.data)))),f=[];for(const e of n){const t={};for(let r=0;r<u.length;r++){const o=u[r];if("fulfilled"===o.status){const n=o.value;t[c[r].storageInfo.name]=b(n,e)}}f.push(t)}return f}function V(e){const t=e.store,o=t.indexCRS||t.geographicCRS,n=void 0===o?t.indexWKT:void 0;if(n){if(!e.spatialReference)throw new r("layerview:no-store-spatial-reference-wkt-index-and-no-layer-spatial-reference","Found indexWKT in the scene layer store but no layer spatial reference",{});if(n!==e.spatialReference.wkt)throw new r("layerview:store-spatial-reference-wkt-index-incompatible","The indexWKT of the scene layer store does not match the WKT of the layer spatial reference",{})}const i=o?new c(T(o)):e.spatialReference;return i.equals(e.spatialReference)?e.spatialReference:i}function $(e){const t=e.store,o=t.vertexCRS||t.projectedCRS,n=void 0===o?t.vertexWKT:void 0;if(n){if(!e.spatialReference)throw new r("layerview:no-store-spatial-reference-wkt-vertex-and-no-layer-spatial-reference","Found vertexWKT in the scene layer store but no layer spatial reference",{});if(n!==e.spatialReference.wkt)throw new r("layerview:store-spatial-reference-wkt-vertex-incompatible","The vertexWKT of the scene layer store does not match the WKT of the layer spatial reference",{})}const i=o?new c(T(o)):e.spatialReference;return i.equals(e.spatialReference)?e.spatialReference:i}function z(e,t,r){if(!l(e,t))throw I("scene layer",e?.wkid,t?.wkid);if("local"===r&&!D(e,t))throw I("scene layer",e?.wkid,t?.wkid)}function Q(e,t,o){if(e.serviceUpdateTimeStamp?.lastUpdate!==t.serviceUpdateTimeStamp?.lastUpdate||!o.isEmpty||e.associatedLayer?.url!==t.associatedLayer?.url)throw new r("layerview:recycle-failed","Could not recycle layerview")}function D(e,t){return e.equals(t)||e.isWGS84&&t.isWebMercator||e.isWebMercator&&t.isWGS84}function Z(e,t,r){const o=V(e),n=$(e);z(o,t,r),z(n,t,r)}function H(e){return(null==e.geometryType||"triangles"===e.geometryType)&&((null==e.topology||"PerAttributeArray"===e.topology)&&null!=e.vertexAttributes?.position)}function J(e){if(null==e.store?.defaultGeometrySchema||!H(e.store.defaultGeometrySchema))throw new r("scenelayer:unsupported-geometry-schema","The geometry schema of this scene layer is not supported.",{url:e.parsedUrl.path})}function N(e,t){Z(e,t.spatialReference,t.viewingMode)}function X(e){return null!=e.geometryType&&"points"===e.geometryType&&((null==e.topology||"PerAttributeArray"===e.topology)&&((null==e.encoding||""===e.encoding||"lepcc-xyz"===e.encoding)&&null!=e.vertexAttributes?.position))}function Y(e){if(null==e.store?.defaultGeometrySchema||!X(e.store.defaultGeometrySchema))throw new r("pointcloud:unsupported-geometry-schema","The geometry schema of this point cloud scene layer is not supported.",{})}function _(e,t){z(e.spatialReference,t.spatialReference,t.viewingMode)}function ee(e){return"simple"===e.type||"class-breaks"===e.type||"unique-value"===e.type}function te(e){return"mesh-3d"===e.type}function re(e){if(null==e||!ee(e))return!0;if(("unique-value"===e.type||"class-breaks"===e.type)&&null==e.defaultSymbol)return!0;const t=e.symbols;if(0===t.length)return!0;for(const r of t){if(!te(r)||0===r.symbolLayers.length)return!0;for(const e of r.symbolLayers.items)if("fill"!==e.type||null==e.material?.color||"replace"!==e.material.colorMixMode)return!0}return!1}const oe=v({color:[0,0,0,0],opacity:0});class ne{constructor(){this.edgeMaterial=null,this.material=null,this.castShadows=!0}}function ie(e){const t=new ne;let r=!1,o=!1;for(const n of e.symbolLayers.items)if("fill"===n.type&&n.enabled){const e=n.material,i=n.edges;if(null!=e&&!r){const o=e.color,i=S(e.colorMixMode),s={strength:e.emissive?.strength??j,source:"color"===e.emissive?.source?1:0};t.material=null!=o?{color:[o.r/255,o.g/255,o.b/255],alpha:o.a,colorMixMode:i,emissive:s}:{color:[1,1,1],alpha:1,colorMixMode:1,emissive:s},t.castShadows=n.castShadows,r=!0}null==i||o||(t.edgeMaterial=x(i,{}),o=!0)}return t.material||(t.material={color:[1,1,1],alpha:1,colorMixMode:1,emissive:{strength:j,source:0}}),t}function se(e,t){return(0|e)+(0|t)|0}function ae(e,t,r,n,a,l,c){if(!l||0===l.length||null==t||!e.serviceMbsInIndexSR)return null;const f=w(e.serviceMbsInIndexSR,a,"none",r,t);o(de,f);let h=null;const y=()=>{if(!h)if(h=le,p(ue),null!=e.serviceObbInIndexSR){e.serviceObbInIndexSR.transform(fe,r,t,a,c),fe.getCorners(h);for(const e of h)i(e,e,de),m(ue,e)}else{const o=e.serviceMbsInIndexSR;if(!o)return;const n=o.radius;u(o.center,r,pe,t),i(pe,pe,de),pe[2]+=a;for(let e=0;e<8;++e){const t=1&e?n:-n,r=2&e?n:-n,o=4&e?n:-n,i=h[e];s(i,[pe[0]+t,pe[1]+r,pe[2]+o]),m(ue,i)}}};let g=1/0,b=-1/0;const v=e=>{if("replace"!==e.type)return;const r=e.geometry;if(!r?.hasZ)return;p(ce);const o=r.spatialReference||n,s=r.rings.reduce((e,r)=>r.reduce((e,r)=>(u(r,o,pe,t),i(pe,pe,de),m(ce,pe),Math.min(pe[2],e)),e),1/0);y(),d(ue,ce)&&(g=Math.min(g,s),b=Math.max(b,s))};if(l.forEach(e=>v(e)),g===1/0)return null;const x=(e,t,r)=>{i(pe,r,f),e[t]=pe[0],e[t+1]=pe[1],e[t+2]=pe[2],t+=24,r[2]=g,i(pe,r,f),e[t]=pe[0],e[t+1]=pe[1],e[t+2]=pe[2],t+=24,r[2]=b,i(pe,r,f),e[t]=pe[0],e[t+1]=pe[1],e[t+2]=pe[2]};for(let o=0;o<8;++o)x(me.data,3*o,h[o]);return R(me)}const le=[a(),a(),a(),a(),a(),a(),a(),a()],ce=f(),ue=f(),fe=new M,pe=a(),me={data:new Array(72),size:3,exclusive:!0,stride:3},de=n();export{ne as SymbolInfo,se as addWraparound,_ as checkPointCloudLayerCompatibleWithView,Y as checkPointCloudLayerValid,Q as checkRecyclable,N as checkSceneLayerCompatibleWithView,J as checkSceneLayerValid,z as checkSpatialReference,Z as checkSpatialReferences,ae as computeVisibilityObb,k as containsDraco,T as extractWkid,W as filterInPlace,q as findFieldsCaseInsensitive,U as findIntersectingNodes,A as getClipRect,V as getIndexCrs,ie as getSymbolInfo,$ as getVertexCrs,L as intersectBoundingRectWithMbs,D as isSupportedLocalModeProjection,C as objectIdFilter,E as queryAttributesFromCachedAttributesId,re as rendererNeedsTextures,oe as transparentEdgeMaterial,F as whenGraphicAttributes};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as r}from"tslib";import
|
|
2
|
+
import{__decorate as r}from"tslib";import e from"../../../../core/Logger.js";import{property as i,subclass as s}from"../../../../core/accessorSupport/decorators.js";import n from"../../../../core/sql/WhereClause.js";import{findFieldsCaseInsensitive as o}from"../i3s/I3SUtil.js";const t=t=>{const l=t;let d=class extends l{constructor(){super(...arguments),this._definitionExpressionErrors=0,this._maxDefinitionExpressionErrors=20,this.logError=r=>{this._definitionExpressionErrors<this._maxDefinitionExpressionErrors&&e.getLogger(this).error("Error while evaluating definitionExpression: "+r),this._definitionExpressionErrors++,this._definitionExpressionErrors===this._maxDefinitionExpressionErrors&&e.getLogger(this).error("Further errors are ignored")}}get parsedDefinitionExpression(){if(!this.layer?.definitionExpression)return null;try{const r=n.create(this.layer.definitionExpression,{fieldsIndex:this.layer.fieldsIndex});if(!r.isStandardized)return e.getLogger(this).error("definitionExpression is using non standard function"),null;const i=[],s=r.fieldNames;return o(s,this.layer.fieldsIndex,{missingFields:i}),i.length>0?(e.getLogger(this).error(`definitionExpression references unknown fields: ${i.join(", ")}`),null):(this._definitionExpressionErrors=0,r)}catch(r){return e.getLogger(this).error("Failed to parse definitionExpression: "+r),null}}get definitionExpressionFields(){return this.parsedDefinitionExpression?this.parsedDefinitionExpression.fieldNames:[]}_evaluateClause(r,e){if(null==r)return!0;try{return r.testFeature(e)}catch(i){return this.logError(i),!1}}_addDefinitionExpressionToQuery(r){if(!this.parsedDefinitionExpression)return r;const e=this.layer.definitionExpression,i=r.clone();return i.where?i.where=`(${e}) AND (${i.where})`:i.where=e,i}};return r([i({readOnly:!0})],d.prototype,"parsedDefinitionExpression",null),r([i({readOnly:!0})],d.prototype,"definitionExpressionFields",null),d=r([s("esri.views.3d.layers.support.DefinitionExpressionSceneLayerView")],d),d};export{t as DefinitionExpressionSceneLayerView};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as t}from"tslib";import{property as e,subclass as r}from"../../../../core/accessorSupport/decorators.js";import{getTimeOperator as i}from"../../../../layers/graphics/data/timeSupport.js";import n from"../../../../layers/support/FeatureFilter.js";import{combineTimeExtent as s}from"../../../../layers/support/timeSupport.js";import{getCachedAttributeValue as l}from"../i3s/I3SBinaryReader.js";import{filterInPlace as o}from"../i3s/I3SUtil.js";const u=i=>{const l=i;let o=class extends l{get timeExtent(){return s(this.
|
|
2
|
+
import{__decorate as t}from"tslib";import{property as e,subclass as r}from"../../../../core/accessorSupport/decorators.js";import{getTimeOperator as i}from"../../../../layers/graphics/data/timeSupport.js";import n from"../../../../layers/support/FeatureFilter.js";import{combineTimeExtent as s}from"../../../../layers/support/timeSupport.js";import{getCachedAttributeValue as l}from"../i3s/I3SBinaryReader.js";import{filterInPlace as o}from"../i3s/I3SUtil.js";const u=i=>{const l=i;let o=class extends l{get timeExtent(){return s(this.layer,this.view?.timeExtent,this._get("timeExtent"))}get mergedFilter(){const{filter:t,timeExtent:e}=this;if(null==e)return t;const r=t?.clone()??new n;return null!=e&&(r.timeExtent=r.timeExtent?.intersection(e)??e),r}getTimeFilterDependencies(){const{timeInfo:t}=this.layer;if(null==t)return[];const{startField:e,endField:r}=t;return[e,r]}addTimeFilter(t,e){if(null==e)return;const{timeInfo:r}=this.layer;if(null==r)return;const{startField:i,endField:n,useTime:s}=r;if(!s||null==i&&null==n)return;const l=r.toJSON(),o=e.toJSON();t.push((t,e)=>a(t,e,l,o))}};return t([e({readOnly:!0})],o.prototype,"timeExtent",null),t([e()],o.prototype,"mergedFilter",null),o=t([r("esri.views.3d.layers.support.TemporalSceneLayerView")],o),o};function a(t,e,r,n){const s=e.attributeInfo?.attributeData;if(null==s)return;const{startTimeField:l,endTimeField:u}=r;if(!!(null!=l&&null==s[l]||null!=u&&null==s[u]))return;const a=i(r,n,new m(s));if(null==a)return;const{featureIds:p}=e;o(t,p,a)}class m{constructor(t){this.attributeData=t}getAttribute(t,e){return l(this.attributeData[e],t)}getAttributeAsTimestamp(t,e){const r=this.getAttribute(t,e);return"string"==typeof r?new Date(r).getTime():"number"==typeof r||null==r?r:null}}export{u as TemporalSceneLayerView};
|
package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as t}from"tslib";import{isColorHighlightOrOLID as e}from"../../../core/shaderLibrary/ShaderOutput.js";import{parameter as o}from"../../../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{SphereDepthInterpolateConfiguration as i}from"../../../shaders/SphereDepthInterpolate.glsl.js";class s extends i{constructor(t){super(),this.output=0,this.textureCoordinateType=0,this.componentDataType=0,this.cullFace=2,this.vertexDiscardMode=0,this.doubleSidedMode=2,this.alphaDiscardMode=1,this.integratedMeshMode=0,this.pbrMode=0,this.normalType=0,this.emissionSource=0,this.shadeNormals=1,this.polygonOffset=0,this.vertexPositionRotationType=1,this.vertexNormalRotationType=0,this.hasEmission=!1,this.hasVertexColors=!1,this.hasSlicePlane=!1,this.isGroundSlice=!1,this.hasColorTexture=!1,this.hasHighlightMixTexture=!1,this.receiveAmbientOcclusion=!0,this.receiveGlobalIllumination=!1,this.receiveShadows=!0,this.hasShadowHighlights=!1,this.transparent=!0,this.screenSpaceReflections=!1,this.hasMetallicRoughnessTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.hasOccludees=!1,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.hasNormalTextureTransform=!1,this.cloudReflections=!0,this.snowCover=!1,this.renderOccluded=!1,this.enableOITOffset=!1,this.sphereDepthInterpolate=!1,this.writeDepth=!0,this.discardInvisibleFragments=!1,this.oitPremultipliedAlpha=!1,this.occlusionPass=!1,this.bindType=2,this.useCustomDTRExponentForWater=!1,this.hasVertexTangents=!1,this.hasSliceTranslatedView=!1,this.highStepCount=!1,this.instanced=!1,this.instancedDoublePrecision=!1,this.hasModelTransformation=!1,this.useFillLights=!0,this.draped=!1,this.useTransformationTexture=!0,this.sphericalSR=t.sphericalSR,this.useFloatBlend=t.useFloatBlend}get spherical(){return 0!==this.sphericalSR}get overlayEnabled(){return(2===this.integratedMeshMode||3===this.integratedMeshMode)&&e(this.output)}get hasWater(){return 3===this.pbrMode||4===this.pbrMode||6===this.pbrMode}}t([o()],s.prototype,"useFloatBlend",void 0),t([o({count:12})],s.prototype,"output",void 0),t([o({count:3})],s.prototype,"textureCoordinateType",void 0),t([o({count:2})],s.prototype,"componentDataType",void 0),t([o({count:3})],s.prototype,"cullFace",void 0),t([o({count:3})],s.prototype,"vertexDiscardMode",void 0),t([o({count:3})],s.prototype,"doubleSidedMode",void 0),t([o({count:4})],s.prototype,"alphaDiscardMode",void 0),t([o({count:4})],s.prototype,"integratedMeshMode",void 0),t([o({count:7})],s.prototype,"pbrMode",void 0),t([o({count:3})],s.prototype,"normalType",void 0),t([o({count:8})],s.prototype,"emissionSource",void 0),t([o({count:3})],s.prototype,"shadeNormals",void 0),t([o({count:5})],s.prototype,"polygonOffset",void 0),t([o({count:2})],s.prototype,"vertexPositionRotationType",void 0),t([o({count:2})],s.prototype,"vertexNormalRotationType",void 0),t([o()],s.prototype,"hasEmission",void 0),t([o()],s.prototype,"hasVertexColors",void 0),t([o()],s.prototype,"hasSlicePlane",void 0),t([o()],s.prototype,"isGroundSlice",void 0),t([o()],s.prototype,"hasColorTexture",void 0),t([o()],s.prototype,"hasHighlightMixTexture",void 0),t([o()],s.prototype,"receiveAmbientOcclusion",void 0),t([o()],s.prototype,"receiveGlobalIllumination",void 0),t([o()],s.prototype,"receiveShadows",void 0),t([o()],s.prototype,"hasShadowHighlights",void 0),t([o()],s.prototype,"transparent",void 0),t([o()],s.prototype,"screenSpaceReflections",void 0),t([o()],s.prototype,"hasMetallicRoughnessTexture",void 0),t([o()],s.prototype,"hasOcclusionTexture",void 0),t([o()],s.prototype,"hasNormalTexture",void 0),t([o()],s.prototype,"hasOccludees",void 0),t([o()],s.prototype,"terrainDepthTest",void 0),t([o()],s.prototype,"cullAboveTerrain",void 0),t([o()],s.prototype,"hasNormalTextureTransform",void 0),t([o()],s.prototype,"cloudReflections",void 0),t([o()],s.prototype,"snowCover",void 0),t([o()],s.prototype,"renderOccluded",void 0),t([o()],s.prototype,"enableOITOffset",void 0),t([o()],s.prototype,"sphereDepthInterpolate",void 0);export{s as ComponentTechniqueConfiguration};
|
|
2
|
+
import{__decorate as t}from"tslib";import{isColorHighlightOrOLID as e}from"../../../core/shaderLibrary/ShaderOutput.js";import{parameter as o}from"../../../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{SphereDepthInterpolateConfiguration as i}from"../../../shaders/SphereDepthInterpolate.glsl.js";class s extends i{constructor(t){super(),this.output=0,this.textureCoordinateType=0,this.componentDataType=0,this.cullFace=2,this.vertexDiscardMode=0,this.doubleSidedMode=2,this.alphaDiscardMode=1,this.integratedMeshMode=0,this.pbrMode=0,this.normalType=0,this.emissionSource=0,this.shadeNormals=1,this.polygonOffset=0,this.vertexPositionRotationType=1,this.vertexNormalRotationType=0,this.hasEmission=!1,this.hasVertexColors=!1,this.hasSlicePlane=!1,this.isGroundSlice=!1,this.hasColorTexture=!1,this.hasHighlightMixTexture=!1,this.emissionDimmingPass=!1,this.receiveAmbientOcclusion=!0,this.receiveGlobalIllumination=!1,this.receiveShadows=!0,this.hasShadowHighlights=!1,this.transparent=!0,this.screenSpaceReflections=!1,this.hasMetallicRoughnessTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.hasOccludees=!1,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.hasNormalTextureTransform=!1,this.cloudReflections=!0,this.snowCover=!1,this.renderOccluded=!1,this.enableOITOffset=!1,this.sphereDepthInterpolate=!1,this.writeDepth=!0,this.discardInvisibleFragments=!1,this.oitPremultipliedAlpha=!1,this.occlusionPass=!1,this.bindType=2,this.useCustomDTRExponentForWater=!1,this.hasVertexTangents=!1,this.hasSliceTranslatedView=!1,this.highStepCount=!1,this.instanced=!1,this.instancedDoublePrecision=!1,this.hasModelTransformation=!1,this.useFillLights=!0,this.draped=!1,this.useTransformationTexture=!0,this.sphericalSR=t.sphericalSR,this.useFloatBlend=t.useFloatBlend}get spherical(){return 0!==this.sphericalSR}get overlayEnabled(){return(2===this.integratedMeshMode||3===this.integratedMeshMode)&&e(this.output)}get hasWater(){return 3===this.pbrMode||4===this.pbrMode||6===this.pbrMode}}t([o()],s.prototype,"useFloatBlend",void 0),t([o({count:12})],s.prototype,"output",void 0),t([o({count:3})],s.prototype,"textureCoordinateType",void 0),t([o({count:2})],s.prototype,"componentDataType",void 0),t([o({count:3})],s.prototype,"cullFace",void 0),t([o({count:3})],s.prototype,"vertexDiscardMode",void 0),t([o({count:3})],s.prototype,"doubleSidedMode",void 0),t([o({count:4})],s.prototype,"alphaDiscardMode",void 0),t([o({count:4})],s.prototype,"integratedMeshMode",void 0),t([o({count:7})],s.prototype,"pbrMode",void 0),t([o({count:3})],s.prototype,"normalType",void 0),t([o({count:8})],s.prototype,"emissionSource",void 0),t([o({count:3})],s.prototype,"shadeNormals",void 0),t([o({count:5})],s.prototype,"polygonOffset",void 0),t([o({count:2})],s.prototype,"vertexPositionRotationType",void 0),t([o({count:2})],s.prototype,"vertexNormalRotationType",void 0),t([o()],s.prototype,"hasEmission",void 0),t([o()],s.prototype,"hasVertexColors",void 0),t([o()],s.prototype,"hasSlicePlane",void 0),t([o()],s.prototype,"isGroundSlice",void 0),t([o()],s.prototype,"hasColorTexture",void 0),t([o()],s.prototype,"hasHighlightMixTexture",void 0),t([o()],s.prototype,"emissionDimmingPass",void 0),t([o()],s.prototype,"receiveAmbientOcclusion",void 0),t([o()],s.prototype,"receiveGlobalIllumination",void 0),t([o()],s.prototype,"receiveShadows",void 0),t([o()],s.prototype,"hasShadowHighlights",void 0),t([o()],s.prototype,"transparent",void 0),t([o()],s.prototype,"screenSpaceReflections",void 0),t([o()],s.prototype,"hasMetallicRoughnessTexture",void 0),t([o()],s.prototype,"hasOcclusionTexture",void 0),t([o()],s.prototype,"hasNormalTexture",void 0),t([o()],s.prototype,"hasOccludees",void 0),t([o()],s.prototype,"terrainDepthTest",void 0),t([o()],s.prototype,"cullAboveTerrain",void 0),t([o()],s.prototype,"hasNormalTextureTransform",void 0),t([o()],s.prototype,"cloudReflections",void 0),t([o()],s.prototype,"snowCover",void 0),t([o()],s.prototype,"renderOccluded",void 0),t([o()],s.prototype,"enableOITOffset",void 0),t([o()],s.prototype,"sphereDepthInterpolate",void 0);export{s as ComponentTechniqueConfiguration};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import e from"../../../../../core/Error.js";import"../../../../../core/has.js";import{NestedMap as t}from"../../../../../core/NestedMap.js";import{ShaderTechniqueConfiguration as i}from"./ShaderTechniqueConfiguration.js";class r{constructor(e){this._context=e,this._debug=null,this._precompiling=this._debug?0:1,this._cache=new t,this._frame=0,this._debug&&"stackTraceLimit"in Error&&(Error.stackTraceLimit=50)}destroy(){this._cache.forAll(([e])=>e.destroy()),this._cache.clear(),this._context=null}get context(){return this._context}get precompiling(){return this._precompiling}set precompiling(e){this._precompiling=e,0===e&&this.context.rctx.gl.flush()}precompile(e,t=
|
|
2
|
+
import e from"../../../../../core/Error.js";import"../../../../../core/has.js";import{NestedMap as t}from"../../../../../core/NestedMap.js";import{ShaderTechniqueConfiguration as i}from"./ShaderTechniqueConfiguration.js";class r{constructor(e){this._context=e,this._debug=null,this._precompiling=this._debug?0:1,this._cache=new t,this._frame=0,this._debug&&"stackTraceLimit"in Error&&(Error.stackTraceLimit=50)}destroy(){this._cache.forAll(([e])=>e.destroy()),this._cache.clear(),this._context=null}get context(){return this._context}get precompiling(){return this._precompiling}set precompiling(e){this._precompiling=e,0===e&&this.context.rctx.gl.flush()}precompile(e,t=c){++this.precompiling,this.get(e,t),--this.precompiling}get(t,i=c,r){const n=i.key.code;let s=this._cache.get(t,n)?.[0];if(null==s){if(s=new t(this.context,i,r),this._debug){if(0===this._precompiling){const r=`Uncached ${s.declaredClass} compile in ${(new Error).stack}\n for configuration\n${i.decode()}`+this._debugCachedConfigurations(i,t);throw console.log(r),new e("shader:uncached-compile",r)}this._debug.set(s,new o(i,(new Error).stack))}this._cache.set(t,n,[s,this._frame])}return s}getCompiled(e,t=c,i){++this.precompiling;const r=this.get(e,t,i);return--this.precompiling,r.compiled?r:null}frameUpdate(){this._debug&&(this._cache.forAll(([t],i)=>{if(!t.unused||t.ignoreUnused)return;const r=this._debug?.get(t),o=`Unused ${t.declaredClass} for\n${r?.configuration.decode(t.key)} \nfrom\n${r?.stack}`+this._debugCachedConfigurations(r?.configuration,i);throw console.log(o),new e("shader:unused-precompile",o)}),++this._frame)}async reloadAll(){const e=new Array;this._cache.forEach(t=>e.push(n(t))),await Promise.all(e)}_debugCachedConfigurations(e,t){if(!e)return"";const i=this._cache.getInner(t);if(i?.size){let t="\n\n cached configurations:\n";return t+=Array.from(i.values()).map(([t,i])=>`at frame ${i}: ${e.decode(t.key)}`).sort().join("\n\n"),t}return""}}class o{constructor(e,t){this.configuration=e,this.stack=t}}async function n(e){let t=!0;e.forEach(async([e])=>{await e.reload(t),t=!1})}const c=new i;export{c as NoConfiguration,r as ShaderTechniqueRepository};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{lerp as t}from"../../../../../core/mathUtils.js";import{disposeMaybe as r}from"../../../../../core/maybe.js";import{watch as s,syncAndInitial as i,initial as o}from"../../../../../core/reactiveUtils.js";import{subclass as a}from"../../../../../core/accessorSupport/decorators.js";import{set as n}from"../../../../../core/libs/gl-matrix-2/math/vec2.js";import{set as m,length as h}from"../../../../../core/libs/gl-matrix-2/math/vec3.js";import{ZEROS as
|
|
2
|
+
import{__decorate as e}from"tslib";import{lerp as t}from"../../../../../core/mathUtils.js";import{disposeMaybe as r}from"../../../../../core/maybe.js";import{watch as s,syncAndInitial as i,initial as o}from"../../../../../core/reactiveUtils.js";import{subclass as a}from"../../../../../core/accessorSupport/decorators.js";import{set as n}from"../../../../../core/libs/gl-matrix-2/math/vec2.js";import{set as m,length as h}from"../../../../../core/libs/gl-matrix-2/math/vec3.js";import{ZEROS as p}from"../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{earth as c}from"../../../../../geometry/support/Ellipsoid.js";import{InternalRenderCategory as d}from"../../../webgl.js";import{OpaqueEnvironment as u}from"../OpaqueEnvironment.js";import{computeInnerAltitudeFade as f,innerAtmosphereDepth as l}from"./atmosphereUtils.js";import{ChapmanAtmospherePassParameters as b,ChapmanAtmosphereTechnique as g}from"./ChapmanAtmosphereTechnique.js";import{ChapmanAtmosphereTechniqueConfiguration as _}from"./ChapmanAtmosphereTechniqueConfiguration.js";import{createQuadVAO as w}from"../../lib/glUtil3D.js";import{applyTextureResizeModulo as P}from"../../lib/textureUtils.js";import{A as j}from"../../../../../chunks/AtmosphereCompositing.glsl.js";import{AtmosphereCompositingTechnique as v}from"../../shaders/AtmosphereCompositingTechnique.js";import{DepthStencilAttachment as A,ColorAttachment0 as C,PrimitiveType as q}from"../../../../webgl/enums.js";import x from"../../../../../webscene/background/ColorBackground.js";let T=class extends u{constructor(){super(...arguments),this._compositingPassParameters=new j,this._vao=null,this._passParameters=new b,this._configuration=new _}initialize(){this.addHandles([s(()=>this.view.environment.background,e=>{const t=e instanceof x?e.color.toUnitRGBA():p;m(this._passParameters.backgroundColor,t[0]*t[3],t[1]*t[3],t[2]*t[3])},i),s(()=>this.view.stage?.renderer?.highResolutionAtmosphere,e=>this._configuration.reduced=!e,i),s(()=>this.view.map.ground.undergroundColor,e=>{this._passParameters.undergroundColor=e?.toUnitRGBA()??p,this.requestRender(1)},o),s(()=>this.view.environment.atmosphereEnabled,e=>e?this._enable():this._disable(),i)])}destroy(){this._vao=r(this._vao)}render(e){const r=e.find(({name:e})=>e===d.OPAQUE_ENVIRONMENT);if(!this.bindParameters.mainDepth)return r;const s=this.renderingContext;this._vao??=w(s,1);const i=r.getAttachment(A);this._update();const o=this.techniques.getCompiled(g,this._configuration);if(!o)return this.requestRender(1),r;if(!this._configuration.reduced)return r.detachDepth(),s.bindFramebuffer(r.fbo),s.bindTechnique(o,this.bindParameters,this._passParameters),s.setDrawBuffers([C]),s.bindVAO(this._vao),s.drawArrays(q.TRIANGLE_STRIP,0,4),r.attachDepth(i),r;const a=this.techniques.getCompiled(v);if(!a)return this.requestRender(1),r;const n=s.getViewport(),m=this.bindParameters.camera,p=h(m.eye)-c.radius;let u;const f=c.atmosphereHeight;if(p<f){const e=Math.min(1,Math.max(0,p/f));u=t(.2,.3,e)}else{const e=Math.min(1,Math.max(0,(p-f)/(15*f)));u=t(.3,.6,e)}const l=this.renderingContext.parameters.maxTextureSize,b=P(Math.round(u*m.fullViewport[2]),l),_=P(Math.round(u*m.fullViewport[3]),l);s.setViewport(0,0,b,_);const j=this.fboCache.acquire(b,_,"chapman",5);return s.bindFramebuffer(j.fbo),s.clearFramebuffer([0,0,0,1],!0,!0),s.bindTechnique(o,this.bindParameters,this._passParameters),s.bindVAO(this._vao),s.drawArrays(q.TRIANGLE_STRIP,0,4),s.setViewport(n.x,n.y,n.width,n.height),this._compositingPassParameters.color=j.getTexture(),r.detachDepth(),s.bindFramebuffer(r.fbo),s.bindTechnique(a,this.bindParameters,this._compositingPassParameters),s.setDrawBuffers([C]),s.screen.draw(),r.attachDepth(i),j.release(),r}_update(){const e=this.view.basemapTerrain?.getLowerBoundRadius()??0;n(this._passParameters.radii,e,e+c.atmosphereHeight);const t=h(this.bindParameters.camera.eye);this._passParameters.altitudeFade=f(t-e),this._passParameters.innerFadeDistance=2*Math.sqrt((2*e-l)*l)}};T=e([a("esri.views.3d.webgl-engine.effects.atmosphere.ChapmanAtmosphere")],T);export{T as ChapmanAtmosphere};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{disposeMaybe as t}from"../../../../../core/maybe.js";import{watch as r,initial as s}from"../../../../../core/reactiveUtils.js";import{subclass as i}from"../../../../../core/accessorSupport/decorators.js";import{copy as o}from"../../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as a}from"../../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{InternalRenderCategory as m}from"../../../webgl.js";import{glLayout as n}from"../../../support/buffer/glUtil.js";import{OpaqueEnvironment as p}from"../OpaqueEnvironment.js";import{S as f}from"../../../../../chunks/SimpleAtmosphere.glsl.js";import{SimpleAtmosphereTechnique as h,layout as
|
|
2
|
+
import{__decorate as e}from"tslib";import{disposeMaybe as t}from"../../../../../core/maybe.js";import{watch as r,initial as s}from"../../../../../core/reactiveUtils.js";import{subclass as i}from"../../../../../core/accessorSupport/decorators.js";import{copy as o}from"../../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as a}from"../../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{InternalRenderCategory as m}from"../../../webgl.js";import{glLayout as n}from"../../../support/buffer/glUtil.js";import{OpaqueEnvironment as p}from"../OpaqueEnvironment.js";import{S as f}from"../../../../../chunks/SimpleAtmosphere.glsl.js";import{SimpleAtmosphereTechnique as h,layout as l}from"./SimpleAtmosphereTechnique.js";import{SimpleAtmosphereTechniqueConfiguration as u}from"./SimpleAtmosphereTechniqueConfiguration.js";import{earthAtmosphereTextureSimple as c}from"./SimpleAtmosphereTexture.js";import{createPolySphereData as b}from"../../lib/GeometryUtil.js";import{VertexArrayObject as d}from"../../lib/VertexArrayObject.js";import{ColorAttachment0 as _,PrimitiveType as g}from"../../../../webgl/enums.js";import v from"../../../../webgl/Texture.js";import{TextureDescriptor as j}from"../../../../webgl/TextureDescriptor.js";import{VertexBuffer as w}from"../../../../webgl/VertexBuffer.js";let x=class extends p{constructor(){super(...arguments),this._configuration=new u,this._passParameters=new f,this._vao=null,this._vaoCount=0}initialize(){this._configuration.geometry=1,this.addHandles([r(()=>this.view.environment.atmosphereEnabled,e=>e?this._enable():this._disable(),s)])}destroy(){this._passParameters.texture=t(this._passParameters.texture),this._vao=t(this._vao)}render(e){const t=e.find(({name:e})=>e===m.OPAQUE_ENVIRONMENT),r=this.techniques.getCompiled(h,this._configuration);if(!r)return this.requestRender(1),t;const s=this.renderingContext;if(this._vao||(this._vao=A(s),this._vaoCount=this._vao.vertexCount("geometry")),!this._passParameters.texture){const e=new j(1,512);e.wrapMode=33071,e.flipped=!0,this._passParameters.texture=new v(s,e,c)}const i=s.bindTechnique(r,this.bindParameters,this._passParameters);return s.setDrawBuffers([_]),P(C,this.bindParameters.camera.viewMatrix),i.setUniformMatrix4fv("view",C),s.bindVAO(this._vao),i.assertCompatibleVertexAttributeLocations(this._vao),s.drawArrays(g.TRIANGLES,0,this._vaoCount),t}};function A(e){const t=b(1,2,!1),{data:r,indices:s}=t[0][1],i=l.createBuffer(s.length),o=i.position;for(let a=0;a<s.length;++a){const e=3*s[a%3==0?a+2:a%3==2?a-2:a];o.set(a,0,r[e]),o.set(a,1,r[e+1]),o.set(a,2,r[e+2])}return new d(e,new w(e,n(l),i.buffer))}function P(e,t){o(e,t),e[12]=0,e[13]=0,e[14]=0,e[15]=1}x=e([i("esri.views.3d.webgl-engine.effects.atmosphere.LocalAtmosphere")],x);const C=a();export{x as LocalAtmosphere};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as t}from"tslib";import{lerp as e,clamp as r}from"../../../../../core/mathUtils.js";import{disposeMaybe as s}from"../../../../../core/maybe.js";import{watch as i,initial as o}from"../../../../../core/reactiveUtils.js";import{subclass as a}from"../../../../../core/accessorSupport/decorators.js";import{lookAt as m}from"../../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as n}from"../../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as h}from"../../../../../core/libs/gl-matrix-2/math/vec2.js";import{length as p,scale as c,add as l,distance as u,cross as _,squaredLength as f}from"../../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as d}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as g}from"../../../../../geometry/ellipsoidUtils.js";import{newFloatArray as x}from"../../../../../geometry/support/FloatArray.js";import{InternalRenderCategory as b}from"../../../webgl.js";import{makePiecewiseLinearFunction as j}from"../../../support/mathUtils.js";import{glLayout as V}from"../../../support/buffer/glUtil.js";import{OpaqueEnvironment as P}from"../OpaqueEnvironment.js";import{computeInnerAltitudeFade as v,innerAtmosphereDepth as
|
|
2
|
+
import{__decorate as t}from"tslib";import{lerp as e,clamp as r}from"../../../../../core/mathUtils.js";import{disposeMaybe as s}from"../../../../../core/maybe.js";import{watch as i,initial as o}from"../../../../../core/reactiveUtils.js";import{subclass as a}from"../../../../../core/accessorSupport/decorators.js";import{lookAt as m}from"../../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as n}from"../../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as h}from"../../../../../core/libs/gl-matrix-2/math/vec2.js";import{length as p,scale as c,add as l,distance as u,cross as _,squaredLength as f}from"../../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as d}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as g}from"../../../../../geometry/ellipsoidUtils.js";import{newFloatArray as x}from"../../../../../geometry/support/FloatArray.js";import{InternalRenderCategory as b}from"../../../webgl.js";import{makePiecewiseLinearFunction as j}from"../../../support/mathUtils.js";import{glLayout as V}from"../../../support/buffer/glUtil.js";import{OpaqueEnvironment as P}from"../OpaqueEnvironment.js";import{computeInnerAltitudeFade as v,innerAtmosphereDepth as R}from"./atmosphereUtils.js";import{marsAtmosphereTextureSimple as w}from"./MarsAtmosphereTexture.js";import{S as A}from"../../../../../chunks/SimpleAtmosphere.glsl.js";import{SimpleAtmosphereTechnique as y,layout as S}from"./SimpleAtmosphereTechnique.js";import{SimpleAtmosphereTechniqueConfiguration as q}from"./SimpleAtmosphereTechniqueConfiguration.js";import{createQuadVAO as F}from"../../lib/glUtil3D.js";import{project as M}from"../../lib/Util.js";import{VertexArrayObject as T}from"../../lib/VertexArrayObject.js";import{PrimitiveType as U}from"../../../../webgl/enums.js";import E from"../../../../webgl/Texture.js";import{TextureDescriptor as C}from"../../../../webgl/TextureDescriptor.js";import{VertexBuffer as O}from"../../../../webgl/VertexBuffer.js";const N=128,I=-R,W=0,B=50,D=()=>1-511/512,G=j([[50,.1015625],[500,.21875],[5e3,1-250/512],[5e4,.4140625]]);let L=class extends P{constructor(t){super(t),this._passParameters=new A,this._configuration=new q,this._vao=null,this._fadeVao=null,this._texV1=1;const e=t.view,r=g(e.spatialReference),{outerAtmosphereRimWidth:s,radius:i}=r;this._planetRadius=i,this._innerRimFactor=1+I/i,this._middleRimFactor=1+W/i,this._outerRimFactor=1+s/i,this._texV0=W/s,this._texVScale=this._texV1-this._texV0}initialize(){this.addHandles(i(()=>this.view.environment.atmosphereEnabled,t=>t?this._enable():this._disable(),o))}destroy(){this._passParameters.texture=s(this._passParameters.texture),this._fadeVao=s(this._fadeVao),this._vao=s(this._vao)}render(t){const e=t.find(({name:t})=>t===b.OPAQUE_ENVIRONMENT);this._update();const r=this.renderingContext;if(!this._passParameters.texture){const t=new C(1,512);t.wrapMode=33071,t.flipped=!0,this._passParameters.texture=new E(r,t,w)}if(this._passParameters.undergroundFadeAlpha<1){this._vao??=this._createRibbon(r),this._configuration.geometry=0;const t=this.techniques.getCompiled(y,this._configuration);if(!t)return this.requestRender(1),e;r.bindTechnique(t,this.bindParameters,this._passParameters),r.bindVAO(this._vao),r.drawArrays(U.TRIANGLES,0,this._vao.vertexCount("geometry"))}if(this._passParameters.undergroundFadeAlpha>0){this._fadeVao??=F(r),this._configuration.geometry=2;const t=this.techniques.getCompiled(y,this._configuration);if(!t)return this.requestRender(1),e;r.bindTechnique(t,this.bindParameters,this._passParameters),r.bindVAO(this._fadeVao),r.drawArrays(U.TRIANGLE_STRIP,0,this._fadeVao.vertexCount("geometry"))}return e}_update(){const t=this.bindParameters.camera,s=d(),i=this._planetRadius,o=p(t.eye),a=o-i;if(a<0){const t=Math.min(-a/5e3,1);this._passParameters.undergroundFadeAlpha=t}else this._passParameters.undergroundFadeAlpha=0;const m=Math.max(B,a),n=i+I;this._passParameters.innerScale=J(i+m,i,n)-1,this._passParameters.altitudeFade=v(a),c(s,t.eye,(i+B)/o),k(s,t.center,t.up,i,this._passParameters.silhouette);const l=this._computeScreenRimWidth(t,s,t.up,this._passParameters.silhouette),u=D(),_=G(a);let f=this._texV0+u*this._texVScale,g=this._texV0+l*_*this._texVScale;if(a>B){k(t.eye,t.center,t.up,i,this._passParameters.silhouette);const s=this._computeScreenRimWidth(t,t.eye,t.up,this._passParameters.silhouette),o=r((s-1.5)/(l-1.5),0,1);f=this._texV0+o*u*this._texVScale,g=this._texV0+e(this._texV1,l*_,o)*this._texVScale}h(this._passParameters.texV,f,g)}_createRibbon(t){const e=x(3+3*N*3),r=new Uint32Array(3*N*5);e[0]=0,e[1]=0,e[2]=-1;for(let o=0;o<N;o++){const t=9*o+3;e[t]=o,e[t+1]=this._innerRimFactor,e[t+2]=-1,e[t+3]=o,e[t+4]=this._middleRimFactor,e[t+5]=0,e[t+6]=o,e[t+7]=this._outerRimFactor,e[t+8]=1;const s=3*o+1,i=o===N-1?1:s+3,a=15*o;r[a]=s,r[a+1]=s+1,r[a+2]=i+1,r[a+3]=i+1,r[a+4]=i,r[a+5]=s,r[a+6]=s+1,r[a+7]=s+2,r[a+8]=i+2,r[a+9]=i+2,r[a+10]=i+1,r[a+11]=s+1,r[a+12]=s,r[a+13]=i,r[a+14]=0}const s=S.createBuffer(r.length),i=s.position;for(let o=0;o<r.length;++o){const t=3*r[o];i.set(o,0,e[t]),i.set(o,1,e[t+1]),i.set(o,2,e[t+2])}return new T(t,new O(t,V(S),s.buffer))}_computeScreenRimWidth(t,e,r,s){return l(H,s.center,s.v2),c(Q,H,this._outerRimFactor),m(z,e,H,r),M(H,z,t.projectionMatrix,t.viewport,H),M(Q,z,t.projectionMatrix,t.viewport,Q),u(H,Q)/t.height}};function k(t,e,r,s,i){const o=p(t),a=s*Math.sqrt(o*o-s*s)/o,m=Math.sqrt(s*s-a*a),n=i.v1,h=i.v2;return c(i.center,t,m/o),_(n,t,e),f(n)<1&&_(n,t,r),c(n,n,a/p(n)),_(h,n,t),c(h,h,a/p(h)),a}L=t([a("esri.views.3d.webgl-engine.effects.atmosphere.MarsAtmosphere")],L);const z=n(),H=d(),Q=d();function J(t,e,r){return t*t/(Math.sqrt(t*t-e*e)*Math.sqrt(t*t-r*r)+e*r)}export{L as MarsAtmosphere};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{C as e}from"../../../../../chunks/Compositing.glsl.js";import{CompositingTechnique as t}from"../../shaders/CompositingTechnique.js";import{CompositingTechniqueConfiguration as i}from"../../shaders/CompositingTechniqueConfiguration.js";import{ColorAttachment0 as r}from"../../../../webgl/enums.js";class s{constructor(t,r=0){this._techniques=t,this._parameters=new e,this._configuration=new i,this._configuration.blitMode=r
|
|
2
|
+
import{C as e}from"../../../../../chunks/Compositing.glsl.js";import{CompositingTechnique as t}from"../../shaders/CompositingTechnique.js";import{CompositingTechniqueConfiguration as i}from"../../shaders/CompositingTechniqueConfiguration.js";import{ColorAttachment0 as r}from"../../../../webgl/enums.js";class s{constructor(t,r=0){this._techniques=t,this._parameters=new e,this._configuration=new i,this._configuration.blitMode=r}precompile(){this._techniques.precompile(t,this._configuration)}toFramebuffer(e,t,i){this.blitTexture(e,t.getTexture(),i)}blitTexture(e,i,r,s){e.bindFramebuffer(s?.fbo),e.setClearColor(0,0,0,1),e.clear(16384),this._parameters.texture=i;const o=this._techniques.get(t,this._configuration);e.bindTechnique(o,r,this._parameters),e.screen.draw()}blend(e,i,s,o,n=1){const a=this._techniques.getCompiled(t,this._configuration);return!!a&&(e.bindFramebuffer(s.fbo),this._parameters.texture=i.getTexture(),this._parameters.opacity=n,e.bindTechnique(a,o,this._parameters),e.setDrawBuffers([r]),e.screen.draw(),!0)}}export{s as Blit};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{disposeMaybe as t}from"../../../../../core/maybe.js";import{watch as i,initial as s}from"../../../../../core/reactiveUtils.js";import{subclass as r}from"../../../../../core/accessorSupport/decorators.js";import{OpaqueEnvironment as o}from"../OpaqueEnvironment.js";import{CloudsCompositionTechnique as n}from"./CloudsCompositionTechnique.js";import{createQuadVAO as a}from"../../lib/glUtil3D.js";import{ColorAttachment0 as m,PrimitiveType as d}from"../../../../webgl/enums.js";let h=class extends o{initialize(){this.addHandles([i(()=>null!=this.view.environment.weather&&this.view.environment.atmosphereEnabled,e=>e?this._enable():this._disable(),s)])}destroy(){this._vao=t(this._vao)}
|
|
2
|
+
import{__decorate as e}from"tslib";import{disposeMaybe as t}from"../../../../../core/maybe.js";import{watch as i,initial as s}from"../../../../../core/reactiveUtils.js";import{subclass as r}from"../../../../../core/accessorSupport/decorators.js";import{OpaqueEnvironment as o}from"../OpaqueEnvironment.js";import{CloudsCompositionTechnique as n}from"./CloudsCompositionTechnique.js";import{createQuadVAO as a}from"../../lib/glUtil3D.js";import{ColorAttachment0 as m,PrimitiveType as d}from"../../../../webgl/enums.js";let h=class extends o{initialize(){this.addHandles([i(()=>null!=this.view.environment.weather&&this.view.environment.atmosphereEnabled,e=>e?this._enable():this._disable(),s)])}destroy(){this._vao=t(this._vao)}render(e){const t=e.find(({name:e})=>e===this.produces),i=this.bindParameters.clouds;if(!i.data)return t;const s=this.techniques.getCompiled(n);if(!s)return this.requestRender(1),t;const r=this.renderingContext;this._vao??=a(r);const o=r.bindTechnique(s,this.bindParameters);return r.setDrawBuffers([m]),r.bindVAO(this._vao),o.assertCompatibleVertexAttributeLocations(this._vao),r.drawArrays(d.TRIANGLE_STRIP,0,4),i.isFading&&this.requestRender(2),t}};h=e([r("esri.views.3d.webgl-engine.effects.clouds.CloudsComposition")],h);export{h as CloudsComposition};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as t}from"tslib";import e from"../../../../../core/Accessor.js";import{lerp as s}from"../../../../../core/mathUtils.js";import{destroyMaybe as i,disposeMaybe as r}from"../../../../../core/maybe.js";import{watch as o,initial as a}from"../../../../../core/reactiveUtils.js";import{signal as h}from"../../../../../core/signal.js";import{property as n,subclass as l}from"../../../../../core/accessorSupport/decorators.js";import{fromMat4 as c}from"../../../../../core/libs/gl-matrix-2/math/mat3.js";import{targetTo as u}from"../../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as d}from"../../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{equals as
|
|
2
|
+
import{__decorate as t}from"tslib";import e from"../../../../../core/Accessor.js";import{lerp as s}from"../../../../../core/mathUtils.js";import{destroyMaybe as i,disposeMaybe as r}from"../../../../../core/maybe.js";import{watch as o,initial as a}from"../../../../../core/reactiveUtils.js";import{signal as h}from"../../../../../core/signal.js";import{property as n,subclass as l}from"../../../../../core/accessorSupport/decorators.js";import{fromMat4 as c}from"../../../../../core/libs/gl-matrix-2/math/mat3.js";import{targetTo as u}from"../../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as d}from"../../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{equals as m,copy as p,set as f}from"../../../../../core/libs/gl-matrix-2/math/vec2.js";import{clone as _,ZEROS as g,zeros as x}from"../../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{fromValues as y}from"../../../../../core/libs/gl-matrix-2/factories/vec3f32.js";import{zeros as b}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as T}from"../../../../../geometry/ellipsoidUtils.js";import{C as v,c as S}from"../../../../../chunks/Clouds.glsl.js";import{cloudPresets as w}from"./CloudsPresets.js";import{CloudsTechnique as C}from"./CloudsTechnique.js";import{CloudsTechniqueConfiguration as P}from"./CloudsTechniqueConfiguration.js";import{NoiseTextureAtlas as j}from"./NoiseTextureAtlas.js";import{TaskPriority as z}from"../../../../support/Scheduler.js";import{Yield as I}from"../../../../support/Yield.js";import{ColorAttachment0 as M}from"../../../../webgl/enums.js";import{DisposableFramebufferObject as H}from"../../../../webgl/FramebufferObject.js";import{TextureDescriptor as R}from"../../../../webgl/TextureDescriptor.js";let q=class extends e{constructor(t){super(t),this._state=h(0),this._passParameters=new v,this._weatherTileCount=128,this._sliceIndex=0,this._tileIndex=0,this._tilesPerSlice=1,this.coverage=s(w.default.coverage[0],w.default.coverage[1],.5),this.density=s(w.default.density[0],w.default.density[1],.5),this.absorption=s(w.default.absorption[0],w.default.absorption[1],.5),this.cloudSize=s(w.default.cloudSize[0],w.default.cloudSize[1],.5),this.detailSize=s(w.default.detailSize[0],w.default.detailSize[1],.5),this.smoothness=s(w.default.smoothness[0],w.default.smoothness[1],.5),this.cloudHeight=s(w.default.cloudHeight[0],w.default.cloudHeight[1],.5),this.raymarchingSteps=w.default.raymarchingSteps,this._viewMatrix=d(),this._dirty=!0,this.readyToRun=!0,this._configuration=new P}initialize(){const t=T(this.view.spatialReference);this._passParameters.cloudRadius=.5*t.radius;const e=()=>this.setDirty();this.addHandles([this.view.resourceController.scheduler.registerTask(z.CLOUDS_GENERATOR,this),o(()=>this.coverage,e,a),o(()=>this.density,e,a),o(()=>this.absorption,e,a),o(()=>this.cloudSize,e,a),o(()=>this.detailSize,e,a),o(()=>this.smoothness,e,a),o(()=>this.cloudHeight,e,a),o(()=>this.raymarchingSteps,e,a)]);const s=_(this._computeWeatherTile());let i=0;this.addHandles(o(()=>{const t=this._computeWeatherTile();return m(s,t)||(++i,p(s,t)),i},e))}destroy(){this.destroyCubeMap(),this._passParameters.noiseTexture=i(this._passParameters.noiseTexture)}_acquireTechnique(){switch(this.raymarchingSteps){case 0:this._tilesPerSlice=1;break;case 1:this._tilesPerSlice=4;break;case 3:case 2:this._tilesPerSlice=8;break;default:this.raymarchingSteps}return this._configuration.steps=this.raymarchingSteps,this._configuration.writeTextureChannels=1-this.parameters.readChannels,this.context.techniques.getCompiled(C,this._configuration)}_computeWeatherTile(){const{camera:t,environment:e}=this.view,{latitude:s,longitude:i}=t.position;if(null==s||null==i)return g;f(D,(s+90)/180,(i+180)/360);const r=Math.floor(this._weatherTileCount*Math.abs(2*D[0]-1));D[0]=Math.floor(2*this._weatherTileCount*D[0]),D[1]=Math.floor(4*(this._weatherTileCount-r)*D[1]);let o=0,a=0;if("virtual"!==e?.lighting?.type&&null!=e?.lighting?.date){const t=new Date(e.lighting.date);t.setUTCHours(e.lighting.date.getUTCHours()+(e.lighting.displayUTCOffset??0)),o=31*t.getUTCMonth()+t.getUTCDate(),a=t.getUTCFullYear()}return D[0]=(D[0]+o)%(2*this._weatherTileCount),D[1]=(D[1]+a%100)%(4*this._weatherTileCount),D}get state(){return this._state.value}set state(t){this._state.value=t}get usedMemory(){return(this._fbo?.usedMemory??0)+(this._passParameters.noiseTexture?.textureAtlas?.usedMemory??0)}_ensureNoiseTexture(){return this._passParameters.noiseTexture??=new j({context:this.context}),this._passParameters.noiseTexture}_ensureFrameBufferCube(t){const e=this.context.rctx;if(null==this._fbo){const s=new R(t,t/2);s.target=35866,s.depth=6,s.wrapMode=33071,this._fbo=new H(e,s),this.parameters.data=this,this.parameters.absorption=this.absorption,this.parameters.coverage=this.coverage}return e.unbindTexture(this._fbo.colorTexture),this._fbo}get cubeMap(){return this._fbo}get parameters(){return this.context.bind.clouds}destroyCubeMap(){this._fbo=r(this._fbo),this.parameters.data=null}applyPreset(t,e){const i=t.median,r=t=>{const r=s(t[0],t[1],i);return e<.5?s(t[0],r,2*e):s(r,t[1],2*(e-.5))};this.coverage=r(t.coverage),this.density=r(t.density),this.absorption=r(t.absorption),this.cloudSize=r(t.cloudSize),this.detailSize=r(t.detailSize),this.smoothness=r(t.smoothness),this.cloudHeight=r(t.cloudHeight),this.raymarchingSteps=t.raymarchingSteps}setDirty(){this._dirty=this.readyToRun=!0}runTask(t){if(3===this.state)return I;this._dirty&&(this._sliceIndex=this._tileIndex=0,this.state=1,this._passParameters.absorption=this.absorption,this._passParameters.density=this.density,this._passParameters.cloudSize=this.cloudSize,this._passParameters.detailSize=this.detailSize,this._passParameters.smoothness=this.smoothness,this._passParameters.cloudHeight=this.cloudHeight,this._passParameters.coverage=this.coverage,this._ensureNoiseTexture().updateWeatherMap(this._computeWeatherTile()),this._dirty=!1);const e=this._acquireTechnique();if(!this._ensureNoiseTexture().textureAtlas||!e)return I;const s=U[this._sliceIndex],i=O[this._sliceIndex];u(this._viewMatrix,k,s,i),c(this._passParameters.viewMatrix,this._viewMatrix);const r=this.context.rctx,o=r.getViewport(),a=S/this._tilesPerSlice,h=this._tileIndex*a;r.setViewport(0,h,S,a);const n=this._ensureFrameBufferCube(S);r.bindFramebuffer(n),this._passParameters.lastSlice=5===this._sliceIndex,r.bindTechnique(e,this.context.bind,this._passParameters);const l=35866;return n.setColorTextureTarget(l,M,this._sliceIndex),r.screen.draw(),r.gl.flush(),r.setViewport(o.x,o.y,o.width,o.height),this.requestRender(),++this._tileIndex,5===this._sliceIndex&&this._tileIndex===this._tilesPerSlice?(this._sliceIndex=this._tileIndex=0,this.state=2,this.readyToRun=!1):this._tileIndex===this._tilesPerSlice&&(++this._sliceIndex,this._tileIndex=0),t.madeProgress(),I}};t([n({constructOnly:!0})],q.prototype,"context",void 0),t([n({constructOnly:!0})],q.prototype,"view",void 0),t([n({constructOnly:!0})],q.prototype,"requestRender",void 0),t([n()],q.prototype,"coverage",void 0),t([n()],q.prototype,"density",void 0),t([n()],q.prototype,"absorption",void 0),t([n()],q.prototype,"cloudSize",void 0),t([n()],q.prototype,"detailSize",void 0),t([n()],q.prototype,"smoothness",void 0),t([n()],q.prototype,"cloudHeight",void 0),t([n()],q.prototype,"raymarchingSteps",void 0),t([n()],q.prototype,"readyToRun",void 0),q=t([l("esri.views.3d.webgl-engine.effects.clouds.CloudsRenderer")],q);const U=[y(1,0,0),y(-1,0,0),y(0,1,0),y(0,-1,0),y(0,0,1),y(0,0,1)],O=[y(0,0,-1),y(0,0,-1),y(0,0,-1),y(0,0,-1),y(0,1,0),y(0,1,0)],k=b(),D=x();export{q as CloudsRenderer};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{subclass as r}from"../../../../../core/accessorSupport/decorators.js";import{ReloadableShader as s}from"../../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as o}from"../../core/shaderTechnique/ShaderTechnique.js";import{a as
|
|
2
|
+
import{__decorate as e}from"tslib";import{subclass as r}from"../../../../../core/accessorSupport/decorators.js";import{ReloadableShader as s}from"../../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as o}from"../../core/shaderTechnique/ShaderTechnique.js";import{a as t}from"../../../../../chunks/Clouds.glsl.js";import{makePipelineState as i,defaultColorWrite as l,simpleBlendingParams as n}from"../../../../webgl/renderState.js";let c=class extends o{constructor(){super(...arguments),this.shader=new s(t,()=>import("./Clouds.glsl.js"))}initializePipeline(e){return i({blending:n(32769,32770,32774,0===e.writeTextureChannels?[1,1,0,0]:[0,0,1,1]),depthTest:{func:515},colorWrite:l})}};c=e([r("esri.views.3d.webgl-engine.effects.clouds.CloudsTechnique")],c);export{c as CloudsTechnique};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as t}from"tslib";import e from"../../../../../core/Accessor.js";import{disposeMaybe as r}from"../../../../../core/maybe.js";import{subclass as s}from"../../../../../core/accessorSupport/decorators.js";import{property as o}from"../../../../../core/accessorSupport/decorators/property.js";import{equals as i,copy as n}from"../../../../../core/libs/gl-matrix-2/math/vec2.js";import{N as c}from"../../../../../chunks/NoiseTextureAtlas.glsl.js";import{NoiseTextureAtlasTechniqueConfiguration as a}from"./NoiseTextureAtlasConfiguration.js";import{atlasSize as u}from"./NoiseTextureAtlasDimensions.js";import{NoiseTextureAtlasTechnique as
|
|
2
|
+
import{__decorate as t}from"tslib";import e from"../../../../../core/Accessor.js";import{disposeMaybe as r}from"../../../../../core/maybe.js";import{subclass as s}from"../../../../../core/accessorSupport/decorators.js";import{property as o}from"../../../../../core/accessorSupport/decorators/property.js";import{equals as i,copy as n}from"../../../../../core/libs/gl-matrix-2/math/vec2.js";import{N as c}from"../../../../../chunks/NoiseTextureAtlas.glsl.js";import{NoiseTextureAtlasTechniqueConfiguration as a}from"./NoiseTextureAtlasConfiguration.js";import{atlasSize as u}from"./NoiseTextureAtlasDimensions.js";import{NoiseTextureAtlasTechnique as m}from"./NoiseTextureAtlasTechnique.js";import{DisposableFramebufferObject as h}from"../../../../webgl/FramebufferObject.js";import{TextureDescriptor as p}from"../../../../webgl/TextureDescriptor.js";let f=class extends e{constructor(t){super(t),this._passParameters=new c,this._configuration=new a,this._fbo=new h(t.context.rctx,new p(u))}get textureAtlas(){if(this._texture)return this._texture;const t=this.context.techniques.getCompiled(m,this._configuration);return t&&(this._texture=this._render(t)),this._texture}updateWeatherMap(t){i(this._passParameters.weatherTile,t)||(n(this._passParameters.weatherTile,t),this._configuration.mode=this._texture?1:0,this._texture=null)}destroy(){this._fbo=r(this._fbo)}_render(t){if(!this._fbo)return null;const e=this.context.rctx,r=e.getViewport();return e.setViewport(0,0,u,u),e.bindFramebuffer(this._fbo),e.bindTechnique(t,this.context.bind,this._passParameters),e.screen.draw(),e.setViewport(r.x,r.y,r.width,r.height),this._fbo.colorTexture}};t([o({constructOnly:!0})],f.prototype,"context",void 0),f=t([s("esri.views.3d.webgl-engine.effects.clouds.NoiseTextureAtlas")],f);export{f as NoiseTextureAtlas};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{watch as t}from"../../../../../core/reactiveUtils.js";import{property as s,subclass as r}from"../../../../../core/accessorSupport/decorators.js";import{InternalRenderCategory as i}from"../../../webgl.js";import o from"../../../webgl/RenderNode.js";import{F as a}from"../../../../../chunks/FocusAreaColor.glsl.js";import{FocusAreaColorTechnique as n}from"./FocusAreaColorTechnique.js";import{DepthStencilAttachment as c}from"../../../../webgl/enums.js";let d=class extends o{constructor(e){super({...e,view:e.focusAreasView.view}),this.consumes={required:[i.FOCUSAREA_COLOR,i.FOCUSAREA]},this.produces=i.FOCUSAREA_COLOR,this._fadeDirection=0,this._passParameters=new a}
|
|
2
|
+
import{__decorate as e}from"tslib";import{watch as t}from"../../../../../core/reactiveUtils.js";import{property as s,subclass as r}from"../../../../../core/accessorSupport/decorators.js";import{InternalRenderCategory as i}from"../../../webgl.js";import o from"../../../webgl/RenderNode.js";import{F as a}from"../../../../../chunks/FocusAreaColor.glsl.js";import{FocusAreaColorTechnique as n}from"./FocusAreaColorTechnique.js";import{DepthStencilAttachment as c}from"../../../../webgl/enums.js";let d=class extends o{constructor(e){super({...e,view:e.focusAreasView.view}),this.consumes={required:[i.FOCUSAREA_COLOR,i.FOCUSAREA]},this.produces=i.FOCUSAREA_COLOR,this._fadeDirection=0,this._passParameters=new a}fadeOut(e){this.removeAllHandles(),this._startTime=null,this._fadeDirection=1,this.addHandles(t(()=>this._passParameters.fadeFactor.value,t=>{0===t&&(this.removeAllHandles(),e())})),this.requestRender(2)}render(e){const t=e.find(({name:e})=>e===this.produces),s=this.techniques.getCompiled(n);if(!s)return this.requestRender(1),t;const r=this.focusAreasView.style,o=this.bindParameters,a=o.camera,d=a.fullViewport[2],m=a.fullViewport[3];this._startTime??=this.view.stage?.renderer.renderContext.time;const u=this.view.qualitySettings.fadeDuration,f=u>0?Math.min(u,this.view.stage?.renderer.renderContext.time-this._startTime)/u:1,l=e.find(({name:e})=>e===i.FOCUSAREA),p=this.fboCache.acquire(d,m,this.produces),A=this.renderingContext;return A.bindFramebuffer(p.fbo),this._passParameters.color=t.getTexture(),this._passParameters.focusArea=l.getTexture(),this._passParameters.effect=h[r],this._passParameters.fadeFactor.value=0===this._fadeDirection?f:1-f,A.bindTechnique(s,o,this._passParameters),A.screen.draw(),p.attachDepth(t.getAttachment(c)),f<1&&this.requestRender(2),p}};e([s()],d.prototype,"consumes",void 0),e([s()],d.prototype,"produces",void 0),e([s({constructOnly:!0})],d.prototype,"focusAreasView",void 0),d=e([r("esri.views.3d.webgl-engine.effects.focusArea.FocusAreaColorNode")],d);const h={bright:0,dark:1};export{d as FocusAreaColorNode,h as styleToEffect};
|