TrailSene-Bangle.js/torch.trailsense.js
2023-10-14 15:50:33 +02:00

24 lines
425 B
JavaScript
Executable File

(() => {
function callbackFill(direction) {
if(direction == 1) {
g.setColor(255,255,255);
} else {
g.setColor(255,0,0);
}
g.fillRect(0, 0, g.getHeight(), g.getWidth());
}
function drawFace() {
g.setColor(255,255,255);
g.fillRect(0, 0, g.getHeight(), g.getWidth());
Bangle.on("swipe", callbackFill);
}
function stop() {
Bangle.removeAllListeners();
}
return { drawFace:drawFace, stop:stop };
})();