-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcera.js
More file actions
91 lines (61 loc) · 2.08 KB
/
Copy pathcera.js
File metadata and controls
91 lines (61 loc) · 2.08 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
$('document').ready(function() {
$('.navbtn').click(function() {
$('.listnavitems').toggleClass('shows');
$('.hamburg').toggleClass('shows');
$('listnavitems>a').toggleClass('shows');
});
var canvas = document.getElementById('logring');
var imga = document.getElementById("quotespic");
var aadj = window.innerWidth;
if (window.innerHeight < window.innerWidth) {
aadj = window.innerHeight;
}
if (window.innerWidth < 550) {
aadj = window.innerWidth;
}
imga.width = aadj * 0.9;
imga.height = aadj * 0.58;
window.addEventListener('resize', function() {
var aadj = window.innerWidth;
if (window.innerHeight < window.innerWidth) {
aadj = window.innerHeight;
}
if (window.innerWidth < 550) {
aadj = window.innerWidth;
}
imga.width = aadj * 0.9;
imga.height = aadj * 0.58;
});
function logoanimation() {
var c = canvas.getContext("2d");
c.lineWidth = "4";
var x = 0;
var y = 0;
function animate() {
requestAnimationFrame(animate);
c.clearRect(0, 0, canvas.width, canvas.height);
c.beginPath();
c.arc(canvas.width / 2, canvas.height / 2, 70, x + 0, x + 1.5 * 3.14, false);
c.strokeStyle = "#050259";
c.stroke();
c.beginPath();
c.arc(canvas.width / 2, canvas.height / 2, 55, y + 3.14, y + 2.5 * 3.14, false);
c.strokeStyle = "#1B21A6";
c.stroke();
c.beginPath();
c.arc(canvas.width / 2, canvas.height / 2, 40, x + 0, x + 1.5 * 3.14, false);
c.strokeStyle = "#010440";
c.stroke();
x += 0.05;
y -= 0.05;
if (x > 2 * Math.PI) {
x = 0;
}
if (y < -(2 * Math.PI)) {
y = 0;
}
}
animate();
}
logoanimation();
});