import React from 'react'; import {interpolate, useCurrentFrame} from 'remotion'; import {Figur} from '../baukasten/figur'; import {Blende, atmen, huepfer, kamFahrt} from '../baukasten/helfer'; import {Blaetterwind, Blume, Funkeln} from '../baukasten/natur'; import {Ort} from '../baukasten/orte'; import {ApfelBild, BlattBild, SternBild} from './bilder'; import {BildKarte, Buehne, FrageKarte, HochUntertitel, Hochformat, Wort} from './hochformat'; import {TEXTE, plane} from './plan'; // Vorlagen für die schnellen Shorts (je ca. 20–30 s): „Wer bin ich?“, „Zähl mit!“, „Welche Farbe?“. // Gleicher Rahmen wie die Lern-Shorts: Frage-Karte oben, Untertitel über den Shorts-Knöpfen. const WIESE = 'linear-gradient(#e9e3d2 0 50%, #93ad5c 50% 100%)'; const t = (k: string) => TEXTE.zeilen[k]; // ---------------------------------------------------------------- Wer bin ich? // Die Figur steht erst als dunkler Umriss da, drei Hinweise (Punkte unter der Frage füllen sich), // Mitmach-Pause, dann wird sie hell und sagt ihren Namen. type Wer = 'pino' | 'noa' | 'lulu'; const WER: Record = { pino: {pose: 'pino_A3_lachen', hoehe: 300, sprecher: 'PINO'}, noa: {pose: 'noa_A3_lachen', hoehe: 520, sprecher: 'NOA'}, lulu: {pose: 'lulu_A3_lachen', hoehe: 600, sprecher: 'LULU'}, }; export const werPlan = (k: string, wer: Wer) => plane(k, [ {id: 'bild0', dauer: 0.8}, {id: 'e1', wer: 'ERZ'}, {id: 'h1', wer: wer.toUpperCase() as 'PINO', pause: 0.5}, {id: 'h2', wer: wer.toUpperCase() as 'PINO', pause: 0.5}, {id: 'h3', wer: wer.toUpperCase() as 'PINO'}, {id: 'e2', wer: 'ERZ', pause: 3}, {id: 'a1', wer: wer.toUpperCase() as 'PINO'}, {id: 'e3', wer: 'ERZ'}, {id: 'bild1', dauer: 1.0}, ]); const Punkte: React.FC<{an: number[]}> = ({an}) => { const f = useCurrentFrame(); return (
{an.map((ab, i) => { const v = interpolate(f, [ab, ab + 8], [0, 1], {extrapolateLeft: 'clamp', extrapolateRight: 'clamp'}); return
; })}
); }; export const WerBinIch: React.FC<{k: string; wer: Wer; plan: ReturnType}> = ({k, wer, plan}) => { const f = useCurrentFrame(); const {z, dauer} = plan; const w = WER[wer]; const hell = interpolate(f, [z.a1.start - 8, z.a1.start + 6], [0, 1], {extrapolateLeft: 'clamp', extrapolateRight: 'clamp'}); return ( 0.5} filter={hell < 1 ? `brightness(${hell}) opacity(${0.82 + 0.18 * hell})` : undefined} /> ); }; // ---------------------------------------------------------------- Zähl mit! // Dinge ploppen nacheinander auf (mit Zahl), dann sagt eine Figur unten etwas dazu. type Ding = 'apfel' | 'blatt' | 'stern'; const ZAHLEN_PLATZ = [ [230, 560], [540, 560], [850, 560], [230, 820], [540, 820], [850, 820], ]; const BLATT_FARBEN = ['#d4522a', '#e9a83a', '#c2412a', '#f0c048', '#b8662a', '#e07a2e']; export const zaehlPlan = (k: string, n: number, sprecher: 'PINO' | 'NOA' | 'LULU') => plane(k, [ {id: 'bild0', dauer: 0.8}, {id: 'e1', wer: 'ERZ', pause: 0.6}, ...Array.from({length: n}, (_, i) => ({id: `c${i + 1}`, wer: 'ERZ' as const, pause: 0.45})), {id: 'e2', wer: 'ERZ'}, {id: 'f1', wer: sprecher}, {id: 'bild1', dauer: 1.0}, ]); export const ZaehlMit: React.FC<{k: string; n: number; ding: Ding; wer: Wer; plan: ReturnType}> = ({k, n, ding, wer, plan}) => { const f = useCurrentFrame(); const {z, dauer} = plan; const w = WER[wer]; return ( {Array.from({length: n}, (_, i) => { const [x, y] = ZAHLEN_PLATZ[i]; const ab = z[`c${i + 1}`].start; return ( {ding === 'apfel' ? : ding === 'stern' ? : } ); })} {/* spielt auch die Stimmen ab */} ); }; // ---------------------------------------------------------------- Welche Farbe? // Drei Fragen nacheinander. „garten“: Apfel, Blume, Blatt als Bildkarte; „freunde“: die Kamera fährt // nah an Pinos Mütze, Lulus Schal und Noas Stiefel. Nach jeder Pause erscheint das Farbwort. export const farbePlan = (k: string, sprecher: 'PINO' | 'NOA' | 'LULU') => plane(k, [ {id: 'bild0', dauer: 0.8}, {id: 'q1', wer: 'ERZ', pause: 2.5}, {id: 'a1', wer: 'ERZ', pause: 0.4}, {id: 'q2', wer: 'ERZ', pause: 2.5}, {id: 'a2', wer: 'ERZ', pause: 0.4}, {id: 'q3', wer: 'ERZ', pause: 2.5}, {id: 'a3', wer: 'ERZ', pause: 0.4}, {id: 'f1', wer: sprecher}, {id: 'bild1', dauer: 1.0}, ]); type FarbWort = {text: string; farbe: string}; export const WelcheFarbeGarten: React.FC<{k: string; worte: FarbWort[]; plan: ReturnType}> = ({k, worte, plan}) => { const f = useCurrentFrame(); const {z, dauer} = plan; const bilder = [, , ]; return ( {[1, 2, 3].map((i) => (
{bilder[i - 1]}
{f < (i < 3 ? z[`q${i + 1}`].start - 6 : z.f1.start) && ( )}
))} {/* zum Schluss alle drei Wörter nebeneinander */} {worte.map((w, i) => ( ))}
); }; // Freunde nebeneinander wie im Größen-Short; die Kamera zeigt nacheinander Mütze, Schal und Stiefel const FREUNDE = {pino: 700, noa: 870, lulu: 1110, y: 815}; export const WelcheFarbeFreunde: React.FC<{k: string; worte: FarbWort[]; plan: ReturnType}> = ({k, worte, plan}) => { const f = useCurrentFrame(); const {z, dauer} = plan; const kam = kamFahrt(f, [ [0, 960, 540, 1.5], [z.q1.start, 960, 540, 1.5], [z.q1.start + 24, FREUNDE.pino + 10, FREUNDE.y - 110, 3.4], // Pinos Mütze [z.a1.frei, FREUNDE.pino + 10, FREUNDE.y - 110, 3.4], [z.q2.start + 24, FREUNDE.lulu - 40, 420, 2.4], // Lulus Schal [z.a2.frei, FREUNDE.lulu - 40, 420, 2.4], [z.q3.start + 24, FREUNDE.noa, FREUNDE.y - 30, 3.2], // Noas Stiefel [z.a3.frei, FREUNDE.noa, FREUNDE.y - 30, 3.2], [z.f1.start + 10, 960, 540, 1.5], [dauer, 960, 540, 1.5], ]); return ( {[1, 2, 3].map((i) => ( ))} ); }; const BlumeBild: React.FC = () => (
);