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