youtube/remotion/src/folge08/szene3.tsx
Lara c6ca31402d Gehen ohne rutschende Füße (baukasten/gang.ts, gemessen an den Geh-Clips), Folge 8 „Noas Laterne“ in Arbeit, Lied 1: Pino hüpft wieder nach oben
- gang.ts: Geschwindigkeit aus der Fußbewegung im Clip, Start/Ende mit geschlossenen Füßen, ganze Schritte;
  GangTest als Prüfstand (Stiefel steht 21 Bilder auf ±1 px). Lulus Geh-Clip ist kein Gehen – nicht verschieben.
- Lied 1: huepfer() ist negativ und wurde abgezogen – Pino sank bei jeder Zahl in den Boden.
- folge08: Texte DE/ES/FR, Szene 2–7, Abendgarten mit Hauswand, Laterne mit Sternen/Igel, Wand-Schatten

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 19:50:15 +00:00

100 lines
3.5 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import React from 'react';
import {interpolate, useCurrentFrame} from 'remotion';
import {ClipFigur, Figur, Kamera} from '../baukasten/figur';
import {gang} from '../baukasten/gang';
import {Blende, Vignette, atmen, kamFahrt} from '../baukasten/helfer';
import {Funkeln} from '../baukasten/natur';
import {BODEN} from '../baukasten/orte';
import {Untertitel} from '../baukasten/untertitel';
import {plane} from './plan';
import {Abenddunkel, GartenAbend, Laterne, laterneInNoasHand} from './teile';
// Szene 3: Es wird dunkel. Abendgarten, rechts die Hauswand, Papa winkt im Fenster.
// Noa knipst das Lämpchen an (kein Feuer) und singt den Laternenvers; die Laterne pendelt sanft.
// Pino tippelt zu ihr (baukasten/gang.ts, Füße rutschen nicht). Lulu steht schon an der Hauswand –
// sie geht nicht durchs Bild, weil ihr Geh-Clip kein echtes Gehen ist.
const NOA_X = 760;
const LULU_X = 1640; // rechts vom Fenster, damit Papa zu sehen ist
export const S3 = plane('s3', [
{id: 'bild0', dauer: 3.0},
{id: 'e1', wer: 'ERZ'},
{id: 'klick', dauer: 1.4},
{id: 'e2', wer: 'ERZ'},
{id: 'p1', wer: 'PINO'},
{id: 'v1', wer: 'NOA'},
{id: 'v2', wer: 'NOA'},
{id: 'v3', wer: 'NOA'},
{id: 'v4', wer: 'NOA', pause: 0.6},
{id: 'e3', wer: 'ERZ', pause: 0.8},
{id: 'w1', wer: 'NOA'},
{id: 'w2', wer: 'NOA'},
{id: 'w3', wer: 'NOA'},
{id: 'w4', wer: 'NOA'},
{id: 'bild1', dauer: 1.8},
]);
export const Szene3: React.FC = () => {
const f = useCurrentFrame();
const {z, dauer} = S3;
const an = z.klick.start + 12;
const licht = interpolate(f, [an, an + 8], [0, 1], {extrapolateLeft: 'clamp', extrapolateRight: 'clamp'});
const singt = f >= z.v1.start && f < z.w4.ende;
const schwung = singt ? Math.sin((f - z.v1.start) * 0.09) * 7 : Math.sin(f * 0.05) * 2;
const lat = laterneInNoasHand(NOA_X);
// Pino kommt beim Vers dicht an Noas Stiefel (ganze Schritte, Füße bleiben am Boden)
const PINO = gang('pino', z.v1.start + 6, 300, NOA_X - 120, 2.5);
const kam = kamFahrt(f, [
[0, 1000, 540, 1.0],
[z.bild0.ende, 980, 560, 1.06],
[z.klick.start, 760, 640, 1.55],
[z.e2.ende, 720, 640, 1.7],
[z.p1.start + 6, lat.x, lat.y, 2.3], // „Mein Igel leuchtet!“
[z.p1.ende + 10, 820, 640, 1.35],
[z.w1.start, 900, 600, 1.2],
[dauer, 920, 600, 1.15],
]);
return (
<>
<Kamera {...kam}>
<GartenAbend papaWinkt={f < z.e1.ende ? f * 0.22 : 0} />
<Figur pose={[[0, 'lulu_A5_blick-links'], [z.p1.start, 'lulu_A3_lachen']]} x={LULU_X} y={BODEN - 6} stauchY={atmen(f, 3, 0.006)} />
<Figur
pose={[
[0, 'noa_A_laterne'],
]}
x={NOA_X}
y={BODEN}
stauchY={atmen(f, 2)}
drehung={singt ? Math.sin((f - z.v1.start) * 0.045) * 1.5 : 0}
/>
<Laterne x={lat.x} y={lat.y} s={lat.s} licht={licht} schwung={schwung} stab={false} />
<Funkeln x={lat.x} y={lat.y} start={an} dauer={30} s={0.8} />
{PINO.geht(f) ? (
<ClipFigur name="pino_C1_gehen-schleife" start={PINO.clipStart} tempo={PINO.tempo} schleife spiegeln={PINO.spiegeln} x={PINO.x(f)} y={BODEN} />
) : (
<Figur
pose={[
[0, 'pino_A6_blick-rechts'],
[an, 'pino_A4_staunen'],
[z.v1.start, 'pino_A6_blick-rechts'],
[PINO.ende, 'pino_A3_lachen'],
]}
x={PINO.x(f)}
y={BODEN}
stauchY={atmen(f, 1)}
/>
)}
<Abenddunkel licht={{x: lat.x, y: lat.y}} staerke={0.55 - 0.15 * licht} radius={380 + 260 * licht} />
</Kamera>
<Vignette />
<Untertitel zeilen={S3.liste} />
<Blende dauer={dauer} rein={14} raus={14} />
</>
);
};