@ifc-lite/wasm 1.14.3 → 1.14.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/pkg/ifc-lite.d.ts +1049 -981
- package/pkg/ifc-lite.js +1451 -1458
- package/pkg/ifc-lite_bg.wasm +0 -0
package/pkg/ifc-lite.js
CHANGED
|
@@ -1,314 +1,110 @@
|
|
|
1
|
-
|
|
1
|
+
/* @ts-self-types="./ifc-lite.d.ts" */
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
? { register: () => {}, unregister: () => {} }
|
|
14
|
-
: new FinalizationRegistry(state => state.dtor(state.a, state.b));
|
|
15
|
-
|
|
16
|
-
function dropObject(idx) {
|
|
17
|
-
if (idx < 132) return;
|
|
18
|
-
heap[idx] = heap_next;
|
|
19
|
-
heap_next = idx;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
function getArrayF32FromWasm0(ptr, len) {
|
|
23
|
-
ptr = ptr >>> 0;
|
|
24
|
-
return getFloat32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
function getArrayF64FromWasm0(ptr, len) {
|
|
28
|
-
ptr = ptr >>> 0;
|
|
29
|
-
return getFloat64ArrayMemory0().subarray(ptr / 8, ptr / 8 + len);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
function getArrayU32FromWasm0(ptr, len) {
|
|
33
|
-
ptr = ptr >>> 0;
|
|
34
|
-
return getUint32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
let cachedDataViewMemory0 = null;
|
|
38
|
-
function getDataViewMemory0() {
|
|
39
|
-
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
|
|
40
|
-
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
41
|
-
}
|
|
42
|
-
return cachedDataViewMemory0;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
let cachedFloat32ArrayMemory0 = null;
|
|
46
|
-
function getFloat32ArrayMemory0() {
|
|
47
|
-
if (cachedFloat32ArrayMemory0 === null || cachedFloat32ArrayMemory0.byteLength === 0) {
|
|
48
|
-
cachedFloat32ArrayMemory0 = new Float32Array(wasm.memory.buffer);
|
|
49
|
-
}
|
|
50
|
-
return cachedFloat32ArrayMemory0;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
let cachedFloat64ArrayMemory0 = null;
|
|
54
|
-
function getFloat64ArrayMemory0() {
|
|
55
|
-
if (cachedFloat64ArrayMemory0 === null || cachedFloat64ArrayMemory0.byteLength === 0) {
|
|
56
|
-
cachedFloat64ArrayMemory0 = new Float64Array(wasm.memory.buffer);
|
|
3
|
+
/**
|
|
4
|
+
* Georeferencing information exposed to JavaScript
|
|
5
|
+
*/
|
|
6
|
+
export class GeoReferenceJs {
|
|
7
|
+
static __wrap(ptr) {
|
|
8
|
+
ptr = ptr >>> 0;
|
|
9
|
+
const obj = Object.create(GeoReferenceJs.prototype);
|
|
10
|
+
obj.__wbg_ptr = ptr;
|
|
11
|
+
GeoReferenceJsFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
12
|
+
return obj;
|
|
57
13
|
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
return decodeText(ptr, len);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
let cachedUint32ArrayMemory0 = null;
|
|
67
|
-
function getUint32ArrayMemory0() {
|
|
68
|
-
if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.byteLength === 0) {
|
|
69
|
-
cachedUint32ArrayMemory0 = new Uint32Array(wasm.memory.buffer);
|
|
14
|
+
__destroy_into_raw() {
|
|
15
|
+
const ptr = this.__wbg_ptr;
|
|
16
|
+
this.__wbg_ptr = 0;
|
|
17
|
+
GeoReferenceJsFinalization.unregister(this);
|
|
18
|
+
return ptr;
|
|
70
19
|
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
let cachedUint8ArrayMemory0 = null;
|
|
75
|
-
function getUint8ArrayMemory0() {
|
|
76
|
-
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
77
|
-
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
20
|
+
free() {
|
|
21
|
+
const ptr = this.__destroy_into_raw();
|
|
22
|
+
wasm.__wbg_georeferencejs_free(ptr, 0);
|
|
78
23
|
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
24
|
+
/**
|
|
25
|
+
* Get CRS name
|
|
26
|
+
* @returns {string | undefined}
|
|
27
|
+
*/
|
|
28
|
+
get crsName() {
|
|
29
|
+
try {
|
|
30
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
31
|
+
wasm.georeferencejs_crsName(retptr, this.__wbg_ptr);
|
|
32
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
33
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
34
|
+
let v1;
|
|
35
|
+
if (r0 !== 0) {
|
|
36
|
+
v1 = getStringFromWasm0(r0, r1).slice();
|
|
37
|
+
wasm.__wbindgen_export2(r0, r1 * 1, 1);
|
|
38
|
+
}
|
|
39
|
+
return v1;
|
|
40
|
+
} finally {
|
|
41
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
42
|
+
}
|
|
89
43
|
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
return x === undefined || x === null;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
function makeMutClosure(arg0, arg1, dtor, f) {
|
|
102
|
-
const state = { a: arg0, b: arg1, cnt: 1, dtor };
|
|
103
|
-
const real = (...args) => {
|
|
104
|
-
|
|
105
|
-
// First up with a closure we increment the internal reference
|
|
106
|
-
// count. This ensures that the Rust closure environment won't
|
|
107
|
-
// be deallocated while we're invoking it.
|
|
108
|
-
state.cnt++;
|
|
109
|
-
const a = state.a;
|
|
110
|
-
state.a = 0;
|
|
44
|
+
/**
|
|
45
|
+
* Transform local coordinates to map coordinates
|
|
46
|
+
* @param {number} x
|
|
47
|
+
* @param {number} y
|
|
48
|
+
* @param {number} z
|
|
49
|
+
* @returns {Float64Array}
|
|
50
|
+
*/
|
|
51
|
+
localToMap(x, y, z) {
|
|
111
52
|
try {
|
|
112
|
-
|
|
53
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
54
|
+
wasm.georeferencejs_localToMap(retptr, this.__wbg_ptr, x, y, z);
|
|
55
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
56
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
57
|
+
var v1 = getArrayF64FromWasm0(r0, r1).slice();
|
|
58
|
+
wasm.__wbindgen_export2(r0, r1 * 8, 8);
|
|
59
|
+
return v1;
|
|
113
60
|
} finally {
|
|
114
|
-
|
|
115
|
-
real._wbg_cb_unref();
|
|
61
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
116
62
|
}
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Transform map coordinates to local coordinates
|
|
66
|
+
* @param {number} e
|
|
67
|
+
* @param {number} n
|
|
68
|
+
* @param {number} h
|
|
69
|
+
* @returns {Float64Array}
|
|
70
|
+
*/
|
|
71
|
+
mapToLocal(e, n, h) {
|
|
72
|
+
try {
|
|
73
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
74
|
+
wasm.georeferencejs_mapToLocal(retptr, this.__wbg_ptr, e, n, h);
|
|
75
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
76
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
77
|
+
var v1 = getArrayF64FromWasm0(r0, r1).slice();
|
|
78
|
+
wasm.__wbindgen_export2(r0, r1 * 8, 8);
|
|
79
|
+
return v1;
|
|
80
|
+
} finally {
|
|
81
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
123
82
|
}
|
|
124
|
-
};
|
|
125
|
-
CLOSURE_DTORS.register(real, state, state);
|
|
126
|
-
return real;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
function passArray8ToWasm0(arg, malloc) {
|
|
130
|
-
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
131
|
-
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
132
|
-
WASM_VECTOR_LEN = arg.length;
|
|
133
|
-
return ptr;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
function passStringToWasm0(arg, malloc, realloc) {
|
|
137
|
-
if (realloc === undefined) {
|
|
138
|
-
const buf = cachedTextEncoder.encode(arg);
|
|
139
|
-
const ptr = malloc(buf.length, 1) >>> 0;
|
|
140
|
-
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
141
|
-
WASM_VECTOR_LEN = buf.length;
|
|
142
|
-
return ptr;
|
|
143
83
|
}
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
for (; offset < len; offset++) {
|
|
153
|
-
const code = arg.charCodeAt(offset);
|
|
154
|
-
if (code > 0x7F) break;
|
|
155
|
-
mem[ptr + offset] = code;
|
|
84
|
+
/**
|
|
85
|
+
* Get rotation angle in radians
|
|
86
|
+
* @returns {number}
|
|
87
|
+
*/
|
|
88
|
+
get rotation() {
|
|
89
|
+
const ret = wasm.georeferencejs_rotation(this.__wbg_ptr);
|
|
90
|
+
return ret;
|
|
156
91
|
}
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
92
|
+
/**
|
|
93
|
+
* Get 4x4 transformation matrix (column-major for WebGL)
|
|
94
|
+
* @returns {Float64Array}
|
|
95
|
+
*/
|
|
96
|
+
toMatrix() {
|
|
97
|
+
try {
|
|
98
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
99
|
+
wasm.georeferencejs_toMatrix(retptr, this.__wbg_ptr);
|
|
100
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
101
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
102
|
+
var v1 = getArrayF64FromWasm0(r0, r1).slice();
|
|
103
|
+
wasm.__wbindgen_export2(r0, r1 * 8, 8);
|
|
104
|
+
return v1;
|
|
105
|
+
} finally {
|
|
106
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
160
107
|
}
|
|
161
|
-
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
162
|
-
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
163
|
-
const ret = cachedTextEncoder.encodeInto(arg, view);
|
|
164
|
-
|
|
165
|
-
offset += ret.written;
|
|
166
|
-
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
WASM_VECTOR_LEN = offset;
|
|
170
|
-
return ptr;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
function takeObject(idx) {
|
|
174
|
-
const ret = getObject(idx);
|
|
175
|
-
dropObject(idx);
|
|
176
|
-
return ret;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
180
|
-
cachedTextDecoder.decode();
|
|
181
|
-
const MAX_SAFARI_DECODE_BYTES = 2146435072;
|
|
182
|
-
let numBytesDecoded = 0;
|
|
183
|
-
function decodeText(ptr, len) {
|
|
184
|
-
numBytesDecoded += len;
|
|
185
|
-
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
|
|
186
|
-
cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
187
|
-
cachedTextDecoder.decode();
|
|
188
|
-
numBytesDecoded = len;
|
|
189
|
-
}
|
|
190
|
-
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
const cachedTextEncoder = new TextEncoder();
|
|
194
|
-
|
|
195
|
-
if (!('encodeInto' in cachedTextEncoder)) {
|
|
196
|
-
cachedTextEncoder.encodeInto = function (arg, view) {
|
|
197
|
-
const buf = cachedTextEncoder.encode(arg);
|
|
198
|
-
view.set(buf);
|
|
199
|
-
return {
|
|
200
|
-
read: arg.length,
|
|
201
|
-
written: buf.length
|
|
202
|
-
};
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
let WASM_VECTOR_LEN = 0;
|
|
207
|
-
|
|
208
|
-
function __wasm_bindgen_func_elem_1021(arg0, arg1, arg2) {
|
|
209
|
-
wasm.__wasm_bindgen_func_elem_1021(arg0, arg1, addHeapObject(arg2));
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
function __wasm_bindgen_func_elem_469(arg0, arg1) {
|
|
213
|
-
wasm.__wasm_bindgen_func_elem_469(arg0, arg1);
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
function __wasm_bindgen_func_elem_1052(arg0, arg1, arg2, arg3) {
|
|
217
|
-
wasm.__wasm_bindgen_func_elem_1052(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
const GeoReferenceJsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
221
|
-
? { register: () => {}, unregister: () => {} }
|
|
222
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_georeferencejs_free(ptr >>> 0, 1));
|
|
223
|
-
|
|
224
|
-
const GpuGeometryFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
225
|
-
? { register: () => {}, unregister: () => {} }
|
|
226
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_gpugeometry_free(ptr >>> 0, 1));
|
|
227
|
-
|
|
228
|
-
const GpuInstancedGeometryFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
229
|
-
? { register: () => {}, unregister: () => {} }
|
|
230
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_gpuinstancedgeometry_free(ptr >>> 0, 1));
|
|
231
|
-
|
|
232
|
-
const GpuInstancedGeometryCollectionFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
233
|
-
? { register: () => {}, unregister: () => {} }
|
|
234
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_gpuinstancedgeometrycollection_free(ptr >>> 0, 1));
|
|
235
|
-
|
|
236
|
-
const GpuInstancedGeometryRefFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
237
|
-
? { register: () => {}, unregister: () => {} }
|
|
238
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_gpuinstancedgeometryref_free(ptr >>> 0, 1));
|
|
239
|
-
|
|
240
|
-
const GpuMeshMetadataFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
241
|
-
? { register: () => {}, unregister: () => {} }
|
|
242
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_gpumeshmetadata_free(ptr >>> 0, 1));
|
|
243
|
-
|
|
244
|
-
const IfcAPIFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
245
|
-
? { register: () => {}, unregister: () => {} }
|
|
246
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_ifcapi_free(ptr >>> 0, 1));
|
|
247
|
-
|
|
248
|
-
const InstanceDataFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
249
|
-
? { register: () => {}, unregister: () => {} }
|
|
250
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_instancedata_free(ptr >>> 0, 1));
|
|
251
|
-
|
|
252
|
-
const InstancedGeometryFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
253
|
-
? { register: () => {}, unregister: () => {} }
|
|
254
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_instancedgeometry_free(ptr >>> 0, 1));
|
|
255
|
-
|
|
256
|
-
const InstancedMeshCollectionFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
257
|
-
? { register: () => {}, unregister: () => {} }
|
|
258
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_instancedmeshcollection_free(ptr >>> 0, 1));
|
|
259
|
-
|
|
260
|
-
const MeshCollectionFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
261
|
-
? { register: () => {}, unregister: () => {} }
|
|
262
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_meshcollection_free(ptr >>> 0, 1));
|
|
263
|
-
|
|
264
|
-
const MeshCollectionWithRtcFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
265
|
-
? { register: () => {}, unregister: () => {} }
|
|
266
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_meshcollectionwithrtc_free(ptr >>> 0, 1));
|
|
267
|
-
|
|
268
|
-
const MeshDataJsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
269
|
-
? { register: () => {}, unregister: () => {} }
|
|
270
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_meshdatajs_free(ptr >>> 0, 1));
|
|
271
|
-
|
|
272
|
-
const RtcOffsetJsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
273
|
-
? { register: () => {}, unregister: () => {} }
|
|
274
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_rtcoffsetjs_free(ptr >>> 0, 1));
|
|
275
|
-
|
|
276
|
-
const SymbolicCircleFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
277
|
-
? { register: () => {}, unregister: () => {} }
|
|
278
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_symboliccircle_free(ptr >>> 0, 1));
|
|
279
|
-
|
|
280
|
-
const SymbolicPolylineFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
281
|
-
? { register: () => {}, unregister: () => {} }
|
|
282
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_symbolicpolyline_free(ptr >>> 0, 1));
|
|
283
|
-
|
|
284
|
-
const SymbolicRepresentationCollectionFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
285
|
-
? { register: () => {}, unregister: () => {} }
|
|
286
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_symbolicrepresentationcollection_free(ptr >>> 0, 1));
|
|
287
|
-
|
|
288
|
-
const ZeroCopyMeshFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
289
|
-
? { register: () => {}, unregister: () => {} }
|
|
290
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_zerocopymesh_free(ptr >>> 0, 1));
|
|
291
|
-
|
|
292
|
-
/**
|
|
293
|
-
* Georeferencing information exposed to JavaScript
|
|
294
|
-
*/
|
|
295
|
-
export class GeoReferenceJs {
|
|
296
|
-
static __wrap(ptr) {
|
|
297
|
-
ptr = ptr >>> 0;
|
|
298
|
-
const obj = Object.create(GeoReferenceJs.prototype);
|
|
299
|
-
obj.__wbg_ptr = ptr;
|
|
300
|
-
GeoReferenceJsFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
301
|
-
return obj;
|
|
302
|
-
}
|
|
303
|
-
__destroy_into_raw() {
|
|
304
|
-
const ptr = this.__wbg_ptr;
|
|
305
|
-
this.__wbg_ptr = 0;
|
|
306
|
-
GeoReferenceJsFinalization.unregister(this);
|
|
307
|
-
return ptr;
|
|
308
|
-
}
|
|
309
|
-
free() {
|
|
310
|
-
const ptr = this.__destroy_into_raw();
|
|
311
|
-
wasm.__wbg_georeferencejs_free(ptr, 0);
|
|
312
108
|
}
|
|
313
109
|
/**
|
|
314
110
|
* Eastings (X offset)
|
|
@@ -318,13 +114,6 @@ export class GeoReferenceJs {
|
|
|
318
114
|
const ret = wasm.__wbg_get_georeferencejs_eastings(this.__wbg_ptr);
|
|
319
115
|
return ret;
|
|
320
116
|
}
|
|
321
|
-
/**
|
|
322
|
-
* Eastings (X offset)
|
|
323
|
-
* @param {number} arg0
|
|
324
|
-
*/
|
|
325
|
-
set eastings(arg0) {
|
|
326
|
-
wasm.__wbg_set_georeferencejs_eastings(this.__wbg_ptr, arg0);
|
|
327
|
-
}
|
|
328
117
|
/**
|
|
329
118
|
* Northings (Y offset)
|
|
330
119
|
* @returns {number}
|
|
@@ -333,13 +122,6 @@ export class GeoReferenceJs {
|
|
|
333
122
|
const ret = wasm.__wbg_get_georeferencejs_northings(this.__wbg_ptr);
|
|
334
123
|
return ret;
|
|
335
124
|
}
|
|
336
|
-
/**
|
|
337
|
-
* Northings (Y offset)
|
|
338
|
-
* @param {number} arg0
|
|
339
|
-
*/
|
|
340
|
-
set northings(arg0) {
|
|
341
|
-
wasm.__wbg_set_georeferencejs_northings(this.__wbg_ptr, arg0);
|
|
342
|
-
}
|
|
343
125
|
/**
|
|
344
126
|
* Orthogonal height (Z offset)
|
|
345
127
|
* @returns {number}
|
|
@@ -349,11 +131,12 @@ export class GeoReferenceJs {
|
|
|
349
131
|
return ret;
|
|
350
132
|
}
|
|
351
133
|
/**
|
|
352
|
-
*
|
|
353
|
-
* @
|
|
134
|
+
* Scale factor
|
|
135
|
+
* @returns {number}
|
|
354
136
|
*/
|
|
355
|
-
|
|
356
|
-
wasm.
|
|
137
|
+
get scale() {
|
|
138
|
+
const ret = wasm.__wbg_get_georeferencejs_scale(this.__wbg_ptr);
|
|
139
|
+
return ret;
|
|
357
140
|
}
|
|
358
141
|
/**
|
|
359
142
|
* X-axis abscissa (cos of rotation)
|
|
@@ -363,13 +146,6 @@ export class GeoReferenceJs {
|
|
|
363
146
|
const ret = wasm.__wbg_get_georeferencejs_x_axis_abscissa(this.__wbg_ptr);
|
|
364
147
|
return ret;
|
|
365
148
|
}
|
|
366
|
-
/**
|
|
367
|
-
* X-axis abscissa (cos of rotation)
|
|
368
|
-
* @param {number} arg0
|
|
369
|
-
*/
|
|
370
|
-
set x_axis_abscissa(arg0) {
|
|
371
|
-
wasm.__wbg_set_georeferencejs_x_axis_abscissa(this.__wbg_ptr, arg0);
|
|
372
|
-
}
|
|
373
149
|
/**
|
|
374
150
|
* X-axis ordinate (sin of rotation)
|
|
375
151
|
* @returns {number}
|
|
@@ -379,19 +155,25 @@ export class GeoReferenceJs {
|
|
|
379
155
|
return ret;
|
|
380
156
|
}
|
|
381
157
|
/**
|
|
382
|
-
*
|
|
158
|
+
* Eastings (X offset)
|
|
383
159
|
* @param {number} arg0
|
|
384
160
|
*/
|
|
385
|
-
set
|
|
386
|
-
wasm.
|
|
161
|
+
set eastings(arg0) {
|
|
162
|
+
wasm.__wbg_set_georeferencejs_eastings(this.__wbg_ptr, arg0);
|
|
387
163
|
}
|
|
388
164
|
/**
|
|
389
|
-
*
|
|
390
|
-
* @
|
|
165
|
+
* Northings (Y offset)
|
|
166
|
+
* @param {number} arg0
|
|
391
167
|
*/
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
168
|
+
set northings(arg0) {
|
|
169
|
+
wasm.__wbg_set_georeferencejs_northings(this.__wbg_ptr, arg0);
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Orthogonal height (Z offset)
|
|
173
|
+
* @param {number} arg0
|
|
174
|
+
*/
|
|
175
|
+
set orthogonal_height(arg0) {
|
|
176
|
+
wasm.__wbg_set_georeferencejs_orthogonal_height(this.__wbg_ptr, arg0);
|
|
395
177
|
}
|
|
396
178
|
/**
|
|
397
179
|
* Scale factor
|
|
@@ -401,127 +183,94 @@ export class GeoReferenceJs {
|
|
|
401
183
|
wasm.__wbg_set_georeferencejs_scale(this.__wbg_ptr, arg0);
|
|
402
184
|
}
|
|
403
185
|
/**
|
|
404
|
-
*
|
|
405
|
-
* @param {number}
|
|
406
|
-
* @param {number} y
|
|
407
|
-
* @param {number} z
|
|
408
|
-
* @returns {Float64Array}
|
|
186
|
+
* X-axis abscissa (cos of rotation)
|
|
187
|
+
* @param {number} arg0
|
|
409
188
|
*/
|
|
410
|
-
|
|
189
|
+
set x_axis_abscissa(arg0) {
|
|
190
|
+
wasm.__wbg_set_georeferencejs_x_axis_abscissa(this.__wbg_ptr, arg0);
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* X-axis ordinate (sin of rotation)
|
|
194
|
+
* @param {number} arg0
|
|
195
|
+
*/
|
|
196
|
+
set x_axis_ordinate(arg0) {
|
|
197
|
+
wasm.__wbg_set_georeferencejs_x_axis_ordinate(this.__wbg_ptr, arg0);
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
if (Symbol.dispose) GeoReferenceJs.prototype[Symbol.dispose] = GeoReferenceJs.prototype.free;
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* GPU-ready geometry stored in WASM linear memory
|
|
204
|
+
*
|
|
205
|
+
* Data layout:
|
|
206
|
+
* - vertex_data: Interleaved [px, py, pz, nx, ny, nz, ...] (6 floats per vertex)
|
|
207
|
+
* - indices: Triangle indices [i0, i1, i2, ...]
|
|
208
|
+
* - mesh_metadata: Per-mesh metadata for draw calls
|
|
209
|
+
*
|
|
210
|
+
* All coordinates are pre-converted from IFC Z-up to WebGL Y-up
|
|
211
|
+
*/
|
|
212
|
+
export class GpuGeometry {
|
|
213
|
+
static __wrap(ptr) {
|
|
214
|
+
ptr = ptr >>> 0;
|
|
215
|
+
const obj = Object.create(GpuGeometry.prototype);
|
|
216
|
+
obj.__wbg_ptr = ptr;
|
|
217
|
+
GpuGeometryFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
218
|
+
return obj;
|
|
219
|
+
}
|
|
220
|
+
__destroy_into_raw() {
|
|
221
|
+
const ptr = this.__wbg_ptr;
|
|
222
|
+
this.__wbg_ptr = 0;
|
|
223
|
+
GpuGeometryFinalization.unregister(this);
|
|
224
|
+
return ptr;
|
|
225
|
+
}
|
|
226
|
+
free() {
|
|
227
|
+
const ptr = this.__destroy_into_raw();
|
|
228
|
+
wasm.__wbg_gpugeometry_free(ptr, 0);
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* Get IFC type name by index
|
|
232
|
+
* @param {number} index
|
|
233
|
+
* @returns {string | undefined}
|
|
234
|
+
*/
|
|
235
|
+
getIfcTypeName(index) {
|
|
411
236
|
try {
|
|
412
237
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
413
|
-
wasm.
|
|
238
|
+
wasm.gpugeometry_getIfcTypeName(retptr, this.__wbg_ptr, index);
|
|
414
239
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
415
240
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
416
|
-
|
|
417
|
-
|
|
241
|
+
let v1;
|
|
242
|
+
if (r0 !== 0) {
|
|
243
|
+
v1 = getStringFromWasm0(r0, r1).slice();
|
|
244
|
+
wasm.__wbindgen_export2(r0, r1 * 1, 1);
|
|
245
|
+
}
|
|
418
246
|
return v1;
|
|
419
247
|
} finally {
|
|
420
248
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
421
249
|
}
|
|
422
250
|
}
|
|
423
251
|
/**
|
|
424
|
-
*
|
|
425
|
-
* @param {number}
|
|
426
|
-
* @
|
|
427
|
-
* @param {number} h
|
|
428
|
-
* @returns {Float64Array}
|
|
252
|
+
* Get metadata for a specific mesh
|
|
253
|
+
* @param {number} index
|
|
254
|
+
* @returns {GpuMeshMetadata | undefined}
|
|
429
255
|
*/
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
wasm.georeferencejs_mapToLocal(retptr, this.__wbg_ptr, e, n, h);
|
|
434
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
435
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
436
|
-
var v1 = getArrayF64FromWasm0(r0, r1).slice();
|
|
437
|
-
wasm.__wbindgen_export2(r0, r1 * 8, 8);
|
|
438
|
-
return v1;
|
|
439
|
-
} finally {
|
|
440
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
441
|
-
}
|
|
442
|
-
}
|
|
443
|
-
/**
|
|
444
|
-
* Get CRS name
|
|
445
|
-
* @returns {string | undefined}
|
|
446
|
-
*/
|
|
447
|
-
get crsName() {
|
|
448
|
-
try {
|
|
449
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
450
|
-
wasm.georeferencejs_crsName(retptr, this.__wbg_ptr);
|
|
451
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
452
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
453
|
-
let v1;
|
|
454
|
-
if (r0 !== 0) {
|
|
455
|
-
v1 = getStringFromWasm0(r0, r1).slice();
|
|
456
|
-
wasm.__wbindgen_export2(r0, r1 * 1, 1);
|
|
457
|
-
}
|
|
458
|
-
return v1;
|
|
459
|
-
} finally {
|
|
460
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
461
|
-
}
|
|
462
|
-
}
|
|
463
|
-
/**
|
|
464
|
-
* Get rotation angle in radians
|
|
465
|
-
* @returns {number}
|
|
466
|
-
*/
|
|
467
|
-
get rotation() {
|
|
468
|
-
const ret = wasm.georeferencejs_rotation(this.__wbg_ptr);
|
|
469
|
-
return ret;
|
|
256
|
+
getMeshMetadata(index) {
|
|
257
|
+
const ret = wasm.gpugeometry_getMeshMetadata(this.__wbg_ptr, index);
|
|
258
|
+
return ret === 0 ? undefined : GpuMeshMetadata.__wrap(ret);
|
|
470
259
|
}
|
|
471
260
|
/**
|
|
472
|
-
*
|
|
473
|
-
* @returns {
|
|
261
|
+
* Check if RTC offset is active (non-zero)
|
|
262
|
+
* @returns {boolean}
|
|
474
263
|
*/
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
wasm.georeferencejs_toMatrix(retptr, this.__wbg_ptr);
|
|
479
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
480
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
481
|
-
var v1 = getArrayF64FromWasm0(r0, r1).slice();
|
|
482
|
-
wasm.__wbindgen_export2(r0, r1 * 8, 8);
|
|
483
|
-
return v1;
|
|
484
|
-
} finally {
|
|
485
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
486
|
-
}
|
|
487
|
-
}
|
|
488
|
-
}
|
|
489
|
-
if (Symbol.dispose) GeoReferenceJs.prototype[Symbol.dispose] = GeoReferenceJs.prototype.free;
|
|
490
|
-
|
|
491
|
-
/**
|
|
492
|
-
* GPU-ready geometry stored in WASM linear memory
|
|
493
|
-
*
|
|
494
|
-
* Data layout:
|
|
495
|
-
* - vertex_data: Interleaved [px, py, pz, nx, ny, nz, ...] (6 floats per vertex)
|
|
496
|
-
* - indices: Triangle indices [i0, i1, i2, ...]
|
|
497
|
-
* - mesh_metadata: Per-mesh metadata for draw calls
|
|
498
|
-
*
|
|
499
|
-
* All coordinates are pre-converted from IFC Z-up to WebGL Y-up
|
|
500
|
-
*/
|
|
501
|
-
export class GpuGeometry {
|
|
502
|
-
static __wrap(ptr) {
|
|
503
|
-
ptr = ptr >>> 0;
|
|
504
|
-
const obj = Object.create(GpuGeometry.prototype);
|
|
505
|
-
obj.__wbg_ptr = ptr;
|
|
506
|
-
GpuGeometryFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
507
|
-
return obj;
|
|
508
|
-
}
|
|
509
|
-
__destroy_into_raw() {
|
|
510
|
-
const ptr = this.__wbg_ptr;
|
|
511
|
-
this.__wbg_ptr = 0;
|
|
512
|
-
GpuGeometryFinalization.unregister(this);
|
|
513
|
-
return ptr;
|
|
514
|
-
}
|
|
515
|
-
free() {
|
|
516
|
-
const ptr = this.__destroy_into_raw();
|
|
517
|
-
wasm.__wbg_gpugeometry_free(ptr, 0);
|
|
264
|
+
get hasRtcOffset() {
|
|
265
|
+
const ret = wasm.gpugeometry_hasRtcOffset(this.__wbg_ptr);
|
|
266
|
+
return ret !== 0;
|
|
518
267
|
}
|
|
519
268
|
/**
|
|
520
|
-
* Get
|
|
269
|
+
* Get byte length of indices (for GPU buffer creation)
|
|
521
270
|
* @returns {number}
|
|
522
271
|
*/
|
|
523
|
-
get
|
|
524
|
-
const ret = wasm.
|
|
272
|
+
get indicesByteLength() {
|
|
273
|
+
const ret = wasm.gpugeometry_indicesByteLength(this.__wbg_ptr);
|
|
525
274
|
return ret >>> 0;
|
|
526
275
|
}
|
|
527
276
|
/**
|
|
@@ -540,6 +289,31 @@ export class GpuGeometry {
|
|
|
540
289
|
const ret = wasm.gpugeometry_indicesPtr(this.__wbg_ptr);
|
|
541
290
|
return ret >>> 0;
|
|
542
291
|
}
|
|
292
|
+
/**
|
|
293
|
+
* Check if geometry is empty
|
|
294
|
+
* @returns {boolean}
|
|
295
|
+
*/
|
|
296
|
+
get isEmpty() {
|
|
297
|
+
const ret = wasm.gpugeometry_isEmpty(this.__wbg_ptr);
|
|
298
|
+
return ret !== 0;
|
|
299
|
+
}
|
|
300
|
+
/**
|
|
301
|
+
* Get number of meshes in this geometry batch
|
|
302
|
+
* @returns {number}
|
|
303
|
+
*/
|
|
304
|
+
get meshCount() {
|
|
305
|
+
const ret = wasm.gpugeometry_meshCount(this.__wbg_ptr);
|
|
306
|
+
return ret >>> 0;
|
|
307
|
+
}
|
|
308
|
+
/**
|
|
309
|
+
* Create a new empty GPU geometry container
|
|
310
|
+
*/
|
|
311
|
+
constructor() {
|
|
312
|
+
const ret = wasm.gpugeometry_new();
|
|
313
|
+
this.__wbg_ptr = ret >>> 0;
|
|
314
|
+
GpuGeometryFinalization.register(this, this.__wbg_ptr, this);
|
|
315
|
+
return this;
|
|
316
|
+
}
|
|
543
317
|
/**
|
|
544
318
|
* Get X component of RTC offset
|
|
545
319
|
* @returns {number}
|
|
@@ -564,14 +338,6 @@ export class GpuGeometry {
|
|
|
564
338
|
const ret = wasm.gpugeometry_rtcOffsetZ(this.__wbg_ptr);
|
|
565
339
|
return ret;
|
|
566
340
|
}
|
|
567
|
-
/**
|
|
568
|
-
* Check if RTC offset is active (non-zero)
|
|
569
|
-
* @returns {boolean}
|
|
570
|
-
*/
|
|
571
|
-
get hasRtcOffset() {
|
|
572
|
-
const ret = wasm.gpugeometry_hasRtcOffset(this.__wbg_ptr);
|
|
573
|
-
return ret !== 0;
|
|
574
|
-
}
|
|
575
341
|
/**
|
|
576
342
|
* Set the RTC (Relative To Center) offset applied to coordinates
|
|
577
343
|
* @param {number} x
|
|
@@ -582,54 +348,13 @@ export class GpuGeometry {
|
|
|
582
348
|
wasm.gpugeometry_set_rtc_offset(this.__wbg_ptr, x, y, z);
|
|
583
349
|
}
|
|
584
350
|
/**
|
|
585
|
-
* Get
|
|
586
|
-
* @returns {number}
|
|
587
|
-
*/
|
|
588
|
-
get vertexDataLen() {
|
|
589
|
-
const ret = wasm.gpugeometry_vertexDataLen(this.__wbg_ptr);
|
|
590
|
-
return ret >>> 0;
|
|
591
|
-
}
|
|
592
|
-
/**
|
|
593
|
-
* Get pointer to vertex data for zero-copy view
|
|
594
|
-
*
|
|
595
|
-
* SAFETY: View is only valid until next WASM allocation!
|
|
596
|
-
* Create view, upload to GPU, then discard view immediately.
|
|
351
|
+
* Get total triangle count
|
|
597
352
|
* @returns {number}
|
|
598
353
|
*/
|
|
599
|
-
get
|
|
600
|
-
const ret = wasm.
|
|
354
|
+
get totalTriangleCount() {
|
|
355
|
+
const ret = wasm.gpugeometry_totalTriangleCount(this.__wbg_ptr);
|
|
601
356
|
return ret >>> 0;
|
|
602
357
|
}
|
|
603
|
-
/**
|
|
604
|
-
* Get IFC type name by index
|
|
605
|
-
* @param {number} index
|
|
606
|
-
* @returns {string | undefined}
|
|
607
|
-
*/
|
|
608
|
-
getIfcTypeName(index) {
|
|
609
|
-
try {
|
|
610
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
611
|
-
wasm.gpugeometry_getIfcTypeName(retptr, this.__wbg_ptr, index);
|
|
612
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
613
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
614
|
-
let v1;
|
|
615
|
-
if (r0 !== 0) {
|
|
616
|
-
v1 = getStringFromWasm0(r0, r1).slice();
|
|
617
|
-
wasm.__wbindgen_export2(r0, r1 * 1, 1);
|
|
618
|
-
}
|
|
619
|
-
return v1;
|
|
620
|
-
} finally {
|
|
621
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
622
|
-
}
|
|
623
|
-
}
|
|
624
|
-
/**
|
|
625
|
-
* Get metadata for a specific mesh
|
|
626
|
-
* @param {number} index
|
|
627
|
-
* @returns {GpuMeshMetadata | undefined}
|
|
628
|
-
*/
|
|
629
|
-
getMeshMetadata(index) {
|
|
630
|
-
const ret = wasm.gpugeometry_getMeshMetadata(this.__wbg_ptr, index);
|
|
631
|
-
return ret === 0 ? undefined : GpuMeshMetadata.__wrap(ret);
|
|
632
|
-
}
|
|
633
358
|
/**
|
|
634
359
|
* Get total vertex count
|
|
635
360
|
* @returns {number}
|
|
@@ -639,46 +364,32 @@ export class GpuGeometry {
|
|
|
639
364
|
return ret >>> 0;
|
|
640
365
|
}
|
|
641
366
|
/**
|
|
642
|
-
* Get byte length of
|
|
367
|
+
* Get byte length of vertex data (for GPU buffer creation)
|
|
643
368
|
* @returns {number}
|
|
644
369
|
*/
|
|
645
|
-
get
|
|
646
|
-
const ret = wasm.
|
|
370
|
+
get vertexDataByteLength() {
|
|
371
|
+
const ret = wasm.gpugeometry_vertexDataByteLength(this.__wbg_ptr);
|
|
647
372
|
return ret >>> 0;
|
|
648
373
|
}
|
|
649
374
|
/**
|
|
650
|
-
* Get
|
|
375
|
+
* Get length of vertex data array (in f32 elements, not bytes)
|
|
651
376
|
* @returns {number}
|
|
652
377
|
*/
|
|
653
|
-
get
|
|
654
|
-
const ret = wasm.
|
|
378
|
+
get vertexDataLen() {
|
|
379
|
+
const ret = wasm.gpugeometry_vertexDataLen(this.__wbg_ptr);
|
|
655
380
|
return ret >>> 0;
|
|
656
381
|
}
|
|
657
382
|
/**
|
|
658
|
-
* Get
|
|
383
|
+
* Get pointer to vertex data for zero-copy view
|
|
384
|
+
*
|
|
385
|
+
* SAFETY: View is only valid until next WASM allocation!
|
|
386
|
+
* Create view, upload to GPU, then discard view immediately.
|
|
659
387
|
* @returns {number}
|
|
660
388
|
*/
|
|
661
|
-
get
|
|
662
|
-
const ret = wasm.
|
|
389
|
+
get vertexDataPtr() {
|
|
390
|
+
const ret = wasm.gpugeometry_vertexDataPtr(this.__wbg_ptr);
|
|
663
391
|
return ret >>> 0;
|
|
664
392
|
}
|
|
665
|
-
/**
|
|
666
|
-
* Create a new empty GPU geometry container
|
|
667
|
-
*/
|
|
668
|
-
constructor() {
|
|
669
|
-
const ret = wasm.gpugeometry_new();
|
|
670
|
-
this.__wbg_ptr = ret >>> 0;
|
|
671
|
-
GpuGeometryFinalization.register(this, this.__wbg_ptr, this);
|
|
672
|
-
return this;
|
|
673
|
-
}
|
|
674
|
-
/**
|
|
675
|
-
* Check if geometry is empty
|
|
676
|
-
* @returns {boolean}
|
|
677
|
-
*/
|
|
678
|
-
get isEmpty() {
|
|
679
|
-
const ret = wasm.gpugeometry_isEmpty(this.__wbg_ptr);
|
|
680
|
-
return ret !== 0;
|
|
681
|
-
}
|
|
682
393
|
}
|
|
683
394
|
if (Symbol.dispose) GpuGeometry.prototype[Symbol.dispose] = GpuGeometry.prototype.free;
|
|
684
395
|
|
|
@@ -718,22 +429,22 @@ export class GpuInstancedGeometry {
|
|
|
718
429
|
/**
|
|
719
430
|
* @returns {number}
|
|
720
431
|
*/
|
|
721
|
-
get
|
|
722
|
-
const ret = wasm.
|
|
432
|
+
get indicesByteLength() {
|
|
433
|
+
const ret = wasm.gpuinstancedgeometry_indicesByteLength(this.__wbg_ptr);
|
|
723
434
|
return ret >>> 0;
|
|
724
435
|
}
|
|
725
436
|
/**
|
|
726
437
|
* @returns {number}
|
|
727
438
|
*/
|
|
728
|
-
get
|
|
729
|
-
const ret = wasm.
|
|
439
|
+
get indicesLen() {
|
|
440
|
+
const ret = wasm.gpuinstancedgeometry_indicesLen(this.__wbg_ptr);
|
|
730
441
|
return ret >>> 0;
|
|
731
442
|
}
|
|
732
443
|
/**
|
|
733
444
|
* @returns {number}
|
|
734
445
|
*/
|
|
735
|
-
get
|
|
736
|
-
const ret = wasm.
|
|
446
|
+
get indicesPtr() {
|
|
447
|
+
const ret = wasm.gpuinstancedgeometry_indicesPtr(this.__wbg_ptr);
|
|
737
448
|
return ret >>> 0;
|
|
738
449
|
}
|
|
739
450
|
/**
|
|
@@ -746,22 +457,8 @@ export class GpuInstancedGeometry {
|
|
|
746
457
|
/**
|
|
747
458
|
* @returns {number}
|
|
748
459
|
*/
|
|
749
|
-
get
|
|
750
|
-
const ret = wasm.
|
|
751
|
-
return ret >>> 0;
|
|
752
|
-
}
|
|
753
|
-
/**
|
|
754
|
-
* @returns {number}
|
|
755
|
-
*/
|
|
756
|
-
get vertexDataLen() {
|
|
757
|
-
const ret = wasm.gpuinstancedgeometry_vertexDataLen(this.__wbg_ptr);
|
|
758
|
-
return ret >>> 0;
|
|
759
|
-
}
|
|
760
|
-
/**
|
|
761
|
-
* @returns {number}
|
|
762
|
-
*/
|
|
763
|
-
get vertexDataPtr() {
|
|
764
|
-
const ret = wasm.gpuinstancedgeometry_vertexDataPtr(this.__wbg_ptr);
|
|
460
|
+
get instanceDataByteLength() {
|
|
461
|
+
const ret = wasm.gpuinstancedgeometry_instanceDataByteLength(this.__wbg_ptr);
|
|
765
462
|
return ret >>> 0;
|
|
766
463
|
}
|
|
767
464
|
/**
|
|
@@ -781,40 +478,54 @@ export class GpuInstancedGeometry {
|
|
|
781
478
|
/**
|
|
782
479
|
* @returns {number}
|
|
783
480
|
*/
|
|
784
|
-
get
|
|
785
|
-
const ret = wasm.
|
|
481
|
+
get instanceExpressIdsPtr() {
|
|
482
|
+
const ret = wasm.gpuinstancedgeometry_instanceExpressIdsPtr(this.__wbg_ptr);
|
|
786
483
|
return ret >>> 0;
|
|
787
484
|
}
|
|
788
485
|
/**
|
|
789
|
-
*
|
|
486
|
+
* Create new instanced geometry
|
|
487
|
+
* @param {bigint} geometry_id
|
|
790
488
|
*/
|
|
791
|
-
|
|
792
|
-
const ret = wasm.
|
|
793
|
-
|
|
489
|
+
constructor(geometry_id) {
|
|
490
|
+
const ret = wasm.gpuinstancedgeometry_new(geometry_id);
|
|
491
|
+
this.__wbg_ptr = ret >>> 0;
|
|
492
|
+
GpuInstancedGeometryFinalization.register(this, this.__wbg_ptr, this);
|
|
493
|
+
return this;
|
|
794
494
|
}
|
|
795
495
|
/**
|
|
796
496
|
* @returns {number}
|
|
797
497
|
*/
|
|
798
|
-
get
|
|
799
|
-
const ret = wasm.
|
|
498
|
+
get triangleCount() {
|
|
499
|
+
const ret = wasm.gpuinstancedgeometry_triangleCount(this.__wbg_ptr);
|
|
800
500
|
return ret >>> 0;
|
|
801
501
|
}
|
|
802
502
|
/**
|
|
803
503
|
* @returns {number}
|
|
804
504
|
*/
|
|
805
|
-
get
|
|
806
|
-
const ret = wasm.
|
|
505
|
+
get vertexCount() {
|
|
506
|
+
const ret = wasm.gpuinstancedgeometry_vertexCount(this.__wbg_ptr);
|
|
807
507
|
return ret >>> 0;
|
|
808
508
|
}
|
|
809
509
|
/**
|
|
810
|
-
*
|
|
811
|
-
* @param {bigint} geometry_id
|
|
510
|
+
* @returns {number}
|
|
812
511
|
*/
|
|
813
|
-
|
|
814
|
-
const ret = wasm.
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
512
|
+
get vertexDataByteLength() {
|
|
513
|
+
const ret = wasm.gpuinstancedgeometry_vertexDataByteLength(this.__wbg_ptr);
|
|
514
|
+
return ret >>> 0;
|
|
515
|
+
}
|
|
516
|
+
/**
|
|
517
|
+
* @returns {number}
|
|
518
|
+
*/
|
|
519
|
+
get vertexDataLen() {
|
|
520
|
+
const ret = wasm.gpuinstancedgeometry_vertexDataLen(this.__wbg_ptr);
|
|
521
|
+
return ret >>> 0;
|
|
522
|
+
}
|
|
523
|
+
/**
|
|
524
|
+
* @returns {number}
|
|
525
|
+
*/
|
|
526
|
+
get vertexDataPtr() {
|
|
527
|
+
const ret = wasm.gpuinstancedgeometry_vertexDataPtr(this.__wbg_ptr);
|
|
528
|
+
return ret >>> 0;
|
|
818
529
|
}
|
|
819
530
|
}
|
|
820
531
|
if (Symbol.dispose) GpuInstancedGeometry.prototype[Symbol.dispose] = GpuInstancedGeometry.prototype.free;
|
|
@@ -848,19 +559,6 @@ export class GpuInstancedGeometryCollection {
|
|
|
848
559
|
const ret = wasm.gpuinstancedgeometrycollection_get(this.__wbg_ptr, index);
|
|
849
560
|
return ret === 0 ? undefined : GpuInstancedGeometry.__wrap(ret);
|
|
850
561
|
}
|
|
851
|
-
constructor() {
|
|
852
|
-
const ret = wasm.gpuinstancedgeometrycollection_new();
|
|
853
|
-
this.__wbg_ptr = ret >>> 0;
|
|
854
|
-
GpuInstancedGeometryCollectionFinalization.register(this, this.__wbg_ptr, this);
|
|
855
|
-
return this;
|
|
856
|
-
}
|
|
857
|
-
/**
|
|
858
|
-
* @returns {number}
|
|
859
|
-
*/
|
|
860
|
-
get length() {
|
|
861
|
-
const ret = wasm.gpuinstancedgeometrycollection_length(this.__wbg_ptr);
|
|
862
|
-
return ret >>> 0;
|
|
863
|
-
}
|
|
864
562
|
/**
|
|
865
563
|
* Get geometry by index with pointer access over owned buffers.
|
|
866
564
|
* This avoids exposing references tied to collection lifetime.
|
|
@@ -868,9 +566,22 @@ export class GpuInstancedGeometryCollection {
|
|
|
868
566
|
* @returns {GpuInstancedGeometryRef | undefined}
|
|
869
567
|
*/
|
|
870
568
|
getRef(index) {
|
|
871
|
-
const ret = wasm.
|
|
569
|
+
const ret = wasm.gpuinstancedgeometrycollection_getRef(this.__wbg_ptr, index);
|
|
872
570
|
return ret === 0 ? undefined : GpuInstancedGeometryRef.__wrap(ret);
|
|
873
571
|
}
|
|
572
|
+
/**
|
|
573
|
+
* @returns {number}
|
|
574
|
+
*/
|
|
575
|
+
get length() {
|
|
576
|
+
const ret = wasm.gpuinstancedgeometrycollection_length(this.__wbg_ptr);
|
|
577
|
+
return ret >>> 0;
|
|
578
|
+
}
|
|
579
|
+
constructor() {
|
|
580
|
+
const ret = wasm.gpuinstancedgeometrycollection_new();
|
|
581
|
+
this.__wbg_ptr = ret >>> 0;
|
|
582
|
+
GpuInstancedGeometryCollectionFinalization.register(this, this.__wbg_ptr, this);
|
|
583
|
+
return this;
|
|
584
|
+
}
|
|
874
585
|
}
|
|
875
586
|
if (Symbol.dispose) GpuInstancedGeometryCollection.prototype[Symbol.dispose] = GpuInstancedGeometryCollection.prototype.free;
|
|
876
587
|
|
|
@@ -900,84 +611,84 @@ export class GpuInstancedGeometryRef {
|
|
|
900
611
|
* @returns {bigint}
|
|
901
612
|
*/
|
|
902
613
|
get geometryId() {
|
|
903
|
-
const ret = wasm.
|
|
614
|
+
const ret = wasm.gpuinstancedgeometryref_geometryId(this.__wbg_ptr);
|
|
904
615
|
return BigInt.asUintN(64, ret);
|
|
905
616
|
}
|
|
906
617
|
/**
|
|
907
618
|
* @returns {number}
|
|
908
619
|
*/
|
|
909
|
-
get
|
|
910
|
-
const ret = wasm.
|
|
620
|
+
get indicesByteLength() {
|
|
621
|
+
const ret = wasm.gpuinstancedgeometryref_indicesByteLength(this.__wbg_ptr);
|
|
911
622
|
return ret >>> 0;
|
|
912
623
|
}
|
|
913
624
|
/**
|
|
914
625
|
* @returns {number}
|
|
915
626
|
*/
|
|
916
|
-
get
|
|
917
|
-
const ret = wasm.
|
|
627
|
+
get indicesLen() {
|
|
628
|
+
const ret = wasm.gpuinstancedgeometryref_indicesLen(this.__wbg_ptr);
|
|
918
629
|
return ret >>> 0;
|
|
919
630
|
}
|
|
920
631
|
/**
|
|
921
632
|
* @returns {number}
|
|
922
633
|
*/
|
|
923
|
-
get
|
|
924
|
-
const ret = wasm.
|
|
634
|
+
get indicesPtr() {
|
|
635
|
+
const ret = wasm.gpuinstancedgeometryref_indicesPtr(this.__wbg_ptr);
|
|
925
636
|
return ret >>> 0;
|
|
926
637
|
}
|
|
927
638
|
/**
|
|
928
639
|
* @returns {number}
|
|
929
640
|
*/
|
|
930
|
-
get
|
|
931
|
-
const ret = wasm.
|
|
641
|
+
get instanceCount() {
|
|
642
|
+
const ret = wasm.gpuinstancedgeometryref_instanceCount(this.__wbg_ptr);
|
|
932
643
|
return ret >>> 0;
|
|
933
644
|
}
|
|
934
645
|
/**
|
|
935
646
|
* @returns {number}
|
|
936
647
|
*/
|
|
937
|
-
get
|
|
938
|
-
const ret = wasm.
|
|
648
|
+
get instanceDataByteLength() {
|
|
649
|
+
const ret = wasm.gpuinstancedgeometryref_instanceDataByteLength(this.__wbg_ptr);
|
|
939
650
|
return ret >>> 0;
|
|
940
651
|
}
|
|
941
652
|
/**
|
|
942
653
|
* @returns {number}
|
|
943
654
|
*/
|
|
944
655
|
get instanceDataLen() {
|
|
945
|
-
const ret = wasm.
|
|
656
|
+
const ret = wasm.gpuinstancedgeometryref_instanceDataLen(this.__wbg_ptr);
|
|
946
657
|
return ret >>> 0;
|
|
947
658
|
}
|
|
948
659
|
/**
|
|
949
660
|
* @returns {number}
|
|
950
661
|
*/
|
|
951
662
|
get instanceDataPtr() {
|
|
952
|
-
const ret = wasm.
|
|
663
|
+
const ret = wasm.gpuinstancedgeometryref_instanceDataPtr(this.__wbg_ptr);
|
|
953
664
|
return ret >>> 0;
|
|
954
665
|
}
|
|
955
666
|
/**
|
|
956
667
|
* @returns {number}
|
|
957
668
|
*/
|
|
958
|
-
get
|
|
959
|
-
const ret = wasm.
|
|
669
|
+
get instanceExpressIdsPtr() {
|
|
670
|
+
const ret = wasm.gpuinstancedgeometryref_instanceExpressIdsPtr(this.__wbg_ptr);
|
|
960
671
|
return ret >>> 0;
|
|
961
672
|
}
|
|
962
673
|
/**
|
|
963
674
|
* @returns {number}
|
|
964
675
|
*/
|
|
965
676
|
get vertexDataByteLength() {
|
|
966
|
-
const ret = wasm.
|
|
677
|
+
const ret = wasm.gpuinstancedgeometryref_vertexDataByteLength(this.__wbg_ptr);
|
|
967
678
|
return ret >>> 0;
|
|
968
679
|
}
|
|
969
680
|
/**
|
|
970
681
|
* @returns {number}
|
|
971
682
|
*/
|
|
972
|
-
get
|
|
973
|
-
const ret = wasm.
|
|
683
|
+
get vertexDataLen() {
|
|
684
|
+
const ret = wasm.gpuinstancedgeometryref_vertexDataLen(this.__wbg_ptr);
|
|
974
685
|
return ret >>> 0;
|
|
975
686
|
}
|
|
976
687
|
/**
|
|
977
688
|
* @returns {number}
|
|
978
689
|
*/
|
|
979
|
-
get
|
|
980
|
-
const ret = wasm.
|
|
690
|
+
get vertexDataPtr() {
|
|
691
|
+
const ret = wasm.gpuinstancedgeometryref_vertexDataPtr(this.__wbg_ptr);
|
|
981
692
|
return ret >>> 0;
|
|
982
693
|
}
|
|
983
694
|
}
|
|
@@ -1005,17 +716,26 @@ export class GpuMeshMetadata {
|
|
|
1005
716
|
wasm.__wbg_gpumeshmetadata_free(ptr, 0);
|
|
1006
717
|
}
|
|
1007
718
|
/**
|
|
1008
|
-
* @returns {
|
|
719
|
+
* @returns {Float32Array}
|
|
1009
720
|
*/
|
|
1010
|
-
get
|
|
1011
|
-
|
|
1012
|
-
|
|
721
|
+
get color() {
|
|
722
|
+
try {
|
|
723
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
724
|
+
wasm.gpumeshmetadata_color(retptr, this.__wbg_ptr);
|
|
725
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
726
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
727
|
+
var v1 = getArrayF32FromWasm0(r0, r1).slice();
|
|
728
|
+
wasm.__wbindgen_export2(r0, r1 * 4, 4);
|
|
729
|
+
return v1;
|
|
730
|
+
} finally {
|
|
731
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
732
|
+
}
|
|
1013
733
|
}
|
|
1014
734
|
/**
|
|
1015
735
|
* @returns {number}
|
|
1016
736
|
*/
|
|
1017
|
-
get
|
|
1018
|
-
const ret = wasm.
|
|
737
|
+
get expressId() {
|
|
738
|
+
const ret = wasm.gpumeshmetadata_expressId(this.__wbg_ptr);
|
|
1019
739
|
return ret >>> 0;
|
|
1020
740
|
}
|
|
1021
741
|
/**
|
|
@@ -1025,6 +745,13 @@ export class GpuMeshMetadata {
|
|
|
1025
745
|
const ret = wasm.gpumeshmetadata_ifcTypeIdx(this.__wbg_ptr);
|
|
1026
746
|
return ret;
|
|
1027
747
|
}
|
|
748
|
+
/**
|
|
749
|
+
* @returns {number}
|
|
750
|
+
*/
|
|
751
|
+
get indexCount() {
|
|
752
|
+
const ret = wasm.gpumeshmetadata_indexCount(this.__wbg_ptr);
|
|
753
|
+
return ret >>> 0;
|
|
754
|
+
}
|
|
1028
755
|
/**
|
|
1029
756
|
* @returns {number}
|
|
1030
757
|
*/
|
|
@@ -1046,22 +773,6 @@ export class GpuMeshMetadata {
|
|
|
1046
773
|
const ret = wasm.gpumeshmetadata_vertexOffset(this.__wbg_ptr);
|
|
1047
774
|
return ret >>> 0;
|
|
1048
775
|
}
|
|
1049
|
-
/**
|
|
1050
|
-
* @returns {Float32Array}
|
|
1051
|
-
*/
|
|
1052
|
-
get color() {
|
|
1053
|
-
try {
|
|
1054
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1055
|
-
wasm.gpumeshmetadata_color(retptr, this.__wbg_ptr);
|
|
1056
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1057
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1058
|
-
var v1 = getArrayF32FromWasm0(r0, r1).slice();
|
|
1059
|
-
wasm.__wbindgen_export2(r0, r1 * 4, 4);
|
|
1060
|
-
return v1;
|
|
1061
|
-
} finally {
|
|
1062
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1063
|
-
}
|
|
1064
|
-
}
|
|
1065
776
|
}
|
|
1066
777
|
if (Symbol.dispose) GpuMeshMetadata.prototype[Symbol.dispose] = GpuMeshMetadata.prototype.free;
|
|
1067
778
|
|
|
@@ -1079,6 +790,117 @@ export class IfcAPI {
|
|
|
1079
790
|
const ptr = this.__destroy_into_raw();
|
|
1080
791
|
wasm.__wbg_ifcapi_free(ptr, 0);
|
|
1081
792
|
}
|
|
793
|
+
/**
|
|
794
|
+
* Debug: Test processing entity #953 (FacetedBrep wall)
|
|
795
|
+
* @param {string} content
|
|
796
|
+
* @returns {string}
|
|
797
|
+
*/
|
|
798
|
+
debugProcessEntity953(content) {
|
|
799
|
+
let deferred2_0;
|
|
800
|
+
let deferred2_1;
|
|
801
|
+
try {
|
|
802
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
803
|
+
const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
|
|
804
|
+
const len0 = WASM_VECTOR_LEN;
|
|
805
|
+
wasm.ifcapi_debugProcessEntity953(retptr, this.__wbg_ptr, ptr0, len0);
|
|
806
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
807
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
808
|
+
deferred2_0 = r0;
|
|
809
|
+
deferred2_1 = r1;
|
|
810
|
+
return getStringFromWasm0(r0, r1);
|
|
811
|
+
} finally {
|
|
812
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
813
|
+
wasm.__wbindgen_export2(deferred2_0, deferred2_1, 1);
|
|
814
|
+
}
|
|
815
|
+
}
|
|
816
|
+
/**
|
|
817
|
+
* Debug: Test processing a single wall
|
|
818
|
+
* @param {string} content
|
|
819
|
+
* @returns {string}
|
|
820
|
+
*/
|
|
821
|
+
debugProcessFirstWall(content) {
|
|
822
|
+
let deferred2_0;
|
|
823
|
+
let deferred2_1;
|
|
824
|
+
try {
|
|
825
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
826
|
+
const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
|
|
827
|
+
const len0 = WASM_VECTOR_LEN;
|
|
828
|
+
wasm.ifcapi_debugProcessFirstWall(retptr, this.__wbg_ptr, ptr0, len0);
|
|
829
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
830
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
831
|
+
deferred2_0 = r0;
|
|
832
|
+
deferred2_1 = r1;
|
|
833
|
+
return getStringFromWasm0(r0, r1);
|
|
834
|
+
} finally {
|
|
835
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
836
|
+
wasm.__wbindgen_export2(deferred2_0, deferred2_1, 1);
|
|
837
|
+
}
|
|
838
|
+
}
|
|
839
|
+
/**
|
|
840
|
+
* Extract georeferencing information from IFC content
|
|
841
|
+
* Returns null if no georeferencing is present
|
|
842
|
+
*
|
|
843
|
+
* Example:
|
|
844
|
+
* ```javascript
|
|
845
|
+
* const api = new IfcAPI();
|
|
846
|
+
* const georef = api.getGeoReference(ifcData);
|
|
847
|
+
* if (georef) {
|
|
848
|
+
* console.log('CRS:', georef.crsName);
|
|
849
|
+
* const [e, n, h] = georef.localToMap(10, 20, 5);
|
|
850
|
+
* }
|
|
851
|
+
* ```
|
|
852
|
+
* @param {string} content
|
|
853
|
+
* @returns {GeoReferenceJs | undefined}
|
|
854
|
+
*/
|
|
855
|
+
getGeoReference(content) {
|
|
856
|
+
const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
|
|
857
|
+
const len0 = WASM_VECTOR_LEN;
|
|
858
|
+
const ret = wasm.ifcapi_getGeoReference(this.__wbg_ptr, ptr0, len0);
|
|
859
|
+
return ret === 0 ? undefined : GeoReferenceJs.__wrap(ret);
|
|
860
|
+
}
|
|
861
|
+
/**
|
|
862
|
+
* Get WASM memory for zero-copy access
|
|
863
|
+
* @returns {any}
|
|
864
|
+
*/
|
|
865
|
+
getMemory() {
|
|
866
|
+
const ret = wasm.ifcapi_getMemory(this.__wbg_ptr);
|
|
867
|
+
return takeObject(ret);
|
|
868
|
+
}
|
|
869
|
+
/**
|
|
870
|
+
* Check if API is initialized
|
|
871
|
+
* @returns {boolean}
|
|
872
|
+
*/
|
|
873
|
+
get is_ready() {
|
|
874
|
+
const ret = wasm.ifcapi_is_ready(this.__wbg_ptr);
|
|
875
|
+
return ret !== 0;
|
|
876
|
+
}
|
|
877
|
+
/**
|
|
878
|
+
* Create and initialize the IFC API
|
|
879
|
+
*/
|
|
880
|
+
constructor() {
|
|
881
|
+
const ret = wasm.ifcapi_new();
|
|
882
|
+
this.__wbg_ptr = ret >>> 0;
|
|
883
|
+
IfcAPIFinalization.register(this, this.__wbg_ptr, this);
|
|
884
|
+
return this;
|
|
885
|
+
}
|
|
886
|
+
/**
|
|
887
|
+
* Parse IFC file (traditional - waits for completion)
|
|
888
|
+
*
|
|
889
|
+
* Example:
|
|
890
|
+
* ```javascript
|
|
891
|
+
* const api = new IfcAPI();
|
|
892
|
+
* const result = await api.parse(ifcData);
|
|
893
|
+
* console.log('Entities:', result.entityCount);
|
|
894
|
+
* ```
|
|
895
|
+
* @param {string} content
|
|
896
|
+
* @returns {Promise<any>}
|
|
897
|
+
*/
|
|
898
|
+
parse(content) {
|
|
899
|
+
const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
|
|
900
|
+
const len0 = WASM_VECTOR_LEN;
|
|
901
|
+
const ret = wasm.ifcapi_parse(this.__wbg_ptr, ptr0, len0);
|
|
902
|
+
return takeObject(ret);
|
|
903
|
+
}
|
|
1082
904
|
/**
|
|
1083
905
|
* Parse IFC file and return individual meshes with express IDs and colors
|
|
1084
906
|
* This matches the MeshData[] format expected by the viewer
|
|
@@ -1148,12 +970,139 @@ export class IfcAPI {
|
|
|
1148
970
|
return takeObject(ret);
|
|
1149
971
|
}
|
|
1150
972
|
/**
|
|
1151
|
-
* Parse IFC file and return
|
|
1152
|
-
*
|
|
1153
|
-
*
|
|
1154
|
-
*
|
|
1155
|
-
*
|
|
1156
|
-
*
|
|
973
|
+
* Parse IFC file and return instanced geometry grouped by geometry hash
|
|
974
|
+
* This reduces draw calls by grouping identical geometries with different transforms
|
|
975
|
+
*
|
|
976
|
+
* Example:
|
|
977
|
+
* ```javascript
|
|
978
|
+
* const api = new IfcAPI();
|
|
979
|
+
* const collection = api.parseMeshesInstanced(ifcData);
|
|
980
|
+
* for (let i = 0; i < collection.length; i++) {
|
|
981
|
+
* const geometry = collection.get(i);
|
|
982
|
+
* console.log('Geometry ID:', geometry.geometryId);
|
|
983
|
+
* console.log('Instances:', geometry.instanceCount);
|
|
984
|
+
* for (let j = 0; j < geometry.instanceCount; j++) {
|
|
985
|
+
* const inst = geometry.getInstance(j);
|
|
986
|
+
* console.log(' Express ID:', inst.expressId);
|
|
987
|
+
* console.log(' Transform:', inst.transform);
|
|
988
|
+
* }
|
|
989
|
+
* }
|
|
990
|
+
* ```
|
|
991
|
+
* @param {string} content
|
|
992
|
+
* @returns {InstancedMeshCollection}
|
|
993
|
+
*/
|
|
994
|
+
parseMeshesInstanced(content) {
|
|
995
|
+
const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
|
|
996
|
+
const len0 = WASM_VECTOR_LEN;
|
|
997
|
+
const ret = wasm.ifcapi_parseMeshesInstanced(this.__wbg_ptr, ptr0, len0);
|
|
998
|
+
return InstancedMeshCollection.__wrap(ret);
|
|
999
|
+
}
|
|
1000
|
+
/**
|
|
1001
|
+
* Parse IFC file with streaming instanced geometry batches for progressive rendering
|
|
1002
|
+
* Groups identical geometries and yields batches of InstancedGeometry
|
|
1003
|
+
* Uses fast-first-frame streaming: simple geometry (walls, slabs) first
|
|
1004
|
+
*
|
|
1005
|
+
* Example:
|
|
1006
|
+
* ```javascript
|
|
1007
|
+
* const api = new IfcAPI();
|
|
1008
|
+
* await api.parseMeshesInstancedAsync(ifcData, {
|
|
1009
|
+
* batchSize: 25, // Number of unique geometries per batch
|
|
1010
|
+
* onBatch: (geometries, progress) => {
|
|
1011
|
+
* for (const geom of geometries) {
|
|
1012
|
+
* renderer.addInstancedGeometry(geom);
|
|
1013
|
+
* }
|
|
1014
|
+
* },
|
|
1015
|
+
* onComplete: (stats) => {
|
|
1016
|
+
* console.log(`Done! ${stats.totalGeometries} unique geometries, ${stats.totalInstances} instances`);
|
|
1017
|
+
* }
|
|
1018
|
+
* });
|
|
1019
|
+
* ```
|
|
1020
|
+
* @param {string} content
|
|
1021
|
+
* @param {any} options
|
|
1022
|
+
* @returns {Promise<any>}
|
|
1023
|
+
*/
|
|
1024
|
+
parseMeshesInstancedAsync(content, options) {
|
|
1025
|
+
const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
|
|
1026
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1027
|
+
const ret = wasm.ifcapi_parseMeshesInstancedAsync(this.__wbg_ptr, ptr0, len0, addHeapObject(options));
|
|
1028
|
+
return takeObject(ret);
|
|
1029
|
+
}
|
|
1030
|
+
/**
|
|
1031
|
+
* Parse IFC file and return mesh with RTC offset for large coordinates
|
|
1032
|
+
* This handles georeferenced models by shifting to centroid
|
|
1033
|
+
*
|
|
1034
|
+
* Example:
|
|
1035
|
+
* ```javascript
|
|
1036
|
+
* const api = new IfcAPI();
|
|
1037
|
+
* const result = api.parseMeshesWithRtc(ifcData);
|
|
1038
|
+
* const rtcOffset = result.rtcOffset;
|
|
1039
|
+
* const meshes = result.meshes;
|
|
1040
|
+
*
|
|
1041
|
+
* // Convert local coords back to world:
|
|
1042
|
+
* if (rtcOffset.isSignificant()) {
|
|
1043
|
+
* const [wx, wy, wz] = rtcOffset.toWorld(localX, localY, localZ);
|
|
1044
|
+
* }
|
|
1045
|
+
* ```
|
|
1046
|
+
* @param {string} content
|
|
1047
|
+
* @returns {MeshCollectionWithRtc}
|
|
1048
|
+
*/
|
|
1049
|
+
parseMeshesWithRtc(content) {
|
|
1050
|
+
const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
|
|
1051
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1052
|
+
const ret = wasm.ifcapi_parseMeshesWithRtc(this.__wbg_ptr, ptr0, len0);
|
|
1053
|
+
return MeshCollectionWithRtc.__wrap(ret);
|
|
1054
|
+
}
|
|
1055
|
+
/**
|
|
1056
|
+
* Parse IFC file with streaming events
|
|
1057
|
+
* Calls the callback function for each parse event
|
|
1058
|
+
*
|
|
1059
|
+
* Example:
|
|
1060
|
+
* ```javascript
|
|
1061
|
+
* const api = new IfcAPI();
|
|
1062
|
+
* await api.parseStreaming(ifcData, (event) => {
|
|
1063
|
+
* console.log('Event:', event);
|
|
1064
|
+
* });
|
|
1065
|
+
* ```
|
|
1066
|
+
* @param {string} content
|
|
1067
|
+
* @param {Function} callback
|
|
1068
|
+
* @returns {Promise<any>}
|
|
1069
|
+
*/
|
|
1070
|
+
parseStreaming(content, callback) {
|
|
1071
|
+
const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
|
|
1072
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1073
|
+
const ret = wasm.ifcapi_parseStreaming(this.__wbg_ptr, ptr0, len0, addHeapObject(callback));
|
|
1074
|
+
return takeObject(ret);
|
|
1075
|
+
}
|
|
1076
|
+
/**
|
|
1077
|
+
* Parse IFC file and extract symbolic representations (Plan, Annotation, FootPrint)
|
|
1078
|
+
* These are 2D curves used for architectural drawings instead of sectioning 3D geometry
|
|
1079
|
+
*
|
|
1080
|
+
* Example:
|
|
1081
|
+
* ```javascript
|
|
1082
|
+
* const api = new IfcAPI();
|
|
1083
|
+
* const symbols = api.parseSymbolicRepresentations(ifcData);
|
|
1084
|
+
* console.log('Found', symbols.totalCount, 'symbolic items');
|
|
1085
|
+
* for (let i = 0; i < symbols.polylineCount; i++) {
|
|
1086
|
+
* const polyline = symbols.getPolyline(i);
|
|
1087
|
+
* console.log('Polyline for', polyline.ifcType, ':', polyline.points);
|
|
1088
|
+
* }
|
|
1089
|
+
* ```
|
|
1090
|
+
* @param {string} content
|
|
1091
|
+
* @returns {SymbolicRepresentationCollection}
|
|
1092
|
+
*/
|
|
1093
|
+
parseSymbolicRepresentations(content) {
|
|
1094
|
+
const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
|
|
1095
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1096
|
+
const ret = wasm.ifcapi_parseSymbolicRepresentations(this.__wbg_ptr, ptr0, len0);
|
|
1097
|
+
return SymbolicRepresentationCollection.__wrap(ret);
|
|
1098
|
+
}
|
|
1099
|
+
/**
|
|
1100
|
+
* Parse IFC file and return GPU-ready geometry for zero-copy upload
|
|
1101
|
+
*
|
|
1102
|
+
* This method generates geometry that is:
|
|
1103
|
+
* - Pre-interleaved (position + normal per vertex)
|
|
1104
|
+
* - Coordinate-converted (Z-up to Y-up)
|
|
1105
|
+
* - Ready for direct GPU upload via pointer access
|
|
1157
1106
|
*
|
|
1158
1107
|
* Example:
|
|
1159
1108
|
* ```javascript
|
|
@@ -1191,34 +1140,6 @@ export class IfcAPI {
|
|
|
1191
1140
|
const ret = wasm.ifcapi_parseToGpuGeometry(this.__wbg_ptr, ptr0, len0);
|
|
1192
1141
|
return GpuGeometry.__wrap(ret);
|
|
1193
1142
|
}
|
|
1194
|
-
/**
|
|
1195
|
-
* Parse IFC file and return instanced geometry grouped by geometry hash
|
|
1196
|
-
* This reduces draw calls by grouping identical geometries with different transforms
|
|
1197
|
-
*
|
|
1198
|
-
* Example:
|
|
1199
|
-
* ```javascript
|
|
1200
|
-
* const api = new IfcAPI();
|
|
1201
|
-
* const collection = api.parseMeshesInstanced(ifcData);
|
|
1202
|
-
* for (let i = 0; i < collection.length; i++) {
|
|
1203
|
-
* const geometry = collection.get(i);
|
|
1204
|
-
* console.log('Geometry ID:', geometry.geometryId);
|
|
1205
|
-
* console.log('Instances:', geometry.instanceCount);
|
|
1206
|
-
* for (let j = 0; j < geometry.instanceCount; j++) {
|
|
1207
|
-
* const inst = geometry.getInstance(j);
|
|
1208
|
-
* console.log(' Express ID:', inst.expressId);
|
|
1209
|
-
* console.log(' Transform:', inst.transform);
|
|
1210
|
-
* }
|
|
1211
|
-
* }
|
|
1212
|
-
* ```
|
|
1213
|
-
* @param {string} content
|
|
1214
|
-
* @returns {InstancedMeshCollection}
|
|
1215
|
-
*/
|
|
1216
|
-
parseMeshesInstanced(content) {
|
|
1217
|
-
const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
|
|
1218
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1219
|
-
const ret = wasm.ifcapi_parseMeshesInstanced(this.__wbg_ptr, ptr0, len0);
|
|
1220
|
-
return InstancedMeshCollection.__wrap(ret);
|
|
1221
|
-
}
|
|
1222
1143
|
/**
|
|
1223
1144
|
* Parse IFC file with streaming GPU-ready geometry batches
|
|
1224
1145
|
*
|
|
@@ -1261,36 +1182,6 @@ export class IfcAPI {
|
|
|
1261
1182
|
const ret = wasm.ifcapi_parseToGpuGeometryAsync(this.__wbg_ptr, ptr0, len0, addHeapObject(options));
|
|
1262
1183
|
return takeObject(ret);
|
|
1263
1184
|
}
|
|
1264
|
-
/**
|
|
1265
|
-
* Parse IFC file with streaming instanced geometry batches for progressive rendering
|
|
1266
|
-
* Groups identical geometries and yields batches of InstancedGeometry
|
|
1267
|
-
* Uses fast-first-frame streaming: simple geometry (walls, slabs) first
|
|
1268
|
-
*
|
|
1269
|
-
* Example:
|
|
1270
|
-
* ```javascript
|
|
1271
|
-
* const api = new IfcAPI();
|
|
1272
|
-
* await api.parseMeshesInstancedAsync(ifcData, {
|
|
1273
|
-
* batchSize: 25, // Number of unique geometries per batch
|
|
1274
|
-
* onBatch: (geometries, progress) => {
|
|
1275
|
-
* for (const geom of geometries) {
|
|
1276
|
-
* renderer.addInstancedGeometry(geom);
|
|
1277
|
-
* }
|
|
1278
|
-
* },
|
|
1279
|
-
* onComplete: (stats) => {
|
|
1280
|
-
* console.log(`Done! ${stats.totalGeometries} unique geometries, ${stats.totalInstances} instances`);
|
|
1281
|
-
* }
|
|
1282
|
-
* });
|
|
1283
|
-
* ```
|
|
1284
|
-
* @param {string} content
|
|
1285
|
-
* @param {any} options
|
|
1286
|
-
* @returns {Promise<any>}
|
|
1287
|
-
*/
|
|
1288
|
-
parseMeshesInstancedAsync(content, options) {
|
|
1289
|
-
const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
|
|
1290
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1291
|
-
const ret = wasm.ifcapi_parseMeshesInstancedAsync(this.__wbg_ptr, ptr0, len0, addHeapObject(options));
|
|
1292
|
-
return takeObject(ret);
|
|
1293
|
-
}
|
|
1294
1185
|
/**
|
|
1295
1186
|
* Parse IFC file to GPU-ready instanced geometry for zero-copy upload
|
|
1296
1187
|
*
|
|
@@ -1335,245 +1226,65 @@ export class IfcAPI {
|
|
|
1335
1226
|
return ZeroCopyMesh.__wrap(ret);
|
|
1336
1227
|
}
|
|
1337
1228
|
/**
|
|
1338
|
-
*
|
|
1229
|
+
* Fast entity scanning using SIMD-accelerated Rust scanner
|
|
1230
|
+
* Returns array of entity references for data model parsing
|
|
1231
|
+
* Much faster than TypeScript byte-by-byte scanning (5-10x speedup)
|
|
1232
|
+
* @param {string} content
|
|
1233
|
+
* @returns {any}
|
|
1234
|
+
*/
|
|
1235
|
+
scanEntitiesFast(content) {
|
|
1236
|
+
const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
|
|
1237
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1238
|
+
const ret = wasm.ifcapi_scanEntitiesFast(this.__wbg_ptr, ptr0, len0);
|
|
1239
|
+
return takeObject(ret);
|
|
1240
|
+
}
|
|
1241
|
+
/**
|
|
1242
|
+
* Fast entity scanning from raw bytes (avoids TextDecoder.decode on JS side).
|
|
1243
|
+
* Accepts Uint8Array directly — saves ~2-5s for 487MB files by skipping
|
|
1244
|
+
* JS string creation and UTF-16→UTF-8 conversion.
|
|
1245
|
+
* @param {Uint8Array} data
|
|
1246
|
+
* @returns {any}
|
|
1247
|
+
*/
|
|
1248
|
+
scanEntitiesFastBytes(data) {
|
|
1249
|
+
const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_export3);
|
|
1250
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1251
|
+
const ret = wasm.ifcapi_scanEntitiesFastBytes(this.__wbg_ptr, ptr0, len0);
|
|
1252
|
+
return takeObject(ret);
|
|
1253
|
+
}
|
|
1254
|
+
/**
|
|
1255
|
+
* Fast geometry-only entity scanning
|
|
1256
|
+
* Scans only entities that have geometry, skipping 99% of non-geometry entities
|
|
1257
|
+
* Returns array of geometry entity references for parallel processing
|
|
1258
|
+
* Much faster than scanning all entities (3x speedup for large files)
|
|
1339
1259
|
* @param {string} content
|
|
1260
|
+
* @returns {any}
|
|
1261
|
+
*/
|
|
1262
|
+
scanGeometryEntitiesFast(content) {
|
|
1263
|
+
const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
|
|
1264
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1265
|
+
const ret = wasm.ifcapi_scanGeometryEntitiesFast(this.__wbg_ptr, ptr0, len0);
|
|
1266
|
+
return takeObject(ret);
|
|
1267
|
+
}
|
|
1268
|
+
/**
|
|
1269
|
+
* Get version string
|
|
1340
1270
|
* @returns {string}
|
|
1341
1271
|
*/
|
|
1342
|
-
|
|
1343
|
-
let
|
|
1344
|
-
let
|
|
1272
|
+
get version() {
|
|
1273
|
+
let deferred1_0;
|
|
1274
|
+
let deferred1_1;
|
|
1345
1275
|
try {
|
|
1346
1276
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1347
|
-
|
|
1348
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1349
|
-
wasm.ifcapi_debugProcessEntity953(retptr, this.__wbg_ptr, ptr0, len0);
|
|
1277
|
+
wasm.ifcapi_version(retptr, this.__wbg_ptr);
|
|
1350
1278
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1351
1279
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1352
|
-
|
|
1353
|
-
|
|
1280
|
+
deferred1_0 = r0;
|
|
1281
|
+
deferred1_1 = r1;
|
|
1354
1282
|
return getStringFromWasm0(r0, r1);
|
|
1355
1283
|
} finally {
|
|
1356
1284
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1357
|
-
wasm.__wbindgen_export2(
|
|
1285
|
+
wasm.__wbindgen_export2(deferred1_0, deferred1_1, 1);
|
|
1358
1286
|
}
|
|
1359
1287
|
}
|
|
1360
|
-
/**
|
|
1361
|
-
* Debug: Test processing a single wall
|
|
1362
|
-
* @param {string} content
|
|
1363
|
-
* @returns {string}
|
|
1364
|
-
*/
|
|
1365
|
-
debugProcessFirstWall(content) {
|
|
1366
|
-
let deferred2_0;
|
|
1367
|
-
let deferred2_1;
|
|
1368
|
-
try {
|
|
1369
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1370
|
-
const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
|
|
1371
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1372
|
-
wasm.ifcapi_debugProcessFirstWall(retptr, this.__wbg_ptr, ptr0, len0);
|
|
1373
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1374
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1375
|
-
deferred2_0 = r0;
|
|
1376
|
-
deferred2_1 = r1;
|
|
1377
|
-
return getStringFromWasm0(r0, r1);
|
|
1378
|
-
} finally {
|
|
1379
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1380
|
-
wasm.__wbindgen_export2(deferred2_0, deferred2_1, 1);
|
|
1381
|
-
}
|
|
1382
|
-
}
|
|
1383
|
-
/**
|
|
1384
|
-
* Extract georeferencing information from IFC content
|
|
1385
|
-
* Returns null if no georeferencing is present
|
|
1386
|
-
*
|
|
1387
|
-
* Example:
|
|
1388
|
-
* ```javascript
|
|
1389
|
-
* const api = new IfcAPI();
|
|
1390
|
-
* const georef = api.getGeoReference(ifcData);
|
|
1391
|
-
* if (georef) {
|
|
1392
|
-
* console.log('CRS:', georef.crsName);
|
|
1393
|
-
* const [e, n, h] = georef.localToMap(10, 20, 5);
|
|
1394
|
-
* }
|
|
1395
|
-
* ```
|
|
1396
|
-
* @param {string} content
|
|
1397
|
-
* @returns {GeoReferenceJs | undefined}
|
|
1398
|
-
*/
|
|
1399
|
-
getGeoReference(content) {
|
|
1400
|
-
const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
|
|
1401
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1402
|
-
const ret = wasm.ifcapi_getGeoReference(this.__wbg_ptr, ptr0, len0);
|
|
1403
|
-
return ret === 0 ? undefined : GeoReferenceJs.__wrap(ret);
|
|
1404
|
-
}
|
|
1405
|
-
/**
|
|
1406
|
-
* Parse IFC file and return mesh with RTC offset for large coordinates
|
|
1407
|
-
* This handles georeferenced models by shifting to centroid
|
|
1408
|
-
*
|
|
1409
|
-
* Example:
|
|
1410
|
-
* ```javascript
|
|
1411
|
-
* const api = new IfcAPI();
|
|
1412
|
-
* const result = api.parseMeshesWithRtc(ifcData);
|
|
1413
|
-
* const rtcOffset = result.rtcOffset;
|
|
1414
|
-
* const meshes = result.meshes;
|
|
1415
|
-
*
|
|
1416
|
-
* // Convert local coords back to world:
|
|
1417
|
-
* if (rtcOffset.isSignificant()) {
|
|
1418
|
-
* const [wx, wy, wz] = rtcOffset.toWorld(localX, localY, localZ);
|
|
1419
|
-
* }
|
|
1420
|
-
* ```
|
|
1421
|
-
* @param {string} content
|
|
1422
|
-
* @returns {MeshCollectionWithRtc}
|
|
1423
|
-
*/
|
|
1424
|
-
parseMeshesWithRtc(content) {
|
|
1425
|
-
const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
|
|
1426
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1427
|
-
const ret = wasm.ifcapi_parseMeshesWithRtc(this.__wbg_ptr, ptr0, len0);
|
|
1428
|
-
return MeshCollectionWithRtc.__wrap(ret);
|
|
1429
|
-
}
|
|
1430
|
-
/**
|
|
1431
|
-
* Parse IFC file with streaming events
|
|
1432
|
-
* Calls the callback function for each parse event
|
|
1433
|
-
*
|
|
1434
|
-
* Example:
|
|
1435
|
-
* ```javascript
|
|
1436
|
-
* const api = new IfcAPI();
|
|
1437
|
-
* await api.parseStreaming(ifcData, (event) => {
|
|
1438
|
-
* console.log('Event:', event);
|
|
1439
|
-
* });
|
|
1440
|
-
* ```
|
|
1441
|
-
* @param {string} content
|
|
1442
|
-
* @param {Function} callback
|
|
1443
|
-
* @returns {Promise<any>}
|
|
1444
|
-
*/
|
|
1445
|
-
parseStreaming(content, callback) {
|
|
1446
|
-
const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
|
|
1447
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1448
|
-
const ret = wasm.ifcapi_parseStreaming(this.__wbg_ptr, ptr0, len0, addHeapObject(callback));
|
|
1449
|
-
return takeObject(ret);
|
|
1450
|
-
}
|
|
1451
|
-
/**
|
|
1452
|
-
* Fast entity scanning using SIMD-accelerated Rust scanner
|
|
1453
|
-
* Returns array of entity references for data model parsing
|
|
1454
|
-
* Much faster than TypeScript byte-by-byte scanning (5-10x speedup)
|
|
1455
|
-
* @param {string} content
|
|
1456
|
-
* @returns {any}
|
|
1457
|
-
*/
|
|
1458
|
-
scanEntitiesFast(content) {
|
|
1459
|
-
const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
|
|
1460
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1461
|
-
const ret = wasm.ifcapi_scanEntitiesFast(this.__wbg_ptr, ptr0, len0);
|
|
1462
|
-
return takeObject(ret);
|
|
1463
|
-
}
|
|
1464
|
-
/**
|
|
1465
|
-
* Fast entity scanning from raw bytes (avoids TextDecoder.decode on JS side).
|
|
1466
|
-
* Accepts Uint8Array directly — saves ~2-5s for 487MB files by skipping
|
|
1467
|
-
* JS string creation and UTF-16→UTF-8 conversion.
|
|
1468
|
-
* @param {Uint8Array} data
|
|
1469
|
-
* @returns {any}
|
|
1470
|
-
*/
|
|
1471
|
-
scanEntitiesFastBytes(data) {
|
|
1472
|
-
const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_export3);
|
|
1473
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1474
|
-
const ret = wasm.ifcapi_scanEntitiesFastBytes(this.__wbg_ptr, ptr0, len0);
|
|
1475
|
-
return takeObject(ret);
|
|
1476
|
-
}
|
|
1477
|
-
/**
|
|
1478
|
-
* Fast geometry-only entity scanning
|
|
1479
|
-
* Scans only entities that have geometry, skipping 99% of non-geometry entities
|
|
1480
|
-
* Returns array of geometry entity references for parallel processing
|
|
1481
|
-
* Much faster than scanning all entities (3x speedup for large files)
|
|
1482
|
-
* @param {string} content
|
|
1483
|
-
* @returns {any}
|
|
1484
|
-
*/
|
|
1485
|
-
scanGeometryEntitiesFast(content) {
|
|
1486
|
-
const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
|
|
1487
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1488
|
-
const ret = wasm.ifcapi_scanGeometryEntitiesFast(this.__wbg_ptr, ptr0, len0);
|
|
1489
|
-
return takeObject(ret);
|
|
1490
|
-
}
|
|
1491
|
-
/**
|
|
1492
|
-
* Parse IFC file (traditional - waits for completion)
|
|
1493
|
-
*
|
|
1494
|
-
* Example:
|
|
1495
|
-
* ```javascript
|
|
1496
|
-
* const api = new IfcAPI();
|
|
1497
|
-
* const result = await api.parse(ifcData);
|
|
1498
|
-
* console.log('Entities:', result.entityCount);
|
|
1499
|
-
* ```
|
|
1500
|
-
* @param {string} content
|
|
1501
|
-
* @returns {Promise<any>}
|
|
1502
|
-
*/
|
|
1503
|
-
parse(content) {
|
|
1504
|
-
const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
|
|
1505
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1506
|
-
const ret = wasm.ifcapi_parse(this.__wbg_ptr, ptr0, len0);
|
|
1507
|
-
return takeObject(ret);
|
|
1508
|
-
}
|
|
1509
|
-
/**
|
|
1510
|
-
* Get WASM memory for zero-copy access
|
|
1511
|
-
* @returns {any}
|
|
1512
|
-
*/
|
|
1513
|
-
getMemory() {
|
|
1514
|
-
const ret = wasm.ifcapi_getMemory(this.__wbg_ptr);
|
|
1515
|
-
return takeObject(ret);
|
|
1516
|
-
}
|
|
1517
|
-
/**
|
|
1518
|
-
* Create and initialize the IFC API
|
|
1519
|
-
*/
|
|
1520
|
-
constructor() {
|
|
1521
|
-
const ret = wasm.ifcapi_new();
|
|
1522
|
-
this.__wbg_ptr = ret >>> 0;
|
|
1523
|
-
IfcAPIFinalization.register(this, this.__wbg_ptr, this);
|
|
1524
|
-
return this;
|
|
1525
|
-
}
|
|
1526
|
-
/**
|
|
1527
|
-
* Get version string
|
|
1528
|
-
* @returns {string}
|
|
1529
|
-
*/
|
|
1530
|
-
get version() {
|
|
1531
|
-
let deferred1_0;
|
|
1532
|
-
let deferred1_1;
|
|
1533
|
-
try {
|
|
1534
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1535
|
-
wasm.ifcapi_version(retptr, this.__wbg_ptr);
|
|
1536
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1537
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1538
|
-
deferred1_0 = r0;
|
|
1539
|
-
deferred1_1 = r1;
|
|
1540
|
-
return getStringFromWasm0(r0, r1);
|
|
1541
|
-
} finally {
|
|
1542
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1543
|
-
wasm.__wbindgen_export2(deferred1_0, deferred1_1, 1);
|
|
1544
|
-
}
|
|
1545
|
-
}
|
|
1546
|
-
/**
|
|
1547
|
-
* Check if API is initialized
|
|
1548
|
-
* @returns {boolean}
|
|
1549
|
-
*/
|
|
1550
|
-
get is_ready() {
|
|
1551
|
-
const ret = wasm.ifcapi_is_ready(this.__wbg_ptr);
|
|
1552
|
-
return ret !== 0;
|
|
1553
|
-
}
|
|
1554
|
-
/**
|
|
1555
|
-
* Parse IFC file and extract symbolic representations (Plan, Annotation, FootPrint)
|
|
1556
|
-
* These are 2D curves used for architectural drawings instead of sectioning 3D geometry
|
|
1557
|
-
*
|
|
1558
|
-
* Example:
|
|
1559
|
-
* ```javascript
|
|
1560
|
-
* const api = new IfcAPI();
|
|
1561
|
-
* const symbols = api.parseSymbolicRepresentations(ifcData);
|
|
1562
|
-
* console.log('Found', symbols.totalCount, 'symbolic items');
|
|
1563
|
-
* for (let i = 0; i < symbols.polylineCount; i++) {
|
|
1564
|
-
* const polyline = symbols.getPolyline(i);
|
|
1565
|
-
* console.log('Polyline for', polyline.ifcType, ':', polyline.points);
|
|
1566
|
-
* }
|
|
1567
|
-
* ```
|
|
1568
|
-
* @param {string} content
|
|
1569
|
-
* @returns {SymbolicRepresentationCollection}
|
|
1570
|
-
*/
|
|
1571
|
-
parseSymbolicRepresentations(content) {
|
|
1572
|
-
const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
|
|
1573
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1574
|
-
const ret = wasm.ifcapi_parseSymbolicRepresentations(this.__wbg_ptr, ptr0, len0);
|
|
1575
|
-
return SymbolicRepresentationCollection.__wrap(ret);
|
|
1576
|
-
}
|
|
1577
1288
|
}
|
|
1578
1289
|
if (Symbol.dispose) IfcAPI.prototype[Symbol.dispose] = IfcAPI.prototype.free;
|
|
1579
1290
|
|
|
@@ -1598,13 +1309,6 @@ export class InstanceData {
|
|
|
1598
1309
|
const ptr = this.__destroy_into_raw();
|
|
1599
1310
|
wasm.__wbg_instancedata_free(ptr, 0);
|
|
1600
1311
|
}
|
|
1601
|
-
/**
|
|
1602
|
-
* @returns {number}
|
|
1603
|
-
*/
|
|
1604
|
-
get expressId() {
|
|
1605
|
-
const ret = wasm.instancedata_expressId(this.__wbg_ptr);
|
|
1606
|
-
return ret >>> 0;
|
|
1607
|
-
}
|
|
1608
1312
|
/**
|
|
1609
1313
|
* @returns {Float32Array}
|
|
1610
1314
|
*/
|
|
@@ -1621,6 +1325,13 @@ export class InstanceData {
|
|
|
1621
1325
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1622
1326
|
}
|
|
1623
1327
|
}
|
|
1328
|
+
/**
|
|
1329
|
+
* @returns {number}
|
|
1330
|
+
*/
|
|
1331
|
+
get expressId() {
|
|
1332
|
+
const ret = wasm.instancedata_expressId(this.__wbg_ptr);
|
|
1333
|
+
return ret >>> 0;
|
|
1334
|
+
}
|
|
1624
1335
|
/**
|
|
1625
1336
|
* @returns {Float32Array}
|
|
1626
1337
|
*/
|
|
@@ -1656,7 +1367,7 @@ export class InstancedGeometry {
|
|
|
1656
1367
|
* @returns {bigint}
|
|
1657
1368
|
*/
|
|
1658
1369
|
get geometryId() {
|
|
1659
|
-
const ret = wasm.
|
|
1370
|
+
const ret = wasm.instancedgeometry_geometryId(this.__wbg_ptr);
|
|
1660
1371
|
return BigInt.asUintN(64, ret);
|
|
1661
1372
|
}
|
|
1662
1373
|
/**
|
|
@@ -1667,13 +1378,6 @@ export class InstancedGeometry {
|
|
|
1667
1378
|
const ret = wasm.instancedgeometry_get_instance(this.__wbg_ptr, index);
|
|
1668
1379
|
return ret === 0 ? undefined : InstanceData.__wrap(ret);
|
|
1669
1380
|
}
|
|
1670
|
-
/**
|
|
1671
|
-
* @returns {number}
|
|
1672
|
-
*/
|
|
1673
|
-
get instance_count() {
|
|
1674
|
-
const ret = wasm.instancedgeometry_instance_count(this.__wbg_ptr);
|
|
1675
|
-
return ret >>> 0;
|
|
1676
|
-
}
|
|
1677
1381
|
/**
|
|
1678
1382
|
* @returns {Uint32Array}
|
|
1679
1383
|
*/
|
|
@@ -1681,6 +1385,13 @@ export class InstancedGeometry {
|
|
|
1681
1385
|
const ret = wasm.instancedgeometry_indices(this.__wbg_ptr);
|
|
1682
1386
|
return takeObject(ret);
|
|
1683
1387
|
}
|
|
1388
|
+
/**
|
|
1389
|
+
* @returns {number}
|
|
1390
|
+
*/
|
|
1391
|
+
get instance_count() {
|
|
1392
|
+
const ret = wasm.instancedgeometry_instance_count(this.__wbg_ptr);
|
|
1393
|
+
return ret >>> 0;
|
|
1394
|
+
}
|
|
1684
1395
|
/**
|
|
1685
1396
|
* @returns {Float32Array}
|
|
1686
1397
|
*/
|
|
@@ -1719,20 +1430,6 @@ export class InstancedMeshCollection {
|
|
|
1719
1430
|
const ptr = this.__destroy_into_raw();
|
|
1720
1431
|
wasm.__wbg_instancedmeshcollection_free(ptr, 0);
|
|
1721
1432
|
}
|
|
1722
|
-
/**
|
|
1723
|
-
* @returns {number}
|
|
1724
|
-
*/
|
|
1725
|
-
get totalInstances() {
|
|
1726
|
-
const ret = wasm.instancedmeshcollection_totalInstances(this.__wbg_ptr);
|
|
1727
|
-
return ret >>> 0;
|
|
1728
|
-
}
|
|
1729
|
-
/**
|
|
1730
|
-
* @returns {number}
|
|
1731
|
-
*/
|
|
1732
|
-
get totalGeometries() {
|
|
1733
|
-
const ret = wasm.gpuinstancedgeometrycollection_length(this.__wbg_ptr);
|
|
1734
|
-
return ret >>> 0;
|
|
1735
|
-
}
|
|
1736
1433
|
/**
|
|
1737
1434
|
* @param {number} index
|
|
1738
1435
|
* @returns {InstancedGeometry | undefined}
|
|
@@ -1745,14 +1442,28 @@ export class InstancedMeshCollection {
|
|
|
1745
1442
|
* @returns {number}
|
|
1746
1443
|
*/
|
|
1747
1444
|
get length() {
|
|
1748
|
-
const ret = wasm.
|
|
1445
|
+
const ret = wasm.instancedmeshcollection_length(this.__wbg_ptr);
|
|
1749
1446
|
return ret >>> 0;
|
|
1750
1447
|
}
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1448
|
+
/**
|
|
1449
|
+
* @returns {number}
|
|
1450
|
+
*/
|
|
1451
|
+
get totalGeometries() {
|
|
1452
|
+
const ret = wasm.instancedmeshcollection_totalGeometries(this.__wbg_ptr);
|
|
1453
|
+
return ret >>> 0;
|
|
1454
|
+
}
|
|
1455
|
+
/**
|
|
1456
|
+
* @returns {number}
|
|
1457
|
+
*/
|
|
1458
|
+
get totalInstances() {
|
|
1459
|
+
const ret = wasm.instancedmeshcollection_totalInstances(this.__wbg_ptr);
|
|
1460
|
+
return ret >>> 0;
|
|
1461
|
+
}
|
|
1462
|
+
}
|
|
1463
|
+
if (Symbol.dispose) InstancedMeshCollection.prototype[Symbol.dispose] = InstancedMeshCollection.prototype.free;
|
|
1464
|
+
|
|
1465
|
+
/**
|
|
1466
|
+
* Collection of mesh data for returning multiple meshes
|
|
1756
1467
|
*/
|
|
1757
1468
|
export class MeshCollection {
|
|
1758
1469
|
static __wrap(ptr) {
|
|
@@ -1773,29 +1484,29 @@ export class MeshCollection {
|
|
|
1773
1484
|
wasm.__wbg_meshcollection_free(ptr, 0);
|
|
1774
1485
|
}
|
|
1775
1486
|
/**
|
|
1776
|
-
* Get
|
|
1777
|
-
*
|
|
1778
|
-
* @returns {number}
|
|
1779
|
-
*/
|
|
1780
|
-
get rtcOffsetX() {
|
|
1781
|
-
const ret = wasm.gpugeometry_rtcOffsetZ(this.__wbg_ptr);
|
|
1782
|
-
return ret;
|
|
1783
|
-
}
|
|
1784
|
-
/**
|
|
1785
|
-
* Get RTC offset Y
|
|
1786
|
-
* @returns {number}
|
|
1487
|
+
* Get building rotation angle in radians (from IfcSite placement)
|
|
1488
|
+
* Returns None if no rotation was detected
|
|
1489
|
+
* @returns {number | undefined}
|
|
1787
1490
|
*/
|
|
1788
|
-
get
|
|
1789
|
-
|
|
1790
|
-
|
|
1491
|
+
get buildingRotation() {
|
|
1492
|
+
try {
|
|
1493
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1494
|
+
wasm.meshcollection_buildingRotation(retptr, this.__wbg_ptr);
|
|
1495
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1496
|
+
var r2 = getDataViewMemory0().getFloat64(retptr + 8 * 1, true);
|
|
1497
|
+
return r0 === 0 ? undefined : r2;
|
|
1498
|
+
} finally {
|
|
1499
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1500
|
+
}
|
|
1791
1501
|
}
|
|
1792
1502
|
/**
|
|
1793
|
-
* Get
|
|
1794
|
-
* @
|
|
1503
|
+
* Get mesh at index
|
|
1504
|
+
* @param {number} index
|
|
1505
|
+
* @returns {MeshDataJs | undefined}
|
|
1795
1506
|
*/
|
|
1796
|
-
get
|
|
1797
|
-
const ret = wasm.
|
|
1798
|
-
return ret;
|
|
1507
|
+
get(index) {
|
|
1508
|
+
const ret = wasm.meshcollection_get(this.__wbg_ptr, index);
|
|
1509
|
+
return ret === 0 ? undefined : MeshDataJs.__wrap(ret);
|
|
1799
1510
|
}
|
|
1800
1511
|
/**
|
|
1801
1512
|
* Check if RTC offset is significant (>10km)
|
|
@@ -1805,6 +1516,14 @@ export class MeshCollection {
|
|
|
1805
1516
|
const ret = wasm.meshcollection_hasRtcOffset(this.__wbg_ptr);
|
|
1806
1517
|
return ret !== 0;
|
|
1807
1518
|
}
|
|
1519
|
+
/**
|
|
1520
|
+
* Get number of meshes
|
|
1521
|
+
* @returns {number}
|
|
1522
|
+
*/
|
|
1523
|
+
get length() {
|
|
1524
|
+
const ret = wasm.meshcollection_length(this.__wbg_ptr);
|
|
1525
|
+
return ret >>> 0;
|
|
1526
|
+
}
|
|
1808
1527
|
/**
|
|
1809
1528
|
* Convert local coordinates to world coordinates
|
|
1810
1529
|
* Use this to convert mesh positions back to original IFC coordinates
|
|
@@ -1827,52 +1546,44 @@ export class MeshCollection {
|
|
|
1827
1546
|
}
|
|
1828
1547
|
}
|
|
1829
1548
|
/**
|
|
1830
|
-
* Get
|
|
1549
|
+
* Get RTC offset X (for converting local coords back to world coords)
|
|
1550
|
+
* Add this to local X coordinates to get world X coordinates
|
|
1831
1551
|
* @returns {number}
|
|
1832
1552
|
*/
|
|
1833
|
-
get
|
|
1834
|
-
const ret = wasm.
|
|
1835
|
-
return ret
|
|
1553
|
+
get rtcOffsetX() {
|
|
1554
|
+
const ret = wasm.meshcollection_rtcOffsetX(this.__wbg_ptr);
|
|
1555
|
+
return ret;
|
|
1836
1556
|
}
|
|
1837
1557
|
/**
|
|
1838
|
-
* Get
|
|
1558
|
+
* Get RTC offset Y
|
|
1839
1559
|
* @returns {number}
|
|
1840
1560
|
*/
|
|
1841
|
-
get
|
|
1842
|
-
const ret = wasm.
|
|
1843
|
-
return ret
|
|
1561
|
+
get rtcOffsetY() {
|
|
1562
|
+
const ret = wasm.meshcollection_rtcOffsetY(this.__wbg_ptr);
|
|
1563
|
+
return ret;
|
|
1844
1564
|
}
|
|
1845
1565
|
/**
|
|
1846
|
-
* Get
|
|
1847
|
-
*
|
|
1848
|
-
* @returns {number | undefined}
|
|
1566
|
+
* Get RTC offset Z
|
|
1567
|
+
* @returns {number}
|
|
1849
1568
|
*/
|
|
1850
|
-
get
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
wasm.meshcollection_buildingRotation(retptr, this.__wbg_ptr);
|
|
1854
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1855
|
-
var r2 = getDataViewMemory0().getFloat64(retptr + 8 * 1, true);
|
|
1856
|
-
return r0 === 0 ? undefined : r2;
|
|
1857
|
-
} finally {
|
|
1858
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1859
|
-
}
|
|
1569
|
+
get rtcOffsetZ() {
|
|
1570
|
+
const ret = wasm.meshcollection_rtcOffsetZ(this.__wbg_ptr);
|
|
1571
|
+
return ret;
|
|
1860
1572
|
}
|
|
1861
1573
|
/**
|
|
1862
|
-
* Get
|
|
1863
|
-
* @
|
|
1864
|
-
* @returns {MeshDataJs | undefined}
|
|
1574
|
+
* Get total triangle count across all meshes
|
|
1575
|
+
* @returns {number}
|
|
1865
1576
|
*/
|
|
1866
|
-
get(
|
|
1867
|
-
const ret = wasm.
|
|
1868
|
-
return ret
|
|
1577
|
+
get totalTriangles() {
|
|
1578
|
+
const ret = wasm.meshcollection_totalTriangles(this.__wbg_ptr);
|
|
1579
|
+
return ret >>> 0;
|
|
1869
1580
|
}
|
|
1870
1581
|
/**
|
|
1871
|
-
* Get
|
|
1582
|
+
* Get total vertex count across all meshes
|
|
1872
1583
|
* @returns {number}
|
|
1873
1584
|
*/
|
|
1874
|
-
get
|
|
1875
|
-
const ret = wasm.
|
|
1585
|
+
get totalVertices() {
|
|
1586
|
+
const ret = wasm.meshcollection_totalVertices(this.__wbg_ptr);
|
|
1876
1587
|
return ret >>> 0;
|
|
1877
1588
|
}
|
|
1878
1589
|
}
|
|
@@ -1899,14 +1610,6 @@ export class MeshCollectionWithRtc {
|
|
|
1899
1610
|
const ptr = this.__destroy_into_raw();
|
|
1900
1611
|
wasm.__wbg_meshcollectionwithrtc_free(ptr, 0);
|
|
1901
1612
|
}
|
|
1902
|
-
/**
|
|
1903
|
-
* Get the RTC offset
|
|
1904
|
-
* @returns {RtcOffsetJs}
|
|
1905
|
-
*/
|
|
1906
|
-
get rtcOffset() {
|
|
1907
|
-
const ret = wasm.meshcollectionwithrtc_rtcOffset(this.__wbg_ptr);
|
|
1908
|
-
return RtcOffsetJs.__wrap(ret);
|
|
1909
|
-
}
|
|
1910
1613
|
/**
|
|
1911
1614
|
* Get mesh at index
|
|
1912
1615
|
* @param {number} index
|
|
@@ -1921,7 +1624,7 @@ export class MeshCollectionWithRtc {
|
|
|
1921
1624
|
* @returns {number}
|
|
1922
1625
|
*/
|
|
1923
1626
|
get length() {
|
|
1924
|
-
const ret = wasm.
|
|
1627
|
+
const ret = wasm.meshcollectionwithrtc_length(this.__wbg_ptr);
|
|
1925
1628
|
return ret >>> 0;
|
|
1926
1629
|
}
|
|
1927
1630
|
/**
|
|
@@ -1932,6 +1635,14 @@ export class MeshCollectionWithRtc {
|
|
|
1932
1635
|
const ret = wasm.meshcollectionwithrtc_meshes(this.__wbg_ptr);
|
|
1933
1636
|
return MeshCollection.__wrap(ret);
|
|
1934
1637
|
}
|
|
1638
|
+
/**
|
|
1639
|
+
* Get the RTC offset
|
|
1640
|
+
* @returns {RtcOffsetJs}
|
|
1641
|
+
*/
|
|
1642
|
+
get rtcOffset() {
|
|
1643
|
+
const ret = wasm.meshcollectionwithrtc_rtcOffset(this.__wbg_ptr);
|
|
1644
|
+
return RtcOffsetJs.__wrap(ret);
|
|
1645
|
+
}
|
|
1935
1646
|
}
|
|
1936
1647
|
if (Symbol.dispose) MeshCollectionWithRtc.prototype[Symbol.dispose] = MeshCollectionWithRtc.prototype.free;
|
|
1937
1648
|
|
|
@@ -1956,30 +1667,6 @@ export class MeshDataJs {
|
|
|
1956
1667
|
const ptr = this.__destroy_into_raw();
|
|
1957
1668
|
wasm.__wbg_meshdatajs_free(ptr, 0);
|
|
1958
1669
|
}
|
|
1959
|
-
/**
|
|
1960
|
-
* Get express ID
|
|
1961
|
-
* @returns {number}
|
|
1962
|
-
*/
|
|
1963
|
-
get expressId() {
|
|
1964
|
-
const ret = wasm.meshdatajs_expressId(this.__wbg_ptr);
|
|
1965
|
-
return ret >>> 0;
|
|
1966
|
-
}
|
|
1967
|
-
/**
|
|
1968
|
-
* Get vertex count
|
|
1969
|
-
* @returns {number}
|
|
1970
|
-
*/
|
|
1971
|
-
get vertexCount() {
|
|
1972
|
-
const ret = wasm.meshdatajs_vertexCount(this.__wbg_ptr);
|
|
1973
|
-
return ret >>> 0;
|
|
1974
|
-
}
|
|
1975
|
-
/**
|
|
1976
|
-
* Get triangle count
|
|
1977
|
-
* @returns {number}
|
|
1978
|
-
*/
|
|
1979
|
-
get triangleCount() {
|
|
1980
|
-
const ret = wasm.meshdatajs_triangleCount(this.__wbg_ptr);
|
|
1981
|
-
return ret >>> 0;
|
|
1982
|
-
}
|
|
1983
1670
|
/**
|
|
1984
1671
|
* Get color as [r, g, b, a] array
|
|
1985
1672
|
* @returns {Float32Array}
|
|
@@ -1998,20 +1685,12 @@ export class MeshDataJs {
|
|
|
1998
1685
|
}
|
|
1999
1686
|
}
|
|
2000
1687
|
/**
|
|
2001
|
-
* Get
|
|
2002
|
-
* @returns {
|
|
2003
|
-
*/
|
|
2004
|
-
get indices() {
|
|
2005
|
-
const ret = wasm.meshdatajs_indices(this.__wbg_ptr);
|
|
2006
|
-
return takeObject(ret);
|
|
2007
|
-
}
|
|
2008
|
-
/**
|
|
2009
|
-
* Get normals as Float32Array (copy to JS)
|
|
2010
|
-
* @returns {Float32Array}
|
|
1688
|
+
* Get express ID
|
|
1689
|
+
* @returns {number}
|
|
2011
1690
|
*/
|
|
2012
|
-
get
|
|
2013
|
-
const ret = wasm.
|
|
2014
|
-
return
|
|
1691
|
+
get expressId() {
|
|
1692
|
+
const ret = wasm.meshdatajs_expressId(this.__wbg_ptr);
|
|
1693
|
+
return ret >>> 0;
|
|
2015
1694
|
}
|
|
2016
1695
|
/**
|
|
2017
1696
|
* Get IFC type name (e.g., "IfcWall", "IfcSpace")
|
|
@@ -2033,6 +1712,22 @@ export class MeshDataJs {
|
|
|
2033
1712
|
wasm.__wbindgen_export2(deferred1_0, deferred1_1, 1);
|
|
2034
1713
|
}
|
|
2035
1714
|
}
|
|
1715
|
+
/**
|
|
1716
|
+
* Get indices as Uint32Array (copy to JS)
|
|
1717
|
+
* @returns {Uint32Array}
|
|
1718
|
+
*/
|
|
1719
|
+
get indices() {
|
|
1720
|
+
const ret = wasm.meshdatajs_indices(this.__wbg_ptr);
|
|
1721
|
+
return takeObject(ret);
|
|
1722
|
+
}
|
|
1723
|
+
/**
|
|
1724
|
+
* Get normals as Float32Array (copy to JS)
|
|
1725
|
+
* @returns {Float32Array}
|
|
1726
|
+
*/
|
|
1727
|
+
get normals() {
|
|
1728
|
+
const ret = wasm.meshdatajs_normals(this.__wbg_ptr);
|
|
1729
|
+
return takeObject(ret);
|
|
1730
|
+
}
|
|
2036
1731
|
/**
|
|
2037
1732
|
* Get positions as Float32Array (copy to JS)
|
|
2038
1733
|
* @returns {Float32Array}
|
|
@@ -2041,6 +1736,22 @@ export class MeshDataJs {
|
|
|
2041
1736
|
const ret = wasm.meshdatajs_positions(this.__wbg_ptr);
|
|
2042
1737
|
return takeObject(ret);
|
|
2043
1738
|
}
|
|
1739
|
+
/**
|
|
1740
|
+
* Get triangle count
|
|
1741
|
+
* @returns {number}
|
|
1742
|
+
*/
|
|
1743
|
+
get triangleCount() {
|
|
1744
|
+
const ret = wasm.meshdatajs_triangleCount(this.__wbg_ptr);
|
|
1745
|
+
return ret >>> 0;
|
|
1746
|
+
}
|
|
1747
|
+
/**
|
|
1748
|
+
* Get vertex count
|
|
1749
|
+
* @returns {number}
|
|
1750
|
+
*/
|
|
1751
|
+
get vertexCount() {
|
|
1752
|
+
const ret = wasm.meshdatajs_vertexCount(this.__wbg_ptr);
|
|
1753
|
+
return ret >>> 0;
|
|
1754
|
+
}
|
|
2044
1755
|
}
|
|
2045
1756
|
if (Symbol.dispose) MeshDataJs.prototype[Symbol.dispose] = MeshDataJs.prototype.free;
|
|
2046
1757
|
|
|
@@ -2070,46 +1781,25 @@ export class RtcOffsetJs {
|
|
|
2070
1781
|
* @returns {number}
|
|
2071
1782
|
*/
|
|
2072
1783
|
get x() {
|
|
2073
|
-
const ret = wasm.
|
|
1784
|
+
const ret = wasm.__wbg_get_rtcoffsetjs_x(this.__wbg_ptr);
|
|
2074
1785
|
return ret;
|
|
2075
1786
|
}
|
|
2076
|
-
/**
|
|
2077
|
-
* X offset (subtracted from positions)
|
|
2078
|
-
* @param {number} arg0
|
|
2079
|
-
*/
|
|
2080
|
-
set x(arg0) {
|
|
2081
|
-
wasm.__wbg_set_georeferencejs_eastings(this.__wbg_ptr, arg0);
|
|
2082
|
-
}
|
|
2083
1787
|
/**
|
|
2084
1788
|
* Y offset
|
|
2085
1789
|
* @returns {number}
|
|
2086
1790
|
*/
|
|
2087
1791
|
get y() {
|
|
2088
|
-
const ret = wasm.
|
|
1792
|
+
const ret = wasm.__wbg_get_rtcoffsetjs_y(this.__wbg_ptr);
|
|
2089
1793
|
return ret;
|
|
2090
1794
|
}
|
|
2091
|
-
/**
|
|
2092
|
-
* Y offset
|
|
2093
|
-
* @param {number} arg0
|
|
2094
|
-
*/
|
|
2095
|
-
set y(arg0) {
|
|
2096
|
-
wasm.__wbg_set_georeferencejs_northings(this.__wbg_ptr, arg0);
|
|
2097
|
-
}
|
|
2098
1795
|
/**
|
|
2099
1796
|
* Z offset
|
|
2100
1797
|
* @returns {number}
|
|
2101
1798
|
*/
|
|
2102
1799
|
get z() {
|
|
2103
|
-
const ret = wasm.
|
|
1800
|
+
const ret = wasm.__wbg_get_rtcoffsetjs_z(this.__wbg_ptr);
|
|
2104
1801
|
return ret;
|
|
2105
1802
|
}
|
|
2106
|
-
/**
|
|
2107
|
-
* Z offset
|
|
2108
|
-
* @param {number} arg0
|
|
2109
|
-
*/
|
|
2110
|
-
set z(arg0) {
|
|
2111
|
-
wasm.__wbg_set_georeferencejs_orthogonal_height(this.__wbg_ptr, arg0);
|
|
2112
|
-
}
|
|
2113
1803
|
/**
|
|
2114
1804
|
* Check if offset is significant (>10km)
|
|
2115
1805
|
* @returns {boolean}
|
|
@@ -2138,6 +1828,27 @@ export class RtcOffsetJs {
|
|
|
2138
1828
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2139
1829
|
}
|
|
2140
1830
|
}
|
|
1831
|
+
/**
|
|
1832
|
+
* X offset (subtracted from positions)
|
|
1833
|
+
* @param {number} arg0
|
|
1834
|
+
*/
|
|
1835
|
+
set x(arg0) {
|
|
1836
|
+
wasm.__wbg_set_rtcoffsetjs_x(this.__wbg_ptr, arg0);
|
|
1837
|
+
}
|
|
1838
|
+
/**
|
|
1839
|
+
* Y offset
|
|
1840
|
+
* @param {number} arg0
|
|
1841
|
+
*/
|
|
1842
|
+
set y(arg0) {
|
|
1843
|
+
wasm.__wbg_set_rtcoffsetjs_y(this.__wbg_ptr, arg0);
|
|
1844
|
+
}
|
|
1845
|
+
/**
|
|
1846
|
+
* Z offset
|
|
1847
|
+
* @param {number} arg0
|
|
1848
|
+
*/
|
|
1849
|
+
set z(arg0) {
|
|
1850
|
+
wasm.__wbg_set_rtcoffsetjs_z(this.__wbg_ptr, arg0);
|
|
1851
|
+
}
|
|
2141
1852
|
}
|
|
2142
1853
|
if (Symbol.dispose) RtcOffsetJs.prototype[Symbol.dispose] = RtcOffsetJs.prototype.free;
|
|
2143
1854
|
|
|
@@ -2165,34 +1876,40 @@ export class SymbolicCircle {
|
|
|
2165
1876
|
/**
|
|
2166
1877
|
* @returns {number}
|
|
2167
1878
|
*/
|
|
2168
|
-
get
|
|
2169
|
-
const ret = wasm.
|
|
2170
|
-
return ret
|
|
1879
|
+
get centerX() {
|
|
1880
|
+
const ret = wasm.symboliccircle_centerX(this.__wbg_ptr);
|
|
1881
|
+
return ret;
|
|
2171
1882
|
}
|
|
2172
1883
|
/**
|
|
2173
1884
|
* @returns {number}
|
|
2174
1885
|
*/
|
|
2175
|
-
get
|
|
2176
|
-
const ret = wasm.
|
|
1886
|
+
get centerY() {
|
|
1887
|
+
const ret = wasm.symboliccircle_centerY(this.__wbg_ptr);
|
|
2177
1888
|
return ret;
|
|
2178
1889
|
}
|
|
2179
1890
|
/**
|
|
2180
|
-
*
|
|
2181
|
-
* @returns {boolean}
|
|
1891
|
+
* @returns {number}
|
|
2182
1892
|
*/
|
|
2183
|
-
get
|
|
2184
|
-
const ret = wasm.
|
|
2185
|
-
return ret
|
|
1893
|
+
get endAngle() {
|
|
1894
|
+
const ret = wasm.symboliccircle_endAngle(this.__wbg_ptr);
|
|
1895
|
+
return ret;
|
|
1896
|
+
}
|
|
1897
|
+
/**
|
|
1898
|
+
* @returns {number}
|
|
1899
|
+
*/
|
|
1900
|
+
get expressId() {
|
|
1901
|
+
const ret = wasm.symboliccircle_expressId(this.__wbg_ptr);
|
|
1902
|
+
return ret >>> 0;
|
|
2186
1903
|
}
|
|
2187
1904
|
/**
|
|
2188
1905
|
* @returns {string}
|
|
2189
1906
|
*/
|
|
2190
|
-
get
|
|
1907
|
+
get ifcType() {
|
|
2191
1908
|
let deferred1_0;
|
|
2192
1909
|
let deferred1_1;
|
|
2193
1910
|
try {
|
|
2194
1911
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2195
|
-
wasm.
|
|
1912
|
+
wasm.symboliccircle_ifcType(retptr, this.__wbg_ptr);
|
|
2196
1913
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
2197
1914
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
2198
1915
|
deferred1_0 = r0;
|
|
@@ -2204,35 +1921,29 @@ export class SymbolicCircle {
|
|
|
2204
1921
|
}
|
|
2205
1922
|
}
|
|
2206
1923
|
/**
|
|
2207
|
-
*
|
|
2208
|
-
|
|
2209
|
-
get radius() {
|
|
2210
|
-
const ret = wasm.symboliccircle_radius(this.__wbg_ptr);
|
|
2211
|
-
return ret;
|
|
2212
|
-
}
|
|
2213
|
-
/**
|
|
2214
|
-
* @returns {number}
|
|
1924
|
+
* Check if this is a full circle
|
|
1925
|
+
* @returns {boolean}
|
|
2215
1926
|
*/
|
|
2216
|
-
get
|
|
2217
|
-
const ret = wasm.
|
|
2218
|
-
return ret;
|
|
1927
|
+
get isFullCircle() {
|
|
1928
|
+
const ret = wasm.symboliccircle_isFullCircle(this.__wbg_ptr);
|
|
1929
|
+
return ret !== 0;
|
|
2219
1930
|
}
|
|
2220
1931
|
/**
|
|
2221
1932
|
* @returns {number}
|
|
2222
1933
|
*/
|
|
2223
|
-
get
|
|
2224
|
-
const ret = wasm.
|
|
1934
|
+
get radius() {
|
|
1935
|
+
const ret = wasm.symboliccircle_radius(this.__wbg_ptr);
|
|
2225
1936
|
return ret;
|
|
2226
1937
|
}
|
|
2227
1938
|
/**
|
|
2228
1939
|
* @returns {string}
|
|
2229
1940
|
*/
|
|
2230
|
-
get
|
|
1941
|
+
get repIdentifier() {
|
|
2231
1942
|
let deferred1_0;
|
|
2232
1943
|
let deferred1_1;
|
|
2233
1944
|
try {
|
|
2234
1945
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2235
|
-
wasm.
|
|
1946
|
+
wasm.symboliccircle_repIdentifier(retptr, this.__wbg_ptr);
|
|
2236
1947
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
2237
1948
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
2238
1949
|
deferred1_0 = r0;
|
|
@@ -2246,8 +1957,8 @@ export class SymbolicCircle {
|
|
|
2246
1957
|
/**
|
|
2247
1958
|
* @returns {number}
|
|
2248
1959
|
*/
|
|
2249
|
-
get
|
|
2250
|
-
const ret = wasm.
|
|
1960
|
+
get startAngle() {
|
|
1961
|
+
const ret = wasm.symboliccircle_startAngle(this.__wbg_ptr);
|
|
2251
1962
|
return ret;
|
|
2252
1963
|
}
|
|
2253
1964
|
}
|
|
@@ -2284,23 +1995,15 @@ export class SymbolicPolyline {
|
|
|
2284
1995
|
return ret >>> 0;
|
|
2285
1996
|
}
|
|
2286
1997
|
/**
|
|
2287
|
-
* Get
|
|
2288
|
-
* @returns {number}
|
|
2289
|
-
*/
|
|
2290
|
-
get pointCount() {
|
|
2291
|
-
const ret = wasm.symbolicpolyline_pointCount(this.__wbg_ptr);
|
|
2292
|
-
return ret >>> 0;
|
|
2293
|
-
}
|
|
2294
|
-
/**
|
|
2295
|
-
* Get representation identifier ("Plan", "Annotation", "FootPrint", "Axis")
|
|
1998
|
+
* Get IFC type name (e.g., "IfcDoor", "IfcWindow")
|
|
2296
1999
|
* @returns {string}
|
|
2297
2000
|
*/
|
|
2298
|
-
get
|
|
2001
|
+
get ifcType() {
|
|
2299
2002
|
let deferred1_0;
|
|
2300
2003
|
let deferred1_1;
|
|
2301
2004
|
try {
|
|
2302
2005
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2303
|
-
wasm.
|
|
2006
|
+
wasm.symbolicpolyline_ifcType(retptr, this.__wbg_ptr);
|
|
2304
2007
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
2305
2008
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
2306
2009
|
deferred1_0 = r0;
|
|
@@ -2311,6 +2014,22 @@ export class SymbolicPolyline {
|
|
|
2311
2014
|
wasm.__wbindgen_export2(deferred1_0, deferred1_1, 1);
|
|
2312
2015
|
}
|
|
2313
2016
|
}
|
|
2017
|
+
/**
|
|
2018
|
+
* Check if this is a closed loop
|
|
2019
|
+
* @returns {boolean}
|
|
2020
|
+
*/
|
|
2021
|
+
get isClosed() {
|
|
2022
|
+
const ret = wasm.symbolicpolyline_isClosed(this.__wbg_ptr);
|
|
2023
|
+
return ret !== 0;
|
|
2024
|
+
}
|
|
2025
|
+
/**
|
|
2026
|
+
* Get number of points
|
|
2027
|
+
* @returns {number}
|
|
2028
|
+
*/
|
|
2029
|
+
get pointCount() {
|
|
2030
|
+
const ret = wasm.symbolicpolyline_pointCount(this.__wbg_ptr);
|
|
2031
|
+
return ret >>> 0;
|
|
2032
|
+
}
|
|
2314
2033
|
/**
|
|
2315
2034
|
* Get 2D points as Float32Array [x1, y1, x2, y2, ...]
|
|
2316
2035
|
* @returns {Float32Array}
|
|
@@ -2320,15 +2039,15 @@ export class SymbolicPolyline {
|
|
|
2320
2039
|
return takeObject(ret);
|
|
2321
2040
|
}
|
|
2322
2041
|
/**
|
|
2323
|
-
* Get
|
|
2042
|
+
* Get representation identifier ("Plan", "Annotation", "FootPrint", "Axis")
|
|
2324
2043
|
* @returns {string}
|
|
2325
2044
|
*/
|
|
2326
|
-
get
|
|
2045
|
+
get repIdentifier() {
|
|
2327
2046
|
let deferred1_0;
|
|
2328
2047
|
let deferred1_1;
|
|
2329
2048
|
try {
|
|
2330
2049
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2331
|
-
wasm.
|
|
2050
|
+
wasm.symbolicpolyline_repIdentifier(retptr, this.__wbg_ptr);
|
|
2332
2051
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
2333
2052
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
2334
2053
|
deferred1_0 = r0;
|
|
@@ -2339,14 +2058,6 @@ export class SymbolicPolyline {
|
|
|
2339
2058
|
wasm.__wbindgen_export2(deferred1_0, deferred1_1, 1);
|
|
2340
2059
|
}
|
|
2341
2060
|
}
|
|
2342
|
-
/**
|
|
2343
|
-
* Check if this is a closed loop
|
|
2344
|
-
* @returns {boolean}
|
|
2345
|
-
*/
|
|
2346
|
-
get isClosed() {
|
|
2347
|
-
const ret = wasm.symbolicpolyline_isClosed(this.__wbg_ptr);
|
|
2348
|
-
return ret !== 0;
|
|
2349
|
-
}
|
|
2350
2061
|
}
|
|
2351
2062
|
if (Symbol.dispose) SymbolicPolyline.prototype[Symbol.dispose] = SymbolicPolyline.prototype.free;
|
|
2352
2063
|
|
|
@@ -2371,23 +2082,6 @@ export class SymbolicRepresentationCollection {
|
|
|
2371
2082
|
const ptr = this.__destroy_into_raw();
|
|
2372
2083
|
wasm.__wbg_symbolicrepresentationcollection_free(ptr, 0);
|
|
2373
2084
|
}
|
|
2374
|
-
/**
|
|
2375
|
-
* Get circle at index
|
|
2376
|
-
* @param {number} index
|
|
2377
|
-
* @returns {SymbolicCircle | undefined}
|
|
2378
|
-
*/
|
|
2379
|
-
getCircle(index) {
|
|
2380
|
-
const ret = wasm.symbolicrepresentationcollection_getCircle(this.__wbg_ptr, index);
|
|
2381
|
-
return ret === 0 ? undefined : SymbolicCircle.__wrap(ret);
|
|
2382
|
-
}
|
|
2383
|
-
/**
|
|
2384
|
-
* Get total count of all symbolic items
|
|
2385
|
-
* @returns {number}
|
|
2386
|
-
*/
|
|
2387
|
-
get totalCount() {
|
|
2388
|
-
const ret = wasm.symbolicrepresentationcollection_totalCount(this.__wbg_ptr);
|
|
2389
|
-
return ret >>> 0;
|
|
2390
|
-
}
|
|
2391
2085
|
/**
|
|
2392
2086
|
* Get number of circles/arcs
|
|
2393
2087
|
* @returns {number}
|
|
@@ -2397,21 +2091,13 @@ export class SymbolicRepresentationCollection {
|
|
|
2397
2091
|
return ret >>> 0;
|
|
2398
2092
|
}
|
|
2399
2093
|
/**
|
|
2400
|
-
* Get
|
|
2094
|
+
* Get circle at index
|
|
2401
2095
|
* @param {number} index
|
|
2402
|
-
* @returns {
|
|
2403
|
-
*/
|
|
2404
|
-
getPolyline(index) {
|
|
2405
|
-
const ret = wasm.symbolicrepresentationcollection_getPolyline(this.__wbg_ptr, index);
|
|
2406
|
-
return ret === 0 ? undefined : SymbolicPolyline.__wrap(ret);
|
|
2407
|
-
}
|
|
2408
|
-
/**
|
|
2409
|
-
* Get number of polylines
|
|
2410
|
-
* @returns {number}
|
|
2096
|
+
* @returns {SymbolicCircle | undefined}
|
|
2411
2097
|
*/
|
|
2412
|
-
|
|
2413
|
-
const ret = wasm.
|
|
2414
|
-
return ret
|
|
2098
|
+
getCircle(index) {
|
|
2099
|
+
const ret = wasm.symbolicrepresentationcollection_getCircle(this.__wbg_ptr, index);
|
|
2100
|
+
return ret === 0 ? undefined : SymbolicCircle.__wrap(ret);
|
|
2415
2101
|
}
|
|
2416
2102
|
/**
|
|
2417
2103
|
* Get all express IDs that have symbolic representations
|
|
@@ -2430,6 +2116,15 @@ export class SymbolicRepresentationCollection {
|
|
|
2430
2116
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2431
2117
|
}
|
|
2432
2118
|
}
|
|
2119
|
+
/**
|
|
2120
|
+
* Get polyline at index
|
|
2121
|
+
* @param {number} index
|
|
2122
|
+
* @returns {SymbolicPolyline | undefined}
|
|
2123
|
+
*/
|
|
2124
|
+
getPolyline(index) {
|
|
2125
|
+
const ret = wasm.symbolicrepresentationcollection_getPolyline(this.__wbg_ptr, index);
|
|
2126
|
+
return ret === 0 ? undefined : SymbolicPolyline.__wrap(ret);
|
|
2127
|
+
}
|
|
2433
2128
|
/**
|
|
2434
2129
|
* Check if collection is empty
|
|
2435
2130
|
* @returns {boolean}
|
|
@@ -2438,6 +2133,22 @@ export class SymbolicRepresentationCollection {
|
|
|
2438
2133
|
const ret = wasm.symbolicrepresentationcollection_isEmpty(this.__wbg_ptr);
|
|
2439
2134
|
return ret !== 0;
|
|
2440
2135
|
}
|
|
2136
|
+
/**
|
|
2137
|
+
* Get number of polylines
|
|
2138
|
+
* @returns {number}
|
|
2139
|
+
*/
|
|
2140
|
+
get polylineCount() {
|
|
2141
|
+
const ret = wasm.symbolicrepresentationcollection_polylineCount(this.__wbg_ptr);
|
|
2142
|
+
return ret >>> 0;
|
|
2143
|
+
}
|
|
2144
|
+
/**
|
|
2145
|
+
* Get total count of all symbolic items
|
|
2146
|
+
* @returns {number}
|
|
2147
|
+
*/
|
|
2148
|
+
get totalCount() {
|
|
2149
|
+
const ret = wasm.symbolicrepresentationcollection_totalCount(this.__wbg_ptr);
|
|
2150
|
+
return ret >>> 0;
|
|
2151
|
+
}
|
|
2441
2152
|
}
|
|
2442
2153
|
if (Symbol.dispose) SymbolicRepresentationCollection.prototype[Symbol.dispose] = SymbolicRepresentationCollection.prototype.free;
|
|
2443
2154
|
|
|
@@ -2501,7 +2212,7 @@ export class ZeroCopyMesh {
|
|
|
2501
2212
|
* @returns {number}
|
|
2502
2213
|
*/
|
|
2503
2214
|
get indices_len() {
|
|
2504
|
-
const ret = wasm.
|
|
2215
|
+
const ret = wasm.zerocopymesh_indices_len(this.__wbg_ptr);
|
|
2505
2216
|
return ret >>> 0;
|
|
2506
2217
|
}
|
|
2507
2218
|
/**
|
|
@@ -2509,9 +2220,26 @@ export class ZeroCopyMesh {
|
|
|
2509
2220
|
* @returns {number}
|
|
2510
2221
|
*/
|
|
2511
2222
|
get indices_ptr() {
|
|
2512
|
-
const ret = wasm.
|
|
2223
|
+
const ret = wasm.zerocopymesh_indices_ptr(this.__wbg_ptr);
|
|
2513
2224
|
return ret >>> 0;
|
|
2514
2225
|
}
|
|
2226
|
+
/**
|
|
2227
|
+
* Check if mesh is empty
|
|
2228
|
+
* @returns {boolean}
|
|
2229
|
+
*/
|
|
2230
|
+
get is_empty() {
|
|
2231
|
+
const ret = wasm.zerocopymesh_is_empty(this.__wbg_ptr);
|
|
2232
|
+
return ret !== 0;
|
|
2233
|
+
}
|
|
2234
|
+
/**
|
|
2235
|
+
* Create a new zero-copy mesh from a Mesh
|
|
2236
|
+
*/
|
|
2237
|
+
constructor() {
|
|
2238
|
+
const ret = wasm.zerocopymesh_new();
|
|
2239
|
+
this.__wbg_ptr = ret >>> 0;
|
|
2240
|
+
ZeroCopyMeshFinalization.register(this, this.__wbg_ptr, this);
|
|
2241
|
+
return this;
|
|
2242
|
+
}
|
|
2515
2243
|
/**
|
|
2516
2244
|
* Get length of normals array
|
|
2517
2245
|
* @returns {number}
|
|
@@ -2525,15 +2253,7 @@ export class ZeroCopyMesh {
|
|
|
2525
2253
|
* @returns {number}
|
|
2526
2254
|
*/
|
|
2527
2255
|
get normals_ptr() {
|
|
2528
|
-
const ret = wasm.
|
|
2529
|
-
return ret >>> 0;
|
|
2530
|
-
}
|
|
2531
|
-
/**
|
|
2532
|
-
* Get vertex count
|
|
2533
|
-
* @returns {number}
|
|
2534
|
-
*/
|
|
2535
|
-
get vertex_count() {
|
|
2536
|
-
const ret = wasm.zerocopymesh_vertex_count(this.__wbg_ptr);
|
|
2256
|
+
const ret = wasm.zerocopymesh_normals_ptr(this.__wbg_ptr);
|
|
2537
2257
|
return ret >>> 0;
|
|
2538
2258
|
}
|
|
2539
2259
|
/**
|
|
@@ -2553,85 +2273,593 @@ export class ZeroCopyMesh {
|
|
|
2553
2273
|
const ret = wasm.zerocopymesh_positions_ptr(this.__wbg_ptr);
|
|
2554
2274
|
return ret >>> 0;
|
|
2555
2275
|
}
|
|
2556
|
-
/**
|
|
2557
|
-
* Get triangle count
|
|
2558
|
-
* @returns {number}
|
|
2559
|
-
*/
|
|
2560
|
-
get triangle_count() {
|
|
2561
|
-
const ret = wasm.
|
|
2562
|
-
return ret >>> 0;
|
|
2276
|
+
/**
|
|
2277
|
+
* Get triangle count
|
|
2278
|
+
* @returns {number}
|
|
2279
|
+
*/
|
|
2280
|
+
get triangle_count() {
|
|
2281
|
+
const ret = wasm.zerocopymesh_triangle_count(this.__wbg_ptr);
|
|
2282
|
+
return ret >>> 0;
|
|
2283
|
+
}
|
|
2284
|
+
/**
|
|
2285
|
+
* Get vertex count
|
|
2286
|
+
* @returns {number}
|
|
2287
|
+
*/
|
|
2288
|
+
get vertex_count() {
|
|
2289
|
+
const ret = wasm.zerocopymesh_vertex_count(this.__wbg_ptr);
|
|
2290
|
+
return ret >>> 0;
|
|
2291
|
+
}
|
|
2292
|
+
}
|
|
2293
|
+
if (Symbol.dispose) ZeroCopyMesh.prototype[Symbol.dispose] = ZeroCopyMesh.prototype.free;
|
|
2294
|
+
|
|
2295
|
+
/**
|
|
2296
|
+
* Get WASM memory to allow JavaScript to create TypedArray views
|
|
2297
|
+
* @returns {any}
|
|
2298
|
+
*/
|
|
2299
|
+
export function get_memory() {
|
|
2300
|
+
const ret = wasm.get_memory();
|
|
2301
|
+
return takeObject(ret);
|
|
2302
|
+
}
|
|
2303
|
+
|
|
2304
|
+
/**
|
|
2305
|
+
* Initialize the WASM module.
|
|
2306
|
+
*
|
|
2307
|
+
* This function is called automatically when the WASM module is loaded.
|
|
2308
|
+
* It sets up panic hooks for better error messages in the browser console.
|
|
2309
|
+
*/
|
|
2310
|
+
export function init() {
|
|
2311
|
+
wasm.init();
|
|
2312
|
+
}
|
|
2313
|
+
|
|
2314
|
+
/**
|
|
2315
|
+
* Get the version of IFC-Lite.
|
|
2316
|
+
*
|
|
2317
|
+
* # Returns
|
|
2318
|
+
*
|
|
2319
|
+
* Version string (e.g., "0.1.0")
|
|
2320
|
+
*
|
|
2321
|
+
* # Example
|
|
2322
|
+
*
|
|
2323
|
+
* ```javascript
|
|
2324
|
+
* console.log(`IFC-Lite version: ${version()}`);
|
|
2325
|
+
* ```
|
|
2326
|
+
* @returns {string}
|
|
2327
|
+
*/
|
|
2328
|
+
export function version() {
|
|
2329
|
+
let deferred1_0;
|
|
2330
|
+
let deferred1_1;
|
|
2331
|
+
try {
|
|
2332
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2333
|
+
wasm.version(retptr);
|
|
2334
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
2335
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
2336
|
+
deferred1_0 = r0;
|
|
2337
|
+
deferred1_1 = r1;
|
|
2338
|
+
return getStringFromWasm0(r0, r1);
|
|
2339
|
+
} finally {
|
|
2340
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2341
|
+
wasm.__wbindgen_export2(deferred1_0, deferred1_1, 1);
|
|
2342
|
+
}
|
|
2343
|
+
}
|
|
2344
|
+
|
|
2345
|
+
function __wbg_get_imports() {
|
|
2346
|
+
const import0 = {
|
|
2347
|
+
__proto__: null,
|
|
2348
|
+
__wbg_Error_83742b46f01ce22d: function(arg0, arg1) {
|
|
2349
|
+
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
2350
|
+
return addHeapObject(ret);
|
|
2351
|
+
},
|
|
2352
|
+
__wbg___wbindgen_is_function_3c846841762788c1: function(arg0) {
|
|
2353
|
+
const ret = typeof(getObject(arg0)) === 'function';
|
|
2354
|
+
return ret;
|
|
2355
|
+
},
|
|
2356
|
+
__wbg___wbindgen_is_undefined_52709e72fb9f179c: function(arg0) {
|
|
2357
|
+
const ret = getObject(arg0) === undefined;
|
|
2358
|
+
return ret;
|
|
2359
|
+
},
|
|
2360
|
+
__wbg___wbindgen_memory_edb3f01e3930bbf6: function() {
|
|
2361
|
+
const ret = wasm.memory;
|
|
2362
|
+
return addHeapObject(ret);
|
|
2363
|
+
},
|
|
2364
|
+
__wbg___wbindgen_number_get_34bb9d9dcfa21373: function(arg0, arg1) {
|
|
2365
|
+
const obj = getObject(arg1);
|
|
2366
|
+
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
2367
|
+
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
2368
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
2369
|
+
},
|
|
2370
|
+
__wbg___wbindgen_throw_6ddd609b62940d55: function(arg0, arg1) {
|
|
2371
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
2372
|
+
},
|
|
2373
|
+
__wbg__wbg_cb_unref_6b5b6b8576d35cb1: function(arg0) {
|
|
2374
|
+
getObject(arg0)._wbg_cb_unref();
|
|
2375
|
+
},
|
|
2376
|
+
__wbg_call_2d781c1f4d5c0ef8: function() { return handleError(function (arg0, arg1, arg2) {
|
|
2377
|
+
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
2378
|
+
return addHeapObject(ret);
|
|
2379
|
+
}, arguments); },
|
|
2380
|
+
__wbg_call_dcc2662fa17a72cf: function() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
2381
|
+
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2), getObject(arg3));
|
|
2382
|
+
return addHeapObject(ret);
|
|
2383
|
+
}, arguments); },
|
|
2384
|
+
__wbg_call_e133b57c9155d22c: function() { return handleError(function (arg0, arg1) {
|
|
2385
|
+
const ret = getObject(arg0).call(getObject(arg1));
|
|
2386
|
+
return addHeapObject(ret);
|
|
2387
|
+
}, arguments); },
|
|
2388
|
+
__wbg_clearTimeout_113b1cde814ec762: function(arg0) {
|
|
2389
|
+
const ret = clearTimeout(takeObject(arg0));
|
|
2390
|
+
return addHeapObject(ret);
|
|
2391
|
+
},
|
|
2392
|
+
__wbg_debug_4b9b1a2d5972be57: function(arg0) {
|
|
2393
|
+
console.debug(getObject(arg0));
|
|
2394
|
+
},
|
|
2395
|
+
__wbg_error_a6fa202b58aa1cd3: function(arg0, arg1) {
|
|
2396
|
+
let deferred0_0;
|
|
2397
|
+
let deferred0_1;
|
|
2398
|
+
try {
|
|
2399
|
+
deferred0_0 = arg0;
|
|
2400
|
+
deferred0_1 = arg1;
|
|
2401
|
+
console.error(getStringFromWasm0(arg0, arg1));
|
|
2402
|
+
} finally {
|
|
2403
|
+
wasm.__wbindgen_export2(deferred0_0, deferred0_1, 1);
|
|
2404
|
+
}
|
|
2405
|
+
},
|
|
2406
|
+
__wbg_get_3ef1eba1850ade27: function() { return handleError(function (arg0, arg1) {
|
|
2407
|
+
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
2408
|
+
return addHeapObject(ret);
|
|
2409
|
+
}, arguments); },
|
|
2410
|
+
__wbg_gpugeometry_new: function(arg0) {
|
|
2411
|
+
const ret = GpuGeometry.__wrap(arg0);
|
|
2412
|
+
return addHeapObject(ret);
|
|
2413
|
+
},
|
|
2414
|
+
__wbg_instancedgeometry_new: function(arg0) {
|
|
2415
|
+
const ret = InstancedGeometry.__wrap(arg0);
|
|
2416
|
+
return addHeapObject(ret);
|
|
2417
|
+
},
|
|
2418
|
+
__wbg_length_259ee9d041e381ad: function(arg0) {
|
|
2419
|
+
const ret = getObject(arg0).length;
|
|
2420
|
+
return ret;
|
|
2421
|
+
},
|
|
2422
|
+
__wbg_length_b3416cf66a5452c8: function(arg0) {
|
|
2423
|
+
const ret = getObject(arg0).length;
|
|
2424
|
+
return ret;
|
|
2425
|
+
},
|
|
2426
|
+
__wbg_meshdatajs_new: function(arg0) {
|
|
2427
|
+
const ret = MeshDataJs.__wrap(arg0);
|
|
2428
|
+
return addHeapObject(ret);
|
|
2429
|
+
},
|
|
2430
|
+
__wbg_new_227d7c05414eb861: function() {
|
|
2431
|
+
const ret = new Error();
|
|
2432
|
+
return addHeapObject(ret);
|
|
2433
|
+
},
|
|
2434
|
+
__wbg_new_a70fbab9066b301f: function() {
|
|
2435
|
+
const ret = new Array();
|
|
2436
|
+
return addHeapObject(ret);
|
|
2437
|
+
},
|
|
2438
|
+
__wbg_new_ab79df5bd7c26067: function() {
|
|
2439
|
+
const ret = new Object();
|
|
2440
|
+
return addHeapObject(ret);
|
|
2441
|
+
},
|
|
2442
|
+
__wbg_new_d098e265629cd10f: function(arg0, arg1) {
|
|
2443
|
+
try {
|
|
2444
|
+
var state0 = {a: arg0, b: arg1};
|
|
2445
|
+
var cb0 = (arg0, arg1) => {
|
|
2446
|
+
const a = state0.a;
|
|
2447
|
+
state0.a = 0;
|
|
2448
|
+
try {
|
|
2449
|
+
return __wasm_bindgen_func_elem_1054(a, state0.b, arg0, arg1);
|
|
2450
|
+
} finally {
|
|
2451
|
+
state0.a = a;
|
|
2452
|
+
}
|
|
2453
|
+
};
|
|
2454
|
+
const ret = new Promise(cb0);
|
|
2455
|
+
return addHeapObject(ret);
|
|
2456
|
+
} finally {
|
|
2457
|
+
state0.a = state0.b = 0;
|
|
2458
|
+
}
|
|
2459
|
+
},
|
|
2460
|
+
__wbg_new_from_slice_898ac63cbd46f332: function(arg0, arg1) {
|
|
2461
|
+
const ret = new Uint32Array(getArrayU32FromWasm0(arg0, arg1));
|
|
2462
|
+
return addHeapObject(ret);
|
|
2463
|
+
},
|
|
2464
|
+
__wbg_new_from_slice_ff2c15e8e05ffdfc: function(arg0, arg1) {
|
|
2465
|
+
const ret = new Float32Array(getArrayF32FromWasm0(arg0, arg1));
|
|
2466
|
+
return addHeapObject(ret);
|
|
2467
|
+
},
|
|
2468
|
+
__wbg_prototypesetcall_247ac4333d4d3cb4: function(arg0, arg1, arg2) {
|
|
2469
|
+
Float32Array.prototype.set.call(getArrayF32FromWasm0(arg0, arg1), getObject(arg2));
|
|
2470
|
+
},
|
|
2471
|
+
__wbg_push_e87b0e732085a946: function(arg0, arg1) {
|
|
2472
|
+
const ret = getObject(arg0).push(getObject(arg1));
|
|
2473
|
+
return ret;
|
|
2474
|
+
},
|
|
2475
|
+
__wbg_queueMicrotask_0c399741342fb10f: function(arg0) {
|
|
2476
|
+
const ret = getObject(arg0).queueMicrotask;
|
|
2477
|
+
return addHeapObject(ret);
|
|
2478
|
+
},
|
|
2479
|
+
__wbg_queueMicrotask_a082d78ce798393e: function(arg0) {
|
|
2480
|
+
queueMicrotask(getObject(arg0));
|
|
2481
|
+
},
|
|
2482
|
+
__wbg_resolve_ae8d83246e5bcc12: function(arg0) {
|
|
2483
|
+
const ret = Promise.resolve(getObject(arg0));
|
|
2484
|
+
return addHeapObject(ret);
|
|
2485
|
+
},
|
|
2486
|
+
__wbg_setTimeout_ef24d2fc3ad97385: function() { return handleError(function (arg0, arg1) {
|
|
2487
|
+
const ret = setTimeout(getObject(arg0), arg1);
|
|
2488
|
+
return addHeapObject(ret);
|
|
2489
|
+
}, arguments); },
|
|
2490
|
+
__wbg_set_282384002438957f: function(arg0, arg1, arg2) {
|
|
2491
|
+
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
|
2492
|
+
},
|
|
2493
|
+
__wbg_set_6be42768c690e380: function(arg0, arg1, arg2) {
|
|
2494
|
+
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
2495
|
+
},
|
|
2496
|
+
__wbg_set_7eaa4f96924fd6b3: function() { return handleError(function (arg0, arg1, arg2) {
|
|
2497
|
+
const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
|
|
2498
|
+
return ret;
|
|
2499
|
+
}, arguments); },
|
|
2500
|
+
__wbg_stack_3b0d974bbf31e44f: function(arg0, arg1) {
|
|
2501
|
+
const ret = getObject(arg1).stack;
|
|
2502
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
|
|
2503
|
+
const len1 = WASM_VECTOR_LEN;
|
|
2504
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
2505
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
2506
|
+
},
|
|
2507
|
+
__wbg_static_accessor_GLOBAL_8adb955bd33fac2f: function() {
|
|
2508
|
+
const ret = typeof global === 'undefined' ? null : global;
|
|
2509
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
2510
|
+
},
|
|
2511
|
+
__wbg_static_accessor_GLOBAL_THIS_ad356e0db91c7913: function() {
|
|
2512
|
+
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
2513
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
2514
|
+
},
|
|
2515
|
+
__wbg_static_accessor_SELF_f207c857566db248: function() {
|
|
2516
|
+
const ret = typeof self === 'undefined' ? null : self;
|
|
2517
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
2518
|
+
},
|
|
2519
|
+
__wbg_static_accessor_WINDOW_bb9f1ba69d61b386: function() {
|
|
2520
|
+
const ret = typeof window === 'undefined' ? null : window;
|
|
2521
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
2522
|
+
},
|
|
2523
|
+
__wbg_then_098abe61755d12f6: function(arg0, arg1) {
|
|
2524
|
+
const ret = getObject(arg0).then(getObject(arg1));
|
|
2525
|
+
return addHeapObject(ret);
|
|
2526
|
+
},
|
|
2527
|
+
__wbg_warn_69424c2d92a2fa73: function(arg0) {
|
|
2528
|
+
console.warn(getObject(arg0));
|
|
2529
|
+
},
|
|
2530
|
+
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
2531
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 135, function: Function { arguments: [Externref], shim_idx: 136, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
2532
|
+
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_1016, __wasm_bindgen_func_elem_1021);
|
|
2533
|
+
return addHeapObject(ret);
|
|
2534
|
+
},
|
|
2535
|
+
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
2536
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 46, function: Function { arguments: [], shim_idx: 47, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
2537
|
+
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_465, __wasm_bindgen_func_elem_469);
|
|
2538
|
+
return addHeapObject(ret);
|
|
2539
|
+
},
|
|
2540
|
+
__wbindgen_cast_0000000000000003: function(arg0) {
|
|
2541
|
+
// Cast intrinsic for `F64 -> Externref`.
|
|
2542
|
+
const ret = arg0;
|
|
2543
|
+
return addHeapObject(ret);
|
|
2544
|
+
},
|
|
2545
|
+
__wbindgen_cast_0000000000000004: function(arg0, arg1) {
|
|
2546
|
+
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
2547
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
2548
|
+
return addHeapObject(ret);
|
|
2549
|
+
},
|
|
2550
|
+
__wbindgen_cast_0000000000000005: function(arg0) {
|
|
2551
|
+
// Cast intrinsic for `U64 -> Externref`.
|
|
2552
|
+
const ret = BigInt.asUintN(64, arg0);
|
|
2553
|
+
return addHeapObject(ret);
|
|
2554
|
+
},
|
|
2555
|
+
__wbindgen_object_clone_ref: function(arg0) {
|
|
2556
|
+
const ret = getObject(arg0);
|
|
2557
|
+
return addHeapObject(ret);
|
|
2558
|
+
},
|
|
2559
|
+
__wbindgen_object_drop_ref: function(arg0) {
|
|
2560
|
+
takeObject(arg0);
|
|
2561
|
+
},
|
|
2562
|
+
};
|
|
2563
|
+
return {
|
|
2564
|
+
__proto__: null,
|
|
2565
|
+
"./ifc-lite_bg.js": import0,
|
|
2566
|
+
};
|
|
2567
|
+
}
|
|
2568
|
+
|
|
2569
|
+
function __wasm_bindgen_func_elem_469(arg0, arg1) {
|
|
2570
|
+
wasm.__wasm_bindgen_func_elem_469(arg0, arg1);
|
|
2571
|
+
}
|
|
2572
|
+
|
|
2573
|
+
function __wasm_bindgen_func_elem_1021(arg0, arg1, arg2) {
|
|
2574
|
+
try {
|
|
2575
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2576
|
+
wasm.__wasm_bindgen_func_elem_1021(retptr, arg0, arg1, addHeapObject(arg2));
|
|
2577
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
2578
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
2579
|
+
if (r1) {
|
|
2580
|
+
throw takeObject(r0);
|
|
2581
|
+
}
|
|
2582
|
+
} finally {
|
|
2583
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2584
|
+
}
|
|
2585
|
+
}
|
|
2586
|
+
|
|
2587
|
+
function __wasm_bindgen_func_elem_1054(arg0, arg1, arg2, arg3) {
|
|
2588
|
+
wasm.__wasm_bindgen_func_elem_1054(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
2589
|
+
}
|
|
2590
|
+
|
|
2591
|
+
const GeoReferenceJsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2592
|
+
? { register: () => {}, unregister: () => {} }
|
|
2593
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_georeferencejs_free(ptr >>> 0, 1));
|
|
2594
|
+
const GpuGeometryFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2595
|
+
? { register: () => {}, unregister: () => {} }
|
|
2596
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_gpugeometry_free(ptr >>> 0, 1));
|
|
2597
|
+
const GpuInstancedGeometryFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2598
|
+
? { register: () => {}, unregister: () => {} }
|
|
2599
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_gpuinstancedgeometry_free(ptr >>> 0, 1));
|
|
2600
|
+
const GpuInstancedGeometryCollectionFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2601
|
+
? { register: () => {}, unregister: () => {} }
|
|
2602
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_gpuinstancedgeometrycollection_free(ptr >>> 0, 1));
|
|
2603
|
+
const GpuInstancedGeometryRefFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2604
|
+
? { register: () => {}, unregister: () => {} }
|
|
2605
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_gpuinstancedgeometryref_free(ptr >>> 0, 1));
|
|
2606
|
+
const GpuMeshMetadataFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2607
|
+
? { register: () => {}, unregister: () => {} }
|
|
2608
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_gpumeshmetadata_free(ptr >>> 0, 1));
|
|
2609
|
+
const IfcAPIFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2610
|
+
? { register: () => {}, unregister: () => {} }
|
|
2611
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_ifcapi_free(ptr >>> 0, 1));
|
|
2612
|
+
const InstanceDataFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2613
|
+
? { register: () => {}, unregister: () => {} }
|
|
2614
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_instancedata_free(ptr >>> 0, 1));
|
|
2615
|
+
const InstancedGeometryFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2616
|
+
? { register: () => {}, unregister: () => {} }
|
|
2617
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_instancedgeometry_free(ptr >>> 0, 1));
|
|
2618
|
+
const InstancedMeshCollectionFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2619
|
+
? { register: () => {}, unregister: () => {} }
|
|
2620
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_instancedmeshcollection_free(ptr >>> 0, 1));
|
|
2621
|
+
const MeshCollectionFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2622
|
+
? { register: () => {}, unregister: () => {} }
|
|
2623
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_meshcollection_free(ptr >>> 0, 1));
|
|
2624
|
+
const MeshCollectionWithRtcFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2625
|
+
? { register: () => {}, unregister: () => {} }
|
|
2626
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_meshcollectionwithrtc_free(ptr >>> 0, 1));
|
|
2627
|
+
const MeshDataJsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2628
|
+
? { register: () => {}, unregister: () => {} }
|
|
2629
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_meshdatajs_free(ptr >>> 0, 1));
|
|
2630
|
+
const RtcOffsetJsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2631
|
+
? { register: () => {}, unregister: () => {} }
|
|
2632
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_rtcoffsetjs_free(ptr >>> 0, 1));
|
|
2633
|
+
const SymbolicCircleFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2634
|
+
? { register: () => {}, unregister: () => {} }
|
|
2635
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_symboliccircle_free(ptr >>> 0, 1));
|
|
2636
|
+
const SymbolicPolylineFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2637
|
+
? { register: () => {}, unregister: () => {} }
|
|
2638
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_symbolicpolyline_free(ptr >>> 0, 1));
|
|
2639
|
+
const SymbolicRepresentationCollectionFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2640
|
+
? { register: () => {}, unregister: () => {} }
|
|
2641
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_symbolicrepresentationcollection_free(ptr >>> 0, 1));
|
|
2642
|
+
const ZeroCopyMeshFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2643
|
+
? { register: () => {}, unregister: () => {} }
|
|
2644
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_zerocopymesh_free(ptr >>> 0, 1));
|
|
2645
|
+
|
|
2646
|
+
function addHeapObject(obj) {
|
|
2647
|
+
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
2648
|
+
const idx = heap_next;
|
|
2649
|
+
heap_next = heap[idx];
|
|
2650
|
+
|
|
2651
|
+
heap[idx] = obj;
|
|
2652
|
+
return idx;
|
|
2653
|
+
}
|
|
2654
|
+
|
|
2655
|
+
const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
|
|
2656
|
+
? { register: () => {}, unregister: () => {} }
|
|
2657
|
+
: new FinalizationRegistry(state => state.dtor(state.a, state.b));
|
|
2658
|
+
|
|
2659
|
+
function dropObject(idx) {
|
|
2660
|
+
if (idx < 1028) return;
|
|
2661
|
+
heap[idx] = heap_next;
|
|
2662
|
+
heap_next = idx;
|
|
2663
|
+
}
|
|
2664
|
+
|
|
2665
|
+
function getArrayF32FromWasm0(ptr, len) {
|
|
2666
|
+
ptr = ptr >>> 0;
|
|
2667
|
+
return getFloat32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
|
|
2668
|
+
}
|
|
2669
|
+
|
|
2670
|
+
function getArrayF64FromWasm0(ptr, len) {
|
|
2671
|
+
ptr = ptr >>> 0;
|
|
2672
|
+
return getFloat64ArrayMemory0().subarray(ptr / 8, ptr / 8 + len);
|
|
2673
|
+
}
|
|
2674
|
+
|
|
2675
|
+
function getArrayU32FromWasm0(ptr, len) {
|
|
2676
|
+
ptr = ptr >>> 0;
|
|
2677
|
+
return getUint32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
|
|
2678
|
+
}
|
|
2679
|
+
|
|
2680
|
+
let cachedDataViewMemory0 = null;
|
|
2681
|
+
function getDataViewMemory0() {
|
|
2682
|
+
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
|
|
2683
|
+
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
2684
|
+
}
|
|
2685
|
+
return cachedDataViewMemory0;
|
|
2686
|
+
}
|
|
2687
|
+
|
|
2688
|
+
let cachedFloat32ArrayMemory0 = null;
|
|
2689
|
+
function getFloat32ArrayMemory0() {
|
|
2690
|
+
if (cachedFloat32ArrayMemory0 === null || cachedFloat32ArrayMemory0.byteLength === 0) {
|
|
2691
|
+
cachedFloat32ArrayMemory0 = new Float32Array(wasm.memory.buffer);
|
|
2692
|
+
}
|
|
2693
|
+
return cachedFloat32ArrayMemory0;
|
|
2694
|
+
}
|
|
2695
|
+
|
|
2696
|
+
let cachedFloat64ArrayMemory0 = null;
|
|
2697
|
+
function getFloat64ArrayMemory0() {
|
|
2698
|
+
if (cachedFloat64ArrayMemory0 === null || cachedFloat64ArrayMemory0.byteLength === 0) {
|
|
2699
|
+
cachedFloat64ArrayMemory0 = new Float64Array(wasm.memory.buffer);
|
|
2700
|
+
}
|
|
2701
|
+
return cachedFloat64ArrayMemory0;
|
|
2702
|
+
}
|
|
2703
|
+
|
|
2704
|
+
function getStringFromWasm0(ptr, len) {
|
|
2705
|
+
ptr = ptr >>> 0;
|
|
2706
|
+
return decodeText(ptr, len);
|
|
2707
|
+
}
|
|
2708
|
+
|
|
2709
|
+
let cachedUint32ArrayMemory0 = null;
|
|
2710
|
+
function getUint32ArrayMemory0() {
|
|
2711
|
+
if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.byteLength === 0) {
|
|
2712
|
+
cachedUint32ArrayMemory0 = new Uint32Array(wasm.memory.buffer);
|
|
2713
|
+
}
|
|
2714
|
+
return cachedUint32ArrayMemory0;
|
|
2715
|
+
}
|
|
2716
|
+
|
|
2717
|
+
let cachedUint8ArrayMemory0 = null;
|
|
2718
|
+
function getUint8ArrayMemory0() {
|
|
2719
|
+
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
2720
|
+
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
2721
|
+
}
|
|
2722
|
+
return cachedUint8ArrayMemory0;
|
|
2723
|
+
}
|
|
2724
|
+
|
|
2725
|
+
function getObject(idx) { return heap[idx]; }
|
|
2726
|
+
|
|
2727
|
+
function handleError(f, args) {
|
|
2728
|
+
try {
|
|
2729
|
+
return f.apply(this, args);
|
|
2730
|
+
} catch (e) {
|
|
2731
|
+
wasm.__wbindgen_export(addHeapObject(e));
|
|
2732
|
+
}
|
|
2733
|
+
}
|
|
2734
|
+
|
|
2735
|
+
let heap = new Array(1024).fill(undefined);
|
|
2736
|
+
heap.push(undefined, null, true, false);
|
|
2737
|
+
|
|
2738
|
+
let heap_next = heap.length;
|
|
2739
|
+
|
|
2740
|
+
function isLikeNone(x) {
|
|
2741
|
+
return x === undefined || x === null;
|
|
2742
|
+
}
|
|
2743
|
+
|
|
2744
|
+
function makeMutClosure(arg0, arg1, dtor, f) {
|
|
2745
|
+
const state = { a: arg0, b: arg1, cnt: 1, dtor };
|
|
2746
|
+
const real = (...args) => {
|
|
2747
|
+
|
|
2748
|
+
// First up with a closure we increment the internal reference
|
|
2749
|
+
// count. This ensures that the Rust closure environment won't
|
|
2750
|
+
// be deallocated while we're invoking it.
|
|
2751
|
+
state.cnt++;
|
|
2752
|
+
const a = state.a;
|
|
2753
|
+
state.a = 0;
|
|
2754
|
+
try {
|
|
2755
|
+
return f(a, state.b, ...args);
|
|
2756
|
+
} finally {
|
|
2757
|
+
state.a = a;
|
|
2758
|
+
real._wbg_cb_unref();
|
|
2759
|
+
}
|
|
2760
|
+
};
|
|
2761
|
+
real._wbg_cb_unref = () => {
|
|
2762
|
+
if (--state.cnt === 0) {
|
|
2763
|
+
state.dtor(state.a, state.b);
|
|
2764
|
+
state.a = 0;
|
|
2765
|
+
CLOSURE_DTORS.unregister(state);
|
|
2766
|
+
}
|
|
2767
|
+
};
|
|
2768
|
+
CLOSURE_DTORS.register(real, state, state);
|
|
2769
|
+
return real;
|
|
2770
|
+
}
|
|
2771
|
+
|
|
2772
|
+
function passArray8ToWasm0(arg, malloc) {
|
|
2773
|
+
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
2774
|
+
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
2775
|
+
WASM_VECTOR_LEN = arg.length;
|
|
2776
|
+
return ptr;
|
|
2777
|
+
}
|
|
2778
|
+
|
|
2779
|
+
function passStringToWasm0(arg, malloc, realloc) {
|
|
2780
|
+
if (realloc === undefined) {
|
|
2781
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
2782
|
+
const ptr = malloc(buf.length, 1) >>> 0;
|
|
2783
|
+
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
2784
|
+
WASM_VECTOR_LEN = buf.length;
|
|
2785
|
+
return ptr;
|
|
2563
2786
|
}
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2787
|
+
|
|
2788
|
+
let len = arg.length;
|
|
2789
|
+
let ptr = malloc(len, 1) >>> 0;
|
|
2790
|
+
|
|
2791
|
+
const mem = getUint8ArrayMemory0();
|
|
2792
|
+
|
|
2793
|
+
let offset = 0;
|
|
2794
|
+
|
|
2795
|
+
for (; offset < len; offset++) {
|
|
2796
|
+
const code = arg.charCodeAt(offset);
|
|
2797
|
+
if (code > 0x7F) break;
|
|
2798
|
+
mem[ptr + offset] = code;
|
|
2572
2799
|
}
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
const
|
|
2579
|
-
|
|
2800
|
+
if (offset !== len) {
|
|
2801
|
+
if (offset !== 0) {
|
|
2802
|
+
arg = arg.slice(offset);
|
|
2803
|
+
}
|
|
2804
|
+
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
2805
|
+
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
2806
|
+
const ret = cachedTextEncoder.encodeInto(arg, view);
|
|
2807
|
+
|
|
2808
|
+
offset += ret.written;
|
|
2809
|
+
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
2580
2810
|
}
|
|
2581
|
-
}
|
|
2582
|
-
if (Symbol.dispose) ZeroCopyMesh.prototype[Symbol.dispose] = ZeroCopyMesh.prototype.free;
|
|
2583
2811
|
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
* @returns {any}
|
|
2587
|
-
*/
|
|
2588
|
-
export function get_memory() {
|
|
2589
|
-
const ret = wasm.get_memory();
|
|
2590
|
-
return takeObject(ret);
|
|
2812
|
+
WASM_VECTOR_LEN = offset;
|
|
2813
|
+
return ptr;
|
|
2591
2814
|
}
|
|
2592
2815
|
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
* It sets up panic hooks for better error messages in the browser console.
|
|
2598
|
-
*/
|
|
2599
|
-
export function init() {
|
|
2600
|
-
wasm.init();
|
|
2816
|
+
function takeObject(idx) {
|
|
2817
|
+
const ret = getObject(idx);
|
|
2818
|
+
dropObject(idx);
|
|
2819
|
+
return ret;
|
|
2601
2820
|
}
|
|
2602
2821
|
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
* console.log(`IFC-Lite version: ${version()}`);
|
|
2614
|
-
* ```
|
|
2615
|
-
* @returns {string}
|
|
2616
|
-
*/
|
|
2617
|
-
export function version() {
|
|
2618
|
-
let deferred1_0;
|
|
2619
|
-
let deferred1_1;
|
|
2620
|
-
try {
|
|
2621
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2622
|
-
wasm.version(retptr);
|
|
2623
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
2624
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
2625
|
-
deferred1_0 = r0;
|
|
2626
|
-
deferred1_1 = r1;
|
|
2627
|
-
return getStringFromWasm0(r0, r1);
|
|
2628
|
-
} finally {
|
|
2629
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2630
|
-
wasm.__wbindgen_export2(deferred1_0, deferred1_1, 1);
|
|
2822
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
2823
|
+
cachedTextDecoder.decode();
|
|
2824
|
+
const MAX_SAFARI_DECODE_BYTES = 2146435072;
|
|
2825
|
+
let numBytesDecoded = 0;
|
|
2826
|
+
function decodeText(ptr, len) {
|
|
2827
|
+
numBytesDecoded += len;
|
|
2828
|
+
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
|
|
2829
|
+
cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
2830
|
+
cachedTextDecoder.decode();
|
|
2831
|
+
numBytesDecoded = len;
|
|
2631
2832
|
}
|
|
2833
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
2834
|
+
}
|
|
2835
|
+
|
|
2836
|
+
const cachedTextEncoder = new TextEncoder();
|
|
2837
|
+
|
|
2838
|
+
if (!('encodeInto' in cachedTextEncoder)) {
|
|
2839
|
+
cachedTextEncoder.encodeInto = function (arg, view) {
|
|
2840
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
2841
|
+
view.set(buf);
|
|
2842
|
+
return {
|
|
2843
|
+
read: arg.length,
|
|
2844
|
+
written: buf.length
|
|
2845
|
+
};
|
|
2846
|
+
};
|
|
2632
2847
|
}
|
|
2633
2848
|
|
|
2634
|
-
|
|
2849
|
+
let WASM_VECTOR_LEN = 0;
|
|
2850
|
+
|
|
2851
|
+
let wasmModule, wasm;
|
|
2852
|
+
function __wbg_finalize_init(instance, module) {
|
|
2853
|
+
wasm = instance.exports;
|
|
2854
|
+
wasmModule = module;
|
|
2855
|
+
cachedDataViewMemory0 = null;
|
|
2856
|
+
cachedFloat32ArrayMemory0 = null;
|
|
2857
|
+
cachedFloat64ArrayMemory0 = null;
|
|
2858
|
+
cachedUint32ArrayMemory0 = null;
|
|
2859
|
+
cachedUint8ArrayMemory0 = null;
|
|
2860
|
+
wasm.__wbindgen_start();
|
|
2861
|
+
return wasm;
|
|
2862
|
+
}
|
|
2635
2863
|
|
|
2636
2864
|
async function __wbg_load(module, imports) {
|
|
2637
2865
|
if (typeof Response === 'function' && module instanceof Response) {
|
|
@@ -2639,14 +2867,12 @@ async function __wbg_load(module, imports) {
|
|
|
2639
2867
|
try {
|
|
2640
2868
|
return await WebAssembly.instantiateStreaming(module, imports);
|
|
2641
2869
|
} catch (e) {
|
|
2642
|
-
const validResponse = module.ok &&
|
|
2870
|
+
const validResponse = module.ok && expectedResponseType(module.type);
|
|
2643
2871
|
|
|
2644
2872
|
if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
|
|
2645
2873
|
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);
|
|
2646
2874
|
|
|
2647
|
-
} else {
|
|
2648
|
-
throw e;
|
|
2649
|
-
}
|
|
2875
|
+
} else { throw e; }
|
|
2650
2876
|
}
|
|
2651
2877
|
}
|
|
2652
2878
|
|
|
@@ -2661,252 +2887,20 @@ async function __wbg_load(module, imports) {
|
|
|
2661
2887
|
return instance;
|
|
2662
2888
|
}
|
|
2663
2889
|
}
|
|
2664
|
-
}
|
|
2665
2890
|
|
|
2666
|
-
function
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
imports.wbg.__wbg_Error_52673b7de5a0ca89 = function(arg0, arg1) {
|
|
2670
|
-
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
2671
|
-
return addHeapObject(ret);
|
|
2672
|
-
};
|
|
2673
|
-
imports.wbg.__wbg___wbindgen_is_function_8d400b8b1af978cd = function(arg0) {
|
|
2674
|
-
const ret = typeof(getObject(arg0)) === 'function';
|
|
2675
|
-
return ret;
|
|
2676
|
-
};
|
|
2677
|
-
imports.wbg.__wbg___wbindgen_is_undefined_f6b95eab589e0269 = function(arg0) {
|
|
2678
|
-
const ret = getObject(arg0) === undefined;
|
|
2679
|
-
return ret;
|
|
2680
|
-
};
|
|
2681
|
-
imports.wbg.__wbg___wbindgen_memory_a342e963fbcabd68 = function() {
|
|
2682
|
-
const ret = wasm.memory;
|
|
2683
|
-
return addHeapObject(ret);
|
|
2684
|
-
};
|
|
2685
|
-
imports.wbg.__wbg___wbindgen_number_get_9619185a74197f95 = function(arg0, arg1) {
|
|
2686
|
-
const obj = getObject(arg1);
|
|
2687
|
-
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
2688
|
-
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
2689
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
2690
|
-
};
|
|
2691
|
-
imports.wbg.__wbg___wbindgen_throw_dd24417ed36fc46e = function(arg0, arg1) {
|
|
2692
|
-
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
2693
|
-
};
|
|
2694
|
-
imports.wbg.__wbg__wbg_cb_unref_87dfb5aaa0cbcea7 = function(arg0) {
|
|
2695
|
-
getObject(arg0)._wbg_cb_unref();
|
|
2696
|
-
};
|
|
2697
|
-
imports.wbg.__wbg_call_3020136f7a2d6e44 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
2698
|
-
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
2699
|
-
return addHeapObject(ret);
|
|
2700
|
-
}, arguments) };
|
|
2701
|
-
imports.wbg.__wbg_call_abb4ff46ce38be40 = function() { return handleError(function (arg0, arg1) {
|
|
2702
|
-
const ret = getObject(arg0).call(getObject(arg1));
|
|
2703
|
-
return addHeapObject(ret);
|
|
2704
|
-
}, arguments) };
|
|
2705
|
-
imports.wbg.__wbg_call_c8baa5c5e72d274e = function() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
2706
|
-
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2), getObject(arg3));
|
|
2707
|
-
return addHeapObject(ret);
|
|
2708
|
-
}, arguments) };
|
|
2709
|
-
imports.wbg.__wbg_clearTimeout_5a54f8841c30079a = function(arg0) {
|
|
2710
|
-
const ret = clearTimeout(takeObject(arg0));
|
|
2711
|
-
return addHeapObject(ret);
|
|
2712
|
-
};
|
|
2713
|
-
imports.wbg.__wbg_debug_9d0c87ddda3dc485 = function(arg0) {
|
|
2714
|
-
console.debug(getObject(arg0));
|
|
2715
|
-
};
|
|
2716
|
-
imports.wbg.__wbg_error_7534b8e9a36f1ab4 = function(arg0, arg1) {
|
|
2717
|
-
let deferred0_0;
|
|
2718
|
-
let deferred0_1;
|
|
2719
|
-
try {
|
|
2720
|
-
deferred0_0 = arg0;
|
|
2721
|
-
deferred0_1 = arg1;
|
|
2722
|
-
console.error(getStringFromWasm0(arg0, arg1));
|
|
2723
|
-
} finally {
|
|
2724
|
-
wasm.__wbindgen_export2(deferred0_0, deferred0_1, 1);
|
|
2725
|
-
}
|
|
2726
|
-
};
|
|
2727
|
-
imports.wbg.__wbg_get_af9dab7e9603ea93 = function() { return handleError(function (arg0, arg1) {
|
|
2728
|
-
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
2729
|
-
return addHeapObject(ret);
|
|
2730
|
-
}, arguments) };
|
|
2731
|
-
imports.wbg.__wbg_gpugeometry_new = function(arg0) {
|
|
2732
|
-
const ret = GpuGeometry.__wrap(arg0);
|
|
2733
|
-
return addHeapObject(ret);
|
|
2734
|
-
};
|
|
2735
|
-
imports.wbg.__wbg_instancedgeometry_new = function(arg0) {
|
|
2736
|
-
const ret = InstancedGeometry.__wrap(arg0);
|
|
2737
|
-
return addHeapObject(ret);
|
|
2738
|
-
};
|
|
2739
|
-
imports.wbg.__wbg_length_86ce4877baf913bb = function(arg0) {
|
|
2740
|
-
const ret = getObject(arg0).length;
|
|
2741
|
-
return ret;
|
|
2742
|
-
};
|
|
2743
|
-
imports.wbg.__wbg_length_d45040a40c570362 = function(arg0) {
|
|
2744
|
-
const ret = getObject(arg0).length;
|
|
2745
|
-
return ret;
|
|
2746
|
-
};
|
|
2747
|
-
imports.wbg.__wbg_meshdatajs_new = function(arg0) {
|
|
2748
|
-
const ret = MeshDataJs.__wrap(arg0);
|
|
2749
|
-
return addHeapObject(ret);
|
|
2750
|
-
};
|
|
2751
|
-
imports.wbg.__wbg_new_1ba21ce319a06297 = function() {
|
|
2752
|
-
const ret = new Object();
|
|
2753
|
-
return addHeapObject(ret);
|
|
2754
|
-
};
|
|
2755
|
-
imports.wbg.__wbg_new_25f239778d6112b9 = function() {
|
|
2756
|
-
const ret = new Array();
|
|
2757
|
-
return addHeapObject(ret);
|
|
2758
|
-
};
|
|
2759
|
-
imports.wbg.__wbg_new_8a6f238a6ece86ea = function() {
|
|
2760
|
-
const ret = new Error();
|
|
2761
|
-
return addHeapObject(ret);
|
|
2762
|
-
};
|
|
2763
|
-
imports.wbg.__wbg_new_ff12d2b041fb48f1 = function(arg0, arg1) {
|
|
2764
|
-
try {
|
|
2765
|
-
var state0 = {a: arg0, b: arg1};
|
|
2766
|
-
var cb0 = (arg0, arg1) => {
|
|
2767
|
-
const a = state0.a;
|
|
2768
|
-
state0.a = 0;
|
|
2769
|
-
try {
|
|
2770
|
-
return __wasm_bindgen_func_elem_1052(a, state0.b, arg0, arg1);
|
|
2771
|
-
} finally {
|
|
2772
|
-
state0.a = a;
|
|
2773
|
-
}
|
|
2774
|
-
};
|
|
2775
|
-
const ret = new Promise(cb0);
|
|
2776
|
-
return addHeapObject(ret);
|
|
2777
|
-
} finally {
|
|
2778
|
-
state0.a = state0.b = 0;
|
|
2891
|
+
function expectedResponseType(type) {
|
|
2892
|
+
switch (type) {
|
|
2893
|
+
case 'basic': case 'cors': case 'default': return true;
|
|
2779
2894
|
}
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
const ret = new Float32Array(getArrayF32FromWasm0(arg0, arg1));
|
|
2783
|
-
return addHeapObject(ret);
|
|
2784
|
-
};
|
|
2785
|
-
imports.wbg.__wbg_new_from_slice_db0691b69e9d3891 = function(arg0, arg1) {
|
|
2786
|
-
const ret = new Uint32Array(getArrayU32FromWasm0(arg0, arg1));
|
|
2787
|
-
return addHeapObject(ret);
|
|
2788
|
-
};
|
|
2789
|
-
imports.wbg.__wbg_new_no_args_cb138f77cf6151ee = function(arg0, arg1) {
|
|
2790
|
-
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
2791
|
-
return addHeapObject(ret);
|
|
2792
|
-
};
|
|
2793
|
-
imports.wbg.__wbg_prototypesetcall_96cc7097487b926d = function(arg0, arg1, arg2) {
|
|
2794
|
-
Float32Array.prototype.set.call(getArrayF32FromWasm0(arg0, arg1), getObject(arg2));
|
|
2795
|
-
};
|
|
2796
|
-
imports.wbg.__wbg_push_7d9be8f38fc13975 = function(arg0, arg1) {
|
|
2797
|
-
const ret = getObject(arg0).push(getObject(arg1));
|
|
2798
|
-
return ret;
|
|
2799
|
-
};
|
|
2800
|
-
imports.wbg.__wbg_queueMicrotask_9b549dfce8865860 = function(arg0) {
|
|
2801
|
-
const ret = getObject(arg0).queueMicrotask;
|
|
2802
|
-
return addHeapObject(ret);
|
|
2803
|
-
};
|
|
2804
|
-
imports.wbg.__wbg_queueMicrotask_fca69f5bfad613a5 = function(arg0) {
|
|
2805
|
-
queueMicrotask(getObject(arg0));
|
|
2806
|
-
};
|
|
2807
|
-
imports.wbg.__wbg_resolve_fd5bfbaa4ce36e1e = function(arg0) {
|
|
2808
|
-
const ret = Promise.resolve(getObject(arg0));
|
|
2809
|
-
return addHeapObject(ret);
|
|
2810
|
-
};
|
|
2811
|
-
imports.wbg.__wbg_setTimeout_db2dbaeefb6f39c7 = function() { return handleError(function (arg0, arg1) {
|
|
2812
|
-
const ret = setTimeout(getObject(arg0), arg1);
|
|
2813
|
-
return addHeapObject(ret);
|
|
2814
|
-
}, arguments) };
|
|
2815
|
-
imports.wbg.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
|
|
2816
|
-
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
2817
|
-
};
|
|
2818
|
-
imports.wbg.__wbg_set_781438a03c0c3c81 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
2819
|
-
const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
|
|
2820
|
-
return ret;
|
|
2821
|
-
}, arguments) };
|
|
2822
|
-
imports.wbg.__wbg_set_7df433eea03a5c14 = function(arg0, arg1, arg2) {
|
|
2823
|
-
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
|
2824
|
-
};
|
|
2825
|
-
imports.wbg.__wbg_stack_0ed75d68575b0f3c = function(arg0, arg1) {
|
|
2826
|
-
const ret = getObject(arg1).stack;
|
|
2827
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
|
|
2828
|
-
const len1 = WASM_VECTOR_LEN;
|
|
2829
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
2830
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
2831
|
-
};
|
|
2832
|
-
imports.wbg.__wbg_static_accessor_GLOBAL_769e6b65d6557335 = function() {
|
|
2833
|
-
const ret = typeof global === 'undefined' ? null : global;
|
|
2834
|
-
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
2835
|
-
};
|
|
2836
|
-
imports.wbg.__wbg_static_accessor_GLOBAL_THIS_60cf02db4de8e1c1 = function() {
|
|
2837
|
-
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
2838
|
-
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
2839
|
-
};
|
|
2840
|
-
imports.wbg.__wbg_static_accessor_SELF_08f5a74c69739274 = function() {
|
|
2841
|
-
const ret = typeof self === 'undefined' ? null : self;
|
|
2842
|
-
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
2843
|
-
};
|
|
2844
|
-
imports.wbg.__wbg_static_accessor_WINDOW_a8924b26aa92d024 = function() {
|
|
2845
|
-
const ret = typeof window === 'undefined' ? null : window;
|
|
2846
|
-
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
2847
|
-
};
|
|
2848
|
-
imports.wbg.__wbg_then_4f95312d68691235 = function(arg0, arg1) {
|
|
2849
|
-
const ret = getObject(arg0).then(getObject(arg1));
|
|
2850
|
-
return addHeapObject(ret);
|
|
2851
|
-
};
|
|
2852
|
-
imports.wbg.__wbg_warn_6e567d0d926ff881 = function(arg0) {
|
|
2853
|
-
console.warn(getObject(arg0));
|
|
2854
|
-
};
|
|
2855
|
-
imports.wbg.__wbindgen_cast_0663cdfcad33dbe7 = function(arg0, arg1) {
|
|
2856
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx: 135, function: Function { arguments: [Externref], shim_idx: 136, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
2857
|
-
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_1019, __wasm_bindgen_func_elem_1021);
|
|
2858
|
-
return addHeapObject(ret);
|
|
2859
|
-
};
|
|
2860
|
-
imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
|
|
2861
|
-
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
2862
|
-
const ret = getStringFromWasm0(arg0, arg1);
|
|
2863
|
-
return addHeapObject(ret);
|
|
2864
|
-
};
|
|
2865
|
-
imports.wbg.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
|
|
2866
|
-
// Cast intrinsic for `U64 -> Externref`.
|
|
2867
|
-
const ret = BigInt.asUintN(64, arg0);
|
|
2868
|
-
return addHeapObject(ret);
|
|
2869
|
-
};
|
|
2870
|
-
imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
|
|
2871
|
-
// Cast intrinsic for `F64 -> Externref`.
|
|
2872
|
-
const ret = arg0;
|
|
2873
|
-
return addHeapObject(ret);
|
|
2874
|
-
};
|
|
2875
|
-
imports.wbg.__wbindgen_cast_dcf665cfcd643c22 = function(arg0, arg1) {
|
|
2876
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx: 46, function: Function { arguments: [], shim_idx: 47, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
2877
|
-
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_467, __wasm_bindgen_func_elem_469);
|
|
2878
|
-
return addHeapObject(ret);
|
|
2879
|
-
};
|
|
2880
|
-
imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
|
|
2881
|
-
const ret = getObject(arg0);
|
|
2882
|
-
return addHeapObject(ret);
|
|
2883
|
-
};
|
|
2884
|
-
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
|
|
2885
|
-
takeObject(arg0);
|
|
2886
|
-
};
|
|
2887
|
-
|
|
2888
|
-
return imports;
|
|
2889
|
-
}
|
|
2890
|
-
|
|
2891
|
-
function __wbg_finalize_init(instance, module) {
|
|
2892
|
-
wasm = instance.exports;
|
|
2893
|
-
__wbg_init.__wbindgen_wasm_module = module;
|
|
2894
|
-
cachedDataViewMemory0 = null;
|
|
2895
|
-
cachedFloat32ArrayMemory0 = null;
|
|
2896
|
-
cachedFloat64ArrayMemory0 = null;
|
|
2897
|
-
cachedUint32ArrayMemory0 = null;
|
|
2898
|
-
cachedUint8ArrayMemory0 = null;
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
wasm.__wbindgen_start();
|
|
2902
|
-
return wasm;
|
|
2895
|
+
return false;
|
|
2896
|
+
}
|
|
2903
2897
|
}
|
|
2904
2898
|
|
|
2905
2899
|
function initSync(module) {
|
|
2906
2900
|
if (wasm !== undefined) return wasm;
|
|
2907
2901
|
|
|
2908
2902
|
|
|
2909
|
-
if (
|
|
2903
|
+
if (module !== undefined) {
|
|
2910
2904
|
if (Object.getPrototypeOf(module) === Object.prototype) {
|
|
2911
2905
|
({module} = module)
|
|
2912
2906
|
} else {
|
|
@@ -2926,7 +2920,7 @@ async function __wbg_init(module_or_path) {
|
|
|
2926
2920
|
if (wasm !== undefined) return wasm;
|
|
2927
2921
|
|
|
2928
2922
|
|
|
2929
|
-
if (
|
|
2923
|
+
if (module_or_path !== undefined) {
|
|
2930
2924
|
if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
|
|
2931
2925
|
({module_or_path} = module_or_path)
|
|
2932
2926
|
} else {
|
|
@@ -2934,7 +2928,7 @@ async function __wbg_init(module_or_path) {
|
|
|
2934
2928
|
}
|
|
2935
2929
|
}
|
|
2936
2930
|
|
|
2937
|
-
if (
|
|
2931
|
+
if (module_or_path === undefined) {
|
|
2938
2932
|
module_or_path = new URL('ifc-lite_bg.wasm', import.meta.url);
|
|
2939
2933
|
}
|
|
2940
2934
|
const imports = __wbg_get_imports();
|
|
@@ -2948,5 +2942,4 @@ async function __wbg_init(module_or_path) {
|
|
|
2948
2942
|
return __wbg_finalize_init(instance, module);
|
|
2949
2943
|
}
|
|
2950
2944
|
|
|
2951
|
-
export { initSync };
|
|
2952
|
-
export default __wbg_init;
|
|
2945
|
+
export { initSync, __wbg_init as default };
|