The probability of horizontal lines is correlated with the battery level.
parent
a77ee255f8
commit
1b066ac83e
|
|
@ -1,2 +1,3 @@
|
||||||
0.01: New app!
|
0.01: New app!
|
||||||
0.02: Design improvements and fixes.
|
0.02: Design improvements and fixes.
|
||||||
|
0.03: Indicate battery level through line occurrence.
|
||||||
|
|
@ -8,14 +8,16 @@ The original output of stable diffusion is shown here:
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
And my implementation is shown here:
|
My implementation is shown below. Note that horizontal lines occur randomly, but the
|
||||||
|
probability is correlated with the battery level. So if your screen contains only
|
||||||
|
a few lines its time to charge your bangle again ;)
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|
||||||
# Thanks to
|
# Thanks to
|
||||||
The great open source community: I used an open source diffusion model (https://github.com/CompVis/stable-diffusion)
|
The great open-source community: I used an open-source diffusion model (https://github.com/CompVis/stable-diffusion)
|
||||||
to generate a watch face for the open source smartwatch BangleJs.
|
to generate a watch face for the open-source smartwatch BangleJs.
|
||||||
|
|
||||||
## Creator
|
## Creator
|
||||||
- [David Peer](https://github.com/peerdavid).
|
- [David Peer](https://github.com/peerdavid).
|
||||||
|
|
@ -37,8 +37,15 @@ function drawBackground() {
|
||||||
g.setFontAlign(0,0);
|
g.setFontAlign(0,0);
|
||||||
g.setColor(g.theme.fg);
|
g.setColor(g.theme.fg);
|
||||||
|
|
||||||
y = 0;
|
var bat = E.getBattery() / 100.0;
|
||||||
|
var y = 0;
|
||||||
while(y < H){
|
while(y < H){
|
||||||
|
// Show less lines in case of small battery level.
|
||||||
|
if(Math.random() > bat){
|
||||||
|
y += 5;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
y += 3 + Math.floor(Math.random() * 10);
|
y += 3 + Math.floor(Math.random() * 10);
|
||||||
g.drawLine(0, y, W, y);
|
g.drawLine(0, y, W, y);
|
||||||
g.drawLine(0, y+1, W, y+1);
|
g.drawLine(0, y+1, W, y+1);
|
||||||
|
|
@ -103,7 +110,7 @@ function drawDate(){
|
||||||
g.setFontAlign(0,0);
|
g.setFontAlign(0,0);
|
||||||
g.setFontGochiHand();
|
g.setFontGochiHand();
|
||||||
|
|
||||||
var text = ("0"+date.getDate()).substr(-2) + "/" + ("0"+date.getMonth()).substr(-2);
|
var text = ("0"+date.getDate()).substr(-2) + "/" + ("0"+(date.getMonth()+1)).substr(-2);
|
||||||
var w = g.stringWidth(text);
|
var w = g.stringWidth(text);
|
||||||
g.setColor(g.theme.bg);
|
g.setColor(g.theme.bg);
|
||||||
g.fillRect(cx-w/2-4, 20, cx+w/2+4, 40+12);
|
g.fillRect(cx-w/2-4, 20, cx+w/2+4, 40+12);
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
"name": "AI Clock",
|
"name": "AI Clock",
|
||||||
"shortName":"AI Clock",
|
"shortName":"AI Clock",
|
||||||
"icon": "aiclock.png",
|
"icon": "aiclock.png",
|
||||||
"version":"0.02",
|
"version":"0.03",
|
||||||
"readme": "README.md",
|
"readme": "README.md",
|
||||||
"supports": ["BANGLEJS2"],
|
"supports": ["BANGLEJS2"],
|
||||||
"description": "A watch face that was designed by an AI (stable diffusion) and implemented by a human.",
|
"description": "A watch face that was designed by an AI (stable diffusion) and implemented by a human.",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue