@sanox/sangine-core 0.3.2 → 0.3.4

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.
@@ -63,7 +63,7 @@ export type SangineEvent = "ready" | {
63
63
  assetsDownloading: {
64
64
  downloading: boolean;
65
65
  };
66
- };
66
+ } | "userInteractionStarted";
67
67
  /**
68
68
  * This interface was referenced by `Schema`'s JSON-Schema
69
69
  * via the `definition` "UserAction".
@@ -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,EAAE,EAAE,MAAM,CAAC;KACZ,CAAC;CACH,GACD;IACE,iBAAiB,EAAE;QACjB,EAAE,EAAE,MAAM,CAAC;KACZ,CAAC;CACH,CAAC;AACN;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,SAAS,CAAC;AAChD;;;GAGG;AACH,MAAM,MAAM,OAAO,GAAG,WAAW,GAAG,MAAM,GAAG,QAAQ,GAAG,KAAK,GAAG,UAAU,GAAG,SAAS,GAAG,aAAa,CAAC;AACvG;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAC9D;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG,KAAK,CAAC;AACxC;;;GAGG;AACH,MAAM,MAAM,oBAAoB,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC;AACvE;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GACpB,OAAO,GACP;IACE,aAAa,EAAE;QACb,MAAM,EAAE,UAAU,CAAC;KACpB,CAAC;CACH,GACD;IACE,kBAAkB,EAAE;QAClB,WAAW,EAAE,WAAW,CAAC;KAC1B,CAAC;CACH,GACD;IACE,6BAA6B,EAAE;QAC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,IAAI,CAAC;CACvB"}
package/dist/index.cjs.js CHANGED
@@ -1 +1 @@
1
- "use strict";var f=Object.defineProperty;var y=(o,e,t)=>e in o?f(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t;var r=(o,e,t)=>y(o,typeof e!="symbol"?e+"":e,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g="/static/sangine/wasm",_="11ddf363";class R{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 n=this.idle.pop();n?this.dispatch(n,e,t,s):this.queue.push({request:e,resolve:t,reject:s})})}dispatch(e,t,s,n){const w=i=>{s(i.data),a(),this.release(e)},d=i=>{n(i),a(),this.release(e)},a=()=>{e.removeEventListener("message",w),e.removeEventListener("error",d)};e.addEventListener("message",w,{once:!0}),e.addEventListener("error",d,{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,"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(`${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 R(()=>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)}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):"assetsDownloading"in t&&this.handleAssetsDownloading(e,t.assetsDownloading.downloading)}createWindow(e,t,s){if(!this.wasm)throw new Error("WASM not initialized");let n;const w=new Promise(a=>{n=a}),d=this.wasm.create_window(e,t,s);return this.windowCreatedPromiseResolveRegistry[d]=n,this.callbackRegistry[d]={actionChanged:[],routeUpdated:[],measurementCreated:[],assetsDownloading:[]},this.userActionRegistry[d]="watching",this.windowCreatedPromiseRegistry[d]=w,d}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 b="fa5ceba1";function A(o,e){let t=!1,s=null,n=null;async function w(d,a){if(n){const i=`https://sangine-asset-cache/${d}`,c=await n.match(i);if(c)return c;const l=await a(),h=await fetch(l);return h.ok&&await n.put(i,h.clone()),h}return fetch(await a())}o.onmessage=async d=>{if(!t){const c=await import(new URL(`${g}/sbo-decode/wasm_sbo_decode.${b}.js`,o.location.origin).href);await c.default(),s=c,t=!0}!n&&typeof caches<"u"&&(n=await caches.open("sangine-assets-v1"));const{data:a}=d;if("texture-file"in a)try{const i=await w(a["texture-file"].pk,()=>e(a));if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);const c=await i.blob(),l=await createImageBitmap(c),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);o.postMessage({success:!0,width:h.width,height:h.height,data:u.data.buffer},[u.data.buffer])}catch(i){o.postMessage({success:!1,error:i.message})}else if("model-part-mesh"in a){const i=await w(a["model-part-mesh"].pk,()=>e(a));if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);const c=await i.arrayBuffer(),l=new Uint8Array(c),h=s.decode_sbo(l);o.postMessage({success:!0,data:h.buffer},[h.buffer])}}}exports.RendererService=p;exports.registerDecodeWorker=A;
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 r=(n,e,t)=>y(n,typeof e!="symbol"?e+"":e,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g="/static/sangine/wasm",_="df2c068e";class R{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 w=i=>{s(i.data),a(),this.release(e)},d=i=>{o(i),a(),this.release(e)},a=()=>{e.removeEventListener("message",w),e.removeEventListener("error",d)};e.addEventListener("message",w,{once:!0}),e.addEventListener("error",d,{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,"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(`${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 R(()=>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 o;const w=new Promise(a=>{o=a}),d=this.wasm.create_window(e,t,s);return this.windowCreatedPromiseResolveRegistry[d]=o,this.callbackRegistry[d]={actionChanged:[],routeUpdated:[],measurementCreated:[],assetsDownloading:[],userInteractionStarted:[]},this.userActionRegistry[d]="watching",this.windowCreatedPromiseRegistry[d]=w,d}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 b="fa5ceba1";function A(n,e){let t=!1,s=null,o=null;async function w(d,a){if(o){const i=`https://sangine-asset-cache/${d}`,c=await o.match(i);if(c)return c;const l=await a(),h=await fetch(l);return h.ok&&await o.put(i,h.clone()),h}return fetch(await a())}n.onmessage=async d=>{if(!t){const c=await import(new URL(`${g}/sbo-decode/wasm_sbo_decode.${b}.js`,n.location.origin).href);await c.default(),s=c,t=!0}!o&&typeof caches<"u"&&(o=await caches.open("sangine-assets-v1"));const{data:a}=d;if("texture-file"in a)try{const i=await w(a["texture-file"].pk,()=>e(a));if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);const c=await i.blob(),l=await createImageBitmap(c),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(i){n.postMessage({success:!1,error:i.message})}else if("model-part-mesh"in a){const i=await w(a["model-part-mesh"].pk,()=>e(a));if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);const c=await i.arrayBuffer(),l=new Uint8Array(c),h=s.decode_sbo(l);n.postMessage({success:!0,data:h.buffer},[h.buffer])}}}exports.RendererService=p;exports.registerDecodeWorker=A;
package/dist/index.es.js CHANGED
@@ -1,7 +1,7 @@
1
1
  var f = Object.defineProperty;
2
- var y = (o, e, t) => e in o ? f(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t;
3
- var r = (o, e, t) => y(o, typeof e != "symbol" ? e + "" : e, t);
4
- const g = "/static/sangine/wasm", _ = "11ddf363";
2
+ var y = (n, e, t) => e in n ? f(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
+ var r = (n, e, t) => y(n, typeof e != "symbol" ? e + "" : e, t);
4
+ const g = "/static/sangine/wasm", _ = "df2c068e";
5
5
  class R {
6
6
  constructor(e, t) {
7
7
  r(this, "workers");
@@ -11,15 +11,15 @@ class R {
11
11
  }
12
12
  run(e) {
13
13
  return new Promise((t, s) => {
14
- const n = this.idle.pop();
15
- n ? this.dispatch(n, e, t, s) : this.queue.push({ request: e, resolve: t, reject: s });
14
+ const o = this.idle.pop();
15
+ o ? this.dispatch(o, e, t, s) : this.queue.push({ request: e, resolve: t, reject: s });
16
16
  });
17
17
  }
18
- dispatch(e, t, s, n) {
18
+ dispatch(e, t, s, o) {
19
19
  const w = (i) => {
20
20
  s(i.data), a(), this.release(e);
21
21
  }, h = (i) => {
22
- n(i), a(), this.release(e);
22
+ o(i), a(), this.release(e);
23
23
  }, a = () => {
24
24
  e.removeEventListener("message", w), e.removeEventListener("error", h);
25
25
  };
@@ -34,7 +34,7 @@ class R {
34
34
  e.terminate();
35
35
  }
36
36
  }
37
- class b {
37
+ class A {
38
38
  constructor(e) {
39
39
  r(this, "wasm", null);
40
40
  r(this, "callbackRegistry", {});
@@ -100,20 +100,25 @@ class b {
100
100
  for (const s of this.callbackRegistry[e].assetsDownloading)
101
101
  s(t);
102
102
  }
103
+ handleUserInteractionStarted(e) {
104
+ for (const t of this.callbackRegistry[e].userInteractionStarted)
105
+ t();
106
+ }
103
107
  handleSangineEvent(e, t) {
104
- 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) : "assetsDownloading" in t && this.handleAssetsDownloading(e, t.assetsDownloading.downloading);
108
+ 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);
105
109
  }
106
110
  createWindow(e, t, s) {
107
111
  if (!this.wasm) throw new Error("WASM not initialized");
108
- let n;
112
+ let o;
109
113
  const w = new Promise((a) => {
110
- n = a;
114
+ o = a;
111
115
  }), h = this.wasm.create_window(e, t, s);
112
- return this.windowCreatedPromiseResolveRegistry[h] = n, this.callbackRegistry[h] = {
116
+ return this.windowCreatedPromiseResolveRegistry[h] = o, this.callbackRegistry[h] = {
113
117
  actionChanged: [],
114
118
  routeUpdated: [],
115
119
  measurementCreated: [],
116
- assetsDownloading: []
120
+ assetsDownloading: [],
121
+ userInteractionStarted: []
117
122
  }, this.userActionRegistry[h] = "watching", this.windowCreatedPromiseRegistry[h] = w, h;
118
123
  }
119
124
  getAssetsDownloading(e) {
@@ -194,26 +199,26 @@ class b {
194
199
  }
195
200
  }
196
201
  const p = "fa5ceba1";
197
- function E(o, e) {
198
- let t = !1, s = null, n = null;
202
+ function S(n, e) {
203
+ let t = !1, s = null, o = null;
199
204
  async function w(h, a) {
200
- if (n) {
201
- const i = `https://sangine-asset-cache/${h}`, c = await n.match(i);
205
+ if (o) {
206
+ const i = `https://sangine-asset-cache/${h}`, c = await o.match(i);
202
207
  if (c) return c;
203
208
  const l = await a(), d = await fetch(l);
204
- return d.ok && await n.put(i, d.clone()), d;
209
+ return d.ok && await o.put(i, d.clone()), d;
205
210
  }
206
211
  return fetch(await a());
207
212
  }
208
- o.onmessage = async (h) => {
213
+ n.onmessage = async (h) => {
209
214
  if (!t) {
210
215
  const c = await import(new URL(
211
216
  `${g}/sbo-decode/wasm_sbo_decode.${p}.js`,
212
- o.location.origin
217
+ n.location.origin
213
218
  ).href);
214
219
  await c.default(), s = c, t = !0;
215
220
  }
216
- !n && typeof caches < "u" && (n = await caches.open("sangine-assets-v1"));
221
+ !o && typeof caches < "u" && (o = await caches.open("sangine-assets-v1"));
217
222
  const { data: a } = h;
218
223
  if ("texture-file" in a)
219
224
  try {
@@ -225,7 +230,7 @@ function E(o, e) {
225
230
  throw new Error("Couldnt create canvas");
226
231
  m.drawImage(l, 0, 0);
227
232
  const u = m.getImageData(0, 0, d.width, d.height);
228
- o.postMessage(
233
+ n.postMessage(
229
234
  {
230
235
  success: !0,
231
236
  width: d.width,
@@ -235,14 +240,14 @@ function E(o, e) {
235
240
  [u.data.buffer]
236
241
  );
237
242
  } catch (i) {
238
- o.postMessage({ success: !1, error: i.message });
243
+ n.postMessage({ success: !1, error: i.message });
239
244
  }
240
245
  else if ("model-part-mesh" in a) {
241
246
  const i = await w(a["model-part-mesh"].pk, () => e(a));
242
247
  if (!i.ok)
243
248
  throw new Error(`HTTP error! status: ${i.status}`);
244
249
  const c = await i.arrayBuffer(), l = new Uint8Array(c), d = s.decode_sbo(l);
245
- o.postMessage(
250
+ n.postMessage(
246
251
  {
247
252
  success: !0,
248
253
  data: d.buffer
@@ -253,6 +258,6 @@ function E(o, e) {
253
258
  };
254
259
  }
255
260
  export {
256
- b as RendererService,
257
- E as registerDecodeWorker
261
+ A as RendererService,
262
+ S as registerDecodeWorker
258
263
  };
@@ -4,11 +4,13 @@ type ActionChangedCallback = (action: UserAction) => void;
4
4
  type RouteUpdatedCallback = (route: Route) => void;
5
5
  type MeasurementCreatedCallback = (measurement: Measurement) => void;
6
6
  type AssetsDownloadingCallback = (downloading: boolean) => void;
7
+ type VoidCallback = () => void;
7
8
  interface CallbackMap {
8
9
  actionChanged: ActionChangedCallback;
9
10
  routeUpdated: RouteUpdatedCallback;
10
11
  measurementCreated: MeasurementCreatedCallback;
11
12
  assetsDownloading: AssetsDownloadingCallback;
13
+ userInteractionStarted: VoidCallback;
12
14
  }
13
15
  export declare class RendererService {
14
16
  private config;
@@ -32,6 +34,7 @@ export declare class RendererService {
32
34
  handleMeasurementCreated(windowId: number, measurement: Measurement): void;
33
35
  handleRouteUpdated(windowId: number, route: Route): void;
34
36
  handleAssetsDownloading(windowId: number, downloading: boolean): void;
37
+ handleUserInteractionStarted(windowId: number): void;
35
38
  handleSangineEvent(windowId: number, event: SangineEvent): void;
36
39
  createWindow(containerId: string, scene: Scene, settings: RenderingSettings | undefined): number;
37
40
  getAssetsDownloading(containerId: number): boolean;
@@ -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,IAAI,CAAA;AACpE,KAAK,yBAAyB,GAAG,CAAC,WAAW,EAAE,OAAO,KAAK,IAAI,CAAA;AAE/D,UAAU,WAAW;IACnB,aAAa,EAAE,qBAAqB,CAAA;IACpC,YAAY,EAAE,oBAAoB,CAAA;IAClC,kBAAkB,EAAE,0BAA0B,CAAA;IAC9C,iBAAiB,EAAE,yBAAyB,CAAA;CAC7C;AAMD,qBAAa,eAAe;IAcd,OAAO,CAAC,MAAM;IAb1B,OAAO,CAAC,IAAI,CAA2B;IACvC,OAAO,CAAC,gBAAgB,CAA4C;IACpE,OAAO,CAAC,kBAAkB,CAAsC;IAChE,OAAO,CAAC,yBAAyB,CAAmC;IACpE,OAAO,CAAC,4BAA4B,CAAyC;IAC7E,OAAO,CAAC,mCAAmC,CAAsC;IACjF,OAAO,CAAC,OAAO,CAAiB;IAChC,OAAO,CAAC,UAAU,CAAC,CAAqC;IAExD,OAAO,CAAC,aAAa,CAAe;IACpC,OAAO,CAAC,aAAa,CAAa;IAClC,OAAO,CAAC,YAAY,CAAyB;gBA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K,EAAE,MAAM;IAKlC,WAAW,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,WAAW,CAAC;IAKzD,OAAO;CAGR"}
@@ -3234,7 +3234,7 @@ async function __wbg_init(module_or_path) {
3234
3234
  }
3235
3235
 
3236
3236
  if (module_or_path === undefined) {
3237
- module_or_path = new URL('sangine_bg.11ddf363.wasm', import.meta.url);
3237
+ module_or_path = new URL('sangine_bg.df2c068e.wasm', import.meta.url);
3238
3238
  }
3239
3239
  const imports = __wbg_get_imports();
3240
3240
 
@@ -1,2 +1,2 @@
1
- export declare const SANGINE_HASH = "11ddf363";
1
+ export declare const SANGINE_HASH = "df2c068e";
2
2
  //# sourceMappingURL=sangine.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sanox/sangine-core",
3
- "version": "0.3.2",
3
+ "version": "0.3.4",
4
4
  "description": "Sangine core renderer runtime (WASM + workers)",
5
5
  "type": "module",
6
6
  "private": false,