← EquipamientoObjeto 3Dfogon/lanza
Lanza
Arrastrá para girarlo// «Lanza» · gpt-6-sol (medium)
// A long spear: a long thin light wooden shaft with a leather grip wrap in the middle, a leaf-shaped steel spearhead at the front with a bright edge, a small red cloth tassel tied under the head and an iron butt cap at the back. It LIES FLAT horizontally on the ground (z=0), as a chunky toy-like item seen from above: tip/front toward -y, handle/back toward +y, centered on x, using most of the grid along y, at least 4-5 blocks thick so it reads at small size. No hands, no stand, no base plate.
const woodDark = "#80512b";
const woodMid = "#ad7439";
const woodLight = "#d6a35c";
// Solid, chunky wooden shaft, running front-to-back along y.
for (let y = 14; y <= 43; y++) {
for (let x = 22; x <= 26; x++) {
for (let z = 0; z <= 4; z++) {
let color = z === 0 || x === 22 ? woodDark
: z >= 3 ? woodLight : woodMid;
if (z >= 2 && rand() < 0.09) color = woodMid;
set(x, y, z, color);
}
}
}
// A few lengthwise grain lines, visible between the fittings.
for (let y = 18; y <= 23; y++) set(25, y, 4, "#e2b36f");
for (let y = 37; y <= 41; y++) set(23, y, 4, "#c38b49");
// Brass collars at either end of the leather handgrip.
for (const y of [25, 35]) {
box(21, y, 0, 27, y, 4, "#a8772d");
box(22, y, 4, 26, y, 5, "#edc568");
for (const x of [21, 27]) box(x, y, 1, x, y, 3, "#d7a745");
}
// Wrapped leather grip with broad, diagonal-looking seams.
for (let y = 26; y <= 34; y++) {
for (let x = 21; x <= 27; x++) {
for (let z = 0; z <= 5; z++) {
const seam = (y + Math.floor((x - 21) / 2)) % 4 === 0;
let color = seam ? "#633b29" : z >= 4 ? "#b77a4d" : "#895335";
if (!seam && z >= 4 && rand() < 0.08) color = "#ca9160";
set(x, y, z, color);
}
}
}
for (let y = 27; y <= 33; y += 4) {
set(22, y, 5, "#ddae73");
set(26, y + 1, 5, "#ddae73");
}
// Squared iron butt cap, with a bright rim and dark end face.
box(21, 42, 0, 27, 45, 4, "#657078");
box(22, 42, 4, 26, 44, 5, "#aeb9ba");
box(21, 42, 1, 27, 42, 3, "#d8dbd2");
box(22, 45, 1, 26, 45, 3, "#3f4950");
for (const x of [22, 26]) set(x, 44, 4, "#dce0d7");
// Steel socket beneath the blade.
box(21, 13, 0, 27, 17, 4, "#69747a");
box(22, 14, 4, 26, 17, 5, "#aeb9bc");
box(21, 16, 1, 27, 16, 3, "#d0b36b");
box(22, 16, 4, 26, 16, 5, "#efd083");
// Leaf-shaped spearhead: broad shoulders, pointed toward -y.
const widths = {
2: 1, 3: 2, 4: 3, 5: 4, 6: 5, 7: 6, 8: 6,
9: 6, 10: 5, 11: 5, 12: 4, 13: 3, 14: 2
};
for (let y = 2; y <= 14; y++) {
const w = widths[y];
for (let x = 24 - w; x <= 24 + w; x++) {
const edge = Math.abs(x - 24) === w;
for (let z = 0; z <= 4; z++) {
let color = z === 0 ? "#596971"
: edge ? (z >= 2 ? "#e3ebea" : "#87999f")
: z >= 3 ? "#9baeb6" : "#71868f";
if (!edge && z === 4 && rand() < 0.07) color = "#b8c8cb";
set(x, y, z, color);
}
if (!edge && Math.abs(x - 24) <= 1) {
set(x, y, 5, x === 24 ? "#e0e9e7" : "#bacbd0");
}
}
}
// A crisp glint along one cutting edge and a pointed tip.
for (let y = 4; y <= 11; y++) set(24 - widths[y], y, 4, "#f1f3e9");
box(24, 2, 3, 24, 2, 5, "#f1f3e9");
// Red cloth tassel tied just below the socket, flowing back to one side.
box(27, 16, 1, 29, 18, 3, "#802e35");
box(28, 16, 3, 30, 17, 4, "#e05a54");
box(28, 18, 0, 31, 20, 3, "#ad383e");
box(29, 20, 0, 32, 22, 2, "#c84546");
box(30, 22, 0, 32, 24, 1, "#932d36");
box(30, 17, 0, 33, 19, 2, "#c13f42");
box(32, 18, 0, 35, 20, 1, "#973039");
box(30, 18, 3, 31, 20, 3, "#f06b5e");
box(31, 21, 2, 32, 22, 2, "#e45751");
box(33, 18, 2, 34, 19, 2, "#df5951");
// Small brass knot securing the tassel.
box(27, 16, 3, 29, 17, 5, "#b98b3e");
box(28, 16, 5, 29, 17, 5, "#f2cd76");import { draw } from "./assets/voxel";
import { lanza } from "./assets/lanza";
// En cada cuadro: parado sobre (x, y), el centro de su base.
draw(ctx, lanza, 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 lanza
# Con las herramientas de Fogón (conector)
add_assets({ slug: "<tu-juego>", ids: ["lanza"] })
# Queda en client/assets/lanza.ts
# https://fogon.page/object/lanza