Skip to content

Commit cf4c016

Browse files
authored
Adds a privacy notice (#12)
Add privacy notice
1 parent 7673b1c commit cf4c016

File tree

1 file changed

+29
-5
lines changed

1 file changed

+29
-5
lines changed

static/draw.js

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ const FONT = "30px Arial";
22
const GREEN = "rgb(0,255,0)";
33
const HUD_X = 50;
44
const HUD_Y = 50;
5+
const PRIVACY_Y = 20;
56

67
var readyCheck = setInterval(function() {
78
var canvas = document.querySelector("#canvas");
@@ -15,13 +16,36 @@ var readyCheck = setInterval(function() {
1516
ctx.fillStyle = "black";
1617
ctx.fill();
1718

18-
ctx.beginPath();
1919
ctx.font = "24px Arial";
2020
ctx.fillStyle = GREEN;
21-
ctx.fillText("TAP to start.", HUD_X / 3, HUD_Y);
22-
ctx.fillText("Then TAP to take a photo.", HUD_X / 3, HUD_Y * 2);
23-
ctx.fillText("Photo processing may take", HUD_X / 3, HUD_Y * 4);
24-
ctx.fillText(" up to 10 seconds!", HUD_X / 3, HUD_Y * 5);
21+
var howToLines = [
22+
"TAP to start,",
23+
" then TAP to take a photo.",
24+
"",
25+
"Photo processing may take",
26+
" up to 10 seconds!",
27+
];
28+
var howToIdx = 1;
29+
howToLines.forEach(function(l) {
30+
ctx.fillText(l, HUD_X / 3, HUD_Y * howToIdx);
31+
howToIdx += 1;
32+
});
33+
34+
ctx.font = "14px Arial";
35+
const PRIVACY_Y_OFFSET = HUD_Y * 7;
36+
var privacyLines = [
37+
"PRIVACY NOTICE: This educational project",
38+
"does not collect ANY data about you.",
39+
"Images created with this app do not leave",
40+
"your device, and are under your control.",
41+
"The code may be reviewed by visiting",
42+
"https://github.com/Terkwood/vision",
43+
];
44+
var privacyIdx = 0;
45+
privacyLines.forEach(function(l) {
46+
ctx.fillText(l, HUD_X / 3, PRIVACY_Y_OFFSET + PRIVACY_Y * privacyIdx);
47+
privacyIdx += 1;
48+
});
2549
}
2650
}, 50);
2751

0 commit comments

Comments
 (0)