@arcgis/core 5.0.0-next.31 → 5.0.0-next.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/applications/SceneViewer/sceneViewerUtils.d.ts +3 -0
- package/applications/SceneViewer/sceneViewerUtils.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/1dd867fa7c58c06b79ea.js +1 -0
- package/assets/esri/core/workers/chunks/22d66d1c8dfccdbbcf30.js +1 -0
- package/assets/esri/core/workers/chunks/22f745539ca54d8cd30d.js +1 -0
- package/assets/esri/core/workers/chunks/2613e482450b57f2d4f5.js +1 -0
- package/assets/esri/core/workers/chunks/27bd88e1101873d4ce12.js +1 -0
- package/assets/esri/core/workers/chunks/{1dfca37f95f2b968aa54.js → 39d2b540738431adec98.js} +1 -1
- package/assets/esri/core/workers/chunks/{5f2cf73fb2944f82661d.js → 433d249c35c56bf15806.js} +34 -34
- package/assets/esri/core/workers/chunks/446f76356fc116204ec3.js +1 -0
- package/assets/esri/core/workers/chunks/44b6b7418cbf7f778bef.js +1 -0
- package/assets/esri/core/workers/chunks/4675ed3ca3e0104d00bf.js +1 -0
- package/assets/esri/core/workers/chunks/4df7cc3477bc46fc39af.js +1 -0
- package/assets/esri/core/workers/chunks/52ecbaa2d32692d6d8df.js +1 -0
- package/assets/esri/core/workers/chunks/{3777b41b4fa2f1418402.js → 55818fe7a7aa1e5c8bbd.js} +1 -1
- package/assets/esri/core/workers/chunks/{7e6fae3660e7a6a0fa16.js → 5f781ef46ce7c4048c2f.js} +1 -1
- package/assets/esri/core/workers/chunks/63933cbcb5c12df09715.js +1 -0
- package/assets/esri/core/workers/chunks/706423d801fa9cbf2e90.js +1 -0
- package/assets/esri/core/workers/chunks/{e6df4327ac1d9b65b80d.js → 71dd80231ea656a6380c.js} +1 -1
- package/assets/esri/core/workers/chunks/725819839434c59102f3.js +1 -0
- package/assets/esri/core/workers/chunks/72cebf18da5ec5eeb666.js +1 -0
- package/assets/esri/core/workers/chunks/{bd58c027408dc858f23c.js → 77b45957cfe42523c1c8.js} +1 -1
- package/assets/esri/core/workers/chunks/{b2fbb44e219232e61cbd.js → 794960ec36e11f4416c2.js} +1 -1
- package/assets/esri/core/workers/chunks/852de585a72d902344a6.js +1 -0
- package/assets/esri/core/workers/chunks/{25fd0884dd14973c89f5.js → 866a608d489bf56bc371.js} +1 -1
- package/assets/esri/core/workers/chunks/871dd5e1f016a04b8d98.js +1 -0
- package/assets/esri/core/workers/chunks/892c417f5130b003889d.js +1 -0
- package/assets/esri/core/workers/chunks/{0bfb7db0a151a5e85dd1.js → 8ad6595ad44c2d60c1ce.js} +1 -1
- package/assets/esri/core/workers/chunks/907083c427d7fb4354e9.js +1 -0
- package/assets/esri/core/workers/chunks/{11bb437437272d8f3e2c.js → 9252854b512237b6a0ef.js} +1 -1
- package/assets/esri/core/workers/chunks/{e615983fab688d515205.js → 944dfa9309da8f49a616.js} +1 -1
- package/assets/esri/core/workers/chunks/{f2f4e34247882eceb50d.js → a2cee5ac0d4df0108425.js} +3 -3
- package/assets/esri/core/workers/chunks/a4b7ba8aec109beb5b4d.js +1 -0
- package/assets/esri/core/workers/chunks/{3bacd904cd93c8013f6a.js → ae793d814cf32db9fbde.js} +1 -1
- package/assets/esri/core/workers/chunks/{e0b70652da4a7f672cfc.js → b21cf62652ca772108c8.js} +1 -1
- package/assets/esri/core/workers/chunks/c2596f48b37092dd566c.js +1 -0
- package/assets/esri/core/workers/chunks/c82a974c8448407885e6.js +1 -0
- package/assets/esri/core/workers/chunks/c9c2e00fed979c21e2f0.js +1 -0
- package/assets/esri/core/workers/chunks/{94005916d321c879bea1.js → cb500d673ca7ec1ef945.js} +1 -1
- package/assets/esri/core/workers/chunks/d239a4ef60e348cfb05a.js +1 -0
- package/assets/esri/core/workers/chunks/d6d03f22c91f528b97e5.js +1 -0
- package/assets/esri/core/workers/chunks/{4ab89c990a82c745c0fd.js → d764b6273974f4bca31b.js} +1 -1
- package/assets/esri/core/workers/chunks/d86e59da76eea888ba86.js +1 -0
- package/assets/esri/core/workers/chunks/da517b4b07d4d27ce94c.js +1 -0
- package/assets/esri/core/workers/chunks/dc3a4ad62bc041a4f899.js +1 -0
- package/assets/esri/core/workers/chunks/defc6b50df5018bd9e86.js +1 -0
- package/assets/esri/core/workers/chunks/df458ad51be27df3d79d.js +1 -0
- package/assets/esri/core/workers/chunks/{01b8e680befff83e7d3e.js → e093e745708f722bc1b9.js} +1 -1
- package/assets/esri/core/workers/chunks/e32fc0b2c6530d28ce85.js +1 -0
- package/assets/esri/core/workers/chunks/e3a994587f9b2e88db85.js +1 -0
- package/assets/esri/core/workers/chunks/ea5bf896acfcc3106bf5.js +1 -0
- package/assets/esri/core/workers/chunks/ed1dabed10ff9f4e0369.js +1 -0
- package/assets/esri/core/workers/chunks/{a74e6d505a55ed27f004.js → f11453f24c0b728669d2.js} +1 -1
- package/assets/esri/core/workers/chunks/f2ebd6471e1259a6eac0.js +1 -0
- package/assets/esri/core/workers/chunks/{14dc21fe66c7b98fb456.js → f3127bdf28a1d9b8db27.js} +1 -1
- package/assets/esri/core/workers/chunks/f3c232fc56a29d51196a.js +1 -0
- package/assets/esri/core/workers/chunks/fee942ef802a162e0248.js +1 -0
- package/assets/esri/themes/base/widgets/_Attribution.scss +8 -0
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/chunks/BlendLayers.glsl.js +1 -1
- package/chunks/Envelope.js +1 -1
- package/chunks/GaussianSplat.glsl.js +2 -2
- package/chunks/Geometry.js +1 -1
- package/chunks/GlowComposition.glsl.js +5 -5
- package/chunks/MultiPathImpl.js +1 -1
- package/chunks/Point2D.js +1 -1
- package/chunks/UnitFactory.js +1 -1
- package/config.js +1 -1
- package/core/deprecate.js +1 -1
- package/core/keyboard.js +5 -0
- package/geometry/SpatialReference.js +1 -1
- package/geometry/operators/support/apiConverter.js +1 -1
- package/geometry/operators/support/jsonConverter.js +1 -1
- package/geometry/support/spatialReferenceUtils.js +1 -1
- package/interfaces.d.ts +552 -3
- package/kernel.js +1 -1
- package/layers/IntegratedMesh3DTilesLayer.js +1 -1
- package/layers/catalog/CatalogDynamicGroupLayer.js +1 -1
- package/layers/graphics/data/AttributesBuilder.js +1 -1
- package/layers/graphics/data/QueryEngineResult.js +1 -1
- package/layers/mixins/ArcGISImageService.js +1 -1
- package/package.json +1 -1
- package/portal/schemas/definitions.js +1 -1
- package/rest/query/operations/query.js +1 -1
- package/rest/support/LocateSetting.d.ts +4 -0
- package/rest/support/LocateSetting.js +5 -0
- package/rest/support/LocateSettingBase.d.ts +4 -0
- package/rest/support/LocateSettingBase.js +5 -0
- package/rest/support/LocateSettingSource.d.ts +4 -0
- package/rest/support/LocateSettingSource.js +5 -0
- package/rest/support/LocateSettings.d.ts +4 -0
- package/rest/support/LocateSettings.js +5 -0
- package/rest/support/LocateSettingsOverrides.d.ts +4 -0
- package/rest/support/LocateSettingsOverrides.js +5 -0
- package/rest/support/RouteParameters.js +1 -1
- package/statistics/utils.js +1 -1
- package/support/revision.js +1 -1
- package/views/2d/engine/vectorTiles/decluttering/SymbolRepository.js +1 -1
- package/views/2d/engine/vectorTiles/shaders/sources/shaderRepository.js +1 -1
- package/views/3d/GroundView3D.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightRayIntersector.js +1 -1
- package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DFrustumVisibility.js +1 -1
- package/views/3d/layers/graphics/LabelDeconflictor.js +1 -1
- package/views/3d/layers/i3s/I3SIndex.js +1 -1
- package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
- package/views/3d/layers/i3s/LayerElevationProvider.js +1 -1
- package/views/3d/state/ConstraintsManager.js +1 -1
- package/views/3d/state/NearFarHeuristic.js +1 -1
- package/views/3d/support/Attribution3D.js +5 -0
- package/views/3d/support/CombinedElevationProvider.js +1 -1
- package/views/3d/support/ElevationRange.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatDataStore.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatFadeHelper.js +5 -0
- package/views/3d/support/gaussianSplatting/GaussianSplatFadeTexture.js +5 -0
- package/views/3d/support/gaussianSplatting/GaussianSplatOrderTexture.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianTile.js +1 -1
- package/views/3d/terrain/ElevationBounds.js +1 -1
- package/views/3d/terrain/ElevationData.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/terrain/Tile.js +1 -1
- package/views/3d/terrain/TileBlendTechniqueConfiguration.js +1 -1
- package/views/3d/terrain/TileCompositor.js +1 -1
- package/views/3d/terrain/TileRenderer.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObject.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.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/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/shader/ComponentData.glsl.js +12 -12
- package/views/3d/webgl-engine/collections/Component/Material/shader/ComponentDataConstants.js +5 -0
- package/views/3d/webgl-engine/core/renderPasses/AllRenderPasses.js +1 -1
- package/views/3d/webgl-engine/core/renderPasses/RenderPass.js +1 -1
- package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBuffer.glsl.js +10 -13
- package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBufferFields.glsl.js +7 -1
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexPosition.glsl.js +6 -6
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/TileBackground.glsl.js +4 -4
- package/views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatUnpacking.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/glow/GlowComposition.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/glow/GlowCompositionTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/glow/GlowPresets.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/glow/GlowRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/OrderIndependentTransparency.js +1 -1
- package/views/3d/webgl-engine/lib/TextureBackedBuffer/BufferManager.js +1 -1
- package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBuffer.js +1 -1
- package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBufferFields.js +1 -1
- package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBufferLayout.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/bufferLayouts.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultLayouts.js +1 -1
- package/views/3d/webgl-engine/materials/PathTechnique.js +1 -1
- package/views/3d/webgl-engine/materials/WaterTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/CheckerBoardTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ColorMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/CompositingTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplatTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/HUDMaterialTechnique.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/ShadedColorMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/sources/edgeRenderer/AdjustProjectedPosition.glsl.js +4 -4
- package/views/3d/webgl-engine/shaders/sources/edgeRenderer/EdgeUtil.glsl.js +24 -31
- package/views/Attribution.js +5 -0
- package/views/DOMContainer.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/View.js +1 -1
- package/views/draw/support/managers/DrawTooltipManager.js +5 -0
- package/views/interactive/tooltip/content/TooltipContentDynamic.js +5 -0
- package/views/interactive/tooltip/content/tooltipContentFactory.js +1 -1
- package/views/interactive/tooltip/fields/TooltipField.js +1 -1
- package/views/interactive/tooltip/infos/DynamicTooltipInfo.js +5 -0
- package/views/layers/LayerView.js +1 -1
- package/views/support/AttributionItem.d.ts +4 -0
- package/views/support/AttributionItem.js +5 -0
- package/views/support/GroundElevationSampler.js +1 -1
- package/views/support/LayerViewManager.js +1 -1
- package/views/support/attributionUtils.js +5 -0
- package/views/support/geodesicAreaMeasurementUtils.js +1 -1
- package/views/support/geodesicLengthMeasurementUtils.js +1 -1
- package/views/ui/2d/DefaultUI2D.js +1 -1
- package/views/ui/3d/DefaultUI3D.js +1 -1
- package/widgets/Attribution/AttributionViewModel.js +1 -1
- package/widgets/Attribution.js +1 -1
- package/widgets/ElevationProfile/ElevationProfileLine.js +1 -1
- package/widgets/ElevationProfile/ElevationProfileViewModel.js +1 -1
- package/widgets/ElevationProfile.js +1 -1
- package/widgets/OrientedImageryViewer/components/ImageViewerViewModel.js +1 -1
- package/widgets/PanoramicViewer/PanoramicVideoViewerViewModel.js +1 -1
- package/widgets/PanoramicViewer/PanoramicViewerViewModel.js +1 -1
- package/widgets/Widget.js +1 -1
- package/widgets/support/decorators/accessibleHandler.js +1 -1
- package/widgets/support/jsxWidgetSupport.js +1 -1
- package/widgets/support/widget.js +1 -1
- package/widgets/support/widgetUtils.js +1 -1
- package/assets/esri/core/workers/chunks/0a1df5a724fe253b3866.js +0 -1
- package/assets/esri/core/workers/chunks/155d74b9c0ef31dc2316.js +0 -1
- package/assets/esri/core/workers/chunks/25143b919e75d5d2da05.js +0 -1
- package/assets/esri/core/workers/chunks/2c8c48433b380da59831.js +0 -1
- package/assets/esri/core/workers/chunks/2d17ed5321ca05acb8e3.js +0 -1
- package/assets/esri/core/workers/chunks/31b5747a254d13acc58e.js +0 -1
- package/assets/esri/core/workers/chunks/3ac84e324d212815e252.js +0 -1
- package/assets/esri/core/workers/chunks/41a00c77e6f7ce61e476.js +0 -1
- package/assets/esri/core/workers/chunks/447b53a9280b2b19b7a6.js +0 -1
- package/assets/esri/core/workers/chunks/45729d006db6a569715f.js +0 -1
- package/assets/esri/core/workers/chunks/50cf3cbcad2be1c1e210.js +0 -1
- package/assets/esri/core/workers/chunks/565358ea8d1bdc4d1ebc.js +0 -1
- package/assets/esri/core/workers/chunks/592afe1a41bed3b0cc31.js +0 -1
- package/assets/esri/core/workers/chunks/5aeda8a1f2ccabfdf40f.js +0 -1
- package/assets/esri/core/workers/chunks/657d9e5145da1306ace8.js +0 -1
- package/assets/esri/core/workers/chunks/6ce7ca6bebdc61d8eada.js +0 -1
- package/assets/esri/core/workers/chunks/7f7a81ed8893ab649af7.js +0 -1
- package/assets/esri/core/workers/chunks/7ffef8a19166f6b564d8.js +0 -1
- package/assets/esri/core/workers/chunks/819781a209608dcdd678.js +0 -1
- package/assets/esri/core/workers/chunks/8d57e3a0e5687ce15557.js +0 -1
- package/assets/esri/core/workers/chunks/8e9a5d38da40702def80.js +0 -1
- package/assets/esri/core/workers/chunks/8fbda0b85731ac77e1d8.js +0 -1
- package/assets/esri/core/workers/chunks/98c32d10a2344cd7a50b.js +0 -1
- package/assets/esri/core/workers/chunks/aac313257a8b1ae75b75.js +0 -1
- package/assets/esri/core/workers/chunks/be06c8a58c217a17451b.js +0 -1
- package/assets/esri/core/workers/chunks/d56548a994753b08403c.js +0 -1
- package/assets/esri/core/workers/chunks/d5b464ff83ce29b51968.js +0 -1
- package/assets/esri/core/workers/chunks/d777d7cb8df3f21ac97e.js +0 -1
- package/assets/esri/core/workers/chunks/dd95e679618b7b21a7b1.js +0 -1
- package/assets/esri/core/workers/chunks/e08a1934d98e7324776d.js +0 -1
- package/assets/esri/core/workers/chunks/e5deb72df8b2505fd325.js +0 -1
- package/assets/esri/core/workers/chunks/e689a4849f5af3f2f641.js +0 -1
- package/assets/esri/core/workers/chunks/f259ad785ce3aa970792.js +0 -1
- package/assets/esri/core/workers/chunks/f4919950a9a3703d9da3.js +0 -1
- package/assets/esri/core/workers/chunks/f6ce485c082d0d640b01.js +0 -1
- package/assets/esri/core/workers/chunks/fd9ef4b8c969962cf72b.js +0 -1
- package/layers/support/attributionUtils.js +0 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4633],{2451:(e,t,r)=>{r.d(t,{E:()=>s});var i=r(31635),o=r(51976);class n extends o.K{constructor(){super(...arguments),this.output=0,this.hasEmission=!1}}(0,i.Cg)([(0,o.W)({count:10})],n.prototype,"output",void 0),(0,i.Cg)([(0,o.W)()],n.prototype,"hasEmission",void 0);class a extends n{constructor(){super(...arguments),this.instancedDoublePrecision=!1,this.hasModelTransformation=!1}}class s extends a{constructor(){super(...arguments),this.oitPass=0,this.hasSlicePlane=!1,this.hasHighlightMixTexture=!1,this.bindType=1,this.instanced=!1,this.writeDepth=!0}}(0,i.Cg)([(0,o.W)({count:3})],s.prototype,"oitPass",void 0),(0,i.Cg)([(0,o.W)()],s.prototype,"hasSlicePlane",void 0),(0,i.Cg)([(0,o.W)()],s.prototype,"hasHighlightMixTexture",void 0)},2495:(e,t,r)=>{r.d(t,{$U:()=>Se,fs:()=>Ae,ty:()=>Ie});var i=r(38954),o=r(51850),n=r(49255),a=r(25634),s=r(11725),l=r(70328),c=r(620);class d{constructor(e=0,t=!1,r=!0){this.tolerance=e,this.isVerticalRay=t,this.normalRequired=r}}const u=(0,l.vt)(),h=(0,o.vt)();function m(e,t,r,o,n,a,s){if(null==e)return;const c=function(e,t){return(0,i.h)(t,1/e[0],1/e[1],1/e[2])}(r,h);if((0,l.Ne)(u,e.bbMin),(0,l.vI)(u,e.bbMax),null!=n&&n.applyToAabb(u),function(e,t,r,i){return function(e,t,r,i){const o=(e[0]-i-t[0])*r[0],n=(e[3]+i-t[0])*r[0];let a=Math.min(o,n),s=Math.max(o,n);const l=(e[1]-i-t[1])*r[1],c=(e[4]+i-t[1])*r[1];if(s=Math.min(s,Math.max(l,c)),s<0)return!1;if(a=Math.max(a,Math.min(l,c)),a>s)return!1;const d=(e[2]-i-t[2])*r[2],u=(e[5]+i-t[2])*r[2];return s=Math.min(s,Math.max(d,u)),!(s<0)&&(a=Math.max(a,Math.min(d,u)),!(a>s)&&a<1/0)}(e,t,r,i)}(u,t,c,o)){const{primitiveIndices:i,position:l}=e,c=i?i.length:l.indices.length/3;if(c>M){const i=e.getChildren();if(void 0!==i){for(const e of i)m(e,t,r,o,n,a,s);return}}!function(e,t,r,i,o,n,a,s,l,c,d){const u=e[0],h=e[1],m=e[2],f=t[0],v=t[1],g=t[2],{normalRequired:_}=c;for(let e=0;e<i;++e){const t=s[e],r=3*t,i=a*o[r];let c=n[i],w=n[i+1],b=n[i+2];const y=a*o[r+1];let M=n[y],C=n[y+1],S=n[y+2];const E=a*o[r+2];let A=n[E],I=n[E+1],R=n[E+2];null!=l&&([c,w,b]=l.applyToVertex(c,w,b,e),[M,C,S]=l.applyToVertex(M,C,S,e),[A,I,R]=l.applyToVertex(A,I,R,e));const F=M-c,O=C-w,P=S-b,D=A-c,H=I-w,N=R-b,z=v*N-H*g,L=g*D-N*f,B=f*H-D*v,V=F*z+O*L+P*B;if(Math.abs(V)<=T)continue;const G=u-c,U=h-w,j=m-b,W=G*z+U*L+j*B;if(V>0){if(W<0||W>V)continue}else if(W>0||W<V)continue;const k=U*P-O*j,$=j*F-P*G,Z=G*O-F*U,q=f*k+v*$+g*Z;if(V>0){if(q<0||W+q>V)continue}else if(q>0||W+q<V)continue;const Y=(D*k+H*$+N*Z)/V;Y>=0&&d(Y,t,_?x(F,O,P,D,H,N,p):null)}}(t,r,0,c,l.indices,l.data,l.stride,i,n,a,s)}}const p=(0,o.vt)();function f(e,t,r,i,o,n,a,s){const l=e[0],c=e[1],d=e[2],u=t[0],h=t[1],m=t[2];for(let e=r;e<i;++e){const t=3*e,r=t+1,i=t+2,f=n*t,v=o[f],g=o[f+1],_=o[f+2],w=n*r,b=n*i,y=o[w]-v,M=o[w+1]-g,C=o[w+2]-_,S=o[b]-v,E=o[b+1]-g,A=o[b+2]-_,I=h*A-E*m,R=m*S-A*u,F=u*E-S*h,O=y*I+M*R+C*F;if(Math.abs(O)<=T)continue;const P=l-v,D=c-g,H=d-_,N=P*I+D*R+H*F;if(O>0){if(N<0||N>O)continue}else if(N>0||N<O)continue;const z=D*C-M*H,L=H*y-C*P,B=P*M-y*D,V=u*z+h*L+m*B;if(O>0){if(V<0||N+V>O)continue}else if(V>0||N+V<O)continue;const G=(S*z+E*L+A*B)/O;G>=0&&s(G,e,a?x(y,M,C,S,E,A,p):null)}}const v=(0,o.vt)(),g=(0,o.vt)(),_=(0,o.vt)();function x(e,t,r,o,n,a,s){return(0,i.h)(b,e,t,r),(0,i.h)(y,o,n,a),(0,i.f)(s,b,y),(0,i.n)(s,s),s}function w(e){return(0,i.a)(b,e[1],e[0]),(0,i.a)(y,e[2],e[0]),(0,i.f)(p,b,y),(0,i.n)(p,p),p}const b=(0,o.vt)(),y=(0,o.vt)(),M=1e3,T=1e-7,C=(0,o.vt)(),S=[(0,o.vt)(),(0,o.vt)(),(0,o.vt)()];var E=r(16396),A=r(13030),I=r(59907);class R{constructor(e){this.layout=e}elementCount(e){return e.get("position").indices.length}write(e,t,r,i,o,n){return(0,I.vJ)(r,i,this.layout,e,t,o,n)}intersect(e,t,r,o,n,a,s){const l=this.layout.createView(e).getField("position",A.xs);if(null==l)return;const c=(0,i.a)(F,a,n),d=l.count/3,u=o.options.normalRequired;f(n,c,0,d,l.typedBuffer,l.typedBufferStride,u,(e,t,r)=>s(e,r,t))}}const F=(0,o.vt)();var O=r(43616),P=r(31635),D=r(91429),H=r(91829),N=r(4431),z=r(1843),L=r(72824),B=r(13840),V=r(42958),G=r(16943),U=r(33524);const j={mask:255},W={function:{func:519,ref:2,mask:2},operation:{fail:7680,zFail:7680,zPass:0}},k={function:{func:519,ref:2,mask:2},operation:{fail:7680,zFail:7680,zPass:7681}};var $=r(4576),Z=r(44208);r(53966),r(34275),r(94656),r(63907),(0,Z.A)("esri-tests-disable-gpu-memory-measurements");var q=r(69622),Y=r(65529),X=r(77690),K=r(29242),J=r(58083),Q=r(9093),ee=r(32728);class te{constructor(e){this.localTransform=e.localTransform,this.globalTransform=e.globalTransform,this.modelOrigin=e.modelOrigin,this.model=e.instanceModel,this.modelNormal=e.instanceModelNormal,this.modelScaleFactors=e.modelScaleFactors,this.boundingSphere=e.boundingSphere,this.featureAttribute=e.getField("instanceFeatureAttribute",A.Eq),this.color=e.getField("instanceColor",A.XP),this.olidColor=e.getField("instanceOlidColor",A.XP),this.state=e.getField("state",A.SL),this.lodLevel=e.getField("lodLevel",A.SL)}}let re=class extends q.A{constructor(e,t){super(e),this.events=new Y.bk,this._capacity=0,this._size=0,this._next=0,this._highlightOptionsMap=new Map,this._highlightOptionsMapPrev=new Map,this._layout=function(e){return oe(ie.clone(),e).u8("state").u8("lodLevel")}(t),this._capacity=ce,this._buffer=this._layout.createBuffer(this._capacity),this._view=new te(this._buffer)}get capacity(){return this._capacity}get size(){return this._size}get view(){return this._view}addInstance(){this._size+1>this._capacity&&this._grow();const e=this._findSlot();return this._view.state.set(e,1),this._size++,this.events.emit("instances-changed"),e}removeInstance(e){const t=this._view.state;(0,c.vA)(e>=0&&e<this._capacity&&!!(1&t.get(e)),"invalid instance handle"),this._getStateFlag(e,18)?this._setStateFlags(e,32):this.freeInstance(e),this.events.emit("instances-changed")}freeInstance(e){const t=this._view.state;(0,c.vA)(e>=0&&e<this._capacity&&!!(1&t.get(e)),"invalid instance handle"),t.set(e,0),this._size--}setLocalTransform(e,t,r=!0){this._view.localTransform.setMat(e,t),r&&this.updateModelTransform(e)}getLocalTransform(e,t){this._view.localTransform.getMat(e,t)}setGlobalTransform(e,t,r=!0){this._view.globalTransform.setMat(e,t),r&&this.updateModelTransform(e)}getGlobalTransform(e,t){this._view.globalTransform.getMat(e,t)}updateModelTransform(e){const t=this._view,r=ne,o=ae;t.localTransform.getMat(e,se),t.globalTransform.getMat(e,le);const n=(0,J.lw)(le,le,se);(0,i.h)(r,n[12],n[13],n[14]),t.modelOrigin.setVec(e,r),(0,X.z0)(o,n),t.model.setMat(e,o);const a=(0,ee.wp)(ne,n);a.sort(),t.modelScaleFactors.set(e,0,a[1]),t.modelScaleFactors.set(e,1,a[2]),(0,X.B8)(o,o),(0,X.mg)(o,o),t.modelNormal.setMat(e,o),this._setStateFlags(e,64),this.events.emit("instance-transform-changed",{index:e})}getModelTransform(e,t){const r=this._view;r.model.getMat(e,ae),r.modelOrigin.getVec(e,ne),t[0]=ae[0],t[1]=ae[1],t[2]=ae[2],t[3]=0,t[4]=ae[3],t[5]=ae[4],t[6]=ae[5],t[7]=0,t[8]=ae[6],t[9]=ae[7],t[10]=ae[8],t[11]=0,t[12]=ne[0],t[13]=ne[1],t[14]=ne[2],t[15]=1}applyShaderTransformation(e,t){null!=this.shaderTransformation&&this.shaderTransformation.applyTransform(this,e,t)}getCombinedModelTransform(e,t){return this.getModelTransform(e,t),null!=this.shaderTransformation&&this.shaderTransformation.applyTransform(this,e,t),t}getCombinedLocalTransform(e,t){this._view.localTransform.getMat(e,t),null!=this.shaderTransformation&&this.shaderTransformation.applyTransform(this,e,t)}getCombinedMaxScaleFactor(e){let t=this._view.modelScaleFactors.get(e,1);return null!=this.shaderTransformation&&(this.shaderTransformation.scaleFactor(ne,this,e),t*=Math.max(ne[0],ne[1],ne[2])),t}getCombinedMedianScaleFactor(e){let t=this._view.modelScaleFactors.get(e,0);return null!=this.shaderTransformation&&(this.shaderTransformation.scaleFactor(ne,this,e),t*=function(e,t,r){return Math.max(Math.min(e,t),Math.min(Math.max(e,t),r))}(ne[0],ne[1],ne[2])),t}getModel(e,t){this._view.model.getMat(e,t)}setFeatureAttribute(e,t){this._view.featureAttribute?.setVec(e,t)}getFeatureAttribute(e,t){this._view.featureAttribute?.getVec(e,t)}setColor(e,t){this._view.color?.setVec(e,t)}setObjectAndLayerIdColor(e,t){this._view.olidColor?.setVec(e,t)}setVisible(e,t){t!==this.getVisible(e)&&(this._setStateFlag(e,4,t),this.events.emit("instance-visibility-changed",{index:e}))}getVisible(e){return this._getStateFlag(e,4)}setHighlight(e,t){const{_highlightOptionsMap:r}=this,i=r.get(e);t?t!==i&&(r.set(e,t),this._setStateFlag(e,8,!0),this.events.emit("instance-highlight-changed")):i&&(r.delete(e),this._setStateFlag(e,8,!1),this.events.emit("instance-highlight-changed"))}get highlightOptionsMap(){return this._highlightOptionsMap}getHighlightStateFlag(e){return this._getStateFlag(e,8)}geHighlightOptionsPrev(e){const t=this._highlightOptionsMapPrev.get(e)??null;return this._highlightOptionsMapPrev.delete(e),t}getHighlightName(e){const t=this.highlightOptionsMap.get(e)??null;return t?this._highlightOptionsMapPrev.set(e,t):this._highlightOptionsMapPrev.delete(e),t}getState(e){return this._view.state.get(e)}getLodLevel(e){return this._view.lodLevel.get(e)}countFlags(e){let t=0;for(let r=0;r<this._capacity;++r)this.getState(r)&e&&++t;return t}_setStateFlags(e,t){const r=this._view.state;t=r.get(e)|t,r.set(e,t)}_clearStateFlags(e,t){const r=this._view.state;t=r.get(e)&~t,r.set(e,t)}_setStateFlag(e,t,r){r?this._setStateFlags(e,t):this._clearStateFlags(e,t)}_getStateFlag(e,t){return!!(this._view.state.get(e)&t)}_grow(){this._capacity=Math.max(ce,Math.floor(this._capacity*$.Ji)),this._buffer=this._layout.createBuffer(this._capacity).copyFrom(this._buffer),this._view=new te(this._buffer)}_findSlot(){const e=this._view.state;let t=this._next;for(;1&e.get(t);)t=t+1===this._capacity?0:t+1;return this._next=t+1===this._capacity?0:t+1,t}};(0,P.Cg)([(0,D.MZ)({constructOnly:!0})],re.prototype,"shaderTransformation",void 0),(0,P.Cg)([(0,D.MZ)()],re.prototype,"_size",void 0),(0,P.Cg)([(0,D.MZ)({readOnly:!0})],re.prototype,"size",null),re=(0,P.Cg)([(0,D.$K)("esri.views.3d.webgl-engine.lib.lodRendering.InstanceData")],re);const ie=(0,z.BP)().mat4f64("localTransform").mat4f64("globalTransform").vec4f64("boundingSphere").vec3f64("modelOrigin").mat3f("instanceModel").mat3f("instanceModelNormal").vec2f("modelScaleFactors");function oe(e,t){return t.instancedFeatureAttribute&&e.vec4f("instanceFeatureAttribute"),t.instancedColor&&e.vec4u8("instanceColor"),(0,G.E)()&&e.vec4u8("instanceOlidColor"),e}const ne=(0,o.vt)(),ae=(0,K.vt)(),se=(0,Q.vt)(),le=(0,Q.vt)(),ce=64,de=(0,z.BP)().vec3f("instanceModelOriginHi").vec3f("instanceModelOriginLo").mat3f("instanceModel").mat3f("instanceModelNormal");var ue=r(74810),he=r(28491),me=r(90644),pe=r(85079),fe=r(49788);class ve extends L.Zo{constructor(){super(...arguments),this.isSchematic=!1,this.usePBR=!1,this.mrrFactors=ue.mb,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.emissiveStrength=0,this.emissiveSource=1,this.emissiveBaseColor=o.uY,this.instancedDoublePrecision=!1,this.normalType=0,this.receiveShadows=!0,this.receiveAmbientOcclusion=!0,this.castShadows=!0,this.ambient=(0,o.CN)(.2,.2,.2),this.diffuse=(0,o.CN)(.8,.8,.8),this.externalColor=(0,H.fA)(1,1,1,1),this.colorMixMode="multiply",this.opacity=1,this.layerOpacity=1,this.origin=(0,o.vt)(),this.hasSlicePlane=!1,this.offsetTransparentBackfaces=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.vvSymbolAnchor=null,this.vvSymbolRotationMatrix=null,this.modelTransformation=null,this.drivenOpacity=!1,this.writeDepth=!0,this.customDepthTest=0,this.textureAlphaMode=0,this.textureAlphaCutoff=fe.Q,this.textureAlphaPremultiplied=!1,this.renderOccluded=1,this.isDecoration=!1}get hasVVSize(){return!!this.vvSize}get hasVVColor(){return!!this.vvColor}get hasVVOpacity(){return!!this.vvOpacity}}L.gy;let ge=class extends V.w{constructor(e,t){const i=[(0,N.U)(we(t))];t.instanced&&t.instancedDoublePrecision&&i.push((0,N.U)(function(e){return oe(de.clone(),e)}(t))),super(e,t,(0,pe._u)(i)),this.shader=new B.r(he.D,()=>r.e(5141).then(r.bind(r,5141)))}_makePipeline(e,t){const{oitPass:r,output:i,hasEmission:o,transparent:a,cullFace:s,customDepthTest:l,hasOccludees:c}=e;return(0,me.Ey)({blending:(0,n._o)(i)&&a?(0,U.Yf)(r):null,culling:xe(e)?(0,me.Xt)(s):null,depthTest:{func:(0,U.K_)(r,_e(l))},depthWrite:(0,U.z5)(e),drawBuffers:(0,V.L)(i,(0,U.m6)(r,o)),colorWrite:me.kn,stencilWrite:c?j:null,stencilTest:c?t?k:W:null,polygonOffset:(0,U.mE)(e)})}initializePipeline(e){return this._occludeePipelineState=this._makePipeline(e,!0),this._makePipeline(e,!1)}getPipeline(e){return e?this._occludeePipelineState:super.getPipeline()}};function _e(e){switch(e){case 1:return 515;case 0:case 3:return 513;case 2:return 516}}function xe(e){return 0!==e.cullFace||!e.hasSlicePlane&&!e.transparent&&!e.doubleSidedMode}function we(e){const t=(0,z.BP)().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"),e.hasSymbolColors&&t.vec4u8("symbolColor"),!e.instanced&&(0,G.E)()&&t.vec4u8("olidColor"),t}ge=(0,P.Cg)([(0,D.$K)("esri.views.3d.webgl-engine.shaders.DefaultMaterialTechnique")],ge);var be=r(51976),ye=r(2451);class Me extends ye.E{constructor(e){super(),this.spherical=e,this.alphaDiscardMode=1,this.doubleSidedMode=0,this.pbrMode=0,this.cullFace=0,this.normalType=0,this.customDepthTest=0,this.emissionSource=0,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.hasVerticalOffset=!1,this.hasColorTexture=!1,this.hasMetallicRoughnessTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.hasScreenSizePerspective=!1,this.hasVertexTangents=!1,this.hasOccludees=!1,this.instanced=!1,this.instancedDoublePrecision=!1,this.hasModelTransformation=!1,this.offsetBackfaces=!1,this.hasVVSize=!1,this.hasVVColor=!1,this.receiveShadows=!1,this.receiveAmbientOcclusion=!1,this.textureAlphaPremultiplied=!1,this.instancedFeatureAttribute=!1,this.instancedColor=!1,this.writeDepth=!0,this.transparent=!1,this.enableOffset=!0,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.snowCover=!1,this.hasColorTextureTransform=!1,this.hasEmissionTextureTransform=!1,this.hasNormalTextureTransform=!1,this.hasOcclusionTextureTransform=!1,this.hasMetallicRoughnessTextureTransform=!1,this.occlusionPass=!1,this.useCustomDTRExponentForWater=!1,this.useFillLights=!0,this.draped=!1}get textureCoordinateType(){return this.hasTextures?1:0}get hasTextures(){return this.hasColorTexture||this.hasNormalTexture||this.hasMetallicRoughnessTexture||3===this.emissionSource||this.hasOcclusionTexture}get hasVVInstancing(){return this.instanced}get discardInvisibleFragments(){return this.transparent}}(0,P.Cg)([(0,be.W)({count:4})],Me.prototype,"alphaDiscardMode",void 0),(0,P.Cg)([(0,be.W)({count:3})],Me.prototype,"doubleSidedMode",void 0),(0,P.Cg)([(0,be.W)({count:7})],Me.prototype,"pbrMode",void 0),(0,P.Cg)([(0,be.W)({count:3})],Me.prototype,"cullFace",void 0),(0,P.Cg)([(0,be.W)({count:3})],Me.prototype,"normalType",void 0),(0,P.Cg)([(0,be.W)({count:3})],Me.prototype,"customDepthTest",void 0),(0,P.Cg)([(0,be.W)({count:8})],Me.prototype,"emissionSource",void 0),(0,P.Cg)([(0,be.W)()],Me.prototype,"hasVertexColors",void 0),(0,P.Cg)([(0,be.W)()],Me.prototype,"hasSymbolColors",void 0),(0,P.Cg)([(0,be.W)()],Me.prototype,"hasVerticalOffset",void 0),(0,P.Cg)([(0,be.W)()],Me.prototype,"hasColorTexture",void 0),(0,P.Cg)([(0,be.W)()],Me.prototype,"hasMetallicRoughnessTexture",void 0),(0,P.Cg)([(0,be.W)()],Me.prototype,"hasOcclusionTexture",void 0),(0,P.Cg)([(0,be.W)()],Me.prototype,"hasNormalTexture",void 0),(0,P.Cg)([(0,be.W)()],Me.prototype,"hasScreenSizePerspective",void 0),(0,P.Cg)([(0,be.W)()],Me.prototype,"hasVertexTangents",void 0),(0,P.Cg)([(0,be.W)()],Me.prototype,"hasOccludees",void 0),(0,P.Cg)([(0,be.W)()],Me.prototype,"instanced",void 0),(0,P.Cg)([(0,be.W)()],Me.prototype,"instancedDoublePrecision",void 0),(0,P.Cg)([(0,be.W)()],Me.prototype,"hasModelTransformation",void 0),(0,P.Cg)([(0,be.W)()],Me.prototype,"offsetBackfaces",void 0),(0,P.Cg)([(0,be.W)()],Me.prototype,"hasVVSize",void 0),(0,P.Cg)([(0,be.W)()],Me.prototype,"hasVVColor",void 0),(0,P.Cg)([(0,be.W)()],Me.prototype,"receiveShadows",void 0),(0,P.Cg)([(0,be.W)()],Me.prototype,"receiveAmbientOcclusion",void 0),(0,P.Cg)([(0,be.W)()],Me.prototype,"textureAlphaPremultiplied",void 0),(0,P.Cg)([(0,be.W)()],Me.prototype,"instancedFeatureAttribute",void 0),(0,P.Cg)([(0,be.W)()],Me.prototype,"instancedColor",void 0),(0,P.Cg)([(0,be.W)()],Me.prototype,"writeDepth",void 0),(0,P.Cg)([(0,be.W)()],Me.prototype,"transparent",void 0),(0,P.Cg)([(0,be.W)()],Me.prototype,"enableOffset",void 0),(0,P.Cg)([(0,be.W)()],Me.prototype,"terrainDepthTest",void 0),(0,P.Cg)([(0,be.W)()],Me.prototype,"cullAboveTerrain",void 0),(0,P.Cg)([(0,be.W)()],Me.prototype,"snowCover",void 0),(0,P.Cg)([(0,be.W)()],Me.prototype,"hasColorTextureTransform",void 0),(0,P.Cg)([(0,be.W)()],Me.prototype,"hasEmissionTextureTransform",void 0),(0,P.Cg)([(0,be.W)()],Me.prototype,"hasNormalTextureTransform",void 0),(0,P.Cg)([(0,be.W)()],Me.prototype,"hasOcclusionTextureTransform",void 0),(0,P.Cg)([(0,be.W)()],Me.prototype,"hasMetallicRoughnessTextureTransform",void 0);var Te=r(57323);let Ce=class extends ge{constructor(){super(...arguments),this.shader=new B.r(Te.R,()=>r.e(2314).then(r.bind(r,39933)))}};Ce=(0,P.Cg)([(0,D.$K)("esri.views.3d.webgl-engine.shaders.RealisticTreeTechnique")],Ce);class Se extends s.i{constructor(e,t){super(e,Ae),this.materialType="default",this.supportsEdges=!0,this.intersectDraped=void 0,this.produces=new Map([[2,e=>((0,n.iq)(e)||(0,n.Bf)(e))&&!this.transparent],[4,e=>((0,n.iq)(e)||(0,n.Bf)(e))&&this.transparent&&this.parameters.writeDepth],[8,e=>((0,n.iq)(e)||(0,n.Bf)(e))&&this.transparent&&!this.parameters.writeDepth]]),this._layout=we(this.parameters),this._configuration=new Me(t.spherical)}isVisibleForOutput(e){return 3!==e&&5!==e&&4!==e||this.parameters.castShadows}get visible(){const{layerOpacity:e,colorMixMode:t,opacity:r,externalColor:i}=this.parameters;return e*("replace"===t?1:r)*("ignore"===t||isNaN(i[3])?1:i[3])>=fe.Q}get _hasEmissiveBase(){return!!this.parameters.emissiveTextureId||!(0,i.m)(this.parameters.emissiveBaseColor,o.uY)}get hasEmissions(){return this.parameters.emissiveStrength>0&&(0===this.parameters.emissiveSource&&this._hasEmissiveBase||1===this.parameters.emissiveSource)}getConfiguration(e,t){const{parameters:r,_configuration:i}=this,{treeRendering:o,doubleSided:a,doubleSidedType:s}=r;return super.getConfiguration(e,t,this._configuration),i.hasNormalTexture=r.hasNormalTexture,i.hasColorTexture=r.hasColorTexture,i.hasMetallicRoughnessTexture=r.hasMetallicRoughnessTexture,i.hasOcclusionTexture=r.hasOcclusionTexture,i.hasVertexTangents=!o&&r.hasVertexTangents,i.instanced=r.instanced,i.instancedDoublePrecision=r.instancedDoublePrecision,i.hasVVColor=!!r.vvColor,i.hasVVSize=!!r.vvSize,i.hasVerticalOffset=null!=r.verticalOffset,i.hasScreenSizePerspective=null!=r.screenSizePerspective,i.hasSlicePlane=r.hasSlicePlane,i.alphaDiscardMode=r.textureAlphaMode,i.normalType=o?0:r.normalType,i.transparent=this.transparent,i.writeDepth=r.writeDepth,i.customDepthTest=r.customDepthTest??0,i.hasOccludees=t.hasOccludees,i.cullFace=r.hasSlicePlane?0:r.cullFace,i.cullAboveTerrain=t.cullAboveTerrain,i.hasModelTransformation=!o&&null!=r.modelTransformation,i.hasVertexColors=r.hasVertexColors,i.hasSymbolColors=r.hasSymbolColors,i.doubleSidedMode=o?2:a&&"normal"===s?1:a&&"winding-order"===s?2:0,i.instancedFeatureAttribute=r.instancedFeatureAttribute,i.instancedColor=r.instancedColor,(0,n._o)(e)?(i.terrainDepthTest=t.terrainDepthTest,i.receiveShadows=r.receiveShadows,i.receiveAmbientOcclusion=r.receiveAmbientOcclusion&&null!=t.ssao):(i.terrainDepthTest=!1,i.receiveShadows=i.receiveAmbientOcclusion=!1),i.textureAlphaPremultiplied=!!r.textureAlphaPremultiplied,i.pbrMode=r.usePBR?r.isSchematic?2:1:0,i.emissionSource=r.emissionSource,i.offsetBackfaces=!(!this.transparent||!r.offsetTransparentBackfaces),i.oitPass=t.oitPass,i.enableOffset=t.enableOffset,i.snowCover=t.snowCover>0,i.hasColorTextureTransform=!!r.colorTextureTransformMatrix,i.hasNormalTextureTransform=!!r.normalTextureTransformMatrix,i.hasEmissionTextureTransform=!!r.emissiveTextureTransformMatrix,i.hasOcclusionTextureTransform=!!r.occlusionTextureTransformMatrix,i.hasMetallicRoughnessTextureTransform=!!r.metallicRoughnessTextureTransformMatrix,i}intersect(e,t,r,o,n,a){if(null!=this.parameters.verticalOffset){const e=r.camera;(0,i.h)(He,t[12],t[13],t[14]);let a=null;switch(r.viewingMode){case 1:a=(0,i.n)(Pe,He);break;case 2:a=(0,i.d)(Pe,Oe)}let s=0;const l=(0,i.e)(Ne,He,e.eye),c=(0,i.b)(l),d=(0,i.j)(l,l,1/c);let u=null;this.parameters.screenSizePerspective&&(u=(0,i.g)(a,d)),s+=(0,O.kE)(e,c,this.parameters.verticalOffset,u??0,this.parameters.screenSizePerspective,null),(0,i.j)(a,a,s),(0,i.t)(De,a,r.transform.inverseRotation),o=(0,i.e)(Re,o,De),n=(0,i.e)(Fe,n,De)}!function(e,t,r,o,n,a){if(!e.visible)return;const s=(0,i.a)(C,o,r),l=(e,t,r)=>a(e,r,t),{tolerance:u}=t,h=new d(u,!1,t.options.normalRequired);if(e.boundingInfo)(0,c.vA)(0===e.type),m(e.boundingInfo,r,s,u,n,h,l);else{const t=e.positionAttribute,o=t.indices;!function(e,t,r,o,n,a,s,l,c,d){const u=t,h=S,m=Math.abs(u[0]),p=Math.abs(u[1]),f=Math.abs(u[2]),x=m>=p?m>=f?0:2:p>=f?1:2,b=x,y=u[b]<0?2:1,M=(x+y)%3,T=(x+(3-y))%3,C=u[M]/u[b],E=u[T]/u[b],A=1/u[b],I=v,R=g,F=_,{normalRequired:O}=c;for(let t=r;t<o;++t){const r=3*t,o=s*n[r];(0,i.h)(h[0],a[o+0],a[o+1],a[o+2]);const c=s*n[r+1];(0,i.h)(h[1],a[c+0],a[c+1],a[c+2]);const u=s*n[r+2];(0,i.h)(h[2],a[u+0],a[u+1],a[u+2]),l&&((0,i.d)(h[0],l.applyToVertex(h[0][0],h[0][1],h[0][2],t)),(0,i.d)(h[1],l.applyToVertex(h[1][0],h[1][1],h[1][2],t)),(0,i.d)(h[2],l.applyToVertex(h[2][0],h[2][1],h[2][2],t))),(0,i.a)(I,h[0],e),(0,i.a)(R,h[1],e),(0,i.a)(F,h[2],e);const m=I[M]-C*I[b],p=I[T]-E*I[b],f=R[M]-C*R[b],v=R[T]-E*R[b],g=F[M]-C*F[b],_=F[T]-E*F[b],x=g*v-_*f,y=m*_-p*g,S=f*p-v*m;if((x<0||y<0||S<0)&&(x>0||y>0||S>0))continue;const P=x+y+S;if(0===P)continue;const D=x*(A*I[b])+y*(A*R[b])+S*(A*F[b]);if(D*Math.sign(P)<0)continue;const H=D/P;H>=0&&d(H,t,O?w(h):null)}}(r,s,0,o.length/3,o,t.data,t.stride,n,h,l)}}(e,r,o,n,(0,E.ou)(r.verticalOffset),a)}createGLMaterial(e){return new Ee(e)}createBufferWriter(){return new R(this._layout)}get transparent(){return Ie(this.parameters)}}class Ee extends a.m8{constructor(e){super({...e,...e.material.parameters})}beginSlot(e){this._material.setParameters({receiveShadows:e.shadowMap.enabled});const t=this._material.parameters;this.updateTexture(t.textureId);const r=e.camera.viewInverseTransposeMatrix;return(0,i.h)(t.origin,r[3],r[7],r[11]),this._material.setParameters(this.textureBindParameters),this.getTechnique(t.treeRendering?Ce:ge,e)}}class Ae extends ve{constructor(){super(...arguments),this.treeRendering=!1,this.hasVertexTangents=!1}get hasNormalTexture(){return!this.treeRendering&&!!this.normalTextureId}get hasColorTexture(){return!!this.textureId}get hasMetallicRoughnessTexture(){return!this.treeRendering&&!!this.metallicRoughnessTextureId}get hasOcclusionTexture(){return!this.treeRendering&&!!this.occlusionTextureId}get emissionSource(){return this.treeRendering?0:null!=this.emissiveTextureId&&0===this.emissiveSource?3:this.usePBR?0===this.emissiveSource?2:1:0}get hasTextures(){return this.hasColorTexture||this.hasNormalTexture||this.hasMetallicRoughnessTexture||3===this.emissionSource||this.hasOcclusionTexture}}function Ie(e){const{drivenOpacity:t,opacity:r,externalColor:i,layerOpacity:o,texture:n,textureId:a,textureAlphaMode:s,colorMixMode:l}=e,c=i[3];return t||r<1&&"replace"!==l||c<1&&"ignore"!==l||o<1||(null!=n||null!=a)&&1!==s&&2!==s&&"replace"!==l}const Re=(0,o.vt)(),Fe=(0,o.vt)(),Oe=(0,o.fA)(0,0,1),Pe=(0,o.vt)(),De=(0,o.vt)(),He=(0,o.vt)(),Ne=(0,o.vt)()},6867:(e,t,r)=>{r.d(t,{i:()=>d});var i=r(58083),o=r(9093),n=r(38954),a=r(51850),s=r(87317),l=r(91829),c=r(71351);class d{get ray(){return this._ray}get distanceInRenderSpace(){return null==this.distance?null:((0,n.j)(h,this.ray.direction,this.distance),(0,n.b)(h))}withinDistance(e){return!!u(this)&&this.distanceInRenderSpace<=e}getIntersectionPoint(e){return!!u(this)&&((0,n.j)(h,this.ray.direction,this.distance),(0,n.i)(e,this.ray.origin,h),!0)}getTransformedNormal(e){return(0,n.d)(m,this.normal),m[3]=0,(0,s.t)(m,m,this.transformation),(0,n.d)(e,m),(0,n.n)(e,e)}constructor(e){this.intersector=4,this.normal=(0,a.vt)(),this.transformation=(0,o.vt)(),this._ray=(0,c.vt)(),this.init(e)}init(e){this.distance=this.target=this.drapedLayerOrder=this.renderPriority=null,this.intersector=4,(0,c.C)(e,this._ray)}set(e,t,r,s,l,c,d){this.intersector=e,this.distance=r,(0,n.d)(this.normal,s??a.Cb),(0,i.C)(this.transformation,l??o.zK),this.target=t,this.drapedLayerOrder=c,this.renderPriority=d}copy(e){(0,c.C)(e.ray,this._ray),this.intersector=e.intersector,this.distance=e.distance,this.target=e.target,this.drapedLayerOrder=e.drapedLayerOrder,this.renderPriority=e.renderPriority,(0,n.d)(this.normal,e.normal),(0,i.C)(this.transformation,e.transformation)}}function u(e){return null!=e?.distance}const h=(0,a.vt)(),m=(0,l.vt)()},10906:(e,t,r)=>{r.d(t,{b:()=>n});var i=r(33094),o=r(31821);function n(e,t){t.snowCover&&(e.uniforms.add(new i.U("snowCover",e=>e.snowCover)).code.add(o.H`float getSnow(vec3 normal, vec3 groundNormal) {
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4633],{2451:(e,t,r)=>{r.d(t,{E:()=>s});var i=r(31635),o=r(51976);class n extends o.K{constructor(){super(...arguments),this.output=0,this.hasEmission=!1}}(0,i.Cg)([(0,o.W)({count:10})],n.prototype,"output",void 0),(0,i.Cg)([(0,o.W)()],n.prototype,"hasEmission",void 0);class a extends n{constructor(){super(...arguments),this.instancedDoublePrecision=!1,this.hasModelTransformation=!1}}class s extends a{constructor(){super(...arguments),this.oitPass=0,this.hasSlicePlane=!1,this.hasHighlightMixTexture=!1,this.bindType=1,this.instanced=!1,this.writeDepth=!0}}(0,i.Cg)([(0,o.W)({count:3})],s.prototype,"oitPass",void 0),(0,i.Cg)([(0,o.W)()],s.prototype,"hasSlicePlane",void 0),(0,i.Cg)([(0,o.W)()],s.prototype,"hasHighlightMixTexture",void 0)},2495:(e,t,r)=>{r.d(t,{$U:()=>Se,fs:()=>Ae,ty:()=>Ie});var i=r(38954),o=r(51850),n=r(49255),a=r(25634),s=r(11725),l=r(70328),c=r(620);class d{constructor(e=0,t=!1,r=!0){this.tolerance=e,this.isVerticalRay=t,this.normalRequired=r}}const u=(0,l.vt)(),h=(0,o.vt)();function m(e,t,r,o,n,a,s){if(null==e)return;const c=function(e,t){return(0,i.h)(t,1/e[0],1/e[1],1/e[2])}(r,h);if((0,l.Ne)(u,e.bbMin),(0,l.vI)(u,e.bbMax),null!=n&&n.applyToAabb(u),function(e,t,r,i){return function(e,t,r,i){const o=(e[0]-i-t[0])*r[0],n=(e[3]+i-t[0])*r[0];let a=Math.min(o,n),s=Math.max(o,n);const l=(e[1]-i-t[1])*r[1],c=(e[4]+i-t[1])*r[1];if(s=Math.min(s,Math.max(l,c)),s<0)return!1;if(a=Math.max(a,Math.min(l,c)),a>s)return!1;const d=(e[2]-i-t[2])*r[2],u=(e[5]+i-t[2])*r[2];return s=Math.min(s,Math.max(d,u)),!(s<0)&&(a=Math.max(a,Math.min(d,u)),!(a>s)&&a<1/0)}(e,t,r,i)}(u,t,c,o)){const{primitiveIndices:i,position:l}=e,c=i?i.length:l.indices.length/3;if(c>M){const i=e.getChildren();if(void 0!==i){for(const e of i)m(e,t,r,o,n,a,s);return}}!function(e,t,r,i,o,n,a,s,l,c,d){const u=e[0],h=e[1],m=e[2],f=t[0],v=t[1],g=t[2],{normalRequired:_}=c;for(let e=0;e<i;++e){const t=s[e],r=3*t,i=a*o[r];let c=n[i],w=n[i+1],b=n[i+2];const y=a*o[r+1];let M=n[y],C=n[y+1],S=n[y+2];const E=a*o[r+2];let A=n[E],I=n[E+1],R=n[E+2];null!=l&&([c,w,b]=l.applyToVertex(c,w,b,e),[M,C,S]=l.applyToVertex(M,C,S,e),[A,I,R]=l.applyToVertex(A,I,R,e));const F=M-c,O=C-w,P=S-b,D=A-c,H=I-w,N=R-b,z=v*N-H*g,L=g*D-N*f,B=f*H-D*v,V=F*z+O*L+P*B;if(Math.abs(V)<=T)continue;const G=u-c,U=h-w,j=m-b,W=G*z+U*L+j*B;if(V>0){if(W<0||W>V)continue}else if(W>0||W<V)continue;const k=U*P-O*j,$=j*F-P*G,Z=G*O-F*U,q=f*k+v*$+g*Z;if(V>0){if(q<0||W+q>V)continue}else if(q>0||W+q<V)continue;const Y=(D*k+H*$+N*Z)/V;Y>=0&&d(Y,t,_?x(F,O,P,D,H,N,p):null)}}(t,r,0,c,l.indices,l.data,l.stride,i,n,a,s)}}const p=(0,o.vt)();function f(e,t,r,i,o,n,a,s){const l=e[0],c=e[1],d=e[2],u=t[0],h=t[1],m=t[2];for(let e=r;e<i;++e){const t=3*e,r=t+1,i=t+2,f=n*t,v=o[f],g=o[f+1],_=o[f+2],w=n*r,b=n*i,y=o[w]-v,M=o[w+1]-g,C=o[w+2]-_,S=o[b]-v,E=o[b+1]-g,A=o[b+2]-_,I=h*A-E*m,R=m*S-A*u,F=u*E-S*h,O=y*I+M*R+C*F;if(Math.abs(O)<=T)continue;const P=l-v,D=c-g,H=d-_,N=P*I+D*R+H*F;if(O>0){if(N<0||N>O)continue}else if(N>0||N<O)continue;const z=D*C-M*H,L=H*y-C*P,B=P*M-y*D,V=u*z+h*L+m*B;if(O>0){if(V<0||N+V>O)continue}else if(V>0||N+V<O)continue;const G=(S*z+E*L+A*B)/O;G>=0&&s(G,e,a?x(y,M,C,S,E,A,p):null)}}const v=(0,o.vt)(),g=(0,o.vt)(),_=(0,o.vt)();function x(e,t,r,o,n,a,s){return(0,i.h)(b,e,t,r),(0,i.h)(y,o,n,a),(0,i.f)(s,b,y),(0,i.n)(s,s),s}function w(e){return(0,i.a)(b,e[1],e[0]),(0,i.a)(y,e[2],e[0]),(0,i.f)(p,b,y),(0,i.n)(p,p),p}const b=(0,o.vt)(),y=(0,o.vt)(),M=1e3,T=1e-7,C=(0,o.vt)(),S=[(0,o.vt)(),(0,o.vt)(),(0,o.vt)()];var E=r(16396),A=r(13030),I=r(59907);class R{constructor(e){this.layout=e}elementCount(e){return e.get("position").indices.length}write(e,t,r,i,o,n){return(0,I.vJ)(r,i,this.layout,e,t,o,n)}intersect(e,t,r,o,n,a,s){const l=this.layout.createView(e).getField("position",A.xs);if(null==l)return;const c=(0,i.a)(F,a,n),d=l.count/3,u=o.options.normalRequired;f(n,c,0,d,l.typedBuffer,l.typedBufferStride,u,(e,t,r)=>s(e,r,t))}}const F=(0,o.vt)();var O=r(43616),P=r(31635),D=r(91429),H=r(91829),N=r(4431),z=r(1843),L=r(72824),B=r(13840),V=r(42958),G=r(16943),U=r(33524);const j={mask:255},W={function:{func:519,ref:2,mask:2},operation:{fail:7680,zFail:7680,zPass:0}},k={function:{func:519,ref:2,mask:2},operation:{fail:7680,zFail:7680,zPass:7681}};var $=r(4576),Z=r(44208);r(53966),r(34275),r(94656),r(63907),(0,Z.A)("esri-tests-disable-gpu-memory-measurements");var q=r(69622),Y=r(65529),X=r(77690),K=r(29242),J=r(58083),Q=r(9093),ee=r(32728);class te{constructor(e){this.localTransform=e.localTransform,this.globalTransform=e.globalTransform,this.modelOrigin=e.modelOrigin,this.model=e.instanceModel,this.modelNormal=e.instanceModelNormal,this.modelScaleFactors=e.modelScaleFactors,this.boundingSphere=e.boundingSphere,this.featureAttribute=e.getField("instanceFeatureAttribute",A.Eq),this.color=e.getField("instanceColor",A.XP),this.olidColor=e.getField("instanceOlidColor",A.XP),this.state=e.getField("state",A.SL),this.lodLevel=e.getField("lodLevel",A.SL)}}let re=class extends q.A{constructor(e,t){super(e),this.events=new Y.bk,this._capacity=0,this._size=0,this._next=0,this._highlightOptionsMap=new Map,this._highlightOptionsMapPrev=new Map,this._layout=function(e){return oe(ie.clone(),e).u8("state").u8("lodLevel")}(t),this._capacity=ce,this._buffer=this._layout.createBuffer(this._capacity),this._view=new te(this._buffer)}get capacity(){return this._capacity}get size(){return this._size}get view(){return this._view}addInstance(){this._size+1>this._capacity&&this._grow();const e=this._findSlot();return this._view.state.set(e,1),this._size++,this.events.emit("instances-changed"),e}removeInstance(e){const t=this._view.state;(0,c.vA)(e>=0&&e<this._capacity&&!!(1&t.get(e)),"invalid instance handle"),this._getStateFlag(e,18)?this._setStateFlags(e,32):this.freeInstance(e),this.events.emit("instances-changed")}freeInstance(e){const t=this._view.state;(0,c.vA)(e>=0&&e<this._capacity&&!!(1&t.get(e)),"invalid instance handle"),t.set(e,0),this._size--}setLocalTransform(e,t,r=!0){this._view.localTransform.setMat(e,t),r&&this.updateModelTransform(e)}getLocalTransform(e,t){this._view.localTransform.getMat(e,t)}setGlobalTransform(e,t,r=!0){this._view.globalTransform.setMat(e,t),r&&this.updateModelTransform(e)}getGlobalTransform(e,t){this._view.globalTransform.getMat(e,t)}updateModelTransform(e){const t=this._view,r=ne,o=ae;t.localTransform.getMat(e,se),t.globalTransform.getMat(e,le);const n=(0,J.lw)(le,le,se);(0,i.h)(r,n[12],n[13],n[14]),t.modelOrigin.setVec(e,r),(0,X.z0)(o,n),t.model.setMat(e,o);const a=(0,ee.wp)(ne,n);a.sort(),t.modelScaleFactors.set(e,0,a[1]),t.modelScaleFactors.set(e,1,a[2]),(0,X.B8)(o,o),(0,X.mg)(o,o),t.modelNormal.setMat(e,o),this._setStateFlags(e,64),this.events.emit("instance-transform-changed",{index:e})}getModelTransform(e,t){const r=this._view;r.model.getMat(e,ae),r.modelOrigin.getVec(e,ne),t[0]=ae[0],t[1]=ae[1],t[2]=ae[2],t[3]=0,t[4]=ae[3],t[5]=ae[4],t[6]=ae[5],t[7]=0,t[8]=ae[6],t[9]=ae[7],t[10]=ae[8],t[11]=0,t[12]=ne[0],t[13]=ne[1],t[14]=ne[2],t[15]=1}applyShaderTransformation(e,t){null!=this.shaderTransformation&&this.shaderTransformation.applyTransform(this,e,t)}getCombinedModelTransform(e,t){return this.getModelTransform(e,t),null!=this.shaderTransformation&&this.shaderTransformation.applyTransform(this,e,t),t}getCombinedLocalTransform(e,t){this._view.localTransform.getMat(e,t),null!=this.shaderTransformation&&this.shaderTransformation.applyTransform(this,e,t)}getCombinedMaxScaleFactor(e){let t=this._view.modelScaleFactors.get(e,1);return null!=this.shaderTransformation&&(this.shaderTransformation.scaleFactor(ne,this,e),t*=Math.max(ne[0],ne[1],ne[2])),t}getCombinedMedianScaleFactor(e){let t=this._view.modelScaleFactors.get(e,0);return null!=this.shaderTransformation&&(this.shaderTransformation.scaleFactor(ne,this,e),t*=function(e,t,r){return Math.max(Math.min(e,t),Math.min(Math.max(e,t),r))}(ne[0],ne[1],ne[2])),t}getModel(e,t){this._view.model.getMat(e,t)}setFeatureAttribute(e,t){this._view.featureAttribute?.setVec(e,t)}getFeatureAttribute(e,t){this._view.featureAttribute?.getVec(e,t)}setColor(e,t){this._view.color?.setVec(e,t)}setObjectAndLayerIdColor(e,t){this._view.olidColor?.setVec(e,t)}setVisible(e,t){t!==this.getVisible(e)&&(this._setStateFlag(e,4,t),this.events.emit("instance-visibility-changed",{index:e}))}getVisible(e){return this._getStateFlag(e,4)}setHighlight(e,t){const{_highlightOptionsMap:r}=this,i=r.get(e);t?t!==i&&(r.set(e,t),this._setStateFlag(e,8,!0),this.events.emit("instance-highlight-changed")):i&&(r.delete(e),this._setStateFlag(e,8,!1),this.events.emit("instance-highlight-changed"))}get highlightOptionsMap(){return this._highlightOptionsMap}getHighlightStateFlag(e){return this._getStateFlag(e,8)}geHighlightOptionsPrev(e){const t=this._highlightOptionsMapPrev.get(e)??null;return this._highlightOptionsMapPrev.delete(e),t}getHighlightName(e){const t=this.highlightOptionsMap.get(e)??null;return t?this._highlightOptionsMapPrev.set(e,t):this._highlightOptionsMapPrev.delete(e),t}getState(e){return this._view.state.get(e)}getLodLevel(e){return this._view.lodLevel.get(e)}countFlags(e){let t=0;for(let r=0;r<this._capacity;++r)this.getState(r)&e&&++t;return t}_setStateFlags(e,t){const r=this._view.state;t=r.get(e)|t,r.set(e,t)}_clearStateFlags(e,t){const r=this._view.state;t=r.get(e)&~t,r.set(e,t)}_setStateFlag(e,t,r){r?this._setStateFlags(e,t):this._clearStateFlags(e,t)}_getStateFlag(e,t){return!!(this._view.state.get(e)&t)}_grow(){this._capacity=Math.max(ce,Math.floor(this._capacity*$.Ji)),this._buffer=this._layout.createBuffer(this._capacity).copyFrom(this._buffer),this._view=new te(this._buffer)}_findSlot(){const e=this._view.state;let t=this._next;for(;1&e.get(t);)t=t+1===this._capacity?0:t+1;return this._next=t+1===this._capacity?0:t+1,t}};(0,P.Cg)([(0,D.MZ)({constructOnly:!0})],re.prototype,"shaderTransformation",void 0),(0,P.Cg)([(0,D.MZ)()],re.prototype,"_size",void 0),(0,P.Cg)([(0,D.MZ)({readOnly:!0})],re.prototype,"size",null),re=(0,P.Cg)([(0,D.$K)("esri.views.3d.webgl-engine.lib.lodRendering.InstanceData")],re);const ie=(0,z.BP)().mat4f64("localTransform").mat4f64("globalTransform").vec4f64("boundingSphere").vec3f64("modelOrigin").mat3f("instanceModel").mat3f("instanceModelNormal").vec2f("modelScaleFactors");function oe(e,t){return t.instancedFeatureAttribute&&e.vec4f("instanceFeatureAttribute"),t.instancedColor&&e.vec4u8("instanceColor"),(0,G.E)()&&e.vec4u8("instanceOlidColor"),e}const ne=(0,o.vt)(),ae=(0,K.vt)(),se=(0,Q.vt)(),le=(0,Q.vt)(),ce=64,de=(0,z.BP)().vec3f("instanceModelOriginHi").vec3f("instanceModelOriginLo").mat3f("instanceModel").mat3f("instanceModelNormal");var ue=r(74810),he=r(28491),me=r(90644),pe=r(85079),fe=r(49788);class ve extends L.Zo{constructor(){super(...arguments),this.isSchematic=!1,this.usePBR=!1,this.mrrFactors=ue.mb,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.emissiveStrength=0,this.emissiveSource=1,this.emissiveBaseColor=o.uY,this.instancedDoublePrecision=!1,this.normalType=0,this.receiveShadows=!0,this.receiveAmbientOcclusion=!0,this.castShadows=!0,this.ambient=(0,o.CN)(.2,.2,.2),this.diffuse=(0,o.CN)(.8,.8,.8),this.externalColor=(0,H.fA)(1,1,1,1),this.colorMixMode="multiply",this.opacity=1,this.layerOpacity=1,this.origin=(0,o.vt)(),this.hasSlicePlane=!1,this.offsetTransparentBackfaces=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.vvSymbolAnchor=null,this.vvSymbolRotationMatrix=null,this.modelTransformation=null,this.drivenOpacity=!1,this.writeDepth=!0,this.customDepthTest=0,this.textureAlphaMode=0,this.textureAlphaCutoff=fe.Q,this.textureAlphaPremultiplied=!1,this.renderOccluded=1,this.isDecoration=!1}get hasVVSize(){return!!this.vvSize}get hasVVColor(){return!!this.vvColor}get hasVVOpacity(){return!!this.vvOpacity}}L.gy;let ge=class extends V.w{constructor(e,t){const i=[(0,N.U)(we(t))];t.instanced&&t.instancedDoublePrecision&&i.push((0,N.U)(function(e){return oe(de.clone(),e)}(t))),super(e,t,(0,pe._u)(i)),this.shader=new B.r(he.D,()=>r.e(5141).then(r.bind(r,5141)))}_makePipeline(e,t){const{oitPass:r,output:i,hasEmission:o,transparent:a,cullFace:s,customDepthTest:l,hasOccludees:c}=e;return(0,me.Ey)({blending:(0,n._o)(i)&&a?(0,U.Yf)(r):null,culling:xe(e)?(0,me.Xt)(s):null,depthTest:(0,U.mt)(r,_e(l)),depthWrite:(0,U.z5)(e),drawBuffers:(0,V.L)(i,(0,U.Sv)(r,o)),colorWrite:me.kn,stencilWrite:c?j:null,stencilTest:c?t?k:W:null,polygonOffset:(0,U.mE)(e)})}initializePipeline(e){return this._occludeePipelineState=this._makePipeline(e,!0),this._makePipeline(e,!1)}getPipeline(e){return e?this._occludeePipelineState:super.getPipeline()}};function _e(e){switch(e){case 1:return 515;case 0:case 3:return 513;case 2:return 516}}function xe(e){return 0!==e.cullFace||!e.hasSlicePlane&&!e.transparent&&!e.doubleSidedMode}function we(e){const t=(0,z.BP)().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"),e.hasSymbolColors&&t.vec4u8("symbolColor"),!e.instanced&&(0,G.E)()&&t.vec4u8("olidColor"),t}ge=(0,P.Cg)([(0,D.$K)("esri.views.3d.webgl-engine.shaders.DefaultMaterialTechnique")],ge);var be=r(51976),ye=r(2451);class Me extends ye.E{constructor(e){super(),this.spherical=e,this.alphaDiscardMode=1,this.doubleSidedMode=0,this.pbrMode=0,this.cullFace=0,this.normalType=0,this.customDepthTest=0,this.emissionSource=0,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.hasVerticalOffset=!1,this.hasColorTexture=!1,this.hasMetallicRoughnessTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.hasScreenSizePerspective=!1,this.hasVertexTangents=!1,this.hasOccludees=!1,this.instanced=!1,this.instancedDoublePrecision=!1,this.hasModelTransformation=!1,this.offsetBackfaces=!1,this.hasVVSize=!1,this.hasVVColor=!1,this.receiveShadows=!1,this.receiveAmbientOcclusion=!1,this.textureAlphaPremultiplied=!1,this.instancedFeatureAttribute=!1,this.instancedColor=!1,this.writeDepth=!0,this.transparent=!1,this.enableOffset=!0,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.snowCover=!1,this.hasColorTextureTransform=!1,this.hasEmissionTextureTransform=!1,this.hasNormalTextureTransform=!1,this.hasOcclusionTextureTransform=!1,this.hasMetallicRoughnessTextureTransform=!1,this.occlusionPass=!1,this.useCustomDTRExponentForWater=!1,this.useFillLights=!0,this.draped=!1}get textureCoordinateType(){return this.hasTextures?1:0}get hasTextures(){return this.hasColorTexture||this.hasNormalTexture||this.hasMetallicRoughnessTexture||3===this.emissionSource||this.hasOcclusionTexture}get hasVVInstancing(){return this.instanced}get discardInvisibleFragments(){return this.transparent}}(0,P.Cg)([(0,be.W)({count:4})],Me.prototype,"alphaDiscardMode",void 0),(0,P.Cg)([(0,be.W)({count:3})],Me.prototype,"doubleSidedMode",void 0),(0,P.Cg)([(0,be.W)({count:7})],Me.prototype,"pbrMode",void 0),(0,P.Cg)([(0,be.W)({count:3})],Me.prototype,"cullFace",void 0),(0,P.Cg)([(0,be.W)({count:3})],Me.prototype,"normalType",void 0),(0,P.Cg)([(0,be.W)({count:3})],Me.prototype,"customDepthTest",void 0),(0,P.Cg)([(0,be.W)({count:8})],Me.prototype,"emissionSource",void 0),(0,P.Cg)([(0,be.W)()],Me.prototype,"hasVertexColors",void 0),(0,P.Cg)([(0,be.W)()],Me.prototype,"hasSymbolColors",void 0),(0,P.Cg)([(0,be.W)()],Me.prototype,"hasVerticalOffset",void 0),(0,P.Cg)([(0,be.W)()],Me.prototype,"hasColorTexture",void 0),(0,P.Cg)([(0,be.W)()],Me.prototype,"hasMetallicRoughnessTexture",void 0),(0,P.Cg)([(0,be.W)()],Me.prototype,"hasOcclusionTexture",void 0),(0,P.Cg)([(0,be.W)()],Me.prototype,"hasNormalTexture",void 0),(0,P.Cg)([(0,be.W)()],Me.prototype,"hasScreenSizePerspective",void 0),(0,P.Cg)([(0,be.W)()],Me.prototype,"hasVertexTangents",void 0),(0,P.Cg)([(0,be.W)()],Me.prototype,"hasOccludees",void 0),(0,P.Cg)([(0,be.W)()],Me.prototype,"instanced",void 0),(0,P.Cg)([(0,be.W)()],Me.prototype,"instancedDoublePrecision",void 0),(0,P.Cg)([(0,be.W)()],Me.prototype,"hasModelTransformation",void 0),(0,P.Cg)([(0,be.W)()],Me.prototype,"offsetBackfaces",void 0),(0,P.Cg)([(0,be.W)()],Me.prototype,"hasVVSize",void 0),(0,P.Cg)([(0,be.W)()],Me.prototype,"hasVVColor",void 0),(0,P.Cg)([(0,be.W)()],Me.prototype,"receiveShadows",void 0),(0,P.Cg)([(0,be.W)()],Me.prototype,"receiveAmbientOcclusion",void 0),(0,P.Cg)([(0,be.W)()],Me.prototype,"textureAlphaPremultiplied",void 0),(0,P.Cg)([(0,be.W)()],Me.prototype,"instancedFeatureAttribute",void 0),(0,P.Cg)([(0,be.W)()],Me.prototype,"instancedColor",void 0),(0,P.Cg)([(0,be.W)()],Me.prototype,"writeDepth",void 0),(0,P.Cg)([(0,be.W)()],Me.prototype,"transparent",void 0),(0,P.Cg)([(0,be.W)()],Me.prototype,"enableOffset",void 0),(0,P.Cg)([(0,be.W)()],Me.prototype,"terrainDepthTest",void 0),(0,P.Cg)([(0,be.W)()],Me.prototype,"cullAboveTerrain",void 0),(0,P.Cg)([(0,be.W)()],Me.prototype,"snowCover",void 0),(0,P.Cg)([(0,be.W)()],Me.prototype,"hasColorTextureTransform",void 0),(0,P.Cg)([(0,be.W)()],Me.prototype,"hasEmissionTextureTransform",void 0),(0,P.Cg)([(0,be.W)()],Me.prototype,"hasNormalTextureTransform",void 0),(0,P.Cg)([(0,be.W)()],Me.prototype,"hasOcclusionTextureTransform",void 0),(0,P.Cg)([(0,be.W)()],Me.prototype,"hasMetallicRoughnessTextureTransform",void 0);var Te=r(57323);let Ce=class extends ge{constructor(){super(...arguments),this.shader=new B.r(Te.R,()=>r.e(2314).then(r.bind(r,39933)))}};Ce=(0,P.Cg)([(0,D.$K)("esri.views.3d.webgl-engine.shaders.RealisticTreeTechnique")],Ce);class Se extends s.i{constructor(e,t){super(e,Ae),this.materialType="default",this.supportsEdges=!0,this.intersectDraped=void 0,this.produces=new Map([[2,e=>((0,n.iq)(e)||(0,n.Bf)(e))&&!this.transparent],[4,e=>((0,n.iq)(e)||(0,n.Bf)(e))&&this.transparent&&this.parameters.writeDepth],[8,e=>((0,n.iq)(e)||(0,n.Bf)(e))&&this.transparent&&!this.parameters.writeDepth]]),this._layout=we(this.parameters),this._configuration=new Me(t.spherical)}isVisibleForOutput(e){return 3!==e&&5!==e&&4!==e||this.parameters.castShadows}get visible(){const{layerOpacity:e,colorMixMode:t,opacity:r,externalColor:i}=this.parameters;return e*("replace"===t?1:r)*("ignore"===t||isNaN(i[3])?1:i[3])>=fe.Q}get _hasEmissiveBase(){return!!this.parameters.emissiveTextureId||!(0,i.m)(this.parameters.emissiveBaseColor,o.uY)}get hasEmissions(){return this.parameters.emissiveStrength>0&&(0===this.parameters.emissiveSource&&this._hasEmissiveBase||1===this.parameters.emissiveSource)}getConfiguration(e,t){const{parameters:r,_configuration:i}=this,{treeRendering:o,doubleSided:a,doubleSidedType:s}=r;return super.getConfiguration(e,t,this._configuration),i.hasNormalTexture=r.hasNormalTexture,i.hasColorTexture=r.hasColorTexture,i.hasMetallicRoughnessTexture=r.hasMetallicRoughnessTexture,i.hasOcclusionTexture=r.hasOcclusionTexture,i.hasVertexTangents=!o&&r.hasVertexTangents,i.instanced=r.instanced,i.instancedDoublePrecision=r.instancedDoublePrecision,i.hasVVColor=!!r.vvColor,i.hasVVSize=!!r.vvSize,i.hasVerticalOffset=null!=r.verticalOffset,i.hasScreenSizePerspective=null!=r.screenSizePerspective,i.hasSlicePlane=r.hasSlicePlane,i.alphaDiscardMode=r.textureAlphaMode,i.normalType=o?0:r.normalType,i.transparent=this.transparent,i.writeDepth=r.writeDepth,i.customDepthTest=r.customDepthTest??0,i.hasOccludees=t.hasOccludees,i.cullFace=r.hasSlicePlane?0:r.cullFace,i.cullAboveTerrain=t.cullAboveTerrain,i.hasModelTransformation=!o&&null!=r.modelTransformation,i.hasVertexColors=r.hasVertexColors,i.hasSymbolColors=r.hasSymbolColors,i.doubleSidedMode=o?2:a&&"normal"===s?1:a&&"winding-order"===s?2:0,i.instancedFeatureAttribute=r.instancedFeatureAttribute,i.instancedColor=r.instancedColor,(0,n._o)(e)?(i.terrainDepthTest=t.terrainDepthTest,i.receiveShadows=r.receiveShadows,i.receiveAmbientOcclusion=r.receiveAmbientOcclusion&&null!=t.ssao):(i.terrainDepthTest=!1,i.receiveShadows=i.receiveAmbientOcclusion=!1),i.textureAlphaPremultiplied=!!r.textureAlphaPremultiplied,i.pbrMode=r.usePBR?r.isSchematic?2:1:0,i.emissionSource=r.emissionSource,i.offsetBackfaces=!(!this.transparent||!r.offsetTransparentBackfaces),i.oitPass=t.oitPass,i.enableOffset=t.enableOffset,i.snowCover=t.snowCover>0,i.hasColorTextureTransform=!!r.colorTextureTransformMatrix,i.hasNormalTextureTransform=!!r.normalTextureTransformMatrix,i.hasEmissionTextureTransform=!!r.emissiveTextureTransformMatrix,i.hasOcclusionTextureTransform=!!r.occlusionTextureTransformMatrix,i.hasMetallicRoughnessTextureTransform=!!r.metallicRoughnessTextureTransformMatrix,i}intersect(e,t,r,o,n,a){if(null!=this.parameters.verticalOffset){const e=r.camera;(0,i.h)(He,t[12],t[13],t[14]);let a=null;switch(r.viewingMode){case 1:a=(0,i.n)(Pe,He);break;case 2:a=(0,i.d)(Pe,Oe)}let s=0;const l=(0,i.e)(Ne,He,e.eye),c=(0,i.b)(l),d=(0,i.j)(l,l,1/c);let u=null;this.parameters.screenSizePerspective&&(u=(0,i.g)(a,d)),s+=(0,O.kE)(e,c,this.parameters.verticalOffset,u??0,this.parameters.screenSizePerspective,null),(0,i.j)(a,a,s),(0,i.t)(De,a,r.transform.inverseRotation),o=(0,i.e)(Re,o,De),n=(0,i.e)(Fe,n,De)}!function(e,t,r,o,n,a){if(!e.visible)return;const s=(0,i.a)(C,o,r),l=(e,t,r)=>a(e,r,t),{tolerance:u}=t,h=new d(u,!1,t.options.normalRequired);if(e.boundingInfo)(0,c.vA)(0===e.type),m(e.boundingInfo,r,s,u,n,h,l);else{const t=e.positionAttribute,o=t.indices;!function(e,t,r,o,n,a,s,l,c,d){const u=t,h=S,m=Math.abs(u[0]),p=Math.abs(u[1]),f=Math.abs(u[2]),x=m>=p?m>=f?0:2:p>=f?1:2,b=x,y=u[b]<0?2:1,M=(x+y)%3,T=(x+(3-y))%3,C=u[M]/u[b],E=u[T]/u[b],A=1/u[b],I=v,R=g,F=_,{normalRequired:O}=c;for(let t=r;t<o;++t){const r=3*t,o=s*n[r];(0,i.h)(h[0],a[o+0],a[o+1],a[o+2]);const c=s*n[r+1];(0,i.h)(h[1],a[c+0],a[c+1],a[c+2]);const u=s*n[r+2];(0,i.h)(h[2],a[u+0],a[u+1],a[u+2]),l&&((0,i.d)(h[0],l.applyToVertex(h[0][0],h[0][1],h[0][2],t)),(0,i.d)(h[1],l.applyToVertex(h[1][0],h[1][1],h[1][2],t)),(0,i.d)(h[2],l.applyToVertex(h[2][0],h[2][1],h[2][2],t))),(0,i.a)(I,h[0],e),(0,i.a)(R,h[1],e),(0,i.a)(F,h[2],e);const m=I[M]-C*I[b],p=I[T]-E*I[b],f=R[M]-C*R[b],v=R[T]-E*R[b],g=F[M]-C*F[b],_=F[T]-E*F[b],x=g*v-_*f,y=m*_-p*g,S=f*p-v*m;if((x<0||y<0||S<0)&&(x>0||y>0||S>0))continue;const P=x+y+S;if(0===P)continue;const D=x*(A*I[b])+y*(A*R[b])+S*(A*F[b]);if(D*Math.sign(P)<0)continue;const H=D/P;H>=0&&d(H,t,O?w(h):null)}}(r,s,0,o.length/3,o,t.data,t.stride,n,h,l)}}(e,r,o,n,(0,E.ou)(r.verticalOffset),a)}createGLMaterial(e){return new Ee(e)}createBufferWriter(){return new R(this._layout)}get transparent(){return Ie(this.parameters)}}class Ee extends a.m8{constructor(e){super({...e,...e.material.parameters})}beginSlot(e){this._material.setParameters({receiveShadows:e.shadowMap.enabled});const t=this._material.parameters;this.updateTexture(t.textureId);const r=e.camera.viewInverseTransposeMatrix;return(0,i.h)(t.origin,r[3],r[7],r[11]),this._material.setParameters(this.textureBindParameters),this.getTechnique(t.treeRendering?Ce:ge,e)}}class Ae extends ve{constructor(){super(...arguments),this.treeRendering=!1,this.hasVertexTangents=!1}get hasNormalTexture(){return!this.treeRendering&&!!this.normalTextureId}get hasColorTexture(){return!!this.textureId}get hasMetallicRoughnessTexture(){return!this.treeRendering&&!!this.metallicRoughnessTextureId}get hasOcclusionTexture(){return!this.treeRendering&&!!this.occlusionTextureId}get emissionSource(){return this.treeRendering?0:null!=this.emissiveTextureId&&0===this.emissiveSource?3:this.usePBR?0===this.emissiveSource?2:1:0}get hasTextures(){return this.hasColorTexture||this.hasNormalTexture||this.hasMetallicRoughnessTexture||3===this.emissionSource||this.hasOcclusionTexture}}function Ie(e){const{drivenOpacity:t,opacity:r,externalColor:i,layerOpacity:o,texture:n,textureId:a,textureAlphaMode:s,colorMixMode:l}=e,c=i[3];return t||r<1&&"replace"!==l||c<1&&"ignore"!==l||o<1||(null!=n||null!=a)&&1!==s&&2!==s&&"replace"!==l}const Re=(0,o.vt)(),Fe=(0,o.vt)(),Oe=(0,o.fA)(0,0,1),Pe=(0,o.vt)(),De=(0,o.vt)(),He=(0,o.vt)(),Ne=(0,o.vt)()},6867:(e,t,r)=>{r.d(t,{i:()=>d});var i=r(58083),o=r(9093),n=r(38954),a=r(51850),s=r(87317),l=r(91829),c=r(71351);class d{get ray(){return this._ray}get distanceInRenderSpace(){return null==this.distance?null:((0,n.j)(h,this.ray.direction,this.distance),(0,n.b)(h))}withinDistance(e){return!!u(this)&&this.distanceInRenderSpace<=e}getIntersectionPoint(e){return!!u(this)&&((0,n.j)(h,this.ray.direction,this.distance),(0,n.i)(e,this.ray.origin,h),!0)}getTransformedNormal(e){return(0,n.d)(m,this.normal),m[3]=0,(0,s.t)(m,m,this.transformation),(0,n.d)(e,m),(0,n.n)(e,e)}constructor(e){this.intersector=4,this.normal=(0,a.vt)(),this.transformation=(0,o.vt)(),this._ray=(0,c.vt)(),this.init(e)}init(e){this.distance=this.target=this.drapedLayerOrder=this.renderPriority=null,this.intersector=4,(0,c.C)(e,this._ray)}set(e,t,r,s,l,c,d){this.intersector=e,this.distance=r,(0,n.d)(this.normal,s??a.Cb),(0,i.C)(this.transformation,l??o.zK),this.target=t,this.drapedLayerOrder=c,this.renderPriority=d}copy(e){(0,c.C)(e.ray,this._ray),this.intersector=e.intersector,this.distance=e.distance,this.target=e.target,this.drapedLayerOrder=e.drapedLayerOrder,this.renderPriority=e.renderPriority,(0,n.d)(this.normal,e.normal),(0,i.C)(this.transformation,e.transformation)}}function u(e){return null!=e?.distance}const h=(0,a.vt)(),m=(0,l.vt)()},10906:(e,t,r)=>{r.d(t,{b:()=>n});var i=r(33094),o=r(31821);function n(e,t){t.snowCover&&(e.uniforms.add(new i.U("snowCover",e=>e.snowCover)).code.add(o.H`float getSnow(vec3 normal, vec3 groundNormal) {
|
|
2
2
|
return smoothstep(0.5, 0.55, dot(normal, groundNormal)) * snowCover;
|
|
3
3
|
}
|
|
4
4
|
float getRealisticTreeSnow(vec3 faceNormal, vec3 shadingNormal, vec3 groundNormal) {
|
|
@@ -97,7 +97,7 @@ return fallOffFunction(vv, vn, 0.1);
|
|
|
97
97
|
A = (pow(A, 0.2) + 1.2 * A * A * A * A) / 2.2;
|
|
98
98
|
|
|
99
99
|
fragOcclusion = A;
|
|
100
|
-
`),e}function g(e){return Math.max(10,20*e.computeScreenPixelSizeAtDist(Math.abs(4*e.relativeElevation)))}const _=(0,o.vt)(),x=Object.freeze(Object.defineProperty({__proto__:null,build:v,getRadius:g},Symbol.toStringTag,{value:"Module"}))},15976:(e,t,r)=>{r.d(t,{o:()=>o});var i=r(74333);class o extends i.n{constructor(e,t){super(e,"sampler2D",2,(r,i,o)=>r.bindTexture(e,t(i,o)))}}},16396:(e,t,r)=>{r.d(t,{ou:()=>l}),r(77690),r(29242),r(58083),r(9093);var i=r(38954),o=r(51850),n=r(94008),a=r(57005);const s=new class{constructor(e=0){this.offset=e,this.tmpVertex=(0,o.vt)(),this._tmpSphere=new n.iy}applyToVertex(e,t,r){const o=this.objectTransform.transform,n=(0,i.h)(c,e,t,r),a=(0,i.p)(n,n,o),s=this.offset/(0,i.b)(a);(0,i.c)(a,a,a,s);const l=this.objectTransform.inverse;return(0,i.p)(this.tmpVertex,a,l),this.tmpVertex}applyToMinMax(e,t){const r=this.offset/(0,i.b)(e);(0,i.c)(e,e,e,r);const o=this.offset/(0,i.b)(t);(0,i.c)(t,t,t,o)}applyToAabb(e){const t=this.offset/Math.sqrt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]+=e[0]*t,e[1]+=e[1]*t,e[2]+=e[2]*t;const r=this.offset/Math.sqrt(e[3]*e[3]+e[4]*e[4]+e[5]*e[5]);return e[3]+=e[3]*r,e[4]+=e[4]*r,e[5]+=e[5]*r,e}applyToBoundingSphere(e){const t=e.center,r=(0,i.b)(t),o=this.offset/r;return(0,i.c)(this._tmpSphere.center,t,t,o),this._tmpSphere.radius=e.radius+e.radius*this.offset/r,this._tmpSphere}};function l(e){return null!=e?(s.offset=e,s):null}new class{constructor(e=0){this.componentLocalOriginLength=0,this._totalOffset=0,this._offset=0,this._tmpVertex=(0,o.vt)(),this._tmpMbs=new n.iy,this._tmpObb=new a.ab,this._resetOffset(e)}_resetOffset(e){this._offset=e,this._totalOffset=e}set offset(e){this._resetOffset(e)}get offset(){return this._offset}set componentOffset(e){this._totalOffset=this._offset+e}set localOrigin(e){this.componentLocalOriginLength=(0,i.b)(e)}applyToVertex(e,t,r){const o=(0,i.h)(c,e,t,r),n=(0,i.h)(d,e,t,r+this.componentLocalOriginLength),a=this._totalOffset/(0,i.b)(n);return(0,i.c)(this._tmpVertex,o,n,a),this._tmpVertex}applyToAabb(e){const t=this.componentLocalOriginLength,r=e[0],i=e[1],o=e[2]+t,n=e[3],a=e[4],s=e[5]+t,l=Math.abs(r),c=Math.abs(i),d=Math.abs(o),u=Math.abs(n),h=Math.abs(a),m=Math.abs(s),p=.5*(1+Math.sign(r*n))*Math.min(l,u),f=.5*(1+Math.sign(i*a))*Math.min(c,h),v=.5*(1+Math.sign(o*s))*Math.min(d,m),g=Math.max(l,u),_=Math.max(c,h),x=Math.max(d,m),w=Math.sqrt(p*p+f*f+v*v),b=Math.sign(l+r),y=Math.sign(c+i),M=Math.sign(d+o),T=Math.sign(u+n),C=Math.sign(h+a),S=Math.sign(m+s),E=this._totalOffset;if(w<E)return e[0]-=(1-b)*E,e[1]-=(1-y)*E,e[2]-=(1-M)*E,e[3]+=T*E,e[4]+=C*E,e[5]+=S*E,e;const A=E/Math.sqrt(g*g+_*_+x*x),I=E/w,R=I-A,F=-R;return e[0]+=r*(b*F+I),e[1]+=i*(y*F+I),e[2]+=o*(M*F+I),e[3]+=n*(T*R+A),e[4]+=a*(C*R+A),e[5]+=s*(S*R+A),e}applyToMbs(e){const t=e.center,r=(0,i.b)(t),o=this._totalOffset/r;return(0,i.c)(this._tmpMbs.center,t,t,o),this._tmpMbs.radius=e.radius+e.radius*this._totalOffset/r,this._tmpMbs}applyToObb(e){return(0,a.gm)(e,this._totalOffset,this._totalOffset,1,this._tmpObb),this._tmpObb}},new class{constructor(e=0){this.offset=e,this.tmpVertex=(0,o.vt)()}applyToVertex(e,t,r){const o=(0,i.h)(c,e,t,r),n=(0,i.i)(d,o,this.localOrigin),a=this.offset/(0,i.b)(n);return(0,i.c)(this.tmpVertex,o,n,a),this.tmpVertex}applyToAabb(e){const t=u,r=h,i=m;for(let o=0;o<3;++o)t[o]=e[0+o]+this.localOrigin[o],r[o]=e[3+o]+this.localOrigin[o],i[o]=t[o];const o=this.applyToVertex(t[0],t[1],t[2]);for(let t=0;t<3;++t)e[t]=o[t],e[t+3]=o[t];const n=t=>{const r=this.applyToVertex(t[0],t[1],t[2]);for(let t=0;t<3;++t)e[t]=Math.min(e[t],r[t]),e[t+3]=Math.max(e[t+3],r[t])};for(let e=1;e<8;++e){for(let o=0;o<3;++o)i[o]=e&1<<o?r[o]:t[o];n(i)}let a=0;for(let e=0;e<3;++e)t[e]*r[e]<0&&(a|=1<<e);if(0!==a&&7!==a)for(let e=0;e<8;++e)if(0===(a&e)){for(let o=0;o<3;++o)i[o]=a&1<<o?0:e&1<<o?t[o]:r[o];n(i)}for(let t=0;t<3;++t)e[t]-=this.localOrigin[t],e[t+3]-=this.localOrigin[t];return e}};const c=(0,o.vt)(),d=(0,o.vt)(),u=(0,o.vt)(),h=(0,o.vt)(),m=(0,o.vt)()},16943:(e,t,r)=>{r.d(t,{E:()=>o});var i=r(44208);function o(){return!!(0,i.A)("enable-feature:objectAndLayerId-rendering")}},20304:(e,t,r)=>{r.d(t,{m:()=>o});var i=r(74333);class o extends i.n{constructor(e,t,r){super(e,"float",1,(i,o,n)=>i.setUniform1f(e,t(o,n),r))}}},22393:(e,t,r)=>{r.d(t,{c:()=>a});var i=r(31821);function o(e){e.code.add(i.H`vec3 evaluateDiffuseIlluminationHemisphere(vec3 ambientGround, vec3 ambientSky, float NdotNG) {
|
|
100
|
+
`),e}function g(e){return Math.max(10,20*e.computeScreenPixelSizeAtDist(Math.abs(4*e.relativeElevation)))}const _=(0,o.vt)(),x=Object.freeze(Object.defineProperty({__proto__:null,build:v,getRadius:g},Symbol.toStringTag,{value:"Module"}))},15976:(e,t,r)=>{r.d(t,{o:()=>o});var i=r(74333);class o extends i.n{constructor(e,t){super(e,"sampler2D",2,(r,i,o)=>r.bindTexture(e,t(i,o)))}}},16396:(e,t,r)=>{r.d(t,{ou:()=>l}),r(77690),r(29242),r(58083),r(9093);var i=r(38954),o=r(51850),n=r(94008),a=r(57005);const s=new class{constructor(e=0){this.offset=e,this.tmpVertex=(0,o.vt)(),this._tmpSphere=new n.iy}applyToVertex(e,t,r){const o=this.objectTransform.transform,n=(0,i.h)(c,e,t,r),a=(0,i.p)(n,n,o),s=this.offset/(0,i.b)(a);(0,i.c)(a,a,a,s);const l=this.objectTransform.inverse;return(0,i.p)(this.tmpVertex,a,l),this.tmpVertex}applyToMinMax(e,t){const r=this.offset/(0,i.b)(e);(0,i.c)(e,e,e,r);const o=this.offset/(0,i.b)(t);(0,i.c)(t,t,t,o)}applyToAabb(e){const t=this.offset/Math.sqrt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]+=e[0]*t,e[1]+=e[1]*t,e[2]+=e[2]*t;const r=this.offset/Math.sqrt(e[3]*e[3]+e[4]*e[4]+e[5]*e[5]);return e[3]+=e[3]*r,e[4]+=e[4]*r,e[5]+=e[5]*r,e}applyToBoundingSphere(e){const t=e.center,r=(0,i.b)(t),o=this.offset/r;return(0,i.c)(this._tmpSphere.center,t,t,o),this._tmpSphere.radius=e.radius+e.radius*this.offset/r,this._tmpSphere}};function l(e){return null!=e?(s.offset=e,s):null}new class{constructor(e=0){this.componentLocalOriginLength=0,this._totalOffset=0,this._offset=0,this._tmpVertex=(0,o.vt)(),this._tmpMbs=new n.iy,this._tmpObb=new a.ab,this._resetOffset(e)}_resetOffset(e){this._offset=e,this._totalOffset=e}set offset(e){this._resetOffset(e)}get offset(){return this._offset}set componentOffset(e){this._totalOffset=this._offset+e}set localOrigin(e){this.componentLocalOriginLength=(0,i.b)(e)}applyToVertex(e,t,r){const o=(0,i.h)(c,e,t,r),n=(0,i.h)(d,e,t,r+this.componentLocalOriginLength),a=this._totalOffset/(0,i.b)(n);return(0,i.c)(this._tmpVertex,o,n,a),this._tmpVertex}applyToAabb(e){const t=this.componentLocalOriginLength,r=e[0],i=e[1],o=e[2]+t,n=e[3],a=e[4],s=e[5]+t,l=Math.abs(r),c=Math.abs(i),d=Math.abs(o),u=Math.abs(n),h=Math.abs(a),m=Math.abs(s),p=.5*(1+Math.sign(r*n))*Math.min(l,u),f=.5*(1+Math.sign(i*a))*Math.min(c,h),v=.5*(1+Math.sign(o*s))*Math.min(d,m),g=Math.max(l,u),_=Math.max(c,h),x=Math.max(d,m),w=Math.sqrt(p*p+f*f+v*v),b=Math.sign(l+r),y=Math.sign(c+i),M=Math.sign(d+o),T=Math.sign(u+n),C=Math.sign(h+a),S=Math.sign(m+s),E=this._totalOffset;if(w<E)return e[0]-=(1-b)*E,e[1]-=(1-y)*E,e[2]-=(1-M)*E,e[3]+=T*E,e[4]+=C*E,e[5]+=S*E,e;const A=E/Math.sqrt(g*g+_*_+x*x),I=E/w,R=I-A,F=-R;return e[0]+=r*(b*F+I),e[1]+=i*(y*F+I),e[2]+=o*(M*F+I),e[3]+=n*(T*R+A),e[4]+=a*(C*R+A),e[5]+=s*(S*R+A),e}applyToMbs(e){const t=e.center,r=(0,i.b)(t),o=this._totalOffset/r;return(0,i.c)(this._tmpMbs.center,t,t,o),this._tmpMbs.radius=e.radius+e.radius*this._totalOffset/r,this._tmpMbs}applyToObb(e){return(0,a.gm)(e,this._totalOffset,this._totalOffset,1,this._tmpObb),this._tmpObb}},new class{constructor(e=0){this.offset=e,this.tmpVertex=(0,o.vt)()}applyToVertex(e,t,r){const o=(0,i.h)(c,e,t,r),n=(0,i.i)(d,o,this.localOrigin),a=this.offset/(0,i.b)(n);return(0,i.c)(this.tmpVertex,o,n,a),this.tmpVertex}applyToAabb(e){const t=u,r=h,i=m;for(let o=0;o<3;++o)t[o]=e[0+o]+this.localOrigin[o],r[o]=e[3+o]+this.localOrigin[o],i[o]=t[o];const o=this.applyToVertex(t[0],t[1],t[2]);for(let t=0;t<3;++t)e[t]=o[t],e[t+3]=o[t];const n=t=>{const r=this.applyToVertex(t[0],t[1],t[2]);for(let t=0;t<3;++t)e[t]=Math.min(e[t],r[t]),e[t+3]=Math.max(e[t+3],r[t])};for(let e=1;e<8;++e){for(let o=0;o<3;++o)i[o]=e&1<<o?r[o]:t[o];n(i)}let a=0;for(let e=0;e<3;++e)t[e]*r[e]<0&&(a|=1<<e);if(0!==a&&7!==a)for(let e=0;e<8;++e)if(0===(a&e)){for(let o=0;o<3;++o)i[o]=a&1<<o?0:e&1<<o?t[o]:r[o];n(i)}for(let t=0;t<3;++t)e[t]-=this.localOrigin[t],e[t+3]-=this.localOrigin[t];return e}};const c=(0,o.vt)(),d=(0,o.vt)(),u=(0,o.vt)(),h=(0,o.vt)(),m=(0,o.vt)()},16943:(e,t,r)=>{r.d(t,{E:()=>o});var i=r(44208);function o(){return!!(0,i.A)("enable-feature:objectAndLayerId-rendering")}},20304:(e,t,r)=>{r.d(t,{m:()=>o});var i=r(74333);class o extends i.n{constructor(e,t,r){super(e,"float",1,(i,o,n)=>i.setUniform1f(e,t(o,n),r))}}},20693:(e,t,r)=>{r.d(t,{yu:()=>m,Nz:()=>_,NB:()=>p,S7:()=>g});var i=r(58083),o=r(9093),n=r(38954),a=r(51850),s=r(23205),l=r(40710),c=r(33094),d=r(58029),u=r(74333);class h extends u.n{constructor(e,t,r){super(e,"mat4",2,(i,o,n)=>i.setUniformMatrix4fv(e,t(o,n),r))}}function m(e,t){t.instancedDoublePrecision?e.constants.add("cameraPosition","vec3",a.uY):e.uniforms.add(new l.W("cameraPosition",(e,t)=>(0,n.h)(v,t.camera.viewInverseTransposeMatrix[3]-e.origin[0],t.camera.viewInverseTransposeMatrix[7]-e.origin[1],t.camera.viewInverseTransposeMatrix[11]-e.origin[2])))}function p(e,t){if(!t.instancedDoublePrecision)return void e.uniforms.add(new d.F("proj",e=>e.camera.projectionMatrix),new h("view",(e,t)=>(0,i.Tl)(f,t.camera.viewMatrix,e.origin)),new l.W("localOrigin",e=>e.origin));const r=({camera:e})=>(0,n.h)(v,e.viewInverseTransposeMatrix[3],e.viewInverseTransposeMatrix[7],e.viewInverseTransposeMatrix[11]);e.uniforms.add(new d.F("proj",e=>e.camera.projectionMatrix),new d.F("view",e=>(0,i.Tl)(f,e.camera.viewMatrix,r(e))),new s.d("localOrigin",e=>r(e)))}const f=(0,o.vt)(),v=(0,a.vt)();function g(e){e.uniforms.add(new d.F("viewNormal",e=>e.camera.viewInverseTransposeMatrix))}function _(e){e.uniforms.add(new c.U("pixelRatio",e=>e.camera.pixelRatio/e.overlayStretch))}},22393:(e,t,r)=>{r.d(t,{c:()=>a});var i=r(31821);function o(e){e.code.add(i.H`vec3 evaluateDiffuseIlluminationHemisphere(vec3 ambientGround, vec3 ambientSky, float NdotNG) {
|
|
101
101
|
return ((1.0 - NdotNG) * ambientGround + (1.0 + NdotNG) * ambientSky) * 0.5;
|
|
102
102
|
}`),e.code.add(i.H`float integratedRadiance(float cosTheta2, float roughness) {
|
|
103
103
|
return (cosTheta2 - 1.0) / (cosTheta2 * (1.0 - roughness * roughness) - 1.0);
|
|
@@ -153,7 +153,7 @@ return (diffuseComponent + specularComponent);
|
|
|
153
153
|
}
|
|
154
154
|
`)):e.vertex.code.add(o.H`MaskedColor applyInstanceColor(MaskedColor color) {
|
|
155
155
|
return color;
|
|
156
|
-
}`)}},
|
|
156
|
+
}`)}},25634:(e,t,r)=>{r.d(t,{m8:()=>s,NV:()=>c});var i=r(97768),o=r(74887);class n{constructor(e){this._material=e.material,this._techniques=e.techniques,this._output=e.output}dispose(){}get _stippleTextures(){return this._techniques.context?.stippleTextures}get _markerTextures(){return this._techniques.context?.markerTextures}getTechnique(e,t){return this._techniques.get(e,this._material.getConfiguration(this._output,t))}ensureResources(e){return 2}}var a=r(65786);class s extends n{constructor(e){super(e),this._numLoading=0,this._disposed=!1,this._textures=e.textures,this.updateTexture(e.textureId),this._acquire(e.normalTextureId,e=>this._textureNormal=e),this._acquire(e.emissiveTextureId,e=>this._textureEmissive=e),this._acquire(e.occlusionTextureId,e=>this._textureOcclusion=e),this._acquire(e.metallicRoughnessTextureId,e=>this._textureMetallicRoughness=e)}dispose(){super.dispose(),this._texture=(0,i.Gz)(this._texture),this._textureNormal=(0,i.Gz)(this._textureNormal),this._textureEmissive=(0,i.Gz)(this._textureEmissive),this._textureOcclusion=(0,i.Gz)(this._textureOcclusion),this._textureMetallicRoughness=(0,i.Gz)(this._textureMetallicRoughness),this._disposed=!0}ensureResources(e){return 0===this._numLoading?2:1}get textureBindParameters(){return new c(this._texture?.texture??null,this._textureNormal?.texture??null,this._textureEmissive?.texture??null,this._textureOcclusion?.texture??null,this._textureMetallicRoughness?.texture??null)}updateTexture(e){null!=this._texture&&e===this._texture.id||(this._texture=(0,i.Gz)(this._texture),this._acquire(e,e=>this._texture=e))}_acquire(e,t){if(null==e)return void t(null);const r=this._textures.acquire(e);if((0,o.$X)(r))return++this._numLoading,void r.then(e=>{if(this._disposed)return(0,i.Gz)(e),void t(null);t(e)}).finally(()=>--this._numLoading);t(r)}}class l extends a.Y{constructor(e=null){super(),this.textureEmissive=e}}class c extends l{constructor(e,t,r,i,o,n,a){super(r),this.texture=e,this.textureNormal=t,this.textureOcclusion=i,this.textureMetallicRoughness=o,this.scale=n,this.normalTextureTransformMatrix=a}}},26425:(e,t,r)=>{r.d(t,{u:()=>n});var i=r(33094),o=r(31821);function n({code:e,uniforms:t},r){t.add(new i.U("dpDummy",()=>1)),e.add(o.H`vec3 dpAdd(vec3 hiA, vec3 loA, vec3 hiB, vec3 loB) {
|
|
157
157
|
vec3 hiD = hiA + hiB;
|
|
158
158
|
vec3 loD = loA + loB;
|
|
159
159
|
return dpDummy * hiD + loD;
|
|
@@ -197,7 +197,7 @@ return dpDummy * hiD + loD;
|
|
|
197
197
|
// multiply or tint (or something invalid)
|
|
198
198
|
return allMixed;
|
|
199
199
|
}
|
|
200
|
-
`)}},27993:(e,t,r)=>{r.d(t,{F:()=>s});var i=r(91218),o=r(16930),n=r(9762),a=r(65806);function s(e,t,r,o){return!(null==t||null==o||e.length<2)&&((0,i.canProjectWithoutEngine)(t,o)?(0,n.projectBuffer)(e,t,0,r,o,0,1):(l.x=e[0],l.y=e[1],l.z=e[2],l.spatialReference=t,(0,a.g)(l,r,o)))}const l={x:0,y:0,z:0,hasZ:!0,hasM:!1,spatialReference:o.A.WGS84,type:"point"}},28421:(e,t,r)=>{r.d(t,{J:()=>o});var i=r(74333);class o extends i.n{constructor(e,t,r){super(e,"float",2,(i,o,n)=>i.setUniform1f(e,t(o,n),r))}}},28491:(e,t,r)=>{r.d(t,{D:()=>U,b:()=>G});var i=r(32680),o=r(49255),n=r(76591),a=r(76597),s=r(24321),l=r(
|
|
200
|
+
`)}},27993:(e,t,r)=>{r.d(t,{F:()=>s});var i=r(91218),o=r(16930),n=r(9762),a=r(65806);function s(e,t,r,o){return!(null==t||null==o||e.length<2)&&((0,i.canProjectWithoutEngine)(t,o)?(0,n.projectBuffer)(e,t,0,r,o,0,1):(l.x=e[0],l.y=e[1],l.z=e[2],l.spatialReference=t,(0,a.g)(l,r,o)))}const l={x:0,y:0,z:0,hasZ:!0,hasM:!1,spatialReference:o.A.WGS84,type:"point"}},28421:(e,t,r)=>{r.d(t,{J:()=>o});var i=r(74333);class o extends i.n{constructor(e,t,r){super(e,"float",2,(i,o,n)=>i.setUniform1f(e,t(o,n),r))}}},28491:(e,t,r)=>{r.d(t,{D:()=>U,b:()=>G});var i=r(32680),o=r(49255),n=r(76591),a=r(76597),s=r(24321),l=r(72722),c=r(43519),d=r(96336),u=r(71955),h=r(53466),m=r(92700),p=r(72824),f=r(35640),v=r(40261),g=r(77695),_=r(14527),x=r(89390),w=r(98619),b=r(62602),y=r(22393),M=r(59469),T=r(32482),C=r(96598),S=r(51406),E=r(42398),A=r(58614),I=r(27950),R=r(20693),F=r(33079),O=r(71988),P=r(20304),D=r(31821),H=r(63761),N=r(10906),z=r(43616),L=r(51255),B=r(14113),V=r(49788);function G(e){const t=new B.N5,{attributes:r,vertex:G,fragment:U,varyings:j}=t,{output:W,normalType:k,offsetBackfaces:$,spherical:Z,snowCover:q,pbrMode:Y,textureAlphaPremultiplied:X,instancedDoublePrecision:K,hasVertexColors:J,hasVertexTangents:Q,hasColorTexture:ee,hasNormalTexture:te,hasNormalTextureTransform:re,hasColorTextureTransform:ie}=e;if((0,R.NB)(G,e),r.add("position","vec3"),j.add("vpos","vec3",{invariant:!0}),t.include(E.A,e),t.include(l.B,e),t.include(f.Ge,e),t.include(S.q2,e),!(0,o._o)(W))return t.include(v.E,e),t;t.include(S.Sx,e),t.include(S.MU,e),t.include(S.O1,e),t.include(S.QM,e),(0,R.yu)(G,e),t.include(d.Y,e),t.include(a.d);const oe=0===k||1===k;return oe&&$&&t.include(i.M),t.include(g.W,e),t.include(p.Mh,e),t.include(s.v,e),j.add("vPositionLocal","vec3"),t.include(h.U,e),t.include(u.K,e),t.include(m.c,e),G.uniforms.add(new O.E("externalColor",e=>e.externalColor,{supportsNaN:!0})),j.add("vcolorExt","vec4"),t.include(C.Z,e),G.include(c.WD),G.include(c.oF),t.include(K?T.G:T.Bz,e),G.main.add(D.H`
|
|
201
201
|
forwardNormalizedVertexColor();
|
|
202
202
|
|
|
203
203
|
MaskedColor maskedColor =
|
|
@@ -311,9 +311,9 @@ posClip.z += 0.0000003 * posClip.w;
|
|
|
311
311
|
return posClip;
|
|
312
312
|
}`)}},32976:(e,t,r)=>{r.d(t,{o:()=>o});var i=r(74333);class o extends i.n{constructor(e,t){super(e,"bool",0,(r,i)=>r.setUniform1b(e,t(i)))}}},33079:(e,t,r)=>{r.d(t,{t:()=>o});var i=r(74333);class o extends i.n{constructor(e,t,r){super(e,"vec3",1,(i,o,n)=>i.setUniform3fv(e,t(o,n),r))}}},33094:(e,t,r)=>{r.d(t,{U:()=>o});var i=r(74333);class o extends i.n{constructor(e,t,r){super(e,"float",0,(i,o)=>i.setUniform1f(e,t(o),r))}}},33120:(e,t,r)=>{r.d(t,{i$:()=>a,xJ:()=>n}),r(46686),r(33752);var i=r(77108),o=r(31821);function n(e){e.vertex.uniforms.add(new i.E("nearFar",e=>e.camera.nearFar))}function a(e){e.vertex.code.add(o.H`float calculateLinearDepth(vec2 nearFar,float z) {
|
|
313
313
|
return (-z - nearFar[0]) / (nearFar[1] - nearFar[0]);
|
|
314
|
-
}`)}},33524:(e,t,r)=>{r.d(t,{
|
|
314
|
+
}`)}},33524:(e,t,r)=>{r.d(t,{Sv:()=>u,Yf:()=>a,mE:()=>d,mt:()=>l,z5:()=>s});var i=r(63907),o=r(90644);const n=(0,o.p3)(1,0,1,771);function a(e,t=!1){switch(e){case 0:return t?o.RC:o.T8;case 1:return n;case 2:case 3:return null}}function s(e){if(e.draped)return null;switch(e.oitPass){case 0:case 2:return e.writeDepth?o.Uy:null;case 1:case 3:return null}}function l(e,t=513){return{func:0===e||2===e?t:515}}const c={factor:-1,units:-2};function d({oitPass:e,enableOffset:t}){return t&&1===e?c:null}function u(e,t){return 1===e?t?{buffers:[i.r6,i.yI,i.Fq]}:{buffers:[i.r6,i.yI]}:t?{buffers:[i.r6,i.yI]}:null}},33752:(e,t,r)=>{r.d(t,{EM:()=>s,dO:()=>a});var i=r(29242),o=r(51850),n=(r(26425),r(40710),r(33079),r(31821),r(98353),r(35644),r(58029),r(65786));class a extends n.Y{constructor(){super(...arguments),this.transformWorldFromViewTH=(0,o.vt)(),this.transformWorldFromViewTL=(0,o.vt)(),this.transformViewFromCameraRelativeRS=(0,i.vt)()}}class s extends n.Y{constructor(){super(...arguments),this.transformWorldFromModelRS=(0,i.vt)(),this.transformWorldFromModelTH=(0,o.vt)(),this.transformWorldFromModelTL=(0,o.vt)()}}},34845:(e,t,r)=>{r.d(t,{Ir:()=>d});var i=r(37585),o=r(48163),n=r(87317),a=r(91829),s=r(77108),l=r(14314),c=r(31821);function d(e){e.fragment.uniforms.add(new l.I("projInfo",e=>function(e){const t=e.projectionMatrix;return 0===t[11]?(0,n.s)(u,2/(e.fullWidth*t[0]),2/(e.fullHeight*t[5]),(1+t[12])/t[0],(1+t[13])/t[5]):(0,n.s)(u,-2/(e.fullWidth*t[0]),-2/(e.fullHeight*t[5]),(1-t[8])/t[0],(1-t[9])/t[5])}(e.camera))),e.fragment.uniforms.add(new s.E("zScale",e=>0===e.camera.projectionMatrix[11]?(0,i.hZ)(h,0,1):(0,i.hZ)(h,1,0))),e.fragment.code.add(c.H`vec3 reconstructPosition(vec2 fragCoord, float depth) {
|
|
315
315
|
return vec3((fragCoord * projInfo.xy + projInfo.zw) * (zScale.x * depth + zScale.y), depth);
|
|
316
|
-
}`)}const u=(0,a.vt)(),h=(0,o.vt)()},35640:(e,t,r)=>{r.d(t,{Ge:()=>c,VQ:()=>u});var i=r(87317),o=r(91829),n=r(52587),a=r(
|
|
316
|
+
}`)}const u=(0,a.vt)(),h=(0,o.vt)()},35640:(e,t,r)=>{r.d(t,{Ge:()=>c,VQ:()=>u});var i=r(87317),o=r(91829),n=r(52587),a=r(20693),s=r(71988),l=r(31821);function c(e,t){const r=e.vertex;t.hasVerticalOffset?(u(r),t.hasScreenSizePerspective&&(e.include(n.Y6),(0,n.OH)(r),(0,a.yu)(e.vertex,t)),r.code.add(l.H`
|
|
317
317
|
vec3 calculateVerticalOffset(vec3 worldPos, vec3 localOrigin) {
|
|
318
318
|
float viewDistance = length((view * vec4(worldPos, 1.0)).xyz);
|
|
319
319
|
${t.spherical?l.H`vec3 worldNormal = normalize(worldPos + localOrigin);`:l.H`vec3 worldNormal = vec3(0.0, 0.0, 1.0);`}
|
|
@@ -334,7 +334,7 @@ return vec3((fragCoord * projInfo.xy + projInfo.zw) * (zScale.x * depth + zScale
|
|
|
334
334
|
objectAndLayerIdColorVarying = ${o} * 0.003921568627451;
|
|
335
335
|
}`),e.fragment.code.add(i.H`void outputObjectAndLayerIdColor() {
|
|
336
336
|
fragColor = objectAndLayerIdColorVarying;
|
|
337
|
-
}`)}},38969:(e,t,r)=>{r.d(t,{i:()=>o});var i=r(37955);function o(e,t){return new Promise((r,o)=>{e.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?r():(t((0,i.Oo)(e,"canplay",r)),t((0,i.Oo)(e,"error",o)))})}},
|
|
337
|
+
}`)}},38969:(e,t,r)=>{r.d(t,{i:()=>o});var i=r(37955);function o(e,t){return new Promise((r,o)=>{e.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?r():(t((0,i.Oo)(e,"canplay",r)),t((0,i.Oo)(e,"error",o)))})}},40261:(e,t,r)=>{r.d(t,{E:()=>g});var i=r(33120),o=r(76591),n=r(76597),a=r(96336),s=r(36782),l=r(53466),c=r(72824),d=r(31821);function u(e,t){switch(t.output){case 3:case 4:case 5:case 6:e.fragment.code.add(d.H`float _calculateFragDepth(const in float depth) {
|
|
338
338
|
const float SLOPE_SCALE = 2.0;
|
|
339
339
|
const float BIAS = 20.0 * .000015259;
|
|
340
340
|
float m = max(abs(dFdx(depth)), abs(dFdy(depth)));
|
|
@@ -345,7 +345,7 @@ float fragDepth = _calculateFragDepth(_linearDepth);
|
|
|
345
345
|
gl_FragDepth = fragDepth;
|
|
346
346
|
}`);break;case 7:e.fragment.code.add(d.H`void outputDepth(float _linearDepth){
|
|
347
347
|
gl_FragDepth = _linearDepth;
|
|
348
|
-
}`)}}var h=r(42593),m=r(42398),p=r(58614),f=r(
|
|
348
|
+
}`)}}var h=r(42593),m=r(42398),p=r(58614),f=r(20693),v=r(63761);function g(e,t){const{vertex:r,fragment:g,varyings:_}=e,{hasColorTexture:x,alphaDiscardMode:w}=t,b=x&&1!==w,{output:y,normalType:M,hasColorTextureTransform:T}=t;switch(y){case 1:(0,f.NB)(r,t),e.include(n.d),g.include(o.HQ,t),e.include(l.U,t),b&&g.uniforms.add(new v.N("tex",e=>e.texture)),r.main.add(d.H`vpos = getVertexInLocalOriginSpace();
|
|
349
349
|
vpos = subtractOrigin(vpos);
|
|
350
350
|
vpos = addVerticalOffset(vpos, localOrigin);
|
|
351
351
|
gl_Position = transformPosition(proj, view, vpos);
|
|
@@ -578,7 +578,7 @@ return applyScreenSizePerspectiveScaleFactorVec2(size, screenSizePerspectiveScal
|
|
|
578
578
|
}`)}function l(e){e.uniforms.add(new n.t("screenSizePerspective",e=>d(e.screenSizePerspective,e.screenSizePerspectiveMinPixelReferenceSize)))}function c(e){e.uniforms.add(new n.t("screenSizePerspectiveAlignment",e=>d(e.screenSizePerspectiveAlignment||e.screenSizePerspective,e.screenSizePerspectiveAlignment?null:e.screenSizePerspectiveMinPixelReferenceSize)))}function d(e,t){const r=null!=t&&null!=e?Math.min(e.minPixelSize/t,1):0;return e?(0,i.h)(u,e.divisor,e.offset,r):(0,i.h)(u,0,0,0)}const u=(0,o.vt)()},53466:(e,t,r)=>{r.d(t,{U:()=>n});var i=r(21818),o=r(31821);function n(e,t){switch(t.textureCoordinateType){case 1:return e.attributes.add("uv0","vec2"),e.varyings.add("vuv0","vec2"),void e.vertex.code.add(o.H`void forwardTextureCoordinates() { vuv0 = uv0; }`);case 2:return e.attributes.add("uv0","vec2"),e.attributes.add("uvRegion","vec4"),e.varyings.add("vuv0","vec2"),e.varyings.add("vuvRegion","vec4"),void e.vertex.code.add(o.H`void forwardTextureCoordinates() {
|
|
579
579
|
vuv0 = uv0;
|
|
580
580
|
vuvRegion = uvRegion;
|
|
581
|
-
}`);default:(0,i.Xb)(t.textureCoordinateType);case 0:return void e.vertex.code.add(o.H`void forwardTextureCoordinates() {}`);case 3:return}}},57323:(e,t,r)=>{r.d(t,{R:()=>L,b:()=>z});var i=r(32680),o=r(49255),n=r(76591),a=r(76597),s=r(24321),l=r(
|
|
581
|
+
}`);default:(0,i.Xb)(t.textureCoordinateType);case 0:return void e.vertex.code.add(o.H`void forwardTextureCoordinates() {}`);case 3:return}}},57323:(e,t,r)=>{r.d(t,{R:()=>L,b:()=>z});var i=r(32680),o=r(49255),n=r(76591),a=r(76597),s=r(24321),l=r(72722),c=r(43519),d=r(96336),u=r(71955),h=r(53466),m=r(92700),p=r(35640),f=r(40261),v=r(14527),g=r(89390),_=r(98619),x=r(22393),w=r(59469),b=r(32482),y=r(96598),M=r(42398),T=r(58614),C=r(27950),S=r(20693),E=r(33079),A=r(71988),I=r(20304),R=r(31821),F=r(63761),O=r(10906),P=r(43616),D=r(51255),H=r(14113),N=r(49788);function z(e){const t=new H.N5,{attributes:r,vertex:z,fragment:L,varyings:B}=t,{output:V,offsetBackfaces:G,pbrMode:U,snowCover:j,spherical:W}=e,k=1===U||2===U;if((0,S.NB)(z,e),r.add("position","vec3"),B.add("vpos","vec3",{invariant:!0}),t.include(M.A,e),t.include(l.B,e),t.include(p.Ge,e),t.include(y.Z,e),!(0,o._o)(V))return t.include(f.E,e),t;(0,S.yu)(t.vertex,e),t.include(d.Y,e),t.include(a.d),G&&t.include(i.M),B.add("vNormalWorld","vec3"),B.add("localvpos","vec3",{invariant:!0}),t.include(h.U,e),t.include(u.K,e),t.include(s.v,e),t.include(m.c,e),z.include(c.WD),z.include(c.oF),z.uniforms.add(new A.E("externalColor",e=>e.externalColor,{supportsNaN:!0})),B.add("vcolorExt","vec4"),t.include(e.instancedDoublePrecision?b.G:b.Bz,e),z.main.add(R.H`
|
|
582
582
|
forwardNormalizedVertexColor();
|
|
583
583
|
|
|
584
584
|
MaskedColor maskedColorExt =
|
|
@@ -636,7 +636,7 @@ vuvRegion = uvRegion;
|
|
|
636
636
|
${(0,R.If)(j,"mrr = applySnowToMRR(mrr, snow);")}
|
|
637
637
|
vec3 shadedColor = evaluateSceneLightingPBR(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight, viewDirection, groundNormal, mrr, additionalAmbientIrradiance);`:R.H`vec3 shadedColor = evaluateSceneLighting(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight);`}
|
|
638
638
|
vec4 finalColor = vec4(shadedColor, opacity_);
|
|
639
|
-
outputColorHighlightOLID(finalColor, vpos, albedo ${(0,R.If)(j,", 1.0")});`),t}const L=Object.freeze(Object.defineProperty({__proto__:null,build:z},Symbol.toStringTag,{value:"Module"}))},57917:(e,t,r)=>{r.d(t,{S:()=>n});var i=r(34275),o=r(20498);function n(e){if(e.length<i.y9)return Array.from(e);if(Array.isArray(e))return Float64Array.from(e);if(!("BYTES_PER_ELEMENT"in e))return Array.from(e);switch(e.BYTES_PER_ELEMENT){case 1:return Uint8Array.from(e);case 2:return(0,i.LW)(e)?(0,o.pX)().from(e):(0,i.jq)(e)?Uint16Array.from(e):Int16Array.from(e);case 4:return Float32Array.from(e);default:return Float64Array.from(e)}}},58614:(e,t,r)=>{r.d(t,{S:()=>a}),r(28421);var i=r(20304),o=r(31821),n=r(49788);function a(e,t){!function(e,t,r){const i=e.fragment,a=t.alphaDiscardMode,s=0===a;2!==a&&3!==a||i.uniforms.add(r),i.code.add(o.H`
|
|
639
|
+
outputColorHighlightOLID(finalColor, vpos, albedo ${(0,R.If)(j,", 1.0")});`),t}const L=Object.freeze(Object.defineProperty({__proto__:null,build:z},Symbol.toStringTag,{value:"Module"}))},57917:(e,t,r)=>{r.d(t,{S:()=>n});var i=r(34275),o=r(20498);function n(e){if(e.length<i.y9)return Array.from(e);if(Array.isArray(e))return Float64Array.from(e);if(!("BYTES_PER_ELEMENT"in e))return Array.from(e);switch(e.BYTES_PER_ELEMENT){case 1:return Uint8Array.from(e);case 2:return(0,i.LW)(e)?(0,o.pX)().from(e):(0,i.jq)(e)?Uint16Array.from(e):Int16Array.from(e);case 4:return Float32Array.from(e);default:return Float64Array.from(e)}}},58029:(e,t,r)=>{r.d(t,{F:()=>o});var i=r(74333);class o extends i.n{constructor(e,t,r){super(e,"mat4",0,(i,o)=>i.setUniformMatrix4fv(e,t(o),r))}}},58614:(e,t,r)=>{r.d(t,{S:()=>a}),r(28421);var i=r(20304),o=r(31821),n=r(49788);function a(e,t){!function(e,t,r){const i=e.fragment,a=t.alphaDiscardMode,s=0===a;2!==a&&3!==a||i.uniforms.add(r),i.code.add(o.H`
|
|
640
640
|
void discardOrAdjustAlpha(inout vec4 color) {
|
|
641
641
|
${1===a?"color.a = 1.0;":`if (color.a < ${s?o.H.float(n.Q):"textureAlphaCutoff"}) {\n discard;\n } ${(0,o.If)(2===a,"else { color.a = 1.0; }")}`}
|
|
642
642
|
}
|
|
@@ -665,29 +665,7 @@ float occlusion;`),d&&c.uniforms.add(1===p?new l.N("texMetallicRoughness",e=>e.t
|
|
|
665
665
|
${(0,a.If)(d,`applyMetallicRoughness(${u?"metallicRoughnessUV":"vuv0"});`)}
|
|
666
666
|
${(0,a.If)(h,`applyOcclusion(${m?"occlusionUV":"vuv0"});`)}
|
|
667
667
|
}
|
|
668
|
-
`)}(r(74810),r(65786)).Y},59907:(e,t,r)=>{r.d(t,{Hk:()=>h,Pq:()=>u,Ue:()=>l,Ut:()=>d,p1:()=>m,tb:()=>p,uO:()=>s,vJ:()=>v,vx:()=>f}),r(38954);var i=r(51850),o=r(58083),n=r(13030),a=r(620);function s(e,t,r,i=1){const{data:o,indices:n}=e,a=t.typedBuffer,s=t.typedBufferStride,l=n.length;if(r*=s,1===i)for(let e=0;e<l;++e)a[r]=o[n[e]],r+=s;else for(let e=0;e<l;++e){const t=o[n[e]];for(let e=0;e<i;e++)a[r]=t,r+=s}}function l(e,t,r){const{data:i,indices:o}=e,n=t.typedBuffer,a=t.typedBufferStride,s=o.length;r*=a;for(let e=0;e<s;++e){const t=2*o[e];n[r]=i[t],n[r+1]=i[t+1],r+=a}}function c(e,t,r,i=1){const{data:o,indices:n}=e,a=t.typedBuffer,s=t.typedBufferStride,l=n.length;if(r*=s,1===i)for(let e=0;e<l;++e){const t=3*n[e];a[r]=o[t],a[r+1]=o[t+1],a[r+2]=o[t+2],r+=s}else for(let e=0;e<l;++e){const t=3*n[e];for(let e=0;e<i;++e)a[r]=o[t],a[r+1]=o[t+1],a[r+2]=o[t+2],r+=s}}function d(e,t,r,i=1){const{data:o,indices:n}=e,a=t.typedBuffer,s=t.typedBufferStride,l=n.length;if(r*=s,1===i)for(let e=0;e<l;++e){const t=4*n[e];a[r]=o[t],a[r+1]=o[t+1],a[r+2]=o[t+2],a[r+3]=o[t+3],r+=s}else for(let e=0;e<l;++e){const t=4*n[e];for(let e=0;e<i;++e)a[r]=o[t],a[r+1]=o[t+1],a[r+2]=o[t+2],a[r+3]=o[t+3],r+=s}}function u(e,t,r){const i=e.typedBuffer,o=e.typedBufferStride;t*=o;for(let e=0;e<r;++e)i[t]=0,i[t+1]=0,i[t+2]=0,i[t+3]=0,t+=o}function h(e,t,r,i,n=1){if(!t)return void c(e,r,i,n);const{data:a,indices:s}=e,l=r.typedBuffer,d=r.typedBufferStride,u=s.length,h=t[0],m=t[1],p=t[2],f=t[4],v=t[5],g=t[6],_=t[8],x=t[9],w=t[10],b=t[12],y=t[13],M=t[14];i*=d;let T=0,C=0,S=0;const E=(0,o.tZ)(t)?e=>{T=a[e]+b,C=a[e+1]+y,S=a[e+2]+M}:e=>{const t=a[e],r=a[e+1],i=a[e+2];T=h*t+f*r+_*i+b,C=m*t+v*r+x*i+y,S=p*t+g*r+w*i+M};if(1===n)for(let e=0;e<u;++e)E(3*s[e]),l[i]=T,l[i+1]=C,l[i+2]=S,i+=d;else for(let e=0;e<u;++e){E(3*s[e]);for(let e=0;e<n;++e)l[i]=T,l[i+1]=C,l[i+2]=S,i+=d}}function m(e,t,r,i,n=1){if(!t)return void c(e,r,i,n);const{data:a,indices:s}=e,l=t,d=r.typedBuffer,u=r.typedBufferStride,h=s.length,m=l[0],p=l[1],f=l[2],v=l[4],g=l[5],_=l[6],x=l[8],w=l[9],b=l[10],y=!(0,o.ut)(l),M=1e-6,T=1-M;i*=u;let C=0,S=0,E=0;const A=(0,o.tZ)(l)?e=>{C=a[e],S=a[e+1],E=a[e+2]}:e=>{const t=a[e],r=a[e+1],i=a[e+2];C=m*t+v*r+x*i,S=p*t+g*r+w*i,E=f*t+_*r+b*i};if(1===n)if(y)for(let e=0;e<h;++e){A(3*s[e]);const t=C*C+S*S+E*E;if(t<T&&t>M){const e=1/Math.sqrt(t);d[i]=C*e,d[i+1]=S*e,d[i+2]=E*e}else d[i]=C,d[i+1]=S,d[i+2]=E;i+=u}else for(let e=0;e<h;++e)A(3*s[e]),d[i]=C,d[i+1]=S,d[i+2]=E,i+=u;else for(let e=0;e<h;++e){if(A(3*s[e]),y){const e=C*C+S*S+E*E;if(e<T&&e>M){const t=1/Math.sqrt(e);C*=t,S*=t,E*=t}}for(let e=0;e<n;++e)d[i]=C,d[i+1]=S,d[i+2]=E,i+=u}}function p(e,t,r,i,o=1){const{data:n,indices:a}=e,s=r.typedBuffer,l=r.typedBufferStride,c=a.length;if(i*=l,t===n.length&&4===t){s[i]=n[0],s[i+1]=n[1],s[i+2]=n[2],s[i+3]=n[3];const e=new Uint32Array(r.typedBuffer.buffer,r.start),t=l/4,a=e[i/=4];i+=t;const d=c*o;for(let r=1;r<d;++r)e[i]=a,i+=t;return}if(1!==o)if(4!==t)for(let e=0;e<c;++e){const t=3*a[e];for(let e=0;e<o;++e)s[i]=n[t],s[i+1]=n[t+1],s[i+2]=n[t+2],s[i+3]=255,i+=l}else for(let e=0;e<c;++e){const t=4*a[e];for(let e=0;e<o;++e)s[i]=n[t],s[i+1]=n[t+1],s[i+2]=n[t+2],s[i+3]=n[t+3],i+=l}else{if(4===t){for(let e=0;e<c;++e){const t=4*a[e];s[i]=n[t],s[i+1]=n[t+1],s[i+2]=n[t+2],s[i+3]=n[t+3],i+=l}return}for(let e=0;e<c;++e){const t=3*a[e];s[i]=n[t],s[i+1]=n[t+1],s[i+2]=n[t+2],s[i+3]=255,i+=l}}}function f(e,t,r,i,o=1){const n=t.typedBuffer,a=t.typedBufferStride;if(i*=a,1===o)for(let t=0;t<r;++t)n[i]=e[0],n[i+1]=e[1],n[i+2]=e[2],n[i+3]=e[3],i+=a;else for(let t=0;t<r;++t)for(let t=0;t<o;++t)n[i]=e[0],n[i+1]=e[1],n[i+2]=e[2],n[i+3]=e[3],i+=a}function v(e,t,r,i,o,a,s){let l={numItems:0,numVerticesPerItem:0};for(const c of r.fields.keys()){const r=e.get(c),d=r?.indices;if(r&&d)"position"===c&&(l={numItems:1,numVerticesPerItem:d.length}),g(c,r,i,o,a,s);else if("olidColor"===c&&null!=t){const r=e.get("position")?.indices;if(r){const e=r.length;f(t,a.getField(c,n.XP),e,s)}}}return l}function g(e,t,r,i,s,u){switch(e){case"position":{(0,a.vA)(3===t.size);const i=s.getField(e,n.xs);(0,a.vA)(!!i,`No buffer view for ${e}`),h(t,r,i,u);break}case"normal":{(0,a.vA)(3===t.size);const r=s.getField(e,n.xs);(0,a.vA)(!!r,`No buffer view for ${e}`),m(t,i,r,u);break}case"normalCompressed":case"profileRight":case"profileUp":{(0,a.vA)(2===t.size);const r=s.getField(e,n.mJ);(0,a.vA)(!!r,`No buffer view for ${e}`),l(t,r,u);break}case"uv0":{(0,a.vA)(2===t.size);const r=s.getField(e,n.ZD)??s.getField(e,n.gH);(0,a.vA)(!!r,`No buffer view for ${e}`),l(t,r,u);break}case"uvi":{(0,a.vA)(2===t.size);const r=s.getField(e,n.mJ);(0,a.vA)(!!r,`No buffer view for ${e}`),l(t,r,u);break}case"color":case"symbolColor":{const r=s.getField(e,n.XP);(0,a.vA)(!!r,`No buffer view for ${e}`),(0,a.vA)(3===t.size||4===t.size),p(t,t.size,r,u);break}case"colorFeatureAttribute":case"opacityFeatureAttribute":case"sizeFeatureAttribute":{const r=s.getField(e,n.Y$)??s.getField(e,n.Y$);(0,a.vA)(!!r,`No buffer view for ${e}`),(0,a.vA)(1===t.size),function(e,t,r){const{data:i,indices:o}=e,n=t.typedBuffer,a=t.typedBufferStride,s=o.length,l=i[0];r*=a;for(let e=0;e<s;++e)n[r]=l,r+=a}(t,r,u);break}case"tangent":{(0,a.vA)(4===t.size);const i=s.getField(e,n.Eq);(0,a.vA)(!!i,`No buffer view for ${e}`),function(e,t,r,i,n=1){if(!t)return void d(e,r,i,n);const{data:a,indices:s}=e,l=t,c=r.typedBuffer,u=r.typedBufferStride,h=s.length,m=l[0],p=l[1],f=l[2],v=l[4],g=l[5],_=l[6],x=l[8],w=l[9],b=l[10],y=!(0,o.ut)(l),M=1e-6,T=1-M;if(i*=u,1===n)for(let e=0;e<h;++e){const t=4*s[e],r=a[t],o=a[t+1],n=a[t+2],l=a[t+3];let d=m*r+v*o+x*n,h=p*r+g*o+w*n,C=f*r+_*o+b*n;if(y){const e=d*d+h*h+C*C;if(e<T&&e>M){const t=1/Math.sqrt(e);d*=t,h*=t,C*=t}}c[i]=d,c[i+1]=h,c[i+2]=C,c[i+3]=l,i+=u}else for(let e=0;e<h;++e){const t=4*s[e],r=a[t],o=a[t+1],l=a[t+2],d=a[t+3];let h=m*r+v*o+x*l,C=p*r+g*o+w*l,S=f*r+_*o+b*l;if(y){const e=h*h+C*C+S*S;if(e<T&&e>M){const t=1/Math.sqrt(e);h*=t,C*=t,S*=t}}for(let e=0;e<n;++e)c[i]=h,c[i+1]=C,c[i+2]=S,c[i+3]=d,i+=u}}(t,r,i,u);break}case"profileVertexAndNormal":{(0,a.vA)(4===t.size);const r=s.getField(e,n.jz)??s.getField(e,n.Eq);(0,a.vA)(!!r,`No buffer view for ${e}`),d(t,r,u);break}case"profileAuxData":{(0,a.vA)(3===t.size);const r=s.getField(e,n.EC)??s.getField(e,n.xs);(0,a.vA)(!!r,`No buffer view for ${e}`),c(t,r,u);break}}}(0,i.vt)()},
|
|
669
|
-
vec3 getVertexInLocalOriginSpace() {
|
|
670
|
-
return ${r?o?"(model * vec4(instanceModel * localPosition().xyz, 1.0)).xyz":"(model * localPosition()).xyz":o?"instanceModel * localPosition().xyz":"localPosition().xyz"};
|
|
671
|
-
}
|
|
672
|
-
|
|
673
|
-
vec3 subtractOrigin(vec3 _pos) {
|
|
674
|
-
${o?u.H`
|
|
675
|
-
// Issue: (should be resolved now with invariant position) https://devtopia.esri.com/WebGIS/arcgis-js-api/issues/56280
|
|
676
|
-
vec3 originDelta = dpAdd(viewOriginHi, viewOriginLo, -instanceModelOriginHi, -instanceModelOriginLo);
|
|
677
|
-
return _pos - originDelta;`:"return vpos;"}
|
|
678
|
-
}
|
|
679
|
-
`),w.code.add(u.H`
|
|
680
|
-
vec3 dpNormal(vec4 _normal) {
|
|
681
|
-
return normalize(${r?o?"normalLocalOriginFromModel * (instanceModelNormal * _normal.xyz)":"normalLocalOriginFromModel * _normal.xyz":o?"instanceModelNormal * _normal.xyz":"_normal.xyz"});
|
|
682
|
-
}
|
|
683
|
-
`),2===v&&((0,c.S7)(w),w.code.add(u.H`
|
|
684
|
-
vec3 dpNormalView(vec4 _normal) {
|
|
685
|
-
return normalize((viewNormal * ${r?o?"vec4(normalLocalOriginFromModel * (instanceModelNormal * _normal.xyz), 1.0)":"vec4(normalLocalOriginFromModel * _normal.xyz, 1.0)":o?"vec4(instanceModelNormal * _normal.xyz, 1.0)":"_normal"}).xyz);
|
|
686
|
-
}
|
|
687
|
-
`)),_&&w.code.add(u.H`
|
|
688
|
-
vec4 dpTransformVertexTangent(vec4 _tangent) {
|
|
689
|
-
${r?o?"return vec4(normalLocalOriginFromModel * (instanceModelNormal * _tangent.xyz), _tangent.w);":"return vec4(normalLocalOriginFromModel * _tangent.xyz, _tangent.w);":o?"return vec4(instanceModelNormal * _tangent.xyz, _tangent.w);":"return _tangent;"}
|
|
690
|
-
}`)}const x=(0,s.vt)()},62602:(e,t,r)=>{r.d(t,{r:()=>n});var i=r(21818),o=r(31821);function n(e,t){const r=e.fragment;switch(r.code.add(o.H`struct ShadingNormalParameters {
|
|
668
|
+
`)}(r(74810),r(65786)).Y},59907:(e,t,r)=>{r.d(t,{Hk:()=>h,Pq:()=>u,Ue:()=>l,Ut:()=>d,p1:()=>m,tb:()=>p,uO:()=>s,vJ:()=>v,vx:()=>f}),r(38954);var i=r(51850),o=r(58083),n=r(13030),a=r(620);function s(e,t,r,i=1){const{data:o,indices:n}=e,a=t.typedBuffer,s=t.typedBufferStride,l=n.length;if(r*=s,1===i)for(let e=0;e<l;++e)a[r]=o[n[e]],r+=s;else for(let e=0;e<l;++e){const t=o[n[e]];for(let e=0;e<i;e++)a[r]=t,r+=s}}function l(e,t,r){const{data:i,indices:o}=e,n=t.typedBuffer,a=t.typedBufferStride,s=o.length;r*=a;for(let e=0;e<s;++e){const t=2*o[e];n[r]=i[t],n[r+1]=i[t+1],r+=a}}function c(e,t,r,i=1){const{data:o,indices:n}=e,a=t.typedBuffer,s=t.typedBufferStride,l=n.length;if(r*=s,1===i)for(let e=0;e<l;++e){const t=3*n[e];a[r]=o[t],a[r+1]=o[t+1],a[r+2]=o[t+2],r+=s}else for(let e=0;e<l;++e){const t=3*n[e];for(let e=0;e<i;++e)a[r]=o[t],a[r+1]=o[t+1],a[r+2]=o[t+2],r+=s}}function d(e,t,r,i=1){const{data:o,indices:n}=e,a=t.typedBuffer,s=t.typedBufferStride,l=n.length;if(r*=s,1===i)for(let e=0;e<l;++e){const t=4*n[e];a[r]=o[t],a[r+1]=o[t+1],a[r+2]=o[t+2],a[r+3]=o[t+3],r+=s}else for(let e=0;e<l;++e){const t=4*n[e];for(let e=0;e<i;++e)a[r]=o[t],a[r+1]=o[t+1],a[r+2]=o[t+2],a[r+3]=o[t+3],r+=s}}function u(e,t,r){const i=e.typedBuffer,o=e.typedBufferStride;t*=o;for(let e=0;e<r;++e)i[t]=0,i[t+1]=0,i[t+2]=0,i[t+3]=0,t+=o}function h(e,t,r,i,n=1){if(!t)return void c(e,r,i,n);const{data:a,indices:s}=e,l=r.typedBuffer,d=r.typedBufferStride,u=s.length,h=t[0],m=t[1],p=t[2],f=t[4],v=t[5],g=t[6],_=t[8],x=t[9],w=t[10],b=t[12],y=t[13],M=t[14];i*=d;let T=0,C=0,S=0;const E=(0,o.tZ)(t)?e=>{T=a[e]+b,C=a[e+1]+y,S=a[e+2]+M}:e=>{const t=a[e],r=a[e+1],i=a[e+2];T=h*t+f*r+_*i+b,C=m*t+v*r+x*i+y,S=p*t+g*r+w*i+M};if(1===n)for(let e=0;e<u;++e)E(3*s[e]),l[i]=T,l[i+1]=C,l[i+2]=S,i+=d;else for(let e=0;e<u;++e){E(3*s[e]);for(let e=0;e<n;++e)l[i]=T,l[i+1]=C,l[i+2]=S,i+=d}}function m(e,t,r,i,n=1){if(!t)return void c(e,r,i,n);const{data:a,indices:s}=e,l=t,d=r.typedBuffer,u=r.typedBufferStride,h=s.length,m=l[0],p=l[1],f=l[2],v=l[4],g=l[5],_=l[6],x=l[8],w=l[9],b=l[10],y=!(0,o.ut)(l),M=1e-6,T=1-M;i*=u;let C=0,S=0,E=0;const A=(0,o.tZ)(l)?e=>{C=a[e],S=a[e+1],E=a[e+2]}:e=>{const t=a[e],r=a[e+1],i=a[e+2];C=m*t+v*r+x*i,S=p*t+g*r+w*i,E=f*t+_*r+b*i};if(1===n)if(y)for(let e=0;e<h;++e){A(3*s[e]);const t=C*C+S*S+E*E;if(t<T&&t>M){const e=1/Math.sqrt(t);d[i]=C*e,d[i+1]=S*e,d[i+2]=E*e}else d[i]=C,d[i+1]=S,d[i+2]=E;i+=u}else for(let e=0;e<h;++e)A(3*s[e]),d[i]=C,d[i+1]=S,d[i+2]=E,i+=u;else for(let e=0;e<h;++e){if(A(3*s[e]),y){const e=C*C+S*S+E*E;if(e<T&&e>M){const t=1/Math.sqrt(e);C*=t,S*=t,E*=t}}for(let e=0;e<n;++e)d[i]=C,d[i+1]=S,d[i+2]=E,i+=u}}function p(e,t,r,i,o=1){const{data:n,indices:a}=e,s=r.typedBuffer,l=r.typedBufferStride,c=a.length;if(i*=l,t===n.length&&4===t){s[i]=n[0],s[i+1]=n[1],s[i+2]=n[2],s[i+3]=n[3];const e=new Uint32Array(r.typedBuffer.buffer,r.start),t=l/4,a=e[i/=4];i+=t;const d=c*o;for(let r=1;r<d;++r)e[i]=a,i+=t;return}if(1!==o)if(4!==t)for(let e=0;e<c;++e){const t=3*a[e];for(let e=0;e<o;++e)s[i]=n[t],s[i+1]=n[t+1],s[i+2]=n[t+2],s[i+3]=255,i+=l}else for(let e=0;e<c;++e){const t=4*a[e];for(let e=0;e<o;++e)s[i]=n[t],s[i+1]=n[t+1],s[i+2]=n[t+2],s[i+3]=n[t+3],i+=l}else{if(4===t){for(let e=0;e<c;++e){const t=4*a[e];s[i]=n[t],s[i+1]=n[t+1],s[i+2]=n[t+2],s[i+3]=n[t+3],i+=l}return}for(let e=0;e<c;++e){const t=3*a[e];s[i]=n[t],s[i+1]=n[t+1],s[i+2]=n[t+2],s[i+3]=255,i+=l}}}function f(e,t,r,i,o=1){const n=t.typedBuffer,a=t.typedBufferStride;if(i*=a,1===o)for(let t=0;t<r;++t)n[i]=e[0],n[i+1]=e[1],n[i+2]=e[2],n[i+3]=e[3],i+=a;else for(let t=0;t<r;++t)for(let t=0;t<o;++t)n[i]=e[0],n[i+1]=e[1],n[i+2]=e[2],n[i+3]=e[3],i+=a}function v(e,t,r,i,o,a,s){let l={numItems:0,numVerticesPerItem:0};for(const c of r.fields.keys()){const r=e.get(c),d=r?.indices;if(r&&d)"position"===c&&(l={numItems:1,numVerticesPerItem:d.length}),g(c,r,i,o,a,s);else if("olidColor"===c&&null!=t){const r=e.get("position")?.indices;if(r){const e=r.length;f(t,a.getField(c,n.XP),e,s)}}}return l}function g(e,t,r,i,s,u){switch(e){case"position":{(0,a.vA)(3===t.size);const i=s.getField(e,n.xs);(0,a.vA)(!!i,`No buffer view for ${e}`),h(t,r,i,u);break}case"normal":{(0,a.vA)(3===t.size);const r=s.getField(e,n.xs);(0,a.vA)(!!r,`No buffer view for ${e}`),m(t,i,r,u);break}case"normalCompressed":case"profileRight":case"profileUp":{(0,a.vA)(2===t.size);const r=s.getField(e,n.mJ);(0,a.vA)(!!r,`No buffer view for ${e}`),l(t,r,u);break}case"uv0":{(0,a.vA)(2===t.size);const r=s.getField(e,n.ZD)??s.getField(e,n.gH);(0,a.vA)(!!r,`No buffer view for ${e}`),l(t,r,u);break}case"uvi":{(0,a.vA)(2===t.size);const r=s.getField(e,n.mJ);(0,a.vA)(!!r,`No buffer view for ${e}`),l(t,r,u);break}case"color":case"symbolColor":{const r=s.getField(e,n.XP);(0,a.vA)(!!r,`No buffer view for ${e}`),(0,a.vA)(3===t.size||4===t.size),p(t,t.size,r,u);break}case"colorFeatureAttribute":case"opacityFeatureAttribute":case"sizeFeatureAttribute":{const r=s.getField(e,n.Y$)??s.getField(e,n.Y$);(0,a.vA)(!!r,`No buffer view for ${e}`),(0,a.vA)(1===t.size),function(e,t,r){const{data:i,indices:o}=e,n=t.typedBuffer,a=t.typedBufferStride,s=o.length,l=i[0];r*=a;for(let e=0;e<s;++e)n[r]=l,r+=a}(t,r,u);break}case"tangent":{(0,a.vA)(4===t.size);const i=s.getField(e,n.Eq);(0,a.vA)(!!i,`No buffer view for ${e}`),function(e,t,r,i,n=1){if(!t)return void d(e,r,i,n);const{data:a,indices:s}=e,l=t,c=r.typedBuffer,u=r.typedBufferStride,h=s.length,m=l[0],p=l[1],f=l[2],v=l[4],g=l[5],_=l[6],x=l[8],w=l[9],b=l[10],y=!(0,o.ut)(l),M=1e-6,T=1-M;if(i*=u,1===n)for(let e=0;e<h;++e){const t=4*s[e],r=a[t],o=a[t+1],n=a[t+2],l=a[t+3];let d=m*r+v*o+x*n,h=p*r+g*o+w*n,C=f*r+_*o+b*n;if(y){const e=d*d+h*h+C*C;if(e<T&&e>M){const t=1/Math.sqrt(e);d*=t,h*=t,C*=t}}c[i]=d,c[i+1]=h,c[i+2]=C,c[i+3]=l,i+=u}else for(let e=0;e<h;++e){const t=4*s[e],r=a[t],o=a[t+1],l=a[t+2],d=a[t+3];let h=m*r+v*o+x*l,C=p*r+g*o+w*l,S=f*r+_*o+b*l;if(y){const e=h*h+C*C+S*S;if(e<T&&e>M){const t=1/Math.sqrt(e);h*=t,C*=t,S*=t}}for(let e=0;e<n;++e)c[i]=h,c[i+1]=C,c[i+2]=S,c[i+3]=d,i+=u}}(t,r,i,u);break}case"profileVertexAndNormal":{(0,a.vA)(4===t.size);const r=s.getField(e,n.jz)??s.getField(e,n.Eq);(0,a.vA)(!!r,`No buffer view for ${e}`),d(t,r,u);break}case"profileAuxData":{(0,a.vA)(3===t.size);const r=s.getField(e,n.EC)??s.getField(e,n.xs);(0,a.vA)(!!r,`No buffer view for ${e}`),c(t,r,u);break}}}(0,i.vt)()},62602:(e,t,r)=>{r.d(t,{r:()=>n});var i=r(21818),o=r(31821);function n(e,t){const r=e.fragment;switch(r.code.add(o.H`struct ShadingNormalParameters {
|
|
691
669
|
vec3 normalView;
|
|
692
670
|
vec3 viewDirection;
|
|
693
671
|
} shadingParams;`),t.doubleSidedMode){case 0:r.code.add(o.H`vec3 shadingNormal(ShadingNormalParameters params) {
|
|
@@ -743,7 +721,29 @@ return color;
|
|
|
743
721
|
colorMixMode = mask.r ? ${o.H.int(s.Um.ignore)} : symbolColorMixMode;
|
|
744
722
|
opacityMixMode = mask.a ? ${o.H.int(s.Um.ignore)} : symbolColorMixMode;
|
|
745
723
|
}
|
|
746
|
-
`)}},71988:(e,t,r)=>{r.d(t,{E:()=>o});var i=r(74333);class o extends i.n{constructor(e,t,r){super(e,"vec4",1,(i,o,n)=>i.setUniform4fv(e,t(o,n),r))}}},
|
|
724
|
+
`)}},71988:(e,t,r)=>{r.d(t,{E:()=>o});var i=r(74333);class o extends i.n{constructor(e,t,r){super(e,"vec4",1,(i,o,n)=>i.setUniform4fv(e,t(o,n),r))}}},72722:(e,t,r)=>{r.d(t,{B:()=>x});var i=r(77690),o=r(29242),n=r(9093),a=r(38954),s=r(51850),l=r(26425),c=r(20693),d=r(23205),u=r(31821),h=r(35644),m=r(74333);class p extends m.n{constructor(e,t,r){super(e,"mat4",1,(i,o,n)=>i.setUniformMatrix4fv(e,t(o,n),r))}}function f(e,t){const r=e.length;for(let i=0;i<r;++i)g[0]=e[i],t[i]=g[0];return t}function v(e,t){const r=e.length;for(let i=0;i<r;++i)g[0]=e[i],g[1]=e[i]-g[0],t[i]=g[1];return t}const g=new Float32Array(2);r(65786).Y;const _=(0,o.vt)();function x(e,t){const{hasModelTransformation:r,instancedDoublePrecision:o,instanced:s,output:m,hasVertexTangents:g}=t;r&&(e.vertex.uniforms.add(new p("model",e=>e.modelTransformation??n.zK)),e.vertex.uniforms.add(new h.k("normalLocalOriginFromModel",e=>((0,i.Ge)(_,e.modelTransformation??n.zK),_)))),s&&o&&(e.attributes.add("instanceModelOriginHi","vec3"),e.attributes.add("instanceModelOriginLo","vec3"),e.attributes.add("instanceModel","mat3"),e.attributes.add("instanceModelNormal","mat3"));const x=e.vertex;o&&(x.include(l.u,t),x.uniforms.add(new d.d("viewOriginHi",e=>f((0,a.h)(w,e.camera.viewInverseTransposeMatrix[3],e.camera.viewInverseTransposeMatrix[7],e.camera.viewInverseTransposeMatrix[11]),w)),new d.d("viewOriginLo",e=>v((0,a.h)(w,e.camera.viewInverseTransposeMatrix[3],e.camera.viewInverseTransposeMatrix[7],e.camera.viewInverseTransposeMatrix[11]),w)))),x.code.add(u.H`
|
|
725
|
+
vec3 getVertexInLocalOriginSpace() {
|
|
726
|
+
return ${r?o?"(model * vec4(instanceModel * localPosition().xyz, 1.0)).xyz":"(model * localPosition()).xyz":o?"instanceModel * localPosition().xyz":"localPosition().xyz"};
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
vec3 subtractOrigin(vec3 _pos) {
|
|
730
|
+
${o?u.H`
|
|
731
|
+
// Issue: (should be resolved now with invariant position) https://devtopia.esri.com/WebGIS/arcgis-js-api/issues/56280
|
|
732
|
+
vec3 originDelta = dpAdd(viewOriginHi, viewOriginLo, -instanceModelOriginHi, -instanceModelOriginLo);
|
|
733
|
+
return _pos - originDelta;`:"return vpos;"}
|
|
734
|
+
}
|
|
735
|
+
`),x.code.add(u.H`
|
|
736
|
+
vec3 dpNormal(vec4 _normal) {
|
|
737
|
+
return normalize(${r?o?"normalLocalOriginFromModel * (instanceModelNormal * _normal.xyz)":"normalLocalOriginFromModel * _normal.xyz":o?"instanceModelNormal * _normal.xyz":"_normal.xyz"});
|
|
738
|
+
}
|
|
739
|
+
`),2===m&&((0,c.S7)(x),x.code.add(u.H`
|
|
740
|
+
vec3 dpNormalView(vec4 _normal) {
|
|
741
|
+
return normalize((viewNormal * ${r?o?"vec4(normalLocalOriginFromModel * (instanceModelNormal * _normal.xyz), 1.0)":"vec4(normalLocalOriginFromModel * _normal.xyz, 1.0)":o?"vec4(instanceModelNormal * _normal.xyz, 1.0)":"_normal"}).xyz);
|
|
742
|
+
}
|
|
743
|
+
`)),g&&x.code.add(u.H`
|
|
744
|
+
vec4 dpTransformVertexTangent(vec4 _tangent) {
|
|
745
|
+
${r?o?"return vec4(normalLocalOriginFromModel * (instanceModelNormal * _tangent.xyz), _tangent.w);":"return vec4(normalLocalOriginFromModel * _tangent.xyz, _tangent.w);":o?"return vec4(instanceModelNormal * _tangent.xyz, _tangent.w);":"return _tangent;"}
|
|
746
|
+
}`)}const w=(0,s.vt)()},72824:(e,t,r)=>{r.d(t,{Mh:()=>u,Zo:()=>h,gy:()=>m});var i=r(21818),o=r(29242),n=r(91829),a=r(96336),s=r(33752),l=r(31821),c=r(98353),d=r(35644);function u(e,t){switch(t.normalType){case 0:case 1:e.include(a.Y,t),e.varyings.add("vNormalWorld","vec3"),e.varyings.add("vNormalView","vec3"),e.vertex.uniforms.add(new c.h("transformNormalGlobalFromModel",e=>e.transformNormalGlobalFromModel),new d.k("transformNormalViewFromGlobal",e=>e.transformNormalViewFromGlobal)).code.add(l.H`void forwardNormal() {
|
|
747
747
|
vNormalWorld = transformNormalGlobalFromModel * normalModel();
|
|
748
748
|
vNormalView = transformNormalViewFromGlobal * vNormalWorld;
|
|
749
749
|
}`);break;case 2:e.vertex.code.add(l.H`void forwardNormal() {}`);break;default:(0,i.Xb)(t.normalType);case 3:}}class h extends s.dO{constructor(){super(...arguments),this.transformNormalViewFromGlobal=(0,o.vt)()}}class m extends s.EM{constructor(){super(...arguments),this.transformNormalGlobalFromModel=(0,o.vt)(),this.toMapSpace=(0,n.vt)()}}},74333:(e,t,r)=>{r.d(t,{n:()=>i}),r(44208);class i{constructor(e,t,r,i,o=null){if(this.name=e,this.type=t,this.arraySize=o,this.bind={0:null,1:null,2:null},i)switch(r){case void 0:break;case 0:this.bind[0]=i;break;case 1:this.bind[1]=i;break;case 2:this.bind[2]=i}}equals(e){return this.type===e.type&&this.name===e.name&&this.arraySize===e.arraySize}}},74810:(e,t,r)=>{r.d(t,{Bt:()=>s,Jr:()=>n,SY:()=>l,mb:()=>a});var i=r(38954),o=r(51850);function n({normalTexture:e,metallicRoughnessTexture:t,metallicFactor:r,roughnessFactor:n,emissiveTexture:a,emissiveFactor:s,occlusionTexture:l}){return null==e&&null==t&&null==a&&(null==s||(0,i.m)(s,o.uY))&&null==l&&(null==n||1===n)&&(null==r||1===r)}const a=(0,o.CN)(1,1,.5),s=(0,o.CN)(0,.6,.2),l=(0,o.CN)(0,1,.2)},76284:(e,t,r)=>{r.d(t,{g:()=>T});var i=r(49186),o=r(44208),n=r(53966),a=r(97768),s=r(93637),l=r(74887),c=r(94656),d=r(63907),u=r(67171);const h=()=>n.A.getLogger("esri/views/webgl/textureUtils");function m(e){const{width:t,height:r,depth:i}=e;(null!=t&&t<0||null!=r&&r<0||null!=i&&i<0)&&h().error("Negative dimension parameters are not allowed!");const{internalFormat:o}=e;if(o&&(p(o)||f(o))){const{linearFilterDepth:t,compareEnabled:r,samplingMode:i,hasMipmap:o}=e;o&&h().error("Depth textures cannot have mipmaps"),t?9729!==i&&9728!==i&&h().error("Depth textures cannot sample mipmaps"):(9728!==i&&h().error("Depth textures without filtering must use NEAREST filtering"),r&&h().error("Depth textures without filtering cannot use compare function"))}}function p(e){return(0,s.a4)(d.SB,e)}function f(e){return(0,s.a4)(d.iE,e)}function v(e){return null!=e&&"type"in e&&"compressed"===e.type}function g(e){return null!=e&&!v(e)&&!function(e){return null!=e&&"byteLength"in e}(e)}function _(e){return 32879===e||35866===e}function x(e,t,r,i=1){let o=Math.max(t,r);return 32879===e&&(o=Math.max(o,i)),Math.floor(Math.log2(o))+1}function w(e){if(null!=e.internalFormat)return e.internalFormat;switch(e.dataType){case d.ld.FLOAT:switch(e.pixelFormat){case 6408:return d.H0.RGBA32F;case 6407:return d.H0.RGB32F;default:throw new i.A("texture:unknown-format","Unable to derive format")}case d.ld.UNSIGNED_BYTE:switch(e.pixelFormat){case 6408:return d.H0.RGBA8;case 6407:return d.H0.RGB8}}const{pixelFormat:t}=e;return e.internalFormat=34041===t?d.iE.DEPTH24_STENCIL8:6402===t?d.SB.DEPTH_COMPONENT24:t,e.internalFormat}class b extends u.R{constructor(e,t){switch(super(),this.context=e,Object.assign(this,t),this.internalFormat){case d.H0.R16F:case d.H0.R32F:case d.H0.R8_SNORM:case d.H0.R8:this.pixelFormat=6403;break;case d.H0.R8I:case d.H0.R8UI:case d.H0.R16I:case d.H0.R16UI:case d.H0.R32I:case d.H0.R32UI:this.pixelFormat=36244}}static validate(e,t){return new b(e,t)}}const y=!!(0,o.A)("esri-tests-disable-gpu-memory-measurements"),M=()=>n.A.getLogger("esri/views/webgl/Texture");class T{static{this.TEXTURE_UNIT_FOR_UPDATES=0}static{this.compressionWorkerHandle=null}constructor(e,t=null,r=null){if(this.type=1,this._glName=null,this._samplingModeDirty=!1,this._wrapModeDirty=!1,this._shadowFilterDirty=!1,this._wasImmutablyAllocated=!1,"context"in e)this._descriptor=e,r=t;else{const r=b.validate(e,t);if(!r)throw new i.A("texture:invalid-descriptor","Texture descriptor invalid");this._descriptor=r}34067===this._descriptor.target?this._setDataCubeMap(r):this.setData(r)}get glName(){return this._glName}get descriptor(){return this._descriptor}get usedMemory(){return y?0:(0,u.e)(this._descriptor)}get isDirty(){return this._samplingModeDirty||this._wrapModeDirty||this._shadowFilterDirty}get hasWebGLTextureObject(){return!!this._glName}dispose(){this.abortCompression(),this.hasWebGLTextureObject&&this._descriptor.context?.gl&&(this._descriptor.context.instanceCounter.decrement(d.vt.Texture,this),this._descriptor.context.unbindTexture(this),this._descriptor.context.gl.deleteTexture(this._glName),this._glName=null,this._descriptor=null)}release(){this.dispose()}[Symbol.dispose](){this.dispose()}resize(e,t){const r=this._descriptor;if(r.width!==e||r.height!==t){if(this._wasImmutablyAllocated)throw new i.A("texture:immutable-resize","Immutable textures can't be resized!");r.width=e,r.height=t,34067===this._descriptor.target?this._setDataCubeMap(null):this.setData(null)}}enableCompression(e){this._descriptor.compress=e}disableCompression(){this._descriptor.compress=void 0}setData(e){this.abortCompression(),!v(e)&&this._descriptor.internalFormat&&(0,s.a4)(d.CQ,this._descriptor.internalFormat)&&(this._descriptor.internalFormat=void 0),this._setData(e),!v(e)&&this._descriptor.compress&&this._compressOnWorker(e)}updateData(e,t,r,o,n,a,s=0){a||M().error("An attempt to use uninitialized data!"),this.hasWebGLTextureObject||M().error("An attempt to update uninitialized texture!");const l=this._descriptor;l.internalFormat=w(l);const{context:c,pixelFormat:d,dataType:u,target:h,isImmutable:m}=l;if(m&&!this._wasImmutablyAllocated)throw new i.A("texture:uninitialized","Cannot update immutable texture before allocation!");const p=c.bindTexture(this,T.TEXTURE_UNIT_FOR_UPDATES,!0);(t<0||r<0||t+o>l.width||r+n>l.height)&&M().error("An attempt to update out of bounds of the texture!"),this._configurePixelStorage();const{gl:f}=c;s&&(o&&n||M().warn("Must pass width and height if `UNPACK_SKIP_ROWS` is used"),f.pixelStorei(f.UNPACK_SKIP_ROWS,s)),g(a)?f.texSubImage2D(h,e,t,r,o,n,d,u,a):v(a)?f.compressedTexSubImage2D(h,e,t,r,o,n,l.internalFormat,a.levels[e]):f.texSubImage2D(h,e,t,r,o,n,d,u,a),s&&f.pixelStorei(f.UNPACK_SKIP_ROWS,0),c.bindTexture(p,T.TEXTURE_UNIT_FOR_UPDATES)}updateData3D(e,t,r,o,n,a,s,l){l||M().error("An attempt to use uninitialized data!"),this.hasWebGLTextureObject||M().error("An attempt to update an uninitialized texture!");const c=this._descriptor;c.internalFormat=w(c);const{context:d,pixelFormat:u,dataType:h,isImmutable:m,target:p}=c;if(m&&!this._wasImmutablyAllocated)throw new i.A("texture:uninitialized","Cannot update immutable texture before allocation!");_(p)||M().warn("Attempting to set 3D texture data on a non-3D texture");const f=d.bindTexture(this,T.TEXTURE_UNIT_FOR_UPDATES);d.setActiveTexture(T.TEXTURE_UNIT_FOR_UPDATES),(t<0||r<0||o<0||t+n>c.width||r+a>c.height||o+s>c.depth)&&M().error("An attempt to update out of bounds of the texture!"),this._configurePixelStorage();const{gl:g}=d;if(v(l))l=l.levels[e],g.compressedTexSubImage3D(p,e,t,r,o,n,a,s,c.internalFormat,l);else{const i=l;g.texSubImage3D(p,e,t,r,o,n,a,s,u,h,i)}d.bindTexture(f,T.TEXTURE_UNIT_FOR_UPDATES)}generateMipmap(){const e=this._descriptor;if(0===e.width||0===e.height)return;if(!e.hasMipmap){if(this._wasImmutablyAllocated)throw new i.A("texture:immutable-change","Cannot add mipmaps to immutable texture after allocation");e.hasMipmap=!0,this._samplingModeDirty=!0,m(e)}9729===e.samplingMode?(this._samplingModeDirty=!0,e.samplingMode=9985):9728===e.samplingMode&&(this._samplingModeDirty=!0,e.samplingMode=9984);const t=this._descriptor.context.bindTexture(this,T.TEXTURE_UNIT_FOR_UPDATES);this._descriptor.context.setActiveTexture(T.TEXTURE_UNIT_FOR_UPDATES),this._descriptor.context.gl.generateMipmap(e.target),this._descriptor.context.bindTexture(t,T.TEXTURE_UNIT_FOR_UPDATES)}clearMipmap(){const e=this._descriptor;if(e.hasMipmap){if(this._wasImmutablyAllocated)throw new i.A("texture:immutable-change","Cannot delete mipmaps to immutable texture after allocation");e.hasMipmap=!1,this._samplingModeDirty=!0,m(e)}9985===e.samplingMode?(this._samplingModeDirty=!0,e.samplingMode=9729):9984===e.samplingMode&&(this._samplingModeDirty=!0,e.samplingMode=9728)}setSamplingMode(e){e!==this._descriptor.samplingMode&&(this._descriptor.samplingMode=e,this._samplingModeDirty=!0)}setWrapMode(e){e!==this._descriptor.wrapMode&&(this._descriptor.wrapMode=e,m(this._descriptor),this._wrapModeDirty=!0)}setShadowFiltering(e){e!==this._descriptor.linearFilterDepth&&(this._descriptor.linearFilterDepth=this._descriptor.compareEnabled=e,this.setSamplingMode(e?9729:9728),m(this._descriptor),this._shadowFilterDirty=!0)}applyChanges(){this._samplingModeDirty&&(this._applySamplingMode(),this._samplingModeDirty=!1),this._wrapModeDirty&&(this._applyWrapMode(),this._wrapModeDirty=!1),this._shadowFilterDirty&&(this._applyShadowMode(),this._shadowFilterDirty=!1)}abortCompression(){this._compressionAbortController=(0,a.DC)(this._compressionAbortController)}_setData(e,t){const r=this._descriptor,o=r.context?.gl;if(!o)return;(0,c.Y2)(o),this.hasWebGLTextureObject||(this._glName=o.createTexture(),r.context.instanceCounter.increment(d.vt.Texture,this)),m(r);const n=r.context.bindTexture(this,T.TEXTURE_UNIT_FOR_UPDATES);r.context.setActiveTexture(T.TEXTURE_UNIT_FOR_UPDATES),this._configurePixelStorage(),(0,c.Y2)(o);const a=t??r.target,l=_(a);if(g(e))this._setDataFromTexImageSource(e,a);else{const{width:t,height:n,depth:u}=r;if(null==t||null==n)throw new i.A("texture:missing-size","Width and height must be specified!");if(l&&null==u)throw new i.A("texture:missing-depth","Depth must be specified!");if(r.internalFormat=w(r),r.isImmutable&&!this._wasImmutablyAllocated&&this._texStorage(a,r.internalFormat,r.hasMipmap,t,n,u),v(e)){if(!function(e){return null!=e&&(0,s.a4)(d.CQ,e)}(r.internalFormat))throw new i.A("texture:format-mismatch","Attempting to use compressed data with an uncompressed format!");this._setDataFromCompressedSource(e,r.internalFormat,a)}else this._texImage(a,0,r.internalFormat,t,n,u,e),(0,c.Y2)(o),r.hasMipmap&&this.generateMipmap()}this._applySamplingMode(),this._applyWrapMode(),this._applyAnisotropicFilteringParameters(),this._applyShadowMode(),(0,c.Y2)(o),r.context.bindTexture(n,T.TEXTURE_UNIT_FOR_UPDATES)}_setDataCubeMap(e=null){for(let t=34069;t<=34074;t++)this._setData(e,t)}_configurePixelStorage(){const e=this._descriptor.context.gl,{unpackAlignment:t,flipped:r,preMultiplyAlpha:i}=this._descriptor;e.pixelStorei(e.UNPACK_ALIGNMENT,t),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,r?1:0),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,i?1:0)}_setDataFromTexImageSource(e,t){const{gl:r}=this._descriptor.context,i=this._descriptor;i.internalFormat=w(i);const o=_(t),{width:n,height:a,depth:s}=function(e){let t="width"in e?e.width:e.codedWidth,r="height"in e?e.height:e.codedHeight;return e instanceof HTMLVideoElement&&(t=e.videoWidth,r=e.videoHeight),{width:t,height:r,depth:1}}(e);i.width&&i.height,i.width||(i.width=n),i.height||(i.height=a),o&&i.depth,o&&(i.depth=s),i.isImmutable&&!this._wasImmutablyAllocated&&this._texStorage(t,i.internalFormat,i.hasMipmap,n,a,s),this._texImage(t,0,i.internalFormat,n,a,s,e),(0,c.Y2)(r),i.hasMipmap&&(this.generateMipmap(),(0,c.Y2)(r))}_setDataFromCompressedSource(e,t,r){const i=this._descriptor,{width:o,height:n,depth:a}=i,s=e.levels,l=x(r,o,n,a),c=Math.min(l,s.length)-1;this._descriptor.context.gl.texParameteri(i.target,33085,c),this._forEachMipmapLevel((e,i,o,n)=>{const a=s[Math.min(e,s.length-1)];this._compressedTexImage(r,e,t,i,o,n,a)},c)}_texStorage(e,t,r,o,n,a){const{gl:s}=this._descriptor.context;if(!function(e){return d.XN.includes(e)}(t)&&!p(t)&&!f(t))throw new i.A("texture:missing-format","Immutable textures must have a sized internal format");if(!this._descriptor.isImmutable)return;const l=r?x(e,o,n,a):1;if(_(e)){if(null==a)throw new i.A("texture:missing-depth","Missing depth dimension for 3D texture upload");s.texStorage3D(e,l,t,o,n,a)}else s.texStorage2D(e,l,t,o,n);this._wasImmutablyAllocated=!0}_texImage(e,t,r,o,n,a,s){const l=this._descriptor.context.gl,c=_(e),{isImmutable:d,pixelFormat:u,dataType:h}=this._descriptor;if(d){if(null!=s){const r=s;if(c){if(null==a)throw new i.A("texture:missing-depth","Missing depth dimension for 3D texture upload");l.texSubImage3D(e,t,0,0,0,o,n,a,u,h,r)}else l.texSubImage2D(e,t,0,0,o,n,u,h,r)}}else{const d=s;if(c){if(null==a)throw new i.A("texture:missing-depth","Missing depth dimension for 3D texture upload");l.texImage3D(e,t,r,o,n,a,0,u,h,d)}else l.texImage2D(e,t,r,o,n,0,u,h,d)}}_compressedTexImage(e,t,r,o,n,a,s){const l=this._descriptor.context.gl,c=_(e);if(this._descriptor.isImmutable){if(null!=s)if(c){if(null==a)throw new i.A("texture:missing-depth","Missing depth dimension for 3D texture upload");l.compressedTexSubImage3D(e,t,0,0,0,o,n,a,r,s)}else l.compressedTexSubImage2D(e,t,0,0,o,n,r,s)}else if(c){if(null==a)throw new i.A("texture:missing-depth","Missing depth dimension for 3D texture upload");l.compressedTexImage3D(e,t,r,o,n,a,0,s)}else l.compressedTexImage2D(e,t,r,o,n,0,s)}async _compressOnWorker(e){const{width:t,height:r,context:i,flipped:o,preMultiplyAlpha:n,hasMipmap:a}=this._descriptor,s=this._descriptor.compress?.compressionTracker,c=this._descriptor.compress?.compressionCallback,{compressedTextureETC:d,compressedTextureS3TC:u}=i.capabilities;if(!T.compressionWorkerHandle?.isCompressible(e,this._descriptor)||!d&&!u)return;this.abortCompression();const h=new AbortController;let m;this._compressionAbortController=h,s?.increment();try{e instanceof Uint8Array?m=e.buffer:(m=await createImageBitmap(e,{imageOrientation:o?"flipY":"none"}),(0,l.Te)(h));const i={data:m,width:t,height:r,needsFlip:e instanceof Uint8Array&&this.descriptor.flipped,components:6408===this._descriptor.pixelFormat?4:3,preMultiplyAlpha:n,hasMipmap:a,hasETC:!!d,hasS3TC:!!u},s=await T.compressionWorkerHandle.invoke(i,h.signal,1);if((0,l.Te)(h),s.compressedTexture&&this.hasWebGLTextureObject){const e=this.usedMemory;this._descriptor.internalFormat=s.internalFormat,this._setData(s.compressedTexture),c?.(e-this.usedMemory)}}catch(e){(0,l.zf)(e)||M().error("Texture compression failed!")}finally{s?.decrement(),this._compressionAbortController?.signal.aborted&&(this._compressionAbortController=null),m instanceof ImageBitmap&&m.close()}}_forEachMipmapLevel(e,t=1/0){let{width:r,height:o,depth:n,hasMipmap:a,target:s}=this._descriptor;const l=32879===s;if(null==r||null==o||l&&null==n)throw new i.A("texture:missing-size","Missing texture dimensions for mipmap calculation");for(let i=0;e(i,r,o,n),a&&(1!==r||1!==o||l&&1!==n)&&!(i>=t);++i)r=Math.max(1,r>>1),o=Math.max(1,o>>1),l&&(n=Math.max(1,n>>1))}_applySamplingMode(){const e=this._descriptor,t=e.context?.gl;let r=e.samplingMode,i=e.samplingMode;9985===r||9987===r?(r=9729,e.hasMipmap||(i=9729)):9984!==r&&9986!==r||(r=9728,e.hasMipmap||(i=9728)),t.texParameteri(e.target,t.TEXTURE_MAG_FILTER,r),t.texParameteri(e.target,t.TEXTURE_MIN_FILTER,i)}_applyWrapMode(){const e=this._descriptor,t=e.context?.gl;"number"==typeof e.wrapMode?(t.texParameteri(e.target,t.TEXTURE_WRAP_S,e.wrapMode),t.texParameteri(e.target,t.TEXTURE_WRAP_T,e.wrapMode)):(t.texParameteri(e.target,t.TEXTURE_WRAP_S,e.wrapMode.s),t.texParameteri(e.target,t.TEXTURE_WRAP_T,e.wrapMode.t))}_applyShadowMode(){const e=this._descriptor,t=e.context?.gl,r=e.compareEnabled?t.COMPARE_REF_TO_TEXTURE:t.NONE;t.texParameteri(e.target,t.TEXTURE_COMPARE_MODE,r),e.compareEnabled&&t.texParameteri(e.target,t.TEXTURE_COMPARE_FUNC,t.GREATER),(0,c.Y2)(t)}_applyAnisotropicFilteringParameters(){const e=this._descriptor,t=e.context.capabilities.textureFilterAnisotropic;t&&e.context.gl.texParameterf(e.target,t.TEXTURE_MAX_ANISOTROPY,e.maxAnisotropy??1)}}},76591:(e,t,r)=>{r.d(t,{HQ:()=>c,rA:()=>d});var i=r(58083),o=r(9093),n=r(38954),a=r(51850),s=r(40710),l=(r(33079),r(31821));function c(e,t){!function(e,t,...r){h(e,t,...r),t.hasSlicePlane?e.code.add("\n void discardBySlice(vec3 pos) {\n if (sliceByPlane(pos)) {\n discard;\n }\n }\n\n vec4 applySliceOutline(vec4 color, vec3 pos) {\n SliceFactors factors = calculateSliceFactors(pos);\n\n factors.front /= 2.0 * fwidth(factors.front);\n factors.side0 /= 2.0 * fwidth(factors.side0);\n factors.side1 /= 2.0 * fwidth(factors.side1);\n factors.side2 /= 2.0 * fwidth(factors.side2);\n factors.side3 /= 2.0 * fwidth(factors.side3);\n\n // return after calling fwidth, to avoid aliasing caused by discontinuities in the input to fwidth\n if (sliceByFactors(factors)) {\n return color;\n }\n\n float outlineFactor = (1.0 - step(0.5, factors.front))\n * (1.0 - step(0.5, factors.side0))\n * (1.0 - step(0.5, factors.side1))\n * (1.0 - step(0.5, factors.side2))\n * (1.0 - step(0.5, factors.side3));\n\n return mix(color, vec4(vec3(0.0), color.a), outlineFactor * 0.3);\n }\n\n vec4 applySlice(vec4 color, vec3 pos) {\n return sliceEnabled() ? applySliceOutline(color, pos) : color;\n }\n "):e.code.add(l.H`void discardBySlice(vec3 pos) { }
|