← GranjaObjeto 3Dfogon/vaca
Vaca
Arrastrá para girarlo// «Vaca» · gpt-6-sol (medium)
// A chunky cartoon dairy cow seen standing, with a clearly HORIZONTAL long body: the torso is a box about twice as long (along y) as it is wide and tall, white with three or four big irregular black patches, standing on four short thick white legs (one at each corner) with dark grey hooves. At the front end (-y) a big square head slightly lower than the back, with a wide pink muzzle covering the lower half of the face with two dark nostrils, black dot eyes, two small cream horns on top and black floppy ears sticking out sideways. A pink udder under the rear belly and a thin rope tail hanging down the back end with a black tuft.
// A chunky dairy cow, facing -y.
const white = "#f8f5e9";
const cream = "#e7e2d4";
const shade = "#d5d3ca";
const black = "#24262b";
// Long, solid torso with a few softened corners and irregular markings.
for (let x = 16; x <= 31; x++) {
for (let y = 12; y <= 40; y++) {
for (let z = 14; z <= 28; z++) {
if ((x === 16 || x === 31) && (y === 12 || y === 40) && z >= 27) continue;
const side = x <= 17 || x >= 30;
const top = z >= 27;
const oval = (cy, cz, ry, rz) =>
((y - cy) / ry) ** 2 + ((z - cz) / rz) ** 2 <
1 + 0.11 * Math.sin(y * 2.3 + z * 1.7);
const patch =
(x <= 18 && oval(20, 23, 5.1, 5.2)) ||
(x <= 18 && oval(34, 21, 4.3, 4.5)) ||
(x >= 29 && oval(25, 23, 5.2, 5.0)) ||
(x >= 30 && oval(36, 24, 3.0, 3.5)) ||
(top && x <= 22 && y >= 18 && y <= 23) ||
(top && x >= 25 && y >= 23 && y <= 28);
let color = z <= 15 ? shade : top ? white : cream;
if (side || top) {
if (patch) color = rand() < 0.16 ? "#34363b" : black;
else if (rand() < 0.075) color = z >= 26 ? "#ffffff" : shade;
}
set(x, y, z, color);
}
}
}
// Broad neck and a big, slightly lower square head.
box(18, 10, 16, 29, 16, 25, cream);
box(17, 5, 16, 30, 14, 27, white);
box(17, 5, 16, 30, 5, 18, shade);
box(18, 4, 19, 29, 5, 26, "#fffdf4");
box(19, 5, 27, 28, 9, 27, "#ffffff");
// Black floppy ears, with a lighter inner edge.
box(11, 8, 23, 17, 12, 26, black);
box(10, 9, 22, 13, 12, 24, "#303238");
box(31, 8, 23, 36, 12, 26, black);
box(35, 9, 22, 38, 12, 24, "#303238");
box(11, 8, 24, 14, 8, 24, "#5a5054");
box(34, 8, 24, 37, 8, 24, "#5a5054");
// Short cream horns and a little forelock.
box(19, 9, 27, 21, 12, 29, "#e9dcb7");
box(20, 10, 30, 21, 11, 31, "#fff0ca");
box(27, 9, 27, 29, 12, 29, "#e9dcb7");
box(27, 10, 30, 28, 11, 31, "#fff0ca");
box(23, 5, 27, 26, 8, 28, black);
set(24, 4, 27, black);
// Friendly eyes on the forward-facing side of the head.
box(19, 4, 23, 21, 4, 25, "#fffdf6");
box(26, 4, 23, 28, 4, 25, "#fffdf6");
box(20, 3, 23, 21, 3, 24, "#191b20");
box(26, 3, 23, 27, 3, 24, "#191b20");
set(20, 2, 24, "#ffffff");
set(26, 2, 24, "#ffffff");
// Wide pink muzzle, with two nostrils and a tiny smile.
box(18, 3, 15, 29, 7, 21, "#eea4ae");
box(19, 2, 16, 28, 3, 20, "#f6b5bc");
box(20, 1, 18, 21, 1, 19, "#80545b");
box(26, 1, 18, 27, 1, 19, "#80545b");
box(22, 1, 16, 25, 1, 16, "#c87987");
// Udder hangs between the rear legs.
box(21, 31, 11, 26, 37, 15, "#f3a4af");
box(22, 32, 9, 23, 34, 11, "#e98e9d");
box(25, 32, 9, 26, 34, 11, "#e98e9d");
box(22, 36, 8, 23, 37, 11, "#e98e9d");
box(25, 36, 8, 26, 37, 11, "#e98e9d");
// Each leg is a separate walking part, hinged at the body.
function leg(name, x0, y0, speed) {
part(name, [x0 + 2, y0 + 2, 15]);
box(x0, y0, 4, x0 + 4, y0 + 5, 15, cream);
box(x0, y0, 11, x0 + 4, y0 + 5, 15, white);
box(x0, y0 - 1, 0, x0 + 4, y0 + 5, 3, "#4b4d50");
box(x0, y0 - 1, 3, x0 + 4, y0 + 5, 3, "#626367");
box(x0, y0 - 1, 0, x0 + 4, y0 - 1, 1, "#34363a");
animate(name, { type: "swing", axis: "x", speed, amplitude: 0.3 });
}
leg("front-left", 17, 15, 5);
leg("front-right", 26, 15, -5);
leg("rear-left", 17, 34, -5);
leg("rear-right", 26, 34, 5);
// Rope tail with a dark, dangling tuft.
part("tail", [24, 40, 24]);
line(24, 40, 24, 24, 42, 20, 1, cream);
line(24, 42, 20, 24, 44, 14, 0, "#d0c9b8");
box(23, 43, 10, 25, 45, 14, black);
box(24, 44, 8, 25, 45, 11, "#303238");
animate("tail", { type: "swing", axis: "y", speed: 1.7, amplitude: 0.38 });
part("body");import { draw } from "./assets/voxel";
import { vaca } from "./assets/vaca";
// En cada cuadro: parado sobre (x, y), el centro de su base.
draw(ctx, vaca, 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 vaca
# Con las herramientas de Fogón (conector)
add_assets({ slug: "<tu-juego>", ids: ["vaca"] })
# Queda en client/assets/vaca.ts
# https://fogon.page/object/vaca