All files / web/src/components/toys/number-line/constants/demos gammaDemoNarration.ts

0% Statements 0/125
0% Branches 0/1
0% Functions 0/1
0% Lines 0/125

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126                                                                                                                                                                                                                                                           
/**
 * γ Demo Narration Segments: "The Sharing Slide"
 *
 * Pure data file — no React. Each segment maps a revealProgress range
 * to a TTS utterance and a minimum animation duration.
 *
 * Progress ranges are derived from gammaDemo.ts's PHASE constants:
 *
 *   Seg 0  0.00–0.10  One friend, one whole cookie
 *   Seg 1  0.10–0.20  Two friends share
 *   Seg 2  0.20–0.34  Three friends + "what about in-between?"
 *   Seg 3  0.34–0.48  The sharing slide emerges
 *   Seg 4  0.48–0.57  Highlight the extra bits (crescents)
 *   Seg 5  0.57–0.65  Rapid cascade of more friends
 *   Seg 6  0.65–0.86  Collect the crescents into the gamma bar
 *   Seg 7  0.86–1.00  The reveal of gamma
 */

import type { DemoNarrationSegment } from './useConstantDemoNarration'

/** Shared voice direction for the γ demo narrator. */
export const GAMMA_DEMO_TONE =
  'You are a warm, playful math guide for a really smart 5-year-old. ' +
  'Ground everything in sharing cookies and playground slides. ' +
  'Build wonder gradually — start simple, let curiosity grow. ' +
  'Be genuinely amazed when the extras converge.'

export const GAMMA_DEMO_SEGMENTS: DemoNarrationSegment[] = [
  // ── One friend ──────────────────────────────────────────────────
  {
    ttsText:
      'Imagine sharing a yummy cookie! ' +
      "If there's just one friend, they get the whole thing. " +
      'One friend, one whole cookie!',
    startProgress: 0.0,
    endProgress: 0.1,
    animationDurationMs: 5000,
    scrubberLabel: 'One whole cookie',
  },

  // ── Two friends ─────────────────────────────────────────────────
  {
    ttsText:
      'Now two friends want to share. ' +
      'Each one gets half — see how the step is shorter? ' +
      'More friends means smaller pieces!',
    startProgress: 0.1,
    endProgress: 0.2,
    animationDurationMs: 5500,
    scrubberLabel: 'Two friends share',
  },

  // ── Three friends + the question ────────────────────────────────
  {
    ttsText:
      'With three friends, each gets a third. ' +
      'But wait — what about one-and-a-half friends? ' +
      'Or two-and-a-quarter? What if sharing could be perfectly smooth?',
    startProgress: 0.2,
    endProgress: 0.34,
    animationDurationMs: 7000,
    scrubberLabel: 'Three friends',
  },

  // ── The slide emerges ───────────────────────────────────────────
  {
    ttsText:
      'This is the sharing slide! ' +
      'It shows the perfect share for any number of friends. ' +
      'Smooth and gentle, just like a playground slide — steep at the top, gentle at the bottom.',
    startProgress: 0.34,
    endProgress: 0.48,
    animationDurationMs: 7000,
    scrubberLabel: 'The sharing slide',
  },

  // ── The extra bits ──────────────────────────────────────────────
  {
    ttsText:
      'See those golden bits? ' +
      'The blocky steps are always a teeny bit taller than the smooth slide. ' +
      'Each step pokes up just a little!',
    startProgress: 0.48,
    endProgress: 0.57,
    animationDurationMs: 5500,
    scrubberLabel: 'The extra bits',
  },

  // ── Rapid cascade ───────────────────────────────────────────────
  {
    ttsText:
      'More friends means tinier extras. ' +
      'Four friends, five, six, seven, eight, nine, ten! ' +
      'The extras get tinier and tinier.',
    startProgress: 0.57,
    endProgress: 0.65,
    animationDurationMs: 5000,
    scrubberLabel: 'More friends',
  },

  // ── Collection ──────────────────────────────────────────────────
  {
    ttsText:
      "Now let's collect all those little extra bits and line them up! " +
      'The big ones go first, then the smaller ones. ' +
      'See how the bar grows fast at first, then slower and slower?',
    startProgress: 0.65,
    endProgress: 0.86,
    animationDurationMs: 8000,
    scrubberLabel: 'Collecting extras',
  },

  // ── The reveal ──────────────────────────────────────────────────
  {
    ttsText:
      'All those tiny extras add up to a very special number. ' +
      'Mathematicians call it gamma! ' +
      "It's about zero point five seven seven, and it pops up all over mathematics — " +
      'whenever sharing and smoothness play together.',
    startProgress: 0.86,
    endProgress: 1.0,
    animationDurationMs: 7000,
    scrubberLabel: "It's gamma!",
  },
]