← Casa completaObjeto 3Dfogon/sofa-de-dos-cuerpos
Sofá de dos cuerpos
Arrastrá para girarlo// «Sofá de dos cuerpos» · gpt-6-sol (medium)
// A retro two-seat sofa in emerald green velvet: two plump seat cushions, a rounded back with button tufting, curved rolled arms and four thin tapered walnut legs. Two cream pillows in the corners.
const greenDark = "#125b49";
const green = "#18765b";
const greenLight = "#238a69";
const greenTop = "#319b76";
const seam = "#10513f";
const walnut = "#795034";
const walnutLight = "#a87449";
const cream = "#f5e9cf";
// Four slim, tapered walnut legs.
for (const x of [10, 38]) {
for (const y of [17, 32]) {
for (let z = 0; z <= 7; z++) {
const width = z < 3 ? 1 : z < 6 ? 2 : 3;
box(x - Math.floor(width / 2), y - Math.floor(width / 2), z,
x + Math.ceil(width / 2) - 1, y + Math.ceil(width / 2) - 1, z,
z < 2 ? walnut : walnutLight);
}
line(x - 1, y - 1, 2, x - 1, y - 1, 6, 0, walnut);
}
}
// Sturdy upholstered base, with a little exposed walnut beneath it.
box(9, 15, 7, 39, 34, 9, walnut);
box(9, 14, 9, 39, 34, 12, greenDark);
box(10, 13, 10, 38, 29, 12, green);
line(10, 13, 9, 38, 13, 9, 0, walnutLight);
// Rounded, generously padded back.
box(10, 29, 11, 38, 34, 21, greenDark);
ellipsoid(24, 32, 19, 17, 4, 9, greenDark);
ellipsoid(24, 30, 20, 16, 3, 8, green);
ellipsoid(24, 30, 24, 14, 2, 4, greenLight);
line(11, 32, 26, 37, 32, 26, 0, greenTop);
// Subtle diamond tufting and deep, round buttons on the front of the back.
for (const x of [16, 24, 32]) {
for (const z of [19, 24]) {
const offset = z === 24 ? 3 : 0;
const bx = x + (x === 32 ? -offset : x === 16 ? offset : 0);
set(bx, 27, z, seam);
set(bx, 26, z, greenDark);
set(bx, 25, z, "#b3ae71");
}
}
// Two separate, plump seat cushions. Dark undersides make the gap readable.
for (const cx of [17, 31]) {
ellipsoid(cx, 21, 12, 7, 9, 3, seam);
box(cx - 6, 15, 12, cx + 6, 27, 14, green);
ellipsoid(cx, 21, 14, 7, 8, 3, greenLight);
ellipsoid(cx, 20, 16, 5, 5, 1, greenTop);
line(cx - 5, 13, 13, cx + 5, 13, 13, 0, greenTop);
}
line(24, 14, 12, 24, 28, 12, 0, seam);
// Tall curved arm supports and thick rolled tops.
for (const x of [8, 40]) {
box(x - 3, 13, 9, x + 3, 33, 17, greenDark);
box(x - 2, 14, 12, x + 2, 31, 18, green);
cylinder(x, 13, 19, 4, 20, green, "y");
cylinder(x, 15, 20, 3, 17, greenLight, "y");
// The rounded scroll is especially visible at the front.
ellipsoid(x, 13, 19, 4, 3, 4, greenDark);
ellipsoid(x, 11, 20, 3, 2, 3, greenLight);
ellipsoid(x, 9, 19, 2, 1, 2, green);
set(x, 8, 19, greenDark);
set(x - 1, 9, 20, greenTop);
}
// Soft cream pillows tucked into each back corner.
for (const x of [14, 34]) {
ellipsoid(x, 26, 20, 4, 3, 5, "#d5c8aa");
ellipsoid(x, 25, 21, 4, 3, 5, cream);
ellipsoid(x - 1, 23, 23, 2, 1, 2, "#fff7e6");
line(x - 2, 22, 19, x + 2, 22, 19, 0, "#e5d8bb");
}
// Gentle irregular velvet highlights without disturbing the pillows or wood.
forEach((x, y, z, color) => {
if (color === green && rand() < 0.045) set(x, y, z, greenLight);
else if (color === greenLight && rand() < 0.055) set(x, y, z, greenTop);
});import { draw } from "./assets/voxel";
import { sofaDeDosCuerpos } from "./assets/sofa-de-dos-cuerpos";
// En cada cuadro: parado sobre (x, y), el centro de su base.
draw(ctx, sofaDeDosCuerpos, 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 sofa-de-dos-cuerpos
# Con las herramientas de Fogón (conector)
add_assets({ slug: "<tu-juego>", ids: ["sofa-de-dos-cuerpos"] })
# Queda en client/assets/sofa-de-dos-cuerpos.ts
# https://fogon.page/object/sofa-de-dos-cuerpos