← BásicoObjeto 3Dfogon/silla-cantilever
Silla cantilever
Arrastrá para girarlo// «Silla cantilever» · gpt-6-sol (medium)
// Cantilever chair («Silla cantilever»).
// Cantilever chair: warm wooden seat and back on a polished steel frame.
const woodDark = "#754020";
const woodEdge = "#9b5429";
const woodMid = "#bd7239";
const woodLight = "#d58a48";
const woodHighlight = "#e6a15b";
const groove = "#713d23";
function steel(x0, y0, z0, x1, y1, z1) {
line(x0, y0, z0, x1, y1, z1, 1, "#74858a");
line(x0, y0, z0, x1, y1, z1, 0, "#c5d0cd");
}
// Two open-ended floor runners, rising at the front into the seat supports.
for (const x of [9, 40]) {
steel(x, 10, 1, x, 37, 1);
steel(x, 10, 1, x, 10, 18);
steel(x, 10, 18, x, 32, 19);
// Dark, squared-off ends make the tubular frame legible.
set(x, 38, 1, "#526166");
set(x, 10, 0, "#66777b");
}
// Wooden seat: substantial layered front and side edges.
box(11, 10, 19, 38, 32, 21, woodDark);
box(11, 10, 21, 38, 32, 22, woodEdge);
box(12, 11, 23, 37, 31, 23, woodMid);
// Narrow bands along the exposed front lip.
box(12, 10, 20, 37, 10, 20, "#c47a3c");
box(12, 10, 22, 37, 10, 22, "#e1964d");
box(12, 11, 23, 37, 11, 23, woodLight);
box(12, 31, 23, 37, 31, 23, "#a85c30");
for (let y = 12; y <= 30; y++) {
set(12, y, 23, "#e09a52");
set(37, y, 23, "#a95f32");
}
// Broad, subtly varied polished surface.
for (let x = 13; x <= 36; x++) {
for (let y = 12; y <= 30; y++) {
const n = rand();
set(x, y, 23, n < 0.09 ? woodHighlight : n < 0.21 ? "#c47a3d" : woodLight);
}
}
// Sparse lengthwise wood grain and the distinctive dark inset joint.
for (let x = 15; x <= 34; x += 5)
for (let y = 14; y <= 29; y++)
if (rand() < 0.38) set(x, y, 23, "#cc8040");
line(17, 19, 24, 17, 26, 24, 0, "#89502c");
line(17, 26, 24, 32, 26, 24, 0, "#89502c");
line(32, 26, 24, 32, 20, 24, 0, "#89502c");
// Backrest leans gently rearward. Its blocks have a dark backing
// and individually raised, brick-like upholstered-wood panels.
function backY(z) {
return 30 + Math.floor((z - 22) * 0.27);
}
for (let z = 23; z <= 41; z++) {
const y = backY(z);
box(12, y, z, 37, y + 1, z, woodDark);
box(12, y - 1, z, 37, y - 1, z, woodEdge);
}
const rows = [[24, 27], [28, 31], [32, 35], [36, 39], [40, 41]];
for (let row = 0; row < rows.length; row++) {
const [z0, z1] = rows[row];
const panels = row % 2
? [[13, 19], [21, 29], [31, 36]]
: [[13, 20], [22, 29], [31, 36]];
for (const [x0, x1] of panels) {
for (let z = z0; z <= z1; z++) {
const y = backY(z);
for (let x = x0; x <= x1; x++) {
let color = rand() < 0.13 ? "#c27a40" : woodMid;
if (z === z0) color = woodHighlight;
if (z === z1 || x === x1) color = "#98552c";
if (x === x0) color = "#d48a48";
set(x, y - 2, z, color);
}
}
}
}
// Steel rails surround the back without covering its wooden face.
for (const x of [9, 40]) {
for (let z = 21; z <= 42; z++) {
const y = backY(z) + 1;
steel(x, y, z, x, y, z);
}
steel(x, backY(42) + 1, 42, x, 36, 43);
}
steel(9, 36, 43, 40, 36, 43);
// Small gleaming edges and darker joints on the chrome tubing.
for (const x of [9, 40]) {
line(x, 12, 3, x, 34, 3, 0, "#e0e6dd");
line(x, 10, 5, x, 10, 16, 0, "#e0e6dd");
line(x, 14, 20, x, 30, 20, 0, "#e2e7df");
set(x, 10, 19, "#53656a");
}
line(12, 36, 44, 37, 36, 44, 0, "#e2e7df");import { draw } from "./assets/voxel";
import { sillaCantilever } from "./assets/silla-cantilever";
// En cada cuadro: parado sobre (x, y), el centro de su base.
draw(ctx, sillaCantilever, 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-cantilever
# Con las herramientas de Fogón (conector)
add_assets({ slug: "<tu-juego>", ids: ["silla-cantilever"] })
# Queda en client/assets/silla-cantilever.ts
# https://fogon.page/object/silla-cantilever