diff --git a/Animation_Login.js b/Animation_Login.js index 2354766..b5f4fd2 100644 --- a/Animation_Login.js +++ b/Animation_Login.js @@ -2,9 +2,9 @@ ANIMATION LOGIN - PARTICLE BACKGROUND SYSTEM ========================================== fungsi: - - Class Particle: Objek partikel dengan posisi & kecepatan - - Even Distribution: Distribusi partikel merata (15x10 grid) - - Animate Loop: Pergerakan smooth dengan requestAnimationFrame + - Class Particle: objek partikel dengan posisi & kecepatan + - Even Distribution: distribusi partikel merata (15x10 grid) + - Animate Loop: pergerakan smooth dengan requestAnimationFrame ========================================== */ @@ -86,7 +86,7 @@ class Particle { this.x += this.vx; this.y += this.vy; - // ♻️ WRAP-AROUND LOGIC + // WRAP-AROUND LOGIC // Kalau keluar dari kiri → muncul dari kanan if (this.x < -10) this.x = window.innerWidth + 10; // Kalau keluar dari kanan → muncul dari kiri @@ -119,7 +119,7 @@ for (let i = 0; i < rows; i++) { const particle = new Particle(); - // ⚙️ DISTRIBUSI MERATA + RANDOM OFFSET + // DISTRIBUSI MERATA + RANDOM OFFSET // Formula: (index / total) × lebar/tinggi layar particle.x = (j / cols) * window.innerWidth + (Math.random() - 0.5) * 100; particle.y = (i / rows) * window.innerHeight + (Math.random() - 0.5) * 100;