@ifc-lite/wasm 1.14.2 → 1.14.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -3
- package/package.json +1 -1
- package/pkg/ifc-lite.d.ts +981 -1049
- package/pkg/ifc-lite.js +1452 -1445
- package/pkg/ifc-lite_bg.wasm +0 -0
package/pkg/ifc-lite.js
CHANGED
|
@@ -1,157 +1,321 @@
|
|
|
1
|
-
|
|
1
|
+
let wasm;
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
3
|
+
function addHeapObject(obj) {
|
|
4
|
+
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
5
|
+
const idx = heap_next;
|
|
6
|
+
heap_next = heap[idx];
|
|
7
|
+
|
|
8
|
+
heap[idx] = obj;
|
|
9
|
+
return idx;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
|
|
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);
|
|
13
41
|
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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);
|
|
19
49
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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);
|
|
23
57
|
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
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
|
-
}
|
|
58
|
+
return cachedFloat64ArrayMemory0;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
function getStringFromWasm0(ptr, len) {
|
|
62
|
+
ptr = ptr >>> 0;
|
|
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);
|
|
43
70
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
localToMap(x, y, z) {
|
|
52
|
-
try {
|
|
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;
|
|
60
|
-
} finally {
|
|
61
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
62
|
-
}
|
|
71
|
+
return cachedUint32ArrayMemory0;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
let cachedUint8ArrayMemory0 = null;
|
|
75
|
+
function getUint8ArrayMemory0() {
|
|
76
|
+
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
77
|
+
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
63
78
|
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
79
|
+
return cachedUint8ArrayMemory0;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
function getObject(idx) { return heap[idx]; }
|
|
83
|
+
|
|
84
|
+
function handleError(f, args) {
|
|
85
|
+
try {
|
|
86
|
+
return f.apply(this, args);
|
|
87
|
+
} catch (e) {
|
|
88
|
+
wasm.__wbindgen_export(addHeapObject(e));
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
let heap = new Array(128).fill(undefined);
|
|
93
|
+
heap.push(undefined, null, true, false);
|
|
94
|
+
|
|
95
|
+
let heap_next = heap.length;
|
|
96
|
+
|
|
97
|
+
function isLikeNone(x) {
|
|
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;
|
|
72
111
|
try {
|
|
73
|
-
|
|
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;
|
|
112
|
+
return f(a, state.b, ...args);
|
|
80
113
|
} finally {
|
|
81
|
-
|
|
114
|
+
state.a = a;
|
|
115
|
+
real._wbg_cb_unref();
|
|
82
116
|
}
|
|
117
|
+
};
|
|
118
|
+
real._wbg_cb_unref = () => {
|
|
119
|
+
if (--state.cnt === 0) {
|
|
120
|
+
state.dtor(state.a, state.b);
|
|
121
|
+
state.a = 0;
|
|
122
|
+
CLOSURE_DTORS.unregister(state);
|
|
123
|
+
}
|
|
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;
|
|
83
143
|
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
144
|
+
|
|
145
|
+
let len = arg.length;
|
|
146
|
+
let ptr = malloc(len, 1) >>> 0;
|
|
147
|
+
|
|
148
|
+
const mem = getUint8ArrayMemory0();
|
|
149
|
+
|
|
150
|
+
let offset = 0;
|
|
151
|
+
|
|
152
|
+
for (; offset < len; offset++) {
|
|
153
|
+
const code = arg.charCodeAt(offset);
|
|
154
|
+
if (code > 0x7F) break;
|
|
155
|
+
mem[ptr + offset] = code;
|
|
91
156
|
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
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);
|
|
157
|
+
if (offset !== len) {
|
|
158
|
+
if (offset !== 0) {
|
|
159
|
+
arg = arg.slice(offset);
|
|
107
160
|
}
|
|
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;
|
|
108
167
|
}
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
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;
|
|
124
189
|
}
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
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
|
+
};
|
|
132
203
|
}
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
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;
|
|
140
302
|
}
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
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);
|
|
148
312
|
}
|
|
149
313
|
/**
|
|
150
|
-
*
|
|
314
|
+
* Eastings (X offset)
|
|
151
315
|
* @returns {number}
|
|
152
316
|
*/
|
|
153
|
-
get
|
|
154
|
-
const ret = wasm.
|
|
317
|
+
get eastings() {
|
|
318
|
+
const ret = wasm.__wbg_get_georeferencejs_eastings(this.__wbg_ptr);
|
|
155
319
|
return ret;
|
|
156
320
|
}
|
|
157
321
|
/**
|
|
@@ -161,6 +325,14 @@ export class GeoReferenceJs {
|
|
|
161
325
|
set eastings(arg0) {
|
|
162
326
|
wasm.__wbg_set_georeferencejs_eastings(this.__wbg_ptr, arg0);
|
|
163
327
|
}
|
|
328
|
+
/**
|
|
329
|
+
* Northings (Y offset)
|
|
330
|
+
* @returns {number}
|
|
331
|
+
*/
|
|
332
|
+
get northings() {
|
|
333
|
+
const ret = wasm.__wbg_get_georeferencejs_northings(this.__wbg_ptr);
|
|
334
|
+
return ret;
|
|
335
|
+
}
|
|
164
336
|
/**
|
|
165
337
|
* Northings (Y offset)
|
|
166
338
|
* @param {number} arg0
|
|
@@ -168,6 +340,14 @@ export class GeoReferenceJs {
|
|
|
168
340
|
set northings(arg0) {
|
|
169
341
|
wasm.__wbg_set_georeferencejs_northings(this.__wbg_ptr, arg0);
|
|
170
342
|
}
|
|
343
|
+
/**
|
|
344
|
+
* Orthogonal height (Z offset)
|
|
345
|
+
* @returns {number}
|
|
346
|
+
*/
|
|
347
|
+
get orthogonal_height() {
|
|
348
|
+
const ret = wasm.__wbg_get_georeferencejs_orthogonal_height(this.__wbg_ptr);
|
|
349
|
+
return ret;
|
|
350
|
+
}
|
|
171
351
|
/**
|
|
172
352
|
* Orthogonal height (Z offset)
|
|
173
353
|
* @param {number} arg0
|
|
@@ -176,11 +356,12 @@ export class GeoReferenceJs {
|
|
|
176
356
|
wasm.__wbg_set_georeferencejs_orthogonal_height(this.__wbg_ptr, arg0);
|
|
177
357
|
}
|
|
178
358
|
/**
|
|
179
|
-
*
|
|
180
|
-
* @
|
|
359
|
+
* X-axis abscissa (cos of rotation)
|
|
360
|
+
* @returns {number}
|
|
181
361
|
*/
|
|
182
|
-
|
|
183
|
-
wasm.
|
|
362
|
+
get x_axis_abscissa() {
|
|
363
|
+
const ret = wasm.__wbg_get_georeferencejs_x_axis_abscissa(this.__wbg_ptr);
|
|
364
|
+
return ret;
|
|
184
365
|
}
|
|
185
366
|
/**
|
|
186
367
|
* X-axis abscissa (cos of rotation)
|
|
@@ -189,6 +370,14 @@ export class GeoReferenceJs {
|
|
|
189
370
|
set x_axis_abscissa(arg0) {
|
|
190
371
|
wasm.__wbg_set_georeferencejs_x_axis_abscissa(this.__wbg_ptr, arg0);
|
|
191
372
|
}
|
|
373
|
+
/**
|
|
374
|
+
* X-axis ordinate (sin of rotation)
|
|
375
|
+
* @returns {number}
|
|
376
|
+
*/
|
|
377
|
+
get x_axis_ordinate() {
|
|
378
|
+
const ret = wasm.__wbg_get_georeferencejs_x_axis_ordinate(this.__wbg_ptr);
|
|
379
|
+
return ret;
|
|
380
|
+
}
|
|
192
381
|
/**
|
|
193
382
|
* X-axis ordinate (sin of rotation)
|
|
194
383
|
* @param {number} arg0
|
|
@@ -196,51 +385,74 @@ export class GeoReferenceJs {
|
|
|
196
385
|
set x_axis_ordinate(arg0) {
|
|
197
386
|
wasm.__wbg_set_georeferencejs_x_axis_ordinate(this.__wbg_ptr, arg0);
|
|
198
387
|
}
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
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;
|
|
388
|
+
/**
|
|
389
|
+
* Scale factor
|
|
390
|
+
* @returns {number}
|
|
391
|
+
*/
|
|
392
|
+
get scale() {
|
|
393
|
+
const ret = wasm.__wbg_get_georeferencejs_scale(this.__wbg_ptr);
|
|
394
|
+
return ret;
|
|
225
395
|
}
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
396
|
+
/**
|
|
397
|
+
* Scale factor
|
|
398
|
+
* @param {number} arg0
|
|
399
|
+
*/
|
|
400
|
+
set scale(arg0) {
|
|
401
|
+
wasm.__wbg_set_georeferencejs_scale(this.__wbg_ptr, arg0);
|
|
229
402
|
}
|
|
230
403
|
/**
|
|
231
|
-
*
|
|
232
|
-
* @param {number}
|
|
233
|
-
* @
|
|
404
|
+
* Transform local coordinates to map coordinates
|
|
405
|
+
* @param {number} x
|
|
406
|
+
* @param {number} y
|
|
407
|
+
* @param {number} z
|
|
408
|
+
* @returns {Float64Array}
|
|
234
409
|
*/
|
|
235
|
-
|
|
410
|
+
localToMap(x, y, z) {
|
|
236
411
|
try {
|
|
237
412
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
238
|
-
wasm.
|
|
413
|
+
wasm.georeferencejs_localToMap(retptr, this.__wbg_ptr, x, y, z);
|
|
239
414
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
240
415
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
416
|
+
var v1 = getArrayF64FromWasm0(r0, r1).slice();
|
|
417
|
+
wasm.__wbindgen_export2(r0, r1 * 8, 8);
|
|
418
|
+
return v1;
|
|
419
|
+
} finally {
|
|
420
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
/**
|
|
424
|
+
* Transform map coordinates to local coordinates
|
|
425
|
+
* @param {number} e
|
|
426
|
+
* @param {number} n
|
|
427
|
+
* @param {number} h
|
|
428
|
+
* @returns {Float64Array}
|
|
429
|
+
*/
|
|
430
|
+
mapToLocal(e, n, h) {
|
|
431
|
+
try {
|
|
432
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
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();
|
|
244
456
|
wasm.__wbindgen_export2(r0, r1 * 1, 1);
|
|
245
457
|
}
|
|
246
458
|
return v1;
|
|
@@ -249,28 +461,67 @@ export class GpuGeometry {
|
|
|
249
461
|
}
|
|
250
462
|
}
|
|
251
463
|
/**
|
|
252
|
-
* Get
|
|
253
|
-
* @
|
|
254
|
-
* @returns {GpuMeshMetadata | undefined}
|
|
464
|
+
* Get rotation angle in radians
|
|
465
|
+
* @returns {number}
|
|
255
466
|
*/
|
|
256
|
-
|
|
257
|
-
const ret = wasm.
|
|
258
|
-
return ret
|
|
467
|
+
get rotation() {
|
|
468
|
+
const ret = wasm.georeferencejs_rotation(this.__wbg_ptr);
|
|
469
|
+
return ret;
|
|
259
470
|
}
|
|
260
471
|
/**
|
|
261
|
-
*
|
|
262
|
-
* @returns {
|
|
472
|
+
* Get 4x4 transformation matrix (column-major for WebGL)
|
|
473
|
+
* @returns {Float64Array}
|
|
263
474
|
*/
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
475
|
+
toMatrix() {
|
|
476
|
+
try {
|
|
477
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
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);
|
|
267
518
|
}
|
|
268
519
|
/**
|
|
269
|
-
* Get
|
|
520
|
+
* Get number of meshes in this geometry batch
|
|
270
521
|
* @returns {number}
|
|
271
522
|
*/
|
|
272
|
-
get
|
|
273
|
-
const ret = wasm.
|
|
523
|
+
get meshCount() {
|
|
524
|
+
const ret = wasm.gpugeometry_meshCount(this.__wbg_ptr);
|
|
274
525
|
return ret >>> 0;
|
|
275
526
|
}
|
|
276
527
|
/**
|
|
@@ -289,31 +540,6 @@ export class GpuGeometry {
|
|
|
289
540
|
const ret = wasm.gpugeometry_indicesPtr(this.__wbg_ptr);
|
|
290
541
|
return ret >>> 0;
|
|
291
542
|
}
|
|
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
|
-
}
|
|
317
543
|
/**
|
|
318
544
|
* Get X component of RTC offset
|
|
319
545
|
* @returns {number}
|
|
@@ -338,6 +564,14 @@ export class GpuGeometry {
|
|
|
338
564
|
const ret = wasm.gpugeometry_rtcOffsetZ(this.__wbg_ptr);
|
|
339
565
|
return ret;
|
|
340
566
|
}
|
|
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
|
+
}
|
|
341
575
|
/**
|
|
342
576
|
* Set the RTC (Relative To Center) offset applied to coordinates
|
|
343
577
|
* @param {number} x
|
|
@@ -348,13 +582,54 @@ export class GpuGeometry {
|
|
|
348
582
|
wasm.gpugeometry_set_rtc_offset(this.__wbg_ptr, x, y, z);
|
|
349
583
|
}
|
|
350
584
|
/**
|
|
351
|
-
* Get
|
|
585
|
+
* Get length of vertex data array (in f32 elements, not bytes)
|
|
352
586
|
* @returns {number}
|
|
353
587
|
*/
|
|
354
|
-
get
|
|
355
|
-
const ret = wasm.
|
|
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.
|
|
597
|
+
* @returns {number}
|
|
598
|
+
*/
|
|
599
|
+
get vertexDataPtr() {
|
|
600
|
+
const ret = wasm.gpugeometry_vertexDataPtr(this.__wbg_ptr);
|
|
356
601
|
return ret >>> 0;
|
|
357
602
|
}
|
|
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
|
+
}
|
|
358
633
|
/**
|
|
359
634
|
* Get total vertex count
|
|
360
635
|
* @returns {number}
|
|
@@ -364,32 +639,46 @@ export class GpuGeometry {
|
|
|
364
639
|
return ret >>> 0;
|
|
365
640
|
}
|
|
366
641
|
/**
|
|
367
|
-
* Get byte length of
|
|
642
|
+
* Get byte length of indices (for GPU buffer creation)
|
|
368
643
|
* @returns {number}
|
|
369
644
|
*/
|
|
370
|
-
get
|
|
371
|
-
const ret = wasm.
|
|
645
|
+
get indicesByteLength() {
|
|
646
|
+
const ret = wasm.gpugeometry_indicesByteLength(this.__wbg_ptr);
|
|
372
647
|
return ret >>> 0;
|
|
373
648
|
}
|
|
374
649
|
/**
|
|
375
|
-
* Get
|
|
650
|
+
* Get total triangle count
|
|
376
651
|
* @returns {number}
|
|
377
652
|
*/
|
|
378
|
-
get
|
|
379
|
-
const ret = wasm.
|
|
653
|
+
get totalTriangleCount() {
|
|
654
|
+
const ret = wasm.gpugeometry_totalTriangleCount(this.__wbg_ptr);
|
|
380
655
|
return ret >>> 0;
|
|
381
656
|
}
|
|
382
657
|
/**
|
|
383
|
-
* Get
|
|
384
|
-
*
|
|
385
|
-
* SAFETY: View is only valid until next WASM allocation!
|
|
386
|
-
* Create view, upload to GPU, then discard view immediately.
|
|
658
|
+
* Get byte length of vertex data (for GPU buffer creation)
|
|
387
659
|
* @returns {number}
|
|
388
660
|
*/
|
|
389
|
-
get
|
|
390
|
-
const ret = wasm.
|
|
661
|
+
get vertexDataByteLength() {
|
|
662
|
+
const ret = wasm.gpugeometry_vertexDataByteLength(this.__wbg_ptr);
|
|
391
663
|
return ret >>> 0;
|
|
392
664
|
}
|
|
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
|
+
}
|
|
393
682
|
}
|
|
394
683
|
if (Symbol.dispose) GpuGeometry.prototype[Symbol.dispose] = GpuGeometry.prototype.free;
|
|
395
684
|
|
|
@@ -429,22 +718,22 @@ export class GpuInstancedGeometry {
|
|
|
429
718
|
/**
|
|
430
719
|
* @returns {number}
|
|
431
720
|
*/
|
|
432
|
-
get
|
|
433
|
-
const ret = wasm.
|
|
721
|
+
get indicesLen() {
|
|
722
|
+
const ret = wasm.gpuinstancedgeometry_indicesLen(this.__wbg_ptr);
|
|
434
723
|
return ret >>> 0;
|
|
435
724
|
}
|
|
436
725
|
/**
|
|
437
726
|
* @returns {number}
|
|
438
727
|
*/
|
|
439
|
-
get
|
|
440
|
-
const ret = wasm.
|
|
728
|
+
get indicesPtr() {
|
|
729
|
+
const ret = wasm.gpuinstancedgeometry_indicesPtr(this.__wbg_ptr);
|
|
441
730
|
return ret >>> 0;
|
|
442
731
|
}
|
|
443
732
|
/**
|
|
444
733
|
* @returns {number}
|
|
445
734
|
*/
|
|
446
|
-
get
|
|
447
|
-
const ret = wasm.
|
|
735
|
+
get vertexCount() {
|
|
736
|
+
const ret = wasm.gpuinstancedgeometry_vertexCount(this.__wbg_ptr);
|
|
448
737
|
return ret >>> 0;
|
|
449
738
|
}
|
|
450
739
|
/**
|
|
@@ -457,53 +746,43 @@ export class GpuInstancedGeometry {
|
|
|
457
746
|
/**
|
|
458
747
|
* @returns {number}
|
|
459
748
|
*/
|
|
460
|
-
get
|
|
461
|
-
const ret = wasm.
|
|
749
|
+
get triangleCount() {
|
|
750
|
+
const ret = wasm.gpuinstancedgeometry_triangleCount(this.__wbg_ptr);
|
|
462
751
|
return ret >>> 0;
|
|
463
752
|
}
|
|
464
753
|
/**
|
|
465
754
|
* @returns {number}
|
|
466
755
|
*/
|
|
467
|
-
get
|
|
468
|
-
const ret = wasm.
|
|
756
|
+
get vertexDataLen() {
|
|
757
|
+
const ret = wasm.gpuinstancedgeometry_vertexDataLen(this.__wbg_ptr);
|
|
469
758
|
return ret >>> 0;
|
|
470
759
|
}
|
|
471
760
|
/**
|
|
472
761
|
* @returns {number}
|
|
473
762
|
*/
|
|
474
|
-
get
|
|
475
|
-
const ret = wasm.
|
|
763
|
+
get vertexDataPtr() {
|
|
764
|
+
const ret = wasm.gpuinstancedgeometry_vertexDataPtr(this.__wbg_ptr);
|
|
476
765
|
return ret >>> 0;
|
|
477
766
|
}
|
|
478
767
|
/**
|
|
479
768
|
* @returns {number}
|
|
480
769
|
*/
|
|
481
|
-
get
|
|
482
|
-
const ret = wasm.
|
|
770
|
+
get instanceDataLen() {
|
|
771
|
+
const ret = wasm.gpuinstancedgeometry_instanceDataLen(this.__wbg_ptr);
|
|
483
772
|
return ret >>> 0;
|
|
484
773
|
}
|
|
485
774
|
/**
|
|
486
|
-
*
|
|
487
|
-
* @param {bigint} geometry_id
|
|
775
|
+
* @returns {number}
|
|
488
776
|
*/
|
|
489
|
-
|
|
490
|
-
const ret = wasm.
|
|
491
|
-
this.__wbg_ptr = ret >>> 0;
|
|
492
|
-
GpuInstancedGeometryFinalization.register(this, this.__wbg_ptr, this);
|
|
493
|
-
return this;
|
|
494
|
-
}
|
|
495
|
-
/**
|
|
496
|
-
* @returns {number}
|
|
497
|
-
*/
|
|
498
|
-
get triangleCount() {
|
|
499
|
-
const ret = wasm.gpuinstancedgeometry_triangleCount(this.__wbg_ptr);
|
|
777
|
+
get instanceDataPtr() {
|
|
778
|
+
const ret = wasm.gpuinstancedgeometry_instanceDataPtr(this.__wbg_ptr);
|
|
500
779
|
return ret >>> 0;
|
|
501
780
|
}
|
|
502
781
|
/**
|
|
503
782
|
* @returns {number}
|
|
504
783
|
*/
|
|
505
|
-
get
|
|
506
|
-
const ret = wasm.
|
|
784
|
+
get indicesByteLength() {
|
|
785
|
+
const ret = wasm.gpuinstancedgeometry_indicesByteLength(this.__wbg_ptr);
|
|
507
786
|
return ret >>> 0;
|
|
508
787
|
}
|
|
509
788
|
/**
|
|
@@ -516,17 +795,27 @@ export class GpuInstancedGeometry {
|
|
|
516
795
|
/**
|
|
517
796
|
* @returns {number}
|
|
518
797
|
*/
|
|
519
|
-
get
|
|
520
|
-
const ret = wasm.
|
|
798
|
+
get instanceExpressIdsPtr() {
|
|
799
|
+
const ret = wasm.gpuinstancedgeometry_instanceExpressIdsPtr(this.__wbg_ptr);
|
|
521
800
|
return ret >>> 0;
|
|
522
801
|
}
|
|
523
802
|
/**
|
|
524
803
|
* @returns {number}
|
|
525
804
|
*/
|
|
526
|
-
get
|
|
527
|
-
const ret = wasm.
|
|
805
|
+
get instanceDataByteLength() {
|
|
806
|
+
const ret = wasm.gpuinstancedgeometry_instanceDataByteLength(this.__wbg_ptr);
|
|
528
807
|
return ret >>> 0;
|
|
529
808
|
}
|
|
809
|
+
/**
|
|
810
|
+
* Create new instanced geometry
|
|
811
|
+
* @param {bigint} geometry_id
|
|
812
|
+
*/
|
|
813
|
+
constructor(geometry_id) {
|
|
814
|
+
const ret = wasm.gpuinstancedgeometry_new(geometry_id);
|
|
815
|
+
this.__wbg_ptr = ret >>> 0;
|
|
816
|
+
GpuInstancedGeometryFinalization.register(this, this.__wbg_ptr, this);
|
|
817
|
+
return this;
|
|
818
|
+
}
|
|
530
819
|
}
|
|
531
820
|
if (Symbol.dispose) GpuInstancedGeometry.prototype[Symbol.dispose] = GpuInstancedGeometry.prototype.free;
|
|
532
821
|
|
|
@@ -559,15 +848,11 @@ export class GpuInstancedGeometryCollection {
|
|
|
559
848
|
const ret = wasm.gpuinstancedgeometrycollection_get(this.__wbg_ptr, index);
|
|
560
849
|
return ret === 0 ? undefined : GpuInstancedGeometry.__wrap(ret);
|
|
561
850
|
}
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
*/
|
|
568
|
-
getRef(index) {
|
|
569
|
-
const ret = wasm.gpuinstancedgeometrycollection_getRef(this.__wbg_ptr, index);
|
|
570
|
-
return ret === 0 ? undefined : GpuInstancedGeometryRef.__wrap(ret);
|
|
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;
|
|
571
856
|
}
|
|
572
857
|
/**
|
|
573
858
|
* @returns {number}
|
|
@@ -576,18 +861,22 @@ export class GpuInstancedGeometryCollection {
|
|
|
576
861
|
const ret = wasm.gpuinstancedgeometrycollection_length(this.__wbg_ptr);
|
|
577
862
|
return ret >>> 0;
|
|
578
863
|
}
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
864
|
+
/**
|
|
865
|
+
* Get geometry by index with pointer access over owned buffers.
|
|
866
|
+
* This avoids exposing references tied to collection lifetime.
|
|
867
|
+
* @param {number} index
|
|
868
|
+
* @returns {GpuInstancedGeometryRef | undefined}
|
|
869
|
+
*/
|
|
870
|
+
getRef(index) {
|
|
871
|
+
const ret = wasm.gpuinstancedgeometrycollection_get(this.__wbg_ptr, index);
|
|
872
|
+
return ret === 0 ? undefined : GpuInstancedGeometryRef.__wrap(ret);
|
|
584
873
|
}
|
|
585
874
|
}
|
|
586
875
|
if (Symbol.dispose) GpuInstancedGeometryCollection.prototype[Symbol.dispose] = GpuInstancedGeometryCollection.prototype.free;
|
|
587
876
|
|
|
588
877
|
/**
|
|
589
|
-
*
|
|
590
|
-
*
|
|
878
|
+
* Pointer-friendly geometry view with owned backing storage.
|
|
879
|
+
* Owning buffers prevents dangling pointers after collection mutation/drop.
|
|
591
880
|
*/
|
|
592
881
|
export class GpuInstancedGeometryRef {
|
|
593
882
|
static __wrap(ptr) {
|
|
@@ -611,84 +900,84 @@ export class GpuInstancedGeometryRef {
|
|
|
611
900
|
* @returns {bigint}
|
|
612
901
|
*/
|
|
613
902
|
get geometryId() {
|
|
614
|
-
const ret = wasm.
|
|
903
|
+
const ret = wasm.gpuinstancedgeometry_geometryId(this.__wbg_ptr);
|
|
615
904
|
return BigInt.asUintN(64, ret);
|
|
616
905
|
}
|
|
617
906
|
/**
|
|
618
907
|
* @returns {number}
|
|
619
908
|
*/
|
|
620
|
-
get
|
|
621
|
-
const ret = wasm.
|
|
909
|
+
get indicesLen() {
|
|
910
|
+
const ret = wasm.gpuinstancedgeometry_indicesLen(this.__wbg_ptr);
|
|
622
911
|
return ret >>> 0;
|
|
623
912
|
}
|
|
624
913
|
/**
|
|
625
914
|
* @returns {number}
|
|
626
915
|
*/
|
|
627
|
-
get
|
|
628
|
-
const ret = wasm.
|
|
916
|
+
get indicesPtr() {
|
|
917
|
+
const ret = wasm.gpuinstancedgeometry_indicesPtr(this.__wbg_ptr);
|
|
629
918
|
return ret >>> 0;
|
|
630
919
|
}
|
|
631
920
|
/**
|
|
632
921
|
* @returns {number}
|
|
633
922
|
*/
|
|
634
|
-
get
|
|
635
|
-
const ret = wasm.
|
|
923
|
+
get instanceCount() {
|
|
924
|
+
const ret = wasm.gpuinstancedgeometry_instanceCount(this.__wbg_ptr);
|
|
636
925
|
return ret >>> 0;
|
|
637
926
|
}
|
|
638
927
|
/**
|
|
639
928
|
* @returns {number}
|
|
640
929
|
*/
|
|
641
|
-
get
|
|
642
|
-
const ret = wasm.
|
|
930
|
+
get vertexDataLen() {
|
|
931
|
+
const ret = wasm.gpuinstancedgeometry_vertexDataLen(this.__wbg_ptr);
|
|
643
932
|
return ret >>> 0;
|
|
644
933
|
}
|
|
645
934
|
/**
|
|
646
935
|
* @returns {number}
|
|
647
936
|
*/
|
|
648
|
-
get
|
|
649
|
-
const ret = wasm.
|
|
937
|
+
get vertexDataPtr() {
|
|
938
|
+
const ret = wasm.gpuinstancedgeometry_vertexDataPtr(this.__wbg_ptr);
|
|
650
939
|
return ret >>> 0;
|
|
651
940
|
}
|
|
652
941
|
/**
|
|
653
942
|
* @returns {number}
|
|
654
943
|
*/
|
|
655
944
|
get instanceDataLen() {
|
|
656
|
-
const ret = wasm.
|
|
945
|
+
const ret = wasm.gpuinstancedgeometry_instanceDataLen(this.__wbg_ptr);
|
|
657
946
|
return ret >>> 0;
|
|
658
947
|
}
|
|
659
948
|
/**
|
|
660
949
|
* @returns {number}
|
|
661
950
|
*/
|
|
662
951
|
get instanceDataPtr() {
|
|
663
|
-
const ret = wasm.
|
|
952
|
+
const ret = wasm.gpuinstancedgeometry_instanceDataPtr(this.__wbg_ptr);
|
|
664
953
|
return ret >>> 0;
|
|
665
954
|
}
|
|
666
955
|
/**
|
|
667
956
|
* @returns {number}
|
|
668
957
|
*/
|
|
669
|
-
get
|
|
670
|
-
const ret = wasm.
|
|
958
|
+
get indicesByteLength() {
|
|
959
|
+
const ret = wasm.gpuinstancedgeometry_indicesByteLength(this.__wbg_ptr);
|
|
671
960
|
return ret >>> 0;
|
|
672
961
|
}
|
|
673
962
|
/**
|
|
674
963
|
* @returns {number}
|
|
675
964
|
*/
|
|
676
965
|
get vertexDataByteLength() {
|
|
677
|
-
const ret = wasm.
|
|
966
|
+
const ret = wasm.gpuinstancedgeometry_vertexDataByteLength(this.__wbg_ptr);
|
|
678
967
|
return ret >>> 0;
|
|
679
968
|
}
|
|
680
969
|
/**
|
|
681
970
|
* @returns {number}
|
|
682
971
|
*/
|
|
683
|
-
get
|
|
684
|
-
const ret = wasm.
|
|
972
|
+
get instanceExpressIdsPtr() {
|
|
973
|
+
const ret = wasm.gpuinstancedgeometry_instanceExpressIdsPtr(this.__wbg_ptr);
|
|
685
974
|
return ret >>> 0;
|
|
686
975
|
}
|
|
687
976
|
/**
|
|
688
977
|
* @returns {number}
|
|
689
978
|
*/
|
|
690
|
-
get
|
|
691
|
-
const ret = wasm.
|
|
979
|
+
get instanceDataByteLength() {
|
|
980
|
+
const ret = wasm.gpuinstancedgeometry_instanceDataByteLength(this.__wbg_ptr);
|
|
692
981
|
return ret >>> 0;
|
|
693
982
|
}
|
|
694
983
|
}
|
|
@@ -715,22 +1004,6 @@ export class GpuMeshMetadata {
|
|
|
715
1004
|
const ptr = this.__destroy_into_raw();
|
|
716
1005
|
wasm.__wbg_gpumeshmetadata_free(ptr, 0);
|
|
717
1006
|
}
|
|
718
|
-
/**
|
|
719
|
-
* @returns {Float32Array}
|
|
720
|
-
*/
|
|
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
|
-
}
|
|
733
|
-
}
|
|
734
1007
|
/**
|
|
735
1008
|
* @returns {number}
|
|
736
1009
|
*/
|
|
@@ -741,16 +1014,16 @@ export class GpuMeshMetadata {
|
|
|
741
1014
|
/**
|
|
742
1015
|
* @returns {number}
|
|
743
1016
|
*/
|
|
744
|
-
get
|
|
745
|
-
const ret = wasm.
|
|
746
|
-
return ret;
|
|
1017
|
+
get indexCount() {
|
|
1018
|
+
const ret = wasm.gpumeshmetadata_indexCount(this.__wbg_ptr);
|
|
1019
|
+
return ret >>> 0;
|
|
747
1020
|
}
|
|
748
1021
|
/**
|
|
749
1022
|
* @returns {number}
|
|
750
1023
|
*/
|
|
751
|
-
get
|
|
752
|
-
const ret = wasm.
|
|
753
|
-
return ret
|
|
1024
|
+
get ifcTypeIdx() {
|
|
1025
|
+
const ret = wasm.gpumeshmetadata_ifcTypeIdx(this.__wbg_ptr);
|
|
1026
|
+
return ret;
|
|
754
1027
|
}
|
|
755
1028
|
/**
|
|
756
1029
|
* @returns {number}
|
|
@@ -773,6 +1046,22 @@ export class GpuMeshMetadata {
|
|
|
773
1046
|
const ret = wasm.gpumeshmetadata_vertexOffset(this.__wbg_ptr);
|
|
774
1047
|
return ret >>> 0;
|
|
775
1048
|
}
|
|
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
|
+
}
|
|
776
1065
|
}
|
|
777
1066
|
if (Symbol.dispose) GpuMeshMetadata.prototype[Symbol.dispose] = GpuMeshMetadata.prototype.free;
|
|
778
1067
|
|
|
@@ -790,117 +1079,6 @@ export class IfcAPI {
|
|
|
790
1079
|
const ptr = this.__destroy_into_raw();
|
|
791
1080
|
wasm.__wbg_ifcapi_free(ptr, 0);
|
|
792
1081
|
}
|
|
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
|
-
}
|
|
904
1082
|
/**
|
|
905
1083
|
* Parse IFC file and return individual meshes with express IDs and colors
|
|
906
1084
|
* This matches the MeshData[] format expected by the viewer
|
|
@@ -970,139 +1148,12 @@ export class IfcAPI {
|
|
|
970
1148
|
return takeObject(ret);
|
|
971
1149
|
}
|
|
972
1150
|
/**
|
|
973
|
-
* Parse IFC file and return
|
|
974
|
-
*
|
|
975
|
-
*
|
|
976
|
-
*
|
|
977
|
-
*
|
|
978
|
-
*
|
|
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
|
|
1151
|
+
* Parse IFC file and return GPU-ready geometry for zero-copy upload
|
|
1152
|
+
*
|
|
1153
|
+
* This method generates geometry that is:
|
|
1154
|
+
* - Pre-interleaved (position + normal per vertex)
|
|
1155
|
+
* - Coordinate-converted (Z-up to Y-up)
|
|
1156
|
+
* - Ready for direct GPU upload via pointer access
|
|
1106
1157
|
*
|
|
1107
1158
|
* Example:
|
|
1108
1159
|
* ```javascript
|
|
@@ -1140,6 +1191,34 @@ export class IfcAPI {
|
|
|
1140
1191
|
const ret = wasm.ifcapi_parseToGpuGeometry(this.__wbg_ptr, ptr0, len0);
|
|
1141
1192
|
return GpuGeometry.__wrap(ret);
|
|
1142
1193
|
}
|
|
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
|
+
}
|
|
1143
1222
|
/**
|
|
1144
1223
|
* Parse IFC file with streaming GPU-ready geometry batches
|
|
1145
1224
|
*
|
|
@@ -1182,6 +1261,36 @@ export class IfcAPI {
|
|
|
1182
1261
|
const ret = wasm.ifcapi_parseToGpuGeometryAsync(this.__wbg_ptr, ptr0, len0, addHeapObject(options));
|
|
1183
1262
|
return takeObject(ret);
|
|
1184
1263
|
}
|
|
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
|
+
}
|
|
1185
1294
|
/**
|
|
1186
1295
|
* Parse IFC file to GPU-ready instanced geometry for zero-copy upload
|
|
1187
1296
|
*
|
|
@@ -1226,67 +1335,247 @@ export class IfcAPI {
|
|
|
1226
1335
|
return ZeroCopyMesh.__wrap(ret);
|
|
1227
1336
|
}
|
|
1228
1337
|
/**
|
|
1229
|
-
*
|
|
1230
|
-
* Returns array of entity references for data model parsing
|
|
1231
|
-
* Much faster than TypeScript byte-by-byte scanning (5-10x speedup)
|
|
1338
|
+
* Debug: Test processing entity #953 (FacetedBrep wall)
|
|
1232
1339
|
* @param {string} content
|
|
1233
|
-
* @returns {
|
|
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}
|
|
1340
|
+
* @returns {string}
|
|
1247
1341
|
*/
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1342
|
+
debugProcessEntity953(content) {
|
|
1343
|
+
let deferred2_0;
|
|
1344
|
+
let deferred2_1;
|
|
1345
|
+
try {
|
|
1346
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1347
|
+
const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
|
|
1348
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1349
|
+
wasm.ifcapi_debugProcessEntity953(retptr, this.__wbg_ptr, ptr0, len0);
|
|
1350
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1351
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1352
|
+
deferred2_0 = r0;
|
|
1353
|
+
deferred2_1 = r1;
|
|
1354
|
+
return getStringFromWasm0(r0, r1);
|
|
1355
|
+
} finally {
|
|
1356
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1357
|
+
wasm.__wbindgen_export2(deferred2_0, deferred2_1, 1);
|
|
1358
|
+
}
|
|
1253
1359
|
}
|
|
1254
1360
|
/**
|
|
1255
|
-
*
|
|
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)
|
|
1361
|
+
* Debug: Test processing a single wall
|
|
1259
1362
|
* @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
|
|
1270
1363
|
* @returns {string}
|
|
1271
1364
|
*/
|
|
1272
|
-
|
|
1273
|
-
let
|
|
1274
|
-
let
|
|
1365
|
+
debugProcessFirstWall(content) {
|
|
1366
|
+
let deferred2_0;
|
|
1367
|
+
let deferred2_1;
|
|
1275
1368
|
try {
|
|
1276
1369
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1277
|
-
wasm.
|
|
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);
|
|
1278
1373
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1279
1374
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1280
|
-
|
|
1281
|
-
|
|
1375
|
+
deferred2_0 = r0;
|
|
1376
|
+
deferred2_1 = r1;
|
|
1282
1377
|
return getStringFromWasm0(r0, r1);
|
|
1283
1378
|
} finally {
|
|
1284
1379
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1285
|
-
wasm.__wbindgen_export2(
|
|
1380
|
+
wasm.__wbindgen_export2(deferred2_0, deferred2_1, 1);
|
|
1286
1381
|
}
|
|
1287
1382
|
}
|
|
1288
|
-
|
|
1289
|
-
|
|
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
|
+
}
|
|
1578
|
+
if (Symbol.dispose) IfcAPI.prototype[Symbol.dispose] = IfcAPI.prototype.free;
|
|
1290
1579
|
|
|
1291
1580
|
/**
|
|
1292
1581
|
* Instance data for instanced rendering
|
|
@@ -1309,6 +1598,13 @@ export class InstanceData {
|
|
|
1309
1598
|
const ptr = this.__destroy_into_raw();
|
|
1310
1599
|
wasm.__wbg_instancedata_free(ptr, 0);
|
|
1311
1600
|
}
|
|
1601
|
+
/**
|
|
1602
|
+
* @returns {number}
|
|
1603
|
+
*/
|
|
1604
|
+
get expressId() {
|
|
1605
|
+
const ret = wasm.instancedata_expressId(this.__wbg_ptr);
|
|
1606
|
+
return ret >>> 0;
|
|
1607
|
+
}
|
|
1312
1608
|
/**
|
|
1313
1609
|
* @returns {Float32Array}
|
|
1314
1610
|
*/
|
|
@@ -1325,13 +1621,6 @@ export class InstanceData {
|
|
|
1325
1621
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1326
1622
|
}
|
|
1327
1623
|
}
|
|
1328
|
-
/**
|
|
1329
|
-
* @returns {number}
|
|
1330
|
-
*/
|
|
1331
|
-
get expressId() {
|
|
1332
|
-
const ret = wasm.instancedata_expressId(this.__wbg_ptr);
|
|
1333
|
-
return ret >>> 0;
|
|
1334
|
-
}
|
|
1335
1624
|
/**
|
|
1336
1625
|
* @returns {Float32Array}
|
|
1337
1626
|
*/
|
|
@@ -1367,7 +1656,7 @@ export class InstancedGeometry {
|
|
|
1367
1656
|
* @returns {bigint}
|
|
1368
1657
|
*/
|
|
1369
1658
|
get geometryId() {
|
|
1370
|
-
const ret = wasm.
|
|
1659
|
+
const ret = wasm.gpuinstancedgeometry_geometryId(this.__wbg_ptr);
|
|
1371
1660
|
return BigInt.asUintN(64, ret);
|
|
1372
1661
|
}
|
|
1373
1662
|
/**
|
|
@@ -1378,13 +1667,6 @@ export class InstancedGeometry {
|
|
|
1378
1667
|
const ret = wasm.instancedgeometry_get_instance(this.__wbg_ptr, index);
|
|
1379
1668
|
return ret === 0 ? undefined : InstanceData.__wrap(ret);
|
|
1380
1669
|
}
|
|
1381
|
-
/**
|
|
1382
|
-
* @returns {Uint32Array}
|
|
1383
|
-
*/
|
|
1384
|
-
get indices() {
|
|
1385
|
-
const ret = wasm.instancedgeometry_indices(this.__wbg_ptr);
|
|
1386
|
-
return takeObject(ret);
|
|
1387
|
-
}
|
|
1388
1670
|
/**
|
|
1389
1671
|
* @returns {number}
|
|
1390
1672
|
*/
|
|
@@ -1392,6 +1674,13 @@ export class InstancedGeometry {
|
|
|
1392
1674
|
const ret = wasm.instancedgeometry_instance_count(this.__wbg_ptr);
|
|
1393
1675
|
return ret >>> 0;
|
|
1394
1676
|
}
|
|
1677
|
+
/**
|
|
1678
|
+
* @returns {Uint32Array}
|
|
1679
|
+
*/
|
|
1680
|
+
get indices() {
|
|
1681
|
+
const ret = wasm.instancedgeometry_indices(this.__wbg_ptr);
|
|
1682
|
+
return takeObject(ret);
|
|
1683
|
+
}
|
|
1395
1684
|
/**
|
|
1396
1685
|
* @returns {Float32Array}
|
|
1397
1686
|
*/
|
|
@@ -1430,33 +1719,33 @@ export class InstancedMeshCollection {
|
|
|
1430
1719
|
const ptr = this.__destroy_into_raw();
|
|
1431
1720
|
wasm.__wbg_instancedmeshcollection_free(ptr, 0);
|
|
1432
1721
|
}
|
|
1433
|
-
/**
|
|
1434
|
-
* @param {number} index
|
|
1435
|
-
* @returns {InstancedGeometry | undefined}
|
|
1436
|
-
*/
|
|
1437
|
-
get(index) {
|
|
1438
|
-
const ret = wasm.instancedmeshcollection_get(this.__wbg_ptr, index);
|
|
1439
|
-
return ret === 0 ? undefined : InstancedGeometry.__wrap(ret);
|
|
1440
|
-
}
|
|
1441
1722
|
/**
|
|
1442
1723
|
* @returns {number}
|
|
1443
1724
|
*/
|
|
1444
|
-
get
|
|
1445
|
-
const ret = wasm.
|
|
1725
|
+
get totalInstances() {
|
|
1726
|
+
const ret = wasm.instancedmeshcollection_totalInstances(this.__wbg_ptr);
|
|
1446
1727
|
return ret >>> 0;
|
|
1447
1728
|
}
|
|
1448
1729
|
/**
|
|
1449
1730
|
* @returns {number}
|
|
1450
1731
|
*/
|
|
1451
1732
|
get totalGeometries() {
|
|
1452
|
-
const ret = wasm.
|
|
1733
|
+
const ret = wasm.gpuinstancedgeometrycollection_length(this.__wbg_ptr);
|
|
1453
1734
|
return ret >>> 0;
|
|
1454
1735
|
}
|
|
1736
|
+
/**
|
|
1737
|
+
* @param {number} index
|
|
1738
|
+
* @returns {InstancedGeometry | undefined}
|
|
1739
|
+
*/
|
|
1740
|
+
get(index) {
|
|
1741
|
+
const ret = wasm.instancedmeshcollection_get(this.__wbg_ptr, index);
|
|
1742
|
+
return ret === 0 ? undefined : InstancedGeometry.__wrap(ret);
|
|
1743
|
+
}
|
|
1455
1744
|
/**
|
|
1456
1745
|
* @returns {number}
|
|
1457
1746
|
*/
|
|
1458
|
-
get
|
|
1459
|
-
const ret = wasm.
|
|
1747
|
+
get length() {
|
|
1748
|
+
const ret = wasm.gpuinstancedgeometrycollection_length(this.__wbg_ptr);
|
|
1460
1749
|
return ret >>> 0;
|
|
1461
1750
|
}
|
|
1462
1751
|
}
|
|
@@ -1484,29 +1773,29 @@ export class MeshCollection {
|
|
|
1484
1773
|
wasm.__wbg_meshcollection_free(ptr, 0);
|
|
1485
1774
|
}
|
|
1486
1775
|
/**
|
|
1487
|
-
* Get
|
|
1488
|
-
*
|
|
1489
|
-
* @returns {number
|
|
1776
|
+
* Get RTC offset X (for converting local coords back to world coords)
|
|
1777
|
+
* Add this to local X coordinates to get world X coordinates
|
|
1778
|
+
* @returns {number}
|
|
1490
1779
|
*/
|
|
1491
|
-
get
|
|
1492
|
-
|
|
1493
|
-
|
|
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
|
-
}
|
|
1780
|
+
get rtcOffsetX() {
|
|
1781
|
+
const ret = wasm.gpugeometry_rtcOffsetZ(this.__wbg_ptr);
|
|
1782
|
+
return ret;
|
|
1501
1783
|
}
|
|
1502
1784
|
/**
|
|
1503
|
-
* Get
|
|
1504
|
-
* @
|
|
1505
|
-
* @returns {MeshDataJs | undefined}
|
|
1785
|
+
* Get RTC offset Y
|
|
1786
|
+
* @returns {number}
|
|
1506
1787
|
*/
|
|
1507
|
-
get(
|
|
1508
|
-
const ret = wasm.
|
|
1509
|
-
return ret
|
|
1788
|
+
get rtcOffsetY() {
|
|
1789
|
+
const ret = wasm.meshcollection_rtcOffsetY(this.__wbg_ptr);
|
|
1790
|
+
return ret;
|
|
1791
|
+
}
|
|
1792
|
+
/**
|
|
1793
|
+
* Get RTC offset Z
|
|
1794
|
+
* @returns {number}
|
|
1795
|
+
*/
|
|
1796
|
+
get rtcOffsetZ() {
|
|
1797
|
+
const ret = wasm.meshcollection_rtcOffsetZ(this.__wbg_ptr);
|
|
1798
|
+
return ret;
|
|
1510
1799
|
}
|
|
1511
1800
|
/**
|
|
1512
1801
|
* Check if RTC offset is significant (>10km)
|
|
@@ -1516,14 +1805,6 @@ export class MeshCollection {
|
|
|
1516
1805
|
const ret = wasm.meshcollection_hasRtcOffset(this.__wbg_ptr);
|
|
1517
1806
|
return ret !== 0;
|
|
1518
1807
|
}
|
|
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
|
-
}
|
|
1527
1808
|
/**
|
|
1528
1809
|
* Convert local coordinates to world coordinates
|
|
1529
1810
|
* Use this to convert mesh positions back to original IFC coordinates
|
|
@@ -1546,44 +1827,52 @@ export class MeshCollection {
|
|
|
1546
1827
|
}
|
|
1547
1828
|
}
|
|
1548
1829
|
/**
|
|
1549
|
-
* Get
|
|
1550
|
-
* Add this to local X coordinates to get world X coordinates
|
|
1830
|
+
* Get total vertex count across all meshes
|
|
1551
1831
|
* @returns {number}
|
|
1552
1832
|
*/
|
|
1553
|
-
get
|
|
1554
|
-
const ret = wasm.
|
|
1555
|
-
return ret;
|
|
1833
|
+
get totalVertices() {
|
|
1834
|
+
const ret = wasm.meshcollection_totalVertices(this.__wbg_ptr);
|
|
1835
|
+
return ret >>> 0;
|
|
1556
1836
|
}
|
|
1557
1837
|
/**
|
|
1558
|
-
* Get
|
|
1838
|
+
* Get total triangle count across all meshes
|
|
1559
1839
|
* @returns {number}
|
|
1560
1840
|
*/
|
|
1561
|
-
get
|
|
1562
|
-
const ret = wasm.
|
|
1563
|
-
return ret;
|
|
1841
|
+
get totalTriangles() {
|
|
1842
|
+
const ret = wasm.meshcollection_totalTriangles(this.__wbg_ptr);
|
|
1843
|
+
return ret >>> 0;
|
|
1564
1844
|
}
|
|
1565
1845
|
/**
|
|
1566
|
-
* Get
|
|
1567
|
-
*
|
|
1846
|
+
* Get building rotation angle in radians (from IfcSite placement)
|
|
1847
|
+
* Returns None if no rotation was detected
|
|
1848
|
+
* @returns {number | undefined}
|
|
1568
1849
|
*/
|
|
1569
|
-
get
|
|
1570
|
-
|
|
1571
|
-
|
|
1850
|
+
get buildingRotation() {
|
|
1851
|
+
try {
|
|
1852
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
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
|
+
}
|
|
1572
1860
|
}
|
|
1573
1861
|
/**
|
|
1574
|
-
* Get
|
|
1575
|
-
* @
|
|
1862
|
+
* Get mesh at index
|
|
1863
|
+
* @param {number} index
|
|
1864
|
+
* @returns {MeshDataJs | undefined}
|
|
1576
1865
|
*/
|
|
1577
|
-
get
|
|
1578
|
-
const ret = wasm.
|
|
1579
|
-
return ret
|
|
1866
|
+
get(index) {
|
|
1867
|
+
const ret = wasm.meshcollection_get(this.__wbg_ptr, index);
|
|
1868
|
+
return ret === 0 ? undefined : MeshDataJs.__wrap(ret);
|
|
1580
1869
|
}
|
|
1581
1870
|
/**
|
|
1582
|
-
* Get
|
|
1871
|
+
* Get number of meshes
|
|
1583
1872
|
* @returns {number}
|
|
1584
1873
|
*/
|
|
1585
|
-
get
|
|
1586
|
-
const ret = wasm.
|
|
1874
|
+
get length() {
|
|
1875
|
+
const ret = wasm.meshcollection_length(this.__wbg_ptr);
|
|
1587
1876
|
return ret >>> 0;
|
|
1588
1877
|
}
|
|
1589
1878
|
}
|
|
@@ -1610,6 +1899,14 @@ export class MeshCollectionWithRtc {
|
|
|
1610
1899
|
const ptr = this.__destroy_into_raw();
|
|
1611
1900
|
wasm.__wbg_meshcollectionwithrtc_free(ptr, 0);
|
|
1612
1901
|
}
|
|
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
|
+
}
|
|
1613
1910
|
/**
|
|
1614
1911
|
* Get mesh at index
|
|
1615
1912
|
* @param {number} index
|
|
@@ -1624,7 +1921,7 @@ export class MeshCollectionWithRtc {
|
|
|
1624
1921
|
* @returns {number}
|
|
1625
1922
|
*/
|
|
1626
1923
|
get length() {
|
|
1627
|
-
const ret = wasm.
|
|
1924
|
+
const ret = wasm.meshcollection_length(this.__wbg_ptr);
|
|
1628
1925
|
return ret >>> 0;
|
|
1629
1926
|
}
|
|
1630
1927
|
/**
|
|
@@ -1635,14 +1932,6 @@ export class MeshCollectionWithRtc {
|
|
|
1635
1932
|
const ret = wasm.meshcollectionwithrtc_meshes(this.__wbg_ptr);
|
|
1636
1933
|
return MeshCollection.__wrap(ret);
|
|
1637
1934
|
}
|
|
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
|
-
}
|
|
1646
1935
|
}
|
|
1647
1936
|
if (Symbol.dispose) MeshCollectionWithRtc.prototype[Symbol.dispose] = MeshCollectionWithRtc.prototype.free;
|
|
1648
1937
|
|
|
@@ -1667,6 +1956,30 @@ export class MeshDataJs {
|
|
|
1667
1956
|
const ptr = this.__destroy_into_raw();
|
|
1668
1957
|
wasm.__wbg_meshdatajs_free(ptr, 0);
|
|
1669
1958
|
}
|
|
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
|
+
}
|
|
1670
1983
|
/**
|
|
1671
1984
|
* Get color as [r, g, b, a] array
|
|
1672
1985
|
* @returns {Float32Array}
|
|
@@ -1685,12 +1998,20 @@ export class MeshDataJs {
|
|
|
1685
1998
|
}
|
|
1686
1999
|
}
|
|
1687
2000
|
/**
|
|
1688
|
-
* Get
|
|
1689
|
-
* @returns {
|
|
2001
|
+
* Get indices as Uint32Array (copy to JS)
|
|
2002
|
+
* @returns {Uint32Array}
|
|
1690
2003
|
*/
|
|
1691
|
-
get
|
|
1692
|
-
const ret = wasm.
|
|
1693
|
-
return ret
|
|
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}
|
|
2011
|
+
*/
|
|
2012
|
+
get normals() {
|
|
2013
|
+
const ret = wasm.meshdatajs_normals(this.__wbg_ptr);
|
|
2014
|
+
return takeObject(ret);
|
|
1694
2015
|
}
|
|
1695
2016
|
/**
|
|
1696
2017
|
* Get IFC type name (e.g., "IfcWall", "IfcSpace")
|
|
@@ -1712,22 +2033,6 @@ export class MeshDataJs {
|
|
|
1712
2033
|
wasm.__wbindgen_export2(deferred1_0, deferred1_1, 1);
|
|
1713
2034
|
}
|
|
1714
2035
|
}
|
|
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
|
-
}
|
|
1731
2036
|
/**
|
|
1732
2037
|
* Get positions as Float32Array (copy to JS)
|
|
1733
2038
|
* @returns {Float32Array}
|
|
@@ -1736,22 +2041,6 @@ export class MeshDataJs {
|
|
|
1736
2041
|
const ret = wasm.meshdatajs_positions(this.__wbg_ptr);
|
|
1737
2042
|
return takeObject(ret);
|
|
1738
2043
|
}
|
|
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
|
-
}
|
|
1755
2044
|
}
|
|
1756
2045
|
if (Symbol.dispose) MeshDataJs.prototype[Symbol.dispose] = MeshDataJs.prototype.free;
|
|
1757
2046
|
|
|
@@ -1781,25 +2070,46 @@ export class RtcOffsetJs {
|
|
|
1781
2070
|
* @returns {number}
|
|
1782
2071
|
*/
|
|
1783
2072
|
get x() {
|
|
1784
|
-
const ret = wasm.
|
|
2073
|
+
const ret = wasm.__wbg_get_georeferencejs_eastings(this.__wbg_ptr);
|
|
1785
2074
|
return ret;
|
|
1786
2075
|
}
|
|
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
|
+
}
|
|
1787
2083
|
/**
|
|
1788
2084
|
* Y offset
|
|
1789
2085
|
* @returns {number}
|
|
1790
2086
|
*/
|
|
1791
2087
|
get y() {
|
|
1792
|
-
const ret = wasm.
|
|
2088
|
+
const ret = wasm.__wbg_get_georeferencejs_northings(this.__wbg_ptr);
|
|
1793
2089
|
return ret;
|
|
1794
2090
|
}
|
|
2091
|
+
/**
|
|
2092
|
+
* Y offset
|
|
2093
|
+
* @param {number} arg0
|
|
2094
|
+
*/
|
|
2095
|
+
set y(arg0) {
|
|
2096
|
+
wasm.__wbg_set_georeferencejs_northings(this.__wbg_ptr, arg0);
|
|
2097
|
+
}
|
|
1795
2098
|
/**
|
|
1796
2099
|
* Z offset
|
|
1797
2100
|
* @returns {number}
|
|
1798
2101
|
*/
|
|
1799
2102
|
get z() {
|
|
1800
|
-
const ret = wasm.
|
|
2103
|
+
const ret = wasm.__wbg_get_georeferencejs_orthogonal_height(this.__wbg_ptr);
|
|
1801
2104
|
return ret;
|
|
1802
2105
|
}
|
|
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
|
+
}
|
|
1803
2113
|
/**
|
|
1804
2114
|
* Check if offset is significant (>10km)
|
|
1805
2115
|
* @returns {boolean}
|
|
@@ -1828,27 +2138,6 @@ export class RtcOffsetJs {
|
|
|
1828
2138
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1829
2139
|
}
|
|
1830
2140
|
}
|
|
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
|
-
}
|
|
1852
2141
|
}
|
|
1853
2142
|
if (Symbol.dispose) RtcOffsetJs.prototype[Symbol.dispose] = RtcOffsetJs.prototype.free;
|
|
1854
2143
|
|
|
@@ -1876,40 +2165,34 @@ export class SymbolicCircle {
|
|
|
1876
2165
|
/**
|
|
1877
2166
|
* @returns {number}
|
|
1878
2167
|
*/
|
|
1879
|
-
get
|
|
1880
|
-
const ret = wasm.
|
|
1881
|
-
return ret;
|
|
1882
|
-
}
|
|
1883
|
-
/**
|
|
1884
|
-
* @returns {number}
|
|
1885
|
-
*/
|
|
1886
|
-
get centerY() {
|
|
1887
|
-
const ret = wasm.symboliccircle_centerY(this.__wbg_ptr);
|
|
1888
|
-
return ret;
|
|
2168
|
+
get expressId() {
|
|
2169
|
+
const ret = wasm.gpumeshmetadata_vertexCount(this.__wbg_ptr);
|
|
2170
|
+
return ret >>> 0;
|
|
1889
2171
|
}
|
|
1890
2172
|
/**
|
|
1891
2173
|
* @returns {number}
|
|
1892
2174
|
*/
|
|
1893
|
-
get
|
|
1894
|
-
const ret = wasm.
|
|
2175
|
+
get startAngle() {
|
|
2176
|
+
const ret = wasm.symboliccircle_startAngle(this.__wbg_ptr);
|
|
1895
2177
|
return ret;
|
|
1896
2178
|
}
|
|
1897
2179
|
/**
|
|
1898
|
-
*
|
|
2180
|
+
* Check if this is a full circle
|
|
2181
|
+
* @returns {boolean}
|
|
1899
2182
|
*/
|
|
1900
|
-
get
|
|
1901
|
-
const ret = wasm.
|
|
1902
|
-
return ret
|
|
2183
|
+
get isFullCircle() {
|
|
2184
|
+
const ret = wasm.symboliccircle_isFullCircle(this.__wbg_ptr);
|
|
2185
|
+
return ret !== 0;
|
|
1903
2186
|
}
|
|
1904
2187
|
/**
|
|
1905
2188
|
* @returns {string}
|
|
1906
2189
|
*/
|
|
1907
|
-
get
|
|
2190
|
+
get repIdentifier() {
|
|
1908
2191
|
let deferred1_0;
|
|
1909
2192
|
let deferred1_1;
|
|
1910
2193
|
try {
|
|
1911
2194
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1912
|
-
wasm.
|
|
2195
|
+
wasm.symboliccircle_repIdentifier(retptr, this.__wbg_ptr);
|
|
1913
2196
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1914
2197
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1915
2198
|
deferred1_0 = r0;
|
|
@@ -1921,29 +2204,35 @@ export class SymbolicCircle {
|
|
|
1921
2204
|
}
|
|
1922
2205
|
}
|
|
1923
2206
|
/**
|
|
1924
|
-
*
|
|
1925
|
-
* @returns {boolean}
|
|
2207
|
+
* @returns {number}
|
|
1926
2208
|
*/
|
|
1927
|
-
get
|
|
1928
|
-
const ret = wasm.
|
|
1929
|
-
return ret
|
|
2209
|
+
get radius() {
|
|
2210
|
+
const ret = wasm.symboliccircle_radius(this.__wbg_ptr);
|
|
2211
|
+
return ret;
|
|
1930
2212
|
}
|
|
1931
2213
|
/**
|
|
1932
2214
|
* @returns {number}
|
|
1933
2215
|
*/
|
|
1934
|
-
get
|
|
1935
|
-
const ret = wasm.
|
|
2216
|
+
get centerX() {
|
|
2217
|
+
const ret = wasm.symboliccircle_centerX(this.__wbg_ptr);
|
|
2218
|
+
return ret;
|
|
2219
|
+
}
|
|
2220
|
+
/**
|
|
2221
|
+
* @returns {number}
|
|
2222
|
+
*/
|
|
2223
|
+
get centerY() {
|
|
2224
|
+
const ret = wasm.symboliccircle_centerY(this.__wbg_ptr);
|
|
1936
2225
|
return ret;
|
|
1937
2226
|
}
|
|
1938
2227
|
/**
|
|
1939
2228
|
* @returns {string}
|
|
1940
2229
|
*/
|
|
1941
|
-
get
|
|
2230
|
+
get ifcType() {
|
|
1942
2231
|
let deferred1_0;
|
|
1943
2232
|
let deferred1_1;
|
|
1944
2233
|
try {
|
|
1945
2234
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1946
|
-
wasm.
|
|
2235
|
+
wasm.symboliccircle_ifcType(retptr, this.__wbg_ptr);
|
|
1947
2236
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1948
2237
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1949
2238
|
deferred1_0 = r0;
|
|
@@ -1957,8 +2246,8 @@ export class SymbolicCircle {
|
|
|
1957
2246
|
/**
|
|
1958
2247
|
* @returns {number}
|
|
1959
2248
|
*/
|
|
1960
|
-
get
|
|
1961
|
-
const ret = wasm.
|
|
2249
|
+
get endAngle() {
|
|
2250
|
+
const ret = wasm.symboliccircle_endAngle(this.__wbg_ptr);
|
|
1962
2251
|
return ret;
|
|
1963
2252
|
}
|
|
1964
2253
|
}
|
|
@@ -1995,15 +2284,23 @@ export class SymbolicPolyline {
|
|
|
1995
2284
|
return ret >>> 0;
|
|
1996
2285
|
}
|
|
1997
2286
|
/**
|
|
1998
|
-
* Get
|
|
2287
|
+
* Get number of points
|
|
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")
|
|
1999
2296
|
* @returns {string}
|
|
2000
2297
|
*/
|
|
2001
|
-
get
|
|
2298
|
+
get repIdentifier() {
|
|
2002
2299
|
let deferred1_0;
|
|
2003
2300
|
let deferred1_1;
|
|
2004
2301
|
try {
|
|
2005
2302
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2006
|
-
wasm.
|
|
2303
|
+
wasm.symbolicpolyline_repIdentifier(retptr, this.__wbg_ptr);
|
|
2007
2304
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
2008
2305
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
2009
2306
|
deferred1_0 = r0;
|
|
@@ -2014,22 +2311,6 @@ export class SymbolicPolyline {
|
|
|
2014
2311
|
wasm.__wbindgen_export2(deferred1_0, deferred1_1, 1);
|
|
2015
2312
|
}
|
|
2016
2313
|
}
|
|
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
|
-
}
|
|
2033
2314
|
/**
|
|
2034
2315
|
* Get 2D points as Float32Array [x1, y1, x2, y2, ...]
|
|
2035
2316
|
* @returns {Float32Array}
|
|
@@ -2039,15 +2320,15 @@ export class SymbolicPolyline {
|
|
|
2039
2320
|
return takeObject(ret);
|
|
2040
2321
|
}
|
|
2041
2322
|
/**
|
|
2042
|
-
* Get
|
|
2323
|
+
* Get IFC type name (e.g., "IfcDoor", "IfcWindow")
|
|
2043
2324
|
* @returns {string}
|
|
2044
2325
|
*/
|
|
2045
|
-
get
|
|
2326
|
+
get ifcType() {
|
|
2046
2327
|
let deferred1_0;
|
|
2047
2328
|
let deferred1_1;
|
|
2048
2329
|
try {
|
|
2049
2330
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2050
|
-
wasm.
|
|
2331
|
+
wasm.symbolicpolyline_ifcType(retptr, this.__wbg_ptr);
|
|
2051
2332
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
2052
2333
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
2053
2334
|
deferred1_0 = r0;
|
|
@@ -2058,6 +2339,14 @@ export class SymbolicPolyline {
|
|
|
2058
2339
|
wasm.__wbindgen_export2(deferred1_0, deferred1_1, 1);
|
|
2059
2340
|
}
|
|
2060
2341
|
}
|
|
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
|
+
}
|
|
2061
2350
|
}
|
|
2062
2351
|
if (Symbol.dispose) SymbolicPolyline.prototype[Symbol.dispose] = SymbolicPolyline.prototype.free;
|
|
2063
2352
|
|
|
@@ -2082,6 +2371,23 @@ export class SymbolicRepresentationCollection {
|
|
|
2082
2371
|
const ptr = this.__destroy_into_raw();
|
|
2083
2372
|
wasm.__wbg_symbolicrepresentationcollection_free(ptr, 0);
|
|
2084
2373
|
}
|
|
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
|
+
}
|
|
2085
2391
|
/**
|
|
2086
2392
|
* Get number of circles/arcs
|
|
2087
2393
|
* @returns {number}
|
|
@@ -2091,13 +2397,21 @@ export class SymbolicRepresentationCollection {
|
|
|
2091
2397
|
return ret >>> 0;
|
|
2092
2398
|
}
|
|
2093
2399
|
/**
|
|
2094
|
-
* Get
|
|
2400
|
+
* Get polyline at index
|
|
2095
2401
|
* @param {number} index
|
|
2096
|
-
* @returns {
|
|
2402
|
+
* @returns {SymbolicPolyline | undefined}
|
|
2097
2403
|
*/
|
|
2098
|
-
|
|
2099
|
-
const ret = wasm.
|
|
2100
|
-
return ret === 0 ? undefined :
|
|
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}
|
|
2411
|
+
*/
|
|
2412
|
+
get polylineCount() {
|
|
2413
|
+
const ret = wasm.symbolicrepresentationcollection_polylineCount(this.__wbg_ptr);
|
|
2414
|
+
return ret >>> 0;
|
|
2101
2415
|
}
|
|
2102
2416
|
/**
|
|
2103
2417
|
* Get all express IDs that have symbolic representations
|
|
@@ -2116,15 +2430,6 @@ export class SymbolicRepresentationCollection {
|
|
|
2116
2430
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2117
2431
|
}
|
|
2118
2432
|
}
|
|
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
|
-
}
|
|
2128
2433
|
/**
|
|
2129
2434
|
* Check if collection is empty
|
|
2130
2435
|
* @returns {boolean}
|
|
@@ -2133,22 +2438,6 @@ export class SymbolicRepresentationCollection {
|
|
|
2133
2438
|
const ret = wasm.symbolicrepresentationcollection_isEmpty(this.__wbg_ptr);
|
|
2134
2439
|
return ret !== 0;
|
|
2135
2440
|
}
|
|
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
|
-
}
|
|
2152
2441
|
}
|
|
2153
2442
|
if (Symbol.dispose) SymbolicRepresentationCollection.prototype[Symbol.dispose] = SymbolicRepresentationCollection.prototype.free;
|
|
2154
2443
|
|
|
@@ -2212,7 +2501,7 @@ export class ZeroCopyMesh {
|
|
|
2212
2501
|
* @returns {number}
|
|
2213
2502
|
*/
|
|
2214
2503
|
get indices_len() {
|
|
2215
|
-
const ret = wasm.
|
|
2504
|
+
const ret = wasm.gpuinstancedgeometry_indicesLen(this.__wbg_ptr);
|
|
2216
2505
|
return ret >>> 0;
|
|
2217
2506
|
}
|
|
2218
2507
|
/**
|
|
@@ -2220,26 +2509,9 @@ export class ZeroCopyMesh {
|
|
|
2220
2509
|
* @returns {number}
|
|
2221
2510
|
*/
|
|
2222
2511
|
get indices_ptr() {
|
|
2223
|
-
const ret = wasm.
|
|
2512
|
+
const ret = wasm.gpuinstancedgeometry_indicesPtr(this.__wbg_ptr);
|
|
2224
2513
|
return ret >>> 0;
|
|
2225
2514
|
}
|
|
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
|
-
}
|
|
2243
2515
|
/**
|
|
2244
2516
|
* Get length of normals array
|
|
2245
2517
|
* @returns {number}
|
|
@@ -2253,7 +2525,15 @@ export class ZeroCopyMesh {
|
|
|
2253
2525
|
* @returns {number}
|
|
2254
2526
|
*/
|
|
2255
2527
|
get normals_ptr() {
|
|
2256
|
-
const ret = wasm.
|
|
2528
|
+
const ret = wasm.gpuinstancedgeometry_vertexDataPtr(this.__wbg_ptr);
|
|
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);
|
|
2257
2537
|
return ret >>> 0;
|
|
2258
2538
|
}
|
|
2259
2539
|
/**
|
|
@@ -2271,595 +2551,87 @@ export class ZeroCopyMesh {
|
|
|
2271
2551
|
*/
|
|
2272
2552
|
get positions_ptr() {
|
|
2273
2553
|
const ret = wasm.zerocopymesh_positions_ptr(this.__wbg_ptr);
|
|
2274
|
-
return ret >>> 0;
|
|
2275
|
-
}
|
|
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_1070(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_1032, __wasm_bindgen_func_elem_1037);
|
|
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_480, __wasm_bindgen_func_elem_484);
|
|
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_wasm_bg.js": import0,
|
|
2566
|
-
};
|
|
2567
|
-
}
|
|
2568
|
-
|
|
2569
|
-
function __wasm_bindgen_func_elem_484(arg0, arg1) {
|
|
2570
|
-
wasm.__wasm_bindgen_func_elem_484(arg0, arg1);
|
|
2571
|
-
}
|
|
2572
|
-
|
|
2573
|
-
function __wasm_bindgen_func_elem_1037(arg0, arg1, arg2) {
|
|
2574
|
-
try {
|
|
2575
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2576
|
-
wasm.__wasm_bindgen_func_elem_1037(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_1070(arg0, arg1, arg2, arg3) {
|
|
2588
|
-
wasm.__wasm_bindgen_func_elem_1070(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));
|
|
2554
|
+
return ret >>> 0;
|
|
2732
2555
|
}
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
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;
|
|
2556
|
+
/**
|
|
2557
|
+
* Get triangle count
|
|
2558
|
+
* @returns {number}
|
|
2559
|
+
*/
|
|
2560
|
+
get triangle_count() {
|
|
2561
|
+
const ret = wasm.gpuinstancedgeometry_triangleCount(this.__wbg_ptr);
|
|
2562
|
+
return ret >>> 0;
|
|
2786
2563
|
}
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
for (; offset < len; offset++) {
|
|
2796
|
-
const code = arg.charCodeAt(offset);
|
|
2797
|
-
if (code > 0x7F) break;
|
|
2798
|
-
mem[ptr + offset] = code;
|
|
2564
|
+
/**
|
|
2565
|
+
* Create a new zero-copy mesh from a Mesh
|
|
2566
|
+
*/
|
|
2567
|
+
constructor() {
|
|
2568
|
+
const ret = wasm.zerocopymesh_new();
|
|
2569
|
+
this.__wbg_ptr = ret >>> 0;
|
|
2570
|
+
ZeroCopyMeshFinalization.register(this, this.__wbg_ptr, this);
|
|
2571
|
+
return this;
|
|
2799
2572
|
}
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
const
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
offset += ret.written;
|
|
2809
|
-
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
2573
|
+
/**
|
|
2574
|
+
* Check if mesh is empty
|
|
2575
|
+
* @returns {boolean}
|
|
2576
|
+
*/
|
|
2577
|
+
get is_empty() {
|
|
2578
|
+
const ret = wasm.zerocopymesh_is_empty(this.__wbg_ptr);
|
|
2579
|
+
return ret !== 0;
|
|
2810
2580
|
}
|
|
2811
|
-
|
|
2812
|
-
WASM_VECTOR_LEN = offset;
|
|
2813
|
-
return ptr;
|
|
2814
2581
|
}
|
|
2582
|
+
if (Symbol.dispose) ZeroCopyMesh.prototype[Symbol.dispose] = ZeroCopyMesh.prototype.free;
|
|
2815
2583
|
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2584
|
+
/**
|
|
2585
|
+
* Get WASM memory to allow JavaScript to create TypedArray views
|
|
2586
|
+
* @returns {any}
|
|
2587
|
+
*/
|
|
2588
|
+
export function get_memory() {
|
|
2589
|
+
const ret = wasm.get_memory();
|
|
2590
|
+
return takeObject(ret);
|
|
2820
2591
|
}
|
|
2821
2592
|
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
cachedTextDecoder.decode();
|
|
2831
|
-
numBytesDecoded = len;
|
|
2832
|
-
}
|
|
2833
|
-
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
2593
|
+
/**
|
|
2594
|
+
* Initialize the WASM module.
|
|
2595
|
+
*
|
|
2596
|
+
* This function is called automatically when the WASM module is loaded.
|
|
2597
|
+
* It sets up panic hooks for better error messages in the browser console.
|
|
2598
|
+
*/
|
|
2599
|
+
export function init() {
|
|
2600
|
+
wasm.init();
|
|
2834
2601
|
}
|
|
2835
2602
|
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2603
|
+
/**
|
|
2604
|
+
* Get the version of IFC-Lite.
|
|
2605
|
+
*
|
|
2606
|
+
* # Returns
|
|
2607
|
+
*
|
|
2608
|
+
* Version string (e.g., "0.1.0")
|
|
2609
|
+
*
|
|
2610
|
+
* # Example
|
|
2611
|
+
*
|
|
2612
|
+
* ```javascript
|
|
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);
|
|
2631
|
+
}
|
|
2847
2632
|
}
|
|
2848
2633
|
|
|
2849
|
-
|
|
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
|
-
}
|
|
2634
|
+
const EXPECTED_RESPONSE_TYPES = new Set(['basic', 'cors', 'default']);
|
|
2863
2635
|
|
|
2864
2636
|
async function __wbg_load(module, imports) {
|
|
2865
2637
|
if (typeof Response === 'function' && module instanceof Response) {
|
|
@@ -2867,12 +2639,14 @@ async function __wbg_load(module, imports) {
|
|
|
2867
2639
|
try {
|
|
2868
2640
|
return await WebAssembly.instantiateStreaming(module, imports);
|
|
2869
2641
|
} catch (e) {
|
|
2870
|
-
const validResponse = module.ok &&
|
|
2642
|
+
const validResponse = module.ok && EXPECTED_RESPONSE_TYPES.has(module.type);
|
|
2871
2643
|
|
|
2872
2644
|
if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
|
|
2873
2645
|
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);
|
|
2874
2646
|
|
|
2875
|
-
} else {
|
|
2647
|
+
} else {
|
|
2648
|
+
throw e;
|
|
2649
|
+
}
|
|
2876
2650
|
}
|
|
2877
2651
|
}
|
|
2878
2652
|
|
|
@@ -2887,20 +2661,252 @@ async function __wbg_load(module, imports) {
|
|
|
2887
2661
|
return instance;
|
|
2888
2662
|
}
|
|
2889
2663
|
}
|
|
2664
|
+
}
|
|
2890
2665
|
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2666
|
+
function __wbg_get_imports() {
|
|
2667
|
+
const imports = {};
|
|
2668
|
+
imports.wbg = {};
|
|
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);
|
|
2894
2725
|
}
|
|
2895
|
-
|
|
2896
|
-
|
|
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;
|
|
2779
|
+
}
|
|
2780
|
+
};
|
|
2781
|
+
imports.wbg.__wbg_new_from_slice_41e2764a343e3cb1 = function(arg0, arg1) {
|
|
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;
|
|
2897
2903
|
}
|
|
2898
2904
|
|
|
2899
2905
|
function initSync(module) {
|
|
2900
2906
|
if (wasm !== undefined) return wasm;
|
|
2901
2907
|
|
|
2902
2908
|
|
|
2903
|
-
if (module !== undefined) {
|
|
2909
|
+
if (typeof module !== 'undefined') {
|
|
2904
2910
|
if (Object.getPrototypeOf(module) === Object.prototype) {
|
|
2905
2911
|
({module} = module)
|
|
2906
2912
|
} else {
|
|
@@ -2920,7 +2926,7 @@ async function __wbg_init(module_or_path) {
|
|
|
2920
2926
|
if (wasm !== undefined) return wasm;
|
|
2921
2927
|
|
|
2922
2928
|
|
|
2923
|
-
if (module_or_path !== undefined) {
|
|
2929
|
+
if (typeof module_or_path !== 'undefined') {
|
|
2924
2930
|
if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
|
|
2925
2931
|
({module_or_path} = module_or_path)
|
|
2926
2932
|
} else {
|
|
@@ -2928,7 +2934,7 @@ async function __wbg_init(module_or_path) {
|
|
|
2928
2934
|
}
|
|
2929
2935
|
}
|
|
2930
2936
|
|
|
2931
|
-
if (module_or_path === undefined) {
|
|
2937
|
+
if (typeof module_or_path === 'undefined') {
|
|
2932
2938
|
module_or_path = new URL('ifc-lite_bg.wasm', import.meta.url);
|
|
2933
2939
|
}
|
|
2934
2940
|
const imports = __wbg_get_imports();
|
|
@@ -2942,4 +2948,5 @@ async function __wbg_init(module_or_path) {
|
|
|
2942
2948
|
return __wbg_finalize_init(instance, module);
|
|
2943
2949
|
}
|
|
2944
2950
|
|
|
2945
|
-
export { initSync
|
|
2951
|
+
export { initSync };
|
|
2952
|
+
export default __wbg_init;
|