// SNIGDHA — main composition const { useEffect, useMemo, useRef, useState } = React; function App() { const data = window.SNIGDHA_DATA; const [open, setOpen] = useState(null); // active artwork const [accent, setAccent] = useState("#a8825a"); const [loaded, setLoaded] = useState(false); const [scrollPct, setScrollPct] = useState(0); // ambient accent — shifts with hovered tile useEffect(() => { document.documentElement.style.setProperty("--accent", accent); }, [accent]); // loading reveal useEffect(() => { const id = setTimeout(() => setLoaded(true), 1200); return () => clearTimeout(id); }, []); // scroll progress useEffect(() => { const onScroll = () => { const max = document.documentElement.scrollHeight - window.innerHeight; setScrollPct(max > 0 ? window.scrollY / max : 0); }; window.addEventListener("scroll", onScroll, { passive: true }); onScroll(); return () => window.removeEventListener("scroll", onScroll); }, []); const accentTo = (hex) => setAccent(hex); const featured = useMemo(() => data.artworks.filter(a => a.featured), [data]); return (
); } function Loader({ visible }) { return (
SNIGDHA
composing surfaces · loading studio
); } function Nav({ scrollPct }) { return ( ); } // Faux AR room — wall, mounted artwork in perspective, ambient floor function ArRoom({ accent, piece }) { const [pos, setPos] = useState({ x: 50, y: 42, scale: 1 }); if (!piece) return null; return (
SCALE1 : 1
WALLlocked
LIGHTauto
X setPos(p=>({...p, x: +e.target.value}))} style={{ accentColor: accent }} />
Y setPos(p=>({...p, y: +e.target.value}))} style={{ accentColor: accent }} />
SIZE setPos(p=>({...p, scale: +e.target.value/100}))} style={{ accentColor: accent }} />
); } ReactDOM.createRoot(document.getElementById("root")).render();