← BásicoObjeto 3Dfogon/acordeon
Acordeón
Arrastrá para girarlo// «Acordeón» · gpt-6-sol (medium)
// Accordion («Acordeón»).
// Accordion: red end housings, a pleated bellows, piano keys and bass buttons.
const red = "#a92330", redDark = "#711924", redLight = "#e65059";
const gold = "#c6a46a", cream = "#eee0b8", ink = "#211d1c";
// Small feet beneath the end housings.
for (const x of [8, 17, 38, 42]) {
box(x, 16, 0, x + 2, 20, 2, ink);
box(x, 28, 0, x + 2, 32, 2, ink);
}
// Left red housing.
box(5, 11, 3, 19, 34, 34, redDark);
box(6, 10, 5, 15, 11, 32, red);
box(5, 12, 5, 6, 33, 32, "#8d202b");
box(7, 12, 6, 14, 13, 31, "#a62832");
for (let z = 7; z <= 31; z++)
for (let x = 8; x <= 13; x++)
if (rand() < 0.055) set(x, 9, z, rand() < 0.5 ? "#ad2b34" : "#95212b");
box(5, 11, 33, 19, 34, 35, "#cc3942");
box(6, 12, 35, 18, 33, 36, redLight);
box(5, 10, 32, 19, 11, 33, "#6b2225");
box(5, 33, 33, 19, 34, 34, "#722027");
box(5, 10, 3, 16, 11, 4, "#592127");
// Pale frame around the piano keyboard at the front-right of the left end.
box(15, 8, 3, 20, 12, 32, "#806538");
box(16, 7, 4, 19, 8, 31, gold);
box(16, 6, 5, 18, 7, 30, cream);
box(15, 7, 3, 20, 9, 4, "#ddc998");
box(15, 7, 31, 20, 10, 32, "#e3cf9c");
box(15, 8, 4, 15, 11, 31, "#f2e4bb");
// Individual white piano keys and their fine dark dividers.
for (let z = 5; z <= 29; z += 2) {
box(16, 5, z, 19, 6, z + 1, z % 4 === 1 ? "#fff0cc" : "#e9dbb6");
box(16, 5, z + 1, 19, 5, z + 1, "#b5a47f");
}
// Raised black keys, in the repeating piano-key pattern.
for (let z = 7; z <= 29; z += 2) {
if ([0, 2, 4, 7, 9].includes((z - 7) % 14)) {
box(18, 3, z, 21, 5, z + 1, "#252426");
box(18, 3, z + 1, 20, 3, z + 1, "#414043");
}
}
box(19, 7, 5, 20, 10, 30, "#7d602f");
// Solid bellows core; closely spaced light and dark vertical pleats.
box(20, 13, 6, 35, 32, 33, "#4c4438");
for (let x = 20; x <= 35; x++) {
const fold = x % 2 === 0;
box(x, 12, 6, x, 32, 33, fold ? "#b3a280" : "#635b4b");
box(x, 12, 7, x, 12, 32, fold ? "#d9c59b" : "#766b54");
box(x, 13, 33, x, 32, 34, fold ? "#e5d2a4" : "#554b3e");
box(x, 14, 34, x, 31, 35, fold ? "#d8c7a1" : "#776b51");
if (fold) {
box(x, 12, 7, x, 12, 10, "#9d8864");
box(x, 12, 28, x, 12, 32, "#ecd8aa");
}
}
box(20, 32, 32, 35, 33, 34, "#2c2927");
box(20, 12, 5, 35, 32, 6, "#4d4134");
// Narrow connecting rails at either end of the bellows.
box(19, 12, 5, 20, 33, 34, "#826536");
box(19, 12, 32, 20, 33, 33, "#e0c587");
box(35, 12, 5, 36, 33, 34, "#674329");
box(35, 12, 32, 36, 33, 33, "#d4b576");
// Right red end housing and its inset, dark bass-button board.
box(36, 12, 3, 44, 33, 35, redDark);
box(37, 13, 5, 43, 32, 33, "#92222c");
box(36, 11, 4, 44, 13, 34, gold);
box(37, 10, 6, 43, 11, 32, "#34302b");
box(37, 10, 5, 43, 11, 6, "#d3b676");
box(37, 10, 32, 43, 11, 33, "#e0c589");
box(36, 12, 3, 44, 33, 4, "#693027");
box(36, 12, 34, 44, 33, 35, "#e35058");
box(37, 13, 36, 43, 32, 37, "#f4676d");
box(37, 32, 34, 44, 33, 35, "#622027");
box(43, 12, 5, 44, 32, 33, "#b32932");
// Two staggered rows of protruding pearl bass buttons.
for (let row = 0; row < 10; row++) {
const z = 8 + row * 2.5;
for (const col of [0, 1]) {
const x = col ? 42 : 38;
const zz = Math.round(z + (col ? 1 : 0));
box(x, 9, zz, x + 1, 10, zz + 1, "#80694c");
box(x, 7, zz, x + 1, 9, zz + 1,
(row + col) % 3 === 0 ? "#f6e9c9" : "#d8d2b8");
set(x, 7, zz + 1, "#fff3d7");
}
}
// Gold edging and red strips beside the button board.
box(36, 9, 6, 36, 12, 32, "#e0c58b");
box(44, 10, 6, 44, 13, 32, "#6b2527");
box(36, 10, 33, 44, 13, 34, "#d2af70");
// Raised black carrying handle on the left top.
box(10, 19, 36, 12, 23, 39, "#292525");
box(17, 19, 36, 19, 23, 39, "#292525");
box(11, 19, 39, 18, 23, 40, "#242224");
box(12, 19, 40, 17, 22, 40, "#383333");
box(10, 18, 36, 12, 20, 36, "#49403a");
box(17, 18, 36, 19, 20, 36, "#49403a");
// Dark leather strap crossing the rear of the bellows.
line(19, 32, 36, 23, 32, 39, 1, "#292325");
line(23, 32, 39, 27, 32, 39, 1, "#292325");
line(27, 32, 39, 30, 32, 36, 1, "#292325");import { draw } from "./assets/voxel";
import { acordeon } from "./assets/acordeon";
// En cada cuadro: parado sobre (x, y), el centro de su base.
draw(ctx, acordeon, 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 acordeon
# Con las herramientas de Fogón (conector)
add_assets({ slug: "<tu-juego>", ids: ["acordeon"] })
# Queda en client/assets/acordeon.ts
# https://fogon.page/object/acordeon