Estilo Cartoon (Remotion), personagens reaproveitáveis e hashtags do TikTok
Estilo Cartoon (novo, sem Godot) - Pacote cartoon/ (Remotion 4.0.535): cada trecho é um spec JSON desenhado em React/SVG e renderizado em MP4; render em lote (empacota uma vez) e imagem parada (--still). - Cenas montadas por peças, sem cenário pronto: paletas (noite, sépia, dia, entardecer, cinza), lugar com chão, interno/externo, névoa e 24 peças posicionadas por profundidade, foco de luz e vinheta; etiquetas, onomatopeias, ondas de som, X vermelho, painel do topo e legenda palavra por palavra. - Montagem documental: "Cartoon" como estilo do vídeo e tipo de visual do trecho; plano por regras pelo texto (lugar, objetos, expressão, pose), tempos das palavras pela transcrição do áudio, "Gerar de novo" por trecho, paleta da série e elenco da história. Personagens - Aba Personagens: criar pela descrição, ajustar peça por peça com prévia ao vivo, refinar com o agente (tarefa nova "Personagem"); fichas em assets/characters/ e elenco em stories/<id>/cast.json. O mesmo personagem sai igual em qualquer cena, mudando expressão, pose e objeto na mão. TikTok - Hashtags passam a ser digitadas e confirmadas na lista de sugestões do TikTok Studio (coladas, viravam texto). Diagnóstico de alcance em doc/publicacao/TIKTOK_DIAGNOSTICO.md. Docs: estudo das referências, doc/cartoon/ (personagens e cenas) e skill cenaforge 1.46.0. Testes: painel 77/77, cartoon 5/5, Publicador 87/87. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
// Personagens "de recorte": peças rígidas (cabeça, cabelo, tronco, braços, pernas) que se mexem por inteiro —
|
||||
// sem boca sincronizada, como na referência. Multidão = silhuetas.
|
||||
import React from "react";
|
||||
import { COLORS } from "./colors";
|
||||
import { rng } from "./random";
|
||||
import type { Crowd, Person } from "./spec";
|
||||
|
||||
/** Pessoa em pé num viewBox 200×420; (0,0) do grupo = pés no centro. */
|
||||
export function PersonFigure({ p, frame, fps }: { p: Person; frame: number; fps: number }) {
|
||||
const skin = p.skin ?? "#c98a5e";
|
||||
const outfit = p.outfit ?? "#9b7be0";
|
||||
const hair = p.hairColor ?? "#e8e8ee";
|
||||
const sway = Math.sin(frame / (fps * 0.9)) * 1.5;
|
||||
const arm = p.pointing ? -70 + Math.sin(frame / (fps * 0.5)) * 4 : 6 + Math.sin(frame / fps) * 2;
|
||||
return (
|
||||
<svg viewBox="0 0 200 420" width="100%" height="100%" overflow="visible">
|
||||
<g transform={`rotate(${sway} 100 420)`}>
|
||||
<rect x={74} y={300} width={18} height={115} rx={6} fill={COLORS.ink} />
|
||||
<rect x={108} y={300} width={18} height={115} rx={6} fill={COLORS.ink} />
|
||||
<path d="M60 150 Q100 130 140 150 L156 320 Q100 334 44 320 Z" fill={outfit} />
|
||||
{[0, 1, 2, 3, 4, 5].map((i) => <circle key={i} cx={70 + (i % 3) * 30} cy={190 + Math.floor(i / 3) * 70} r={4} fill="#ffffff" opacity={0.55} />)}
|
||||
<g transform={`rotate(${arm} 142 160)`}>
|
||||
<rect x={136} y={156} width={16} height={110} rx={8} fill={outfit} />
|
||||
<circle cx={144} cy={270} r={10} fill={skin} />
|
||||
</g>
|
||||
<g transform={`rotate(${-6 - Math.sin(frame / fps) * 2} 58 160)`}>
|
||||
<rect x={48} y={156} width={16} height={110} rx={8} fill={outfit} />
|
||||
<circle cx={56} cy={270} r={10} fill={skin} />
|
||||
</g>
|
||||
<rect x={90} y={118} width={20} height={26} fill={skin} />
|
||||
<circle cx={100} cy={92} r={40} fill={skin} />
|
||||
{p.hair === "bun" && <><circle cx={100} cy={46} r={20} fill={hair} /><path d="M60 88 Q100 40 140 88 Q140 64 100 56 Q60 64 60 88" fill={hair} /></>}
|
||||
{(p.hair ?? "short") === "short" && <path d="M58 90 Q60 46 100 48 Q142 46 142 90 Q132 64 100 64 Q70 64 58 90" fill={hair} />}
|
||||
{p.glasses && (
|
||||
<g fill="none" stroke={COLORS.ink} strokeWidth={4}>
|
||||
<circle cx={84} cy={92} r={11} /><circle cx={116} cy={92} r={11} /><line x1={95} y1={92} x2={105} y2={92} />
|
||||
</g>
|
||||
)}
|
||||
<circle cx={84} cy={93} r={4} fill={COLORS.ink} />
|
||||
<circle cx={116} cy={93} r={4} fill={COLORS.ink} />
|
||||
<path d="M88 112 Q100 118 112 112" stroke={COLORS.ink} strokeWidth={4} fill="none" strokeLinecap="round" />
|
||||
</g>
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
|
||||
/** Fila de silhuetas pretas (multidão no portão). */
|
||||
export function CrowdFigure({ c, frame }: { c: Crowd; frame: number }) {
|
||||
const rand = rng(c.count * 31 + 3);
|
||||
const people = Array.from({ length: c.count }, (_, i) => ({ x: (i + 0.5) / c.count, h: 0.8 + rand() * 0.35, p: rand() * 6 }));
|
||||
return (
|
||||
<svg viewBox="0 0 1000 300" width="100%" height="100%" preserveAspectRatio="none" overflow="visible">
|
||||
{people.map((m, i) => {
|
||||
const bob = Math.sin(frame / 14 + m.p) * 3;
|
||||
const x = m.x * 1000;
|
||||
const h = 260 * m.h;
|
||||
return (
|
||||
<g key={i} transform={`translate(${x} ${300 + bob})`} fill="#06070f">
|
||||
<rect x={-26} y={-h * 0.62} width={52} height={h * 0.62} rx={18} />
|
||||
<circle cx={0} cy={-h * 0.75} r={h * 0.13} />
|
||||
</g>
|
||||
);
|
||||
})}
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user