@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
1 lines • 3.72 kB
JavaScript
;(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9234],{79234:(e,t,n)=>{var i,a,r,s,o,c,l,u,p,N,g,f,d,m,S;n.r(t),n.d(t,{destroyWasm:()=>D,initialize:()=>R,process:()=>L}),function(e){e.U8="U8",e.I8="I8",e.U16="U16",e.I16="I16",e.U32="U32",e.I32="I32",e.F32="F32",e.F64="F64",e.Utf8String="Utf8String",e.NotSet="NotSet"}(i||(i={})),function(e){e.Png="Png",e.Jpeg="Jpeg",e.Dds="Dds",e.Raw="Raw",e.Dxt1="Dxt1",e.Dxt5="Dxt5",e.Bc7="Bc7",e.Basis="Basis",e.Etc1="Etc1",e.Etc2="Etc2",e.Astc="Astc",e.Pvrtc="Pvrtc",e.NotSet="NotSet"}(a||(a={})),function(e){e.Position="Position",e.Normal="Normal",e.TexCoord="TexCoord",e.Color="Color",e.Tangent="Tangent",e.FeatureIndex="FeatureIndex",e.UvRegion="UvRegion",e.FeatureVariable="FeatureVariable",e.NotSet="NotSet"}(r||(r={})),function(e){e.Opaque="Opaque",e.Mask="Mask",e.Blend="Blend"}(s||(s={})),function(e){e.None="None",e.Mask="Mask",e.Alpha="Alpha",e.PreMultAlpha="PreMultAlpha",e.NotSet="NotSet"}(o||(o={})),function(e){e.Points="Points",e.Lines="Lines",e.LineStrip="LineStrip",e.Triangles="Triangles",e.TriangleStrip="TriangleStrip",e.NotSet="NotSet"}(c||(c={})),function(e){e.None="None",e.WrapXBit="WrapXBit",e.WrapYBit="WrapYBit",e.WrapXy="WrapXy",e.NotSet="NotSet"}(l||(l={})),function(e){e.Linear="Linear",e.Nearest="Nearest",e.NotSet="NotSet"}(u||(u={})),function(e){e.Linear="Linear",e.Nearest="Nearest",e.NearestMipmapNearest="NearestMipmapNearest",e.LinearMipmapNearest="LinearMipmapNearest",e.NearestMipmapLinear="NearestMipmapLinear",e.LinearMipmapLinear="LinearMipmapLinear",e.NotSet="NotSet"}(p||(p={})),function(e){e.FeatureId="FeatureId",e.GlobalUid="GlobalUid",e.UnspecifiedDateTime="UnspecifiedDateTime",e.EcmaIso8601DateTime="EcmaIso8601DateTime",e.EcmaIso8601DateOnly="EcmaIso8601DateOnly",e.TimeOnly="TimeOnly",e.TimeStamp="TimeStamp",e.ColorRgb="ColorRgb",e.ColorRgba="ColorRgba",e.Unrecognized="Unrecognized",e.NotSet="NotSet"}(N||(N={})),function(e){e.Texture="Texture",e.VertexAtrb="VertexAtrb",e.Implicit="Implicit",e.NotSet="NotSet"}(g||(g={})),function(e){e.Front="Front",e.Back="Back",e.None="None",e.NotSet="NotSet"}(f||(f={})),function(e){e.Pbr="Pbr",e.Unlit="Unlit"}(d||(d={})),function(e){e.Rgb8="Rgb8",e.Rgba8="Rgba8",e.R8="R8",e.Bgr8="Bgr8",e.Bgra8="Bgra8",e.Rg8="Rg8",e.Ga8="Ga8",e.Etc1="Etc1",e.Etc2="Etc2",e.Dxt1="Dxt1",e.Dxt5="Dxt5",e.Bc7="Bc7",e.NotSet="NotSet"}(m||(m={})),function(e){e[e.Succeeded=0]="Succeeded",e[e.Failed=1]="Failed",e[e.MissingInputs=2]="MissingInputs"}(S||(S={}));var b=n(2741);function U(e){return(0,b.s)(`esri/libs/lyr3d/${e}`)}let h,I;async function L(e){if(await R(),e.inputs.length<1)return{result:{status:S.Failed,error:"",jobDescJson:"",data:new Uint8Array(0),missingInputUrls:[]},transferList:[]};const t={ptrs:[],sizes:[]};for(const n of e.inputs){const e=I._malloc(n.byteLength);new Uint8Array(I.HEAPU8.buffer,e,n.byteLength).set(new Uint8Array(n)),t.ptrs.push(e),t.sizes.push(n.byteLength)}const n=I.process(e.jobDescJson,t,e.isMissingResourceCase),i=n.status===S.Succeeded&&n.data,a=n.status===S.MissingInputs&&n.missingInputUrls.length>0;if(i){const e=n.data.slice();n.data=e}else a&&(n.jobDescJson=n.jobDescJson.slice(),n.originalInputs=e.inputs.slice());for(let e=0;e<t.ptrs.length;++e)I._free(t.ptrs[e]);const r=[];if(i)r.push(n.data.buffer);else if(a)for(const t of e.inputs)r.push(t);return{result:n,transferList:r}}function D(){I&&(I.uninitialize_lyr3d_worker_wasm(),I=null)}function R(){return I?Promise.resolve():(h||(h=new Promise((e=>n.e(2343).then(n.bind(n,2343)).then((e=>e.l)).then((({default:t})=>{const n=t({locateFile:U,onRuntimeInitialized:()=>e(n)})})))).catch((e=>{throw e})).then((e=>{I=e,I.initialize_lyr3d_worker_wasm(),h=null}))),h)}}}]);