← Animals3D assetfogon/pavo-real
Pavo real
Drag to turn it// «Pavo real» · gpt-6-sol (medium)
// A cartoon peacock standing facing front (-y): a bright blue body and neck, a little crest on its head, and a huge fanned tail rising behind it in green with many eye spots in blue, gold and teal, spread wide along x.
// Tail fan: a single swaying part behind the peacock.
part("tail", [24, 29, 10]);
const featherCount = 11;
const angleStep = 2.5 / (featherCount - 1);
for (let x = 3; x <= 45; x++) {
for (let z = 10; z <= 44; z++) {
const dx = (x - 24) / 20;
const dz = (z - 11) / 32;
const r = Math.sqrt(dx * dx + dz * dz);
const angle = Math.atan2(dx, dz);
if (z < 11 || Math.abs(angle) > 1.29) continue;
const nearest = Math.round(angle / angleStep) * angleStep;
const scallop = Math.cos((angle - nearest) * Math.PI / angleStep);
const edge = 0.965 + 0.045 * scallop;
if (r > edge) continue;
for (let y = 29; y <= 31; y++) {
let color = y === 31 ? "#218c45" : "#32bd53";
if (r > edge - 0.065) color = "#177b3e";
else if (r > 0.36 && rand() < 0.12) color = "#46cb5a";
set(x, y, z, color);
}
// Slim, radiating feather shafts on the visible front.
if (r > 0.19 && r < 0.87 &&
Math.abs(angle - nearest) < 0.025) {
set(x, 28, z, r > 0.55 ? "#83dc55" : "#48a84b");
}
}
}
// Bold, layered eyespots, one near the tip of each feather.
for (let i = -5; i <= 5; i++) {
const a = i * angleStep;
const reach = i % 2 === 0 ? 0.81 : 0.84;
const cx = 24 + 20 * reach * Math.sin(a);
const cz = 11 + 32 * reach * Math.cos(a);
for (let x = Math.floor(cx - 3); x <= Math.ceil(cx + 3); x++) {
for (let z = Math.floor(cz - 4); z <= Math.ceil(cz + 4); z++) {
const d = ((x - cx) / 2.75) ** 2 + ((z - cz) / 3.55) ** 2;
if (d <= 1) set(x, 28, z, "#126f46");
if (d <= 0.73) set(x, 27, z, "#f8c947");
if (d <= 0.43) set(x, 26, z, "#18bea7");
if (d <= 0.19) set(x, 25, z, "#1854a8");
}
}
}
animate("tail", { type: "swing", axis: "y", speed: 1, amplitude: 0.08 });
part("body", [24, 23, 13]);
// Little orange legs and broad, three-toed feet.
for (const x of [21, 27]) {
box(x - 1, 20, 2, x + 1, 22, 7, "#df8425");
box(x - 1, 16, 0, x + 1, 22, 2, "#f7a932");
for (const toe of [-2, 0, 2]) {
box(x + toe, 13, 0, x + toe, 18, 1, "#ffb438");
}
}
// Plump blue body, with a lighter chest facing the viewer.
ellipsoid(24, 22, 14, 8, 7, 9, "#0876cf");
ellipsoid(24, 18, 15, 6, 3, 7, "#168ee4");
ellipsoid(24, 16, 16, 4, 1, 5, "#32aaf1");
// Rounded wings.
ellipsoid(17, 22, 16, 3, 4, 5, "#075cae");
ellipsoid(31, 22, 16, 3, 4, 5, "#075cae");
ellipsoid(16, 19, 17, 2, 2, 3, "#2299e4");
ellipsoid(32, 19, 17, 2, 2, 3, "#2299e4");
// Upright neck and oversized toy-like head.
ellipsoid(24, 19, 25, 3, 4, 8, "#087bd6");
ellipsoid(24, 16, 25, 2, 2, 6, "#26a5ee");
ellipsoid(24, 18, 32, 5, 5, 5, "#087bd6");
ellipsoid(24, 15, 33, 4, 2, 3, "#168fe3");
// Simple, widely spaced dot eyes with tiny white glints.
for (const x of [21, 27]) {
ellipsoid(x, 12, 33, 1, 1, 1, "#10243b");
set(x, 11, 34, "#ffffff");
}
// Short, cheerful golden beak.
box(23, 11, 29, 25, 13, 30, "#f9bd39");
box(24, 9, 29, 24, 11, 29, "#eb922b");
set(24, 9, 28, "#d97722");
// Three bobbles on thin crest stalks.
for (const [x, top] of [[21, 39], [24, 41], [27, 39]]) {
line(24, 18, 36, x, 18, top - 1, 0, "#075cae");
sphere(x, 18, top, 1, "#31b9f0");
}import { draw } from "./assets/voxel";
import { pavoReal } from "./assets/pavo-real";
// Every frame: standing on (x, y), the centre of its base.
draw(ctx, pavoReal, x, y, { size: 64, angle: 0, t: performance.now() / 1000 });
// size: its longest side, in px
// angle: turn on the floor, in radians
// t: seconds; if it moves, that animates it# In a terminal, in the game's folder
fogon assets add pavo-real
# With Fogón's tools (connector)
add_assets({ slug: "<your-game>", ids: ["pavo-real"] })
# It lands in client/assets/pavo-real.ts
# https://fogon.page/object/pavo-real