initial commit

This commit is contained in:
2026-03-22 03:21:45 +02:00
commit 897fea9f4e
15431 changed files with 2548840 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
import jibo from 'jibo';
let {Status, createBehavior, factory} = jibo.bt;
module.exports = createBehavior({
constructor(text) {
this.text = text;
this.status = Status.INVALID;
},
start() {
this.status = Status.SUCCEEDED;
console.log(this.text);
return true;
},
stop() {
},
update() {
return this.status;
}
});
factory.addBehavior(module, "project");

View File

@@ -0,0 +1,25 @@
import jibo from 'jibo';
let {Status, factory} = jibo.bt;
function start() {
let root = factory.create('../behaviors/main');
root.start();
let intervalId = setInterval(() => {
if (root.status !== Status.IN_PROGRESS) {
clearInterval(intervalId);
}
else {
root.update();
}
}, 33);
}
jibo.init().then(() => {
require('./behaviors/debug-behavior');
let eyeElement = document.getElementById('eye');
jibo.visualize.createRobotRenderer(eyeElement, jibo.visualize.DisplayType.EYE);
start();
}).catch(e => {
console.error(e);
});