← AnimalesObjeto 3Dfogon/carpincho
Carpincho
Arrastrá para girarlo// «Carpincho» · gpt-6-sol (medium)
// A big chill cartoon capybara, horizontal along y, head at the front (-y): a large barrel-shaped body in warm reddish brown, four short legs, a big blocky head with a flat square muzzle, small round ears, small sleepy eyes and no tail. A small orange sitting on top of its head.
part("body");
const fur = "#ae633e";
const furLight = "#c47b4d";
const furDark = "#8e4b30";
// Long, rounded barrel body.
ellipsoid(24, 28, 18, 14, 16, 12, fur);
forEach((x, y, z, color) => {
if (color !== fur) return;
if (z >= 25) set(x, y, z, rand() < 0.16 ? "#cf8653" : furLight);
else if (z <= 12) set(x, y, z, furDark);
else if (rand() < 0.045) set(x, y, z, "#ba7045");
});
// Big, gently squared-off head at the front.
ellipsoid(24, 12, 23, 12, 11, 11, "#b96e44");
box(17, 5, 19, 31, 16, 29, "#b96e44");
forEach((x, y, z, color) => {
if (color !== "#b96e44") return;
if (z >= 29) set(x, y, z, rand() < 0.12 ? "#d58b56" : "#c67b4b");
else if (z <= 18) set(x, y, z, "#a75a38");
else if (rand() < 0.045) set(x, y, z, "#c57a4a");
});
// Small round ears, with darker inner faces.
for (const x of [13, 35]) {
sphere(x, 12, 32, 3, "#a85a38");
sphere(x, 9, 33, 2, "#d18a55");
set(x, 7, 33, "#8a4935");
}
// Broad, flat, softly rounded muzzle.
ellipsoid(24, 7, 17, 9, 6, 5, "#bd744a");
box(18, 2, 15, 30, 9, 21, "#ce8858");
box(19, 2, 20, 29, 7, 21, "#dfa06b");
box(19, 2, 15, 29, 4, 16, "#b96d46");
// Sleepy dot eyes and low, relaxed eyelids.
for (const x of [18, 30]) {
box(x - 1, 2, 27, x + 1, 3, 27, "#8b4b32");
box(x, 2, 25, x + 1, 3, 26, "#282522");
set(x, 1, 26, "#fff4df");
}
// Square nose and tiny, quiet smile.
box(21, 0, 20, 27, 1, 22, "#51372e");
box(22, 0, 22, 26, 0, 22, "#704638");
box(24, 1, 17, 24, 1, 19, "#754535");
box(21, 1, 16, 23, 1, 16, "#754535");
box(25, 1, 16, 27, 1, 16, "#754535");
// A little orange balanced on the head.
sphere(24, 11, 37, 4, "#f58b20");
forEach((x, y, z, color) => {
if (color === "#f58b20" && z >= 39)
set(x, y, z, rand() < 0.22 ? "#ffb344" : "#fa9b28");
});
box(24, 11, 41, 24, 11, 42, "#548a38");
ellipsoid(26, 11, 41, 2, 1, 1, "#65a746");
// Four separate short walking legs.
function leg(name, x, y, speed) {
part(name, [x, y, 11]);
ellipsoid(x, y, 6, 4, 4, 6, "#a65a38");
box(x - 3, y - 4, 2, x + 3, y + 3, 7, "#ad633d");
box(x - 4, y - 5, 0, x + 4, y + 4, 3, "#925034");
box(x - 3, y - 5, 2, x + 3, y - 4, 3, "#b86b43");
for (const dx of [-2, 0, 2]) {
set(x + dx, y - 5, 0, "#704332");
}
animate(name, { type: "swing", axis: "x", speed, amplitude: 0.2 });
}
leg("front-left", 14, 16, 2);
leg("front-right", 34, 16, -2);
leg("rear-left", 14, 38, -2);
leg("rear-right", 34, 38, 2);import { draw } from "./assets/voxel";
import { carpincho } from "./assets/carpincho";
// En cada cuadro: parado sobre (x, y), el centro de su base.
draw(ctx, carpincho, 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 carpincho
# Con las herramientas de Fogón (conector)
add_assets({ slug: "<tu-juego>", ids: ["carpincho"] })
# Queda en client/assets/carpincho.ts
# https://fogon.page/object/carpincho