Skip to content

Commit 7bca566

Browse files
committed
feat: add RoverStrip component with interactive rover simulation
- Implemented RoverStrip component for a canvas-based rover simulation. - Created roverEngine module to handle terrain generation, rover physics, and particle effects. - Added useHeroActive hook to manage visibility and tab state for the rover animation. - Updated main.tsx to ensure the page scrolls to the top on reload.
1 parent 5b194f7 commit 7bca566

7 files changed

Lines changed: 1515 additions & 62 deletions

File tree

.claude/settings.local.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"permissions": {
3+
"allow": [
4+
"Bash(npm run *)",
5+
"Bash(curl -s -o /dev/null -w \"%{http_code}\" http://localhost:5173/)"
6+
]
7+
}
8+
}

src/components/Hero.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { scrollToSection } from "../utils/scroll";
88
// three.js is by far the heaviest dependency; keep it out of the main bundle
99
// so the page becomes interactive before the starfield loads.
1010
const Hero3D = lazy(() => import("./Hero3D"));
11+
const RoverStrip = lazy(() => import("./rover/RoverStrip"));
1112

1213
const Hero = () => {
1314
const years =
@@ -43,6 +44,11 @@ const Hero = () => {
4344
className="pointer-events-none absolute -top-48 right-[-12%] h-[36rem] w-[36rem] rounded-full bg-blue-500/[0.07] blur-3xl dark:bg-blue-400/[0.08]"
4445
/>
4546

47+
{/* Drivable/flyable moon rover toy over a lunar strip at the hero's bottom */}
48+
<Suspense fallback={null}>
49+
<RoverStrip />
50+
</Suspense>
51+
4652
<div className="container relative z-10 mx-auto px-4 sm:px-6 lg:px-8">
4753
<div className="mx-auto max-w-4xl py-28 sm:py-32">
4854
<div className="mb-10 flex items-center gap-4">

0 commit comments

Comments
 (0)