← Antiguo y prehistoriaObjeto 3Dfogon/braquiosaurio
Braquiosaurio
Arrastrá para girarlo// «Braquiosaurio» · gpt-6-sol (medium)
// A tall cartoon brachiosaurus: a big rounded body on four thick pillar legs (front legs longer than the back ones), a very long neck rising steeply up from the front (-y) to a small head near the top of the grid, and a long tapering tail reaching back (+y). Soft blue-grey with a lighter belly and a few darker spots along the back, small black dot eyes and a little smile.
const skin = ["#758b8b", "#8fa5a3", "#a7bbb4"];
const belly = "#c5d0c2";
const dark = "#607977";
const footShade = "#6f8585";
function shadedEllipsoid(cx, cy, cz, rx, ry, rz, shade) {
for (let x = Math.ceil(cx - rx); x <= Math.floor(cx + rx); x++)
for (let y = Math.ceil(cy - ry); y <= Math.floor(cy + ry); y++)
for (let z = Math.max(0, Math.ceil(cz - rz)); z <= Math.floor(cz + rz); z++) {
const d = ((x - cx) / rx) ** 2 +
((y - cy) / ry) ** 2 +
((z - cz) / rz) ** 2;
if (d > 1) continue;
let color = z > cz + rz * 0.22 ? skin[2] :
z < cz - rz * 0.3 ? skin[0] : skin[1];
if (rand() < 0.075) color = skin[Math.floor(rand() * 3)];
set(x, y, z, shade ? shade(x, y, z, color) : color);
}
}
// Rounded torso, with a broad pale underside visible from the front.
shadedEllipsoid(24, 25, 19, 10, 12, 8, (x, y, z, color) =>
z < 18 && y < 29 ? belly : color
);
shadedEllipsoid(24, 17, 21, 7, 5, 6, (x, y, z, color) =>
z < 20 && y < 16 ? belly : color
);
// Long, steadily tapering tail.
for (let i = 0; i <= 18; i++) {
const t = i / 18;
const y = 34 + 12 * t;
const z = 20 - 10 * t;
const r = 4.1 - 3.15 * t;
shadedEllipsoid(24, y, z, r, 2.5, r * 0.85, (x, yy, zz, color) =>
zz < z - r * 0.35 ? belly : color
);
}
// A few clear, irregular spots across the back.
[
[20, 19, 26, 1.3], [27, 21, 26, 1.2],
[17, 25, 24, 1.4], [30, 27, 24, 1.2],
[21, 30, 26, 1.1], [27, 33, 23, 1.1]
].forEach(([x, y, z, r]) => ellipsoid(x, y, z, r, r * 0.8, 0.8, dark));
// The entire neck and head gently nod from the shoulders.
part("neck", [24, 15, 23]);
for (let i = 0; i <= 14; i++) {
const t = i / 14;
const z = 23 + 16 * t;
const y = 15 - 6 * t;
const r = 3.6 - 0.85 * t;
shadedEllipsoid(24, y, z, r, r, 2.4, (x, yy, zz, color) =>
yy < y - r * 0.48 ? belly : color
);
}
ellipsoid(24, 9, 36, 2.1, 0.8, 3.2, belly);
// Little round head and a blunt, friendly muzzle.
shadedEllipsoid(24, 8, 41, 4.5, 3.7, 3.1);
shadedEllipsoid(24, 4, 39, 3.8, 3, 2.5, (x, y, z, color) =>
z < 39 ? "#b7c8bc" : color
);
// Dot eyes, white glints, nostrils, and an upward-curving smile.
for (const x of [21, 27]) {
box(x, 5, 42, x, 6, 42, "#263639");
set(x, 4, 43, "#f5f5df");
}
set(22, 2, 40, "#566c6c");
set(26, 2, 40, "#566c6c");
for (let x = 22; x <= 26; x++) set(x, 2, 38, "#526967");
set(21, 3, 39, "#526967");
set(27, 3, 39, "#526967");
animate("neck", { type: "swing", axis: "x", speed: 1, amplitude: 0.1 });
function leg(name, x, y, top, speed) {
part(name, [x, y, top]);
const height = top === 19 ? 10 : 8;
shadedEllipsoid(x, y, height, 3.3, 3.4, height, (xx, yy, z, color) =>
z < 4 ? footShade : color
);
shadedEllipsoid(x, y - 1, 2, 3.7, 4, 2, (xx, yy, z, color) =>
z < 2 ? footShade : color
);
// Three short, pale toenails on the forward edge of each foot.
for (const dx of [-2, 0, 2]) {
box(x + dx, y - 5, 1, x + dx, y - 4, 2, "#d4d8c8");
}
animate(name, { type: "swing", axis: "x", speed, amplitude: 0.3 });
}
leg("front-left", 18, 17, 19, 4);
leg("front-right", 30, 17, 19, -4);
leg("rear-left", 18, 32, 15, -4);
leg("rear-right", 30, 32, 15, 4);import { draw } from "./assets/voxel";
import { braquiosaurio } from "./assets/braquiosaurio";
// En cada cuadro: parado sobre (x, y), el centro de su base.
draw(ctx, braquiosaurio, 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 braquiosaurio
# Con las herramientas de Fogón (conector)
add_assets({ slug: "<tu-juego>", ids: ["braquiosaurio"] })
# Queda en client/assets/braquiosaurio.ts
# https://fogon.page/object/braquiosaurio