← AnimalesObjeto 3Dfogon/koala
Koala
Arrastrá para girarlo// «Koala» · gpt-6-sol (medium)
// A cute cartoon koala hugging a short vertical eucalyptus tree trunk with a few green leaves, facing front (-y): a round fluffy grey body, a big round head with huge round fluffy ears (white inside), a big black oval nose and small black eyes.
// Short eucalyptus trunk and roots
cylinder(24, 12, 0, 3, 27, "#916344");
cylinder(24, 12, 1, 2, 25, "#a9774d");
line(24, 12, 2, 19, 13, 0, 1, "#795039");
line(24, 12, 2, 29, 14, 0, 1, "#795039");
for (let i = 0; i < 25; i++) {
const z = 2 + Math.floor(rand() * 24);
const x = 21 + Math.floor(rand() * 7);
const y = 9 + Math.floor(rand() * 7);
if (get(x, y, z)) set(x, y, z, rand() < 0.5 ? "#b48458" : "#765039");
}
// A few branches and chunky eucalyptus leaves
line(24, 12, 23, 36, 10, 28, 1, "#795039");
line(23, 12, 21, 15, 9, 26, 1, "#795039");
for (const [x, y, z, rx, rz] of [
[38, 9, 29, 4, 2], [34, 9, 32, 3, 2],
[15, 8, 27, 4, 2], [19, 8, 29, 3, 2]
]) {
ellipsoid(x, y, z, rx, 2, rz, "#397d50");
ellipsoid(x, y - 1, z + 1, rx - 1, 1, rz - 1, "#61af68");
set(x, y - 2, z + 1, "#9ad17b");
}
// Feet, with broad toes toward the viewer
for (const x of [18, 30]) {
ellipsoid(x, 25, 5, 5, 6, 5, "#858b90");
ellipsoid(x, 22, 4, 5, 5, 4, "#aab0b1");
for (const dx of [-2, 0, 2]) {
ellipsoid(x + dx, 18, 2, 1, 2, 1, "#c4c7c2");
}
}
// Round body and pale tummy
ellipsoid(24, 25, 16, 11, 9, 12, "#777f84");
ellipsoid(24, 24, 18, 10, 8, 10, "#969da0");
ellipsoid(24, 17, 15, 7, 3, 9, "#dbdcd3");
ellipsoid(24, 15, 17, 5, 2, 6, "#edede2");
// Arms curl around the front of the trunk.
for (const side of [-1, 1]) {
line(24 + side * 8, 22, 23, 24 + side * 10, 16, 18, 3, "#80888d");
line(24 + side * 10, 16, 18, 24 + side * 5, 9, 16, 3, "#929a9d");
sphere(24 + side * 5, 9, 16, 3, "#b3b9b8");
ellipsoid(24 + side * 4, 7, 15, 2, 1, 2, "#d3d3ca");
}
// The whole face, ears, and little head tufts tilt together.
part("head", [24, 24, 26]);
for (const x of [10, 38]) {
ellipsoid(x, 24, 37, 7, 5, 7, "#777e84");
ellipsoid(x, 21, 38, 6, 4, 6, "#a7adae");
ellipsoid(x, 17, 38, 5, 2, 5, "#f0eee5");
ellipsoid(x, 15, 37, 3, 1, 3, "#dedbd3");
}
ellipsoid(24, 24, 34, 12, 10, 10, "#777f84");
ellipsoid(24, 22, 35, 11, 9, 9, "#a7adae");
ellipsoid(24, 19, 37, 9, 6, 6, "#b9bebd");
// Fluffy cheeks and chin
for (const x of [16, 32]) {
ellipsoid(x, 17, 29, 5, 4, 4, "#b3b9b8");
ellipsoid(x, 14, 29, 3, 2, 2, "#d4d5cf");
}
ellipsoid(24, 16, 28, 5, 3, 3, "#f0eee5");
// Black dot eyes with tiny highlights
for (const x of [19, 29]) {
ellipsoid(x, 13, 36, 2, 1, 2, "#24252a");
set(x - 1, 12, 37, "#ffffff");
}
// Oversized oval nose and a tiny smile beneath it
ellipsoid(24, 12, 32, 3, 3, 5, "#25262a");
ellipsoid(23, 9, 34, 1, 1, 2, "#48494b");
set(24, 12, 26, "#343438");
set(23, 12, 25, "#484348");
set(25, 12, 25, "#484348");
ellipsoid(21, 23, 44, 2, 2, 2, "#a7adae");
ellipsoid(25, 24, 44, 2, 2, 2, "#b9bebd");
// Sparse, soft fur variation, without speckling the face or markings.
forEach((x, y, z, color) => {
if ((color === "#969da0" || color === "#a7adae" || color === "#b3b9b8")
&& rand() < 0.045) {
set(x, y, z, z > 28 ? "#c3c6c3" : "#abb2b2");
}
});
animate("head", { type: "swing", axis: "y", speed: 1.5, amplitude: 0.15 });import { draw } from "./assets/voxel";
import { koala } from "./assets/koala";
// En cada cuadro: parado sobre (x, y), el centro de su base.
draw(ctx, koala, 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 koala
# Con las herramientas de Fogón (conector)
add_assets({ slug: "<tu-juego>", ids: ["koala"] })
# Queda en client/assets/koala.ts
# https://fogon.page/object/koala