← Whole house3D assetfogon/cama-doble
Cama doble
Drag to turn it// «Cama doble» · gpt-6-sol (medium)
// A double bed seen from the foot end: a wide walnut wood frame with a tall padded headboard at the back (+y) in mustard fabric, a thick white mattress, a light blue duvet folded back at the top, two fat white pillows against the headboard and a striped throw blanket across the foot (-y). Short square wooden legs.
// Walnut legs and low, chunky bed frame
const walnut = "#765036";
const walnutLight = "#946944";
const walnutDark = "#593b2d";
for (const x of [6, 38]) {
for (const y of [9, 37]) {
box(x, y, 0, x + 4, y + 4, 5, walnutDark);
box(x, y, 1, x + 4, y + 1, 5, walnut);
}
}
box(5, 8, 5, 43, 41, 8, walnut);
box(5, 7, 5, 43, 9, 9, walnutDark); // footboard
box(5, 7, 9, 43, 7, 9, walnutLight);
box(5, 9, 6, 7, 40, 9, walnutDark);
box(41, 9, 6, 43, 40, 9, walnutDark);
box(6, 10, 9, 6, 39, 9, walnutLight);
box(42, 10, 9, 42, 39, 9, walnutLight);
// Tall padded headboard: walnut border around mustard cushions
box(5, 39, 5, 43, 42, 28, walnutDark);
box(5, 39, 9, 8, 42, 28, walnut);
box(40, 39, 9, 43, 42, 28, walnut);
box(5, 39, 27, 43, 42, 29, walnutLight);
box(6, 38, 12, 42, 39, 26, "#a77936");
for (let i = 0; i < 4; i++) {
const x0 = 9 + i * 8;
box(x0, 38, 13, x0 + 6, 38, 25, "#d2a94e");
box(x0 + 1, 37, 15, x0 + 5, 37, 24, "#dfb85e");
box(x0 + 1, 37, 13, x0 + 5, 37, 14, "#bd9040");
set(x0 + 3, 36, 19, "#a67a37"); // upholstered tuft
set(x0 + 3, 36, 20, "#f0cf7a");
}
box(8, 38, 12, 8, 38, 26, "#69472e");
box(39, 38, 12, 39, 38, 26, "#69472e");
// Thick white mattress, with a softly stepped top edge
box(8, 10, 9, 40, 38, 12, "#dce3e3");
box(8, 10, 12, 40, 38, 13, "#f5f5ef");
box(9, 11, 14, 39, 37, 14, "#fffdf4");
box(9, 10, 11, 39, 10, 11, "#c9d4d5");
box(8, 11, 10, 8, 37, 10, "#c7d0d0");
box(40, 11, 10, 40, 37, 10, "#c7d0d0");
// Light sky-blue duvet; the pale band is its turned-back top.
box(9, 17, 15, 39, 31, 15, "#92c9dc");
box(10, 18, 16, 38, 28, 16, "#a9d9e8");
box(9, 17, 14, 39, 17, 15, "#72adc5");
box(9, 29, 16, 39, 31, 16, "#d5eef0");
box(10, 30, 17, 38, 30, 17, "#f2f9f5");
box(9, 18, 16, 9, 27, 16, "#83bdd2");
box(39, 18, 16, 39, 27, 16, "#83bdd2");
// Two plump pillows against the headboard
function pillow(x0, x1) {
box(x0 + 1, 32, 15, x1 - 1, 37, 18, "#e3e8e6");
box(x0, 33, 16, x1, 36, 18, "#f5f7f2");
box(x0 + 2, 32, 17, x1 - 2, 37, 18, "#fffefa");
box(x0 + 2, 33, 19, x1 - 2, 36, 19, "#fffefa");
box(x0 + 1, 32, 16, x1 - 1, 32, 16, "#cddbdd");
box(x0 + 2, 32, 18, x1 - 2, 32, 18, "#e6eeee");
}
pillow(9, 23);
pillow(25, 39);
// Cheerful striped throw laid across the foot
box(9, 10, 15, 39, 17, 15, "#f2c8a6");
box(10, 11, 16, 38, 16, 16, "#f7d8ba");
for (const [y, color] of [
[11, "#e89983"],
[13, "#fff1d3"],
[15, "#e2a950"],
[17, "#fff1d3"]
]) {
box(9, y, 16, 39, y, 16, color);
}
box(10, 10, 14, 38, 10, 14, "#d98c78");
for (let x = 11; x <= 37; x += 4) {
box(x, 9, 13, x + 1, 9, 14, "#f7d8ba"); // short tassels
}
// Subtle walnut grain on the visible footboard
for (let i = 0; i < 20; i++) {
const x = 9 + Math.floor(rand() * 30);
const z = 6 + Math.floor(rand() * 3);
set(x, 7, z, rand() < 0.5 ? "#885d3b" : "#67452f");
}import { draw } from "./assets/voxel";
import { camaDoble } from "./assets/cama-doble";
// Every frame: standing on (x, y), the centre of its base.
draw(ctx, camaDoble, x, y, { size: 64, angle: 0, t: performance.now() / 1000 });
// size: its longest side, in px
// angle: turn on the floor, in radians
// t: seconds; if it moves, that animates it# In a terminal, in the game's folder
fogon assets add cama-doble
# With Fogón's tools (connector)
add_assets({ slug: "<your-game>", ids: ["cama-doble"] })
# It lands in client/assets/cama-doble.ts
# https://fogon.page/object/cama-doble