← Fiestas y NavidadObjeto 3Dfogon/mesa-de-fiesta
Mesa de fiesta
Arrastrá para girarlo// «Mesa de fiesta» · gpt-6-sol (medium)
// A long party table with a white tablecloth with a red runner: on top a roast chicken on a platter, a bowl of fruit salad, a stack of plates, glasses, a candle holder and a little cake, with two chairs pushed in at the long sides.
const cream = "#fffaf0", white = "#ffffff", shade = "#e4e9e7";
const red = "#d93843", brightRed = "#f15359", darkRed = "#a92336";
const green = "#23865b", lightGreen = "#39ad72", gold = "#f5c453";
// Four sturdy legs beneath the cloth.
for (const x of [8, 38]) for (const y of [17, 30]) {
box(x, y, 0, x + 2, y + 2, 17, "#805436");
box(x, y, 2, x + 2, y, 14, "#a97749");
box(x, y, 1, x + 2, y + 2, 2, "#68442f");
}
box(8, 17, 15, 40, 32, 17, "#a8784e");
// White tablecloth, with a hanging skirt and a softly varied top.
box(4, 13, 17, 43, 34, 19, shade);
box(5, 14, 19, 42, 33, 19, cream);
for (let x = 4; x <= 43; x++) {
const hem = 10 + (x % 5 === 0 ? 0 : x % 5 === 1 || x % 5 === 4 ? 1 : 2);
box(x, 13, hem, x, 14, 18, x % 7 === 0 ? shade : white);
box(x, 33, hem, x, 34, 18, x % 7 === 0 ? shade : white);
}
for (let y = 15; y <= 32; y++) {
const hem = 10 + (y % 5 === 0 ? 0 : y % 5 === 1 || y % 5 === 4 ? 1 : 2);
box(4, y, hem, 5, y, 18, y % 7 === 0 ? shade : white);
box(42, y, hem, 43, y, 18, y % 7 === 0 ? shade : white);
}
for (let x = 6; x <= 41; x++)
for (let y = 15; y <= 32; y++)
if (rand() < 0.085) set(x, y, 19, rand() < 0.5 ? white : "#f3f0e9");
// Red runner along the length of the table.
box(5, 22, 20, 42, 26, 20, red);
box(5, 22, 20, 42, 22, 20, brightRed);
box(5, 26, 20, 42, 26, 20, darkRed);
for (let x = 6; x <= 41; x += 4) {
set(x, 22, 20, gold);
set(x, 26, 20, gold);
}
box(5, 22, 15, 6, 26, 19, red);
box(41, 22, 15, 42, 26, 19, red);
box(5, 22, 15, 6, 22, 19, brightRed);
box(41, 22, 15, 42, 22, 19, brightRed);
for (const x of [5, 6, 41, 42])
for (const y of [22, 24, 26]) set(x, y, 15, gold);
// Two chairs tucked against opposite long sides.
function chair(x, front, c, light, dark) {
const backY = front ? 4 : 42;
const seatY0 = front ? 6 : 35;
const seatY1 = front ? 12 : 41;
for (const lx of [x, x + 7])
for (const ly of [seatY0 + 1, seatY1 - 1]) {
box(lx, ly, 0, lx + 1, ly + 1, 9, dark);
box(lx, ly, 2, lx, ly, 8, c);
}
box(x, seatY0, 9, x + 8, seatY1, 11, c);
box(x + 1, seatY0 + 1, 11, x + 7, seatY1 - 1, 11, light);
box(x, seatY0, 10, x + 8, seatY0, 11, dark);
box(x, backY, 10, x + 1, backY + 1, 23, dark);
box(x + 7, backY, 10, x + 8, backY + 1, 23, dark);
box(x + 1, backY, 16, x + 7, backY + 1, 21, c);
box(x + 2, backY, 17, x + 6, backY, 20, light);
box(x, backY, 22, x + 8, backY + 1, 23, c);
for (const bx of [x + 1, x + 7]) {
set(bx, backY, 24, gold);
set(bx, backY + 1, 24, "#ffe59b");
}
set(x + 4, backY, 19, gold);
set(x + 4, backY, 20, "#ffe59b");
}
chair(10, true, red, brightRed, darkRed);
chair(31, false, green, lightGreen, "#176044");
// Roast chicken on a silver-rimmed platter.
ellipsoid(13, 24, 21, 8, 5, 1, "#a8b9bb");
ellipsoid(13, 24, 22, 7, 4, 1, "#f6f5e9");
ellipsoid(12, 24, 24, 4.8, 3, 2.7, "#aa5b2e");
ellipsoid(12, 24, 25, 4.1, 2.7, 2.1, "#d98239");
ellipsoid(11, 23, 26, 2.6, 1.5, 0.7, "#f4b865");
ellipsoid(16, 22, 23, 2.4, 1.5, 1.5, "#b96a31");
ellipsoid(16, 22, 24, 1.9, 1.2, 0.8, "#e79843");
ellipsoid(9, 26, 23, 2, 1.4, 1.2, "#b96a31");
line(17, 21, 23, 19, 20, 23, 0, cream);
set(19, 19, 23, white);
set(19, 21, 23, white);
for (const [x, y] of [[7, 23], [8, 27], [17, 27], [19, 25]]) {
set(x, y, 22, lightGreen);
set(x, y, 23, green);
}
// Chunky turquoise fruit bowl with a colorful mound.
ellipsoid(24, 24, 21, 5, 4, 1, "#b7eeee");
ellipsoid(24, 24, 22, 4, 3, 1, "#41b9bc");
ellipsoid(24, 24, 23, 3.5, 2.5, 1, "#207d8b");
for (const [x, y, z, color] of [
[22, 23, 24, "#ee4d52"], [25, 23, 24, "#ffbb44"],
[23, 25, 25, "#ffdc59"], [26, 25, 24, "#e95693"],
[24, 22, 26, "#b48cdb"], [21, 25, 24, "#f4823d"],
[26, 22, 25, "#92c65c"], [24, 26, 24, "#ee5754"]
]) {
sphere(x, y, z, 1.2, color);
set(x, y - 1, z + 1, "#ffe5a2");
}
// A tidy stack of plates, with visible pale blue rims.
for (let z = 21; z <= 24; z++) {
ellipsoid(34, 29, z, 4, 2.8, 0.65, "#aabfc7");
ellipsoid(34, 29, z + 0.3, 3.2, 2, 0.5, white);
}
ellipsoid(34, 29, 25, 3, 1.8, 0.5, cream);
// Little frosted cake on its own gold stand.
ellipsoid(39, 24, 21, 4, 3, 0.7, gold);
cylinder(39, 24, 22, 2.8, 3, "#eeb1c7");
cylinder(39, 24, 24, 2.8, 1, "#fff8e8");
for (const [x, y] of [[37, 23], [39, 22], [41, 24], [38, 26], [40, 26]]) {
set(x, y, 25, white);
set(x, y, 26, "#e94455");
}
set(39, 24, 26, gold);
set(39, 24, 27, "#fff2a3");
// Tall golden candle holder, flame, and warm halo.
ellipsoid(29, 18, 21, 2, 1.5, 0.6, "#c58d36");
cylinder(29, 18, 22, 0.8, 3, gold);
ellipsoid(29, 18, 25, 1.8, 1.2, 0.6, "#ffe08a");
cylinder(29, 18, 26, 1, 3, cream);
set(29, 17, 27, white);
set(29, 18, 29, "#ee7539");
set(29, 18, 30, "#ffda56");
set(29, 18, 31, "#fff3a1");
// Stemmed party glasses: sparkling juice inside clear pastel rims.
function glass(x, y, drink) {
ellipsoid(x, y, 21, 1.7, 1.3, 0.5, "#b2dfe1");
box(x, y, 22, x, y, 23, "#a9d6dc");
ellipsoid(x, y, 24, 1.6, 1.4, 0.6, drink);
for (let z = 24; z <= 26; z++) {
for (let dx = -1; dx <= 1; dx++)
for (let dy = -1; dy <= 1; dy++)
if (Math.abs(dx) + Math.abs(dy) >= 1)
set(x + dx, y + dy, z, (dx === -1 || dy === -1) ? "#c9f5ef" : "#83cbd3");
}
set(x - 1, y, 27, white);
set(x, y - 1, 27, "#e6fffa");
set(x + 1, y, 27, "#7fc0cc");
set(x, y + 1, 27, "#9dd7dd");
}
glass(19, 18, "#f7b5a7");
glass(35, 18, "#f8d873");
glass(25, 30, "#c5a7ed");
// Tiny gold confetti scattered across the cloth.
for (const [x, y] of [[7, 18], [10, 31], [20, 32], [27, 15], [32, 16], [41, 31]])
set(x, y, 20, gold);import { draw } from "./assets/voxel";
import { mesaDeFiesta } from "./assets/mesa-de-fiesta";
// En cada cuadro: parado sobre (x, y), el centro de su base.
draw(ctx, mesaDeFiesta, 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 mesa-de-fiesta
# Con las herramientas de Fogón (conector)
add_assets({ slug: "<tu-juego>", ids: ["mesa-de-fiesta"] })
# Queda en client/assets/mesa-de-fiesta.ts
# https://fogon.page/object/mesa-de-fiesta