15 lines
303 B
JavaScript
15 lines
303 B
JavaScript
'use strict';
|
|
|
|
const wasm_loader = require('wasm_loader')
|
|
|
|
var mod;
|
|
wasm_loader('douwco_hivemind_loader', 'douwco_hivemind_module').then((instance) => {
|
|
console.log("WASM module loaded.");
|
|
mod = instance;
|
|
});
|
|
|
|
module.exports.loop = function () {
|
|
if (mod !== undefined)
|
|
mod.loop();
|
|
}
|