rbush-rs 1.0.1 → 1.0.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/package.json +14 -19
- package/rbush.js +42 -0
- package/rbush_rs.d.ts +0 -59
- package/rbush_rs.js +0 -311
- package/rbush_rs_bg.wasm +0 -0
package/package.json
CHANGED
|
@@ -1,24 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rbush-rs",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
"
|
|
8
|
-
"version": "1.0.1",
|
|
9
|
-
"license": "MIT",
|
|
10
|
-
"repository": {
|
|
11
|
-
"type": "git",
|
|
12
|
-
"url": "https://github.com/ppmpreetham/rbush-rs"
|
|
13
|
-
},
|
|
3
|
+
"version": "1.0.3",
|
|
4
|
+
"description": "High-performance RBush port in WebAssembly (Rust)",
|
|
5
|
+
"main": "rbush.js",
|
|
6
|
+
"module": "rbush.js",
|
|
7
|
+
"type": "module",
|
|
14
8
|
"files": [
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"rbush_rs.d.ts"
|
|
9
|
+
"rbush.js",
|
|
10
|
+
"pkg/**/*"
|
|
18
11
|
],
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
12
|
+
"scripts": {
|
|
13
|
+
"build": "wasm-pack build --target bundler",
|
|
14
|
+
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js"
|
|
15
|
+
},
|
|
16
|
+
"devDependencies": {
|
|
17
|
+
"jest": "^30.2.0"
|
|
18
|
+
}
|
|
24
19
|
}
|
package/rbush.js
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { RBush as WasmRBush } from './pkg/rbush_rs.js';
|
|
2
|
+
|
|
3
|
+
export default class RBush {
|
|
4
|
+
constructor(maxEntries = 9) {
|
|
5
|
+
this._tree = new WasmRBush(maxEntries);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
toBBox(item) { return item; }
|
|
9
|
+
|
|
10
|
+
insert(item) {
|
|
11
|
+
const b = this.toBBox(item);
|
|
12
|
+
this._tree.insert({
|
|
13
|
+
...item,
|
|
14
|
+
minX: b.minX, minY: b.minY, maxX: b.maxX, maxY: b.maxY
|
|
15
|
+
});
|
|
16
|
+
return this;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
load(data) {
|
|
20
|
+
const normalized = data.map(item => {
|
|
21
|
+
const b = this.toBBox(item);
|
|
22
|
+
return { ...item, minX: b.minX, minY: b.minY, maxX: b.maxX, maxY: b.maxY };
|
|
23
|
+
});
|
|
24
|
+
this._tree.load(normalized);
|
|
25
|
+
return this;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
remove(item) {
|
|
29
|
+
const b = this.toBBox(item);
|
|
30
|
+
this._tree.remove({ ...item, minX: b.minX, minY: b.minY, maxX: b.maxX, maxY: b.maxY });
|
|
31
|
+
return this;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
search(bbox) { return this._tree.search(bbox); }
|
|
35
|
+
collides(bbox) { return this._tree.collides(bbox); }
|
|
36
|
+
all() { return this._tree.all(); }
|
|
37
|
+
clear() { this._tree.clear(); return this; }
|
|
38
|
+
toJSON() { return this._tree.toJSON(); }
|
|
39
|
+
fromJSON(data) { this._tree.fromJSON(data); return this; }
|
|
40
|
+
|
|
41
|
+
destroy() { this._tree.free(); }
|
|
42
|
+
}
|
package/rbush_rs.d.ts
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
/* tslint:disable */
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
|
|
4
|
-
export class RBush {
|
|
5
|
-
free(): void;
|
|
6
|
-
[Symbol.dispose](): void;
|
|
7
|
-
all(): Array<any>;
|
|
8
|
-
clear(): void;
|
|
9
|
-
collides(bbox_js: any): boolean;
|
|
10
|
-
insert(item: any): void;
|
|
11
|
-
load(data: Array<any>): void;
|
|
12
|
-
loadHybrid(fast_coords: Float64Array, items: Array<any>): void;
|
|
13
|
-
constructor(max_entries?: number | null);
|
|
14
|
-
remove(item: any): void;
|
|
15
|
-
search(bbox_js: any): Array<any>;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
19
|
-
|
|
20
|
-
export interface InitOutput {
|
|
21
|
-
readonly memory: WebAssembly.Memory;
|
|
22
|
-
readonly __wbg_rbush_free: (a: number, b: number) => void;
|
|
23
|
-
readonly rbush_all: (a: number) => any;
|
|
24
|
-
readonly rbush_clear: (a: number) => void;
|
|
25
|
-
readonly rbush_collides: (a: number, b: any) => number;
|
|
26
|
-
readonly rbush_insert: (a: number, b: any) => void;
|
|
27
|
-
readonly rbush_load: (a: number, b: any) => void;
|
|
28
|
-
readonly rbush_loadHybrid: (a: number, b: number, c: number, d: any) => void;
|
|
29
|
-
readonly rbush_new: (a: number) => number;
|
|
30
|
-
readonly rbush_remove: (a: number, b: any) => void;
|
|
31
|
-
readonly rbush_search: (a: number, b: any) => any;
|
|
32
|
-
readonly __wbindgen_exn_store: (a: number) => void;
|
|
33
|
-
readonly __externref_table_alloc: () => number;
|
|
34
|
-
readonly __wbindgen_externrefs: WebAssembly.Table;
|
|
35
|
-
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
36
|
-
readonly __wbindgen_start: () => void;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export type SyncInitInput = BufferSource | WebAssembly.Module;
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* Instantiates the given `module`, which can either be bytes or
|
|
43
|
-
* a precompiled `WebAssembly.Module`.
|
|
44
|
-
*
|
|
45
|
-
* @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
|
|
46
|
-
*
|
|
47
|
-
* @returns {InitOutput}
|
|
48
|
-
*/
|
|
49
|
-
export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
|
|
53
|
-
* for everything else, calls `WebAssembly.instantiate` directly.
|
|
54
|
-
*
|
|
55
|
-
* @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
|
|
56
|
-
*
|
|
57
|
-
* @returns {Promise<InitOutput>}
|
|
58
|
-
*/
|
|
59
|
-
export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;
|
package/rbush_rs.js
DELETED
|
@@ -1,311 +0,0 @@
|
|
|
1
|
-
/* @ts-self-types="./rbush_rs.d.ts" */
|
|
2
|
-
|
|
3
|
-
export class RBush {
|
|
4
|
-
__destroy_into_raw() {
|
|
5
|
-
const ptr = this.__wbg_ptr;
|
|
6
|
-
this.__wbg_ptr = 0;
|
|
7
|
-
RBushFinalization.unregister(this);
|
|
8
|
-
return ptr;
|
|
9
|
-
}
|
|
10
|
-
free() {
|
|
11
|
-
const ptr = this.__destroy_into_raw();
|
|
12
|
-
wasm.__wbg_rbush_free(ptr, 0);
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* @returns {Array<any>}
|
|
16
|
-
*/
|
|
17
|
-
all() {
|
|
18
|
-
const ret = wasm.rbush_all(this.__wbg_ptr);
|
|
19
|
-
return ret;
|
|
20
|
-
}
|
|
21
|
-
clear() {
|
|
22
|
-
wasm.rbush_clear(this.__wbg_ptr);
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* @param {any} bbox_js
|
|
26
|
-
* @returns {boolean}
|
|
27
|
-
*/
|
|
28
|
-
collides(bbox_js) {
|
|
29
|
-
const ret = wasm.rbush_collides(this.__wbg_ptr, bbox_js);
|
|
30
|
-
return ret !== 0;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* @param {any} item
|
|
34
|
-
*/
|
|
35
|
-
insert(item) {
|
|
36
|
-
wasm.rbush_insert(this.__wbg_ptr, item);
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* @param {Array<any>} data
|
|
40
|
-
*/
|
|
41
|
-
load(data) {
|
|
42
|
-
wasm.rbush_load(this.__wbg_ptr, data);
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* @param {Float64Array} fast_coords
|
|
46
|
-
* @param {Array<any>} items
|
|
47
|
-
*/
|
|
48
|
-
loadHybrid(fast_coords, items) {
|
|
49
|
-
const ptr0 = passArrayF64ToWasm0(fast_coords, wasm.__wbindgen_malloc);
|
|
50
|
-
const len0 = WASM_VECTOR_LEN;
|
|
51
|
-
wasm.rbush_loadHybrid(this.__wbg_ptr, ptr0, len0, items);
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* @param {number | null} [max_entries]
|
|
55
|
-
*/
|
|
56
|
-
constructor(max_entries) {
|
|
57
|
-
const ret = wasm.rbush_new(isLikeNone(max_entries) ? 0x100000001 : (max_entries) >>> 0);
|
|
58
|
-
this.__wbg_ptr = ret >>> 0;
|
|
59
|
-
RBushFinalization.register(this, this.__wbg_ptr, this);
|
|
60
|
-
return this;
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* @param {any} item
|
|
64
|
-
*/
|
|
65
|
-
remove(item) {
|
|
66
|
-
wasm.rbush_remove(this.__wbg_ptr, item);
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* @param {any} bbox_js
|
|
70
|
-
* @returns {Array<any>}
|
|
71
|
-
*/
|
|
72
|
-
search(bbox_js) {
|
|
73
|
-
const ret = wasm.rbush_search(this.__wbg_ptr, bbox_js);
|
|
74
|
-
return ret;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
if (Symbol.dispose) RBush.prototype[Symbol.dispose] = RBush.prototype.free;
|
|
78
|
-
|
|
79
|
-
function __wbg_get_imports() {
|
|
80
|
-
const import0 = {
|
|
81
|
-
__proto__: null,
|
|
82
|
-
__wbg___wbindgen_is_null_ac34f5003991759a: function(arg0) {
|
|
83
|
-
const ret = arg0 === null;
|
|
84
|
-
return ret;
|
|
85
|
-
},
|
|
86
|
-
__wbg___wbindgen_is_undefined_9e4d92534c42d778: function(arg0) {
|
|
87
|
-
const ret = arg0 === undefined;
|
|
88
|
-
return ret;
|
|
89
|
-
},
|
|
90
|
-
__wbg___wbindgen_jsval_eq_11888390b0186270: function(arg0, arg1) {
|
|
91
|
-
const ret = arg0 === arg1;
|
|
92
|
-
return ret;
|
|
93
|
-
},
|
|
94
|
-
__wbg___wbindgen_number_get_8ff4255516ccad3e: function(arg0, arg1) {
|
|
95
|
-
const obj = arg1;
|
|
96
|
-
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
97
|
-
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
98
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
99
|
-
},
|
|
100
|
-
__wbg___wbindgen_throw_be289d5034ed271b: function(arg0, arg1) {
|
|
101
|
-
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
102
|
-
},
|
|
103
|
-
__wbg_get_9b94d73e6221f75c: function(arg0, arg1) {
|
|
104
|
-
const ret = arg0[arg1 >>> 0];
|
|
105
|
-
return ret;
|
|
106
|
-
},
|
|
107
|
-
__wbg_get_b3ed3ad4be2bc8ac: function() { return handleError(function (arg0, arg1) {
|
|
108
|
-
const ret = Reflect.get(arg0, arg1);
|
|
109
|
-
return ret;
|
|
110
|
-
}, arguments); },
|
|
111
|
-
__wbg_length_35a7bace40f36eac: function(arg0) {
|
|
112
|
-
const ret = arg0.length;
|
|
113
|
-
return ret;
|
|
114
|
-
},
|
|
115
|
-
__wbg_new_3eb36ae241fe6f44: function() {
|
|
116
|
-
const ret = new Array();
|
|
117
|
-
return ret;
|
|
118
|
-
},
|
|
119
|
-
__wbg_push_8ffdcb2063340ba5: function(arg0, arg1) {
|
|
120
|
-
const ret = arg0.push(arg1);
|
|
121
|
-
return ret;
|
|
122
|
-
},
|
|
123
|
-
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
124
|
-
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
125
|
-
const ret = getStringFromWasm0(arg0, arg1);
|
|
126
|
-
return ret;
|
|
127
|
-
},
|
|
128
|
-
__wbindgen_init_externref_table: function() {
|
|
129
|
-
const table = wasm.__wbindgen_externrefs;
|
|
130
|
-
const offset = table.grow(4);
|
|
131
|
-
table.set(0, undefined);
|
|
132
|
-
table.set(offset + 0, undefined);
|
|
133
|
-
table.set(offset + 1, null);
|
|
134
|
-
table.set(offset + 2, true);
|
|
135
|
-
table.set(offset + 3, false);
|
|
136
|
-
},
|
|
137
|
-
};
|
|
138
|
-
return {
|
|
139
|
-
__proto__: null,
|
|
140
|
-
"./rbush_rs_bg.js": import0,
|
|
141
|
-
};
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
const RBushFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
145
|
-
? { register: () => {}, unregister: () => {} }
|
|
146
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_rbush_free(ptr >>> 0, 1));
|
|
147
|
-
|
|
148
|
-
function addToExternrefTable0(obj) {
|
|
149
|
-
const idx = wasm.__externref_table_alloc();
|
|
150
|
-
wasm.__wbindgen_externrefs.set(idx, obj);
|
|
151
|
-
return idx;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
let cachedDataViewMemory0 = null;
|
|
155
|
-
function getDataViewMemory0() {
|
|
156
|
-
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
|
|
157
|
-
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
158
|
-
}
|
|
159
|
-
return cachedDataViewMemory0;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
let cachedFloat64ArrayMemory0 = null;
|
|
163
|
-
function getFloat64ArrayMemory0() {
|
|
164
|
-
if (cachedFloat64ArrayMemory0 === null || cachedFloat64ArrayMemory0.byteLength === 0) {
|
|
165
|
-
cachedFloat64ArrayMemory0 = new Float64Array(wasm.memory.buffer);
|
|
166
|
-
}
|
|
167
|
-
return cachedFloat64ArrayMemory0;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
function getStringFromWasm0(ptr, len) {
|
|
171
|
-
ptr = ptr >>> 0;
|
|
172
|
-
return decodeText(ptr, len);
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
let cachedUint8ArrayMemory0 = null;
|
|
176
|
-
function getUint8ArrayMemory0() {
|
|
177
|
-
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
178
|
-
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
179
|
-
}
|
|
180
|
-
return cachedUint8ArrayMemory0;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
function handleError(f, args) {
|
|
184
|
-
try {
|
|
185
|
-
return f.apply(this, args);
|
|
186
|
-
} catch (e) {
|
|
187
|
-
const idx = addToExternrefTable0(e);
|
|
188
|
-
wasm.__wbindgen_exn_store(idx);
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
function isLikeNone(x) {
|
|
193
|
-
return x === undefined || x === null;
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
function passArrayF64ToWasm0(arg, malloc) {
|
|
197
|
-
const ptr = malloc(arg.length * 8, 8) >>> 0;
|
|
198
|
-
getFloat64ArrayMemory0().set(arg, ptr / 8);
|
|
199
|
-
WASM_VECTOR_LEN = arg.length;
|
|
200
|
-
return ptr;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
204
|
-
cachedTextDecoder.decode();
|
|
205
|
-
const MAX_SAFARI_DECODE_BYTES = 2146435072;
|
|
206
|
-
let numBytesDecoded = 0;
|
|
207
|
-
function decodeText(ptr, len) {
|
|
208
|
-
numBytesDecoded += len;
|
|
209
|
-
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
|
|
210
|
-
cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
211
|
-
cachedTextDecoder.decode();
|
|
212
|
-
numBytesDecoded = len;
|
|
213
|
-
}
|
|
214
|
-
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
let WASM_VECTOR_LEN = 0;
|
|
218
|
-
|
|
219
|
-
let wasmModule, wasm;
|
|
220
|
-
function __wbg_finalize_init(instance, module) {
|
|
221
|
-
wasm = instance.exports;
|
|
222
|
-
wasmModule = module;
|
|
223
|
-
cachedDataViewMemory0 = null;
|
|
224
|
-
cachedFloat64ArrayMemory0 = null;
|
|
225
|
-
cachedUint8ArrayMemory0 = null;
|
|
226
|
-
wasm.__wbindgen_start();
|
|
227
|
-
return wasm;
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
async function __wbg_load(module, imports) {
|
|
231
|
-
if (typeof Response === 'function' && module instanceof Response) {
|
|
232
|
-
if (typeof WebAssembly.instantiateStreaming === 'function') {
|
|
233
|
-
try {
|
|
234
|
-
return await WebAssembly.instantiateStreaming(module, imports);
|
|
235
|
-
} catch (e) {
|
|
236
|
-
const validResponse = module.ok && expectedResponseType(module.type);
|
|
237
|
-
|
|
238
|
-
if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
|
|
239
|
-
console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
|
|
240
|
-
|
|
241
|
-
} else { throw e; }
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
const bytes = await module.arrayBuffer();
|
|
246
|
-
return await WebAssembly.instantiate(bytes, imports);
|
|
247
|
-
} else {
|
|
248
|
-
const instance = await WebAssembly.instantiate(module, imports);
|
|
249
|
-
|
|
250
|
-
if (instance instanceof WebAssembly.Instance) {
|
|
251
|
-
return { instance, module };
|
|
252
|
-
} else {
|
|
253
|
-
return instance;
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
function expectedResponseType(type) {
|
|
258
|
-
switch (type) {
|
|
259
|
-
case 'basic': case 'cors': case 'default': return true;
|
|
260
|
-
}
|
|
261
|
-
return false;
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
function initSync(module) {
|
|
266
|
-
if (wasm !== undefined) return wasm;
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
if (module !== undefined) {
|
|
270
|
-
if (Object.getPrototypeOf(module) === Object.prototype) {
|
|
271
|
-
({module} = module)
|
|
272
|
-
} else {
|
|
273
|
-
console.warn('using deprecated parameters for `initSync()`; pass a single object instead')
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
const imports = __wbg_get_imports();
|
|
278
|
-
if (!(module instanceof WebAssembly.Module)) {
|
|
279
|
-
module = new WebAssembly.Module(module);
|
|
280
|
-
}
|
|
281
|
-
const instance = new WebAssembly.Instance(module, imports);
|
|
282
|
-
return __wbg_finalize_init(instance, module);
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
async function __wbg_init(module_or_path) {
|
|
286
|
-
if (wasm !== undefined) return wasm;
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
if (module_or_path !== undefined) {
|
|
290
|
-
if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
|
|
291
|
-
({module_or_path} = module_or_path)
|
|
292
|
-
} else {
|
|
293
|
-
console.warn('using deprecated parameters for the initialization function; pass a single object instead')
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
if (module_or_path === undefined) {
|
|
298
|
-
module_or_path = new URL('rbush_rs_bg.wasm', import.meta.url);
|
|
299
|
-
}
|
|
300
|
-
const imports = __wbg_get_imports();
|
|
301
|
-
|
|
302
|
-
if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
|
|
303
|
-
module_or_path = fetch(module_or_path);
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
const { instance, module } = await __wbg_load(await module_or_path, imports);
|
|
307
|
-
|
|
308
|
-
return __wbg_finalize_init(instance, module);
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
export { initSync, __wbg_init as default };
|
package/rbush_rs_bg.wasm
DELETED
|
Binary file
|