From 8f1215f9d45b93ed5c1db967ade467f42eb8ec38 Mon Sep 17 00:00:00 2001 From: Aditya Gupta Date: Mon, 23 Feb 2026 07:34:02 +0530 Subject: [PATCH] fix #1: Dot spacing depends on prism length instead of hardcoded values --- src/components/prism/RevolvingPrism.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/prism/RevolvingPrism.tsx b/src/components/prism/RevolvingPrism.tsx index 6e88dfa..70b1885 100644 --- a/src/components/prism/RevolvingPrism.tsx +++ b/src/components/prism/RevolvingPrism.tsx @@ -119,9 +119,11 @@ export function RevolvingPrism() { // Face is considered "Active" if it is within ~42 degrees of perfectly parallel const isActive = Math.abs(normalized) < 42; - // Calculate staircase offset for dots and routing line - const dotY = 20 + index * 30; - const dy = index * 30; // Distance between the dot and the text + // Evenly space dots along the prism height + const prismHeight = 220; + const dotStep = prismHeight / (faces.length + 1); + const dotY = Math.round(dotStep * (index + 1)); + const dy = Math.round(dotStep * index); // Distance between the dot and the text return (