/* Aifit — circular "Life Platform" navigator (interactive). 8 services on a ring around the Aifit core; selecting a node swaps the center panel to that service. Entrance is JS-gated so the visible end-state is the resting style (robust to frozen timeline / print). Exposes window.Platform */ (function () { const { useState, useEffect } = React; const Icon = window.Icon; const R = 39; // ring radius in 0–100 coords function nodePos(i, n) { const a = (-90 + (360 / n) * i) * (Math.PI / 180); return [50 + R * Math.cos(a), 50 + R * Math.sin(a)]; } function Platform({ nodes, selected, onSelect }) { const [drawn, setDrawn] = useState(false); const cur = nodes.find((x) => x.key === selected); useEffect(() => { setDrawn(false); let r = requestAnimationFrame(() => (r = requestAnimationFrame(() => setDrawn(true)))); const t = setTimeout(() => setDrawn(true), 120); return () => { cancelAnimationFrame(r); clearTimeout(t); }; }, []); const circ = 2 * Math.PI * R; return (
Life Platform
想いをつなぐ