From c660d9a2962d236b313d9c4f38fb2c40847e94ef Mon Sep 17 00:00:00 2001 From: Jevinca Marvella Date: Tue, 16 Dec 2025 02:48:14 +0700 Subject: [PATCH] Comment section --- Animation_Login.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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;