← Antiguo y prehistoriaObjeto 3Dfogon/triceratops
Triceratops
Arrastrá para girarlo// «Triceratops» · gpt-6-sol (medium)
// A chunky cartoon triceratops on four short thick legs, body horizontal along y. At the front (-y) a big head with a wide rounded bony frill fanning up behind it (orange with a darker rim and small spikes on the edge), two long cream horns above the eyes pointing forward and a short one on the beak-like nose. Body warm brown with lighter tan belly and a short thick tail at the back.
const brown = "#9b633f";
const brownLight = "#ae7548";
const brownDark = "#805035";
const tan = "#c69661";
const orange = "#dc793c";
const orangeLight = "#ed9650";
const orangeDark = "#ae542f";
const cream = "#f5dfae";
// Short, thick tail.
ellipsoid(24, 39, 17, 6, 6, 5, brownDark);
ellipsoid(24, 42, 18, 4, 3, 4, brown);
ellipsoid(24, 44, 19, 2, 1, 2, brownLight);
// Horizontal barrel-shaped body.
ellipsoid(24, 25, 17, 11, 15, 9, brown);
forEach((x, y, z, color) => {
if (color === brown && y < 39) {
if (z >= 21 && rand() < 0.65) set(x, y, z, brownLight);
else if (rand() < 0.09) set(x, y, z, brownDark);
}
});
ellipsoid(24, 23, 12, 9, 12, 5, tan);
// A few bold markings on each side of the back.
for (const x of [15, 33]) {
for (const [y, z] of [[21, 21], [27, 22], [33, 20]]) {
ellipsoid(x, y, z, 1, 2, 2, brownDark);
}
}
// Wide upright frill: dark outer rim, warm orange center.
for (let x = 7; x <= 41; x++) {
for (let z = 16; z <= 38; z++) {
const d = ((x - 24) / 17) ** 2 + ((z - 26) / 12) ** 2;
if (d > 1) continue;
const color = d > 0.77 ? orangeDark :
rand() < 0.14 ? orangeLight : orange;
for (let y = 14; y <= 17; y++) set(x, y, z, color);
if (d < 0.7) set(x, 13, z, rand() < 0.15 ? orangeLight : orange);
}
}
// Little points along the edge of the frill.
const spikes = [
[[9, 14, 27], [6, 14, 29]],
[[11, 14, 32], [8, 14, 35]],
[[16, 14, 36], [14, 14, 39]],
[[24, 14, 38], [24, 14, 40]],
[[32, 14, 36], [34, 14, 39]],
[[37, 14, 32], [40, 14, 35]],
[[39, 14, 27], [42, 14, 29]]
];
for (const [a, b] of spikes) {
sphere(...a, 2, orangeDark);
line(...a, ...b, 1, orangeLight);
set(...b, cream);
}
// Big friendly head, projecting forward from the frill.
ellipsoid(24, 10, 21, 10, 8, 8, brown);
ellipsoid(24, 5, 18, 7, 5, 5, brownLight);
ellipsoid(24, 4, 14, 5, 4, 2, tan);
box(21, 0, 15, 27, 1, 16, tan);
// Two large eyes facing forward.
for (const x of [17, 31]) {
ellipsoid(x, 3, 23, 2, 1, 2, tan);
ellipsoid(x, 2, 23, 1, 1, 2, "#302920");
set(x, 1, 24, "#ffffff");
}
set(21, 1, 19, brownDark);
set(27, 1, 19, brownDark);
// Long, tapered brow horns, swept forward and slightly outward.
for (const [rootX, tipX] of [[17, 14], [31, 34]]) {
for (let i = 0; i <= 9; i++) {
const t = i / 9;
sphere(
rootX + (tipX - rootX) * t,
9 - 8 * t,
26 + 6 * t,
2.5 - 1.9 * t,
t < 0.35 ? "#dfbd87" : cream
);
}
}
// Short horn on the beak.
sphere(24, 3, 22, 2, "#dfbd87");
line(24, 3, 22, 24, 0, 26, 1, cream);
set(24, 0, 27, cream);
// Each leg is a separate swinging part.
function leg(name, x, y, speed) {
part(name, [x, y, 13]);
ellipsoid(x, y, 7, 4, 4, 7, brownDark);
ellipsoid(x, y - 1, 5, 4, 4, 5, brown);
ellipsoid(x, y - 2, 2, 5, 5, 2, brownLight);
for (const dx of [-3, 0, 3]) {
ellipsoid(x + dx, y - 6, 1, 1, 2, 1, cream);
}
animate(name, { type: "swing", axis: "x", speed, amplitude: 0.3 });
part("body");
}
leg("frontLeft", 16, 16, 4);
leg("frontRight", 32, 16, -4);
leg("rearLeft", 16, 35, -4);
leg("rearRight", 32, 35, 4);import { draw } from "./assets/voxel";
import { triceratops } from "./assets/triceratops";
// En cada cuadro: parado sobre (x, y), el centro de su base.
draw(ctx, triceratops, 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 triceratops
# Con las herramientas de Fogón (conector)
add_assets({ slug: "<tu-juego>", ids: ["triceratops"] })
# Queda en client/assets/triceratops.ts
# https://fogon.page/object/triceratops