← Piezas de nivel 2Objeto 3Dfogon/nivel-puente-de-tablas
Puente de tablas
Arrastrá para girarlo// «Puente de tablas» · gpt-6-sol (medium)
// A modular rope plank bridge segment running along y that chains seamlessly: it spans the full y 0..47. A 32-wide (x 8..39) deck of separate wooden planks across x, each plank 3 blocks deep on y and 2 thick, with 1-block gaps between planks, at z 10..11; two thick beige rope rails along y at x 8 and x 39 at z 20, joined to the deck by thin vertical ropes every 8 blocks; short wooden posts under each end (y 0..3 and y 44..47) down to z 0. Warm brown planks in 3 shades.
// A 48-block-long bridge segment. Planks repeat every four blocks,
// leaving a one-block gap at the seam between segments.
const plankTops = ["#c98543", "#d9954d", "#e5a65b"];
for (let y = 0; y < 48; y += 4) {
const top = plankTops[(y / 4) % plankTops.length];
box(8, y, 10, 39, y + 2, 10, "#87502f");
box(8, y, 11, 39, y + 2, 11, top);
// Crisp, sparse wood grain that follows the length of each plank.
if ((y / 4) % 3 !== 1) {
const x = 14 + Math.floor(rand() * 8);
box(x, y + 1, 11, x + 5, y + 1, 11, "#bb7940");
}
box(8, y, 11, 9, y + 2, 11, "#b8753c");
box(38, y, 11, 39, y + 2, 11, "#b8753c");
}
// Four stout end posts reach the floor.
for (const y of [0, 44]) {
for (const x of [8, 37]) {
box(x, y, 0, x + 2, y + 3, 11, "#96582f");
box(x, y, 1, x + 2, y, 9, "#ad6937");
box(x, y, 0, x + 2, y + 3, 1, "#754425");
box(x, y, 12, x + 2, y + 3, 12, "#d38a46");
}
}
// Thin vertical rope hangers, including one at each segment boundary.
for (const y of [0, 8, 16, 24, 32, 40, 47]) {
for (const x of [8, 39]) {
box(x, y, 13, x, y, 19, "#caa467");
set(x, y, 16, "#eed49a");
set(x, y, 13, "#a98350");
}
}
// Continuous, chunky rails run all the way to both modular edges.
for (const x of [8, 38]) {
box(x, 0, 19, x + 1, 47, 19, "#b88d56");
box(x, 0, 20, x + 1, 47, 20, "#e7c78d");
for (let y = 2; y < 48; y += 5) {
box(x, y, 20, x + 1, y, 20, "#f3daa4");
set(x, y, 19, "#d3aa70");
}
}import { draw } from "./assets/voxel";
import { nivelPuenteDeTablas } from "./assets/nivel-puente-de-tablas";
// En cada cuadro: parado sobre (x, y), el centro de su base.
draw(ctx, nivelPuenteDeTablas, 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-puente-de-tablas
# Con las herramientas de Fogón (conector)
add_assets({ slug: "<tu-juego>", ids: ["nivel-puente-de-tablas"] })
# Queda en client/assets/nivel-puente-de-tablas.ts
# https://fogon.page/object/nivel-puente-de-tablas