← AnimalesObjeto 3Dfogon/ciervo
Ciervo
Arrastrá para girarlo// «Ciervo» · gpt-6-sol (medium)
// A cartoon deer, horizontal along y, head at the front (-y): a slender light brown body with a white belly and white spots on the back, four thin legs with dark hooves, an elegant head with big ears, black eyes, a black nose and large branching antlers in pale tan. A small white fluffy tail.
const fur = "#bc7940";
const lightFur = "#d99855";
const shade = "#a96538";
const cream = "#fff0d8";
const white = "#fffaf0";
const hoof = "#342b2b";
const antler = "#e7c998";
// Rounded body, with a lighter back and a bold white belly.
ellipsoid(24, 27, 20, 10, 13, 7, fur);
ellipsoid(24, 27, 22, 9, 12, 5, lightFur);
ellipsoid(24, 26, 16, 9, 10, 3, cream);
// A little variation in the large fur surfaces.
forEach((x, y, z, color) => {
if ((color === fur || color === lightFur) && rand() < 0.035) {
set(x, y, z, z > 21 ? "#e2a363" : shade);
}
});
// Upright neck, white bib, and oversized head.
ellipsoid(24, 17, 27, 5, 5, 8, fur);
ellipsoid(24, 14, 25, 3, 3, 7, cream);
ellipsoid(24, 12, 33, 7, 7, 6, lightFur);
ellipsoid(24, 8, 29, 5, 4, 3, cream);
// Wide ears with pink interiors, visible from above.
ellipsoid(14, 14, 35, 6, 3, 2, fur);
ellipsoid(34, 14, 35, 6, 3, 2, fur);
ellipsoid(13, 12, 35, 4, 1, 1, "#e9a394");
ellipsoid(35, 12, 35, 4, 1, 1, "#e9a394");
// Simple dot eyes and a button nose.
sphere(19, 8, 34, 1, "#211d1d");
sphere(29, 8, 34, 1, "#211d1d");
set(19, 7, 35, white);
set(29, 7, 35, white);
ellipsoid(24, 4, 30, 2, 1, 1, "#292324");
// Paired, branching antlers.
for (const side of [-1, 1]) {
const X = n => 24 + side * n;
line(X(4), 12, 38, X(6), 13, 41, 1, antler);
line(X(6), 13, 41, X(11), 14, 43, 1, antler);
line(X(11), 14, 43, X(15), 14, 43, 1, antler);
line(X(15), 14, 43, X(16), 13, 45, 1, antler);
line(X(6), 13, 41, X(6), 11, 45, 1, antler);
line(X(11), 14, 43, X(12), 12, 45, 1, antler);
line(X(4), 12, 38, X(3), 10, 41, 1, "#f3d9a9");
}
// Bright, irregular-looking spots along both sides of the back.
for (const x of [18, 20, 28, 30]) {
for (const y of [22, 26, 30, 34]) {
if ((x + y) % 3 === 0) continue;
const dx = (x - 24) / 10;
const dy = (y - 27) / 13;
const z = Math.round(20 + 7 * Math.sqrt(Math.max(0, 1 - dx * dx - dy * dy)));
sphere(x, y, z, 1, white);
}
}
// Little fluffy tail at the rear.
ellipsoid(24, 40, 24, 3, 3, 3, white);
sphere(23, 42, 25, 1, cream);
sphere(25, 42, 24, 1, cream);
// Each short leg has its own shoulder or hip pivot.
function leg(name, x, y, speed) {
part(name, [x, y, 17]);
ellipsoid(x, y, 12, 2, 2, 5, fur);
cylinder(x, y, 4, 1.5, 7, shade);
box(x - 2, y - 2, 0, x + 1, y + 1, 3, hoof);
box(x - 2, y - 2, 3, x + 1, y + 1, 4, "#574039");
animate(name, { type: "swing", axis: "x", speed, amplitude: 0.3 });
part("body");
}
leg("front-left", 18, 18, 5);
leg("front-right", 30, 18, -5);
leg("rear-left", 18, 34, -5);
leg("rear-right", 30, 34, 5);import { draw } from "./assets/voxel";
import { ciervo } from "./assets/ciervo";
// En cada cuadro: parado sobre (x, y), el centro de su base.
draw(ctx, ciervo, 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 ciervo
# Con las herramientas de Fogón (conector)
add_assets({ slug: "<tu-juego>", ids: ["ciervo"] })
# Queda en client/assets/ciervo.ts
# https://fogon.page/object/ciervo