- Compositions EcosystemeComplet et EcosystemeCourt (src/Ecosysteme.tsx), reprend les composants de NouveauteMind et les sous-titres mot a mot d'ExempleVoix2 - Voix provisoire (dots.tts-soar) generee par le pipeline existant, decoupee et calee par outils-voix/preparer.py - Captures reelles et publiques dans public/ecosysteme - Script et rapport (sources de chaque affirmation, points a valider) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
417 lignes
24 KiB
TypeScript
417 lignes
24 KiB
TypeScript
import React from 'react';
|
|
import {AbsoluteFill, Audio, Easing, Img, Sequence, interpolate, staticFile, useCurrentFrame} from 'remotion';
|
|
import {loadFont} from '@remotion/google-fonts/Inter';
|
|
import {C, Icon, IconBlock, MindUI, Rule, Words, clamp, useSpr} from './NouveauteMind';
|
|
import {PHRASES_ECO, Phrase} from './voixEcosysteme';
|
|
|
|
const {fontFamily} = loadFont('normal', {weights: ['400', '500', '600', '700', '800'], subsets: ['latin']});
|
|
|
|
// « L'écosystème Gastinel » (20/10/2026), versions complète et courte.
|
|
// Script : SCRIPT-ecosysteme-20261020.md ; sources de chaque phrase : RAPPORT-ecosysteme-20261020.md.
|
|
// Voix PROVISOIRE (dots.tts-soar, voix par défaut) ; captures réelles dans public/ecosysteme/.
|
|
export const FPS_ECO = 30;
|
|
const f = (sec: number) => Math.round(sec * FPS_ECO);
|
|
const DATE = '20.10.2026';
|
|
|
|
// ---------- Petits éléments ----------
|
|
const Col: React.FC<{children: React.ReactNode; gap?: number}> = ({children, gap = 44}) => (
|
|
<div style={{display: 'flex', flexDirection: 'column', gap}}>{children}</div>
|
|
);
|
|
|
|
const Small: React.FC<{children: React.ReactNode; delay?: number}> = ({children, delay = 0}) => {
|
|
const p = useSpr(delay, 22);
|
|
return <div style={{fontSize: 40, fontWeight: 600, color: C.soft, opacity: p, transform: `translateY(${(1 - p) * 16}px)`}}>{children}</div>;
|
|
};
|
|
|
|
const Tag: React.FC<{text: string; note?: string}> = ({text, note}) => (
|
|
<div style={{display: 'flex', alignItems: 'center', gap: 16}}>
|
|
<div style={{background: C.jaune, color: C.ink, fontWeight: 800, fontSize: 28, letterSpacing: 5, padding: '8px 16px', border: `3px solid ${C.ink}`, whiteSpace: 'nowrap'}}>{text}</div>
|
|
{note && <span style={{fontSize: 26, fontWeight: 600, color: C.soft}}>{note}</span>}
|
|
</div>
|
|
);
|
|
|
|
/** Capture réelle encadrée (filet noir, ombre pleine de couleur, aucun arrondi), qui se dévoile de gauche à droite. */
|
|
const Capture: React.FC<{src: string; w: number; h: number; accent: string; pos?: string; delay?: number}> = ({src, w, h, accent, pos = 'center', delay = 0}) => {
|
|
const p = useSpr(delay, 20);
|
|
const fr = useCurrentFrame();
|
|
const zoom = interpolate(fr, [delay, delay + 90], [1.06, 1], {...clamp, easing: Easing.out(Easing.cubic)});
|
|
return (
|
|
<div style={{position: 'relative', width: w, height: h}}>
|
|
<div style={{position: 'absolute', inset: 0, transform: 'translate(16px,16px)', background: accent, clipPath: `inset(0 ${(1 - p) * 100}% 0 0)`}} />
|
|
<div style={{position: 'absolute', inset: 0, border: `3px solid ${C.ink}`, overflow: 'hidden', background: '#fff', clipPath: `inset(0 ${(1 - p) * 100}% 0 0)`}}>
|
|
<Img src={staticFile(src)} style={{width: '100%', height: '100%', objectFit: 'cover', objectPosition: pos, transform: `scale(${zoom})`}} />
|
|
</div>
|
|
</div>
|
|
);
|
|
};
|
|
|
|
const Pill: React.FC<{text: string; delay?: number; bg?: string; color?: string; size?: number; icon?: string}> = ({text, delay = 0, bg = C.ink, color = '#fff', size = 64, icon}) => {
|
|
const p = useSpr(delay, 20);
|
|
return (
|
|
<div style={{display: 'flex', alignItems: 'center', gap: 18, background: bg, color, fontSize: size, fontWeight: 800, letterSpacing: -1, padding: '12px 24px', width: 'fit-content', whiteSpace: 'nowrap', border: `3px solid ${C.ink}`, clipPath: `inset(0 ${(1 - p) * 100}% 0 0)`}}>
|
|
{icon && <Icon name={icon} size={size * 0.9} color={color} stroke={2.2} />}
|
|
{text}
|
|
</div>
|
|
);
|
|
};
|
|
|
|
const Stamp: React.FC<{text: string; color?: string; delay?: number; size?: number}> = ({text, color = C.orange, delay = 2, size = 96}) => {
|
|
const p = useSpr(delay, 12);
|
|
return (
|
|
<div style={{fontSize: size, fontWeight: 800, letterSpacing: 4, border: `8px solid ${color}`, color, background: C.bg, padding: '18px 30px', width: 'fit-content', whiteSpace: 'nowrap', transform: `scale(${2 - p}) rotate(-4deg)`, opacity: Math.min(1, p * 1.5)}}>
|
|
{text}
|
|
</div>
|
|
);
|
|
};
|
|
|
|
const Counter: React.FC<{to: number; color: string; dur?: number; delay?: number}> = ({to, color, dur = 24, delay = 2}) => {
|
|
const fr = useCurrentFrame();
|
|
const v = Math.round(interpolate(fr, [delay, delay + dur], [0, to], {...clamp, easing: Easing.out(Easing.cubic)}));
|
|
return <div style={{fontSize: 400, fontWeight: 800, letterSpacing: -20, lineHeight: 0.85, color}}>{v}</div>;
|
|
};
|
|
|
|
const Tile: React.FC<{icon: string; label?: string; delay: number; on?: boolean; accent?: string; size?: number}> = ({icon, label, delay, on, accent = C.bleu, size = 200}) => {
|
|
const p = useSpr(delay, 16);
|
|
return (
|
|
<div style={{display: 'flex', flexDirection: 'column', gap: 14, alignItems: 'flex-start', transform: `scale(${0.4 + 0.6 * p})`, opacity: Math.min(1, p * 2)}}>
|
|
<div style={{width: size, height: size, border: `3px solid ${C.ink}`, background: on ? accent : C.bg, display: 'flex', alignItems: 'center', justifyContent: 'center'}}>
|
|
<Icon name={icon} size={size * 0.56} color={on ? '#fff' : C.ink} stroke={1.8} />
|
|
</div>
|
|
{label && <div style={{fontSize: 40, fontWeight: 800, letterSpacing: -1, whiteSpace: 'nowrap'}}>{label}</div>}
|
|
</div>
|
|
);
|
|
};
|
|
|
|
const Ligne: React.FC<{icon: string; text: string; note?: string; delay: number; accent: string}> = ({icon, text, note, delay, accent}) => {
|
|
const p = useSpr(delay, 18);
|
|
return (
|
|
<div style={{display: 'flex', alignItems: 'center', gap: 30, borderBottom: `1px solid ${C.line}`, paddingBottom: 26, transform: `translateX(${(1 - p) * -80}px)`, opacity: p}}>
|
|
<div style={{width: 120, height: 120, flexShrink: 0, background: accent, border: `3px solid ${C.ink}`, display: 'flex', alignItems: 'center', justifyContent: 'center'}}>
|
|
<Icon name={icon} size={70} color="#fff" stroke={2} />
|
|
</div>
|
|
<div style={{display: 'flex', flexDirection: 'column', gap: 6}}>
|
|
<div style={{fontSize: 60, fontWeight: 800, letterSpacing: -1.5, lineHeight: 1.05}}>{text}</div>
|
|
{note && <div style={{fontSize: 34, fontWeight: 600, color: C.soft}}>{note}</div>}
|
|
</div>
|
|
</div>
|
|
);
|
|
};
|
|
|
|
// ---------- Plans spéciaux ----------
|
|
const MindDemo: React.FC = () => {
|
|
const fr = useCurrentFrame();
|
|
const k = 1.4;
|
|
const hi = interpolate(fr, [56, 64], [0, 1], clamp);
|
|
return (
|
|
<Col gap={30}>
|
|
<Tag text="RÉPONSE RÉELLE" note="posée à Mind · interface reconstituée" />
|
|
<div style={{position: 'relative', width: 640 * k, height: 640 * k}}>
|
|
<div style={{position: 'absolute', inset: 0, transform: 'translate(16px,16px)', background: C.bleu}} />
|
|
<div style={{position: 'absolute', left: 0, top: 0, width: 640, height: 640, transform: `scale(${k})`, transformOrigin: '0 0', border: `3px solid ${C.ink}`, boxSizing: 'content-box', margin: -3}}>
|
|
<MindUI t={{type0: 0, type1: 16, send: 20, status0: 24, ans0: 38, src: 56, ansDur: 14}} />
|
|
</div>
|
|
{fr >= 56 && <div style={{position: 'absolute', left: 90, top: 202, width: 290, height: 40, border: `4px solid ${C.orange}`, opacity: hi}} />}
|
|
</div>
|
|
</Col>
|
|
);
|
|
};
|
|
|
|
const Infra: React.FC = () => {
|
|
const box = (titre: string, note: string, icon: string, delay: number, fill: boolean) => {
|
|
const p = useSpr(delay, 18);
|
|
return (
|
|
<div style={{display: 'flex', alignItems: 'center', gap: 28, border: `3px solid ${C.ink}`, background: fill ? C.ink : C.bg, color: fill ? '#fff' : C.ink, padding: '24px 30px', opacity: p, transform: `translateY(${(1 - p) * 40}px)`}}>
|
|
<Icon name={icon} size={90} color={fill ? '#fff' : C.ink} stroke={2} />
|
|
<div style={{display: 'flex', flexDirection: 'column', gap: 4}}>
|
|
<div style={{fontSize: 56, fontWeight: 800, letterSpacing: -1}}>{titre}</div>
|
|
<div style={{fontSize: 32, fontWeight: 600, opacity: 0.75}}>{note}</div>
|
|
</div>
|
|
</div>
|
|
);
|
|
};
|
|
const trait = (delay: number) => {
|
|
const p = useSpr(delay, 22);
|
|
return <div style={{marginLeft: 70, width: 6, height: 70, background: C.orange, transformOrigin: 'top', transform: `scaleY(${p})`}} />;
|
|
};
|
|
return (
|
|
<Col gap={0}>
|
|
{box('Serveur à la maison', 'dans le Vercors · carte graphique 16 Go', 'serveur', 0, true)}
|
|
{trait(8)}
|
|
{box('Relais HTTPS', 'la porte d’entrée publique', 'cadenas', 12, false)}
|
|
{trait(20)}
|
|
{box('Toi', 'sur ton navigateur', 'utilisateur', 24, false)}
|
|
<div style={{height: 40}} />
|
|
<Small delay={30}>+ sauvegardes chaque nuit</Small>
|
|
</Col>
|
|
);
|
|
};
|
|
|
|
const HubCapture: React.FC<{texte?: boolean}> = ({texte = true}) => (
|
|
<div style={{display: 'flex', gap: 40, alignItems: 'center'}}>
|
|
<Col gap={24}>
|
|
<Tag text="CAPTURE RÉELLE" />
|
|
<Capture src="ecosysteme/hub-accueil.png" w={500} h={1046} accent={C.bleu} pos="top" />
|
|
</Col>
|
|
{texte && (
|
|
<Col gap={30}>
|
|
<Words text="Un seul compte" size={96} delay={6} hl={[1, 2]} accent={C.bleu} />
|
|
<Words text="pour tout." size={96} delay={14} />
|
|
<Small delay={24}>hub.gastinel.me</Small>
|
|
</Col>
|
|
)}
|
|
</div>
|
|
);
|
|
|
|
const Services: React.FC<{stamp?: boolean}> = ({stamp}) => (
|
|
<div style={{position: 'relative'}}>
|
|
<Col gap={50}>
|
|
<div style={{display: 'flex', gap: 40}}>
|
|
<Tile icon="donnees" label="Cloud 2049" delay={0} on accent={C.bleu} size={260} />
|
|
<Tile icon="cadenas" label="VPN" delay={4} on accent={C.bleu} size={260} />
|
|
<Tile icon="chat" label="Mail" delay={8} on accent={C.bleu} size={260} />
|
|
</div>
|
|
<div style={{display: 'flex', gap: 40}}>
|
|
<Tile icon="carte" label="Vector" delay={12} size={170} />
|
|
<Tile icon="code" label="Studio site" delay={15} size={170} />
|
|
</div>
|
|
</Col>
|
|
{stamp && <div style={{position: 'absolute', left: 0, top: 300}}><Stamp text="PAS ENCORE OUVERTS" size={68} /></div>}
|
|
</div>
|
|
);
|
|
|
|
const EnCours: React.FC<{n: number}> = ({n}) => {
|
|
const lignes = [
|
|
{icon: 'ia', text: 'Réentraîner Mind', note: 'réentraînement en cours'},
|
|
{icon: 'meteo', text: 'Un site météo public', note: 'en préparation'},
|
|
{icon: 'bloc', text: 'Saison 1 du serveur', note: 'en préparation'},
|
|
];
|
|
return (
|
|
<Col gap={30}>
|
|
<Tag text="EN COURS" />
|
|
{lignes.slice(0, n).map((l, i) => (
|
|
<Ligne key={l.text} icon={l.icon} text={l.text} note={l.note} delay={i === n - 1 ? 0 : -60} accent={C.orange} />
|
|
))}
|
|
</Col>
|
|
);
|
|
};
|
|
|
|
const Fin: React.FC = () => {
|
|
const p = useSpr(6);
|
|
return (
|
|
<Col gap={50}>
|
|
<Words text="Tout commence sur" size={110} weight={700} />
|
|
<div style={{background: C.ink, color: '#fff', padding: '26px 34px', fontSize: 110, fontWeight: 800, letterSpacing: -3, transformOrigin: 'left', transform: `scaleX(${p})`, whiteSpace: 'nowrap', width: 'fit-content'}}>gastinel.me</div>
|
|
<div style={{display: 'flex', alignItems: 'center', gap: 24}}>
|
|
<Icon name="fleche" size={80} color={C.bleu} stroke={2.4} />
|
|
<Words text="L’écosystème Gastinel" size={64} delay={18} weight={600} color={C.soft} />
|
|
</div>
|
|
</Col>
|
|
);
|
|
};
|
|
|
|
// ---------- Scènes : un ou plusieurs plans par phrase ; `w` = indice du mot (dans le script) où le plan commence ----------
|
|
type Sub = {w: number; chap: string; accent: string; node: React.ReactNode};
|
|
|
|
const scenes = (id: string, court: boolean): Sub[] => {
|
|
switch (id) {
|
|
case 'p01': return [
|
|
{w: 0, chap: 'ÉCOSYSTÈME GASTINEL', accent: C.jaune, node: <Col gap={56}><Capture src="ecosysteme/vercors-drone.webp" w={900} h={520} accent={C.orange} /><Words text="Mon IA tourne sur mon serveur." size={118} delay={4} hl={[1]} accent={C.bleu} /></Col>},
|
|
{w: 7, chap: 'ÉCOSYSTÈME GASTINEL', accent: C.bleu, node: <Col><IconBlock name="montagne" accent={C.bleu} size={230} /><Words text="Dans le Vercors." size={160} delay={4} hl={[2]} accent={C.bleu} /></Col>},
|
|
];
|
|
case 'p02': return [
|
|
{w: 0, chap: 'ÉCOSYSTÈME GASTINEL', accent: C.ink, node: <Words text="Et ce n’est qu’une pièce…" size={140} hl={[4]} accent={C.orange} />},
|
|
{w: 5, chap: 'ÉCOSYSTÈME GASTINEL', accent: C.orange, node: (
|
|
<Col gap={60}>
|
|
<div style={{display: 'grid', gridTemplateColumns: 'repeat(4, 200px)', gap: 33}}>
|
|
{['ia', 'meteo', 'bloc', 'utilisateur', 'code', 'serveur', 'montagne', 'lien'].map((n, i) => <Tile key={n} icon={n} delay={i * 2} on={i === 0} accent={C.orange} />)}
|
|
</div>
|
|
<Words text="L’écosystème Gastinel." size={110} delay={14} hl={[1]} accent={C.orange} />
|
|
</Col>
|
|
)},
|
|
];
|
|
case 'p03': return [
|
|
{w: 0, chap: 'MIND', accent: C.bleu, node: <Col><IconBlock name="ia" accent={C.bleu} size={230} /><Words text="Gastinel Mind" size={160} delay={4} hl={[1]} accent={C.bleu} /><Small delay={14}>mind.gastinel.me</Small></Col>},
|
|
{w: 2, chap: 'MIND', accent: C.jaune, node: <MindDemo />},
|
|
];
|
|
case 'p04': return [
|
|
{w: 0, chap: 'WEATHER STUDIO', accent: C.bleu, node: <Col><IconBlock name="meteo" accent={C.bleu} size={230} /><Words text="Gastinel Weather Studio" size={140} delay={4} hl={[1, 2]} accent={C.bleu} /></Col>},
|
|
{w: 3, chap: 'WEATHER STUDIO', accent: C.jaune, node: <Col gap={40}><Tag text="CAPTURE RÉELLE" note="Gastinel Weather Studio" /><Capture src="ecosysteme/gws-studio.webp" w={900} h={486} accent={C.bleu} /><Words text="Les trous à froid du Vercors." size={96} delay={10} hl={[1, 2, 3]} accent={C.bleu} /></Col>},
|
|
{w: 13, chap: 'WEATHER STUDIO', accent: C.vert, node: <Col><IconBlock name="code" accent={C.vert} size={220} /><Words text="Code libre." size={170} delay={4} hl={[1]} accent={C.vert} /><div style={{display: 'flex', gap: 24}}><Pill text="GPL-3.0" delay={14} size={56} /><Pill text="Rust" delay={18} size={56} bg={C.bg} color={C.ink} /></div></Col>},
|
|
];
|
|
case 'p05': return [
|
|
{w: 0, chap: 'MÉTÉO', accent: C.orange, node: <Col><IconBlock name="vent" accent={C.orange} size={230} /><Words text="La météo en direct" size={140} delay={4} hl={[1]} accent={C.orange} /></Col>},
|
|
{w: 6, chap: 'MÉTÉO', accent: C.orange, node: <Col gap={24}><Counter to={24} color={C.orange} /><Words text="stations" size={130} delay={10} /><Rule delay={14} color={C.orange} h={6} /><Small delay={18}>Vercors · Chartreuse · Belledonne</Small></Col>},
|
|
{w: 9, chap: 'MÉTÉO', accent: C.ink, node: <Col gap={50}><Stamp text="EN INTERNE" /><Words text="Pas encore public." size={96} delay={12} weight={700} color={C.soft} /></Col>},
|
|
];
|
|
case 'p06': return [
|
|
{w: 0, chap: 'MINECRAFT', accent: C.vert, node: <Col gap={40}><Tag text="CAPTURE RÉELLE" note="Minecraft" /><Capture src="ecosysteme/minecraft-jour.jpg" w={900} h={506} accent={C.vert} /><Words text="Un serveur Minecraft" size={120} delay={8} hl={[2]} accent={C.vert} /></Col>},
|
|
{w: 6, chap: 'MINECRAFT', accent: C.vert, node: (
|
|
<Col gap={34}>
|
|
<span style={{fontSize: 32, fontWeight: 700, letterSpacing: 6, color: C.soft}}>MES PROPRES MODS</span>
|
|
<Pill text="Terrains protégés" icon="cadenas" delay={30} size={76} bg={C.vert} />
|
|
<Pill text="Téléportation" icon="fleche" delay={64} size={76} bg={C.vert} />
|
|
<Pill text="Anti-triche" icon="bouclier" delay={88} size={76} bg={C.vert} />
|
|
<Small delay={96}>Accès sur liste blanche pour l’instant.</Small>
|
|
</Col>
|
|
)},
|
|
];
|
|
case 'p07': return [{w: 0, chap: 'HUB', accent: C.bleu, node: <HubCapture />}];
|
|
case 'p08': return [
|
|
{w: 0, chap: 'CODE LIBRE', accent: C.vert, node: <Col><IconBlock name="code" accent={C.vert} size={230} /><Words text="Du code libre" size={160} delay={4} hl={[2]} accent={C.vert} /><Small delay={14}>sur GitHub</Small></Col>},
|
|
{w: 6, chap: 'CODE LIBRE', accent: C.vert, node: (
|
|
<Col gap={30}>
|
|
<Tag text="SUR GITHUB" />
|
|
<Ligne icon="document" text="Gastinel Write" note="éditeur de texte · GPL-3.0" delay={0} accent={C.vert} />
|
|
<Ligne icon="meteo" text="Weather Studio" note="GPL-3.0" delay={8} accent={C.vert} />
|
|
<Ligne icon="bloc" text="Mods Minecraft" note="MIT" delay={16} accent={C.vert} />
|
|
</Col>
|
|
)},
|
|
];
|
|
case 'p09': return [
|
|
{w: 0, chap: 'INFRASTRUCTURE', accent: C.ink, node: <Col><IconBlock name="serveur" accent={C.ink} size={230} /><Words text="Auto-hébergé." size={170} delay={4} hl={[0]} accent={C.orange} /></Col>},
|
|
{w: 4, chap: 'INFRASTRUCTURE', accent: C.orange, node: <Infra />},
|
|
];
|
|
case 'p10': return [
|
|
{w: 0, chap: 'CE QUE JE VISE', accent: C.jaune, node: <Col><div style={{height: 40, width: 420, background: C.jaune}} /><Words text="Ce que je vise ?" size={180} delay={2} hl={[3]} accent={C.orange} /></Col>},
|
|
{w: 4, chap: 'CE QUE JE VISE', accent: C.orange, node: <Col><Words text="Moins dépendre" size={150} hl={[0]} accent={C.orange} /><Words text="des géants du web." size={150} delay={10} /><Rule delay={18} color={C.orange} h={6} /></Col>},
|
|
];
|
|
case 'p11': return court
|
|
? [
|
|
{w: 0, chap: 'CE QUE JE VISE', accent: C.bleu, node: <HubCapture />},
|
|
{w: 6, chap: 'CE QUE JE VISE', accent: C.bleu, node: <Services />},
|
|
{w: 9, chap: 'CE QUE JE VISE', accent: C.orange, node: <Services stamp />},
|
|
]
|
|
: [
|
|
{w: 0, chap: 'CE QUE JE VISE', accent: C.bleu, node: <Words text="Sur le Hub, d’autres services attendent." size={130} hl={[2]} accent={C.bleu} />},
|
|
{w: 6, chap: 'CE QUE JE VISE', accent: C.bleu, node: <Services />},
|
|
{w: 9, chap: 'CE QUE JE VISE', accent: C.orange, node: <Services stamp />},
|
|
];
|
|
case 'p12': return [
|
|
{w: 0, chap: 'CE QUE JE VISE', accent: C.orange, node: <EnCours n={1} />},
|
|
{w: 3, chap: 'CE QUE JE VISE', accent: C.orange, node: <EnCours n={2} />},
|
|
{w: 9, chap: 'CE QUE JE VISE', accent: C.orange, node: <EnCours n={3} />},
|
|
];
|
|
case 'p13': return [
|
|
{w: 0, chap: 'UNE RÈGLE', accent: C.vert, node: <Col><IconBlock name="bouclier" accent={C.vert} size={230} /><Words text="Une règle ne bouge pas." size={140} delay={4} hl={[1]} accent={C.vert} /></Col>},
|
|
{w: 5, chap: 'UNE RÈGLE', accent: C.vert, node: <Words text="Tes données ne servent qu’au service." size={130} hl={[5]} accent={C.vert} />},
|
|
{w: 11, chap: 'UNE RÈGLE', accent: C.ink, node: (
|
|
<Col gap={36}>
|
|
<Pill text="Pas d’entraînement d’IA" icon="croix" delay={0} size={70} bg={C.bg} color={C.ink} />
|
|
<Pill text="Pas de pub" icon="croix" delay={47} size={70} bg={C.bg} color={C.ink} />
|
|
<Small delay={60}>Les données servent au service. Point.</Small>
|
|
</Col>
|
|
)},
|
|
];
|
|
case 'p14': return [
|
|
{w: 0, chap: 'À SUIVRE', accent: C.ink, node: <Col gap={50}><Img src={staticFile('ecosysteme/logo-site.png')} style={{width: 300, height: 300, mixBlendMode: 'multiply'}} /><Words text="C’est l’écosystème Gastinel." size={120} delay={4} hl={[2]} accent={C.bleu} /></Col>},
|
|
{w: 3, chap: 'À SUIVRE', accent: C.bleu, node: <Fin />},
|
|
];
|
|
default: return [];
|
|
}
|
|
};
|
|
|
|
// ---------- Chronologie (calée sur la durée réelle de chaque prise) ----------
|
|
type Plan = {from: number; dur: number; sub: Sub};
|
|
type Bloc = {ph: Phrase; audioFrom: number; plans: Plan[]};
|
|
|
|
const construire = (ids: string[], court: boolean, lead: number, gap: number, tail: number) => {
|
|
const blocs: Bloc[] = [];
|
|
let cursor = 0;
|
|
ids.forEach((id, i) => {
|
|
const ph = PHRASES_ECO.find((p) => p.id === id)!;
|
|
const start = cursor;
|
|
const audioFrom = start + f(i === 0 ? lead : 0);
|
|
const blocEnd = start + f((i === 0 ? lead : 0) + ph.dur + (i === ids.length - 1 ? tail : gap));
|
|
const subs = scenes(id, court);
|
|
const at = (s: Sub) => ph.mots[Math.min(s.w, ph.mots.length - 1)][1];
|
|
const plans = subs.map((s, j) => {
|
|
const from = j === 0 ? start : audioFrom + f(at(s));
|
|
const to = j === subs.length - 1 ? blocEnd : audioFrom + f(at(subs[j + 1]));
|
|
return {from, dur: to - from, sub: s};
|
|
});
|
|
blocs.push({ph, audioFrom, plans});
|
|
cursor = blocEnd;
|
|
});
|
|
return {blocs, total: cursor};
|
|
};
|
|
|
|
const COMPLET = construire(['p01', 'p02', 'p03', 'p04', 'p05', 'p06', 'p07', 'p08', 'p09', 'p10', 'p11', 'p12', 'p13', 'p14'], false, 0.15, 0.35, 1.2);
|
|
const COURT = construire(['p01', 'p02', 'p03', 'p04', 'p06', 'p10', 'p11', 'p14'], true, 0.15, 0.3, 1.2);
|
|
export const TOTAL_ECO_COMPLET = COMPLET.total;
|
|
export const TOTAL_ECO_COURT = COURT.total;
|
|
|
|
// ---------- Habillage ----------
|
|
const Shot: React.FC<{dur: number; accent: string; chap: string; children: React.ReactNode; flash?: boolean}> = ({dur, accent, chap, children, flash}) => {
|
|
const fr = useCurrentFrame();
|
|
const wipe = interpolate(fr, [0, 9], [0, 1], {extrapolateRight: 'clamp', easing: Easing.bezier(0.7, 0, 0.2, 1)});
|
|
const zoom = interpolate(fr, [0, dur], [1, 1.03]);
|
|
return (
|
|
<AbsoluteFill style={{background: C.bg}}>
|
|
<AbsoluteFill style={{transform: `scale(${zoom})`, padding: '170px 90px 560px', justifyContent: 'center'}}>{children}</AbsoluteFill>
|
|
<div style={{position: 'absolute', top: 70, left: 90, right: 90, display: 'flex', justifyContent: 'space-between', fontSize: 30, fontWeight: 600, letterSpacing: 4, color: C.soft}}>
|
|
<span style={{display: 'flex', gap: 14, alignItems: 'center'}}>
|
|
<span style={{width: 18, height: 18, background: accent === C.bg ? C.ink : accent}} />
|
|
{chap}
|
|
</span>
|
|
<span>{DATE}</span>
|
|
</div>
|
|
{flash && <AbsoluteFill style={{background: '#fff', opacity: interpolate(fr, [0, 5], [1, 0], clamp)}} />}
|
|
<div style={{position: 'absolute', inset: 0, background: accent, transform: `translateX(${wipe * 101}%)`}} />
|
|
</AbsoluteFill>
|
|
);
|
|
};
|
|
|
|
/** Sous-titres mot à mot (repris d'ExempleVoix2) : groupes de 3 mots, mot prononcé surligné en jaune. */
|
|
const SousTitres: React.FC<{blocs: Bloc[]}> = ({blocs}) => {
|
|
const fr = useCurrentFrame();
|
|
for (const b of blocs) {
|
|
const ph = b.ph;
|
|
const t = (fr - b.audioFrom) / FPS_ECO;
|
|
if (t < 0 || t > ph.dur + 0.15) continue;
|
|
let cur = ph.mots.findIndex(([, s, e]) => t >= s && t < e);
|
|
if (cur < 0) cur = ph.mots.reduce((a, [, s], k) => (t >= s ? k : a), 0);
|
|
const g0 = Math.floor(cur / 3) * 3;
|
|
const groupe = ph.mots.slice(g0, g0 + 3);
|
|
return (
|
|
<div style={{position: 'absolute', left: 70, right: 70, top: 1440, height: 260, borderTop: `3px solid ${C.ink}`, display: 'flex', alignItems: 'center', justifyContent: 'center', flexWrap: 'wrap', columnGap: 22, rowGap: 6}}>
|
|
{groupe.map(([w, s], k) => (
|
|
<span key={k} style={{fontSize: 68, fontWeight: 800, letterSpacing: -1, padding: '2px 10px', whiteSpace: 'nowrap', background: g0 + k === cur ? C.jaune : 'transparent', color: t >= s ? C.ink : '#b5b5b5'}}>{w}</span>
|
|
))}
|
|
</div>
|
|
);
|
|
}
|
|
return null;
|
|
};
|
|
|
|
const Montage: React.FC<{data: {blocs: Bloc[]; total: number}; musique: boolean}> = ({data, musique}) => {
|
|
const fr = useCurrentFrame();
|
|
const fade = f(1.5);
|
|
return (
|
|
<AbsoluteFill style={{background: C.bg, fontFamily, color: C.ink}}>
|
|
{data.blocs.map((b, i) => (
|
|
<React.Fragment key={b.ph.id}>
|
|
{b.plans.map((p, j) => (
|
|
<Sequence key={j} from={p.from} durationInFrames={p.dur}>
|
|
<Shot dur={p.dur} accent={p.sub.accent} chap={p.sub.chap} flash={i === 0 && j === 0}>{p.sub.node}</Shot>
|
|
</Sequence>
|
|
))}
|
|
<Sequence from={b.audioFrom}>
|
|
<Audio src={staticFile(`voix-ecosysteme/${b.ph.id}.wav`)} />
|
|
</Sequence>
|
|
</React.Fragment>
|
|
))}
|
|
{musique && (
|
|
<Audio
|
|
src={staticFile('musique/hyperflight-racing.wav')}
|
|
volume={(x) => 0.09 * interpolate(x, [0, 6, data.total - fade, data.total], [0.6, 1, 1, 0], clamp)}
|
|
/>
|
|
)}
|
|
<SousTitres blocs={data.blocs} />
|
|
<div style={{position: 'absolute', left: 0, bottom: 0, height: 8, width: `${(fr / data.total) * 100}%`, background: C.ink}} />
|
|
</AbsoluteFill>
|
|
);
|
|
};
|
|
|
|
export const EcosystemeComplet: React.FC<{musique?: boolean}> = ({musique = true}) => <Montage data={COMPLET} musique={musique} />;
|
|
export const EcosystemeCourt: React.FC<{musique?: boolean}> = ({musique = true}) => <Montage data={COURT} musique={musique} />;
|