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:
+43
-13
@@ -4,6 +4,9 @@ import React from "react";
|
||||
import { COLORS } from "./colors";
|
||||
import { rng } from "./random";
|
||||
import type { Crowd, Person } from "./spec";
|
||||
import type { CharacterLook } from "./character";
|
||||
import { CharacterFigure } from "./CharacterFigure";
|
||||
import { evaluate } from "./motion";
|
||||
|
||||
/** 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 }) {
|
||||
@@ -44,23 +47,50 @@ export function PersonFigure({ p, frame, fps }: { p: Person; frame: number; fps:
|
||||
);
|
||||
}
|
||||
|
||||
/** Fila de silhuetas pretas (multidão no portão). */
|
||||
export function CrowdFigure({ c, frame }: { c: Crowd; frame: number }) {
|
||||
const SKINS = ["#f1c7a3", "#e0b48f", "#d09a70", "#c08055", "#a8704a", "#8d5a3b", "#6e4630"];
|
||||
const HAIRS = ["#2a1e16", "#3a2a1e", "#6b4226", "#c9c9cf", "#e8c35a", "#1e1612", "#8a8a92"];
|
||||
const CLOTHES = ["#3f6b8a", "#c8443a", "#5b6b3a", "#e8b13a", "#7a5ce0", "#2f6db3", "#d98a5c", "#4f7a4a", "#8a6f9e", "#56704a", "#e9ecef"];
|
||||
const pick = <T,>(r: () => number, list: readonly T[]): T => list[Math.floor(r() * list.length) % list.length];
|
||||
|
||||
/** Aparência sorteada de quem está na multidão: cada um diferente (cabeça, altura, cabelo, roupa, acessório). */
|
||||
export function crowdLook(seed: number): CharacterLook {
|
||||
const r = rng(seed * 7919 + 17);
|
||||
const female = r() < 0.45;
|
||||
const old = r() < 0.25;
|
||||
const hairStyle = female ? pick(r, ["long", "bun", "curly", "side"] as const) : pick(r, ["short", "side", "bald", "curly", "spiky", "cap"] as const);
|
||||
const top = pick(r, female ? (["shirt", "dress", "hoodie", "jacket"] as const) : (["shirt", "jacket", "hoodie", "uniform", "shirt"] as const));
|
||||
const acc: NonNullable<CharacterLook["accessories"]> = [];
|
||||
const roll = r();
|
||||
if (!female && roll < 0.14) { acc.push("helmet", "vest"); } else if (roll < 0.22) acc.push("scarf"); else if (roll < 0.3) acc.push("watch");
|
||||
return {
|
||||
build: pick(r, ["slim", "average", "average", "heavy"] as const), height: 0.86 + r() * 0.26, skin: pick(r, SKINS),
|
||||
hair: { style: hairStyle, color: old ? "#c9c9cf" : pick(r, HAIRS) },
|
||||
beard: { style: female ? "none" : pick(r, ["none", "none", "stubble", "mustache", "full", "goatee"] as const), color: old ? "#b0b0b8" : pick(r, HAIRS) },
|
||||
glasses: r() < 0.22 ? pick(r, ["round", "square"] as const) : "none", brows: r() < 0.5 ? "thick" : "thin",
|
||||
top: { style: top, color: pick(r, CLOTHES), accent: pick(r, CLOTHES) }, bottom: { style: female && r() < 0.3 ? "skirt" : "pants", color: pick(r, ["#2c3346", "#3a3f4a", "#5a4a3a", "#2b3a5a"]) },
|
||||
shoes: pick(r, ["#1d1d24", "#5a3a22", "#f2f2f2"]), head: pick(r, ["round", "oval", "square", "wide"] as const), nose: pick(r, ["curve", "round", "button", "wide", "long"] as const),
|
||||
lids: 0.1 + r() * 0.35, wrinkles: old ? 0.6 : 0, belly: !female && r() < 0.2, ...(acc.length ? { accessories: acc, accessoryColor: acc[0] === "helmet" ? "#f2a31a" : undefined } : {}),
|
||||
};
|
||||
}
|
||||
|
||||
/** Multidão: pessoas desenhadas com o mesmo traço dos personagens, cada uma diferente, em duas fileiras. */
|
||||
export function CrowdFigure({ c, frame, fps = 30 }: { c: Crowd; frame: number; fps?: 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 }));
|
||||
const people = Array.from({ length: c.count }, (_, i) => ({ i, x: (i + 0.5) / c.count + (rand() - 0.5) * 0.04, back: i % 2 === 1, p: rand() * 6 }))
|
||||
.sort((a, b) => Number(b.back) - Number(a.back));
|
||||
const t = frame / fps;
|
||||
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;
|
||||
<div style={{ position: "absolute", inset: 0 }}>
|
||||
{people.map((m) => {
|
||||
const h = m.back ? 78 : 92;
|
||||
const st = evaluate({ x: 0, expression: pick(rng(m.i + 5), ["neutral", "smile", "happy", "neutral", "smirk", "surprised"] as const) }, t, 3600, m.i * 7 + 3);
|
||||
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>
|
||||
<div key={m.i} style={{ position: "absolute", left: `${m.x * 100 - h * 0.11}%`, bottom: `${(m.back ? 8 : 0) + Math.sin(t * 2 + m.p) * 0.4}%`, height: `${h}%`, aspectRatio: "200 / 440",
|
||||
filter: m.back ? "brightness(0.82)" : undefined }}>
|
||||
<CharacterFigure look={crowdLook(m.i + c.count * 13)} t={t} state={st} shadeSide={1} />
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
</svg>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user