← AnimalesObjeto 3Dfogon/oso-polar
Oso polar
Arrastrá para girarlo// «Oso polar» · gpt-6-sol (medium)
// A big chubby cartoon polar bear on all fours, horizontal along y, head at the front (-y): a heavy rounded body in white and very light cream, with pale blue shading underneath, small round ears, black eyes, a black nose and four thick legs with dark paw pads.
const cream = "#f7f5eb";
const white = "#fffefa";
const blue = "#d8e9ef";
const shadow = "#bdd6e2";
const ink = "#242b31";
const pad = "#444c52";
function shadeFur() {
forEach((x, y, z, color) => {
if (color !== cream) return;
let shade = z < 12 ? shadow : z < 17 ? blue : z > 26 ? white : cream;
if (rand() < 0.035) shade = z < 17 ? "#e6f0f2" : "#eeeee7";
set(x, y, z, shade);
});
}
// Heavy, rounded body and bright upper back.
ellipsoid(24, 27, 18, 16, 16, 12, cream);
shadeFur();
ellipsoid(24, 27, 27, 11, 11, 3, white);
// Little puff of a tail at the rear.
ellipsoid(24, 42, 21, 4, 4, 4, blue);
ellipsoid(24, 42, 22, 3, 4, 3, white);
// Oversized head, muzzle, and round ears.
ellipsoid(24, 12, 22, 12, 10, 10, cream);
forEach((x, y, z, color) => {
if (color !== cream) return;
if (z < 18) set(x, y, z, blue);
else if (z > 26) set(x, y, z, white);
});
for (const x of [15, 33]) {
ellipsoid(x, 9, 30, 3.5, 3, 4.5, white);
ellipsoid(x, 6, 30, 2, 1, 2.5, "#e4dfe0");
}
ellipsoid(24, 5, 18, 7, 5, 5, white);
ellipsoid(18, 5, 18, 2, 2, 2, "#f3f0eb");
ellipsoid(30, 5, 18, 2, 2, 2, "#f3f0eb");
// Simple dot eyes with tiny highlights.
for (const x of [18, 30]) {
ellipsoid(x, 3, 25, 1.5, 1, 1.5, ink);
set(x, 2, 26, white);
}
ellipsoid(24, 0, 20, 2.5, 1, 1.5, ink);
line(24, 0, 19, 24, 0, 16, 0, ink);
line(21, 1, 16, 23, 0, 15, 0, ink);
line(25, 0, 15, 27, 1, 16, 0, ink);
// Each short, chunky leg swings from its own shoulder or hip.
function makeLeg(name, x, y, speed) {
part(name, [x, y, 15]);
ellipsoid(x, y, 8, 5, 5, 8, blue);
ellipsoid(x, y, 9, 4.5, 4.5, 6, cream);
ellipsoid(x, y - 2, 3, 5, 5, 3, white);
// Dark sole and three visible little toe pads.
ellipsoid(x, y - 2, 0, 3, 3, 1, pad);
for (const dx of [-2, 0, 2]) {
ellipsoid(x + dx, y - 6, 2, 1, 1, 1, pad);
}
animate(name, { type: "swing", axis: "x", speed, amplitude: 0.3 });
part("body");
}
makeLeg("front-left", 14, 16, 3);
makeLeg("front-right", 34, 16, -3);
makeLeg("rear-left", 14, 36, -3);
makeLeg("rear-right", 34, 36, 3);import { draw } from "./assets/voxel";
import { osoPolar } from "./assets/oso-polar";
// En cada cuadro: parado sobre (x, y), el centro de su base.
draw(ctx, osoPolar, 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 oso-polar
# Con las herramientas de Fogón (conector)
add_assets({ slug: "<tu-juego>", ids: ["oso-polar"] })
# Queda en client/assets/oso-polar.ts
# https://fogon.page/object/oso-polar