From dca72e6881a6a72862924a2cf084540273e6b8e1 Mon Sep 17 00:00:00 2001 From: Xevion Date: Thu, 26 Dec 2024 18:15:34 -0600 Subject: [PATCH] Tune frame, scale, min opacity --- src/components/Dots.tsx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/components/Dots.tsx b/src/components/Dots.tsx index 81bdc4b..044b539 100644 --- a/src/components/Dots.tsx +++ b/src/components/Dots.tsx @@ -20,11 +20,11 @@ const Dots: React.FC = () => { let h = window.innerHeight; const offsetY = window.scrollY; - const SCALE = 200; - const LENGTH = 10; - const SPACING = 15; - const TARGET_FRAMERATE = 8; - const TIMESCALE = 12 / TARGET_FRAMERATE; + const SCALE = 400; + const LENGTH = 3; + const SPACING = 20; + const TARGET_FRAMERATE = 5; + const TIMESCALE = 4; function getForceOnPoint(x: number, y: number, z: number) { return (noise(x / SCALE, y / SCALE, z) - 0.5) * 2 * TWO_PI; @@ -39,6 +39,7 @@ const Dots: React.FC = () => { const id = `${x}-${y}`; if (pointIds.has(id)) continue; pointIds.add(id); + points.push({ x, y, opacity: Math.random() * 0.5 + 0.5 }); } } @@ -72,7 +73,7 @@ const Dots: React.FC = () => { // if (center_distance < 350) // opacity = 0; // opacity = - stroke(200, 200, 200, (Math.abs(cos(rad)) * 0.8 + 0.2) * p.opacity * 255 * 0.5); + stroke(200, 200, 200, (Math.abs(cos(rad)) * 0.8 + 0.1) * p.opacity * 255 * 0.4); circle(nx, ny - offsetY, 1); } }