add engine and frame apis for enabling threading and wasm

This commit is contained in:
Stewart Allen 2022-03-03 13:10:32 -05:00
commit 0584357287
5 changed files with 48 additions and 12 deletions

View file

@ -83,6 +83,17 @@ class Engine {
return this;
}
setController(controller) {
let ctrl = this.settings.controller;
Object.assign(ctrl, controller);
if (ctrl.threaded) {
kiri.client.pool.start();
} else {
kiri.client.pool.stop();
}
return this;
}
setTools(tools) {
this.settings.tools = tools;
return this;