← AnimalesObjeto 3Dfogon/leon
León
Arrastrá para girarlo// «León» · gpt-6-sol (medium)
// A chunky cartoon lion, horizontal along y, head at the front (-y): a golden yellow body, four strong legs with lighter paws, a big square head surrounded by a huge round fluffy mane in dark orange and brown, a wide muzzle with a dark nose, black dot eyes and small round ears. A long thin tail ending in a dark brown tuft.
const gold = "#e9a928";
const goldLight = "#f5bf43";
const goldDark = "#cd821d";
const paw = "#f9d778";
const maneOrange = "#b95d1f";
const maneBrown = "#87401d";
const maneLight = "#d57929";
// Rounded, chunky body, with a brighter back and a warm belly.
ellipsoid(24, 27, 20, 11, 13, 11, gold);
ellipsoid(24, 28, 25, 9, 10, 5, goldLight);
ellipsoid(24, 28, 13, 8, 9, 3, goldDark);
forEach((x, y, z, color) => {
if ((color === gold || color === goldLight || color === goldDark) && rand() < 0.075)
set(x, y, z, z > 23 ? "#ffd15a" : "#dc9627");
});
// Each leg has its own shoulder or hip pivot.
function leg(name, x, y, speed) {
part(name, [x, y, 16]);
box(x - 3, y - 3, 5, x + 3, y + 3, 16, gold);
ellipsoid(x, y, 11, 3.5, 3.5, 6, gold);
box(x - 3, y - 3, 2, x + 3, y + 3, 7, goldDark);
ellipsoid(x, y - 1, 3, 4, 4, 3, paw);
box(x - 3, y - 4, 0, x + 3, y + 2, 2, paw);
for (let dx of [-2, 0, 2])
box(x + dx, y - 4, 0, x + dx, y - 4, 2, "#e9b952");
animate(name, { type: "swing", axis: "x", speed, amplitude: 0.3 });
part("body");
}
leg("frontLeft", 16, 21, 5);
leg("frontRight", 32, 21, -5);
leg("rearLeft", 16, 34, -5);
leg("rearRight", 32, 34, 5);
// Thin, upturned tail and oversized dark tuft.
part("tail", [24, 38, 24]);
line(24, 38, 24, 24, 42, 26, 1, goldDark);
line(24, 42, 26, 24, 44, 31, 1, goldDark);
ellipsoid(24, 44, 32, 3, 2.5, 4, maneBrown);
ellipsoid(24, 45, 33, 2, 1.5, 3, "#663219");
line(22, 44, 34, 21, 45, 36, 0, maneBrown);
line(26, 44, 34, 27, 45, 36, 0, maneBrown);
animate("tail", { type: "swing", axis: "y", speed: 2, amplitude: 0.3 });
part("body");
// Huge round mane, with little scalloped clumps around its silhouette.
ellipsoid(24, 16, 26, 16, 11, 16, maneOrange);
for (let i = 0; i < 22; i++) {
const a = i * Math.PI * 2 / 22;
const x = 24 + 14 * Math.cos(a);
const z = 26 + 14 * Math.sin(a);
sphere(x, 11 + 1.5 * Math.cos(a * 3), z, 2.7 + rand() * 1.1,
i % 3 === 0 ? maneBrown : maneOrange);
}
forEach((x, y, z, color) => {
if (color !== maneOrange && color !== maneBrown) return;
const n = rand();
if (z < 20 || n < 0.11) set(x, y, z, maneBrown);
else if (z > 30 && n < 0.52) set(x, y, z, maneLight);
else if (n < 0.18) set(x, y, z, "#a9501d");
});
// Small rounded ears peeking out of the mane.
for (let x of [12, 36]) {
sphere(x, 8, 38, 3.5, goldDark);
ellipsoid(x, 5, 38, 2, 1, 2, "#783a20");
ellipsoid(x, 4, 38, 1, 0.5, 1, "#b96942");
}
// Broad, almost square golden face, projecting ahead of the mane.
box(16, 5, 21, 32, 15, 35, gold);
box(18, 4, 22, 30, 6, 34, goldLight);
ellipsoid(16, 9, 28, 3, 5, 7, gold);
ellipsoid(32, 9, 28, 3, 5, 7, gold);
box(18, 4, 33, 30, 10, 35, "#ffd05a");
// Simple shiny dot eyes.
for (let x of [19, 29]) {
ellipsoid(x, 3, 30, 1.5, 1, 2, "#261b16");
set(x - 1, 2, 31, "#ffffff");
}
// Two plump muzzle pads, a dark nose and a tiny smiling mouth.
ellipsoid(21, 3, 24, 5, 3, 3.5, "#ffe09a");
ellipsoid(27, 3, 24, 5, 3, 3.5, "#ffe09a");
ellipsoid(24, 1, 26, 2.5, 1, 1.6, "#39231d");
line(24, 1, 24, 24, 1, 22, 0, "#68412c");
line(24, 1, 22, 22, 2, 21, 0, "#68412c");
line(24, 1, 22, 26, 2, 21, 0, "#68412c");import { draw } from "./assets/voxel";
import { leon } from "./assets/leon";
// En cada cuadro: parado sobre (x, y), el centro de su base.
draw(ctx, leon, x, y, { size: 64, angle: 0, t: performance.now() / 1000 });
// size: lo que mide en px su lado más largo
// angle: giro sobre el piso, en radianes
// t: segundos; si se mueve, se anima solo con eso# En una terminal, en la carpeta del juego
fogon assets add leon
# Con las herramientas de Fogón (conector)
add_assets({ slug: "<tu-juego>", ids: ["leon"] })
# Queda en client/assets/leon.ts
# https://fogon.page/object/leon