- {text}
+ {(() => {
+ let wordCounter = 0;
+ return lines.map((line, lineIdx) => {
+ const tokens = line.split(/(\s+)/).filter((w) => w.length > 0);
+ return (
+
+ {tokens.map((w, ti) => {
+ if (/^\s+$/.test(w)) {
+ return ;
+ }
+ const startFrame = wordCounter * staggerFrames;
+ wordCounter += 1;
+ const wordOpacity = interpolate(
+ frame,
+ [startFrame, startFrame + wordFadeFrames],
+ [0, 1],
+ { extrapolateLeft: "clamp", extrapolateRight: "clamp" },
+ );
+ const blur = interpolate(
+ frame,
+ [startFrame, startFrame + wordFadeFrames],
+ [6, 0],
+ { extrapolateLeft: "clamp", extrapolateRight: "clamp" },
+ );
+ const ty = interpolate(
+ frame,
+ [startFrame, startFrame + wordFadeFrames],
+ [14, 0],
+ { extrapolateLeft: "clamp", extrapolateRight: "clamp" },
+ );
+ return (
+
+ {w}
+
+ );
+ })}
+
+ );
+ });
+ })()}
+
+ {/* Subtle accent dot centered under text */}
+