"use client"; import { useRef } from "react"; import { Canvas, useFrame } from "@react-three/fiber"; import { Float, Stars } from "@react-three/drei"; import * as THREE from "three"; type OrbProps = { position: [number, number, number]; scale: number; color: string; speed: number; }; function Orb({ position, scale, color, speed }: OrbProps) { const meshRef = useRef(null); useFrame(({ clock }) => { const mesh = meshRef.current; if (!mesh) { return; } const t = clock.getElapsedTime() * speed; mesh.position.y = position[1] + Math.sin(t) * 0.2; mesh.rotation.x = t * 0.2; mesh.rotation.y = t * 0.28; }); return ( ); } function AccentPlane() { const planeRef = useRef(null); useFrame(({ clock }) => { const mesh = planeRef.current; if (!mesh) { return; } mesh.rotation.z = Math.sin(clock.getElapsedTime() * 0.08) * 0.1; }); return ( ); } export function ThreeBackdrop() { return ( ); }