You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
114 lines
59 KiB
114 lines
59 KiB
// All material copyright Esri, All Rights Reserved, unless otherwise specified. |
|
// See https://js.arcgis.com/4.30/esri/copyright.txt for details. |
|
//>>built |
|
define("require exports ../../../chunks/tslib.es6 ../../../Color ../../../Graphic ../../../symbols ../../../core/arrayUtils ../../../core/ByteSizeUnit ../../../core/Collection ../../../core/handleUtils ../../../core/has ../../../core/Logger ../../../core/MapUtils ../../../core/maybe ../../../core/PooledArray ../../../core/promiseUtils ../../../core/reactiveUtils ../../../core/scheduling ../../../core/typedArrayUtil ../../../core/accessorSupport/decorators/property ../../../core/accessorSupport/decorators/subclass ../../../core/libs/gl-matrix-2/math/mat3 ../../../core/libs/gl-matrix-2/factories/mat3f64 ../../../core/libs/gl-matrix-2/math/mat4 ../../../core/libs/gl-matrix-2/factories/mat4f64 ../../../core/libs/gl-matrix-2/factories/quatf64 ../../../chunks/vec32 ../../../core/libs/gl-matrix-2/factories/vec3f64 ../../../chunks/vec42 ../../../core/libs/gl-matrix-2/factories/vec4f64 ../../../core/support/UpdatingHandles ../../../geometry/projection/localLinearScaleFactors ../../../geometry/projection/projectBoundingSphere ../../../geometry/projection/projectBuffer ../../../geometry/projection/projectors ../../../geometry/projection/projectVectorToVector ../../../geometry/support/aaBoundingBox ../../../geometry/support/aaBoundingRect ../../../geometry/support/DoubleArray ../../../geometry/support/FloatArray ../../../geometry/support/Indices ../../../chunks/sphere ../../../geometry/support/UByteArray ../../../layers/LayerConstants ../../../layers/graphics/controllers/I3SOnDemandController ../../../layers/support/fieldUtils ../../../layers/support/SceneModification ../../../renderers/visualVariables/support/visualVariableUtils ../../../support/arcadeOnDemand ../../../support/basemapUtils ../../../support/elevationInfoUtils ../../../symbols/Symbol3D ./I3SMeshViewLabeler ./I3SMeshViewPerformanceInfo ./I3SMeshWorkerHandle ./II3SMeshView3D ./SceneLayerWorker ./graphics/graphicUtils ./graphics/Labeler ./i3s/enums ./i3s/Highlights ./i3s/I3SAsyncElevationUpdater ./i3s/I3SCrossfadeHelper ./i3s/I3SGeometryUtil ./i3s/I3SIntersectionHandler ./i3s/I3SMaterialUtil ./i3s/I3SNode ./i3s/I3SOverrides ./i3s/I3SProjectionUtil ./i3s/I3SUtil ./i3s/IDBCache ./i3s/IDBMockCache ./i3s/LayerElevationProvider ./support/attributeUtils ./support/makeScheduleFunction ./support/symbolColorUtils ../support/debugFlags ../support/ElevationRange ../support/extentUtils ../support/orientedBoundingBox ../support/updatingProperties ../support/buffer/glUtil ../webgl-engine/collections/Component/ObjectParameters ../webgl-engine/collections/Component/SourceGeometry ../webgl-engine/collections/Component/Transform ../webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl ../webgl-engine/lib/BasisUtil ../webgl-engine/lib/edgeRendering/interfaces ../../../symbols/SimpleFillSymbol".split(" "), |
|
function(Za,xa,u,$a,ha,cc,ya,ab,bb,cb,pa,H,za,F,db,T,G,eb,Aa,w,fb,Ba,Ca,Da,Ea,gb,D,P,hb,ib,jb,kb,lb,mb,Fa,qa,U,V,Ga,nb,ob,W,pb,qb,rb,sb,tb,Ha,ub,vb,Ia,wb,xb,yb,Ja,q,ia,Ka,zb,K,Ab,Bb,La,Cb,Db,X,ra,Eb,Fb,x,Gb,Hb,Ib,sa,Jb,ja,Y,ta,Ma,Z,Kb,Lb,Mb,Nb,Ob,ka,Na,la,Pb){function M(h,a){T.isAbortError(h)||H.getLogger("esri.views.3d.layers.I3SMeshView3D").warn("Error while processing edges. Edges on this layer might not display correctly",a,h)}function Oa(h){if(null==h)return!1;const a=h.metallicRoughness;return a&& |
|
0<=a.baseColorTextureId||a&&0<=a.metallicRoughnessTextureId||0<=h.normalTextureId||0<=h.emissiveTextureId||0<=h.occlusionTextureId}function Pa(h){return null!=h&&Aa.isArrayBuffer(h.data)}function Qa(h,a){h=1024+h.interleavedVertexData.byteLength+(h.indices?h.indices.byteLength:0)+h.positionData.data.byteLength+h.positionData.indices.byteLength;if(null!=a)for(const b of a)null!=b&&Aa.isArrayBuffer(b.data)&&(h+=b.data.byteLength);return h}function Ra(h,a){return a.byteSize>Qb?(H.getLogger("esri.views.3d.layers.I3SMeshView3D").warn(`Node is too big to store in IndexedDB cache: ${h.id} (${a.byteSize} bytes)`), |
|
!1):0<a.byteSize}function Rb(h){if(0!==h.length){var a=new Float64Array(10*h.length),b=0;h.forAll(c=>{let d=c.serviceObbInIndexSR;null==d&&(d=Sb,d.center=W.getCenter(c.serviceMbsInIndexSR),d.halfSize=[c.serviceMbsInIndexSR[3],c.serviceMbsInIndexSR[3],c.serviceMbsInIndexSR[3]]);c=d.data;a[b++]=c[0];a[b++]=c[1];a[b++]=c[2];a[b++]=c[3];a[b++]=c[4];a[b++]=c[5];a[b++]=c[6];a[b++]=c[7];a[b++]=c[8];a[b++]=c[9]});return a}}function aa(h,a){h.forEach(b=>b.opacity=a)}function ua(h,a,b){let c=h.elevationRangeMin, |
|
d=h.elevationRangeMax;if(0<b){a.getCorners(ma);for(const f of ma){var e=D.len(f)-b;c=Math.min(c,e);d=Math.max(d,e)}}else{a.getCorners(ma);for(e of ma)b=e[2],c=Math.min(c,b),d=Math.max(d,b)}h.expandElevationRangeValues(c,d)}function Sa(h,a,b){const c=W.getCenter(a);b=0<b?D.len(c)-b:c[2];a=W.getRadius(a);h.expandElevationRangeValues(b-a,b+a)}const Ta=[1,1,1,1];class Tb extends La.NodeCrossfadeMetaData{constructor(h,a,b,c,d,e,f,g,k){super();this.node=h;this.featureIds=a;this.objectHandle=b;this.cachedRendererVersion= |
|
c;this.attributeInfo=d;this.material=e;this.textures=f;this.anchorIds=g;this.anchors=k;this.cachedElevationAnchors=null;this.cachedEdgeMaterials=[];this.edgeMemoryUsage=0}}var Q;(function(h){h[h.CastShadows=4]="CastShadows";h[h.Pickable=5]="Pickable"})(Q||={});const Qb=100*ab.ByteSizeUnit.MEGABYTES;var I;(function(h){h[h.ADD=0]="ADD";h[h.REMOVE=1]="REMOVE";h[h.UPDATE=2]="UPDATE"})(I||={});const Ua=U.create(),Va=V.create(),Ub=V.create(),Sb=new Z.Obb,ba=[0,0,0,0],Vb=new $a([0,0,0,0]),Wa=W.fromValues(0, |
|
0,0,0);class ca{constructor(h,a){this.mode=h;this.offset=a}}const z=P.create(),R=U.create(),ma=[[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0]],S=new ta.ElevationRange;xa.I3SMeshView3D=h=>{h=class extends h{constructor(){super(...arguments);this._needsNormals=!0;this._updatingHandles=new jb.UpdatingHandles;this._nodeId2Meta=new Map;this._nodeId2MetaReloading=new Map;this._i3sWasmLoaded=!1;this._snappingSourcesTrackers=[];this._hasLoadedPBRTextures=!1;this._asyncModuleLoading=0;this._addTasks= |
|
new Map;this._currentRenderer=null;this._rendererVersion=0;this._symbologyOverrideFields=this._symbologyOverride=this._symbologyFields=this._rendererFields=this._opacityVariable=this._colorVariable=null;this._symbolInfos=new Map;this._visibleGeometryChangedSchedulerHandle=null;this._hasVertexColors=this._hasComponentData=!1;this._nodeColorOverride=null;this.updating=!0;this.holeFilling="auto";this.slicePlaneEnabled=this._hasData=this._hasTextures=this._hasColors=!1;this._modifications=[];this.ignoresMemoryFactor= |
|
!1;this._layerUrl="";this._cacheKeySuffix=null;this._planetRadiusInGlobalMode=0;this._elevationTask=null;this._filters=[];this._arcade=null;this._tmpAttributeOnlyGraphic=new ha;this._crossfadeHelper=new La.I3SCrossfadeHelper(this)}get lodCrossfadeoutDuration(){return 0}get lodCrossfadeinDuration(){return 0}get lodCrossfadeUncoveredDuration(){return 0}get layerUid(){return this.i3slayer&&this.i3slayer.uid}get sublayerUid(){return null}get layerId(){return this.i3slayer&&this.i3slayer.id}get sublayerId(){return null}get contentVisible(){return!this.suspended&& |
|
this._controller?.rootNodeVisible}get legendEnabled(){return this.contentVisible&&!0===this.i3slayer?.legendEnabled}get updatingProgressValue(){return this._controller?.updatingProgress??0}get hasTexturesOrVertexColors(){return this._hasData?this._hasTextures||this._hasColors?"yes":"probably-not":"unknown"}get rendererTextureUsage(){return x.rendererNeedsTextures(this._currentRenderer)?this._usePBR||this._hasLoadedPBRTextures?K.TextureUsage.AllTexturesPBR:K.TextureUsage.AllTextures:this._usePBR|| |
|
this._hasLoadedPBRTextures?K.TextureUsage.GeometryTexturesPBR:K.TextureUsage.GeometryTextures}get elevationOffset(){const a=null!=this.i3slayer?this.i3slayer.elevationInfo:null;return null!=a&&"absolute-height"===a.mode?Ia.getElevationOffset(a,this.i3slayer.spatialReference):0}get elevationInfo(){const a=null!=this.i3slayer?this.i3slayer.elevationInfo:null;if(null==a)return new ca(q.ElevationMode.Absolute,0);const b=Ia.getElevationOffset(a,this.i3slayer.spatialReference);switch(a.mode){case "absolute-height":return new ca(q.ElevationMode.Absolute, |
|
b);case "relative-to-ground":return new ca(q.ElevationMode.RelativeToGround,b);case "on-the-ground":return new ca(q.ElevationMode.OnTheGround,0);default:return new ca(q.ElevationMode.Absolute,0)}}get supportedTextureEncodings(){return X.getSupportedEncodings(this.view._stage.renderView.capabilities)}get uncompressedTextureDownsamplingEnabled(){const a=0===(this.supportedTextureEncodings&K.TextureEncoding.DDS_S3TC);return this.view?.qualitySettings.sceneService.uncompressedTextureDownsamplingEnabled&& |
|
a}get clientGeometry(){return this.i3sOverrides.geometryOverrides}get elevationRange(){var a=this._nodeId2Meta;const b=new ta.ElevationRange;for(const c of a.values()){if(null==c)continue;({node:{serviceMbsInIndexSR:a}}=c);const [,,d,e]=a;b.expandElevationRangeValues(d-e,d+e)}return b.elevationRangeValid?b:null}get fullExtent(){return this.i3slayer.fullExtent}initialize(){var a=pa("enable-feature:idb-mock-cache");this._idbCache=a?new Hb.IDBMockCache(this.view,a):new Gb.IDBCache("esri-scenelayer-cache", |
|
"geometries");this._preLoadBasis();this.addResolvingPromise(this.i3slayer.indexInfo);a=this.view.resourceController;this.i3sOverrides=new Eb.I3SOverrides({view:this.view,layer:this.i3slayer,memoryController:a.memoryController});this._worker=new Ja.I3SMeshWorkerHandle(Jb.makeScheduleFunction(a));this.addResolvingPromise(this._worker.promise);a=this.i3slayer.store;this._worker.setLegacySchema(this.uid,a.defaultGeometrySchema);x.checkSceneLayerValid(this.i3slayer);x.checkSceneLayerCompatibleWithView(this.i3slayer, |
|
this.view);this._layerUrl=this.i3slayer.parsedUrl.path;this._controller=new rb({layerView:this,worker:this._worker});this._geoMemoryEstimate=this._texMemoryEstimate=this._gpuMemoryEstimate=0;this._stage=this.view._stage;this._collection=this._stage.renderView.componentObjectCollection;this.resetHighlights();a=a.defaultGeometrySchema;if(this._isIntegratedMesh||!a)this._hasComponentData=!1;else{const g=a.featureAttributes;this._hasComponentData=!!(g&&g.faceRange&&g.id)}this._hasVertexColors=null!=(a?.vertexAttributes.color?? |
|
null)&&!this.i3slayer.cachedDrawingInfo?.color;this._memCache=this.view.resourceController.memoryController.newCache(`sl-${this.uid}`,g=>this._deleteComponentObject(g));const b=this._controller,c=this._nodeId2Meta,d=this._nodeId2MetaReloading;this._intersectionHandler=new Db.I3SIntersectionHandler({layerUid:this.layerUid,sublayerUid:this.sublayerUid,collection:this._collection,slicePlaneEnabled:this.slicePlaneEnabled,isGround:this._isIntegratedMesh,traverseNodeHierarchy:g=>{const k=b.index;if(k){var m= |
|
k.rootNode;m&&k.traverse(m,p=>{var r=p.index;r=c.get(r)||d.get(r);return g(p,r?.objectHandle??null)})}}});this._updatingHandles.add(()=>this.layerUid,g=>this._intersectionHandler.layerUid=g);this._updatingHandles.add(()=>this.sublayerUid,g=>this._intersectionHandler.sublayerUid=g);this._elevationProvider=new Ib.LayerElevationProvider({view:this.view,layerElevationSource:this,intersectionHandler:this._intersectionHandler});this._hasLoadedPBRTextures=this._usePBR;this._updatingHandles.add(()=>this.view.clippingArea, |
|
()=>this._clippingAreaChanged(),G.initial);this._updatingHandles.add(()=>this.fullOpacity,g=>this._opacityChange(g));this._updatingHandles.add(()=>this.slicePlaneEnabled,g=>this._slicePlaneEnabledChange(g));this._updatingHandles.add(()=>this.elevationOffset,(g,k)=>{this._reloadAll(k);this._controller.invalidateVisibilityObbs()});this._updatingHandles.add(()=>this.elevationInfo,(g,k)=>this._elevationInfoChanged(g,k),G.initial);this._updatingHandles.add(()=>!this.suspended&&this.elevationInfo.mode!== |
|
q.ElevationMode.Absolute,(g,k)=>{g?this.addHandles(this.view.basemapTerrain.on("elevation-change",({extent:m})=>this._ensureElevationTask().addExtent(m)),"elevation-change"):k&&this.removeHandles("elevation-change")},G.initial);this._updatingHandles.add(()=>this._usePBR,g=>this._updatePBR(g));a=()=>{this._reloadAll();this.clearMemCache()};this._updatingHandles.add(()=>this.rendererTextureUsage,a);this._updatingHandles.add(()=>this.uncompressedTextureDownsamplingEnabled,a);this._updatingHandles.add(()=> |
|
this.contentVisible,g=>this._contentVisibleChanged(g),G.initial);this._updatingHandles.add(()=>this.i3slayer.labelsVisible,()=>this._labelingChanged(),G.initial);this._updatingHandles.add(()=>this.i3slayer.labelingInfo,()=>this._labelingChanged(),G.initial);this._updatingHandles.add(()=>this._modifications,()=>this._modificationsChanged(),G.initial);this.addHandles([G.watch(()=>Y.debugFlags.I3S_TREE_SHOW_TILES,g=>{if(g&&!this._treeDebugger){const k=this._controller.crsIndex;(new Promise((m,p)=>Za(["./support/I3STreeDebugger"], |
|
m,p))).then(({I3STreeDebugger:m})=>{!this._treeDebugger&&Y.debugFlags.I3S_TREE_SHOW_TILES&&(this._treeDebugger=new m({lv:this,view:this.view,nodeSR:k}))})}else g||Y.debugFlags.I3S_TREE_SHOW_TILES||(this._treeDebugger=F.destroyMaybe(this._treeDebugger))},G.initial),G.watch(()=>Y.debugFlags.I3S_SHOW_MODIFICATIONS,()=>this._showModifications(),G.initial)]);this._cacheKeySuffix=x.getCacheKeySuffix(this.i3slayer.spatialReference,this.view.renderSpatialReference);this._idbCache.init().catch(g=>H.getLogger("esri.views.3d.layers.I3SMeshView3D").warn(`Failed to initialize IndexedDB cache: ${g}`)); |
|
({view:a}=this);const {viewingMode:e,renderCoordsHelper:f}=a;this._planetRadiusInGlobalMode="local"===e?0:f.referenceEllipsoid.radius}destroy(){this._clearAddTasks();this._elevationTask=F.destroyMaybe(this._elevationTask);this.i3sOverrides=F.destroyMaybe(this.i3sOverrides);this._elevationProvider&&(this._elevationProvider.objectsChanged(this.getVisibleObbs()),this.view.elevationProvider.unregister(this._elevationProvider),this._elevationProvider=null);this._intersectionHandler&&(this._stage.view.sceneIntersectionHelper.removeIntersectionHandler(this._intersectionHandler), |
|
this._intersectionHandler=null);const a=this._worker;a&&(a.destroyContext(this.uid).then(()=>a.destroy()),this._worker=null);this._removeAllNodeDataFromStage();this._memCache=F.destroyMaybe(this._memCache);this._edgeView=this._stage=this._collection=null;this._labeler=F.destroyMaybe(this._labeler);this._treeDebugger=F.destroyMaybe(this._treeDebugger);this._controller=F.destroyMaybe(this._controller);this._highlights.destroy();this._nodeId2Meta.clear();this._nodeId2MetaReloading.clear();this._crossfadeHelper= |
|
F.destroyMaybe(this._crossfadeHelper);this.emit("visible-geometry-changed");this._visibleGeometryChangedSchedulerHandle&&(this._visibleGeometryChangedSchedulerHandle.remove(),this._visibleGeometryChangedSchedulerHandle=null);this._updatingHandles=F.destroyMaybe(this._updatingHandles)}_memEstimateTextureAdded(a){a=a.memoryEstimate;this._gpuMemoryEstimate+=a;this._texMemoryEstimate+=a;return a}_memEstimateTextureRemoved(a){null!=a&&(a=a.memoryEstimate,this._gpuMemoryEstimate-=a,this._texMemoryEstimate-= |
|
a)}_memEstimateGeometryAdded(a){a=this._collection.getObjectGPUMemoryUsage(a);this._gpuMemoryEstimate+=a;this._geoMemoryEstimate+=a;return a}_memEstimateGeometryRemoved(a){a=this._collection.getObjectGPUMemoryUsage(a);this._gpuMemoryEstimate-=a;this._geoMemoryEstimate-=a}isNodeLoaded(a){return this._nodeId2Meta.has(a)}isNodeReloading(a){return this._nodeId2MetaReloading.has(a)}get usedMemory(){let a=null!=this._labeler?this._labeler.usedMemory:0;this._nodeId2Meta.forEach(b=>a+=null!=b?b.node.memory: |
|
0);this._nodeId2MetaReloading.forEach(b=>a+=null!=b?b.node.memory:0);return a}get unloadedMemory(){return(null!=this._controller?this._controller.unloadedMemoryEstimate:0)+(null!=this._labeler?this._labeler.unloadedMemoryEstimate:0)}_labelingChanged(){if(!zb.areLabelsVisible(this.i3slayer)||!this._supportsLabeling)null!=this._labeler&&(this._labeler.destroy(),this._labeler=null);else if(null==this._labeler){var a=new xb({view:this.view,layer:this.i3slayer,collection:this._collection,overrides:this.i3sOverrides}); |
|
this._nodeId2Meta.forEach(b=>null!=b&&this._addMetaToLabeler(a,b));this._labeler=a}}_loadAsyncModule(a){++this._asyncModuleLoading;return a.then(b=>{--this._asyncModuleLoading;return b},b=>{--this._asyncModuleLoading;throw b;})}_modificationsChanged(){if(!this._i3sWasmLoaded&&this.hasModifications)this._i3sWasmLoaded=ia.initialize().then(()=>{this._i3sWasmLoaded=!0;this._modificationsChanged();this.notifyUpdate()}),this.notifyUpdate();else if(!0===this._i3sWasmLoaded){var a=this.uid,b=this.i3slayer.spatialReference; |
|
this._worker.setModifications(a,this._layerClippingArea,this._modifications,b);var c=Ja.toWasmModification(this._layerClippingArea,this._modifications,b);ia.setModificationsSync({context:a,modifications:c,isGeodetic:b.isGeographic});this._controller.modificationsChanged();var d=this.hasModifications?new db:null;this._nodeId2Meta.forEach((e,f)=>{null==e?(this._nodeId2Meta.delete(f),this._controller.updateLoadStatus(f,!1)):e.node.hasModifications?(this._nodeId2Meta.delete(f),this._nodeId2MetaReloading.set(f, |
|
e)):null!=d&&d.push(e.node)});this.notifyChange("elevationRange");null!=d&&this._nodeId2MetaReloading.forEach(e=>d.push(e.node));null!=d&&0<d.length&&(this.updateNodeModificationStatus(d),d.forAll(e=>{if(e.imModificationImpact!==ra.NodeIMModificationImpact.Culled){const f=this._nodeId2Meta.get(e.index);this._controller.invalidateGeometryVisibility(e.index);null!=f?(this._nodeId2Meta.delete(e.index),this._nodeId2MetaReloading.set(e.index,f),this.notifyChange("elevationRange")):this._nodeId2Meta.has(e.index)&& |
|
(this._nodeId2Meta.delete(e.index),this._controller.updateLoadStatus(e.index,!1))}}));this.clearMemCache();this._controller.restartNodeLoading();this._showModifications()}}_showModifications(){null!=this._modificationGraphics&&(this.view.graphics.removeMany(this._modificationGraphics),this._modificationGraphics=null);if(Y.debugFlags.I3S_SHOW_MODIFICATIONS&&0!==this._modifications.length){var a={clip:[227,227,79,.8],mask:[227,139,79,.8],replace:[139,227,79,.8]},b={outline:{color:[255,255,255],width:1}}; |
|
this._modificationGraphics=[];for(const c of this._modifications){const d=c.geometry;d.spatialReference=this.i3slayer.spatialReference;const e=new Pb({...b,color:a[c.type]});this._modificationGraphics.push(new ha({geometry:d,symbol:e}))}this.view.graphics.addMany(this._modificationGraphics)}}_addMetaToLabeler(a,b){a.addNodeMeta(b,(c,d)=>this._createAttributes(c,d))}_contentVisibleChanged(a){a?(this.view.elevationProvider.register(this._elevationContext,this._elevationProvider),this._stage.view.sceneIntersectionHelper.addIntersectionHandler(this._intersectionHandler)): |
|
(this._removeAllNodeDataFromStage(),this.view.elevationProvider&&this.view.elevationProvider.unregister(this._elevationProvider),this._stage.view.sceneIntersectionHelper.removeIntersectionHandler(this._intersectionHandler))}getLoadedAttributes(a){a=this._nodeId2Meta.get(a);if(null!=a?.attributeInfo)return a.attributeInfo.loadedAttributes}getAttributeData(a){a=this._nodeId2Meta.get(a);if(null!=a?.attributeInfo)return a.attributeInfo.attributeData}setAttributeData(a,b){a=this._nodeId2Meta.get(a);null!= |
|
a?.attributeInfo&&(a.attributeInfo.attributeData=b,this._attributeValuesChanged(a))}async updateAttributes(a,b,c){const d=this._nodeId2Meta.get(a);null!=d&&(await this.i3sOverrides.applyAttributeOverrides(d.featureIds,b,c,this._controller.requiredAttributes),d.attributeInfo=b,this._controller.reschedule(()=>this._attributeValuesChanged(d),c).catch(e=>{T.isAbortError(e)||H.getLogger("esri.views.3d.layers.I3SMeshView3D").warn("Error while updating attribute values. Layer might not display correctly.", |
|
e)}))}_attributeValuesChanged(a){a.cachedRendererVersion=this._getInvalidRendererVersion();a.filteredIds=null;null!=this._labeler&&this._labeler.setNodeMetaAttributes(a,(b,c)=>this._createAttributes(b,c));this._updateEngineObject(a)}clearMemCache(){null!=this._memCache&&this._memCache.clear()}getVisibleNodes(){const a=[];this._nodeId2Meta.forEach(b=>null!=b&&a.push(b.node));return a}getVisibleObbs(){const a=[];this._nodeId2Meta.forEach(b=>{null!=b&&(b=this.getNodeComponentObb(b.node),null!=b&&a.push(b))}); |
|
return a}getNodeComponentObb(a){a=this._nodeId2Meta.get(a.index)??this._nodeId2MetaReloading.get(a.index);return null!=a?this._collection.getComponentObb(a.objectHandle):null}getLoadedNodeIndices(a){this._nodeId2Meta.forEach((b,c)=>a.push(c));this._nodeId2MetaReloading.forEach((b,c)=>a.push(c))}_preLoadBasis(){!pa("disable-feature:i3s-basis")&&0!==(this.supportedTextureEncodings&K.TextureEncoding.Basis)&&this.i3slayer.textureSetDefinitions?.some(a=>a.formats.some(b=>"basis"===b.format||"ktx2"===b.format))&& |
|
Na.loadBasis()}_getVertexBufferLayout(a,b){a={hasTexture:Oa(a.params.material),hasNormals:b.normal,hasRegions:b.uvRegion};return Lb.glLayout(Nb.createVertexBufferLayout(this._getGeometryParameters(a)))}_getObjectIdField(){return this.i3slayer.objectIdField||qb.fallbackObjectIDAttribute}_getGlobalIdField(){return this.i3slayer.associatedLayer?.globalIdField}_findGraphicNodeAndIndex(a){const b=sa.attributeLookup(this.i3slayer.fieldsIndex,a.attributes,this._getObjectIdField());let c=null;za.someMap(this._nodeId2Meta, |
|
d=>{if(null==d)return!1;const e=d.featureIds.indexOf(b);if(-1===e)return!1;c={node:d.node,index:e};return!0});return c}_getGraphicIndices(a,b){a=this._nodeId2Meta.get(a.index);if(null==a)return[];const c=[],d=this._getObjectIdField(),e=this.i3slayer.fieldsIndex;for(const f of b)b=sa.attributeLookup(e,f.attributes,d),b=a.featureIds.indexOf(b),-1!==b&&c.push(b);return c}whenGraphicBounds(a){a=this._findGraphicNodeAndIndex(a);if(!a)return Promise.reject();a=this._getAABB(a.node.index,a.index);return null== |
|
a?Promise.reject():Promise.resolve({boundingBox:a,screenSpaceObjects:[]})}getAABBFromIntersectorTarget(a){return null==a.nodeIndex||null==a.componentIndex?null:this._getAABB(a.nodeIndex,a.componentIndex)}_getAABB(a,b){a=this._nodeId2Meta.get(a);if(null==a?.featureIds||b>=a.featureIds.length)return null;b=Cb.boundingBoxCornerPoints(b,this._collection,a.objectHandle,Ga.newDoubleArray(24),0);if(!mb.projectBuffer(b,this.view.renderSpatialReference,0,b,this.view.spatialReference,0,8))return null;a=U.empty(); |
|
U.expandWithBuffer(a,b,0,8);return a}whenGraphicAttributes(a,b){return x.whenGraphicAttributes(this.i3slayer,a,this._getObjectIdField(),b,()=>[...this._nodeId2Meta.values()].filter(ya.isSome))}getGraphicFromIntersectorTarget(a){if(null==a.nodeIndex||null==a.componentIndex)return null;const b=this._nodeId2Meta.get(a.nodeIndex);return null==b?.featureIds||a.componentIndex>=b.featureIds.length?null:this._createGraphic(a.componentIndex,b)}_getCacheKey(a){return`${this._layerUrl}/v${24}/${a}${this._cacheKeySuffix}`}_getMemCacheKey(a, |
|
b=this.elevationOffset){return a+"#"+b}get _idbCacheEnabled(){return!this._controller.disableIDBCache&&!this.hasModifications&&0===this.elevationOffset&&null!=this._cacheKeySuffix}loadCachedGPUData(a){return null!=this._memCache?this._memCache.pop(this._getMemCacheKey(a)):null}deleteCachedGPUData(a){null!=a&&this._deleteComponentObject(a)}_cacheGPUData(a,b=this.elevationOffset){if(null==this._memCache)this._deleteComponentObject(a);else{var c=this._controller.indexDepth-a.node.level;this._memCache.put(this._getMemCacheKey(a.node.index, |
|
b),a,a.node.memory,c)}}loadMissingTextures(a,b,c,d){const e=a?.filter((f,g)=>{if(0===(f.usage&this.rendererTextureUsage))return!1;if(null==b)return!0;f=X.selectEncoding(f.encodings,this.supportedTextureEncodings);g=b[g];return null==g?.data||f&&g.encoding!==f.encoding?!0:!1})??[];return 0===e.length?Promise.resolve(!1):c(e,d).then(f=>{let g=0;for(let k=0;k<a.length;k++)g<f.length&&f[g].id===a[k].id&&(b[k]=f[g],g++);return!0})}loadCachedNodeData(a,b,c){return this._idbCacheEnabled?this._idbCache.get(this._getCacheKey(a.id), |
|
b).then(d=>{if(null==d)return null;if(d.nodeVersion!==a.version)return this._idbCache.remove(this._getCacheKey(a.id)),null;this.elevationInfo.mode===q.ElevationMode.Absolute&&(a.geometryObbInRenderSR=Z.Obb.fromData(d.geometryObbData));return this.loadMissingTextures(d.requiredTextures,d.textureData,c,b).then(e=>{e&&this._idbCache.initialized&&null!=d.textureData&&(d.byteSize=Qa(d.transformedGeometry,d.textureData),d.textureData.every(Pa)&&Ra(a,d)&&this._idbCache.put(this._getCacheKey(a.id),d).catch(f=> |
|
H.getLogger("esri.views.3d.layers.I3SMeshView3D").warn(`Failed to update node with textures in IndexedDB cache: ${a.id}: ${f}`)));T.throwIfAborted(b);return d})}):Promise.resolve(null)}addNode(a,b,c){return"geometryData"in b?null==b.geometryBuffer?(this._addNodeMeta(a.index,null),Promise.resolve()):this._addData(a,b.attributeDataInfo,()=>this._transformNode(a,b,c).then(d=>this._safeReschedule(()=>{if(null==d)return a.hasModifications=!1,this._addCachedNodeData(a,null,c);a.hasModifications=d.transformedGeometry.hasModifications; |
|
const {obb:e,componentOffsets:f,featureIds:g,anchorIds:k,anchors:m,transformedGeometry:p,globalTrafo:r}=d;var t=D.set(z,e.center.x,e.center.y,e.center.z);D.transformMat4(t,t,r);t=new Z.Obb(t,[e.extents.x,e.extents.y,e.extents.z],gb.fromValues(e.orientation.x,e.orientation.y,e.orientation.z,e.orientation.w));this.elevationInfo.mode===q.ElevationMode.Absolute&&(a.geometryObbInRenderSR=t);b.geometryData.componentOffsets=f;g&&(b.geometryData.featureIds=Array.from(g));b.geometryData.anchorIds=k;b.geometryData.anchors= |
|
m;t={nodeVersion:a.version,geometryData:b.geometryData,requiredTextures:b.requiredTextures,textureData:b.textureData,transformedGeometry:p,globalTrafo:r,geometryObbData:t.data,byteSize:Qa(p,b.textureData)};if(this._idbCacheEnabled&&this._idbCache.initialized&&Ra(a,t)){const y=null!=t.textureData?t.textureData.map(A=>Pa(A)?A:null):null;this._idbCache.put(this._getCacheKey(a.id),{...t,textureData:y}).catch(A=>H.getLogger("esri.views.3d.layers.I3SMeshView3D").warn(`Failed to store node in IndexedDB cache: ${a.id}: ${A}`))}return this._addCachedNodeData(a, |
|
t,c)},c))):Promise.reject()}getElevationRange(a){const b=new ta.ElevationRange;var c=this._controller;const {index:d}=c;if(!d)return b;const {rootNode:e}=d;if(!e)return b;const f=this._nodeId2Meta,g=a[3],k=c.viewportQueries,m=this._planetRadiusInGlobalMode;({view:c}=this);const {renderCoordsHelper:p}=c,r=p.referenceEllipsoid.radius,t=this._collection;d.traverse(e,y=>{const {childrenLoaded:A}=y;if(0===A)return!1;var l=k.getAndUpdateVisibilityObbInRenderSR(y),n=null;let v=-1;if(l){if(v=l.radius,!l.intersectSphereWithMBS(a, |
|
v))return!1}else(n=k.getServiceMbsInRenderSR(y))&&(v=n[3]);if(0<=v&&g>=1*v)return null!=l?ua(b,l,m):null!=n&&0<=n[3]&&Sa(b,n,m),!1;S.elevationRangeMin=Infinity;S.elevationRangeMax=-Infinity;if(null!=l||null!=n)if(null!=l?ua(S,l,m):null!=n&&Sa(S,n,m),S.elevationRangeMin>=b.elevationRangeMin&&S.elevationRangeMax<=b.elevationRangeMax)return!1;if(l=f.get(y.index))if({geometryObbInRenderSR:y}=y,!y||y.intersectSphereWithMBS(a)){if(y&&g>0*y.radius)return ua(b,y,m),!1;({objectHandle:y}=l);n=t.getObjectTransform(y); |
|
n=p.getAltitude(n.position);t.expandRangeWithComponentObjectElevationRange(y,n,r,b)}return 0<A-(l?1:0)});return b}computeVisibilityObb(a){return x.computeVisibilityObb(a,this.view.renderSpatialReference,this._controller.crsIndex,this.i3slayer.spatialReference,this.elevationOffset,this._modifications,this.view.renderCoordsHelper.sphericalPCPF)}_transformNode(a,b,c){var d=b.geometryData.geometries??[];const e=Array(d.length);for(var f=0;f<d.length;++f)e[f]=this._getVertexBufferLayout(d[f],b.geometryDescriptor); |
|
d=this.i3slayer.normalReferenceFrame;d=b.normalReferenceFrame??d??"none";f=a.serviceMbsInIndexSR;const g=this.elevationOffset;var k=this._controller.crsIndex,m=this._controller.crsVertex;const p=this.view.renderSpatialReference,r=Fb.computeGlobalTransformation(f,g,d,k,p);k=Fa.getProjectorName(k,m);m=Fa.getProjectorName(m,p);return null==k||null==m?Promise.resolve(null):this._worker.invoke({context:this.uid,geometryBuffer:b.geometryBuffer,geometryData:b.geometryData,geometryDescriptor:b.geometryDescriptor, |
|
layouts:e,globalTrafo:r,mbs:f,obbData:a.serviceObbInIndexSR?.data,elevationOffset:g,needNormals:this._needsNormals&&this._controller.isMeshPyramid,normalReferenceFrame:d,indexToVertexProjector:k,vertexToRenderProjector:m},c)}get _supportsNodeCrossFading(){return!this.view?._stage?.renderer.shadowsEnabled}get nodeCrossfadingEnabled(){return this._supportsNodeCrossFading&&(0<this.lodCrossfadeinDuration||0<this.lodCrossfadeoutDuration||0<this.lodCrossfadeUncoveredDuration)}get nodeFadeoutEnabled(){return this._supportsNodeCrossFading&& |
|
0<this.lodCrossfadeoutDuration}_setNewNodeOpacity(a){this._setNodeOpacity(a,this.nodeCrossfadingEnabled?0:this.fullOpacity)}addCachedGPUData(a,b,c){this.elevationInfo.mode===q.ElevationMode.Absolute&&(a.geometryObbInRenderSR=this._collection.getComponentObb(b.objectHandle).clone());this._controller.isGeometryVisible(a)?(null!=this._labeler&&this._addMetaToLabeler(this._labeler,b),a=a.index,this._addNodeMeta(a,b),this.updateNodeState(a,c),this._collection.setObjectVisibility(b.objectHandle,!0),this._updateMaterial(b), |
|
this._setNewNodeOpacity(b),this.elevationInfo.mode!==q.ElevationMode.Absolute&&this._ensureElevationTask().schedule(a),this._updateEngineObject(b),this._highlights.objectCreated(b),null!=this._treeDebugger&&this._treeDebugger.update()):this._cacheGPUData(b)}addCachedNodeData(a,b,c,d){return this._addData(a,c,()=>this._addCachedNodeData(a,b,d))}async deleteCachedNodeData(a){if(this._idbCacheEnabled)return this._idbCache.remove(this._getCacheKey(a))}async _addCachedNodeData(a,b,c){if(this.contentVisible&& |
|
this._controller.isGeometryVisible(a))if(null==b)this._addNodeMeta(a.index,null);else{var d=this._addTasks.get(a.index),{geometryData:e,transformedGeometry:f,globalTrafo:g}=b;await this.i3sOverrides.applyAttributeOverrides(e.featureIds,d.attributeInfo,c,this._controller.requiredAttributes);var k=null!=b.textureData?b.textureData.filter(C=>null!=C&&0!==(C.usage&this.rendererTextureUsage)):[];!pa("disable-feature:i3s-basis")&&k.some(C=>null!=C&&(C.encoding===K.TextureEncoding.Basis||C.encoding===K.TextureEncoding.KTX2))&& |
|
await Na.loadBasis();a.memory=0;var {componentOffsets:m,geometries:p,featureIds:r,anchorIds:t,anchors:y}=e,A=this._collection,l=p[0],{layout:n,indices:v,interleavedVertexData:E,positionData:L,hasColors:Wb}=f,{material:na,geometryParameters:Xa}=this._materialParameters(l,n),da=m||new Uint32Array([0,v?v.length:E.byteLength/n[0].stride]);da={vertices:{data:E,count:E.byteLength/n[0].stride,layoutParameters:Xa},positionData:{positions:nb.compactFloatArray(L.data),indices:ob.compactIndices(L.indices)}, |
|
indices:v,componentOffsets:da};var N=l.transformation?Ea.clone(l.transformation):Ea.create();Da.multiply(N,g,N);l=Da.getTranslation(P.create(),N);N=Ba.fromMat4(Ca.create(),N);var ea=this.view.renderSpatialReference,O=this.view.basemapTerrain.spatialReference,va=Z.Obb.fromData(b.geometryObbData).center,fa=[1,1,1];kb.localLinearScaleFactors(va,ea,fa,O)||H.getLogger("esri.views.3d.layers.I3SMeshView3D").errorOnce("Unsupported coordinate system for IM overlay");var wa=P.create();qa.projectVectorToVector(va, |
|
ea,wa,O);ea=Ca.create();Ba.invert(ea,N);O=P.create();D.transformMat3(O,D.sub(O,va,l),ea);var oa=A.createObject(new Mb.ObjectParameters(ib.fromValues(wa[0]-O[0]*fa[0],wa[1]-O[1]*fa[1],fa[0],fa[1]),new Ob.Transform(l,N),Z.Obb.fromData(b.geometryObbData),da)),{textures:Ya,texturePromise:Xb}=this._initMaterialAndTextures(oa,na,k,Xa.textureCoordinates===ka.TextureCoordinateAttributeType.Atlas);a.memory+=this._memEstimateGeometryAdded(oa);a.memory+=Ya.reduce((C,J)=>C+(null!=J?this._memEstimateTextureAdded(J): |
|
0),0);k=!!na.hasParametersFromSource;da="blend"!==na.alphaMode&&1<=na.metallicRoughness.baseColorFactor[3];var B=new Tb(a,r,oa,this._getInvalidRendererVersion(),d.attributeInfo,{hasParametersFromSource:k,isOpaque:da},Ya,t,y);d.meta=B;!this._hasTextures&&b.requiredTextures?.some(({usage:C})=>0!==(C&K.TextureUsage.ColorTextures))&&(this._hasTextures=!0);this._hasData=!0;this._hasColors=this._hasColors||Wb;this._hasTextures=this._hasTextures||!!a.resources.texture;this.notifyChange("hasTexturesOrVertexColors"); |
|
var Yb=this.slicePlaneEnabled;return Promise.all([this._addOrUpdateEdgeRendering(B),Xb]).then(([C])=>{this._addTasks.has(a.index)&&C?.updateObjectVisibility(B.objectHandle,!1).catch(J=>M(J,this.i3slayer.title));return this._safeReschedule(()=>{var J=this._addTasks.get(a.index);if(J)if(this._addNodeMeta(a.index,B),J.meta=null,this.contentVisible){A.setObjectVisibility(oa,!0);C?.updateObjectVisibility(B.objectHandle,!0).catch(Zb=>M(Zb,this.i3slayer.title));B.attributeInfo=J.attributeInfo;J=B.cachedRendererVersion!== |
|
this._rendererVersion;var $b=Yb!==this.slicePlaneEnabled;this._updateElevationOffsets(B);var ac=B.elevationOffsets;this._updateComponentData(B);var bc=this._applyFiltersToNode(B);(J||null!=C&&($b||bc||ac))&&this._addOrUpdateEdgeRendering(B);null!=this._labeler&&this._addMetaToLabeler(this._labeler,B);this._visibleGeometryChanged(B,I.ADD);this._highlights.objectCreated(B);this._updateMaterial(B);this._setNewNodeOpacity(B);null!=this._treeDebugger&&this._treeDebugger.update()}else this._removeNodeStageData(a.index, |
|
this.elevationOffset)},c)}).catch(C=>{null!=d.meta&&(this._cacheGPUData(d.meta),d.meta=null);throw C;})}else this._removeNodeStageData(a.index,this.elevationOffset,this._nodeId2MetaReloading)}_addNodeMeta(a,b){this._removeNodeStageData(a,this.elevationOffset,this._nodeId2MetaReloading);if(this._nodeId2Meta.has(a)){H.getLogger("esri.views.3d.layers.I3SMeshView3D").error("Removing duplicated node");const c=this._nodeId2Meta.get(a);null!=c&&this._deleteComponentObject(c)}else this._controller.updateLoadStatus(a, |
|
!0);null!=b&&(b.lodCrossfadeProgress=null,this.nodeCrossfadingEnabled&&aa(b.cachedEdgeMaterials,0));this._nodeId2Meta.set(a,b);this.notifyChange("elevationRange")}_updateElevationOffsets(a){const b=this.view.renderSpatialReference,c=this._controller.crsIndex,d=this.elevationInfo,e=this.view.basemapTerrain,f=e.spatialReference,g=d.mode;if(null==b||null==f||g===q.ElevationMode.Absolute)a.elevationOffsets=null;else{var k=this._collection.getObjectTransform(a.objectHandle);a.elevationOffsets=a.elevationOffsets?? |
|
[];var m=g===q.ElevationMode.OnTheGround,p=this.view.renderCoordsHelper,r=a.featureIds.length,t=(()=>{if(a.cachedElevationAnchors)return a.cachedElevationAnchors;const l=Ga.newDoubleArray(3*r);a.cachedElevationAnchors=l;for(let n=0;n<r;n++){const v=3*n,E=a.anchorIds?.indexOf(n)??-1;a.anchors&&0<=E?(D.set(z,a.anchors[3*E],a.anchors[3*E+1],a.anchors[3*E+2]),D.add(z,z,W.getCenter(a.node.serviceMbsInIndexSR)),qa.projectVectorToVector(z,c,z,f),l[v]=z[0],l[v+1]=z[1],l[v+2]=p.getAltitude(z)):(this._collection.getComponentAabb(a.objectHandle, |
|
n,R,!0),D.set(z,(R[0]+R[3])/2,(R[1]+R[4])/2,R[2]),D.transformMat3(z,z,k.rotationScale),D.add(z,z,k.position),l[v+2]=p.getAltitude(z),qa.projectVectorToVector(z,b,z,f),l[v]=z[0],l[v+1]=z[1])}return l})(),y=d.offset,A=a.elevationOffsets;e.getElevations(t,r,(l,n)=>{const v=m?t[3*l+2]:0;A[l]=y+(null!=n?n-v:0)})}}_ensureElevationTask(){return null!=this._elevationTask?this._elevationTask:this._elevationTask=new Bb.I3SAsyncElevationUpdater(this.view.resourceController.scheduler,a=>{a=this._controller.updateElevationChanged(a, |
|
this.view.basemapTerrain.spatialReference);return null!=a?a.filterInPlace(b=>null!=this._nodeId2Meta.get(b)):null},a=>{a=this._nodeId2Meta.get(a);this._nodeElevationAlignmentChanged(a)},()=>this.elevationInfo?.mode)}_elevationInfoChanged(a,b){const c=a.mode!==q.ElevationMode.Absolute;a=!!b&&b!==a&&b.mode!==q.ElevationMode.Absolute;this._intersectionHandler.updateElevationAlignState(c,this.view.state.viewingMode);c&&!a&&this._controller.removeAllGeometryObbs();this._nodeId2Meta.forEach(d=>this._nodeElevationAlignmentChanged(d))}_nodeElevationAlignmentChanged(a){null!= |
|
a&&(this._updateElevationOffsets(a),this._updateComponentData(a),this._updateEdgeRendering(a),null!=this._labeler&&this._labeler.updateLabelPositions(a),this._updateSnappingSources(a,I.UPDATE))}_safeReschedule(a,b){T.throwIfAborted(b);return this._controller.reschedule(a,b)}_materialParameters(a,b){a=null!=a.params.material?a.params.material:X.defaultMaterial();const c=b.some(e=>"uvRegion"===e.name);b=b.some(e=>"normalCompressed"===e.name);const d=Oa(a);return{geometryParameters:this._getGeometryParameters({hasTexture:d, |
|
hasNormals:b,hasRegions:c}),material:a}}_initMaterialAndTextures(a,b,c,d){const e=this._stage.renderView,f=c.map(k=>X.createTexture(k,b,d,e));this._stage.addMany(f);let g=null;this._collection.updateMaterial(a,k=>{g=X.configureMaterial(k,b,f,c,this.view._stage.renderView.textures,{rendererTextureUsage:this.rendererTextureUsage,usePBR:this._usePBR,isIntegratedMesh:this._isIntegratedMesh,slicePlaneEnabled:this.slicePlaneEnabled,viewSpatialReference:this.view.spatialReference});this._updateMaterialOverlay(k)}); |
|
return{textures:f,texturePromise:g}}_getGeometryParameters(a){return{textureCoordinates:a.hasTexture?a.hasRegions?ka.TextureCoordinateAttributeType.Atlas:ka.TextureCoordinateAttributeType.Default:ka.TextureCoordinateAttributeType.None,colors:this._hasVertexColors,hasNormals:a.hasNormals&&this._needsNormals,needsNormals:this._needsNormals}}_addData(a,b,c){let d=this._addTasks.get(a.index);d?d.attributeInfo=b:(d={...T.createResolver(),attributeInfo:b,meta:null},this._addTasks.set(a.index,d),c().then(d.resolve, |
|
d.reject).then(()=>this._addTasks.delete(a.index)).catch(e=>{this._addTasks.delete(a.index);throw e;}));return d.promise}_clearAddTasks(){this._addTasks.forEach(a=>{null!=a.meta&&(this._cacheGPUData(a.meta),a.meta=null)});this._addTasks.clear()}_clippingAreaChanged(){var a=this.view.renderSpatialReference;const b=this.i3slayer.spatialReference,c=V.create();this._renderClippingArea=Ma.toBoundingRect(this.view.clippingArea,c,a)?c:null;a=V.create();this._layerClippingArea=Ma.toBoundingRect(this.view.clippingArea, |
|
a,b)?a:null;this._filterChange();this._controller&&this._controller.updateClippingArea(this.view.clippingArea);this._isIntegratedMesh&&this._modificationsChanged()}get hasGeometryFilter(){return!1}_geometryFilterChange(){const a=this.hasGeometryFilter;this._controller.geometryFilterChanged(a);this._applyFilters(a)}_filterChange(){this._applyFilters(this.hasGeometryFilter)}_applyFilters(a){this._filters=this.getFilters();a?this._controller&&this._controller.requestUpdate():this._nodeId2Meta.forEach(b=> |
|
{null!=b&&this._applyFiltersToNode(b)&&(this._addOrUpdateEdgeRendering(b),this._visibleGeometryChanged(b,I.UPDATE))})}getFilters(){const a=[],b=this._renderClippingArea;null!=b&&a.push((c,d)=>this._boundingRectFilter(c,d,b));return a}addSqlFilter(a,b,c){if(null!=b){const d=b.fieldNames;a.push((e,f)=>this._sqlFilter(e,f,b,d,c))}}_sqlFilter(a,b,c,d,e){const f={},g=this._createLayerGraphic(f),k=this.i3slayer.objectIdField,m=b.featureIds,p=b.attributeInfo?.attributeData;d.every(r=>r===k||null!=p?.[r])&& |
|
x.filterInPlace(a,m,r=>{f[k]=m[r];for(const t of d)t!==k&&(f[t]=p?x.getCachedAttributeValue(p[t],r):null);try{return c.testFeature(g)}catch(t){return e(t),!1}})}_boundingRectNodeTest(a,b){lb.projectBoundingSphere(a.node.serviceMbsInIndexSR,this._controller.crsIndex,Wa,this.view.renderSpatialReference);return x.intersectBoundingRectWithMbs(b,Wa)}_boundingRectFeatureTest(a,b,c){this._collection.getComponentAabb(a.objectHandle,b,Ua);U.toRect(Ua,Va);return V.intersects(c,Va)}_boundingRectFilter(a,b,c){var d= |
|
this._collection;const e=this._boundingRectNodeTest(b,c);if(e!==x.MbsIntersectResult.INSIDE)if(e===x.MbsIntersectResult.OUTSIDE)a.length=0;else if(d=d.getComponentCount(b.objectHandle),d.invisible+d.visible===b.featureIds.length){var f=this._transformClippingArea(Ub,c,b.objectHandle);x.filterInPlace(a,b.featureIds,g=>this._boundingRectFeatureTest(b,g,f))}}_transformClippingArea(a,b,c){var d=this._collection.getObjectTransform(c);c=d.position;d=d.rotationScale;a[0]=(b[0]-c[0])/d[0];a[1]=(b[1]-c[1])/ |
|
d[4];a[2]=(b[2]-c[0])/d[0];a[3]=(b[3]-c[1])/d[4];return a}async _addOrUpdateEdgeRendering(a,b=!0){const c=a.objectHandle,{hasEdges:d,perFeatureEdgeMaterials:e}=this._getFilteredEdgeMaterials(a),f={hasSlicePlane:this.slicePlaneEnabled};d&&!this._edgeView&&(this._edgeView=await this._stage.renderer.loadEdgeView());const g=this._edgeView;if(!g)return null;var k=g.hasObject(c);if(d){if(k)return this.nodeCrossfadingEnabled&&(k=this.getNodeOpacity(a),aa(e,k)),g.updateAllComponentMaterials(c,e,f,b).catch(m=> |
|
M(m,this.i3slayer.title)),g.updateObjectVisibility(c,!0).catch(m=>M(m,this.i3slayer.title)),g.updateAllVerticalOffsets(c,a.elevationOffsets).catch(m=>M(m,this.i3slayer.title)),g;b=await this._collection.addEdges(c,g,e,f,a.elevationOffsets);a.edgeMemoryUsage=b;a.node.memory+=b;return g}k&&(a.node.memory-=a.edgeMemoryUsage,a.edgeMemoryUsage=0,g.removeObject(c));return null}_applyFiltersToNode(a){return this._applyFiltersToNodeComponents(a)?(null!=this._labeler&&this._labeler.applyFilterChange(a),!0): |
|
!1}_applyFiltersToNodeComponents(a){const b=this._collection;var c=b.getComponentCount(a.objectHandle),d=null!=a.filteredIds;c=0===c.invisible;b.setAllComponentVisibilities(a.objectHandle,"all");if(0===this._filters.length)return a.filteredIds=null,!c;this._updateCachedFilteredIds(a);if(d&&a.filteredIds===a.featureIds)return!c;d=this._computeFilteredComponentIndices(a);b.setAllComponentVisibilities(a.objectHandle,d);return!0}_updateCachedFilteredIds(a){if(null==a.filteredIds||a.appliedFilters!==this._filters)a.filteredIds= |
|
this._computeFilteredIds(a),a.appliedFilters=this._filters}_computeFilteredIds(a){const b=a.featureIds.slice();for(const c of this._filters)if(c(b,a),0===b.length)break;return b.length===a.featureIds.length?a.featureIds:b}_computeFilteredComponentIndices(a){const b=[],c=a.filteredIds;null!=c&&a.featureIds.forEach((d,e)=>{c[b.length]===d&&b.push(e)});return b}_removeAllNodeDataFromStage(a=this.elevationOffset){this._nodeId2Meta.forEach((b,c)=>this._removeNodeStageData(c,a));this._nodeId2MetaReloading.forEach((b, |
|
c)=>this._removeNodeStageData(c,a,this._nodeId2MetaReloading));this._elevationTask=F.destroyMaybe(this._elevationTask)}removeNode(a){const b=this.elevationOffset;this._removeNodeStageData(a,b);this._removeNodeStageData(a,b,this._nodeId2MetaReloading);null!=this._elevationTask&&this._elevationTask.remove(a)}_removeNodeStageData(a,b,c=this._nodeId2Meta){c.has(a)&&this._controller.updateLoadStatus(a,!1);const d=c.get(a);null==d?c.delete(a):(this._collection.setObjectVisibility(d.objectHandle,!1),null!= |
|
this._edgeView&&this._edgeView.hasObject(d.objectHandle)&&this._edgeView.updateObjectVisibility(d.objectHandle,!1).catch(e=>M(e,this.i3slayer.title)),this._visibleGeometryChanged(d,I.REMOVE),null!=this._labeler&&this._labeler.removeNodeMeta(d),c.delete(a),this._highlights.objectDeleted(d),c===this._nodeId2Meta?(this._cacheGPUData(d,b),this.nodeCrossfadingEnabled&&this._crossfadeHelper.stopNodeFading(d)):this._deleteComponentObject(d),null!=this._treeDebugger&&this._treeDebugger.update())}_deleteComponentObject(a){null!= |
|
this._edgeView&&this._edgeView.removeObject(a.objectHandle);this._memEstimateGeometryRemoved(a.objectHandle);this._collection.destroyObject(a.objectHandle);if(a.textures)for(const b of a.textures)this._memEstimateTextureRemoved(b),this._stage.remove(b)}updateNodeState(a,b){a=this._nodeId2Meta.get(a);null!=a&&this._collection.updateMaterial(a.objectHandle,c=>c.polygonOffsetEnabled=b===ra.NodeState.Hole)}updateNodeIndex(a,b){if(this._nodeId2Meta.has(a)){var c=this._nodeId2Meta.get(a);this._nodeId2Meta.delete(a); |
|
this._nodeId2Meta.set(b,c);this.notifyChange("elevationRange")}if(c=this._nodeId2MetaReloading.get(a))this._nodeId2MetaReloading.delete(a),this._nodeId2MetaReloading.set(b,c)}_invalidateAllSymbols(){this._rendererVersion=x.addWraparound(this._rendererVersion,1);this._controller&&this._controller.requestUpdate()}_getInvalidRendererVersion(){return x.addWraparound(this._rendererVersion,-1)}async _rendererChange(a){this._currentRenderer=a;this.notifyChange("rendererTextureUsage");this._rendererVersion= |
|
x.addWraparound(this._rendererVersion,1);this._opacityVariable=this._colorVariable=this._rendererFields=null;this._invalidateAllSymbols();a&&(this._rendererFields=await a.getRequiredFields(this.i3slayer.fieldsIndex));this._updateSymbologyFields();!this._arcade&&a&&"arcadeRequired"in a&&a.arcadeRequired&&(this._arcade=await ub.loadArcade());if(a&&"visualVariables"in a&&a.visualVariables)for(const b of a.visualVariables)"color"===b.type?this._colorVariable=b:"opacity"===b.type?this._opacityVariable= |
|
b:H.getLogger("esri.views.3d.layers.I3SMeshView3D").warn(`Unsupported visual variable type for 3D Object Scene Services: ${b.type}`);if(a)for(const b of a.getSymbols())"mesh-3d"!==b.type&&H.getLogger("esri.views.3d.layers.I3SMeshView3D").error(`Symbols of type '${b.type}' are not supported for 3D Object Scene Services.`);this._controller&&this._controller.requestUpdate()}_getCachedEdgeMaterials(a){this._hasComponentData&&a.cachedRendererVersion!==this._rendererVersion&&this._updateCachedRendererData(a); |
|
return a.cachedEdgeMaterials}_getComponentParameters(a){this._hasComponentData&&a.cachedRendererVersion!==this._rendererVersion&&this._updateCachedRendererData(a);const b=a.cachedSymbology;return(c,d)=>{const e=5*c;hb.set(d.externalColor,b[e]/255,b[e+1]/255,b[e+2]/255,b[e+3]/255);if(null!=this._stage.renderView.objectAndLayerIdRenderHelper){const f=a.featureIds[c],g=vb.isBasemapLayer(this.view.map,this.layerUid);this._stage.renderView.objectAndLayerIdRenderHelper.setUidToObjectAndLayerId(f,f,this.layerId, |
|
this.layerUid+"_"+this.sublayerId,this.layerPopupEnabledAndHasTemplate&&!g,a.node.resources.attributes,c,this.sublayerId);d.objectAndLayerIdColor=this._stage.renderView.getObjectAndLayerIdColor({graphicUid:f,layerUid:this.layerUid+"_"+this.sublayerId})}d.externalColorMixMode=b[e+4]&(1<<Q.CastShadows)-1;d.castShadows=0!==(b[e+4]&1<<Q.CastShadows);d.pickable=0!==(b[e+4]&1<<Q.Pickable);d.elevationOffset=a.elevationOffsets?.[c]??0}}_getSymbolInfo(a,b){b=a?.getSymbol(b,{arcade:this._arcade});if(!(b instanceof |
|
wb))return null;a=b.id;if(this._symbolInfos.has(a))return this._symbolInfos.get(a);b=x.getSymbolInfo(b);this._symbolInfos.set(a,b);return b}_setSymbologyOverride(a,b){this._symbologyOverride!==a&&(this._symbologyOverride=a,this._symbologyOverrideFields=b,this._invalidateAllSymbols(),this._updateSymbologyFields())}_updateSymbologyFields(){this._symbologyFields=null!=this._symbologyOverrideFields&&0<this._symbologyOverrideFields.length?null!=this._rendererFields&&0<this._rendererFields.length?sb.fixFields(this.i3slayer.fieldsIndex, |
|
[...this._rendererFields,...this._symbologyOverrideFields]):this._symbologyOverrideFields:this._rendererFields}_updateCachedRendererData(a){a.cachedRendererVersion=this._rendererVersion;if(this._hasComponentData){var b=this._tmpAttributeOnlyGraphic,c={};b.attributes=c;var d=this._currentRenderer,e=a.attributeInfo?.attributeData,f=null!=a.featureIds?this.i3slayer.objectIdField:null,g=null!=e&&null!=this._symbologyFields&&0<this._symbologyFields.length,k=null,m=null;if(g&&null!=this._symbologyFields){k= |
|
[];m=[];for(var p of this._symbologyFields){var r=e[p];r&&(k.push(p),m.push(r))}}a.cachedSymbology||(a.cachedSymbology=pb.newUByteArray(5*a.featureIds.length));e={color:ba,castShadows:!0,pickable:!0,colorMixMode:ja.ColorMixModeEnum.Multiply,edgeMaterial:null};p=this.fullOpacity;p=this.nodeCrossfadingEnabled?this.getNodeOpacity(a):p;r=null;var t=la.Transparency.OPAQUE,y=x.transparentEdgeMaterial,A=0;for(let E=0;E<a.featureIds.length;E++){null!=f&&(c[f]=a.featureIds[E]);if(g&&k)for(var l=0;l<k.length;l++)c[k[l]]= |
|
x.getCachedAttributeValue(m[l],E);var n=d?this._getSymbolInfo(d,b):null;let L=l=null;if(d&&"visualVariables"in d){if(this._colorVariable){var v=Ha.getColor(this._colorVariable,b,{color:Vb,arcade:this._arcade});v&&(l=ba,l[0]=v.r/255,l[1]=v.g/255,l[2]=v.b/255,this._opacityVariable||null===v.a||(L=v.a))}this._opacityVariable&&(L=Ha.getOpacity(this._opacityVariable,b,{arcade:this._arcade}))}n?.material&&(v=n.material,l=null==l||null==L?Ka.overrideColor(l,L,v.color,v.alpha,Ta,ba):Ka.overrideColor(l,L, |
|
null,null,Ta,ba));null==l&&(l=ba,l[0]=1,l[1]=1,l[2]=1,l[3]=1);e.pickable=!0;e.castShadows=n?n.castShadows:!0;e.colorMixMode=n?.material?n.material.colorMixMode:ja.ColorMixModeEnum.Multiply;e.edgeMaterial=n?n.edgeMaterial:null;null!=this._symbologyOverride&&(e.color=l,this._symbologyOverride(b,e),l=e.color);null!=this._nodeColorOverride&&(this._nodeColorOverride(a.node,l),e.colorMixMode=ja.ColorMixModeEnum.Replace);if(null!=e.edgeMaterial){n=0>=l[3]?la.Transparency.INVISIBLE:1<=l[3]&&(a.material.isOpaque|| |
|
e.colorMixMode===ja.ColorMixModeEnum.Replace)?la.Transparency.OPAQUE:la.Transparency.TRANSPARENT;if(e.edgeMaterial!==r||n!==t)y={...e.edgeMaterial,opacity:p,objectTransparency:n},r=e.edgeMaterial,t=n;a.cachedEdgeMaterials[E]=y}else a.cachedEdgeMaterials[E]=x.transparentEdgeMaterial;a.cachedSymbology[A++]=Math.round(255*l[0]);a.cachedSymbology[A++]=Math.round(255*l[1]);a.cachedSymbology[A++]=Math.round(255*l[2]);a.cachedSymbology[A++]=Math.round(255*l[3]);a.cachedSymbology[A++]=e.colorMixMode|+e.castShadows<< |
|
Q.CastShadows|+e.pickable<<Q.Pickable}}}_getFilteredEdgeMaterials(a){var b=this._getCachedEdgeMaterials(a);this.nodeCrossfadingEnabled||aa(b,this.fullOpacity);const c=a.filteredIds;if(null==c)return{hasEdges:b.some(f=>f!==x.transparentEdgeMaterial),perFeatureEdgeMaterials:b};let d=0,e=!1;b=b.map((f,g)=>{if(a.featureIds[g]!==c[d])return x.transparentEdgeMaterial;e=e||f!==x.transparentEdgeMaterial;d++;return f});return{hasEdges:e,perFeatureEdgeMaterials:b}}_updateComponentData(a){if(this._hasComponentData){var b= |
|
a.objectHandle;a=this._getComponentParameters(a);this._collection.setComponentData(b,a);this._stage.renderView.requestRender()}}_reloadAll(a=this.elevationOffset){this._removeAllNodeDataFromStage(a);null!=this._controller&&this._controller.restartNodeLoading()}_opacityChange(a){this.nodeCrossfadingEnabled&&this._crossfadeHelper.stopAllNodeFading();this._nodeId2Meta.forEach(b=>{null!=b&&(this._collection.updateMaterial(b.objectHandle,c=>c.objectOpacity=a),aa(b.cachedEdgeMaterials,a),this._updateEdgeRendering(b))})}_updateMaterial(a){this._collection.updateMaterial(a.objectHandle, |
|
b=>{b.commonMaterialParameters.hasSlicePlane=this.slicePlaneEnabled;b.usePBR=this._usePBR;this._updateMaterialOverlay(b)})}_updateMaterialOverlay(a){}_updateEngineObject(a){this._updateComponentData(a);this._applyFiltersToNode(a);this._addOrUpdateEdgeRendering(a);this._visibleGeometryChanged(a,I.UPDATE)}_slicePlaneEnabledChange(a){this._intersectionHandler&&(this._intersectionHandler.slicePlaneEnabled=a);null!=this._labeler&&(this._labeler.slicePlaneEnabled=a);this._nodeId2Meta.forEach(b=>{null!= |
|
b&&(this._collection.updateMaterial(b.objectHandle,c=>c.commonMaterialParameters.hasSlicePlane=a),this._updateEdgeRendering(b,!1))})}_updatePBR(a){this._nodeId2Meta.forEach(b=>{null!=b&&this._collection.updateMaterial(b.objectHandle,c=>c.usePBR=a)});this._hasLoadedPBRTextures=!0}get _usePBR(){return this._needsNormals&&this.view.qualitySettings.physicallyBasedRenderingEnabled}_updateEdgeRendering(a,b=!0){null!=this._edgeView&&this._edgeView.hasObject(a.objectHandle)&&this._addOrUpdateEdgeRendering(a, |
|
b)}_forAllNodes(a){this._nodeId2Meta.forEach(a)}_ignoreClientNodeOverriddenFeatures(a){return this.i3sOverrides.hasGeometryChanges?(b,c,d)=>0<=d.node.index&&this.i3sOverrides.featureHasGeometryChanges(b)?q.ForAllFeaturesReturnType.CONTINUE:a(b,c,d):a}_forAllFeatures(a,b,c){za.someMap(this._nodeId2Meta,d=>{if(null==d)return!1;if(null!=b)switch(b(d)){case q.ForAllFeaturesReturnType.EXIT:return!0;case q.ForAllFeaturesReturnType.SKIP:return!1}let e=q.ForAllFeaturesReturnType.CONTINUE;switch(c){case q.ForAllFeaturesMode.ALL:e= |
|
this._forAllFeaturesOfNode(d,a);break;case q.ForAllFeaturesMode.VISIBLE_ONLY:e=this._forAllVisibleFeaturesOfNode(d,a);break;case q.ForAllFeaturesMode.QUERYABLE:e=this._forAllQueryableFeaturesOfNode(d,a)}return e===q.ForAllFeaturesReturnType.EXIT})}_forAllFeaturesOfNode(a,b){let c=q.ForAllFeaturesReturnType.CONTINUE;const d=a.featureIds;for(let e=0;e<d.length&&(c=b(d[e],e,a),c!==q.ForAllFeaturesReturnType.EXIT);e++);return c}_forAllVisibleFeaturesOfNode(a,b){let c=q.ForAllFeaturesReturnType.CONTINUE; |
|
const d=a.featureIds;this._collection.forEachVisibleComponent(a.objectHandle,e=>{c=b(d[e],e,a);return c===q.ForAllFeaturesReturnType.CONTINUE});return c}_forAllQueryableFeaturesOfNode(a,b){b=this._ignoreClientNodeOverriddenFeatures(b);if(null==this._renderClippingArea)return this._forAllFeaturesOfNode(a,b);var c=this._boundingRectNodeTest(a,this._renderClippingArea);if(c===x.MbsIntersectResult.OUTSIDE)return q.ForAllFeaturesReturnType.CONTINUE;if(c===x.MbsIntersectResult.INSIDE)return this._forAllFeaturesOfNode(a, |
|
b);c=q.ForAllFeaturesReturnType.CONTINUE;const d=a.featureIds,e=x.getClipRect(this._renderClippingArea,this._collection.getObjectTransform(a.objectHandle));for(let f=0;f<d.length;f++){if(!this._boundingRectFeatureTest(a,f,e))continue;const g=b(d[f],f,a);if(g===q.ForAllFeaturesReturnType.EXIT)return g}return c}_createAttributes(a,b){const c={};null!=b.featureIds&&(c[this._getObjectIdField()]=b.featureIds[a]);b=b.attributeInfo?.attributeData;if(null!=b)for(const d of Object.keys(b))c[d]=x.getCachedAttributeValue(b[d], |
|
a);return c}_createGraphic(a,b){return this._createLayerGraphic(this._createAttributes(a,b))}highlight(a){"number"===typeof a?a=[a]:a instanceof ha?a=[a]:a instanceof bb&&(a=a.toArray());if(Array.isArray(a)&&0<a.length){if(a[0]instanceof ha){const b=this.i3slayer.fieldsIndex,c=this._getObjectIdField();a=a.map(f=>sa.attributeLookup(b,f.attributes,c));const {set:d,handle:e}=this._highlights.acquireSet();this._highlights.setFeatureIds(d,a);return e}if("number"===typeof a[0]){const {set:b,handle:c}=this._highlights.acquireSet(); |
|
this._highlights.setFeatureIds(b,a);return c}}return cb.makeHandle()}resetHighlights(){F.destroyMaybe(this._highlights);this._highlights=new Ab({collection:this._collection,forAllFeatures:a=>this._forAllFeatures(a,null,q.ForAllFeaturesMode.ALL),forAllFeaturesOfNode:(a,b)=>this._forAllFeaturesOfNode(a,b)})}_visibleGeometryChanged(a,b){if(this._elevationProvider){var c=this.getNodeComponentObb(a.node);c&&this._elevationProvider.objectChanged(c);null==this._visibleGeometryChangedSchedulerHandle&&(this._visibleGeometryChangedSchedulerHandle= |
|
eb.schedule(()=>{this.emit("visible-geometry-changed");this._visibleGeometryChangedSchedulerHandle=null}));this._updateSnappingSources(a,b)}}get performanceInfo(){return new yb.I3SMeshViewPerformanceInfo(this.usedMemory,this._nodeId2Meta.size,Math.round(this._gpuMemoryEstimate/1048576),Math.round(this._geoMemoryEstimate/1048576),Math.round(this._texMemoryEstimate/1048576),Math.round(this.unloadedMemory/1048576),this._idbCacheEnabled?Math.round(100*this._idbCache.getHitRate()):0)}get test(){}getNodeOpacityByIndex(a){a= |
|
this._nodeId2Meta.get(a);return this.getNodeOpacity(a)}getNodeOpacity(a){return null!=a?this._collection.getMaterial(a.objectHandle).objectOpacity:0}isNodeFullyFadedIn(a){return this._crossfadeHelper.isNodeFullyFadedIn(a)}getNodeCrossfadeMetaData(a){return this._nodeId2Meta.get(a)}markNodeToRemove(a){this._controller&&this._controller.markNodeToRemove(a)}removeMarkedNodes(){this._controller&&this._controller.removeMarkedNodes()}foreachCrossfadeNode(a){this._nodeId2Meta.forEach(a)}fadeNode(a,b,c){if(this.nodeCrossfadingEnabled){var d= |
|
this._nodeId2Meta.get(a);null!=d&&this._crossfadeHelper.fadeNode(a,d,b,c)}}setNodeOpacityByIndex(a,b){a=this._nodeId2Meta.get(a);null!=a&&this._setNodeOpacity(a,b)}_setNodeOpacity(a,b){this._collection.updateMaterial(a.objectHandle,c=>c.objectOpacity=b);this._setNodeEdgeOpacity(a,b)}_setNodeEdgeOpacity(a,b){null!=this._edgeView&&a.cachedEdgeMaterials&&(aa(a.cachedEdgeMaterials,b),a=a.objectHandle,this._edgeView.hasObject(a)&&this._edgeView.updateAllComponentOpacities(a,b).catch(c=>M(c,this.i3slayer.title)))}get hasModifications(){return this._isIntegratedMesh&& |
|
null!=this._layerClippingArea||this._modifications&&0<this._modifications.length}updateNodeModificationStatus(a){var b=a.length;if(this.hasModifications&&!(0>=b)&&!0===this._i3sWasmLoaded){b=this.uid;var c=Rb(a);if(c){ia.filterObbsForModificationsSync({context:b,buffer:c.buffer});const d=new Float64Array(c.buffer);a.forAll((e,f)=>{f=ia.interpretObbModificationResults(d[f]);e.imModificationImpact=f;f!==ra.NodeIMModificationImpact.Unmodified&&this._controller.invalidateGeometryVisibility(e.index)})}}}notifyUpdate(){this.notifyChange("updating")}notifyLODUpdate(){this._controller.notifyLODUpdate()}isUpdating(){return!(!this._controller|| |
|
!this._controller.updating)||!!this._visibleGeometryChangedSchedulerHandle||null!=this._labeler&&this._labeler.updating||this._crossfadeHelper?.updating||this._i3sWasmLoaded instanceof Promise||0<this._asyncModuleLoading||null!=this._elevationTask&&this._elevationTask.running}trackSnappingSources(a){const b={events:a,fetchEdgeLocations:async(c,d,e)=>{c=this._nodeId2Meta.get(c);if(null==c)throw Error("invalid-node");const {origin:f,buffer:g}=await this._collection.extractEdgeInformation(c.objectHandle, |
|
d,e);this._snappingLocationsApplyElevation(c,g,f);return{type:"components",objectIds:c.featureIds,locations:g,origin:f}},remove:()=>ya.removeUnordered(this._snappingSourcesTrackers,b)};this._snappingSourcesTrackers.push(b);this._nodeId2Meta.forEach((c,d)=>{null!=c&&(c=this._controller.getRenderMbs(c.node))&&a.add(d,c)});return b}_snappingLocationsApplyElevation(a,b,c){if(a.elevationOffsets&&this.elevationInfo.mode!==q.ElevationMode.Absolute){var d=b.position0,e=b.position1;b=b.componentIndex;var f= |
|
P.create(),g=P.create(),k=(m,p)=>{D.add(m,m,c);this.view.renderCoordsHelper.worldUpAtPosition(m,g);D.add(m,m,D.scale(g,g,p));D.subtract(m,m,c)};for(let m=0;m<d.count;m++){const p=a.elevationOffsets[b.get(m)];d.getVec(m,f);k(f,p);d.setVec(m,f);e.getVec(m,f);k(f,p);e.setVec(m,f)}}}_updateSnappingSources(a,b){const {index:c}=a.node;a=this._controller.getRenderMbs(a.node);if(null!=a)for(const d of this._snappingSourcesTrackers)b!==I.REMOVE&&b!==I.UPDATE||d.events.remove(c),b!==I.ADD&&b!==I.UPDATE||d.events.add(c, |
|
a)}};u.__decorate([w.property()],h.prototype,"_hasLoadedPBRTextures",void 0);u.__decorate([w.property()],h.prototype,"_asyncModuleLoading",void 0);u.__decorate([w.property()],h.prototype,"_visibleGeometryChangedSchedulerHandle",void 0);u.__decorate([w.property()],h.prototype,"view",void 0);u.__decorate([w.property()],h.prototype,"i3slayer",void 0);u.__decorate([w.property()],h.prototype,"_controller",void 0);u.__decorate([w.property()],h.prototype,"_labeler",void 0);u.__decorate([w.property()],h.prototype, |
|
"updating",void 0);u.__decorate([w.property()],h.prototype,"suspended",void 0);u.__decorate([w.property()],h.prototype,"contentVisible",null);u.__decorate([w.property({readOnly:!0})],h.prototype,"legendEnabled",null);u.__decorate([w.property()],h.prototype,"holeFilling",void 0);u.__decorate([w.property(Kb.updatingProgress)],h.prototype,"updatingProgress",void 0);u.__decorate([w.property()],h.prototype,"updatingProgressValue",null);u.__decorate([w.property()],h.prototype,"hasTexturesOrVertexColors", |
|
null);u.__decorate([w.property()],h.prototype,"rendererTextureUsage",null);u.__decorate([w.property()],h.prototype,"elevationOffset",null);u.__decorate([w.property()],h.prototype,"elevationInfo",null);u.__decorate([w.property({type:Boolean})],h.prototype,"slicePlaneEnabled",void 0);u.__decorate([w.property()],h.prototype,"supportedTextureEncodings",null);u.__decorate([w.property()],h.prototype,"uncompressedTextureDownsamplingEnabled",null);u.__decorate([w.property({type:[tb]})],h.prototype,"_modifications", |
|
void 0);u.__decorate([w.property({readOnly:!0})],h.prototype,"clientGeometry",null);u.__decorate([w.property()],h.prototype,"elevationRange",null);u.__decorate([w.property()],h.prototype,"fullExtent",null);u.__decorate([w.property()],h.prototype,"_elevationTask",void 0);u.__decorate([w.property({readOnly:!0})],h.prototype,"_usePBR",null);return h=u.__decorate([fb.subclass("esri.views.3d.layers.I3SMeshView3D")],h)};Object.defineProperty(xa,Symbol.toStringTag,{value:"Module"})}); |