From f1e62b4c2a3fbcd87029516680798399d82a28b4 Mon Sep 17 00:00:00 2001 From: mehbark Date: Mon, 27 Nov 2023 00:17:58 -0500 Subject: [PATCH] train: screw this --- html/train.tsx | 44 ++++++++++++++++++++++++++++++++++++-------- 1 file changed, 36 insertions(+), 8 deletions(-) diff --git a/html/train.tsx b/html/train.tsx index 5211dea..0420fa7 100644 --- a/html/train.tsx +++ b/html/train.tsx @@ -5,7 +5,6 @@ const Rail = ({ rotation, r }: { rotation: string; r: string }) => (
@@ -29,24 +28,53 @@ const Track = ({ aspectRatio: "2/1", justifyItems: "center", alignItems: "center", - transform: "rotate3d(1,0,0,60deg)", + transform: "rotateX(60deg)", margin: "0 auto", + perspective: "1000px", + perspectiveOrigin: "top", }} > {...Array.from({ length: segments }, (_, i) => ( - // deg is actually more efficient lel + // deg is actually more space-efficient lel ))} {children}
); +const Train = ({ + children, + delay_s, +}: { + children: ComponentChildren; + delay_s: number; +}) => ( +
+
+ {children} +
+
+); + +// we can have things with animation delays for both the engine and the cars +// configurable animation length for sure + +// it's so funny seeing css crimes from like a year ago and they are just like on a different level + render_and_copy( -
-
-
🚂
-
-
+ 🚂 + 🚃 + 🚃 + 🚃 + 🚃 );