← CiudadObjeto 3Dfogon/hospital
Hospital
Arrastrá para girarlo// «Hospital» · gpt-6-sol (medium)
// A city hospital: a large white building with rows of windows, a wide covered emergency entrance at the front (-y) with a red sign reading GUARDIA and glass doors, a big red cross on the facade, and a helipad with an H on the roof.
const white = "#f1f0e8";
const light = "#faf9f3";
const shadow = "#d8dcd8";
const trim = "#bcc9c8";
const red = "#cc3943";
const darkRed = "#a92c37";
const glass = "#68b9ca";
const darkGlass = "#347b91";
const frame = "#4b6671";
const asphalt = "#626b70";
// Sidewalk and hospital footprint.
box(3, 3, 0, 44, 43, 0, "#d7d3c8");
box(6, 14, 1, 41, 40, 30, white);
box(6, 13, 1, 41, 13, 30, light);
box(5, 14, 1, 5, 40, 30, shadow);
box(42, 14, 1, 42, 40, 30, shadow);
box(6, 41, 1, 41, 41, 30, shadow);
// Subtle variation on the broad walls.
for (let x = 6; x <= 41; x++)
for (let z = 2; z <= 29; z++)
if (rand() < 0.075) set(x, 13, z, "#e8eae4");
for (let y = 15; y <= 39; y++)
for (let z = 2; z <= 29; z++)
if (rand() < 0.055) {
set(5, y, z, "#e0e4e0");
set(42, y, z, "#e0e4e0");
}
// Chunky base, floor bands, and roof cornice.
box(5, 13, 1, 42, 13, 2, trim);
for (const z of [9, 16, 23, 30]) {
box(5, 12, z, 42, 13, z, shadow);
box(5, 14, z, 5, 41, z, trim);
box(42, 14, z, 42, 41, z, trim);
}
box(5, 13, 31, 42, 41, 31, light);
box(5, 13, 32, 42, 13, 33, white);
box(5, 41, 32, 42, 41, 33, white);
box(5, 14, 32, 5, 40, 33, white);
box(42, 14, 32, 42, 40, 33, white);
// Repeated windows, with dark recesses, pale glass, and crisp frames.
function frontWindow(x, z) {
box(x, 11, z, x + 3, 12, z + 4, frame);
box(x + 1, 10, z + 1, x + 2, 10, z + 3, darkGlass);
box(x + 1, 9, z + 3, x + 2, 9, z + 3, glass);
box(x, 10, z - 1, x + 3, 12, z - 1, light);
}
for (const z of [4, 11, 18, 25])
for (const x of [8, 14, 32, 38])
frontWindow(x, z);
for (const x of [21, 27]) frontWindow(x, 18);
for (const z of [4, 11, 18, 25])
for (const y of [18, 25, 32]) {
for (const x of [4, 43]) {
box(x, y, z, x, y + 3, z + 4, frame);
box(x + (x === 4 ? -1 : 1), y + 1, z + 1,
x + (x === 4 ? -1 : 1), y + 2, z + 3, glass);
}
}
// Large red medical cross high on the front facade.
box(23, 10, 22, 26, 12, 29, darkRed);
box(19, 10, 24, 30, 12, 27, darkRed);
box(23, 9, 22, 26, 9, 29, red);
box(19, 9, 24, 30, 9, 27);
// Wide recessed-looking glass emergency doors.
box(17, 12, 1, 31, 12, 8, frame);
box(18, 11, 2, 30, 11, 7, darkGlass);
box(19, 10, 3, 22, 10, 6, glass);
box(26, 10, 3, 29, 10, 6, glass);
box(24, 10, 1, 24, 11, 8, frame);
box(18, 10, 1, 30, 11, 1, "#a9b9b6");
set(22, 9, 4, "#e6f5ed");
set(26, 9, 4, "#e6f5ed");
box(17, 12, 8, 31, 13, 9, red);
// Deep covered entrance, with a bright red GUARDIA sign.
box(9, 5, 8, 39, 14, 9, shadow);
box(9, 5, 9, 39, 14, 9, light);
for (const x of [10, 38]) {
box(x, 5, 1, x + 1, 6, 8, "#e5e7df");
box(x, 5, 1, x + 1, 6, 2, trim);
}
box(9, 4, 10, 39, 5, 16, darkRed);
box(10, 3, 11, 39, 3, 15, red);
box(9, 4, 16, 39, 5, 16, "#f2b8a0");
// Five-high pixel lettering on the front of the sign.
const letters = {
G: ["111", "100", "101", "101", "111"],
U: ["101", "101", "101", "101", "111"],
A: ["111", "101", "111", "101", "101"],
R: ["110", "101", "110", "101", "101"],
D: ["110", "101", "101", "101", "110"],
I: ["111", "010", "010", "010", "111"]
};
"GUARDIA".split("").forEach((letter, i) => {
const glyph = letters[letter];
for (let row = 0; row < 5; row++)
for (let col = 0; col < 3; col++)
if (glyph[row][col] === "1")
set(11 + i * 4 + col, 2, 15 - row, "#fff4dc");
});
// Entry paving and small dark-green planters.
box(16, 4, 0, 32, 13, 0, "#e7ddd0");
for (const x of [7, 40]) {
box(x - 1, 7, 1, x + 1, 9, 2, "#295b4b");
box(x, 8, 3, x, 8, 4, "#416d50");
sphere(x, 8, 5, 2, "#548b60");
set(x, 6, 5, "#75a971");
}
// Raised rooftop helipad and its high-contrast H.
const cx = 24, cy = 28;
for (let x = 13; x <= 35; x++)
for (let y = 17; y <= 39; y++) {
const d = Math.hypot(x - cx, y - cy);
if (d <= 10.5) set(x, y, 32, asphalt);
if (d > 8.1 && d <= 9.3) set(x, y, 33, "#f8f5e8");
}
box(20, 23, 33, 21, 33, 33, light);
box(27, 23, 33, 28, 33, 33, light);
box(22, 27, 33, 26, 29, 33, light);import { draw } from "./assets/voxel";
import { hospital } from "./assets/hospital";
// En cada cuadro: parado sobre (x, y), el centro de su base.
draw(ctx, hospital, 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 hospital
# Con las herramientas de Fogón (conector)
add_assets({ slug: "<tu-juego>", ids: ["hospital"] })
# Queda en client/assets/hospital.ts
# https://fogon.page/object/hospital