@sanox/sangine-core 0.2.2 → 0.2.5

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.
package/dist/index.cjs.js CHANGED
@@ -1 +1 @@
1
- "use strict";var f=Object.defineProperty;var y=(a,e,t)=>e in a?f(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t;var r=(a,e,t)=>y(a,typeof e!="symbol"?e+"":e,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g="/static/sangine/wasm";class _{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 o=this.idle.pop();o?this.dispatch(o,e,t,s):this.queue.push({request:e,resolve:t,reject:s})})}dispatch(e,t,s,o){const n=i=>{s(i.data),d(),this.release(e)},c=i=>{o(i),d(),this.release(e)},d=()=>{e.removeEventListener("message",n),e.removeEventListener("error",c)};e.addEventListener("message",n,{once:!0}),e.addEventListener("error",c,{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)}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,"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(`${g}/sangine/sangine.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 _(()=>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)}handleSangineEvent(e,t){t==="ready"?this.windowCreatedPromiseResolveRegistry[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)}createWindow(e,t){if(!this.wasm)throw new Error("WASM not initialized");let s;const o=new Promise(c=>{s=c}),n=this.wasm.create_window(e,t);return this.windowCreatedPromiseResolveRegistry[n]=s,this.callbackRegistry[n]={actionChanged:[],routeUpdated:[],measurementCreated:[]},this.userActionRegistry[n]="watching",this.windowCreatedPromiseRegistry[n]=o,n}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,s,o,n,c,d){if(!this.wasm)throw new Error("WASM not initialized");this.wasm.set_sun_properties(e,t,s,o,n,c,d)}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()}}function R(a,e){let t=!1,s=null,o=null;async function n(c,d){const i=`https://sangine-asset-cache/${c}`,w=await o.match(i);if(w)return w;const l=await d(),h=await fetch(l);return h.ok&&await o.put(i,h.clone()),h}a.onmessage=async c=>{if(!t){const w=await import(new URL(`${g}/sbo-decode/wasm_sbo_decode.js`,a.location.origin).href);await w.default(),s=w,t=!0}o||(o=await caches.open("sangine-assets-v1"));const{data:d}=c;if("texture-file"in d)try{const i=await n(d["texture-file"].pk,()=>e(d));if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);const w=await i.blob(),l=await createImageBitmap(w),h=new OffscreenCanvas(l.width,l.height),m=h.getContext("2d");if(m===null)throw new Error("Couldnt create canvas");m.drawImage(l,0,0);const u=m.getImageData(0,0,h.width,h.height);a.postMessage({success:!0,width:h.width,height:h.height,data:u.data.buffer},[u.data.buffer])}catch(i){a.postMessage({success:!1,error:i.message})}else if("model-part-mesh"in d){const i=await n(d["model-part-mesh"].pk,()=>e(d));if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);const w=await i.arrayBuffer(),l=new Uint8Array(w),h=s.decode_sbo(l);a.postMessage({success:!0,data:h.buffer},[h.buffer])}}}exports.RendererService=p;exports.registerDecodeWorker=R;
1
+ "use strict";var f=Object.defineProperty;var y=(n,e,t)=>e in n?f(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var o=(n,e,t)=>y(n,typeof e!="symbol"?e+"":e,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g="/static/sangine/wasm",_="77477298";class p{constructor(e,t){o(this,"workers");o(this,"idle");o(this,"queue",[]);this.workers=Array.from({length:t},e),this.idle=[...this.workers]}run(e){return new Promise((t,i)=>{const r=this.idle.pop();r?this.dispatch(r,e,t,i):this.queue.push({request:e,resolve:t,reject:i})})}dispatch(e,t,i,r){const d=s=>{i(s.data),a(),this.release(e)},c=s=>{r(s),a(),this.release(e)},a=()=>{e.removeEventListener("message",d),e.removeEventListener("error",c)};e.addEventListener("message",d,{once:!0}),e.addEventListener("error",c,{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)}terminate(){for(const e of this.workers)e.terminate()}}class R{constructor(e){o(this,"wasm",null);o(this,"callbackRegistry",{});o(this,"userActionRegistry",{});o(this,"windowCreatedPromiseRegistry",{});o(this,"windowCreatedPromiseResolveRegistry",{});o(this,"_inited",!1);o(this,"decodePool");o(this,"_readyPromise");o(this,"_resolveReady");o(this,"_rejectReady");this.config=e,this._readyPromise=new Promise((t,i)=>{this._resolveReady=t,this._rejectReady=i}),this.config=e}async init(){if(!(typeof window>"u")){if(this._inited)return this._readyPromise;try{const t=await import(new URL(`${g}/sangine/sangine.${_}.js`,window.location.origin).toString());await t.default(),this.wasm=t,this._inited=!0;const i=this.config.numWorkers??(navigator.hardwareConcurrency||2)-1;this.decodePool=new p(()=>this.config.createDecodeWorker(),Math.max(i,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 i of this.callbackRegistry[e].actionChanged)i(t)}handleMeasurementCreated(e,t){for(const i of this.callbackRegistry[e].measurementCreated)i(t)}handleRouteUpdated(e,t){for(const i of this.callbackRegistry[e].routeUpdated)i(t)}handleSangineEvent(e,t){t==="ready"?this.windowCreatedPromiseResolveRegistry[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)}createWindow(e,t){if(!this.wasm)throw new Error("WASM not initialized");let i;const r=new Promise(c=>{i=c}),d=this.wasm.create_window(e,t);return this.windowCreatedPromiseResolveRegistry[d]=i,this.callbackRegistry[d]={actionChanged:[],routeUpdated:[],measurementCreated:[]},this.userActionRegistry[d]="watching",this.windowCreatedPromiseRegistry[d]=r,d}readUserAction(e){return this.userActionRegistry[e]}windowReady(e){return this.windowCreatedPromiseRegistry[e]}registerCallback(e,t,i){this.callbackRegistry[e][t].push(i)}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,i){if(!this.wasm)throw new Error("WASM not initialized");this.wasm.set_route_highlight(e,t,i)}setRouteVisible(e,t,i){if(!this.wasm)throw new Error("WASM not initialized");this.wasm.set_route_visible(e,t,i)}animateToRoute(e,t){if(!this.wasm)throw new Error("WASM not initialized");this.wasm.animate_to_route(e,t)}setSunProperties(e,t,i,r,d,c,a){if(!this.wasm)throw new Error("WASM not initialized");this.wasm.set_sun_properties(e,t,i,r,d,c,a)}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 b="fa5ceba1";function A(n,e){let t=!1,i=null,r=null;async function d(c,a){if(r){const s=`https://sangine-asset-cache/${c}`,w=await r.match(s);if(w)return w;const l=await a(),h=await fetch(l);return h.ok&&await r.put(s,h.clone()),h}return fetch(await a())}n.onmessage=async c=>{if(!t){const w=await import(new URL(`${g}/sbo-decode/wasm_sbo_decode.${b}.js`,n.location.origin).href);await w.default(),i=w,t=!0}!r&&typeof caches<"u"&&(r=await caches.open("sangine-assets-v1"));const{data:a}=c;if("texture-file"in a)try{const s=await d(a["texture-file"].pk,()=>e(a));if(!s.ok)throw new Error(`HTTP error! status: ${s.status}`);const w=await s.blob(),l=await createImageBitmap(w),h=new OffscreenCanvas(l.width,l.height),m=h.getContext("2d");if(m===null)throw new Error("Couldnt create canvas");m.drawImage(l,0,0);const u=m.getImageData(0,0,h.width,h.height);n.postMessage({success:!0,width:h.width,height:h.height,data:u.data.buffer},[u.data.buffer])}catch(s){n.postMessage({success:!1,error:s.message})}else if("model-part-mesh"in a){const s=await d(a["model-part-mesh"].pk,()=>e(a));if(!s.ok)throw new Error(`HTTP error! status: ${s.status}`);const w=await s.arrayBuffer(),l=new Uint8Array(w),h=i.decode_sbo(l);n.postMessage({success:!0,data:h.buffer},[h.buffer])}}}exports.RendererService=R;exports.registerDecodeWorker=A;
package/dist/index.es.js CHANGED
@@ -1,29 +1,29 @@
1
- var f = Object.defineProperty;
2
- var y = (a, e, t) => e in a ? f(a, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[e] = t;
3
- var r = (a, e, t) => y(a, typeof e != "symbol" ? e + "" : e, t);
4
- const g = "/static/sangine/wasm";
5
- class _ {
1
+ var g = Object.defineProperty;
2
+ var y = (n, e, t) => e in n ? g(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
+ var o = (n, e, t) => y(n, typeof e != "symbol" ? e + "" : e, t);
4
+ const f = "/static/sangine/wasm", _ = "77477298";
5
+ class p {
6
6
  constructor(e, t) {
7
- r(this, "workers");
8
- r(this, "idle");
9
- r(this, "queue", []);
7
+ o(this, "workers");
8
+ o(this, "idle");
9
+ o(this, "queue", []);
10
10
  this.workers = Array.from({ length: t }, e), this.idle = [...this.workers];
11
11
  }
12
12
  run(e) {
13
13
  return new Promise((t, s) => {
14
- const o = this.idle.pop();
15
- o ? this.dispatch(o, e, t, s) : this.queue.push({ request: e, resolve: t, reject: s });
14
+ const r = this.idle.pop();
15
+ r ? this.dispatch(r, e, t, s) : this.queue.push({ request: e, resolve: t, reject: s });
16
16
  });
17
17
  }
18
- dispatch(e, t, s, o) {
19
- const n = (i) => {
20
- s(i.data), d(), this.release(e);
18
+ dispatch(e, t, s, r) {
19
+ const d = (i) => {
20
+ s(i.data), a(), this.release(e);
21
21
  }, c = (i) => {
22
- o(i), d(), this.release(e);
23
- }, d = () => {
24
- e.removeEventListener("message", n), e.removeEventListener("error", c);
22
+ r(i), a(), this.release(e);
23
+ }, a = () => {
24
+ e.removeEventListener("message", d), e.removeEventListener("error", c);
25
25
  };
26
- e.addEventListener("message", n, { once: !0 }), e.addEventListener("error", c, { once: !0 }), e.postMessage(t);
26
+ e.addEventListener("message", d, { once: !0 }), e.addEventListener("error", c, { once: !0 }), e.postMessage(t);
27
27
  }
28
28
  release(e) {
29
29
  const t = this.queue.shift();
@@ -34,18 +34,18 @@ class _ {
34
34
  e.terminate();
35
35
  }
36
36
  }
37
- class R {
37
+ class A {
38
38
  constructor(e) {
39
- r(this, "wasm", null);
40
- r(this, "callbackRegistry", {});
41
- r(this, "userActionRegistry", {});
42
- r(this, "windowCreatedPromiseRegistry", {});
43
- r(this, "windowCreatedPromiseResolveRegistry", {});
44
- r(this, "_inited", !1);
45
- r(this, "decodePool");
46
- r(this, "_readyPromise");
47
- r(this, "_resolveReady");
48
- r(this, "_rejectReady");
39
+ o(this, "wasm", null);
40
+ o(this, "callbackRegistry", {});
41
+ o(this, "userActionRegistry", {});
42
+ o(this, "windowCreatedPromiseRegistry", {});
43
+ o(this, "windowCreatedPromiseResolveRegistry", {});
44
+ o(this, "_inited", !1);
45
+ o(this, "decodePool");
46
+ o(this, "_readyPromise");
47
+ o(this, "_resolveReady");
48
+ o(this, "_rejectReady");
49
49
  this.config = e, this._readyPromise = new Promise((t, s) => {
50
50
  this._resolveReady = t, this._rejectReady = s;
51
51
  }), this.config = e;
@@ -55,12 +55,12 @@ class R {
55
55
  if (this._inited) return this._readyPromise;
56
56
  try {
57
57
  const t = await import(new URL(
58
- `${g}/sangine/sangine.js`,
58
+ `${f}/sangine/sangine.${_}.js`,
59
59
  window.location.origin
60
60
  ).toString());
61
61
  await t.default(), this.wasm = t, this._inited = !0;
62
62
  const s = this.config.numWorkers ?? (navigator.hardwareConcurrency || 2) - 1;
63
- this.decodePool = new _(
63
+ this.decodePool = new p(
64
64
  () => this.config.createDecodeWorker(),
65
65
  Math.max(s, 1)
66
66
  ), this.wasm.register_asset_decoder(this.decodeAsset.bind(this)), this.wasm.register_event_listener(this.handleSangineEvent.bind(this)), this._resolveReady();
@@ -100,14 +100,14 @@ class R {
100
100
  createWindow(e, t) {
101
101
  if (!this.wasm) throw new Error("WASM not initialized");
102
102
  let s;
103
- const o = new Promise((c) => {
103
+ const r = new Promise((c) => {
104
104
  s = c;
105
- }), n = this.wasm.create_window(e, t);
106
- return this.windowCreatedPromiseResolveRegistry[n] = s, this.callbackRegistry[n] = {
105
+ }), d = this.wasm.create_window(e, t);
106
+ return this.windowCreatedPromiseResolveRegistry[d] = s, this.callbackRegistry[d] = {
107
107
  actionChanged: [],
108
108
  routeUpdated: [],
109
109
  measurementCreated: []
110
- }, this.userActionRegistry[n] = "watching", this.windowCreatedPromiseRegistry[n] = o, n;
110
+ }, this.userActionRegistry[d] = "watching", this.windowCreatedPromiseRegistry[d] = r, d;
111
111
  }
112
112
  readUserAction(e) {
113
113
  return this.userActionRegistry[e];
@@ -138,16 +138,16 @@ class R {
138
138
  if (!this.wasm) throw new Error("WASM not initialized");
139
139
  this.wasm.animate_to_route(e, t);
140
140
  }
141
- setSunProperties(e, t, s, o, n, c, d) {
141
+ setSunProperties(e, t, s, r, d, c, a) {
142
142
  if (!this.wasm) throw new Error("WASM not initialized");
143
143
  this.wasm.set_sun_properties(
144
144
  e,
145
145
  t,
146
146
  s,
147
- o,
148
- n,
147
+ r,
148
+ d,
149
149
  c,
150
- d
150
+ a
151
151
  );
152
152
  }
153
153
  setNorthCorrection(e, t) {
@@ -183,27 +183,31 @@ class R {
183
183
  (e = this.decodePool) == null || e.terminate();
184
184
  }
185
185
  }
186
- function b(a, e) {
187
- let t = !1, s = null, o = null;
188
- async function n(c, d) {
189
- const i = `https://sangine-asset-cache/${c}`, w = await o.match(i);
190
- if (w) return w;
191
- const l = await d(), h = await fetch(l);
192
- return h.ok && await o.put(i, h.clone()), h;
193
- }
194
- a.onmessage = async (c) => {
186
+ const R = "fa5ceba1";
187
+ function E(n, e) {
188
+ let t = !1, s = null, r = null;
189
+ async function d(c, a) {
190
+ if (r) {
191
+ const i = `https://sangine-asset-cache/${c}`, w = await r.match(i);
192
+ if (w) return w;
193
+ const l = await a(), h = await fetch(l);
194
+ return h.ok && await r.put(i, h.clone()), h;
195
+ }
196
+ return fetch(await a());
197
+ }
198
+ n.onmessage = async (c) => {
195
199
  if (!t) {
196
200
  const w = await import(new URL(
197
- `${g}/sbo-decode/wasm_sbo_decode.js`,
198
- a.location.origin
201
+ `${f}/sbo-decode/wasm_sbo_decode.${R}.js`,
202
+ n.location.origin
199
203
  ).href);
200
204
  await w.default(), s = w, t = !0;
201
205
  }
202
- o || (o = await caches.open("sangine-assets-v1"));
203
- const { data: d } = c;
204
- if ("texture-file" in d)
206
+ !r && typeof caches < "u" && (r = await caches.open("sangine-assets-v1"));
207
+ const { data: a } = c;
208
+ if ("texture-file" in a)
205
209
  try {
206
- const i = await n(d["texture-file"].pk, () => e(d));
210
+ const i = await d(a["texture-file"].pk, () => e(a));
207
211
  if (!i.ok)
208
212
  throw new Error(`HTTP error! status: ${i.status}`);
209
213
  const w = await i.blob(), l = await createImageBitmap(w), h = new OffscreenCanvas(l.width, l.height), m = h.getContext("2d");
@@ -211,7 +215,7 @@ function b(a, e) {
211
215
  throw new Error("Couldnt create canvas");
212
216
  m.drawImage(l, 0, 0);
213
217
  const u = m.getImageData(0, 0, h.width, h.height);
214
- a.postMessage(
218
+ n.postMessage(
215
219
  {
216
220
  success: !0,
217
221
  width: h.width,
@@ -221,14 +225,14 @@ function b(a, e) {
221
225
  [u.data.buffer]
222
226
  );
223
227
  } catch (i) {
224
- a.postMessage({ success: !1, error: i.message });
228
+ n.postMessage({ success: !1, error: i.message });
225
229
  }
226
- else if ("model-part-mesh" in d) {
227
- const i = await n(d["model-part-mesh"].pk, () => e(d));
230
+ else if ("model-part-mesh" in a) {
231
+ const i = await d(a["model-part-mesh"].pk, () => e(a));
228
232
  if (!i.ok)
229
233
  throw new Error(`HTTP error! status: ${i.status}`);
230
234
  const w = await i.arrayBuffer(), l = new Uint8Array(w), h = s.decode_sbo(l);
231
- a.postMessage(
235
+ n.postMessage(
232
236
  {
233
237
  success: !0,
234
238
  data: h.buffer
@@ -239,6 +243,6 @@ function b(a, e) {
239
243
  };
240
244
  }
241
245
  export {
242
- R as RendererService,
243
- b as registerDecodeWorker
246
+ A as RendererService,
247
+ E as registerDecodeWorker
244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AC,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"}
@@ -3201,7 +3201,7 @@ async function __wbg_init(module_or_path) {
3201
3201
  }
3202
3202
 
3203
3203
  if (module_or_path === undefined) {
3204
- module_or_path = new URL('sangine_bg.wasm', import.meta.url);
3204
+ module_or_path = new URL('sangine_bg.77477298.wasm', import.meta.url);
3205
3205
  }
3206
3206
  const imports = __wbg_get_imports();
3207
3207
 
@@ -169,7 +169,7 @@ async function __wbg_init(module_or_path) {
169
169
  }
170
170
 
171
171
  if (module_or_path === undefined) {
172
- module_or_path = new URL('wasm_sbo_decode_bg.wasm', import.meta.url);
172
+ module_or_path = new URL('wasm_sbo_decode_bg.fa5ceba1.wasm', import.meta.url);
173
173
  }
174
174
  const imports = __wbg_get_imports();
175
175
 
@@ -0,0 +1,2 @@
1
+ export declare const SANGINE_HASH = "77477298";
2
+ //# sourceMappingURL=sangine.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sangine.d.ts","sourceRoot":"","sources":["../../src/wasm-hashes/sangine.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,aAAa,CAAA"}
@@ -0,0 +1,2 @@
1
+ export declare const SBO_DECODE_HASH = "fa5ceba1";
2
+ //# sourceMappingURL=sbo-decode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sbo-decode.d.ts","sourceRoot":"","sources":["../../src/wasm-hashes/sbo-decode.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,aAAa,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"decodeWorkerImpl.d.ts","sourceRoot":"","sources":["../../src/worker/decodeWorkerImpl.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,UAAU,CAAA;AAI1C,KAAK,WAAW,GAAG,CAAC,IAAI,EAAE,UAAU,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;AAExD,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,0BAA0B,EAAE,WAAW,EAAE,WAAW,QA2F9F"}
1
+ {"version":3,"file":"decodeWorkerImpl.d.ts","sourceRoot":"","sources":["../../src/worker/decodeWorkerImpl.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,UAAU,CAAA;AAK1C,KAAK,WAAW,GAAG,CAAC,IAAI,EAAE,UAAU,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;AAExD,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,0BAA0B,EAAE,WAAW,EAAE,WAAW,QA8F9F"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sanox/sangine-core",
3
- "version": "0.2.2",
3
+ "version": "0.2.5",
4
4
  "description": "Sangine core renderer runtime (WASM + workers)",
5
5
  "type": "module",
6
6
  "private": false,