@sanox/sangine-core 0.4.0 → 0.4.2
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/gen-types.d.ts +0 -12
- package/dist/gen-types.d.ts.map +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +1 -1
- package/dist/wasm/sangine/{sangine.c27a2565.js → sangine.10c8ee57.js} +12 -12
- package/dist/wasm/sangine/sangine.d.ts +1 -1
- package/dist/wasm/sangine/{sangine_bg.c27a2565.wasm → sangine_bg.10c8ee57.wasm} +0 -0
- package/dist/wasm/sangine/sangine_bg.wasm.d.ts +1 -1
- package/dist/wasm-hashes/sangine.d.ts +1 -1
- package/package.json +1 -1
package/dist/gen-types.d.ts
CHANGED
|
@@ -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
|
}
|
package/dist/gen-types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gen-types.d.ts","sourceRoot":"","sources":["../src/gen-types.ts"],"names":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AAM,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="
|
|
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="10c8ee57";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;
|
package/dist/index.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var E = Object.defineProperty;
|
|
2
2
|
var M = (i, e, t) => e in i ? E(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
|
|
3
3
|
var r = (i, e, t) => M(i, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
-
const p = "/static/sangine/wasm", C = "
|
|
4
|
+
const p = "/static/sangine/wasm", C = "10c8ee57";
|
|
5
5
|
class W {
|
|
6
6
|
constructor(e, t) {
|
|
7
7
|
r(this, "workers");
|
|
@@ -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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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.
|
|
3327
|
+
module_or_path = new URL('sangine_bg.10c8ee57.wasm', import.meta.url);
|
|
3328
3328
|
}
|
|
3329
3329
|
const imports = __wbg_get_imports();
|
|
3330
3330
|
|
|
@@ -44,6 +44,7 @@ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembl
|
|
|
44
44
|
|
|
45
45
|
export interface InitOutput {
|
|
46
46
|
readonly memory: WebAssembly.Memory;
|
|
47
|
+
readonly run: () => void;
|
|
47
48
|
readonly animate_to: (a: number, b: any) => [number, number];
|
|
48
49
|
readonly animate_to_route: (a: number, b: number, c: number) => [number, number];
|
|
49
50
|
readonly create_window: (a: number, b: number, c: any, d: number) => [number, number, number];
|
|
@@ -61,7 +62,6 @@ export interface InitOutput {
|
|
|
61
62
|
readonly set_sun_properties: (a: number, b: any) => [number, number];
|
|
62
63
|
readonly set_window_action: (a: number, b: any) => [number, number];
|
|
63
64
|
readonly set_window_scale: (a: number, b: number) => [number, number];
|
|
64
|
-
readonly run: () => void;
|
|
65
65
|
readonly wasm_bindgen__convert__closures_____invoke__hd8590da73942d3e0: (a: number, b: number, c: any) => [number, number];
|
|
66
66
|
readonly wasm_bindgen__convert__closures_____invoke__h6ff3e7511bd758a3: (a: number, b: number, c: any, d: any) => void;
|
|
67
67
|
readonly wasm_bindgen__convert__closures_____invoke__h00cde4323839146b: (a: number, b: number, c: any) => void;
|
|
Binary file
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
|
+
export const run: () => void;
|
|
4
5
|
export const animate_to: (a: number, b: any) => [number, number];
|
|
5
6
|
export const animate_to_route: (a: number, b: number, c: number) => [number, number];
|
|
6
7
|
export const create_window: (a: number, b: number, c: any, d: number) => [number, number, number];
|
|
@@ -18,7 +19,6 @@ export const set_route_visible: (a: number, b: number, c: number, d: number) =>
|
|
|
18
19
|
export const set_sun_properties: (a: number, b: any) => [number, number];
|
|
19
20
|
export const set_window_action: (a: number, b: any) => [number, number];
|
|
20
21
|
export const set_window_scale: (a: number, b: number) => [number, number];
|
|
21
|
-
export const run: () => void;
|
|
22
22
|
export const wasm_bindgen__convert__closures_____invoke__hd8590da73942d3e0: (a: number, b: number, c: any) => [number, number];
|
|
23
23
|
export const wasm_bindgen__convert__closures_____invoke__h6ff3e7511bd758a3: (a: number, b: number, c: any, d: any) => void;
|
|
24
24
|
export const wasm_bindgen__convert__closures_____invoke__h00cde4323839146b: (a: number, b: number, c: any) => void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const SANGINE_HASH = "
|
|
1
|
+
export declare const SANGINE_HASH = "10c8ee57";
|
|
2
2
|
//# sourceMappingURL=sangine.d.ts.map
|