← Kit de nivelesObjeto 3Dfogon/nivel-cerca-de-madera
Cerca de madera
Arrastrá para girarlo// «Cerca de madera» · gpt-6-sol (medium)
// A modular wooden fence segment: exactly 48 blocks long on x (x 0..47), centered on y (about y 21..27), 16 tall. Three square wooden posts 4x4 blocks at x 0..3, x 22..25 and x 44..47, 16 tall, with a small pointed or beveled top; two horizontal rails 2 blocks thick connecting them across the full length at z 5 and z 11. Warm light-brown wood in 2-3 shades with darker wood grain lines and small dark nail dots where rails meet posts.
const wood = "#c9823f";
const light = "#e3a65c";
const shade = "#a86434";
const grain = "#96552e";
const nail = "#604532";
// Two chunky rails run between the posts.
for (const [x0, x1] of [[4, 21], [26, 43]]) {
for (const z of [5, 11]) {
box(x0, 23, z, x1, 24, z + 1, wood);
box(x0, 23, z + 1, x1, 24, z + 1, light);
box(x0, 23, z, x1, 23, z, shade);
// Sparse, straight grain keeps the rails readable.
for (let x = x0 + 3; x < x1 - 1; x += 7) {
box(x, 23, z, Math.min(x + 2, x1 - 1), 23, z, grain);
}
}
}
// Square posts, with a small bevel at the top.
for (const x of [0, 22, 44]) {
box(x, 22, 0, x + 3, 25, 13, wood);
box(x + 3, 22, 0, x + 3, 25, 13, shade);
box(x, 22, 0, x + 2, 22, 13, light);
box(x, 22, 14, x + 3, 25, 14, shade);
box(x + 1, 23, 15, x + 2, 24, 15, light);
// Subtle vertical grain on the front face.
for (const z of [2, 8]) {
box(x + 1, 22, z, x + 1, 22, z + 2, wood);
}
// Nail heads at both rail joints.
set(x + 1, 22, 6, nail);
set(x + 1, 22, 12, nail);
}import { draw } from "./assets/voxel";
import { nivelCercaDeMadera } from "./assets/nivel-cerca-de-madera";
// En cada cuadro: parado sobre (x, y), el centro de su base.
draw(ctx, nivelCercaDeMadera, 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 nivel-cerca-de-madera
# Con las herramientas de Fogón (conector)
add_assets({ slug: "<tu-juego>", ids: ["nivel-cerca-de-madera"] })
# Queda en client/assets/nivel-cerca-de-madera.ts
# https://fogon.page/object/nivel-cerca-de-madera