isard 1.15.0 → 2.0.0
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/CHANGELOG.md +70 -0
- package/README.md +4 -4
- package/dist/basemap/vectortiles/placed.js +7 -4
- package/dist/basemap/vectortiles/placed.js.map +1 -1
- package/dist/basemap/vectortiles/tiles.d.ts +1 -1
- package/dist/basemap/vectortiles/tiles.js.map +1 -1
- package/dist/basemap/workerpool.d.ts +1 -1
- package/dist/basemap/workerpool.js.map +1 -1
- package/dist/bind/layers.js +3 -1
- package/dist/bind/layers.js.map +1 -1
- package/dist/decoder.worker.js +4 -5
- package/dist/decoder.worker.js.map +6 -6
- package/dist/decoding/decoders.d.ts +1 -1
- package/dist/decoding/decoders.js.map +1 -1
- package/dist/decoding/loader.d.ts +6 -3
- package/dist/decoding/loader.js +7 -5
- package/dist/decoding/loader.js.map +1 -1
- package/dist/decoding/protocol.d.ts +3 -2
- package/dist/decoding/protocol.js.map +1 -1
- package/dist/engine-loader.d.ts +20 -18
- package/dist/engine-loader.js +45 -42
- package/dist/engine-loader.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js.map +1 -1
- package/dist/isard_tess_bg.wasm +0 -0
- package/dist/isard_tiles3d_bg.wasm +0 -0
- package/dist/isard_webgl2_bg.wasm +0 -0
- package/dist/isard_webgpu_bg.wasm +0 -0
- package/dist/layers/custom.d.ts +35 -29
- package/dist/layers/custom.js +60 -46
- package/dist/layers/custom.js.map +1 -1
- package/dist/layers/extrusions.js.map +1 -1
- package/dist/layers/features.js.map +1 -1
- package/dist/layers/flow.js.map +1 -1
- package/dist/layers/glyphs.d.ts +1 -1
- package/dist/layers/glyphs.js.map +1 -1
- package/dist/layers/ground.d.ts +20 -13
- package/dist/layers/ground.js +29 -8
- package/dist/layers/ground.js.map +1 -1
- package/dist/layers/icons.d.ts +1 -1
- package/dist/layers/icons.js.map +1 -1
- package/dist/layers/layers.d.ts +1 -2
- package/dist/layers/layers.js +2 -11
- package/dist/layers/layers.js.map +1 -1
- package/dist/layers/models.js +0 -4
- package/dist/layers/models.js.map +1 -1
- package/dist/layers/network.d.ts +1 -1
- package/dist/layers/network.js.map +1 -1
- package/dist/layers/panoramas.d.ts +1 -0
- package/dist/layers/panoramas.js +3 -2
- package/dist/layers/panoramas.js.map +1 -1
- package/dist/layers/pointclouds.d.ts +1 -1
- package/dist/layers/pointclouds.js +0 -4
- package/dist/layers/pointclouds.js.map +1 -1
- package/dist/layers/raster.js +2 -2
- package/dist/layers/raster.js.map +1 -1
- package/dist/layers/symbols.js.map +1 -1
- package/dist/layers/tiles3d.d.ts +6 -2
- package/dist/layers/tiles3d.js +23 -5
- package/dist/layers/tiles3d.js.map +1 -1
- package/dist/layers/vectors.d.ts +4 -5
- package/dist/layers/vectors.js +7 -15
- package/dist/layers/vectors.js.map +1 -1
- package/dist/map/engine-settings.d.ts +1 -1
- package/dist/map/engine-settings.js.map +1 -1
- package/dist/map/engines.d.ts +11 -26
- package/dist/map/engines.js +10 -48
- package/dist/map/engines.js.map +1 -1
- package/dist/map/frame-loop.d.ts +1 -3
- package/dist/map/frame-loop.js +3 -3
- package/dist/map/frame-loop.js.map +1 -1
- package/dist/map/hover-pick.d.ts +9 -3
- package/dist/map/hover-pick.js +29 -6
- package/dist/map/hover-pick.js.map +1 -1
- package/dist/map/layer-stack.d.ts +2 -2
- package/dist/map/layer-stack.js +1 -3
- package/dist/map/layer-stack.js.map +1 -1
- package/dist/map/symbol-atlases.d.ts +5 -4
- package/dist/map/symbol-atlases.js +8 -13
- package/dist/map/symbol-atlases.js.map +1 -1
- package/dist/map/viewshed.d.ts +1 -1
- package/dist/map/viewshed.js.map +1 -1
- package/dist/map.d.ts +26 -20
- package/dist/map.js +97 -82
- package/dist/map.js.map +1 -1
- package/dist/react/IsardMap.d.ts +1 -1
- package/dist/react/IsardMap.js.map +1 -1
- package/dist/react/index.d.ts +1 -1
- package/dist/react/index.js.map +1 -1
- package/dist/types.d.ts +49 -18
- package/dist/types.js.map +1 -1
- package/dist/ui/interaction.d.ts +1 -1
- package/dist/ui/interaction.js.map +1 -1
- package/dist/util/animation.d.ts +1 -1
- package/dist/util/animation.js.map +1 -1
- package/dist/wasm/isard_tiles3d.d.ts +181 -0
- package/dist/wasm/isard_tiles3d.js +387 -0
- package/dist/wasm/{isard_core.d.ts → isard_webgl2.d.ts} +375 -184
- package/dist/wasm/{isard_core.js → isard_webgl2.js} +2167 -415
- package/dist/wasm/{isard.d.ts → isard_webgpu.d.ts} +183 -355
- package/dist/wasm/{isard.js → isard_webgpu.js} +1374 -1097
- package/package.json +4 -3
- package/vite.js +5 -4
- package/dist/isard_bg.wasm +0 -0
- package/dist/isard_core_bg.wasm +0 -0
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* A primitive of a tile decoded by `decodeTile`: vertices x, y, z, u, v around the anchor; the image still encoded,
|
|
6
|
+
* the same array for the primitives sharing it
|
|
7
|
+
*/
|
|
8
|
+
export interface EncodedPrimitive {
|
|
9
|
+
vertices: Float32Array<ArrayBuffer>;
|
|
10
|
+
indices: Uint32Array<ArrayBuffer>;
|
|
11
|
+
image?: Uint8Array<ArrayBuffer>;
|
|
12
|
+
mime?: string;
|
|
13
|
+
/** Base color factor of its material (RGBA 0-1), when not white */
|
|
14
|
+
color?: Float32Array<ArrayBuffer>;
|
|
15
|
+
/** The feature of each vertex (`EncodedTile.properties` index them), when the tile has features */
|
|
16
|
+
features?: Float32Array<ArrayBuffer>;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/** A tile decoded by `decodeTile` */
|
|
20
|
+
export interface EncodedTile {
|
|
21
|
+
/** ECEF origin of the vertices (metres) */
|
|
22
|
+
anchor: Float64Array<ArrayBuffer>;
|
|
23
|
+
primitives: EncodedPrimitive[];
|
|
24
|
+
/** Its points (`.pnts`, glTF points), 20 bytes a vertex: x, y, z (f32) around the anchor, RGB, a normal */
|
|
25
|
+
points: Uint8Array<ArrayBuffer>[];
|
|
26
|
+
/** The properties of its features, one object per feature */
|
|
27
|
+
properties?: Record<string, unknown>[];
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/** A texture transcoded for the GPU (KTX2 / Basis Universal): a WebGL internal format and its mip levels */
|
|
31
|
+
export interface CompressedTexture {
|
|
32
|
+
/** WebGL internal format (compressed, or RGBA8 when the GPU supports none of the targets) */
|
|
33
|
+
format: number;
|
|
34
|
+
levels: { width: number; height: number; data: Uint8Array<ArrayBuffer> }[];
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* A primitive ready for the GPU: its image decoded (bitmap) or transcoded (texture); primitives given the same bitmap
|
|
39
|
+
* or texture object share one GPU texture
|
|
40
|
+
*/
|
|
41
|
+
export interface DecodedPrimitive {
|
|
42
|
+
vertices: Float32Array<ArrayBuffer>;
|
|
43
|
+
indices: Uint32Array<ArrayBuffer>;
|
|
44
|
+
bitmap: ImageBitmap | null;
|
|
45
|
+
texture?: CompressedTexture;
|
|
46
|
+
/** Base color factor of its material (RGBA 0-1), when not white */
|
|
47
|
+
color?: Float32Array<ArrayBuffer>;
|
|
48
|
+
/** The feature of each vertex, when the tile has features */
|
|
49
|
+
features?: Float32Array<ArrayBuffer>;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* A Draco-compressed primitive of a tile (`KHR_draco_mesh_compression`), or its points
|
|
54
|
+
* (`3DTILES_draco_point_compression`), to decode with the Draco module
|
|
55
|
+
*/
|
|
56
|
+
export interface DracoRequest {
|
|
57
|
+
mesh: number;
|
|
58
|
+
primitive: number;
|
|
59
|
+
data: Uint8Array<ArrayBuffer>;
|
|
60
|
+
/** Draco attribute ids */
|
|
61
|
+
position: number;
|
|
62
|
+
uv?: number;
|
|
63
|
+
color?: number;
|
|
64
|
+
normal?: number;
|
|
65
|
+
/** A point cloud: no triangles */
|
|
66
|
+
points?: boolean;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/** The Draco module's output for a request: positions, uv, colors and normals as stored, triangles (not for points) */
|
|
70
|
+
export interface DracoGeometry {
|
|
71
|
+
mesh: number;
|
|
72
|
+
primitive: number;
|
|
73
|
+
positions: Float32Array;
|
|
74
|
+
uvs?: Float32Array;
|
|
75
|
+
indices?: Uint32Array;
|
|
76
|
+
colors?: Float32Array;
|
|
77
|
+
normals?: Float32Array;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/** Compressed texture formats supported by the GPU */
|
|
81
|
+
export interface TextureFormats {
|
|
82
|
+
astc: boolean;
|
|
83
|
+
bptc: boolean;
|
|
84
|
+
etc: boolean;
|
|
85
|
+
s3tc: boolean;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/** A tile ready for the GPU, as the decoding workers deliver it */
|
|
89
|
+
export interface DecodedTile {
|
|
90
|
+
anchor: Float64Array<ArrayBuffer>;
|
|
91
|
+
primitives: DecodedPrimitive[];
|
|
92
|
+
/** Its points' vertices (`EncodedTile.points`) */
|
|
93
|
+
points?: Uint8Array<ArrayBuffer>[];
|
|
94
|
+
/** The properties of its features (`EncodedTile.properties`) */
|
|
95
|
+
properties?: Record<string, unknown>[];
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/** What the engine expects from a pool of decoding workers (`Engine.setTileLoader`) */
|
|
99
|
+
export interface TileLoaderLike {
|
|
100
|
+
/**
|
|
101
|
+
* `reload`: bypass the HTTP cache (the tile failed before: the cache may hold the error); `priority`: the Fetch
|
|
102
|
+
* Priority for the download (the first tiles in view of a frame are urgent)
|
|
103
|
+
*/
|
|
104
|
+
load(
|
|
105
|
+
id: number,
|
|
106
|
+
url: string,
|
|
107
|
+
transform: Float64Array,
|
|
108
|
+
yUp: boolean,
|
|
109
|
+
reload: boolean,
|
|
110
|
+
priority?: 'high' | 'low',
|
|
111
|
+
): Promise<DecodedTile>;
|
|
112
|
+
abort(id: number): void;
|
|
113
|
+
/**
|
|
114
|
+
* The points of a COPC node: its LAZ chunk (`size` bytes at `offset` of the file at `url`, a range request), the
|
|
115
|
+
* data of the file's LAZ VLR, its layout (format, record length, scale, offset), the grid positioning its points
|
|
116
|
+
* and its point count; resolves with its vertices (20 bytes each, see `EncodedTile.points`)
|
|
117
|
+
*/
|
|
118
|
+
loadPoints?(
|
|
119
|
+
id: number,
|
|
120
|
+
url: string,
|
|
121
|
+
offset: number,
|
|
122
|
+
size: number,
|
|
123
|
+
laz: Uint8Array,
|
|
124
|
+
layout: Float64Array,
|
|
125
|
+
grid: Float64Array,
|
|
126
|
+
count: number,
|
|
127
|
+
priority?: 'high' | 'low',
|
|
128
|
+
): Promise<Uint8Array<ArrayBuffer>>;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Decodes a `.b3dm` / `.pnts` / `.glb` tile: `{ anchor: Float64Array(3), primitives: [{ vertices: Float32Array (x,
|
|
135
|
+
* y, z, u, v per vertex, relative to the anchor), indices: Uint32Array, image?: Uint8Array, mime?: string, color?:
|
|
136
|
+
* Float32Array (the material's base color, when not white) }], points: [Uint8Array] (the points' vertices) }`.
|
|
137
|
+
* `transform`: the tile's world transform (16 numbers, column-major).
|
|
138
|
+
* `draco`: the decoded geometries of its Draco primitives (`dracoRequests`), if any.
|
|
139
|
+
*/
|
|
140
|
+
export function decodeTile(bytes: Uint8Array, transform: Float64Array, y_up: boolean, draco: DracoGeometry[] | undefined): EncodedTile;
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* The Draco-compressed primitives of a tile, to decode before `decodeTile`
|
|
144
|
+
*/
|
|
145
|
+
export function dracoRequests(bytes: Uint8Array): DracoRequest[];
|
|
146
|
+
|
|
147
|
+
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
148
|
+
|
|
149
|
+
export interface InitOutput {
|
|
150
|
+
readonly memory: WebAssembly.Memory;
|
|
151
|
+
readonly decodeTile: (a: number, b: number, c: number, d: number, e: number, f: any) => [number, number, number];
|
|
152
|
+
readonly dracoRequests: (a: number, b: number) => [number, number, number];
|
|
153
|
+
readonly __wbindgen_exn_store: (a: number) => void;
|
|
154
|
+
readonly __externref_table_alloc: () => number;
|
|
155
|
+
readonly __wbindgen_externrefs: WebAssembly.Table;
|
|
156
|
+
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
157
|
+
readonly __externref_table_dealloc: (a: number) => void;
|
|
158
|
+
readonly __wbindgen_start: () => void;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
export type SyncInitInput = BufferSource | WebAssembly.Module;
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* Instantiates the given `module`, which can either be bytes or
|
|
165
|
+
* a precompiled `WebAssembly.Module`.
|
|
166
|
+
*
|
|
167
|
+
* @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
|
|
168
|
+
*
|
|
169
|
+
* @returns {InitOutput}
|
|
170
|
+
*/
|
|
171
|
+
export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
|
|
175
|
+
* for everything else, calls `WebAssembly.instantiate` directly.
|
|
176
|
+
*
|
|
177
|
+
* @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
|
|
178
|
+
*
|
|
179
|
+
* @returns {Promise<InitOutput>}
|
|
180
|
+
*/
|
|
181
|
+
export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;
|
|
@@ -0,0 +1,387 @@
|
|
|
1
|
+
/* @ts-self-types="./isard_tiles3d.d.ts" */
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Decodes a `.b3dm` / `.pnts` / `.glb` tile: `{ anchor: Float64Array(3), primitives: [{ vertices: Float32Array (x,
|
|
5
|
+
* y, z, u, v per vertex, relative to the anchor), indices: Uint32Array, image?: Uint8Array, mime?: string, color?:
|
|
6
|
+
* Float32Array (the material's base color, when not white) }], points: [Uint8Array] (the points' vertices) }`.
|
|
7
|
+
* `transform`: the tile's world transform (16 numbers, column-major).
|
|
8
|
+
* `draco`: the decoded geometries of its Draco primitives (`dracoRequests`), if any.
|
|
9
|
+
* @param {Uint8Array} bytes
|
|
10
|
+
* @param {Float64Array} transform
|
|
11
|
+
* @param {boolean} y_up
|
|
12
|
+
* @param {DracoGeometry[] | undefined} draco
|
|
13
|
+
* @returns {EncodedTile}
|
|
14
|
+
*/
|
|
15
|
+
export function decodeTile(bytes, transform, y_up, draco) {
|
|
16
|
+
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
17
|
+
const len0 = WASM_VECTOR_LEN;
|
|
18
|
+
const ptr1 = passArrayF64ToWasm0(transform, wasm.__wbindgen_malloc);
|
|
19
|
+
const len1 = WASM_VECTOR_LEN;
|
|
20
|
+
const ret = wasm.decodeTile(ptr0, len0, ptr1, len1, y_up, draco);
|
|
21
|
+
if (ret[2]) {
|
|
22
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
23
|
+
}
|
|
24
|
+
return takeFromExternrefTable0(ret[0]);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* The Draco-compressed primitives of a tile, to decode before `decodeTile`
|
|
29
|
+
* @param {Uint8Array} bytes
|
|
30
|
+
* @returns {DracoRequest[]}
|
|
31
|
+
*/
|
|
32
|
+
export function dracoRequests(bytes) {
|
|
33
|
+
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
34
|
+
const len0 = WASM_VECTOR_LEN;
|
|
35
|
+
const ret = wasm.dracoRequests(ptr0, len0);
|
|
36
|
+
if (ret[2]) {
|
|
37
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
38
|
+
}
|
|
39
|
+
return takeFromExternrefTable0(ret[0]);
|
|
40
|
+
}
|
|
41
|
+
function __wbg_get_imports() {
|
|
42
|
+
const import0 = {
|
|
43
|
+
__proto__: null,
|
|
44
|
+
__wbg___wbindgen_is_null_e343b7d08827ba72: function(arg0) {
|
|
45
|
+
const ret = arg0 === null;
|
|
46
|
+
return ret;
|
|
47
|
+
},
|
|
48
|
+
__wbg___wbindgen_is_undefined_8865fb403f8fe9d8: function(arg0) {
|
|
49
|
+
const ret = arg0 === undefined;
|
|
50
|
+
return ret;
|
|
51
|
+
},
|
|
52
|
+
__wbg___wbindgen_number_get_2e0e7dee9f701a71: function(arg0, arg1) {
|
|
53
|
+
const obj = arg1;
|
|
54
|
+
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
55
|
+
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
56
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
57
|
+
},
|
|
58
|
+
__wbg___wbindgen_throw_41e9ee4f547fc59a: function(arg0, arg1) {
|
|
59
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
60
|
+
},
|
|
61
|
+
__wbg_from_296ca31f8d0f1c52: function(arg0) {
|
|
62
|
+
const ret = Array.from(arg0);
|
|
63
|
+
return ret;
|
|
64
|
+
},
|
|
65
|
+
__wbg_get_31af05bd4842a84f: function() { return handleError(function (arg0, arg1) {
|
|
66
|
+
const ret = Reflect.get(arg0, arg1);
|
|
67
|
+
return ret;
|
|
68
|
+
}, arguments); },
|
|
69
|
+
__wbg_get_unchecked_288889d017702237: function(arg0, arg1) {
|
|
70
|
+
const ret = arg0[arg1 >>> 0];
|
|
71
|
+
return ret;
|
|
72
|
+
},
|
|
73
|
+
__wbg_instanceof_Float32Array_595afb0f28b828c9: function(arg0) {
|
|
74
|
+
let result;
|
|
75
|
+
try {
|
|
76
|
+
result = arg0 instanceof Float32Array;
|
|
77
|
+
} catch (_) {
|
|
78
|
+
result = false;
|
|
79
|
+
}
|
|
80
|
+
const ret = result;
|
|
81
|
+
return ret;
|
|
82
|
+
},
|
|
83
|
+
__wbg_instanceof_Uint32Array_53a4facaf04b8a8b: function(arg0) {
|
|
84
|
+
let result;
|
|
85
|
+
try {
|
|
86
|
+
result = arg0 instanceof Uint32Array;
|
|
87
|
+
} catch (_) {
|
|
88
|
+
result = false;
|
|
89
|
+
}
|
|
90
|
+
const ret = result;
|
|
91
|
+
return ret;
|
|
92
|
+
},
|
|
93
|
+
__wbg_length_511b1f84719d3462: function(arg0) {
|
|
94
|
+
const ret = arg0.length;
|
|
95
|
+
return ret;
|
|
96
|
+
},
|
|
97
|
+
__wbg_length_58572db4c38f3c3e: function(arg0) {
|
|
98
|
+
const ret = arg0.length;
|
|
99
|
+
return ret;
|
|
100
|
+
},
|
|
101
|
+
__wbg_length_d4bdea10311bd9cf: function(arg0) {
|
|
102
|
+
const ret = arg0.length;
|
|
103
|
+
return ret;
|
|
104
|
+
},
|
|
105
|
+
__wbg_new_617a8cdb8bb1130e: function() {
|
|
106
|
+
const ret = new Object();
|
|
107
|
+
return ret;
|
|
108
|
+
},
|
|
109
|
+
__wbg_new_ee2291f50781bf1d: function() {
|
|
110
|
+
const ret = new Array();
|
|
111
|
+
return ret;
|
|
112
|
+
},
|
|
113
|
+
__wbg_new_from_slice_37a3c3a194266cb8: function(arg0, arg1) {
|
|
114
|
+
const ret = new Uint32Array(getArrayU32FromWasm0(arg0, arg1));
|
|
115
|
+
return ret;
|
|
116
|
+
},
|
|
117
|
+
__wbg_new_from_slice_9a868026ffa4208a: function(arg0, arg1) {
|
|
118
|
+
const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
|
|
119
|
+
return ret;
|
|
120
|
+
},
|
|
121
|
+
__wbg_new_from_slice_ca6ad97db1f4779a: function(arg0, arg1) {
|
|
122
|
+
const ret = new Float32Array(getArrayF32FromWasm0(arg0, arg1));
|
|
123
|
+
return ret;
|
|
124
|
+
},
|
|
125
|
+
__wbg_new_from_slice_f545fd22ddc142b8: function(arg0, arg1) {
|
|
126
|
+
const ret = new Float64Array(getArrayF64FromWasm0(arg0, arg1));
|
|
127
|
+
return ret;
|
|
128
|
+
},
|
|
129
|
+
__wbg_prototypesetcall_06eb15da165dee8f: function(arg0, arg1, arg2) {
|
|
130
|
+
Uint32Array.prototype.set.call(getArrayU32FromWasm0(arg0, arg1), arg2);
|
|
131
|
+
},
|
|
132
|
+
__wbg_prototypesetcall_8b03c01e2c0f8066: function(arg0, arg1, arg2) {
|
|
133
|
+
Float32Array.prototype.set.call(getArrayF32FromWasm0(arg0, arg1), arg2);
|
|
134
|
+
},
|
|
135
|
+
__wbg_push_2baf45db356cf468: function(arg0, arg1) {
|
|
136
|
+
const ret = arg0.push(arg1);
|
|
137
|
+
return ret;
|
|
138
|
+
},
|
|
139
|
+
__wbg_set_145a351398b48c65: function() { return handleError(function (arg0, arg1, arg2) {
|
|
140
|
+
const ret = Reflect.set(arg0, arg1, arg2);
|
|
141
|
+
return ret;
|
|
142
|
+
}, arguments); },
|
|
143
|
+
__wbindgen_generic_0000000000000001: function(arg0) {
|
|
144
|
+
// Cast intrinsic for `F64 -> Externref`.
|
|
145
|
+
const ret = arg0;
|
|
146
|
+
return ret;
|
|
147
|
+
},
|
|
148
|
+
__wbindgen_generic_0000000000000002: function(arg0, arg1) {
|
|
149
|
+
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
150
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
151
|
+
return ret;
|
|
152
|
+
},
|
|
153
|
+
__wbindgen_init_externref_table: function() {
|
|
154
|
+
const table = wasm.__wbindgen_externrefs;
|
|
155
|
+
const offset = table.grow(4);
|
|
156
|
+
table.set(0, undefined);
|
|
157
|
+
table.set(offset + 0, undefined);
|
|
158
|
+
table.set(offset + 1, null);
|
|
159
|
+
table.set(offset + 2, true);
|
|
160
|
+
table.set(offset + 3, false);
|
|
161
|
+
},
|
|
162
|
+
};
|
|
163
|
+
return {
|
|
164
|
+
__proto__: null,
|
|
165
|
+
"./isard_tiles3d_bg.js": import0,
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
function addToExternrefTable0(obj) {
|
|
170
|
+
const idx = wasm.__externref_table_alloc();
|
|
171
|
+
wasm.__wbindgen_externrefs.set(idx, obj);
|
|
172
|
+
return idx;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
function getArrayF32FromWasm0(ptr, len) {
|
|
176
|
+
ptr = ptr >>> 0;
|
|
177
|
+
return getFloat32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
function getArrayF64FromWasm0(ptr, len) {
|
|
181
|
+
ptr = ptr >>> 0;
|
|
182
|
+
return getFloat64ArrayMemory0().subarray(ptr / 8, ptr / 8 + len);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
function getArrayU32FromWasm0(ptr, len) {
|
|
186
|
+
ptr = ptr >>> 0;
|
|
187
|
+
return getUint32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
191
|
+
ptr = ptr >>> 0;
|
|
192
|
+
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
let cachedDataViewMemory0 = null;
|
|
196
|
+
function getDataViewMemory0() {
|
|
197
|
+
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
|
|
198
|
+
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
199
|
+
}
|
|
200
|
+
return cachedDataViewMemory0;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
let cachedFloat32ArrayMemory0 = null;
|
|
204
|
+
function getFloat32ArrayMemory0() {
|
|
205
|
+
if (cachedFloat32ArrayMemory0 === null || cachedFloat32ArrayMemory0.byteLength === 0) {
|
|
206
|
+
cachedFloat32ArrayMemory0 = new Float32Array(wasm.memory.buffer);
|
|
207
|
+
}
|
|
208
|
+
return cachedFloat32ArrayMemory0;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
let cachedFloat64ArrayMemory0 = null;
|
|
212
|
+
function getFloat64ArrayMemory0() {
|
|
213
|
+
if (cachedFloat64ArrayMemory0 === null || cachedFloat64ArrayMemory0.byteLength === 0) {
|
|
214
|
+
cachedFloat64ArrayMemory0 = new Float64Array(wasm.memory.buffer);
|
|
215
|
+
}
|
|
216
|
+
return cachedFloat64ArrayMemory0;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
function getStringFromWasm0(ptr, len) {
|
|
220
|
+
return decodeText(ptr >>> 0, len);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
let cachedUint32ArrayMemory0 = null;
|
|
224
|
+
function getUint32ArrayMemory0() {
|
|
225
|
+
if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.byteLength === 0) {
|
|
226
|
+
cachedUint32ArrayMemory0 = new Uint32Array(wasm.memory.buffer);
|
|
227
|
+
}
|
|
228
|
+
return cachedUint32ArrayMemory0;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
let cachedUint8ArrayMemory0 = null;
|
|
232
|
+
function getUint8ArrayMemory0() {
|
|
233
|
+
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
234
|
+
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
235
|
+
}
|
|
236
|
+
return cachedUint8ArrayMemory0;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
function handleError(f, args) {
|
|
240
|
+
try {
|
|
241
|
+
return f.apply(this, args);
|
|
242
|
+
} catch (e) {
|
|
243
|
+
const idx = addToExternrefTable0(e);
|
|
244
|
+
wasm.__wbindgen_exn_store(idx);
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
function isLikeNone(x) {
|
|
249
|
+
return x === undefined || x === null;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
function passArray8ToWasm0(arg, malloc) {
|
|
253
|
+
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
254
|
+
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
255
|
+
WASM_VECTOR_LEN = arg.length;
|
|
256
|
+
return ptr;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
function passArrayF64ToWasm0(arg, malloc) {
|
|
260
|
+
const ptr = malloc(arg.length * 8, 8) >>> 0;
|
|
261
|
+
getFloat64ArrayMemory0().set(arg, ptr / 8);
|
|
262
|
+
WASM_VECTOR_LEN = arg.length;
|
|
263
|
+
return ptr;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
function takeFromExternrefTable0(idx) {
|
|
267
|
+
const value = wasm.__wbindgen_externrefs.get(idx);
|
|
268
|
+
wasm.__externref_table_dealloc(idx);
|
|
269
|
+
return value;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
273
|
+
cachedTextDecoder.decode();
|
|
274
|
+
const MAX_SAFARI_DECODE_BYTES = 2146435072;
|
|
275
|
+
let numBytesDecoded = 0;
|
|
276
|
+
function decodeText(ptr, len) {
|
|
277
|
+
numBytesDecoded += len;
|
|
278
|
+
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
|
|
279
|
+
cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
280
|
+
cachedTextDecoder.decode();
|
|
281
|
+
numBytesDecoded = len;
|
|
282
|
+
}
|
|
283
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
let WASM_VECTOR_LEN = 0;
|
|
287
|
+
|
|
288
|
+
let wasmModule, wasmInstance, wasm;
|
|
289
|
+
function __wbg_finalize_init(instance, module) {
|
|
290
|
+
wasmInstance = instance;
|
|
291
|
+
wasm = instance.exports;
|
|
292
|
+
wasmModule = module;
|
|
293
|
+
cachedDataViewMemory0 = null;
|
|
294
|
+
cachedFloat32ArrayMemory0 = null;
|
|
295
|
+
cachedFloat64ArrayMemory0 = null;
|
|
296
|
+
cachedUint32ArrayMemory0 = null;
|
|
297
|
+
cachedUint8ArrayMemory0 = null;
|
|
298
|
+
wasm.__wbindgen_start();
|
|
299
|
+
return wasm;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
async function __wbg_load(module, imports) {
|
|
303
|
+
if (typeof Response === 'function' && module instanceof Response) {
|
|
304
|
+
if (!module.ok) {
|
|
305
|
+
throw new Error(`failed to fetch Wasm: ${module.status} ${module.statusText} fetching '${module.url}'`);
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
if (typeof WebAssembly.instantiateStreaming === 'function') {
|
|
309
|
+
try {
|
|
310
|
+
return await WebAssembly.instantiateStreaming(module, imports);
|
|
311
|
+
} catch (e) {
|
|
312
|
+
const validResponse = expectedResponseType(module.type);
|
|
313
|
+
|
|
314
|
+
if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
|
|
315
|
+
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);
|
|
316
|
+
|
|
317
|
+
} else { throw e; }
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
const bytes = await module.arrayBuffer();
|
|
322
|
+
return await WebAssembly.instantiate(bytes, imports);
|
|
323
|
+
} else {
|
|
324
|
+
const instance = await WebAssembly.instantiate(module, imports);
|
|
325
|
+
|
|
326
|
+
if (instance instanceof WebAssembly.Instance) {
|
|
327
|
+
return { instance, module };
|
|
328
|
+
} else {
|
|
329
|
+
return instance;
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
function expectedResponseType(type) {
|
|
334
|
+
switch (type) {
|
|
335
|
+
case 'basic': case 'cors': case 'default': return true;
|
|
336
|
+
}
|
|
337
|
+
return false;
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
function initSync(module) {
|
|
342
|
+
if (wasm !== undefined) return wasm;
|
|
343
|
+
|
|
344
|
+
|
|
345
|
+
if (module !== undefined) {
|
|
346
|
+
if (Object.getPrototypeOf(module) === Object.prototype) {
|
|
347
|
+
({module} = module)
|
|
348
|
+
} else {
|
|
349
|
+
console.warn('using deprecated parameters for `initSync()`; pass a single object instead')
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
const imports = __wbg_get_imports();
|
|
354
|
+
if (!(module instanceof WebAssembly.Module)) {
|
|
355
|
+
module = new WebAssembly.Module(module);
|
|
356
|
+
}
|
|
357
|
+
const instance = new WebAssembly.Instance(module, imports);
|
|
358
|
+
return __wbg_finalize_init(instance, module);
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
async function __wbg_init(module_or_path) {
|
|
362
|
+
if (wasm !== undefined) return wasm;
|
|
363
|
+
|
|
364
|
+
|
|
365
|
+
if (module_or_path !== undefined) {
|
|
366
|
+
if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
|
|
367
|
+
({module_or_path} = module_or_path)
|
|
368
|
+
} else {
|
|
369
|
+
console.warn('using deprecated parameters for the initialization function; pass a single object instead')
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
if (module_or_path === undefined) {
|
|
374
|
+
module_or_path = new URL('isard_tiles3d_bg.wasm', import.meta.url);
|
|
375
|
+
}
|
|
376
|
+
const imports = __wbg_get_imports();
|
|
377
|
+
|
|
378
|
+
if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
|
|
379
|
+
module_or_path = fetch(module_or_path);
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
const { instance, module } = await __wbg_load(await module_or_path, imports);
|
|
383
|
+
|
|
384
|
+
return __wbg_finalize_init(instance, module);
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
export { initSync, __wbg_init as default };
|