← BásicoObjeto 3Dfogon/silla-windsor-v6
Silla Windsor
Arrastrá para girarlo// «Silla Windsor» · gpt-6-sol (medium)
// Windsor chair («Silla Windsor»). One of several variations of this object: follow the reference picture closely.
// Windsor chair in warm, honey-colored wood.
const woodDark = "#88663f";
const woodMid = "#b18a57";
const woodLight = "#d1a86e";
const woodHighlight = "#e2bc80";
const seatEdge = "#a77e4b";
const seatTop = "#efd099";
const seatLight = "#f7dba7";
// Four splayed, tapered legs.
const legs = [
[[14, 15, 20], [12, 12, 11], [9, 8, 0]],
[[34, 15, 20], [36, 12, 11], [41, 8, 0]],
[[14, 31, 20], [12, 35, 11], [9, 39, 0]],
[[34, 31, 20], [36, 35, 11], [41, 39, 0]]
];
for (const [top, knee, foot] of legs) {
line(...top, ...knee, 1.5, woodDark);
line(...top, ...knee, 1.0, woodMid);
line(...knee, ...foot, 1.15, woodMid);
line(...knee, ...foot, 0.65, woodLight);
box(foot[0] - 1, foot[1] - 1, 0,
foot[0] + 1, foot[1] + 1, 1, woodDark);
set(foot[0], foot[1], 1, woodMid);
}
// The low H-shaped stretcher assembly.
line(12, 12, 9, 36, 12, 9, 1.0, woodDark);
line(12, 13, 10, 36, 13, 10, 0.75, woodLight);
line(12, 35, 9, 36, 35, 9, 1.0, woodDark);
line(12, 34, 10, 36, 34, 10, 0.75, woodLight);
line(12, 12, 10, 12, 35, 10, 1.0, woodMid);
line(36, 12, 10, 36, 35, 10, 1.0, woodMid);
line(12, 23, 10, 36, 23, 10, 0.75, woodLight);
// Rails tucked just beneath the seat.
line(14, 15, 18, 34, 15, 18, 1.0, woodDark);
line(14, 31, 18, 34, 31, 18, 1.0, woodDark);
line(14, 15, 18, 14, 31, 18, 1.0, woodMid);
line(34, 15, 18, 34, 31, 18, 1.0, woodMid);
// Rounded, broad saddle seat. The top is deliberately lighter than its rim.
for (let y = 11; y <= 35; y++) {
for (let x = 9; x <= 39; x++) {
const d = ((x - 24) / 15) ** 2 + ((y - 23) / 12.2) ** 2;
if (d > 1) continue;
const edge = d > 0.78;
for (let z = 20; z <= 22; z++) {
set(x, y, z, z === 20 ? seatEdge :
edge ? woodMid : woodLight);
}
if (d < 0.84) {
const grain = rand();
set(x, y, 23,
grain < 0.12 ? woodHighlight :
grain < 0.30 ? seatLight : seatTop);
} else {
set(x, y, 23, woodLight);
}
}
}
// Subtle long grain on the saddle's broad upper surface.
for (let x = 14; x <= 34; x += 4) {
for (let y = 16; y <= 29; y++) {
if (get(x, y, 23) && rand() > 0.36)
set(x, y, 23, rand() > 0.5 ? "#f2d49f" : "#e9c58c");
}
}
// The slim spindles sit behind the seat, inside the arched bow.
const spindles = [
[14, 30, 38, 13, 32],
[18, 32, 41, 18, 34],
[22, 32, 43, 22, 35],
[26, 32, 43, 26, 35],
[30, 32, 41, 30, 34],
[34, 30, 38, 35, 32]
];
for (const [bx, by, height, tx, ty] of spindles) {
line(bx, by, 23, tx, ty, height, 0.85, woodDark);
line(bx, by - 1, 25, tx, ty - 1, height - 1, 0.55, woodLight);
set(tx, ty, height, woodHighlight);
}
// Continuous steam-bent Windsor bow, sweeping from either side of the seat.
const bow = [
[11, 25, 22], [10, 27, 29], [11, 30, 35],
[14, 33, 39], [18, 34, 42], [22, 35, 44],
[26, 35, 44], [30, 34, 42], [34, 33, 39],
[38, 30, 35], [39, 27, 29], [38, 25, 22]
];
for (let i = 0; i < bow.length - 1; i++) {
const a = bow[i], b = bow[i + 1];
line(...a, ...b, 1.45, woodDark);
line(a[0], a[1] - 1, a[2],
b[0], b[1] - 1, b[2], 0.95, woodMid);
line(a[0], a[1] - 1, a[2] + 1,
b[0], b[1] - 1, b[2] + 1, 0.4, woodHighlight);
}import { draw } from "./assets/voxel";
import { sillaWindsorV6 } from "./assets/silla-windsor-v6";
// En cada cuadro: parado sobre (x, y), el centro de su base.
draw(ctx, sillaWindsorV6, 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 silla-windsor-v6
# Con las herramientas de Fogón (conector)
add_assets({ slug: "<tu-juego>", ids: ["silla-windsor-v6"] })
# Queda en client/assets/silla-windsor-v6.ts
# https://fogon.page/object/silla-windsor-v6