← Animals3D assetfogon/pez-payaso
Pez payaso
Drag to turn it// «Pez payaso» · gpt-6-sol (medium)
// A cartoon clownfish, horizontal along y, head at the front (-y): a chubby bright orange body with three thick white bands outlined in black, rounded orange fins with black edges, a big eye and a small mouth. It floats above a small pink sea anemone on the floor.
// Pink sea anemone on the floor
ellipsoid(24, 23, 1, 13, 12, 3, "#d94f91");
ellipsoid(24, 23, 3, 11, 10, 2, "#f477ae");
for (let i = 0; i < 26; i++) {
const a = i * Math.PI * 2 / 26;
const ring = i % 3 === 0 ? 5 : 9;
const x = 24 + Math.cos(a) * ring;
const y = 23 + Math.sin(a) * ring;
const lean = 2 + rand() * 2;
const height = 8 + Math.floor(rand() * 5);
const dark = i % 4 === 0;
line(x, y, 2, x + Math.cos(a) * lean, y + Math.sin(a) * lean, height, 2,
dark ? "#d9539a" : "#f47bab");
sphere(x + Math.cos(a) * lean, y + Math.sin(a) * lean, height, 2,
dark ? "#ed70ae" : "#ff9bc4");
}
// Chubby fish body and oversized head
ellipsoid(24, 22, 26, 11, 14, 9, "#f47720");
ellipsoid(24, 15, 26, 10, 9, 9, "#f47720");
// Subtle warm shading, then three bold, black-bordered bands
forEach((x, y, z, color) => {
if (z < 17 || y < 6 || y > 36 || x < 13 || x > 35) return;
if (z >= 30 && rand() < 0.55) set(x, y, z, "#ff9330");
else if (z <= 22 && rand() < 0.65) set(x, y, z, "#df5b19");
});
forEach((x, y, z) => {
if (z < 17 || y < 7 || y > 36) return;
const wave = Math.round(0.55 * Math.sin(x * 0.48) + 0.35 * Math.cos(z * 0.47));
for (const start of [14, 24, 32]) {
const d = y - (start + wave);
if (d >= 0 && d <= 5) {
set(x, y, z, (d === 0 || d === 5) ? "#242027"
: z >= 29 ? "#ffffff" : "#f2eee4");
break;
}
}
});
// Tall, scalloped dorsal fin with a dark rim
ellipsoid(24, 24, 36, 3, 11, 4, "#272329");
ellipsoid(24, 20, 39, 2, 4, 3, "#272329");
ellipsoid(24, 27, 39, 2, 4, 3, "#272329");
ellipsoid(24, 24, 36, 2, 10, 3, "#f87921");
ellipsoid(24, 20, 39, 1, 3, 2, "#ff9c35");
ellipsoid(24, 27, 39, 1, 3, 2, "#ff9c35");
// Rounded side fins, readable from above
for (const side of [-1, 1]) {
const x = 24 + side * 15;
ellipsoid(x, 22, 24, 5, 5, 2, "#282329");
ellipsoid(x - side, 21, 24, 4, 4, 1, "#f47320");
line(24 + side * 10, 23, 24, x, 21, 24, 1, "#ff9a32");
}
// Small lower fins
for (const x of [19, 29]) {
ellipsoid(x, 27, 18, 3, 4, 2, "#292329");
ellipsoid(x, 26, 18, 2, 3, 1, "#f58527");
}
// Big toy-like eyes on the front of the face
for (const x of [18, 30]) {
ellipsoid(x, 8, 30, 3, 2, 3, "#fff4dc");
ellipsoid(x, 6, 30, 2, 1, 2, "#211d22");
set(x - 1, 5, 31, "#ffffff");
}
// Little puckered mouth
ellipsoid(24, 6, 22, 3, 2, 2, "#ed661c");
box(23, 4, 22, 25, 4, 22, "#3d2728");
box(23, 5, 21, 25, 5, 21, "#ff9a35");
// Tail pivots sideways as the fish swims
part("tail", [24, 36, 26]);
ellipsoid(24, 37, 26, 4, 4, 4, "#282329");
ellipsoid(24, 37, 26, 3, 4, 3, "#f47720");
ellipsoid(24, 42, 26, 9, 4, 7, "#282329");
ellipsoid(24, 42, 26, 8, 3, 6, "#f47720");
ellipsoid(24, 42, 28, 6, 2, 3, "#ff9b34");
animate("tail", { type: "swing", axis: "z", speed: 4, amplitude: 0.35 });
part("body");import { draw } from "./assets/voxel";
import { pezPayaso } from "./assets/pez-payaso";
// Every frame: standing on (x, y), the centre of its base.
draw(ctx, pezPayaso, 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 pez-payaso
# With Fogón's tools (connector)
add_assets({ slug: "<your-game>", ids: ["pez-payaso"] })
# It lands in client/assets/pez-payaso.ts
# https://fogon.page/object/pez-payaso