-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
72 lines (67 loc) · 1.66 KB
/
Copy pathindex.html
File metadata and controls
72 lines (67 loc) · 1.66 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>Document</title>
</head>
<body>
<main>
<canvas id="canvas" height="500" width="500"></canvas>
</main>
</body>
<style>
body {
background-color: rgb(49, 49, 49);
box-sizing: border-box;
margin: 0;
padding: 0;
border: 0;
}
main {
background-color: rgb(117, 104, 155);
display: flex;
position: absolute;
margin: auto;
top: 0;
left: 0;
right: 0;
bottom: 0;
height: 700px;
width: 700px;
}
canvas {
margin: auto;
border: 5px solid black;
}
</style>
<script>
// const createSphere = () => {
// document.createElement('');
// };
// const canvas = document.querySelector('canvas');
// const ctx = canvas.getContext('2d');
// const figures = {
// /**
// *
// * @param {{x: number, y: number}} pos
// * @param {number?} size
// */
// circle(pos, size = 25) {
// const figure = new Path2D();
// figure.arc(pos.x, pos.y, size, 0, 2 * Math.PI);
// return figure;
// },
// };
// ctx.fill(figures.circle({x: 250, y:250}));
// ctx.fillStyle = 'rgb(200, 0, 0)';
// ctx.fillRect(10, 10, 50, 50);
// ctx.fillStyle = 'rgba(0, 0, 200, 0.5)';
// ctx.fillRect(30, 30, 50, 50);
// ctx.fillText('12345', 100, 100);
// figures.circle.
// ctx.clearRect(figures.circle)
</script>
<script src="./main.js"></script>
</html>