@arcgis/core 6.0.0-next.22 → 6.0.0-next.23
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/PopupTemplate.js +1 -1
- package/analysis/LineOfSightAnalysis.d.ts +1 -1
- package/analysis/LineOfSightAnalysisObserver.d.ts +5 -4
- package/analysis/LineOfSightAnalysisTarget.d.ts +4 -4
- package/analysis/Viewshed.d.ts +4 -4
- package/arcgisGlobal.d.ts +0 -5
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{3c277a0f099d67090d07.js → 02335385b1476fe322eb.js} +1 -1
- package/assets/esri/core/workers/chunks/{4911ce62421a6c3320b0.js → 13c64087be3b2985a21b.js} +1 -1
- package/assets/esri/core/workers/chunks/{8e19629899a5becf8e19.js → 150e7a7bd5df25693da7.js} +1 -1
- package/assets/esri/core/workers/chunks/2c0cb214fedb29487eef.js +1 -0
- package/assets/esri/core/workers/chunks/{2e096537a3a5555a4a93.js → 4cb751dc8d00bdaeb04c.js} +1 -1
- package/assets/esri/core/workers/chunks/517106048980a3cbe072.js +1 -0
- package/assets/esri/core/workers/chunks/{d08ff41e2a9bcd58b64a.js → 636cd05abfbdff19029e.js} +1 -1
- package/assets/esri/core/workers/chunks/{84940d8e14caf5a27e04.js → 64b360625c68cb863a08.js} +1 -1
- package/assets/esri/core/workers/chunks/{814751e705c05099f864.js → 7c75a8ee266c36baa902.js} +1 -1
- package/assets/esri/core/workers/chunks/947674b2ca8be65b9bcc.js +1 -0
- package/assets/esri/core/workers/chunks/{baed828b7846c0863289.js → 96c4ea9cfa3930f1c3fb.js} +21 -17
- package/assets/esri/core/workers/chunks/{8a485130781b49dbf608.js → 9d40786c5ceface786ba.js} +1 -1
- package/assets/esri/core/workers/chunks/{a35c69a4751d28c39907.js → 9e7c4eda135c4911b268.js} +1 -1
- package/assets/esri/core/workers/chunks/ad96132bc89671e595f3.js +1 -0
- package/assets/esri/themes/base/_core.scss +0 -2
- 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/chunks/Component.glsl.js +9 -12
- package/chunks/DefaultMaterial.glsl.js +4 -5
- package/chunks/Path.glsl.js +2 -4
- package/chunks/RealisticTree.glsl.js +3 -3
- package/chunks/SSAO.glsl.js +1 -2
- package/config.js +1 -1
- package/geometry/support/clipRay.js +1 -1
- package/geometry/support/plane.js +1 -1
- package/interfaces.d.ts +0 -55
- package/kernel.js +1 -1
- package/layers/ElevationLayer.d.ts +6 -2
- package/layers/GeoJSONLayer.d.ts +2 -107
- package/layers/IntegratedMeshLayer.js +1 -1
- package/layers/SceneLayer.d.ts +40 -16
- package/layers/ViewshedLayer.d.ts +10 -4
- package/layers/WMSLayer.d.ts +2 -69
- package/layers/mixins/TemporalLayer.d.ts +70 -48
- package/layers/mixins/TiledImagery.d.ts +0 -11
- package/package.json +2 -2
- package/popup/content.d.ts +38 -1
- package/popup/content.js +1 -1
- package/smartMapping/popup/support/clusterUtils.js +1 -1
- package/smartMapping/popup/support/utils.js +2 -2
- package/smartMapping/renderers/size.js +1 -1
- package/smartMapping/renderers/support/regenerateUtils.js +1 -1
- package/support/timeUtils.d.ts +11 -0
- package/views/2d/engine/webgl/GlyphWorker.js +1 -1
- package/views/2d/layers/features/Processor.js +1 -1
- package/views/2d/layers/features/aggregation/GeohashSpatialIndex.js +1 -1
- package/views/2d/layers/features/aggregation/GridSpatialIndex.js +1 -1
- package/views/2d/layers/features/layerAdapters/CatalogFootprintLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/FeatureLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/InMemoryLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/KnowledgeGraphSublayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/OGCFeatureLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/OrientedImageryLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/ParquetLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/StreamLayerAdapter.js +1 -1
- package/views/2d/layers/features/processor/AggregateStrategy.js +1 -1
- package/views/2d/layers/features/processor/FeatureUpdateStrategy.js +1 -1
- package/views/2d/layers/features/processor/bins/BinAdapter.js +1 -1
- package/views/2d/layers/features/processor/bins/BinLevelState.js +1 -1
- package/views/2d/layers/features/processor/clusters/ClusterAdapter.js +1 -1
- package/views/2d/layers/features/processor/clusters/ClusterLevelState.js +1 -1
- package/views/2d/layers/features/processor/tracks/TrackAdapter.js +1 -1
- package/views/2d/layers/features/processor/tracks/TrackLevelState.js +1 -1
- package/views/2d/layers/features/schema/processor/SimpleProcessorSchema.js +1 -1
- package/views/2d/layers/features/sources/strategies/chunks/ASourceChunk.js +1 -1
- package/views/2d/layers/features/sources/strategies/chunks/ByReferenceTileSourceChunk.js +1 -1
- package/views/2d/layers/features/sources/strategies/chunks/FeatureSnapshotSourceChunk.js +1 -1
- package/views/2d/layers/features/sources/strategies/chunks/Overrides.js +1 -1
- package/views/2d/layers/features/sources/strategies/chunks/ParquetSnapshotSourceChunk.js +1 -1
- package/views/2d/layers/features/sources/strategies/chunks/SourceChunkStore.js +1 -1
- package/views/2d/layers/features/sources/strategies/chunks/StreamSourceChunk.js +1 -1
- package/views/2d/layers/features/support/AttributeStore.js +1 -1
- package/views/2d/layers/features/support/FeatureFilterEvaluator.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
- package/views/2d/layers/features/support/GraphicsReader.js +1 -1
- package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
- package/views/3d/environment/SunLighting.d.ts +0 -1
- package/views/3d/environment/SunLighting.js +1 -1
- package/views/3d/environment/VirtualLighting.d.ts +0 -1
- package/views/3d/environment/VirtualLighting.js +1 -1
- package/views/3d/input/handlers/ground/GroundDoubleClickMove.js +1 -1
- package/views/3d/interactive/placementTools/GroundNavigationPlacementTool3D.js +1 -1
- package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
- package/views/3d/state/utils/groundNavigationUtils.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/Component.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/hud/HUD.glsl.js +1 -2
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ScreenSpaceRayMarching.glsl.js +1 -2
- package/views/3d/webgl-engine/effects/glow/applyEmissiveGlow.glsl.js +9 -4
- package/views/3d/webgl-engine/effects/snowcover/applySnow.glsl.js +18 -0
- package/views/3d/webgl-engine/lib/Intersector.js +1 -1
- package/views/3d/webgl-engine/materials/Path.glsl.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/internal/worldSizedRibbonLineIntersectionUtils.js +2 -0
- package/views/3d/webgl-engine/shaders/DefaultMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/RealisticTree.glsl.js +1 -1
- package/views/layers/LineOfSightLayerView.d.ts +2 -2
- package/views/layers/ViewshedLayerView.d.ts +2 -1
- package/widgets/Feature/FeatureExpression/FeatureExpressionViewModel.js +1 -1
- package/widgets/FloorFilter/FloorFilterViewModel.js +1 -1
- package/widgets/Locate.d.ts +1 -1
- package/widgets/Search/SearchViewModel.js +1 -1
- package/widgets/Search/support/layerSearchUtils.js +1 -1
- package/widgets/Sketch/SketchViewModel.js +1 -1
- package/widgets/Sketch/support/PluginManager.js +1 -1
- package/widgets/UtilityNetworkTrace/UtilityNetworkTraceFeature.js +1 -1
- package/widgets/support/GeolocationPositioning.d.ts +1 -2
- package/assets/esri/core/workers/chunks/42045cf46497828cd3c0.js +0 -1
- package/assets/esri/core/workers/chunks/576248e9ae2654569420.js +0 -1
- package/assets/esri/core/workers/chunks/6059853ef3b6cddbe869.js +0 -1
- package/assets/esri/core/workers/chunks/a679207c3458cc0b1fec.js +0 -1
- package/assets/esri/themes/base/widgets/_DirectionalPad.scss +0 -85
- package/assets/esri/widgets/DirectionalPad/t9n/messages.ar.json +0 -1
- package/assets/esri/widgets/DirectionalPad/t9n/messages.bg.json +0 -1
- package/assets/esri/widgets/DirectionalPad/t9n/messages.bs.json +0 -1
- package/assets/esri/widgets/DirectionalPad/t9n/messages.ca.json +0 -1
- package/assets/esri/widgets/DirectionalPad/t9n/messages.cs.json +0 -1
- package/assets/esri/widgets/DirectionalPad/t9n/messages.da.json +0 -1
- package/assets/esri/widgets/DirectionalPad/t9n/messages.de.json +0 -1
- package/assets/esri/widgets/DirectionalPad/t9n/messages.el.json +0 -1
- package/assets/esri/widgets/DirectionalPad/t9n/messages.en.json +0 -1
- package/assets/esri/widgets/DirectionalPad/t9n/messages.es.json +0 -1
- package/assets/esri/widgets/DirectionalPad/t9n/messages.et.json +0 -1
- package/assets/esri/widgets/DirectionalPad/t9n/messages.fi.json +0 -1
- package/assets/esri/widgets/DirectionalPad/t9n/messages.fr.json +0 -1
- package/assets/esri/widgets/DirectionalPad/t9n/messages.he.json +0 -1
- package/assets/esri/widgets/DirectionalPad/t9n/messages.hr.json +0 -1
- package/assets/esri/widgets/DirectionalPad/t9n/messages.hu.json +0 -1
- package/assets/esri/widgets/DirectionalPad/t9n/messages.id.json +0 -1
- package/assets/esri/widgets/DirectionalPad/t9n/messages.it.json +0 -1
- package/assets/esri/widgets/DirectionalPad/t9n/messages.ja.json +0 -1
- package/assets/esri/widgets/DirectionalPad/t9n/messages.ko.json +0 -1
- package/assets/esri/widgets/DirectionalPad/t9n/messages.lt.json +0 -1
- package/assets/esri/widgets/DirectionalPad/t9n/messages.lv.json +0 -1
- package/assets/esri/widgets/DirectionalPad/t9n/messages.nl.json +0 -1
- package/assets/esri/widgets/DirectionalPad/t9n/messages.no.json +0 -1
- package/assets/esri/widgets/DirectionalPad/t9n/messages.pl.json +0 -1
- package/assets/esri/widgets/DirectionalPad/t9n/messages.pt-BR.json +0 -1
- package/assets/esri/widgets/DirectionalPad/t9n/messages.pt-PT.json +0 -1
- package/assets/esri/widgets/DirectionalPad/t9n/messages.ro.json +0 -1
- package/assets/esri/widgets/DirectionalPad/t9n/messages.ru.json +0 -1
- package/assets/esri/widgets/DirectionalPad/t9n/messages.sk.json +0 -1
- package/assets/esri/widgets/DirectionalPad/t9n/messages.sl.json +0 -1
- package/assets/esri/widgets/DirectionalPad/t9n/messages.sr.json +0 -1
- package/assets/esri/widgets/DirectionalPad/t9n/messages.sv.json +0 -1
- package/assets/esri/widgets/DirectionalPad/t9n/messages.th.json +0 -1
- package/assets/esri/widgets/DirectionalPad/t9n/messages.tr.json +0 -1
- package/assets/esri/widgets/DirectionalPad/t9n/messages.uk.json +0 -1
- package/assets/esri/widgets/DirectionalPad/t9n/messages.vi.json +0 -1
- package/assets/esri/widgets/DirectionalPad/t9n/messages.zh-CN.json +0 -1
- package/assets/esri/widgets/DirectionalPad/t9n/messages.zh-HK.json +0 -1
- package/assets/esri/widgets/DirectionalPad/t9n/messages.zh-TW.json +0 -1
- package/assets/esri/widgets/Track/t9n/messages.ar.json +0 -1
- package/assets/esri/widgets/Track/t9n/messages.bg.json +0 -1
- package/assets/esri/widgets/Track/t9n/messages.bs.json +0 -1
- package/assets/esri/widgets/Track/t9n/messages.ca.json +0 -1
- package/assets/esri/widgets/Track/t9n/messages.cs.json +0 -1
- package/assets/esri/widgets/Track/t9n/messages.da.json +0 -1
- package/assets/esri/widgets/Track/t9n/messages.de.json +0 -1
- package/assets/esri/widgets/Track/t9n/messages.el.json +0 -1
- package/assets/esri/widgets/Track/t9n/messages.en.json +0 -1
- package/assets/esri/widgets/Track/t9n/messages.es.json +0 -1
- package/assets/esri/widgets/Track/t9n/messages.et.json +0 -1
- package/assets/esri/widgets/Track/t9n/messages.fi.json +0 -1
- package/assets/esri/widgets/Track/t9n/messages.fr.json +0 -1
- package/assets/esri/widgets/Track/t9n/messages.he.json +0 -1
- package/assets/esri/widgets/Track/t9n/messages.hr.json +0 -1
- package/assets/esri/widgets/Track/t9n/messages.hu.json +0 -1
- package/assets/esri/widgets/Track/t9n/messages.id.json +0 -1
- package/assets/esri/widgets/Track/t9n/messages.it.json +0 -1
- package/assets/esri/widgets/Track/t9n/messages.ja.json +0 -1
- package/assets/esri/widgets/Track/t9n/messages.ko.json +0 -1
- package/assets/esri/widgets/Track/t9n/messages.lt.json +0 -1
- package/assets/esri/widgets/Track/t9n/messages.lv.json +0 -1
- package/assets/esri/widgets/Track/t9n/messages.nl.json +0 -1
- package/assets/esri/widgets/Track/t9n/messages.no.json +0 -1
- package/assets/esri/widgets/Track/t9n/messages.pl.json +0 -1
- package/assets/esri/widgets/Track/t9n/messages.pt-BR.json +0 -1
- package/assets/esri/widgets/Track/t9n/messages.pt-PT.json +0 -1
- package/assets/esri/widgets/Track/t9n/messages.ro.json +0 -1
- package/assets/esri/widgets/Track/t9n/messages.ru.json +0 -1
- package/assets/esri/widgets/Track/t9n/messages.sk.json +0 -1
- package/assets/esri/widgets/Track/t9n/messages.sl.json +0 -1
- package/assets/esri/widgets/Track/t9n/messages.sr.json +0 -1
- package/assets/esri/widgets/Track/t9n/messages.sv.json +0 -1
- package/assets/esri/widgets/Track/t9n/messages.th.json +0 -1
- package/assets/esri/widgets/Track/t9n/messages.tr.json +0 -1
- package/assets/esri/widgets/Track/t9n/messages.uk.json +0 -1
- package/assets/esri/widgets/Track/t9n/messages.vi.json +0 -1
- package/assets/esri/widgets/Track/t9n/messages.zh-CN.json +0 -1
- package/assets/esri/widgets/Track/t9n/messages.zh-HK.json +0 -1
- package/assets/esri/widgets/Track/t9n/messages.zh-TW.json +0 -1
- package/views/2d/layers/features/FeatureSpatialIndex.js +0 -2
- package/views/2d/layers/features/support/FeatureSetReaderIndirect.js +0 -2
- package/views/3d/webgl-engine/effects/snowcover/SnowCover.glsl.js +0 -12
- package/widgets/DirectionalPad/DirectionalPadViewModel.d.ts +0 -85
- package/widgets/DirectionalPad/DirectionalPadViewModel.js +0 -2
- package/widgets/DirectionalPad/VisibleElements.d.ts +0 -40
- package/widgets/DirectionalPad/VisibleElements.js +0 -2
- package/widgets/DirectionalPad/constants.js +0 -2
- package/widgets/DirectionalPad/css.js +0 -2
- package/widgets/DirectionalPad/types.d.ts +0 -27
- package/widgets/DirectionalPad/utils.js +0 -2
- package/widgets/DirectionalPad.d.ts +0 -156
- package/widgets/DirectionalPad.js +0 -2
- package/widgets/Track/TrackViewModel.d.ts +0 -131
- package/widgets/Track/TrackViewModel.js +0 -2
- package/widgets/Track/types.d.ts +0 -6
- package/widgets/Track.d.ts +0 -278
- package/widgets/Track.js +0 -2
package/chunks/Component.glsl.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{ComponentData as e}from"../views/3d/webgl-engine/collections/Component/Material/ComponentData.glsl.js";import{waterNormals as t}from"../views/3d/webgl-engine/core/shaderLibrary/bindUniforms.js";import{forwardLinearDepthToWriteShadow as ee}from"../views/3d/webgl-engine/core/shaderLibrary/forwardLinearDepthToWriteShadow.glsl.js";import{isColor as te,isShadow as n}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{slicePass as r}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{TextureCoordinateAttribute as i}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{VertexColor as a}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexColor.glsl.js";import{VertexNormal as o}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexNormal.glsl.js";import{VertexPosition as s}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexPosition.glsl.js";import{DepthConversion as c}from"../views/3d/webgl-engine/core/shaderLibrary/output/DepthConversion.glsl.js";import{outputDepth as l}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputDepth.glsl.js";import{OutputHighlight as u}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js";import{OutputHighlightOverlay as ne}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlightOverlay.js";import{computeFragmentNormals as d}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ComputeFragmentNormals.glsl.js";import{ComputeMaterialColor as re}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ComputeMaterialColor.glsl.js";import{ComputeNormalTextureDraw as ie}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ComputeNormalTexture.glsl.js";import{EvaluateSceneLighting as f}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import{lightingGlobalFactor as p,mainLightIntensity as m,mainLightDirection as h}from"../views/3d/webgl-engine/core/shaderLibrary/shading/lightingUniforms.js";import{NormalUtils as ae}from"../views/3d/webgl-engine/core/shaderLibrary/shading/NormalUtils.glsl.js";import{pbrGlobals as oe}from"../views/3d/webgl-engine/core/shaderLibrary/shading/pbrGlobals.glsl.js";import{PhysicallyBasedRenderingParameters as se}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{ReadBaseColorTexture as g}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadBaseColorTexture.glsl.js";import{readShadowPass as _}from"../views/3d/webgl-engine/core/shaderLibrary/shading/readShadow.glsl.js";import{OverlayIM as ce}from"../views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js";import{DiscardOrAdjustAlphaDraw as v}from"../views/3d/webgl-engine/core/shaderLibrary/util/DiscardOrAdjustAlpha.glsl.js";import{BooleanDrawUniform as y}from"../views/3d/webgl-engine/core/shaderModules/BooleanDrawUniform.js";import{FloatDrawUniform as b}from"../views/3d/webgl-engine/core/shaderModules/FloatDrawUniform.js";import{If as x,glsl as S}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{
|
|
2
|
+
import{ComponentData as e}from"../views/3d/webgl-engine/collections/Component/Material/ComponentData.glsl.js";import{waterNormals as t}from"../views/3d/webgl-engine/core/shaderLibrary/bindUniforms.js";import{forwardLinearDepthToWriteShadow as ee}from"../views/3d/webgl-engine/core/shaderLibrary/forwardLinearDepthToWriteShadow.glsl.js";import{isColor as te,isShadow as n}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{slicePass as r}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{TextureCoordinateAttribute as i}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{VertexColor as a}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexColor.glsl.js";import{VertexNormal as o}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexNormal.glsl.js";import{VertexPosition as s}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexPosition.glsl.js";import{DepthConversion as c}from"../views/3d/webgl-engine/core/shaderLibrary/output/DepthConversion.glsl.js";import{outputDepth as l}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputDepth.glsl.js";import{OutputHighlight as u}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js";import{OutputHighlightOverlay as ne}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlightOverlay.js";import{computeFragmentNormals as d}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ComputeFragmentNormals.glsl.js";import{ComputeMaterialColor as re}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ComputeMaterialColor.glsl.js";import{ComputeNormalTextureDraw as ie}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ComputeNormalTexture.glsl.js";import{EvaluateSceneLighting as f}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import{lightingGlobalFactor as p,mainLightIntensity as m,mainLightDirection as h}from"../views/3d/webgl-engine/core/shaderLibrary/shading/lightingUniforms.js";import{NormalUtils as ae}from"../views/3d/webgl-engine/core/shaderLibrary/shading/NormalUtils.glsl.js";import{pbrGlobals as oe}from"../views/3d/webgl-engine/core/shaderLibrary/shading/pbrGlobals.glsl.js";import{PhysicallyBasedRenderingParameters as se}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{ReadBaseColorTexture as g}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadBaseColorTexture.glsl.js";import{readShadowPass as _}from"../views/3d/webgl-engine/core/shaderLibrary/shading/readShadow.glsl.js";import{OverlayIM as ce}from"../views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js";import{DiscardOrAdjustAlphaDraw as v}from"../views/3d/webgl-engine/core/shaderLibrary/util/DiscardOrAdjustAlpha.glsl.js";import{BooleanDrawUniform as y}from"../views/3d/webgl-engine/core/shaderModules/BooleanDrawUniform.js";import{FloatDrawUniform as b}from"../views/3d/webgl-engine/core/shaderModules/FloatDrawUniform.js";import{If as x,glsl as S}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{applySnow as le}from"../views/3d/webgl-engine/effects/snowcover/applySnow.glsl.js";import{alphaCutoff as C}from"../views/3d/webgl-engine/shaders/alphaCutoff.glsl.js";import{outputColorHighlightOLID as ue}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js";import{getPlanetRadius as de,sphereDepthInterpolate as w}from"../views/3d/webgl-engine/shaders/SphereDepthInterpolate.glsl.js";import{ShaderBuilder as T}from"../views/webgl/ShaderBuilder.js";function E(E){let D=new T,{vertex:O,fragment:k}=D;D.include(s,E),D.include(o,E),D.include(a,E),D.include(i,E),D.include(e,E),D.include(v,E),k.include(r,E),D.include(g,E);let{output:A,pbrMode:j,hasNormalTexture:M,snowCover:N,receiveShadows:P,shadeNormals:F,spherical:I,sphericalSR:L,overlayEnabled:R,componentDataType:fe,vertexDiscardMode:z,renderOccluded:B,isGroundSlice:V,groundTransparencyMode:pe}=E,H=te(A),U=j===1||j===2,W=pe===2,G=W&&(A===3||A===4);U&&(D.include(se,E),M&&D.include(ie,E));let K=n(A),q=A===11,me=A===10,J=A===4,he=K&&fe===1,Y=de(E),X=(R||G)&&I,Z=L===1;(H||J)&&(D.include(re,E),k.include(C)),(R||G)&&(k.include(f,E),D.include(ce,E),X?(D.varyings.add(`vPositionForDraping`,`vec3`),k.uniforms.add(new y(`useENUForGlobalOverlayUV`,e=>e.useENUForGlobalOverlayUV),new b(`overlayMapScaleU`,e=>e.toMapSpace[2]),new b(`overlayReferenceU`,e=>e.toMapSpace[0])),k.constants.add(`overlayWorldWidth`,`float`,Z?2*Math.PI*Y:360),Z?(k.constants.add(`pRadius`,`float`,Y),k.constants.add(`halfSemiMajorAxis`,`float`,.5*Y)):k.constants.add(`rad2deg1`,`float`,180/Math.PI),k.constants.add(`invRadius`,`float`,1/Y).code.add(S`
|
|
3
3
|
vec2 projectOverlay(vec3 pos) { return pos.xy / (1.0 + invRadius * pos.z); }
|
|
4
4
|
|
|
5
5
|
vec2 selectOverlayUVNorm(vec2 normUV, float offsetUNorm) {
|
|
@@ -120,38 +120,35 @@ import{ComponentData as e}from"../views/3d/webgl-engine/collections/Component/Ma
|
|
|
120
120
|
vec3 upNormal = getLocalUp(positionWorld());
|
|
121
121
|
vec3 shadingNormal = ${M?`computeTextureNormal(tangentSpace, vuv0)`:`fragmentShadingNormal`};
|
|
122
122
|
|
|
123
|
-
float ssao =
|
|
124
|
-
${x(N,S`float snow =
|
|
125
|
-
materialColor.rgb = mix(materialColor.rgb, vec3(1.1), snow);
|
|
126
|
-
ssao = mix(ssao, 0.5 * ssao, snow);
|
|
123
|
+
float ssao = occlusion * evaluateAmbientOcclusionInverse();
|
|
124
|
+
${x(N,S`float snow = applySnow(fragmentFaceNormal, normalize(positionWorld(), materialColor.rgb, ssao));
|
|
127
125
|
shadingNormal = mix(shadingNormal, fragmentFaceNormal, snow);`)}
|
|
128
126
|
${x(R,`materialColor = compositeOverlayUnpremultiplied(materialColor, overlayColor);`)}
|
|
129
127
|
|
|
130
|
-
vec3 additionalLight = evaluateAdditionalLighting(ssao, positionWorld());
|
|
128
|
+
vec3 additionalLight = evaluateAdditionalLighting(1.0 - ssao, positionWorld());
|
|
131
129
|
${x(I,`float additionalAmbientScale = additionalDirectedAmbientLight(positionWorld());`)}
|
|
132
130
|
${x(I,`float shadow = max(lightingGlobalFactor * (1.0 - additionalAmbientScale), evaluateShadow());`,`float shadow = evaluateShadow();`)}
|
|
133
|
-
vec4 shadedColor = vec4(evaluateSceneLighting(shadingNormal, materialColor.rgb, shadow, ssao, additionalLight, viewDirection, upNormal), materialColor.a);
|
|
131
|
+
vec4 shadedColor = vec4(evaluateSceneLighting(shadingNormal, materialColor.rgb, shadow, 1.0 - ssao, additionalLight, viewDirection, upNormal), materialColor.a);
|
|
134
132
|
`)):(I&&k.uniforms.add(p),Q&&k.uniforms.add(t),k.uniforms.add(h).main.add(S`
|
|
135
133
|
${x(I,`float additionalAmbientScale = additionalDirectedAmbientLight(positionWorld());`)}
|
|
136
134
|
float shadow = ${P?I?`max(lightingGlobalFactor * (1.0 - additionalAmbientScale), evaluateShadow())`:`evaluateShadow()`:I?`lightingGlobalFactor * (1.0 - additionalAmbientScale)`:`0.0`};
|
|
135
|
+
float ssao = evaluateAmbientOcclusionInverse();
|
|
137
136
|
|
|
138
137
|
${x(P&&F!==1,S`
|
|
139
138
|
float dotFL = dot(fragmentFaceNormal, mainLightDirection);
|
|
140
139
|
if( dotFL <= 0.0) shadow = 1.0;
|
|
141
140
|
`)}
|
|
142
|
-
${x(N
|
|
143
|
-
materialColor.rgb = mix(materialColor.rgb, vec3(1), snow);`)}
|
|
141
|
+
${x(N,`float snow = applySnow(fragmentFaceNormal, normalize(positionWorld()), materialColor.rgb, ssao);`)}
|
|
144
142
|
|
|
145
143
|
vec3 viewDirection = normalize(vPositionWorldCameraRelative);
|
|
146
144
|
vec3 upNormal = getLocalUp(positionWorld());
|
|
147
145
|
|
|
148
146
|
// At global scale we create some additional ambient light based on the main light to simulate global illumination
|
|
149
|
-
|
|
150
|
-
vec3 additionalLight = evaluateAdditionalLighting(ssao, positionWorld());
|
|
147
|
+
vec3 additionalLight = evaluateAdditionalLighting(1.0 - ssao, positionWorld());
|
|
151
148
|
|
|
152
149
|
${x(R,`materialColor = compositeOverlayUnpremultiplied(materialColor, overlayColor);`)}
|
|
153
150
|
|
|
154
|
-
vec4 shadedColor = vec4(evaluateSceneLighting(fragmentShadingNormal, materialColor.rgb, shadow, ssao, additionalLight, viewDirection, upNormal), materialColor.a);
|
|
151
|
+
vec4 shadedColor = vec4(evaluateSceneLighting(fragmentShadingNormal, materialColor.rgb, shadow, 1.0 - ssao, additionalLight, viewDirection, upNormal), materialColor.a);
|
|
155
152
|
${x(Q,S`vec4 overlayWaterMask = getOverlayColor(waterNormals, overlayUVs);
|
|
156
153
|
float waterNormalLength = length(overlayWaterMask);
|
|
157
154
|
if (waterNormalLength > 0.95) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{Offset as e}from"../views/3d/webgl-engine/core/shaderLibrary/Offset.glsl.js";import{isColor as t}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{sliceDraw as n}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as r}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{InstancedDoublePrecision as i}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js";import{NormalAttribute as a}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{TextureCoordinateAttribute as o}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{VertexNormal as s}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexNormal.glsl.js";import{VerticalOffset as c}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VerticalOffset.glsl.js";import{DefaultMaterialAuxiliaryPasses as l}from"../views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js";import{DefaultMaterialExternalColor as u}from"../views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialExternalColor.glsl.js";import{ComputeNormalTexturePass as ee}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ComputeNormalTexture.glsl.js";import{EvaluateAmbientOcclusion as d}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientOcclusion.glsl.js";import{EvaluateSceneLighting as f,addAmbientBoostFactor as p}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import{lightingGlobalFactor as m,mainLightIntensity as h}from"../views/3d/webgl-engine/core/shaderLibrary/shading/lightingUniforms.js";import{Normals as g}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Normals.glsl.js";import{NormalUtils as _}from"../views/3d/webgl-engine/core/shaderLibrary/shading/NormalUtils.glsl.js";import{PhysicallyBasedRendering as v}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRendering.glsl.js";import{PhysicallyBasedRenderingParameters as y}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{readShadowPass as b,readShadowDraw as x}from"../views/3d/webgl-engine/core/shaderLibrary/shading/readShadow.glsl.js";import{colorTextureUV as S,normalTextureUV as C,emissiveTextureUV as w,occlusionTextureUV as T,metallicRoughnessTextureUV as E}from"../views/3d/webgl-engine/core/shaderLibrary/shading/TextureTransformUV.glsl.js";import{VisualVariables as D}from"../views/3d/webgl-engine/core/shaderLibrary/shading/VisualVariables.glsl.js";import{DiscardOrAdjustAlphaPass as O}from"../views/3d/webgl-engine/core/shaderLibrary/util/DiscardOrAdjustAlpha.glsl.js";import{addProjViewLocalOrigin as k,addCameraPosition as A}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float3PassUniform as j}from"../views/3d/webgl-engine/core/shaderModules/Float3PassUniform.js";import{If as M,glsl as N}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DPassUniform as P}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{
|
|
2
|
+
import{Offset as e}from"../views/3d/webgl-engine/core/shaderLibrary/Offset.glsl.js";import{isColor as t}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{sliceDraw as n}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as r}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{InstancedDoublePrecision as i}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js";import{NormalAttribute as a}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{TextureCoordinateAttribute as o}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{VertexNormal as s}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexNormal.glsl.js";import{VerticalOffset as c}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VerticalOffset.glsl.js";import{DefaultMaterialAuxiliaryPasses as l}from"../views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js";import{DefaultMaterialExternalColor as u}from"../views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialExternalColor.glsl.js";import{ComputeNormalTexturePass as ee}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ComputeNormalTexture.glsl.js";import{EvaluateAmbientOcclusion as d}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientOcclusion.glsl.js";import{EvaluateSceneLighting as f,addAmbientBoostFactor as p}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import{lightingGlobalFactor as m,mainLightIntensity as h}from"../views/3d/webgl-engine/core/shaderLibrary/shading/lightingUniforms.js";import{Normals as g}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Normals.glsl.js";import{NormalUtils as _}from"../views/3d/webgl-engine/core/shaderLibrary/shading/NormalUtils.glsl.js";import{PhysicallyBasedRendering as v}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRendering.glsl.js";import{PhysicallyBasedRenderingParameters as y}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{readShadowPass as b,readShadowDraw as x}from"../views/3d/webgl-engine/core/shaderLibrary/shading/readShadow.glsl.js";import{colorTextureUV as S,normalTextureUV as C,emissiveTextureUV as w,occlusionTextureUV as T,metallicRoughnessTextureUV as E}from"../views/3d/webgl-engine/core/shaderLibrary/shading/TextureTransformUV.glsl.js";import{VisualVariables as D}from"../views/3d/webgl-engine/core/shaderLibrary/shading/VisualVariables.glsl.js";import{DiscardOrAdjustAlphaPass as O}from"../views/3d/webgl-engine/core/shaderLibrary/util/DiscardOrAdjustAlpha.glsl.js";import{addProjViewLocalOrigin as k,addCameraPosition as A}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float3PassUniform as j}from"../views/3d/webgl-engine/core/shaderModules/Float3PassUniform.js";import{If as M,glsl as N}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DPassUniform as P}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{applySnow as F}from"../views/3d/webgl-engine/effects/snowcover/applySnow.glsl.js";import{outputColorHighlightOLID as I}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js";import{ShaderBuilder as te}from"../views/webgl/ShaderBuilder.js";function L(L){let R=new te,{attributes:z,vertex:B,fragment:V,varyings:H}=R,{output:U,normalType:W,offsetBackfaces:G,snowCover:K,pbrMode:q,textureAlphaPremultiplied:J,instancedDoublePrecision:Y,hasVertexColors:X,hasVertexTangents:Z,hasColorTexture:Q,hasNormalTexture:ne,hasNormalTextureTransform:re,hasColorTextureTransform:ie}=L;if(k(B,L),z.add(`position`,`vec3`),B.inputs.add(`position`,()=>`position`),H.add(`vpos`,`vec3`,{invariant:!0}),R.include(D,L),R.include(i,L),R.include(c,L),R.include(S,L),!t(U))return R.include(l,L),R;R.include(C,L),R.include(w,L),R.include(T,L),R.include(E,L),A(B,L),R.include(a,L),R.include(r);let $=W===0||W===1;return $&&G&&R.include(e),R.include(ee,L),R.include(s,L),H.add(`vPositionLocal`,`vec3`),R.include(o,L),R.include(u,L),R.include(Y?b:x,L),B.main.add(N`
|
|
3
3
|
forwardDefaultMaterialExternalColor();
|
|
4
4
|
|
|
5
5
|
vpos = getVertexInLocalOriginSpace();
|
|
@@ -51,10 +51,9 @@ import{Offset as e}from"../views/3d/webgl-engine/core/shaderLibrary/Offset.glsl.
|
|
|
51
51
|
vec3 shadingNormal = computeTextureNormal(tangentSpace, ${re?`normalUV`:`vuv0`});`:`vec3 shadingNormal = normal;`}
|
|
52
52
|
|
|
53
53
|
${M(K,N`
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
ssao = mix(ssao, 1.0, snow);`)}
|
|
54
|
+
float snow = applySnow(normal, upNormal, albedo, ssao);
|
|
55
|
+
shadingNormal = mix(shadingNormal, normal, snow);
|
|
56
|
+
`)}
|
|
58
57
|
|
|
59
58
|
vec3 additionalLight = ssao * mainLightIntensity * additionalAmbientScale * ambientBoostFactor * lightingGlobalFactor;
|
|
60
59
|
${M((q===1||q===2)&&K,`applySnowToMRR(snow);`)}
|
package/chunks/Path.glsl.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{Offset as e}from"../views/3d/webgl-engine/core/shaderLibrary/Offset.glsl.js";import{isColor as t}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{sliceDraw as n}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as r}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{PathVertexPosition as i}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/PathVertexPosition.glsl.js";import{outputDepth as a}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputDepth.glsl.js";import{OutputHighlight as o}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js";import{EvaluateAmbientOcclusion as s}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientOcclusion.glsl.js";import{EvaluateSceneLighting as c,addAmbientBoostFactor as l}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import{lightingGlobalFactor as u,mainLightIntensity as d}from"../views/3d/webgl-engine/core/shaderLibrary/shading/lightingUniforms.js";import{Normals as f}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Normals.glsl.js";import{NormalUtils as p}from"../views/3d/webgl-engine/core/shaderLibrary/shading/NormalUtils.glsl.js";import{PhysicallyBasedRenderingParameters as m}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{readShadowDraw as h}from"../views/3d/webgl-engine/core/shaderLibrary/shading/readShadow.glsl.js";import{viewNormal as g,nearFar as _}from"../views/3d/webgl-engine/core/shaderLibrary/util/cameraUniforms.js";import{ColorConversion as v}from"../views/3d/webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js";import{addProjViewLocalOrigin as y,addCameraPosition as b}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float3PassUniform as x}from"../views/3d/webgl-engine/core/shaderModules/Float3PassUniform.js";import{FloatPassUniform as S}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as C,If as w}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{
|
|
2
|
+
import{Offset as e}from"../views/3d/webgl-engine/core/shaderLibrary/Offset.glsl.js";import{isColor as t}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{sliceDraw as n}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as r}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{PathVertexPosition as i}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/PathVertexPosition.glsl.js";import{outputDepth as a}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputDepth.glsl.js";import{OutputHighlight as o}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js";import{EvaluateAmbientOcclusion as s}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientOcclusion.glsl.js";import{EvaluateSceneLighting as c,addAmbientBoostFactor as l}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import{lightingGlobalFactor as u,mainLightIntensity as d}from"../views/3d/webgl-engine/core/shaderLibrary/shading/lightingUniforms.js";import{Normals as f}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Normals.glsl.js";import{NormalUtils as p}from"../views/3d/webgl-engine/core/shaderLibrary/shading/NormalUtils.glsl.js";import{PhysicallyBasedRenderingParameters as m}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{readShadowDraw as h}from"../views/3d/webgl-engine/core/shaderLibrary/shading/readShadow.glsl.js";import{viewNormal as g,nearFar as _}from"../views/3d/webgl-engine/core/shaderLibrary/util/cameraUniforms.js";import{ColorConversion as v}from"../views/3d/webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js";import{addProjViewLocalOrigin as y,addCameraPosition as b}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float3PassUniform as x}from"../views/3d/webgl-engine/core/shaderModules/Float3PassUniform.js";import{FloatPassUniform as S}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as C,If as w}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{applySnow as T}from"../views/3d/webgl-engine/effects/snowcover/applySnow.glsl.js";import{outputColorHighlightOLID as E}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js";import{ShaderBuilder as D}from"../views/webgl/ShaderBuilder.js";function O(O){let k=new D,{vertex:A,fragment:j,varyings:M}=k;y(A,O),M.add(`vpos`,`vec3`,{invariant:!0}),k.include(i,O);let{output:N,pbrMode:P,snowCover:F,offsetBackfaces:I}=O,L=t(N),R=N===11;switch((L||R)&&(R?(k.varyings.add(`objectAndLayerIdColorVarying`,`vec4`),k.vertex.code.add(C`void forwardObjectAndLayerIdColor() {
|
|
3
3
|
objectAndLayerIdColorVarying = getOlidColor();
|
|
4
4
|
}`),k.fragment.code.add(C`void outputObjectAndLayerIdColor() {
|
|
5
5
|
fragColor = objectAndLayerIdColorVarying;
|
|
@@ -24,9 +24,7 @@ fragColor = objectAndLayerIdColorVarying;
|
|
|
24
24
|
vec3 albedo = vcolor.rgb * max(ambient, diffuse); // combine the old material parameters into a single one
|
|
25
25
|
float combinedOpacity = vcolor.a * opacity;
|
|
26
26
|
|
|
27
|
-
${w(F
|
|
28
|
-
albedo = mix(albedo, vec3(1), snow);
|
|
29
|
-
ssao = mix(ssao, 1.0, snow);`)}
|
|
27
|
+
${w(F,`float snow = applySnow(normal, upNormal, albedo, ssao);`)}
|
|
30
28
|
|
|
31
29
|
vec3 posWorld = vpos + localOrigin;
|
|
32
30
|
float additionalAmbientScale = additionalDirectedAmbientLight(posWorld);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{Offset as e}from"../views/3d/webgl-engine/core/shaderLibrary/Offset.glsl.js";import{isColor as t}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{sliceDraw as n}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as r}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{InstancedDoublePrecision as i}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js";import{NormalAttribute as a}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{TextureCoordinateAttribute as o}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{VerticalOffset as s}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VerticalOffset.glsl.js";import{DefaultMaterialAuxiliaryPasses as c}from"../views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js";import{DefaultMaterialExternalColor as l}from"../views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialExternalColor.glsl.js";import{EvaluateAmbientOcclusion as u}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientOcclusion.glsl.js";import{EvaluateSceneLighting as d,addAmbientBoostFactor as f}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import{mainLightDirection as p,lightingGlobalFactor as m,mainLightIntensity as h}from"../views/3d/webgl-engine/core/shaderLibrary/shading/lightingUniforms.js";import{NormalUtils as g}from"../views/3d/webgl-engine/core/shaderLibrary/shading/NormalUtils.glsl.js";import{PhysicallyBasedRendering as _}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRendering.glsl.js";import{PhysicallyBasedRenderingParameters as v}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{readShadowPass as y,readShadowDraw as b}from"../views/3d/webgl-engine/core/shaderLibrary/shading/readShadow.glsl.js";import{colorTextureUV as x,emissiveTextureUV as S}from"../views/3d/webgl-engine/core/shaderLibrary/shading/TextureTransformUV.glsl.js";import{VisualVariables as C}from"../views/3d/webgl-engine/core/shaderLibrary/shading/VisualVariables.glsl.js";import{DiscardOrAdjustAlphaPass as w}from"../views/3d/webgl-engine/core/shaderLibrary/util/DiscardOrAdjustAlpha.glsl.js";import{addProjViewLocalOrigin as T,addCameraPosition as E}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float3PassUniform as D}from"../views/3d/webgl-engine/core/shaderModules/Float3PassUniform.js";import{If as O,glsl as k}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DPassUniform as A}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{
|
|
2
|
+
import{Offset as e}from"../views/3d/webgl-engine/core/shaderLibrary/Offset.glsl.js";import{isColor as t}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{sliceDraw as n}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as r}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{InstancedDoublePrecision as i}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js";import{NormalAttribute as a}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{TextureCoordinateAttribute as o}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{VerticalOffset as s}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VerticalOffset.glsl.js";import{DefaultMaterialAuxiliaryPasses as c}from"../views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js";import{DefaultMaterialExternalColor as l}from"../views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialExternalColor.glsl.js";import{EvaluateAmbientOcclusion as u}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientOcclusion.glsl.js";import{EvaluateSceneLighting as d,addAmbientBoostFactor as f}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import{mainLightDirection as p,lightingGlobalFactor as m,mainLightIntensity as h}from"../views/3d/webgl-engine/core/shaderLibrary/shading/lightingUniforms.js";import{NormalUtils as g}from"../views/3d/webgl-engine/core/shaderLibrary/shading/NormalUtils.glsl.js";import{PhysicallyBasedRendering as _}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRendering.glsl.js";import{PhysicallyBasedRenderingParameters as v}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{readShadowPass as y,readShadowDraw as b}from"../views/3d/webgl-engine/core/shaderLibrary/shading/readShadow.glsl.js";import{colorTextureUV as x,emissiveTextureUV as S}from"../views/3d/webgl-engine/core/shaderLibrary/shading/TextureTransformUV.glsl.js";import{VisualVariables as C}from"../views/3d/webgl-engine/core/shaderLibrary/shading/VisualVariables.glsl.js";import{DiscardOrAdjustAlphaPass as w}from"../views/3d/webgl-engine/core/shaderLibrary/util/DiscardOrAdjustAlpha.glsl.js";import{addProjViewLocalOrigin as T,addCameraPosition as E}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float3PassUniform as D}from"../views/3d/webgl-engine/core/shaderModules/Float3PassUniform.js";import{If as O,glsl as k}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DPassUniform as A}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{applySnow as j}from"../views/3d/webgl-engine/effects/snowcover/applySnow.glsl.js";import{outputColorHighlightOLID as M}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js";import{ShaderBuilder as N}from"../views/webgl/ShaderBuilder.js";function P(P){let F=new N,{attributes:I,vertex:L,fragment:R,varyings:z}=F,{output:B,offsetBackfaces:V,pbrMode:H,snowCover:U}=P,W=H===1||H===2;if(T(L,P),I.add(`position`,`vec3`),L.inputs.add(`position`,()=>`position`),z.add(`vpos`,`vec3`,{invariant:!0}),F.include(C,P),F.include(i,P),F.include(s,P),F.include(x,P),!t(B))return F.include(c,P),F;F.include(S,P),E(F.vertex,P),F.include(a,P),F.include(r),V&&F.include(e),z.add(`vNormalWorld`,`vec3`),z.add(`localvpos`,`vec3`,{invariant:!0}),F.include(o,P),F.include(l,P),F.include(P.instancedDoublePrecision?y:b,P),L.main.add(k`
|
|
3
3
|
forwardDefaultMaterialExternalColor();
|
|
4
4
|
|
|
5
5
|
vpos = getVertexInLocalOriginSpace();
|
|
@@ -43,8 +43,8 @@ import{Offset as e}from"../views/3d/webgl-engine/core/shaderLibrary/Offset.glsl.
|
|
|
43
43
|
vec3 upNormal = getLocalUp(vpos, localOrigin);
|
|
44
44
|
|
|
45
45
|
${O(U,`vec3 faceNormal = screenDerivativeNormal(vpos);
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
float snow = applyRealisticTreeSnow(faceNormal, shadingNormal, upNormal, albedo, ssao);
|
|
47
|
+
`)}
|
|
48
48
|
|
|
49
49
|
${k`albedo *= 1.2;
|
|
50
50
|
vec3 viewForward = vec3(view[0][2], view[1][2], view[2][2]);
|
package/chunks/SSAO.glsl.js
CHANGED
|
@@ -51,8 +51,7 @@ return fallOffFunction(vv, vn, 0.1);
|
|
|
51
51
|
|
|
52
52
|
vec3 fres = normalize(2.0 * texture(rnm, uv * rnmScale).xyz - 1.0);
|
|
53
53
|
|
|
54
|
-
// note: the factor 2.0 should not be necessary, but makes ssao much nicer.
|
|
55
|
-
// bug or deviation from CE somewhere else?
|
|
54
|
+
// note: the factor 2.0 should not be necessary, but makes ssao much nicer. bug or deviation from CE somewhere else?
|
|
56
55
|
float ps = projScale / (2.0 * currentPixelPos.z * zScale.x + zScale.y);
|
|
57
56
|
|
|
58
57
|
for(int i = 0; i < ${u.int(16)}; ++i) {
|
package/config.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import"./core/has.js";import{deepMerge as e}from"./core/object.js";const t={apiKey:void 0,apiKeys:{scopes:[]},applicationName:``,applicationUrl:globalThis.location?.href,assetsPath:``,fontsUrl:`https://static.arcgis.com/fonts`,geometryServiceUrl:`https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer`,geoRSSServiceUrl:`https://utility.arcgis.com/sharing/rss`,kmlServiceUrl:`https://utility.arcgis.com/sharing/kml`,userPrivilegesApplied:!0,portalUrl:`https://www.arcgis.com`,respectPrefersReducedMotion:!0,routeServiceUrl:`https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World`,workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:[`arcgis.com`,`arcgisonline.com`,`esrikr.com`,`premiumservices.blackbridge.com`,`esripremium.accuweather.com`,`gbm.digitalglobe.com`,`firstlook.digitalglobe.com`,`msi.digitalglobe.com`],interceptors:[],internalInterceptors:[],maxUrlLength:2e3,priority:`high`,proxyRules:[],proxyUrl:null,timeout:62e3,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};globalThis.esriConfig&&(e(t,globalThis.esriConfig,!0),delete t.has),!t.assetsPath&&(t.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@6.0.0-next.
|
|
2
|
+
import"./core/has.js";import{deepMerge as e}from"./core/object.js";const t={apiKey:void 0,apiKeys:{scopes:[]},applicationName:``,applicationUrl:globalThis.location?.href,assetsPath:``,fontsUrl:`https://static.arcgis.com/fonts`,geometryServiceUrl:`https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer`,geoRSSServiceUrl:`https://utility.arcgis.com/sharing/rss`,kmlServiceUrl:`https://utility.arcgis.com/sharing/kml`,userPrivilegesApplied:!0,portalUrl:`https://www.arcgis.com`,respectPrefersReducedMotion:!0,routeServiceUrl:`https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World`,workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:[`arcgis.com`,`arcgisonline.com`,`esrikr.com`,`premiumservices.blackbridge.com`,`esripremium.accuweather.com`,`gbm.digitalglobe.com`,`firstlook.digitalglobe.com`,`msi.digitalglobe.com`],interceptors:[],internalInterceptors:[],maxUrlLength:2e3,priority:`high`,proxyRules:[],proxyUrl:null,timeout:62e3,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};globalThis.esriConfig&&(e(t,globalThis.esriConfig,!0),delete t.has),!t.assetsPath&&(t.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@6.0.0-next.23/assets`,t.defaultAssetsPath=t.assetsPath);export{t as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{ObjectStack as e}from"../../core/ObjectStack.js";import{length as t,add as n,scale as r}from"../../core/libs/gl-matrix-2/math/vec3.js";import{copy as i,fromValues as a,create as o}from"./ray.js";function s(e){return e?{ray:o(e.ray),c0:e.c0,c1:e.c1}:{ray:o(),c0:0,c1:Number.MAX_VALUE}}function c(e,t,n){let r=
|
|
2
|
+
import{ObjectStack as e}from"../../core/ObjectStack.js";import{length as t,add as n,scale as r}from"../../core/libs/gl-matrix-2/math/vec3.js";import{copy as i,fromValues as a,create as o}from"./ray.js";function s(e){return e?{ray:o(e.ray),c0:e.c0,c1:e.c1}:{ray:o(),c0:0,c1:Number.MAX_VALUE}}function c(e,t,n){let r=_.get();return r.ray=e,r.c0=t,r.c1=n,r}function l(e,t=s()){return u(e.ray,e.c0,e.c1,t)}function u(e,t,n,r=s()){return i(e,r.ray),r.c0=t,r.c1=n,r}function d(e,t=s()){return i(e,t.ray),t.c0=0,t.c1=Number.MAX_VALUE,t}function f(e,n,r=s()){let i=t(e.vector);return a(e.origin,n,r.ray),r.c0=0,r.c1=i,r}function p(e,t){return h(e,e.c0,t)}function m(e,t){return h(e,e.c1,t)}function h(e,t,i){return n(i,e.ray.origin,r(i,e.ray.direction,t))}function g(e,t,n,r){let i=r.ray.origin[e],a=r.ray.direction[e];if(Math.abs(a)<=2**-52)return r.c0<=r.c1&&i>=t&&i<=n;let o=(t-i)/a,s=(n-i)/a;return r.c0=Math.max(r.c0,Math.min(o,s)),r.c1=Math.min(r.c1,Math.max(o,s)),r.c0<=r.c1}const _=new e(()=>s());export{g as clipSlab,l as copy,s as create,f as fromLineSegmentAndDirection,d as fromRay,u as fromValues,h as getAt,m as getEnd,p as getStart,c as wrap};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{clamp as e}from"../../core/mathUtils.js";import{exactEquals as t,subtract as n,normalize as r,dot as i,lerp as a,copy as o,add as s,scale as c,cross as l,set as u,scaleAndAdd as d}from"../../core/libs/gl-matrix-2/math/vec3.js";import{create as f}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";import{equals as p,exactEquals as m}from"../../core/libs/gl-matrix-2/math/vec4.js";import{projectPointSignedLength as h}from"./vector.js";import{sv3d as g,sv4d as
|
|
2
|
+
import{clamp as e}from"../../core/mathUtils.js";import{exactEquals as t,subtract as n,normalize as r,dot as i,lerp as a,copy as o,add as s,scale as c,cross as l,set as u,scaleAndAdd as d}from"../../core/libs/gl-matrix-2/math/vec3.js";import{create as f}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";import{equals as p,exactEquals as m}from"../../core/libs/gl-matrix-2/math/vec4.js";import{projectPointSignedLength as h}from"./vector.js";import{sv3d as g,sv4d as _}from"./vectorStacks.js";import{tangentFrame as ee}from"../../views/3d/support/mathUtils.js";function v(e=Z){return[e[0],e[1],e[2],e[3]]}const te=m,ne=p;function re(e=Z[0],t=Z[1],n=Z[2],r=Z[3]){return x(e,t,n,r,_.get())}function y(e,t){return x(t[0],t[1],t[2],t[3],e)}function b(e){return e}function x(e,t,n,r,i=v()){return i[0]=e,i[1]=t,i[2]=n,i[3]=r,i}function S(e,t,n){return o(n,e),n[3]=t,n}function C(e,t,n){let r=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],i=Math.abs(r-1)>1e-5&&r>1e-12?1/Math.sqrt(r):1;return n[0]=t[0]*i,n[1]=t[1]*i,n[2]=t[2]*i,n[3]=-(n[0]*e[0]+n[1]*e[1]+n[2]*e[2]),n}function w(e,t,n,r=v()){let i=n[0]-t[0],a=n[1]-t[1],o=n[2]-t[2],s=e[0]-t[0],c=e[1]-t[1],l=e[2]-t[2],u=a*l-o*c,d=o*s-i*l,f=i*c-a*s,p=u*u+d*d+f*f,m=Math.abs(p-1)>1e-5&&p>1e-12?1/Math.sqrt(p):1;return r[0]=u*m,r[1]=d*m,r[2]=f*m,r[3]=-(r[0]*e[0]+r[1]*e[1]+r[2]*e[2]),r}function T(e,a,o,s=0,c=Math.floor(1/3*o),l=Math.floor(2/3*o)){if(o<3)return!1;a(D,s);let u=c,d=!1;for(;u<o-1&&!d;)a(O,u),u++,d=!t(D,O);if(!d)return!1;for(u=Math.max(u,l),d=!1;u<o&&!d;)a(k,u),u++,n(A,D,O),r(A,A),n(j,O,k),r(j,j),d=!t(D,k)&&!t(O,k)&&Math.abs(i(A,j))<ie;return d?(w(D,O,k,e),!0):s===0&&c===1&&l===2?!1:T(e,a,o,0,1,2)}function E(e,t,n=!0){let r=t.length/3;return T(e,(e,n)=>u(e,t[n*3+0],t[n*3+1],t[n*3+2]),n?r-1:r)}const ie=.99619469809,D=f(),O=f(),k=f(),A=f(),j=f();function ae(e,t,n){return t!==e&&y(e,t),e[3]=-i(b(e),n),e}function oe(e,t){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t}function se(e,t,n,r){return l(k,t,e),C(n,k,r)}function M(e,t,r,i){return Y(X(e,t,n(g.get(),r,t),ue,i))}function N(e,t,n){return t!=null&&Y(X(e,t.origin,t.direction,de,n))}function P(e,t,n){return Y(X(e,t.origin,t.vector,0,n))}function F(e,t,n){return Y(X(e,t.origin,t.vector,1,n))}function I(e,t){return q(e,t)<=0}function L(e,t){return q(e,t)>=0}function R(e,t){return V(e,t.ray.origin,t.ray.direction,t,!1,!1,!0,1e-6)}function z(e,t){return V(e,t.ray.origin,t.ray.direction,t,!1,!1,!1,1e-6)}function B(e,t){return t.c0<=t.c1&&V(e,t.ray.origin,t.ray.direction,t,!1,!0,!1,0)}function V(e,t,n,r,a,o,s,c){let l=i(b(e),n),u=q(e,t);if(l>=-c&&l<=c)return H(u,a,o);let d=-u/l,f=H(l,a,!1);return s&&!f&&!H(u,a,o)?!1:(f?d>r.c0&&(r.c0=d):d<r.c1&&(r.c1=d),r.c0<=r.c1)}function H(e,t,n){return n?t?e>=0:e<=0:t?e>0:e<0}function U(e,t,n,r=!1){let i=t.at(-1),s=q(e,i),c=r?s>0:s<=0;for(let l=0;l<t.length;l++){let u=t.at(l),d=q(e,u),f=r?d>0:d<=0;c!==f&&a(n(),i,u,s/(s-d)),f&&o(n(),u),i=u,s=d,c=f}}function W(e,t,r,i,a,o=!1){return n(Q,r,t),$.c0=0,$.c1=1,V(e,t,Q,$,o,!o,!1,1e-6)?(d(i,t,Q,$.c0),d(a,t,Q,$.c1),!0):!1}function G(e,t,r){let i=c(g.get(),b(e),-e[3]),a=K(e,n(g.get(),t,i),g.get());return s(r,a,i),r}function ce(e,t,r,i){let a=b(e),o=g.get(),s=g.get();ee(a,o,s);let c=n(g.get(),r,t),l=h(o,c),d=h(s,c),f=h(a,c);return u(i,l,d,f)}function K(e,t,r){let a=c(g.get(),b(e),i(b(e),t));return n(r,t,a),r}function le(e,t){return Math.abs(q(e,t))}function q(e,t){return i(b(e),t)+e[3]}function J(e,t,n){for(let r=0;r<n;++r)if(I(e,t[r]))return!1;return!0}function Y(e){return e===0||e===1}function X(t,n,r,a,o){let l=i(b(t),r),u=q(t,n);if(l===0)return u>=0?2:3;let d=-u/l;return a&1&&(d=e(d,0,1)),!(a&4)&&d<0||!(a&8)&&d>1?u>=0?2:3:(s(o,n,c(o,r,d)),u>=0?0:1)}const Z=[0,0,1,0],ue=12,de=8,Q=f(),$={c0:0,c1:1};export{J as areAllPointsOutside,R as clip,B as clipClosedNegativeHalfspace,z as clipInfinite,W as clipLineSegment,U as clipPolygon,y as copy,v as create,le as distance,ne as equals,te as exactEquals,E as fromArray,T as fromManyPoints,S as fromNormalAndOffset,w as fromPoints,C as fromPositionAndNormal,x as fromValues,se as fromVectorsAndPoint,b as getNormal,M as intersectLine,X as intersectLineOrRay,P as intersectLineSegment,F as intersectLineSegmentClamp,N as intersectRay,L as isPointInClosedPositiveHalfspace,I as isPointInside,oe as negate,G as projectPoint,ce as projectPointLocal,K as projectVector,ae as setOffsetFromPoint,q as signedDistance,Z as up,re as wrap};
|
package/interfaces.d.ts
CHANGED
|
@@ -13087,13 +13087,6 @@ declare namespace __esri {
|
|
|
13087
13087
|
export type DirectLineMeasurement3D = import("./widgets/DirectLineMeasurement3D.js").default;
|
|
13088
13088
|
export const DirectLineMeasurement3D: typeof import("./widgets/DirectLineMeasurement3D.js").default;
|
|
13089
13089
|
|
|
13090
|
-
/** @deprecated since 5.0. Refactor using \@arcgis/codemod */
|
|
13091
|
-
export type DirectionalPadProperties = import("./widgets/DirectionalPad.js").DirectionalPadProperties;
|
|
13092
|
-
|
|
13093
|
-
/** @deprecated since 5.0. Refactor using \@arcgis/codemod */
|
|
13094
|
-
export type DirectionalPad = import("./widgets/DirectionalPad.js").default;
|
|
13095
|
-
export const DirectionalPad: typeof import("./widgets/DirectionalPad.js").default;
|
|
13096
|
-
|
|
13097
13090
|
/** @deprecated since 5.0. Refactor using \@arcgis/codemod */
|
|
13098
13091
|
export type DirectionsProperties = import("./widgets/Directions.js").DirectionsProperties;
|
|
13099
13092
|
|
|
@@ -13640,23 +13633,6 @@ declare namespace __esri {
|
|
|
13640
13633
|
export type TimeZoneLabel = import("./widgets/TimeZoneLabel.js").default;
|
|
13641
13634
|
export const TimeZoneLabel: typeof import("./widgets/TimeZoneLabel.js").default;
|
|
13642
13635
|
|
|
13643
|
-
/** @deprecated since 5.0. Refactor using \@arcgis/codemod */
|
|
13644
|
-
export type TrackProperties = import("./widgets/Track.js").TrackProperties;
|
|
13645
|
-
|
|
13646
|
-
/** @deprecated since 5.0. Refactor using \@arcgis/codemod */
|
|
13647
|
-
export type Track = import("./widgets/Track.js").default;
|
|
13648
|
-
export const Track: typeof import("./widgets/Track.js").default;
|
|
13649
|
-
|
|
13650
|
-
/** @deprecated since 5.0. Refactor using \@arcgis/codemod */
|
|
13651
|
-
export type TrackTrackEvent = import("./widgets/Track/TrackViewModel.js").TrackViewModelTrackEvent;
|
|
13652
|
-
/** @deprecated since 5.0. Refactor using \@arcgis/codemod */
|
|
13653
|
-
export type TrackTrackEventHandler = (event: TrackTrackEvent) => void;
|
|
13654
|
-
|
|
13655
|
-
/** @deprecated since 5.0. Refactor using \@arcgis/codemod */
|
|
13656
|
-
export type TrackTrackErrorEvent = import("./widgets/Track/TrackViewModel.js").TrackViewModelTrackErrorEvent;
|
|
13657
|
-
/** @deprecated since 5.0. Refactor using \@arcgis/codemod */
|
|
13658
|
-
export type TrackTrackErrorEventHandler = (event: TrackTrackErrorEvent) => void;
|
|
13659
|
-
|
|
13660
13636
|
/** @deprecated since 5.0. Refactor using \@arcgis/codemod */
|
|
13661
13637
|
export type UtilityNetworkAssociationsProperties = import("./widgets/UtilityNetworkAssociations.js").UtilityNetworkAssociationsProperties;
|
|
13662
13638
|
|
|
@@ -14202,20 +14178,6 @@ declare namespace __esri {
|
|
|
14202
14178
|
/** @deprecated since 5.0. Refactor using \@arcgis/codemod */
|
|
14203
14179
|
export type DirectLineMeasurement3DViewModelMeasurement = import("./widgets/DirectLineMeasurement3D/DirectLineMeasurement3DViewModel.js").Measurement;
|
|
14204
14180
|
|
|
14205
|
-
/** @deprecated since 5.0. Refactor using \@arcgis/codemod */
|
|
14206
|
-
export type DirectionalPadViewModelProperties = import("./widgets/DirectionalPad/DirectionalPadViewModel.js").DirectionalPadViewModelProperties;
|
|
14207
|
-
|
|
14208
|
-
/** @deprecated since 5.0. Refactor using \@arcgis/codemod */
|
|
14209
|
-
export type DirectionalPadViewModel = import("./widgets/DirectionalPad/DirectionalPadViewModel.js").default;
|
|
14210
|
-
export const DirectionalPadViewModel: typeof import("./widgets/DirectionalPad/DirectionalPadViewModel.js").default;
|
|
14211
|
-
|
|
14212
|
-
/** @deprecated since 5.0. Refactor using \@arcgis/codemod */
|
|
14213
|
-
export type DirectionalPadVisibleElements = import("./widgets/DirectionalPad/VisibleElements.js").default;
|
|
14214
|
-
export const DirectionalPadVisibleElements: typeof import("./widgets/DirectionalPad/VisibleElements.js").default;
|
|
14215
|
-
|
|
14216
|
-
/** @deprecated since 5.0. Refactor using \@arcgis/codemod */
|
|
14217
|
-
export type Vector = import("./widgets/DirectionalPad/types.js").Vector;
|
|
14218
|
-
|
|
14219
14181
|
/** @deprecated since 5.0. Refactor using \@arcgis/codemod */
|
|
14220
14182
|
export type DirectionsViewModelProperties = import("./widgets/Directions/DirectionsViewModel.js").DirectionsViewModelProperties;
|
|
14221
14183
|
|
|
@@ -15616,23 +15578,6 @@ declare namespace __esri {
|
|
|
15616
15578
|
/** @deprecated since 5.0. Refactor using \@arcgis/codemod */
|
|
15617
15579
|
export type Action = import("./widgets/TimeSlider/types.js").Action;
|
|
15618
15580
|
|
|
15619
|
-
/** @deprecated since 5.0. Refactor using \@arcgis/codemod */
|
|
15620
|
-
export type TrackViewModelProperties = import("./widgets/Track/TrackViewModel.js").TrackViewModelProperties;
|
|
15621
|
-
|
|
15622
|
-
/** @deprecated since 5.0. Refactor using \@arcgis/codemod */
|
|
15623
|
-
export type TrackViewModel = import("./widgets/Track/TrackViewModel.js").default;
|
|
15624
|
-
export const TrackViewModel: typeof import("./widgets/Track/TrackViewModel.js").default;
|
|
15625
|
-
|
|
15626
|
-
/** @deprecated since 5.0. Refactor using \@arcgis/codemod */
|
|
15627
|
-
export type TrackViewModelTrackEvent = import("./widgets/Track/TrackViewModel.js").TrackViewModelTrackEvent;
|
|
15628
|
-
/** @deprecated since 5.0. Refactor using \@arcgis/codemod */
|
|
15629
|
-
export type TrackViewModelTrackEventHandler = (event: TrackViewModelTrackEvent) => void;
|
|
15630
|
-
|
|
15631
|
-
/** @deprecated since 5.0. Refactor using \@arcgis/codemod */
|
|
15632
|
-
export type TrackViewModelTrackErrorEvent = import("./widgets/Track/TrackViewModel.js").TrackViewModelTrackErrorEvent;
|
|
15633
|
-
/** @deprecated since 5.0. Refactor using \@arcgis/codemod */
|
|
15634
|
-
export type TrackViewModelTrackErrorEventHandler = (event: TrackViewModelTrackErrorEvent) => void;
|
|
15635
|
-
|
|
15636
15581
|
/** @deprecated since 5.0. Refactor using \@arcgis/codemod */
|
|
15637
15582
|
export type UtilityNetworkAssociationsViewModelProperties = import("./widgets/UtilityNetworkAssociations/UtilityNetworkAssociationsViewModel.js").UtilityNetworkAssociationsViewModelProperties;
|
|
15638
15583
|
|
package/kernel.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import"./core/has.js";import{addQueryParameter as e}from"./core/urlUtils.js";Symbol.dispose??=Symbol(`Symbol.dispose`),Symbol.asyncDispose??=Symbol(`Symbol.asyncDispose`);const t=`5.2`;let n=`5.2`;n=`6.0.0-next.
|
|
2
|
+
import"./core/has.js";import{addQueryParameter as e}from"./core/urlUtils.js";Symbol.dispose??=Symbol(`Symbol.dispose`),Symbol.asyncDispose??=Symbol(`Symbol.asyncDispose`);const t=`5.2`;let n=`5.2`;n=`6.0.0-next.23`;let r;function i(e){r=e}function a(t){let n=r?.findCredential(t);return n?.token?e(t,`token`,n.token):t}globalThis.$arcgis||Object.defineProperty(globalThis,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}});export{a as addTokenParameter,n as fullVersion,r as id,i as setId,t as version};
|
|
@@ -33,12 +33,16 @@ export interface FetchTileOptions extends AbortOptions {
|
|
|
33
33
|
|
|
34
34
|
/**
|
|
35
35
|
* ElevationLayer is a tile layer used for rendering elevations in [SceneViews](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/).
|
|
36
|
-
*
|
|
36
|
+
* The default [Terrain 3D](https://www.arcgis.com/home/item.html?id=7029fb60158543ad845c7e1527af11e4)
|
|
37
37
|
* can be added to the map by setting the [map's ground](https://developers.arcgis.com/javascript/latest/references/core/Map/#ground) property to `world-elevation`.
|
|
38
38
|
*
|
|
39
39
|
*
|
|
40
40
|
* 
|
|
41
41
|
*
|
|
42
|
+
* Custom elevation layers can supplement the default Terrain 3D elevation layer with higher-resolution
|
|
43
|
+
* elevation data or representing another scenario or point in time for an area of interest.
|
|
44
|
+
* Elevation sources must be published as cached image services.
|
|
45
|
+
*
|
|
42
46
|
* Elevation layers are set in the [Ground.layers](https://developers.arcgis.com/javascript/latest/references/core/Ground/#layers) property of a
|
|
43
47
|
* [map's ground](https://developers.arcgis.com/javascript/latest/references/core/Map/#ground). They should not be added to the
|
|
44
48
|
* map's [operational layers](https://developers.arcgis.com/javascript/latest/references/core/Map/#layers).
|
|
@@ -46,7 +50,7 @@ export interface FetchTileOptions extends AbortOptions {
|
|
|
46
50
|
* ```js
|
|
47
51
|
* let elevLyr = new ElevationLayer({
|
|
48
52
|
* // Custom elevation service
|
|
49
|
-
* url: "https://
|
|
53
|
+
* url: "https://tiles.arcgis.com/tiles/V6ZHFr6zdgNZuVG0/arcgis/rest/services/ELEV__3857__US_Oso__LandslideAfter/ImageServer"
|
|
50
54
|
* });
|
|
51
55
|
* // Add elevation layer to the map's ground.
|
|
52
56
|
* map.ground.layers.add(elevLyr);
|
package/layers/GeoJSONLayer.d.ts
CHANGED
|
@@ -6,7 +6,6 @@ import type FeatureTemplate from "./support/FeatureTemplate.js";
|
|
|
6
6
|
import type Field from "./support/Field.js";
|
|
7
7
|
import type FieldsIndex from "./support/FieldsIndex.js";
|
|
8
8
|
import type LabelClass from "./support/LabelClass.js";
|
|
9
|
-
import type TimeInfo from "./support/TimeInfo.js";
|
|
10
9
|
import type PortalItem from "../portal/PortalItem.js";
|
|
11
10
|
import type AttributeBinsFeatureSet from "../rest/support/AttributeBinsFeatureSet.js";
|
|
12
11
|
import type FeatureSet from "../rest/support/FeatureSet.js";
|
|
@@ -43,7 +42,6 @@ import type { TimeZone } from "../time/types.js";
|
|
|
43
42
|
import type { ObjectId } from "../views/types.js";
|
|
44
43
|
import type { TimeExtentProperties } from "../time/TimeExtent.js";
|
|
45
44
|
import type { TimeIntervalProperties } from "../time/TimeInterval.js";
|
|
46
|
-
import type { TimeInfoProperties } from "./support/TimeInfo.js";
|
|
47
45
|
import type { AttributeTableTemplateProperties } from "../tables/AttributeTableTemplate.js";
|
|
48
46
|
import type { ElevationInfoProperties } from "../symbols/support/ElevationInfo.js";
|
|
49
47
|
import type { FieldProperties } from "./support/Field.js";
|
|
@@ -400,58 +398,6 @@ export interface GeoJSONLayerProperties extends LayerProperties, PortalLayerProp
|
|
|
400
398
|
* });
|
|
401
399
|
*/
|
|
402
400
|
timeExtent?: TimeExtentProperties | null;
|
|
403
|
-
/**
|
|
404
|
-
* TimeInfo provides information such as date fields that store [start](https://developers.arcgis.com/javascript/latest/references/core/layers/support/TimeInfo/#startField)
|
|
405
|
-
* and [end](https://developers.arcgis.com/javascript/latest/references/core/layers/support/TimeInfo/#endField) time
|
|
406
|
-
* for each feature and the [TimeInfo.fullTimeExtent](https://developers.arcgis.com/javascript/latest/references/core/layers/support/TimeInfo/#fullTimeExtent)
|
|
407
|
-
* for the layer. The `timeInfo` property, along with its `startField` and `endField` properties, must be set at the
|
|
408
|
-
* time of layer initialization if it is being set for a [GeoJSONLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/GeoJSONLayer/).
|
|
409
|
-
* The timeInfo parameters cannot be changed after the layer is [loaded](https://developers.arcgis.com/javascript/latest/references/core/layers/GeoJSONLayer/#loaded).
|
|
410
|
-
* The [TimeInfo.fullTimeExtent](https://developers.arcgis.com/javascript/latest/references/core/layers/support/TimeInfo/#fullTimeExtent) for `timeInfo` is
|
|
411
|
-
* automatically calculated based on its `startField` and `endField` properties.
|
|
412
|
-
*
|
|
413
|
-
* @since 4.11
|
|
414
|
-
* @example
|
|
415
|
-
* // create geojson layer from usgs earthquakes geojson feed
|
|
416
|
-
* const geojsonLayer = new GeoJSONLayer({
|
|
417
|
-
* url: "https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_month.geojson",
|
|
418
|
-
* copyright: "USGS Earthquakes",
|
|
419
|
-
* fields: [
|
|
420
|
-
* { "name": "mag", "type": "double" },
|
|
421
|
-
* { "name": "place", "type": "string" },
|
|
422
|
-
* { "name": "time", "type": "date" }, // date field
|
|
423
|
-
* { "name": "depth", "type": "double" }
|
|
424
|
-
* ],
|
|
425
|
-
* // timeInfo can be used to do temporal queries
|
|
426
|
-
* // set the startField.
|
|
427
|
-
* // timeExtent is automatically calculated from the start and end date fields
|
|
428
|
-
* // The date values must be in milliseconds number from the UNIX epoch specified in UTC.
|
|
429
|
-
* timeInfo: {
|
|
430
|
-
* startField: "time"
|
|
431
|
-
* }
|
|
432
|
-
* });
|
|
433
|
-
* @example
|
|
434
|
-
* // create geojson layer from usgs earthquakes geojson feed
|
|
435
|
-
* const geojsonLayer = new GeoJSONLayer({
|
|
436
|
-
* url: "https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_month.geojson",
|
|
437
|
-
* copyright: "USGS Earthquakes",
|
|
438
|
-
* fields: [
|
|
439
|
-
* { "name": "mag", "type": "double" },
|
|
440
|
-
* { "name": "place", "type": "string" },
|
|
441
|
-
* { "name": "time", "type": "date" }, // date field
|
|
442
|
-
* { "name": "depth", "type": "double" }
|
|
443
|
-
* ],
|
|
444
|
-
* // timeInfo can be used to do temporal queries
|
|
445
|
-
* // set the startField and endField.
|
|
446
|
-
* // timeExtent is automatically calculated from the
|
|
447
|
-
* // the start and end date fields
|
|
448
|
-
* // The date values must be in milliseconds number from the UNIX epoch specified in UTC.
|
|
449
|
-
* timeInfo: {
|
|
450
|
-
* startField: "time"
|
|
451
|
-
* }
|
|
452
|
-
* });
|
|
453
|
-
*/
|
|
454
|
-
timeInfo?: TimeInfoProperties | null;
|
|
455
401
|
/**
|
|
456
402
|
* A temporary offset of the time data based on a certain [TimeInterval](https://developers.arcgis.com/javascript/latest/references/core/time/TimeInterval/). This allows
|
|
457
403
|
* users to overlay features from two or more time-aware layers with different time extents.
|
|
@@ -484,6 +430,7 @@ export interface GeoJSONLayerProperties extends LayerProperties, PortalLayerProp
|
|
|
484
430
|
* }
|
|
485
431
|
* }
|
|
486
432
|
* });
|
|
433
|
+
* @see [Sample - Time Bar with actions and layer timeOffset](https://developers.arcgis.com/javascript/latest/sample-code/time-bar-time-offset/)
|
|
487
434
|
* @example
|
|
488
435
|
* // Offset a CSV Layer containing hurricanes from 2015 so that they appear in 2019 (+4 years).
|
|
489
436
|
* let layer = new CSVLayer({
|
|
@@ -1214,59 +1161,6 @@ export default class GeoJSONLayer extends GeoJSONLayerSuperclass {
|
|
|
1214
1161
|
*/
|
|
1215
1162
|
get timeExtent(): TimeExtent | null | undefined;
|
|
1216
1163
|
set timeExtent(value: TimeExtentProperties | null | undefined);
|
|
1217
|
-
/**
|
|
1218
|
-
* TimeInfo provides information such as date fields that store [start](https://developers.arcgis.com/javascript/latest/references/core/layers/support/TimeInfo/#startField)
|
|
1219
|
-
* and [end](https://developers.arcgis.com/javascript/latest/references/core/layers/support/TimeInfo/#endField) time
|
|
1220
|
-
* for each feature and the [TimeInfo.fullTimeExtent](https://developers.arcgis.com/javascript/latest/references/core/layers/support/TimeInfo/#fullTimeExtent)
|
|
1221
|
-
* for the layer. The `timeInfo` property, along with its `startField` and `endField` properties, must be set at the
|
|
1222
|
-
* time of layer initialization if it is being set for a [GeoJSONLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/GeoJSONLayer/).
|
|
1223
|
-
* The timeInfo parameters cannot be changed after the layer is [loaded](https://developers.arcgis.com/javascript/latest/references/core/layers/GeoJSONLayer/#loaded).
|
|
1224
|
-
* The [TimeInfo.fullTimeExtent](https://developers.arcgis.com/javascript/latest/references/core/layers/support/TimeInfo/#fullTimeExtent) for `timeInfo` is
|
|
1225
|
-
* automatically calculated based on its `startField` and `endField` properties.
|
|
1226
|
-
*
|
|
1227
|
-
* @since 4.11
|
|
1228
|
-
* @example
|
|
1229
|
-
* // create geojson layer from usgs earthquakes geojson feed
|
|
1230
|
-
* const geojsonLayer = new GeoJSONLayer({
|
|
1231
|
-
* url: "https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_month.geojson",
|
|
1232
|
-
* copyright: "USGS Earthquakes",
|
|
1233
|
-
* fields: [
|
|
1234
|
-
* { "name": "mag", "type": "double" },
|
|
1235
|
-
* { "name": "place", "type": "string" },
|
|
1236
|
-
* { "name": "time", "type": "date" }, // date field
|
|
1237
|
-
* { "name": "depth", "type": "double" }
|
|
1238
|
-
* ],
|
|
1239
|
-
* // timeInfo can be used to do temporal queries
|
|
1240
|
-
* // set the startField.
|
|
1241
|
-
* // timeExtent is automatically calculated from the start and end date fields
|
|
1242
|
-
* // The date values must be in milliseconds number from the UNIX epoch specified in UTC.
|
|
1243
|
-
* timeInfo: {
|
|
1244
|
-
* startField: "time"
|
|
1245
|
-
* }
|
|
1246
|
-
* });
|
|
1247
|
-
* @example
|
|
1248
|
-
* // create geojson layer from usgs earthquakes geojson feed
|
|
1249
|
-
* const geojsonLayer = new GeoJSONLayer({
|
|
1250
|
-
* url: "https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_month.geojson",
|
|
1251
|
-
* copyright: "USGS Earthquakes",
|
|
1252
|
-
* fields: [
|
|
1253
|
-
* { "name": "mag", "type": "double" },
|
|
1254
|
-
* { "name": "place", "type": "string" },
|
|
1255
|
-
* { "name": "time", "type": "date" }, // date field
|
|
1256
|
-
* { "name": "depth", "type": "double" }
|
|
1257
|
-
* ],
|
|
1258
|
-
* // timeInfo can be used to do temporal queries
|
|
1259
|
-
* // set the startField and endField.
|
|
1260
|
-
* // timeExtent is automatically calculated from the
|
|
1261
|
-
* // the start and end date fields
|
|
1262
|
-
* // The date values must be in milliseconds number from the UNIX epoch specified in UTC.
|
|
1263
|
-
* timeInfo: {
|
|
1264
|
-
* startField: "time"
|
|
1265
|
-
* }
|
|
1266
|
-
* });
|
|
1267
|
-
*/
|
|
1268
|
-
get timeInfo(): TimeInfo | null | undefined;
|
|
1269
|
-
set timeInfo(value: TimeInfoProperties | null | undefined);
|
|
1270
1164
|
/**
|
|
1271
1165
|
* A temporary offset of the time data based on a certain [TimeInterval](https://developers.arcgis.com/javascript/latest/references/core/time/TimeInterval/). This allows
|
|
1272
1166
|
* users to overlay features from two or more time-aware layers with different time extents.
|
|
@@ -1299,6 +1193,7 @@ export default class GeoJSONLayer extends GeoJSONLayerSuperclass {
|
|
|
1299
1193
|
* }
|
|
1300
1194
|
* }
|
|
1301
1195
|
* });
|
|
1196
|
+
* @see [Sample - Time Bar with actions and layer timeOffset](https://developers.arcgis.com/javascript/latest/sample-code/time-bar-time-offset/)
|
|
1302
1197
|
* @example
|
|
1303
1198
|
* // Offset a CSV Layer containing hurricanes from 2015 so that they appear in 2019 (+4 years).
|
|
1304
1199
|
* let layer = new CSVLayer({
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{__addDisposableResource as e,__disposeResources as t,__decorate as n}from"tslib";import{isSome as r}from"../core/arrayUtils.js";import{
|
|
2
|
+
import{__addDisposableResource as e,__disposeResources as t,__decorate as n}from"tslib";import{isSome as r}from"../core/arrayUtils.js";import{result as i,assertResult as a}from"../core/asyncUtils.js";import{ClonableMixin as o}from"../core/Clonable.js";import s from"../core/Error.js";import{abortHandle as c,disposable as l,makeHandle as u}from"../core/handleUtils.js";import has from"../core/has.js";import d from"../core/Logger.js";import{MultiOriginJSONSupportMixin as f}from"../core/MultiOriginJSONSupport.js";import{throwIfAborted as p,throwIfAbortError as m}from"../core/promiseUtils.js";import{on as h,sync as g,watch as _}from"../core/reactiveUtils.js";import{property as v,subclass as y}from"../core/accessorSupport/decorators.js";import{persistable as b}from"../core/accessorSupport/decorators/persistable.js";import x from"./Layer.js";import{APIKeyMixin as S}from"./mixins/APIKeyMixin.js";import{ArcGISService as C}from"./mixins/ArcGISService.js";import{CustomParametersMixin as w}from"./mixins/CustomParametersMixin.js";import{OperationalLayer as T}from"./mixins/OperationalLayer.js";import{PortalLayer as E}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as D}from"./mixins/ScaleRangeLayer.js";import{SceneService as O}from"./mixins/SceneService.js";import{elevationInfo as k}from"./support/commonProperties.js";import{GeometryDescriptor as A}from"./support/GeometryDescriptor.js";import{queryIntegratedMeshElevation as j,defaultNoDataValue as M}from"./support/I3SIntegratedMeshElevationQuery.js";import{I3SNodePageDefinition as N,I3SMaterialDefinition as P,I3STextureSetDefinition as F,I3SGeometryDefinition as I}from"./support/I3SLayerDefinitions.js";import L from"./support/SceneModifications.js";import{logInvalidElevationInfoWarning as R,elevationModeRequiredMessage as z,featureExpressionUnsupportedMessage as B}from"../support/elevationInfoUtils.js";import{isGround as V}from"../support/groundInstanceUtils.js";import{f as H}from"../chunks/persistableUrlUtils.js";import{isBasemap as U}from"../support/userTypeGuards/isBasemap.js";import{SceneLayerWorkerHandle as W}from"../views/3d/layers/SceneLayerWorkerHandle.js";import{I3SDataRequester as G}from"../views/3d/layers/i3s/I3SDataRequester.js";import K from"../views/3d/layers/i3s/I3SNodeLoader.js";import{ImmediateTask as q}from"../views/support/Scheduler.js";import{reader as J}from"../core/accessorSupport/decorators/reader.js";let Y=class extends O(C(T(E(D(f(w(S(o(x))))))))){constructor(...e){super(...e),this.geometryType=`mesh`,this.operationalLayerType=`IntegratedMeshLayer`,this.type=`integrated-mesh`,this.nodePages=null,this.materialDefinitions=null,this.textureSetDefinitions=null,this.geometryDefinitions=null,this.serviceUpdateTimeStamp=null,this.profile=`mesh-pyramids`,this.modifications=null,this._modificationsSource=null,this.path=null,this.definitionExpression=null,this._elevationQueryAbortController=new AbortController,this._elevationQueryWorkerContext=`i3s-elevation-query-${this.uid}`,this._elevationQueryWorkerHandle=null,this._elevationQueryWorkerSetup=null,this._modificationsGeneration=0}destroy(){this._elevationQueryAbortController.abort();let e=this._elevationQueryWorkerHandle;this._elevationQueryWorkerHandle=null,this._elevationQueryWorkerSetup=null,e?.destroyContextAndSelf(this._elevationQueryWorkerContext),super.destroy()}initialize(){this.addHandles([h(()=>this.modifications,`after-changes`,()=>{this.modifications=this.modifications,this._modificationsGeneration++},g),_(()=>this.modifications,()=>this._modificationsGeneration++,g),_(()=>this.memoizedElevationQueryDependencies,()=>this._abortElevationQueriesAfterDependencyChange(),g)])}normalizeCtorArgs(e,t){return typeof e==`string`?{url:e,...t}:e}readModifications(e,t,n){this._modificationsSource={url:H(e,n),context:n}}set elevationInfo(e){(e==null||e.mode===`absolute-height`)&&this._set(`elevationInfo`,e),this._validateElevationInfo(e)}async load(e){return this.addResolvingPromise(this._doLoad(e)),this}get _elevationQueryWorker(){return this._elevationQueryWorkerHandle??=new W((e,t)=>q.schedule(e,t))}get memoizedElevationQueryDependencies(){return[this.elevationInfo?.offset,this._modificationsGeneration]}async queryElevation(n,a,o){let s={stack:[],error:void 0,hasError:!1};try{let t=o?.noDataValue??Number.MAX_VALUE,d=this._elevationQueryWorker,f=new AbortController;n.addHandles(c(f),f),e(s,l(u(()=>n.removeHandles(f))),!1);let m=AbortSignal.any([o?.signal,this._elevationQueryAbortController.signal,f.signal].filter(r));await this.load({signal:m}),p(m);let h=A.fromGeometry(a),g={signal:m,elevationOffset:this.elevationInfo?.offset??0,scheduler:n.resourceController.scheduler};if(this._elevationQueryWorkerSetup==null){let e=this.store?.defaultGeometrySchema;e!=null&&(this._elevationQueryWorkerSetup=i(d.setLegacySchema(this._elevationQueryWorkerContext,e)))}let _=await j(this,h,g);p(m);let v=_.coordinates[0].z===M;v&&(_.coordinates[0].z=t);let y=await _.project(a.spatialReference,m);p(m);let b=y??h.clone(),x={geometry:b.export(),noDataValue:t};return o?.returnSampleInfo&&(x.sampleInfo=b.coordinates.map(()=>({demResolution:v?-1:1}))),x}catch(e){s.error=e,s.hasError=!0}finally{t(s)}}_abortElevationQueriesAfterDependencyChange(){let e=this._elevationQueryAbortController;this._elevationQueryAbortController=new AbortController,e.abort()}async processElevationQueryGeometry(e,t){let n=await this._elevationQueryWorkerSetup;return n!=null&&a(n),p(t),this._elevationQueryWorker.invoke(e,t)}async _doLoad(e){let t=e?.signal;try{await this.loadFromPortal({supportedTypes:[`Scene Service`]},e)}catch(e){m(e)}if(p(t),await this._fetchService(t),p(t),this._modificationsSource!=null){let n=await L.fromUrl(this._modificationsSource.url,this.spatialReference,e);p(t),this.setAtOrigin(`modifications`,n,this._modificationsSource.context.origin),this._modificationsSource=null}await this._fetchIndexAndUpdateExtent(this.nodePages,t),p(t)}beforeSave(){if(this._modificationsSource!=null)return this.load().then(()=>{},()=>{})}async saveAs(e,t){return this._debouncedSaveOperations(1,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:`integrated-mesh`},e)}async save(){return this._debouncedSaveOperations(0,{getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:`integrated-mesh`})}get isUsedAsGroundLayer(){return!has(`enable-feature:im-as-ground`)||U(this.parent)||V(this.parent)}get replacesTerrain(){return!1}validateLayer(e){if(e.layerType&&e.layerType!==`IntegratedMesh`)throw new s(`integrated-mesh-layer:layer-type-not-supported`,`IntegratedMeshLayer does not support this layer type`,{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new s(`layer:service-version-not-supported`,`Service version is not supported.`,{serviceVersion:this.version.versionString,supportedVersions:`1.x`});if(this.version.major>1)throw new s(`layer:service-version-too-new`,`Service version is too new.`,{serviceVersion:this.version.versionString,supportedVersions:`1.x`})}_getTypeKeywords(){return[`IntegratedMeshLayer`]}get elevationQueryDataRequester(){return new G(this.customParameters,this.apiKey)}get elevationQueryNodeLoader(){return new K(this,this.elevationQueryDataRequester,d.getLogger(`esri.layers.IntegratedMeshLayer`),this.store?.defaultGeometrySchema,[],{loadFeatureData:!1,textureUsageMask:0})}_validateElevationInfo(e){let t=`Integrated mesh layers`;R(d.getLogger(this),z(t,`absolute-height`,e)),R(d.getLogger(this),B(t,e))}};n([v({type:String,readOnly:!0})],Y.prototype,`geometryType`,void 0),n([v({type:[`show`,`hide`]})],Y.prototype,`listMode`,void 0),n([v({type:[`IntegratedMeshLayer`]})],Y.prototype,`operationalLayerType`,void 0),n([v({json:{read:!1},readOnly:!0})],Y.prototype,`type`,void 0),n([v({type:N,readOnly:!0,clonable:!1})],Y.prototype,`nodePages`,void 0),n([v({type:[P],readOnly:!0,clonable:!1})],Y.prototype,`materialDefinitions`,void 0),n([v({type:[F],readOnly:!0,clonable:!1})],Y.prototype,`textureSetDefinitions`,void 0),n([v({type:[I],readOnly:!0,clonable:!1})],Y.prototype,`geometryDefinitions`,void 0),n([v({readOnly:!0})],Y.prototype,`serviceUpdateTimeStamp`,void 0),n([v({type:L,clonable:e=>e?.clone()??e}),b({origins:[`web-scene`,`portal-item`],type:`resource`,prefix:`modifications`})],Y.prototype,`modifications`,void 0),n([v({clonable:e=>e?{...e}:null})],Y.prototype,`_modificationsSource`,void 0),n([J([`web-scene`,`portal-item`],`modifications`)],Y.prototype,`readModifications`,null),n([v(k)],Y.prototype,`elevationInfo`,null),n([v({type:String,json:{origins:{"web-scene":{read:!0,write:!0},"portal-item":{read:!0,write:!0}},read:!1}})],Y.prototype,`path`,void 0),n([v({clonable:!1})],Y.prototype,`_elevationQueryWorker`,null),n([v()],Y.prototype,`_modificationsGeneration`,void 0),n([v()],Y.prototype,`memoizedElevationQueryDependencies`,null),n([v()],Y.prototype,`isUsedAsGroundLayer`,null),n([v()],Y.prototype,`replacesTerrain`,null),n([v({clonable:!1})],Y.prototype,`elevationQueryDataRequester`,null),n([v({clonable:!1})],Y.prototype,`elevationQueryNodeLoader`,null),Y=n([y(`esri.layers.IntegratedMeshLayer`)],Y);const X=Y;export{X as default};
|