import React from 'react';
import ReactDOM from 'react-dom';
import { Canvas, useFrame, useThree } from '@react-three/fiber';
import { Stars, Text, Float, Sparkles, PerspectiveCamera, Environment } from '@react-three/drei';
import { useRef, useState } from 'react';
import { motion } from 'framer-motion';
// Main 3D Scene Component
function BirthdayScene() {
const meshRef = useRef();
const groupRef = useRef();
const [activeMessage, setActiveMessage] = useState(null);
const { mouse } = useThree();
const messages = [
"Your smile lights up every room",
"19 looks gorgeous on you",
"The world is better with you in it",
"Your kindness is unmatched",
"Forever young at heart",
"A soul as bright as the stars",
"Your laughter is contagious",
"Beautiful inside and out",
"A friend like no other",
"Your creativity inspires me",
"Simply one of a kind",
"The perfect blend of sweet and strong",
"Your energy is magnetic",
"A heart of pure gold",
"Wisdom beyond your years",
"Your spirit shines so bright",
"The definition of amazing",
"A light in everyone's life",
"My favorite person to celebrate"
];
useFrame((state, delta) => {
// Smooth floating animation
meshRef.current.position.y = Math.sin(state.clock.getElapsedTime() * 0.5) * 0.2;
meshRef.current.rotation.y += delta * 0.1;
// Parallax effect
groupRef.current.rotation.x = mouse.y * 0.1;
groupRef.current.rotation.y = mouse.x * 0.1;
});
return (