-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcreeper.html
48 lines (39 loc) · 1.26 KB
/
creeper.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta content="dark" name="color-scheme" />
<title>Creeper</title>
<link rel="stylesheet" href="./css/reset.css">
</head>
<body style="margin: 0;">
<canvas width="600" height="400"></canvas>
<script>
var tela = document.querySelector('canvas');
var pincel = tela.getContext('2d');
function backgroundCanvas() {
pincel.fillStyle = 'lightgrey';
pincel.fillRect(0, 0, 600, 400);
}
backgroundCanvas();
// // Fundo da Tela
// pincel.fillStyle = '#019642';
// pincel.fillRect(0, 0, 600, 400);
pincel.fillStyle = 'darkgreen';
pincel.fillRect(125, 50, 350, 300);
pincel.fillStyle = 'black';
// Olho esquerdo
pincel.fillRect(175, 100, 90, 90);
// Olho Direito
pincel.fillRect(335, 100, 90, 90);
//Boca
pincel.fillRect(265, 190, 70, 100);
//Bigode Esquerdo
pincel.fillRect(225, 240, 40, 110);
//Bigode Direito
pincel.fillRect(335, 240, 40, 110);
</script>
</body>
</html>