← Animals3D assetfogon/guanaco
Guanaco
Drag to turn it// «Guanaco» · gpt-6-sol (medium)
// A cartoon guanaco, horizontal along y, head at the front (-y): a slim body with reddish-brown back and white belly, long thin legs, a long upright neck, a grey face with black eyes and pointed ears and a short tail.
const chestnut = "#a94e2b";
const russet = "#bc6035";
const sunlit = "#cf7743";
const shadow = "#884127";
const cream = "#f3e6c9";
const warmWhite = "#fff3dd";
const grey = "#a9aaa5";
const greyLight = "#c7c7bd";
const dark = "#292729";
function furColor(z, top, middle, low) {
let c = z > top ? sunlit : z < low ? shadow : middle;
if (rand() < 0.075) c = rand() < 0.5 ? sunlit : shadow;
return c;
}
// Four separate walking legs, with pivots at the shoulders and hips.
function leg(name, x, y, speed) {
part(name, [x, y, 17]);
animate(name, { type: "swing", axis: "x", speed, amplitude: 0.25 });
ellipsoid(x, y, 14, 2.7, 2.9, 4, russet);
cylinder(x, y, 3, 2, 12, shadow);
ellipsoid(x, y, 8, 2, 2, 5, chestnut);
box(x - 2, y - 2, 1, x + 2, y + 1, 4, "#b7744b");
box(x - 2, y - 3, 0, x + 2, y + 1, 2, "#4b4140");
box(x - 1, y - 3, 2, x + 1, y - 3, 2, "#70615a");
}
leg("front-left", 19, 18, 5);
leg("front-right", 29, 18, -5);
leg("rear-left", 19, 34, -5);
leg("rear-right", 29, 34, 5);
part("body");
// Rounded, slim torso: a broad white underside beneath a reddish back.
for (let x = 15; x <= 33; x++) {
for (let y = 15; y <= 39; y++) {
for (let z = 12; z <= 26; z++) {
const d = ((x - 24) / 8.5) ** 2 +
((y - 27) / 11.5) ** 2 +
((z - 19) / 6.5) ** 2;
if (d > 1) continue;
const edge = 19.2 + 0.35 * Math.cos((y - 27) / 5);
let c = z < edge ? (z < 16 ? "#e5d7b8" : cream)
: furColor(z, 22, russet, 17);
if (z >= edge && z > 23 && rand() < 0.2) c = "#db8850";
set(x, y, z, c);
}
}
}
// Upright neck, leaning toward the viewer; its pale front forms a bold bib.
for (let z = 19; z <= 36; z++) {
const cy = 17 - (z - 19) * 0.31;
const rx = z < 23 ? 4.1 : 3.5;
const ry = z < 23 ? 4.3 : 3.5;
for (let x = 19; x <= 29; x++) {
for (let y = 8; y <= 22; y++) {
if (((x - 24) / rx) ** 2 + ((y - cy) / ry) ** 2 > 1) continue;
let c = y < cy - 0.9 ? cream : furColor(z, 30, russet, 22);
if (y < cy - 2.1 && z > 25) c = warmWhite;
set(x, y, z, c);
}
}
}
// Large toy-like head: brown crown, broad soft-grey face.
ellipsoid(24, 10, 36, 5.3, 5.2, 4.5, russet);
ellipsoid(24, 7.6, 35.5, 4.8, 3.6, 3.6, grey);
ellipsoid(24, 5, 33.5, 3.5, 3.2, 2.5, greyLight);
box(22, 3, 32, 26, 5, 33, "#ddd9c8");
// Pointed ears with darker inset centers.
for (const x of [20, 28]) {
box(x - 2, 10, 39, x + 2, 12, 40, chestnut);
box(x - 1, 10, 41, x + 1, 12, 43, russet);
set(x, 11, 44, sunlit);
box(x, 9, 41, x, 9, 42, "#875b59");
set(x, 9, 43, "#b67b73");
}
// Simple, high-contrast eyes visible from the front and sides.
for (const x of [20, 28]) {
box(x, 5, 36, x, 6, 37, dark);
set(x, 4, 37, "#ffffff");
}
set(19, 8, 36, dark);
set(29, 8, 36, dark);
box(23, 2, 34, 25, 2, 34, dark);
set(24, 2, 33, "#65534d");
set(22, 3, 32, "#65534d");
set(26, 3, 32, "#65534d");
// Short, perky tail.
ellipsoid(24, 39, 22, 2.5, 3.4, 2.5, russet);
ellipsoid(24, 42, 23, 2, 2.2, 2, shadow);
set(24, 44, 23, chestnut);import { draw } from "./assets/voxel";
import { guanaco } from "./assets/guanaco";
// Every frame: standing on (x, y), the centre of its base.
draw(ctx, guanaco, 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 guanaco
# With Fogón's tools (connector)
add_assets({ slug: "<your-game>", ids: ["guanaco"] })
# It lands in client/assets/guanaco.ts
# https://fogon.page/object/guanaco