// TelaAzul: a tela azul de AV (`#0A1F8F`). Uma varredura azul desce de cima em 8 quadros; o texto (VT323, 110 px, branco quente // com aberração) é digitado a 0,8 caractere por quadro com cursor em bloco que pisca a cada 8. Etiqueta "AV 1" no topo. import React from 'react'; import {useCurrentFrame} from 'remotion'; import {COR, FONTE, LARGURA_UTIL, SEGURA, caber, e5, seg} from '../base'; export type TelaAzulProps = {linhas: string[]; rotulo?: string; inicio?: number; y?: number; velocidade?: number; tamanho?: number}; export const TelaAzul: React.FC = ({linhas, rotulo = 'AV 1', inicio = 0, y = 740, velocidade = 0.8, tamanho = 110}) => { const f = useCurrentFrame(); const varre = e5(seg(f, inicio, inicio + 8)); const tam = Math.min(...linhas.map((l) => caber(l.toUpperCase(), tamanho, LARGURA_UTIL, 400, 0, FONTE.apoio.split('"')[1]))); let resta = Math.max(0, (f - inicio - 8) * velocidade); const alt = tam * 1.15; const topo = y - (linhas.length * alt) / 2; return
{rotulo}
{linhas.map((l, i) => { const txt = l.toUpperCase(); const n = Math.max(0, Math.min(txt.length, Math.floor(resta))); resta -= txt.length + 3; const ativa = n < txt.length || i === linhas.length - 1; const cursor = ativa && Math.floor(f / 8) % 2 === 0 && f > inicio + 8; return
{txt.slice(0, n)}{cursor && {' '}}
; })}
; };