+
{children}
+ {playing && (
+ <>
+ {/* The modal content has a transform, which would clip a fixed child to the modal. */}
+
+
+
+
{
+ // Child animations bubble up here; only the final collapse ends the scene.
+ if (
+ e.target === e.currentTarget &&
+ e.animationName.includes('collapse')
+ ) {
+ setPlaying(false);
+ }
+ }}
+ >
+ {LINES.slice(0, 2).map(line => (
+
+ ))}
+
+
+
+ >
+ )}
+
+ );
+}
+
+function Line({
+ text,
+ delay,
+ cursor,
+}: {
+ text: string;
+ delay: number;
+ cursor?: boolean;
+}) {
+ return (
+