@sanox/sangine-core 0.3.2 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/gen-types.d.ts +1 -1
- package/dist/gen-types.d.ts.map +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +32 -27
- package/dist/rendererService.d.ts +3 -0
- package/dist/rendererService.d.ts.map +1 -1
- package/dist/wasm/sangine/{sangine.11ddf363.js → sangine.9aeb8f2a.js} +29 -52
- package/dist/wasm/sangine/sangine.d.ts +18 -40
- package/dist/wasm/sangine/{sangine_bg.11ddf363.wasm → sangine_bg.9aeb8f2a.wasm} +0 -0
- package/dist/wasm/sangine/sangine_bg.wasm.d.ts +18 -18
- package/dist/wasm/sbo-decode/{wasm_sbo_decode.fa5ceba1.js → wasm_sbo_decode.95e75786.js} +1 -1
- package/dist/wasm/sbo-decode/wasm_sbo_decode_bg.95e75786.wasm +0 -0
- package/dist/wasm-hashes/sangine.d.ts +1 -1
- package/dist/wasm-hashes/sbo-decode.d.ts +1 -1
- package/package.json +1 -1
- package/dist/wasm/sbo-decode/wasm_sbo_decode_bg.fa5ceba1.wasm +0 -0
package/dist/gen-types.d.ts
CHANGED
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":[],"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,GA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ACpB,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,uBAAuB,CAAC;CAC1C;AACD;;;GAGG;AACH,MAAM,WAAW,KAAK;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,EAAE,EAAE,CAAC;CAClB;AACD;;;GAGG;AACH,MAAM,WAAW,KAAK;IACpB,gBAAgB,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IACnC,mBAAmB,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IACtC,gBAAgB,EAAE,eAAe,EAAE,CAAC;IACpC,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,MAAM,EAAE,KAAK,EAAE,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB"}
|
package/dist/index.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var f=Object.defineProperty;var y=(
|
|
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;
|
package/dist/index.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var f = Object.defineProperty;
|
|
2
|
-
var y = (
|
|
3
|
-
var r = (
|
|
4
|
-
const g = "/static/sangine/wasm", _ = "
|
|
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", _ = "9aeb8f2a";
|
|
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
|
|
15
|
-
|
|
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,
|
|
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
|
-
|
|
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
|
|
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
|
|
112
|
+
let o;
|
|
109
113
|
const w = new Promise((a) => {
|
|
110
|
-
|
|
114
|
+
o = a;
|
|
111
115
|
}), h = this.wasm.create_window(e, t, s);
|
|
112
|
-
return this.windowCreatedPromiseResolveRegistry[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) {
|
|
@@ -193,27 +198,27 @@ class b {
|
|
|
193
198
|
(e = this.decodePool) == null || e.terminate();
|
|
194
199
|
}
|
|
195
200
|
}
|
|
196
|
-
const p = "
|
|
197
|
-
function
|
|
198
|
-
let t = !1, s = null,
|
|
201
|
+
const p = "95e75786";
|
|
202
|
+
function S(n, e) {
|
|
203
|
+
let t = !1, s = null, o = null;
|
|
199
204
|
async function w(h, a) {
|
|
200
|
-
if (
|
|
201
|
-
const i = `https://sangine-asset-cache/${h}`, c = await
|
|
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
|
|
209
|
+
return d.ok && await o.put(i, d.clone()), d;
|
|
205
210
|
}
|
|
206
211
|
return fetch(await a());
|
|
207
212
|
}
|
|
208
|
-
|
|
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
|
-
|
|
217
|
+
n.location.origin
|
|
213
218
|
).href);
|
|
214
219
|
await c.default(), s = c, t = !0;
|
|
215
220
|
}
|
|
216
|
-
!
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
257
|
-
|
|
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,YA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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
|
-
|
|
26
3
|
/**
|
|
27
4
|
* @param {number} window_id
|
|
28
5
|
* @param {any} camera_target
|
|
@@ -2647,53 +2624,53 @@ function __wbg_get_imports() {
|
|
|
2647
2624
|
arg0.writeTexture(arg1, arg2, arg3, arg4);
|
|
2648
2625
|
}, arguments); },
|
|
2649
2626
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
2650
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
2651
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
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);
|
|
2652
2629
|
return ret;
|
|
2653
2630
|
},
|
|
2654
2631
|
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
2655
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
2656
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
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);
|
|
2657
2634
|
return ret;
|
|
2658
2635
|
},
|
|
2659
2636
|
__wbindgen_cast_0000000000000003: function(arg0, arg1) {
|
|
2660
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
2661
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
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);
|
|
2662
2639
|
return ret;
|
|
2663
2640
|
},
|
|
2664
2641
|
__wbindgen_cast_0000000000000004: function(arg0, arg1) {
|
|
2665
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
2666
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
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);
|
|
2667
2644
|
return ret;
|
|
2668
2645
|
},
|
|
2669
2646
|
__wbindgen_cast_0000000000000005: function(arg0, arg1) {
|
|
2670
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
2671
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
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);
|
|
2672
2649
|
return ret;
|
|
2673
2650
|
},
|
|
2674
2651
|
__wbindgen_cast_0000000000000006: function(arg0, arg1) {
|
|
2675
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
2676
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
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);
|
|
2677
2654
|
return ret;
|
|
2678
2655
|
},
|
|
2679
2656
|
__wbindgen_cast_0000000000000007: function(arg0, arg1) {
|
|
2680
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
2681
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
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);
|
|
2682
2659
|
return ret;
|
|
2683
2660
|
},
|
|
2684
2661
|
__wbindgen_cast_0000000000000008: function(arg0, arg1) {
|
|
2685
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
2686
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
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);
|
|
2687
2664
|
return ret;
|
|
2688
2665
|
},
|
|
2689
2666
|
__wbindgen_cast_0000000000000009: function(arg0, arg1) {
|
|
2690
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
2691
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
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);
|
|
2692
2669
|
return ret;
|
|
2693
2670
|
},
|
|
2694
2671
|
__wbindgen_cast_000000000000000a: function(arg0, arg1) {
|
|
2695
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
2696
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
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);
|
|
2697
2674
|
return ret;
|
|
2698
2675
|
},
|
|
2699
2676
|
__wbindgen_cast_000000000000000b: function(arg0) {
|
|
@@ -2761,20 +2738,20 @@ function __wbg_get_imports() {
|
|
|
2761
2738
|
};
|
|
2762
2739
|
}
|
|
2763
2740
|
|
|
2764
|
-
function
|
|
2765
|
-
wasm.
|
|
2741
|
+
function wasm_bindgen__convert__closures_____invoke__h81c46bf303557186(arg0, arg1) {
|
|
2742
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h81c46bf303557186(arg0, arg1);
|
|
2766
2743
|
}
|
|
2767
2744
|
|
|
2768
|
-
function
|
|
2769
|
-
wasm.
|
|
2745
|
+
function wasm_bindgen__convert__closures_____invoke__h355f794c725ec492(arg0, arg1, arg2) {
|
|
2746
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h355f794c725ec492(arg0, arg1, arg2);
|
|
2770
2747
|
}
|
|
2771
2748
|
|
|
2772
|
-
function
|
|
2773
|
-
wasm.
|
|
2749
|
+
function wasm_bindgen__convert__closures_____invoke__h11a2876e668b0630(arg0, arg1, arg2) {
|
|
2750
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h11a2876e668b0630(arg0, arg1, arg2);
|
|
2774
2751
|
}
|
|
2775
2752
|
|
|
2776
|
-
function
|
|
2777
|
-
wasm.
|
|
2753
|
+
function wasm_bindgen__convert__closures_____invoke__h9bcfaf9db4ab96db(arg0, arg1, arg2, arg3) {
|
|
2754
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h9bcfaf9db4ab96db(arg0, arg1, arg2, arg3);
|
|
2778
2755
|
}
|
|
2779
2756
|
|
|
2780
2757
|
|
|
@@ -3234,7 +3211,7 @@ async function __wbg_init(module_or_path) {
|
|
|
3234
3211
|
}
|
|
3235
3212
|
|
|
3236
3213
|
if (module_or_path === undefined) {
|
|
3237
|
-
module_or_path = new URL('sangine_bg.
|
|
3214
|
+
module_or_path = new URL('sangine_bg.9aeb8f2a.wasm', import.meta.url);
|
|
3238
3215
|
}
|
|
3239
3216
|
const imports = __wbg_get_imports();
|
|
3240
3217
|
|
|
@@ -1,28 +1,6 @@
|
|
|
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
|
-
|
|
26
4
|
export function animate_to(window_id: number, camera_target: any): void;
|
|
27
5
|
|
|
28
6
|
export function animate_to_route(window_id: number, route_id: string): void;
|
|
@@ -66,30 +44,30 @@ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembl
|
|
|
66
44
|
|
|
67
45
|
export interface InitOutput {
|
|
68
46
|
readonly memory: WebAssembly.Memory;
|
|
69
|
-
readonly
|
|
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];
|
|
70
53
|
readonly register_asset_decoder: (a: any) => void;
|
|
71
|
-
readonly
|
|
54
|
+
readonly register_event_listener: (a: any) => void;
|
|
72
55
|
readonly set_ambient_lighting: (a: number, b: any) => [number, number];
|
|
73
|
-
readonly set_render_quality: (a: number, b: any) => [number, number];
|
|
74
56
|
readonly set_gpu_memory_budget_mb: (a: number, b: number) => [number, number];
|
|
57
|
+
readonly set_lighting_mode: (a: number, b: any) => [number, number];
|
|
75
58
|
readonly set_north_correction: (a: number, b: number) => [number, number];
|
|
76
|
-
readonly
|
|
77
|
-
readonly set_window_scale: (a: number, b: number) => [number, number];
|
|
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];
|
|
59
|
+
readonly set_render_quality: (a: number, b: any) => [number, number];
|
|
82
60
|
readonly set_route_highlight: (a: number, b: number, c: number, d: number) => [number, number];
|
|
83
|
-
readonly
|
|
61
|
+
readonly set_route_visible: (a: number, b: number, c: number, d: number) => [number, number];
|
|
62
|
+
readonly set_sun_properties: (a: number, b: any) => [number, number];
|
|
84
63
|
readonly set_window_action: (a: number, b: any) => [number, number];
|
|
85
|
-
readonly
|
|
86
|
-
readonly
|
|
87
|
-
readonly
|
|
88
|
-
readonly
|
|
89
|
-
readonly
|
|
90
|
-
readonly
|
|
91
|
-
readonly
|
|
92
|
-
readonly wasm_bindgen__convert__closures_____invoke__he5f4030ca973712a: (a: number, b: number) => void;
|
|
64
|
+
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;
|
|
93
71
|
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
94
72
|
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
95
73
|
readonly __externref_table_alloc: () => number;
|
|
Binary file
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
|
-
export const
|
|
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];
|
|
5
10
|
export const register_asset_decoder: (a: any) => void;
|
|
6
|
-
export const
|
|
11
|
+
export const register_event_listener: (a: any) => void;
|
|
7
12
|
export const set_ambient_lighting: (a: number, b: any) => [number, number];
|
|
8
|
-
export const set_render_quality: (a: number, b: any) => [number, number];
|
|
9
13
|
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];
|
|
10
15
|
export const set_north_correction: (a: number, b: number) => [number, number];
|
|
11
|
-
export const
|
|
12
|
-
export const set_window_scale: (a: number, b: number) => [number, number];
|
|
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];
|
|
16
|
+
export const set_render_quality: (a: number, b: any) => [number, number];
|
|
17
17
|
export const set_route_highlight: (a: number, b: number, c: number, d: number) => [number, number];
|
|
18
|
-
export const
|
|
18
|
+
export const set_route_visible: (a: number, b: number, c: number, d: number) => [number, number];
|
|
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
|
-
export const
|
|
21
|
-
export const
|
|
22
|
-
export const
|
|
23
|
-
export const
|
|
24
|
-
export const
|
|
25
|
-
export const
|
|
26
|
-
export const
|
|
27
|
-
export const wasm_bindgen__convert__closures_____invoke__he5f4030ca973712a: (a: number, b: number) => void;
|
|
21
|
+
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;
|
|
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.
|
|
172
|
+
module_or_path = new URL('wasm_sbo_decode_bg.95e75786.wasm', import.meta.url);
|
|
173
173
|
}
|
|
174
174
|
const imports = __wbg_get_imports();
|
|
175
175
|
|
|
Binary file
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const SANGINE_HASH = "
|
|
1
|
+
export declare const SANGINE_HASH = "9aeb8f2a";
|
|
2
2
|
//# sourceMappingURL=sangine.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const SBO_DECODE_HASH = "
|
|
1
|
+
export declare const SBO_DECODE_HASH = "95e75786";
|
|
2
2
|
//# sourceMappingURL=sbo-decode.d.ts.map
|
package/package.json
CHANGED
|
Binary file
|