@sanox/sangine-core 0.3.3 → 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.
package/dist/index.cjs.js CHANGED
@@ -1 +1 @@
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",_="9aeb8f2a";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="95e75786";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;
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
2
  var y = (n, e, t) => e in n ? f(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
3
  var r = (n, e, t) => y(n, typeof e != "symbol" ? e + "" : e, t);
4
- const g = "/static/sangine/wasm", _ = "9aeb8f2a";
4
+ const g = "/static/sangine/wasm", _ = "df2c068e";
5
5
  class R {
6
6
  constructor(e, t) {
7
7
  r(this, "workers");
@@ -198,7 +198,7 @@ class A {
198
198
  (e = this.decodePool) == null || e.terminate();
199
199
  }
200
200
  }
201
- const p = "95e75786";
201
+ const p = "fa5ceba1";
202
202
  function S(n, e) {
203
203
  let t = !1, s = null, o = null;
204
204
  async function w(h, a) {
@@ -1,6 +1,28 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
 
4
+ /**
5
+ * Chroma subsampling format
6
+ */
7
+ export enum ChromaSampling {
8
+ /**
9
+ * Both vertically and horizontally subsampled.
10
+ */
11
+ Cs420 = 0,
12
+ /**
13
+ * Horizontally subsampled.
14
+ */
15
+ Cs422 = 1,
16
+ /**
17
+ * Not subsampled.
18
+ */
19
+ Cs444 = 2,
20
+ /**
21
+ * Monochrome.
22
+ */
23
+ Cs400 = 3,
24
+ }
25
+
4
26
  export function animate_to(window_id: number, camera_target: any): void;
5
27
 
6
28
  export function animate_to_route(window_id: number, route_id: string): void;
@@ -44,30 +66,30 @@ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembl
44
66
 
45
67
  export interface InitOutput {
46
68
  readonly memory: WebAssembly.Memory;
47
- readonly run: () => void;
48
- readonly animate_to: (a: number, b: any) => [number, number];
49
- readonly animate_to_route: (a: number, b: number, c: number) => [number, number];
50
- readonly create_window: (a: number, b: number, c: any, d: number) => [number, number, number];
51
- readonly destroy_window: (a: number) => [number, number];
52
- readonly read_camera_pos: (a: number) => [number, number, number];
53
- readonly register_asset_decoder: (a: any) => void;
54
69
  readonly register_event_listener: (a: any) => void;
70
+ readonly register_asset_decoder: (a: any) => void;
71
+ readonly set_lighting_mode: (a: number, b: any) => [number, number];
55
72
  readonly set_ambient_lighting: (a: number, b: any) => [number, number];
73
+ readonly set_render_quality: (a: number, b: any) => [number, number];
56
74
  readonly set_gpu_memory_budget_mb: (a: number, b: number) => [number, number];
57
- readonly set_lighting_mode: (a: number, b: any) => [number, number];
58
75
  readonly set_north_correction: (a: number, b: number) => [number, number];
59
- readonly set_render_quality: (a: number, b: any) => [number, number];
60
- readonly set_route_highlight: (a: number, b: number, c: number, d: number) => [number, number];
61
- readonly set_route_visible: (a: number, b: number, c: number, d: number) => [number, number];
62
76
  readonly set_sun_properties: (a: number, b: any) => [number, number];
63
- readonly set_window_action: (a: number, b: any) => [number, number];
64
77
  readonly set_window_scale: (a: number, b: number) => [number, number];
65
- readonly wasm_bindgen__closure__destroy__h0f9502aef9ad7012: (a: number, b: number) => void;
66
- readonly wasm_bindgen__closure__destroy__h756fff185ea9610f: (a: number, b: number) => void;
67
- readonly wasm_bindgen__convert__closures_____invoke__h9bcfaf9db4ab96db: (a: number, b: number, c: any, d: any) => void;
68
- readonly wasm_bindgen__convert__closures_____invoke__h355f794c725ec492: (a: number, b: number, c: any) => void;
69
- readonly wasm_bindgen__convert__closures_____invoke__h11a2876e668b0630: (a: number, b: number, c: any) => void;
70
- readonly wasm_bindgen__convert__closures_____invoke__h81c46bf303557186: (a: number, b: number) => void;
78
+ readonly read_camera_pos: (a: number) => [number, number, number];
79
+ readonly animate_to: (a: number, b: any) => [number, number];
80
+ readonly animate_to_route: (a: number, b: number, c: number) => [number, number];
81
+ readonly set_route_visible: (a: number, b: number, c: number, d: number) => [number, number];
82
+ readonly set_route_highlight: (a: number, b: number, c: number, d: number) => [number, number];
83
+ readonly destroy_window: (a: number) => [number, number];
84
+ readonly set_window_action: (a: number, b: any) => [number, number];
85
+ readonly create_window: (a: number, b: number, c: any, d: number) => [number, number, number];
86
+ readonly run: () => void;
87
+ readonly wasm_bindgen__closure__destroy__h17333457aae2b090: (a: number, b: number) => void;
88
+ readonly wasm_bindgen__closure__destroy__hf05ec8f078dda008: (a: number, b: number) => void;
89
+ readonly wasm_bindgen__convert__closures_____invoke__h2a85c969f4c20848: (a: number, b: number, c: any, d: any) => void;
90
+ readonly wasm_bindgen__convert__closures_____invoke__h091d820f15c8c0c2: (a: number, b: number, c: any) => void;
91
+ readonly wasm_bindgen__convert__closures_____invoke__h07eaa4ea93496cfb: (a: number, b: number, c: any) => void;
92
+ readonly wasm_bindgen__convert__closures_____invoke__he5f4030ca973712a: (a: number, b: number) => void;
71
93
  readonly __wbindgen_malloc: (a: number, b: number) => number;
72
94
  readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
73
95
  readonly __externref_table_alloc: () => number;
@@ -1,5 +1,28 @@
1
1
  /* @ts-self-types="./sangine.d.ts" */
2
2
 
3
+ /**
4
+ * Chroma subsampling format
5
+ * @enum {0 | 1 | 2 | 3}
6
+ */
7
+ export const ChromaSampling = Object.freeze({
8
+ /**
9
+ * Both vertically and horizontally subsampled.
10
+ */
11
+ Cs420: 0, "0": "Cs420",
12
+ /**
13
+ * Horizontally subsampled.
14
+ */
15
+ Cs422: 1, "1": "Cs422",
16
+ /**
17
+ * Not subsampled.
18
+ */
19
+ Cs444: 2, "2": "Cs444",
20
+ /**
21
+ * Monochrome.
22
+ */
23
+ Cs400: 3, "3": "Cs400",
24
+ });
25
+
3
26
  /**
4
27
  * @param {number} window_id
5
28
  * @param {any} camera_target
@@ -2624,53 +2647,53 @@ function __wbg_get_imports() {
2624
2647
  arg0.writeTexture(arg1, arg2, arg3, arg4);
2625
2648
  }, arguments); },
2626
2649
  __wbindgen_cast_0000000000000001: function(arg0, arg1) {
2627
- // Cast intrinsic for `Closure(Closure { dtor_idx: 3817, function: Function { arguments: [NamedExternref("Array<any>"), NamedExternref("ResizeObserver")], shim_idx: 3824, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2628
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h0f9502aef9ad7012, wasm_bindgen__convert__closures_____invoke__h9bcfaf9db4ab96db);
2650
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 3799, function: Function { arguments: [NamedExternref("Array<any>"), NamedExternref("ResizeObserver")], shim_idx: 3805, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2651
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h17333457aae2b090, wasm_bindgen__convert__closures_____invoke__h2a85c969f4c20848);
2629
2652
  return ret;
2630
2653
  },
2631
2654
  __wbindgen_cast_0000000000000002: function(arg0, arg1) {
2632
- // Cast intrinsic for `Closure(Closure { dtor_idx: 3817, function: Function { arguments: [NamedExternref("Array<any>")], shim_idx: 3818, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2633
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h0f9502aef9ad7012, wasm_bindgen__convert__closures_____invoke__h355f794c725ec492);
2655
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 3799, function: Function { arguments: [NamedExternref("Array<any>")], shim_idx: 3800, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2656
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h17333457aae2b090, wasm_bindgen__convert__closures_____invoke__h091d820f15c8c0c2);
2634
2657
  return ret;
2635
2658
  },
2636
2659
  __wbindgen_cast_0000000000000003: function(arg0, arg1) {
2637
- // Cast intrinsic for `Closure(Closure { dtor_idx: 3817, function: Function { arguments: [NamedExternref("Event")], shim_idx: 3818, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2638
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h0f9502aef9ad7012, wasm_bindgen__convert__closures_____invoke__h355f794c725ec492);
2660
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 3799, function: Function { arguments: [NamedExternref("Event")], shim_idx: 3800, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2661
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h17333457aae2b090, wasm_bindgen__convert__closures_____invoke__h091d820f15c8c0c2);
2639
2662
  return ret;
2640
2663
  },
2641
2664
  __wbindgen_cast_0000000000000004: function(arg0, arg1) {
2642
- // Cast intrinsic for `Closure(Closure { dtor_idx: 3817, function: Function { arguments: [NamedExternref("FocusEvent")], shim_idx: 3818, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2643
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h0f9502aef9ad7012, wasm_bindgen__convert__closures_____invoke__h355f794c725ec492);
2665
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 3799, function: Function { arguments: [NamedExternref("FocusEvent")], shim_idx: 3800, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2666
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h17333457aae2b090, wasm_bindgen__convert__closures_____invoke__h091d820f15c8c0c2);
2644
2667
  return ret;
2645
2668
  },
2646
2669
  __wbindgen_cast_0000000000000005: function(arg0, arg1) {
2647
- // Cast intrinsic for `Closure(Closure { dtor_idx: 3817, function: Function { arguments: [NamedExternref("KeyboardEvent")], shim_idx: 3818, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2648
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h0f9502aef9ad7012, wasm_bindgen__convert__closures_____invoke__h355f794c725ec492);
2670
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 3799, function: Function { arguments: [NamedExternref("KeyboardEvent")], shim_idx: 3800, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2671
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h17333457aae2b090, wasm_bindgen__convert__closures_____invoke__h091d820f15c8c0c2);
2649
2672
  return ret;
2650
2673
  },
2651
2674
  __wbindgen_cast_0000000000000006: function(arg0, arg1) {
2652
- // Cast intrinsic for `Closure(Closure { dtor_idx: 3817, function: Function { arguments: [NamedExternref("PageTransitionEvent")], shim_idx: 3818, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2653
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h0f9502aef9ad7012, wasm_bindgen__convert__closures_____invoke__h355f794c725ec492);
2675
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 3799, function: Function { arguments: [NamedExternref("PageTransitionEvent")], shim_idx: 3800, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2676
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h17333457aae2b090, wasm_bindgen__convert__closures_____invoke__h091d820f15c8c0c2);
2654
2677
  return ret;
2655
2678
  },
2656
2679
  __wbindgen_cast_0000000000000007: function(arg0, arg1) {
2657
- // Cast intrinsic for `Closure(Closure { dtor_idx: 3817, function: Function { arguments: [NamedExternref("PointerEvent")], shim_idx: 3818, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2658
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h0f9502aef9ad7012, wasm_bindgen__convert__closures_____invoke__h355f794c725ec492);
2680
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 3799, function: Function { arguments: [NamedExternref("PointerEvent")], shim_idx: 3800, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2681
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h17333457aae2b090, wasm_bindgen__convert__closures_____invoke__h091d820f15c8c0c2);
2659
2682
  return ret;
2660
2683
  },
2661
2684
  __wbindgen_cast_0000000000000008: function(arg0, arg1) {
2662
- // Cast intrinsic for `Closure(Closure { dtor_idx: 3817, function: Function { arguments: [NamedExternref("WheelEvent")], shim_idx: 3818, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2663
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h0f9502aef9ad7012, wasm_bindgen__convert__closures_____invoke__h355f794c725ec492);
2685
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 3799, function: Function { arguments: [NamedExternref("WheelEvent")], shim_idx: 3800, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2686
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h17333457aae2b090, wasm_bindgen__convert__closures_____invoke__h091d820f15c8c0c2);
2664
2687
  return ret;
2665
2688
  },
2666
2689
  __wbindgen_cast_0000000000000009: function(arg0, arg1) {
2667
- // Cast intrinsic for `Closure(Closure { dtor_idx: 3817, function: Function { arguments: [], shim_idx: 3821, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2668
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h0f9502aef9ad7012, wasm_bindgen__convert__closures_____invoke__h81c46bf303557186);
2690
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 3799, function: Function { arguments: [], shim_idx: 3803, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2691
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h17333457aae2b090, wasm_bindgen__convert__closures_____invoke__he5f4030ca973712a);
2669
2692
  return ret;
2670
2693
  },
2671
2694
  __wbindgen_cast_000000000000000a: function(arg0, arg1) {
2672
- // Cast intrinsic for `Closure(Closure { dtor_idx: 3891, function: Function { arguments: [Externref], shim_idx: 3892, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2673
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h756fff185ea9610f, wasm_bindgen__convert__closures_____invoke__h11a2876e668b0630);
2695
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 3856, function: Function { arguments: [Externref], shim_idx: 3857, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2696
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__hf05ec8f078dda008, wasm_bindgen__convert__closures_____invoke__h07eaa4ea93496cfb);
2674
2697
  return ret;
2675
2698
  },
2676
2699
  __wbindgen_cast_000000000000000b: function(arg0) {
@@ -2738,20 +2761,20 @@ function __wbg_get_imports() {
2738
2761
  };
2739
2762
  }
2740
2763
 
2741
- function wasm_bindgen__convert__closures_____invoke__h81c46bf303557186(arg0, arg1) {
2742
- wasm.wasm_bindgen__convert__closures_____invoke__h81c46bf303557186(arg0, arg1);
2764
+ function wasm_bindgen__convert__closures_____invoke__he5f4030ca973712a(arg0, arg1) {
2765
+ wasm.wasm_bindgen__convert__closures_____invoke__he5f4030ca973712a(arg0, arg1);
2743
2766
  }
2744
2767
 
2745
- function wasm_bindgen__convert__closures_____invoke__h355f794c725ec492(arg0, arg1, arg2) {
2746
- wasm.wasm_bindgen__convert__closures_____invoke__h355f794c725ec492(arg0, arg1, arg2);
2768
+ function wasm_bindgen__convert__closures_____invoke__h091d820f15c8c0c2(arg0, arg1, arg2) {
2769
+ wasm.wasm_bindgen__convert__closures_____invoke__h091d820f15c8c0c2(arg0, arg1, arg2);
2747
2770
  }
2748
2771
 
2749
- function wasm_bindgen__convert__closures_____invoke__h11a2876e668b0630(arg0, arg1, arg2) {
2750
- wasm.wasm_bindgen__convert__closures_____invoke__h11a2876e668b0630(arg0, arg1, arg2);
2772
+ function wasm_bindgen__convert__closures_____invoke__h07eaa4ea93496cfb(arg0, arg1, arg2) {
2773
+ wasm.wasm_bindgen__convert__closures_____invoke__h07eaa4ea93496cfb(arg0, arg1, arg2);
2751
2774
  }
2752
2775
 
2753
- function wasm_bindgen__convert__closures_____invoke__h9bcfaf9db4ab96db(arg0, arg1, arg2, arg3) {
2754
- wasm.wasm_bindgen__convert__closures_____invoke__h9bcfaf9db4ab96db(arg0, arg1, arg2, arg3);
2776
+ function wasm_bindgen__convert__closures_____invoke__h2a85c969f4c20848(arg0, arg1, arg2, arg3) {
2777
+ wasm.wasm_bindgen__convert__closures_____invoke__h2a85c969f4c20848(arg0, arg1, arg2, arg3);
2755
2778
  }
2756
2779
 
2757
2780
 
@@ -3211,7 +3234,7 @@ async function __wbg_init(module_or_path) {
3211
3234
  }
3212
3235
 
3213
3236
  if (module_or_path === undefined) {
3214
- module_or_path = new URL('sangine_bg.9aeb8f2a.wasm', import.meta.url);
3237
+ module_or_path = new URL('sangine_bg.df2c068e.wasm', import.meta.url);
3215
3238
  }
3216
3239
  const imports = __wbg_get_imports();
3217
3240
 
@@ -1,30 +1,30 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  export const memory: WebAssembly.Memory;
4
- export const run: () => void;
5
- export const animate_to: (a: number, b: any) => [number, number];
6
- export const animate_to_route: (a: number, b: number, c: number) => [number, number];
7
- export const create_window: (a: number, b: number, c: any, d: number) => [number, number, number];
8
- export const destroy_window: (a: number) => [number, number];
9
- export const read_camera_pos: (a: number) => [number, number, number];
10
- export const register_asset_decoder: (a: any) => void;
11
4
  export const register_event_listener: (a: any) => void;
5
+ export const register_asset_decoder: (a: any) => void;
6
+ export const set_lighting_mode: (a: number, b: any) => [number, number];
12
7
  export const set_ambient_lighting: (a: number, b: any) => [number, number];
8
+ export const set_render_quality: (a: number, b: any) => [number, number];
13
9
  export const set_gpu_memory_budget_mb: (a: number, b: number) => [number, number];
14
- export const set_lighting_mode: (a: number, b: any) => [number, number];
15
10
  export const set_north_correction: (a: number, b: number) => [number, number];
16
- export const set_render_quality: (a: number, b: any) => [number, number];
17
- export const set_route_highlight: (a: number, b: number, c: number, d: number) => [number, number];
18
- export const set_route_visible: (a: number, b: number, c: number, d: number) => [number, number];
19
11
  export const set_sun_properties: (a: number, b: any) => [number, number];
20
- export const set_window_action: (a: number, b: any) => [number, number];
21
12
  export const set_window_scale: (a: number, b: number) => [number, number];
22
- export const wasm_bindgen__closure__destroy__h0f9502aef9ad7012: (a: number, b: number) => void;
23
- export const wasm_bindgen__closure__destroy__h756fff185ea9610f: (a: number, b: number) => void;
24
- export const wasm_bindgen__convert__closures_____invoke__h9bcfaf9db4ab96db: (a: number, b: number, c: any, d: any) => void;
25
- export const wasm_bindgen__convert__closures_____invoke__h355f794c725ec492: (a: number, b: number, c: any) => void;
26
- export const wasm_bindgen__convert__closures_____invoke__h11a2876e668b0630: (a: number, b: number, c: any) => void;
27
- export const wasm_bindgen__convert__closures_____invoke__h81c46bf303557186: (a: number, b: number) => void;
13
+ export const read_camera_pos: (a: number) => [number, number, number];
14
+ export const animate_to: (a: number, b: any) => [number, number];
15
+ export const animate_to_route: (a: number, b: number, c: number) => [number, number];
16
+ export const set_route_visible: (a: number, b: number, c: number, d: number) => [number, number];
17
+ export const set_route_highlight: (a: number, b: number, c: number, d: number) => [number, number];
18
+ export const destroy_window: (a: number) => [number, number];
19
+ export const set_window_action: (a: number, b: any) => [number, number];
20
+ export const create_window: (a: number, b: number, c: any, d: number) => [number, number, number];
21
+ export const run: () => void;
22
+ export const wasm_bindgen__closure__destroy__h17333457aae2b090: (a: number, b: number) => void;
23
+ export const wasm_bindgen__closure__destroy__hf05ec8f078dda008: (a: number, b: number) => void;
24
+ export const wasm_bindgen__convert__closures_____invoke__h2a85c969f4c20848: (a: number, b: number, c: any, d: any) => void;
25
+ export const wasm_bindgen__convert__closures_____invoke__h091d820f15c8c0c2: (a: number, b: number, c: any) => void;
26
+ export const wasm_bindgen__convert__closures_____invoke__h07eaa4ea93496cfb: (a: number, b: number, c: any) => void;
27
+ export const wasm_bindgen__convert__closures_____invoke__he5f4030ca973712a: (a: number, b: number) => void;
28
28
  export const __wbindgen_malloc: (a: number, b: number) => number;
29
29
  export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
30
30
  export const __externref_table_alloc: () => number;
@@ -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.95e75786.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
 
@@ -1,2 +1,2 @@
1
- export declare const SANGINE_HASH = "9aeb8f2a";
1
+ export declare const SANGINE_HASH = "df2c068e";
2
2
  //# sourceMappingURL=sangine.d.ts.map
@@ -1,2 +1,2 @@
1
- export declare const SBO_DECODE_HASH = "95e75786";
1
+ export declare const SBO_DECODE_HASH = "fa5ceba1";
2
2
  //# sourceMappingURL=sbo-decode.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sanox/sangine-core",
3
- "version": "0.3.3",
3
+ "version": "0.3.4",
4
4
  "description": "Sangine core renderer runtime (WASM + workers)",
5
5
  "type": "module",
6
6
  "private": false,