(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0d640c"],{7283:function(e,t,a){"use strict";a.r(t),a.d(t,"default",(function(){return f}));var s=a("a4ee"),i=a("ce50"),r=a("b2b2"),n=a("3795"),o=a("59b2"),l=(a("b50f"),a("c120"),a("cea0"),a("d386")),d=a("7f83"),c=a("bdba"),h=a("66af"),u=a("365a"),y=a("cc15");let w=class extends(Object(h["a"])(u["a"])){constructor(){super(...arguments),this._usedMemory=0,this._futureMemory=0,this.type="voxel-3d",this._wasmLayerId=-1}initialize(){var e;if("local"!==this.view.viewingMode)throw new i["a"]("voxel:unsupported-viewingMode","Voxel layers support local viewingMode only.",{});if(this.view._stage.renderView.renderingContext.type!==y["a"].WEBGL2)throw new i["a"]("voxel:unsupported-context","Voxel layers are supported in WebGL2 rendering contexts only.",{});if(null==(e=this.view._stage.renderView.renderingContext.capabilities.colorBufferFloat)||!e.textureFloat)throw new i["a"]("voxel:missing-color-buffer-float","Voxel layers require the WebGL2 extension EXT_color_buffer_float",{});const t=this.layer.spatialReference;if(!Object(d["d"])(t,this.view.spatialReference))throw new i["a"]("layerview:spatial-reference-incompatible","The spatial reference of this scene layer is incompatible with the spatial reference of the view",{});const a=this.layer.style.currentVariableId,s=this.layer.getVolume(a),o=this.layer.getVariable(a);if(Object(r["k"])(s)&&Object(r["k"])(o)){const e=s.dimensions[0],t=s.dimensions[1],a=s.getZDimension();if(a>1){const i=s.dimensions[a],r=e.size*t.size*i.size;let n=1;switch(o.renderingFormat.type){case"Int16":case"UInt16":n=2;break;case"Int32":case"UInt32":case"Float32":n=4}this._futureMemory=n*r}}const l=c["a"].getInstance(),h=l.addLayer(this.view,this).then(e=>{this._wasmLayerId=e,this._suspendedHandle=Object(n["a"])(this,"suspended",e=>{c["a"].getInstance().setLayerEnabled(this.view,this,!e)})}).catch(e=>{if(l.removeLayer(this.view,this),this._wasmLayerId=-1,-1===e)throw new i["a"]("voxel:addLayer-failure","The voxel layer description was invalid.",{});if(-2===e)throw new i["a"]("voxel:addLayer-failure","The voxel layer web assembly module failed to download.",{})});this.addResolvingPromise(h)}destroy(){c["a"].getInstance().removeLayer(this.view,this),this._suspendedHandle&&(this._suspendedHandle.remove(),this._suspendedHandle=null)}isUpdating(){return!(this._wasmLayerId<0)&&c["a"].getInstance().isUpdating(this.view,this._wasmLayerId)}updatingFlagChanged(){this.notifyChange("updating")}getUsedMemory(){return this._usedMemory}getUnloadedMemory(){return this._futureMemory}ignoresMemoryFactor(){return!0}get performanceInfo(){return{nodes:0,displayedNumberOfFeatures:0,maximumNumberOfFeatures:0,totalNumberOfFeatures:0,core:null}}setUsedMemory(e){this._usedMemory=e,this._futureMemory=0}};Object(s["a"])([Object(o["b"])()],w.prototype,"layer",void 0),Object(s["a"])([Object(o["b"])({readOnly:!0,aliasOf:"layer.parsedUrl.path"})],w.prototype,"baseUrl",void 0),w=Object(s["a"])([Object(l["a"])("esri.views.3d.layers.VoxelLayerView3D")],w);const f=w}}]); //# sourceMappingURL=chunk-2d0d640c.3a6536f0.js.map