@sanox/sangine-core 0.4.1 → 0.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -135,17 +135,6 @@ export interface MeshFile {
135
135
  triangles: number;
136
136
  url: string;
137
137
  }
138
- /**
139
- * Distances for rendering in meters
140
- *
141
- * This interface was referenced by `Schema`'s JSON-Schema
142
- * via the `definition` "LodDistances".
143
- */
144
- export interface LodDistances {
145
- high: number;
146
- low: number;
147
- medium: number;
148
- }
149
138
  /**
150
139
  * This interface was referenced by `Schema`'s JSON-Schema
151
140
  * via the `definition` "Material".
@@ -213,7 +202,6 @@ export interface ModelPart {
213
202
  export interface RenderingSettings {
214
203
  ambientLighting: IntensityAndTemperature;
215
204
  lightingMode: LightingMode;
216
- lodDistances: LodDistances;
217
205
  quality: RendererAssetQuality;
218
206
  sun: SunProperties;
219
207
  }
@@ -1 +1 @@
1
- {"version":3,"file":"gen-types.d.ts","sourceRoot":"","sources":["../src/gen-types.ts"],"names":[],"mappings":"AACA;;;;GAIG;AAEH;;;GAGG;AACH,MAAM,MAAM,UAAU,GAClB;IACE,cAAc,EAAE;QACd,QAAQ,EAAE,eAAe,CAAC;QAC1B;;;WAGG;QACH,MAAM,EAAE,MAAM,CAAC;QACf,EAAE,EAAE,MAAM,CAAC;QACX,WAAW,EAAE,eAAe,CAAC;QAC7B,GAAG,EAAE,MAAM,CAAC;KACb,CAAC;CACH,GACD;IACE,iBAAiB,EAAE;QACjB,EAAE,EAAE,MAAM,CAAC;QACX,GAAG,EAAE,MAAM,CAAC;KACb,CAAC;CACH,CAAC;AACN;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;AACtD;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAC9D;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,SAAS,CAAC;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K,EAAE,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB"}
package/dist/index.cjs.js CHANGED
@@ -1 +1 @@
1
- "use strict";var M=Object.defineProperty;var E=(i,e,t)=>e in i?M(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var r=(i,e,t)=>E(i,typeof e!="symbol"?e+"":e,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p="/static/sangine/wasm",W="31a02d84";class C{constructor(e,t){r(this,"workers");r(this,"idle");r(this,"queue",[]);this.workers=Array.from({length:t},e),this.idle=[...this.workers]}run(e){return new Promise((t,s)=>{const d=this.idle.pop();d?this.dispatch(d,e,t,s):this.queue.push({request:e,resolve:t,reject:s})})}dispatch(e,t,s,d){const c=g=>{s(g.data),m(),this.release(e)},o=g=>{d(g),m(),this.release(e)},m=()=>{e.removeEventListener("message",c),e.removeEventListener("error",o)};e.addEventListener("message",c,{once:!0}),e.addEventListener("error",o,{once:!0}),e.postMessage(t)}release(e){const t=this.queue.shift();t?this.dispatch(e,t.request,t.resolve,t.reject):this.idle.push(e)}broadcast(e){for(const t of this.workers)t.postMessage(e)}terminate(){for(const e of this.workers)e.terminate()}}class P{constructor(e){r(this,"wasm",null);r(this,"callbackRegistry",{});r(this,"userActionRegistry",{});r(this,"assetsDownloadingRegistry",{});r(this,"windowCreatedPromiseRegistry",{});r(this,"windowCreatedPromiseResolveRegistry",{});r(this,"_inited",!1);r(this,"decodePool");r(this,"_readyPromise");r(this,"_resolveReady");r(this,"_rejectReady");this.config=e,this._readyPromise=new Promise((t,s)=>{this._resolveReady=t,this._rejectReady=s}),this.config=e}async init(){if(!(typeof window>"u")){if(this._inited)return this._readyPromise;try{const t=await import(new URL(`${p}/sangine/sangine.${W}.js`,window.location.origin).toString());await t.default(),this.wasm=t,this._inited=!0;const s=this.config.numWorkers??(navigator.hardwareConcurrency||2)-1;this.decodePool=new C(()=>this.config.createDecodeWorker(),Math.max(s,1)),this.wasm.register_asset_decoder(this.decodeAsset.bind(this)),this.wasm.register_event_listener(this.handleSangineEvent.bind(this)),this._resolveReady()}catch(e){throw this._rejectReady(e),e}return this._readyPromise}}ready(){return this._readyPromise}get inited(){return this._inited}getWasm(){if(!this.wasm)throw new Error("RendererService not initialized");return this.wasm}handleActionChanged(e,t){this.userActionRegistry[e]=t;for(const s of this.callbackRegistry[e].actionChanged)s(t)}handleMeasurementCreated(e,t){for(const s of this.callbackRegistry[e].measurementCreated)s(t)}handleRouteUpdated(e,t){for(const s of this.callbackRegistry[e].routeUpdated)s(t)}handleAssetsDownloading(e,t){this.assetsDownloadingRegistry[e]=t;for(const s of this.callbackRegistry[e].assetsDownloading)s(t)}handleUserInteractionStarted(e){for(const t of this.callbackRegistry[e].userInteractionStarted)t()}handleSangineEvent(e,t){t==="ready"?this.windowCreatedPromiseResolveRegistry[e]():t==="userInteractionStarted"?this.handleUserInteractionStarted(e):"actionChanged"in t?this.handleActionChanged(e,t.actionChanged.action):"measurementCreated"in t?this.handleMeasurementCreated(e,t.measurementCreated.measurement):"routeUnderConstructionUpdated"in t?this.handleRouteUpdated(e,t.routeUnderConstructionUpdated.route):"assetsDownloading"in t&&this.handleAssetsDownloading(e,t.assetsDownloading.downloading)}createWindow(e,t,s){if(!this.wasm)throw new Error("WASM not initialized");let d;const c=new Promise(m=>{d=m}),o=this.wasm.create_window(e,t,s);return this.windowCreatedPromiseResolveRegistry[o]=d,this.callbackRegistry[o]={actionChanged:[],routeUpdated:[],measurementCreated:[],assetsDownloading:[],userInteractionStarted:[]},this.userActionRegistry[o]="watching",this.windowCreatedPromiseRegistry[o]=c,o}getAssetsDownloading(e){return this.assetsDownloadingRegistry[e]||!1}readUserAction(e){return this.userActionRegistry[e]}windowReady(e){return this.windowCreatedPromiseRegistry[e]}registerCallback(e,t,s){this.callbackRegistry[e][t].push(s)}setWindowAction(e,t){if(!this.wasm)throw new Error("WASM not initialized");this.wasm.set_window_action(e,t)}destroyWindow(e){if(!this.wasm)throw new Error("WASM not initialized");this.wasm.destroy_window(e),delete this.callbackRegistry[e],delete this.userActionRegistry[e]}setRouteHighlight(e,t,s){if(!this.wasm)throw new Error("WASM not initialized");this.wasm.set_route_highlight(e,t,s)}setRouteVisible(e,t,s){if(!this.wasm)throw new Error("WASM not initialized");this.wasm.set_route_visible(e,t,s)}animateToRoute(e,t){if(!this.wasm)throw new Error("WASM not initialized");this.wasm.animate_to_route(e,t)}setSunProperties(e,t){if(!this.wasm)throw new Error("WASM not initialized");this.wasm.set_sun_properties(e,t)}setAmbientLighting(e,t){if(!this.wasm)throw new Error("WASM not initialized");this.wasm.set_ambient_lighting(e,t)}setLightingMode(e,t){if(!this.wasm)throw new Error("WASM not initialized");this.wasm.set_lighting_mode(e,t)}setNorthCorrection(e,t){if(!this.wasm)throw new Error("WASM not initialized");this.wasm.set_north_correction(e,t)}setGpuMemoryBudgetMb(e,t){if(!this.wasm)throw new Error("WASM not initialized");this.wasm.set_gpu_memory_budget_mb(e,t)}setRenderQuality(e,t){if(!this.wasm)throw new Error("WASM not initialized");this.wasm.set_render_quality(e,t)}readCameraPos(e){if(!this.wasm)throw new Error("WASM not initialized");return this.wasm.read_camera_pos(e)}animateTo(e,t){if(!this.wasm)throw new Error("WASM not initialized");this.wasm.animate_to(e,t)}setScale(e,t){if(!this.wasm)throw new Error("WASM not initialized");this.wasm.set_window_scale(e,t)}async decodeAsset(e){if(!this.decodePool)throw new Error("Renderer not initialized");return this.decodePool.run(e)}destroy(){var e;(e=this.decodePool)==null||e.terminate()}}const k="a8b7eebd",U="5c359661",D=0;function v(i){let e=!1,t=null,s=null,d=!1,c=null;async function o(f,a){if(c){const w=`https://sangine-asset-cache/${f}`,u=await c.match(w);if(u)return u;const l=await fetch(a);return l.ok&&await c.put(w,l.clone()),l}return fetch(a)}async function m(){if(e)return;const a=await import(new URL(`${p}/sbo-decode/wasm_sbo_decode.${U}.js`,i.location.origin).href);await a.default(),t=a,e=!0}async function g(){if(d)return;const a=await import(new URL(`${p}/basis-decode/wasm_basis_decode.${k}.js`,i.location.origin).href);await a.default(),await a.init_basis(),s=a,d=!0}i.onmessage=async f=>{const{data:a}=f;if(!c&&typeof caches<"u"&&(c=await caches.open("sangine-assets-v1")),"texture-file"in a)try{const{pk:w,url:u,format:l,encoding:_}=a["texture-file"];if(_==="ktx2"){await g();const h=await o(w,u);if(!h.ok)throw new Error(`HTTP error! status: ${h.status}`);const b=await h.arrayBuffer(),y=new Uint8Array(b),n=s.transcode_basis(y,l);i.postMessage({success:!0,width:n.width,height:n.height,data:n.data.buffer,format:n.format},[n.data.buffer])}else{const h=await o(w,u);if(!h.ok)throw new Error(`HTTP error! status: ${h.status}`);const b=await h.blob(),y=await createImageBitmap(b),n=new OffscreenCanvas(y.width,y.height),R=n.getContext("2d");if(R===null)throw new Error("Couldnt create canvas");R.drawImage(y,0,0);const S=R.getImageData(0,0,n.width,n.height);i.postMessage({success:!0,width:n.width,height:n.height,data:S.data.buffer,format:D},[S.data.buffer])}}catch(w){i.postMessage({success:!1,error:w.message})}else if("model-part-mesh"in a){await m();const{pk:w,url:u}=a["model-part-mesh"],l=await o(w,u);if(!l.ok)throw new Error(`HTTP error! status: ${l.status}`);const _=await l.arrayBuffer(),A=new Uint8Array(_),h=t.decode_sbo(A);i.postMessage({success:!0,data:h.buffer},[h.buffer])}}}exports.RendererService=P;exports.registerDecodeWorker=v;
1
+ "use strict";var b=Object.defineProperty;var A=(a,e,t)=>e in a?b(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t;var r=(a,e,t)=>A(a,typeof e!="symbol"?e+"":e,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p="/static/sangine/wasm",M="10c8ee57";class S{constructor(e,t){r(this,"workers");r(this,"idle");r(this,"queue",[]);this.workers=Array.from({length:t},e),this.idle=[...this.workers]}run(e){return new Promise((t,s)=>{const d=this.idle.pop();d?this.dispatch(d,e,t,s):this.queue.push({request:e,resolve:t,reject:s})})}dispatch(e,t,s,d){const l=n=>{s(n.data),i(),this.release(e)},o=n=>{d(n),i(),this.release(e)},i=()=>{e.removeEventListener("message",l),e.removeEventListener("error",o)};e.addEventListener("message",l,{once:!0}),e.addEventListener("error",o,{once:!0}),e.postMessage(t)}release(e){const t=this.queue.shift();t?this.dispatch(e,t.request,t.resolve,t.reject):this.idle.push(e)}broadcast(e){for(const t of this.workers)t.postMessage(e)}terminate(){for(const e of this.workers)e.terminate()}}class E{constructor(e){r(this,"wasm",null);r(this,"callbackRegistry",{});r(this,"userActionRegistry",{});r(this,"assetsDownloadingRegistry",{});r(this,"windowCreatedPromiseRegistry",{});r(this,"windowCreatedPromiseResolveRegistry",{});r(this,"_inited",!1);r(this,"decodePool");r(this,"_readyPromise");r(this,"_resolveReady");r(this,"_rejectReady");this.config=e,this._readyPromise=new Promise((t,s)=>{this._resolveReady=t,this._rejectReady=s}),this.config=e}async init(){if(!(typeof window>"u")){if(this._inited)return this._readyPromise;try{const t=await import(new URL(`${p}/sangine/sangine.${M}.js`,window.location.origin).toString());await t.default(),this.wasm=t,this._inited=!0;const s=Math.min(this.config.numWorkers??(navigator.hardwareConcurrency||2)-1,4);this.decodePool=new S(()=>this.config.createDecodeWorker(),Math.max(s,1)),this.wasm.register_asset_decoder(this.decodeAsset.bind(this)),this.wasm.register_event_listener(this.handleSangineEvent.bind(this)),this._resolveReady()}catch(e){throw this._rejectReady(e),e}return this._readyPromise}}ready(){return this._readyPromise}get inited(){return this._inited}getWasm(){if(!this.wasm)throw new Error("RendererService not initialized");return this.wasm}handleActionChanged(e,t){this.userActionRegistry[e]=t;for(const s of this.callbackRegistry[e].actionChanged)s(t)}handleMeasurementCreated(e,t){for(const s of this.callbackRegistry[e].measurementCreated)s(t)}handleRouteUpdated(e,t){for(const s of this.callbackRegistry[e].routeUpdated)s(t)}handleAssetsDownloading(e,t){this.assetsDownloadingRegistry[e]=t;for(const s of this.callbackRegistry[e].assetsDownloading)s(t)}handleUserInteractionStarted(e){for(const t of this.callbackRegistry[e].userInteractionStarted)t()}handleSangineEvent(e,t){t==="ready"?this.windowCreatedPromiseResolveRegistry[e]():t==="userInteractionStarted"?this.handleUserInteractionStarted(e):"actionChanged"in t?this.handleActionChanged(e,t.actionChanged.action):"measurementCreated"in t?this.handleMeasurementCreated(e,t.measurementCreated.measurement):"routeUnderConstructionUpdated"in t?this.handleRouteUpdated(e,t.routeUnderConstructionUpdated.route):"assetsDownloading"in t&&this.handleAssetsDownloading(e,t.assetsDownloading.downloading)}createWindow(e,t,s){if(!this.wasm)throw new Error("WASM not initialized");let d;const l=new Promise(i=>{d=i}),o=this.wasm.create_window(e,t,s);return this.windowCreatedPromiseResolveRegistry[o]=d,this.callbackRegistry[o]={actionChanged:[],routeUpdated:[],measurementCreated:[],assetsDownloading:[],userInteractionStarted:[]},this.userActionRegistry[o]="watching",this.windowCreatedPromiseRegistry[o]=l,o}getAssetsDownloading(e){return this.assetsDownloadingRegistry[e]||!1}readUserAction(e){return this.userActionRegistry[e]}windowReady(e){return this.windowCreatedPromiseRegistry[e]}registerCallback(e,t,s){this.callbackRegistry[e][t].push(s)}setWindowAction(e,t){if(!this.wasm)throw new Error("WASM not initialized");this.wasm.set_window_action(e,t)}destroyWindow(e){if(!this.wasm)throw new Error("WASM not initialized");this.wasm.destroy_window(e),delete this.callbackRegistry[e],delete this.userActionRegistry[e]}setRouteHighlight(e,t,s){if(!this.wasm)throw new Error("WASM not initialized");this.wasm.set_route_highlight(e,t,s)}setRouteVisible(e,t,s){if(!this.wasm)throw new Error("WASM not initialized");this.wasm.set_route_visible(e,t,s)}animateToRoute(e,t){if(!this.wasm)throw new Error("WASM not initialized");this.wasm.animate_to_route(e,t)}setSunProperties(e,t){if(!this.wasm)throw new Error("WASM not initialized");this.wasm.set_sun_properties(e,t)}setAmbientLighting(e,t){if(!this.wasm)throw new Error("WASM not initialized");this.wasm.set_ambient_lighting(e,t)}setLightingMode(e,t){if(!this.wasm)throw new Error("WASM not initialized");this.wasm.set_lighting_mode(e,t)}setNorthCorrection(e,t){if(!this.wasm)throw new Error("WASM not initialized");this.wasm.set_north_correction(e,t)}setGpuMemoryBudgetMb(e,t){if(!this.wasm)throw new Error("WASM not initialized");this.wasm.set_gpu_memory_budget_mb(e,t)}setRenderQuality(e,t){if(!this.wasm)throw new Error("WASM not initialized");this.wasm.set_render_quality(e,t)}readCameraPos(e){if(!this.wasm)throw new Error("WASM not initialized");return this.wasm.read_camera_pos(e)}animateTo(e,t){if(!this.wasm)throw new Error("WASM not initialized");this.wasm.animate_to(e,t)}setScale(e,t){if(!this.wasm)throw new Error("WASM not initialized");this.wasm.set_window_scale(e,t)}async decodeAsset(e){if(!this.decodePool)throw new Error("Renderer not initialized");return this.decodePool.run(e)}destroy(){var e;(e=this.decodePool)==null||e.terminate()}}const C="bf116aa6",W=0;function P(a){let e=!1,t=null,s=null;async function d(o,i){if(s){const n=`https://sangine-asset-cache/${o}`,u=await s.match(n);if(u)return u;const w=await fetch(i);return w.ok&&await s.put(n,w.clone()),w}return fetch(i)}async function l(){if(e)return;const i=await import(new URL(`${p}/decode/wasm_decode.${C}.js`,a.location.origin).href);await i.default(),await i.init_basis(),t=i,e=!0}a.onmessage=async o=>{const{data:i}=o;if(!s&&typeof caches<"u"&&(s=await caches.open("sangine-assets-v1")),"texture-file"in i)try{const{pk:n,url:u,format:w,encoding:g}=i["texture-file"];if(g==="ktx2"){await l();const c=await d(n,u);if(!c.ok)throw new Error(`HTTP error! status: ${c.status}`);const f=await c.arrayBuffer(),m=new Uint8Array(f),h=t.transcode_basis(m,w);a.postMessage({success:!0,width:h.width,height:h.height,data:h.data.buffer,format:h.format},[h.data.buffer])}else{const c=await d(n,u);if(!c.ok)throw new Error(`HTTP error! status: ${c.status}`);const f=await c.blob(),m=await createImageBitmap(f),h=new OffscreenCanvas(m.width,m.height),y=h.getContext("2d");if(y===null)throw new Error("Couldnt create canvas");y.drawImage(m,0,0);const R=y.getImageData(0,0,h.width,h.height);a.postMessage({success:!0,width:h.width,height:h.height,data:R.data.buffer,format:W},[R.data.buffer])}}catch(n){a.postMessage({success:!1,error:n.message})}else if("model-part-mesh"in i){await l();const{pk:n,url:u}=i["model-part-mesh"],w=await d(n,u);if(!w.ok)throw new Error(`HTTP error! status: ${w.status}`);const g=await w.arrayBuffer(),_=new Uint8Array(g),c=t.decode_sbo(_);a.postMessage({success:!0,data:c.buffer},[c.buffer])}}}exports.RendererService=E;exports.registerDecodeWorker=P;
package/dist/index.es.js CHANGED
@@ -1,8 +1,8 @@
1
- var E = Object.defineProperty;
2
- var M = (i, e, t) => e in i ? E(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
3
- var r = (i, e, t) => M(i, typeof e != "symbol" ? e + "" : e, t);
4
- const p = "/static/sangine/wasm", C = "31a02d84";
5
- class W {
1
+ var b = Object.defineProperty;
2
+ var A = (a, e, t) => e in a ? b(a, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[e] = t;
3
+ var r = (a, e, t) => A(a, typeof e != "symbol" ? e + "" : e, t);
4
+ const p = "/static/sangine/wasm", M = "10c8ee57";
5
+ class E {
6
6
  constructor(e, t) {
7
7
  r(this, "workers");
8
8
  r(this, "idle");
@@ -11,19 +11,19 @@ class W {
11
11
  }
12
12
  run(e) {
13
13
  return new Promise((t, s) => {
14
- const d = this.idle.pop();
15
- d ? this.dispatch(d, e, t, s) : this.queue.push({ request: e, resolve: t, reject: s });
14
+ const h = this.idle.pop();
15
+ h ? this.dispatch(h, e, t, s) : this.queue.push({ request: e, resolve: t, reject: s });
16
16
  });
17
17
  }
18
- dispatch(e, t, s, d) {
19
- const c = (g) => {
20
- s(g.data), m(), this.release(e);
21
- }, o = (g) => {
22
- d(g), m(), this.release(e);
23
- }, m = () => {
24
- e.removeEventListener("message", c), e.removeEventListener("error", o);
18
+ dispatch(e, t, s, h) {
19
+ const l = (n) => {
20
+ s(n.data), i(), this.release(e);
21
+ }, o = (n) => {
22
+ h(n), i(), this.release(e);
23
+ }, i = () => {
24
+ e.removeEventListener("message", l), e.removeEventListener("error", o);
25
25
  };
26
- e.addEventListener("message", c, { once: !0 }), e.addEventListener("error", o, { once: !0 }), e.postMessage(t);
26
+ e.addEventListener("message", l, { once: !0 }), e.addEventListener("error", o, { once: !0 }), e.postMessage(t);
27
27
  }
28
28
  release(e) {
29
29
  const t = this.queue.shift();
@@ -38,7 +38,7 @@ class W {
38
38
  e.terminate();
39
39
  }
40
40
  }
41
- class z {
41
+ class P {
42
42
  constructor(e) {
43
43
  r(this, "wasm", null);
44
44
  r(this, "callbackRegistry", {});
@@ -60,12 +60,15 @@ class z {
60
60
  if (this._inited) return this._readyPromise;
61
61
  try {
62
62
  const t = await import(new URL(
63
- `${p}/sangine/sangine.${C}.js`,
63
+ `${p}/sangine/sangine.${M}.js`,
64
64
  window.location.origin
65
65
  ).toString());
66
66
  await t.default(), this.wasm = t, this._inited = !0;
67
- const s = this.config.numWorkers ?? (navigator.hardwareConcurrency || 2) - 1;
68
- this.decodePool = new W(
67
+ const s = Math.min(
68
+ this.config.numWorkers ?? (navigator.hardwareConcurrency || 2) - 1,
69
+ 4
70
+ );
71
+ this.decodePool = new E(
69
72
  () => this.config.createDecodeWorker(),
70
73
  Math.max(s, 1)
71
74
  ), this.wasm.register_asset_decoder(this.decodeAsset.bind(this)), this.wasm.register_event_listener(this.handleSangineEvent.bind(this)), this._resolveReady();
@@ -113,17 +116,17 @@ class z {
113
116
  }
114
117
  createWindow(e, t, s) {
115
118
  if (!this.wasm) throw new Error("WASM not initialized");
116
- let d;
117
- const c = new Promise((m) => {
118
- d = m;
119
+ let h;
120
+ const l = new Promise((i) => {
121
+ h = i;
119
122
  }), o = this.wasm.create_window(e, t, s);
120
- return this.windowCreatedPromiseResolveRegistry[o] = d, this.callbackRegistry[o] = {
123
+ return this.windowCreatedPromiseResolveRegistry[o] = h, this.callbackRegistry[o] = {
121
124
  actionChanged: [],
122
125
  routeUpdated: [],
123
126
  measurementCreated: [],
124
127
  assetsDownloading: [],
125
128
  userInteractionStarted: []
126
- }, this.userActionRegistry[o] = "watching", this.windowCreatedPromiseRegistry[o] = c, o;
129
+ }, this.userActionRegistry[o] = "watching", this.windowCreatedPromiseRegistry[o] = l, o;
127
130
  }
128
131
  getAssetsDownloading(e) {
129
132
  return this.assetsDownloadingRegistry[e] || !1;
@@ -202,85 +205,77 @@ class z {
202
205
  (e = this.decodePool) == null || e.terminate();
203
206
  }
204
207
  }
205
- const P = "a8b7eebd", k = "5c359661", U = 0;
206
- function v(i) {
207
- let e = !1, t = null, s = null, d = !1, c = null;
208
- async function o(f, a) {
209
- if (c) {
210
- const w = `https://sangine-asset-cache/${f}`, u = await c.match(w);
211
- if (u) return u;
212
- const l = await fetch(a);
213
- return l.ok && await c.put(w, l.clone()), l;
208
+ const S = "bf116aa6", C = 0;
209
+ function k(a) {
210
+ let e = !1, t = null, s = null;
211
+ async function h(o, i) {
212
+ if (s) {
213
+ const n = `https://sangine-asset-cache/${o}`, m = await s.match(n);
214
+ if (m) return m;
215
+ const w = await fetch(i);
216
+ return w.ok && await s.put(n, w.clone()), w;
214
217
  }
215
- return fetch(a);
218
+ return fetch(i);
216
219
  }
217
- async function m() {
220
+ async function l() {
218
221
  if (e) return;
219
- const a = await import(new URL(
220
- `${p}/sbo-decode/wasm_sbo_decode.${k}.js`,
221
- i.location.origin
222
+ const i = await import(new URL(
223
+ `${p}/decode/wasm_decode.${S}.js`,
224
+ a.location.origin
222
225
  ).href);
223
- await a.default(), t = a, e = !0;
226
+ await i.default(), await i.init_basis(), t = i, e = !0;
224
227
  }
225
- async function g() {
226
- if (d) return;
227
- const a = await import(new URL(
228
- `${p}/basis-decode/wasm_basis_decode.${P}.js`,
229
- i.location.origin
230
- ).href);
231
- await a.default(), await a.init_basis(), s = a, d = !0;
232
- }
233
- i.onmessage = async (f) => {
234
- const { data: a } = f;
235
- if (!c && typeof caches < "u" && (c = await caches.open("sangine-assets-v1")), "texture-file" in a)
228
+ a.onmessage = async (o) => {
229
+ const { data: i } = o;
230
+ if (!s && typeof caches < "u" && (s = await caches.open("sangine-assets-v1")), "texture-file" in i)
236
231
  try {
237
- const { pk: w, url: u, format: l, encoding: _ } = a["texture-file"];
238
- if (_ === "ktx2") {
239
- await g();
240
- const h = await o(w, u);
241
- if (!h.ok) throw new Error(`HTTP error! status: ${h.status}`);
242
- const b = await h.arrayBuffer(), y = new Uint8Array(b), n = s.transcode_basis(y, l);
243
- i.postMessage(
232
+ const { pk: n, url: m, format: w, encoding: g } = i["texture-file"];
233
+ if (g === "ktx2") {
234
+ await l();
235
+ const c = await h(n, m);
236
+ if (!c.ok) throw new Error(`HTTP error! status: ${c.status}`);
237
+ const f = await c.arrayBuffer(), u = new Uint8Array(f), d = t.transcode_basis(u, w);
238
+ a.postMessage(
244
239
  {
245
240
  success: !0,
246
- width: n.width,
247
- height: n.height,
248
- data: n.data.buffer,
249
- format: n.format
241
+ width: d.width,
242
+ height: d.height,
243
+ data: d.data.buffer,
244
+ format: d.format
250
245
  },
251
- [n.data.buffer]
246
+ [d.data.buffer]
252
247
  );
253
248
  } else {
254
- const h = await o(w, u);
255
- if (!h.ok) throw new Error(`HTTP error! status: ${h.status}`);
256
- const b = await h.blob(), y = await createImageBitmap(b), n = new OffscreenCanvas(y.width, y.height), R = n.getContext("2d");
257
- if (R === null) throw new Error("Couldnt create canvas");
258
- R.drawImage(y, 0, 0);
259
- const S = R.getImageData(0, 0, n.width, n.height);
260
- i.postMessage(
249
+ const c = await h(n, m);
250
+ if (!c.ok) throw new Error(`HTTP error! status: ${c.status}`);
251
+ const f = await c.blob(), u = await createImageBitmap(f), d = new OffscreenCanvas(u.width, u.height), y = d.getContext("2d");
252
+ if (y === null) throw new Error("Couldnt create canvas");
253
+ y.drawImage(u, 0, 0);
254
+ const R = y.getImageData(0, 0, d.width, d.height);
255
+ a.postMessage(
261
256
  {
262
257
  success: !0,
263
- width: n.width,
264
- height: n.height,
265
- data: S.data.buffer,
266
- format: U
258
+ width: d.width,
259
+ height: d.height,
260
+ data: R.data.buffer,
261
+ format: C
267
262
  },
268
- [S.data.buffer]
263
+ [R.data.buffer]
269
264
  );
270
265
  }
271
- } catch (w) {
272
- i.postMessage({ success: !1, error: w.message });
266
+ } catch (n) {
267
+ a.postMessage({ success: !1, error: n.message });
273
268
  }
274
- else if ("model-part-mesh" in a) {
275
- await m();
276
- const { pk: w, url: u } = a["model-part-mesh"], l = await o(w, u);
277
- if (!l.ok) throw new Error(`HTTP error! status: ${l.status}`);
278
- const _ = await l.arrayBuffer(), A = new Uint8Array(_), h = t.decode_sbo(A);
279
- i.postMessage({ success: !0, data: h.buffer }, [h.buffer]);
269
+ else if ("model-part-mesh" in i) {
270
+ await l();
271
+ const { pk: n, url: m } = i["model-part-mesh"], w = await h(n, m);
272
+ if (!w.ok) throw new Error(`HTTP error! status: ${w.status}`);
273
+ const g = await w.arrayBuffer(), _ = new Uint8Array(g), c = t.decode_sbo(_);
274
+ a.postMessage({ success: !0, data: c.buffer }, [c.buffer]);
280
275
  }
281
276
  };
282
277
  }
283
278
  export {
284
- z as RendererService,
285
- v as registerDecodeWorker
279
+ P as RendererService,
280
+ k as registerDecodeWorker
286
281
  };
@@ -1 +1 @@
1
- {"version":3,"file":"rendererService.d.ts","sourceRoot":"","sources":["../src/rendererService.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,SAAS,EACT,UAAU,EACV,uBAAuB,EACvB,YAAY,EACZ,WAAW,EACX,oBAAoB,EACpB,cAAc,EACd,iBAAiB,EACjB,KAAK,EACL,YAAY,EACZ,KAAK,EACL,aAAa,EACb,UAAU,EACX,MAAM,YAAY,CAAA;AAEnB,OAAO,KAAK,KAAK,aAAa,MAAM,sBAAsB,CAAA;AAI1D,KAAK,qBAAqB,GAAG,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,CAAA;AACzD,KAAK,oBAAoB,GAAG,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAA;AAClD,KAAK,0BAA0B,GAAG,CAAC,WAAW,EAAE,WAAW,KAAK,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Q,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM;IAKtE,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;IAKlE,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;IAKhD,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,aAAa,EAAE,aAAa;IAK/D,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,uBAAuB;IAKxE,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY;IAKpD,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM;IAK5D,oBAAoB,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;IAKvD,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,oBAAoB;IAKhE,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS;IAK1C,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS;IAK/C,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;IAKlC,WAAW,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,WAAW,CAAC;IAKzD,OAAO;CAGR"}
@@ -0,0 +1,2 @@
1
+ async function Module(moduleArg={}){var moduleRtn;var Module=moduleArg;var ENVIRONMENT_IS_WEB=!!globalThis.window;var ENVIRONMENT_IS_WORKER=!!globalThis.WorkerGlobalScope;var ENVIRONMENT_IS_NODE=globalThis.process?.versions?.node&&globalThis.process?.type!="renderer";if(ENVIRONMENT_IS_NODE){const{createRequire}=await import("node:module");var require=createRequire(import.meta.url)}var arguments_=[];var thisProgram="./this.program";var quit_=(status,toThrow)=>{throw toThrow};var _scriptName=import.meta.url;var scriptDirectory="";function locateFile(path){return scriptDirectory+path}var readAsync,readBinary;if(ENVIRONMENT_IS_NODE){var fs=require("node:fs");if(_scriptName.startsWith("file:")){scriptDirectory=require("node:path").dirname(require("node:url").fileURLToPath(_scriptName))+"/"}readBinary=filename=>{filename=isFileURI(filename)?new URL(filename):filename;var ret=fs.readFileSync(filename);return ret};readAsync=async(filename,binary=true)=>{filename=isFileURI(filename)?new URL(filename):filename;var ret=fs.readFileSync(filename,binary?undefined:"utf8");return ret};if(process.argv.length>1){thisProgram=process.argv[1].replace(/\\/g,"/")}arguments_=process.argv.slice(2);quit_=(status,toThrow)=>{process.exitCode=status;throw toThrow}}else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){try{scriptDirectory=new URL(".",_scriptName).href}catch{}{if(ENVIRONMENT_IS_WORKER){readBinary=url=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.responseType="arraybuffer";xhr.send(null);return new Uint8Array(xhr.response)}}readAsync=async url=>{if(isFileURI(url)){return new Promise((resolve,reject)=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,true);xhr.responseType="arraybuffer";xhr.onload=()=>{if(xhr.status==200||xhr.status==0&&xhr.response){resolve(xhr.response);return}reject(xhr.status)};xhr.onerror=reject;xhr.send(null)})}var response=await fetch(url,{credentials:"same-origin"});if(response.ok){return response.arrayBuffer()}throw new Error(response.status+" : "+response.url)}}}else{}var out=console.log.bind(console);var err=console.error.bind(console);var wasmBinary;var ABORT=false;var EXITSTATUS;var isFileURI=filename=>filename.startsWith("file://");var readyPromiseResolve,readyPromiseReject;var HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;var HEAP64,HEAPU64;var runtimeInitialized=false;function updateMemoryViews(){var b=wasmMemory.buffer;HEAP8=new Int8Array(b);HEAP16=new Int16Array(b);Module["HEAPU8"]=HEAPU8=new Uint8Array(b);HEAPU16=new Uint16Array(b);HEAP32=new Int32Array(b);HEAPU32=new Uint32Array(b);HEAPF32=new Float32Array(b);HEAPF64=new Float64Array(b);HEAP64=new BigInt64Array(b);HEAPU64=new BigUint64Array(b)}function preRun(){}function initRuntime(){runtimeInitialized=true}function postRun(){}function abort(what){what="Aborted("+what+")";err(what);ABORT=true;what+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(what);readyPromiseReject?.(e);throw e}var wasmBinaryFile;function findWasmBinary(){if(Module["locateFile"]){return locateFile("basisu_transcoder.wasm")}return new URL("basisu_transcoder.wasm",import.meta.url).href}function getBinarySync(file){if(file==wasmBinaryFile&&wasmBinary){return new Uint8Array(wasmBinary)}if(readBinary){return readBinary(file)}throw"both async and sync fetching of the wasm failed"}async function getWasmBinary(binaryFile){if(!wasmBinary){try{var response=await readAsync(binaryFile);return new Uint8Array(response)}catch{}}return getBinarySync(binaryFile)}async function instantiateArrayBuffer(binaryFile,imports){try{var binary=await getWasmBinary(binaryFile);var instance=await WebAssembly.instantiate(binary,imports);return instance}catch(reason){err(`failed to asynchronously prepare wasm: ${reason}`);abort(reason)}}async function instantiateAsync(binary,binaryFile,imports){if(!binary&&!isFileURI(binaryFile)&&!ENVIRONMENT_IS_NODE){try{var response=fetch(binaryFile,{credentials:"same-origin"});var instantiationResult=await WebAssembly.instantiateStreaming(response,imports);return instantiationResult}catch(reason){err(`wasm streaming compile failed: ${reason}`);err("falling back to ArrayBuffer instantiation")}}return instantiateArrayBuffer(binaryFile,imports)}function getWasmImports(){var imports={a:wasmImports};return imports}async function createWasm(){function receiveInstance(instance,module){wasmExports=instance.exports;assignWasmExports(wasmExports);updateMemoryViews();return wasmExports}function receiveInstantiationResult(result){return receiveInstance(result["instance"])}var info=getWasmImports();wasmBinaryFile??=findWasmBinary();var result=await instantiateAsync(wasmBinary,wasmBinaryFile,info);var exports=receiveInstantiationResult(result);return exports}class ExitStatus{name="ExitStatus";constructor(status){this.message=`Program terminated with exit(${status})`;this.status=status}}var UTF8Decoder=globalThis.TextDecoder&&new TextDecoder;var findStringEnd=(heapOrArray,idx,maxBytesToRead,ignoreNul)=>{var maxIdx=idx+maxBytesToRead;if(ignoreNul)return maxIdx;while(heapOrArray[idx]&&!(idx>=maxIdx))++idx;return idx};var UTF8ArrayToString=(heapOrArray,idx=0,maxBytesToRead,ignoreNul)=>{var endPtr=findStringEnd(heapOrArray,idx,maxBytesToRead,ignoreNul);if(endPtr-idx>16&&heapOrArray.buffer&&UTF8Decoder){return UTF8Decoder.decode(heapOrArray.subarray(idx,endPtr))}var str="";while(idx<endPtr){var u0=heapOrArray[idx++];if(!(u0&128)){str+=String.fromCharCode(u0);continue}var u1=heapOrArray[idx++]&63;if((u0&224)==192){str+=String.fromCharCode((u0&31)<<6|u1);continue}var u2=heapOrArray[idx++]&63;if((u0&240)==224){u0=(u0&15)<<12|u1<<6|u2}else{u0=(u0&7)<<18|u1<<12|u2<<6|heapOrArray[idx++]&63}if(u0<65536){str+=String.fromCharCode(u0)}else{var ch=u0-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023)}}return str};var UTF8ToString=(ptr,maxBytesToRead,ignoreNul)=>ptr?UTF8ArrayToString(HEAPU8,ptr,maxBytesToRead,ignoreNul):"";var ___assert_fail=(condition,filename,line,func)=>abort(`Assertion failed: ${UTF8ToString(condition)}, at: `+[filename?UTF8ToString(filename):"unknown filename",line,func?UTF8ToString(func):"unknown function"]);var __abort_js=()=>abort("");var runtimeKeepaliveCounter=0;var __emscripten_runtime_keepalive_clear=()=>{runtimeKeepaliveCounter=0};var timers={};var handleException=e=>{if(e instanceof ExitStatus||e=="unwind"){return EXITSTATUS}quit_(1,e)};var keepRuntimeAlive=()=>true;var _proc_exit=code=>{EXITSTATUS=code;if(!keepRuntimeAlive()){ABORT=true}quit_(code,new ExitStatus(code))};var exitJS=(status,implicit)=>{EXITSTATUS=status;_proc_exit(status)};var _exit=exitJS;var maybeExit=()=>{if(!keepRuntimeAlive()){try{_exit(EXITSTATUS)}catch(e){handleException(e)}}};var callUserCallback=func=>{if(ABORT){return}try{return func()}catch(e){handleException(e)}finally{maybeExit()}};var _emscripten_get_now=()=>performance.now();var __setitimer_js=(which,timeout_ms)=>{if(timers[which]){clearTimeout(timers[which].id);delete timers[which]}if(!timeout_ms)return 0;var id=setTimeout(()=>{delete timers[which];callUserCallback(()=>__emscripten_timeout(which,_emscripten_get_now()))},timeout_ms);timers[which]={id,timeout_ms};return 0};var getHeapMax=()=>2147483648;var alignMemory=(size,alignment)=>Math.ceil(size/alignment)*alignment;var growMemory=size=>{var oldHeapSize=wasmMemory.buffer.byteLength;var pages=(size-oldHeapSize+65535)/65536|0;try{wasmMemory.grow(pages);updateMemoryViews();return 1}catch(e){}};var _emscripten_resize_heap=requestedSize=>{var oldSize=HEAPU8.length;requestedSize>>>=0;var maxHeapSize=getHeapMax();if(requestedSize>maxHeapSize){return false}for(var cutDown=1;cutDown<=4;cutDown*=2){var overGrownHeapSize=oldSize*(1+.2/cutDown);overGrownHeapSize=Math.min(overGrownHeapSize,requestedSize+100663296);var newSize=Math.min(maxHeapSize,alignMemory(Math.max(requestedSize,overGrownHeapSize),65536));var replacement=growMemory(newSize);if(replacement){return true}}return false};var printCharBuffers=[null,[],[]];var printChar=(stream,curr)=>{var buffer=printCharBuffers[stream];if(curr===0||curr===10){(stream===1?out:err)(UTF8ArrayToString(buffer));buffer.length=0}else{buffer.push(curr)}};var _fd_write=(fd,iov,iovcnt,pnum)=>{var num=0;for(var i=0;i<iovcnt;i++){var ptr=HEAPU32[iov>>2];var len=HEAPU32[iov+4>>2];iov+=8;for(var j=0;j<len;j++){printChar(fd,HEAPU8[ptr+j])}num+=len}HEAPU32[pnum>>2]=num;return 0};{if(Module["wasmBinary"])wasmBinary=Module["wasmBinary"]}var _bt_get_version,_bt_enable_debug_printf,_bt_init,_bt_alloc,_bt_free,_bt_basis_tex_format_is_xuastc_ldr,_bt_basis_tex_format_is_astc_ldr,_bt_basis_tex_format_get_block_width,_bt_basis_tex_format_get_block_height,_bt_basis_tex_format_is_hdr,_bt_basis_tex_format_is_ldr,_bt_basis_get_bytes_per_block_or_pixel,_bt_basis_transcoder_format_has_alpha,_bt_basis_transcoder_format_is_hdr,_bt_basis_transcoder_format_is_ldr,_bt_basis_transcoder_texture_format_is_astc,_bt_basis_transcoder_format_is_uncompressed,_bt_basis_get_uncompressed_bytes_per_pixel,_bt_basis_get_block_width,_bt_basis_get_block_height,_bt_basis_get_transcoder_texture_format_from_basis_tex_format,_bt_basis_is_format_supported,_bt_basis_compute_transcoded_image_size_in_bytes,_bt_ktx2_open,_bt_ktx2_close,_bt_ktx2_get_width,_bt_ktx2_get_height,_bt_ktx2_get_levels,_bt_ktx2_get_faces,_bt_ktx2_get_layers,_bt_ktx2_get_basis_tex_format,_bt_ktx2_is_etc1s,_bt_ktx2_is_uastc_ldr_4x4,_bt_ktx2_is_hdr,_bt_ktx2_is_hdr_4x4,_bt_ktx2_is_hdr_6x6,_bt_ktx2_is_ldr,_bt_ktx2_is_astc_ldr,_bt_ktx2_is_xuastc_ldr,_bt_ktx2_get_block_width,_bt_ktx2_get_block_height,_bt_ktx2_has_alpha,_bt_ktx2_get_dfd_color_model,_bt_ktx2_get_dfd_color_primaries,_bt_ktx2_get_dfd_transfer_func,_bt_ktx2_is_srgb,_bt_ktx2_get_dfd_flags,_bt_ktx2_get_dfd_total_samples,_bt_ktx2_get_dfd_channel_id0,_bt_ktx2_get_dfd_channel_id1,_bt_ktx2_is_video,_bt_ktx2_get_ldr_hdr_upconversion_nit_multiplier,_bt_ktx2_get_level_orig_width,_bt_ktx2_get_level_orig_height,_bt_ktx2_get_level_actual_width,_bt_ktx2_get_level_actual_height,_bt_ktx2_get_level_num_blocks_x,_bt_ktx2_get_level_num_blocks_y,_bt_ktx2_get_level_total_blocks,_bt_ktx2_get_level_alpha_flag,_bt_ktx2_get_level_iframe_flag,_bt_ktx2_start_transcoding,_bt_ktx2_create_transcode_state,_bt_ktx2_destroy_transcode_state,_bt_ktx2_transcode_image_level,__emscripten_timeout,memory,__indirect_function_table,wasmMemory;function assignWasmExports(wasmExports){_bt_get_version=Module["_bt_get_version"]=wasmExports["i"];_bt_enable_debug_printf=Module["_bt_enable_debug_printf"]=wasmExports["j"];_bt_init=Module["_bt_init"]=wasmExports["k"];_bt_alloc=Module["_bt_alloc"]=wasmExports["l"];_bt_free=Module["_bt_free"]=wasmExports["m"];_bt_basis_tex_format_is_xuastc_ldr=Module["_bt_basis_tex_format_is_xuastc_ldr"]=wasmExports["n"];_bt_basis_tex_format_is_astc_ldr=Module["_bt_basis_tex_format_is_astc_ldr"]=wasmExports["o"];_bt_basis_tex_format_get_block_width=Module["_bt_basis_tex_format_get_block_width"]=wasmExports["p"];_bt_basis_tex_format_get_block_height=Module["_bt_basis_tex_format_get_block_height"]=wasmExports["q"];_bt_basis_tex_format_is_hdr=Module["_bt_basis_tex_format_is_hdr"]=wasmExports["r"];_bt_basis_tex_format_is_ldr=Module["_bt_basis_tex_format_is_ldr"]=wasmExports["s"];_bt_basis_get_bytes_per_block_or_pixel=Module["_bt_basis_get_bytes_per_block_or_pixel"]=wasmExports["t"];_bt_basis_transcoder_format_has_alpha=Module["_bt_basis_transcoder_format_has_alpha"]=wasmExports["u"];_bt_basis_transcoder_format_is_hdr=Module["_bt_basis_transcoder_format_is_hdr"]=wasmExports["v"];_bt_basis_transcoder_format_is_ldr=Module["_bt_basis_transcoder_format_is_ldr"]=wasmExports["w"];_bt_basis_transcoder_texture_format_is_astc=Module["_bt_basis_transcoder_texture_format_is_astc"]=wasmExports["x"];_bt_basis_transcoder_format_is_uncompressed=Module["_bt_basis_transcoder_format_is_uncompressed"]=wasmExports["y"];_bt_basis_get_uncompressed_bytes_per_pixel=Module["_bt_basis_get_uncompressed_bytes_per_pixel"]=wasmExports["z"];_bt_basis_get_block_width=Module["_bt_basis_get_block_width"]=wasmExports["A"];_bt_basis_get_block_height=Module["_bt_basis_get_block_height"]=wasmExports["B"];_bt_basis_get_transcoder_texture_format_from_basis_tex_format=Module["_bt_basis_get_transcoder_texture_format_from_basis_tex_format"]=wasmExports["C"];_bt_basis_is_format_supported=Module["_bt_basis_is_format_supported"]=wasmExports["D"];_bt_basis_compute_transcoded_image_size_in_bytes=Module["_bt_basis_compute_transcoded_image_size_in_bytes"]=wasmExports["E"];_bt_ktx2_open=Module["_bt_ktx2_open"]=wasmExports["F"];_bt_ktx2_close=Module["_bt_ktx2_close"]=wasmExports["G"];_bt_ktx2_get_width=Module["_bt_ktx2_get_width"]=wasmExports["H"];_bt_ktx2_get_height=Module["_bt_ktx2_get_height"]=wasmExports["I"];_bt_ktx2_get_levels=Module["_bt_ktx2_get_levels"]=wasmExports["J"];_bt_ktx2_get_faces=Module["_bt_ktx2_get_faces"]=wasmExports["K"];_bt_ktx2_get_layers=Module["_bt_ktx2_get_layers"]=wasmExports["L"];_bt_ktx2_get_basis_tex_format=Module["_bt_ktx2_get_basis_tex_format"]=wasmExports["M"];_bt_ktx2_is_etc1s=Module["_bt_ktx2_is_etc1s"]=wasmExports["N"];_bt_ktx2_is_uastc_ldr_4x4=Module["_bt_ktx2_is_uastc_ldr_4x4"]=wasmExports["O"];_bt_ktx2_is_hdr=Module["_bt_ktx2_is_hdr"]=wasmExports["P"];_bt_ktx2_is_hdr_4x4=Module["_bt_ktx2_is_hdr_4x4"]=wasmExports["Q"];_bt_ktx2_is_hdr_6x6=Module["_bt_ktx2_is_hdr_6x6"]=wasmExports["R"];_bt_ktx2_is_ldr=Module["_bt_ktx2_is_ldr"]=wasmExports["S"];_bt_ktx2_is_astc_ldr=Module["_bt_ktx2_is_astc_ldr"]=wasmExports["T"];_bt_ktx2_is_xuastc_ldr=Module["_bt_ktx2_is_xuastc_ldr"]=wasmExports["U"];_bt_ktx2_get_block_width=Module["_bt_ktx2_get_block_width"]=wasmExports["V"];_bt_ktx2_get_block_height=Module["_bt_ktx2_get_block_height"]=wasmExports["W"];_bt_ktx2_has_alpha=Module["_bt_ktx2_has_alpha"]=wasmExports["X"];_bt_ktx2_get_dfd_color_model=Module["_bt_ktx2_get_dfd_color_model"]=wasmExports["Y"];_bt_ktx2_get_dfd_color_primaries=Module["_bt_ktx2_get_dfd_color_primaries"]=wasmExports["Z"];_bt_ktx2_get_dfd_transfer_func=Module["_bt_ktx2_get_dfd_transfer_func"]=wasmExports["_"];_bt_ktx2_is_srgb=Module["_bt_ktx2_is_srgb"]=wasmExports["$"];_bt_ktx2_get_dfd_flags=Module["_bt_ktx2_get_dfd_flags"]=wasmExports["aa"];_bt_ktx2_get_dfd_total_samples=Module["_bt_ktx2_get_dfd_total_samples"]=wasmExports["ba"];_bt_ktx2_get_dfd_channel_id0=Module["_bt_ktx2_get_dfd_channel_id0"]=wasmExports["ca"];_bt_ktx2_get_dfd_channel_id1=Module["_bt_ktx2_get_dfd_channel_id1"]=wasmExports["da"];_bt_ktx2_is_video=Module["_bt_ktx2_is_video"]=wasmExports["ea"];_bt_ktx2_get_ldr_hdr_upconversion_nit_multiplier=Module["_bt_ktx2_get_ldr_hdr_upconversion_nit_multiplier"]=wasmExports["fa"];_bt_ktx2_get_level_orig_width=Module["_bt_ktx2_get_level_orig_width"]=wasmExports["ga"];_bt_ktx2_get_level_orig_height=Module["_bt_ktx2_get_level_orig_height"]=wasmExports["ha"];_bt_ktx2_get_level_actual_width=Module["_bt_ktx2_get_level_actual_width"]=wasmExports["ia"];_bt_ktx2_get_level_actual_height=Module["_bt_ktx2_get_level_actual_height"]=wasmExports["ja"];_bt_ktx2_get_level_num_blocks_x=Module["_bt_ktx2_get_level_num_blocks_x"]=wasmExports["ka"];_bt_ktx2_get_level_num_blocks_y=Module["_bt_ktx2_get_level_num_blocks_y"]=wasmExports["la"];_bt_ktx2_get_level_total_blocks=Module["_bt_ktx2_get_level_total_blocks"]=wasmExports["ma"];_bt_ktx2_get_level_alpha_flag=Module["_bt_ktx2_get_level_alpha_flag"]=wasmExports["na"];_bt_ktx2_get_level_iframe_flag=Module["_bt_ktx2_get_level_iframe_flag"]=wasmExports["oa"];_bt_ktx2_start_transcoding=Module["_bt_ktx2_start_transcoding"]=wasmExports["pa"];_bt_ktx2_create_transcode_state=Module["_bt_ktx2_create_transcode_state"]=wasmExports["qa"];_bt_ktx2_destroy_transcode_state=Module["_bt_ktx2_destroy_transcode_state"]=wasmExports["ra"];_bt_ktx2_transcode_image_level=Module["_bt_ktx2_transcode_image_level"]=wasmExports["sa"];__emscripten_timeout=wasmExports["ta"];memory=wasmMemory=wasmExports["h"];__indirect_function_table=wasmExports["__indirect_function_table"]}var wasmImports={a:___assert_fail,e:__abort_js,c:__emscripten_runtime_keepalive_clear,d:__setitimer_js,f:_emscripten_resize_heap,g:_fd_write,b:_proc_exit};function run(){preRun();function doRun(){Module["calledRun"]=true;if(ABORT)return;initRuntime();readyPromiseResolve?.(Module);postRun()}{doRun()}}var wasmExports;wasmExports=await (createWasm());run();if(runtimeInitialized){moduleRtn=Module}else{moduleRtn=new Promise((resolve,reject)=>{readyPromiseResolve=resolve;readyPromiseReject=reject})}
2
+ ;return moduleRtn}export default Module;
@@ -0,0 +1,567 @@
1
+ /* @ts-self-types="./wasm_decode.d.ts" */
2
+ import * as import1 from "./snippets/basisu_c_sys-273c0aeb51b100af/wasm/basisu_transcoder.js"
3
+
4
+
5
+ /**
6
+ * @param {Uint8Array} data
7
+ * @returns {Uint8Array}
8
+ */
9
+ export function decode_sbo(data) {
10
+ const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);
11
+ const len0 = WASM_VECTOR_LEN;
12
+ const ret = wasm.decode_sbo(ptr0, len0);
13
+ if (ret[2]) {
14
+ throw takeFromExternrefTable0(ret[1]);
15
+ }
16
+ return takeFromExternrefTable0(ret[0]);
17
+ }
18
+
19
+ /**
20
+ * Initialize the embedded basisu transcoder WASM.
21
+ * Must be awaited once after the outer WASM module's `default()` init.
22
+ * @returns {Promise<any>}
23
+ */
24
+ export function init_basis() {
25
+ const ret = wasm.init_basis();
26
+ return ret;
27
+ }
28
+
29
+ /**
30
+ * Transcode a KTX2/basis file to a GPU-compressed (or RGBA32) format.
31
+ *
32
+ * `format`: 0=RGBA32, 1=ETC2_RGBA8, 2=ASTC_4×4, 3=BC7
33
+ *
34
+ * Returns `{ data: Uint8Array, width: u32, height: u32, format: u32 }`.
35
+ * @param {Uint8Array} data
36
+ * @param {number} format
37
+ * @returns {object}
38
+ */
39
+ export function transcode_basis(data, format) {
40
+ const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);
41
+ const len0 = WASM_VECTOR_LEN;
42
+ const ret = wasm.transcode_basis(ptr0, len0, format);
43
+ if (ret[2]) {
44
+ throw takeFromExternrefTable0(ret[1]);
45
+ }
46
+ return takeFromExternrefTable0(ret[0]);
47
+ }
48
+ function __wbg_get_imports() {
49
+ const import0 = {
50
+ __proto__: null,
51
+ __wbg_HEAPU8_153c54682533edcc: function(arg0) {
52
+ const ret = arg0.HEAPU8;
53
+ return ret;
54
+ },
55
+ __wbg___wbindgen_debug_string_ab4b34d23d6778bd: function(arg0, arg1) {
56
+ const ret = debugString(arg1);
57
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
58
+ const len1 = WASM_VECTOR_LEN;
59
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
60
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
61
+ },
62
+ __wbg___wbindgen_is_function_3baa9db1a987f47d: function(arg0) {
63
+ const ret = typeof(arg0) === 'function';
64
+ return ret;
65
+ },
66
+ __wbg___wbindgen_is_undefined_29a43b4d42920abd: function(arg0) {
67
+ const ret = arg0 === undefined;
68
+ return ret;
69
+ },
70
+ __wbg___wbindgen_throw_6b64449b9b9ed33c: function(arg0, arg1) {
71
+ throw new Error(getStringFromWasm0(arg0, arg1));
72
+ },
73
+ __wbg__bt_alloc_996c13d90dbf94e7: function(arg0, arg1) {
74
+ const ret = arg0._bt_alloc(BigInt.asUintN(64, arg1));
75
+ return ret;
76
+ },
77
+ __wbg__bt_basis_compute_transcoded_image_size_in_bytes_b7f2fe186a6e8349: function(arg0, arg1, arg2, arg3) {
78
+ const ret = arg0._bt_basis_compute_transcoded_image_size_in_bytes(arg1 >>> 0, arg2 >>> 0, arg3 >>> 0);
79
+ return ret;
80
+ },
81
+ __wbg__bt_basis_get_bytes_per_block_or_pixel_55cb380affe87d99: function(arg0, arg1) {
82
+ const ret = arg0._bt_basis_get_bytes_per_block_or_pixel(arg1 >>> 0);
83
+ return ret;
84
+ },
85
+ __wbg__bt_free_4a75f61f6d796adf: function(arg0, arg1) {
86
+ arg0._bt_free(BigInt.asUintN(64, arg1));
87
+ },
88
+ __wbg__bt_init_bf4d6cc29d0f4ba7: function(arg0) {
89
+ arg0._bt_init();
90
+ },
91
+ __wbg__bt_ktx2_close_5f0389f38446b6d9: function(arg0, arg1) {
92
+ arg0._bt_ktx2_close(BigInt.asUintN(64, arg1));
93
+ },
94
+ __wbg__bt_ktx2_get_height_9e89d57dd5609461: function(arg0, arg1) {
95
+ const ret = arg0._bt_ktx2_get_height(BigInt.asUintN(64, arg1));
96
+ return ret;
97
+ },
98
+ __wbg__bt_ktx2_get_width_95780eb40045edd9: function(arg0, arg1) {
99
+ const ret = arg0._bt_ktx2_get_width(BigInt.asUintN(64, arg1));
100
+ return ret;
101
+ },
102
+ __wbg__bt_ktx2_open_4921a842ef17b5bd: function(arg0, arg1, arg2) {
103
+ const ret = arg0._bt_ktx2_open(BigInt.asUintN(64, arg1), arg2 >>> 0);
104
+ return ret;
105
+ },
106
+ __wbg__bt_ktx2_start_transcoding_1299f54a65ef35ca: function(arg0, arg1) {
107
+ const ret = arg0._bt_ktx2_start_transcoding(BigInt.asUintN(64, arg1));
108
+ return ret;
109
+ },
110
+ __wbg__bt_ktx2_transcode_image_level_5b2d35b01da6e6cc: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13) {
111
+ const ret = arg0._bt_ktx2_transcode_image_level(BigInt.asUintN(64, arg1), arg2 >>> 0, arg3 >>> 0, arg4 >>> 0, BigInt.asUintN(64, arg5), arg6 >>> 0, arg7 >>> 0, arg8 >>> 0, arg9 >>> 0, arg10 >>> 0, arg11, arg12, BigInt.asUintN(64, arg13));
112
+ return ret;
113
+ },
114
+ __wbg__wbg_cb_unref_b46c9b5a9f08ec37: function(arg0) {
115
+ arg0._wbg_cb_unref();
116
+ },
117
+ __wbg_call_a24592a6f349a97e: function() { return handleError(function (arg0, arg1, arg2) {
118
+ const ret = arg0.call(arg1, arg2);
119
+ return ret;
120
+ }, arguments); },
121
+ __wbg_length_9f1775224cf1d815: function(arg0) {
122
+ const ret = arg0.length;
123
+ return ret;
124
+ },
125
+ __wbg_new_aa8d0fa9762c29bd: function() {
126
+ const ret = new Object();
127
+ return ret;
128
+ },
129
+ __wbg_new_from_slice_b5ea43e23f6008c0: function(arg0, arg1) {
130
+ const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
131
+ return ret;
132
+ },
133
+ __wbg_new_typed_323f37fd55ab048d: function(arg0, arg1) {
134
+ try {
135
+ var state0 = {a: arg0, b: arg1};
136
+ var cb0 = (arg0, arg1) => {
137
+ const a = state0.a;
138
+ state0.a = 0;
139
+ try {
140
+ return wasm_bindgen__convert__closures_____invoke__h3d076a640fe381ba(a, state0.b, arg0, arg1);
141
+ } finally {
142
+ state0.a = a;
143
+ }
144
+ };
145
+ const ret = new Promise(cb0);
146
+ return ret;
147
+ } finally {
148
+ state0.a = 0;
149
+ }
150
+ },
151
+ __wbg_prototypesetcall_a6b02eb00b0f4ce2: function(arg0, arg1, arg2) {
152
+ Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
153
+ },
154
+ __wbg_queueMicrotask_5d15a957e6aa920e: function(arg0) {
155
+ queueMicrotask(arg0);
156
+ },
157
+ __wbg_queueMicrotask_f8819e5ffc402f36: function(arg0) {
158
+ const ret = arg0.queueMicrotask;
159
+ return ret;
160
+ },
161
+ __wbg_resolve_e6c466bc1052f16c: function(arg0) {
162
+ const ret = Promise.resolve(arg0);
163
+ return ret;
164
+ },
165
+ __wbg_set_022bee52d0b05b19: function() { return handleError(function (arg0, arg1, arg2) {
166
+ const ret = Reflect.set(arg0, arg1, arg2);
167
+ return ret;
168
+ }, arguments); },
169
+ __wbg_set_d8f1efe557b9e7e1: function(arg0, arg1, arg2) {
170
+ arg0.set(arg1, arg2 >>> 0);
171
+ },
172
+ __wbg_static_accessor_GLOBAL_8cfadc87a297ca02: function() {
173
+ const ret = typeof global === 'undefined' ? null : global;
174
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
175
+ },
176
+ __wbg_static_accessor_GLOBAL_THIS_602256ae5c8f42cf: function() {
177
+ const ret = typeof globalThis === 'undefined' ? null : globalThis;
178
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
179
+ },
180
+ __wbg_static_accessor_SELF_e445c1c7484aecc3: function() {
181
+ const ret = typeof self === 'undefined' ? null : self;
182
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
183
+ },
184
+ __wbg_static_accessor_WINDOW_f20e8576ef1e0f17: function() {
185
+ const ret = typeof window === 'undefined' ? null : window;
186
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
187
+ },
188
+ __wbg_subarray_f8ca46a25b1f5e0d: function(arg0, arg1, arg2) {
189
+ const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
190
+ return ret;
191
+ },
192
+ __wbg_then_792e0c862b060889: function(arg0, arg1, arg2) {
193
+ const ret = arg0.then(arg1, arg2);
194
+ return ret;
195
+ },
196
+ __wbg_then_8e16ee11f05e4827: function(arg0, arg1) {
197
+ const ret = arg0.then(arg1);
198
+ return ret;
199
+ },
200
+ __wbindgen_cast_0000000000000001: function(arg0, arg1) {
201
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 74, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
202
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__hffc9f1a16a180456);
203
+ return ret;
204
+ },
205
+ __wbindgen_cast_0000000000000002: function(arg0, arg1) {
206
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 84, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
207
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h09476be307b1e815);
208
+ return ret;
209
+ },
210
+ __wbindgen_cast_0000000000000003: function(arg0) {
211
+ // Cast intrinsic for `F64 -> Externref`.
212
+ const ret = arg0;
213
+ return ret;
214
+ },
215
+ __wbindgen_cast_0000000000000004: function(arg0, arg1) {
216
+ // Cast intrinsic for `Ref(String) -> Externref`.
217
+ const ret = getStringFromWasm0(arg0, arg1);
218
+ return ret;
219
+ },
220
+ __wbindgen_init_externref_table: function() {
221
+ const table = wasm.__wbindgen_externrefs;
222
+ const offset = table.grow(4);
223
+ table.set(0, undefined);
224
+ table.set(offset + 0, undefined);
225
+ table.set(offset + 1, null);
226
+ table.set(offset + 2, true);
227
+ table.set(offset + 3, false);
228
+ },
229
+ };
230
+ return {
231
+ __proto__: null,
232
+ "./wasm_decode_bg.js": import0,
233
+ "./snippets/basisu_c_sys-273c0aeb51b100af/wasm/basisu_transcoder.js": import1,
234
+ };
235
+ }
236
+
237
+ function wasm_bindgen__convert__closures_____invoke__hffc9f1a16a180456(arg0, arg1, arg2) {
238
+ const ret = wasm.wasm_bindgen__convert__closures_____invoke__hffc9f1a16a180456(arg0, arg1, arg2);
239
+ if (ret[1]) {
240
+ throw takeFromExternrefTable0(ret[0]);
241
+ }
242
+ }
243
+
244
+ function wasm_bindgen__convert__closures_____invoke__h09476be307b1e815(arg0, arg1, arg2) {
245
+ const ret = wasm.wasm_bindgen__convert__closures_____invoke__h09476be307b1e815(arg0, arg1, arg2);
246
+ if (ret[1]) {
247
+ throw takeFromExternrefTable0(ret[0]);
248
+ }
249
+ }
250
+
251
+ function wasm_bindgen__convert__closures_____invoke__h3d076a640fe381ba(arg0, arg1, arg2, arg3) {
252
+ wasm.wasm_bindgen__convert__closures_____invoke__h3d076a640fe381ba(arg0, arg1, arg2, arg3);
253
+ }
254
+
255
+ function addToExternrefTable0(obj) {
256
+ const idx = wasm.__externref_table_alloc();
257
+ wasm.__wbindgen_externrefs.set(idx, obj);
258
+ return idx;
259
+ }
260
+
261
+ const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
262
+ ? { register: () => {}, unregister: () => {} }
263
+ : new FinalizationRegistry(state => wasm.__wbindgen_destroy_closure(state.a, state.b));
264
+
265
+ function debugString(val) {
266
+ // primitive types
267
+ const type = typeof val;
268
+ if (type == 'number' || type == 'boolean' || val == null) {
269
+ return `${val}`;
270
+ }
271
+ if (type == 'string') {
272
+ return `"${val}"`;
273
+ }
274
+ if (type == 'symbol') {
275
+ const description = val.description;
276
+ if (description == null) {
277
+ return 'Symbol';
278
+ } else {
279
+ return `Symbol(${description})`;
280
+ }
281
+ }
282
+ if (type == 'function') {
283
+ const name = val.name;
284
+ if (typeof name == 'string' && name.length > 0) {
285
+ return `Function(${name})`;
286
+ } else {
287
+ return 'Function';
288
+ }
289
+ }
290
+ // objects
291
+ if (Array.isArray(val)) {
292
+ const length = val.length;
293
+ let debug = '[';
294
+ if (length > 0) {
295
+ debug += debugString(val[0]);
296
+ }
297
+ for(let i = 1; i < length; i++) {
298
+ debug += ', ' + debugString(val[i]);
299
+ }
300
+ debug += ']';
301
+ return debug;
302
+ }
303
+ // Test for built-in
304
+ const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
305
+ let className;
306
+ if (builtInMatches && builtInMatches.length > 1) {
307
+ className = builtInMatches[1];
308
+ } else {
309
+ // Failed to match the standard '[object ClassName]'
310
+ return toString.call(val);
311
+ }
312
+ if (className == 'Object') {
313
+ // we're a user defined class or Object
314
+ // JSON.stringify avoids problems with cycles, and is generally much
315
+ // easier than looping through ownProperties of `val`.
316
+ try {
317
+ return 'Object(' + JSON.stringify(val) + ')';
318
+ } catch (_) {
319
+ return 'Object';
320
+ }
321
+ }
322
+ // errors
323
+ if (val instanceof Error) {
324
+ return `${val.name}: ${val.message}\n${val.stack}`;
325
+ }
326
+ // TODO we could test for more things here, like `Set`s and `Map`s.
327
+ return className;
328
+ }
329
+
330
+ function getArrayU8FromWasm0(ptr, len) {
331
+ ptr = ptr >>> 0;
332
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
333
+ }
334
+
335
+ let cachedDataViewMemory0 = null;
336
+ function getDataViewMemory0() {
337
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
338
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
339
+ }
340
+ return cachedDataViewMemory0;
341
+ }
342
+
343
+ function getStringFromWasm0(ptr, len) {
344
+ ptr = ptr >>> 0;
345
+ return decodeText(ptr, len);
346
+ }
347
+
348
+ let cachedUint8ArrayMemory0 = null;
349
+ function getUint8ArrayMemory0() {
350
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
351
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
352
+ }
353
+ return cachedUint8ArrayMemory0;
354
+ }
355
+
356
+ function handleError(f, args) {
357
+ try {
358
+ return f.apply(this, args);
359
+ } catch (e) {
360
+ const idx = addToExternrefTable0(e);
361
+ wasm.__wbindgen_exn_store(idx);
362
+ }
363
+ }
364
+
365
+ function isLikeNone(x) {
366
+ return x === undefined || x === null;
367
+ }
368
+
369
+ function makeMutClosure(arg0, arg1, f) {
370
+ const state = { a: arg0, b: arg1, cnt: 1 };
371
+ const real = (...args) => {
372
+
373
+ // First up with a closure we increment the internal reference
374
+ // count. This ensures that the Rust closure environment won't
375
+ // be deallocated while we're invoking it.
376
+ state.cnt++;
377
+ const a = state.a;
378
+ state.a = 0;
379
+ try {
380
+ return f(a, state.b, ...args);
381
+ } finally {
382
+ state.a = a;
383
+ real._wbg_cb_unref();
384
+ }
385
+ };
386
+ real._wbg_cb_unref = () => {
387
+ if (--state.cnt === 0) {
388
+ wasm.__wbindgen_destroy_closure(state.a, state.b);
389
+ state.a = 0;
390
+ CLOSURE_DTORS.unregister(state);
391
+ }
392
+ };
393
+ CLOSURE_DTORS.register(real, state, state);
394
+ return real;
395
+ }
396
+
397
+ function passArray8ToWasm0(arg, malloc) {
398
+ const ptr = malloc(arg.length * 1, 1) >>> 0;
399
+ getUint8ArrayMemory0().set(arg, ptr / 1);
400
+ WASM_VECTOR_LEN = arg.length;
401
+ return ptr;
402
+ }
403
+
404
+ function passStringToWasm0(arg, malloc, realloc) {
405
+ if (realloc === undefined) {
406
+ const buf = cachedTextEncoder.encode(arg);
407
+ const ptr = malloc(buf.length, 1) >>> 0;
408
+ getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
409
+ WASM_VECTOR_LEN = buf.length;
410
+ return ptr;
411
+ }
412
+
413
+ let len = arg.length;
414
+ let ptr = malloc(len, 1) >>> 0;
415
+
416
+ const mem = getUint8ArrayMemory0();
417
+
418
+ let offset = 0;
419
+
420
+ for (; offset < len; offset++) {
421
+ const code = arg.charCodeAt(offset);
422
+ if (code > 0x7F) break;
423
+ mem[ptr + offset] = code;
424
+ }
425
+ if (offset !== len) {
426
+ if (offset !== 0) {
427
+ arg = arg.slice(offset);
428
+ }
429
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
430
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
431
+ const ret = cachedTextEncoder.encodeInto(arg, view);
432
+
433
+ offset += ret.written;
434
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
435
+ }
436
+
437
+ WASM_VECTOR_LEN = offset;
438
+ return ptr;
439
+ }
440
+
441
+ function takeFromExternrefTable0(idx) {
442
+ const value = wasm.__wbindgen_externrefs.get(idx);
443
+ wasm.__externref_table_dealloc(idx);
444
+ return value;
445
+ }
446
+
447
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
448
+ cachedTextDecoder.decode();
449
+ const MAX_SAFARI_DECODE_BYTES = 2146435072;
450
+ let numBytesDecoded = 0;
451
+ function decodeText(ptr, len) {
452
+ numBytesDecoded += len;
453
+ if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
454
+ cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
455
+ cachedTextDecoder.decode();
456
+ numBytesDecoded = len;
457
+ }
458
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
459
+ }
460
+
461
+ const cachedTextEncoder = new TextEncoder();
462
+
463
+ if (!('encodeInto' in cachedTextEncoder)) {
464
+ cachedTextEncoder.encodeInto = function (arg, view) {
465
+ const buf = cachedTextEncoder.encode(arg);
466
+ view.set(buf);
467
+ return {
468
+ read: arg.length,
469
+ written: buf.length
470
+ };
471
+ };
472
+ }
473
+
474
+ let WASM_VECTOR_LEN = 0;
475
+
476
+ let wasmModule, wasm;
477
+ function __wbg_finalize_init(instance, module) {
478
+ wasm = instance.exports;
479
+ wasmModule = module;
480
+ cachedDataViewMemory0 = null;
481
+ cachedUint8ArrayMemory0 = null;
482
+ wasm.__wbindgen_start();
483
+ return wasm;
484
+ }
485
+
486
+ async function __wbg_load(module, imports) {
487
+ if (typeof Response === 'function' && module instanceof Response) {
488
+ if (typeof WebAssembly.instantiateStreaming === 'function') {
489
+ try {
490
+ return await WebAssembly.instantiateStreaming(module, imports);
491
+ } catch (e) {
492
+ const validResponse = module.ok && expectedResponseType(module.type);
493
+
494
+ if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
495
+ console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
496
+
497
+ } else { throw e; }
498
+ }
499
+ }
500
+
501
+ const bytes = await module.arrayBuffer();
502
+ return await WebAssembly.instantiate(bytes, imports);
503
+ } else {
504
+ const instance = await WebAssembly.instantiate(module, imports);
505
+
506
+ if (instance instanceof WebAssembly.Instance) {
507
+ return { instance, module };
508
+ } else {
509
+ return instance;
510
+ }
511
+ }
512
+
513
+ function expectedResponseType(type) {
514
+ switch (type) {
515
+ case 'basic': case 'cors': case 'default': return true;
516
+ }
517
+ return false;
518
+ }
519
+ }
520
+
521
+ function initSync(module) {
522
+ if (wasm !== undefined) return wasm;
523
+
524
+
525
+ if (module !== undefined) {
526
+ if (Object.getPrototypeOf(module) === Object.prototype) {
527
+ ({module} = module)
528
+ } else {
529
+ console.warn('using deprecated parameters for `initSync()`; pass a single object instead')
530
+ }
531
+ }
532
+
533
+ const imports = __wbg_get_imports();
534
+ if (!(module instanceof WebAssembly.Module)) {
535
+ module = new WebAssembly.Module(module);
536
+ }
537
+ const instance = new WebAssembly.Instance(module, imports);
538
+ return __wbg_finalize_init(instance, module);
539
+ }
540
+
541
+ async function __wbg_init(module_or_path) {
542
+ if (wasm !== undefined) return wasm;
543
+
544
+
545
+ if (module_or_path !== undefined) {
546
+ if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
547
+ ({module_or_path} = module_or_path)
548
+ } else {
549
+ console.warn('using deprecated parameters for the initialization function; pass a single object instead')
550
+ }
551
+ }
552
+
553
+ if (module_or_path === undefined) {
554
+ module_or_path = new URL('wasm_decode_bg.bf116aa6.wasm', import.meta.url);
555
+ }
556
+ const imports = __wbg_get_imports();
557
+
558
+ if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
559
+ module_or_path = fetch(module_or_path);
560
+ }
561
+
562
+ const { instance, module } = await __wbg_load(await module_or_path, imports);
563
+
564
+ return __wbg_finalize_init(instance, module);
565
+ }
566
+
567
+ export { initSync, __wbg_init as default };
@@ -0,0 +1,61 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+
4
+ export function decode_sbo(data: Uint8Array): Uint8Array;
5
+
6
+ /**
7
+ * Initialize the embedded basisu transcoder WASM.
8
+ * Must be awaited once after the outer WASM module's `default()` init.
9
+ */
10
+ export function init_basis(): Promise<any>;
11
+
12
+ /**
13
+ * Transcode a KTX2/basis file to a GPU-compressed (or RGBA32) format.
14
+ *
15
+ * `format`: 0=RGBA32, 1=ETC2_RGBA8, 2=ASTC_4×4, 3=BC7
16
+ *
17
+ * Returns `{ data: Uint8Array, width: u32, height: u32, format: u32 }`.
18
+ */
19
+ export function transcode_basis(data: Uint8Array, format: number): object;
20
+
21
+ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
22
+
23
+ export interface InitOutput {
24
+ readonly memory: WebAssembly.Memory;
25
+ readonly decode_sbo: (a: number, b: number) => [number, number, number];
26
+ readonly init_basis: () => any;
27
+ readonly transcode_basis: (a: number, b: number, c: number) => [number, number, number];
28
+ readonly wasm_bindgen__convert__closures_____invoke__hffc9f1a16a180456: (a: number, b: number, c: any) => [number, number];
29
+ readonly wasm_bindgen__convert__closures_____invoke__h09476be307b1e815: (a: number, b: number, c: any) => [number, number];
30
+ readonly wasm_bindgen__convert__closures_____invoke__h3d076a640fe381ba: (a: number, b: number, c: any, d: any) => void;
31
+ readonly __wbindgen_malloc: (a: number, b: number) => number;
32
+ readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
33
+ readonly __wbindgen_exn_store: (a: number) => void;
34
+ readonly __externref_table_alloc: () => number;
35
+ readonly __wbindgen_externrefs: WebAssembly.Table;
36
+ readonly __wbindgen_destroy_closure: (a: number, b: number) => void;
37
+ readonly __externref_table_dealloc: (a: number) => void;
38
+ readonly __wbindgen_start: () => void;
39
+ }
40
+
41
+ export type SyncInitInput = BufferSource | WebAssembly.Module;
42
+
43
+ /**
44
+ * Instantiates the given `module`, which can either be bytes or
45
+ * a precompiled `WebAssembly.Module`.
46
+ *
47
+ * @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
48
+ *
49
+ * @returns {InitOutput}
50
+ */
51
+ export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
52
+
53
+ /**
54
+ * If `module_or_path` is {RequestInfo} or {URL}, makes a request and
55
+ * for everything else, calls `WebAssembly.instantiate` directly.
56
+ *
57
+ * @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
58
+ *
59
+ * @returns {Promise<InitOutput>}
60
+ */
61
+ export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;
@@ -0,0 +1,17 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ export const memory: WebAssembly.Memory;
4
+ export const decode_sbo: (a: number, b: number) => [number, number, number];
5
+ export const init_basis: () => any;
6
+ export const transcode_basis: (a: number, b: number, c: number) => [number, number, number];
7
+ export const wasm_bindgen__convert__closures_____invoke__hffc9f1a16a180456: (a: number, b: number, c: any) => [number, number];
8
+ export const wasm_bindgen__convert__closures_____invoke__h09476be307b1e815: (a: number, b: number, c: any) => [number, number];
9
+ export const wasm_bindgen__convert__closures_____invoke__h3d076a640fe381ba: (a: number, b: number, c: any, d: any) => void;
10
+ export const __wbindgen_malloc: (a: number, b: number) => number;
11
+ export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
12
+ export const __wbindgen_exn_store: (a: number) => void;
13
+ export const __externref_table_alloc: () => number;
14
+ export const __wbindgen_externrefs: WebAssembly.Table;
15
+ export const __wbindgen_destroy_closure: (a: number, b: number) => void;
16
+ export const __externref_table_dealloc: (a: number) => void;
17
+ export const __wbindgen_start: () => void;
@@ -2705,57 +2705,57 @@ function __wbg_get_imports() {
2705
2705
  arg0.writeTexture(arg1, arg2, arg3, arg4);
2706
2706
  }, arguments); },
2707
2707
  __wbindgen_cast_0000000000000001: function(arg0, arg1) {
2708
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 3841, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2708
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 3827, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2709
2709
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h00cde4323839146b);
2710
2710
  return ret;
2711
2711
  },
2712
2712
  __wbindgen_cast_0000000000000002: function(arg0, arg1) {
2713
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 3925, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
2713
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 3911, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
2714
2714
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__hd8590da73942d3e0);
2715
2715
  return ret;
2716
2716
  },
2717
2717
  __wbindgen_cast_0000000000000003: function(arg0, arg1) {
2718
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("Array<any>"), NamedExternref("ResizeObserver")], shim_idx: 3848, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2718
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("Array<any>"), NamedExternref("ResizeObserver")], shim_idx: 3834, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2719
2719
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h6ff3e7511bd758a3);
2720
2720
  return ret;
2721
2721
  },
2722
2722
  __wbindgen_cast_0000000000000004: function(arg0, arg1) {
2723
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("Array<any>")], shim_idx: 3841, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2723
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("Array<any>")], shim_idx: 3827, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2724
2724
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h00cde4323839146b_3);
2725
2725
  return ret;
2726
2726
  },
2727
2727
  __wbindgen_cast_0000000000000005: function(arg0, arg1) {
2728
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("Event")], shim_idx: 3841, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2728
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("Event")], shim_idx: 3827, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2729
2729
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h00cde4323839146b_4);
2730
2730
  return ret;
2731
2731
  },
2732
2732
  __wbindgen_cast_0000000000000006: function(arg0, arg1) {
2733
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("FocusEvent")], shim_idx: 3841, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2733
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("FocusEvent")], shim_idx: 3827, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2734
2734
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h00cde4323839146b_5);
2735
2735
  return ret;
2736
2736
  },
2737
2737
  __wbindgen_cast_0000000000000007: function(arg0, arg1) {
2738
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("KeyboardEvent")], shim_idx: 3841, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2738
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("KeyboardEvent")], shim_idx: 3827, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2739
2739
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h00cde4323839146b_6);
2740
2740
  return ret;
2741
2741
  },
2742
2742
  __wbindgen_cast_0000000000000008: function(arg0, arg1) {
2743
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("PageTransitionEvent")], shim_idx: 3841, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2743
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("PageTransitionEvent")], shim_idx: 3827, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2744
2744
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h00cde4323839146b_7);
2745
2745
  return ret;
2746
2746
  },
2747
2747
  __wbindgen_cast_0000000000000009: function(arg0, arg1) {
2748
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("PointerEvent")], shim_idx: 3841, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2748
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("PointerEvent")], shim_idx: 3827, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2749
2749
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h00cde4323839146b_8);
2750
2750
  return ret;
2751
2751
  },
2752
2752
  __wbindgen_cast_000000000000000a: function(arg0, arg1) {
2753
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("WheelEvent")], shim_idx: 3841, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2753
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("WheelEvent")], shim_idx: 3827, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2754
2754
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h00cde4323839146b_9);
2755
2755
  return ret;
2756
2756
  },
2757
2757
  __wbindgen_cast_000000000000000b: function(arg0, arg1) {
2758
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 3846, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2758
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 3832, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2759
2759
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__hdb7f99c0126c5c28);
2760
2760
  return ret;
2761
2761
  },
@@ -3324,7 +3324,7 @@ async function __wbg_init(module_or_path) {
3324
3324
  }
3325
3325
 
3326
3326
  if (module_or_path === undefined) {
3327
- module_or_path = new URL('sangine_bg.31a02d84.wasm', import.meta.url);
3327
+ module_or_path = new URL('sangine_bg.10c8ee57.wasm', import.meta.url);
3328
3328
  }
3329
3329
  const imports = __wbg_get_imports();
3330
3330
 
@@ -0,0 +1,2 @@
1
+ export declare const DECODE_HASH = "bf116aa6";
2
+ //# sourceMappingURL=decode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"decode.d.ts","sourceRoot":"","sources":["../../src/wasm-hashes/decode.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,aAAa,CAAA"}
@@ -1,2 +1,2 @@
1
- export declare const SANGINE_HASH = "31a02d84";
1
+ export declare const SANGINE_HASH = "10c8ee57";
2
2
  //# sourceMappingURL=sangine.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"decodeWorkerImpl.d.ts","sourceRoot":"","sources":["../../src/worker/decodeWorkerImpl.ts"],"names":[],"mappings":"AASA,QAAA,MAAM,aAAa,IAAI,CAAA;AACvB,QAAA,MAAM,iBAAiB,IAAI,CAAA;AAC3B,QAAA,MAAM,eAAe,IAAI,CAAA;AACzB,QAAA,MAAM,UAAU,IAAI,CAAA;AACpB,QAAA,MAAM,UAAU,IAAI,CAAA;AACpB,QAAA,MAAM,aAAa,IAAI,CAAA;AACvB,QAAA,MAAM,gBAAgB,IAAI,CAAA;AAE1B,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,0BAA0B,QA8HpE;AAED,OAAO,EACL,eAAe,EACf,aAAa,EACb,UAAU,EACV,gBAAgB,EAChB,iBAAiB,EACjB,UAAU,EACV,aAAa,GACd,CAAA"}
1
+ {"version":3,"file":"decodeWorkerImpl.d.ts","sourceRoot":"","sources":["../../src/worker/decodeWorkerImpl.ts"],"names":[],"mappings":"AAeA,QAAA,MAAM,aAAa,IAAI,CAAA;AACvB,QAAA,MAAM,iBAAiB,IAAI,CAAA;AAC3B,QAAA,MAAM,eAAe,IAAI,CAAA;AACzB,QAAA,MAAM,UAAU,IAAI,CAAA;AACpB,QAAA,MAAM,UAAU,IAAI,CAAA;AACpB,QAAA,MAAM,aAAa,IAAI,CAAA;AACvB,QAAA,MAAM,gBAAgB,IAAI,CAAA;AAE1B,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,0BAA0B,QAyGpE;AAED,OAAO,EACL,eAAe,EACf,aAAa,EACb,UAAU,EACV,gBAAgB,EAChB,iBAAiB,EACjB,UAAU,EACV,aAAa,GACd,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sanox/sangine-core",
3
- "version": "0.4.1",
3
+ "version": "0.4.3",
4
4
  "description": "Sangine core renderer runtime (WASM + workers)",
5
5
  "type": "module",
6
6
  "private": false,
@@ -1,2 +0,0 @@
1
- export declare const BASIS_DECODE_HASH = "a8b7eebd";
2
- //# sourceMappingURL=basis-decode.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"basis-decode.d.ts","sourceRoot":"","sources":["../../src/wasm-hashes/basis-decode.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,aAAa,CAAA"}
@@ -1,2 +0,0 @@
1
- export declare const SBO_DECODE_HASH = "5c359661";
2
- //# sourceMappingURL=sbo-decode.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sbo-decode.d.ts","sourceRoot":"","sources":["../../src/wasm-hashes/sbo-decode.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,aAAa,CAAA"}