use wasm to speed up supports
This commit is contained in:
parent
8141a3aa12
commit
3ba5601cfd
3 changed files with 31 additions and 10 deletions
|
|
@ -33,6 +33,7 @@
|
|||
return out;
|
||||
}
|
||||
|
||||
/** track an array of promises as they all complete */
|
||||
async function pwait(promises, tracker) {
|
||||
let count = 0;
|
||||
if (tracker)
|
||||
|
|
@ -44,6 +45,13 @@
|
|||
await Promise.all(promises);
|
||||
}
|
||||
|
||||
/** return a promise that resolves after a given time */
|
||||
function ptimer(time) {
|
||||
return new Promise((resolve, reject) => {
|
||||
setTimeout(resolve, time);
|
||||
});
|
||||
}
|
||||
|
||||
function numOrDefault(num, def) {
|
||||
return num !== undefined ? num : def;
|
||||
}
|
||||
|
|
@ -504,6 +512,7 @@
|
|||
round,
|
||||
area2,
|
||||
pwait,
|
||||
ptimer,
|
||||
center2d,
|
||||
center2pr,
|
||||
thetaDiff,
|
||||
|
|
|
|||
Loading…
Reference in a new issue