← Antiguo y prehistoriaObjeto 3Dfogon/estegosaurio
Estegosaurio
Arrastrá para girarlo// «Estegosaurio» · gpt-6-sol (medium)
// A chunky cartoon stegosaurus on four legs, body horizontal along y with a high arched back. Two rows of big flat triangular plates stand up along the spine (orange-red with yellow edges), a small low head at the front (-y) and a tail at the back ending in four long cream spikes. Body green with a pale yellow belly.
// Chunky cartoon stegosaurus — front faces -y.
const green = "#638b46";
const lightGreen = "#82a957";
const darkGreen = "#456b3d";
const belly = "#ead591";
const bellyShade = "#c7ae70";
const orange = "#df6537";
const red = "#ad4434";
const yellow = "#f4b54f";
const cream = "#f3e5bd";
// Solid, high-arched body with a lighter back.
ellipsoid(24, 24, 19, 10, 13, 8, green);
forEach((x, y, z, color) => {
if (color !== green) return;
if (z >= 24 && rand() < 0.72) set(x, y, z, lightGreen);
else if (z < 17 && rand() < 0.27) set(x, y, z, darkGreen);
else if (rand() < 0.055) set(x, y, z, lightGreen);
});
ellipsoid(24, 24, 15, 9, 11, 4, belly);
ellipsoid(24, 24, 12, 7, 9, 2, bellyShade);
// Broad shoulders, neck, and small friendly head.
ellipsoid(24, 14, 19, 7, 6, 5, green);
ellipsoid(24, 10, 19, 5, 5, 4, lightGreen);
ellipsoid(24, 6, 17, 4, 4, 3, green);
ellipsoid(24, 5, 16, 4, 3, 2, belly);
box(21, 2, 16, 27, 2, 16, bellyShade);
set(22, 2, 18, darkGreen);
set(26, 2, 18, darkGreen);
// Eyes on the near-facing corners, each with a bright glint.
for (const x of [20, 28]) {
box(x, 6, 20, x + 1, 7, 21, "#253627");
set(x, 6, 21, "#ffffff");
}
// Soft flank markings.
for (const y of [17, 22, 27, 32]) {
ellipsoid(15, y, 21, 1, 2, 2, darkGreen);
ellipsoid(33, y, 21, 1, 2, 2, darkGreen);
set(14, y, 23, lightGreen);
set(34, y, 23, lightGreen);
}
// Two staggered rows of broad, flat triangular plates.
// Each plate has a gold edge, red base, and hot orange center.
function plate(cx, cy, base, height) {
for (let dz = 0; dz <= height; dz++) {
const z = base + dz;
const halfWidth = Math.max(0, Math.floor(3 * (1 - dz / height)));
const lean = Math.round(dz / height);
for (let y = cy + lean - halfWidth; y <= cy + lean + halfWidth; y++) {
for (let x = cx - 1; x <= cx + 1; x++) {
const edge = Math.abs(y - (cy + lean)) >= halfWidth || dz >= height - 1;
const shade = dz < 2 ? red : edge ? yellow : orange;
set(x, y, z, shade);
}
}
if (dz > 2 && dz < height - 2) {
set(cx - 1, cy + lean, z, "#ef8241");
}
}
}
for (const [y, base, h] of [[16, 24, 8], [22, 26, 12], [28, 26, 12], [34, 23, 9]]) {
plate(20, y, base, h);
}
for (const [y, base, h] of [[19, 25, 10], [25, 27, 12], [31, 25, 11]]) {
plate(28, y, base, h);
}
// Tail swings sideways from the back of the body.
part("tail", [24, 35, 18]);
ellipsoid(24, 36, 18, 6, 5, 5, green);
ellipsoid(24, 40, 16, 4, 5, 3, green);
ellipsoid(24, 43, 15, 3, 3, 2, darkGreen);
line(24, 37, 21, 24, 42, 18, 0, lightGreen);
// Four long, splayed cream tail spikes.
for (const [sx, ex, ez] of [
[21, 15, 19], [22, 20, 12],
[26, 28, 12], [27, 33, 19]
]) {
line(sx, 42, 16, ex, 46, ez, 1, bellyShade);
line(sx, 43, 16, ex, 47, ez, 0, cream);
}
animate("tail", { type: "swing", axis: "z", speed: 2, amplitude: 0.3 });
// Four separate, sturdy walking legs.
function leg(name, x, y, speed) {
part(name, [x, y, 16]);
ellipsoid(x, y, 13, 4, 4, 5, green);
box(x - 3, y - 3, 3, x + 3, y + 3, 12, green);
box(x - 3, y - 3, 3, x + 3, y - 3, 10, lightGreen);
ellipsoid(x, y - 2, 2, 4, 5, 2, darkGreen);
box(x - 3, y - 5, 0, x + 3, y + 1, 2, green);
// Three blunt cream toenails face forward.
for (const dx of [-2, 0, 2]) {
box(x + dx, y - 6, 0, x + dx, y - 5, 1, cream);
}
animate(name, { type: "swing", axis: "x", speed, amplitude: 0.3 });
}
leg("front-left", 17, 15, 4);
leg("front-right", 31, 15, -4);
leg("rear-left", 17, 33, -4);
leg("rear-right", 31, 33, 4);
part("body", [24, 24, 19]);import { draw } from "./assets/voxel";
import { estegosaurio } from "./assets/estegosaurio";
// En cada cuadro: parado sobre (x, y), el centro de su base.
draw(ctx, estegosaurio, 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 estegosaurio
# Con las herramientas de Fogón (conector)
add_assets({ slug: "<tu-juego>", ids: ["estegosaurio"] })
# Queda en client/assets/estegosaurio.ts
# https://fogon.page/object/estegosaurio