mirror of
https://github.com/UltraCoderRU/screepsxx.git
synced 2026-01-28 01:55:12 +00:00
14 lines
277 B
JavaScript
14 lines
277 B
JavaScript
'use strict';
|
|
|
|
const wasm_loader = require('wasm_loader')
|
|
|
|
var mod;
|
|
wasm_loader('my_loader', 'my_module').then((instance) => {
|
|
console.log("WASM module loaded.");
|
|
mod = instance;
|
|
});
|
|
|
|
module.exports.loop = function () {
|
|
if (mod !== undefined)
|
|
mod.loop();
|
|
}
|