"use client"; import { useEffect, useMemo, useRef } from "react"; import { Canvas, useFrame, useThree } from "@react-three/fiber"; import { PerspectiveCamera } from "@react-three/drei"; import * as THREE from "three"; import { StickerDrop, StickerCamera } from "@/components/canvas/StickerDrop"; import { HelloModel, CursorStar } from "@/components/canvas/GlassModels"; import { useIsMobile } from "@/lib/useIsMobile"; /** * Hero canvas: falling stickers + glass hello/cursor models. * * The glass shader refracts a scene texture rendered into an FBO from layer 1. * BackgroundGrid lives in the DOM (below the canvas), so it can't be refracted; * the FBO pass still captures the sticker particles, giving the glass its * refraction content — the same hierarchy the original achieves with its * "glass hosting section" FBO. */ export function HeroScene() { const isMobile = useIsMobile(); return ( // z-30 keeps it above the BackgroundGrid (z-20) to prevent mix-blend-difference from making it gray