← BásicoObjeto 3Dfogon/pala
Pala
Arrastrá para girarlo// «Pala» · gpt-6-sol (medium)
// Shovel («Pala»).
// Broad, slightly rounded steel blade.
const steel = ["#889da6", "#93a8af", "#a3b4b9", "#b5c1c2"];
const dark = "#566c78";
function bladeBottom(x) {
if (x <= 12 || x >= 37) return 6;
if (x <= 14 || x >= 35) return 3;
if (x <= 18 || x >= 32) return 1;
return 0;
}
function bladeTop(x) {
return (x >= 19 && x <= 30) ? 14 : 13;
}
for (let x = 11; x <= 38; x++) {
for (let z = bladeBottom(x); z <= bladeTop(x); z++) {
for (let y = 20; y <= 26; y++) {
let c = y === 20 ? "#a8b9bd" : y >= 25 ? "#6e8590" : "#8da3ac";
if (y === 20 && rand() < 0.13) c = steel[Math.floor(rand() * steel.length)];
if (z === bladeBottom(x)) c = y <= 22 ? "#c0c9c8" : "#7b909a";
if (z === bladeTop(x)) c = y <= 22 ? "#6d838e" : "#506875";
set(x, y, z, c);
}
}
}
// Reinforced top rim, with its bright forward bevel.
box(11, 19, 12, 18, 26, 13, "#637d8b");
box(19, 19, 13, 30, 26, 14, "#69818d");
box(31, 19, 12, 38, 26, 13, "#637d8b");
box(12, 19, 13, 18, 20, 13, "#b2c0c3");
box(20, 19, 14, 29, 20, 14, "#bdc9ca");
box(32, 19, 13, 37, 20, 13, "#b2c0c3");
box(13, 22, 14, 18, 26, 14, "#849ba5");
box(31, 22, 14, 36, 26, 14, "#849ba5");
// Three broad forged panels, separated by recessed vertical seams.
box(14, 19, 5, 19, 19, 11, "#b0bec0");
box(21, 19, 3, 27, 19, 12, "#a5b7ba");
box(29, 19, 5, 35, 19, 11, "#9fb1b7");
box(20, 19, 3, 20, 19, 12, "#637985");
box(28, 19, 3, 28, 19, 12, "#647b87");
box(15, 18, 5, 15, 18, 10, "#d0d2cc");
box(22, 18, 4, 22, 18, 11, "#c8ceca");
box(34, 18, 6, 34, 18, 10, "#bbc7c7");
box(17, 19, 1, 30, 20, 1, "#728a95");
box(19, 18, 2, 29, 18, 2, "#c6cfcc");
// Folded side edges and small corner highlights.
box(11, 19, 7, 12, 20, 11, "#8197a1");
box(37, 19, 7, 38, 20, 11, "#758c98");
box(13, 19, 4, 14, 19, 6, "#c6ceca");
box(35, 19, 4, 36, 19, 6, "#b9c6c7");
// Steel socket rising from the center of the blade.
box(22, 21, 14, 27, 26, 17, "#637b87");
box(23, 20, 15, 26, 20, 18, "#9aafb5");
box(24, 19, 16, 25, 19, 18, "#c1cccb");
box(22, 22, 17, 27, 25, 18, "#79909b");
box(23, 20, 19, 26, 25, 21, "#617b88");
box(24, 19, 20, 25, 19, 21, "#a7babd");
// Straight wooden shaft: warm front, shaded sides, narrow grain.
box(23, 22, 21, 26, 25, 34, "#9f692f");
box(23, 21, 22, 24, 21, 33, "#d09a4d");
box(25, 21, 22, 25, 21, 33, "#b9853d");
box(26, 23, 22, 26, 25, 33, "#784b29");
box(24, 20, 25, 24, 20, 29, "#e0ad5b");
box(24, 20, 32, 24, 20, 33, "#dfac59");
// Red D-grip: chunky branching arms leave a clear open handhold.
box(22, 21, 33, 27, 24, 35, "#873629");
box(23, 20, 34, 26, 20, 35, "#ad4832");
line(23, 22, 35, 17, 22, 38, 1, "#8d352a");
line(27, 22, 35, 33, 22, 39, 1, "#843025");
line(17, 22, 38, 15, 22, 41, 1, "#a33b2b");
line(33, 22, 39, 34, 22, 42, 1, "#8c352a");
box(14, 21, 40, 16, 24, 42, "#a4402b");
box(33, 21, 40, 35, 24, 42, "#823328");
box(16, 20, 37, 18, 20, 38, "#b64e32");
box(19, 20, 35, 21, 20, 36, "#ae4630");
box(28, 20, 35, 30, 20, 36, "#a64430");
box(32, 20, 38, 33, 20, 39, "#b04a31");
// Golden cross-grip across the top of the red frame.
box(16, 22, 42, 33, 24, 44, "#a16a2d");
box(17, 21, 43, 32, 21, 44, "#d6a44b");
box(17, 21, 44, 31, 22, 44, "#e2b75e");
box(18, 20, 43, 30, 20, 43, "#edc56d");
box(17, 24, 42, 32, 24, 42, "#724a28");
box(14, 20, 42, 17, 24, 43, "#a43e2d");
box(33, 20, 42, 35, 24, 43, "#913629");
box(14, 19, 43, 16, 19, 43, "#c45335");
box(35, 22, 41, 36, 24, 42, "#6e8288");
set(36, 21, 42, "#a4b3b5");import { draw } from "./assets/voxel";
import { pala } from "./assets/pala";
// En cada cuadro: parado sobre (x, y), el centro de su base.
draw(ctx, pala, 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 pala
# Con las herramientas de Fogón (conector)
add_assets({ slug: "<tu-juego>", ids: ["pala"] })
# Queda en client/assets/pala.ts
# https://fogon.page/object/pala