Cartoon: mãos, membros e cenários novos; elenco de Noé e a Arca
- Mãos com formas e rotações próprias, membros articulados (limbs) e animais. - Elementos de cenário separados (natureza, construções, interiores) e testes de lugares. - Personagens reaproveitáveis de Noé e a Arca (Noé, esposa, Sem, Cam e Jafé) e a fonte Barlow Semi Condensed. - História noe-e-a-arca: pauta, bíblia, roteiro do ep. 1, tomadas Cartoon e montagem. - Montagem: narração mais corrida (tira silêncios longos) e cabeçalho com o número do vídeo. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -45,6 +45,42 @@ function readJobs(): Job[] {
|
||||
async function still() {
|
||||
const propsFile = arg("props");
|
||||
const out = arg("out");
|
||||
// `--still --spec <trecho.json> --out <png> [--frame N]`: um quadro de um trecho (conferir peças sem gerar o vídeo).
|
||||
// `--still --list <lista.json>` ([{spec, out, frame?}]): vários quadros num empacotamento só (folhas de conferência).
|
||||
const listFile = arg("list");
|
||||
if (listFile) {
|
||||
const list = JSON.parse(fs.readFileSync(resolve(listFile), "utf8")) as { spec: string; out: string; frame?: number }[];
|
||||
const serveUrl = await bundle({ entryPoint: path.join(HERE, "src", "index.ts"), publicDir: path.join(REPO, "assets") });
|
||||
const results: { out: string; frames: number; ms: number }[] = [];
|
||||
for (const item of list) {
|
||||
const t0 = Date.now();
|
||||
const spec = JSON.parse(fs.readFileSync(resolve(item.spec), "utf8")) as ShotSpec;
|
||||
const errors = validateSpec(spec);
|
||||
if (errors.length) throw new Error(`${item.spec}: ${errors.join("; ")}`);
|
||||
const inputProps = spec as unknown as Record<string, unknown>;
|
||||
const composition = await selectComposition({ serveUrl, id: "Shot", inputProps });
|
||||
fs.mkdirSync(path.dirname(resolve(item.out)), { recursive: true });
|
||||
const frame = Math.min(frameCount(spec) - 1, item.frame ?? Math.floor(frameCount(spec) / 2));
|
||||
await renderStill({ composition, serveUrl, inputProps, output: resolve(item.out), frame, imageFormat: "png", browserExecutable: process.env.CARTOON_CHROME || null });
|
||||
results.push({ out: path.relative(REPO, resolve(item.out)).replace(/\\/g, "/"), frames: 1, ms: Date.now() - t0 });
|
||||
}
|
||||
console.log(JSON.stringify({ ok: true, results }));
|
||||
return;
|
||||
}
|
||||
const specFile = arg("spec");
|
||||
if (specFile && out) {
|
||||
const spec = JSON.parse(fs.readFileSync(resolve(specFile), "utf8")) as ShotSpec;
|
||||
const errors = validateSpec(spec);
|
||||
if (errors.length) throw new Error(`spec: ${errors.join("; ")}`);
|
||||
const serveUrl = await bundle({ entryPoint: path.join(HERE, "src", "index.ts"), publicDir: path.join(REPO, "assets") });
|
||||
const inputProps = spec as unknown as Record<string, unknown>;
|
||||
const composition = await selectComposition({ serveUrl, id: "Shot", inputProps });
|
||||
fs.mkdirSync(path.dirname(resolve(out)), { recursive: true });
|
||||
const frame = Math.min(frameCount(spec) - 1, Number(arg("frame") ?? Math.floor(frameCount(spec) / 2)));
|
||||
await renderStill({ composition, serveUrl, inputProps, output: resolve(out), frame, imageFormat: "png", browserExecutable: process.env.CARTOON_CHROME || null });
|
||||
console.log(JSON.stringify({ ok: true, results: [{ out: path.relative(REPO, resolve(out)).replace(/\\/g, "/"), frames: 1, ms: 0 }] }));
|
||||
return;
|
||||
}
|
||||
if (!propsFile || !out) throw new Error("--still precisa de --props e --out");
|
||||
const inputProps = JSON.parse(fs.readFileSync(resolve(propsFile), "utf8")) as Record<string, unknown>;
|
||||
const looks = (inputProps.figures as { look: unknown }[] | undefined) ?? [];
|
||||
|
||||
Reference in New Issue
Block a user