spatial-ui-universe 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1,10 +1,12 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import React from 'react';
2
3
 
3
- declare function Scene({ coreColor, particleColor, particleCount, particleShape }: {
4
+ declare function Scene({ coreColor, particleColor, particleCount, particleShape, children }: {
4
5
  coreColor?: string;
5
6
  particleColor?: string;
6
7
  particleCount?: number;
7
8
  particleShape?: "dodecahedron" | "icosahedron" | "box";
9
+ children?: React.ReactNode;
8
10
  }): react_jsx_runtime.JSX.Element;
9
11
 
10
12
  declare const Button: ({ children, variant, className, customColor, customBg, customBorder, customRadius, customSize, style, ...props }: any) => react_jsx_runtime.JSX.Element;
package/dist/index.js CHANGED
@@ -96,13 +96,9 @@ function SupernovaEasterEgg({ active, color, onComplete }) {
96
96
  const time = (0, import_react.useRef)(0);
97
97
  const Y_AXIS = (0, import_react.useMemo)(() => new THREE.Vector3(0, 1, 0), []);
98
98
  const tempVel = (0, import_react.useMemo)(() => new THREE.Vector3(), []);
99
- const linesGeom = (0, import_react.useMemo)(() => {
100
- const geom = new THREE.BufferGeometry();
101
- const maxLines = count * count;
102
- const pos = new Float32Array(maxLines * 6);
103
- geom.setAttribute("position", new THREE.BufferAttribute(pos, 3));
104
- return geom;
105
- }, [count]);
99
+ const maxBonds = 2500;
100
+ const bondsMeshRef = (0, import_react.useRef)(null);
101
+ const dummyBond = (0, import_react.useMemo)(() => new THREE.Object3D(), []);
106
102
  (0, import_fiber.useFrame)((_, delta) => {
107
103
  if (!active) return;
108
104
  time.current += delta;
@@ -119,11 +115,10 @@ function SupernovaEasterEgg({ active, color, onComplete }) {
119
115
  for (let i = 0; i < count; i++) {
120
116
  velocities[i] = initialPositions[i].clone().normalize().multiplyScalar(Math.random() * 20 + 20);
121
117
  }
122
- if (linesGeom.attributes.position) linesGeom.setDrawRange(0, 0);
118
+ if (bondsMeshRef.current) bondsMeshRef.current.count = 0;
123
119
  return;
124
120
  }
125
- let lineCount = 0;
126
- const positionsAttr = linesGeom.attributes.position.array;
121
+ let bondCount = 0;
127
122
  let bondThreshold = 0;
128
123
  if (phase === 2) {
129
124
  bondThreshold = (t - 2) / 2 * 8;
@@ -153,14 +148,15 @@ function SupernovaEasterEgg({ active, color, onComplete }) {
153
148
  const p2 = currentPositions.current[j];
154
149
  const distSq = p.distanceToSquared(p2);
155
150
  if (distSq < thresholdSq && distSq < 16) {
156
- if (lineCount * 6 < positionsAttr.length - 6) {
157
- positionsAttr[lineCount * 6] = p.x;
158
- positionsAttr[lineCount * 6 + 1] = p.y;
159
- positionsAttr[lineCount * 6 + 2] = p.z;
160
- positionsAttr[lineCount * 6 + 3] = p2.x;
161
- positionsAttr[lineCount * 6 + 4] = p2.y;
162
- positionsAttr[lineCount * 6 + 5] = p2.z;
163
- lineCount++;
151
+ if (bondCount < maxBonds) {
152
+ const dist = Math.sqrt(distSq);
153
+ const thickness = Math.max(0.015, 0.15 - dist * 0.035) * (bondThreshold / 8);
154
+ dummyBond.position.copy(p).lerp(p2, 0.5);
155
+ dummyBond.lookAt(p2);
156
+ dummyBond.scale.set(thickness, thickness, dist * 0.5);
157
+ dummyBond.updateMatrix();
158
+ if (bondsMeshRef.current) bondsMeshRef.current.setMatrixAt(bondCount, dummyBond.matrix);
159
+ bondCount++;
164
160
  }
165
161
  }
166
162
  }
@@ -180,8 +176,10 @@ function SupernovaEasterEgg({ active, color, onComplete }) {
180
176
  if (meshRef.current) meshRef.current.setMatrixAt(i, dummy.matrix);
181
177
  }
182
178
  if (meshRef.current) meshRef.current.instanceMatrix.needsUpdate = true;
183
- linesGeom.attributes.position.needsUpdate = true;
184
- linesGeom.setDrawRange(0, lineCount * 2);
179
+ if (bondsMeshRef.current) {
180
+ bondsMeshRef.current.count = bondCount;
181
+ bondsMeshRef.current.instanceMatrix.needsUpdate = true;
182
+ }
185
183
  });
186
184
  if (!active) return null;
187
185
  const lineOpacity = time.current > 6.5 ? Math.max(0, 0.4 - (time.current - 6.5) / 1.5 * 0.4) : 0.4;
@@ -191,9 +189,21 @@ function SupernovaEasterEgg({ active, color, onComplete }) {
191
189
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("sphereGeometry", { args: [0.3, 16, 16] }),
192
190
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("meshStandardMaterial", { color, emissive: color, emissiveIntensity: 4, transparent: true, opacity: pointOpacity, roughness: 0, metalness: 1 })
193
191
  ] }),
194
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("lineSegments", { frustumCulled: false, children: [
195
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("primitive", { object: linesGeom, attach: "geometry" }),
196
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("lineBasicMaterial", { color: "#ffffff", transparent: true, opacity: lineOpacity, blending: THREE.AdditiveBlending })
192
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("instancedMesh", { ref: bondsMeshRef, args: [void 0, void 0, maxBonds], frustumCulled: false, children: [
193
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("sphereGeometry", { args: [1, 16, 16] }),
194
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
195
+ "meshStandardMaterial",
196
+ {
197
+ color: "#38bdf8",
198
+ transparent: true,
199
+ opacity: lineOpacity * 1.5,
200
+ roughness: 0,
201
+ metalness: 0.8,
202
+ envMapIntensity: 2,
203
+ blending: THREE.AdditiveBlending,
204
+ depthWrite: false
205
+ }
206
+ )
197
207
  ] })
198
208
  ] });
199
209
  }
@@ -514,7 +524,8 @@ function Scene({
514
524
  coreColor = "#312e81",
515
525
  particleColor = "#6366f1",
516
526
  particleCount = 150,
517
- particleShape = "dodecahedron"
527
+ particleShape = "dodecahedron",
528
+ children
518
529
  }) {
519
530
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "absolute inset-0 w-full h-full z-0 pointer-events-auto bg-[#020205]", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_fiber.Canvas, { camera: { position: [0, 0, 12], fov: 45 }, gl: { alpha: true }, children: [
520
531
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("color", { attach: "background", args: ["#020205"] }),
@@ -526,6 +537,7 @@ function Scene({
526
537
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BlackHoleCore, { color: coreColor }),
527
538
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AsteroidField, { count: particleCount, color: particleColor, shape: particleShape }),
528
539
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(NebulaClouds, {}),
540
+ children,
529
541
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_drei.Stars, { radius: 150, depth: 100, count: 8e3, factor: 6, saturation: 1, fade: true, speed: 2 }),
530
542
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_drei.Sparkles, { count: 300, scale: 25, size: 3, speed: 0.2, opacity: 0.4, color: "#818cf8" }),
531
543
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_drei.Sparkles, { count: 200, scale: 20, size: 1, speed: 0.4, opacity: 0.6, color: "#c084fc" }),
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/lib/index.ts","../src/components/Scene.tsx","../src/components/UI.tsx"],"sourcesContent":["export { default as Scene } from '../components/Scene';\r\nexport { Button, TextBox, Dropdown, Card, Badge, Switch } from '../components/UI';","\"use client\";\r\n\r\nimport React, { useRef, useState, useMemo, useEffect } from \"react\";\r\nimport { Canvas, useFrame } from \"@react-three/fiber\";\r\nimport { Environment, Sparkles, Stars, Sphere, MeshDistortMaterial, Clouds, Cloud } from \"@react-three/drei\";\r\nimport * as THREE from \"three\";\r\n\r\n// Supernova Easter Egg Component\r\nfunction SupernovaEasterEgg({ active, color, onComplete }: { active: boolean, color: string, onComplete: () => void }) {\r\n const count = 150;\r\n const meshRef = useRef<THREE.InstancedMesh>(null);\r\n \r\n const dummy = useMemo(() => new THREE.Object3D(), []);\r\n \r\n // Distribute particles perfectly on the sphere shell initially\r\n const initialPositions = useMemo(() => {\r\n const pts = [];\r\n for(let i=0; i<count; i++) {\r\n const p = new THREE.Vector3(\r\n (Math.random() - 0.5) * 2,\r\n (Math.random() - 0.5) * 2,\r\n (Math.random() - 0.5) * 2\r\n ).normalize().multiplyScalar(1.5); // Start exactly on the Coreradius\r\n pts.push(p);\r\n }\r\n return pts;\r\n }, []);\r\n \r\n const velocities = useMemo(() => initialPositions.map(p => p.clone().normalize().multiplyScalar(Math.random() * 20 + 20)), [initialPositions]);\r\n \r\n const currentPositions = useRef(initialPositions.map(p => p.clone()));\r\n const time = useRef(0);\r\n const Y_AXIS = useMemo(() => new THREE.Vector3(0,1,0), []);\r\n const tempVel = useMemo(() => new THREE.Vector3(), []);\r\n\r\n const linesGeom = useMemo(() => {\r\n const geom = new THREE.BufferGeometry();\r\n const maxLines = count * count; \r\n const pos = new Float32Array(maxLines * 6);\r\n geom.setAttribute('position', new THREE.BufferAttribute(pos, 3));\r\n return geom;\r\n }, [count]);\r\n\r\n useFrame((_, delta) => {\r\n if (!active) return;\r\n time.current += delta;\r\n const t = time.current;\r\n\r\n let phase = 0; \r\n if (t < 2.0) phase = 1; // Violent Explosion\r\n else if (t < 4.0) phase = 2; // Drift and expand lines\r\n else if (t < 6.5) phase = 3; // Contract back to dense cage\r\n else if (t < 8.0) phase = 4; // Fade dots out, let core emerge\r\n else {\r\n onComplete();\r\n time.current = 0;\r\n currentPositions.current = initialPositions.map(p => p.clone());\r\n for(let i=0; i<count;i++) {\r\n velocities[i] = initialPositions[i].clone().normalize().multiplyScalar(Math.random() * 20 + 20);\r\n }\r\n if (linesGeom.attributes.position) linesGeom.setDrawRange(0, 0);\r\n return;\r\n }\r\n\r\n let lineCount = 0;\r\n const positionsAttr = linesGeom.attributes.position.array as Float32Array;\r\n\r\n let bondThreshold = 0;\r\n if (phase === 2) {\r\n bondThreshold = ((t - 2.0) / 2.0) * 8.0; // Lines grow from 0 to 8 radius seamlessly\r\n } else if (phase >= 3) {\r\n bondThreshold = 8.0; // Everything is connected\r\n }\r\n\r\n for (let i = 0; i < count; i++) {\r\n let p = currentPositions.current[i];\r\n \r\n if (phase === 1) {\r\n tempVel.copy(velocities[i]).multiplyScalar(delta);\r\n p.add(tempVel);\r\n velocities[i].multiplyScalar(0.92); // Viscous fluid drag\r\n p.applyAxisAngle(Y_AXIS, delta * 2.0); // Orbital swirl\r\n } else if (phase === 2) {\r\n tempVel.copy(velocities[i]).multiplyScalar(delta);\r\n p.add(tempVel);\r\n velocities[i].multiplyScalar(0.95); // Float freely\r\n p.applyAxisAngle(Y_AXIS, delta * 0.5); // Slow drift\r\n } else {\r\n // Smoothly ease back right onto the original shell\r\n const target = initialPositions[i];\r\n p.lerp(target, 1.0 - Math.pow(0.001, delta)); // Highly sticky easing\r\n p.applyAxisAngle(Y_AXIS, delta * 0.5);\r\n }\r\n \r\n // Connect points into a mesh\r\n if (bondThreshold > 0 && phase <= 4) {\r\n const thresholdSq = bondThreshold * bondThreshold;\r\n for (let j = i + 1; j < count; j++) {\r\n const p2 = currentPositions.current[j];\r\n const distSq = p.distanceToSquared(p2);\r\n if (distSq < thresholdSq && distSq < 16.0) { // Keep reasonable draw limits (4.0^2)\r\n if (lineCount * 6 < positionsAttr.length - 6) {\r\n positionsAttr[lineCount * 6] = p.x;\r\n positionsAttr[lineCount * 6 + 1] = p.y;\r\n positionsAttr[lineCount * 6 + 2] = p.z;\r\n positionsAttr[lineCount * 6 + 3] = p2.x;\r\n positionsAttr[lineCount * 6 + 4] = p2.y;\r\n positionsAttr[lineCount * 6 + 5] = p2.z;\r\n lineCount++;\r\n }\r\n }\r\n }\r\n }\r\n \r\n // Scale handles visual pop nicely\r\n let scale = 0.2;\r\n if (phase === 1) {\r\n scale = Math.max(0.1, 0.4 - p.length()*0.015);\r\n } else if (phase === 2 || phase === 3) {\r\n scale = 0.15;\r\n } else if (phase === 4) {\r\n // Fade out the physical dots smoothly as the core takes over\r\n const progress = (t - 6.5) / 1.5;\r\n scale = THREE.MathUtils.lerp(0.15, 0, progress);\r\n }\r\n \r\n dummy.position.copy(p);\r\n dummy.scale.set(scale, scale, scale);\r\n dummy.updateMatrix();\r\n if (meshRef.current) meshRef.current.setMatrixAt(i, dummy.matrix);\r\n }\r\n \r\n if (meshRef.current) meshRef.current.instanceMatrix.needsUpdate = true;\r\n \r\n linesGeom.attributes.position.needsUpdate = true;\r\n linesGeom.setDrawRange(0, lineCount * 2);\r\n });\r\n\r\n if (!active) return null;\r\n\r\n // Let bond lines fade during phase 4 smoothly\r\n const lineOpacity = time.current > 6.5 ? Math.max(0, 0.4 - ((time.current - 6.5)/1.5)*0.4) : 0.4;\r\n const pointOpacity = time.current > 6.5 ? Math.max(0, 0.9 - ((time.current - 6.5)/1.5)*0.9) : 0.9;\r\n\r\n return (\r\n <group>\r\n <instancedMesh ref={meshRef} args={[undefined, undefined, count]}>\r\n <sphereGeometry args={[0.3, 16, 16]} />\r\n <meshStandardMaterial color={color} emissive={color} emissiveIntensity={4} transparent opacity={pointOpacity} roughness={0} metalness={1} />\r\n </instancedMesh>\r\n <lineSegments frustumCulled={false}>\r\n <primitive object={linesGeom} attach=\"geometry\" />\r\n <lineBasicMaterial color=\"#ffffff\" transparent opacity={lineOpacity} blending={THREE.AdditiveBlending} />\r\n </lineSegments>\r\n </group>\r\n );\r\n}\r\n\r\n// The central \"Black Hole\" or pulsing star\r\nexport function BlackHoleCore({ color = \"#312e81\" }: { color?: string }) {\r\n const groupRef = useRef<THREE.Group>(null);\r\n const visualsGroupRef = useRef<THREE.Group>(null);\r\n const shockwaveRef = useRef<THREE.Mesh>(null);\r\n const [clicked, setClicked] = useState(false);\r\n const shockProgress = useRef(0);\r\n const [easterEggActive, setEasterEggActive] = useState(false);\r\n \r\n // Track egg time internally for the BlackHole to know when to grow back\r\n const eggTime = useRef(0);\r\n\r\n const triggerShockwave = () => {\r\n if (easterEggActive) return;\r\n setClicked(true);\r\n shockProgress.current = 0;\r\n setTimeout(() => setClicked(false), 800);\r\n };\r\n\r\n useFrame((_, delta) => {\r\n if (groupRef.current) {\r\n groupRef.current.rotation.y += delta * 0.05;\r\n groupRef.current.rotation.x += delta * 0.02;\r\n }\r\n\r\n if (visualsGroupRef.current) {\r\n if (easterEggActive) {\r\n eggTime.current += delta;\r\n // The egg takes 8.0s. It fades back in during Phase 4 (6.5s to 8.0s)\r\n if (eggTime.current > 6.5) {\r\n const progress = Math.min((eggTime.current - 6.5) / 1.5, 1.0);\r\n const ease = 1 - Math.pow(1 - progress, 3); // cubic ease out\r\n visualsGroupRef.current.scale.set(ease, ease, ease);\r\n } else {\r\n visualsGroupRef.current.scale.lerp(new THREE.Vector3(0, 0, 0), delta * 25); // Shrink intensely at start\r\n }\r\n } else {\r\n eggTime.current = 0;\r\n visualsGroupRef.current.scale.lerp(new THREE.Vector3(1, 1, 1), delta * 5);\r\n }\r\n }\r\n\r\n if (clicked && shockProgress.current < 1) shockProgress.current += delta * 2;\r\n else if (!clicked && shockProgress.current > 0) shockProgress.current -= delta * 1;\r\n if (shockProgress.current < 0) shockProgress.current = 0;\r\n\r\n if (shockwaveRef.current) {\r\n const s = 1 + shockProgress.current * 15;\r\n shockwaveRef.current.scale.set(s, s, s);\r\n (shockwaveRef.current.material as THREE.Material).opacity = Math.max(0, 0.6 - shockProgress.current * 0.6);\r\n }\r\n });\r\n\r\n return (\r\n <group \r\n ref={groupRef} \r\n onClick={triggerShockwave} \r\n onDoubleClick={() => setEasterEggActive(true)}\r\n onPointerOver={(e) => { e.stopPropagation(); document.body.style.cursor = \"crosshair\"; }} \r\n onPointerOut={() => { document.body.style.cursor = \"default\"; }}\r\n >\r\n <SupernovaEasterEgg active={easterEggActive} color={color} onComplete={() => setEasterEggActive(false)} />\r\n \r\n <group ref={visualsGroupRef}>\r\n <Sphere args={[1.5, 64, 64]}>\r\n <MeshDistortMaterial color=\"#000000\" emissive={color} emissiveIntensity={1.5} distort={0.4} speed={3} roughness={0.1} />\r\n </Sphere>\r\n \r\n <mesh ref={shockwaveRef} rotation={[Math.PI / 2, 0, 0]}>\r\n <ringGeometry args={[1.6, 2.0, 64]} />\r\n <meshBasicMaterial color={color} transparent opacity={0} side={THREE.DoubleSide} />\r\n </mesh>\r\n\r\n <mesh rotation={[Math.PI / 2.2, 0.1, 0]}>\r\n <torusGeometry args={[3.2, 0.015, 16, 100]} />\r\n <meshBasicMaterial color={color} transparent opacity={0.5} />\r\n </mesh>\r\n <mesh rotation={[Math.PI / 2.2, -0.1, 0]}>\r\n <torusGeometry args={[4.5, 0.03, 16, 100]} />\r\n <meshBasicMaterial color=\"#38bdf8\" transparent opacity={0.3} />\r\n </mesh>\r\n </group>\r\n </group>\r\n );\r\n}\r\n\r\n// Asteroid field that physically runs away from the user's mouse cursor\r\nexport function AsteroidField({ count = 150, color = \"#6366f1\", shape = \"dodecahedron\" }: { count?: number, color?: string, shape?: \"dodecahedron\" | \"icosahedron\" | \"box\" }) {\r\n const meshRef = useRef<THREE.InstancedMesh>(null);\r\n const linesRef = useRef<THREE.InstancedMesh>(null); // Dedicated mesh for warp speed light beams\r\n const dummy = useMemo(() => new THREE.Object3D(), []);\r\n const [isPressing, setIsPressing] = useState(false);\r\n const warpSpeedRef = useRef(0);\r\n \r\n // Listen for global pointer down to trigger Warp Speed\r\n useEffect(() => {\r\n const handleDown = () => setIsPressing(true);\r\n const handleUp = () => setIsPressing(false);\r\n window.addEventListener(\"pointerdown\", handleDown);\r\n window.addEventListener(\"pointerup\", handleUp);\r\n return () => {\r\n window.removeEventListener(\"pointerdown\", handleDown);\r\n window.removeEventListener(\"pointerup\", handleUp);\r\n };\r\n }, []);\r\n \r\n const particles = useMemo(() => {\r\n return Array.from({ length: count }, () => ({\r\n pos: new THREE.Vector3((Math.random() - 0.5) * 25, (Math.random() - 0.5) * 25, (Math.random() - 0.5) * 40), // wider Z\r\n vel: new THREE.Vector3((Math.random() - 0.5) * 0.04, (Math.random() - 0.5) * 0.04, (Math.random() - 0.5) * 0.04),\r\n baseZSpeed: Math.random() * 0.05 + 0.01,\r\n scale: Math.random() * 0.3 + 0.05,\r\n rotSpeed: new THREE.Vector3(Math.random() * 0.1, Math.random() * 0.1, Math.random() * 0.1),\r\n rotation: new THREE.Vector3()\r\n }));\r\n }, [count, shape]);\r\n\r\n // Dedicated light beams that only appear during Warp Speed\r\n const warpLinesCount = 300;\r\n const warpLines = useMemo(() => {\r\n return Array.from({ length: warpLinesCount }, () => ({\r\n pos: new THREE.Vector3((Math.random() - 0.5) * 50, (Math.random() - 0.5) * 50, (Math.random() - 0.5) * 100),\r\n speed: Math.random() * 0.8 + 0.5,\r\n length: Math.random() * 5 + 3,\r\n }));\r\n }, [warpLinesCount]);\r\n\r\n useFrame((state, delta) => {\r\n // Warp speed smooth logic\r\n const targetWarp = isPressing ? 1 : 0;\r\n warpSpeedRef.current += (targetWarp - warpSpeedRef.current) * 0.05;\r\n \r\n const mouse3D = new THREE.Vector3(state.pointer.x * 12, state.pointer.y * 12, 2);\r\n const pushDir = new THREE.Vector3();\r\n\r\n // 1. Update Asteroids (Rocks) -> No stretching anymore! \r\n if (meshRef.current) {\r\n particles.forEach((p, i) => {\r\n // If warp speed active, push rocks backwards extremely fast straight ahead\r\n if (warpSpeedRef.current > 0.01) {\r\n const currentVelX = THREE.MathUtils.lerp(p.vel.x, 0, warpSpeedRef.current);\r\n const currentVelY = THREE.MathUtils.lerp(p.vel.y, 0, warpSpeedRef.current);\r\n p.pos.set(p.pos.x + currentVelX, p.pos.y + currentVelY, p.pos.z + (p.baseZSpeed + warpSpeedRef.current * 4.0));\r\n p.rotation.set(\r\n p.rotation.x + p.rotSpeed.x * (1 - warpSpeedRef.current),\r\n p.rotation.y + p.rotSpeed.y * (1 - warpSpeedRef.current),\r\n p.rotation.z + p.rotSpeed.z * (1 - warpSpeedRef.current)\r\n );\r\n } else {\r\n p.pos.add(p.vel);\r\n p.rotation.add(p.rotSpeed);\r\n p.pos.z += p.baseZSpeed;\r\n }\r\n\r\n // Wrap around space boundaries\r\n if (Math.abs(p.pos.x) > 20) p.vel.x *= -1;\r\n if (Math.abs(p.pos.y) > 20) p.vel.y *= -1;\r\n if (p.pos.z > 15) {\r\n p.pos.z = -50; \r\n p.pos.x = (Math.random() - 0.5) * 60; \r\n p.pos.y = (Math.random() - 0.5) * 60;\r\n }\r\n if (p.pos.z < -60) p.vel.z *= -1;\r\n\r\n // Mouse Repulsion Interaction\r\n const dist = p.pos.distanceTo(mouse3D);\r\n if (dist < 4 && warpSpeedRef.current < 0.5) {\r\n pushDir.copy(p.pos).sub(mouse3D).normalize();\r\n p.pos.add(pushDir.multiplyScalar((4 - dist) * 0.08));\r\n }\r\n \r\n if (warpSpeedRef.current < 0.1) {\r\n const s = Math.sin(0.001);\r\n const c = Math.cos(0.001);\r\n const x = p.pos.x;\r\n const z = p.pos.z;\r\n p.pos.x = x * c + z * s;\r\n p.pos.z = z * c - x * s;\r\n }\r\n\r\n dummy.position.copy(p.pos);\r\n // Preserve uniform scaling (NOT stretched like logs)\r\n // Fade them out slightly by making them smaller if zooming past near camera bounds\r\n const visualScale = p.scale * (1.0 - (warpSpeedRef.current * 0.5));\r\n dummy.scale.setScalar(visualScale);\r\n dummy.rotation.set(p.rotation.x, p.rotation.y, p.rotation.z);\r\n dummy.updateMatrix();\r\n meshRef.current!.setMatrixAt(i, dummy.matrix);\r\n });\r\n meshRef.current!.instanceMatrix.needsUpdate = true;\r\n }\r\n\r\n // 2. Update Warp Lines (Lasers) -> Only visible when warpSpeed > 0\r\n if (linesRef.current) {\r\n warpLines.forEach((line, i) => {\r\n // Move incredibly fast during warp\r\n line.pos.z += (line.speed + (warpSpeedRef.current * 8.0));\r\n \r\n // Loop lines back\r\n if (line.pos.z > 15) {\r\n line.pos.z = -80;\r\n line.pos.x = (Math.random() - 0.5) * 50;\r\n line.pos.y = (Math.random() - 0.5) * 50;\r\n }\r\n\r\n dummy.position.copy(line.pos);\r\n // Orient cylinder along Z axis rigidly\r\n dummy.rotation.set(Math.PI / 2, 0, 0); \r\n // Stretch based on warp intensity\r\n const stretch = line.length + (warpSpeedRef.current * 15.0);\r\n const thinness = 1.0 - (warpSpeedRef.current * 0.8);\r\n dummy.scale.set(thinness, stretch, thinness);\r\n dummy.updateMatrix();\r\n linesRef.current!.setMatrixAt(i, dummy.matrix);\r\n });\r\n linesRef.current.instanceMatrix.needsUpdate = true;\r\n \r\n // Link opacity to warp intensity directly\r\n const mat = linesRef.current.material as THREE.Material;\r\n mat.opacity = warpSpeedRef.current * 0.6; // Soft laser glow\r\n }\r\n \r\n // Dynamic FOV for Tunnel effect\r\n if (state.camera instanceof THREE.PerspectiveCamera) {\r\n const targetFov = 45 + (warpSpeedRef.current * 30); \r\n state.camera.fov += (targetFov - state.camera.fov) * 0.05;\r\n state.camera.updateProjectionMatrix();\r\n }\r\n });\r\n\r\n return (\r\n <group>\r\n {/* The true asteroids (No stretching, just rocks) */}\r\n <instancedMesh ref={meshRef} args={[undefined, undefined, count]} key={shape}>\r\n {shape === \"dodecahedron\" && <dodecahedronGeometry args={[1, 0]} />}\r\n {shape === \"icosahedron\" && <icosahedronGeometry args={[1, 0]} />}\r\n {shape === \"box\" && <boxGeometry args={[1, 1, 1]} />}\r\n <meshStandardMaterial color={color} roughness={0.4} metalness={0.6} />\r\n </instancedMesh>\r\n \r\n {/* The sci-fi light speed trails */}\r\n <instancedMesh ref={linesRef} args={[undefined, undefined, warpLinesCount]}>\r\n <cylinderGeometry args={[0.08, 0.08, 1, 8]} />\r\n <meshBasicMaterial color=\"#ffffff\" transparent opacity={0} blending={THREE.AdditiveBlending} depthWrite={false} />\r\n </instancedMesh>\r\n </group>\r\n );\r\n}\r\n\r\n// Controls camera movement based on Scroll + Mouse Tracking\r\nfunction CameraController() {\r\n useFrame((state) => {\r\n // 1. SCROLL PARALLAX: moves camera down effectively floating through space as you scroll down\r\n const scrollY = window.scrollY;\r\n // Reduce Y target so the camera doesn't veer off too drastically\r\n const targetY = (-scrollY * 0.005) + (state.pointer.y * 1.5);\r\n \r\n // 2. MOUSE PARALLAX: entire universe tilts slightly opposite to your mouse\r\n const targetX = state.pointer.x * 2;\r\n \r\n // Smooth Lerp\r\n state.camera.position.x += (targetX - state.camera.position.x) * 0.05;\r\n state.camera.position.y += (targetY - state.camera.position.y) * 0.05;\r\n \r\n state.camera.lookAt(0, 0, 0);\r\n });\r\n return null;\r\n}\r\n\r\n// Background Nebula Clouds\r\nexport function NebulaClouds() {\r\n const particleTexture = useMemo(() => {\r\n // Generate a soft radial gradient for the \"cloud\" particle\r\n const canvas = document.createElement('canvas');\r\n canvas.width = 128;\r\n canvas.height = 128;\r\n const ctx = canvas.getContext('2d');\r\n if (ctx) {\r\n const gradient = ctx.createRadialGradient(64, 64, 0, 64, 64, 64);\r\n gradient.addColorStop(0, 'rgba(255,255,255,1)');\r\n gradient.addColorStop(0.3, 'rgba(255,255,255,0.4)');\r\n gradient.addColorStop(0.7, 'rgba(255,255,255,0.05)');\r\n gradient.addColorStop(1, 'rgba(0,0,0,0)');\r\n ctx.fillStyle = gradient;\r\n ctx.fillRect(0, 0, 128, 128);\r\n }\r\n return new THREE.CanvasTexture(canvas);\r\n }, []);\r\n\r\n const count = 400;\r\n \r\n // Use useMemo to generate organic nebula shapes (Perlin/Simplex noise-like clusters)\r\n const { positions1, colors1, positions2, colors2 } = useMemo(() => {\r\n const p1 = new Float32Array(count * 3);\r\n const c1 = new Float32Array(count * 3);\r\n const p2 = new Float32Array(count * 3);\r\n const c2 = new Float32Array(count * 3);\r\n\r\n const baseColor1 = new THREE.Color(\"#4c1d95\"); // Deep Purple\r\n const accentColor1 = new THREE.Color(\"#be185d\"); // Deep Pink\r\n \r\n const baseColor2 = new THREE.Color(\"#1e3a8a\"); // Deep Blue\r\n const accentColor2 = new THREE.Color(\"#0ea5e9\"); // Cyan\r\n\r\n for (let i = 0; i < count; i++) {\r\n // Nebula 1: Large sweeping galactic arm\r\n const angle = Math.random() * Math.PI * 2;\r\n const radius = 10 + Math.random() * 40;\r\n const spreadY = (Math.random() - 0.5) * 15;\r\n p1[i * 3] = Math.cos(angle) * radius + (Math.random()-0.5)*15;\r\n p1[i * 3 + 1] = spreadY + (Math.random()-0.5)*10;\r\n p1[i * 3 + 2] = Math.sin(angle) * radius - 20 + (Math.random()-0.5)*15;\r\n \r\n const mixColor1 = baseColor1.clone().lerp(accentColor1, Math.random());\r\n c1[i * 3] = mixColor1.r;\r\n c1[i * 3 + 1] = mixColor1.g;\r\n c1[i * 3 + 2] = mixColor1.b;\r\n\r\n // Nebula 2: Concentrated core / diffuse background\r\n const angle2 = Math.random() * Math.PI * 2;\r\n const radius2 = Math.random() * 35;\r\n p2[i * 3] = Math.cos(angle2) * radius2 * 1.5;\r\n p2[i * 3 + 1] = (Math.random() - 0.5) * 25;\r\n p2[i * 3 + 2] = Math.sin(angle2) * radius2 - 30;\r\n\r\n const mixColor2 = baseColor2.clone().lerp(accentColor2, Math.random());\r\n c2[i * 3] = mixColor2.r;\r\n c2[i * 3 + 1] = mixColor2.g;\r\n c2[i * 3 + 2] = mixColor2.b;\r\n }\r\n return { positions1: p1, colors1: c1, positions2: p2, colors2: c2 };\r\n }, [count]);\r\n\r\n const groupRef = useRef<THREE.Group>(null);\r\n\r\n useFrame((_, delta) => {\r\n if (groupRef.current) {\r\n // Extremely slow drift of the entire nebula to make it feel alive\r\n groupRef.current.rotation.y += delta * 0.01;\r\n groupRef.current.rotation.z += delta * 0.002;\r\n }\r\n });\r\n\r\n return (\r\n <group ref={groupRef} position={[0, 0, -10]}>\r\n <points>\r\n <bufferGeometry>\r\n <bufferAttribute attach=\"attributes-position\" count={count} args={[positions1, 3]} />\r\n <bufferAttribute attach=\"attributes-color\" count={count} args={[colors1, 3]} />\r\n </bufferGeometry>\r\n <pointsMaterial \r\n size={35} \r\n map={particleTexture} \r\n vertexColors \r\n transparent \r\n opacity={0.08} \r\n depthWrite={false}\r\n depthTest={false} \r\n blending={THREE.AdditiveBlending} \r\n sizeAttenuation={true}\r\n />\r\n </points>\r\n <points rotation={[0.2, 0.5, -0.1]}>\r\n <bufferGeometry>\r\n <bufferAttribute attach=\"attributes-position\" count={count} args={[positions2, 3]} />\r\n <bufferAttribute attach=\"attributes-color\" count={count} args={[colors2, 3]} />\r\n </bufferGeometry>\r\n <pointsMaterial \r\n size={45} \r\n map={particleTexture} \r\n vertexColors \r\n transparent \r\n opacity={0.06} \r\n depthWrite={false}\r\n depthTest={false} \r\n blending={THREE.AdditiveBlending} \r\n sizeAttenuation={true}\r\n />\r\n </points>\r\n </group>\r\n );\r\n}\r\n\r\nexport default function Scene({ \r\n coreColor = \"#312e81\", \r\n particleColor = \"#6366f1\", \r\n particleCount = 150, \r\n particleShape = \"dodecahedron\" \r\n}: { \r\n coreColor?: string, \r\n particleColor?: string, \r\n particleCount?: number, \r\n particleShape?: \"dodecahedron\" | \"icosahedron\" | \"box\" \r\n}) {\r\n return (\r\n <div className=\"absolute inset-0 w-full h-full z-0 pointer-events-auto bg-[#020205]\">\r\n <Canvas camera={{ position: [0, 0, 12], fov: 45 }} gl={{ alpha: true }}>\r\n <color attach=\"background\" args={['#020205']} />\r\n <React.Suspense fallback={null}>\r\n <ambientLight intensity={0.5} />\r\n <directionalLight position={[10, 10, 5]} intensity={3} color=\"#818cf8\" />\r\n <directionalLight position={[-10, -10, -5]} intensity={2} color=\"#c084fc\" />\r\n \r\n <CameraController />\r\n <BlackHoleCore color={coreColor} />\r\n <AsteroidField count={particleCount} color={particleColor} shape={particleShape} />\r\n <NebulaClouds />\r\n \r\n {/* Dense Universe Stars & Sparkles */}\r\n <Stars radius={150} depth={100} count={8000} factor={6} saturation={1} fade speed={2} />\r\n <Sparkles count={300} scale={25} size={3} speed={0.2} opacity={0.4} color=\"#818cf8\" />\r\n <Sparkles count={200} scale={20} size={1} speed={0.4} opacity={0.6} color=\"#c084fc\" />\r\n <Sparkles count={100} scale={30} size={6} speed={0.1} opacity={0.2} color=\"#2dd4bf\" />\r\n \r\n <Environment preset=\"city\" />\r\n </React.Suspense>\r\n </Canvas>\r\n </div>\r\n );\r\n}\r\n","\"use client\";\n\nimport React, { useState, useRef, useEffect } from 'react';\n\nexport const Button = ({ \n children, \n variant = 'primary', \n className = '', \n customColor,\n customBg,\n customBorder,\n customRadius,\n customSize,\n style,\n ...props \n}: any) => {\n const base = \"font-medium transition-all duration-300 relative overflow-hidden group active:scale-95 flex items-center justify-center\";\n const sizeClass = customSize === 'sm' ? 'px-4 py-2 text-sm' : customSize === 'lg' ? 'px-8 py-4 text-lg' : 'px-6 py-3';\n \n const customStyles = {\n ...(customColor && { color: customColor }),\n ...(customBg && { backgroundColor: customBg }),\n ...(customBorder && { border: customBorder }),\n ...(customRadius && { borderRadius: customRadius }),\n ...style\n };\n\n if (variant === 'mecha') {\n return (\n <button \n className={`${sizeClass} font-mono font-bold tracking-[0.2em] uppercase text-xs transition-all relative overflow-hidden group active:scale-95 flex items-center justify-center bg-zinc-900 border-l-4 border-l-yellow-500 border-y border-y-zinc-800 border-r border-r-zinc-800 text-zinc-300 hover:text-white hover:bg-zinc-800 hover:border-l-yellow-400 ${className}`}\n style={{ clipPath: \"polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px)\", ...customStyles }}\n {...props}\n >\n <div className=\"absolute inset-0 bg-[repeating-linear-gradient(45deg,transparent,transparent_2px,rgba(255,255,255,0.02)_2px,rgba(255,255,255,0.02)_4px)] pointer-events-none\" />\n <span className=\"relative z-10 flex items-center gap-2\">\n {children}\n </span>\n <div className=\"absolute right-2 bottom-2 w-1.5 h-1.5 bg-yellow-500/50 group-hover:bg-yellow-400\" />\n </button>\n );\n }\n\n const variants = {\n primary: \"bg-white text-black hover:bg-zinc-200 active:bg-zinc-300 hover:shadow-lg rounded-lg\",\n glow: \"bg-indigo-500/20 text-indigo-300 border border-indigo-500/50 hover:bg-indigo-500/40 hover:shadow-[0_0_20px_rgba(99,102,241,0.4)] active:bg-indigo-500/50 rounded-lg\",\n ghost: \"bg-transparent text-zinc-300 hover:bg-white/10 active:bg-white/20 rounded-lg\",\n outline: \"bg-transparent border border-white/20 text-white hover:border-white/60 hover:bg-white/5 active:bg-white/10 rounded-lg\",\n danger: \"bg-rose-500/10 border border-rose-500/50 text-rose-400 hover:bg-rose-500/20 hover:shadow-[0_0_20px_rgba(244,63,94,0.4)] active:bg-rose-500/30 rounded-lg\"\n };\n \n return (\n <button \n className={`${base} ${sizeClass} ${(variants as any)[variant] || variants.primary} ${className}`} \n style={customStyles}\n {...props}\n >\n <span className=\"relative z-10\">{children}</span>\n </button>\n );\n};\n\nexport const TextBox = ({ \n variant = 'default', \n className = '', \n customColor,\n customBg,\n customBorder,\n customRadius,\n style,\n ...props \n}: any) => {\n const base = \"w-full focus:outline-none transition-all\";\n \n const customStyles = {\n ...(customColor && { color: customColor }),\n ...(customBg && { backgroundColor: customBg }),\n ...(customBorder && { border: customBorder }),\n ...(customRadius && { borderRadius: customRadius }),\n ...style\n };\n\n const variants = {\n default: \"bg-[#0a0a0f] border border-white/10 rounded-xl px-4 py-3 text-white placeholder:text-zinc-600 focus:border-indigo-500 focus:ring-1 focus:ring-indigo-500\",\n underline: \"bg-transparent border-b-2 border-white/10 px-0 py-3 text-white placeholder:text-zinc-600 focus:border-indigo-500 rounded-none\",\n glow: \"bg-indigo-500/5 border border-indigo-500/30 rounded-xl px-4 py-3 text-indigo-100 placeholder:text-indigo-500/50 focus:border-indigo-400 focus:shadow-[0_0_20px_rgba(99,102,241,0.2)]\",\n mecha: \"bg-black border border-zinc-800 focus:border-yellow-500 text-yellow-50 font-mono text-sm px-4 py-3 rounded-none placeholder:text-zinc-700 relative z-10 w-full\"\n };\n\n if (variant === 'mecha') {\n return (\n <div className={`relative ${className}`} style={{ ...(customRadius && { borderRadius: customRadius }) }}>\n <div className=\"absolute top-0 left-0 w-2 h-2 border-t-2 border-l-2 border-yellow-500/50 pointer-events-none\" style={{ borderColor: customBorder ? customBorder.split(' ')[2] || customBorder : undefined }} />\n <div className=\"absolute bottom-0 right-0 w-2 h-2 border-b-2 border-r-2 border-yellow-500/50 pointer-events-none\" style={{ borderColor: customBorder ? customBorder.split(' ')[2] || customBorder : undefined }} />\n <input \n className={variants.mecha}\n style={customStyles}\n {...props}\n />\n <div className=\"absolute right-3 top-1/2 -translate-y-1/2 text-[9px] font-mono text-yellow-500/30 pointer-events-none\">[INPUT]</div>\n </div>\n );\n }\n\n return (\n <input \n className={`${base} ${(variants as any)[variant] || variants.default} ${className}`}\n style={customStyles}\n {...props}\n />\n );\n};\n\nexport const Dropdown = ({ options = [], variant = 'default', placeholder = \"Select...\", className = '' }: any) => {\n const [isOpen, setIsOpen] = useState(false);\n const [selected, setSelected] = useState('');\n const dropdownRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const handleClickOutside = (event: MouseEvent) => {\n if (dropdownRef.current && !dropdownRef.current.contains(event.target as Node)) {\n setIsOpen(false);\n }\n };\n document.addEventListener('mousedown', handleClickOutside);\n return () => document.removeEventListener('mousedown', handleClickOutside);\n }, []);\n\n const base = \"w-full transition-all cursor-pointer flex justify-between items-center\";\n const variants = {\n default: \"bg-[#0a0a0f] border border-white/10 rounded-xl px-4 py-3 text-white focus:outline-none focus:border-indigo-500\",\n ghost: \"bg-white/5 border border-transparent rounded-xl px-4 py-3 text-zinc-300 hover:bg-white/10 focus:bg-[#0a0a0f] focus:border-indigo-500\",\n mecha: \"bg-black border border-zinc-800 rounded-none px-4 py-3 text-yellow-50 font-mono text-sm hover:border-yellow-500/50 focus:border-yellow-500 relative\"\n };\n\n return (\n <div className={`relative ${className}`} ref={dropdownRef}>\n {variant === 'mecha' && (\n <>\n <div className=\"absolute top-0 left-0 w-2 h-2 border-t-2 border-l-2 border-yellow-500/50 z-10 pointer-events-none\" />\n <div className=\"absolute bottom-0 right-0 w-2 h-2 border-b-2 border-r-2 border-yellow-500/50 z-10 pointer-events-none\" />\n </>\n )}\n <div \n className={`${base} ${(variants as any)[variant] || variants.default}`}\n onClick={() => setIsOpen(!isOpen)}\n >\n <span className={selected ? 'text-white' : 'text-zinc-500'}>\n {selected || placeholder}\n </span>\n <svg className={`w-4 h-4 text-zinc-500 transition-transform duration-200 ${isOpen ? 'rotate-180' : ''}`} fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M19 9l-7 7-7-7\" />\n </svg>\n </div>\n\n {isOpen && (\n <div className={`absolute z-50 w-full mt-2 overflow-hidden animate-in fade-in slide-in-from-top-2 duration-200 ${variant === 'mecha' ? 'bg-black border border-yellow-500/50 rounded-none shadow-[0_0_20px_rgba(234,179,8,0.1)]' : 'bg-[#0a0a0f] border border-white/10 rounded-xl shadow-[0_10px_40px_-10px_rgba(0,0,0,0.5)]'}`}>\n <div className=\"max-h-60 overflow-y-auto custom-scrollbar\">\n {options.map((opt: string, i: number) => (\n <div \n key={i} \n className={variant === 'mecha' \n ? `px-4 py-3 text-sm cursor-pointer transition-colors font-mono ${selected === opt ? 'bg-yellow-500/20 text-yellow-300 border-l-2 border-yellow-500' : 'text-zinc-400 hover:bg-zinc-900 border-l-2 border-transparent hover:text-white'}`\n : `px-4 py-3 text-sm cursor-pointer transition-colors ${selected === opt ? 'bg-indigo-500/20 text-indigo-300' : 'text-zinc-300 hover:bg-white/10 hover:text-white'}`\n }\n onClick={() => {\n setSelected(opt);\n setIsOpen(false);\n }}\n >\n {opt}\n </div>\n ))}\n </div>\n </div>\n )}\n </div>\n );\n};\n\nexport const Card = ({ \n children, \n variant = 'default', \n className = '', \n customColor,\n customBg,\n customBorder,\n customRadius,\n style,\n ...props \n}: any) => {\n const base = \"transition-all duration-300 relative overflow-hidden\";\n \n const customStyles = {\n ...(customColor && { color: customColor }),\n ...(customBg && { backgroundColor: customBg }),\n ...(customBorder && { border: customBorder }),\n ...(customRadius && { borderRadius: customRadius }),\n ...style\n };\n\n const variants = {\n default: \"p-6 rounded-2xl bg-[#050508] border border-white/10\",\n glow: \"p-6 rounded-2xl bg-indigo-900/10 border border-indigo-500/30 shadow-[0_0_30px_rgba(99,102,241,0.15)]\",\n glass: \"p-6 rounded-2xl bg-white/[0.08] backdrop-blur-xl border border-white/20 shadow-[0_8px_32px_0_rgba(255,255,255,0.05)]\",\n mecha: \"p-8 rounded-none bg-zinc-900/80 border border-zinc-800 backdrop-blur-sm\"\n };\n\n if (variant === 'mecha') {\n return (\n <div className={`${base} ${variants.mecha} ${className}`} style={customStyles} {...props}>\n {/* Mecha Card Accents */}\n <div className=\"absolute top-0 left-0 w-8 h-8 border-t-2 border-l-2 border-yellow-500/50 pointer-events-none\" style={{ borderColor: customBorder ? customBorder.split(' ')[2] || customBorder : undefined }} />\n <div className=\"absolute top-0 right-0 w-8 h-8 border-t-2 border-r-2 border-yellow-500/50 pointer-events-none\" style={{ borderColor: customBorder ? customBorder.split(' ')[2] || customBorder : undefined }} />\n <div className=\"absolute bottom-0 left-0 w-8 h-8 border-b-2 border-l-2 border-yellow-500/50 pointer-events-none\" style={{ borderColor: customBorder ? customBorder.split(' ')[2] || customBorder : undefined }} />\n <div className=\"absolute bottom-0 right-0 w-8 h-8 border-b-2 border-r-2 border-yellow-500/50 pointer-events-none\" style={{ borderColor: customBorder ? customBorder.split(' ')[2] || customBorder : undefined }} />\n \n {/* Warning track background */}\n <div className=\"absolute bottom-0 left-10 right-10 h-[2px] bg-[repeating-linear-gradient(45deg,transparent,transparent_4px,rgba(234,179,8,0.5)_4px,rgba(234,179,8,0.5)_8px)] pointer-events-none\" />\n \n {children}\n </div>\n );\n }\n\n return (\n <div className={`${base} ${(variants as any)[variant] || variants.default} ${className}`} style={customStyles} {...props}>\n {children}\n </div>\n );\n};\n\nexport const Badge = ({ \n children, \n variant = 'primary', \n className = '', \n customColor,\n customBg,\n customBorder,\n customRadius,\n style,\n ...props \n}: any) => {\n const base = \"px-2.5 py-0.5 rounded-full text-xs font-semibold tracking-wider uppercase transition-all\";\n \n const customStyles = {\n ...(customColor && { color: customColor }),\n ...(customBg && { backgroundColor: customBg }),\n ...(customBorder && { border: customBorder }),\n ...(customRadius && { borderRadius: customRadius }),\n ...style\n };\n\n if (variant === 'mecha') {\n return (\n <span className={`px-2 py-1 bg-yellow-500/10 border border-yellow-500/50 text-[#eab308] text-[9px] font-mono font-bold tracking-[0.2em] relative uppercase ${className}`} style={customStyles} {...props}>\n <span className=\"absolute -left-1 flex items-center justify-center top-1/2 -translate-y-1/2 h-full gap-[1px] bg-[#020205] px-[2px]\">\n <span className=\"w-[1px] h-2 bg-yellow-500\" style={{ backgroundColor: customColor || undefined }} />\n <span className=\"w-[1px] h-2 bg-yellow-500\" style={{ backgroundColor: customColor || undefined }} />\n </span>\n <span className=\"pl-1\">{children}</span>\n </span>\n );\n }\n\n const variants = {\n primary: \"bg-indigo-500/20 text-indigo-300 border border-indigo-500/50\",\n success: \"bg-emerald-500/20 text-emerald-300 border border-emerald-500/50\",\n danger: \"bg-rose-500/20 text-rose-300 border border-rose-500/50\",\n outline: \"bg-transparent text-zinc-400 border border-zinc-700\"\n };\n\n return (\n <span className={`${base} ${(variants as any)[variant] || variants.primary} ${className}`} style={customStyles} {...props}>\n {children}\n </span>\n );\n};\n\nexport const Switch = ({ \n checked, \n onChange, \n variant = 'default', \n className = '',\n customColor,\n customBg,\n customBorder,\n customRadius,\n style,\n ...props \n}: any) => {\n const customStyles = {\n ...(customBg && { backgroundColor: customBg }),\n ...(customBorder && { border: customBorder }),\n ...(customRadius && { borderRadius: customRadius }),\n ...style\n };\n\n if (variant === 'mecha') {\n return (\n <div \n className={`w-14 h-6 border-2 border-zinc-700 bg-zinc-900 relative cursor-pointer flex items-center p-0.5 transition-colors ${checked ? 'border-yellow-500/50' : ''} ${className}`} \n onClick={onChange}\n style={customStyles}\n {...props}\n >\n {/* Warning track background */}\n <div className=\"absolute inset-0 bg-[repeating-linear-gradient(45deg,transparent,transparent_4px,rgba(255,255,255,0.02)_4px,rgba(255,255,255,0.02)_8px)] pointer-events-none\" />\n <div \n className={`w-5 h-4 bg-zinc-400 absolute transition-all duration-300 ease-out flex items-center justify-center ${checked ? 'left-[30px] bg-yellow-500 shadow-[0_0_10px_rgba(234,179,8,0.5)]' : 'left-0.5'}`} \n style={{ backgroundColor: checked && customColor ? customColor : undefined, boxShadow: checked && customColor ? `0 0 10px ${customColor}` : undefined }}\n >\n <div className={`w-[2px] h-2 ${checked ? 'bg-black/50' : 'bg-black/20'}`} />\n </div>\n </div>\n );\n }\n\n const base = \"w-11 h-6 rounded-full relative cursor-pointer transition-colors duration-300\";\n const variants = {\n default: checked ? \"bg-white\" : \"bg-zinc-800\",\n glow: checked ? \"bg-indigo-500 shadow-[0_0_15px_rgba(99,102,241,0.5)]\" : \"bg-zinc-800\"\n };\n const thumbBase = \"w-4 h-4 rounded-full absolute top-1 transition-all duration-300\";\n const thumbVariants = {\n default: checked ? \"left-6 bg-black\" : \"left-1 bg-zinc-400\",\n glow: checked ? \"left-6 bg-white\" : \"left-1 bg-zinc-500\"\n };\n\n return (\n <div className={`${base} ${(variants as any)[variant] || variants.default} ${className}`} style={customStyles} onClick={onChange} {...props}>\n <div className={`${thumbBase} ${(thumbVariants as any)[variant] || thumbVariants.default}`} style={{ backgroundColor: checked && customColor ? customColor : undefined }} />\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACEA,mBAA4D;AAC5D,mBAAiC;AACjC,kBAAyF;AACzF,YAAuB;AA6IjB;AA1IN,SAAS,mBAAmB,EAAE,QAAQ,OAAO,WAAW,GAA+D;AACrH,QAAM,QAAQ;AACd,QAAM,cAAU,qBAA4B,IAAI;AAEhD,QAAM,YAAQ,sBAAQ,MAAM,IAAU,eAAS,GAAG,CAAC,CAAC;AAGpD,QAAM,uBAAmB,sBAAQ,MAAM;AACrC,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QAArI,EACC,uDAAC,SAAI,WAAW,GAAG,SAAS,IAAK,cAAsB,OAAO,KAAK,cAAc,OAAO,IAAI,OAAO,EAAE,iBAAiB,WAAW,cAAc,cAAc,OAAU,GAAG,IAC5K;AAEJ;","names":["React","import_react","import_jsx_runtime"]}
1
+ {"version":3,"sources":["../src/lib/index.ts","../src/components/Scene.tsx","../src/components/UI.tsx"],"sourcesContent":["export { default as Scene } from '../components/Scene';\r\nexport { Button, TextBox, Dropdown, Card, Badge, Switch } from '../components/UI';","\"use client\";\r\n\r\nimport React, { useRef, useState, useMemo, useEffect } from \"react\";\r\nimport { Canvas, useFrame } from \"@react-three/fiber\";\r\nimport { Environment, Sparkles, Stars, Sphere, MeshDistortMaterial, Clouds, Cloud } from \"@react-three/drei\";\r\nimport * as THREE from \"three\";\r\n\r\n// Supernova Easter Egg Component\r\nfunction SupernovaEasterEgg({ active, color, onComplete }: { active: boolean, color: string, onComplete: () => void }) {\r\n const count = 150;\r\n const meshRef = useRef<THREE.InstancedMesh>(null);\r\n \r\n const dummy = useMemo(() => new THREE.Object3D(), []);\r\n \r\n // Distribute particles perfectly on the sphere shell initially\r\n const initialPositions = useMemo(() => {\r\n const pts = [];\r\n for(let i=0; i<count; i++) {\r\n const p = new THREE.Vector3(\r\n (Math.random() - 0.5) * 2,\r\n (Math.random() - 0.5) * 2,\r\n (Math.random() - 0.5) * 2\r\n ).normalize().multiplyScalar(1.5); // Start exactly on the Coreradius\r\n pts.push(p);\r\n }\r\n return pts;\r\n }, []);\r\n \r\n const velocities = useMemo(() => initialPositions.map(p => p.clone().normalize().multiplyScalar(Math.random() * 20 + 20)), [initialPositions]);\r\n \r\n const currentPositions = useRef(initialPositions.map(p => p.clone()));\r\n const time = useRef(0);\r\n const Y_AXIS = useMemo(() => new THREE.Vector3(0,1,0), []);\r\n const tempVel = useMemo(() => new THREE.Vector3(), []);\r\n\r\n const maxBonds = 2500;\r\n const bondsMeshRef = useRef<THREE.InstancedMesh>(null);\r\n const dummyBond = useMemo(() => new THREE.Object3D(), []);\r\n\r\n useFrame((_, delta) => {\r\n if (!active) return;\r\n time.current += delta;\r\n const t = time.current;\r\n\r\n let phase = 0; \r\n if (t < 2.0) phase = 1; // Violent Explosion\r\n else if (t < 4.0) phase = 2; // Drift and expand lines\r\n else if (t < 6.5) phase = 3; // Contract back to dense cage\r\n else if (t < 8.0) phase = 4; // Fade dots out, let core emerge\r\n else {\r\n onComplete();\r\n time.current = 0;\r\n currentPositions.current = initialPositions.map(p => p.clone());\r\n for(let i=0; i<count;i++) {\r\n velocities[i] = initialPositions[i].clone().normalize().multiplyScalar(Math.random() * 20 + 20);\r\n }\r\n if (bondsMeshRef.current) bondsMeshRef.current.count = 0;\r\n return;\r\n }\r\n\r\n let bondCount = 0;\r\n\r\n let bondThreshold = 0;\r\n if (phase === 2) {\r\n bondThreshold = ((t - 2.0) / 2.0) * 8.0; // Lines grow from 0 to 8 radius seamlessly\r\n } else if (phase >= 3) {\r\n bondThreshold = 8.0; // Everything is connected\r\n }\r\n\r\n for (let i = 0; i < count; i++) {\r\n let p = currentPositions.current[i];\r\n \r\n if (phase === 1) {\r\n tempVel.copy(velocities[i]).multiplyScalar(delta);\r\n p.add(tempVel);\r\n velocities[i].multiplyScalar(0.92); // Viscous fluid drag\r\n p.applyAxisAngle(Y_AXIS, delta * 2.0); // Orbital swirl\r\n } else if (phase === 2) {\r\n tempVel.copy(velocities[i]).multiplyScalar(delta);\r\n p.add(tempVel);\r\n velocities[i].multiplyScalar(0.95); // Float freely\r\n p.applyAxisAngle(Y_AXIS, delta * 0.5); // Slow drift\r\n } else {\r\n // Smoothly ease back right onto the original shell\r\n const target = initialPositions[i];\r\n p.lerp(target, 1.0 - Math.pow(0.001, delta)); // Highly sticky easing\r\n p.applyAxisAngle(Y_AXIS, delta * 0.5);\r\n }\r\n \r\n // Connect points into a liquid mesh\r\n if (bondThreshold > 0 && phase <= 4) {\r\n const thresholdSq = bondThreshold * bondThreshold;\r\n for (let j = i + 1; j < count; j++) {\r\n const p2 = currentPositions.current[j];\r\n const distSq = p.distanceToSquared(p2);\r\n if (distSq < thresholdSq && distSq < 16.0) { // Keep reasonable draw limits (4.0^2)\r\n if (bondCount < maxBonds) {\r\n const dist = Math.sqrt(distSq);\r\n // liquid thickness: thicker when close, thin when far\r\n const thickness = Math.max(0.015, 0.15 - (dist * 0.035)) * (bondThreshold / 8.0);\r\n \r\n dummyBond.position.copy(p).lerp(p2, 0.5); // center point\r\n dummyBond.lookAt(p2); // Orient Z axis toward p2\r\n dummyBond.scale.set(thickness, thickness, dist * 0.5); // scale Z to bridge the gap exactly\r\n dummyBond.updateMatrix();\r\n \r\n if (bondsMeshRef.current) bondsMeshRef.current.setMatrixAt(bondCount, dummyBond.matrix);\r\n bondCount++;\r\n }\r\n }\r\n }\r\n }\r\n \r\n // Scale handles visual pop nicely\r\n let scale = 0.2;\r\n if (phase === 1) {\r\n scale = Math.max(0.1, 0.4 - p.length()*0.015);\r\n } else if (phase === 2 || phase === 3) {\r\n scale = 0.15;\r\n } else if (phase === 4) {\r\n // Fade out the physical dots smoothly as the core takes over\r\n const progress = (t - 6.5) / 1.5;\r\n scale = THREE.MathUtils.lerp(0.15, 0, progress);\r\n }\r\n \r\n dummy.position.copy(p);\r\n dummy.scale.set(scale, scale, scale);\r\n dummy.updateMatrix();\r\n if (meshRef.current) meshRef.current.setMatrixAt(i, dummy.matrix);\r\n }\r\n \r\n if (meshRef.current) meshRef.current.instanceMatrix.needsUpdate = true;\r\n \r\n if (bondsMeshRef.current) {\r\n bondsMeshRef.current.count = bondCount;\r\n bondsMeshRef.current.instanceMatrix.needsUpdate = true;\r\n }\r\n });\r\n\r\n if (!active) return null;\r\n\r\n // Let bond lines fade during phase 4 smoothly\r\n const lineOpacity = time.current > 6.5 ? Math.max(0, 0.4 - ((time.current - 6.5)/1.5)*0.4) : 0.4;\r\n const pointOpacity = time.current > 6.5 ? Math.max(0, 0.9 - ((time.current - 6.5)/1.5)*0.9) : 0.9;\r\n\r\n return (\r\n <group>\r\n <instancedMesh ref={meshRef} args={[undefined, undefined, count]}>\r\n <sphereGeometry args={[0.3, 16, 16]} />\r\n <meshStandardMaterial color={color} emissive={color} emissiveIntensity={4} transparent opacity={pointOpacity} roughness={0} metalness={1} />\r\n </instancedMesh>\r\n <instancedMesh ref={bondsMeshRef} args={[undefined, undefined, maxBonds]} frustumCulled={false}>\r\n <sphereGeometry args={[1, 16, 16]} />\r\n <meshStandardMaterial \r\n color=\"#38bdf8\" \r\n transparent \r\n opacity={lineOpacity * 1.5} \r\n roughness={0.0} \r\n metalness={0.8} \r\n envMapIntensity={2.0} \r\n blending={THREE.AdditiveBlending} \r\n depthWrite={false}\r\n />\r\n </instancedMesh>\r\n </group>\r\n );\r\n}\r\n\r\n// The central \"Black Hole\" or pulsing star\r\nexport function BlackHoleCore({ color = \"#312e81\" }: { color?: string }) {\r\n const groupRef = useRef<THREE.Group>(null);\r\n const visualsGroupRef = useRef<THREE.Group>(null);\r\n const shockwaveRef = useRef<THREE.Mesh>(null);\r\n const [clicked, setClicked] = useState(false);\r\n const shockProgress = useRef(0);\r\n const [easterEggActive, setEasterEggActive] = useState(false);\r\n \r\n // Track egg time internally for the BlackHole to know when to grow back\r\n const eggTime = useRef(0);\r\n\r\n const triggerShockwave = () => {\r\n if (easterEggActive) return;\r\n setClicked(true);\r\n shockProgress.current = 0;\r\n setTimeout(() => setClicked(false), 800);\r\n };\r\n\r\n useFrame((_, delta) => {\r\n if (groupRef.current) {\r\n groupRef.current.rotation.y += delta * 0.05;\r\n groupRef.current.rotation.x += delta * 0.02;\r\n }\r\n\r\n if (visualsGroupRef.current) {\r\n if (easterEggActive) {\r\n eggTime.current += delta;\r\n // The egg takes 8.0s. It fades back in during Phase 4 (6.5s to 8.0s)\r\n if (eggTime.current > 6.5) {\r\n const progress = Math.min((eggTime.current - 6.5) / 1.5, 1.0);\r\n const ease = 1 - Math.pow(1 - progress, 3); // cubic ease out\r\n visualsGroupRef.current.scale.set(ease, ease, ease);\r\n } else {\r\n visualsGroupRef.current.scale.lerp(new THREE.Vector3(0, 0, 0), delta * 25); // Shrink intensely at start\r\n }\r\n } else {\r\n eggTime.current = 0;\r\n visualsGroupRef.current.scale.lerp(new THREE.Vector3(1, 1, 1), delta * 5);\r\n }\r\n }\r\n\r\n if (clicked && shockProgress.current < 1) shockProgress.current += delta * 2;\r\n else if (!clicked && shockProgress.current > 0) shockProgress.current -= delta * 1;\r\n if (shockProgress.current < 0) shockProgress.current = 0;\r\n\r\n if (shockwaveRef.current) {\r\n const s = 1 + shockProgress.current * 15;\r\n shockwaveRef.current.scale.set(s, s, s);\r\n (shockwaveRef.current.material as THREE.Material).opacity = Math.max(0, 0.6 - shockProgress.current * 0.6);\r\n }\r\n });\r\n\r\n return (\r\n <group \r\n ref={groupRef} \r\n onClick={triggerShockwave} \r\n onDoubleClick={() => setEasterEggActive(true)}\r\n onPointerOver={(e) => { e.stopPropagation(); document.body.style.cursor = \"crosshair\"; }} \r\n onPointerOut={() => { document.body.style.cursor = \"default\"; }}\r\n >\r\n <SupernovaEasterEgg active={easterEggActive} color={color} onComplete={() => setEasterEggActive(false)} />\r\n \r\n <group ref={visualsGroupRef}>\r\n <Sphere args={[1.5, 64, 64]}>\r\n <MeshDistortMaterial color=\"#000000\" emissive={color} emissiveIntensity={1.5} distort={0.4} speed={3} roughness={0.1} />\r\n </Sphere>\r\n \r\n <mesh ref={shockwaveRef} rotation={[Math.PI / 2, 0, 0]}>\r\n <ringGeometry args={[1.6, 2.0, 64]} />\r\n <meshBasicMaterial color={color} transparent opacity={0} side={THREE.DoubleSide} />\r\n </mesh>\r\n\r\n <mesh rotation={[Math.PI / 2.2, 0.1, 0]}>\r\n <torusGeometry args={[3.2, 0.015, 16, 100]} />\r\n <meshBasicMaterial color={color} transparent opacity={0.5} />\r\n </mesh>\r\n <mesh rotation={[Math.PI / 2.2, -0.1, 0]}>\r\n <torusGeometry args={[4.5, 0.03, 16, 100]} />\r\n <meshBasicMaterial color=\"#38bdf8\" transparent opacity={0.3} />\r\n </mesh>\r\n </group>\r\n </group>\r\n );\r\n}\r\n\r\n// Asteroid field that physically runs away from the user's mouse cursor\r\nexport function AsteroidField({ count = 150, color = \"#6366f1\", shape = \"dodecahedron\" }: { count?: number, color?: string, shape?: \"dodecahedron\" | \"icosahedron\" | \"box\" }) {\r\n const meshRef = useRef<THREE.InstancedMesh>(null);\r\n const linesRef = useRef<THREE.InstancedMesh>(null); // Dedicated mesh for warp speed light beams\r\n const dummy = useMemo(() => new THREE.Object3D(), []);\r\n const [isPressing, setIsPressing] = useState(false);\r\n const warpSpeedRef = useRef(0);\r\n \r\n // Listen for global pointer down to trigger Warp Speed\r\n useEffect(() => {\r\n const handleDown = () => setIsPressing(true);\r\n const handleUp = () => setIsPressing(false);\r\n window.addEventListener(\"pointerdown\", handleDown);\r\n window.addEventListener(\"pointerup\", handleUp);\r\n return () => {\r\n window.removeEventListener(\"pointerdown\", handleDown);\r\n window.removeEventListener(\"pointerup\", handleUp);\r\n };\r\n }, []);\r\n \r\n const particles = useMemo(() => {\r\n return Array.from({ length: count }, () => ({\r\n pos: new THREE.Vector3((Math.random() - 0.5) * 25, (Math.random() - 0.5) * 25, (Math.random() - 0.5) * 40), // wider Z\r\n vel: new THREE.Vector3((Math.random() - 0.5) * 0.04, (Math.random() - 0.5) * 0.04, (Math.random() - 0.5) * 0.04),\r\n baseZSpeed: Math.random() * 0.05 + 0.01,\r\n scale: Math.random() * 0.3 + 0.05,\r\n rotSpeed: new THREE.Vector3(Math.random() * 0.1, Math.random() * 0.1, Math.random() * 0.1),\r\n rotation: new THREE.Vector3()\r\n }));\r\n }, [count, shape]);\r\n\r\n // Dedicated light beams that only appear during Warp Speed\r\n const warpLinesCount = 300;\r\n const warpLines = useMemo(() => {\r\n return Array.from({ length: warpLinesCount }, () => ({\r\n pos: new THREE.Vector3((Math.random() - 0.5) * 50, (Math.random() - 0.5) * 50, (Math.random() - 0.5) * 100),\r\n speed: Math.random() * 0.8 + 0.5,\r\n length: Math.random() * 5 + 3,\r\n }));\r\n }, [warpLinesCount]);\r\n\r\n useFrame((state, delta) => {\r\n // Warp speed smooth logic\r\n const targetWarp = isPressing ? 1 : 0;\r\n warpSpeedRef.current += (targetWarp - warpSpeedRef.current) * 0.05;\r\n \r\n const mouse3D = new THREE.Vector3(state.pointer.x * 12, state.pointer.y * 12, 2);\r\n const pushDir = new THREE.Vector3();\r\n\r\n // 1. Update Asteroids (Rocks) -> No stretching anymore! \r\n if (meshRef.current) {\r\n particles.forEach((p, i) => {\r\n // If warp speed active, push rocks backwards extremely fast straight ahead\r\n if (warpSpeedRef.current > 0.01) {\r\n const currentVelX = THREE.MathUtils.lerp(p.vel.x, 0, warpSpeedRef.current);\r\n const currentVelY = THREE.MathUtils.lerp(p.vel.y, 0, warpSpeedRef.current);\r\n p.pos.set(p.pos.x + currentVelX, p.pos.y + currentVelY, p.pos.z + (p.baseZSpeed + warpSpeedRef.current * 4.0));\r\n p.rotation.set(\r\n p.rotation.x + p.rotSpeed.x * (1 - warpSpeedRef.current),\r\n p.rotation.y + p.rotSpeed.y * (1 - warpSpeedRef.current),\r\n p.rotation.z + p.rotSpeed.z * (1 - warpSpeedRef.current)\r\n );\r\n } else {\r\n p.pos.add(p.vel);\r\n p.rotation.add(p.rotSpeed);\r\n p.pos.z += p.baseZSpeed;\r\n }\r\n\r\n // Wrap around space boundaries\r\n if (Math.abs(p.pos.x) > 20) p.vel.x *= -1;\r\n if (Math.abs(p.pos.y) > 20) p.vel.y *= -1;\r\n if (p.pos.z > 15) {\r\n p.pos.z = -50; \r\n p.pos.x = (Math.random() - 0.5) * 60; \r\n p.pos.y = (Math.random() - 0.5) * 60;\r\n }\r\n if (p.pos.z < -60) p.vel.z *= -1;\r\n\r\n // Mouse Repulsion Interaction\r\n const dist = p.pos.distanceTo(mouse3D);\r\n if (dist < 4 && warpSpeedRef.current < 0.5) {\r\n pushDir.copy(p.pos).sub(mouse3D).normalize();\r\n p.pos.add(pushDir.multiplyScalar((4 - dist) * 0.08));\r\n }\r\n \r\n if (warpSpeedRef.current < 0.1) {\r\n const s = Math.sin(0.001);\r\n const c = Math.cos(0.001);\r\n const x = p.pos.x;\r\n const z = p.pos.z;\r\n p.pos.x = x * c + z * s;\r\n p.pos.z = z * c - x * s;\r\n }\r\n\r\n dummy.position.copy(p.pos);\r\n // Preserve uniform scaling (NOT stretched like logs)\r\n // Fade them out slightly by making them smaller if zooming past near camera bounds\r\n const visualScale = p.scale * (1.0 - (warpSpeedRef.current * 0.5));\r\n dummy.scale.setScalar(visualScale);\r\n dummy.rotation.set(p.rotation.x, p.rotation.y, p.rotation.z);\r\n dummy.updateMatrix();\r\n meshRef.current!.setMatrixAt(i, dummy.matrix);\r\n });\r\n meshRef.current!.instanceMatrix.needsUpdate = true;\r\n }\r\n\r\n // 2. Update Warp Lines (Lasers) -> Only visible when warpSpeed > 0\r\n if (linesRef.current) {\r\n warpLines.forEach((line, i) => {\r\n // Move incredibly fast during warp\r\n line.pos.z += (line.speed + (warpSpeedRef.current * 8.0));\r\n \r\n // Loop lines back\r\n if (line.pos.z > 15) {\r\n line.pos.z = -80;\r\n line.pos.x = (Math.random() - 0.5) * 50;\r\n line.pos.y = (Math.random() - 0.5) * 50;\r\n }\r\n\r\n dummy.position.copy(line.pos);\r\n // Orient cylinder along Z axis rigidly\r\n dummy.rotation.set(Math.PI / 2, 0, 0); \r\n // Stretch based on warp intensity\r\n const stretch = line.length + (warpSpeedRef.current * 15.0);\r\n const thinness = 1.0 - (warpSpeedRef.current * 0.8);\r\n dummy.scale.set(thinness, stretch, thinness);\r\n dummy.updateMatrix();\r\n linesRef.current!.setMatrixAt(i, dummy.matrix);\r\n });\r\n linesRef.current.instanceMatrix.needsUpdate = true;\r\n \r\n // Link opacity to warp intensity directly\r\n const mat = linesRef.current.material as THREE.Material;\r\n mat.opacity = warpSpeedRef.current * 0.6; // Soft laser glow\r\n }\r\n \r\n // Dynamic FOV for Tunnel effect\r\n if (state.camera instanceof THREE.PerspectiveCamera) {\r\n const targetFov = 45 + (warpSpeedRef.current * 30); \r\n state.camera.fov += (targetFov - state.camera.fov) * 0.05;\r\n state.camera.updateProjectionMatrix();\r\n }\r\n });\r\n\r\n return (\r\n <group>\r\n {/* The true asteroids (No stretching, just rocks) */}\r\n <instancedMesh ref={meshRef} args={[undefined, undefined, count]} key={shape}>\r\n {shape === \"dodecahedron\" && <dodecahedronGeometry args={[1, 0]} />}\r\n {shape === \"icosahedron\" && <icosahedronGeometry args={[1, 0]} />}\r\n {shape === \"box\" && <boxGeometry args={[1, 1, 1]} />}\r\n <meshStandardMaterial color={color} roughness={0.4} metalness={0.6} />\r\n </instancedMesh>\r\n \r\n {/* The sci-fi light speed trails */}\r\n <instancedMesh ref={linesRef} args={[undefined, undefined, warpLinesCount]}>\r\n <cylinderGeometry args={[0.08, 0.08, 1, 8]} />\r\n <meshBasicMaterial color=\"#ffffff\" transparent opacity={0} blending={THREE.AdditiveBlending} depthWrite={false} />\r\n </instancedMesh>\r\n </group>\r\n );\r\n}\r\n\r\n// Controls camera movement based on Scroll + Mouse Tracking\r\nfunction CameraController() {\r\n useFrame((state) => {\r\n // 1. SCROLL PARALLAX: moves camera down effectively floating through space as you scroll down\r\n const scrollY = window.scrollY;\r\n // Reduce Y target so the camera doesn't veer off too drastically\r\n const targetY = (-scrollY * 0.005) + (state.pointer.y * 1.5);\r\n \r\n // 2. MOUSE PARALLAX: entire universe tilts slightly opposite to your mouse\r\n const targetX = state.pointer.x * 2;\r\n \r\n // Smooth Lerp\r\n state.camera.position.x += (targetX - state.camera.position.x) * 0.05;\r\n state.camera.position.y += (targetY - state.camera.position.y) * 0.05;\r\n \r\n state.camera.lookAt(0, 0, 0);\r\n });\r\n return null;\r\n}\r\n\r\n// Background Nebula Clouds\r\nexport function NebulaClouds() {\r\n const particleTexture = useMemo(() => {\r\n // Generate a soft radial gradient for the \"cloud\" particle\r\n const canvas = document.createElement('canvas');\r\n canvas.width = 128;\r\n canvas.height = 128;\r\n const ctx = canvas.getContext('2d');\r\n if (ctx) {\r\n const gradient = ctx.createRadialGradient(64, 64, 0, 64, 64, 64);\r\n gradient.addColorStop(0, 'rgba(255,255,255,1)');\r\n gradient.addColorStop(0.3, 'rgba(255,255,255,0.4)');\r\n gradient.addColorStop(0.7, 'rgba(255,255,255,0.05)');\r\n gradient.addColorStop(1, 'rgba(0,0,0,0)');\r\n ctx.fillStyle = gradient;\r\n ctx.fillRect(0, 0, 128, 128);\r\n }\r\n return new THREE.CanvasTexture(canvas);\r\n }, []);\r\n\r\n const count = 400;\r\n \r\n // Use useMemo to generate organic nebula shapes (Perlin/Simplex noise-like clusters)\r\n const { positions1, colors1, positions2, colors2 } = useMemo(() => {\r\n const p1 = new Float32Array(count * 3);\r\n const c1 = new Float32Array(count * 3);\r\n const p2 = new Float32Array(count * 3);\r\n const c2 = new Float32Array(count * 3);\r\n\r\n const baseColor1 = new THREE.Color(\"#4c1d95\"); // Deep Purple\r\n const accentColor1 = new THREE.Color(\"#be185d\"); // Deep Pink\r\n \r\n const baseColor2 = new THREE.Color(\"#1e3a8a\"); // Deep Blue\r\n const accentColor2 = new THREE.Color(\"#0ea5e9\"); // Cyan\r\n\r\n for (let i = 0; i < count; i++) {\r\n // Nebula 1: Large sweeping galactic arm\r\n const angle = Math.random() * Math.PI * 2;\r\n const radius = 10 + Math.random() * 40;\r\n const spreadY = (Math.random() - 0.5) * 15;\r\n p1[i * 3] = Math.cos(angle) * radius + (Math.random()-0.5)*15;\r\n p1[i * 3 + 1] = spreadY + (Math.random()-0.5)*10;\r\n p1[i * 3 + 2] = Math.sin(angle) * radius - 20 + (Math.random()-0.5)*15;\r\n \r\n const mixColor1 = baseColor1.clone().lerp(accentColor1, Math.random());\r\n c1[i * 3] = mixColor1.r;\r\n c1[i * 3 + 1] = mixColor1.g;\r\n c1[i * 3 + 2] = mixColor1.b;\r\n\r\n // Nebula 2: Concentrated core / diffuse background\r\n const angle2 = Math.random() * Math.PI * 2;\r\n const radius2 = Math.random() * 35;\r\n p2[i * 3] = Math.cos(angle2) * radius2 * 1.5;\r\n p2[i * 3 + 1] = (Math.random() - 0.5) * 25;\r\n p2[i * 3 + 2] = Math.sin(angle2) * radius2 - 30;\r\n\r\n const mixColor2 = baseColor2.clone().lerp(accentColor2, Math.random());\r\n c2[i * 3] = mixColor2.r;\r\n c2[i * 3 + 1] = mixColor2.g;\r\n c2[i * 3 + 2] = mixColor2.b;\r\n }\r\n return { positions1: p1, colors1: c1, positions2: p2, colors2: c2 };\r\n }, [count]);\r\n\r\n const groupRef = useRef<THREE.Group>(null);\r\n\r\n useFrame((_, delta) => {\r\n if (groupRef.current) {\r\n // Extremely slow drift of the entire nebula to make it feel alive\r\n groupRef.current.rotation.y += delta * 0.01;\r\n groupRef.current.rotation.z += delta * 0.002;\r\n }\r\n });\r\n\r\n return (\r\n <group ref={groupRef} position={[0, 0, -10]}>\r\n <points>\r\n <bufferGeometry>\r\n <bufferAttribute attach=\"attributes-position\" count={count} args={[positions1, 3]} />\r\n <bufferAttribute attach=\"attributes-color\" count={count} args={[colors1, 3]} />\r\n </bufferGeometry>\r\n <pointsMaterial \r\n size={35} \r\n map={particleTexture} \r\n vertexColors \r\n transparent \r\n opacity={0.08} \r\n depthWrite={false}\r\n depthTest={false} \r\n blending={THREE.AdditiveBlending} \r\n sizeAttenuation={true}\r\n />\r\n </points>\r\n <points rotation={[0.2, 0.5, -0.1]}>\r\n <bufferGeometry>\r\n <bufferAttribute attach=\"attributes-position\" count={count} args={[positions2, 3]} />\r\n <bufferAttribute attach=\"attributes-color\" count={count} args={[colors2, 3]} />\r\n </bufferGeometry>\r\n <pointsMaterial \r\n size={45} \r\n map={particleTexture} \r\n vertexColors \r\n transparent \r\n opacity={0.06} \r\n depthWrite={false}\r\n depthTest={false} \r\n blending={THREE.AdditiveBlending} \r\n sizeAttenuation={true}\r\n />\r\n </points>\r\n </group>\r\n );\r\n}\r\n\r\nexport default function Scene({ \r\n coreColor = \"#312e81\", \r\n particleColor = \"#6366f1\", \r\n particleCount = 150, \r\n particleShape = \"dodecahedron\",\r\n children\r\n}: { \r\n coreColor?: string, \r\n particleColor?: string, \r\n particleCount?: number, \r\n particleShape?: \"dodecahedron\" | \"icosahedron\" | \"box\",\r\n children?: React.ReactNode\r\n}) {\r\n return (\r\n <div className=\"absolute inset-0 w-full h-full z-0 pointer-events-auto bg-[#020205]\">\r\n <Canvas camera={{ position: [0, 0, 12], fov: 45 }} gl={{ alpha: true }}>\r\n <color attach=\"background\" args={['#020205']} />\r\n <React.Suspense fallback={null}>\r\n <ambientLight intensity={0.5} />\r\n <directionalLight position={[10, 10, 5]} intensity={3} color=\"#818cf8\" />\r\n <directionalLight position={[-10, -10, -5]} intensity={2} color=\"#c084fc\" />\r\n \r\n <CameraController />\r\n <BlackHoleCore color={coreColor} />\r\n <AsteroidField count={particleCount} color={particleColor} shape={particleShape} />\r\n <NebulaClouds />\r\n\r\n {/* Render User's Custom 3D/4D Models Here */}\r\n {children}\r\n \r\n {/* Dense Universe Stars & Sparkles */}\r\n <Stars radius={150} depth={100} count={8000} factor={6} saturation={1} fade speed={2} />\r\n <Sparkles count={300} scale={25} size={3} speed={0.2} opacity={0.4} color=\"#818cf8\" />\r\n <Sparkles count={200} scale={20} size={1} speed={0.4} opacity={0.6} color=\"#c084fc\" />\r\n <Sparkles count={100} scale={30} size={6} speed={0.1} opacity={0.2} color=\"#2dd4bf\" />\r\n \r\n <Environment preset=\"city\" />\r\n </React.Suspense>\r\n </Canvas>\r\n </div>\r\n );\r\n}\r\n","\"use client\";\n\nimport React, { useState, useRef, useEffect } from 'react';\n\nexport const Button = ({ \n children, \n variant = 'primary', \n className = '', \n customColor,\n customBg,\n customBorder,\n customRadius,\n customSize,\n style,\n ...props \n}: any) => {\n const base = \"font-medium transition-all duration-300 relative overflow-hidden group active:scale-95 flex items-center justify-center\";\n const sizeClass = customSize === 'sm' ? 'px-4 py-2 text-sm' : customSize === 'lg' ? 'px-8 py-4 text-lg' : 'px-6 py-3';\n \n const customStyles = {\n ...(customColor && { color: customColor }),\n ...(customBg && { backgroundColor: customBg }),\n ...(customBorder && { border: customBorder }),\n ...(customRadius && { borderRadius: customRadius }),\n ...style\n };\n\n if (variant === 'mecha') {\n return (\n <button \n className={`${sizeClass} font-mono font-bold tracking-[0.2em] uppercase text-xs transition-all relative overflow-hidden group active:scale-95 flex items-center justify-center bg-zinc-900 border-l-4 border-l-yellow-500 border-y border-y-zinc-800 border-r border-r-zinc-800 text-zinc-300 hover:text-white hover:bg-zinc-800 hover:border-l-yellow-400 ${className}`}\n style={{ clipPath: \"polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px)\", ...customStyles }}\n {...props}\n >\n <div className=\"absolute inset-0 bg-[repeating-linear-gradient(45deg,transparent,transparent_2px,rgba(255,255,255,0.02)_2px,rgba(255,255,255,0.02)_4px)] pointer-events-none\" />\n <span className=\"relative z-10 flex items-center gap-2\">\n {children}\n </span>\n <div className=\"absolute right-2 bottom-2 w-1.5 h-1.5 bg-yellow-500/50 group-hover:bg-yellow-400\" />\n </button>\n );\n }\n\n const variants = {\n primary: \"bg-white text-black hover:bg-zinc-200 active:bg-zinc-300 hover:shadow-lg rounded-lg\",\n glow: \"bg-indigo-500/20 text-indigo-300 border border-indigo-500/50 hover:bg-indigo-500/40 hover:shadow-[0_0_20px_rgba(99,102,241,0.4)] active:bg-indigo-500/50 rounded-lg\",\n ghost: \"bg-transparent text-zinc-300 hover:bg-white/10 active:bg-white/20 rounded-lg\",\n outline: \"bg-transparent border border-white/20 text-white hover:border-white/60 hover:bg-white/5 active:bg-white/10 rounded-lg\",\n danger: \"bg-rose-500/10 border border-rose-500/50 text-rose-400 hover:bg-rose-500/20 hover:shadow-[0_0_20px_rgba(244,63,94,0.4)] active:bg-rose-500/30 rounded-lg\"\n };\n \n return (\n <button \n className={`${base} ${sizeClass} ${(variants as any)[variant] || variants.primary} ${className}`} \n style={customStyles}\n {...props}\n >\n <span className=\"relative z-10\">{children}</span>\n </button>\n );\n};\n\nexport const TextBox = ({ \n variant = 'default', \n className = '', \n customColor,\n customBg,\n customBorder,\n customRadius,\n style,\n ...props \n}: any) => {\n const base = \"w-full focus:outline-none transition-all\";\n \n const customStyles = {\n ...(customColor && { color: customColor }),\n ...(customBg && { backgroundColor: customBg }),\n ...(customBorder && { border: customBorder }),\n ...(customRadius && { borderRadius: customRadius }),\n ...style\n };\n\n const variants = {\n default: \"bg-[#0a0a0f] border border-white/10 rounded-xl px-4 py-3 text-white placeholder:text-zinc-600 focus:border-indigo-500 focus:ring-1 focus:ring-indigo-500\",\n underline: \"bg-transparent border-b-2 border-white/10 px-0 py-3 text-white placeholder:text-zinc-600 focus:border-indigo-500 rounded-none\",\n glow: \"bg-indigo-500/5 border border-indigo-500/30 rounded-xl px-4 py-3 text-indigo-100 placeholder:text-indigo-500/50 focus:border-indigo-400 focus:shadow-[0_0_20px_rgba(99,102,241,0.2)]\",\n mecha: \"bg-black border border-zinc-800 focus:border-yellow-500 text-yellow-50 font-mono text-sm px-4 py-3 rounded-none placeholder:text-zinc-700 relative z-10 w-full\"\n };\n\n if (variant === 'mecha') {\n return (\n <div className={`relative ${className}`} style={{ ...(customRadius && { borderRadius: customRadius }) }}>\n <div className=\"absolute top-0 left-0 w-2 h-2 border-t-2 border-l-2 border-yellow-500/50 pointer-events-none\" style={{ borderColor: customBorder ? customBorder.split(' ')[2] || customBorder : undefined }} />\n <div className=\"absolute bottom-0 right-0 w-2 h-2 border-b-2 border-r-2 border-yellow-500/50 pointer-events-none\" style={{ borderColor: customBorder ? customBorder.split(' ')[2] || customBorder : undefined }} />\n <input \n className={variants.mecha}\n style={customStyles}\n {...props}\n />\n <div className=\"absolute right-3 top-1/2 -translate-y-1/2 text-[9px] font-mono text-yellow-500/30 pointer-events-none\">[INPUT]</div>\n </div>\n );\n }\n\n return (\n <input \n className={`${base} ${(variants as any)[variant] || variants.default} ${className}`}\n style={customStyles}\n {...props}\n />\n );\n};\n\nexport const Dropdown = ({ options = [], variant = 'default', placeholder = \"Select...\", className = '' }: any) => {\n const [isOpen, setIsOpen] = useState(false);\n const [selected, setSelected] = useState('');\n const dropdownRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const handleClickOutside = (event: MouseEvent) => {\n if (dropdownRef.current && !dropdownRef.current.contains(event.target as Node)) {\n setIsOpen(false);\n }\n };\n document.addEventListener('mousedown', handleClickOutside);\n return () => document.removeEventListener('mousedown', handleClickOutside);\n }, []);\n\n const base = \"w-full transition-all cursor-pointer flex justify-between items-center\";\n const variants = {\n default: \"bg-[#0a0a0f] border border-white/10 rounded-xl px-4 py-3 text-white focus:outline-none focus:border-indigo-500\",\n ghost: \"bg-white/5 border border-transparent rounded-xl px-4 py-3 text-zinc-300 hover:bg-white/10 focus:bg-[#0a0a0f] focus:border-indigo-500\",\n mecha: \"bg-black border border-zinc-800 rounded-none px-4 py-3 text-yellow-50 font-mono text-sm hover:border-yellow-500/50 focus:border-yellow-500 relative\"\n };\n\n return (\n <div className={`relative ${className}`} ref={dropdownRef}>\n {variant === 'mecha' && (\n <>\n <div className=\"absolute top-0 left-0 w-2 h-2 border-t-2 border-l-2 border-yellow-500/50 z-10 pointer-events-none\" />\n <div className=\"absolute bottom-0 right-0 w-2 h-2 border-b-2 border-r-2 border-yellow-500/50 z-10 pointer-events-none\" />\n </>\n )}\n <div \n className={`${base} ${(variants as any)[variant] || variants.default}`}\n onClick={() => setIsOpen(!isOpen)}\n >\n <span className={selected ? 'text-white' : 'text-zinc-500'}>\n {selected || placeholder}\n </span>\n <svg className={`w-4 h-4 text-zinc-500 transition-transform duration-200 ${isOpen ? 'rotate-180' : ''}`} fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M19 9l-7 7-7-7\" />\n </svg>\n </div>\n\n {isOpen && (\n <div className={`absolute z-50 w-full mt-2 overflow-hidden animate-in fade-in slide-in-from-top-2 duration-200 ${variant === 'mecha' ? 'bg-black border border-yellow-500/50 rounded-none shadow-[0_0_20px_rgba(234,179,8,0.1)]' : 'bg-[#0a0a0f] border border-white/10 rounded-xl shadow-[0_10px_40px_-10px_rgba(0,0,0,0.5)]'}`}>\n <div className=\"max-h-60 overflow-y-auto custom-scrollbar\">\n {options.map((opt: string, i: number) => (\n <div \n key={i} \n className={variant === 'mecha' \n ? `px-4 py-3 text-sm cursor-pointer transition-colors font-mono ${selected === opt ? 'bg-yellow-500/20 text-yellow-300 border-l-2 border-yellow-500' : 'text-zinc-400 hover:bg-zinc-900 border-l-2 border-transparent hover:text-white'}`\n : `px-4 py-3 text-sm cursor-pointer transition-colors ${selected === opt ? 'bg-indigo-500/20 text-indigo-300' : 'text-zinc-300 hover:bg-white/10 hover:text-white'}`\n }\n onClick={() => {\n setSelected(opt);\n setIsOpen(false);\n }}\n >\n {opt}\n </div>\n ))}\n </div>\n </div>\n )}\n </div>\n );\n};\n\nexport const Card = ({ \n children, \n variant = 'default', \n className = '', \n customColor,\n customBg,\n customBorder,\n customRadius,\n style,\n ...props \n}: any) => {\n const base = \"transition-all duration-300 relative overflow-hidden\";\n \n const customStyles = {\n ...(customColor && { color: customColor }),\n ...(customBg && { backgroundColor: customBg }),\n ...(customBorder && { border: customBorder }),\n ...(customRadius && { borderRadius: customRadius }),\n ...style\n };\n\n const variants = {\n default: \"p-6 rounded-2xl bg-[#050508] border border-white/10\",\n glow: \"p-6 rounded-2xl bg-indigo-900/10 border border-indigo-500/30 shadow-[0_0_30px_rgba(99,102,241,0.15)]\",\n glass: \"p-6 rounded-2xl bg-white/[0.08] backdrop-blur-xl border border-white/20 shadow-[0_8px_32px_0_rgba(255,255,255,0.05)]\",\n mecha: \"p-8 rounded-none bg-zinc-900/80 border border-zinc-800 backdrop-blur-sm\"\n };\n\n if (variant === 'mecha') {\n return (\n <div className={`${base} ${variants.mecha} ${className}`} style={customStyles} {...props}>\n {/* Mecha Card Accents */}\n <div className=\"absolute top-0 left-0 w-8 h-8 border-t-2 border-l-2 border-yellow-500/50 pointer-events-none\" style={{ borderColor: customBorder ? customBorder.split(' ')[2] || customBorder : undefined }} />\n <div className=\"absolute top-0 right-0 w-8 h-8 border-t-2 border-r-2 border-yellow-500/50 pointer-events-none\" style={{ borderColor: customBorder ? customBorder.split(' ')[2] || customBorder : undefined }} />\n <div className=\"absolute bottom-0 left-0 w-8 h-8 border-b-2 border-l-2 border-yellow-500/50 pointer-events-none\" style={{ borderColor: customBorder ? customBorder.split(' ')[2] || customBorder : undefined }} />\n <div className=\"absolute bottom-0 right-0 w-8 h-8 border-b-2 border-r-2 border-yellow-500/50 pointer-events-none\" style={{ borderColor: customBorder ? customBorder.split(' ')[2] || customBorder : undefined }} />\n \n {/* Warning track background */}\n <div className=\"absolute bottom-0 left-10 right-10 h-[2px] bg-[repeating-linear-gradient(45deg,transparent,transparent_4px,rgba(234,179,8,0.5)_4px,rgba(234,179,8,0.5)_8px)] pointer-events-none\" />\n \n {children}\n </div>\n );\n }\n\n return (\n <div className={`${base} ${(variants as any)[variant] || variants.default} ${className}`} style={customStyles} {...props}>\n {children}\n </div>\n );\n};\n\nexport const Badge = ({ \n children, \n variant = 'primary', \n className = '', \n customColor,\n customBg,\n customBorder,\n customRadius,\n style,\n ...props \n}: any) => {\n const base = \"px-2.5 py-0.5 rounded-full text-xs font-semibold tracking-wider uppercase transition-all\";\n \n const customStyles = {\n ...(customColor && { color: customColor }),\n ...(customBg && { backgroundColor: customBg }),\n ...(customBorder && { border: customBorder }),\n ...(customRadius && { borderRadius: customRadius }),\n ...style\n };\n\n if (variant === 'mecha') {\n return (\n <span className={`px-2 py-1 bg-yellow-500/10 border border-yellow-500/50 text-[#eab308] text-[9px] font-mono font-bold tracking-[0.2em] relative uppercase ${className}`} style={customStyles} {...props}>\n <span className=\"absolute -left-1 flex items-center justify-center top-1/2 -translate-y-1/2 h-full gap-[1px] bg-[#020205] px-[2px]\">\n <span className=\"w-[1px] h-2 bg-yellow-500\" style={{ backgroundColor: customColor || undefined }} />\n <span className=\"w-[1px] h-2 bg-yellow-500\" style={{ backgroundColor: customColor || undefined }} />\n </span>\n <span className=\"pl-1\">{children}</span>\n </span>\n );\n }\n\n const variants = {\n primary: \"bg-indigo-500/20 text-indigo-300 border border-indigo-500/50\",\n success: \"bg-emerald-500/20 text-emerald-300 border border-emerald-500/50\",\n danger: \"bg-rose-500/20 text-rose-300 border border-rose-500/50\",\n outline: \"bg-transparent text-zinc-400 border border-zinc-700\"\n };\n\n return (\n <span className={`${base} ${(variants as any)[variant] || variants.primary} ${className}`} style={customStyles} {...props}>\n {children}\n </span>\n );\n};\n\nexport const Switch = ({ \n checked, \n onChange, \n variant = 'default', \n className = '',\n customColor,\n customBg,\n customBorder,\n customRadius,\n style,\n ...props \n}: any) => {\n const customStyles = {\n ...(customBg && { backgroundColor: customBg }),\n ...(customBorder && { border: customBorder }),\n ...(customRadius && { borderRadius: customRadius }),\n ...style\n };\n\n if (variant === 'mecha') {\n return (\n <div \n className={`w-14 h-6 border-2 border-zinc-700 bg-zinc-900 relative cursor-pointer flex items-center p-0.5 transition-colors ${checked ? 'border-yellow-500/50' : ''} ${className}`} \n onClick={onChange}\n style={customStyles}\n {...props}\n >\n {/* Warning track background */}\n <div className=\"absolute inset-0 bg-[repeating-linear-gradient(45deg,transparent,transparent_4px,rgba(255,255,255,0.02)_4px,rgba(255,255,255,0.02)_8px)] pointer-events-none\" />\n <div \n className={`w-5 h-4 bg-zinc-400 absolute transition-all duration-300 ease-out flex items-center justify-center ${checked ? 'left-[30px] bg-yellow-500 shadow-[0_0_10px_rgba(234,179,8,0.5)]' : 'left-0.5'}`} \n style={{ backgroundColor: checked && customColor ? customColor : undefined, boxShadow: checked && customColor ? `0 0 10px ${customColor}` : undefined }}\n >\n <div className={`w-[2px] h-2 ${checked ? 'bg-black/50' : 'bg-black/20'}`} />\n </div>\n </div>\n );\n }\n\n const base = \"w-11 h-6 rounded-full relative cursor-pointer transition-colors duration-300\";\n const variants = {\n default: checked ? \"bg-white\" : \"bg-zinc-800\",\n glow: checked ? \"bg-indigo-500 shadow-[0_0_15px_rgba(99,102,241,0.5)]\" : \"bg-zinc-800\"\n };\n const thumbBase = \"w-4 h-4 rounded-full absolute top-1 transition-all duration-300\";\n const thumbVariants = {\n default: checked ? \"left-6 bg-black\" : \"left-1 bg-zinc-400\",\n glow: checked ? \"left-6 bg-white\" : \"left-1 bg-zinc-500\"\n };\n\n return (\n <div className={`${base} ${(variants as any)[variant] || variants.default} ${className}`} style={customStyles} onClick={onChange} {...props}>\n <div className={`${thumbBase} ${(thumbVariants as any)[variant] || thumbVariants.default}`} style={{ backgroundColor: checked && customColor ? customColor : undefined }} />\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACEA,mBAA4D;AAC5D,mBAAiC;AACjC,kBAAyF;AACzF,YAAuB;AA8IjB;AA3IN,SAAS,mBAAmB,EAAE,QAAQ,OAAO,WAAW,GAA+D;AACrH,QAAM,QAAQ;AACd,QAAM,cAAU,qBAA4B,IAAI;AAEhD,QAAM,YAAQ,sBAAQ,MAAM,IAAU,eAAS,GAAG,CAAC,CAAC;AAGpD,QAAM,uBAAmB,sBAAQ,MAAM;AACrC,UAAM,MAAM,CAAC;AACb,aAAQ,IAAE,GAAG,IAAE,OAAO,KAAK;AACvB,YAAM,IAAI,IAAU;AAAA,SACf,KAAK,OAAO,IAAI,OAAO;AAAA,SACvB,KAAK,OAAO,IAAI,OAAO;AAAA,SACvB,KAAK,OAAO,IAAI,OAAO;AAAA,MAC5B,EAAE,UAAU,EAAE,eAAe,GAAG;AAChC,UAAI,KAAK,CAAC;AAAA,IACd;AACA,WAAO;AAAA,EACT,GAAG,CAAC,CAAC;AAEL,QAAM,iBAAa,sBAAQ,MAAM,iBAAiB,IAAI,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AAAA;AAGA,QAAM,eAAe,gEACf,YAAY,EAAE,iBAAiB,SAAS,IACxC,gBAAgB,EAAE,QAAQ,aAAa,IACvC,gBAAgB,EAAE,cAAc,aAAa,IAC9C;AAGL,MAAI,YAAY,SAAS;AACvB,WACE;AAAA,MAAC;AAAA;AAAA,QACC,WAAW,mHAAmH,UAAU,yBAAyB,EAAE,IAAI,SAAS;AAAA,QAChL,SAAS;AAAA,QACT,OAAO;AAAA,SACH,QAJL;AAAA,QAOC;AAAA,uDAAC,SAAI,WAAU,gKAA+J;AAAA,UAC9K;AAAA,YAAC;AAAA;AAAA,cACC,WAAW,sGAAsG,UAAU,oEAAoE,UAAU;AAAA,cACzM,OAAO,EAAE,iBAAiB,WAAW,cAAc,cAAc,QAAW,WAAW,WAAW,cAAc,YAAY,WAAW,KAAK,OAAU;AAAA,cAErJ,uDAAC,SAAI,WAAW,eAAe,UAAU,gBAAgB,aAAa,IAAI;AAAA;AAAA,UAC7E;AAAA;AAAA;AAAA,IACF;AAAA,EAEJ;AAEA,QAAM,OAAO;AACb,QAAM,WAAW;AAAA,IACf,SAAS,UAAU,aAAa;AAAA,IAChC,MAAM,UAAU,yDAAyD;AAAA,EAC3E;AACA,QAAM,YAAY;AAClB,QAAM,gBAAgB;AAAA,IACpB,SAAS,UAAU,oBAAoB;AAAA,IACvC,MAAM,UAAU,oBAAoB;AAAA,EACtC;AAEA,SACE,6CAAC,sCAAI,WAAW,GAAG,IAAI,IAAK,SAAiB,OAAO,KAAK,SAAS,OAAO,IAAI,SAAS,IAAI,OAAO,cAAc,SAAS,YAAc,QAArI,EACC,uDAAC,SAAI,WAAW,GAAG,SAAS,IAAK,cAAsB,OAAO,KAAK,cAAc,OAAO,IAAI,OAAO,EAAE,iBAAiB,WAAW,cAAc,cAAc,OAAU,GAAG,IAC5K;AAEJ;","names":["React","import_react","import_jsx_runtime"]}
package/dist/index.mjs CHANGED
@@ -57,13 +57,9 @@ function SupernovaEasterEgg({ active, color, onComplete }) {
57
57
  const time = useRef(0);
58
58
  const Y_AXIS = useMemo(() => new THREE.Vector3(0, 1, 0), []);
59
59
  const tempVel = useMemo(() => new THREE.Vector3(), []);
60
- const linesGeom = useMemo(() => {
61
- const geom = new THREE.BufferGeometry();
62
- const maxLines = count * count;
63
- const pos = new Float32Array(maxLines * 6);
64
- geom.setAttribute("position", new THREE.BufferAttribute(pos, 3));
65
- return geom;
66
- }, [count]);
60
+ const maxBonds = 2500;
61
+ const bondsMeshRef = useRef(null);
62
+ const dummyBond = useMemo(() => new THREE.Object3D(), []);
67
63
  useFrame((_, delta) => {
68
64
  if (!active) return;
69
65
  time.current += delta;
@@ -80,11 +76,10 @@ function SupernovaEasterEgg({ active, color, onComplete }) {
80
76
  for (let i = 0; i < count; i++) {
81
77
  velocities[i] = initialPositions[i].clone().normalize().multiplyScalar(Math.random() * 20 + 20);
82
78
  }
83
- if (linesGeom.attributes.position) linesGeom.setDrawRange(0, 0);
79
+ if (bondsMeshRef.current) bondsMeshRef.current.count = 0;
84
80
  return;
85
81
  }
86
- let lineCount = 0;
87
- const positionsAttr = linesGeom.attributes.position.array;
82
+ let bondCount = 0;
88
83
  let bondThreshold = 0;
89
84
  if (phase === 2) {
90
85
  bondThreshold = (t - 2) / 2 * 8;
@@ -114,14 +109,15 @@ function SupernovaEasterEgg({ active, color, onComplete }) {
114
109
  const p2 = currentPositions.current[j];
115
110
  const distSq = p.distanceToSquared(p2);
116
111
  if (distSq < thresholdSq && distSq < 16) {
117
- if (lineCount * 6 < positionsAttr.length - 6) {
118
- positionsAttr[lineCount * 6] = p.x;
119
- positionsAttr[lineCount * 6 + 1] = p.y;
120
- positionsAttr[lineCount * 6 + 2] = p.z;
121
- positionsAttr[lineCount * 6 + 3] = p2.x;
122
- positionsAttr[lineCount * 6 + 4] = p2.y;
123
- positionsAttr[lineCount * 6 + 5] = p2.z;
124
- lineCount++;
112
+ if (bondCount < maxBonds) {
113
+ const dist = Math.sqrt(distSq);
114
+ const thickness = Math.max(0.015, 0.15 - dist * 0.035) * (bondThreshold / 8);
115
+ dummyBond.position.copy(p).lerp(p2, 0.5);
116
+ dummyBond.lookAt(p2);
117
+ dummyBond.scale.set(thickness, thickness, dist * 0.5);
118
+ dummyBond.updateMatrix();
119
+ if (bondsMeshRef.current) bondsMeshRef.current.setMatrixAt(bondCount, dummyBond.matrix);
120
+ bondCount++;
125
121
  }
126
122
  }
127
123
  }
@@ -141,8 +137,10 @@ function SupernovaEasterEgg({ active, color, onComplete }) {
141
137
  if (meshRef.current) meshRef.current.setMatrixAt(i, dummy.matrix);
142
138
  }
143
139
  if (meshRef.current) meshRef.current.instanceMatrix.needsUpdate = true;
144
- linesGeom.attributes.position.needsUpdate = true;
145
- linesGeom.setDrawRange(0, lineCount * 2);
140
+ if (bondsMeshRef.current) {
141
+ bondsMeshRef.current.count = bondCount;
142
+ bondsMeshRef.current.instanceMatrix.needsUpdate = true;
143
+ }
146
144
  });
147
145
  if (!active) return null;
148
146
  const lineOpacity = time.current > 6.5 ? Math.max(0, 0.4 - (time.current - 6.5) / 1.5 * 0.4) : 0.4;
@@ -152,9 +150,21 @@ function SupernovaEasterEgg({ active, color, onComplete }) {
152
150
  /* @__PURE__ */ jsx("sphereGeometry", { args: [0.3, 16, 16] }),
153
151
  /* @__PURE__ */ jsx("meshStandardMaterial", { color, emissive: color, emissiveIntensity: 4, transparent: true, opacity: pointOpacity, roughness: 0, metalness: 1 })
154
152
  ] }),
155
- /* @__PURE__ */ jsxs("lineSegments", { frustumCulled: false, children: [
156
- /* @__PURE__ */ jsx("primitive", { object: linesGeom, attach: "geometry" }),
157
- /* @__PURE__ */ jsx("lineBasicMaterial", { color: "#ffffff", transparent: true, opacity: lineOpacity, blending: THREE.AdditiveBlending })
153
+ /* @__PURE__ */ jsxs("instancedMesh", { ref: bondsMeshRef, args: [void 0, void 0, maxBonds], frustumCulled: false, children: [
154
+ /* @__PURE__ */ jsx("sphereGeometry", { args: [1, 16, 16] }),
155
+ /* @__PURE__ */ jsx(
156
+ "meshStandardMaterial",
157
+ {
158
+ color: "#38bdf8",
159
+ transparent: true,
160
+ opacity: lineOpacity * 1.5,
161
+ roughness: 0,
162
+ metalness: 0.8,
163
+ envMapIntensity: 2,
164
+ blending: THREE.AdditiveBlending,
165
+ depthWrite: false
166
+ }
167
+ )
158
168
  ] })
159
169
  ] });
160
170
  }
@@ -475,7 +485,8 @@ function Scene({
475
485
  coreColor = "#312e81",
476
486
  particleColor = "#6366f1",
477
487
  particleCount = 150,
478
- particleShape = "dodecahedron"
488
+ particleShape = "dodecahedron",
489
+ children
479
490
  }) {
480
491
  return /* @__PURE__ */ jsx("div", { className: "absolute inset-0 w-full h-full z-0 pointer-events-auto bg-[#020205]", children: /* @__PURE__ */ jsxs(Canvas, { camera: { position: [0, 0, 12], fov: 45 }, gl: { alpha: true }, children: [
481
492
  /* @__PURE__ */ jsx("color", { attach: "background", args: ["#020205"] }),
@@ -487,6 +498,7 @@ function Scene({
487
498
  /* @__PURE__ */ jsx(BlackHoleCore, { color: coreColor }),
488
499
  /* @__PURE__ */ jsx(AsteroidField, { count: particleCount, color: particleColor, shape: particleShape }),
489
500
  /* @__PURE__ */ jsx(NebulaClouds, {}),
501
+ children,
490
502
  /* @__PURE__ */ jsx(Stars, { radius: 150, depth: 100, count: 8e3, factor: 6, saturation: 1, fade: true, speed: 2 }),
491
503
  /* @__PURE__ */ jsx(Sparkles, { count: 300, scale: 25, size: 3, speed: 0.2, opacity: 0.4, color: "#818cf8" }),
492
504
  /* @__PURE__ */ jsx(Sparkles, { count: 200, scale: 20, size: 1, speed: 0.4, opacity: 0.6, color: "#c084fc" }),
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Scene.tsx","../src/components/UI.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport React, { useRef, useState, useMemo, useEffect } from \"react\";\r\nimport { Canvas, useFrame } from \"@react-three/fiber\";\r\nimport { Environment, Sparkles, Stars, Sphere, MeshDistortMaterial, Clouds, Cloud } from \"@react-three/drei\";\r\nimport * as THREE from \"three\";\r\n\r\n// Supernova Easter Egg Component\r\nfunction SupernovaEasterEgg({ active, color, onComplete }: { active: boolean, color: string, onComplete: () => void }) {\r\n const count = 150;\r\n const meshRef = useRef<THREE.InstancedMesh>(null);\r\n \r\n const dummy = useMemo(() => new THREE.Object3D(), []);\r\n \r\n // Distribute particles perfectly on the sphere shell initially\r\n const initialPositions = useMemo(() => {\r\n const pts = [];\r\n for(let i=0; i<count; i++) {\r\n const p = new THREE.Vector3(\r\n (Math.random() - 0.5) * 2,\r\n (Math.random() - 0.5) * 2,\r\n (Math.random() - 0.5) * 2\r\n ).normalize().multiplyScalar(1.5); // Start exactly on the Coreradius\r\n pts.push(p);\r\n }\r\n return pts;\r\n }, []);\r\n \r\n const velocities = useMemo(() => initialPositions.map(p => p.clone().normalize().multiplyScalar(Math.random() * 20 + 20)), [initialPositions]);\r\n \r\n const currentPositions = useRef(initialPositions.map(p => p.clone()));\r\n const time = useRef(0);\r\n const Y_AXIS = useMemo(() => new THREE.Vector3(0,1,0), []);\r\n const tempVel = useMemo(() => new THREE.Vector3(), []);\r\n\r\n const linesGeom = useMemo(() => {\r\n const geom = new THREE.BufferGeometry();\r\n const maxLines = count * count; \r\n const pos = new Float32Array(maxLines * 6);\r\n geom.setAttribute('position', new THREE.BufferAttribute(pos, 3));\r\n return geom;\r\n }, [count]);\r\n\r\n useFrame((_, delta) => {\r\n if (!active) return;\r\n time.current += delta;\r\n const t = time.current;\r\n\r\n let phase = 0; \r\n if (t < 2.0) phase = 1; // Violent Explosion\r\n else if (t < 4.0) phase = 2; // Drift and expand lines\r\n else if (t < 6.5) phase = 3; // Contract back to dense cage\r\n else if (t < 8.0) phase = 4; // Fade dots out, let core emerge\r\n else {\r\n onComplete();\r\n time.current = 0;\r\n currentPositions.current = initialPositions.map(p => p.clone());\r\n for(let i=0; i<count;i++) {\r\n velocities[i] = initialPositions[i].clone().normalize().multiplyScalar(Math.random() * 20 + 20);\r\n }\r\n if (linesGeom.attributes.position) linesGeom.setDrawRange(0, 0);\r\n return;\r\n }\r\n\r\n let lineCount = 0;\r\n const positionsAttr = linesGeom.attributes.position.array as Float32Array;\r\n\r\n let bondThreshold = 0;\r\n if (phase === 2) {\r\n bondThreshold = ((t - 2.0) / 2.0) * 8.0; // Lines grow from 0 to 8 radius seamlessly\r\n } else if (phase >= 3) {\r\n bondThreshold = 8.0; // Everything is connected\r\n }\r\n\r\n for (let i = 0; i < count; i++) {\r\n let p = currentPositions.current[i];\r\n \r\n if (phase === 1) {\r\n tempVel.copy(velocities[i]).multiplyScalar(delta);\r\n p.add(tempVel);\r\n velocities[i].multiplyScalar(0.92); // Viscous fluid drag\r\n p.applyAxisAngle(Y_AXIS, delta * 2.0); // Orbital swirl\r\n } else if (phase === 2) {\r\n tempVel.copy(velocities[i]).multiplyScalar(delta);\r\n p.add(tempVel);\r\n velocities[i].multiplyScalar(0.95); // Float freely\r\n p.applyAxisAngle(Y_AXIS, delta * 0.5); // Slow drift\r\n } else {\r\n // Smoothly ease back right onto the original shell\r\n const target = initialPositions[i];\r\n p.lerp(target, 1.0 - Math.pow(0.001, delta)); // Highly sticky easing\r\n p.applyAxisAngle(Y_AXIS, delta * 0.5);\r\n }\r\n \r\n // Connect points into a mesh\r\n if (bondThreshold > 0 && phase <= 4) {\r\n const thresholdSq = bondThreshold * bondThreshold;\r\n for (let j = i + 1; j < count; j++) {\r\n const p2 = currentPositions.current[j];\r\n const distSq = p.distanceToSquared(p2);\r\n if (distSq < thresholdSq && distSq < 16.0) { // Keep reasonable draw limits (4.0^2)\r\n if (lineCount * 6 < positionsAttr.length - 6) {\r\n positionsAttr[lineCount * 6] = p.x;\r\n positionsAttr[lineCount * 6 + 1] = p.y;\r\n positionsAttr[lineCount * 6 + 2] = p.z;\r\n positionsAttr[lineCount * 6 + 3] = p2.x;\r\n positionsAttr[lineCount * 6 + 4] = p2.y;\r\n positionsAttr[lineCount * 6 + 5] = p2.z;\r\n lineCount++;\r\n }\r\n }\r\n }\r\n }\r\n \r\n // Scale handles visual pop nicely\r\n let scale = 0.2;\r\n if (phase === 1) {\r\n scale = Math.max(0.1, 0.4 - p.length()*0.015);\r\n } else if (phase === 2 || phase === 3) {\r\n scale = 0.15;\r\n } else if (phase === 4) {\r\n // Fade out the physical dots smoothly as the core takes over\r\n const progress = (t - 6.5) / 1.5;\r\n scale = THREE.MathUtils.lerp(0.15, 0, progress);\r\n }\r\n \r\n dummy.position.copy(p);\r\n dummy.scale.set(scale, scale, scale);\r\n dummy.updateMatrix();\r\n if (meshRef.current) meshRef.current.setMatrixAt(i, dummy.matrix);\r\n }\r\n \r\n if (meshRef.current) meshRef.current.instanceMatrix.needsUpdate = true;\r\n \r\n linesGeom.attributes.position.needsUpdate = true;\r\n linesGeom.setDrawRange(0, lineCount * 2);\r\n });\r\n\r\n if (!active) return null;\r\n\r\n // Let bond lines fade during phase 4 smoothly\r\n const lineOpacity = time.current > 6.5 ? Math.max(0, 0.4 - ((time.current - 6.5)/1.5)*0.4) : 0.4;\r\n const pointOpacity = time.current > 6.5 ? Math.max(0, 0.9 - ((time.current - 6.5)/1.5)*0.9) : 0.9;\r\n\r\n return (\r\n <group>\r\n <instancedMesh ref={meshRef} args={[undefined, undefined, count]}>\r\n <sphereGeometry args={[0.3, 16, 16]} />\r\n <meshStandardMaterial color={color} emissive={color} emissiveIntensity={4} transparent opacity={pointOpacity} roughness={0} metalness={1} />\r\n </instancedMesh>\r\n <lineSegments frustumCulled={false}>\r\n <primitive object={linesGeom} attach=\"geometry\" />\r\n <lineBasicMaterial color=\"#ffffff\" transparent opacity={lineOpacity} blending={THREE.AdditiveBlending} />\r\n </lineSegments>\r\n </group>\r\n );\r\n}\r\n\r\n// The central \"Black Hole\" or pulsing star\r\nexport function BlackHoleCore({ color = \"#312e81\" }: { color?: string }) {\r\n const groupRef = useRef<THREE.Group>(null);\r\n const visualsGroupRef = useRef<THREE.Group>(null);\r\n const shockwaveRef = useRef<THREE.Mesh>(null);\r\n const [clicked, setClicked] = useState(false);\r\n const shockProgress = useRef(0);\r\n const [easterEggActive, setEasterEggActive] = useState(false);\r\n \r\n // Track egg time internally for the BlackHole to know when to grow back\r\n const eggTime = useRef(0);\r\n\r\n const triggerShockwave = () => {\r\n if (easterEggActive) return;\r\n setClicked(true);\r\n shockProgress.current = 0;\r\n setTimeout(() => setClicked(false), 800);\r\n };\r\n\r\n useFrame((_, delta) => {\r\n if (groupRef.current) {\r\n groupRef.current.rotation.y += delta * 0.05;\r\n groupRef.current.rotation.x += delta * 0.02;\r\n }\r\n\r\n if (visualsGroupRef.current) {\r\n if (easterEggActive) {\r\n eggTime.current += delta;\r\n // The egg takes 8.0s. It fades back in during Phase 4 (6.5s to 8.0s)\r\n if (eggTime.current > 6.5) {\r\n const progress = Math.min((eggTime.current - 6.5) / 1.5, 1.0);\r\n const ease = 1 - Math.pow(1 - progress, 3); // cubic ease out\r\n visualsGroupRef.current.scale.set(ease, ease, ease);\r\n } else {\r\n visualsGroupRef.current.scale.lerp(new THREE.Vector3(0, 0, 0), delta * 25); // Shrink intensely at start\r\n }\r\n } else {\r\n eggTime.current = 0;\r\n visualsGroupRef.current.scale.lerp(new THREE.Vector3(1, 1, 1), delta * 5);\r\n }\r\n }\r\n\r\n if (clicked && shockProgress.current < 1) shockProgress.current += delta * 2;\r\n else if (!clicked && shockProgress.current > 0) shockProgress.current -= delta * 1;\r\n if (shockProgress.current < 0) shockProgress.current = 0;\r\n\r\n if (shockwaveRef.current) {\r\n const s = 1 + shockProgress.current * 15;\r\n shockwaveRef.current.scale.set(s, s, s);\r\n (shockwaveRef.current.material as THREE.Material).opacity = Math.max(0, 0.6 - shockProgress.current * 0.6);\r\n }\r\n });\r\n\r\n return (\r\n <group \r\n ref={groupRef} \r\n onClick={triggerShockwave} \r\n onDoubleClick={() => setEasterEggActive(true)}\r\n onPointerOver={(e) => { e.stopPropagation(); document.body.style.cursor = \"crosshair\"; }} \r\n onPointerOut={() => { document.body.style.cursor = \"default\"; }}\r\n >\r\n <SupernovaEasterEgg active={easterEggActive} color={color} onComplete={() => setEasterEggActive(false)} />\r\n \r\n <group ref={visualsGroupRef}>\r\n <Sphere args={[1.5, 64, 64]}>\r\n <MeshDistortMaterial color=\"#000000\" emissive={color} emissiveIntensity={1.5} distort={0.4} speed={3} roughness={0.1} />\r\n </Sphere>\r\n \r\n <mesh ref={shockwaveRef} rotation={[Math.PI / 2, 0, 0]}>\r\n <ringGeometry args={[1.6, 2.0, 64]} />\r\n <meshBasicMaterial color={color} transparent opacity={0} side={THREE.DoubleSide} />\r\n </mesh>\r\n\r\n <mesh rotation={[Math.PI / 2.2, 0.1, 0]}>\r\n <torusGeometry args={[3.2, 0.015, 16, 100]} />\r\n <meshBasicMaterial color={color} transparent opacity={0.5} />\r\n </mesh>\r\n <mesh rotation={[Math.PI / 2.2, -0.1, 0]}>\r\n <torusGeometry args={[4.5, 0.03, 16, 100]} />\r\n <meshBasicMaterial color=\"#38bdf8\" transparent opacity={0.3} />\r\n </mesh>\r\n </group>\r\n </group>\r\n );\r\n}\r\n\r\n// Asteroid field that physically runs away from the user's mouse cursor\r\nexport function AsteroidField({ count = 150, color = \"#6366f1\", shape = \"dodecahedron\" }: { count?: number, color?: string, shape?: \"dodecahedron\" | \"icosahedron\" | \"box\" }) {\r\n const meshRef = useRef<THREE.InstancedMesh>(null);\r\n const linesRef = useRef<THREE.InstancedMesh>(null); // Dedicated mesh for warp speed light beams\r\n const dummy = useMemo(() => new THREE.Object3D(), []);\r\n const [isPressing, setIsPressing] = useState(false);\r\n const warpSpeedRef = useRef(0);\r\n \r\n // Listen for global pointer down to trigger Warp Speed\r\n useEffect(() => {\r\n const handleDown = () => setIsPressing(true);\r\n const handleUp = () => setIsPressing(false);\r\n window.addEventListener(\"pointerdown\", handleDown);\r\n window.addEventListener(\"pointerup\", handleUp);\r\n return () => {\r\n window.removeEventListener(\"pointerdown\", handleDown);\r\n window.removeEventListener(\"pointerup\", handleUp);\r\n };\r\n }, []);\r\n \r\n const particles = useMemo(() => {\r\n return Array.from({ length: count }, () => ({\r\n pos: new THREE.Vector3((Math.random() - 0.5) * 25, (Math.random() - 0.5) * 25, (Math.random() - 0.5) * 40), // wider Z\r\n vel: new THREE.Vector3((Math.random() - 0.5) * 0.04, (Math.random() - 0.5) * 0.04, (Math.random() - 0.5) * 0.04),\r\n baseZSpeed: Math.random() * 0.05 + 0.01,\r\n scale: Math.random() * 0.3 + 0.05,\r\n rotSpeed: new THREE.Vector3(Math.random() * 0.1, Math.random() * 0.1, Math.random() * 0.1),\r\n rotation: new THREE.Vector3()\r\n }));\r\n }, [count, shape]);\r\n\r\n // Dedicated light beams that only appear during Warp Speed\r\n const warpLinesCount = 300;\r\n const warpLines = useMemo(() => {\r\n return Array.from({ length: warpLinesCount }, () => ({\r\n pos: new THREE.Vector3((Math.random() - 0.5) * 50, (Math.random() - 0.5) * 50, (Math.random() - 0.5) * 100),\r\n speed: Math.random() * 0.8 + 0.5,\r\n length: Math.random() * 5 + 3,\r\n }));\r\n }, [warpLinesCount]);\r\n\r\n useFrame((state, delta) => {\r\n // Warp speed smooth logic\r\n const targetWarp = isPressing ? 1 : 0;\r\n warpSpeedRef.current += (targetWarp - warpSpeedRef.current) * 0.05;\r\n \r\n const mouse3D = new THREE.Vector3(state.pointer.x * 12, state.pointer.y * 12, 2);\r\n const pushDir = new THREE.Vector3();\r\n\r\n // 1. Update Asteroids (Rocks) -> No stretching anymore! \r\n if (meshRef.current) {\r\n particles.forEach((p, i) => {\r\n // If warp speed active, push rocks backwards extremely fast straight ahead\r\n if (warpSpeedRef.current > 0.01) {\r\n const currentVelX = THREE.MathUtils.lerp(p.vel.x, 0, warpSpeedRef.current);\r\n const currentVelY = THREE.MathUtils.lerp(p.vel.y, 0, warpSpeedRef.current);\r\n p.pos.set(p.pos.x + currentVelX, p.pos.y + currentVelY, p.pos.z + (p.baseZSpeed + warpSpeedRef.current * 4.0));\r\n p.rotation.set(\r\n p.rotation.x + p.rotSpeed.x * (1 - warpSpeedRef.current),\r\n p.rotation.y + p.rotSpeed.y * (1 - warpSpeedRef.current),\r\n p.rotation.z + p.rotSpeed.z * (1 - warpSpeedRef.current)\r\n );\r\n } else {\r\n p.pos.add(p.vel);\r\n p.rotation.add(p.rotSpeed);\r\n p.pos.z += p.baseZSpeed;\r\n }\r\n\r\n // Wrap around space boundaries\r\n if (Math.abs(p.pos.x) > 20) p.vel.x *= -1;\r\n if (Math.abs(p.pos.y) > 20) p.vel.y *= -1;\r\n if (p.pos.z > 15) {\r\n p.pos.z = -50; \r\n p.pos.x = (Math.random() - 0.5) * 60; \r\n p.pos.y = (Math.random() - 0.5) * 60;\r\n }\r\n if (p.pos.z < -60) p.vel.z *= -1;\r\n\r\n // Mouse Repulsion Interaction\r\n const dist = p.pos.distanceTo(mouse3D);\r\n if (dist < 4 && warpSpeedRef.current < 0.5) {\r\n pushDir.copy(p.pos).sub(mouse3D).normalize();\r\n p.pos.add(pushDir.multiplyScalar((4 - dist) * 0.08));\r\n }\r\n \r\n if (warpSpeedRef.current < 0.1) {\r\n const s = Math.sin(0.001);\r\n const c = Math.cos(0.001);\r\n const x = p.pos.x;\r\n const z = p.pos.z;\r\n p.pos.x = x * c + z * s;\r\n p.pos.z = z * c - x * s;\r\n }\r\n\r\n dummy.position.copy(p.pos);\r\n // Preserve uniform scaling (NOT stretched like logs)\r\n // Fade them out slightly by making them smaller if zooming past near camera bounds\r\n const visualScale = p.scale * (1.0 - (warpSpeedRef.current * 0.5));\r\n dummy.scale.setScalar(visualScale);\r\n dummy.rotation.set(p.rotation.x, p.rotation.y, p.rotation.z);\r\n dummy.updateMatrix();\r\n meshRef.current!.setMatrixAt(i, dummy.matrix);\r\n });\r\n meshRef.current!.instanceMatrix.needsUpdate = true;\r\n }\r\n\r\n // 2. Update Warp Lines (Lasers) -> Only visible when warpSpeed > 0\r\n if (linesRef.current) {\r\n warpLines.forEach((line, i) => {\r\n // Move incredibly fast during warp\r\n line.pos.z += (line.speed + (warpSpeedRef.current * 8.0));\r\n \r\n // Loop lines back\r\n if (line.pos.z > 15) {\r\n line.pos.z = -80;\r\n line.pos.x = (Math.random() - 0.5) * 50;\r\n line.pos.y = (Math.random() - 0.5) * 50;\r\n }\r\n\r\n dummy.position.copy(line.pos);\r\n // Orient cylinder along Z axis rigidly\r\n dummy.rotation.set(Math.PI / 2, 0, 0); \r\n // Stretch based on warp intensity\r\n const stretch = line.length + (warpSpeedRef.current * 15.0);\r\n const thinness = 1.0 - (warpSpeedRef.current * 0.8);\r\n dummy.scale.set(thinness, stretch, thinness);\r\n dummy.updateMatrix();\r\n linesRef.current!.setMatrixAt(i, dummy.matrix);\r\n });\r\n linesRef.current.instanceMatrix.needsUpdate = true;\r\n \r\n // Link opacity to warp intensity directly\r\n const mat = linesRef.current.material as THREE.Material;\r\n mat.opacity = warpSpeedRef.current * 0.6; // Soft laser glow\r\n }\r\n \r\n // Dynamic FOV for Tunnel effect\r\n if (state.camera instanceof THREE.PerspectiveCamera) {\r\n const targetFov = 45 + (warpSpeedRef.current * 30); \r\n state.camera.fov += (targetFov - state.camera.fov) * 0.05;\r\n state.camera.updateProjectionMatrix();\r\n }\r\n });\r\n\r\n return (\r\n <group>\r\n {/* The true asteroids (No stretching, just rocks) */}\r\n <instancedMesh ref={meshRef} args={[undefined, undefined, count]} key={shape}>\r\n {shape === \"dodecahedron\" && <dodecahedronGeometry args={[1, 0]} />}\r\n {shape === \"icosahedron\" && <icosahedronGeometry args={[1, 0]} />}\r\n {shape === \"box\" && <boxGeometry args={[1, 1, 1]} />}\r\n <meshStandardMaterial color={color} roughness={0.4} metalness={0.6} />\r\n </instancedMesh>\r\n \r\n {/* The sci-fi light speed trails */}\r\n <instancedMesh ref={linesRef} args={[undefined, undefined, warpLinesCount]}>\r\n <cylinderGeometry args={[0.08, 0.08, 1, 8]} />\r\n <meshBasicMaterial color=\"#ffffff\" transparent opacity={0} blending={THREE.AdditiveBlending} depthWrite={false} />\r\n </instancedMesh>\r\n </group>\r\n );\r\n}\r\n\r\n// Controls camera movement based on Scroll + Mouse Tracking\r\nfunction CameraController() {\r\n useFrame((state) => {\r\n // 1. SCROLL PARALLAX: moves camera down effectively floating through space as you scroll down\r\n const scrollY = window.scrollY;\r\n // Reduce Y target so the camera doesn't veer off too drastically\r\n const targetY = (-scrollY * 0.005) + (state.pointer.y * 1.5);\r\n \r\n // 2. MOUSE PARALLAX: entire universe tilts slightly opposite to your mouse\r\n const targetX = state.pointer.x * 2;\r\n \r\n // Smooth Lerp\r\n state.camera.position.x += (targetX - state.camera.position.x) * 0.05;\r\n state.camera.position.y += (targetY - state.camera.position.y) * 0.05;\r\n \r\n state.camera.lookAt(0, 0, 0);\r\n });\r\n return null;\r\n}\r\n\r\n// Background Nebula Clouds\r\nexport function NebulaClouds() {\r\n const particleTexture = useMemo(() => {\r\n // Generate a soft radial gradient for the \"cloud\" particle\r\n const canvas = document.createElement('canvas');\r\n canvas.width = 128;\r\n canvas.height = 128;\r\n const ctx = canvas.getContext('2d');\r\n if (ctx) {\r\n const gradient = ctx.createRadialGradient(64, 64, 0, 64, 64, 64);\r\n gradient.addColorStop(0, 'rgba(255,255,255,1)');\r\n gradient.addColorStop(0.3, 'rgba(255,255,255,0.4)');\r\n gradient.addColorStop(0.7, 'rgba(255,255,255,0.05)');\r\n gradient.addColorStop(1, 'rgba(0,0,0,0)');\r\n ctx.fillStyle = gradient;\r\n ctx.fillRect(0, 0, 128, 128);\r\n }\r\n return new THREE.CanvasTexture(canvas);\r\n }, []);\r\n\r\n const count = 400;\r\n \r\n // Use useMemo to generate organic nebula shapes (Perlin/Simplex noise-like clusters)\r\n const { positions1, colors1, positions2, colors2 } = useMemo(() => {\r\n const p1 = new Float32Array(count * 3);\r\n const c1 = new Float32Array(count * 3);\r\n const p2 = new Float32Array(count * 3);\r\n const c2 = new Float32Array(count * 3);\r\n\r\n const baseColor1 = new THREE.Color(\"#4c1d95\"); // Deep Purple\r\n const accentColor1 = new THREE.Color(\"#be185d\"); // Deep Pink\r\n \r\n const baseColor2 = new THREE.Color(\"#1e3a8a\"); // Deep Blue\r\n const accentColor2 = new THREE.Color(\"#0ea5e9\"); // Cyan\r\n\r\n for (let i = 0; i < count; i++) {\r\n // Nebula 1: Large sweeping galactic arm\r\n const angle = Math.random() * Math.PI * 2;\r\n const radius = 10 + Math.random() * 40;\r\n const spreadY = (Math.random() - 0.5) * 15;\r\n p1[i * 3] = Math.cos(angle) * radius + (Math.random()-0.5)*15;\r\n p1[i * 3 + 1] = spreadY + (Math.random()-0.5)*10;\r\n p1[i * 3 + 2] = Math.sin(angle) * radius - 20 + (Math.random()-0.5)*15;\r\n \r\n const mixColor1 = baseColor1.clone().lerp(accentColor1, Math.random());\r\n c1[i * 3] = mixColor1.r;\r\n c1[i * 3 + 1] = mixColor1.g;\r\n c1[i * 3 + 2] = mixColor1.b;\r\n\r\n // Nebula 2: Concentrated core / diffuse background\r\n const angle2 = Math.random() * Math.PI * 2;\r\n const radius2 = Math.random() * 35;\r\n p2[i * 3] = Math.cos(angle2) * radius2 * 1.5;\r\n p2[i * 3 + 1] = (Math.random() - 0.5) * 25;\r\n p2[i * 3 + 2] = Math.sin(angle2) * radius2 - 30;\r\n\r\n const mixColor2 = baseColor2.clone().lerp(accentColor2, Math.random());\r\n c2[i * 3] = mixColor2.r;\r\n c2[i * 3 + 1] = mixColor2.g;\r\n c2[i * 3 + 2] = mixColor2.b;\r\n }\r\n return { positions1: p1, colors1: c1, positions2: p2, colors2: c2 };\r\n }, [count]);\r\n\r\n const groupRef = useRef<THREE.Group>(null);\r\n\r\n useFrame((_, delta) => {\r\n if (groupRef.current) {\r\n // Extremely slow drift of the entire nebula to make it feel alive\r\n groupRef.current.rotation.y += delta * 0.01;\r\n groupRef.current.rotation.z += delta * 0.002;\r\n }\r\n });\r\n\r\n return (\r\n <group ref={groupRef} position={[0, 0, -10]}>\r\n <points>\r\n <bufferGeometry>\r\n <bufferAttribute attach=\"attributes-position\" count={count} args={[positions1, 3]} />\r\n <bufferAttribute attach=\"attributes-color\" count={count} args={[colors1, 3]} />\r\n </bufferGeometry>\r\n <pointsMaterial \r\n size={35} \r\n map={particleTexture} \r\n vertexColors \r\n transparent \r\n opacity={0.08} \r\n depthWrite={false}\r\n depthTest={false} \r\n blending={THREE.AdditiveBlending} \r\n sizeAttenuation={true}\r\n />\r\n </points>\r\n <points rotation={[0.2, 0.5, -0.1]}>\r\n <bufferGeometry>\r\n <bufferAttribute attach=\"attributes-position\" count={count} args={[positions2, 3]} />\r\n <bufferAttribute attach=\"attributes-color\" count={count} args={[colors2, 3]} />\r\n </bufferGeometry>\r\n <pointsMaterial \r\n size={45} \r\n map={particleTexture} \r\n vertexColors \r\n transparent \r\n opacity={0.06} \r\n depthWrite={false}\r\n depthTest={false} \r\n blending={THREE.AdditiveBlending} \r\n sizeAttenuation={true}\r\n />\r\n </points>\r\n </group>\r\n );\r\n}\r\n\r\nexport default function Scene({ \r\n coreColor = \"#312e81\", \r\n particleColor = \"#6366f1\", \r\n particleCount = 150, \r\n particleShape = \"dodecahedron\" \r\n}: { \r\n coreColor?: string, \r\n particleColor?: string, \r\n particleCount?: number, \r\n particleShape?: \"dodecahedron\" | \"icosahedron\" | \"box\" \r\n}) {\r\n return (\r\n <div className=\"absolute inset-0 w-full h-full z-0 pointer-events-auto bg-[#020205]\">\r\n <Canvas camera={{ position: [0, 0, 12], fov: 45 }} gl={{ alpha: true }}>\r\n <color attach=\"background\" args={['#020205']} />\r\n <React.Suspense fallback={null}>\r\n <ambientLight intensity={0.5} />\r\n <directionalLight position={[10, 10, 5]} intensity={3} color=\"#818cf8\" />\r\n <directionalLight position={[-10, -10, -5]} intensity={2} color=\"#c084fc\" />\r\n \r\n <CameraController />\r\n <BlackHoleCore color={coreColor} />\r\n <AsteroidField count={particleCount} color={particleColor} shape={particleShape} />\r\n <NebulaClouds />\r\n \r\n {/* Dense Universe Stars & Sparkles */}\r\n <Stars radius={150} depth={100} count={8000} factor={6} saturation={1} fade speed={2} />\r\n <Sparkles count={300} scale={25} size={3} speed={0.2} opacity={0.4} color=\"#818cf8\" />\r\n <Sparkles count={200} scale={20} size={1} speed={0.4} opacity={0.6} color=\"#c084fc\" />\r\n <Sparkles count={100} scale={30} size={6} speed={0.1} opacity={0.2} color=\"#2dd4bf\" />\r\n \r\n <Environment preset=\"city\" />\r\n </React.Suspense>\r\n </Canvas>\r\n </div>\r\n );\r\n}\r\n","\"use client\";\n\nimport React, { useState, useRef, useEffect } from 'react';\n\nexport const Button = ({ \n children, \n variant = 'primary', \n className = '', \n customColor,\n customBg,\n customBorder,\n customRadius,\n customSize,\n style,\n ...props \n}: any) => {\n const base = \"font-medium transition-all duration-300 relative overflow-hidden group active:scale-95 flex items-center justify-center\";\n const sizeClass = customSize === 'sm' ? 'px-4 py-2 text-sm' : customSize === 'lg' ? 'px-8 py-4 text-lg' : 'px-6 py-3';\n \n const customStyles = {\n ...(customColor && { color: customColor }),\n ...(customBg && { backgroundColor: customBg }),\n ...(customBorder && { border: customBorder }),\n ...(customRadius && { borderRadius: customRadius }),\n ...style\n };\n\n if (variant === 'mecha') {\n return (\n <button \n className={`${sizeClass} font-mono font-bold tracking-[0.2em] uppercase text-xs transition-all relative overflow-hidden group active:scale-95 flex items-center justify-center bg-zinc-900 border-l-4 border-l-yellow-500 border-y border-y-zinc-800 border-r border-r-zinc-800 text-zinc-300 hover:text-white hover:bg-zinc-800 hover:border-l-yellow-400 ${className}`}\n style={{ clipPath: \"polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px)\", ...customStyles }}\n {...props}\n >\n <div className=\"absolute inset-0 bg-[repeating-linear-gradient(45deg,transparent,transparent_2px,rgba(255,255,255,0.02)_2px,rgba(255,255,255,0.02)_4px)] pointer-events-none\" />\n <span className=\"relative z-10 flex items-center gap-2\">\n {children}\n </span>\n <div className=\"absolute right-2 bottom-2 w-1.5 h-1.5 bg-yellow-500/50 group-hover:bg-yellow-400\" />\n </button>\n );\n }\n\n const variants = {\n primary: \"bg-white text-black hover:bg-zinc-200 active:bg-zinc-300 hover:shadow-lg rounded-lg\",\n glow: \"bg-indigo-500/20 text-indigo-300 border border-indigo-500/50 hover:bg-indigo-500/40 hover:shadow-[0_0_20px_rgba(99,102,241,0.4)] active:bg-indigo-500/50 rounded-lg\",\n ghost: \"bg-transparent text-zinc-300 hover:bg-white/10 active:bg-white/20 rounded-lg\",\n outline: \"bg-transparent border border-white/20 text-white hover:border-white/60 hover:bg-white/5 active:bg-white/10 rounded-lg\",\n danger: \"bg-rose-500/10 border border-rose-500/50 text-rose-400 hover:bg-rose-500/20 hover:shadow-[0_0_20px_rgba(244,63,94,0.4)] active:bg-rose-500/30 rounded-lg\"\n };\n \n return (\n <button \n className={`${base} ${sizeClass} ${(variants as any)[variant] || variants.primary} ${className}`} \n style={customStyles}\n {...props}\n >\n <span className=\"relative z-10\">{children}</span>\n </button>\n );\n};\n\nexport const TextBox = ({ \n variant = 'default', \n className = '', \n customColor,\n customBg,\n customBorder,\n customRadius,\n style,\n ...props \n}: any) => {\n const base = \"w-full focus:outline-none transition-all\";\n \n const customStyles = {\n ...(customColor && { color: customColor }),\n ...(customBg && { backgroundColor: customBg }),\n ...(customBorder && { border: customBorder }),\n ...(customRadius && { borderRadius: customRadius }),\n ...style\n };\n\n const variants = {\n default: \"bg-[#0a0a0f] border border-white/10 rounded-xl px-4 py-3 text-white placeholder:text-zinc-600 focus:border-indigo-500 focus:ring-1 focus:ring-indigo-500\",\n underline: \"bg-transparent border-b-2 border-white/10 px-0 py-3 text-white placeholder:text-zinc-600 focus:border-indigo-500 rounded-none\",\n glow: \"bg-indigo-500/5 border border-indigo-500/30 rounded-xl px-4 py-3 text-indigo-100 placeholder:text-indigo-500/50 focus:border-indigo-400 focus:shadow-[0_0_20px_rgba(99,102,241,0.2)]\",\n mecha: \"bg-black border border-zinc-800 focus:border-yellow-500 text-yellow-50 font-mono text-sm px-4 py-3 rounded-none placeholder:text-zinc-700 relative z-10 w-full\"\n };\n\n if (variant === 'mecha') {\n return (\n <div className={`relative ${className}`} style={{ ...(customRadius && { borderRadius: customRadius }) }}>\n <div className=\"absolute top-0 left-0 w-2 h-2 border-t-2 border-l-2 border-yellow-500/50 pointer-events-none\" style={{ borderColor: customBorder ? customBorder.split(' ')[2] || customBorder : undefined }} />\n <div className=\"absolute bottom-0 right-0 w-2 h-2 border-b-2 border-r-2 border-yellow-500/50 pointer-events-none\" style={{ borderColor: customBorder ? customBorder.split(' ')[2] || customBorder : undefined }} />\n <input \n className={variants.mecha}\n style={customStyles}\n {...props}\n />\n <div className=\"absolute right-3 top-1/2 -translate-y-1/2 text-[9px] font-mono text-yellow-500/30 pointer-events-none\">[INPUT]</div>\n </div>\n );\n }\n\n return (\n <input \n className={`${base} ${(variants as any)[variant] || variants.default} ${className}`}\n style={customStyles}\n {...props}\n />\n );\n};\n\nexport const Dropdown = ({ options = [], variant = 'default', placeholder = \"Select...\", className = '' }: any) => {\n const [isOpen, setIsOpen] = useState(false);\n const [selected, setSelected] = useState('');\n const dropdownRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const handleClickOutside = (event: MouseEvent) => {\n if (dropdownRef.current && !dropdownRef.current.contains(event.target as Node)) {\n setIsOpen(false);\n }\n };\n document.addEventListener('mousedown', handleClickOutside);\n return () => document.removeEventListener('mousedown', handleClickOutside);\n }, []);\n\n const base = \"w-full transition-all cursor-pointer flex justify-between items-center\";\n const variants = {\n default: \"bg-[#0a0a0f] border border-white/10 rounded-xl px-4 py-3 text-white focus:outline-none focus:border-indigo-500\",\n ghost: \"bg-white/5 border border-transparent rounded-xl px-4 py-3 text-zinc-300 hover:bg-white/10 focus:bg-[#0a0a0f] focus:border-indigo-500\",\n mecha: \"bg-black border border-zinc-800 rounded-none px-4 py-3 text-yellow-50 font-mono text-sm hover:border-yellow-500/50 focus:border-yellow-500 relative\"\n };\n\n return (\n <div className={`relative ${className}`} ref={dropdownRef}>\n {variant === 'mecha' && (\n <>\n <div className=\"absolute top-0 left-0 w-2 h-2 border-t-2 border-l-2 border-yellow-500/50 z-10 pointer-events-none\" />\n <div className=\"absolute bottom-0 right-0 w-2 h-2 border-b-2 border-r-2 border-yellow-500/50 z-10 pointer-events-none\" />\n </>\n )}\n <div \n className={`${base} ${(variants as any)[variant] || variants.default}`}\n onClick={() => setIsOpen(!isOpen)}\n >\n <span className={selected ? 'text-white' : 'text-zinc-500'}>\n {selected || placeholder}\n </span>\n <svg className={`w-4 h-4 text-zinc-500 transition-transform duration-200 ${isOpen ? 'rotate-180' : ''}`} fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M19 9l-7 7-7-7\" />\n </svg>\n </div>\n\n {isOpen && (\n <div className={`absolute z-50 w-full mt-2 overflow-hidden animate-in fade-in slide-in-from-top-2 duration-200 ${variant === 'mecha' ? 'bg-black border border-yellow-500/50 rounded-none shadow-[0_0_20px_rgba(234,179,8,0.1)]' : 'bg-[#0a0a0f] border border-white/10 rounded-xl shadow-[0_10px_40px_-10px_rgba(0,0,0,0.5)]'}`}>\n <div className=\"max-h-60 overflow-y-auto custom-scrollbar\">\n {options.map((opt: string, i: number) => (\n <div \n key={i} \n className={variant === 'mecha' \n ? `px-4 py-3 text-sm cursor-pointer transition-colors font-mono ${selected === opt ? 'bg-yellow-500/20 text-yellow-300 border-l-2 border-yellow-500' : 'text-zinc-400 hover:bg-zinc-900 border-l-2 border-transparent hover:text-white'}`\n : `px-4 py-3 text-sm cursor-pointer transition-colors ${selected === opt ? 'bg-indigo-500/20 text-indigo-300' : 'text-zinc-300 hover:bg-white/10 hover:text-white'}`\n }\n onClick={() => {\n setSelected(opt);\n setIsOpen(false);\n }}\n >\n {opt}\n </div>\n ))}\n </div>\n </div>\n )}\n </div>\n );\n};\n\nexport const Card = ({ \n children, \n variant = 'default', \n className = '', \n customColor,\n customBg,\n customBorder,\n customRadius,\n style,\n ...props \n}: any) => {\n const base = \"transition-all duration-300 relative overflow-hidden\";\n \n const customStyles = {\n ...(customColor && { color: customColor }),\n ...(customBg && { backgroundColor: customBg }),\n ...(customBorder && { border: customBorder }),\n ...(customRadius && { borderRadius: customRadius }),\n ...style\n };\n\n const variants = {\n default: \"p-6 rounded-2xl bg-[#050508] border border-white/10\",\n glow: \"p-6 rounded-2xl bg-indigo-900/10 border border-indigo-500/30 shadow-[0_0_30px_rgba(99,102,241,0.15)]\",\n glass: \"p-6 rounded-2xl bg-white/[0.08] backdrop-blur-xl border border-white/20 shadow-[0_8px_32px_0_rgba(255,255,255,0.05)]\",\n mecha: \"p-8 rounded-none bg-zinc-900/80 border border-zinc-800 backdrop-blur-sm\"\n };\n\n if (variant === 'mecha') {\n return (\n <div className={`${base} ${variants.mecha} ${className}`} style={customStyles} {...props}>\n {/* Mecha Card Accents */}\n <div className=\"absolute top-0 left-0 w-8 h-8 border-t-2 border-l-2 border-yellow-500/50 pointer-events-none\" style={{ borderColor: customBorder ? customBorder.split(' ')[2] || customBorder : undefined }} />\n <div className=\"absolute top-0 right-0 w-8 h-8 border-t-2 border-r-2 border-yellow-500/50 pointer-events-none\" style={{ borderColor: customBorder ? customBorder.split(' ')[2] || customBorder : undefined }} />\n <div className=\"absolute bottom-0 left-0 w-8 h-8 border-b-2 border-l-2 border-yellow-500/50 pointer-events-none\" style={{ borderColor: customBorder ? customBorder.split(' ')[2] || customBorder : undefined }} />\n <div className=\"absolute bottom-0 right-0 w-8 h-8 border-b-2 border-r-2 border-yellow-500/50 pointer-events-none\" style={{ borderColor: customBorder ? customBorder.split(' ')[2] || customBorder : undefined }} />\n \n {/* Warning track background */}\n <div className=\"absolute bottom-0 left-10 right-10 h-[2px] bg-[repeating-linear-gradient(45deg,transparent,transparent_4px,rgba(234,179,8,0.5)_4px,rgba(234,179,8,0.5)_8px)] pointer-events-none\" />\n \n {children}\n </div>\n );\n }\n\n return (\n <div className={`${base} ${(variants as any)[variant] || variants.default} ${className}`} style={customStyles} {...props}>\n {children}\n </div>\n );\n};\n\nexport const Badge = ({ \n children, \n variant = 'primary', \n className = '', \n customColor,\n customBg,\n customBorder,\n customRadius,\n style,\n ...props \n}: any) => {\n const base = \"px-2.5 py-0.5 rounded-full text-xs font-semibold tracking-wider uppercase transition-all\";\n \n const customStyles = {\n ...(customColor && { color: customColor }),\n ...(customBg && { backgroundColor: customBg }),\n ...(customBorder && { border: customBorder }),\n ...(customRadius && { borderRadius: customRadius }),\n ...style\n };\n\n if (variant === 'mecha') {\n return (\n <span className={`px-2 py-1 bg-yellow-500/10 border border-yellow-500/50 text-[#eab308] text-[9px] font-mono font-bold tracking-[0.2em] relative uppercase ${className}`} style={customStyles} {...props}>\n <span className=\"absolute -left-1 flex items-center justify-center top-1/2 -translate-y-1/2 h-full gap-[1px] bg-[#020205] px-[2px]\">\n <span className=\"w-[1px] h-2 bg-yellow-500\" style={{ backgroundColor: customColor || undefined }} />\n <span className=\"w-[1px] h-2 bg-yellow-500\" style={{ backgroundColor: customColor || undefined }} />\n </span>\n <span className=\"pl-1\">{children}</span>\n </span>\n );\n }\n\n const variants = {\n primary: \"bg-indigo-500/20 text-indigo-300 border border-indigo-500/50\",\n success: \"bg-emerald-500/20 text-emerald-300 border border-emerald-500/50\",\n danger: \"bg-rose-500/20 text-rose-300 border border-rose-500/50\",\n outline: \"bg-transparent text-zinc-400 border border-zinc-700\"\n };\n\n return (\n <span className={`${base} ${(variants as any)[variant] || variants.primary} ${className}`} style={customStyles} {...props}>\n {children}\n </span>\n );\n};\n\nexport const Switch = ({ \n checked, \n onChange, \n variant = 'default', \n className = '',\n customColor,\n customBg,\n customBorder,\n customRadius,\n style,\n ...props \n}: any) => {\n const customStyles = {\n ...(customBg && { backgroundColor: customBg }),\n ...(customBorder && { border: customBorder }),\n ...(customRadius && { borderRadius: customRadius }),\n ...style\n };\n\n if (variant === 'mecha') {\n return (\n <div \n className={`w-14 h-6 border-2 border-zinc-700 bg-zinc-900 relative cursor-pointer flex items-center p-0.5 transition-colors ${checked ? 'border-yellow-500/50' : ''} ${className}`} \n onClick={onChange}\n style={customStyles}\n {...props}\n >\n {/* Warning track background */}\n <div className=\"absolute inset-0 bg-[repeating-linear-gradient(45deg,transparent,transparent_4px,rgba(255,255,255,0.02)_4px,rgba(255,255,255,0.02)_8px)] pointer-events-none\" />\n <div \n className={`w-5 h-4 bg-zinc-400 absolute transition-all duration-300 ease-out flex items-center justify-center ${checked ? 'left-[30px] bg-yellow-500 shadow-[0_0_10px_rgba(234,179,8,0.5)]' : 'left-0.5'}`} \n style={{ backgroundColor: checked && customColor ? customColor : undefined, boxShadow: checked && customColor ? `0 0 10px ${customColor}` : undefined }}\n >\n <div className={`w-[2px] h-2 ${checked ? 'bg-black/50' : 'bg-black/20'}`} />\n </div>\n </div>\n );\n }\n\n const base = \"w-11 h-6 rounded-full relative cursor-pointer transition-colors duration-300\";\n const variants = {\n default: checked ? \"bg-white\" : \"bg-zinc-800\",\n glow: checked ? \"bg-indigo-500 shadow-[0_0_15px_rgba(99,102,241,0.5)]\" : \"bg-zinc-800\"\n };\n const thumbBase = \"w-4 h-4 rounded-full absolute top-1 transition-all duration-300\";\n const thumbVariants = {\n default: checked ? \"left-6 bg-black\" : \"left-1 bg-zinc-400\",\n glow: checked ? \"left-6 bg-white\" : \"left-1 bg-zinc-500\"\n };\n\n return (\n <div className={`${base} ${(variants as any)[variant] || variants.default} ${className}`} style={customStyles} onClick={onChange} {...props}>\n <div className={`${thumbBase} ${(thumbVariants as any)[variant] || thumbVariants.default}`} style={{ backgroundColor: checked && customColor ? customColor : undefined }} />\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAO,SAAS,QAAQ,UAAU,SAAS,iBAAiB;AAC5D,SAAS,QAAQ,gBAAgB;AACjC,SAAS,aAAa,UAAU,OAAO,QAAQ,2BAA0C;AACzF,YAAY,WAAW;AA6IjB,SACE,KADF;AA1IN,SAAS,mBAAmB,EAAE,QAAQ,OAAO,WAAW,GAA+D;AACrH,QAAM,QAAQ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C,SAAI,WAAW,eAAe,UAAU,gBAAgB,aAAa,IAAI;AAAA;AAAA,UAC7E;AAAA;AAAA;AAAA,IACF;AAAA,EAEJ;AAEA,QAAM,OAAO;AACb,QAAM,WAAW;AAAA,IACf,SAAS,UAAU,aAAa;AAAA,IAChC,MAAM,UAAU,yDAAyD;AAAA,EAC3E;AACA,QAAM,YAAY;AAClB,QAAM,gBAAgB;AAAA,IACpB,SAAS,UAAU,oBAAoB;AAAA,IACvC,MAAM,UAAU,oBAAoB;AAAA,EACtC;AAEA,SACE,gBAAAA,KAAC,sCAAI,WAAW,GAAG,IAAI,IAAK,SAAiB,OAAO,KAAK,SAAS,OAAO,IAAI,SAAS,IAAI,OAAO,cAAc,SAAS,YAAc,QAArI,EACC,0BAAAA,KAAC,SAAI,WAAW,GAAG,SAAS,IAAK,cAAsB,OAAO,KAAK,cAAc,OAAO,IAAI,OAAO,EAAE,iBAAiB,WAAW,cAAc,cAAc,OAAU,GAAG,IAC5K;AAEJ;","names":["useState","useRef","useEffect","jsx","jsxs","useState","useRef","useEffect"]}
1
+ {"version":3,"sources":["../src/components/Scene.tsx","../src/components/UI.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport React, { useRef, useState, useMemo, useEffect } from \"react\";\r\nimport { Canvas, useFrame } from \"@react-three/fiber\";\r\nimport { Environment, Sparkles, Stars, Sphere, MeshDistortMaterial, Clouds, Cloud } from \"@react-three/drei\";\r\nimport * as THREE from \"three\";\r\n\r\n// Supernova Easter Egg Component\r\nfunction SupernovaEasterEgg({ active, color, onComplete }: { active: boolean, color: string, onComplete: () => void }) {\r\n const count = 150;\r\n const meshRef = useRef<THREE.InstancedMesh>(null);\r\n \r\n const dummy = useMemo(() => new THREE.Object3D(), []);\r\n \r\n // Distribute particles perfectly on the sphere shell initially\r\n const initialPositions = useMemo(() => {\r\n const pts = [];\r\n for(let i=0; i<count; i++) {\r\n const p = new THREE.Vector3(\r\n (Math.random() - 0.5) * 2,\r\n (Math.random() - 0.5) * 2,\r\n (Math.random() - 0.5) * 2\r\n ).normalize().multiplyScalar(1.5); // Start exactly on the Coreradius\r\n pts.push(p);\r\n }\r\n return pts;\r\n }, []);\r\n \r\n const velocities = useMemo(() => initialPositions.map(p => p.clone().normalize().multiplyScalar(Math.random() * 20 + 20)), [initialPositions]);\r\n \r\n const currentPositions = useRef(initialPositions.map(p => p.clone()));\r\n const time = useRef(0);\r\n const Y_AXIS = useMemo(() => new THREE.Vector3(0,1,0), []);\r\n const tempVel = useMemo(() => new THREE.Vector3(), []);\r\n\r\n const maxBonds = 2500;\r\n const bondsMeshRef = useRef<THREE.InstancedMesh>(null);\r\n const dummyBond = useMemo(() => new THREE.Object3D(), []);\r\n\r\n useFrame((_, delta) => {\r\n if (!active) return;\r\n time.current += delta;\r\n const t = time.current;\r\n\r\n let phase = 0; \r\n if (t < 2.0) phase = 1; // Violent Explosion\r\n else if (t < 4.0) phase = 2; // Drift and expand lines\r\n else if (t < 6.5) phase = 3; // Contract back to dense cage\r\n else if (t < 8.0) phase = 4; // Fade dots out, let core emerge\r\n else {\r\n onComplete();\r\n time.current = 0;\r\n currentPositions.current = initialPositions.map(p => p.clone());\r\n for(let i=0; i<count;i++) {\r\n velocities[i] = initialPositions[i].clone().normalize().multiplyScalar(Math.random() * 20 + 20);\r\n }\r\n if (bondsMeshRef.current) bondsMeshRef.current.count = 0;\r\n return;\r\n }\r\n\r\n let bondCount = 0;\r\n\r\n let bondThreshold = 0;\r\n if (phase === 2) {\r\n bondThreshold = ((t - 2.0) / 2.0) * 8.0; // Lines grow from 0 to 8 radius seamlessly\r\n } else if (phase >= 3) {\r\n bondThreshold = 8.0; // Everything is connected\r\n }\r\n\r\n for (let i = 0; i < count; i++) {\r\n let p = currentPositions.current[i];\r\n \r\n if (phase === 1) {\r\n tempVel.copy(velocities[i]).multiplyScalar(delta);\r\n p.add(tempVel);\r\n velocities[i].multiplyScalar(0.92); // Viscous fluid drag\r\n p.applyAxisAngle(Y_AXIS, delta * 2.0); // Orbital swirl\r\n } else if (phase === 2) {\r\n tempVel.copy(velocities[i]).multiplyScalar(delta);\r\n p.add(tempVel);\r\n velocities[i].multiplyScalar(0.95); // Float freely\r\n p.applyAxisAngle(Y_AXIS, delta * 0.5); // Slow drift\r\n } else {\r\n // Smoothly ease back right onto the original shell\r\n const target = initialPositions[i];\r\n p.lerp(target, 1.0 - Math.pow(0.001, delta)); // Highly sticky easing\r\n p.applyAxisAngle(Y_AXIS, delta * 0.5);\r\n }\r\n \r\n // Connect points into a liquid mesh\r\n if (bondThreshold > 0 && phase <= 4) {\r\n const thresholdSq = bondThreshold * bondThreshold;\r\n for (let j = i + 1; j < count; j++) {\r\n const p2 = currentPositions.current[j];\r\n const distSq = p.distanceToSquared(p2);\r\n if (distSq < thresholdSq && distSq < 16.0) { // Keep reasonable draw limits (4.0^2)\r\n if (bondCount < maxBonds) {\r\n const dist = Math.sqrt(distSq);\r\n // liquid thickness: thicker when close, thin when far\r\n const thickness = Math.max(0.015, 0.15 - (dist * 0.035)) * (bondThreshold / 8.0);\r\n \r\n dummyBond.position.copy(p).lerp(p2, 0.5); // center point\r\n dummyBond.lookAt(p2); // Orient Z axis toward p2\r\n dummyBond.scale.set(thickness, thickness, dist * 0.5); // scale Z to bridge the gap exactly\r\n dummyBond.updateMatrix();\r\n \r\n if (bondsMeshRef.current) bondsMeshRef.current.setMatrixAt(bondCount, dummyBond.matrix);\r\n bondCount++;\r\n }\r\n }\r\n }\r\n }\r\n \r\n // Scale handles visual pop nicely\r\n let scale = 0.2;\r\n if (phase === 1) {\r\n scale = Math.max(0.1, 0.4 - p.length()*0.015);\r\n } else if (phase === 2 || phase === 3) {\r\n scale = 0.15;\r\n } else if (phase === 4) {\r\n // Fade out the physical dots smoothly as the core takes over\r\n const progress = (t - 6.5) / 1.5;\r\n scale = THREE.MathUtils.lerp(0.15, 0, progress);\r\n }\r\n \r\n dummy.position.copy(p);\r\n dummy.scale.set(scale, scale, scale);\r\n dummy.updateMatrix();\r\n if (meshRef.current) meshRef.current.setMatrixAt(i, dummy.matrix);\r\n }\r\n \r\n if (meshRef.current) meshRef.current.instanceMatrix.needsUpdate = true;\r\n \r\n if (bondsMeshRef.current) {\r\n bondsMeshRef.current.count = bondCount;\r\n bondsMeshRef.current.instanceMatrix.needsUpdate = true;\r\n }\r\n });\r\n\r\n if (!active) return null;\r\n\r\n // Let bond lines fade during phase 4 smoothly\r\n const lineOpacity = time.current > 6.5 ? Math.max(0, 0.4 - ((time.current - 6.5)/1.5)*0.4) : 0.4;\r\n const pointOpacity = time.current > 6.5 ? Math.max(0, 0.9 - ((time.current - 6.5)/1.5)*0.9) : 0.9;\r\n\r\n return (\r\n <group>\r\n <instancedMesh ref={meshRef} args={[undefined, undefined, count]}>\r\n <sphereGeometry args={[0.3, 16, 16]} />\r\n <meshStandardMaterial color={color} emissive={color} emissiveIntensity={4} transparent opacity={pointOpacity} roughness={0} metalness={1} />\r\n </instancedMesh>\r\n <instancedMesh ref={bondsMeshRef} args={[undefined, undefined, maxBonds]} frustumCulled={false}>\r\n <sphereGeometry args={[1, 16, 16]} />\r\n <meshStandardMaterial \r\n color=\"#38bdf8\" \r\n transparent \r\n opacity={lineOpacity * 1.5} \r\n roughness={0.0} \r\n metalness={0.8} \r\n envMapIntensity={2.0} \r\n blending={THREE.AdditiveBlending} \r\n depthWrite={false}\r\n />\r\n </instancedMesh>\r\n </group>\r\n );\r\n}\r\n\r\n// The central \"Black Hole\" or pulsing star\r\nexport function BlackHoleCore({ color = \"#312e81\" }: { color?: string }) {\r\n const groupRef = useRef<THREE.Group>(null);\r\n const visualsGroupRef = useRef<THREE.Group>(null);\r\n const shockwaveRef = useRef<THREE.Mesh>(null);\r\n const [clicked, setClicked] = useState(false);\r\n const shockProgress = useRef(0);\r\n const [easterEggActive, setEasterEggActive] = useState(false);\r\n \r\n // Track egg time internally for the BlackHole to know when to grow back\r\n const eggTime = useRef(0);\r\n\r\n const triggerShockwave = () => {\r\n if (easterEggActive) return;\r\n setClicked(true);\r\n shockProgress.current = 0;\r\n setTimeout(() => setClicked(false), 800);\r\n };\r\n\r\n useFrame((_, delta) => {\r\n if (groupRef.current) {\r\n groupRef.current.rotation.y += delta * 0.05;\r\n groupRef.current.rotation.x += delta * 0.02;\r\n }\r\n\r\n if (visualsGroupRef.current) {\r\n if (easterEggActive) {\r\n eggTime.current += delta;\r\n // The egg takes 8.0s. It fades back in during Phase 4 (6.5s to 8.0s)\r\n if (eggTime.current > 6.5) {\r\n const progress = Math.min((eggTime.current - 6.5) / 1.5, 1.0);\r\n const ease = 1 - Math.pow(1 - progress, 3); // cubic ease out\r\n visualsGroupRef.current.scale.set(ease, ease, ease);\r\n } else {\r\n visualsGroupRef.current.scale.lerp(new THREE.Vector3(0, 0, 0), delta * 25); // Shrink intensely at start\r\n }\r\n } else {\r\n eggTime.current = 0;\r\n visualsGroupRef.current.scale.lerp(new THREE.Vector3(1, 1, 1), delta * 5);\r\n }\r\n }\r\n\r\n if (clicked && shockProgress.current < 1) shockProgress.current += delta * 2;\r\n else if (!clicked && shockProgress.current > 0) shockProgress.current -= delta * 1;\r\n if (shockProgress.current < 0) shockProgress.current = 0;\r\n\r\n if (shockwaveRef.current) {\r\n const s = 1 + shockProgress.current * 15;\r\n shockwaveRef.current.scale.set(s, s, s);\r\n (shockwaveRef.current.material as THREE.Material).opacity = Math.max(0, 0.6 - shockProgress.current * 0.6);\r\n }\r\n });\r\n\r\n return (\r\n <group \r\n ref={groupRef} \r\n onClick={triggerShockwave} \r\n onDoubleClick={() => setEasterEggActive(true)}\r\n onPointerOver={(e) => { e.stopPropagation(); document.body.style.cursor = \"crosshair\"; }} \r\n onPointerOut={() => { document.body.style.cursor = \"default\"; }}\r\n >\r\n <SupernovaEasterEgg active={easterEggActive} color={color} onComplete={() => setEasterEggActive(false)} />\r\n \r\n <group ref={visualsGroupRef}>\r\n <Sphere args={[1.5, 64, 64]}>\r\n <MeshDistortMaterial color=\"#000000\" emissive={color} emissiveIntensity={1.5} distort={0.4} speed={3} roughness={0.1} />\r\n </Sphere>\r\n \r\n <mesh ref={shockwaveRef} rotation={[Math.PI / 2, 0, 0]}>\r\n <ringGeometry args={[1.6, 2.0, 64]} />\r\n <meshBasicMaterial color={color} transparent opacity={0} side={THREE.DoubleSide} />\r\n </mesh>\r\n\r\n <mesh rotation={[Math.PI / 2.2, 0.1, 0]}>\r\n <torusGeometry args={[3.2, 0.015, 16, 100]} />\r\n <meshBasicMaterial color={color} transparent opacity={0.5} />\r\n </mesh>\r\n <mesh rotation={[Math.PI / 2.2, -0.1, 0]}>\r\n <torusGeometry args={[4.5, 0.03, 16, 100]} />\r\n <meshBasicMaterial color=\"#38bdf8\" transparent opacity={0.3} />\r\n </mesh>\r\n </group>\r\n </group>\r\n );\r\n}\r\n\r\n// Asteroid field that physically runs away from the user's mouse cursor\r\nexport function AsteroidField({ count = 150, color = \"#6366f1\", shape = \"dodecahedron\" }: { count?: number, color?: string, shape?: \"dodecahedron\" | \"icosahedron\" | \"box\" }) {\r\n const meshRef = useRef<THREE.InstancedMesh>(null);\r\n const linesRef = useRef<THREE.InstancedMesh>(null); // Dedicated mesh for warp speed light beams\r\n const dummy = useMemo(() => new THREE.Object3D(), []);\r\n const [isPressing, setIsPressing] = useState(false);\r\n const warpSpeedRef = useRef(0);\r\n \r\n // Listen for global pointer down to trigger Warp Speed\r\n useEffect(() => {\r\n const handleDown = () => setIsPressing(true);\r\n const handleUp = () => setIsPressing(false);\r\n window.addEventListener(\"pointerdown\", handleDown);\r\n window.addEventListener(\"pointerup\", handleUp);\r\n return () => {\r\n window.removeEventListener(\"pointerdown\", handleDown);\r\n window.removeEventListener(\"pointerup\", handleUp);\r\n };\r\n }, []);\r\n \r\n const particles = useMemo(() => {\r\n return Array.from({ length: count }, () => ({\r\n pos: new THREE.Vector3((Math.random() - 0.5) * 25, (Math.random() - 0.5) * 25, (Math.random() - 0.5) * 40), // wider Z\r\n vel: new THREE.Vector3((Math.random() - 0.5) * 0.04, (Math.random() - 0.5) * 0.04, (Math.random() - 0.5) * 0.04),\r\n baseZSpeed: Math.random() * 0.05 + 0.01,\r\n scale: Math.random() * 0.3 + 0.05,\r\n rotSpeed: new THREE.Vector3(Math.random() * 0.1, Math.random() * 0.1, Math.random() * 0.1),\r\n rotation: new THREE.Vector3()\r\n }));\r\n }, [count, shape]);\r\n\r\n // Dedicated light beams that only appear during Warp Speed\r\n const warpLinesCount = 300;\r\n const warpLines = useMemo(() => {\r\n return Array.from({ length: warpLinesCount }, () => ({\r\n pos: new THREE.Vector3((Math.random() - 0.5) * 50, (Math.random() - 0.5) * 50, (Math.random() - 0.5) * 100),\r\n speed: Math.random() * 0.8 + 0.5,\r\n length: Math.random() * 5 + 3,\r\n }));\r\n }, [warpLinesCount]);\r\n\r\n useFrame((state, delta) => {\r\n // Warp speed smooth logic\r\n const targetWarp = isPressing ? 1 : 0;\r\n warpSpeedRef.current += (targetWarp - warpSpeedRef.current) * 0.05;\r\n \r\n const mouse3D = new THREE.Vector3(state.pointer.x * 12, state.pointer.y * 12, 2);\r\n const pushDir = new THREE.Vector3();\r\n\r\n // 1. Update Asteroids (Rocks) -> No stretching anymore! \r\n if (meshRef.current) {\r\n particles.forEach((p, i) => {\r\n // If warp speed active, push rocks backwards extremely fast straight ahead\r\n if (warpSpeedRef.current > 0.01) {\r\n const currentVelX = THREE.MathUtils.lerp(p.vel.x, 0, warpSpeedRef.current);\r\n const currentVelY = THREE.MathUtils.lerp(p.vel.y, 0, warpSpeedRef.current);\r\n p.pos.set(p.pos.x + currentVelX, p.pos.y + currentVelY, p.pos.z + (p.baseZSpeed + warpSpeedRef.current * 4.0));\r\n p.rotation.set(\r\n p.rotation.x + p.rotSpeed.x * (1 - warpSpeedRef.current),\r\n p.rotation.y + p.rotSpeed.y * (1 - warpSpeedRef.current),\r\n p.rotation.z + p.rotSpeed.z * (1 - warpSpeedRef.current)\r\n );\r\n } else {\r\n p.pos.add(p.vel);\r\n p.rotation.add(p.rotSpeed);\r\n p.pos.z += p.baseZSpeed;\r\n }\r\n\r\n // Wrap around space boundaries\r\n if (Math.abs(p.pos.x) > 20) p.vel.x *= -1;\r\n if (Math.abs(p.pos.y) > 20) p.vel.y *= -1;\r\n if (p.pos.z > 15) {\r\n p.pos.z = -50; \r\n p.pos.x = (Math.random() - 0.5) * 60; \r\n p.pos.y = (Math.random() - 0.5) * 60;\r\n }\r\n if (p.pos.z < -60) p.vel.z *= -1;\r\n\r\n // Mouse Repulsion Interaction\r\n const dist = p.pos.distanceTo(mouse3D);\r\n if (dist < 4 && warpSpeedRef.current < 0.5) {\r\n pushDir.copy(p.pos).sub(mouse3D).normalize();\r\n p.pos.add(pushDir.multiplyScalar((4 - dist) * 0.08));\r\n }\r\n \r\n if (warpSpeedRef.current < 0.1) {\r\n const s = Math.sin(0.001);\r\n const c = Math.cos(0.001);\r\n const x = p.pos.x;\r\n const z = p.pos.z;\r\n p.pos.x = x * c + z * s;\r\n p.pos.z = z * c - x * s;\r\n }\r\n\r\n dummy.position.copy(p.pos);\r\n // Preserve uniform scaling (NOT stretched like logs)\r\n // Fade them out slightly by making them smaller if zooming past near camera bounds\r\n const visualScale = p.scale * (1.0 - (warpSpeedRef.current * 0.5));\r\n dummy.scale.setScalar(visualScale);\r\n dummy.rotation.set(p.rotation.x, p.rotation.y, p.rotation.z);\r\n dummy.updateMatrix();\r\n meshRef.current!.setMatrixAt(i, dummy.matrix);\r\n });\r\n meshRef.current!.instanceMatrix.needsUpdate = true;\r\n }\r\n\r\n // 2. Update Warp Lines (Lasers) -> Only visible when warpSpeed > 0\r\n if (linesRef.current) {\r\n warpLines.forEach((line, i) => {\r\n // Move incredibly fast during warp\r\n line.pos.z += (line.speed + (warpSpeedRef.current * 8.0));\r\n \r\n // Loop lines back\r\n if (line.pos.z > 15) {\r\n line.pos.z = -80;\r\n line.pos.x = (Math.random() - 0.5) * 50;\r\n line.pos.y = (Math.random() - 0.5) * 50;\r\n }\r\n\r\n dummy.position.copy(line.pos);\r\n // Orient cylinder along Z axis rigidly\r\n dummy.rotation.set(Math.PI / 2, 0, 0); \r\n // Stretch based on warp intensity\r\n const stretch = line.length + (warpSpeedRef.current * 15.0);\r\n const thinness = 1.0 - (warpSpeedRef.current * 0.8);\r\n dummy.scale.set(thinness, stretch, thinness);\r\n dummy.updateMatrix();\r\n linesRef.current!.setMatrixAt(i, dummy.matrix);\r\n });\r\n linesRef.current.instanceMatrix.needsUpdate = true;\r\n \r\n // Link opacity to warp intensity directly\r\n const mat = linesRef.current.material as THREE.Material;\r\n mat.opacity = warpSpeedRef.current * 0.6; // Soft laser glow\r\n }\r\n \r\n // Dynamic FOV for Tunnel effect\r\n if (state.camera instanceof THREE.PerspectiveCamera) {\r\n const targetFov = 45 + (warpSpeedRef.current * 30); \r\n state.camera.fov += (targetFov - state.camera.fov) * 0.05;\r\n state.camera.updateProjectionMatrix();\r\n }\r\n });\r\n\r\n return (\r\n <group>\r\n {/* The true asteroids (No stretching, just rocks) */}\r\n <instancedMesh ref={meshRef} args={[undefined, undefined, count]} key={shape}>\r\n {shape === \"dodecahedron\" && <dodecahedronGeometry args={[1, 0]} />}\r\n {shape === \"icosahedron\" && <icosahedronGeometry args={[1, 0]} />}\r\n {shape === \"box\" && <boxGeometry args={[1, 1, 1]} />}\r\n <meshStandardMaterial color={color} roughness={0.4} metalness={0.6} />\r\n </instancedMesh>\r\n \r\n {/* The sci-fi light speed trails */}\r\n <instancedMesh ref={linesRef} args={[undefined, undefined, warpLinesCount]}>\r\n <cylinderGeometry args={[0.08, 0.08, 1, 8]} />\r\n <meshBasicMaterial color=\"#ffffff\" transparent opacity={0} blending={THREE.AdditiveBlending} depthWrite={false} />\r\n </instancedMesh>\r\n </group>\r\n );\r\n}\r\n\r\n// Controls camera movement based on Scroll + Mouse Tracking\r\nfunction CameraController() {\r\n useFrame((state) => {\r\n // 1. SCROLL PARALLAX: moves camera down effectively floating through space as you scroll down\r\n const scrollY = window.scrollY;\r\n // Reduce Y target so the camera doesn't veer off too drastically\r\n const targetY = (-scrollY * 0.005) + (state.pointer.y * 1.5);\r\n \r\n // 2. MOUSE PARALLAX: entire universe tilts slightly opposite to your mouse\r\n const targetX = state.pointer.x * 2;\r\n \r\n // Smooth Lerp\r\n state.camera.position.x += (targetX - state.camera.position.x) * 0.05;\r\n state.camera.position.y += (targetY - state.camera.position.y) * 0.05;\r\n \r\n state.camera.lookAt(0, 0, 0);\r\n });\r\n return null;\r\n}\r\n\r\n// Background Nebula Clouds\r\nexport function NebulaClouds() {\r\n const particleTexture = useMemo(() => {\r\n // Generate a soft radial gradient for the \"cloud\" particle\r\n const canvas = document.createElement('canvas');\r\n canvas.width = 128;\r\n canvas.height = 128;\r\n const ctx = canvas.getContext('2d');\r\n if (ctx) {\r\n const gradient = ctx.createRadialGradient(64, 64, 0, 64, 64, 64);\r\n gradient.addColorStop(0, 'rgba(255,255,255,1)');\r\n gradient.addColorStop(0.3, 'rgba(255,255,255,0.4)');\r\n gradient.addColorStop(0.7, 'rgba(255,255,255,0.05)');\r\n gradient.addColorStop(1, 'rgba(0,0,0,0)');\r\n ctx.fillStyle = gradient;\r\n ctx.fillRect(0, 0, 128, 128);\r\n }\r\n return new THREE.CanvasTexture(canvas);\r\n }, []);\r\n\r\n const count = 400;\r\n \r\n // Use useMemo to generate organic nebula shapes (Perlin/Simplex noise-like clusters)\r\n const { positions1, colors1, positions2, colors2 } = useMemo(() => {\r\n const p1 = new Float32Array(count * 3);\r\n const c1 = new Float32Array(count * 3);\r\n const p2 = new Float32Array(count * 3);\r\n const c2 = new Float32Array(count * 3);\r\n\r\n const baseColor1 = new THREE.Color(\"#4c1d95\"); // Deep Purple\r\n const accentColor1 = new THREE.Color(\"#be185d\"); // Deep Pink\r\n \r\n const baseColor2 = new THREE.Color(\"#1e3a8a\"); // Deep Blue\r\n const accentColor2 = new THREE.Color(\"#0ea5e9\"); // Cyan\r\n\r\n for (let i = 0; i < count; i++) {\r\n // Nebula 1: Large sweeping galactic arm\r\n const angle = Math.random() * Math.PI * 2;\r\n const radius = 10 + Math.random() * 40;\r\n const spreadY = (Math.random() - 0.5) * 15;\r\n p1[i * 3] = Math.cos(angle) * radius + (Math.random()-0.5)*15;\r\n p1[i * 3 + 1] = spreadY + (Math.random()-0.5)*10;\r\n p1[i * 3 + 2] = Math.sin(angle) * radius - 20 + (Math.random()-0.5)*15;\r\n \r\n const mixColor1 = baseColor1.clone().lerp(accentColor1, Math.random());\r\n c1[i * 3] = mixColor1.r;\r\n c1[i * 3 + 1] = mixColor1.g;\r\n c1[i * 3 + 2] = mixColor1.b;\r\n\r\n // Nebula 2: Concentrated core / diffuse background\r\n const angle2 = Math.random() * Math.PI * 2;\r\n const radius2 = Math.random() * 35;\r\n p2[i * 3] = Math.cos(angle2) * radius2 * 1.5;\r\n p2[i * 3 + 1] = (Math.random() - 0.5) * 25;\r\n p2[i * 3 + 2] = Math.sin(angle2) * radius2 - 30;\r\n\r\n const mixColor2 = baseColor2.clone().lerp(accentColor2, Math.random());\r\n c2[i * 3] = mixColor2.r;\r\n c2[i * 3 + 1] = mixColor2.g;\r\n c2[i * 3 + 2] = mixColor2.b;\r\n }\r\n return { positions1: p1, colors1: c1, positions2: p2, colors2: c2 };\r\n }, [count]);\r\n\r\n const groupRef = useRef<THREE.Group>(null);\r\n\r\n useFrame((_, delta) => {\r\n if (groupRef.current) {\r\n // Extremely slow drift of the entire nebula to make it feel alive\r\n groupRef.current.rotation.y += delta * 0.01;\r\n groupRef.current.rotation.z += delta * 0.002;\r\n }\r\n });\r\n\r\n return (\r\n <group ref={groupRef} position={[0, 0, -10]}>\r\n <points>\r\n <bufferGeometry>\r\n <bufferAttribute attach=\"attributes-position\" count={count} args={[positions1, 3]} />\r\n <bufferAttribute attach=\"attributes-color\" count={count} args={[colors1, 3]} />\r\n </bufferGeometry>\r\n <pointsMaterial \r\n size={35} \r\n map={particleTexture} \r\n vertexColors \r\n transparent \r\n opacity={0.08} \r\n depthWrite={false}\r\n depthTest={false} \r\n blending={THREE.AdditiveBlending} \r\n sizeAttenuation={true}\r\n />\r\n </points>\r\n <points rotation={[0.2, 0.5, -0.1]}>\r\n <bufferGeometry>\r\n <bufferAttribute attach=\"attributes-position\" count={count} args={[positions2, 3]} />\r\n <bufferAttribute attach=\"attributes-color\" count={count} args={[colors2, 3]} />\r\n </bufferGeometry>\r\n <pointsMaterial \r\n size={45} \r\n map={particleTexture} \r\n vertexColors \r\n transparent \r\n opacity={0.06} \r\n depthWrite={false}\r\n depthTest={false} \r\n blending={THREE.AdditiveBlending} \r\n sizeAttenuation={true}\r\n />\r\n </points>\r\n </group>\r\n );\r\n}\r\n\r\nexport default function Scene({ \r\n coreColor = \"#312e81\", \r\n particleColor = \"#6366f1\", \r\n particleCount = 150, \r\n particleShape = \"dodecahedron\",\r\n children\r\n}: { \r\n coreColor?: string, \r\n particleColor?: string, \r\n particleCount?: number, \r\n particleShape?: \"dodecahedron\" | \"icosahedron\" | \"box\",\r\n children?: React.ReactNode\r\n}) {\r\n return (\r\n <div className=\"absolute inset-0 w-full h-full z-0 pointer-events-auto bg-[#020205]\">\r\n <Canvas camera={{ position: [0, 0, 12], fov: 45 }} gl={{ alpha: true }}>\r\n <color attach=\"background\" args={['#020205']} />\r\n <React.Suspense fallback={null}>\r\n <ambientLight intensity={0.5} />\r\n <directionalLight position={[10, 10, 5]} intensity={3} color=\"#818cf8\" />\r\n <directionalLight position={[-10, -10, -5]} intensity={2} color=\"#c084fc\" />\r\n \r\n <CameraController />\r\n <BlackHoleCore color={coreColor} />\r\n <AsteroidField count={particleCount} color={particleColor} shape={particleShape} />\r\n <NebulaClouds />\r\n\r\n {/* Render User's Custom 3D/4D Models Here */}\r\n {children}\r\n \r\n {/* Dense Universe Stars & Sparkles */}\r\n <Stars radius={150} depth={100} count={8000} factor={6} saturation={1} fade speed={2} />\r\n <Sparkles count={300} scale={25} size={3} speed={0.2} opacity={0.4} color=\"#818cf8\" />\r\n <Sparkles count={200} scale={20} size={1} speed={0.4} opacity={0.6} color=\"#c084fc\" />\r\n <Sparkles count={100} scale={30} size={6} speed={0.1} opacity={0.2} color=\"#2dd4bf\" />\r\n \r\n <Environment preset=\"city\" />\r\n </React.Suspense>\r\n </Canvas>\r\n </div>\r\n );\r\n}\r\n","\"use client\";\n\nimport React, { useState, useRef, useEffect } from 'react';\n\nexport const Button = ({ \n children, \n variant = 'primary', \n className = '', \n customColor,\n customBg,\n customBorder,\n customRadius,\n customSize,\n style,\n ...props \n}: any) => {\n const base = \"font-medium transition-all duration-300 relative overflow-hidden group active:scale-95 flex items-center justify-center\";\n const sizeClass = customSize === 'sm' ? 'px-4 py-2 text-sm' : customSize === 'lg' ? 'px-8 py-4 text-lg' : 'px-6 py-3';\n \n const customStyles = {\n ...(customColor && { color: customColor }),\n ...(customBg && { backgroundColor: customBg }),\n ...(customBorder && { border: customBorder }),\n ...(customRadius && { borderRadius: customRadius }),\n ...style\n };\n\n if (variant === 'mecha') {\n return (\n <button \n className={`${sizeClass} font-mono font-bold tracking-[0.2em] uppercase text-xs transition-all relative overflow-hidden group active:scale-95 flex items-center justify-center bg-zinc-900 border-l-4 border-l-yellow-500 border-y border-y-zinc-800 border-r border-r-zinc-800 text-zinc-300 hover:text-white hover:bg-zinc-800 hover:border-l-yellow-400 ${className}`}\n style={{ clipPath: \"polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px)\", ...customStyles }}\n {...props}\n >\n <div className=\"absolute inset-0 bg-[repeating-linear-gradient(45deg,transparent,transparent_2px,rgba(255,255,255,0.02)_2px,rgba(255,255,255,0.02)_4px)] pointer-events-none\" />\n <span className=\"relative z-10 flex items-center gap-2\">\n {children}\n </span>\n <div className=\"absolute right-2 bottom-2 w-1.5 h-1.5 bg-yellow-500/50 group-hover:bg-yellow-400\" />\n </button>\n );\n }\n\n const variants = {\n primary: \"bg-white text-black hover:bg-zinc-200 active:bg-zinc-300 hover:shadow-lg rounded-lg\",\n glow: \"bg-indigo-500/20 text-indigo-300 border border-indigo-500/50 hover:bg-indigo-500/40 hover:shadow-[0_0_20px_rgba(99,102,241,0.4)] active:bg-indigo-500/50 rounded-lg\",\n ghost: \"bg-transparent text-zinc-300 hover:bg-white/10 active:bg-white/20 rounded-lg\",\n outline: \"bg-transparent border border-white/20 text-white hover:border-white/60 hover:bg-white/5 active:bg-white/10 rounded-lg\",\n danger: \"bg-rose-500/10 border border-rose-500/50 text-rose-400 hover:bg-rose-500/20 hover:shadow-[0_0_20px_rgba(244,63,94,0.4)] active:bg-rose-500/30 rounded-lg\"\n };\n \n return (\n <button \n className={`${base} ${sizeClass} ${(variants as any)[variant] || variants.primary} ${className}`} \n style={customStyles}\n {...props}\n >\n <span className=\"relative z-10\">{children}</span>\n </button>\n );\n};\n\nexport const TextBox = ({ \n variant = 'default', \n className = '', \n customColor,\n customBg,\n customBorder,\n customRadius,\n style,\n ...props \n}: any) => {\n const base = \"w-full focus:outline-none transition-all\";\n \n const customStyles = {\n ...(customColor && { color: customColor }),\n ...(customBg && { backgroundColor: customBg }),\n ...(customBorder && { border: customBorder }),\n ...(customRadius && { borderRadius: customRadius }),\n ...style\n };\n\n const variants = {\n default: \"bg-[#0a0a0f] border border-white/10 rounded-xl px-4 py-3 text-white placeholder:text-zinc-600 focus:border-indigo-500 focus:ring-1 focus:ring-indigo-500\",\n underline: \"bg-transparent border-b-2 border-white/10 px-0 py-3 text-white placeholder:text-zinc-600 focus:border-indigo-500 rounded-none\",\n glow: \"bg-indigo-500/5 border border-indigo-500/30 rounded-xl px-4 py-3 text-indigo-100 placeholder:text-indigo-500/50 focus:border-indigo-400 focus:shadow-[0_0_20px_rgba(99,102,241,0.2)]\",\n mecha: \"bg-black border border-zinc-800 focus:border-yellow-500 text-yellow-50 font-mono text-sm px-4 py-3 rounded-none placeholder:text-zinc-700 relative z-10 w-full\"\n };\n\n if (variant === 'mecha') {\n return (\n <div className={`relative ${className}`} style={{ ...(customRadius && { borderRadius: customRadius }) }}>\n <div className=\"absolute top-0 left-0 w-2 h-2 border-t-2 border-l-2 border-yellow-500/50 pointer-events-none\" style={{ borderColor: customBorder ? customBorder.split(' ')[2] || customBorder : undefined }} />\n <div className=\"absolute bottom-0 right-0 w-2 h-2 border-b-2 border-r-2 border-yellow-500/50 pointer-events-none\" style={{ borderColor: customBorder ? customBorder.split(' ')[2] || customBorder : undefined }} />\n <input \n className={variants.mecha}\n style={customStyles}\n {...props}\n />\n <div className=\"absolute right-3 top-1/2 -translate-y-1/2 text-[9px] font-mono text-yellow-500/30 pointer-events-none\">[INPUT]</div>\n </div>\n );\n }\n\n return (\n <input \n className={`${base} ${(variants as any)[variant] || variants.default} ${className}`}\n style={customStyles}\n {...props}\n />\n );\n};\n\nexport const Dropdown = ({ options = [], variant = 'default', placeholder = \"Select...\", className = '' }: any) => {\n const [isOpen, setIsOpen] = useState(false);\n const [selected, setSelected] = useState('');\n const dropdownRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const handleClickOutside = (event: MouseEvent) => {\n if (dropdownRef.current && !dropdownRef.current.contains(event.target as Node)) {\n setIsOpen(false);\n }\n };\n document.addEventListener('mousedown', handleClickOutside);\n return () => document.removeEventListener('mousedown', handleClickOutside);\n }, []);\n\n const base = \"w-full transition-all cursor-pointer flex justify-between items-center\";\n const variants = {\n default: \"bg-[#0a0a0f] border border-white/10 rounded-xl px-4 py-3 text-white focus:outline-none focus:border-indigo-500\",\n ghost: \"bg-white/5 border border-transparent rounded-xl px-4 py-3 text-zinc-300 hover:bg-white/10 focus:bg-[#0a0a0f] focus:border-indigo-500\",\n mecha: \"bg-black border border-zinc-800 rounded-none px-4 py-3 text-yellow-50 font-mono text-sm hover:border-yellow-500/50 focus:border-yellow-500 relative\"\n };\n\n return (\n <div className={`relative ${className}`} ref={dropdownRef}>\n {variant === 'mecha' && (\n <>\n <div className=\"absolute top-0 left-0 w-2 h-2 border-t-2 border-l-2 border-yellow-500/50 z-10 pointer-events-none\" />\n <div className=\"absolute bottom-0 right-0 w-2 h-2 border-b-2 border-r-2 border-yellow-500/50 z-10 pointer-events-none\" />\n </>\n )}\n <div \n className={`${base} ${(variants as any)[variant] || variants.default}`}\n onClick={() => setIsOpen(!isOpen)}\n >\n <span className={selected ? 'text-white' : 'text-zinc-500'}>\n {selected || placeholder}\n </span>\n <svg className={`w-4 h-4 text-zinc-500 transition-transform duration-200 ${isOpen ? 'rotate-180' : ''}`} fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M19 9l-7 7-7-7\" />\n </svg>\n </div>\n\n {isOpen && (\n <div className={`absolute z-50 w-full mt-2 overflow-hidden animate-in fade-in slide-in-from-top-2 duration-200 ${variant === 'mecha' ? 'bg-black border border-yellow-500/50 rounded-none shadow-[0_0_20px_rgba(234,179,8,0.1)]' : 'bg-[#0a0a0f] border border-white/10 rounded-xl shadow-[0_10px_40px_-10px_rgba(0,0,0,0.5)]'}`}>\n <div className=\"max-h-60 overflow-y-auto custom-scrollbar\">\n {options.map((opt: string, i: number) => (\n <div \n key={i} \n className={variant === 'mecha' \n ? `px-4 py-3 text-sm cursor-pointer transition-colors font-mono ${selected === opt ? 'bg-yellow-500/20 text-yellow-300 border-l-2 border-yellow-500' : 'text-zinc-400 hover:bg-zinc-900 border-l-2 border-transparent hover:text-white'}`\n : `px-4 py-3 text-sm cursor-pointer transition-colors ${selected === opt ? 'bg-indigo-500/20 text-indigo-300' : 'text-zinc-300 hover:bg-white/10 hover:text-white'}`\n }\n onClick={() => {\n setSelected(opt);\n setIsOpen(false);\n }}\n >\n {opt}\n </div>\n ))}\n </div>\n </div>\n )}\n </div>\n );\n};\n\nexport const Card = ({ \n children, \n variant = 'default', \n className = '', \n customColor,\n customBg,\n customBorder,\n customRadius,\n style,\n ...props \n}: any) => {\n const base = \"transition-all duration-300 relative overflow-hidden\";\n \n const customStyles = {\n ...(customColor && { color: customColor }),\n ...(customBg && { backgroundColor: customBg }),\n ...(customBorder && { border: customBorder }),\n ...(customRadius && { borderRadius: customRadius }),\n ...style\n };\n\n const variants = {\n default: \"p-6 rounded-2xl bg-[#050508] border border-white/10\",\n glow: \"p-6 rounded-2xl bg-indigo-900/10 border border-indigo-500/30 shadow-[0_0_30px_rgba(99,102,241,0.15)]\",\n glass: \"p-6 rounded-2xl bg-white/[0.08] backdrop-blur-xl border border-white/20 shadow-[0_8px_32px_0_rgba(255,255,255,0.05)]\",\n mecha: \"p-8 rounded-none bg-zinc-900/80 border border-zinc-800 backdrop-blur-sm\"\n };\n\n if (variant === 'mecha') {\n return (\n <div className={`${base} ${variants.mecha} ${className}`} style={customStyles} {...props}>\n {/* Mecha Card Accents */}\n <div className=\"absolute top-0 left-0 w-8 h-8 border-t-2 border-l-2 border-yellow-500/50 pointer-events-none\" style={{ borderColor: customBorder ? customBorder.split(' ')[2] || customBorder : undefined }} />\n <div className=\"absolute top-0 right-0 w-8 h-8 border-t-2 border-r-2 border-yellow-500/50 pointer-events-none\" style={{ borderColor: customBorder ? customBorder.split(' ')[2] || customBorder : undefined }} />\n <div className=\"absolute bottom-0 left-0 w-8 h-8 border-b-2 border-l-2 border-yellow-500/50 pointer-events-none\" style={{ borderColor: customBorder ? customBorder.split(' ')[2] || customBorder : undefined }} />\n <div className=\"absolute bottom-0 right-0 w-8 h-8 border-b-2 border-r-2 border-yellow-500/50 pointer-events-none\" style={{ borderColor: customBorder ? customBorder.split(' ')[2] || customBorder : undefined }} />\n \n {/* Warning track background */}\n <div className=\"absolute bottom-0 left-10 right-10 h-[2px] bg-[repeating-linear-gradient(45deg,transparent,transparent_4px,rgba(234,179,8,0.5)_4px,rgba(234,179,8,0.5)_8px)] pointer-events-none\" />\n \n {children}\n </div>\n );\n }\n\n return (\n <div className={`${base} ${(variants as any)[variant] || variants.default} ${className}`} style={customStyles} {...props}>\n {children}\n </div>\n );\n};\n\nexport const Badge = ({ \n children, \n variant = 'primary', \n className = '', \n customColor,\n customBg,\n customBorder,\n customRadius,\n style,\n ...props \n}: any) => {\n const base = \"px-2.5 py-0.5 rounded-full text-xs font-semibold tracking-wider uppercase transition-all\";\n \n const customStyles = {\n ...(customColor && { color: customColor }),\n ...(customBg && { backgroundColor: customBg }),\n ...(customBorder && { border: customBorder }),\n ...(customRadius && { borderRadius: customRadius }),\n ...style\n };\n\n if (variant === 'mecha') {\n return (\n <span className={`px-2 py-1 bg-yellow-500/10 border border-yellow-500/50 text-[#eab308] text-[9px] font-mono font-bold tracking-[0.2em] relative uppercase ${className}`} style={customStyles} {...props}>\n <span className=\"absolute -left-1 flex items-center justify-center top-1/2 -translate-y-1/2 h-full gap-[1px] bg-[#020205] px-[2px]\">\n <span className=\"w-[1px] h-2 bg-yellow-500\" style={{ backgroundColor: customColor || undefined }} />\n <span className=\"w-[1px] h-2 bg-yellow-500\" style={{ backgroundColor: customColor || undefined }} />\n </span>\n <span className=\"pl-1\">{children}</span>\n </span>\n );\n }\n\n const variants = {\n primary: \"bg-indigo-500/20 text-indigo-300 border border-indigo-500/50\",\n success: \"bg-emerald-500/20 text-emerald-300 border border-emerald-500/50\",\n danger: \"bg-rose-500/20 text-rose-300 border border-rose-500/50\",\n outline: \"bg-transparent text-zinc-400 border border-zinc-700\"\n };\n\n return (\n <span className={`${base} ${(variants as any)[variant] || variants.primary} ${className}`} style={customStyles} {...props}>\n {children}\n </span>\n );\n};\n\nexport const Switch = ({ \n checked, \n onChange, \n variant = 'default', \n className = '',\n customColor,\n customBg,\n customBorder,\n customRadius,\n style,\n ...props \n}: any) => {\n const customStyles = {\n ...(customBg && { backgroundColor: customBg }),\n ...(customBorder && { border: customBorder }),\n ...(customRadius && { borderRadius: customRadius }),\n ...style\n };\n\n if (variant === 'mecha') {\n return (\n <div \n className={`w-14 h-6 border-2 border-zinc-700 bg-zinc-900 relative cursor-pointer flex items-center p-0.5 transition-colors ${checked ? 'border-yellow-500/50' : ''} ${className}`} \n onClick={onChange}\n style={customStyles}\n {...props}\n >\n {/* Warning track background */}\n <div className=\"absolute inset-0 bg-[repeating-linear-gradient(45deg,transparent,transparent_4px,rgba(255,255,255,0.02)_4px,rgba(255,255,255,0.02)_8px)] pointer-events-none\" />\n <div \n className={`w-5 h-4 bg-zinc-400 absolute transition-all duration-300 ease-out flex items-center justify-center ${checked ? 'left-[30px] bg-yellow-500 shadow-[0_0_10px_rgba(234,179,8,0.5)]' : 'left-0.5'}`} \n style={{ backgroundColor: checked && customColor ? customColor : undefined, boxShadow: checked && customColor ? `0 0 10px ${customColor}` : undefined }}\n >\n <div className={`w-[2px] h-2 ${checked ? 'bg-black/50' : 'bg-black/20'}`} />\n </div>\n </div>\n );\n }\n\n const base = \"w-11 h-6 rounded-full relative cursor-pointer transition-colors duration-300\";\n const variants = {\n default: checked ? \"bg-white\" : \"bg-zinc-800\",\n glow: checked ? \"bg-indigo-500 shadow-[0_0_15px_rgba(99,102,241,0.5)]\" : \"bg-zinc-800\"\n };\n const thumbBase = \"w-4 h-4 rounded-full absolute top-1 transition-all duration-300\";\n const thumbVariants = {\n default: checked ? \"left-6 bg-black\" : \"left-1 bg-zinc-400\",\n glow: checked ? \"left-6 bg-white\" : \"left-1 bg-zinc-500\"\n };\n\n return (\n <div className={`${base} ${(variants as any)[variant] || variants.default} ${className}`} style={customStyles} onClick={onChange} {...props}>\n <div className={`${thumbBase} ${(thumbVariants as any)[variant] || thumbVariants.default}`} style={{ backgroundColor: checked && customColor ? customColor : undefined }} />\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAO,SAAS,QAAQ,UAAU,SAAS,iBAAiB;AAC5D,SAAS,QAAQ,gBAAgB;AACjC,SAAS,aAAa,UAAU,OAAO,QAAQ,2BAA0C;AACzF,YAAY,WAAW;AA8IjB,SACE,KADF;AA3IN,SAAS,mBAAmB,EAAE,QAAQ,OAAO,WAAW,GAA+D;AACrH,QAAM,QAAQ;AACd,QAAM,UAAU,OAA4B,IAAI;AAEhD,QAAM,QAAQ,QAAQ,MAAM,IAAU,eAAS,GAAG,CAAC,CAAC;AAGpD,QAA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AAI,WAAW,eAAe,UAAU,gBAAgB,aAAa,IAAI;AAAA;AAAA,UAC7E;AAAA;AAAA;AAAA,IACF;AAAA,EAEJ;AAEA,QAAM,OAAO;AACb,QAAM,WAAW;AAAA,IACf,SAAS,UAAU,aAAa;AAAA,IAChC,MAAM,UAAU,yDAAyD;AAAA,EAC3E;AACA,QAAM,YAAY;AAClB,QAAM,gBAAgB;AAAA,IACpB,SAAS,UAAU,oBAAoB;AAAA,IACvC,MAAM,UAAU,oBAAoB;AAAA,EACtC;AAEA,SACE,gBAAAA,KAAC,sCAAI,WAAW,GAAG,IAAI,IAAK,SAAiB,OAAO,KAAK,SAAS,OAAO,IAAI,SAAS,IAAI,OAAO,cAAc,SAAS,YAAc,QAArI,EACC,0BAAAA,KAAC,SAAI,WAAW,GAAG,SAAS,IAAK,cAAsB,OAAO,KAAK,cAAc,OAAO,IAAI,OAAO,EAAE,iBAAiB,WAAW,cAAc,cAAc,OAAU,GAAG,IAC5K;AAEJ;","names":["useState","useRef","useEffect","jsx","jsxs","useState","useRef","useEffect"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spatial-ui-universe",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.ts",