UNPKG

@arcgis/core

Version:

ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API

6 lines (5 loc) 2.71 kB
/* All material copyright ESRI, All Rights Reserved, unless otherwise specified. See https://js.arcgis.com/4.33/esri/copyright.txt for details. */ import{_ as e}from"../../../chunks/tslib.es6.js";import r from"../../../Graphic.js";import has from"../../../core/has.js";import{initial as t}from"../../../core/reactiveUtils.js";import{property as i}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as s}from"../../../core/accessorSupport/decorators/subclass.js";import{I3SMeshView3D as o}from"./I3SMeshView3D.js";import{DrapeTargetType as a}from"./interfaces.js";import{LayerView3D as l}from"./LayerView3D.js";import{updatingProgress as n}from"../support/updatingProperties.js";import p from"../../layers/LayerView.js";import{isInEffectiveScaleRange as d}from"../../support/layerViewUtils.js";const c=.2;let m=class extends(o(l(p))){constructor(){super(...arguments),this.type="integrated-mesh-3d",this._elevationContext="im",this._supportsLabeling=!1,this._applySSAO=!has("disable-feature:im-ssao"),this._shadeNormals=!!has("enable-feature:im-shading"),this.drapeTargetType=a.WithoutRasterImage}get i3slayer(){return this.layer}get updatingProgressValue(){return this._controller?.updatingProgress??0}get lodFactor(){return this.view?.qualitySettings?.sceneService?.integratedMesh?.lodFactor??1}get progressiveLoadFactor(){return this.lodFactor>=1?c:1}get visibleAtCurrentScale(){return d(this.i3slayer.effectiveScaleRange,this.view.scale)}get layerPopupEnabledAndHasTemplate(){return!1}initialize(){this._updatingHandles.add((()=>this.layer.modifications),(()=>this._loadModifications()),t),this.view.basemapTerrain.overlayManager.registerDrapeTarget(this)}destroy(){this.view.basemapTerrain.overlayManager.unregisterDrapeTarget(this)}_createLayerGraphic(){return new r({layer:this.layer,sourceLayer:this.layer})}canResume(){return super.canResume()&&(!this._controller||this._controller.rootNodeVisible)}_loadModifications(){if(this.removeHandles("modifications"),null==this.layer.modifications)return void(this._modifications=[]);const e=this.layer.modifications;this.addHandles(this._updatingHandles.addOnCollectionChange((()=>e),(()=>this._modifications=e.toArray()),t),"modifications")}};e([i()],m.prototype,"layer",void 0),e([i()],m.prototype,"i3slayer",null),e([i(n)],m.prototype,"updatingProgress",void 0),e([i()],m.prototype,"updatingProgressValue",null),e([i()],m.prototype,"lodFactor",null),e([i({readOnly:!0})],m.prototype,"progressiveLoadFactor",null),e([i({readOnly:!0})],m.prototype,"visibleAtCurrentScale",null),m=e([s("esri.views.3d.layers.IntegratedMeshLayerView3D")],m);const u=m;export{u as default};