Basic setup for Cpp based screeping.
This commit is contained in:
14
js/main.js
Normal file
14
js/main.js
Normal file
@@ -0,0 +1,14 @@
|
||||
'use strict';
|
||||
|
||||
const wasm_loader = require('wasm_loader')
|
||||
|
||||
var mod;
|
||||
wasm_loader('app_loader', 'app_module').then((instance) => {
|
||||
console.log("WASM module loaded.");
|
||||
mod = instance;
|
||||
});
|
||||
|
||||
module.exports.loop = function () {
|
||||
if (mod !== undefined)
|
||||
mod.loop();
|
||||
}
|
||||
Reference in New Issue
Block a user