// Cartão de personagem (prévia da biblioteca e conferência): um ou mais personagens lado a lado, cada um com // expressão e pose, sobre fundo neutro, com o nome na etiqueta. import React from "react"; import { AbsoluteFill, useCurrentFrame, useVideoConfig } from "remotion"; import { CharacterFigure } from "./CharacterFigure"; import { Grain, TagLabel } from "./overlays"; import { loadFonts } from "./theme"; import type { CharacterLook, Expression, Pose } from "./character"; import type { IconId } from "./spec"; loadFonts(); export type CardProps = { width: number; height: number; background?: string; /** "face": enquadra só a cabeça (conferir expressões de perto). */ framing?: "full" | "face"; figures: { look: CharacterLook; expression?: Expression; pose?: Pose; item?: IconId; label?: string }[]; }; export function CharacterCard({ figures, background = "#2a2e45", framing = "full" }: CardProps) { const frame = useCurrentFrame(); const { fps } = useVideoConfig(); const n = Math.max(1, figures.length); return (
{figures.map((f, i) => (
{f.label &&
3 ? 2.2 : 3.4} />
} {framing === "face" ? (
) : (
)}
))}
); }