← BásicoObjeto 3Dfogon/taburete-de-bar
Taburete de bar
Arrastrá para girarlo// «Taburete de bar» · gpt-6-sol (medium)
// Bar stool («Taburete de bar»).
const cx = 24, cy = 24;
// Circular wooden footrest, wrapped around the four legs.
for (let x = 4; x <= 44; x++) {
for (let y = 4; y <= 44; y++) {
const r = Math.hypot(x - cx, y - cy);
if (r >= 16.5 && r <= 19.1) {
set(x, y, 10, "#79532e");
set(x, y, 11, rand() < 0.15 ? "#a97638" : "#96682f");
set(x, y, 12, rand() < 0.22 ? "#f0bf70" : "#d5a052");
if (r > 18.1 && rand() < 0.35) set(x, y, 13, "#dda855");
}
}
}
// Dark timber framing immediately beneath the seat.
for (const yy of [12, 36]) box(11, yy - 1, 35, 37, yy + 1, 37, "#344447");
for (const xx of [12, 36]) box(xx - 1, 11, 35, xx + 1, 37, 37, "#344447");
// Four straight, chunky legs.
for (const lx of [12, 36]) {
for (const ly of [12, 36]) {
box(lx - 1, ly - 1, 0, lx + 1, ly + 1, 0, "#253335");
box(lx - 1, ly - 1, 1, lx + 1, ly + 1, 2, "#be985f");
box(lx - 1, ly - 1, 3, lx + 1, ly + 1, 36, "#30474b");
for (let z = 4; z <= 35; z++) {
for (let dx = -1; dx <= 1; dx++) {
for (let dy = -1; dy <= 1; dy++) {
let color = dy === -1 ? "#405b5c" : "#344b4d";
if (dx === 1 || dy === 1) color = "#293d40";
if (rand() < 0.09) color = "#4b6867";
if (rand() < 0.055) color = "#25383c";
set(lx + dx, ly + dy, z, color);
}
}
}
box(lx - 1, ly - 1, 36, lx + 1, ly + 1, 38, "#344a4b");
set(lx - 1, ly - 1, 2, "#e0b977");
set(lx, ly - 1, 1, "#dfb574");
}
}
// Thick round seat: dark underside, warm golden sides, and a raised rim.
for (let x = 3; x <= 45; x++) {
for (let y = 3; y <= 45; y++) {
const r = Math.hypot(x - cx, y - cy);
if (r > 20.2) continue;
if (r <= 18.5) set(x, y, 37, "#704722");
if (r <= 19.5) set(x, y, 38, r > 18 ? "#865327" : "#9a602c");
if (r <= 20.1) set(x, y, 39, r > 18.5 ? "#a96930" : "#b87934");
set(x, y, 40, rand() < 0.13 ? "#c7853c" : "#d59344");
set(x, y, 41, rand() < 0.15 ? "#efaf56" : "#daa04e");
if (r < 16.8) {
// Broad, subtly alternating planks across the top.
const plank = Math.floor((y - 7) / 3);
let color = plank % 2 ? "#e8aa55" : "#e3a24d";
if (rand() < 0.13) color = "#f3bc69";
if (rand() < 0.055) color = "#c9873c";
set(x, y, 42, color);
} else if (r < 18.0) {
set(x, y, 42, rand() < 0.2 ? "#ad702f" : "#96602b");
} else {
set(x, y, 42, rand() < 0.18 ? "#f3b75c" : "#d99441");
set(x, y, 43, rand() < 0.2 ? "#f3bb65" : "#e5a34c");
if (r > 19.2 && rand() < 0.3) set(x, y, 44, "#e8a950");
}
}
}
// Fine grain and short plank seams, kept inside the recessed center.
for (let y = 10; y <= 37; y += 3) {
for (let x = 9; x <= 39; x++) {
if (Math.hypot(x - cx, y - cy) < 15.6 && rand() < 0.76)
set(x, y, 43, rand() < 0.35 ? "#f5bd70" : "#edaf5e");
}
}
for (let i = 0; i < 25; i++) {
const x = 10 + Math.floor(rand() * 29);
const y = 10 + Math.floor(rand() * 29);
if (Math.hypot(x - cx, y - cy) < 15)
set(x, y, 43, rand() < 0.5 ? "#d08d42" : "#f3bd70");
}import { draw } from "./assets/voxel";
import { tabureteDeBar } from "./assets/taburete-de-bar";
// En cada cuadro: parado sobre (x, y), el centro de su base.
draw(ctx, tabureteDeBar, 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 taburete-de-bar
# Con las herramientas de Fogón (conector)
add_assets({ slug: "<tu-juego>", ids: ["taburete-de-bar"] })
# Queda en client/assets/taburete-de-bar.ts
# https://fogon.page/object/taburete-de-bar