← Asian3D assetfogon/panda
Panda
Drag to turn it// «Panda» · gpt-6-sol (medium)
// A cute chubby panda standing on four legs: white body, black legs, black ears and eye patches, small black nose, holding a bamboo shoot in its mouth. Each leg is a moving part for walking.
// Chubby panda with a bamboo shoot, facing -y.
const white = "#f4f0e4";
const black = "#242b2d";
// Round body and dark shoulder band.
ellipsoid(24, 26, 22, 14, 15, 12, white);
ellipsoid(24, 16, 23, 13, 7, 10, black);
ellipsoid(24, 27, 16, 10, 10, 5, "#e6e1d3");
// Oversized head and upright ears.
ellipsoid(24, 12, 32, 10, 9, 9, white);
ellipsoid(16, 12, 40, 4, 4, 5, black);
ellipsoid(32, 12, 40, 4, 4, 5, black);
ellipsoid(16, 8, 41, 2, 1, 3, "#444446");
ellipsoid(32, 8, 41, 2, 1, 3, "#444446");
// Broad eye patches wrap onto the front of the face.
ellipsoid(18, 5, 34, 3, 2, 4, black);
ellipsoid(30, 5, 34, 3, 2, 4, black);
// Gentle variation across the large fur surfaces.
forEach((x, y, z, color) => {
if (color === white) {
set(x, y, z, rand() < 0.06 ? "#ddd9cd" : z > 29 ? "#fffaf0" : white);
} else if (color === black && rand() < 0.09) {
set(x, y, z, "#32393a");
}
});
// Bright little eyes.
ellipsoid(18, 2, 34, 1, 1, 2, "#faf8ec");
ellipsoid(30, 2, 34, 1, 1, 2, "#faf8ec");
set(18, 1, 35, "#191d1d");
set(30, 1, 35, "#191d1d");
set(17, 1, 35, "#ffffff");
set(29, 1, 35, "#ffffff");
// Pale muzzle, button nose, and tiny smile.
ellipsoid(24, 4, 28, 5, 3, 3, "#eee9dd");
ellipsoid(24, 1, 29, 2, 1, 2, "#202525");
set(23, 0, 30, "#414748");
line(24, 1, 27, 24, 1, 25, 0, "#353839");
line(24, 1, 25, 21, 2, 25, 0, "#353839");
line(24, 1, 25, 27, 2, 25, 0, "#353839");
// A small red-and-gold garden charm under the chin.
box(21, 8, 23, 27, 9, 24, "#a82928");
box(22, 7, 22, 26, 8, 22, "#dfae53");
sphere(24, 6, 21, 2, "#e9bb58");
set(24, 3, 21, "#855e27");
// Four independently swinging legs.
function leg(name, x, y, speed) {
part(name, [x, y, 16]);
ellipsoid(x, y, 10, 5, 5, 9, "#22292b");
ellipsoid(x, y - 2, 4, 5, 6, 4, "#2a3031");
ellipsoid(x, y - 3, 2, 5, 6, 2, "#343939");
box(x - 3, y - 6, 0, x + 3, y + 1, 1, "#303536");
// Three small, readable toe marks.
for (const dx of [-3, 0, 3]) {
set(x + dx, y - 8, 2, "#b8afa1");
}
animate(name, { type: "swing", axis: "x", speed, amplitude: 0.3 });
}
leg("front_left", 15, 16, 5);
leg("front_right", 33, 16, -5);
leg("rear_left", 15, 35, -5);
leg("rear_right", 33, 35, 5);
part("body");
// Fresh jade-green bamboo held across the mouth.
line(25, 1, 25, 36, 2, 15, 1, "#539b59");
line(26, 0, 24, 35, 1, 16, 0, "#a6d184");
for (const [x, z] of [[28, 22], [32, 18], [35, 16]]) {
line(x - 1, 0, z + 1, x + 1, 2, z - 1, 1, "#317d4b");
}
// Pointed clusters of bamboo leaves.
line(31, 2, 19, 38, 3, 24, 1, "#448b4e");
ellipsoid(39, 3, 24, 4, 1, 2, "#65ac60");
line(34, 2, 17, 40, 3, 14, 1, "#448b4e");
ellipsoid(41, 3, 13, 3, 1, 2, "#76b96a");
line(35, 2, 16, 38, 3, 20, 1, "#438e50");
ellipsoid(39, 3, 21, 3, 1, 2, "#89c479");import { draw } from "./assets/voxel";
import { panda } from "./assets/panda";
// Every frame: standing on (x, y), the centre of its base.
draw(ctx, panda, 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 panda
# With Fogón's tools (connector)
add_assets({ slug: "<your-game>", ids: ["panda"] })
# It lands in client/assets/panda.ts
# https://fogon.page/object/panda