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

View File

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