@arcgis/core 5.2.0-next.129 → 5.2.0-next.130
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/arcade/Feature.js +1 -1
- package/arcade/Voxel.js +1 -1
- package/arcade/functions/feature.js +1 -1
- package/arcade/functions/featuresetbase.js +1 -1
- package/arcade.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/051ccfea4268b357c44a.js +1 -0
- package/assets/esri/core/workers/chunks/1012cd1dff551025e605.js +1 -0
- package/assets/esri/core/workers/chunks/1538cfa272658871a3ad.js +1 -0
- package/assets/esri/core/workers/chunks/15f0cb6af89bafea61dc.js +1 -0
- package/assets/esri/core/workers/chunks/{8cb216404a6254bc695c.js → 18d5bad86ea3ef3ec747.js} +47 -47
- package/assets/esri/core/workers/chunks/{f652d1db26fbdea1a79b.js → 19fd46743daecd1f2dcb.js} +1 -1
- package/assets/esri/core/workers/chunks/{81327e10200065a0ccef.js → 1b5e0ab7e4f64a3aae09.js} +1 -1
- package/assets/esri/core/workers/chunks/1e66240ef0ae351d3275.js +1 -0
- package/assets/esri/core/workers/chunks/260fb3e021fe1a8e7ef1.js +1 -0
- package/assets/esri/core/workers/chunks/276cc95ae152ecf3048e.js +1 -0
- package/assets/esri/core/workers/chunks/34b6307fdd0226914dc4.js +1 -0
- package/assets/esri/core/workers/chunks/353acc00762b5ca450ef.js +1 -0
- package/assets/esri/core/workers/chunks/3df58dc89f2160893c66.js +1 -0
- package/assets/esri/core/workers/chunks/{1a02c68de65a67ab6a67.js → 550d8631450bb5eb7a6f.js} +1 -1
- package/assets/esri/core/workers/chunks/{f92178ac6dc9abff304f.js → 5f610ccf07bc73942b28.js} +1 -1
- package/assets/esri/core/workers/chunks/650618e7bfd932b9c5ff.js +1 -0
- package/assets/esri/core/workers/chunks/{cd1821bf601949674e02.js → 6ca2898aa500c81c7a8e.js} +1 -1
- package/assets/esri/core/workers/chunks/6fbc76b6e3494a09814e.js +1 -0
- package/assets/esri/core/workers/chunks/7185de70abe4face6f6e.js +1 -0
- package/assets/esri/core/workers/chunks/8048ce97ce22b32c454d.js +1 -0
- package/assets/esri/core/workers/chunks/9238409c942c24e26a0f.js +1 -0
- package/assets/esri/core/workers/chunks/{540acf6abdee9dbd453e.js → 92ec93287d4598377def.js} +1 -1
- package/assets/esri/core/workers/chunks/{88610ebfdf9c93ada781.js → 9c87a7f14298fd5e6c1d.js} +1 -1
- package/assets/esri/core/workers/chunks/a12773419465999fafe7.js +1 -0
- package/assets/esri/core/workers/chunks/{a3a5cb664bdb1db190dd.js → a61395db617fd26f048f.js} +1 -1
- package/assets/esri/core/workers/chunks/a826b7d9e6c59e951cb2.js +1 -0
- package/assets/esri/core/workers/chunks/a84cac7963ca3258bd75.js +1 -0
- package/assets/esri/core/workers/chunks/{c94bdfed831c775e04c0.js → abdb34cfaff49472223c.js} +1 -1
- package/assets/esri/core/workers/chunks/ba1d9d3cb90636dc9814.js +1 -0
- package/assets/esri/core/workers/chunks/bcab8bcb1fb1fd2aa65a.js +1 -0
- package/assets/esri/core/workers/chunks/d713c8d36cb7ed943003.js +1 -0
- package/assets/esri/core/workers/chunks/da8c881ea2dfcad8bbba.js +1 -0
- package/assets/esri/core/workers/chunks/ddafe5dfe178288ed721.js +1 -0
- package/assets/esri/core/workers/chunks/e5d2247187764c149854.js +1 -0
- package/assets/esri/core/workers/chunks/e706296a91780c665ab7.js +1 -0
- package/assets/esri/core/workers/chunks/e8a1abc881decf66e260.js +1 -0
- package/assets/esri/core/workers/chunks/ef527a7ea65fe6530a3e.js +1 -0
- package/assets/esri/core/workers/chunks/f5e24f1c38fe494585a8.js +1 -0
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.ar.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.bg.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.bs.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.ca.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.cs.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.da.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.de.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.el.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.es.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.et.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.fi.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.fr.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.he.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.hr.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.hu.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.id.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.it.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.ja.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.ko.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.lt.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.lv.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.nl.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.no.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.pl.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.pt-BR.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.pt-PT.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.ro.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.ru.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.sk.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.sl.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.sr.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.sv.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.th.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.tr.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.uk.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.vi.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.zh-CN.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.zh-HK.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.zh-TW.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.ar.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.bg.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.bs.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.ca.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.cs.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.da.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.de.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.el.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.es.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.et.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.fi.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.fr.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.he.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.hr.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.hu.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.id.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.it.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.ja.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.ko.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.lt.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.lv.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.nl.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.no.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.pl.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.pt-BR.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.pt-PT.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.ro.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.ru.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.sk.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.sl.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.sr.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.sv.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.th.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.tr.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.uk.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.vi.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.zh-CN.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.zh-HK.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.zh-TW.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/messages.en.json +1 -1
- package/chunks/GlobalIllumination.glsl.js +1 -1
- package/config.js +1 -1
- package/geometry/support/heightModelInfoUtils.js +1 -1
- package/graphic/AggregateGraphicOrigin.js +1 -1
- package/graphic/AnnotationFeatureGraphicOrigin.js +1 -1
- package/graphic/BuildingGraphicOrigin.js +1 -1
- package/graphic/CSVGraphicOrigin.js +1 -1
- package/graphic/CatalogGraphicOrigin.js +1 -1
- package/graphic/DimensionFeatureGraphicOrigin.js +1 -1
- package/graphic/FeatureGraphicOrigin.js +1 -1
- package/graphic/GeoJSONGraphicOrigin.js +1 -1
- package/graphic/ImageryGraphicOrigin.js +1 -1
- package/graphic/ImageryTileGraphicOrigin.js +1 -1
- package/graphic/KnowledgeGraphGraphicOrigin.js +1 -1
- package/graphic/LinkChartGraphicOrigin.js +1 -1
- package/graphic/MapImageGraphicOrigin.js +1 -1
- package/graphic/OGCFeatureGraphicOrigin.js +1 -1
- package/graphic/OrientedImageryGraphicOrigin.js +1 -1
- package/graphic/ParquetGraphicOrigin.js +1 -1
- package/graphic/PointCloudGraphicOrigin.js +1 -1
- package/graphic/SceneGraphicOrigin.js +1 -1
- package/graphic/StreamGraphicOrigin.js +1 -1
- package/graphic/SubtypeGroupGraphicOrigin.js +1 -1
- package/graphic/TileGraphicOrigin.js +1 -1
- package/graphic/TrackGraphicOrigin.js +1 -1
- package/graphic/WCSGraphicOrigin.js +1 -1
- package/graphic/WFSGraphicOrigin.js +1 -1
- package/graphic/getArcadeFeatureSource.js +2 -0
- package/kernel.js +1 -1
- package/layers/Lyr3DWasmPerSceneView.js +1 -1
- package/package.json +3 -3
- package/support/arcadeUtils.js +1 -1
- package/support/revision.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/IntegratedMeshLayerView3D.js +1 -1
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
- package/views/3d/webgl-engine/parts/RenderView.js +1 -1
- package/views/3d/webgl-engine/parts/ScreenshotManager.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/selection/types.d.ts +1 -1
- package/widgets/BatchAttributeForm.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/components/OrientedImageryVideoViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/videoViewerUtils.js +1 -1
- package/widgets/PanoramicViewer/PanoramicVideoViewerViewModel.js +1 -1
- package/widgets/Sketch/support/PluginManager.js +1 -1
- package/widgets/support/SelectionList/FeatureItem.d.ts +14 -0
- package/widgets/support/SelectionList/FeatureItem.js +1 -1
- package/widgets/support/SelectionList.js +1 -1
- package/assets/esri/core/workers/chunks/06da350b4ea25732f52b.js +0 -1
- package/assets/esri/core/workers/chunks/0de140199161fcd15a0c.js +0 -1
- package/assets/esri/core/workers/chunks/0deceece4b465f653f58.js +0 -1
- package/assets/esri/core/workers/chunks/15dc28b4fa5b5110472b.js +0 -1
- package/assets/esri/core/workers/chunks/1beb32170d659bc43977.js +0 -1
- package/assets/esri/core/workers/chunks/237795866c075880531b.js +0 -1
- package/assets/esri/core/workers/chunks/25e4da9c6837ab0fa585.js +0 -1
- package/assets/esri/core/workers/chunks/28a04887ecaee5445d14.js +0 -1
- package/assets/esri/core/workers/chunks/2a5fde737dc99627142e.js +0 -1
- package/assets/esri/core/workers/chunks/323451ef52d0c2805f1d.js +0 -1
- package/assets/esri/core/workers/chunks/397ddcf0b8e858a17b70.js +0 -1
- package/assets/esri/core/workers/chunks/3d174a84b785fc633a5a.js +0 -1
- package/assets/esri/core/workers/chunks/5f794f4e0113d5dd50ba.js +0 -1
- package/assets/esri/core/workers/chunks/6994ba168465b77a36af.js +0 -1
- package/assets/esri/core/workers/chunks/7fccf53aa751cd9dae57.js +0 -1
- package/assets/esri/core/workers/chunks/88e11b645a1361f1bdbe.js +0 -1
- package/assets/esri/core/workers/chunks/8b0d6205ceeec1ab446f.js +0 -1
- package/assets/esri/core/workers/chunks/8dfea65341991e13ab71.js +0 -1
- package/assets/esri/core/workers/chunks/ab0b2a76247dfd56b92d.js +0 -1
- package/assets/esri/core/workers/chunks/ad372e399e20d5a3262d.js +0 -1
- package/assets/esri/core/workers/chunks/bb831d23422acfb00ae2.js +0 -1
- package/assets/esri/core/workers/chunks/bd231bc0624eb889ac14.js +0 -1
- package/assets/esri/core/workers/chunks/cf7b7e54cd87422ca62a.js +0 -1
- package/assets/esri/core/workers/chunks/df6992416cba9539f1ed.js +0 -1
- package/assets/esri/core/workers/chunks/e4005d95a396e1af9ac2.js +0 -1
- package/assets/esri/core/workers/chunks/ec187933b42fe65594b7.js +0 -1
- package/assets/esri/core/workers/chunks/f7ab606be37373312ebe.js +0 -1
- package/assets/esri/core/workers/chunks/fe1787a8d499832996b3.js +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{releaseMaybe as t}from"../../../../../core/maybe.js";import{watch as
|
|
2
|
+
import{__decorate as e}from"tslib";import{releaseMaybe as t}from"../../../../../core/maybe.js";import{watch as a,syncAndInitial as s}from"../../../../../core/reactiveUtils.js";import{waitRender as r}from"../../../../../core/scheduling.js";import{subclass as i}from"../../../../../core/accessorSupport/decorators.js";import{set as l}from"../../../../../core/libs/gl-matrix-2/math/vec2.js";import{UNIT_W as o,ZEROS as m}from"../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{InternalRenderCategory as u}from"../../../webgl.js";import{AmbientIllumination as n}from"../AmbientIllumination.js";import{G as h}from"../../../../../chunks/GlobalIllumination.glsl.js";import{G as c}from"../../../../../chunks/GlobalIlluminationBlur.glsl.js";import{GlobalIlluminationBlurTechnique as p}from"./GlobalIlluminationBlurTechnique.js";import{GlobalIlluminationTechnique as _}from"./GlobalIlluminationTechnique.js";import{GlobalIlluminationTechniqueConfiguration as d}from"./GlobalIlluminationTechniqueConfiguration.js";import{G as b}from"../../../../../chunks/GlobalIlluminationUpscale.glsl.js";import{GlobalIlluminationUpscaleTechnique as f}from"./GlobalIlluminationUpscaleTechnique.js";import{DepthStencilAttachment as g,ColorAttachment1 as P}from"../../../../webgl/enums.js";const w=1,F=100;let x=class extends n{constructor(e){super(e),this._passParameters=new h,this._drawParameters=new c,this._drawParametersUpscale=new b,this._configuration=new d,this._lastOutput=null,this._isGlobalIlluminationUpdate=!1,this._lowQualityResolutionScale=.35,this._maxFrames=256}initialize(){this.addHandles(a(()=>this._mode,e=>{0===e?this._disable():this._enable()},s))}destroy(){this._lastOutput=t(this._lastOutput)}_disable(){super._disable(),this._resetAccumulation(),this._passParameters.temporalSampleFrame=0}get hasHighQuality(){return 2===this._mode}resetAccumulation(){this._isGlobalIlluminationUpdate||!(this._passParameters.accumulatedFrames>F)&&this._configuration.hasEmission||this._resetAccumulation()}_resetAccumulation(){this._passParameters.accumulatedFrames=0,this._lastOutput=t(this._lastOutput)}get isAccumulating(){return this.enabled&&this._passParameters.accumulatedFrames<this._maxFrames}precompile(){this.techniques.getCompiled(f)}render(e){const t=1===this.bindParameters.frameRendererTarget;if(this._passParameters.accumulatedFrames>=this._maxFrames&&!t)return this._lastOutput?.retain(),this._lastOutput;const a=e.find(({name:e})=>"normals"===e),s=a?.getTexture(),r=a?.getTexture(g);return s&&r?0===this._mode?this._emptyOutput:(this._configuration.hasEmission=!!this.bindParameters.reprojection.lastFrameEmission,t?this._renderScreenshot(s,r):this._renderInteractive(s,r)):this._emptyOutput}_renderScreenshot(e,t){let a=this._emptyOutput;const s=this._passParameters.accumulatedFrames,r=this._passParameters.temporalSampleFrame;this._passParameters.accumulatedFrames=0,this._passParameters.temporalSampleFrame=0;const i=this.techniques.get(_,this._configuration),l=this.techniques.get(p);for(;this._passParameters.accumulatedFrames<this._maxFrames;){this._passParameters.globalIllumination=a.getTexture(),this._passParameters.globalIlluminationWeights=a.getTexture(P);const s=this._renderAccumulationFrame(e,t,i,l);++this._passParameters.accumulatedFrames,a.release(),a=s}return this._passParameters.globalIllumination=null,this._passParameters.globalIlluminationWeights=null,this._passParameters.accumulatedFrames=s,this._passParameters.temporalSampleFrame=r,a}_renderInteractive(e,t){if(!this._canRender)return this._requestRender(),this._emptyOutput;const a=1===this._mode?this._lowQualityResolutionScale:1,s=this.techniques.getCompiled(_,this._configuration),r=this.techniques.getCompiled(p),i=a<1,l=i?this.techniques.getCompiled(f):null;if(!s||!r||i&&!l)return this._requestRender(),this._emptyOutput;const o=this._renderAccumulationFrame(e,t,s,r,l,a);return++this._passParameters.accumulatedFrames,this._passParameters.accumulatedFrames<this._maxFrames&&this._requestRender(),this._storeOutput(o),o}_renderAccumulationFrame(e,t,a,s,r,i=1){const o=this.bindParameters,m=this.renderingContext,{camera:n}=o;this._passParameters.normalTexture=e,this._passParameters.depthTexture=t,this._passParameters.projScale=1/n.computeScreenPixelSizeAtDist(1),this._passParameters.resolutionScale=i;const{fullWidth:h,fullHeight:c}=n,p=Math.max(1,Math.floor(h*i)),_=Math.max(1,Math.floor(c*i)),d=this.fboCache.acquire(p,_,"global illumination input").acquireColor(P,2);m.bindFramebuffer(d.fbo),m.setViewport(0,0,p,_),m.bindTechnique(a,o,this._passParameters,this._drawParameters),m.screen.draw();const b=Math.max(1,Math.round(p/w)),f=Math.max(1,Math.round(_/w)),g=this.fboCache.acquire(b,f,"global illumination blur horizontal");m.bindFramebuffer(g.fbo);const F=d.obtainAttachment(P);this._drawParameters.texture=d.getTexture(),this._drawParameters.weightTexture=F.attachment,l(this._drawParameters.blurSize,0,w/_),m.bindTechnique(s,o,this._passParameters,this._drawParameters),m.setViewport(0,0,b,f),m.screen.draw(),d.release();const x=this.fboCache.acquire(b,f,r?"global illumination blur vertical":u.AMBIENT_ILLUMINATION);m.bindFramebuffer(x.fbo),m.setViewport(0,0,b,f),m.setClearColor(1,1,1,0),m.clear(16384),this._drawParameters.texture=g.getTexture(),this._drawParameters.weightTexture=F.attachment,l(this._drawParameters.blurSize,w/b,0),m.bindTechnique(s,o,this._passParameters,this._drawParameters),m.setViewport(0,0,b,f),m.screen.draw(),g.release(),x.attachColor(F,P),F.release();let I=x;return r&&(I=this.fboCache.acquire(h,c,u.AMBIENT_ILLUMINATION).acquireColor(P,2),m.bindFramebuffer(I.fbo),m.setViewport(0,0,h,c),m.setClearColor(1,1,1,0),m.clear(16384),this._drawParametersUpscale.colorTexture=x.getTexture(),this._drawParametersUpscale.weightTexture=x.getTexture(P),m.bindTechnique(r,o,this._passParameters,this._drawParametersUpscale),m.screen.draw(),x.release()),m.setViewport4fv(n.fullViewport),this._passParameters.temporalSampleFrame=(this._passParameters.temporalSampleFrame+1)%64,I}_requestRender(){this._isGlobalIlluminationUpdate=!0,this.requestRender(1),this._isGlobalIlluminationUpdate=!1}_storeOutput(e){this._lastOutput!==e&&(this._lastOutput=t(this._lastOutput),this._lastOutput=e,this._lastOutput.retain())}get _emptyOutput(){const e=this.renderingContext,{fullWidth:t,fullHeight:a}=this.bindParameters.camera,s=this.fboCache.acquire(t,a,u.AMBIENT_ILLUMINATION).acquireColor(P,2);return e.bindFramebuffer(s.fbo),e.setViewport(0,0,t,a),e.clearBuffer(0,o),e.clearBuffer(1,m),s}get _canRender(){const{reprojection:e,hasEmission:t,globalIllumination:a}=this.bindParameters;return!(!e.lastFrameColor||t&&!e.lastFrameEmission||!e.lastFrameDepth||!a)}get _mode(){return this._useGlobalIllumination?this.view.stage.renderer.isFeatureEnabled(10)?2:1:0}get test(){const e=this;return{get maxFrames(){return e._maxFrames},set maxFrames(t){e._maxFrames=t},get lowQualityResolutionScale(){return e._lowQualityResolutionScale},set lowQualityResolutionScale(t){e._lowQualityResolutionScale=t},passParameters:this._passParameters,configuration:this._configuration,get mode(){return e._mode},async restartAccumulation(){"disabled"!==e.produces&&(e._disable(),await r(),e._enable())}}}};x=e([i("esri.views.3d.webgl-engine.effects.globalIllumination.GlobalIllumination")],x);export{x as GlobalIllumination,w as blurSizePixels};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import{toConst as r}from"../../../../core/compilerUtils.js";import{unpackFloatRGBA as i}from"../../../../core/floatRGBA.js";import has from"../../../../core/has.js";import s from"../../../../core/Logger.js";import{removeMaybe as n,destroyMaybe as o}from"../../../../core/maybe.js";import{when as a,initial as h,watch as l,syncAndInitial as d}from"../../../../core/reactiveUtils.js";import{addFrameTask as c}from"../../../../core/scheduling.js";import{signal as p}from"../../../../core/signal.js";import{Milliseconds as m}from"../../../../core/time.js";import{property as u,subclass as f}from"../../../../core/accessorSupport/decorators.js";import{isMoon as g,isMars as w}from"../../../../geometry/ellipsoidUtils.js";import{debugFlags as _}from"../../support/debugFlags.js";import{ComponentObjectCollection as v}from"../collections/Component/ComponentObjectCollection.js";import{ShaderTechniqueConstructionContext as x}from"../core/shaderTechnique/ShaderTechniqueConstructionContext.js";import{ShaderTechniqueRepository as j}from"../core/shaderTechnique/ShaderTechniqueRepository.js";import{ChapmanAtmosphere as y}from"../effects/atmosphere/ChapmanAtmosphere.js";import{LocalAtmosphere as b}from"../effects/atmosphere/LocalAtmosphere.js";import{MarsAtmosphere as R}from"../effects/atmosphere/MarsAtmosphere.js";import{CloudsComposition as A}from"../effects/clouds/CloudsComposition.js";import{Fog as C}from"../effects/fog/Fog.js";import{ObjectAndLayerID as S}from"../effects/geometry/ObjectAndLayerID.js";import{olidEnabled as T}from"../effects/geometry/olidUtils.js";import{RenderOccluded as U}from"../effects/geometry/RenderOccluded.js";import{GlobalIllumination as D}from"../effects/globalIllumination/GlobalIllumination.js";import{Haze as M}from"../effects/haze/Haze.js";import{Highlight as O}from"../effects/highlight/Highlight.js";import{ShadowHighlight as q}from"../effects/highlight/ShadowHighlight.js";import{ShadowHighlightBuffer as F}from"../effects/highlight/ShadowHighlightBuffer.js";import{Magnifier as L}from"../effects/magnifier/Magnifier.js";import{ShadowAccumulator as k}from"../effects/shadowAccumulation/ShadowAccumulator.js";import{ShadowCastRenderer as W}from"../effects/shadowAccumulation/ShadowCastRenderer.js";import{SMAA as I}from"../effects/smaa/SMAA.js";import{SSAO as B}from"../effects/ssao/SSAO.js";import{Stars as E}from"../effects/stars/Stars.js";import{EmissionComposite as H}from"../lib/EmissionComposite.js";import{GLMaterialRepository as G}from"../lib/GLMaterialRepository.js";import{ObjectAndLayerIdRenderHelper as P}from"../lib/ObjectAndLayerIdRenderHelper.js";import{Renderer as N}from"../lib/Renderer.js";import{RenderingContext as z}from"../lib/RenderingContext.js";import{RenderingContextOptions as V}from"../lib/RenderingContextOptions.js";import{TextureRepository as X}from"../lib/TextureRepository.js";import{createMarkerTextureRepository as Q}from"../materials/markerTextureRepository.js";import{createStippleTextureRepository as J}from"../materials/stippleTextureRepository.js";import{WaterTextureRepository as K}from"../materials/internal/WaterTextureRepository.js";import{getContextCache as Y}from"./contextCache.js";import{removeLoadedShaderModules as Z}from"./renderUtils.js";import{ScreenshotManager as $,ScreenshotContext as ee}from"./ScreenshotManager.js";import{contextCache as te}from"./testUtils.js";import{noBudget as re}from"../../../support/Scheduler.js";import{checkWebGLError as ie}from"../../../webgl/checkWebGLError.js";const se=has("disable-feature:async-navigation-3d-depth-readback");let ne=class extends t{constructor(e,t){super(e),this.olidRenderHelper=T()?new P:null,this.waterTextures=new K,this._needsUpdate=!0,this._needsRender=!0,this._idleSuspend=!0,this._needsWaterReflectionUpdate=!1,this._lastAnimationUpdate=0,this._fog=p(null),this.globalIllumination=null,this.shadowAccumulator=null,this.test=null,this._initializeContext(t);const{memoryController:r}=t.view.resourceController;this.stippleTextures=J(this._rctx,r),this.markerTextures=Q(this._rctx,r),this.techniques=new j(new x(this._rctx,this.stippleTextures,this.waterTextures,this.markerTextures)),this.textures=new X(t),this.addHandles(this.textures.events.on("changed",e=>this.requestRender(e)));const i=new G(this.textures,this.techniques,()=>this.requestRender(),()=>this.requestRender());this.renderer=new N(t,i,this.techniques,this._rctx,e=>this.requestRender(e)),this.addHandles([a(()=>t.view.ready,()=>this._createRenderNodes(),h),l(()=>this.waterTextures.updating,()=>this.requestRender(),h),l(()=>t.view.qualityProfile,e=>this.renderer?.updateRenderFeatures(e),d)]);const s={renderScene:(e,t,r,i)=>(this.renderer.setTime(t),this.renderer.render(e,r,i)),requestRenderScene:e=>this.requestRender(e),prepareOverlay:()=>t.options.screenshot.prepareOverlay(),renderOverlay:(e,r,i)=>t.options.screenshot.renderOverlay(e,r,i)};this._screenshotManager=new $(this._rctx,s,e=>t.view.overlayManager.updateOverlays(re,e.camera,0)),this._registerFrameTask(t)}destroy(){const e=this.stage?.container;e?.contains(this._canvas)&&e.removeChild(this._canvas),this._frameTask=n(this._frameTask),this.techniques.destroy(),this._componentObjectCollection=o(this._componentObjectCollection),this._screenshotManager.destroy(),this.renderer.destroy(),this.globalIllumination=null,this.textures.destroy(),this.waterTextures.destroy(),this.markerTextures.destroy(),this.stippleTextures.destroy(),this._canvas=null,this._rctx=o(this._rctx),this.test?.destroy()}_createRenderNodes(){const{view:e,viewingMode:t}=this.stage;this.shadowAccumulator=new k({view:e}),this.shadowAccumulator.accumulationRenderer=new W({view:e,data:this.shadowAccumulator}),this.renderer.setShadowAccumulator(this.shadowAccumulator),new E({view:e}),g(e.spatialReference)||(2===t?new b({view:e}):w(e.spatialReference)?new R({view:e}):(new y({view:e}),new A({view:e}),new M({view:e}),this._fog.value=new C({view:e}))),new B({view:e}),has("disable-feature:global-illumination")||(this.globalIllumination=new D({view:e})),new I({view:e,isEnabled:()=>this.renderer.hasSMAA}),new L({view:e}),new O({view:e}),new F({view:e}),new q({view:e,viewingMode:t}),new H({view:e}),new U({view:e}),T()&&new S({view:e})}requestRender(e=1){switch(e){case 2:this.view.state.fading=!0;case 1:this._needsUpdate=!0,this.globalIllumination?.resetAccumulation();case 0:this._needsRender=!0}}get updating(){const e=this._needsUpdate||this._needsWaterReflectionUpdate||this.renderer.updating||this.textures.updating||this.waterTextures.updating;return e&&_.UPDATING&&console.log(" RenderView:",this._needsUpdate,this._needsWaterReflectionUpdate,this.renderer.updating,this.textures.updating,this.waterTextures.updating),e}setIdleSuspend(e){this._idleSuspend!==e&&(this._idleSuspend=e,this.requestRender())}get renderingContext(){return this._rctx}get capabilities(){return this._rctx.capabilities}get canvas(){return this._canvas}takeScreenshot(e){return this._screenshotManager.takeScreenshot(r(e))}getAlpha(){return!!this._rctx.contextAttributes.alpha}getMinimalDepthForArea(e,t,r,i,s,n=s){let o=se?this._readMainDepthSynchronously(t,r,i,s,n):this.renderer.navigationDepthCache.getMinimalDepthForArea(t,r,i,s,n)??Number.MAX_VALUE;if(e){const s=e.pickDepth(t*i.pixelRatio,r*i.pixelRatio,i);null!=s&&o>s&&s!==i.nearFar[0]&&s!==i.nearFar[1]&&(o=s)}return o===Number.MAX_VALUE?void 0:o}whenRepresentativeDepthForArea(e,t,r,i,s,n=1){return this.renderer.navigationDepthCache.whenRepresentativeDepthForArea(e,t,r,i,s,n)}_readMainDepthSynchronously(e,t,r,i,s){const n=r.constrainWindowSize(e,t,i*r.pixelRatio,s*r.pixelRatio),o=this._ensureLinearDepthArrayBuffer(n);this.renderer.readMainDepth(n,o);let a=Number.MAX_VALUE;for(let h=0;h<n[2]*n[3];h++){const e=this._linearDepthFromTexture(4*h,o,r.nearFar);a>e&&e!==r.nearFar[0]&&e!==r.nearFar[1]&&(a=e)}return a}_linearDepthFromTexture(e,t,r){return i(t,e)*(r[1]-r[0])+r[0]}_ensureLinearDepthArrayBuffer(e){const t=4*e[2]*e[3];return(null==this._tmpDepthBuffer||this._tmpDepthBuffer.byteLength<t)&&(this._tmpDepthBuffer=new Uint8Array(t)),this._tmpDepthBuffer}async reloadShaders(){Z(),await this.techniques.reloadAll(),this.renderer.overlay?.reloadShaders(),this.requestRender()}_registerFrameTask(e){const t=e.view.state;let r=!1,i=0,s=!1;const n={preRender:({time:s})=>{r=this.updating,i=this._needsUpdate?1:0,this._needsRender&&this.renderer.updateSceneDepthRange(t.camera),e.commitSyncLayers(),s=this.test?.time??s;const n=m(s-this._lastAnimationUpdate);this.view.state.animationsEnabled&&(n>this.renderer.animationTimestep||r||this._needsRender)&&(this.renderer.updateAnimation(t,s)&&this.requestRender(0),this._lastAnimationUpdate=s)},render:({time:e})=>{if(e=this.test?.time??e,this.renderer.setTime(e),(this._needsRender||!this._idleSuspend||!this.renderer.isCameraFinal||this._needsWaterReflectionUpdate)&&t.camera.fullWidth>0&&t.camera.fullHeight>0){const e=this._needsUpdate&&this._idleSuspend&&this.renderer.isCameraFinal;this._needsRender=!1,this._needsUpdate=!1,this._needsWaterReflectionUpdate=!1,this.renderer.render(t,0),s=!0,e&&this.renderer.hasReflections&&(this.requestRender(0),this._needsWaterReflectionUpdate=!0)}},update:({time:e})=>{this.view.state.animationsEnabled&&this.textures.update();const r=new ee(t,this.renderer.fboCache);e=this.test?.time??e,this._screenshotManager.update(r,e)},finish:()=>{s&&(this.renderer.finish(2===t.mode?i:1),s=!1)}};this._frameTask=c(n)}_initializeContext(e){const{options:t}=e,r=t.canvas??document.createElement("canvas");r.setAttribute("style","width: 100%; height:100%; display:block;"),this._canvas=r;const i={alpha:t.alpha||!1,premultipliedAlpha:!0,antialias:!1,depth:!0,stencil:t.stencil??!0,powerPreference:"high-performance",preserveDrawingBuffer:t.preserveDrawingBuffer??!1},n=r.getContext("webgl2",i);if(null==n)return void s.getLogger(this).error("A WebGL2 context could not be created.");ie(n,!0),this._rctx=oe(n,e),this._loadShaderOnlyExtensions(),!t.alpha&&this._rctx.contextAttributes.alpha&&s.getLogger(this).error("WebGL context has alpha channel even though no alpha channel was requested");const{container:o}=e;!this._rctx.contextAttributes.alpha&&has("safari")>=11&&(o.style.backgroundColor="black"),o.contains(r)||o.appendChild(r)}_loadShaderOnlyExtensions(){this._rctx.capabilities.enable("textureFloatLinear")}get _viewingMode(){return this.stage.viewingMode}get stage(){return this.view.stage}getObjectAndLayerIdColor(e){return this.olidRenderHelper?.getObjectAndLayerIdColor(e)}get componentObjectCollection(){return this._componentObjectCollection??=new v(this.renderer.renderPassManager,this._viewingMode,this.view.spatialReference.isWebMercator),this._componentObjectCollection}updateQualitySettings(e){null!=this.test?.time&&null!=e.fadeDuration&&(this.test.savedFadeDuration=e.fadeDuration,e.fadeDuration=m(0)),this._rctx.updateOptions({maxPreferredTexturePixels:this.view.qualitySettings.maxTexturePixels})}get fog(){return r(this._fog.value)}};function oe(e,t){const r=new V(t);if(te.enabled){let t=ae.get(e);return 1===t?.refCount?(t.configure(r),t.ref(),t):(t=new z(e,r),ae.set(e,t),t.ref(),t)}return new z(e,r)}e([u({type:Boolean,readOnly:!0})],ne.prototype,"updating",null),e([u({constructOnly:!0})],ne.prototype,"view",void 0),e([u({readOnly:!0})],ne.prototype,"componentObjectCollection",null),e([u()],ne.prototype,"_componentObjectCollection",void 0),e([u()],ne.prototype,"_needsUpdate",void 0),e([u()],ne.prototype,"_needsWaterReflectionUpdate",void 0),ne=e([f("esri.views.3d.webgl-engine.parts.RenderView")],ne);const ae=Y();export{ne as RenderView};
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import{toConst as r}from"../../../../core/compilerUtils.js";import{unpackFloatRGBA as i}from"../../../../core/floatRGBA.js";import has from"../../../../core/has.js";import s from"../../../../core/Logger.js";import{removeMaybe as n,destroyMaybe as o}from"../../../../core/maybe.js";import{when as a,initial as h,watch as l,syncAndInitial as d}from"../../../../core/reactiveUtils.js";import{addFrameTask as c}from"../../../../core/scheduling.js";import{signal as p}from"../../../../core/signal.js";import{Milliseconds as m}from"../../../../core/time.js";import{property as u,subclass as f}from"../../../../core/accessorSupport/decorators.js";import{isMoon as g,isMars as w}from"../../../../geometry/ellipsoidUtils.js";import{debugFlags as _}from"../../support/debugFlags.js";import{ComponentObjectCollection as v}from"../collections/Component/ComponentObjectCollection.js";import{ShaderTechniqueConstructionContext as x}from"../core/shaderTechnique/ShaderTechniqueConstructionContext.js";import{ShaderTechniqueRepository as j}from"../core/shaderTechnique/ShaderTechniqueRepository.js";import{ChapmanAtmosphere as y}from"../effects/atmosphere/ChapmanAtmosphere.js";import{LocalAtmosphere as b}from"../effects/atmosphere/LocalAtmosphere.js";import{MarsAtmosphere as R}from"../effects/atmosphere/MarsAtmosphere.js";import{CloudsComposition as A}from"../effects/clouds/CloudsComposition.js";import{Fog as C}from"../effects/fog/Fog.js";import{ObjectAndLayerID as S}from"../effects/geometry/ObjectAndLayerID.js";import{olidEnabled as T}from"../effects/geometry/olidUtils.js";import{RenderOccluded as U}from"../effects/geometry/RenderOccluded.js";import{GlobalIllumination as D}from"../effects/globalIllumination/GlobalIllumination.js";import{Haze as M}from"../effects/haze/Haze.js";import{Highlight as O}from"../effects/highlight/Highlight.js";import{ShadowHighlight as q}from"../effects/highlight/ShadowHighlight.js";import{ShadowHighlightBuffer as F}from"../effects/highlight/ShadowHighlightBuffer.js";import{Magnifier as L}from"../effects/magnifier/Magnifier.js";import{ShadowAccumulator as k}from"../effects/shadowAccumulation/ShadowAccumulator.js";import{ShadowCastRenderer as W}from"../effects/shadowAccumulation/ShadowCastRenderer.js";import{SMAA as I}from"../effects/smaa/SMAA.js";import{SSAO as B}from"../effects/ssao/SSAO.js";import{Stars as E}from"../effects/stars/Stars.js";import{EmissionComposite as H}from"../lib/EmissionComposite.js";import{GLMaterialRepository as G}from"../lib/GLMaterialRepository.js";import{ObjectAndLayerIdRenderHelper as P}from"../lib/ObjectAndLayerIdRenderHelper.js";import{Renderer as N}from"../lib/Renderer.js";import{RenderingContext as z}from"../lib/RenderingContext.js";import{RenderingContextOptions as V}from"../lib/RenderingContextOptions.js";import{TextureRepository as X}from"../lib/TextureRepository.js";import{createMarkerTextureRepository as Q}from"../materials/markerTextureRepository.js";import{createStippleTextureRepository as J}from"../materials/stippleTextureRepository.js";import{WaterTextureRepository as K}from"../materials/internal/WaterTextureRepository.js";import{getContextCache as Y}from"./contextCache.js";import{removeLoadedShaderModules as Z}from"./renderUtils.js";import{ScreenshotManager as $,ScreenshotContext as ee}from"./ScreenshotManager.js";import{contextCache as te}from"./testUtils.js";import{noBudget as re}from"../../../support/Scheduler.js";import{checkWebGLError as ie}from"../../../webgl/checkWebGLError.js";const se=has("disable-feature:async-navigation-3d-depth-readback");let ne=class extends t{constructor(e,t){super(e),this.olidRenderHelper=T()?new P:null,this.waterTextures=new K,this._needsUpdate=!0,this._needsRender=!0,this._idleSuspend=!0,this._needsWaterReflectionUpdate=!1,this._lastAnimationUpdate=0,this._fog=p(null),this.globalIllumination=null,this.shadowAccumulator=null,this.test=null,this._initializeContext(t);const{memoryController:r}=t.view.resourceController;this.stippleTextures=J(this._rctx,r),this.markerTextures=Q(this._rctx,r),this.techniques=new j(new x(this._rctx,this.stippleTextures,this.waterTextures,this.markerTextures)),this.textures=new X(t),this.addHandles(this.textures.events.on("changed",e=>this.requestRender(e)));const i=new G(this.textures,this.techniques,()=>this.requestRender(),()=>this.requestRender());this.renderer=new N(t,i,this.techniques,this._rctx,e=>this.requestRender(e)),this.addHandles([a(()=>t.view.ready,()=>this._createRenderNodes(),h),l(()=>this.waterTextures.updating,()=>this.requestRender(),h),l(()=>t.view.qualityProfile,e=>this.renderer?.updateRenderFeatures(e),d)]);const s={renderScene:(e,t,r,i)=>(this.renderer.setTime(t),this.renderer.render(e,r,i)),requestRenderScene:e=>this.requestRender(e),prepareOverlay:()=>t.options.screenshot.prepareOverlay(),renderOverlay:(e,r,i)=>t.options.screenshot.renderOverlay(e,r,i)};this._screenshotManager=new $(this._rctx,s,e=>t.view.overlayManager.updateOverlays(re,e.camera,0)),this._registerFrameTask(t)}destroy(){const e=this.stage?.container;e?.contains(this._canvas)&&e.removeChild(this._canvas),this._frameTask=n(this._frameTask),this.techniques.destroy(),this._componentObjectCollection=o(this._componentObjectCollection),this._screenshotManager.destroy(),this.renderer.destroy(),this.globalIllumination=null,this.textures.destroy(),this.waterTextures.destroy(),this.markerTextures.destroy(),this.stippleTextures.destroy(),this._canvas=null,this._rctx=o(this._rctx),this.test?.destroy()}_createRenderNodes(){const{view:e,viewingMode:t}=this.stage;this.shadowAccumulator=new k({view:e}),this.shadowAccumulator.accumulationRenderer=new W({view:e,data:this.shadowAccumulator}),this.renderer.setShadowAccumulator(this.shadowAccumulator),new E({view:e}),g(e.spatialReference)||(2===t?new b({view:e}):w(e.spatialReference)?new R({view:e}):(new y({view:e}),new A({view:e}),new M({view:e}),this._fog.value=new C({view:e}))),new B({view:e}),has("disable-feature:global-illumination")||(this.globalIllumination=new D({view:e})),new I({view:e,isEnabled:()=>this.renderer.hasSMAA}),new L({view:e}),new O({view:e}),new F({view:e}),new q({view:e,viewingMode:t}),new H({view:e}),new U({view:e}),T()&&new S({view:e})}requestRender(e=1){switch(e){case 2:this.view.state.fading=!0;case 1:this._needsUpdate=!0,this.globalIllumination?.resetAccumulation();case 0:this._needsRender=!0}}get updating(){const e=this._needsUpdate||this._needsWaterReflectionUpdate||this.renderer.updating||this.textures.updating||this.waterTextures.updating;return e&&_.UPDATING&&console.log(" RenderView:",this._needsUpdate,this._needsWaterReflectionUpdate,this.renderer.updating,this.textures.updating,this.waterTextures.updating),e}setIdleSuspend(e){this._idleSuspend!==e&&(this._idleSuspend=e,this.requestRender())}get renderingContext(){return this._rctx}get capabilities(){return this._rctx.capabilities}get canvas(){return this._canvas}takeScreenshot(e){return this._screenshotManager.takeScreenshot(r(e))}getAlpha(){return!!this._rctx.contextAttributes.alpha}getMinimalDepthForArea(e,t,r,i,s,n=s){let o=se?this._readMainDepthSynchronously(t,r,i,s,n):this.renderer.navigationDepthCache.getMinimalDepthForArea(t,r,i,s,n)??Number.MAX_VALUE;if(e){const s=e.pickDepth(t*i.pixelRatio,r*i.pixelRatio,i);null!=s&&o>s&&s!==i.nearFar[0]&&s!==i.nearFar[1]&&(o=s)}return o===Number.MAX_VALUE?void 0:o}whenRepresentativeDepthForArea(e,t,r,i,s,n=1){return this.renderer.navigationDepthCache.whenRepresentativeDepthForArea(e,t,r,i,s,n)}_readMainDepthSynchronously(e,t,r,i,s){const n=r.constrainWindowSize(e,t,i*r.pixelRatio,s*r.pixelRatio),o=this._ensureLinearDepthArrayBuffer(n);this.renderer.readMainDepth(n,o);let a=Number.MAX_VALUE;for(let h=0;h<n[2]*n[3];h++){const e=this._linearDepthFromTexture(4*h,o,r.nearFar);a>e&&e!==r.nearFar[0]&&e!==r.nearFar[1]&&(a=e)}return a}_linearDepthFromTexture(e,t,r){return i(t,e)*(r[1]-r[0])+r[0]}_ensureLinearDepthArrayBuffer(e){const t=4*e[2]*e[3];return(null==this._tmpDepthBuffer||this._tmpDepthBuffer.byteLength<t)&&(this._tmpDepthBuffer=new Uint8Array(t)),this._tmpDepthBuffer}async reloadShaders(){Z(),await this.techniques.reloadAll(),this.renderer.overlay?.reloadShaders(),this.requestRender()}_registerFrameTask(e){const t=e.view.state;let r=!1,i=0,s=!1;const n={preRender:({time:s})=>{r=this.updating,i=this._needsUpdate?1:0,this._needsRender&&this.renderer.updateSceneDepthRange(t.camera),e.commitSyncLayers(),s=this.test?.time??s;const n=m(s-this._lastAnimationUpdate);this.view.state.animationsEnabled&&(n>this.renderer.animationTimestep||r||this._needsRender)&&(this.renderer.updateAnimation(t,s)&&this.requestRender(0),this._lastAnimationUpdate=s)},render:({time:e})=>{if(e=this.test?.time??e,this.renderer.setTime(e),(this._needsRender||!this._idleSuspend||!this.renderer.isCameraFinal||this._needsWaterReflectionUpdate)&&t.camera.fullWidth>0&&t.camera.fullHeight>0){const e=this._needsUpdate&&this._idleSuspend&&this.renderer.isCameraFinal;this._needsRender=!1,this._needsUpdate=!1,this._needsWaterReflectionUpdate=!1,this.renderer.render(t,0),s=!0,e&&this.renderer.hasReflections&&(this.requestRender(0),this._needsWaterReflectionUpdate=!0)}},update:({time:e})=>{this.view.state.animationsEnabled&&this.textures.update();const r=new ee(t,this.renderer.fboCache,this.globalIllumination?.isAccumulating??!1);e=this.test?.time??e,this._screenshotManager.update(r,e)},finish:()=>{s&&(this.renderer.finish(2===t.mode?i:1),s=!1)}};this._frameTask=c(n)}_initializeContext(e){const{options:t}=e,r=t.canvas??document.createElement("canvas");r.setAttribute("style","width: 100%; height:100%; display:block;"),this._canvas=r;const i={alpha:t.alpha||!1,premultipliedAlpha:!0,antialias:!1,depth:!0,stencil:t.stencil??!0,powerPreference:"high-performance",preserveDrawingBuffer:t.preserveDrawingBuffer??!1},n=r.getContext("webgl2",i);if(null==n)return void s.getLogger(this).error("A WebGL2 context could not be created.");ie(n,!0),this._rctx=oe(n,e),this._loadShaderOnlyExtensions(),!t.alpha&&this._rctx.contextAttributes.alpha&&s.getLogger(this).error("WebGL context has alpha channel even though no alpha channel was requested");const{container:o}=e;!this._rctx.contextAttributes.alpha&&has("safari")>=11&&(o.style.backgroundColor="black"),o.contains(r)||o.appendChild(r)}_loadShaderOnlyExtensions(){this._rctx.capabilities.enable("textureFloatLinear")}get _viewingMode(){return this.stage.viewingMode}get stage(){return this.view.stage}getObjectAndLayerIdColor(e){return this.olidRenderHelper?.getObjectAndLayerIdColor(e)}get componentObjectCollection(){return this._componentObjectCollection??=new v(this.renderer.renderPassManager,this._viewingMode,this.view.spatialReference.isWebMercator),this._componentObjectCollection}updateQualitySettings(e){null!=this.test?.time&&null!=e.fadeDuration&&(this.test.savedFadeDuration=e.fadeDuration,e.fadeDuration=m(0)),this._rctx.updateOptions({maxPreferredTexturePixels:this.view.qualitySettings.maxTexturePixels})}get fog(){return r(this._fog.value)}};function oe(e,t){const r=new V(t);if(te.enabled){let t=ae.get(e);return 1===t?.refCount?(t.configure(r),t.ref(),t):(t=new z(e,r),ae.set(e,t),t.ref(),t)}return new z(e,r)}e([u({type:Boolean,readOnly:!0})],ne.prototype,"updating",null),e([u({constructOnly:!0})],ne.prototype,"view",void 0),e([u({readOnly:!0})],ne.prototype,"componentObjectCollection",null),e([u()],ne.prototype,"_componentObjectCollection",void 0),e([u()],ne.prototype,"_needsUpdate",void 0),e([u()],ne.prototype,"_needsWaterReflectionUpdate",void 0),ne=e([f("esri.views.3d.webgl-engine.parts.RenderView")],ne);const ae=Y();export{ne as RenderView};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{clone as e}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{resampleHermite as t}from"../../../support/screenshotUtils.js";import{DataType as r}from"../../../webgl/enums.js";import{ensureAttachmentMaxSize as
|
|
2
|
+
import{clone as e}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{resampleHermite as t}from"../../../support/screenshotUtils.js";import{DataType as r}from"../../../webgl/enums.js";import{ensureAttachmentMaxSize as i}from"../../../webgl/FramebufferObject.js";import{createEmptyImageData as s}from"../../../../core/imageUtils.js";class n{constructor(e,t,r){this.parameters=e,this.fbos=t,this.isGlobalIlluminationAccumulating=r}}class o{constructor(e,t,r){this._rctx=e,this._renderFunctions=t,this._forceCameraHook=r,this.supersample=!0,this._screenshotQueue=new Array}destroy(){this._rctx=null}async takeScreenshot(e){await this._renderFunctions.prepareOverlay(),this._renderFunctions.requestRenderScene(0);const t=Promise.withResolvers();return this._screenshotQueue.push({settings:e,resolver:t}),t.promise}update(e,t){for(const r of this._screenshotQueue){if(null==this._rctx){r.resolver.reject();continue}const i={...r.settings,pixelRatio:r.settings.pixelRatio*e.parameters.camera.pixelRatio},s=this._renderScreenshot(e,i,t);r.resolver.resolve(s)}this._screenshotQueue.length=0}_renderScreenshotOverlay(e,t,r){e.width=t.width,e.height=t.height;const i=e.getContext("2d",{willReadFrequently:!0}),s=r.pixelRatio;return i.save(),i.translate(0,t.height),i.scale(1,-1),r.region&&i.translate(-r.region.x,-r.region.y),i.scale(s,s),t=this._renderFunctions.renderOverlay(e,r.disableDecorations,t),i.restore(),t}_readbackScreenshot(e,t){return e.resample?this._readbackScreenshotResampled({...e,resample:e.resample},t):this._readbackScreenshotImmediate(e,t)}_readbackScreenshotResampled(e,i){const{framebufferWidth:n,framebufferHeight:o,region:a,resample:h}=e,c=this._ensureScreenshotEncodeCanvas();let l=s(n,o,c);this._rctx.gl.readPixels(0,0,n,o,6408,r.UNSIGNED_BYTE,new Uint8Array(l.data.buffer)),i(),l=this._renderScreenshotOverlay(c,l,{...e,region:void 0});const d=s(a.width,a.height,c);return t(l,d,!0,h.region.x,o-(h.region.y+h.region.height),h.region.width,h.region.height)}_readbackScreenshotImmediate(e,t){const{framebufferHeight:i,region:n}=e,o=this._ensureScreenshotEncodeCanvas(),a=s(n.width,n.height,o);return this._rctx.gl.readPixels(n.x,i-(n.y+n.height),n.width,n.height,6408,r.UNSIGNED_BYTE,new Uint8Array(a.data.buffer)),t(),this._renderScreenshotOverlay(o,a,e)}_renderScreenshot(t,r,s){const n=t.parameters.camera,{framebufferWidth:o,framebufferHeight:a,ignorePadding:h,pixelRatio:c,disableDecorations:l,olidColor:d}=r,u={width:o,height:a};i(u,Math.min(this._rctx.parameters.maxTextureSize,this._rctx.parameters.maxRenderbufferSize));let f=!1;const m=u.width!==n.fullWidth||u.height!==n.fullHeight,g=h&&n.pixelRatio!==c,_=m||l||g||d||t.isGlobalIlluminationAccumulating;let b=null,p=null;if(_){const t=n.clone();if(h){const r=e(t.padding);for(let e=0;e<4;e++)r[e]=Math.round(r[e]/t.pixelRatio*c);t.padding=r}t.fullWidth=u.width,t.fullHeight=u.height,t.pixelRatio=c;const r=n.fovX-t.fovX,i=n.fovY-t.fovY;r<0&&r<i?t.fovX=n.fovX:i<0&&i<r&&(t.fovY=n.fovY);const o={camera:t,contentCamera:t,mode:2,alignPixelEnabled:!0,contentPixelRatio:t.pixelRatio};this._forceCameraHook(o),f=!0;const a=this._renderFunctions.renderScene(o,s,d?2:1,l);p=a.color,b=a.olid}const x=()=>{this._rctx.bindFramebuffer(null),p?.release()};this._rctx.bindFramebuffer(p?.fbo);const v=this._readbackScreenshot(r,x);let S=null;if(d){const e=()=>{this._rctx.bindFramebuffer(null),b?.release()};this._rctx.bindFramebuffer(b?.fbo),S=this._readbackScreenshot(r,e),this._rctx.bindFramebuffer(null)}if(_&&!this._rctx.contextAttributes.alpha)for(let e=3;e<v.data.length;e+=4)v.data[e]=255;if(S&&!this._rctx.contextAttributes.alpha)for(let e=3;e<S.data.length;e+=4)S.data[e]=255;return f&&this._forceCameraHook(t.parameters),[v,S]}_ensureScreenshotEncodeCanvas(){return this._screenshotEncodeCanvas??=document.createElement("canvas"),this._screenshotEncodeCanvas}}export{n as ScreenshotContext,o as ScreenshotManager};
|
package/views/SceneView.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../Camera.js";import i from"../Viewpoint.js";import r from"../core/Collection.js";import{byId as s}from"../core/domUtils.js";import n from"../core/Error.js";import{on as a}from"../core/events.js";import{destroyHandle as o,makeHandle as l}from"../core/handleUtils.js";import has from"../core/has.js";import p from"../core/Logger.js";import{mapCollectionAsync as h}from"../core/mapCollectionUtils.js";import{destroyMaybe as d,maybeProperty as u}from"../core/maybe.js";import{throwIfDestroyed as c,throwIfAborted as g,createAbortError as m}from"../core/promiseUtils.js";import y from"../core/ReactiveSet.js";import{on as f,watch as w,initial as v,sync as _,whenOnce as b,syncAndInitial as M}from"../core/reactiveUtils.js";import{setFrameDuration as S,cleanupScheduling as V}from"../core/scheduling.js";import{createScreenPoint as j,createScreenPointArray as C}from"../core/screenUtils.js";import{cleanupWhereClauseCache as T}from"../core/sql.js";import{getDefaultVerticalUnitStringForSR as R,getMetersPerUnitForSR as x}from"../core/units.js";import{property as A,cast as O,subclass as E}from"../core/accessorSupport/decorators.js";import{ensureType as L,ensureClass as I}from"../core/accessorSupport/ensureType.js";import{overrideDefaultsFrom as H}from"../core/accessorSupport/overrideDefaultsFrom.js";import{runUntracked as P}from"../core/accessorSupport/tracking.js";import{drainNotificationQueue as D}from"../core/accessorSupport/trackingUtils.js";import{create as F}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{cleanupPooledRBush as U}from"../core/libs/rbush/PooledRBush.js";import{initialize as G}from"../core/workers/workers.js";import W from"../geometry/Extent.js";import z from"../geometry/HeightModelInfo.js";import q from"../geometry/Point.js";import{project as k,canProjectWithoutEngine as B}from"../geometry/projectionUtils.js";import N from"../geometry/SpatialReference.js";import{cleanupSpatialReferenceEllipsoidUtils as Z}from"../geometry/spatialReferenceEllipsoidUtils.js";import{projectBoundingRect as Q}from"../geometry/projection/projectBoundingRect.js";import{projectPointToVector as Y}from"../geometry/projection/projectPointToVector.js";import{toExtent as $,create as J}from"../geometry/support/aaBoundingRect.js";import{renderSRFromViewSR as K}from"../geometry/support/coordinateSystem.js";import{getResolutionForScale as X}from"../geometry/support/scaleUtils.js";import{wgs84 as ee,webMercator as te}from"../geometry/support/spatialReferenceUtils.js";import{makeDehydratedPoint as ie}from"../layers/graphics/dehydratedPoint.js";import{isImageryTileLayer as re,isTiledLayer as se,isVoxelLayer as ne,isIntegratedMeshLayer as ae,isGaussianSplatLayer as oe}from"../layers/support/layerUtils.js";import{TilemapCache as le}from"../layers/support/TilemapCache.js";import{clearDefaultPortalInstance as pe}from"../portal/portalDefault.js";import{WebSceneTag as he}from"../support/tagSymbols.js";import{BreakpointsOwner as de}from"./BreakpointsOwner.js";import{DOMContainer as ue}from"./DOMContainer.js";import{PopupView as ce}from"./PopupView.js";import ge from"./View.js";import me from"./ViewAnimation.js";import{stringFromViewingMode as ye,viewingModeFromString as fe}from"./ViewingMode.js";import{GroundView3D as we}from"./3d/GroundView3D.js";import{layerView3DImporter as ve}from"./3d/layerViewModuleImportUtils.js";import{importAnalysisViewModule as _e}from"./3d/analysis/analysisViewModuleImportUtils.js";import{cleanupIntersectionUtils as be}from"./3d/camera/intersectionUtils.js";import Me from"./3d/constraints/Constraints.js";import Se from"./3d/environment/Environment.js";import{EnvironmentManager as Ve}from"./3d/environment/EnvironmentManager.js";import je from"./3d/input/SceneInputManager.js";import{GraphicsDeconflictor as Ce}from"./3d/layers/graphics/GraphicsDeconflictor.js";import{Labeler as Te}from"./3d/layers/graphics/Labeler.js";import Re from"./3d/layers/i3s/I3SLodHandling.js";import{Navigation3D as xe}from"./3d/navigation/Navigation3D.js";import{ScreenSizePerspective as Ae}from"./3d/state/ScreenSizePerspective.js";import Oe from"./3d/state/ViewState.js";import{ViewStateManager as Ee,cleanupViewStateManager as Le}from"./3d/state/ViewStateManager.js";import{cleanupPointToPointAnimationController as Ie}from"./3d/state/controllers/PointToPointAnimationController.js";import{SceneIntersectionHelper as He}from"./3d/state/helpers/SceneIntersectionHelper.js";import{cleanupNavigationUtils as Pe}from"./3d/state/utils/navigationUtils.js";import De from"./3d/support/Attribution3D.js";import{CombinedElevationProvider as Fe}from"./3d/support/CombinedElevationProvider.js";import{debugFlags as Ue}from"./3d/support/debugFlags.js";import{getElevationAtPoint as Ge}from"./3d/support/ElevationProvider.js";import{GroundAndIMSurface as We}from"./3d/support/GroundAndIMSurface.js";import{toMap as ze,hitTest as qe}from"./3d/support/hitTest.js";import{popupHitTest as ke}from"./3d/support/popupHitTest.js";import{getDefaultQualityProfileName as Be,getQualityProfileSettings as Ne}from"./3d/support/QualityProfile.js";import Ze from"./3d/support/QualitySettings.js";import{RenderCoordsHelper as Qe}from"./3d/support/RenderCoordsHelper.js";import{newResourceController as Ye}from"./3d/support/ResourceController.js";import $e from"./3d/support/SceneViewPerformanceInfo.js";import{SharedSymbolResources as Je}from"./3d/support/SharedSymbolResources.js";import{ViewSlice as Ke}from"./3d/support/ViewSlice.js";import{PointsOfInterest as Xe}from"./3d/support/pointsOfInterest/PointsOfInterest.js";import et from"./3d/terrain/TerrainSurface.js";import{isSurfaceLayerView as tt,getTiledLayerInfo as it,checkIfTileInfoSupportedForView as rt}from"./3d/terrain/terrainUtils.js";import{clearTilePerLayerInfo as st}from"./3d/terrain/TilePerLayerInfo.js";import{cleanupTileRenderer as nt}from"./3d/terrain/TileRenderer.js";import{Stage as at}from"./3d/webgl-engine/Stage.js";import{olidEnabled as ot}from"./3d/webgl-engine/effects/geometry/olidUtils.js";import{cleanupRenderOccluded as lt}from"./3d/webgl-engine/effects/geometry/RenderOccluded.js";import{defaultTolerance as pt}from"./3d/webgl-engine/lib/Intersector.js";import{cleanupShadowmap as ht}from"./3d/webgl-engine/lib/ShadowMap.js";import{terrainId as dt}from"./3d/webgl-engine/lib/verticalOffsetUtils.js";import{cleanupEdgeProcessing as ut}from"./3d/webgl-engine/lib/edgeRendering/edgePreprocessing.js";import ct from"./interactive/options/ViewOptions.js";import gt from"./support/AnalysisViewManager.js";import{cleanupDrapedUtils as mt}from"./support/drapedUtils.js";import{occludeesSupported as yt}from"./support/layerViewUtils.js";import{isSupportedScreenPointEvent as ft,createScreenPointFromSupportedEvent as wt}from"./support/screenUtils.js";import{isSpatialReferenceSupported as vt}from"./support/spatialReferenceSupport.js";import{initializeTextureCompressionWorker as _t,destroyTextureCompressionWorker as bt}from"./support/TextureCompressionHelper.js";import Mt from"./ui/DefaultUI.js";import St from"./ui/3d/DefaultUI3D.js";import Vt from"../webscene/Environment.js";import{clearVNodeCache as jt}from"../widgets/support/vnodeCache.js";var Ct;const Tt=Symbol(),Rt=Symbol();function xt(e){const t=I(ct,e);return t!==e&&null==e.snapping?.enabled&&(t.snapping.enabled=!0),t}let At=class extends(de(ce(ue(ge)))){static{Ct=this}get timeZone(){return super.timeZone}set timeZone(e){super.timeZone=e}constructor(e){super(e),this.options=new ct({snapping:{enabled:!0}}),this._userClippingArea=null,this._clippingArea=null,this._overrideDefaultEnvironmentOnly=!0,this._resolveWhenReady=[],this._resourceController=Ye(this),this.deconflictor=new Ce({view:this}),this.attribution3D=new De({view:this}),this.labeler=new Te({view:this,deconflictor:this.deconflictor.labels}),this.sharedSymbolResources=null,this.navigation=new xe({view:this}),this.basemapTerrain=null,this.elevationProvider=new Fe({view:this}),this._canvas=null,this.constraints=new Me,this._environment=new Se,this.environmentManager=new Ve,this.floors=new r,this.fullOpacity=1,this.graphicsView=null,this.analysisViewManager=new gt({importAnalysisViewModule:e=>_e(e),view:this}),this.groundView=null,this.groundAndIMSurface=null,this.map=null,this._featureTileTreeClients=new y,this._featureTiles=null,this._featureTreeDebugger=null,this.state=new Oe({view:this}),this.slice=new Ke,this.spatialReference=null,this.preserveDrawingBufferEnabled=!1,this.supersampleScreenshotsEnabled=!0,this.type="3d",this.ui=new St,this._numUpdating=0,this._lastUpdateTime=0,this.updatingProgress=.5,this._importControllers=new Map,G();const t=()=>this._updatingChanged();this.addHandles(o(h(()=>this.map?.allLayers,async e=>{try{await e.when()}catch{}finally{t()}}))),this.addHandles([f(()=>this.map?.allLayers,"after-changes",t,{onListenerAdd:t,onListenerRemove:t,sync:!0}),this.allLayerViews.on("after-changes",e=>this._updateUpdatingMonitors(e)),w(()=>this.scene,e=>e?.load().catch(()=>{}))]),this.inputManager=new je({view:this}),this.stateManager=new Ee({view:this}),this.screenSizePerspective=new Ae({view:this})}initialize(){if(has("enable-feature:esri-compress-textures")&&has("wasm-simd")){const e=_t(this,this.resourceController);this.addResolvingPromise(e.promise)}this.groundView=new we({view:this}),this.groundAndIMSurface=new We({view:this}),this._updateUpdatingMonitors(),this.updatingHandles.add(()=>this.qualitySettings.memoryLimit,e=>{this.resourceController&&(this.resourceController.memoryController.maxMemory=e)},v),this.updatingHandles.add(()=>this.qualitySettings.additionalCacheMemory,e=>{this.resourceController&&(this.resourceController.memoryController.additionalCacheMemory=e)},v),this.updatingHandles.add(()=>this.qualitySettings.frameRate??0,e=>S(e>0?1e3/Math.ceil(e):0),v),this.addHandles([w(()=>this.spatialReference,()=>this.notifyChange("clippingArea"),_),w(()=>({plane:this.slice.plane,isDecoration:this.slice.isDecoration}),()=>this._updateSlice(),_)])}destroy(){this.destroyed||(bt(this),this.updatingHandles.removeAll(),this.basemapTerrain?.clearHandles(),this.elevationProvider.destroy(),this.ui.removeAllHandles(),this.layerViewManager.clearHandles(),this.invalidate(),this.layerViewManager.clear(),this._set("analysisViewManager",d(this.analysisViewManager)),this._exitSurface(),this._disposeGraphicsView(),this._disposeFocusAreasView(),this.sharedSymbolResources=d(this.sharedSymbolResources),this._set("labeler",d(this.labeler)),this._set("deconflictor",d(this.deconflictor)),this._resourceController=d(this._resourceController),this._set("stateManager",d(this.stateManager)),this._set("inputManager",d(this.inputManager)),this.state.destroy(),this.highlights.destroy(),this.removeHandles("updatingMonitors"),this._set("environmentManager",d(this.environmentManager)),this._set("environment",d(this.environment)),this.groundView=d(this.groundView),this.groundAndIMSurface.destroy(),this.slice.destroy(),this._updatingObjectsWithProgress.length=0,this._updatingObjects.length=0,this.ui?.destroy(),this._set("ui",null),this._set("renderCanvas",null),this._set("canvas",null),this._canvas=null,this.screenSizePerspective.destroy(),this.attribution3D.destroy())}get stage(){return this._stage}get renderSpatialReference(){return this.renderCoordsHelper?.spatialReference}get groundSpatialReference(){return this.groundView?.spatialReference}get analyses(){return super.analyses}set analyses(e){super.analyses=e}get animation(){return this.state?.animation}get overlayManager(){return this.basemapTerrain?.overlayManager}get camera(){return this.stateManager?.camera}set camera(e){this.stateManager&&(this.stateManager.camera=e)}get contentCamera(){return this.stateManager?.contentCamera}set contentCamera(e){this.stateManager&&(this.stateManager.contentCamera=e)}installContentCameraReset(e={sticky:!1}){return this.stateManager.installContentCameraReset(e)}get canvas(){return this._canvas}get center(){return this.stateManager?.center}set center(e){this.stateManager&&(this.stateManager.center=L(q,e))}get clippingArea(){if("global"===this.viewingMode)return null;const e=this.map;let t=this._userClippingArea||u(e,"clippingArea");return!this._userClippingArea&&!u(e,"clippingEnabled")||null==t?(this._clippingArea=null,null):t instanceof W?this.spatialReference&&(t=Ot(t,this.spatialReference),null==t)?(p.getLogger(this).error("#clippingArea","setting clippingArea with incompatible SpatialReference"),this._clippingArea):(t=t.clone(),null==t.intersection(this._groundAndLayersExtent)&&(t.xmin=t.xmax,t.ymin=t.ymax),t.zmin=void 0,t.zmax=void 0,t.equals(this._clippingArea)||(this._clippingArea=t),this._clippingArea):(p.getLogger(this).error("#clippingArea","only clippingArea geometries of type Extent are supported"),this._clippingArea)}set clippingArea(e){this.ready&&"global"===this.viewingMode&&null!=e?p.getLogger(this).error("#clippingArea=","Clipping area is only supported in local viewingMode"):this._userClippingArea=e}get renderDataExtent(){if(1===this.state.viewingMode)return null;const e=this.renderSpatialReference,t=this.dataExtent;return null==t||null==e||t.spatialReference.equals(e)?t:Ot(t,e)}get tileInfo(){return this.basemapTerrain?.tilingScheme?.toTileInfo()}get dataExtent(){let e=this._groundAndLayersExtent;const t=this.spatialReference||N.WGS84,i=Ot(this.clippingArea,t);null!=i&&(e=null!=e?e.intersection(i):i);const r=this._get("dataExtent");return null!=e&&e.equals(r)?r:e}get _groundAndLayersExtent(){const e=this.spatialReference||N.WGS84;let t;const i=i=>{const r=Ot(i,e);null!=r&&(null!=t?t.union(r):t=r.clone())},{groundView:r}=this,s=r?.spatialReference,n=r?.fullGroundExtent;s&&n&&i(new W({xmin:n[0],ymin:n[1],zmin:0,xmax:n[2],ymax:n[3],zmax:0,spatialReference:s}));const a=e=>{null==e.fullExtent||"graphics"===e.type&&e.internal||i(e.fullExtent)};if(this.map?.allLayers.forEach(e=>a(e)),null==t)return null;t.hasZ?(t.zmin=Math.min(0,t.zmin??0),t.zmax=Math.max(0,t.zmax??0)):(t.zmin=0,t.zmax=0);const o=this._get("_groundAndLayersExtent");return t.equals(o)?o:t}get environment(){return this._environment}set environment(e){if(this._environment===e)return;const{_environment:t}=this;this._environment=null,t?.destroy(),this._environment=e,this.notifyChange("environment")}castEnvironment(e){return e?e instanceof Se?e:e instanceof Vt?this.environment?.cloneWithWebsceneEnvironment(e)??Se.fromWebsceneEnvironment(e):L(Se,e):new Se}get extent(){return this.stateManager?.extent}set extent(e){this.stateManager&&(this.stateManager.extent=e)}get screenCenter(){return this.stateManager?.screenCenter}get frustum(){return this.stateManager?.frustum}get layerviewCollections(){return[this.basemapView?.baseLayerViews,this.basemapView?.groundLayerViews,this.groundView?.layerViews,this.layerViews,this.basemapView?.referenceLayerViews]}get _layerToLayerviewMapping(){return Ct._layerToLayerview}static{this._layerToLayerview=ge._layerToLayerview.concat([["view.map.ground.layers","view.groundView.layerViews"]])}get initialExtentRequired(){return this.stateManager&&!this.stateManager.hasInitialView}get defaultsFromMapSettings(){return{required:{tileInfo:!1,heightModelInfo:!0,extent:!1}}}get interacting(){return this.navigating||(this.toolViewManager?.interacting??!1)}get stationary(){return!this.animation&&!this.resizing&&(this.state?.stationary??!0)}get navigating(){return this.state?.navigating??!1}get scene(){return this.map&&he in this.map?this.map:null}get padding(){return this.stateManager?.padding}set padding(e){this.stateManager&&(this.stateManager.padding=e)}get featureTiles(){return this._featureTiles}set qualityProfile(e){const t=Ne(e);t&&this._get("qualityProfile")!==e&&(this.qualitySettings=new Ze(t),this.stage?.renderView.updateQualitySettings(this.qualitySettings),this._set("qualityProfile",e))}get qualityProfile(){return this._get("qualityProfile")||Be()}_updateSlice(){null!=this.stage&&(this.stage.renderer.slice=this.slice)}get typeSpecificPreconditionsReady(){return!!this.viewingMode&&!!this.stateManager?.preinit(this.spatialReference)}get resolution(){const{scale:e,spatialReference:t}=this;return t?P(()=>X(e,t)):0}get scale(){return this.stateManager?.scale}set scale(e){this.stateManager&&(this.stateManager.scale=e)}get terrainLevel(){const e=this.basemapTerrain?.tilingScheme,t=this.scale;if(!e||!t)return null;const i=e.levelAtScale(t)+this.qualitySettings.tiledSurface.lodBias,r=e.getMaxLod();return i<=0?null:Math.max(0,Math.min(i,r||1/0))}get heightModelInfo(){const e=this.getDefaultHeightModelInfo();if(!e)return null;const t=R(this.spatialReference);return t&&e.heightUnit!==t?new z({heightModel:e.heightModel,heightUnit:t,vertCRS:e.vertCRS}):e}get alphaCompositingEnabled(){return this._get("alphaCompositingEnabled")}set alphaCompositingEnabled(e){this._stage&&p.getLogger(this).warn("alphaCompositingEnabled cannot be changed after the view has become ready"),this._set("alphaCompositingEnabled",e)}get updating(){if(this.destroying||this.destroyed)return!1;if(!this.initialized)return!0;let e=0,t=this.layerViewManager.updating,i=t?this.layerViewManager.updatingRemaining:0;this.allLayerViews.forEach(r=>{if(r.isFulfilled()){if(r.updating){if(t=!0,r.suspended||tt(r))return;++i,e+=r.updatingProgress}}else++i});const r=.1;for(const n of this._updatingObjects)n?.updating&&(i+=r,e+=.5*r);for(const n of this._updatingObjectsWithProgress)n?.updating&&(++i,e+=n.updatingProgress);const s=!this.stateManager.test.updatingIgnoreRenderState&&this.state.updating;if(t=!!(t||i>0||this.updatingHandles.updating||!this.ready||!this.stationary||s||this._importControllers.size>0||this.inputManager?.updating||this.map?.allLayers?.some(e=>!e.isFulfilled())),t?(this._numUpdating=Math.max(i,this._numUpdating),e+=this._numUpdating-i):this._numUpdating=0,this._numUpdating>0?e/=this._numUpdating:e=t?0:1,this._get("updatingProgress")!==e){const i=performance.now();if(e<1){const t=Math.min((i-this._lastUpdateTime)/2e3,1);e=this.updatingProgress*(1-t)+e*t}this._set("updatingProgress",e),this._lastUpdateTime=t&&e<1?i:0}return Ue.UPDATING&&console.log("Updating:",this._updatingObjectsToDebug.filter(e=>null!=e&&e.updating).map(({declaredClass:e})=>e)),t}get _updatingObjects(){return[this.graphicsView,this.basemapView,this._resourceController,this.stage,this.featureTiles,this.pointsOfInterest,this.environmentManager,this.overlay,this._featureTreeDebugger,this.toolViewManager,this.analysisViewManager,this.focusAreasView]}get _updatingObjectsWithProgress(){return[this.deconflictor,this.labeler,this.basemapTerrain]}get _updatingObjectsToDebug(){return Ue.UPDATING?this._updatingObjects.concat(this._updatingObjectsWithProgress).concat(this.allLayerViews.toArray()):[]}get viewingMode(){const e=this._predeterminedViewingMode;if(null!=e)return ye(e);const t=this.spatialReference;return t?null!=this.defaultsFromMap?.viewingMode&&t.equals(this.defaultsFromMap.spatialReference)?ye(this.defaultsFromMap.viewingMode):vt(t,1)?"global":"local":"global"}set viewingMode(e){this.ready?p.getLogger(this).error("#viewingMode","viewingMode cannot be set once view is ready"):this._overrideIfSome("viewingMode",e)}get viewpoint(){return this.stateManager?.viewpoint}set viewpoint(e){this.stateManager&&(this.stateManager.viewpoint=e)}get visibleArea(){return this.stateManager?.visibleArea}get zoom(){return this.stateManager.zoom}set zoom(e){this.stateManager&&(this.stateManager.zoom=e)}get resourceController(){return this._resourceController}get quality(){return this._resourceController?.memoryController?.memoryFactor??1}get resolutionScale(){return Math.sqrt(Math.min(1,this.quality/.75))}get performanceInfo(){return new $e(this)}on(e,t,i,r){const s=this.viewEvents.on(e,t,i,r);return s||super.on(e,t)}hasEventListener(e){return super.hasEventListener(e)||this.viewEvents.hasHandler(e)}toMap(e,t){if(!this.ready)return p.getLogger(this).error("#toMap()","Scene view cannot be used before it is ready"),null;const i=ft(e)?wt(this,e):e;return ze(this,i,t,this._defaultToMapOptions)}toScreen(e){if(!this.ready)return p.getLogger(this).error("#toScreen()","Scene view cannot be used before it is ready"),null;let t=e;return null==e.z&&(t=Ht,t.x=e.x,t.y=e.y,t.z=Ge(this.elevationProvider,e)??0,t.spatialReference=e.spatialReference),Y(t,Et,this.renderSpatialReference),this.state.camera.projectToScreen(Et,Lt),j(Lt[0],Lt[1])}pixelSizeAt(e,t){if(!this.ready)return p.getLogger(this).error("#pixelSizeAt()","Scene view cannot be used before it is ready"),null;if(!e)return 0;const i=this.renderSpatialReference;Y(e,Et,i);const r=this.state.camera.computeScreenPixelSizeAt(Et);return t&&i!==t?r*x(i)/x(t):r}overlayPixelSizeInMapUnits(e){return this.overlayManager?.overlayPixelSizeInMapUnits(e,()=>this.pixelSizeAt(e))??1}hitTest(e,t){if(!this.ready)return p.getLogger(this).error("#hitTest()","Scene view cannot be used before it is ready"),null;const i=ft(e)?wt(this,e):e;return qe(this,i,t,this._defaultHitTestOptions)}async popupHitTest(e){return ke(this,e)}goTo(e,t){return this.updatingHandles.addPromise(this.stateManager.goTo(e,t))}async zoomIn(){if(this.canZoomIn)return this.navigation.zoom(!0)}async zoomOut(){if(this.canZoomOut)return this.navigation.zoom(!1)}async whenAnalysisView(e){if(null==e.parent)throw new n("view:no-analysisview-for-analysis","The analysis does not exist in view.analyses",{analysis:e});switch(e.parent.type){case"line-of-sight":case"dimension":case"viewshed":return(await this.whenLayerView(e.parent)).whenAnalysisView();default:return this.analysisViewManager.whenAnalysisView(e)}}whenLayerView(e){return super.whenLayerView(e)}async takeScreenshot(e){const t=await this._completeSettings(e);await this.whenReady();const i=(await this.stage.renderView.takeScreenshot(t))[0];return(await(import("./support/screenshotUtils.js"))).encode(i,t,this._pixelFormat())}async _takeScreenshot(e){const t=await this._completeSettings(e);await this.whenReady();const i=(await this.stage.renderView.takeScreenshot(t))[0];return(await(import("./support/screenshotUtils.js"))).encodeData(i,this._pixelFormat())}async _takeScreenshotWithObjectAndLayerId(e){const t=await this._completeSettings(e);t.olidColor=!0,await this.whenReady();const i=await this.stage.renderView.takeScreenshot(t),{encodeData:r}=await(import("./support/screenshotUtils.js"));return[r(i[0],this._pixelFormat()),r(i[1],this._pixelFormat())]}async _completeSettings(e){const{toRenderSettings:t,screenshotSuperSampleSettings:i}=await(import("./support/screenshotUtils.js")),r=t(e,this);return r.pixelRatio/=this.state.pixelRatio,i(r,this.supersampleScreenshotsEnabled,this.padding)}_pixelFormat(){return{flipY:!0,premultipliedAlpha:this.stage?.renderView.getAlpha()??!1}}get test(){}async takeScreenshotWithObjectAndLayerId(e){if(!ot())throw new n("360vr:objectAndLayerId-rendering-disabled","has enable-feature:objectAndLayerId-rendering must be true");const{encode:t}=await(import("./support/screenshotUtils.js")),i=await this._completeSettings(e);i.olidColor=!0,await this.whenReady();const r=await this.stage.renderView.takeScreenshot(i),s=t(r[0],i,this._pixelFormat()),a=await this._completeSettings(e);a.format="png";return[s,t(r[1],a,this._pixelFormat())]}getColorToObjectAndLayerIdMapping(){const e=this.stage.renderView.olidRenderHelper;if(e)return e.getColorToObjectAndLayerIdMapping();throw new n("360vr:objectAndLayerId-rendering-disabled","has enable-feature:objectAndLayerId-rendering must be true")}addUpdatingPromise(e){return this.updatingHandles.addPromise(e)}getAttributionItems(){return super.getAttributionItems().concat(this.attribution3D.attributionItems)}importLayerView(e){return ve.importLayerView(e)}hasLayerViewModule(e){return ve.hasLayerViewModule(e)}forceDOMReadyCycle(){this.forceReadyCycle()}getWebDocumentSpatialReference(){return this.scene?.initialViewProperties?.spatialReference}getDefaultTimeZone(){return this.scene?.initialViewProperties?.timeZone??null}getSurface(){return this.surface}get _predeterminedViewingMode(){const e=this._isOverridden("viewingMode")?this._get("viewingMode"):this.scene?.initialViewProperties?.viewingMode;return null!=e?fe(e):null}getSpatialReferenceSupport(e,t){const i=this._predeterminedViewingMode,r=r=>this._validateSpatialReferenceForViewingMode(e,t,r)?this._makeSpatialReferenceConstraints(e,t,r,i):null,s=i?r(i):[...r(1)??[],...r(2)??[]];return s?.length?{constraints:s}:null}_validateSpatialReferenceForViewingMode(e,t,i){return!!vt(e,i)&&(null==t||(!!re(t)||(!se(t)||null!=it(t,e,i))&&(!ne(t)||1!==i)))}_makeSpatialReferenceConstraints(e,t,i,r){if(null==t)return[{spatialReference:e,viewingMode:i}];const{isWebMercator:s,isWGS84:n,vcsWkid:a,latestVcsWkid:o}=e,l=()=>null==a?s?N.WGS84:N.WebMercator:new N({...s?ee:te,vcsWkid:a,latestVcsWkid:o});if(re(t)&&(s||n)){return!n||2===r||null===rt(t.tileInfo,t.fullExtent,e,1)?[{spatialReference:e,viewingMode:i},{spatialReference:l(),viewingMode:i}]:[{spatialReference:l(),viewingMode:i}]}return se(t)||ne(t)||!s&&!n?se(t)&&s&&1!==i?[{spatialReference:e,viewingMode:i},{spatialReference:l(),viewingMode:2}]:[{spatialReference:e,viewingMode:i}]:[{spatialReference:e,viewingMode:i},{spatialReference:l(),viewingMode:i}]}_validateSpatialReference(e){const t=null!=this.getSpatialReferenceSupport(e),i=this._predeterminedViewingMode;return t||(null!=i?p.getLogger(this).warnOnce(`Spatial reference defined on view not supported in ${ye(i)} viewing mode.`):e.isGeographic&&p.getLogger(this).warnOnce("Spatial reference is geographic but not supported.")),t}whenReady(){return new Promise(e=>{this.ready?e(this):this._resolveWhenReady.push(e)})}trackGraphicState(e){if(!e.graphic)return p.getLogger(this).error("trackGraphicState","GraphicState.graphic must not be null or undefined to start tracking"),null;const t=this.getViewForGraphic(e.graphic);let i=null,r=!1;const s=t=>{!r&&null!=t&&"processor"in t&&"graphics-3d"===t.processor?.type&&t.processor.graphicsCore&&(i=t.processor.graphicsCore.trackGraphicState(e))};return null!=t?s(t):this.whenViewForGraphic(e.graphic,{waitForLayer:!0}).then(e=>s(e),()=>{}).catch(()=>{}),l(()=>{r=!0,null!=i&&(i.remove(),i=null)})}maskOccludee(e){if(!e)return p.getLogger(this).error("maskOccludee","GraphicState.graphic must not be null or undefined to mask an occludee"),null;const t=this.getViewForGraphic(e);let i=null,r=!1;const s=t=>{!r&&null!=t&&yt(t)&&(i=t.maskOccludee(e))};return null!=t?s(t):this.whenViewForGraphic(e,{waitForLayer:!0}).then(e=>s(e),()=>{}).catch(()=>{}),l(()=>{r=!0,null!=i&&(i.remove(),i=null)})}getViewForGraphic(e){return e.layer===this?this.graphicsView:e.layer?this.allLayerViews.filter(e=>"media-3d"!==e.type).find(t=>t.layer===e.layer):null}graphicChanged(e){null!=this.graphicsView&&this.graphicsView.graphicChanged(e)}async whenViewForGraphic(e,t){return e.layer===this?(await b(()=>this.graphicsView),this.graphicsView):e.layer&&this.map?t&&t.waitForLayer&&!this.map.allLayers.includes(e.layer)?new Promise((t,i)=>{const r=this.map.allLayers.on("change",s=>{s.added.includes(e.layer)&&(r.remove(),this.whenLayerView(e.layer).then(t,i))})}):this.whenLayerView(e.layer):null}enableFeatureTiles(){const e=Symbol();return this._featureTileTreeClients.add(e),l(()=>this._featureTileTreeClients.delete(e))}async _importModule(e,t){const i=new AbortController;this._importControllers.set(e,i),this._updatingChanged();try{const r=await Pt[e]();if(t&&(c(this),g(i.signal),await t(i.signal)),this.destroyed)throw m();return g(i.signal),r}catch{return null}finally{this._importControllers.delete(e),this._updatingChanged()}}_abortImport(e){this._importControllers.get(e)?.abort(),this._importControllers.delete(e),this._updatingChanged()}_initBasemapTerrain(){this._set("basemapTerrain",new et({view:this})),this.elevationProvider.register(0,this.basemapTerrain)}_exitBasemapTerrain(){const{basemapTerrain:e,elevationProvider:t}=this;e&&(this._set("basemapTerrain",null),t.unregister(e),e.destroy())}_initGlobe(){this._initCoordinateSystem(),this.state.createInitialCamera(),this._initBasemapTerrain(),this._set("pointsOfInterest",new Xe({view:this})),this.addHandles([this.updatingHandles.add(()=>Ue.FEATURE_TILE_TREE_SHOW_TILES,e=>{e&&!this._featureTreeDebugger?this.updatingHandles.addPromise(import("./3d/layers/support/FeatureTileTree3DDebugger.js")).then(({FeatureTileTree3DDebugger:e})=>{!this._featureTreeDebugger&&Ue.FEATURE_TILE_TREE_SHOW_TILES&&(this._featureTreeDebugger=new e({view:this}))}):e||(this._featureTreeDebugger=d(this._featureTreeDebugger))},M),this.updatingHandles.add(()=>({basemapExtent:this.groundView?.groundExtent,basemapSpatialReference:this.groundView?.spatialReference,clippingArea:this.clippingArea,featureTiles:this._featureTiles}),({basemapExtent:e,basemapSpatialReference:t,clippingArea:i,featureTiles:r})=>{if(!r)return;const s=!!e;if(i||s)if(s&&t){const s=e&&t?k($(e,t),this.spatialReference):null;r.filterExtent=i?i.intersection(s):s}else r.filterExtent=i;else r.filterExtent=null},M),this.updatingHandles.add(()=>this._featureTileTreeClients.size>0,e=>{e?this.updatingHandles.consumePromise(this._ensureFeatureTileTree()):this._featureTiles=d(this._featureTiles)},_)],Tt),this.stateManager.init()}async _ensureFeatureTileTree(){if(this._featureTiles||this._importControllers.has("FeatureTileTree3D"))return;const e=(await this.updatingHandles.addPromise(this._importModule("FeatureTileTree3D")))?.FeatureTileTree3D;e&&(this._featureTiles=new e({renderCoordsHelper:this.renderCoordsHelper,pointsOfInterest:this.pointsOfInterest,viewState:this.state,scheduler:this._resourceController.scheduler,terrain:this.basemapTerrain}),this._updatingChanged())}_exitTerrain(){this.stateManager.exit(),this.removeHandles(Rt),this.removeHandles(Tt),this._featureTiles=d(this.featureTiles),this._set("pointsOfInterest",d(this.pointsOfInterest)),this._exitBasemapTerrain(),this.state.reset(),this._exitCoordinateSystem()}_initCoordinateSystem(){if(this.spatialReference){const e=this.spatialReference,t=this.state.isGlobal,i=K(t,e);i!==this.renderSpatialReference&&(this._set("renderCoordsHelper",Qe.create(this.state.viewingMode,i)),t||this.addHandles(w(()=>this.groundView?.groundExtent,e=>{const t=this.renderCoordsHelper.spatialReference;null==e||0===e[0]&&0===e[1]&&0===e[2]&&0===e[3]||!Q(e,this.groundView.spatialReference,It,t)||(this.renderCoordsHelper.extent=It)},_),Rt),this.sceneIntersectionHelper&&this.sceneIntersectionHelper.setTolerance(pt/this.renderCoordsHelper.unitInMeters))}else this._set("renderCoordsHelper",null)}_exitCoordinateSystem(){this.removeHandles(Rt),this._set("renderCoordsHelper",null)}_updatingChanged(){this.notifyChange("updating")}_updateUpdatingMonitors(e=null){null!=e&&4===e.type||(this.removeHandles("updatingMonitors"),this.allLayerViews.forEach(e=>{e.destroyed||(this.addHandles(w(()=>[e.updating,e.updatingProgress],()=>this._updatingChanged(),_),"updatingMonitors"),e.when(()=>this._updatingChanged(),()=>this._updatingChanged()))}),this._updatingChanged())}async _prepareScreenshotOverlay(){this.overlay&&await this.overlay.prepare()}_renderScreenshotOverlay(e,t,i){if(!this.overlay||!this.overlay.hasVisibleItems)return i;const r=e.getContext("2d",{willReadFrequently:!0});return r.putImageData(i,0,0),this.overlay.renderCanvas(e,{disableDecorations:t}),r.getImageData(0,0,i.width,i.height)}_initStage(){const e={deactivatedWebGLExtensions:this.deactivatedWebGLExtensions,debugWebGLExtensions:this.debugWebGLExtensions,alpha:this.alphaCompositingEnabled,preserveDrawingBuffer:this.preserveDrawingBufferEnabled,canvas:this.renderCanvas,screenshot:{prepareOverlay:()=>this._prepareScreenshotOverlay(),renderOverlay:(e,t,i)=>this._renderScreenshotOverlay(e,t,i)}},t=new He(this.state.viewingMode,e=>this.stage.layers.forEach(e),this);this._set("sceneIntersectionHelper",t);const i=s(this.surface);this._stage=new at({view:this,options:e,container:i}),this.notifyChange("stage"),this._updateSlice(),this.addHandles([this.on("pointer-move",()=>this.stage?.renderer.resetAnimation()),a(this.stage.renderView.canvas,"webglcontextlost",e=>{this.fatalError=new n("webgl-context-lost",e.statusMessage||"WebGL context lost")})],"stage"),this.renderCoordsHelper&&this.sceneIntersectionHelper.setTolerance(pt/this.renderCoordsHelper.unitInMeters),this._set("canvas",this.stage.renderView.canvas)}_exitStage(){this.sceneIntersectionHelper?.destroy(),this._set("sceneIntersectionHelper",null),this._stage=d(this.stage),this._set("stage",null),this.removeHandles("stage"),this._set("canvas",null)}_initSurface(){this._exitSurface(),this._initStage(),this._initGlobe(),this.sharedSymbolResources=new Je({view:this,resourceController:this._resourceController})}_exitSurface(){this.sharedSymbolResources&&(this.sharedSymbolResources.objectResourceCache.destroy(),this.sharedSymbolResources.destroy(),this.sharedSymbolResources=null,this._exitTerrain(),this._exitStage())}async _ensureGraphicsView(){if(this.graphicsView||this._importControllers.has("GraphicsView3D")||0===this.graphics.length)return;this.removeHandles("GraphicsView3D");const e=(await this.updatingHandles.addPromise(this._importModule("GraphicsView3D",e=>b(()=>this.groundView?.ready,e))))?.default;e&&this._set("graphicsView",new e({view:this,getGraphics:()=>this.graphics})),this._updatingChanged()}_disposeGraphicsView(){this._abortImport("GraphicsView3D"),this.removeHandles("GraphicsView3D"),this.graphicsView&&(this.removeHandles(this.graphicsView.processor.layer.id),this.graphicsView.destroy(),this._set("graphicsView",null))}_disposeFocusAreasView(){this._abortImport("FocusAreasView"),this.removeHandles("FocusAreasView"),this.focusAreasView=d(this.focusAreasView)}async _ensureFocusAreasView(e){if(this.focusAreasView||this._importControllers.has("FocusAreasView")||0===e)return;this.removeHandles("FocusAreasView");const t=(await this.updatingHandles.addPromise(this._importModule("FocusAreasView")))?.FocusAreasView;t&&(this.focusAreasView=new t({view:this})),this._updatingChanged()}_startup(){1===fe(this.viewingMode)&&(this._clippingArea=null),this._initSurface(),this._set("ready",!0),this.addHandles(f(()=>this.graphics,"after-changes",()=>this._ensureGraphicsView()),"GraphicsView3D"),this._ensureGraphicsView(),this.addHandles(this.updatingHandles.add(()=>this.map?.focusAreas?.areas.length??0,e=>this._ensureFocusAreasView(e),{initial:!0}),"FocusAreasView");const e=this.scene?.initialViewProperties??null,t=e?.environment;t&&(this._overrideDefaultEnvironmentOnly?H(this.environment,t):this.environment=this.environment.cloneWithWebsceneEnvironment(t)),this.timeExtent=e?.timeExtent,e?.analyses.applyTo(this),this.labeler.setup(),this.environmentManager.connectView(this),this.inputManager.connect();const i=this._resolveWhenReady;this._resolveWhenReady=[],i.forEach(e=>e(this))}_teardown(){this.inputManager.disconnect(),this.environmentManager.disconnectView(),this._overrideDefaultEnvironmentOnly=!1,this.labeler.dispose(),this._disposeGraphicsView(),this._disposeFocusAreasView(),this._exitSurface(),this._set("ready",!1)}get _defaultToMapOptions(){const e={include:new Set};if(!this.map)return e;this.map.ground&&e.include.add(dt);for(const t of this.allLayerViews)(ae(t.layer)&&(!has("enable-feature:im-as-ground")||t.layer.isUsedAsGroundLayer)||oe(t.layer))&&e.include.add(t.uid);return e}get _defaultHitTestOptions(){const e={exclude:new Set};if(!this.map)return e;this.map.ground&&this.map.ground.opacity<1&&e.exclude.add(dt);for(const t of this.allLayerViews)(has("enable-feature:im-as-ground")?ae(t.layer)&&t.layer.isUsedAsGroundLayer:ae(t.layer))&&t.fullOpacity<1&&e.exclude.add(t.uid);return e}static{this.type="3d"}static clearStatics(){jt(),D(),T(),ut(),Le(),be(),Z(),mt(),pe(),nt(),ht(),Ie(),Pe(),U(),V(),lt(),st(),Re.cleanupI3SLodHandling(),le.cleanupTilemapCache(),Oe.cleanupViewstate(),et.cleanupTerrainSurface()}};function Ot(e,t){return null!=e&&B(e.spatialReference,t)?k(e,t):null}e([A({nonNullable:!0}),O(xt)],At.prototype,"options",void 0),e([A()],At.prototype,"_userClippingArea",void 0),e([A()],At.prototype,"_resourceController",void 0),e([A()],At.prototype,"stage",null),e([A({readOnly:!0})],At.prototype,"deconflictor",void 0),e([A({readOnly:!0})],At.prototype,"labeler",void 0),e([A()],At.prototype,"navigation",void 0),e([A({type:me,readOnly:!0})],At.prototype,"animation",null),e([A({readOnly:!0})],At.prototype,"basemapTerrain",void 0),e([A({readOnly:!0})],At.prototype,"overlayManager",null),e([A({readOnly:!0})],At.prototype,"elevationProvider",void 0),e([A()],At.prototype,"camera",null),e([A({type:t})],At.prototype,"contentCamera",null),e([A({readOnly:!0})],At.prototype,"canvas",null),e([A({type:q,useTypeForAutocast:!1})],At.prototype,"center",null),e([A({type:W})],At.prototype,"clippingArea",null),e([A({type:Me,nonNullable:!0})],At.prototype,"constraints",void 0),e([A({type:W,readOnly:!0})],At.prototype,"renderDataExtent",null),e([A({readOnly:!0})],At.prototype,"tileInfo",null),e([A({type:W,readOnly:!0})],At.prototype,"dataExtent",null),e([A({type:W,readOnly:!0})],At.prototype,"_groundAndLayersExtent",null),e([A({type:Se})],At.prototype,"environment",null),e([O("environment")],At.prototype,"castEnvironment",null),e([A({readOnly:!0})],At.prototype,"environmentManager",void 0),e([A({type:W})],At.prototype,"extent",null),e([A({type:r})],At.prototype,"floors",void 0),e([A()],At.prototype,"screenCenter",null),e([A()],At.prototype,"frustum",null),e([A({type:Number,readOnly:!0})],At.prototype,"fullOpacity",void 0),e([A({readOnly:!0})],At.prototype,"graphicsView",void 0),e([A()],At.prototype,"analysisViewManager",void 0),e([A()],At.prototype,"groundView",void 0),e([A({readOnly:!0})],At.prototype,"layerviewCollections",null),e([A({type:Boolean})],At.prototype,"initialExtentRequired",null),e([A()],At.prototype,"defaultsFromMapSettings",null),e([A()],At.prototype,"interacting",null),e([A()],At.prototype,"stationary",null),e([A()],At.prototype,"navigating",null),e([A()],At.prototype,"map",void 0),e([A()],At.prototype,"padding",null),e([A({type:Xe,readOnly:!0})],At.prototype,"pointsOfInterest",void 0),e([A()],At.prototype,"_featureTiles",void 0),e([A()],At.prototype,"featureTiles",null),e([A()],At.prototype,"_featureTreeDebugger",void 0),e([A({constructOnly:!0})],At.prototype,"deactivatedWebGLExtensions",void 0),e([A({constructOnly:!0})],At.prototype,"debugWebGLExtensions",void 0),e([A({constructOnly:!0})],At.prototype,"renderCanvas",void 0),e([A({constructOnly:!0})],At.prototype,"state",void 0),e([A()],At.prototype,"screenSizePerspective",void 0),e([A({readOnly:!0})],At.prototype,"inputManager",void 0),e([A({readOnly:!0})],At.prototype,"stateManager",void 0),e([A({type:["low","medium","high"]})],At.prototype,"qualityProfile",null),e([A({type:Ze,get(){let e=this._get("qualitySettings");if(!e){const t=Ne(this.qualityProfile);e=new Ze(t)}return e}})],At.prototype,"qualitySettings",void 0),e([A()],At.prototype,"slice",void 0),e([A({readOnly:!0})],At.prototype,"typeSpecificPreconditionsReady",null),e([A({readOnly:!0})],At.prototype,"renderCoordsHelper",void 0),e([A({readOnly:!0})],At.prototype,"sceneIntersectionHelper",void 0),e([A({type:Number,readOnly:!0})],At.prototype,"resolution",null),e([A({type:Number})],At.prototype,"scale",null),e([A({readOnly:!0,type:Number})],At.prototype,"terrainLevel",null),e([A()],At.prototype,"heightModelInfo",null),e([A({type:N})],At.prototype,"spatialReference",void 0),e([A({type:Boolean,value:!1})],At.prototype,"alphaCompositingEnabled",null),e([A({constructOnly:!0})],At.prototype,"preserveDrawingBufferEnabled",void 0),e([A({type:Boolean})],At.prototype,"supersampleScreenshotsEnabled",void 0),e([A({readOnly:!0})],At.prototype,"type",void 0),e([A(),O(e=>e instanceof Mt?e:I(St,e))],At.prototype,"ui",void 0),e([A({type:Boolean,readOnly:!0})],At.prototype,"updating",null),e([A()],At.prototype,"_updatingObjects",null),e([A()],At.prototype,"_updatingObjectsWithProgress",null),e([A()],At.prototype,"_updatingObjectsToDebug",null),e([A({type:Number,readOnly:!0})],At.prototype,"updatingProgress",void 0),e([A({type:["global","local"]})],At.prototype,"viewingMode",null),e([A({type:i})],At.prototype,"viewpoint",null),e([A({readOnly:!0})],At.prototype,"visibleArea",null),e([A({type:Number})],At.prototype,"zoom",null),e([A({readOnly:!0})],At.prototype,"quality",null),e([A({readOnly:!0})],At.prototype,"resolutionScale",null),e([A()],At.prototype,"focusAreasView",void 0),e([A()],At.prototype,"_defaultToMapOptions",null),e([A()],At.prototype,"_defaultHitTestOptions",null),At=Ct=e([E("esri.views.SceneView")],At);const Et=F(),Lt=C(),It=J(),Ht=ie(0,0,0,N.WebMercator),Pt={GraphicsView3D:()=>import("./3d/layers/GraphicsView3D.js"),FocusAreasView:()=>import("./3d/FocusAreasView.js"),FeatureTileTree3D:()=>import("./3d/layers/support/FeatureTileTree3D.js")},Dt=At;export{Dt as default};
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../Camera.js";import i from"../Viewpoint.js";import r from"../core/Collection.js";import{byId as s}from"../core/domUtils.js";import n from"../core/Error.js";import{on as a}from"../core/events.js";import{destroyHandle as o,makeHandle as l}from"../core/handleUtils.js";import has from"../core/has.js";import p from"../core/Logger.js";import{mapCollectionAsync as h}from"../core/mapCollectionUtils.js";import{destroyMaybe as d,maybeProperty as u}from"../core/maybe.js";import{throwIfDestroyed as c,throwIfAborted as g,createAbortError as m}from"../core/promiseUtils.js";import y from"../core/ReactiveSet.js";import{on as f,watch as w,initial as v,sync as _,whenOnce as b,syncAndInitial as M}from"../core/reactiveUtils.js";import{setFrameDuration as S,cleanupScheduling as V}from"../core/scheduling.js";import{createScreenPoint as j,createScreenPointArray as C}from"../core/screenUtils.js";import{cleanupWhereClauseCache as T}from"../core/sql.js";import{getDefaultVerticalUnitStringForSR as R,getMetersPerUnitForSR as x}from"../core/units.js";import{property as A,cast as O,subclass as E}from"../core/accessorSupport/decorators.js";import{ensureType as L,ensureClass as I}from"../core/accessorSupport/ensureType.js";import{overrideDefaultsFrom as H}from"../core/accessorSupport/overrideDefaultsFrom.js";import{runUntracked as P}from"../core/accessorSupport/tracking.js";import{drainNotificationQueue as D}from"../core/accessorSupport/trackingUtils.js";import{create as F}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{cleanupPooledRBush as U}from"../core/libs/rbush/PooledRBush.js";import{initialize as G}from"../core/workers/workers.js";import W from"../geometry/Extent.js";import z from"../geometry/HeightModelInfo.js";import q from"../geometry/Point.js";import{project as k,canProjectWithoutEngine as B}from"../geometry/projectionUtils.js";import N from"../geometry/SpatialReference.js";import{cleanupSpatialReferenceEllipsoidUtils as Z}from"../geometry/spatialReferenceEllipsoidUtils.js";import{projectBoundingRect as Q}from"../geometry/projection/projectBoundingRect.js";import{projectPointToVector as Y}from"../geometry/projection/projectPointToVector.js";import{toExtent as $,create as J}from"../geometry/support/aaBoundingRect.js";import{renderSRFromViewSR as K}from"../geometry/support/coordinateSystem.js";import{getResolutionForScale as X}from"../geometry/support/scaleUtils.js";import{wgs84 as ee,webMercator as te}from"../geometry/support/spatialReferenceUtils.js";import{makeDehydratedPoint as ie}from"../layers/graphics/dehydratedPoint.js";import{isImageryTileLayer as re,isTiledLayer as se,isVoxelLayer as ne,isIntegratedMeshLayer as ae,isGaussianSplatLayer as oe}from"../layers/support/layerUtils.js";import{TilemapCache as le}from"../layers/support/TilemapCache.js";import{clearDefaultPortalInstance as pe}from"../portal/portalDefault.js";import{WebSceneTag as he}from"../support/tagSymbols.js";import{BreakpointsOwner as de}from"./BreakpointsOwner.js";import{DOMContainer as ue}from"./DOMContainer.js";import{PopupView as ce}from"./PopupView.js";import ge from"./View.js";import me from"./ViewAnimation.js";import{stringFromViewingMode as ye,viewingModeFromString as fe}from"./ViewingMode.js";import{GroundView3D as we}from"./3d/GroundView3D.js";import{layerView3DImporter as ve}from"./3d/layerViewModuleImportUtils.js";import{importAnalysisViewModule as _e}from"./3d/analysis/analysisViewModuleImportUtils.js";import{cleanupIntersectionUtils as be}from"./3d/camera/intersectionUtils.js";import Me from"./3d/constraints/Constraints.js";import Se from"./3d/environment/Environment.js";import{EnvironmentManager as Ve}from"./3d/environment/EnvironmentManager.js";import je from"./3d/input/SceneInputManager.js";import{GraphicsDeconflictor as Ce}from"./3d/layers/graphics/GraphicsDeconflictor.js";import{Labeler as Te}from"./3d/layers/graphics/Labeler.js";import Re from"./3d/layers/i3s/I3SLodHandling.js";import{Navigation3D as xe}from"./3d/navigation/Navigation3D.js";import{ScreenSizePerspective as Ae}from"./3d/state/ScreenSizePerspective.js";import Oe from"./3d/state/ViewState.js";import{ViewStateManager as Ee,cleanupViewStateManager as Le}from"./3d/state/ViewStateManager.js";import{cleanupPointToPointAnimationController as Ie}from"./3d/state/controllers/PointToPointAnimationController.js";import{SceneIntersectionHelper as He}from"./3d/state/helpers/SceneIntersectionHelper.js";import{cleanupNavigationUtils as Pe}from"./3d/state/utils/navigationUtils.js";import De from"./3d/support/Attribution3D.js";import{CombinedElevationProvider as Fe}from"./3d/support/CombinedElevationProvider.js";import{debugFlags as Ue}from"./3d/support/debugFlags.js";import{getElevationAtPoint as Ge}from"./3d/support/ElevationProvider.js";import{GroundAndIMSurface as We}from"./3d/support/GroundAndIMSurface.js";import{toMap as ze,hitTest as qe}from"./3d/support/hitTest.js";import{popupHitTest as ke}from"./3d/support/popupHitTest.js";import{getDefaultQualityProfileName as Be,getQualityProfileSettings as Ne}from"./3d/support/QualityProfile.js";import Ze from"./3d/support/QualitySettings.js";import{RenderCoordsHelper as Qe}from"./3d/support/RenderCoordsHelper.js";import{newResourceController as Ye}from"./3d/support/ResourceController.js";import $e from"./3d/support/SceneViewPerformanceInfo.js";import{SharedSymbolResources as Je}from"./3d/support/SharedSymbolResources.js";import{ViewSlice as Ke}from"./3d/support/ViewSlice.js";import{PointsOfInterest as Xe}from"./3d/support/pointsOfInterest/PointsOfInterest.js";import et from"./3d/terrain/TerrainSurface.js";import{isSurfaceLayerView as tt,getTiledLayerInfo as it,checkIfTileInfoSupportedForView as rt}from"./3d/terrain/terrainUtils.js";import{clearTilePerLayerInfo as st}from"./3d/terrain/TilePerLayerInfo.js";import{cleanupTileRenderer as nt}from"./3d/terrain/TileRenderer.js";import{Stage as at}from"./3d/webgl-engine/Stage.js";import{olidEnabled as ot}from"./3d/webgl-engine/effects/geometry/olidUtils.js";import{cleanupRenderOccluded as lt}from"./3d/webgl-engine/effects/geometry/RenderOccluded.js";import{defaultTolerance as pt}from"./3d/webgl-engine/lib/Intersector.js";import{cleanupShadowmap as ht}from"./3d/webgl-engine/lib/ShadowMap.js";import{terrainId as dt}from"./3d/webgl-engine/lib/verticalOffsetUtils.js";import{cleanupEdgeProcessing as ut}from"./3d/webgl-engine/lib/edgeRendering/edgePreprocessing.js";import ct from"./interactive/options/ViewOptions.js";import gt from"./support/AnalysisViewManager.js";import{cleanupDrapedUtils as mt}from"./support/drapedUtils.js";import{occludeesSupported as yt}from"./support/layerViewUtils.js";import{isSupportedScreenPointEvent as ft,createScreenPointFromSupportedEvent as wt}from"./support/screenUtils.js";import{isSpatialReferenceSupported as vt}from"./support/spatialReferenceSupport.js";import{initializeTextureCompressionWorker as _t,destroyTextureCompressionWorker as bt}from"./support/TextureCompressionHelper.js";import Mt from"./ui/DefaultUI.js";import St from"./ui/3d/DefaultUI3D.js";import Vt from"../webscene/Environment.js";import{clearVNodeCache as jt}from"../widgets/support/vnodeCache.js";var Ct;const Tt=Symbol(),Rt=Symbol();function xt(e){const t=I(ct,e);return t!==e&&null==e.snapping?.enabled&&(t.snapping.enabled=!0),t}let At=class extends(de(ce(ue(ge)))){static{Ct=this}get timeZone(){return super.timeZone}set timeZone(e){super.timeZone=e}constructor(e){super(e),this.options=new ct({snapping:{enabled:!0}}),this._userClippingArea=null,this._clippingArea=null,this._overrideDefaultEnvironmentOnly=!0,this._resolveWhenReady=[],this._resourceController=Ye(this),this.deconflictor=new Ce({view:this}),this.attribution3D=new De({view:this}),this.labeler=new Te({view:this,deconflictor:this.deconflictor.labels}),this.sharedSymbolResources=null,this.navigation=new xe({view:this}),this.basemapTerrain=null,this.elevationProvider=new Fe({view:this}),this._canvas=null,this.constraints=new Me,this._environment=new Se,this.environmentManager=new Ve,this.floors=new r,this.fullOpacity=1,this.graphicsView=null,this.analysisViewManager=new gt({importAnalysisViewModule:e=>_e(e),view:this}),this.groundView=null,this.groundAndIMSurface=null,this.map=null,this._featureTileTreeClients=new y,this._featureTiles=null,this._featureTreeDebugger=null,this.state=new Oe({view:this}),this.slice=new Ke,this.spatialReference=null,this.preserveDrawingBufferEnabled=!1,this.supersampleScreenshotsEnabled=!0,this.type="3d",this.ui=new St,this._numUpdating=0,this._lastUpdateTime=0,this.updatingProgress=.5,this._importControllers=new Map,G();const t=()=>this._updatingChanged();this.addHandles(o(h(()=>this.map?.allLayers,async e=>{try{await e.when()}catch{}finally{t()}}))),this.addHandles([f(()=>this.map?.allLayers,"after-changes",t,{onListenerAdd:t,onListenerRemove:t,sync:!0}),this.allLayerViews.on("after-changes",e=>this._updateUpdatingMonitors(e)),w(()=>this.scene,e=>e?.load().catch(()=>{}))]),this.inputManager=new je({view:this}),this.stateManager=new Ee({view:this}),this.screenSizePerspective=new Ae({view:this})}initialize(){if(has("enable-feature:esri-compress-textures")&&has("wasm-simd")){const e=_t(this,this.resourceController);this.addResolvingPromise(e.promise)}this.groundView=new we({view:this}),this.groundAndIMSurface=new We({view:this}),this._updateUpdatingMonitors(),this.updatingHandles.add(()=>this.qualitySettings.memoryLimit,e=>{this.resourceController&&(this.resourceController.memoryController.maxMemory=e)},v),this.updatingHandles.add(()=>this.qualitySettings.additionalCacheMemory,e=>{this.resourceController&&(this.resourceController.memoryController.additionalCacheMemory=e)},v),this.updatingHandles.add(()=>this.qualitySettings.frameRate??0,e=>S(e>0?1e3/Math.ceil(e):0),v),this.addHandles([w(()=>this.spatialReference,()=>this.notifyChange("clippingArea"),_),w(()=>({plane:this.slice.plane,isDecoration:this.slice.isDecoration}),()=>this._updateSlice(),_)])}destroy(){this.destroyed||(bt(this),this.updatingHandles.removeAll(),this.basemapTerrain?.clearHandles(),this.elevationProvider.destroy(),this.ui.removeAllHandles(),this.layerViewManager.clearHandles(),this.invalidate(),this.layerViewManager.clear(),this._set("analysisViewManager",d(this.analysisViewManager)),this._exitSurface(),this._disposeGraphicsView(),this._disposeFocusAreasView(),this.sharedSymbolResources=d(this.sharedSymbolResources),this._set("labeler",d(this.labeler)),this._set("deconflictor",d(this.deconflictor)),this._resourceController=d(this._resourceController),this._set("stateManager",d(this.stateManager)),this._set("inputManager",d(this.inputManager)),this.state.destroy(),this.highlights.destroy(),this.removeHandles("updatingMonitors"),this._set("environmentManager",d(this.environmentManager)),this._set("environment",d(this.environment)),this.groundView=d(this.groundView),this.groundAndIMSurface.destroy(),this.slice.destroy(),this._updatingObjectsWithProgress.length=0,this._updatingObjects.length=0,this.ui?.destroy(),this._set("ui",null),this._set("renderCanvas",null),this._set("canvas",null),this._canvas=null,this.screenSizePerspective.destroy(),this.attribution3D.destroy())}get stage(){return this._stage}get renderSpatialReference(){return this.renderCoordsHelper?.spatialReference}get groundSpatialReference(){return this.groundView?.spatialReference}get analyses(){return super.analyses}set analyses(e){super.analyses=e}get animation(){return this.state?.animation}get overlayManager(){return this.basemapTerrain?.overlayManager}get camera(){return this.stateManager?.camera}set camera(e){this.stateManager&&(this.stateManager.camera=e)}get contentCamera(){return this.stateManager?.contentCamera}set contentCamera(e){this.stateManager&&(this.stateManager.contentCamera=e)}installContentCameraReset(e={sticky:!1}){return this.stateManager.installContentCameraReset(e)}get canvas(){return this._canvas}get center(){return this.stateManager?.center}set center(e){this.stateManager&&(this.stateManager.center=L(q,e))}get clippingArea(){if("global"===this.viewingMode)return null;const e=this.map;let t=this._userClippingArea||u(e,"clippingArea");return!this._userClippingArea&&!u(e,"clippingEnabled")||null==t?(this._clippingArea=null,null):t instanceof W?this.spatialReference&&(t=Ot(t,this.spatialReference),null==t)?(p.getLogger(this).error("#clippingArea","setting clippingArea with incompatible SpatialReference"),this._clippingArea):(t=t.clone(),null==t.intersection(this._groundAndLayersExtent)&&(t.xmin=t.xmax,t.ymin=t.ymax),t.zmin=void 0,t.zmax=void 0,t.equals(this._clippingArea)||(this._clippingArea=t),this._clippingArea):(p.getLogger(this).error("#clippingArea","only clippingArea geometries of type Extent are supported"),this._clippingArea)}set clippingArea(e){this.ready&&"global"===this.viewingMode&&null!=e?p.getLogger(this).error("#clippingArea=","Clipping area is only supported in local viewingMode"):this._userClippingArea=e}get renderDataExtent(){if(1===this.state.viewingMode)return null;const e=this.renderSpatialReference,t=this.dataExtent;return null==t||null==e||t.spatialReference.equals(e)?t:Ot(t,e)}get tileInfo(){return this.basemapTerrain?.tilingScheme?.toTileInfo()}get dataExtent(){let e=this._groundAndLayersExtent;const t=this.spatialReference||N.WGS84,i=Ot(this.clippingArea,t);null!=i&&(e=null!=e?e.intersection(i):i);const r=this._get("dataExtent");return null!=e&&e.equals(r)?r:e}get _groundAndLayersExtent(){const e=this.spatialReference||N.WGS84;let t;const i=i=>{const r=Ot(i,e);null!=r&&(null!=t?t.union(r):t=r.clone())},{groundView:r}=this,s=r?.spatialReference,n=r?.fullGroundExtent;s&&n&&i(new W({xmin:n[0],ymin:n[1],zmin:0,xmax:n[2],ymax:n[3],zmax:0,spatialReference:s}));const a=e=>{null==e.fullExtent||"graphics"===e.type&&e.internal||i(e.fullExtent)};if(this.map?.allLayers.forEach(e=>a(e)),null==t)return null;t.hasZ?(t.zmin=Math.min(0,t.zmin??0),t.zmax=Math.max(0,t.zmax??0)):(t.zmin=0,t.zmax=0);const o=this._get("_groundAndLayersExtent");return t.equals(o)?o:t}get environment(){return this._environment}set environment(e){if(this._environment===e)return;const{_environment:t}=this;this._environment=null,t?.destroy(),this._environment=e,this.notifyChange("environment")}castEnvironment(e){return e?e instanceof Se?e:e instanceof Vt?this.environment?.cloneWithWebsceneEnvironment(e)??Se.fromWebsceneEnvironment(e):L(Se,e):new Se}get extent(){return this.stateManager?.extent}set extent(e){this.stateManager&&(this.stateManager.extent=e)}get screenCenter(){return this.stateManager?.screenCenter}get frustum(){return this.stateManager?.frustum}get layerviewCollections(){return[this.basemapView?.baseLayerViews,this.basemapView?.groundLayerViews,this.groundView?.layerViews,this.layerViews,this.basemapView?.referenceLayerViews]}get _layerToLayerviewMapping(){return Ct._layerToLayerview}static{this._layerToLayerview=ge._layerToLayerview.concat([["view.map.ground.layers","view.groundView.layerViews"]])}get initialExtentRequired(){return this.stateManager&&!this.stateManager.hasInitialView}get defaultsFromMapSettings(){return{required:{tileInfo:!1,heightModelInfo:!0,extent:!1}}}get interacting(){return this.navigating||(this.toolViewManager?.interacting??!1)}get stationary(){return!this.animation&&!this.resizing&&(this.state?.stationary??!0)}get navigating(){return this.state?.navigating??!1}get scene(){return this.map&&he in this.map?this.map:null}get padding(){return this.stateManager?.padding}set padding(e){this.stateManager&&(this.stateManager.padding=e)}get featureTiles(){return this._featureTiles}set qualityProfile(e){const t=Ne(e);t&&this._get("qualityProfile")!==e&&(this.qualitySettings=new Ze(t),this.stage?.renderView.updateQualitySettings(this.qualitySettings),this._set("qualityProfile",e))}get qualityProfile(){return this._get("qualityProfile")||Be()}_updateSlice(){null!=this.stage&&(this.stage.renderer.slice=this.slice)}get typeSpecificPreconditionsReady(){return!!this.viewingMode&&!!this.stateManager?.preinit(this.spatialReference)}get resolution(){const{scale:e,spatialReference:t}=this;return t?P(()=>X(e,t)):0}get scale(){return this.stateManager?.scale}set scale(e){this.stateManager&&(this.stateManager.scale=e)}get terrainLevel(){const e=this.basemapTerrain?.tilingScheme,t=this.scale;if(!e||!t)return null;const i=e.levelAtScale(t)+this.qualitySettings.tiledSurface.lodBias,r=e.getMaxLod();return i<=0?null:Math.max(0,Math.min(i,r||1/0))}get heightModelInfo(){const e=this.getDefaultHeightModelInfo();if(!e)return null;const t=R(this.spatialReference);if(t&&e.heightUnit!==t)return new z({heightModel:e.heightModel,heightUnit:t,vertCRS:e.vertCRS,associatedSpatialReference:e.associatedSpatialReference});if(!e.associatedSpatialReference){const t=e.clone();return t.associatedSpatialReference=this.spatialReference,t}return e}get alphaCompositingEnabled(){return this._get("alphaCompositingEnabled")}set alphaCompositingEnabled(e){this._stage&&p.getLogger(this).warn("alphaCompositingEnabled cannot be changed after the view has become ready"),this._set("alphaCompositingEnabled",e)}get updating(){if(this.destroying||this.destroyed)return!1;if(!this.initialized)return!0;let e=0,t=this.layerViewManager.updating,i=t?this.layerViewManager.updatingRemaining:0;this.allLayerViews.forEach(r=>{if(r.isFulfilled()){if(r.updating){if(t=!0,r.suspended||tt(r))return;++i,e+=r.updatingProgress}}else++i});const r=.1;for(const n of this._updatingObjects)n?.updating&&(i+=r,e+=.5*r);for(const n of this._updatingObjectsWithProgress)n?.updating&&(++i,e+=n.updatingProgress);const s=!this.stateManager.test.updatingIgnoreRenderState&&this.state.updating;if(t=!!(t||i>0||this.updatingHandles.updating||!this.ready||!this.stationary||s||this._importControllers.size>0||this.inputManager?.updating||this.map?.allLayers?.some(e=>!e.isFulfilled())),t?(this._numUpdating=Math.max(i,this._numUpdating),e+=this._numUpdating-i):this._numUpdating=0,this._numUpdating>0?e/=this._numUpdating:e=t?0:1,this._get("updatingProgress")!==e){const i=performance.now();if(e<1){const t=Math.min((i-this._lastUpdateTime)/2e3,1);e=this.updatingProgress*(1-t)+e*t}this._set("updatingProgress",e),this._lastUpdateTime=t&&e<1?i:0}return Ue.UPDATING&&console.log("Updating:",this._updatingObjectsToDebug.filter(e=>null!=e&&e.updating).map(({declaredClass:e})=>e)),t}get _updatingObjects(){return[this.graphicsView,this.basemapView,this._resourceController,this.stage,this.featureTiles,this.pointsOfInterest,this.environmentManager,this.overlay,this._featureTreeDebugger,this.toolViewManager,this.analysisViewManager,this.focusAreasView]}get _updatingObjectsWithProgress(){return[this.deconflictor,this.labeler,this.basemapTerrain]}get _updatingObjectsToDebug(){return Ue.UPDATING?this._updatingObjects.concat(this._updatingObjectsWithProgress).concat(this.allLayerViews.toArray()):[]}get viewingMode(){const e=this._predeterminedViewingMode;if(null!=e)return ye(e);const t=this.spatialReference;return t?null!=this.defaultsFromMap?.viewingMode&&t.equals(this.defaultsFromMap.spatialReference)?ye(this.defaultsFromMap.viewingMode):vt(t,1)?"global":"local":"global"}set viewingMode(e){this.ready?p.getLogger(this).error("#viewingMode","viewingMode cannot be set once view is ready"):this._overrideIfSome("viewingMode",e)}get viewpoint(){return this.stateManager?.viewpoint}set viewpoint(e){this.stateManager&&(this.stateManager.viewpoint=e)}get visibleArea(){return this.stateManager?.visibleArea}get zoom(){return this.stateManager.zoom}set zoom(e){this.stateManager&&(this.stateManager.zoom=e)}get resourceController(){return this._resourceController}get quality(){return this._resourceController?.memoryController?.memoryFactor??1}get resolutionScale(){return Math.sqrt(Math.min(1,this.quality/.75))}get performanceInfo(){return new $e(this)}on(e,t,i,r){const s=this.viewEvents.on(e,t,i,r);return s||super.on(e,t)}hasEventListener(e){return super.hasEventListener(e)||this.viewEvents.hasHandler(e)}toMap(e,t){if(!this.ready)return p.getLogger(this).error("#toMap()","Scene view cannot be used before it is ready"),null;const i=ft(e)?wt(this,e):e;return ze(this,i,t,this._defaultToMapOptions)}toScreen(e){if(!this.ready)return p.getLogger(this).error("#toScreen()","Scene view cannot be used before it is ready"),null;let t=e;return null==e.z&&(t=Ht,t.x=e.x,t.y=e.y,t.z=Ge(this.elevationProvider,e)??0,t.spatialReference=e.spatialReference),Y(t,Et,this.renderSpatialReference),this.state.camera.projectToScreen(Et,Lt),j(Lt[0],Lt[1])}pixelSizeAt(e,t){if(!this.ready)return p.getLogger(this).error("#pixelSizeAt()","Scene view cannot be used before it is ready"),null;if(!e)return 0;const i=this.renderSpatialReference;Y(e,Et,i);const r=this.state.camera.computeScreenPixelSizeAt(Et);return t&&i!==t?r*x(i)/x(t):r}overlayPixelSizeInMapUnits(e){return this.overlayManager?.overlayPixelSizeInMapUnits(e,()=>this.pixelSizeAt(e))??1}hitTest(e,t){if(!this.ready)return p.getLogger(this).error("#hitTest()","Scene view cannot be used before it is ready"),null;const i=ft(e)?wt(this,e):e;return qe(this,i,t,this._defaultHitTestOptions)}async popupHitTest(e){return ke(this,e)}goTo(e,t){return this.updatingHandles.addPromise(this.stateManager.goTo(e,t))}async zoomIn(){if(this.canZoomIn)return this.navigation.zoom(!0)}async zoomOut(){if(this.canZoomOut)return this.navigation.zoom(!1)}async whenAnalysisView(e){if(null==e.parent)throw new n("view:no-analysisview-for-analysis","The analysis does not exist in view.analyses",{analysis:e});switch(e.parent.type){case"line-of-sight":case"dimension":case"viewshed":return(await this.whenLayerView(e.parent)).whenAnalysisView();default:return this.analysisViewManager.whenAnalysisView(e)}}whenLayerView(e){return super.whenLayerView(e)}async takeScreenshot(e){const t=await this._completeSettings(e);await this.whenReady();const i=(await this.stage.renderView.takeScreenshot(t))[0];return(await(import("./support/screenshotUtils.js"))).encode(i,t,this._pixelFormat())}async _takeScreenshot(e){const t=await this._completeSettings(e);await this.whenReady();const i=(await this.stage.renderView.takeScreenshot(t))[0];return(await(import("./support/screenshotUtils.js"))).encodeData(i,this._pixelFormat())}async _takeScreenshotWithObjectAndLayerId(e){const t=await this._completeSettings(e);t.olidColor=!0,await this.whenReady();const i=await this.stage.renderView.takeScreenshot(t),{encodeData:r}=await(import("./support/screenshotUtils.js"));return[r(i[0],this._pixelFormat()),r(i[1],this._pixelFormat())]}async _completeSettings(e){const{toRenderSettings:t,screenshotSuperSampleSettings:i}=await(import("./support/screenshotUtils.js")),r=t(e,this);return r.pixelRatio/=this.state.pixelRatio,i(r,this.supersampleScreenshotsEnabled,this.padding)}_pixelFormat(){return{flipY:!0,premultipliedAlpha:this.stage?.renderView.getAlpha()??!1}}get test(){}async takeScreenshotWithObjectAndLayerId(e){if(!ot())throw new n("360vr:objectAndLayerId-rendering-disabled","has enable-feature:objectAndLayerId-rendering must be true");const{encode:t}=await(import("./support/screenshotUtils.js")),i=await this._completeSettings(e);i.olidColor=!0,await this.whenReady();const r=await this.stage.renderView.takeScreenshot(i),s=t(r[0],i,this._pixelFormat()),a=await this._completeSettings(e);a.format="png";return[s,t(r[1],a,this._pixelFormat())]}getColorToObjectAndLayerIdMapping(){const e=this.stage.renderView.olidRenderHelper;if(e)return e.getColorToObjectAndLayerIdMapping();throw new n("360vr:objectAndLayerId-rendering-disabled","has enable-feature:objectAndLayerId-rendering must be true")}addUpdatingPromise(e){return this.updatingHandles.addPromise(e)}getAttributionItems(){return super.getAttributionItems().concat(this.attribution3D.attributionItems)}importLayerView(e){return ve.importLayerView(e)}hasLayerViewModule(e){return ve.hasLayerViewModule(e)}forceDOMReadyCycle(){this.forceReadyCycle()}getWebDocumentSpatialReference(){return this.scene?.initialViewProperties?.spatialReference}getDefaultTimeZone(){return this.scene?.initialViewProperties?.timeZone??null}getSurface(){return this.surface}get _predeterminedViewingMode(){const e=this._isOverridden("viewingMode")?this._get("viewingMode"):this.scene?.initialViewProperties?.viewingMode;return null!=e?fe(e):null}getSpatialReferenceSupport(e,t){const i=this._predeterminedViewingMode,r=r=>this._validateSpatialReferenceForViewingMode(e,t,r)?this._makeSpatialReferenceConstraints(e,t,r,i):null,s=i?r(i):[...r(1)??[],...r(2)??[]];return s?.length?{constraints:s}:null}_validateSpatialReferenceForViewingMode(e,t,i){return!!vt(e,i)&&(null==t||(!!re(t)||(!se(t)||null!=it(t,e,i))&&(!ne(t)||1!==i)))}_makeSpatialReferenceConstraints(e,t,i,r){if(null==t)return[{spatialReference:e,viewingMode:i}];const{isWebMercator:s,isWGS84:n,vcsWkid:a,latestVcsWkid:o}=e,l=()=>null==a?s?N.WGS84:N.WebMercator:new N({...s?ee:te,vcsWkid:a,latestVcsWkid:o});if(re(t)&&(s||n)){return!n||2===r||null===rt(t.tileInfo,t.fullExtent,e,1)?[{spatialReference:e,viewingMode:i},{spatialReference:l(),viewingMode:i}]:[{spatialReference:l(),viewingMode:i}]}return se(t)||ne(t)||!s&&!n?se(t)&&s&&1!==i?[{spatialReference:e,viewingMode:i},{spatialReference:l(),viewingMode:2}]:[{spatialReference:e,viewingMode:i}]:[{spatialReference:e,viewingMode:i},{spatialReference:l(),viewingMode:i}]}_validateSpatialReference(e){const t=null!=this.getSpatialReferenceSupport(e),i=this._predeterminedViewingMode;return t||(null!=i?p.getLogger(this).warnOnce(`Spatial reference defined on view not supported in ${ye(i)} viewing mode.`):e.isGeographic&&p.getLogger(this).warnOnce("Spatial reference is geographic but not supported.")),t}whenReady(){return new Promise(e=>{this.ready?e(this):this._resolveWhenReady.push(e)})}trackGraphicState(e){if(!e.graphic)return p.getLogger(this).error("trackGraphicState","GraphicState.graphic must not be null or undefined to start tracking"),null;const t=this.getViewForGraphic(e.graphic);let i=null,r=!1;const s=t=>{!r&&null!=t&&"processor"in t&&"graphics-3d"===t.processor?.type&&t.processor.graphicsCore&&(i=t.processor.graphicsCore.trackGraphicState(e))};return null!=t?s(t):this.whenViewForGraphic(e.graphic,{waitForLayer:!0}).then(e=>s(e),()=>{}).catch(()=>{}),l(()=>{r=!0,null!=i&&(i.remove(),i=null)})}maskOccludee(e){if(!e)return p.getLogger(this).error("maskOccludee","GraphicState.graphic must not be null or undefined to mask an occludee"),null;const t=this.getViewForGraphic(e);let i=null,r=!1;const s=t=>{!r&&null!=t&&yt(t)&&(i=t.maskOccludee(e))};return null!=t?s(t):this.whenViewForGraphic(e,{waitForLayer:!0}).then(e=>s(e),()=>{}).catch(()=>{}),l(()=>{r=!0,null!=i&&(i.remove(),i=null)})}getViewForGraphic(e){return e.layer===this?this.graphicsView:e.layer?this.allLayerViews.filter(e=>"media-3d"!==e.type).find(t=>t.layer===e.layer):null}graphicChanged(e){null!=this.graphicsView&&this.graphicsView.graphicChanged(e)}async whenViewForGraphic(e,t){return e.layer===this?(await b(()=>this.graphicsView),this.graphicsView):e.layer&&this.map?t&&t.waitForLayer&&!this.map.allLayers.includes(e.layer)?new Promise((t,i)=>{const r=this.map.allLayers.on("change",s=>{s.added.includes(e.layer)&&(r.remove(),this.whenLayerView(e.layer).then(t,i))})}):this.whenLayerView(e.layer):null}enableFeatureTiles(){const e=Symbol();return this._featureTileTreeClients.add(e),l(()=>this._featureTileTreeClients.delete(e))}async _importModule(e,t){const i=new AbortController;this._importControllers.set(e,i),this._updatingChanged();try{const r=await Pt[e]();if(t&&(c(this),g(i.signal),await t(i.signal)),this.destroyed)throw m();return g(i.signal),r}catch{return null}finally{this._importControllers.delete(e),this._updatingChanged()}}_abortImport(e){this._importControllers.get(e)?.abort(),this._importControllers.delete(e),this._updatingChanged()}_initBasemapTerrain(){this._set("basemapTerrain",new et({view:this})),this.elevationProvider.register(0,this.basemapTerrain)}_exitBasemapTerrain(){const{basemapTerrain:e,elevationProvider:t}=this;e&&(this._set("basemapTerrain",null),t.unregister(e),e.destroy())}_initGlobe(){this._initCoordinateSystem(),this.state.createInitialCamera(),this._initBasemapTerrain(),this._set("pointsOfInterest",new Xe({view:this})),this.addHandles([this.updatingHandles.add(()=>Ue.FEATURE_TILE_TREE_SHOW_TILES,e=>{e&&!this._featureTreeDebugger?this.updatingHandles.addPromise(import("./3d/layers/support/FeatureTileTree3DDebugger.js")).then(({FeatureTileTree3DDebugger:e})=>{!this._featureTreeDebugger&&Ue.FEATURE_TILE_TREE_SHOW_TILES&&(this._featureTreeDebugger=new e({view:this}))}):e||(this._featureTreeDebugger=d(this._featureTreeDebugger))},M),this.updatingHandles.add(()=>({basemapExtent:this.groundView?.groundExtent,basemapSpatialReference:this.groundView?.spatialReference,clippingArea:this.clippingArea,featureTiles:this._featureTiles}),({basemapExtent:e,basemapSpatialReference:t,clippingArea:i,featureTiles:r})=>{if(!r)return;const s=!!e;if(i||s)if(s&&t){const s=e&&t?k($(e,t),this.spatialReference):null;r.filterExtent=i?i.intersection(s):s}else r.filterExtent=i;else r.filterExtent=null},M),this.updatingHandles.add(()=>this._featureTileTreeClients.size>0,e=>{e?this.updatingHandles.consumePromise(this._ensureFeatureTileTree()):this._featureTiles=d(this._featureTiles)},_)],Tt),this.stateManager.init()}async _ensureFeatureTileTree(){if(this._featureTiles||this._importControllers.has("FeatureTileTree3D"))return;const e=(await this.updatingHandles.addPromise(this._importModule("FeatureTileTree3D")))?.FeatureTileTree3D;e&&(this._featureTiles=new e({renderCoordsHelper:this.renderCoordsHelper,pointsOfInterest:this.pointsOfInterest,viewState:this.state,scheduler:this._resourceController.scheduler,terrain:this.basemapTerrain}),this._updatingChanged())}_exitTerrain(){this.stateManager.exit(),this.removeHandles(Rt),this.removeHandles(Tt),this._featureTiles=d(this.featureTiles),this._set("pointsOfInterest",d(this.pointsOfInterest)),this._exitBasemapTerrain(),this.state.reset(),this._exitCoordinateSystem()}_initCoordinateSystem(){if(this.spatialReference){const e=this.spatialReference,t=this.state.isGlobal,i=K(t,e);i!==this.renderSpatialReference&&(this._set("renderCoordsHelper",Qe.create(this.state.viewingMode,i)),t||this.addHandles(w(()=>this.groundView?.groundExtent,e=>{const t=this.renderCoordsHelper.spatialReference;null==e||0===e[0]&&0===e[1]&&0===e[2]&&0===e[3]||!Q(e,this.groundView.spatialReference,It,t)||(this.renderCoordsHelper.extent=It)},_),Rt),this.sceneIntersectionHelper&&this.sceneIntersectionHelper.setTolerance(pt/this.renderCoordsHelper.unitInMeters))}else this._set("renderCoordsHelper",null)}_exitCoordinateSystem(){this.removeHandles(Rt),this._set("renderCoordsHelper",null)}_updatingChanged(){this.notifyChange("updating")}_updateUpdatingMonitors(e=null){null!=e&&4===e.type||(this.removeHandles("updatingMonitors"),this.allLayerViews.forEach(e=>{e.destroyed||(this.addHandles(w(()=>[e.updating,e.updatingProgress],()=>this._updatingChanged(),_),"updatingMonitors"),e.when(()=>this._updatingChanged(),()=>this._updatingChanged()))}),this._updatingChanged())}async _prepareScreenshotOverlay(){this.overlay&&await this.overlay.prepare()}_renderScreenshotOverlay(e,t,i){if(!this.overlay||!this.overlay.hasVisibleItems)return i;const r=e.getContext("2d",{willReadFrequently:!0});return r.putImageData(i,0,0),this.overlay.renderCanvas(e,{disableDecorations:t}),r.getImageData(0,0,i.width,i.height)}_initStage(){const e={deactivatedWebGLExtensions:this.deactivatedWebGLExtensions,debugWebGLExtensions:this.debugWebGLExtensions,alpha:this.alphaCompositingEnabled,preserveDrawingBuffer:this.preserveDrawingBufferEnabled,canvas:this.renderCanvas,screenshot:{prepareOverlay:()=>this._prepareScreenshotOverlay(),renderOverlay:(e,t,i)=>this._renderScreenshotOverlay(e,t,i)}},t=new He(this.state.viewingMode,e=>this.stage.layers.forEach(e),this);this._set("sceneIntersectionHelper",t);const i=s(this.surface);this._stage=new at({view:this,options:e,container:i}),this.notifyChange("stage"),this._updateSlice(),this.addHandles([this.on("pointer-move",()=>this.stage?.renderer.resetAnimation()),a(this.stage.renderView.canvas,"webglcontextlost",e=>{this.fatalError=new n("webgl-context-lost",e.statusMessage||"WebGL context lost")})],"stage"),this.renderCoordsHelper&&this.sceneIntersectionHelper.setTolerance(pt/this.renderCoordsHelper.unitInMeters),this._set("canvas",this.stage.renderView.canvas)}_exitStage(){this.sceneIntersectionHelper?.destroy(),this._set("sceneIntersectionHelper",null),this._stage=d(this.stage),this._set("stage",null),this.removeHandles("stage"),this._set("canvas",null)}_initSurface(){this._exitSurface(),this._initStage(),this._initGlobe(),this.sharedSymbolResources=new Je({view:this,resourceController:this._resourceController})}_exitSurface(){this.sharedSymbolResources&&(this.sharedSymbolResources.objectResourceCache.destroy(),this.sharedSymbolResources.destroy(),this.sharedSymbolResources=null,this._exitTerrain(),this._exitStage())}async _ensureGraphicsView(){if(this.graphicsView||this._importControllers.has("GraphicsView3D")||0===this.graphics.length)return;this.removeHandles("GraphicsView3D");const e=(await this.updatingHandles.addPromise(this._importModule("GraphicsView3D",e=>b(()=>this.groundView?.ready,e))))?.default;e&&this._set("graphicsView",new e({view:this,getGraphics:()=>this.graphics})),this._updatingChanged()}_disposeGraphicsView(){this._abortImport("GraphicsView3D"),this.removeHandles("GraphicsView3D"),this.graphicsView&&(this.removeHandles(this.graphicsView.processor.layer.id),this.graphicsView.destroy(),this._set("graphicsView",null))}_disposeFocusAreasView(){this._abortImport("FocusAreasView"),this.removeHandles("FocusAreasView"),this.focusAreasView=d(this.focusAreasView)}async _ensureFocusAreasView(e){if(this.focusAreasView||this._importControllers.has("FocusAreasView")||0===e)return;this.removeHandles("FocusAreasView");const t=(await this.updatingHandles.addPromise(this._importModule("FocusAreasView")))?.FocusAreasView;t&&(this.focusAreasView=new t({view:this})),this._updatingChanged()}_startup(){1===fe(this.viewingMode)&&(this._clippingArea=null),this._initSurface(),this._set("ready",!0),this.addHandles(f(()=>this.graphics,"after-changes",()=>this._ensureGraphicsView()),"GraphicsView3D"),this._ensureGraphicsView(),this.addHandles(this.updatingHandles.add(()=>this.map?.focusAreas?.areas.length??0,e=>this._ensureFocusAreasView(e),{initial:!0}),"FocusAreasView");const e=this.scene?.initialViewProperties??null,t=e?.environment;t&&(this._overrideDefaultEnvironmentOnly?H(this.environment,t):this.environment=this.environment.cloneWithWebsceneEnvironment(t)),this.timeExtent=e?.timeExtent,e?.analyses.applyTo(this),this.labeler.setup(),this.environmentManager.connectView(this),this.inputManager.connect();const i=this._resolveWhenReady;this._resolveWhenReady=[],i.forEach(e=>e(this))}_teardown(){this.inputManager.disconnect(),this.environmentManager.disconnectView(),this._overrideDefaultEnvironmentOnly=!1,this.labeler.dispose(),this._disposeGraphicsView(),this._disposeFocusAreasView(),this._exitSurface(),this._set("ready",!1)}get _defaultToMapOptions(){const e={include:new Set};if(!this.map)return e;this.map.ground&&e.include.add(dt);for(const t of this.allLayerViews)(ae(t.layer)&&(!has("enable-feature:im-as-ground")||t.layer.isUsedAsGroundLayer)||oe(t.layer))&&e.include.add(t.uid);return e}get _defaultHitTestOptions(){const e={exclude:new Set};if(!this.map)return e;this.map.ground&&this.map.ground.opacity<1&&e.exclude.add(dt);for(const t of this.allLayerViews)(has("enable-feature:im-as-ground")?ae(t.layer)&&t.layer.isUsedAsGroundLayer:ae(t.layer))&&t.fullOpacity<1&&e.exclude.add(t.uid);return e}static{this.type="3d"}static clearStatics(){jt(),D(),T(),ut(),Le(),be(),Z(),mt(),pe(),nt(),ht(),Ie(),Pe(),U(),V(),lt(),st(),Re.cleanupI3SLodHandling(),le.cleanupTilemapCache(),Oe.cleanupViewstate(),et.cleanupTerrainSurface()}};function Ot(e,t){return null!=e&&B(e.spatialReference,t)?k(e,t):null}e([A({nonNullable:!0}),O(xt)],At.prototype,"options",void 0),e([A()],At.prototype,"_userClippingArea",void 0),e([A()],At.prototype,"_resourceController",void 0),e([A()],At.prototype,"stage",null),e([A({readOnly:!0})],At.prototype,"deconflictor",void 0),e([A({readOnly:!0})],At.prototype,"labeler",void 0),e([A()],At.prototype,"navigation",void 0),e([A({type:me,readOnly:!0})],At.prototype,"animation",null),e([A({readOnly:!0})],At.prototype,"basemapTerrain",void 0),e([A({readOnly:!0})],At.prototype,"overlayManager",null),e([A({readOnly:!0})],At.prototype,"elevationProvider",void 0),e([A()],At.prototype,"camera",null),e([A({type:t})],At.prototype,"contentCamera",null),e([A({readOnly:!0})],At.prototype,"canvas",null),e([A({type:q,useTypeForAutocast:!1})],At.prototype,"center",null),e([A({type:W})],At.prototype,"clippingArea",null),e([A({type:Me,nonNullable:!0})],At.prototype,"constraints",void 0),e([A({type:W,readOnly:!0})],At.prototype,"renderDataExtent",null),e([A({readOnly:!0})],At.prototype,"tileInfo",null),e([A({type:W,readOnly:!0})],At.prototype,"dataExtent",null),e([A({type:W,readOnly:!0})],At.prototype,"_groundAndLayersExtent",null),e([A({type:Se})],At.prototype,"environment",null),e([O("environment")],At.prototype,"castEnvironment",null),e([A({readOnly:!0})],At.prototype,"environmentManager",void 0),e([A({type:W})],At.prototype,"extent",null),e([A({type:r})],At.prototype,"floors",void 0),e([A()],At.prototype,"screenCenter",null),e([A()],At.prototype,"frustum",null),e([A({type:Number,readOnly:!0})],At.prototype,"fullOpacity",void 0),e([A({readOnly:!0})],At.prototype,"graphicsView",void 0),e([A()],At.prototype,"analysisViewManager",void 0),e([A()],At.prototype,"groundView",void 0),e([A({readOnly:!0})],At.prototype,"layerviewCollections",null),e([A({type:Boolean})],At.prototype,"initialExtentRequired",null),e([A()],At.prototype,"defaultsFromMapSettings",null),e([A()],At.prototype,"interacting",null),e([A()],At.prototype,"stationary",null),e([A()],At.prototype,"navigating",null),e([A()],At.prototype,"map",void 0),e([A()],At.prototype,"padding",null),e([A({type:Xe,readOnly:!0})],At.prototype,"pointsOfInterest",void 0),e([A()],At.prototype,"_featureTiles",void 0),e([A()],At.prototype,"featureTiles",null),e([A()],At.prototype,"_featureTreeDebugger",void 0),e([A({constructOnly:!0})],At.prototype,"deactivatedWebGLExtensions",void 0),e([A({constructOnly:!0})],At.prototype,"debugWebGLExtensions",void 0),e([A({constructOnly:!0})],At.prototype,"renderCanvas",void 0),e([A({constructOnly:!0})],At.prototype,"state",void 0),e([A()],At.prototype,"screenSizePerspective",void 0),e([A({readOnly:!0})],At.prototype,"inputManager",void 0),e([A({readOnly:!0})],At.prototype,"stateManager",void 0),e([A({type:["low","medium","high"]})],At.prototype,"qualityProfile",null),e([A({type:Ze,get(){let e=this._get("qualitySettings");if(!e){const t=Ne(this.qualityProfile);e=new Ze(t)}return e}})],At.prototype,"qualitySettings",void 0),e([A()],At.prototype,"slice",void 0),e([A({readOnly:!0})],At.prototype,"typeSpecificPreconditionsReady",null),e([A({readOnly:!0})],At.prototype,"renderCoordsHelper",void 0),e([A({readOnly:!0})],At.prototype,"sceneIntersectionHelper",void 0),e([A({type:Number,readOnly:!0})],At.prototype,"resolution",null),e([A({type:Number})],At.prototype,"scale",null),e([A({readOnly:!0,type:Number})],At.prototype,"terrainLevel",null),e([A()],At.prototype,"heightModelInfo",null),e([A({type:N})],At.prototype,"spatialReference",void 0),e([A({type:Boolean,value:!1})],At.prototype,"alphaCompositingEnabled",null),e([A({constructOnly:!0})],At.prototype,"preserveDrawingBufferEnabled",void 0),e([A({type:Boolean})],At.prototype,"supersampleScreenshotsEnabled",void 0),e([A({readOnly:!0})],At.prototype,"type",void 0),e([A(),O(e=>e instanceof Mt?e:I(St,e))],At.prototype,"ui",void 0),e([A({type:Boolean,readOnly:!0})],At.prototype,"updating",null),e([A()],At.prototype,"_updatingObjects",null),e([A()],At.prototype,"_updatingObjectsWithProgress",null),e([A()],At.prototype,"_updatingObjectsToDebug",null),e([A({type:Number,readOnly:!0})],At.prototype,"updatingProgress",void 0),e([A({type:["global","local"]})],At.prototype,"viewingMode",null),e([A({type:i})],At.prototype,"viewpoint",null),e([A({readOnly:!0})],At.prototype,"visibleArea",null),e([A({type:Number})],At.prototype,"zoom",null),e([A({readOnly:!0})],At.prototype,"quality",null),e([A({readOnly:!0})],At.prototype,"resolutionScale",null),e([A()],At.prototype,"focusAreasView",void 0),e([A()],At.prototype,"_defaultToMapOptions",null),e([A()],At.prototype,"_defaultHitTestOptions",null),At=Ct=e([E("esri.views.SceneView")],At);const Et=F(),Lt=C(),It=J(),Ht=ie(0,0,0,N.WebMercator),Pt={GraphicsView3D:()=>import("./3d/layers/GraphicsView3D.js"),FocusAreasView:()=>import("./3d/FocusAreasView.js"),FeatureTileTree3D:()=>import("./3d/layers/support/FeatureTileTree3D.js")},Dt=At;export{Dt as default};
|
|
@@ -130,7 +130,7 @@ export interface LayerFeatureSet {
|
|
|
130
130
|
}
|
|
131
131
|
|
|
132
132
|
/** The types of layers that can be selected. */
|
|
133
|
-
export type SelectableLayerType = "csv" | "feature" | "geojson" | "parquet" | "graphics" | "knowledge-graph" | "knowledge-graph-sublayer" | "map-image" | "ogc-feature" | "stream" | "
|
|
133
|
+
export type SelectableLayerType = "annotation-feature" | "catalog-footprint" | "csv" | "dimension-feature" | "feature" | "geojson" | "parquet" | "graphics" | "knowledge-graph" | "knowledge-graph-sublayer" | "map-image" | "ogc-feature" | "stream" | "sublayer" | "subtype-group" | "subtype-sublayer" | "wfs";
|
|
134
134
|
|
|
135
135
|
/**
|
|
136
136
|
* The underlying base type for selectable layers which contains common properties and methods for both layers with graphics and layers with object IDs.
|