gs-bim-air 1.6.1-beta.82 → 1.6.1-beta.83
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 +7 -0
- package/docs/classes/Longan.LonganCore.Viewer.md +7 -0
- package/docs/classes/Longan.Viewer.md +11 -0
- package/docs/classes/Viewer.md +11 -0
- package/lib/BimAir.common-report.html +2 -2
- package/lib/BimAir.common.js +46 -25
- package/lib/BimAir.css +150 -150
- package/lib/BimAir.umd-report.html +2 -2
- package/lib/BimAir.umd.js +46 -25
- package/lib/BimAir.umd.min-report.html +2 -2
- package/lib/BimAir.umd.min.js +46 -25
- package/package.json +1 -1
- package/public/js/longan/longan.js +2771 -1636
- package/public/js/longan/longan.wasm +0 -0
- package/public/js/longan/longan.worker.js +21 -11
|
Binary file
|
|
@@ -27,15 +27,23 @@ if (ENVIRONMENT_IS_NODE) {
|
|
|
27
27
|
|
|
28
28
|
Object.assign(global, {
|
|
29
29
|
self: global,
|
|
30
|
-
require,
|
|
31
|
-
Module,
|
|
30
|
+
require: require,
|
|
31
|
+
Module: Module,
|
|
32
32
|
location: {
|
|
33
33
|
href: __filename
|
|
34
34
|
},
|
|
35
35
|
Worker: nodeWorkerThreads.Worker,
|
|
36
|
-
importScripts: (f)
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
importScripts: function(f) {
|
|
37
|
+
(0, eval)(fs.readFileSync(f, 'utf8') + '//# sourceURL=' + f);
|
|
38
|
+
},
|
|
39
|
+
postMessage: function(msg) {
|
|
40
|
+
parentPort.postMessage(msg);
|
|
41
|
+
},
|
|
42
|
+
performance: global.performance || {
|
|
43
|
+
now: function() {
|
|
44
|
+
return Date.now();
|
|
45
|
+
}
|
|
46
|
+
},
|
|
39
47
|
});
|
|
40
48
|
}
|
|
41
49
|
|
|
@@ -53,7 +61,7 @@ function threadPrintErr() {
|
|
|
53
61
|
}
|
|
54
62
|
function threadAlert() {
|
|
55
63
|
var text = Array.prototype.slice.call(arguments).join(' ');
|
|
56
|
-
postMessage({cmd: 'alert', text, threadId: Module['_pthread_self']()});
|
|
64
|
+
postMessage({cmd: 'alert', text: text, threadId: Module['_pthread_self']()});
|
|
57
65
|
}
|
|
58
66
|
var err = threadPrintErr;
|
|
59
67
|
self.alert = threadAlert;
|
|
@@ -74,7 +82,7 @@ Module['instantiateWasm'] = (info, receiveInstance) => {
|
|
|
74
82
|
// Turn unhandled rejected promises into errors so that the main thread will be
|
|
75
83
|
// notified about them.
|
|
76
84
|
self.onunhandledrejection = (e) => {
|
|
77
|
-
throw e.reason
|
|
85
|
+
throw e.reason ?? e;
|
|
78
86
|
};
|
|
79
87
|
|
|
80
88
|
function handleMessage(e) {
|
|
@@ -103,8 +111,8 @@ function handleMessage(e) {
|
|
|
103
111
|
// Use `const` here to ensure that the variable is scoped only to
|
|
104
112
|
// that iteration, allowing safe reference from a closure.
|
|
105
113
|
for (const handler of e.data.handlers) {
|
|
106
|
-
Module[handler] = (
|
|
107
|
-
postMessage({ cmd: 'callHandler', handler, args:
|
|
114
|
+
Module[handler] = function() {
|
|
115
|
+
postMessage({ cmd: 'callHandler', handler, args: [...arguments] });
|
|
108
116
|
}
|
|
109
117
|
}
|
|
110
118
|
|
|
@@ -123,7 +131,7 @@ function handleMessage(e) {
|
|
|
123
131
|
}
|
|
124
132
|
} else if (e.data.cmd === 'run') {
|
|
125
133
|
// Pass the thread address to wasm to store it for fast access.
|
|
126
|
-
Module['__emscripten_thread_init'](e.data.pthread_ptr, /*
|
|
134
|
+
Module['__emscripten_thread_init'](e.data.pthread_ptr, /*isMainBrowserThread=*/0, /*isMainRuntimeThread=*/0, /*canBlock=*/1);
|
|
127
135
|
|
|
128
136
|
// Await mailbox notifications with `Atomics.waitAsync` so we can start
|
|
129
137
|
// using the fast `Atomics.notify` notification path.
|
|
@@ -162,7 +170,7 @@ function handleMessage(e) {
|
|
|
162
170
|
// The received message looks like something that should be handled by this message
|
|
163
171
|
// handler, (since there is a e.data.cmd field present), but is not one of the
|
|
164
172
|
// recognized commands:
|
|
165
|
-
err(
|
|
173
|
+
err('worker.js received unknown command ' + e.data.cmd);
|
|
166
174
|
err(e.data);
|
|
167
175
|
}
|
|
168
176
|
} catch(ex) {
|
|
@@ -174,3 +182,5 @@ function handleMessage(e) {
|
|
|
174
182
|
};
|
|
175
183
|
|
|
176
184
|
self.onmessage = handleMessage;
|
|
185
|
+
|
|
186
|
+
|