@arcgis/core 5.1.0-next.104 → 5.1.0-next.106
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/AreaMeasurementAnalysis.d.ts +5 -5
- package/analysis/DimensionAnalysis.d.ts +3 -3
- package/analysis/DimensionSimpleStyle.d.ts +2 -2
- package/analysis/DirectLineMeasurementAnalysis.d.ts +4 -4
- package/analysis/DistanceMeasurementAnalysis.d.ts +4 -4
- package/analysis/ElevationProfileAnalysis.d.ts +3 -3
- package/analysis/LengthDimension.d.ts +2 -2
- package/analysis/LineOfSightAnalysis.d.ts +4 -4
- package/analysis/ShadowCast/DiscreteOptions.d.ts +7 -3
- package/analysis/ShadowCast/MinDurationOptions.d.ts +5 -1
- package/analysis/ShadowCast/TotalDurationOptions.d.ts +7 -3
- package/analysis/ShadowCast/types.d.ts +1 -1
- package/analysis/ShadowCastAnalysis.d.ts +90 -66
- package/analysis/SliceAnalysis.d.ts +4 -4
- package/analysis/SlicePlane.d.ts +3 -3
- package/analysis/Viewshed.d.ts +2 -2
- package/analysis/ViewshedAnalysis.d.ts +3 -3
- package/analysis/VolumeMeasurement/VolumeMeasurementCutFillOptions.d.ts +1 -1
- package/analysis/VolumeMeasurementAnalysis.d.ts +3 -3
- package/applications/Components/imageryUtils.d.ts +24 -0
- package/applications/Components/layerUtils.d.ts +21 -0
- package/applications/Components/layerUtils.js +2 -0
- package/applications/Components/templateUtils.d.ts +11 -1
- package/applications/Components/templateUtils.js +1 -1
- package/arcgisGlobal.d.ts +1 -0
- package/assets/components/assets/icon/buttons16.json +1 -0
- package/assets/components/assets/icon/buttons24.json +1 -0
- package/assets/components/assets/icon/buttons32.json +1 -0
- package/assets/components/assets/icon/entityTypes16.json +1 -0
- package/assets/components/assets/icon/entityTypes24.json +1 -0
- package/assets/components/assets/icon/entityTypes32.json +1 -0
- package/assets/esri/core/t9n/Units.json +1 -1
- package/assets/esri/core/t9n/Units_ar.json +1 -1
- package/assets/esri/core/t9n/Units_bg.json +1 -1
- package/assets/esri/core/t9n/Units_bs.json +1 -1
- package/assets/esri/core/t9n/Units_ca.json +1 -1
- package/assets/esri/core/t9n/Units_cs.json +1 -1
- package/assets/esri/core/t9n/Units_da.json +1 -1
- package/assets/esri/core/t9n/Units_de.json +1 -1
- package/assets/esri/core/t9n/Units_el.json +1 -1
- package/assets/esri/core/t9n/Units_en.json +1 -1
- package/assets/esri/core/t9n/Units_es.json +1 -1
- package/assets/esri/core/t9n/Units_et.json +1 -1
- package/assets/esri/core/t9n/Units_fi.json +1 -1
- package/assets/esri/core/t9n/Units_fr.json +1 -1
- package/assets/esri/core/t9n/Units_he.json +1 -1
- package/assets/esri/core/t9n/Units_hr.json +1 -1
- package/assets/esri/core/t9n/Units_hu.json +1 -1
- package/assets/esri/core/t9n/Units_id.json +1 -1
- package/assets/esri/core/t9n/Units_it.json +1 -1
- package/assets/esri/core/t9n/Units_ja.json +1 -1
- package/assets/esri/core/t9n/Units_ko.json +1 -1
- package/assets/esri/core/t9n/Units_lt.json +1 -1
- package/assets/esri/core/t9n/Units_lv.json +1 -1
- package/assets/esri/core/t9n/Units_nl.json +1 -1
- package/assets/esri/core/t9n/Units_no.json +1 -1
- package/assets/esri/core/t9n/Units_pl.json +1 -1
- package/assets/esri/core/t9n/Units_pt-BR.json +1 -1
- package/assets/esri/core/t9n/Units_pt-PT.json +1 -1
- package/assets/esri/core/t9n/Units_ro.json +1 -1
- package/assets/esri/core/t9n/Units_ru.json +1 -1
- package/assets/esri/core/t9n/Units_sk.json +1 -1
- package/assets/esri/core/t9n/Units_sl.json +1 -1
- package/assets/esri/core/t9n/Units_sr.json +1 -1
- package/assets/esri/core/t9n/Units_sv.json +1 -1
- package/assets/esri/core/t9n/Units_th.json +1 -1
- package/assets/esri/core/t9n/Units_tr.json +1 -1
- package/assets/esri/core/t9n/Units_uk.json +1 -1
- package/assets/esri/core/t9n/Units_vi.json +1 -1
- package/assets/esri/core/t9n/Units_zh-CN.json +1 -1
- package/assets/esri/core/t9n/Units_zh-HK.json +1 -1
- package/assets/esri/core/t9n/Units_zh-TW.json +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/01c70c27aa3a955e2928.js +262 -0
- package/assets/esri/core/workers/chunks/{7d571845292b1b7769c2.js → 065dd2fdc834146423c7.js} +1 -1
- package/assets/esri/core/workers/chunks/{f5bd0a4f82df5e942b70.js → 093f27e4e4781870b431.js} +1 -1
- package/assets/esri/core/workers/chunks/{2a5f6a8d282f2c391591.js → 15920af0c4f46773b06e.js} +1 -1
- package/assets/esri/core/workers/chunks/179c9fe4ac83b42e5976.js +1 -0
- package/assets/esri/core/workers/chunks/1d1929f98d941179be29.js +2 -0
- package/assets/esri/core/workers/chunks/{24247ee93f43fff5e596.js.LICENSE.txt → 1d1929f98d941179be29.js.LICENSE.txt} +1 -3
- package/assets/esri/core/workers/chunks/1ebb613bbe09fcf274d8.js +1 -0
- package/assets/esri/core/workers/chunks/24b43fb12fc3009fdc30.js +1 -0
- package/assets/esri/core/workers/chunks/2b9661700743d1f9717e.js +1 -0
- package/assets/esri/core/workers/chunks/2f0a3b22fc46d832e240.js +1 -0
- package/assets/esri/core/workers/chunks/340f2c996f62f7f5ceae.js +1 -0
- package/assets/esri/core/workers/chunks/466c250537415f12eb59.js +1 -0
- package/assets/esri/core/workers/chunks/549d348ca181d06aefb7.js +2 -0
- package/assets/esri/core/workers/chunks/{0cb8bc6dbbbe3b212712.js → 558606a1af22e4a0d536.js} +1 -1
- package/assets/esri/core/workers/chunks/{7485d59d60d61737d662.js → 55b765c72d13b3b911f9.js} +1 -1
- package/assets/esri/core/workers/chunks/5cdf87e7a59ace38df87.js +1 -0
- package/assets/esri/core/workers/chunks/622bdd1b9d5d292ec12b.js +1 -0
- package/assets/esri/core/workers/chunks/{bff0c4094c14cb97b18f.js → 63ea4191d441efd2f146.js} +1 -1
- package/assets/esri/core/workers/chunks/69c9eb93553b006b640d.js +2 -0
- package/assets/esri/core/workers/chunks/6d20d741b8ae1a45b422.js +1 -0
- package/assets/esri/core/workers/chunks/{b63cbf6c2c9ec1b02b9a.js → 6e21675bbd7a44070771.js} +1 -1
- package/assets/esri/core/workers/chunks/702a3ef9e1b3442cbee7.js +1 -0
- package/assets/esri/core/workers/chunks/762e23466308f22d7076.js +1 -0
- package/assets/esri/core/workers/chunks/{52219561c144e5cb4442.js → 770611659b38066a6228.js} +1 -1
- package/assets/esri/core/workers/chunks/{c476f4979048e558baa7.js → 7ce60331f94ee0a5d674.js} +57 -75
- package/assets/esri/core/workers/chunks/7e02e5c6979090fe3ea7.js +1 -0
- package/assets/esri/core/workers/chunks/825db2ea15308ee6e5dc.js +1 -0
- package/assets/esri/core/workers/chunks/{bf2c202dec5ab7bc770b.js → 829a0583b8a228c65379.js} +1 -1
- package/assets/esri/core/workers/chunks/8330302096d4312a4393.js +1 -0
- package/assets/esri/core/workers/chunks/885eac78a76184efa1e5.js +1 -0
- package/assets/esri/core/workers/chunks/{79dc7045d9a2d43ba8df.js → 890b7a1153b7f65eba9a.js} +1 -1
- package/assets/esri/core/workers/chunks/8a1751187a20b6578875.js +1 -0
- package/assets/esri/core/workers/chunks/{d610f517fb3c6cb24365.js → 8ade869fa9bae446266a.js} +1 -1
- package/assets/esri/core/workers/chunks/{44636ef119c6a576470b.js → 94eab215bab3e4e0e5b5.js} +1 -1
- package/assets/esri/core/workers/chunks/95dee5853c6e89f15ea9.js +1 -0
- package/assets/esri/core/workers/chunks/a5b9ae4c93f9af7589f2.js +1 -0
- package/assets/esri/core/workers/chunks/{95798e3de3419fdda6ac.js → a8ae00e06f98e04aee8e.js} +1 -1
- package/assets/esri/core/workers/chunks/aaad0d3e82ed917d3886.js +1 -0
- package/assets/esri/core/workers/chunks/b3e8ab68fc38306f13c6.js +1 -0
- package/assets/esri/core/workers/chunks/b7a81fd4994eabba1869.js +640 -0
- package/assets/esri/core/workers/chunks/{9542ef3f6c2bc7c14d85.js → b9850fe7dcdaed0c327c.js} +1 -1
- package/assets/esri/core/workers/chunks/{f7e386ece75afb6e4be5.js → bc249bb667f0564ad093.js} +1 -1
- package/assets/esri/core/workers/chunks/bd59cb5abc67e46f1b2c.js +2 -0
- package/assets/esri/core/workers/chunks/{f3a9100518b044e79501.js → be817be7c81fb630122f.js} +1 -1
- package/assets/esri/core/workers/chunks/{3c9482764c9e4f8bcbb0.js → c187bc997bad61b6c6e9.js} +1 -1
- package/assets/esri/core/workers/chunks/c4872cf3b71d00f450e1.js +1 -0
- package/assets/esri/core/workers/chunks/c5ab346a226df1894302.js +1 -0
- package/assets/esri/core/workers/chunks/{ce0c7070eeb723a718e7.js → d859c046a3ea42530bff.js} +1 -1
- package/assets/esri/core/workers/chunks/da29cf0e64065631a470.js +1 -0
- package/assets/esri/core/workers/chunks/{bb04aff0b4947408592c.js → dcba6c766eee8b90381a.js} +1 -1
- package/assets/esri/core/workers/chunks/ddebc1dc10a2d207389f.js +1 -0
- package/assets/esri/core/workers/chunks/e393fd61deb2e7f22ee6.js +1 -0
- package/assets/esri/core/workers/chunks/ea2bf7c543cc536400b7.js +30 -0
- package/assets/esri/core/workers/chunks/ece30bfd5c49b8d99752.js +1 -0
- package/assets/esri/core/workers/chunks/ecf4d07917efc97eb991.js +1 -0
- package/assets/esri/core/workers/chunks/ee56290e600cbeb25a00.js +1 -0
- package/assets/esri/core/workers/chunks/f52c6efc5a2abf5ac845.js +1 -0
- package/assets/esri/core/workers/chunks/{5cffc7b49966201eccdb.js → f75295cdd5e84eb97d5a.js} +1 -1
- package/assets/esri/core/workers/chunks/f7fe17a22390a24d6df8.js +2 -0
- package/assets/esri/core/workers/chunks/f9324420f2c6ac240f63.js +1 -0
- package/assets/esri/core/workers/chunks/{855bf811cd79b97c169a.js → fae2c8f053927559fff0.js} +1 -1
- package/assets/esri/core/workers/chunks/{64e268ebac0b62076f81.js → fbb23db01f3cf629d32e.js} +1 -1
- package/assets/esri/core/workers/chunks/fc1fe1f58a65a1694c09.js +1 -0
- package/assets/esri/themes/base/widgets/_BatchAttributeForm.scss +84 -1
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_en.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer.json +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_en.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_cs.json +1 -1
- package/chunks/ChapmanAtmosphere.glsl.js +14 -19
- package/chunks/ComponentShader.glsl.js +11 -15
- package/chunks/Compositing.glsl.js +4 -4
- package/chunks/GaussianSplatShadow.glsl.js +7 -7
- package/chunks/GlobalIllumination.glsl.js +27 -50
- package/chunks/GlobalIlluminationBlur.glsl.js +16 -11
- package/chunks/Terrain.glsl.js +1 -1
- package/config.js +1 -1
- package/core/ReactiveSet.js +1 -1
- package/core/generatorUtils.js +2 -0
- package/core/libs/gl-matrix-2/factories/vec2f64.js +1 -1
- package/core/libs/gl-matrix-2/math/vec2.js +1 -1
- package/core/mathUtils.js +1 -1
- package/core/typedArrayUtil.js +1 -1
- package/geometry/HeightModelInfo.js +1 -1
- package/geometry/geometryEngine.d.ts +2 -2
- package/geometry/support/buffer/BufferView.js +1 -1
- package/geometry/support/vcsData.js +1 -1
- package/geometry/support/vcsLookup.js +1 -1
- package/kernel.js +1 -1
- package/layers/DimensionLayer.d.ts +5 -5
- package/layers/FeatureLayer.d.ts +2 -2
- package/layers/GaussianSplatLayer.d.ts +3 -3
- package/layers/LineOfSightLayer.d.ts +5 -5
- package/layers/ParquetLayer.d.ts +6 -4
- package/layers/SubtypeGroupLayer.d.ts +2 -2
- package/layers/VideoLayer.js +1 -1
- package/layers/ViewshedLayer.d.ts +3 -3
- package/layers/graphics/sources/ParquetSource.js +1 -1
- package/layers/graphics/sources/parquet/FileProvider.js +2 -0
- package/layers/graphics/sources/parquet/PortalParquetFileProvider.js +2 -0
- package/layers/graphics/sources/parquet/PortalParquetLayerFileProvider.js +2 -0
- package/layers/graphics/sources/parquet/UrlsFileProvider.js +2 -0
- package/layers/graphics/sources/parquet/createFileProvider.js +2 -0
- package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
- package/layers/knowledgeGraph/KnowledgeGraphLayerDataManager.js +1 -1
- package/layers/knowledgeGraph/KnowledgeGraphSublayer.d.ts +2 -2
- package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
- package/layers/knowledgeGraph/layerUtils.js +1 -1
- package/layers/orientedImagery/core/utils.js +1 -1
- package/layers/raster/datasets/ImageAuxRaster.js +1 -1
- package/layers/raster/datasets/pixelReader.js +1 -1
- package/layers/raster/formats/JpgPlus.js +1 -1
- package/layers/raster/formats/RasterCodec.js +1 -1
- package/layers/raster/functions/clipUtils.js +1 -1
- package/layers/support/AggregateField.d.ts +2 -1
- package/layers/support/LayerContingentValuesCache.js +1 -1
- package/layers/support/SubtypeSublayer.d.ts +4 -4
- package/layers/support/parquetUtils.d.ts +18 -7
- package/layers/support/parquetUtils.js +1 -1
- package/layers/support/rasterFunctionUtils.d.ts +2 -2
- package/layers/video/VideoController.js +1 -1
- package/libs/parquet/parquet.js +1 -1
- package/linkChart/ChronologicalLayoutSettings.d.ts +1 -1
- package/networks/CircuitManager.d.ts +3 -3
- package/networks/UnitIdentifierManager.d.ts +1 -1
- package/networks/UnitIdentifierManager.js +1 -1
- package/networks/UtilityNetwork.d.ts +2 -2
- package/networks/UtilityNetwork.js +1 -1
- package/networks/support/Circuit.d.ts +1 -1
- package/networks/support/CircuitLocation.d.ts +1 -1
- package/networks/support/CircuitSection.d.ts +1 -1
- package/networks/support/Subcircuit.d.ts +1 -1
- package/networks/support/TraceJobInfo.js +1 -1
- package/networks/support/jsonTypes.d.ts +10 -3
- package/package.json +3 -3
- package/popup/FieldInfo.d.ts +4 -2
- package/popup/support/FieldInfoFormat.d.ts +3 -2
- package/rest/featureService/FeatureService.d.ts +1 -1
- package/rest/knowledgeGraph/FieldIndex.d.ts +1 -1
- package/rest/knowledgeGraph/GraphObjectType.d.ts +2 -2
- package/rest/knowledgeGraph/GraphSearch.d.ts +1 -1
- package/rest/knowledgeGraph/GraphSearchStreaming.d.ts +1 -1
- package/rest/networks/circuits/support/ExportCircuitsParameters.d.ts +19 -1
- package/rest/networks/circuits/support/ExportCircuitsResult.js +1 -1
- package/rest/networks/circuits/support/VerifyCircuitsParameters.d.ts +18 -10
- package/rest/networks/circuits/support/VerifyCircuitsParameters.js +1 -1
- package/rest/networks/support/TraceParameters.js +1 -1
- package/rest/networks/support/TraceResult.js +1 -1
- package/rest/networks/trace.js +1 -1
- package/rest/networks/unitIdentifiers/support/QueryUnitIdentifiersParameters.js +1 -1
- package/rest/support/AreasAndLengthsParameters.d.ts +1 -1
- package/rest/support/GeneralizeParameters.d.ts +1 -1
- package/rest/support/Query.d.ts +1 -1
- package/rest/support/RelationParameters.d.ts +1 -1
- package/rest/support/types.d.ts +1 -1
- package/support/revision.js +1 -1
- package/symbols/CIMSymbol.d.ts +1 -1
- package/views/2d/analysis/AreaMeasurementAnalysisView2D.d.ts +1 -0
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/layers/features/layerAdapters/KnowledgeGraphSublayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/ParquetLayerAdapter.js +1 -1
- package/views/2d/layers/features/sources/strategies/ParquetSnapshotLoadStrategy.js +1 -1
- package/views/2d/layers/features/sources/strategies/ParquetTileLoadStrategy.js +1 -1
- package/views/2d/layers/features/sources/strategies/chunks/ParquetSnapshotSourceChunk.js +1 -1
- package/views/2d/layers/features/sources/strategies/chunks/ParquetSourceChunk.js +1 -1
- package/views/3d/analysis/AreaMeasurementAnalysisView3D.d.ts +1 -0
- package/views/3d/analysis/DimensionAnalysisView3D.d.ts +7 -6
- package/views/3d/analysis/DirectLineMeasurementAnalysisView3D.d.ts +2 -0
- package/views/3d/analysis/LineOfSightAnalysisView3D.d.ts +2 -1
- package/views/3d/analysis/ShadowCastAnalysisView3D.d.ts +14 -6
- package/views/3d/analysis/SliceAnalysisView3D.d.ts +4 -3
- package/views/3d/analysis/Viewshed/ViewshedDrawToolRenderer.js +2 -0
- package/views/3d/analysis/Viewshed/ViewshedEditTool.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedInteractionVisuals.js +2 -0
- package/views/3d/analysis/Viewshed/ViewshedPlacementController.js +2 -0
- package/views/3d/analysis/Viewshed/ViewshedPlacementOperation.js +2 -0
- package/views/3d/analysis/Viewshed/ViewshedPlacementPointPlugin.js +2 -0
- package/views/3d/analysis/Viewshed/ViewshedPlacementRootPlugin.js +2 -0
- package/views/3d/analysis/Viewshed/ViewshedSnappingController.js +2 -0
- 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/ViewshedTool2.js +1 -1
- package/views/3d/analysis/Viewshed/analysisViewRegister.js +1 -1
- package/views/3d/analysis/Viewshed/placementUtils.js +2 -0
- package/views/3d/analysis/Viewshed/toolLifecycleUtils.js +2 -0
- package/views/3d/analysis/Viewshed/viewshedSubToolUtils.js +1 -1
- package/views/3d/analysis/Viewshed/viewshedToolUtils.js +1 -1
- package/views/3d/analysis/ViewshedAnalysisView3D.d.ts +4 -3
- package/views/3d/analysis/ViewshedAnalysisView3D.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementShiftTool.js +1 -1
- package/views/3d/layers/FlowSubView3D.js +1 -1
- package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
- package/views/3d/layers/graphics/polygonUtils.js +1 -1
- package/views/3d/layers/support/UVWorkspace.js +2 -0
- package/views/3d/layers/support/patternUtils.js +1 -1
- package/views/3d/layers/support/uvUtils.js +1 -1
- package/views/3d/support/flow/FlowSubViewTiles3D.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatDataStore.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatIntersectionHandler.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatTextureAtlas.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianTile.js +1 -1
- package/views/3d/support/meshProcessing.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/terrain/TileCompositor.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentTechnique.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBuffer.glsl.js +8 -8
- package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBufferFields.glsl.js +13 -9
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/PathVertexPosition.glsl.js +63 -49
- package/views/3d/webgl-engine/core/shaderTechnique/ShaderTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/atmosphere/ChapmanAtmosphere.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/atmosphere/ChapmanAtmosphere.js +1 -1
- package/views/3d/webgl-engine/effects/atmosphere/ChapmanAtmosphereTechnique.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/focusArea/FocusAreaMaskNode.js +1 -1
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationBlur.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/lib/AttributeArray.js +1 -1
- package/views/3d/webgl-engine/lib/Compositor.js +1 -1
- package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/Geometry.js +1 -1
- package/views/3d/webgl-engine/lib/PathBuilder.js +1 -1
- package/views/3d/webgl-engine/lib/PathCapBuilder.js +1 -1
- package/views/3d/webgl-engine/lib/PathExtruder.js +1 -1
- package/views/3d/webgl-engine/lib/PathGeometry.js +1 -1
- package/views/3d/webgl-engine/lib/PathGeometryData.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/RenderingContext.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
- package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBufferFieldCreation.js +1 -1
- package/views/3d/webgl-engine/materials/PathLayouts.js +2 -0
- package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathTechnique.js +1 -1
- package/views/3d/webgl-engine/materials/PathTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/VaoRenderer.js +1 -1
- package/views/3d/webgl-engine/parts/RenderView.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/CompositingTechniqueConfiguration.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/NativeLineTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/PatternTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/SphereDepthInterpolate.glsl.js +2 -3
- package/views/3d/webgl-engine/shaders/TerrainTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ditherNoise.glsl.js +1 -1
- package/views/PopupView.d.ts +77 -1
- package/views/PopupView.js +1 -1
- package/views/layers/DimensionLayerView.d.ts +2 -1
- package/views/layers/FeatureLikeLayerView.js +1 -1
- package/views/layers/LineOfSightLayerView.d.ts +2 -1
- package/views/layers/ViewshedLayerView.d.ts +2 -1
- package/webscene/Slide.js +1 -1
- package/widgets/Attachments/types.d.ts +1 -1
- package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.d.ts +38 -5
- package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
- package/widgets/BatchAttributeForm/ReactiveContingentValuesManager.js +2 -0
- package/widgets/BatchAttributeForm/ReactiveGraphic.js +1 -1
- package/widgets/BatchAttributeForm/attachmentUtils.js +1 -1
- package/widgets/BatchAttributeForm/batchAttributeFormUtils.js +1 -1
- package/widgets/BatchAttributeForm/css.js +1 -1
- package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.d.ts +11 -0
- package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.js +1 -1
- package/widgets/BatchAttributeForm/inputs/FieldInput.d.ts +77 -0
- package/widgets/BatchAttributeForm/inputs/FieldInput.js +1 -1
- package/widgets/BatchAttributeForm/inputs/UtilityNetworkAssociationsElementInput.js +1 -1
- package/widgets/BatchAttributeForm/inputs/support/createBatchFormInputs.js +1 -1
- package/widgets/BatchAttributeForm/inputs/support/inputUtils.js +1 -1
- package/widgets/BatchAttributeForm/interfaceUtils.js +2 -0
- package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
- package/widgets/BatchAttributeForm/types.d.ts +30 -2
- package/widgets/BatchAttributeForm.d.ts +52 -1
- package/widgets/BatchAttributeForm.js +1 -1
- package/widgets/CoordinateConversion/CoordinateConversionViewModel.js +1 -1
- package/widgets/Editor.d.ts +1 -1
- package/widgets/FeatureTable/FieldColumn.js +1 -1
- package/widgets/FeatureTable/support/FeatureStore.js +1 -1
- package/widgets/LayerList/LayerListItem.js +1 -1
- package/widgets/OrientedImageryViewer/components/VideoEnhancementTools.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/TableList/TableListViewModel.js +1 -1
- package/widgets/TimeSlider.d.ts +3 -3
- package/widgets/Track/TrackViewModel.d.ts +1 -0
- package/widgets/Track/TrackViewModel.js +1 -1
- package/widgets/Track.js +1 -1
- package/widgets/VideoPlayer/VideoPlayerViewModel.d.ts +10 -0
- package/widgets/VideoPlayer/VideoPlayerViewModel.js +1 -1
- package/widgets/support/ContingentValuesManager.js +1 -1
- package/widgets/support/GeolocationPositioning.d.ts +1 -0
- package/widgets/support/GeolocationPositioning.js +1 -1
- package/widgets/support/forms/formUtils.js +1 -1
- package/assets/esri/core/workers/chunks/037b36d415ae27e987f9.js +0 -1
- package/assets/esri/core/workers/chunks/11b0d3a825fe50dd1e84.js +0 -1
- package/assets/esri/core/workers/chunks/1a3426276dc82a8a80f2.js +0 -1
- package/assets/esri/core/workers/chunks/1c83e61fd9a4f8fc8372.js +0 -1
- package/assets/esri/core/workers/chunks/1cb0c4fc315bbc2bd00b.js +0 -1
- package/assets/esri/core/workers/chunks/24247ee93f43fff5e596.js +0 -2
- package/assets/esri/core/workers/chunks/276cb6a1cdd26d0e1444.js +0 -1
- package/assets/esri/core/workers/chunks/29b00d07d3e1d095c590.js +0 -2
- package/assets/esri/core/workers/chunks/2f903bd3a2611e7f0946.js +0 -30
- package/assets/esri/core/workers/chunks/2fda38219d778f0447b5.js +0 -1
- package/assets/esri/core/workers/chunks/35fdd62277fd06468a29.js +0 -2
- package/assets/esri/core/workers/chunks/38d7430d2370b69334d7.js +0 -1
- package/assets/esri/core/workers/chunks/39d6032d79720935910d.js +0 -1
- package/assets/esri/core/workers/chunks/40caf5e09e4382d81104.js +0 -640
- package/assets/esri/core/workers/chunks/4213aa844900fcf95287.js +0 -1
- package/assets/esri/core/workers/chunks/594e1f633527749d92d7.js +0 -1
- package/assets/esri/core/workers/chunks/5dafd35801dca4229aed.js +0 -1
- package/assets/esri/core/workers/chunks/642be1619c0e76355cb6.js +0 -1
- package/assets/esri/core/workers/chunks/6d66dc77af8d112c33c6.js +0 -1
- package/assets/esri/core/workers/chunks/7b3642195d6d3ea9b830.js +0 -1
- package/assets/esri/core/workers/chunks/7e57029ec958f6423d5d.js +0 -2
- package/assets/esri/core/workers/chunks/8042e001545e2782499c.js +0 -1
- package/assets/esri/core/workers/chunks/881234f25c7814de8753.js +0 -1
- package/assets/esri/core/workers/chunks/8a7682071941c35f05c1.js +0 -1
- package/assets/esri/core/workers/chunks/8e986167d4a393ee41ea.js +0 -1
- package/assets/esri/core/workers/chunks/8fdd57e2a0af647f1e3e.js +0 -1
- package/assets/esri/core/workers/chunks/90ea570f6b6ce8ca693b.js +0 -1
- package/assets/esri/core/workers/chunks/9373daa677dc767d7cf0.js +0 -1
- package/assets/esri/core/workers/chunks/95df6d2ebacc43ac5fa3.js +0 -1
- package/assets/esri/core/workers/chunks/a02ebdcb802d128c8eee.js +0 -1
- package/assets/esri/core/workers/chunks/adf72d87f0114aeade0e.js +0 -1
- package/assets/esri/core/workers/chunks/b1a21a4d7d73ad7d0e47.js +0 -1
- package/assets/esri/core/workers/chunks/b75e090a7e935ff870a3.js +0 -1
- package/assets/esri/core/workers/chunks/bacf0c9d5d3e084dea61.js +0 -1
- package/assets/esri/core/workers/chunks/c0e4fd6fa1d765275248.js +0 -2
- package/assets/esri/core/workers/chunks/cc8d55d1830d7542c3f5.js +0 -262
- package/assets/esri/core/workers/chunks/cf3c0bee919bb509cd4f.js +0 -1
- package/assets/esri/core/workers/chunks/cfaa6e205bfc0c94a1b1.js +0 -1
- package/assets/esri/core/workers/chunks/dcb7a3ff59677b1cf0f1.js +0 -1
- package/views/3d/webgl-engine/effects/atmosphere/ChapmanAtmosphereTechniqueConfiguration.js +0 -2
- /package/assets/esri/core/workers/chunks/{7e57029ec958f6423d5d.js.LICENSE.txt → 549d348ca181d06aefb7.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{29b00d07d3e1d095c590.js.LICENSE.txt → 69c9eb93553b006b640d.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{35fdd62277fd06468a29.js.LICENSE.txt → bd59cb5abc67e46f1b2c.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{c0e4fd6fa1d765275248.js.LICENSE.txt → f7fe17a22390a24d6df8.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 t from"../../../../core/Accessor.js";import{sliceEquals as i}from"../../../../core/arrayUtils.js";import"../../../../core/has.js";import{smoothstep as r}from"../../../../core/mathUtils.js";import{releaseMaybe as s,disposeMaybe as a}from"../../../../core/maybe.js";import{watch as o,sync as n}from"../../../../core/reactiveUtils.js";import{signal as h}from"../../../../core/signal.js";import{property as c,subclass as u}from"../../../../core/accessorSupport/decorators.js";import{copy as l,equals as m}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as _}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{ReadShadowMapPassParameters as d}from"../core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{a as p}from"../../../../chunks/FocusAreaMask.glsl.js";import{volumeToVao as f}from"../effects/focusArea/focusAreaMaskUtils.js";import{BindParameters as g}from"./BindParameters.js";import{DepthRange as b}from"./DepthRange.js";import{createQuadVAO as v}from"./glUtil3D.js";import{ShadowCastRenderer as y,shadowCastDisabledElevationThreshold as S,shadowCastDisableElevationMax as w,shadowCastDisableElevationMin as A}from"./ShadowCastRenderer.js";import{ShadowMap as F}from"./ShadowMap.js";import{a as C}from"../../../../chunks/ShadowCastAccumulate.glsl.js";import{ShadowCastAccumulateTechnique as R}from"../shaders/ShadowCastAccumulateTechnique.js";import{ShadowCastAccumulateTechniqueConfiguration as x}from"../shaders/ShadowCastAccumulateTechniqueConfiguration.js";import{ShadowCastClearTechnique as P}from"../shaders/ShadowCastClearTechnique.js";import{ShadowCastMaskTechnique as q}from"../shaders/ShadowCastMaskTechnique.js";import{TaskPriority as j}from"../../../support/Scheduler.js";import{PrimitiveType as H,DepthStencilAttachment as V,PixelType as T}from"../../../webgl/enums.js";import{DisposableFramebufferObject as D}from"../../../webgl/FramebufferObject.js";import{noParameters as M}from"../../../webgl/NoParameters.js";let E=class extends t{constructor(e,t,i,r,a,h){super({}),this._fbos=e,this._techniques=t,this._stage=i,this._prepareForShadowMapPass=r,this._renderToShadowMap=a,this._requestRender=h,this._analysisVolumeGeometry=null,this._primarySet=new U(new x(0),()=>this._requestRenderIfEnabled()),this._contextSet=new U(new x(1),()=>this._requestRenderIfEnabled()),this._passParameters=new d,this._maskParameters=new p,this._volumeVao=null,this._volumeVertexCount=0,this._depthRange=b.Zero,this._enabled=!1,this._previewing=!1,this._shadowAccumulatorKey=Symbol("shadowAccumulator"),this._bindParameters=new g(e.rctx,new F(e,i.viewingMode)),this._bindParameters.shadowMap.enabled=!0,this._vao=v(e.rctx),this._accumulationRenderer=new y(e,t,this,h),this._tmpReadFbo=new D(e.rctx);const c=this._stage.view.resourceController.scheduler;this.addHandles([c.registerTask(j.SHADOW_ACCUMULATOR,this),o(()=>this._previewing,e=>{e?this._invalidateAccumulationSets():this._requestRenderIfEnabled()},n),o(()=>this._numActive,()=>this._numActiveChanged(),n),o(()=>this._depthRange,()=>this._invalidateAccumulationSets(),n),o(()=>this.readyToRun,e=>{e||(this._bindParameters.depth=s(this._bindParameters.depth),this.notifyChange("canAccumulate"))})],this._shadowAccumulatorKey)}destroy(){this._disable(),this.removeHandles(this._shadowAccumulatorKey),this._accumulationRenderer=a(this._accumulationRenderer),this._fboHandle=a(this._fboHandle),this._vao=a(this._vao),this._volumeVao=a(this._volumeVao),this._tmpReadFbo=a(this._tmpReadFbo),this._bindParameters.destroy();for(const e of this._accumulationSets())e.destroy();this._contextSet=null,this._primarySet=null}*_accumulationSets(){yield this._primarySet,yield this._contextSet}get computedSamples(){return[this._primarySet.progress,this._contextSet.progress]}get shadowCastTexture(){return this._fboHandle?.getTexture()}get accumulating(){return this.active&&this._previewing||this._refining}get _refining(){return this.active&&!this._doneAccumulating&&!this._previewing}get active(){return this._enabled&&[...this._accumulationSets()].some(e=>e.active)}get canAccumulate(){return null!=this._bindParameters.depth&&this._depthRange!==b.Zero&&this._opacityFromElevation>S}get _doneAccumulating(){return[...this._accumulationSets()].every(e=>e.doneAccumulating)}get _opacityFromElevation(){return this._accumulationRenderer.opacityFromElevation}set _opacityFromElevation(e){this._accumulationRenderer.opacityFromElevation=e}get _numActive(){return[...this._accumulationSets()].reduce((e,t)=>e+(t.active?1:0),0)}get _colorFormat(){return 2===this._numActive?2:0}get readyToRun(){return this._refining&&this.canAccumulate&&[...this._accumulationSets()].some(e=>e.running)}get _analysisVolume(){return this._analysisVolumeGeometry}set _analysisVolume(e){if(this._analysisVolumeGeometry===e)return;this._invalidateAccumulationSets(),this._analysisVolumeGeometry=e,this._volumeVao=a(this._volumeVao),this._volumeVertexCount=0;const t=null!=e;for(const a of this._accumulationSets())a.configuration.useMask=t;if(!t)return;const i=e.geometryVolume,{vao:r,vertexCount:s}=f(this._rctx,i);this._volumeVao=r,this._volumeVertexCount=s}runTask(e){this._clearBuffersOnAccumulationStart(),this._prepareForShadowMapPass(this._bindParameters);let t=!1;for(const i of this._accumulationSets())this._runTaskForSet(i,e)&&(t=!0);t&&this._requestRender()}_runTaskForSet(e,t){let i=!1;for(;!t.done&&!e.doneAccumulating;)this._accumulateShadow(e),t.madeProgress(),i=!0;return i}renderAccumulation(e,t){return this._updateCamera(e.camera),this._bindParameters.contentCamera=e.contentCamera,e.depth?.retain(),this._bindParameters.depth?.release(),this._bindParameters.depth=e.depth,this._passParameters.origin=this._bindParameters.camera.center,this.notifyChange("canAccumulate"),!(!this.accumulating||!this.canAccumulate)&&(this._previewing||t?(this._clearFramebuffer(),this._reset()):this._clearBuffersOnAccumulationStart(),this._renderAreaMask(),this._accumulateSetsForRenderFrame(t))}_renderAreaMask(){const e=this._techniques.getCompiled(q),t=this._volumeVao,i=this._volumeVertexCount,r=this._fboHandle,s=this._analysisVolume;if(r?.detachDepth(),!e||!t||i<1||!r||!s)return;r.acquireDepth(14);const a=this._rctx,o=this._bindParameters,n=o.depth,h=this._tmpReadFbo;h.attachDepthStencil(n?.attachment),a.blitFramebuffer(h,r.fbo,256),h.detachDepthStencilTexture(),a.bindFramebuffer(r.fbo),a.setClearStencil(0),a.clear(1024),a.setViewport(0,0,o.camera.width,o.camera.height);const c=a.bindTechnique(e,o);this._maskParameters.origin=s.origin,c.bindDraw(o,M,this._maskParameters),a.bindVAO(t),a.drawArrays(H.TRIANGLES,0,i)}_clearBuffersOnAccumulationStart(){if([...this._accumulationSets()].every(e=>0===e.progress))this._clearFramebuffer();else for(const e of this._accumulationSets())0===e.progress&&this._clearFramebufferForSet(this._fboHandle,e)}_accumulateSetsForRenderFrame(e){let t=!1;for(const i of this._accumulationSets())this._accumulateSetForRenderFrame(i,e)&&(t=!0);return t&&this._requestRender(),t}_accumulateSetForRenderFrame(e,t){let i=t?e.sampleCount:Math.min(k,e.sampleCount);i-=e.progress;for(let r=0;r<i;++r)this._accumulateShadow(e);return i>0}precompilePrepass(){if(this.accumulating){for(const e of this._accumulationSets())this._techniques.precompile(R,e.configuration),this._techniques.precompile(P,e.configuration);this._techniques.precompile(q)}}precompile(){this._accumulationRenderer.precompile()}render(e){const t=this._fboHandle?.getAttachment(V);this._accumulationRenderer.render(e,t)}setParameters(e){void 0!==e.previewing&&(this._previewing=e.previewing),void 0!==e.lightDirections&&(this._primarySet.lightDirections=e.lightDirections),void 0!==e.lightDirectionsContext&&(this._contextSet.lightDirections=e.lightDirectionsContext),!0===e.enabled?this._enable():!1===e.enabled&&this._disable(),void 0!==e.analysisVolume&&(this._analysisVolume=e.analysisVolume),this._accumulationRenderer.setOptions(e)}readAccumulatedShadow(e,t){const i=this._primarySet.progress;return!this.active||!this._fboHandle||i<1||e<0||e>=this._fboHandle.fbo.width||t<0||t>=this._fboHandle.fbo.height?0:(this._fboHandle.fbo.readPixels(e,t,1,1,6408,T.UNSIGNED_BYTE,O),O[0]/i)}_numActiveChanged(){if(!this._enabled||!this._fboHandle)return;const e=2===this._numActive,{width:t,height:i}=this._fboHandle.fbo,r=this._createFBO(t,i);e&&(this._clearFramebuffer(r),this._contextSet.reset()),this._rctx.blitFramebuffer(this._fboHandle.fbo,r.fbo),this._fboHandle.dispose(),this._fboHandle=r,this._requestRender()}_enable(){this._enabled||(this._enabled=!0,this._invalidateAccumulationSets())}_disable(){this._enabled&&(this._fboHandle=a(this._fboHandle),this._enabled=!1,this._requestRender())}_createFBO(e,t){return this._fbos.acquire(e,t,"shadow accumulation",this._colorFormat)}_invalidateAccumulationSets(){for(const e of this._accumulationSets())e.reset();this._requestRenderIfEnabled()}_reset(){for(const e of this._accumulationSets())e.reset()}_clearFramebuffer(e=this._fboHandle){e&&(this._rctx.bindFramebuffer(e.fbo),this._rctx.setClearColor(0,0,0,0),this._rctx.clear(16384))}_clearFramebufferForSet(e,t){if(!e)return;const i=this._techniques.get(P,t.configuration);this._rctx.bindFramebuffer(e.fbo),this._rctx.bindTechnique(i,this._bindParameters,this._passParameters),this._rctx.bindVAO(this._vao),this._rctx.drawArrays(i.primitiveType,0,this._vao.vertexCount("geometry"))}_accumulateShadow(e){this._renderToShadowMap(this._bindParameters,e.lightDirections[e.progress++],this._depthRange);const t=this._techniques.get(R,e.configuration);this._rctx.bindFramebuffer(this._fboHandle?.fbo),this._rctx.bindTechnique(t,this._bindParameters,this._passParameters),this._rctx.bindVAO(this._vao),this._rctx.drawArrays(t.primitiveType,0,this._vao.vertexCount("geometry"))}_updateCamera(e){if(!this._enabled)return;const t=this._bindParameters.camera;e.equals(t)||t.copyFrom(e),this._fboHandle?.fbo.width===e.fullWidth&&this._fboHandle?.fbo.height===e.fullHeight||(this._fboHandle?.release(),this._fboHandle=this._createFBO(e.fullWidth,e.fullHeight)),this._opacityFromElevation=1-r(A,w,e.relativeElevation)}_requestRenderIfEnabled(){this._enabled&&this._requestRender()}get _rctx(){return this._fbos.rctx}updateDepthRange(e){this._depthRange.equals(e)||(this._depthRange=e)}get test(){}};e([c()],E.prototype,"_refining",null),e([c()],E.prototype,"active",null),e([c()],E.prototype,"canAccumulate",null),e([c()],E.prototype,"_doneAccumulating",null),e([c()],E.prototype,"_opacityFromElevation",null),e([c()],E.prototype,"_numActive",null),e([c()],E.prototype,"_colorFormat",null),e([c()],E.prototype,"readyToRun",null),e([c()],E.prototype,"_depthRange",void 0),e([c()],E.prototype,"_enabled",void 0),e([c()],E.prototype,"_previewing",void 0),e([c()],E.prototype,"_accumulationRenderer",void 0),E=e([u("esri.views.3d.webgl-engine.lib.ShadowAccumulator")],E);const k=6,O=new Uint8Array(4);class U{constructor(e,t){this.configuration=e,this._notifyChange=t,this._cachedLightDirections=[],this._progress=h(0),this._sampleCount=h(0)}get progress(){return this._progress.value}set progress(e){this._progress.value=e}get sampleCount(){return this._sampleCount.value}get doneAccumulating(){return this.progress>=this.sampleCount}get running(){return this.progress>0}get active(){return this.sampleCount>0}get lightDirections(){return this._cachedLightDirections}set lightDirections(e){const t=this._cachedLightDirections,r=Math.min(C,e.length);if(!i(t,0,t.length,e,0,r,m)){t.length=r,this._sampleCount.value=r;for(let i=0;i<r;++i)t[i]=l(t[i]??_(),e[i]);this.reset(),this._notifyChange()}}destroy(){this._cachedLightDirections.length=0,this._sampleCount.value=0}reset(){this.progress=0}precompile(e){e.precompile(R,this.configuration),e.precompile(P,this.configuration)}}export{E as ShadowAccumulator};
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import{sliceEquals as i}from"../../../../core/arrayUtils.js";import"../../../../core/has.js";import{smoothstep as r}from"../../../../core/mathUtils.js";import{releaseMaybe as s,disposeMaybe as a}from"../../../../core/maybe.js";import{watch as o,sync as n}from"../../../../core/reactiveUtils.js";import{signal as h}from"../../../../core/signal.js";import{property as c,subclass as u}from"../../../../core/accessorSupport/decorators.js";import{copy as l,equals as m}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as _}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{ReadShadowMapPassParameters as d}from"../core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{a as p}from"../../../../chunks/FocusAreaMask.glsl.js";import{volumeToVao as f}from"../effects/focusArea/focusAreaMaskUtils.js";import{BindParameters as g}from"./BindParameters.js";import{DepthRange as b}from"./DepthRange.js";import{createQuadVAO as v}from"./glUtil3D.js";import{ShadowCastRenderer as y,shadowCastDisabledElevationThreshold as S,shadowCastDisableElevationMax as w,shadowCastDisableElevationMin as A}from"./ShadowCastRenderer.js";import{ShadowMap as F}from"./ShadowMap.js";import{a as C}from"../../../../chunks/ShadowCastAccumulate.glsl.js";import{ShadowCastAccumulateTechnique as R}from"../shaders/ShadowCastAccumulateTechnique.js";import{ShadowCastAccumulateTechniqueConfiguration as x}from"../shaders/ShadowCastAccumulateTechniqueConfiguration.js";import{ShadowCastClearTechnique as P}from"../shaders/ShadowCastClearTechnique.js";import{ShadowCastMaskTechnique as q}from"../shaders/ShadowCastMaskTechnique.js";import{TaskPriority as j}from"../../../support/Scheduler.js";import{PrimitiveType as H,DepthStencilAttachment as V,PixelType as T}from"../../../webgl/enums.js";import{DisposableFramebufferObject as D}from"../../../webgl/FramebufferObject.js";import{noParameters as M}from"../../../webgl/NoParameters.js";let E=class extends t{constructor(e,t,i,r,a,h){super({}),this._fbos=e,this._techniques=t,this._stage=i,this._prepareForShadowMapPass=r,this._renderToShadowMap=a,this._requestRender=h,this._analysisVolumeGeometry=null,this._primarySet=new U(new x(0),()=>this._requestRenderIfEnabled()),this._contextSet=new U(new x(1),()=>this._requestRenderIfEnabled()),this._passParameters=new d,this._maskParameters=new p,this._volumeVao=null,this._volumeVertexCount=0,this._depthRange=b.Zero,this._enabled=!1,this._previewing=!1,this._shadowAccumulatorKey=Symbol("shadowAccumulator"),this._bindParameters=new g(e.rctx,new F(e,i.viewingMode)),this._bindParameters.shadowMap.enabled=!0,this._vao=v(e.rctx),this._accumulationRenderer=new y(e,t,this,h),this._tmpReadFbo=new D(e.rctx);const c=this._stage.view.resourceController.scheduler;this.addHandles([c.registerTask(j.SHADOW_ACCUMULATOR,this),o(()=>this._previewing,e=>{e?this._invalidateAccumulationSets():this._requestRenderIfEnabled()},n),o(()=>this._numActive,()=>this._numActiveChanged(),n),o(()=>this._depthRange,()=>this._invalidateAccumulationSets(),n),o(()=>this.readyToRun,e=>{e||(this._bindParameters.depth=s(this._bindParameters.depth),this.notifyChange("canAccumulate"))})],this._shadowAccumulatorKey)}destroy(){this._disable(),this.removeHandles(this._shadowAccumulatorKey),this._accumulationRenderer=a(this._accumulationRenderer),this._fboHandle=a(this._fboHandle),this._vao=a(this._vao),this._volumeVao=a(this._volumeVao),this._tmpReadFbo=a(this._tmpReadFbo),this._bindParameters.destroy();for(const e of this._accumulationSets())e.destroy();this._contextSet=null,this._primarySet=null}*_accumulationSets(){yield this._primarySet,yield this._contextSet}get computedSamples(){return[this._primarySet.progress,this._contextSet.progress]}get shadowCastTexture(){return this._fboHandle?.getTexture()}get accumulating(){return this.active&&this._previewing||this._refining}get _refining(){return this.active&&!this._doneAccumulating&&!this._previewing}get active(){return this._enabled&&[...this._accumulationSets()].some(e=>e.active)}get canAccumulate(){return null!=this._bindParameters.depth&&this._depthRange!==b.Zero&&this._opacityFromElevation>S}get _doneAccumulating(){return[...this._accumulationSets()].every(e=>e.doneAccumulating)}get _opacityFromElevation(){return this._accumulationRenderer.opacityFromElevation}set _opacityFromElevation(e){this._accumulationRenderer.opacityFromElevation=e}get _numActive(){return[...this._accumulationSets()].reduce((e,t)=>e+(t.active?1:0),0)}get _colorFormat(){return 2===this._numActive?2:0}get readyToRun(){return this._refining&&this.canAccumulate&&[...this._accumulationSets()].some(e=>e.running)}get _analysisVolume(){return this._analysisVolumeGeometry}set _analysisVolume(e){if(this._analysisVolumeGeometry===e)return;this._invalidateAccumulationSets(),this._analysisVolumeGeometry=e,this._volumeVao=a(this._volumeVao),this._volumeVertexCount=0;const t=null!=e;for(const a of this._accumulationSets())a.configuration.useMask=t;if(!t)return;const i=e.geometryVolume,{vao:r,vertexCount:s}=f(this._rctx,i);this._volumeVao=r,this._volumeVertexCount=s}runTask(e){this._clearBuffersOnAccumulationStart(),this._prepareForShadowMapPass(this._bindParameters);let t=!1;for(const i of this._accumulationSets())this._runTaskForSet(i,e)&&(t=!0);t&&this._requestRender()}_runTaskForSet(e,t){let i=!1;for(;!t.done&&!e.doneAccumulating;)this._accumulateShadow(e),t.madeProgress(),i=!0;return i}renderAccumulation(e,t){return this._updateCamera(e.camera),this._bindParameters.contentCamera=e.contentCamera,e.depth?.retain(),this._bindParameters.depth?.release(),this._bindParameters.depth=e.depth,this._passParameters.origin=this._bindParameters.camera.center,this.notifyChange("canAccumulate"),!(!this.accumulating||!this.canAccumulate)&&(this._previewing||t?(this._clearFramebuffer(),this._reset()):this._clearBuffersOnAccumulationStart(),this._renderAreaMask(),this._accumulateSetsForRenderFrame(t))}_renderAreaMask(){const e=this._techniques.getCompiled(q),t=this._volumeVao,i=this._volumeVertexCount,r=this._fboHandle,s=this._analysisVolume;if(r?.detachDepth(),!e||!t||i<1||!r||!s)return;r.acquireDepth(14);const a=this._rctx,o=this._bindParameters,n=o.depth,h=this._tmpReadFbo;h.attachDepthStencil(n?.attachment),a.blitFramebuffer(h,r.fbo,256),h.detachDepthStencilTexture(),a.bindFramebuffer(r.fbo),a.setClearStencil(0),a.clear(1024),a.setViewport(0,0,o.camera.width,o.camera.height);const c=a.bindTechnique(e,o,M);this._maskParameters.origin=s.origin,c.bindDraw(o,M,this._maskParameters),a.bindVAO(t),a.drawArrays(H.TRIANGLES,0,i)}_clearBuffersOnAccumulationStart(){if([...this._accumulationSets()].every(e=>0===e.progress))this._clearFramebuffer();else for(const e of this._accumulationSets())0===e.progress&&this._clearFramebufferForSet(this._fboHandle,e)}_accumulateSetsForRenderFrame(e){let t=!1;for(const i of this._accumulationSets())this._accumulateSetForRenderFrame(i,e)&&(t=!0);return t&&this._requestRender(),t}_accumulateSetForRenderFrame(e,t){let i=t?e.sampleCount:Math.min(k,e.sampleCount);i-=e.progress;for(let r=0;r<i;++r)this._accumulateShadow(e);return i>0}precompilePrepass(){if(this.accumulating){for(const e of this._accumulationSets())this._techniques.precompile(R,e.configuration),this._techniques.precompile(P,e.configuration);this._techniques.precompile(q)}}precompile(){this._accumulationRenderer.precompile()}render(e){const t=this._fboHandle?.getAttachment(V);this._accumulationRenderer.render(e,t)}setParameters(e){void 0!==e.previewing&&(this._previewing=e.previewing),void 0!==e.lightDirections&&(this._primarySet.lightDirections=e.lightDirections),void 0!==e.lightDirectionsContext&&(this._contextSet.lightDirections=e.lightDirectionsContext),!0===e.enabled?this._enable():!1===e.enabled&&this._disable(),void 0!==e.analysisVolume&&(this._analysisVolume=e.analysisVolume),this._accumulationRenderer.setOptions(e)}readAccumulatedShadow(e,t){const i=this._primarySet.progress;return!this.active||!this._fboHandle||i<1||e<0||e>=this._fboHandle.fbo.width||t<0||t>=this._fboHandle.fbo.height?0:(this._fboHandle.fbo.readPixels(e,t,1,1,6408,T.UNSIGNED_BYTE,O),O[0]/i)}_numActiveChanged(){if(!this._enabled||!this._fboHandle)return;const e=2===this._numActive,{width:t,height:i}=this._fboHandle.fbo,r=this._createFBO(t,i);e&&(this._clearFramebuffer(r),this._contextSet.reset()),this._rctx.blitFramebuffer(this._fboHandle.fbo,r.fbo),this._fboHandle.dispose(),this._fboHandle=r,this._requestRender()}_enable(){this._enabled||(this._enabled=!0,this._invalidateAccumulationSets())}_disable(){this._enabled&&(this._fboHandle=a(this._fboHandle),this._enabled=!1,this._requestRender())}_createFBO(e,t){return this._fbos.acquire(e,t,"shadow accumulation",this._colorFormat)}_invalidateAccumulationSets(){for(const e of this._accumulationSets())e.reset();this._requestRenderIfEnabled()}_reset(){for(const e of this._accumulationSets())e.reset()}_clearFramebuffer(e=this._fboHandle){e&&(this._rctx.bindFramebuffer(e.fbo),this._rctx.setClearColor(0,0,0,0),this._rctx.clear(16384))}_clearFramebufferForSet(e,t){if(!e)return;const i=this._techniques.get(P,t.configuration);this._rctx.bindFramebuffer(e.fbo),this._rctx.bindTechnique(i,this._bindParameters,this._passParameters),this._rctx.bindVAO(this._vao),this._rctx.drawArrays(i.primitiveType,0,this._vao.vertexCount("geometry"))}_accumulateShadow(e){this._renderToShadowMap(this._bindParameters,e.lightDirections[e.progress++],this._depthRange);const t=this._techniques.get(R,e.configuration);this._rctx.bindFramebuffer(this._fboHandle?.fbo),this._rctx.bindTechnique(t,this._bindParameters,this._passParameters),this._rctx.bindVAO(this._vao),this._rctx.drawArrays(t.primitiveType,0,this._vao.vertexCount("geometry"))}_updateCamera(e){if(!this._enabled)return;const t=this._bindParameters.camera;e.equals(t)||t.copyFrom(e),this._fboHandle?.fbo.width===e.fullWidth&&this._fboHandle?.fbo.height===e.fullHeight||(this._fboHandle?.release(),this._fboHandle=this._createFBO(e.fullWidth,e.fullHeight)),this._opacityFromElevation=1-r(A,w,e.relativeElevation)}_requestRenderIfEnabled(){this._enabled&&this._requestRender()}get _rctx(){return this._fbos.rctx}updateDepthRange(e){this._depthRange.equals(e)||(this._depthRange=e)}get test(){}};e([c()],E.prototype,"_refining",null),e([c()],E.prototype,"active",null),e([c()],E.prototype,"canAccumulate",null),e([c()],E.prototype,"_doneAccumulating",null),e([c()],E.prototype,"_opacityFromElevation",null),e([c()],E.prototype,"_numActive",null),e([c()],E.prototype,"_colorFormat",null),e([c()],E.prototype,"readyToRun",null),e([c()],E.prototype,"_depthRange",void 0),e([c()],E.prototype,"_enabled",void 0),e([c()],E.prototype,"_previewing",void 0),e([c()],E.prototype,"_accumulationRenderer",void 0),E=e([u("esri.views.3d.webgl-engine.lib.ShadowAccumulator")],E);const k=6,O=new Uint8Array(4);class U{constructor(e,t){this.configuration=e,this._notifyChange=t,this._cachedLightDirections=[],this._progress=h(0),this._sampleCount=h(0)}get progress(){return this._progress.value}set progress(e){this._progress.value=e}get sampleCount(){return this._sampleCount.value}get doneAccumulating(){return this.progress>=this.sampleCount}get running(){return this.progress>0}get active(){return this.sampleCount>0}get lightDirections(){return this._cachedLightDirections}set lightDirections(e){const t=this._cachedLightDirections,r=Math.min(C,e.length);if(!i(t,0,t.length,e,0,r,m)){t.length=r,this._sampleCount.value=r;for(let i=0;i<r;++i)t[i]=l(t[i]??_(),e[i]);this.reset(),this._notifyChange()}}destroy(){this._cachedLightDirections.length=0,this._sampleCount.value=0}reset(){this.progress=0}precompile(e){e.precompile(R,this.configuration),e.precompile(P,this.configuration)}}export{E as ShadowAccumulator};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{hasNativeFloat16Array as e}from"../../../../../geometry/support/float16.js";import{BufferViewMat3f as t,BufferViewVec3f as o,BufferViewFloat as
|
|
2
|
+
import{hasNativeFloat16Array as e}from"../../../../../geometry/support/float16.js";import{BufferViewMat3f as t,BufferViewVec3f as o,BufferViewFloat as n,BufferViewFloat16 as r,BufferViewVec2Snorm16 as f,BufferViewVec4Unorm8 as u,BufferViewUnorm8 as m,BufferViewVec4u8 as s,BufferViewUint8 as i}from"../../../../../geometry/support/buffer/BufferView.js";import{elementTypeSize as l}from"../../../../../geometry/support/buffer/types.js";class p{constructor(e,t,o){this.elementCount=e,this.elementType=t,this.bufferViewConstructor=o,this.byteSize=w(o)}}function w(e){return l(e.ElementType)*e.ElementCount}const a={u8:new p(1,"uint",i),vec4u8:new p(4,"uint",s),unorm8:new p(1,"float",m),vec4unorm8:new p(4,"float",u),vec2snorm16:new p(2,"float",f),f16:new p(1,"float",e?r:n),f32:new p(1,"float",n),vec3f32:new p(3,"float",o),mat3f32:new p(9,"float",t)};export{p as FieldCreationInfo,a as typeToCreationInfoMap};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import{newLayout as e}from"../../support/buffer/InterleavedLayout.js";import{olidEnabled as t}from"../effects/geometry/olidUtils.js";import{TextureBackedBufferLayout as r}from"../lib/TextureBackedBuffer/TextureBackedBufferLayout.js";function o(){const r=e().vec4f16("profileVertexAndNormal").u32("textureElementIndex",{integer:!0});return t()&&r.vec4u8("olidColor"),r.vec3f16("profileAuxData"),r.freeze()}function u(e){const t=[{type:"vec3f32",name:"position"},{type:"vec2snorm16",name:"profileRight"},{type:"vec2snorm16",name:"profileUp"}];return e.hasVVSize&&t.push({type:"f32",name:"sizeFeatureAttribute"}),e.hasVVColor&&t.push({type:"f32",name:"colorFeatureAttribute"}),e.hasVVOpacity&&t.push({type:"f32",name:"opacityFeatureAttribute"}),new r(t)}export{o as getLayout,u as getTextureLayout};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{clamp as
|
|
2
|
+
import{clamp as e}from"../../../../core/mathUtils.js";import{clone as t}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{fromValues as i}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as r}from"../../../../geometry/support/aaBoundingBox.js";import{BufferViewUint32 as s,BufferViewVec3f as o,BufferViewVec2Snorm16 as a,BufferViewFloat as n}from"../../../../geometry/support/buffer/BufferView.js";import{isShadowLike as u,is3DGeometry as h,isColor as p}from"../core/shaderLibrary/ShaderOutput.js";import c from"../lib/GLMaterial.js";import{isPathGeometry as f}from"../lib/PathGeometry.js";import{MeshIntersectionOptions as l,intersectAabbInvDir as m}from"../lib/RayIntersections.js";import{assert as d}from"../lib/Util.js";import{getLayout as g,getTextureLayout as b}from"./PathLayouts.js";import{PathPassParameters as S,PathTechnique as _}from"./PathTechnique.js";import{PathTechniqueConfiguration as w}from"./PathTechniqueConfiguration.js";import{TriangleMaterial as x}from"./TriangleMaterial.js";import{writeAttributes as y,writeTextureElementIndex as v,writePosition as j,writeBufferVec2 as V,writeBufferFloat as z}from"./internal/bufferWriterUtils.js";import{hasShadowHighlights as M}from"../shaders/ReceiveShadowsConfiguration.js";import{alphaCutoff as F}from"../../../../webscene/support/AlphaCutoff.js";class A extends x{constructor(e,t){super(e,B),this.supportsEdges=!0,this._pp0=i(0,0,1),this._pp1=i(0,0,0),this.produces=new Map([[2,e=>(this.parameters.castShadows&&u(e)||h(e))&&!this.transparent],[4,e=>(this.parameters.castShadows&&u(e)||h(e))&&this.transparent]]),this._configuration=new w(t.spherical)}get hasEmissions(){return this.parameters.emissiveStrength>0?this.transparent?2:1:0}updateConfiguration(e){super.updateConfiguration(e),this._configuration.hasVVSize=this.parameters.hasVVSize,this._configuration.hasVVColor=this.parameters.hasVVColor,this._configuration.hasVVOpacity=this.parameters.hasVVOpacity,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.transparent=this.transparent,this._configuration.hasOccludees=e.hasOccludees,p(e.output)?(this._configuration.doubleSidedMode=this.parameters.doubleSided&&"normal"===this.parameters.doubleSidedType?1:this.parameters.doubleSided&&"winding-order"===this.parameters.doubleSidedType?2:0,this._configuration.receiveShadows=e.shadowMap.enabled,this._configuration.hasShadowHighlights=M(this._configuration,e),this._configuration.receiveAmbientOcclusion=null!=e.ssao):this._configuration.receiveShadows=this._configuration.hasShadowHighlights=this._configuration.receiveAmbientOcclusion=!1,this._configuration.pbrMode=this.parameters.usePBR?2:0,this._configuration.emissionSource=this.parameters.usePBR?1:0,this._configuration.snowCover=e.snowCover>0}isVisibleForOutput(e){return 5!==e&&7!==e&&6!==e||this.parameters.castShadows}get visible(){return this.parameters.opacity>=F}intersect(e,t,i,r,s,o){this._intersect(e,i,r,s,o)}intersectDraped(e,t,i,r){return this._pp0[0]=this._pp1[0]=i[0],this._pp0[1]=this._pp1[1]=i[1],this._intersect(e,t,this._pp0,this._pp1,r)}_intersect(i,s,o,a,n){const u=i;if(!f(u))return;const h=u.path,p=t(this.parameters.size);if(this.parameters.vvSize){const{offset:t,factor:i,minSize:r,maxSize:s,fallback:o}=this.parameters.vvSize,a=h.sizeAttributeValue;Number.isNaN(a)?(p[0]*=o[0],p[1]*=o[2]):(p[0]*=e(t[0]+a*i[0],r[0],s[0]),p[1]*=e(t[2]+a*i[2],r[2],s[2]))}const c=new l(s.tolerance,!1,s.options.normalRequired),d=Math.max(p[0],p[1]),g=i.boundingInfo;if(null==g)return void O(h,p,o,a,c,n);const b=r(g.bbMin[0]-d,g.bbMin[1]-d,g.bbMin[2]-d,g.bbMax[0]+d,g.bbMax[1]+d,g.bbMax[2]+d),S=[a[0]-o[0],a[1]-o[1],a[2]-o[2]],_=Math.sqrt(S[0]*S[0]+S[1]*S[1]+S[2]*S[2]),w=[_/S[0],_/S[1],_/S[2]];m(b,o,w,s.tolerance)&&O(h,p,o,a,c,n)}createBufferWriter(){return new P(g(),b(this.parameters))}createGLMaterial(e){return new C(e)}get transparent(){const{parameters:e}=this;return e.drivenOpacity||e.opacity<1}}class C extends c{beginSlot(e){return this.getTechnique(_,e)}}function O(e,t,i,r,s,o){e.baked.size&&e.baked.size[0]===t[0]&&e.baked.size[1]===t[1]||e.baked.bake(t),e.baked.intersect(i,r,s,o)}class B extends S{constructor(){super(...arguments),this.doubleSided=!1,this.doubleSidedType="normal",this.polygonOffset=0,this.castShadows=!0,this.hasSlicePlane=!1,this.drivenOpacity=!1,this.usePBR=!1}}class P{constructor(e,t){this.layout=e,this.textureBufferLayout=t}elementCount(e){return e.get("profileVertexAndNormal")?.indices.length??0}elementCountTextureBuffer(e){return e.get("position")?.indices.length??0}write(e,t,i,r,u,h){d(null!=h,"Texture buffer is required for path material"),y(i,r,this.layout,e,t,u);const p=u.buffer.getField("textureElementIndex",s),c=i.get("textureElementIndex"),f=h.offset,l=h.textureBufferRange.from;p&&c&&v(c,p,u.offset,l);const m=h.buffer.getField("position",o),g=i.get("position");m&&g&&(d(3===g.size),j(g,e,m,f));const b=h.buffer.getField("profileRight",a),S=i.get("profileRight");b&&S&&(d(2===S.size),V(S,b,f));const _=h.buffer.getField("profileUp",a),w=i.get("profileUp");_&&w&&(d(2===w.size),V(w,_,f));const x=h.buffer.getField("sizeFeatureAttribute",n),M=i.get("sizeFeatureAttribute");x&&M&&z(M,x,f);const F=h.buffer.getField("opacityFeatureAttribute",n),A=i.get("opacityFeatureAttribute");F&&A&&z(A,F,f);const C=h.buffer.getField("colorFeatureAttribute",n),O=i.get("colorFeatureAttribute");C&&O&&z(O,C,f)}}export{B as Parameters,P as PathBufferWriter,A as PathMaterial};
|
|
@@ -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{freeze as t,create as
|
|
2
|
+
import{__decorate as e}from"tslib";import{subclass as r}from"../../../../core/accessorSupport/decorators.js";import{freeze as t,create as s,ZEROS as i}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{glLayout as o}from"../../support/buffer/glUtil.js";import{isOITColor as l}from"../core/shaderLibrary/ShaderOutput.js";import{PathVertexPositionPassParameters as n}from"../core/shaderLibrary/attributes/PathVertexPosition.glsl.js";import{ReloadableShader as m}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as a}from"../core/shaderTechnique/ShaderTechnique.js";import{depthTest as h,blending as c}from"../lib/OrderIndependentTransparency.js";import{stencilBaseAllZeros as p,stencilWriteMaskOn as u}from"../lib/StencilUtils.js";import{P as d}from"../../../../chunks/Path.glsl.js";import{getLayout as f}from"./PathLayouts.js";import{advancedMRRFactors as b}from"./pbrUtils.js";import{polygonOffset as g}from"./PolygonOffset.js";import{makePipelineState as j,defaultColorWrite as S,defaultDepthWrite as P,frontFaceCullingParams as y}from"../../../webgl/renderState.js";class T extends n{constructor(){super(...arguments),this.ambient=t(.2,.2,.2),this.diffuse=t(.8,.8,.8),this.opacity=1,this.origin=s(),this.modelTransformation=null,this.mrrFactors=b,this.emissiveStrengthFromSymbol=0,this.emissiveSource=1,this.emissiveBaseColor=i}get emissiveStrength(){return this.emissiveStrengthFromSymbol}}let v=class extends a{constructor(e,r){super(e,r,o(f())),this.shader=new m(d,()=>import("./Path.glsl.js"))}initializePipeline(e){const{output:r,transparent:t,hasSlicePlane:s,doubleSidedMode:i,hasOccludees:o}=e,n=!l(r);return j({blending:t?c(r):null,culling:s&&!t&&0!==i?y:null,depthTest:h(r),depthWrite:n?P:null,colorWrite:S,stencilWrite:o?u:null,stencilTest:o?p:null,polygonOffset:g(e)})}};v=e([r("esri.views.3d.webgl-engine.materials.PathTechnique")],v);export{T as PathPassParameters,v as PathTechnique};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{parameter as o}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{TriangleTechniqueConfiguration as t}from"./TriangleTechniqueConfiguration.js";class i extends t{constructor(e){super(),this.spherical=e,this.pbrMode=0,this.doubleSidedMode=0,this.emissionSource=0,this.receiveShadows=!1,this.hasShadowHighlights=!1,this.receiveAmbientOcclusion=!1,this.hasVVSize=!1,this.hasVVColor=!1,this.hasVVOpacity=!1,this.hasOccludees=!1,this.snowCover=!1,this.receiveGlobalIllumination=!1,this.textureCoordinateType=0,this.hasVVInstancing=!1,this.useCustomDTRExponentForWater=!1,this.useFillLights=!1,this.hasColorTexture=!1,this.hasMetallicRoughnessTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.draped=!1,this.overlayEnabled=!1}get discardInvisibleFragments(){return this.transparent}}e([o({count:7})],i.prototype,"pbrMode",void 0),e([o({count:3})],i.prototype,"doubleSidedMode",void 0),e([o({count:8})],i.prototype,"emissionSource",void 0),e([o()],i.prototype,"receiveShadows",void 0),e([o()],i.prototype,"hasShadowHighlights",void 0),e([o()],i.prototype,"receiveAmbientOcclusion",void 0),e([o()],i.prototype,"hasVVSize",void 0),e([o()],i.prototype,"hasVVColor",void 0),e([o()],i.prototype,"hasVVOpacity",void 0),e([o()],i.prototype,"hasOccludees",void 0),e([o()],i.prototype,"snowCover",void 0),e([o()],i.prototype,"receiveGlobalIllumination",void 0);export{i as PathTechniqueConfiguration};
|
|
2
|
+
import{__decorate as e}from"tslib";import{parameter as o}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{TriangleTechniqueConfiguration as t}from"./TriangleTechniqueConfiguration.js";class i extends t{constructor(e){super(),this.spherical=e,this.pbrMode=0,this.doubleSidedMode=0,this.emissionSource=0,this.receiveShadows=!1,this.hasShadowHighlights=!1,this.receiveAmbientOcclusion=!1,this.hasVVSize=!1,this.hasVVColor=!1,this.hasVVOpacity=!1,this.hasOccludees=!1,this.snowCover=!1,this.receiveGlobalIllumination=!1,this.supportNaN=!0,this.textureCoordinateType=0,this.hasVVInstancing=!1,this.useCustomDTRExponentForWater=!1,this.useFillLights=!1,this.hasColorTexture=!1,this.hasMetallicRoughnessTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.draped=!1,this.overlayEnabled=!1}get discardInvisibleFragments(){return this.transparent}}e([o({count:7})],i.prototype,"pbrMode",void 0),e([o({count:3})],i.prototype,"doubleSidedMode",void 0),e([o({count:8})],i.prototype,"emissionSource",void 0),e([o()],i.prototype,"receiveShadows",void 0),e([o()],i.prototype,"hasShadowHighlights",void 0),e([o()],i.prototype,"receiveAmbientOcclusion",void 0),e([o()],i.prototype,"hasVVSize",void 0),e([o()],i.prototype,"hasVVColor",void 0),e([o()],i.prototype,"hasVVOpacity",void 0),e([o()],i.prototype,"hasOccludees",void 0),e([o()],i.prototype,"snowCover",void 0),e([o()],i.prototype,"receiveGlobalIllumination",void 0);export{i as PathTechniqueConfiguration};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{IDENTITY as e}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{fromValues as t}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{BufferViewVec4f as r,BufferViewUint32 as s,BufferViewMat3f as i,BufferViewVec4u8 as o,BufferViewFloat as
|
|
2
|
+
import{IDENTITY as e}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{fromValues as t}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{BufferViewVec4f as r,BufferViewUint32 as s,BufferViewMat3f as i,BufferViewVec4u8 as o,BufferViewFloat as a}from"../../../../geometry/support/buffer/BufferView.js";import{isHighlightOrOLID as n,isColor as u,isDepth as f,isColorHighlightOrOLID as l}from"../core/shaderLibrary/ShaderOutput.js";import c from"../lib/GLMaterial.js";import{assert as h}from"../lib/Util.js";import{DefaultBufferWriter as p}from"./DefaultBufferWriter.js";import{TriangleMaterial as m}from"./TriangleMaterial.js";import{VisualVariablePassParameters as d}from"./VisualVariablePassParameters.js";import{writeAttributes as g,writeBufferVec4 as x,writeTextureElementIndex as b,writeConstTextureElementIndex as y,writeColor as j,writeVVFeatureAttribute as B}from"./internal/bufferWriterUtils.js";import{getLayout as w,getTextureLayout as C}from"../shaders/PatternLayouts.js";import{PatternTechnique as v}from"../shaders/PatternTechnique.js";import{PatternTechniqueConfiguration as F}from"../shaders/PatternTechniqueConfiguration.js";import{alphaCutoff as S}from"../../../../webscene/support/AlphaCutoff.js";class _ extends m{constructor(e){super(e,T),this._configuration=new F,this.supportsEdges=!0,this.transparent=!0,this.produces=new Map([[2,e=>n(e)],[4,e=>u(e)],[5,e=>f(e)],[18,e=>this.parameters.draped&&l(e)]])}updateConfiguration(e){super.updateConfiguration(e),this._configuration.cullFace=this.parameters.cullFace,this._configuration.hasVertexColors=this.parameters.hasVertexColors&&!this.parameters.vvColor,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.style=this.parameters.style,this._configuration.draped=this.parameters.draped,this._configuration.hasVVColor=!!this.parameters.vvColor,this._configuration.emissionSource=this.hasEmissions?1:0}get visible(){return this.parameters.color[3]>=S}get hasEmissions(){return this.parameters.emissiveStrength>0?2:0}createGLMaterial(e){return new P(e)}createBufferWriter(){return new V(w(this.parameters),C(this.parameters))}}class P extends c{beginSlot(e){return this.getTechnique(v,e)}}class V extends p{constructor(e,t){super(e),this.textureBufferLayout=t}elementCountTextureBuffer(e){return e.get("boundingRect")?.indices.length??0}write(e,t,i,o,a,n){const{buffer:u,offset:f}=a,l=n?.textureBufferRange;g(i,o,this.layout,e,t,a);for(const s of this.layout.fields.keys()){const e=i.get(s),t=e?.indices;if(e&&t)switch(s){case"uvMapSpace":{h(4===e.size);const t=u.getField(s,r);t&&x(e,t,f);break}}}const{textureBufferLayout:c}=this;if(null==c)return;h(null!=l,"Using a texture layout, but the texture range for this instance was not provided");const p=l.from,m=u.getField("textureElementIndex",s);h(null!=m,"Missing component index field");const d=i.get("position")?.indices.length??0,j=i.get("textureElementIndex");null!=j?b(j,m,f,p):y(m,f,p,d),this._writeTextureBuffer(e,i,n)}_writeTextureBuffer(t,r,s){const{textureBufferLayout:n}=this;if(null==n||null==s)return;const{buffer:u,offset:f}=s,l=u.getField("boundingRect",i),c=r.get("boundingRect");l&&c&&(h(9===c.size),L(c,t??e,l,f));const p=u.getField("color",o),m=r.get("color");p&&m&&(h(3===m.size||4===m.size),j(m,m.size,p,f));const d=u.getField("colorFeatureAttribute",a),g=r.get("colorFeatureAttribute");d&&g&&(h(1===g.size),B(g,d,f))}}function L(e,t,r,s){const{data:i,indices:o}=e,a=t,n=r.typedBuffer,u=r.typedBufferStride,f=o.length;s*=u;for(let l=0;l<f;++l){const e=9*o[l],t=i[e],r=i[e+1],f=i[e+2];n[s]=a[0]*t+a[4]*r+a[8]*f+a[12],n[s+1]=a[1]*t+a[5]*r+a[9]*f+a[13],n[s+2]=a[2]*t+a[6]*r+a[10]*f+a[14];for(let o=3;o<9;++o)n[s+o]=i[e+o];s+=u}}class T extends d{constructor(){super(...arguments),this.color=t(1,1,1,1),this.emissiveStrength=0,this.hasVertexColors=!1,this.polygonOffset=0,this.hasSlicePlane=!1,this.cullFace=0,this.hasOccludees=!1,this.style=2,this.draped=!0,this.useIndexing=!0}}export{T as Parameters,_ as PatternMaterial};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{subtract as e,length as t,scale as f}from"../../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as o}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{isOrthoNormal as r,hasIdentityRotation as i}from"../../../../../core/libs/gl-matrix-2/math/mat4.js";import{BufferViewVec4u8 as s,BufferViewVec3f16 as n,BufferViewVec3f as c,BufferViewVec4f16 as l,BufferViewVec4f as d,BufferViewFloat as u,BufferViewVec2i16 as a,BufferViewVec2f16 as p,BufferViewVec2f as g}from"../../../../../geometry/support/buffer/BufferView.js";import{assert as
|
|
2
|
+
import{subtract as e,length as t,scale as f}from"../../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as o}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{isOrthoNormal as r,hasIdentityRotation as i}from"../../../../../core/libs/gl-matrix-2/math/mat4.js";import{BufferViewVec4u8 as s,BufferViewVec3f16 as n,BufferViewVec3f as c,BufferViewVec4f16 as l,BufferViewVec4f as d,BufferViewFloat as u,BufferViewVec2i16 as a,BufferViewVec2f16 as p,BufferViewVec2f as g}from"../../../../../geometry/support/buffer/BufferView.js";import{assert as b}from"../../lib/Util.js";function y(e,t,f,o=1){const{data:r,indices:i}=e,s=t.typedBuffer,n=t.typedBufferStride,c=i.length;if(f*=n,1===o)for(let l=0;l<c;++l)s[f]=r[i[l]],f+=n;else for(let l=0;l<c;++l){const e=r[i[l]];for(let t=0;t<o;t++)s[f]=e,f+=n}}function B(e,t,f){const{data:o,indices:r}=e,i=t.typedBuffer,s=t.typedBufferStride,n=r.length;f*=s;for(let c=0;c<n;++c){const e=2*r[c];i[f]=o[e],i[f+1]=o[e+1],f+=s}}function h(e,t,f,o=1){const{data:r,indices:i}=e,s=t.typedBuffer,n=t.typedBufferStride,c=i.length;if(f*=n,1===o)for(let l=0;l<c;++l){const e=3*i[l];s[f]=r[e],s[f+1]=r[e+1],s[f+2]=r[e+2],f+=n}else for(let l=0;l<c;++l){const e=3*i[l];for(let t=0;t<o;++t)s[f]=r[e],s[f+1]=r[e+1],s[f+2]=r[e+2],f+=n}}function m(e,t,f,o=1){const{data:r,indices:i}=e,s=t.typedBuffer,n=t.typedBufferStride,c=i.length;if(f*=n,1===o)for(let l=0;l<c;++l){const e=4*i[l];s[f]=r[e],s[f+1]=r[e+1],s[f+2]=r[e+2],s[f+3]=r[e+3],f+=n}else for(let l=0;l<c;++l){const e=4*i[l];for(let t=0;t<o;++t)s[f]=r[e],s[f+1]=r[e+1],s[f+2]=r[e+2],s[f+3]=r[e+3],f+=n}}function F(e,t,f){const o=e.typedBuffer,r=e.typedBufferStride,i=e.elementCount;t*=r;for(let s=0;s<f;++s){for(let e=0;e<i;++e)o[t+e]=0;t+=r}}function v(e,t,f){const{data:o,indices:r}=e,i=t.typedBuffer,s=t.typedBufferStride,n=r.length;f*=s;for(let c=0;c<n;++c){const e=9*r[c];for(let t=0;t<9;++t)i[f+t]=o[e+t];f+=s}}function z(e,t,f){const{data:o,indices:r}=e,i=t.typedBuffer,s=t.typedBufferStride,n=r.length;f*=s;for(let c=0;c<n;++c){const e=16*r[c];for(let t=0;t<16;++t)i[f+t]=o[e+t];f+=s}}function w(e,t,f,o,r=1){if(!t)return void h(e,f,o,r);const{data:s,indices:n}=e,c=f.typedBuffer,l=f.typedBufferStride,d=n.length,u=t[0],a=t[1],p=t[2],g=t[4],b=t[5],y=t[6],B=t[8],m=t[9],F=t[10],v=t[12],z=t[13],w=t[14];o*=l;let S=0,k=0,N=0;const $=i(t)?e=>{S=s[e]+v,k=s[e+1]+z,N=s[e+2]+w}:e=>{const t=s[e],f=s[e+1],o=s[e+2];S=u*t+g*f+B*o+v,k=a*t+b*f+m*o+z,N=p*t+y*f+F*o+w};if(1===r)for(let i=0;i<d;++i)$(3*n[i]),c[o]=S,c[o+1]=k,c[o+2]=N,o+=l;else for(let i=0;i<d;++i){$(3*n[i]);for(let e=0;e<r;++e)c[o]=S,c[o+1]=k,c[o+2]=N,o+=l}}function S(e,t,f,o,s=1){if(!t)return void h(e,f,o,s);const{data:n,indices:c}=e,l=t,d=f.typedBuffer,u=f.typedBufferStride,a=c.length,p=l[0],g=l[1],b=l[2],y=l[4],B=l[5],m=l[6],F=l[8],v=l[9],z=l[10],w=!r(l),S=1e-6,k=1-S;o*=u;let N=0,$=0,x=0;const A=i(l)?e=>{N=n[e],$=n[e+1],x=n[e+2]}:e=>{const t=n[e],f=n[e+1],o=n[e+2];N=p*t+y*f+F*o,$=g*t+B*f+v*o,x=b*t+m*f+z*o};if(1===s)if(w)for(let r=0;r<a;++r){A(3*c[r]);const e=N*N+$*$+x*x;if(e<k&&e>S){const t=1/Math.sqrt(e);d[o]=N*t,d[o+1]=$*t,d[o+2]=x*t}else d[o]=N,d[o+1]=$,d[o+2]=x;o+=u}else for(let r=0;r<a;++r)A(3*c[r]),d[o]=N,d[o+1]=$,d[o+2]=x,o+=u;else for(let r=0;r<a;++r){if(A(3*c[r]),w){const e=N*N+$*$+x*x;if(e<k&&e>S){const t=1/Math.sqrt(e);N*=t,$*=t,x*=t}}for(let e=0;e<s;++e)d[o]=N,d[o+1]=$,d[o+2]=x,o+=u}}function k(e,t,f,o,i=1){if(!t)return void m(e,f,o,i);const{data:s,indices:n}=e,c=t,l=f.typedBuffer,d=f.typedBufferStride,u=n.length,a=c[0],p=c[1],g=c[2],b=c[4],y=c[5],B=c[6],h=c[8],F=c[9],v=c[10],z=!r(c),w=1e-6,S=1-w;if(o*=d,1===i)for(let r=0;r<u;++r){const e=4*n[r],t=s[e],f=s[e+1],i=s[e+2],c=s[e+3];let u=a*t+b*f+h*i,m=p*t+y*f+F*i,k=g*t+B*f+v*i;if(z){const e=u*u+m*m+k*k;if(e<S&&e>w){const t=1/Math.sqrt(e);u*=t,m*=t,k*=t}}l[o]=u,l[o+1]=m,l[o+2]=k,l[o+3]=c,o+=d}else for(let r=0;r<u;++r){const e=4*n[r],t=s[e],f=s[e+1],c=s[e+2],u=s[e+3];let m=a*t+b*f+h*c,k=p*t+y*f+F*c,N=g*t+B*f+v*c;if(z){const e=m*m+k*k+N*N;if(e<S&&e>w){const t=1/Math.sqrt(e);m*=t,k*=t,N*=t}}for(let r=0;r<i;++r)l[o]=m,l[o+1]=k,l[o+2]=N,l[o+3]=u,o+=d}}function N(e,t,f,o,r=1){const{data:i,indices:s}=e,n=f.typedBuffer,c=f.typedBufferStride,l=s.length;if(o*=c,t===i.length&&4===t){n[o]=i[0],n[o+1]=i[1],n[o+2]=i[2],n[o+3]=i[3];const e=new Uint32Array(f.typedBuffer.buffer,f.start),t=c/4,s=e[o/=4];o+=t;const d=l*r;for(let f=1;f<d;++f)e[o]=s,o+=t;return}if(1!==r)if(4!==t)for(let d=0;d<l;++d){const e=3*s[d];for(let t=0;t<r;++t)n[o]=i[e],n[o+1]=i[e+1],n[o+2]=i[e+2],n[o+3]=255,o+=c}else for(let d=0;d<l;++d){const e=4*s[d];for(let t=0;t<r;++t)n[o]=i[e],n[o+1]=i[e+1],n[o+2]=i[e+2],n[o+3]=i[e+3],o+=c}else{if(4===t){for(let e=0;e<l;++e){const t=4*s[e];n[o]=i[t],n[o+1]=i[t+1],n[o+2]=i[t+2],n[o+3]=i[t+3],o+=c}return}for(let e=0;e<l;++e){const t=3*s[e];n[o]=i[t],n[o+1]=i[t+1],n[o+2]=i[t+2],n[o+3]=255,o+=c}}}function $(e,t,f){const{data:o,indices:r}=e,i=t.typedBuffer,s=t.typedBufferStride,n=r.length,c=o[0];f*=s;for(let l=0;l<n;++l)i[f]=c,f+=s}function x(o,r,i,s){e(A,o,r);const n=Math.max(Math.sqrt(t(A)),1e-4);f(A,A,1/n),i[s++]=A[0],i[s++]=A[1],i[s++]=A[2],i[s++]=n}const A=o();function M(e,t,f,o,r=1){const i=t.typedBuffer,s=t.typedBufferStride;if(o*=s,1===r)for(let n=0;n<f;++n)i[o]=e[0],i[o+1]=e[1],i[o+2]=e[2],i[o+3]=e[3],o+=s;else for(let n=0;n<f;++n)for(let t=0;t<r;++t)i[o]=e[0],i[o+1]=e[1],i[o+2]=e[2],i[o+3]=e[3],o+=s}function j(e,t,f,o,r,i){const{buffer:n,offset:c}=i;for(const l of f.fields.keys()){const f=e.get(l),i=f?.indices;if(f&&i)q(l,f,o,r,n,c);else if("olidColor"===l&&null!=t){const f=e.get("position")?.indices;if(f){const e=f.length;M(t,n.getField(l,s),e,c)}}}}function q(e,t,f,o,r,i){switch(e){case"position":{b(3===t.size);const o=r.getField(e,c);b(!!o,`No buffer view for ${e}`),w(t,f,o,i);break}case"normal":{b(3===t.size);const f=r.getField(e,c);b(!!f,`No buffer view for ${e}`),S(t,o,f,i);break}case"normalCompressed":case"profileRight":case"profileUp":{b(2===t.size);const f=r.getField(e,a);b(!!f,`No buffer view for ${e}`),B(t,f,i);break}case"uv0":{b(2===t.size);const f=r.getField(e,p)??r.getField(e,g);b(!!f,`No buffer view for ${e}`),B(t,f,i);break}case"uvi":{b(2===t.size);const f=r.getField(e,a);b(!!f,`No buffer view for ${e}`),B(t,f,i);break}case"color":case"symbolColor":{const f=r.getField(e,s);b(!!f,`No buffer view for ${e}`),b(3===t.size||4===t.size),N(t,t.size,f,i);break}case"colorFeatureAttribute":case"opacityFeatureAttribute":case"sizeFeatureAttribute":{const f=r.getField(e,u)??r.getField(e,u);b(!!f,`No buffer view for ${e}`),b(1===t.size),$(t,f,i);break}case"tangent":{b(4===t.size);const o=r.getField(e,d);b(!!o,`No buffer view for ${e}`),k(t,f,o,i);break}case"profileVertexAndNormal":{b(4===t.size);const f=r.getField(e,l)??r.getField(e,d);b(!!f,`No buffer view for ${e}`),m(t,f,i);break}case"profileAuxData":{b(3===t.size);const f=r.getField(e,n)??r.getField(e,c);b(!!f,`No buffer view for ${e}`),h(t,f,i);break}}}function C(e,t,f,o){const{data:r,stride:i,size:s,indices:n}=e;b(1===s,"Index should be 1D");const c=n.length;for(let l=0;l<c;++l){const e=r[i*n[l]];t.set(f+l,o+e)}}function U(e,t,f,o){for(let r=0;r<o;++r)e.set(t+r,f)}export{q as writeAttribute,j as writeAttributes,y as writeBufferFloat,v as writeBufferMat3f,z as writeBufferMat4f,B as writeBufferVec2,h as writeBufferVec3,m as writeBufferVec4,F as writeBufferZeros,N as writeColor,U as writeConstTextureElementIndex,x as writeDeltaF16Vector,S as writeNormal,M as writeOlidColor,w as writePosition,k as writeTangent,C as writeTextureElementIndex,$ as writeVVFeatureAttribute};
|
|
@@ -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"../../../../../core/has.js";import{disposeMaybe as i}from"../../../../../core/maybe.js";import{property as s,subclass as r}from"../../../../../core/accessorSupport/decorators.js";import{GLMaterialLoader as a}from"../../lib/GLMaterialLoader.js";import{assert as n}from"../../lib/Util.js";import{DrawParameters as o}from"../DrawParameters.js";import{getStrideForDataType as l}from"./IndexLayout.js";import{defaultHighlightName as h}from"../../../../support/HighlightDefaults.js";let d=class extends e{constructor(t){super(t),this._glMaterialLoader=null,this._drawParameters=new o,this._highlightNames=new Set,this._produces=new Map}initialize(){this._updateProduces()}destroy(){this.uninitializeRenderContext()}get _hasHighlights(){return this._highlightNames.size>0}hasHighlight(t){return this._highlightNames.has(t)}get produces(){return this._produces}_updateProduces(){this.material.produces.forEach((t,e)=>{this._produces.set(e,e=>!(0===this.dataByBaseInstance.size||!(10!==e&&6!==e||this._hasHighlights))&&t(e))})}initializeRenderContext(t){this._glMaterialLoader=new a(this.material,t.materials)}uninitializeRenderContext(){this._glMaterialLoader=i(this._glMaterialLoader)}acquireTechniques(t){if(!this.material.shouldRender(t))return null;const{output:e,bind:i}=t,s=this.material.produces.get(i.slot);if(!s?.(e))return null;const{highlight:r,slot:a}=i,n=6===e,o=10===e,l=o||n,d=r?.name;if(l&&(0===this._highlightNames.size||o&&d&&!this._highlightNames.has(d)))return null;const u=t=>o&&!!d&&!t.has(d),c=7===e,
|
|
2
|
+
import{__decorate as t}from"tslib";import e from"../../../../../core/Accessor.js";import"../../../../../core/has.js";import{disposeMaybe as i}from"../../../../../core/maybe.js";import{property as s,subclass as r}from"../../../../../core/accessorSupport/decorators.js";import{GLMaterialLoader as a}from"../../lib/GLMaterialLoader.js";import{assert as n}from"../../lib/Util.js";import{DrawParameters as o}from"../DrawParameters.js";import{getStrideForDataType as l}from"./IndexLayout.js";import{defaultHighlightName as h}from"../../../../support/HighlightDefaults.js";let d=class extends e{constructor(t){super(t),this._glMaterialLoader=null,this._drawParameters=new o,this._highlightNames=new Set,this._produces=new Map}initialize(){this._updateProduces()}destroy(){this.uninitializeRenderContext()}get _hasHighlights(){return this._highlightNames.size>0}hasHighlight(t){return this._highlightNames.has(t)}get produces(){return this._produces}_updateProduces(){this.material.produces.forEach((t,e)=>{this._produces.set(e,e=>!(0===this.dataByBaseInstance.size||!(10!==e&&6!==e||this._hasHighlights))&&t(e))})}initializeRenderContext(t){this._glMaterialLoader=new a(this.material,t.materials)}uninitializeRenderContext(){this._glMaterialLoader=i(this._glMaterialLoader)}acquireTechniques(t){if(!this.material.shouldRender(t))return null;const{output:e,bind:i}=t,s=this.material.produces.get(i.slot);if(!s?.(e))return null;const{highlight:r,slot:a}=i,n=6===e,o=10===e,l=o||n,d=r?.name;if(l&&(0===this._highlightNames.size||o&&d&&!this._highlightNames.has(d)))return null;const u=t=>o&&!!d&&!t.has(d),c=7===e,m=!(l||c);for(const g of this.dataByBaseInstance.values())for(const s of g.dataByOrigin.values())for(const r of s.buffers){if(u(r.highlightNames))continue;const s=n?r.drawCommandsHighlights.get(h):l?d?r.drawCommandsHighlights.get(d):r.drawCommandsHighlights.size>0:((c&&r.needsMultipleCommands?r.drawCommandsShadowHighlightRest:r.drawCommandsDefault)||null)?.length??!1,o=m&&r.drawCommandsOccludees||null;if(s||o?.length){const s=this._glMaterialLoader.load(t.rctx,a,e),r=s?.beginSlot(i);if(r)return r}}return null}render(t,e){const{output:i,bind:s}=t,{highlight:r}=s,a=10===i,o=r?.name??"";if(a&&!r)return;const l=6===i,d=a||l,p=7===i,w=!(d||p),{rctx:_}=t,C=_.bindTechnique(e,s,this.material.parameters),x=this.material.useIndexing;for(const B of this.dataByBaseInstance.values()){const{baseInstanceData:t}=B,i=null!=t;n(!(i&&x),"Instanced indexed rendering is not supported");const r=i?f:x?g:m,H=i?c:u;for(const n of B.dataByOrigin.values()){this._drawParameters.origin=n.origin;for(const i of n.buffers){if(a&&(!i.hasHighlights||!i.drawCommandsHighlights.has(o)))continue;if(l&&(!i.hasHighlights||!i.drawCommandsHighlights.has(h)))continue;this._drawParameters.textureBuffer=i.textureBuffer?.texture;const n=H(i),u=y(n,i.needsMultipleCommands,o,l,d,p),c=b(n,w);(u?.length||c?.length)&&(C.bindDraw(s,this.material.parameters,this._drawParameters),r(_,i,t,e,u,c,s,this.material.parameters)),this._drawParameters.textureBuffer=null}}}}updateHighlights(){const{_highlightNames:t}=this;t.clear();for(const e of this.dataByBaseInstance.values())for(const i of e.dataByOrigin.values())for(const e of i.buffers)for(const i of e.highlightNames)t.add(i);this._updateProduces()}get test(){}};t([s({constructOnly:!0})],d.prototype,"material",void 0),t([s({constructOnly:!0})],d.prototype,"dataByBaseInstance",void 0),d=t([r("esri.views.3d.webgl-engine.materials.renderers.VaoRenderer")],d);const u=t=>t,c=t=>t.instancedCommandVAOs,m=(t,{vao:e},i,s,r,a,n,o)=>{s.ensureAttributeLocations(e),t.bindVAO(e),p(t,s,r,n,o,!1),p(t,s,a,n,o,!0)},g=(t,{vao:e},i,s,r,a,o,l)=>{s.ensureAttributeLocations(e),t.bindVAO(e);const h=e.indexBuffer?.indexType;n(null!=h,"Missing index array"),w(t,s,r,o,l,!1,h),w(t,s,a,o,l,!0,h)},f=(t,e,{baseCommand:i},s,r,a,n,o)=>{_(t,s,i,r,n,o,!1),_(t,s,i,a,n,o,!0)};function p(t,e,i,s,r,a){if(i?.length){t.setPipelineState(e.getPipeline(s,r,a));for(const s of i)t.drawArrays(e.primitiveType,s.first,s.count)}}function w(t,e,i,s,r,a,n){if(!i?.length)return;const o=l(n);t.setPipelineState(e.getPipeline(s,r,a));for(const l of i)t.drawElements(e.primitiveType,l.count,n,l.first*o)}function _(t,e,{first:i,count:s},r,a,n,o){if(r?.length){t.setPipelineState(e.getPipeline(a,n,o));for(const{vao:a,instanceCount:n}of r)e.ensureAttributeLocations(a),t.bindVAO(a),t.drawArraysInstanced(e.primitiveType,i,s,n)}}function y(t,e,i,s,r,a){const n=r&&!s?t.drawCommandsHighlights.get(i)??null:null;return s?t.drawCommandsHighlights.get(h):r?n:a&&e?t.drawCommandsShadowHighlightRest:t.drawCommandsDefault}function b(t,e){return e&&t.drawCommandsOccludees||null}export{d as VaoRenderer};
|
|
@@ -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{toConst as r}from"../../../../core/compilerUtils.js";import{unpackFloatRGBA as s}from"../../../../core/floatRGBA.js";import has from"../../../../core/has.js";import i from"../../../../core/Logger.js";import{removeMaybe as n,destroyMaybe as o}from"../../../../core/maybe.js";import{when as a,initial as h,watch as l,syncAndInitial as d}from"../../../../core/reactiveUtils.js";import{addFrameTask as c}from"../../../../core/scheduling.js";import{Milliseconds as p}from"../../../../core/time.js";import{property as m,subclass as u}from"../../../../core/accessorSupport/decorators.js";import{isMoon as f,isMars as g}from"../../../../geometry/ellipsoidUtils.js";import{ComponentObjectCollection as w}from"../collections/Component/ComponentObjectCollection.js";import{ShaderTechniqueConstructionContext as _}from"../core/shaderTechnique/ShaderTechniqueConstructionContext.js";import{ShaderTechniqueRepository as v}from"../core/shaderTechnique/ShaderTechniqueRepository.js";import{ChapmanAtmosphere as x}from"../effects/atmosphere/ChapmanAtmosphere.js";import{LocalAtmosphere as j}from"../effects/atmosphere/LocalAtmosphere.js";import{MarsAtmosphere as y}from"../effects/atmosphere/MarsAtmosphere.js";import{CloudsComposition as R}from"../effects/clouds/CloudsComposition.js";import{Fog as b}from"../effects/fog/Fog.js";import{ObjectAndLayerIDRenderNode as A}from"../effects/geometry/ObjectAndLayerIDRenderNode.js";import{olidEnabled as C}from"../effects/geometry/olidUtils.js";import{RenderOccludedRenderNode as S}from"../effects/geometry/RenderOccludedRenderNode.js";import{GlobalIllumination as T}from"../effects/globalIllumination/GlobalIllumination.js";import{Glow as O}from"../effects/glow/Glow.js";import{Haze as U}from"../effects/haze/Haze.js";import{Highlight as q}from"../effects/highlight/Highlight.js";import{ShadowHighlight as M}from"../effects/highlight/ShadowHighlight.js";import{ShadowHighlightBuffer as L}from"../effects/highlight/ShadowHighlightBuffer.js";import{Magnifier as D}from"../effects/magnifier/Magnifier.js";import{SMAA as k}from"../effects/smaa/SMAA.js";import{SSAO as F}from"../effects/ssao/SSAO.js";import{Stars as W}from"../effects/stars/Stars.js";import{GLMaterialRepository as B}from"../lib/GLMaterialRepository.js";import{ObjectAndLayerIdRenderHelper as H}from"../lib/ObjectAndLayerIdRenderHelper.js";import{Renderer as E}from"../lib/Renderer.js";import{RenderingContext as I}from"../lib/RenderingContext.js";import{RenderingContextOptions as G}from"../lib/RenderingContextOptions.js";import{TextureRepository as N}from"../lib/TextureRepository.js";import{createMarkerTextureRepository as P}from"../materials/markerTextureRepository.js";import{createStippleTextureRepository as z}from"../materials/stippleTextureRepository.js";import{WaterTextureRepository as V}from"../materials/internal/WaterTextureRepository.js";import{getContextCache as X}from"./contextCache.js";import{removeLoadedShaderModules as Q}from"./renderUtils.js";import{ScreenshotManager as J,ScreenshotContext as K}from"./ScreenshotManager.js";import{contextCache as Y}from"./testUtils.js";import{noBudget as Z}from"../../../support/Scheduler.js";import{checkWebGLError as $}from"../../../webgl/checkWebGLError.js";let ee=class extends t{constructor(e,t){super(e),this.olidRenderHelper=C()?new H:null,this.waterTextures=new V,this._needsUpdate=!0,this._needsRender=!0,this._idleSuspend=!0,this._needsWaterReflectionUpdate=!1,this._lastAnimationUpdate=0,this.glow=null,this.fog=null,this.globalIllumination=null,this.test=null,this._initializeContext(t);const{memoryController:r}=t.view.resourceController;this.stippleTextures=z(this._rctx,r),this.markerTextures=P(this._rctx,r),this.techniques=new v(new _(this._rctx,this.stippleTextures,this.waterTextures,this.markerTextures)),this.textures=new N(t),this.addHandles(this.textures.events.on("changed",e=>this.requestRender(e)));const s=new B(this.textures,this.techniques,()=>this.requestRender(),()=>this.requestRender());this.renderer=new E(t,s,this.techniques,this._rctx,e=>this.requestRender(e)),this.addHandles([a(()=>t.view.ready,()=>this._createRenderNodes(),h),l(()=>this.waterTextures.updating,()=>this.requestRender(),h),l(()=>t.view.qualityProfile,e=>this.renderer?.updateRenderFeatures(e),d)]);const i={renderScene:(e,t,r,s)=>this.renderer.render(e,t,r,s),requestRenderScene:e=>this.requestRender(e),prepareOverlay:()=>t.options.screenshot.prepareOverlay(),renderOverlay:(e,r,s)=>t.options.screenshot.renderOverlay(e,r,s)};this._screenshotManager=new J(this._rctx,i,e=>t.view.overlayManager.updateOverlays(Z,e.camera,0)),this._registerFrameTask(t)}destroy(){const e=this.stage?.container;e?.contains(this._canvas)&&e.removeChild(this._canvas),this._frameTask=n(this._frameTask),this.techniques.destroy(),this._componentObjectCollection=o(this._componentObjectCollection),this._screenshotManager.destroy(),this.renderer.destroy(),this.textures.destroy(),this.waterTextures.destroy(),this.markerTextures.destroy(),this.stippleTextures.destroy(),this._canvas=null,this._rctx=o(this._rctx),this.test?.destroy()}_createRenderNodes(){const{view:e,viewingMode:t}=this.stage;new W({view:e}),f(e.spatialReference)||(this.glow=new O({view:e}),2===t?new j({view:e}):g(e.spatialReference)?new y({view:e}):(new x({view:e}),new R({view:e}),new U({view:e}),this.fog=new b({view:e}))),has("global-illumination")?this.globalIllumination=new T({view:e}):new F({view:e}),new k({view:e,isEnabled:()=>this.renderer.hasSMAA}),new D({view:e}),new q({view:e}),new L({view:e}),new M({view:e,viewingMode:t}),new S({view:e}),C()&&new A({view:e})}requestRender(e=1){switch(e){case 2:this.view.state.fading=!0;case 1:this._needsUpdate=!0;case 0:this._needsRender=!0}}get updating(){return this._needsUpdate||this._needsWaterReflectionUpdate||this.renderer.updating||this.textures.updating||this.waterTextures.updating}setIdleSuspend(e){this._idleSuspend!==e&&(this._idleSuspend=e,this.requestRender())}get renderingContext(){return this._rctx}get capabilities(){return this._rctx.capabilities}get canvas(){return this._canvas}takeScreenshot(e){return this._screenshotManager.takeScreenshot(r(e))}getAlpha(){return!!this._rctx.contextAttributes.alpha}getMinimalDepthForArea(e,t,r,i,n,o=n){const a=i.constrainWindowSize(t,r,n*i.pixelRatio,o*i.pixelRatio),h=this._ensureLinearDepthArrayBuffer(a);this.renderer.readMainDepth(a,h);const l=(e,t,r)=>s(t,e)*(r[1]-r[0])+r[0];let d=Number.MAX_VALUE;for(let s=0;s<a[2]*a[3];s++){const e=l(4*s,h,i.nearFar);d>e&&e!==i.nearFar[0]&&e!==i.nearFar[1]&&(d=e)}if(e){const s=e.pickDepth(t*i.pixelRatio,r*i.pixelRatio,i);null!=s&&d>s&&s!==i.nearFar[0]&&s!==i.nearFar[1]&&(d=s)}return d===Number.MAX_VALUE?void 0:d}_ensureLinearDepthArrayBuffer(e){const t=4*e[2]*e[3];return(null==this._tmpDepthBuffer||this._tmpDepthBuffer.byteLength<t)&&(this._tmpDepthBuffer=new Uint8Array(t)),this._tmpDepthBuffer}async reloadShaders(){Q(),await this.techniques.reloadAll(),this.renderer.overlay?.reloadShaders(),this.requestRender()}_registerFrameTask(e){const t=e.view.state;let r=!1,s=0,i=!1;const n={preRender:({time:i})=>{r=this.updating,s=this._needsUpdate?1:0,this._needsRender&&this.renderer.updateSceneDepthRange(t.camera),e.commitSyncLayers(),i=this.test?.time??i;const n=p(i-this._lastAnimationUpdate);this.view.state.animationsEnabled&&(n>this.renderer.animationTimestep||r||this._needsRender)&&(this.renderer.updateAnimation(t,i)&&this.requestRender(0),this._lastAnimationUpdate=i)},render:({time:e})=>{if((this._needsRender||!this._idleSuspend||!this.renderer.isCameraFinal||this._needsWaterReflectionUpdate)&&t.camera.fullWidth>0&&t.camera.fullHeight>0){const r=this._needsUpdate&&this._idleSuspend&&this.renderer.isCameraFinal;this._needsRender=!1,this._needsUpdate=!1,this._needsWaterReflectionUpdate=!1,e=this.test?.time??e,this.renderer.render(t,e,0),i=!0,r&&this.renderer.hasReflections&&(this.requestRender(0),this._needsWaterReflectionUpdate=!0)}},update:({time:e})=>{this.view.state.animationsEnabled&&this.textures.update();const r=new K(t,this.renderer.fboCache);e=this.test?.time??e,this._screenshotManager.update(r,e)},finish:()=>{i&&(this.renderer.finish(2===t.mode?s:1),i=!1)}};this._frameTask=c(n)}_initializeContext(e){const{options:t}=e,r=t.canvas??document.createElement("canvas");r.setAttribute("style","width: 100%; height:100%; display:block;"),this._canvas=r;const s={alpha:t.alpha||!1,premultipliedAlpha:!0,antialias:!1,depth:!0,stencil:t.stencil??!0,powerPreference:"high-performance",preserveDrawingBuffer:t.preserveDrawingBuffer??!1},n=r.getContext("webgl2",s);if(null==n)return void i.getLogger(this).error("A WebGL2 context could not be created.");$(n,!0),this._rctx=te(n,e),this._loadShaderOnlyExtensions(),!t.alpha&&this._rctx.contextAttributes.alpha&&i.getLogger(this).error("WebGL context has alpha channel even though no alpha channel was requested");const{container:o}=e;!this._rctx.contextAttributes.alpha&&has("safari")>=11&&(o.style.backgroundColor="black"),o.contains(r)||o.appendChild(r)}_loadShaderOnlyExtensions(){this._rctx.capabilities.enable("textureFloatLinear")}get _viewingMode(){return this.stage.viewingMode}get stage(){return this.view.stage}getObjectAndLayerIdColor(e){return this.olidRenderHelper?.getObjectAndLayerIdColor(e)}get componentObjectCollection(){return this._componentObjectCollection??=new w(this.renderer.renderPassManager,this._viewingMode,this.view.spatialReference.isWebMercator),this._componentObjectCollection}updateQualitySettings(e){null!=this.test?.time&&null!=e.fadeDuration&&(this.test.savedFadeDuration=e.fadeDuration,e.fadeDuration=p(0)),this._rctx.updateOptions({maxPreferredTexturePixels:this.view.qualitySettings.maxTexturePixels})}};function te(e,t){const r=new G(t);if(Y.enabled){let t=re.get(e);return 1===t?.refCount?(t.configure(r),t.ref(),t):(t=new I(e,r),re.set(e,t),t.ref(),t)}return new I(e,r)}e([m({type:Boolean,readOnly:!0})],ee.prototype,"updating",null),e([m({constructOnly:!0})],ee.prototype,"view",void 0),e([m({readOnly:!0})],ee.prototype,"componentObjectCollection",null),e([m()],ee.prototype,"_componentObjectCollection",void 0),e([m()],ee.prototype,"_needsUpdate",void 0),e([m()],ee.prototype,"_needsWaterReflectionUpdate",void 0),ee=e([u("esri.views.3d.webgl-engine.parts.RenderView")],ee);const re=X();export{ee as RenderView};
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import{toConst as r}from"../../../../core/compilerUtils.js";import{unpackFloatRGBA as s}from"../../../../core/floatRGBA.js";import has from"../../../../core/has.js";import i from"../../../../core/Logger.js";import{removeMaybe as n,destroyMaybe as o}from"../../../../core/maybe.js";import{when as a,initial as h,watch as l,syncAndInitial as d}from"../../../../core/reactiveUtils.js";import{addFrameTask as c}from"../../../../core/scheduling.js";import{Milliseconds as p}from"../../../../core/time.js";import{property as m,subclass as u}from"../../../../core/accessorSupport/decorators.js";import{isMoon as f,isMars as g}from"../../../../geometry/ellipsoidUtils.js";import{ComponentObjectCollection as w}from"../collections/Component/ComponentObjectCollection.js";import{ShaderTechniqueConstructionContext as _}from"../core/shaderTechnique/ShaderTechniqueConstructionContext.js";import{ShaderTechniqueRepository as v}from"../core/shaderTechnique/ShaderTechniqueRepository.js";import{ChapmanAtmosphere as x}from"../effects/atmosphere/ChapmanAtmosphere.js";import{LocalAtmosphere as j}from"../effects/atmosphere/LocalAtmosphere.js";import{MarsAtmosphere as y}from"../effects/atmosphere/MarsAtmosphere.js";import{CloudsComposition as R}from"../effects/clouds/CloudsComposition.js";import{Fog as b}from"../effects/fog/Fog.js";import{ObjectAndLayerIDRenderNode as A}from"../effects/geometry/ObjectAndLayerIDRenderNode.js";import{olidEnabled as C}from"../effects/geometry/olidUtils.js";import{RenderOccludedRenderNode as S}from"../effects/geometry/RenderOccludedRenderNode.js";import{GlobalIllumination as T}from"../effects/globalIllumination/GlobalIllumination.js";import{Glow as O}from"../effects/glow/Glow.js";import{Haze as U}from"../effects/haze/Haze.js";import{Highlight as q}from"../effects/highlight/Highlight.js";import{ShadowHighlight as M}from"../effects/highlight/ShadowHighlight.js";import{ShadowHighlightBuffer as L}from"../effects/highlight/ShadowHighlightBuffer.js";import{Magnifier as D}from"../effects/magnifier/Magnifier.js";import{SMAA as k}from"../effects/smaa/SMAA.js";import{SSAO as F}from"../effects/ssao/SSAO.js";import{Stars as W}from"../effects/stars/Stars.js";import{GLMaterialRepository as B}from"../lib/GLMaterialRepository.js";import{ObjectAndLayerIdRenderHelper as H}from"../lib/ObjectAndLayerIdRenderHelper.js";import{Renderer as E}from"../lib/Renderer.js";import{RenderingContext as I}from"../lib/RenderingContext.js";import{RenderingContextOptions as G}from"../lib/RenderingContextOptions.js";import{TextureRepository as N}from"../lib/TextureRepository.js";import{createMarkerTextureRepository as P}from"../materials/markerTextureRepository.js";import{createStippleTextureRepository as z}from"../materials/stippleTextureRepository.js";import{WaterTextureRepository as V}from"../materials/internal/WaterTextureRepository.js";import{getContextCache as X}from"./contextCache.js";import{removeLoadedShaderModules as Q}from"./renderUtils.js";import{ScreenshotManager as J,ScreenshotContext as K}from"./ScreenshotManager.js";import{contextCache as Y}from"./testUtils.js";import{noBudget as Z}from"../../../support/Scheduler.js";import{checkWebGLError as $}from"../../../webgl/checkWebGLError.js";let ee=class extends t{constructor(e,t){super(e),this.olidRenderHelper=C()?new H:null,this.waterTextures=new V,this._needsUpdate=!0,this._needsRender=!0,this._idleSuspend=!0,this._needsWaterReflectionUpdate=!1,this._lastAnimationUpdate=0,this.glow=null,this.fog=null,this.globalIllumination=null,this.test=null,this._initializeContext(t);const{memoryController:r}=t.view.resourceController;this.stippleTextures=z(this._rctx,r),this.markerTextures=P(this._rctx,r),this.techniques=new v(new _(this._rctx,this.stippleTextures,this.waterTextures,this.markerTextures)),this.textures=new N(t),this.addHandles(this.textures.events.on("changed",e=>this.requestRender(e)));const s=new B(this.textures,this.techniques,()=>this.requestRender(),()=>this.requestRender());this.renderer=new E(t,s,this.techniques,this._rctx,e=>this.requestRender(e)),this.addHandles([a(()=>t.view.ready,()=>this._createRenderNodes(),h),l(()=>this.waterTextures.updating,()=>this.requestRender(),h),l(()=>t.view.qualityProfile,e=>this.renderer?.updateRenderFeatures(e),d)]);const i={renderScene:(e,t,r,s)=>(this.renderer.setTime(t),this.renderer.render(e,r,s)),requestRenderScene:e=>this.requestRender(e),prepareOverlay:()=>t.options.screenshot.prepareOverlay(),renderOverlay:(e,r,s)=>t.options.screenshot.renderOverlay(e,r,s)};this._screenshotManager=new J(this._rctx,i,e=>t.view.overlayManager.updateOverlays(Z,e.camera,0)),this._registerFrameTask(t)}destroy(){const e=this.stage?.container;e?.contains(this._canvas)&&e.removeChild(this._canvas),this._frameTask=n(this._frameTask),this.techniques.destroy(),this._componentObjectCollection=o(this._componentObjectCollection),this._screenshotManager.destroy(),this.renderer.destroy(),this.textures.destroy(),this.waterTextures.destroy(),this.markerTextures.destroy(),this.stippleTextures.destroy(),this._canvas=null,this._rctx=o(this._rctx),this.test?.destroy()}_createRenderNodes(){const{view:e,viewingMode:t}=this.stage;new W({view:e}),f(e.spatialReference)||(this.glow=new O({view:e}),2===t?new j({view:e}):g(e.spatialReference)?new y({view:e}):(new x({view:e}),new R({view:e}),new U({view:e}),this.fog=new b({view:e}))),has("global-illumination")?this.globalIllumination=new T({view:e}):new F({view:e}),new k({view:e,isEnabled:()=>this.renderer.hasSMAA}),new D({view:e}),new q({view:e}),new L({view:e}),new M({view:e,viewingMode:t}),new S({view:e}),C()&&new A({view:e})}requestRender(e=1){switch(e){case 2:this.view.state.fading=!0;case 1:this._needsUpdate=!0;case 0:this._needsRender=!0}}get updating(){return this._needsUpdate||this._needsWaterReflectionUpdate||this.renderer.updating||this.textures.updating||this.waterTextures.updating}setIdleSuspend(e){this._idleSuspend!==e&&(this._idleSuspend=e,this.requestRender())}get renderingContext(){return this._rctx}get capabilities(){return this._rctx.capabilities}get canvas(){return this._canvas}takeScreenshot(e){return this._screenshotManager.takeScreenshot(r(e))}getAlpha(){return!!this._rctx.contextAttributes.alpha}getMinimalDepthForArea(e,t,r,i,n,o=n){const a=i.constrainWindowSize(t,r,n*i.pixelRatio,o*i.pixelRatio),h=this._ensureLinearDepthArrayBuffer(a);this.renderer.readMainDepth(a,h);const l=(e,t,r)=>s(t,e)*(r[1]-r[0])+r[0];let d=Number.MAX_VALUE;for(let s=0;s<a[2]*a[3];s++){const e=l(4*s,h,i.nearFar);d>e&&e!==i.nearFar[0]&&e!==i.nearFar[1]&&(d=e)}if(e){const s=e.pickDepth(t*i.pixelRatio,r*i.pixelRatio,i);null!=s&&d>s&&s!==i.nearFar[0]&&s!==i.nearFar[1]&&(d=s)}return d===Number.MAX_VALUE?void 0:d}_ensureLinearDepthArrayBuffer(e){const t=4*e[2]*e[3];return(null==this._tmpDepthBuffer||this._tmpDepthBuffer.byteLength<t)&&(this._tmpDepthBuffer=new Uint8Array(t)),this._tmpDepthBuffer}async reloadShaders(){Q(),await this.techniques.reloadAll(),this.renderer.overlay?.reloadShaders(),this.requestRender()}_registerFrameTask(e){const t=e.view.state;let r=!1,s=0,i=!1;const n={preRender:({time:i})=>{r=this.updating,s=this._needsUpdate?1:0,this._needsRender&&this.renderer.updateSceneDepthRange(t.camera),e.commitSyncLayers(),i=this.test?.time??i;const n=p(i-this._lastAnimationUpdate);this.view.state.animationsEnabled&&(n>this.renderer.animationTimestep||r||this._needsRender)&&(this.renderer.updateAnimation(t,i)&&this.requestRender(0),this._lastAnimationUpdate=i)},render:({time:e})=>{if(e=this.test?.time??e,this.renderer.setTime(e),(this._needsRender||!this._idleSuspend||!this.renderer.isCameraFinal||this._needsWaterReflectionUpdate)&&t.camera.fullWidth>0&&t.camera.fullHeight>0){const e=this._needsUpdate&&this._idleSuspend&&this.renderer.isCameraFinal;this._needsRender=!1,this._needsUpdate=!1,this._needsWaterReflectionUpdate=!1,this.renderer.render(t,0),i=!0,e&&this.renderer.hasReflections&&(this.requestRender(0),this._needsWaterReflectionUpdate=!0)}},update:({time:e})=>{this.view.state.animationsEnabled&&this.textures.update();const r=new K(t,this.renderer.fboCache);e=this.test?.time??e,this._screenshotManager.update(r,e)},finish:()=>{i&&(this.renderer.finish(2===t.mode?s:1),i=!1)}};this._frameTask=c(n)}_initializeContext(e){const{options:t}=e,r=t.canvas??document.createElement("canvas");r.setAttribute("style","width: 100%; height:100%; display:block;"),this._canvas=r;const s={alpha:t.alpha||!1,premultipliedAlpha:!0,antialias:!1,depth:!0,stencil:t.stencil??!0,powerPreference:"high-performance",preserveDrawingBuffer:t.preserveDrawingBuffer??!1},n=r.getContext("webgl2",s);if(null==n)return void i.getLogger(this).error("A WebGL2 context could not be created.");$(n,!0),this._rctx=te(n,e),this._loadShaderOnlyExtensions(),!t.alpha&&this._rctx.contextAttributes.alpha&&i.getLogger(this).error("WebGL context has alpha channel even though no alpha channel was requested");const{container:o}=e;!this._rctx.contextAttributes.alpha&&has("safari")>=11&&(o.style.backgroundColor="black"),o.contains(r)||o.appendChild(r)}_loadShaderOnlyExtensions(){this._rctx.capabilities.enable("textureFloatLinear")}get _viewingMode(){return this.stage.viewingMode}get stage(){return this.view.stage}getObjectAndLayerIdColor(e){return this.olidRenderHelper?.getObjectAndLayerIdColor(e)}get componentObjectCollection(){return this._componentObjectCollection??=new w(this.renderer.renderPassManager,this._viewingMode,this.view.spatialReference.isWebMercator),this._componentObjectCollection}updateQualitySettings(e){null!=this.test?.time&&null!=e.fadeDuration&&(this.test.savedFadeDuration=e.fadeDuration,e.fadeDuration=p(0)),this._rctx.updateOptions({maxPreferredTexturePixels:this.view.qualitySettings.maxTexturePixels})}};function te(e,t){const r=new G(t);if(Y.enabled){let t=re.get(e);return 1===t?.refCount?(t.configure(r),t.ref(),t):(t=new I(e,r),re.set(e,t),t.ref(),t)}return new I(e,r)}e([m({type:Boolean,readOnly:!0})],ee.prototype,"updating",null),e([m({constructOnly:!0})],ee.prototype,"view",void 0),e([m({readOnly:!0})],ee.prototype,"componentObjectCollection",null),e([m()],ee.prototype,"_componentObjectCollection",void 0),e([m()],ee.prototype,"_needsUpdate",void 0),e([m()],ee.prototype,"_needsWaterReflectionUpdate",void 0),ee=e([u("esri.views.3d.webgl-engine.parts.RenderView")],ee);const re=X();export{ee as RenderView};
|
|
@@ -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{ZEROS as t}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{glLayout as i}from"../../support/buffer/glUtil.js";import{newLayout as o}from"../../support/buffer/InterleavedLayout.js";import{ReloadableShader as s}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as l}from"../core/shaderTechnique/ShaderTechnique.js";import{olidEnabled as n}from"../effects/geometry/olidUtils.js";import{depthWrite as a,depthTest as c,blending as p}from"../lib/OrderIndependentTransparency.js";import{stencilToolMaskBase as m,stencilBaseAllZeros as u,stencilWriteMaskOn as f}from"../lib/StencilUtils.js";import{polygonOffset as d}from"../materials/PolygonOffset.js";import{VisualVariablePassParameters as h}from"../materials/VisualVariablePassParameters.js";import{C as g}from"../../../../chunks/ColorMaterial.glsl.js";import{makePipelineState as j,defaultColorWrite as b,cullingParams as P}from"../../../webgl/renderState.js";class C extends h{constructor(){super(...arguments),this.color=t}}let S=class extends l{constructor(e,r){super(e,r,i(T(r))),this.shader=new s(g,()=>import("./ColorMaterial.glsl.js")),this.ignoreUnused=!0}_createPipeline(e,r){const{output:t,transparent:i,cullFace:o,draped:s,hasOccludees:l}=e;return j({blending:i?p(t,!1,e.emissionDimmingPass):null,culling:P(o),depthTest:s?null:c(t),depthWrite:a(e),colorWrite:b,stencilWrite:l?f:null,stencilTest:l?r?m:u:null,polygonOffset:d(e)})}initializePipeline(e){return this._occludeePipelineState=this._createPipeline(e,!0),this._createPipeline(e,!1)}getPipeline(e,r){return
|
|
2
|
+
import{__decorate as e}from"tslib";import{subclass as r}from"../../../../core/accessorSupport/decorators.js";import{ZEROS as t}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{glLayout as i}from"../../support/buffer/glUtil.js";import{newLayout as o}from"../../support/buffer/InterleavedLayout.js";import{ReloadableShader as s}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as l}from"../core/shaderTechnique/ShaderTechnique.js";import{olidEnabled as n}from"../effects/geometry/olidUtils.js";import{depthWrite as a,depthTest as c,blending as p}from"../lib/OrderIndependentTransparency.js";import{stencilToolMaskBase as m,stencilBaseAllZeros as u,stencilWriteMaskOn as f}from"../lib/StencilUtils.js";import{polygonOffset as d}from"../materials/PolygonOffset.js";import{VisualVariablePassParameters as h}from"../materials/VisualVariablePassParameters.js";import{C as g}from"../../../../chunks/ColorMaterial.glsl.js";import{makePipelineState as j,defaultColorWrite as b,cullingParams as P}from"../../../webgl/renderState.js";class C extends h{constructor(){super(...arguments),this.color=t}}let S=class extends l{constructor(e,r){super(e,r,i(T(r))),this.shader=new s(g,()=>import("./ColorMaterial.glsl.js")),this.ignoreUnused=!0}_createPipeline(e,r){const{output:t,transparent:i,cullFace:o,draped:s,hasOccludees:l}=e;return j({blending:i?p(t,!1,e.emissionDimmingPass):null,culling:P(o),depthTest:s?null:c(t),depthWrite:a(e),colorWrite:b,stencilWrite:l?f:null,stencilTest:l?r?m:u:null,polygonOffset:d(e)})}initializePipeline(e){return this._occludeePipelineState=this._createPipeline(e,!0),this._createPipeline(e,!1)}getPipeline(e,r,t){return t?this._occludeePipelineState:super.getPipeline(e,r)}};function T(e){const r=o().vec3f("position");return n()&&r.vec4u8("olidColor"),e.hasVVColor?r.f32("colorFeatureAttribute"):e.hasVertexColors&&r.vec4u8("color",{glNormalized:!0}),r.freeze()}S=e([r("esri.views.3d.webgl-engine.shaders.ColorMaterialTechnique")],S);export{C as ColorMaterialPassParameters,S as ColorMaterialTechnique,T as getLayout};
|
|
@@ -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 o}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as
|
|
2
|
+
import{__decorate as e}from"tslib";import{subclass as r}from"../../../../core/accessorSupport/decorators.js";import{ReloadableShader as o}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as s}from"../core/shaderTechnique/ShaderTechnique.js";import{C as i}from"../../../../chunks/Compositing.glsl.js";import{makePipelineState as t,defaultColorWrite as c,premultipliedAlpha as n,unpremultipliedAlphaToPremultipliedAlpha as a}from"../../../webgl/renderState.js";let l=class extends s{constructor(){super(...arguments),this.shader=new o(i,()=>import("./Compositing.glsl.js"))}initializePipeline(e){switch(e.mode){case 0:case 3:return t({colorWrite:c});case 1:return t({blending:a,colorWrite:c});default:e.mode;case 2:case 4:return t({blending:n,colorWrite:c})}}};l=e([r("esri.views.3d.webgl-engine.shaders.CompositingTechnique")],l);export{l as CompositingTechnique};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{ShaderTechniqueConfiguration as o,parameter as i}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";class t extends o{constructor(){super(...arguments),this.
|
|
2
|
+
import{__decorate as e}from"tslib";import{ShaderTechniqueConfiguration as o,parameter as i}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";class t extends o{constructor(){super(...arguments),this.mode=0,this.blendEmissive=!1}}e([i({count:4})],t.prototype,"mode",void 0),e([i()],t.prototype,"blendEmissive",void 0);export{t as CompositingTechniqueConfiguration};
|
|
@@ -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 t}from"../../../../core/accessorSupport/decorators.js";import{ZEROS as i,freeze as s,create as r}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as o}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{glLayout as l}from"../../support/buffer/glUtil.js";import{newLayout as n}from"../../support/buffer/InterleavedLayout.js";import{VertexNormalPassParameters as a,VertexNormalDrawParameters as c}from"../core/shaderLibrary/attributes/VertexNormal.glsl.js";import{ReloadableShader as h}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as u}from"../core/shaderTechnique/ShaderTechnique.js";import{olidEnabled as m}from"../effects/geometry/olidUtils.js";import{depthWrite as p,blending as d,depthTest as f}from"../lib/OrderIndependentTransparency.js";import{stencilToolMaskBase as g,stencilBaseAllZeros as v,stencilWriteMaskOn as b}from"../lib/StencilUtils.js";import{getRenderInstanceDataLayout as S}from"../lib/lodRendering/RenderInstanceData.js";import{advancedMRRFactors as y}from"../materials/pbrUtils.js";import{polygonOffset as j}from"../materials/PolygonOffset.js";import{D as P}from"../../../../chunks/DefaultMaterial.glsl.js";import{makePipelineState as T,cullingParams as x,defaultColorWrite as C}from"../../../webgl/renderState.js";import{alphaCutoff as O}from"../../../../webscene/support/AlphaCutoff.js";class D extends a{constructor(){super(...arguments),this.isSchematic=!1,this.usePBR=!1,this.mrrFactors=y,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.doubleSided=!1,this.doubleSidedType="normal",this.cullFace=2,this.instanced=!1,this.instancedFeatureAttribute=!1,this.instancedColor=!1,this.instanceColorEncodesAlphaIgnore=!1,this.emissiveStrengthFromSymbol=0,this.emissiveStrengthKHR=1,this.emissiveSource=1,this.emissiveBaseColor=i,this.instancedDoublePrecision=!1,this.normalType=0,this.receiveShadows=!0,this.receiveAmbientOcclusion=!0,this.castShadows=!0,this.ambient=s(.2,.2,.2),this.diffuse=s(.8,.8,.8),this.externalColor=o(1,1,1,1),this.colorMixMode="multiply",this.opacity=1,this.layerOpacity=1,this.origin=r(),this.hasSlicePlane=!1,this.offsetTransparentBackfaces=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.modelTransformation=null,this.drivenOpacity=!1,this.writeDepth=!0,this.customDepthTest=0,this.textureAlphaMode=0,this.textureAlphaCutoff=O,this.textureAlphaPremultiplied=!1,this.renderOccluded=1,this.testsTransparentRenderOrder=0,this.isDecoration=!1}get hasVVSize(){return!!this.vvSize}get hasVVColor(){return!!this.vvColor}get hasVVOpacity(){return!!this.vvOpacity}}class V extends c{constructor(){super(...arguments),this.origin=r(),this.slicePlaneLocalOrigin=this.origin}}let w=class extends u{constructor(e,t){let i=l(z(t));t.instanced&&t.instancedDoublePrecision&&(i=i.concat(l(S(t)))),super(e,t,i),this.shader=new h(P,()=>import("./DefaultMaterial.glsl.js")),this.ignoreUnused=!0}_makePipeline(e,t){const{output:i,transparent:s,cullFace:r,customDepthTest:o,hasOccludees:l}=e;return T({blending:s?d(i,!1,e.emissionDimmingPass):null,culling:M(e)?x(r):null,depthTest:f(i,A(o)),depthWrite:p(e),colorWrite:C,stencilWrite:l?b:null,stencilTest:l?t?g:v:null,polygonOffset:j(e)})}initializePipeline(e){return this._occludeePipelineState=this._makePipeline(e,!0),this._makePipeline(e,!1)}getPipeline(e,t){return
|
|
2
|
+
import{__decorate as e}from"tslib";import{subclass as t}from"../../../../core/accessorSupport/decorators.js";import{ZEROS as i,freeze as s,create as r}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as o}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{glLayout as l}from"../../support/buffer/glUtil.js";import{newLayout as n}from"../../support/buffer/InterleavedLayout.js";import{VertexNormalPassParameters as a,VertexNormalDrawParameters as c}from"../core/shaderLibrary/attributes/VertexNormal.glsl.js";import{ReloadableShader as h}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as u}from"../core/shaderTechnique/ShaderTechnique.js";import{olidEnabled as m}from"../effects/geometry/olidUtils.js";import{depthWrite as p,blending as d,depthTest as f}from"../lib/OrderIndependentTransparency.js";import{stencilToolMaskBase as g,stencilBaseAllZeros as v,stencilWriteMaskOn as b}from"../lib/StencilUtils.js";import{getRenderInstanceDataLayout as S}from"../lib/lodRendering/RenderInstanceData.js";import{advancedMRRFactors as y}from"../materials/pbrUtils.js";import{polygonOffset as j}from"../materials/PolygonOffset.js";import{D as P}from"../../../../chunks/DefaultMaterial.glsl.js";import{makePipelineState as T,cullingParams as x,defaultColorWrite as C}from"../../../webgl/renderState.js";import{alphaCutoff as O}from"../../../../webscene/support/AlphaCutoff.js";class D extends a{constructor(){super(...arguments),this.isSchematic=!1,this.usePBR=!1,this.mrrFactors=y,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.doubleSided=!1,this.doubleSidedType="normal",this.cullFace=2,this.instanced=!1,this.instancedFeatureAttribute=!1,this.instancedColor=!1,this.instanceColorEncodesAlphaIgnore=!1,this.emissiveStrengthFromSymbol=0,this.emissiveStrengthKHR=1,this.emissiveSource=1,this.emissiveBaseColor=i,this.instancedDoublePrecision=!1,this.normalType=0,this.receiveShadows=!0,this.receiveAmbientOcclusion=!0,this.castShadows=!0,this.ambient=s(.2,.2,.2),this.diffuse=s(.8,.8,.8),this.externalColor=o(1,1,1,1),this.colorMixMode="multiply",this.opacity=1,this.layerOpacity=1,this.origin=r(),this.hasSlicePlane=!1,this.offsetTransparentBackfaces=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.modelTransformation=null,this.drivenOpacity=!1,this.writeDepth=!0,this.customDepthTest=0,this.textureAlphaMode=0,this.textureAlphaCutoff=O,this.textureAlphaPremultiplied=!1,this.renderOccluded=1,this.testsTransparentRenderOrder=0,this.isDecoration=!1}get hasVVSize(){return!!this.vvSize}get hasVVColor(){return!!this.vvColor}get hasVVOpacity(){return!!this.vvOpacity}}class V extends c{constructor(){super(...arguments),this.origin=r(),this.slicePlaneLocalOrigin=this.origin}}let w=class extends u{constructor(e,t){let i=l(z(t));t.instanced&&t.instancedDoublePrecision&&(i=i.concat(l(S(t)))),super(e,t,i),this.shader=new h(P,()=>import("./DefaultMaterial.glsl.js")),this.ignoreUnused=!0}_makePipeline(e,t){const{output:i,transparent:s,cullFace:r,customDepthTest:o,hasOccludees:l}=e;return T({blending:s?d(i,!1,e.emissionDimmingPass):null,culling:M(e)?x(r):null,depthTest:f(i,A(o)),depthWrite:p(e),colorWrite:C,stencilWrite:l?b:null,stencilTest:l?t?g:v:null,polygonOffset:j(e)})}initializePipeline(e){return this._occludeePipelineState=this._makePipeline(e,!0),this._makePipeline(e,!1)}getPipeline(e,t,i){return i?this._occludeePipelineState:super.getPipeline(e,t,i)}};function A(e){switch(e){case 1:return 515;case 0:case 3:return 513;case 2:return 516}}function M(e){return 0!==e.cullFace||!e.hasSlicePlane&&(!e.transparent&&!e.doubleSidedMode)}function z(e){const t=n().vec3f("position");return 1===e.normalType?t.vec2i16("normalCompressed",{glNormalized:!0}):t.vec3f("normal"),e.hasVertexTangents&&t.vec4f("tangent"),e.hasTextures&&t.vec2f16("uv0"),e.hasVertexColors&&t.vec4u8("color",{glNormalized:!0}),e.hasSymbolColors&&t.vec4u8("symbolColor"),!e.instanced&&m()&&t.vec4u8("olidColor"),t}w=e([t("esri.views.3d.webgl-engine.shaders.DefaultMaterialTechnique")],w);export{V as DefaultMaterialDrawParameters,D as DefaultMaterialPassParameters,w as DefaultMaterialTechnique,z as getLayout};
|
|
@@ -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 t}from"../../../../core/accessorSupport/decorators.js";import{glLayout as i}from"../../support/buffer/glUtil.js";import{ReloadableShader as r}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as s}from"../core/shaderTechnique/ShaderTechnique.js";import{depthWrite as l,depthTest as o,blending as n}from"../lib/OrderIndependentTransparency.js";import{stencilToolMaskBase as a,stencilBaseAllZeros as p,stencilWriteMaskOn as c}from"../lib/StencilUtils.js";import{PositionUvLayout as m}from"../materials/DefaultLayouts.js";import{polygonOffset as u}from"../materials/PolygonOffset.js";import{I as d}from"../../../../chunks/ImageMaterial.glsl.js";import{makePipelineState as f,defaultColorWrite as g,cullingParams as h}from"../../../webgl/renderState.js";let j=class extends s{constructor(e,t){super(e,t,i(P(t))),this.shader=new r(d,()=>import("./ImageMaterial.glsl.js")),this.ignoreUnused=!0}_getPipelineState(e,t){const{output:i,hasOccludees:r,cullFace:s}=e;return f({blending:n(i,!0,e.emissionDimmingPass),culling:h(s),depthTest:o(i),depthWrite:l(e),colorWrite:g,stencilWrite:r?c:null,stencilTest:r?t?a:p:null,polygonOffset:u(e)})}initializePipeline(e){return this._occludeePipeline=this._getPipelineState(e,!0),this._getPipelineState(e,!1)}getPipeline(e,t){return
|
|
2
|
+
import{__decorate as e}from"tslib";import{subclass as t}from"../../../../core/accessorSupport/decorators.js";import{glLayout as i}from"../../support/buffer/glUtil.js";import{ReloadableShader as r}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as s}from"../core/shaderTechnique/ShaderTechnique.js";import{depthWrite as l,depthTest as o,blending as n}from"../lib/OrderIndependentTransparency.js";import{stencilToolMaskBase as a,stencilBaseAllZeros as p,stencilWriteMaskOn as c}from"../lib/StencilUtils.js";import{PositionUvLayout as m}from"../materials/DefaultLayouts.js";import{polygonOffset as u}from"../materials/PolygonOffset.js";import{I as d}from"../../../../chunks/ImageMaterial.glsl.js";import{makePipelineState as f,defaultColorWrite as g,cullingParams as h}from"../../../webgl/renderState.js";let j=class extends s{constructor(e,t){super(e,t,i(P(t))),this.shader=new r(d,()=>import("./ImageMaterial.glsl.js")),this.ignoreUnused=!0}_getPipelineState(e,t){const{output:i,hasOccludees:r,cullFace:s}=e;return f({blending:n(i,!0,e.emissionDimmingPass),culling:h(s),depthTest:o(i),depthWrite:l(e),colorWrite:g,stencilWrite:r?c:null,stencilTest:r?t?a:p:null,polygonOffset:u(e)})}initializePipeline(e){return this._occludeePipeline=this._getPipelineState(e,!0),this._getPipelineState(e,!1)}getPipeline(e,t,i){return i?this._occludeePipeline:super.getPipeline(e,t,i)}};function P(e){let t=m;return e.perspectiveInterpolation&&(t=t.clone().f32("perspectiveDivide")),t}j=e([t("esri.views.3d.webgl-engine.shaders.ImageMaterialTechnique")],j);export{j as ImageMaterialTechnique,P as getLayout};
|
|
@@ -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 i}from"../../../../core/accessorSupport/decorators.js";import{glLayout as t}from"../../support/buffer/glUtil.js";import{newLayout as r}from"../../support/buffer/InterleavedLayout.js";import{ReloadableShader as l}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as s}from"../core/shaderTechnique/ShaderTechnique.js";import{depthWrite as n,depthTest as o,blending as c}from"../lib/OrderIndependentTransparency.js";import{stencilToolMaskBase as p,stencilBaseAllZeros as u,stencilWriteMaskOn as a,stencilToolTransparentOccluder as d,depthCompareAlways as h,stencilToolMaskOccluder as m,stencilWriteMaskOff as f,depthCompareLess as P}from"../lib/StencilUtils.js";import{L as g}from"../../../../chunks/LineMarker.glsl.js";import{makePipelineState as T,defaultColorWrite as b,unpremultipliedAlphaToPremultipliedAlpha as W}from"../../../webgl/renderState.js";let _=class extends s{constructor(e,i){super(e,i,t(S(i))),this.shader=new l(g,()=>import("./LineMarker.glsl.js"))}_makePipelineState(e,i){const{output:t,space:r,hasOccludees:l}=e;return T({blending:c(t,!1,e.emissionDimmingPass),depthTest:0===r?null:o(t),depthWrite:n(e),colorWrite:b,stencilWrite:l?a:null,stencilTest:l?i?p:u:null,polygonOffset:{factor:0,units:-10}})}initializePipeline(e){return e.occluder?(this._occluderPipelineTransparent=T({blending:W,depthTest:h,depthWrite:null,colorWrite:b,stencilWrite:null,stencilTest:d}),this._occluderPipelineOpaque=T({blending:W,depthTest:h,depthWrite:null,colorWrite:b,stencilWrite:f,stencilTest:m}),this._occluderPipelineMaskWrite=T({blending:null,depthTest:P,depthWrite:null,colorWrite:null,stencilWrite:a,stencilTest:p})):this._occluderPipelineTransparent=this._occluderPipelineOpaque=this._occluderPipelineMaskWrite=null,this._occludeePipelineState=this._makePipelineState(e,!0),this._makePipelineState(e,!1)}getPipeline(e,i){return
|
|
2
|
+
import{__decorate as e}from"tslib";import{subclass as i}from"../../../../core/accessorSupport/decorators.js";import{glLayout as t}from"../../support/buffer/glUtil.js";import{newLayout as r}from"../../support/buffer/InterleavedLayout.js";import{ReloadableShader as l}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as s}from"../core/shaderTechnique/ShaderTechnique.js";import{depthWrite as n,depthTest as o,blending as c}from"../lib/OrderIndependentTransparency.js";import{stencilToolMaskBase as p,stencilBaseAllZeros as u,stencilWriteMaskOn as a,stencilToolTransparentOccluder as d,depthCompareAlways as h,stencilToolMaskOccluder as m,stencilWriteMaskOff as f,depthCompareLess as P}from"../lib/StencilUtils.js";import{L as g}from"../../../../chunks/LineMarker.glsl.js";import{makePipelineState as T,defaultColorWrite as b,unpremultipliedAlphaToPremultipliedAlpha as W}from"../../../webgl/renderState.js";let _=class extends s{constructor(e,i){super(e,i,t(S(i))),this.shader=new l(g,()=>import("./LineMarker.glsl.js"))}_makePipelineState(e,i){const{output:t,space:r,hasOccludees:l}=e;return T({blending:c(t,!1,e.emissionDimmingPass),depthTest:0===r?null:o(t),depthWrite:n(e),colorWrite:b,stencilWrite:l?a:null,stencilTest:l?i?p:u:null,polygonOffset:{factor:0,units:-10}})}initializePipeline(e){return e.occluder?(this._occluderPipelineTransparent=T({blending:W,depthTest:h,depthWrite:null,colorWrite:b,stencilWrite:null,stencilTest:d}),this._occluderPipelineOpaque=T({blending:W,depthTest:h,depthWrite:null,colorWrite:b,stencilWrite:f,stencilTest:m}),this._occluderPipelineMaskWrite=T({blending:null,depthTest:P,depthWrite:null,colorWrite:null,stencilWrite:a,stencilTest:p})):this._occluderPipelineTransparent=this._occluderPipelineOpaque=this._occluderPipelineMaskWrite=null,this._occludeePipelineState=this._makePipelineState(e,!0),this._makePipelineState(e,!1)}getPipeline(e,i,t){return t?this._occludeePipelineState:11===e.occluder?this._occluderPipelineTransparent??super.getPipeline(e,i,t):10===e.occluder?this._occluderPipelineOpaque??super.getPipeline(e,i,t):this._occluderPipelineMaskWrite??super.getPipeline(e,i,t)}};function S(e){const i=r().vec3f("position").vec4f16("previousDelta").vec2f16("uv0");return e.hasVVColor?i.f32("colorFeatureAttribute"):i.vec4u8("color",{glNormalized:!0}),e.hasVVOpacity&&i.f32("opacityFeatureAttribute"),e.hasVVSize?i.f32("sizeFeatureAttribute"):i.f16("size"),e.worldSpace&&i.vec3f16("normal"),i.freeze()}_=e([i("esri.views.3d.webgl-engine.shaders.LineMarkerTechnique")],_);export{_ as LineMarkerTechnique,S as getLayout};
|
|
@@ -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{isColor as i}from"../core/shaderLibrary/ShaderOutput.js";import{ReloadableShader as t}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as s}from"../core/shaderTechnique/ShaderTechnique.js";import{stencilToolMaskBase as l,stencilBaseAllZeros as o,stencilWriteMaskOn as n,depthCompareLess as a}from"../lib/StencilUtils.js";import{PositionColorGLLayout as p,PositionGLLayout as u}from"../materials/DefaultLayouts.js";import{N as c}from"../../../../chunks/NativeLine.glsl.js";import{PrimitiveType as m}from"../../../webgl/enums.js";import{makePipelineState as h,defaultColorWrite as d,defaultDepthWrite as f,unpremultipliedAlphaToPremultipliedAlpha as j}from"../../../webgl/renderState.js";let g=class extends s{constructor(e,r){super(e,r,r.hasVertexColors?p:u),this.shader=new t(c,()=>import("./NativeLine.glsl.js")),this.primitiveType=m.LINES}initializePipeline(e){const{hasOccludees:r,output:t,transparent:s}=e,p=(e,i=null,t=null)=>h({blending:i,depthTest:a,depthWrite:t,colorWrite:d,stencilWrite:r?n:null,stencilTest:r?e?l:o:null});return i(t)?(this._occludeePipeline=p(!0,s?j:null,f),p(!1,s?j:null,f)):p(!1)}getPipeline(e,r){return
|
|
2
|
+
import{__decorate as e}from"tslib";import{subclass as r}from"../../../../core/accessorSupport/decorators.js";import{isColor as i}from"../core/shaderLibrary/ShaderOutput.js";import{ReloadableShader as t}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as s}from"../core/shaderTechnique/ShaderTechnique.js";import{stencilToolMaskBase as l,stencilBaseAllZeros as o,stencilWriteMaskOn as n,depthCompareLess as a}from"../lib/StencilUtils.js";import{PositionColorGLLayout as p,PositionGLLayout as u}from"../materials/DefaultLayouts.js";import{N as c}from"../../../../chunks/NativeLine.glsl.js";import{PrimitiveType as m}from"../../../webgl/enums.js";import{makePipelineState as h,defaultColorWrite as d,defaultDepthWrite as f,unpremultipliedAlphaToPremultipliedAlpha as j}from"../../../webgl/renderState.js";let g=class extends s{constructor(e,r){super(e,r,r.hasVertexColors?p:u),this.shader=new t(c,()=>import("./NativeLine.glsl.js")),this.primitiveType=m.LINES}initializePipeline(e){const{hasOccludees:r,output:t,transparent:s}=e,p=(e,i=null,t=null)=>h({blending:i,depthTest:a,depthWrite:t,colorWrite:d,stencilWrite:r?n:null,stencilTest:r?e?l:o:null});return i(t)?(this._occludeePipeline=p(!0,s?j:null,f),p(!1,s?j:null,f)):p(!1)}getPipeline(e,r,i){return i?this._occludeePipeline:super.getPipeline(e,r,i)}};g=e([r("esri.views.3d.webgl-engine.shaders.NativeLineTechnique")],g);export{g as NativeLineTechnique};
|
|
@@ -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 t}from"../../../../core/accessorSupport/decorators.js";import{glLayout as r}from"../../support/buffer/glUtil.js";import{ReloadableShader as i}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as s}from"../core/shaderTechnique/ShaderTechnique.js";import{depthWrite as o,depthTest as l,blending as n}from"../lib/OrderIndependentTransparency.js";import{stencilToolMaskBase as p,stencilBaseAllZeros as a,stencilWriteMaskOn as c}from"../lib/StencilUtils.js";import{polygonOffset as u}from"../materials/PolygonOffset.js";import{P as m}from"../../../../chunks/Pattern.glsl.js";import{getLayout as d}from"./PatternLayouts.js";import{makePipelineState as h,defaultColorWrite as f,cullingParams as P}from"../../../webgl/renderState.js";let g=class extends s{constructor(e,t){super(e,t,r(d(t))),this.shader=new i(m,()=>import("./Pattern.glsl.js")),this.ignoreUnused=!0}_setPipelineState(e,t){const{output:r,cullFace:i,draped:s,hasOccludees:m}=e;return h({blending:n(r),culling:P(i),depthTest:s?null:l(r),depthWrite:o(e),colorWrite:f,stencilWrite:m?c:null,stencilTest:m?t?p:a:null,polygonOffset:u(e)})}initializePipeline(e){return this._occludeePipelineState=this._setPipelineState(e,!0),this._setPipelineState(e,!1)}getPipeline(e,t){return
|
|
2
|
+
import{__decorate as e}from"tslib";import{subclass as t}from"../../../../core/accessorSupport/decorators.js";import{glLayout as r}from"../../support/buffer/glUtil.js";import{ReloadableShader as i}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as s}from"../core/shaderTechnique/ShaderTechnique.js";import{depthWrite as o,depthTest as l,blending as n}from"../lib/OrderIndependentTransparency.js";import{stencilToolMaskBase as p,stencilBaseAllZeros as a,stencilWriteMaskOn as c}from"../lib/StencilUtils.js";import{polygonOffset as u}from"../materials/PolygonOffset.js";import{P as m}from"../../../../chunks/Pattern.glsl.js";import{getLayout as d}from"./PatternLayouts.js";import{makePipelineState as h,defaultColorWrite as f,cullingParams as P}from"../../../webgl/renderState.js";let g=class extends s{constructor(e,t){super(e,t,r(d(t))),this.shader=new i(m,()=>import("./Pattern.glsl.js")),this.ignoreUnused=!0}_setPipelineState(e,t){const{output:r,cullFace:i,draped:s,hasOccludees:m}=e;return h({blending:n(r),culling:P(i),depthTest:s?null:l(r),depthWrite:o(e),colorWrite:f,stencilWrite:m?c:null,stencilTest:m?t?p:a:null,polygonOffset:u(e)})}initializePipeline(e){return this._occludeePipelineState=this._setPipelineState(e,!0),this._setPipelineState(e,!1)}getPipeline(e,t,r){return r?this._occludeePipelineState:super.getPipeline(e,t,r)}};g=e([t("esri.views.3d.webgl-engine.shaders.PatternTechnique")],g);export{g as PatternTechnique};
|
|
@@ -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 i}from"../../../../core/accessorSupport/decorators.js";import{glLayout as t}from"../../support/buffer/glUtil.js";import{ReloadableShader as r}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as l}from"../core/shaderTechnique/ShaderTechnique.js";import{depthWrite as s,depthTest as n,blending as o}from"../lib/OrderIndependentTransparency.js";import{stencilToolMaskBase as c,stencilBaseAllZeros as p,stencilWriteMaskOn as u,stencilToolTransparentOccluder as a,depthCompareAlways as d,stencilToolMaskOccluder as h,stencilWriteMaskOff as m,depthCompareLess as f}from"../lib/StencilUtils.js";import{getRibbonLineLayerPolygonOffset as g}from"../materials/PolygonOffset.js";import{R as b}from"../../../../chunks/RibbonLine.glsl.js";import{getLayout as P}from"./RibbonLineLayouts.js";import{PrimitiveType as T}from"../../../webgl/enums.js";import{makePipelineState as W,defaultColorWrite as j,unpremultipliedAlphaToPremultipliedAlpha as _}from"../../../webgl/renderState.js";let O=class extends l{constructor(e,i){super(e,i,t(P(i))),this.shader=new r(b,()=>import("./RibbonLine.glsl.js")),this.ignoreUnused=!0,this.primitiveType=i.wireframe?T.LINES:T.TRIANGLE_STRIP}_makePipelineState(e,i){const{output:t,hasOccludees:r}=e;return W({blending:o(t,!1,e.emissionDimmingPass),depthTest:n(t),depthWrite:s(e),colorWrite:j,stencilWrite:r?u:null,stencilTest:r?i?c:p:null,polygonOffset:g(e)})}initializePipeline(e){if(e.occluder){const{hasOccludees:i}=e;this._occluderPipelineTransparent=W({blending:_,polygonOffset:g(e),depthTest:d,depthWrite:null,colorWrite:j,stencilWrite:null,stencilTest:i?a:null}),this._occluderPipelineOpaque=W({blending:_,polygonOffset:g(e),depthTest:i?d:f,depthWrite:null,colorWrite:j,stencilWrite:i?m:null,stencilTest:i?h:null}),this._occluderPipelineMaskWrite=W({blending:null,polygonOffset:g(e),depthTest:f,depthWrite:null,colorWrite:null,stencilWrite:i?u:null,stencilTest:i?c:null})}return this._occludeePipeline=this._makePipelineState(e,!0),this._makePipelineState(e,!1)}getPipeline(e,i){if(
|
|
2
|
+
import{__decorate as e}from"tslib";import{subclass as i}from"../../../../core/accessorSupport/decorators.js";import{glLayout as t}from"../../support/buffer/glUtil.js";import{ReloadableShader as r}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as l}from"../core/shaderTechnique/ShaderTechnique.js";import{depthWrite as s,depthTest as n,blending as o}from"../lib/OrderIndependentTransparency.js";import{stencilToolMaskBase as c,stencilBaseAllZeros as p,stencilWriteMaskOn as u,stencilToolTransparentOccluder as a,depthCompareAlways as d,stencilToolMaskOccluder as h,stencilWriteMaskOff as m,depthCompareLess as f}from"../lib/StencilUtils.js";import{getRibbonLineLayerPolygonOffset as g}from"../materials/PolygonOffset.js";import{R as b}from"../../../../chunks/RibbonLine.glsl.js";import{getLayout as P}from"./RibbonLineLayouts.js";import{PrimitiveType as T}from"../../../webgl/enums.js";import{makePipelineState as W,defaultColorWrite as j,unpremultipliedAlphaToPremultipliedAlpha as _}from"../../../webgl/renderState.js";let O=class extends l{constructor(e,i){super(e,i,t(P(i))),this.shader=new r(b,()=>import("./RibbonLine.glsl.js")),this.ignoreUnused=!0,this.primitiveType=i.wireframe?T.LINES:T.TRIANGLE_STRIP}_makePipelineState(e,i){const{output:t,hasOccludees:r}=e;return W({blending:o(t,!1,e.emissionDimmingPass),depthTest:n(t),depthWrite:s(e),colorWrite:j,stencilWrite:r?u:null,stencilTest:r?i?c:p:null,polygonOffset:g(e)})}initializePipeline(e){if(e.occluder){const{hasOccludees:i}=e;this._occluderPipelineTransparent=W({blending:_,polygonOffset:g(e),depthTest:d,depthWrite:null,colorWrite:j,stencilWrite:null,stencilTest:i?a:null}),this._occluderPipelineOpaque=W({blending:_,polygonOffset:g(e),depthTest:i?d:f,depthWrite:null,colorWrite:j,stencilWrite:i?m:null,stencilTest:i?h:null}),this._occluderPipelineMaskWrite=W({blending:null,polygonOffset:g(e),depthTest:f,depthWrite:null,colorWrite:null,stencilWrite:i?u:null,stencilTest:i?c:null})}return this._occludeePipeline=this._makePipelineState(e,!0),this._makePipelineState(e,!1)}getPipeline(e,i,t){if(t)return this._occludeePipeline;switch(e.occluder){case 11:return this._occluderPipelineTransparent??super.getPipeline(e,i,t);case 10:return this._occluderPipelineOpaque??super.getPipeline(e,i,t);default:e.occluder;case void 0:case null:return this._occluderPipelineMaskWrite??super.getPipeline(e,i,t)}}};O=e([i("esri.views.3d.webgl-engine.shaders.RibbonLineTechnique")],O);export{O as RibbonLineTechnique};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{smoothstep as r}from"../../../../core/mathUtils.js";import{set as t}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as o}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{squaredLength as a}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{radiusModifier as s}from"../../../../geometry/ellipsoidUtils.js";import{moon as i,mars as n,earth as
|
|
3
|
-
float sphereDepthInterpolate(vec3 worldRay, vec3 viewRay, float currentLinearDepth) {
|
|
2
|
+
import{__decorate as e}from"tslib";import{smoothstep as r}from"../../../../core/mathUtils.js";import{set as t}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as o}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{squaredLength as a}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{radiusModifier as s}from"../../../../geometry/ellipsoidUtils.js";import{moon as i,mars as n,earth as c}from"../../../../geometry/support/Ellipsoid.js";import{Float2BindUniform as l}from"../core/shaderModules/Float2BindUniform.js";import{Float3BindUniform as m}from"../core/shaderModules/Float3BindUniform.js";import{glsl as p}from"../core/shaderModules/glsl.js";import{parameter as h,ShaderTechniqueConfiguration as d}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{SphereIntersect as f}from"./SphereIntersect.glsl.js";class u extends d{constructor(){super(...arguments),this.ellipsoidMode=1}}function y(e,o){e.fragment.uniforms.add(new l("cameraHeights",e=>{const i=e.camera,n=a(i.eye),c=Math.sqrt(n),l=j(o)*s,m=n-l*l;let p=r(w,M,c-l);return p=Math.min(p,.98),t(g,p,m)}),new m("cameraPosition",e=>e.camera.eye)),e.fragment.include(f),e.fragment.code.add(p`float sphereDepthInterpolate(vec3 worldRay, vec3 viewRay, float currentLinearDepth) {
|
|
4
3
|
vec2 rayPlanetIntersect = sphereIntersect(cameraPosition, worldRay, cameraHeights[1]);
|
|
5
4
|
bool hitsPlanet = (rayPlanetIntersect.x <= rayPlanetIntersect.y) && rayPlanetIntersect.x > 0.0;
|
|
6
5
|
if (hitsPlanet) {
|
|
@@ -11,4 +10,4 @@ float sphereFade = cameraHeights[0];
|
|
|
11
10
|
return (-linearDepth) * sphereFade + currentLinearDepth * (1.0 - sphereFade);
|
|
12
11
|
}
|
|
13
12
|
return currentLinearDepth;
|
|
14
|
-
}`)}e([h({count:4})],u.prototype,"ellipsoidMode",void 0);const g=o();function j({ellipsoidMode:e}){switch(e){case 4:case 1:return
|
|
13
|
+
}`)}e([h({count:4})],u.prototype,"ellipsoidMode",void 0);const g=o();function j({ellipsoidMode:e}){switch(e){case 4:case 1:return c.radius;case 2:return n.radius;case 3:return i.radius}}function v(e,r){const{eye:t}=e;return Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2])-j(r)*s>w}const w=4e6,M=5e6;export{u as SphereDepthInterpolateConfiguration,j as getPlanetRadius,v as isSphereDepthInterpolateActive,M as maximalSphereDepthInterpolateCameraHeight,w as minimalSphereDepthInterpolateCameraHeight,y as sphereDepthInterpolate};
|
|
@@ -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{glLayout as t}from"../../support/buffer/glUtil.js";import{layout as i}from"../../terrain/TerrainAttributes.js";import{isOIT as
|
|
2
|
+
import{__decorate as e}from"tslib";import{subclass as r}from"../../../../core/accessorSupport/decorators.js";import{glLayout as t}from"../../support/buffer/glUtil.js";import{layout as i}from"../../terrain/TerrainAttributes.js";import{isOIT as n}from"../core/shaderLibrary/ShaderOutput.js";import{ReloadableShader as s}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as l}from"../core/shaderTechnique/ShaderTechnique.js";import{depthWrite as o,depthTest as p,blending as c}from"../lib/OrderIndependentTransparency.js";import{renderWhenBitIsNotSet as a}from"../lib/StencilUtils.js";import{T as u}from"../../../../chunks/Terrain.glsl.js";import{makePipelineState as d,defaultColorWrite as h,defaultDepthWrite as m,premultipliedAlpha as f}from"../../../webgl/renderState.js";let T=class extends l{constructor(e,r){super(e,r,t(i)),this.shader=new s(u,()=>import("./Terrain.glsl.js")),this.ignoreUnused=!0}initializePipeline(e){return this._stencilPipelineState=this._createPipeline(e,!0),this._createPipeline(e,!1)}_createPipeline(e,r){const{renderOccluded:t,output:i}=e;return d(n(i)?{blending:c(i,t),depthTest:p(i,t?519:513),depthWrite:t?null:o(e),colorWrite:h,stencilTest:r?a(1):null}:{blending:t?f:null,depthTest:t?null:{func:513},depthWrite:t?null:m,colorWrite:h,stencilTest:r?a(1):null})}getPipeline(e,r){return r.useStencil?this._stencilPipelineState:super.getPipeline(e,r)}};T=e([r("esri.views.3d.webgl-engine.shaders.TerrainTechnique")],T);export{T as TerrainTechnique};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{glsl as o}from"../core/shaderModules/glsl.js";function e(e
|
|
2
|
+
import{glsl as o}from"../core/shaderModules/glsl.js";function e(o,e){c(o,!e.useFloatBlend)}function r(o){c(o,!0)}function c(e,r){r?e.code.add("\n float ditherNoise(vec4 color) {\n vec2 seed = color.rg + color.ba + gl_FragCoord.xy + gl_FragCoord.z;\n return (fract(52.9829189 * fract(dot(seed, vec2(0.06711056, 0.00583715)))) - 0.5) / 255.0;\n }"):e.code.add(o`float ditherNoise(vec4 color) { return 0.0; }`)}export{e as ditherNoise,r as ditherNoiseUnconditional};
|
package/views/PopupView.d.ts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
+
import type Graphic from "../Graphic.js";
|
|
1
2
|
import type Popup from "../widgets/Popup.js";
|
|
3
|
+
import type { AbortOptions } from "../core/promiseUtils.js";
|
|
4
|
+
import type { ScreenPoint } from "../core/types.js";
|
|
5
|
+
import type { PointerType } from "./input/types.js";
|
|
2
6
|
import type { PopupProperties } from "../widgets/Popup.js";
|
|
3
7
|
import type { PopupOpenOptions } from "../widgets/Popup/types.js";
|
|
4
8
|
|
|
@@ -114,6 +118,62 @@ export abstract class PopupView {
|
|
|
114
118
|
* }
|
|
115
119
|
*/
|
|
116
120
|
closePopup(): void;
|
|
121
|
+
/**
|
|
122
|
+
* Use this method to query for features at a given screen location.
|
|
123
|
+
* These features come from origins (layers and sublayers) configured with a [PopupTemplate](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/)
|
|
124
|
+
* and have its [FeatureLayer.popupEnabled](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/#popupEnabled) set.
|
|
125
|
+
*
|
|
126
|
+
* One example could be a custom side panel that displays feature-specific information based on
|
|
127
|
+
* an end user's click location. This method allows a developer to
|
|
128
|
+
* control how the input location is handled, and then subsequently, what to do with the results.
|
|
129
|
+
*
|
|
130
|
+
* @param screenPoint
|
|
131
|
+
* @param options
|
|
132
|
+
* @returns An async generator of features ready to be displayed by the popup,
|
|
133
|
+
* with the attributes and geometry required by their popup template.
|
|
134
|
+
* Generator yields features as soon as they are available in the top to bottom order.
|
|
135
|
+
* @since 5.1
|
|
136
|
+
* @example
|
|
137
|
+
* // Consume features from the generator as soon as they are available
|
|
138
|
+
* view.on("click", async (event) => {
|
|
139
|
+
* const generator = view.fetchPopupFeatures(event.screenPoint, {
|
|
140
|
+
* pointerType: event.pointerType
|
|
141
|
+
* });
|
|
142
|
+
*
|
|
143
|
+
* for await (const feature of generator) {
|
|
144
|
+
* console.log(feature);
|
|
145
|
+
* }
|
|
146
|
+
* });
|
|
147
|
+
* @example
|
|
148
|
+
* // Wait for all the features to be available
|
|
149
|
+
* view.on("click", async (event) => {
|
|
150
|
+
* const generator = view.fetchPopupFeatures(event.screenPoint, {
|
|
151
|
+
* pointerType: event.pointerType
|
|
152
|
+
* });
|
|
153
|
+
*
|
|
154
|
+
* const features = await Array.fromAsync(generator);
|
|
155
|
+
*
|
|
156
|
+
* console.log(`${features.length} available for popup`);
|
|
157
|
+
* });
|
|
158
|
+
* @example
|
|
159
|
+
* // Get the top most feature
|
|
160
|
+
* view.on("click", async (event) => {
|
|
161
|
+
* const controller = new AbortController();
|
|
162
|
+
* const generator = view.fetchPopupFeatures(event.screenPoint, {
|
|
163
|
+
* pointerType: event.pointerType,
|
|
164
|
+
* signal: controller.signal
|
|
165
|
+
* });
|
|
166
|
+
*
|
|
167
|
+
* const result = await generator.next();
|
|
168
|
+
* const feature = result.done ? null : result.value;
|
|
169
|
+
*
|
|
170
|
+
* // abort the pending iterations
|
|
171
|
+
* controller.abort();
|
|
172
|
+
*
|
|
173
|
+
* console.log(`top most feature`, feature);
|
|
174
|
+
* });
|
|
175
|
+
*/
|
|
176
|
+
fetchPopupFeatures(screenPoint: ScreenPoint, options?: FetchPopupFeaturesOptions): AsyncGenerator<Graphic>;
|
|
117
177
|
/**
|
|
118
178
|
* Opens the popup at the given location with content defined either explicitly with `content`
|
|
119
179
|
* or driven from the [PopupTemplate](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/) of input features. This method sets
|
|
@@ -181,4 +241,20 @@ export abstract class PopupView {
|
|
|
181
241
|
openPopup(options?: ViewPopupOpenOptions): Promise<void>;
|
|
182
242
|
}
|
|
183
243
|
|
|
184
|
-
export type ViewPopupOpenOptions = Pick<PopupOpenOptions, "actions" | "content" | "features" | "fetchFeatures" | "location" | "promises" | "title" | "updateLocationEnabled">;
|
|
244
|
+
export type ViewPopupOpenOptions = Pick<PopupOpenOptions, "actions" | "content" | "features" | "fetchFeatures" | "location" | "promises" | "title" | "updateLocationEnabled">;
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* Options for the [fetchPopupFeatures()](https://developers.arcgis.com/javascript/latest/references/core/views/PopupView/#fetchPopupFeatures) method. See properties below for object specifications.
|
|
248
|
+
*
|
|
249
|
+
* @since 5.1
|
|
250
|
+
*/
|
|
251
|
+
export interface FetchPopupFeaturesOptions extends AbortOptions {
|
|
252
|
+
/**
|
|
253
|
+
* The type of pointer coming from the input event.
|
|
254
|
+
* It influences the tolerence when querying for features on services.
|
|
255
|
+
* A `touch` pointer uses a larger tolerence than `mouse` or `pen`.
|
|
256
|
+
*/
|
|
257
|
+
pointerType?: PointerType;
|
|
258
|
+
/** A default popup template is automatically used if no `popupTemplate` is defined for a feature's origin */
|
|
259
|
+
defaultPopupTemplateEnabled?: boolean;
|
|
260
|
+
}
|