From 72684fe98180b6fd39bf23b877db781a30e66226 Mon Sep 17 00:00:00 2001
From: RedGrox
diff --git a/html/js/animation.js b/html/js/animation.js new file mode 100644 index 0000000..b825b1d --- /dev/null +++ b/html/js/animation.js @@ -0,0 +1,46 @@ +const canvas = document.getElementById('bgCanvas'); +const ctx = canvas.getContext('2d'); + +function resize() { + canvas.width = window.innerWidth; + canvas.height = window.innerHeight; +} + +window.addEventListener('resize', resize); +resize(); + +const particles = []; + +for (let i = 0; i < 80; i++) { + particles.push({ + x: Math.random() * canvas.width, + y: Math.random() * canvas.height, + vx: (Math.random() - 0.5) * 0.5, + vy: (Math.random() - 0.5) * 0.5, + size: Math.random() * 2 + 1 + }); +} + +function animate() { + ctx.clearRect(0, 0, canvas.width, canvas.height); + + particles.forEach(p => { + p.x += p.vx; + p.y += p.vy; + + if (p.x < 0 || p.x > canvas.width) p.vx *= -1; + if (p.y < 0 || p.y > canvas.height) p.vy *= -1; + + ctx.beginPath(); + ctx.arc(p.x, p.y, p.size, 0, Math.PI * 2); + ctx.fillStyle = 'rgba(34,197,94,0.8)'; + ctx.shadowBlur = 10; + ctx.shadowColor = 'rgba(34,197,94,0.8)'; + ctx.fill(); + ctx.shadowBlur = 0; + }); + + requestAnimationFrame(animate); +} + +animate(); diff --git a/html/js/app.js b/html/js/app.js index ddf8901..c41f5b6 100644 --- a/html/js/app.js +++ b/html/js/app.js @@ -71,51 +71,3 @@ function searchQuery(event) { window.location.href = url; } - -// Background animation -const canvas = document.getElementById('bgCanvas'); -const ctx = canvas.getContext('2d'); - -function resize() { - canvas.width = window.innerWidth; - canvas.height = window.innerHeight; -} - -window.addEventListener('resize', resize); -resize(); - -const particles = []; - -for (let i = 0; i < 80; i++) { - particles.push({ - x: Math.random() * canvas.width, - y: Math.random() * canvas.height, - vx: (Math.random() - 0.5) * 0.5, - vy: (Math.random() - 0.5) * 0.5, - size: Math.random() * 2 + 1 - }); -} - -function animate() { - ctx.clearRect(0, 0, canvas.width, canvas.height); - - particles.forEach(p => { - p.x += p.vx; - p.y += p.vy; - - if (p.x < 0 || p.x > canvas.width) p.vx *= -1; - if (p.y < 0 || p.y > canvas.height) p.vy *= -1; - - ctx.beginPath(); - ctx.arc(p.x, p.y, p.size, 0, Math.PI * 2); - ctx.fillStyle = 'rgba(34,197,94,0.8)'; - ctx.shadowBlur = 10; - ctx.shadowColor = 'rgba(34,197,94,0.8)'; - ctx.fill(); - ctx.shadowBlur = 0; - }); - - requestAnimationFrame(animate); -} - -animate(); \ No newline at end of file diff --git a/html/projects/index.html b/html/projects/index.html new file mode 100644 index 0000000..d844db3 --- /dev/null +++ b/html/projects/index.html @@ -0,0 +1,19 @@ + + +
+ + + + +
+ +
+