aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/packages/ui/src/pages/home.tsx
diff options
context:
space:
mode:
authorNtskwK <natsukawa247@outlook.com>2026-03-30 17:28:40 +0800
committerNtskwK <natsukawa247@outlook.com>2026-03-30 17:28:40 +0800
commit0c689afe68792fafca67746b9ece2a06760c6069 (patch)
tree8d0feac4fec8c8ac06994f28949915d348eb3cc9 /packages/ui/src/pages/home.tsx
parent382dfc68f1ecb09f277f82b0b2e0b466e1c79d06 (diff)
parentc4dc0676d794bca2613be282867d369328ebf073 (diff)
downloadDropOut-0c689afe68792fafca67746b9ece2a06760c6069.tar.gz
DropOut-0c689afe68792fafca67746b9ece2a06760c6069.zip
Merge branch 'main' of https://github.com/HydroRoll-Team/DropOut into chore/docs
Diffstat (limited to 'packages/ui/src/pages/home.tsx')
-rw-r--r--packages/ui/src/pages/home.tsx102
1 files changed, 102 insertions, 0 deletions
diff --git a/packages/ui/src/pages/home.tsx b/packages/ui/src/pages/home.tsx
new file mode 100644
index 0000000..dc1413d
--- /dev/null
+++ b/packages/ui/src/pages/home.tsx
@@ -0,0 +1,102 @@
+import { useState } from "react";
+import { BottomBar } from "@/components/bottom-bar";
+import { useSaturnEffect } from "@/components/particle-background";
+
+export function HomePage() {
+ const [mouseX, setMouseX] = useState(0);
+ const [mouseY, setMouseY] = useState(0);
+ const saturn = useSaturnEffect();
+
+ const handleMouseMove = (e: React.MouseEvent) => {
+ const x = (e.clientX / window.innerWidth) * 2 - 1;
+ const y = (e.clientY / window.innerHeight) * 2 - 1;
+ setMouseX(x);
+ setMouseY(y);
+
+ // Forward mouse move to SaturnEffect (if available) for parallax/rotation interactions
+ saturn?.handleMouseMove(e.clientX);
+ };
+
+ const handleSaturnMouseDown = (e: React.MouseEvent) => {
+ saturn?.handleMouseDown(e.clientX);
+ };
+
+ const handleSaturnMouseUp = () => {
+ saturn?.handleMouseUp();
+ };
+
+ const handleSaturnMouseLeave = () => {
+ // Treat leaving the area as mouse-up for the effect
+ saturn?.handleMouseUp();
+ };
+
+ const handleSaturnTouchStart = (e: React.TouchEvent) => {
+ if (e.touches && e.touches.length === 1) {
+ const clientX = e.touches[0].clientX;
+ saturn?.handleTouchStart(clientX);
+ }
+ };
+
+ const handleSaturnTouchMove = (e: React.TouchEvent) => {
+ if (e.touches && e.touches.length === 1) {
+ const clientX = e.touches[0].clientX;
+ saturn?.handleTouchMove(clientX);
+ }
+ };
+
+ const handleSaturnTouchEnd = () => {
+ saturn?.handleTouchEnd();
+ };
+
+ return (
+ <div className="relative z-10 h-full overflow-y-auto custom-scrollbar scroll-smooth">
+ {/* Hero Section (Full Height) - Interactive area */}
+ <div
+ role="tab"
+ className="min-h-full flex flex-col justify-end p-12 pb-32 cursor-grab active:cursor-grabbing select-none"
+ onMouseDown={handleSaturnMouseDown}
+ onMouseMove={handleMouseMove}
+ onMouseUp={handleSaturnMouseUp}
+ onMouseLeave={handleSaturnMouseLeave}
+ onTouchStart={handleSaturnTouchStart}
+ onTouchMove={handleSaturnTouchMove}
+ onTouchEnd={handleSaturnTouchEnd}
+ tabIndex={0}
+ >
+ {/* 3D Floating Hero Text */}
+ <div
+ className="transition-transform duration-200 ease-out origin-bottom-left"
+ style={{
+ transform: `perspective(1000px) rotateX(${mouseY * -1}deg) rotateY(${mouseX * 1}deg)`,
+ }}
+ >
+ <div className="flex items-center gap-3 mb-6">
+ <div className="h-px w-12 bg-white/50"></div>
+ <span className="text-xs font-mono font-bold tracking-[0.2em] text-white/50 uppercase">
+ Launcher Active
+ </span>
+ </div>
+
+ <h1 className="text-8xl font-black tracking-tighter text-white mb-6 leading-none">
+ MINECRAFT
+ </h1>
+
+ <div className="flex items-center gap-4">
+ <div className="bg-white/10 backdrop-blur-md border border-white/10 px-3 py-1 rounded-sm text-xs font-bold uppercase tracking-widest text-white shadow-sm">
+ Java Edition
+ </div>
+ </div>
+ </div>
+
+ {/* Action Area */}
+ <div className="mt-8 flex gap-4">
+ <div className="text-zinc-500 text-sm font-mono">
+ &gt; Ready to launch session.
+ </div>
+ </div>
+
+ <BottomBar />
+ </div>
+ </div>
+ );
+}