timings and haiku changes

This commit is contained in:
2025-11-29 03:58:18 +05:30
parent c4b44e872a
commit 56de23f153
2 changed files with 10 additions and 7 deletions

View File

@@ -50,9 +50,12 @@ export default function Board({
const [haiku, setHaiku] = useState(getHaiku()); const [haiku, setHaiku] = useState(getHaiku());
const [haikuIndex, setHaikuIndex] = useState(0); const [haikuIndex, setHaikuIndex] = useState(0);
const nextLineIn = 3600;
const allLinesStay = 2400;
const allLinesFade = 1200;
useEffect(() => { useEffect(() => {
const totalTime = 3 * 2400 + 6000 + 2400; const totalTime = haiku.length * nextLineIn + allLinesStay + allLinesFade;
const timer = setTimeout(() => { const timer = setTimeout(() => {
const next = getHaiku(); const next = getHaiku();
@@ -200,11 +203,11 @@ export default function Board({
{haiku.map((line, i) => ( {haiku.map((line, i) => (
<motion.div <motion.div
key={i} key={i}
initial={{ opacity: 0, y: 10 }} initial={{ opacity: 0 }}
animate={{ opacity: 1, y: 0 }} animate={{ opacity: 1 }}
transition={{ transition={{
delay: i * 2.4, // line-by-line stagger timing delay: i * (nextLineIn / 1000),
duration: 10.0, duration: nextLineIn / 1000,
ease: "easeOut", ease: "easeOut",
}} }}
style={{ style={{

View File

@@ -3,7 +3,7 @@ export const HAIKUS: string[][] = [
[ [
"Silence fills the board.", "Silence fills the board.",
"Two minds waiting, both flawless.", "Two minds waiting, both flawless.",
"No move is the win.", "Equilibrium.",
], ],
[ [
"Perfect strategies", "Perfect strategies",
@@ -13,7 +13,7 @@ export const HAIKUS: string[][] = [
[ [
"Victory fades out,", "Victory fades out,",
"When both players see the truth:", "When both players see the truth:",
"Equilibrium.", "No move is the winning move.",
], ],
// // HAIKU STORY SET 2 — AI & Game Theory // // HAIKU STORY SET 2 — AI & Game Theory