← City3D assetfogon/farmacia
Farmacia
Drag to turn it// «Farmacia» · gpt-6-sol (medium)
// A pharmacy storefront: a clean white one-story shop with a big glass window and glass door facing -y, shelves of colorful products inside, a green sign on top reading FARMACIA, and a bright green cross sign sticking out sideways from the facade.
const white = "#f5f4e9";
const ivory = "#e8e7db";
const shadow = "#d0d4ce";
const green = "#146b47";
const darkGreen = "#104c37";
const gold = "#ffe38a";
// Sidewalk and tiled shop floor.
box(4, 7, 0, 43, 40, 0, "#bbbdb5");
for (let y = 8; y <= 40; y += 4)
line(4, y, 0, 43, y, 0, 0, "#d5d5cb");
for (let x = 5; x <= 43; x += 5)
line(x, 7, 0, x, 40, 0, 0, "#a9ada5");
box(6, 12, 1, 41, 38, 1, "#e6d9be");
for (let x = 9; x <= 39; x += 6)
line(x, 13, 1, x, 37, 1, 0, "#d2c6af");
// Solid walls, with a warm brick side facing the street.
box(6, 12, 2, 8, 38, 25, white);
box(39, 12, 2, 41, 38, 25, ivory);
box(7, 36, 2, 40, 38, 25, "#eee9db");
for (let y = 13; y <= 37; y += 3) {
line(42, y, 3, 42, y, 24, 0, "#b65e50");
line(42, y + 1, 3, 42, y + 1, 24, 0, "#ca7460");
line(42, y + 2, 3, 42, y + 2, 24, 0, "#a95649");
}
for (let z = 5; z <= 24; z += 4)
line(42, 12, z, 42, 38, z, 0, "#e39a79");
// Interior: visible product shelves behind the broad front window.
const products = [
"#f06468", "#ffbb4a", "#75c4ed", "#85d78b",
"#d69bea", "#f5dd69", "#ec9273", "#75c9b5"
];
for (const y of [20, 33]) {
for (const z of [6, 12, 18]) {
box(10, y, z, 35, y + 1, z, darkGreen);
box(10, y, z + 1, 35, y, z + 1, "#a7c7a2");
for (let x = 11; x <= 34; x += 3) {
const c = products[(x + y + z) % products.length];
box(x, y + 1, z + 1, x + 1, y + 1, z + 3, c);
set(x, y, z + 3, "#fff8e5");
if ((x + z) % 3 === 0) set(x + 1, y, z + 2, "#fff8e5");
}
}
}
box(19, 30, 2, 27, 32, 3, "#c6a07b");
box(20, 29, 4, 26, 31, 5, white);
box(22, 28, 6, 24, 29, 7, "#93d7ce");
// Front sill, columns, lintel, and roof.
box(6, 10, 2, 28, 12, 4, shadow);
box(6, 10, 5, 8, 12, 25, white);
box(27, 10, 5, 29, 12, 25, ivory);
box(39, 10, 2, 41, 12, 25, white);
box(6, 10, 24, 41, 12, 26, white);
box(6, 12, 25, 41, 38, 27, "#e7e8df");
box(5, 11, 26, 42, 39, 27, white);
box(5, 11, 27, 42, 39, 27, "#d5d9d1");
line(6, 11, 25, 41, 11, 25, 0, "#a9c9b3");
// Window and door frames. Open panes reveal the shelves; highlights suggest glass.
box(8, 9, 5, 27, 10, 5, darkGreen);
box(8, 9, 23, 27, 10, 23, darkGreen);
for (const x of [8, 17, 27])
box(x, 9, 5, x, 10, 23, green);
for (const x of [12, 21, 25]) {
line(x, 9, 18, x + 1, 9, 20, 0, "#bcece8");
set(x, 9, 10, "#c9f1ec");
}
line(9, 9, 15, 26, 9, 15, 0, "#a3d9d1");
box(30, 9, 2, 38, 10, 2, darkGreen);
box(30, 9, 23, 38, 10, 23, darkGreen);
for (const x of [30, 38])
box(x, 9, 3, x, 10, 23, green);
box(34, 9, 3, 34, 10, 23, darkGreen);
box(30, 9, 4, 38, 9, 4, "#a3d9d1");
for (let z = 7; z <= 20; z += 5) {
set(32, 9, z, "#bcece8");
set(36, 9, z + 1, "#bcece8");
}
box(32, 8, 11, 33, 8, 13, gold);
box(35, 8, 11, 36, 8, 13, gold);
box(30, 7, 1, 39, 10, 1, "#deded3");
line(30, 7, 1, 39, 7, 1, 0, "#f6f3e9");
// Chunky green fascia.
box(6, 9, 28, 41, 12, 35, green);
box(6, 8, 28, 41, 8, 28, darkGreen);
box(6, 8, 35, 41, 9, 35, "#268a5d");
line(7, 8, 29, 40, 8, 29, 0, gold);
line(7, 8, 34, 40, 8, 34, 0, "#79b983");
// Compact pixel lettering, read left to right from the front.
const letters = {
F: ["111", "100", "110", "100", "100"],
A: ["010", "101", "111", "101", "101"],
R: ["110", "101", "110", "101", "101"],
M: ["10001", "11011", "10101", "10001", "10001"],
C: ["011", "100", "100", "100", "011"],
I: ["111", "010", "010", "010", "111"]
};
let cursor = 8;
for (const ch of "FARMACIA") {
const glyph = letters[ch];
for (let row = 0; row < 5; row++)
for (let col = 0; col < glyph[row].length; col++)
if (glyph[row][col] === "1")
set(cursor + col, 7, 33 - row, "#fff4ce");
cursor += glyph[0].length + 1;
}
// Little fileteado-like corner flourishes.
for (const x of [7, 40]) {
set(x, 7, 31, "#f2a45d");
set(x, 7, 32, gold);
}
box(9, 11, 26, 11, 12, 26, "#f4c574");
box(36, 11, 26, 38, 12, 26, "#f4c574");
// Subtle irregularity on broad white wall areas.
forEach((x, y, z, color) => {
if ((color === white || color === ivory) && rand() < 0.035)
set(x, y, z, color === white ? "#e8e9df" : "#dcded4");
});
// Projecting pharmacy cross, animated independently from the building.
part("crossSign", [41, 8, 20]);
box(40, 7, 19, 42, 11, 21, darkGreen);
box(42, 5, 16, 46, 7, 24, darkGreen);
box(40, 5, 19, 46, 7, 21, darkGreen);
box(43, 4, 17, 45, 4, 23, "#22ff66");
box(41, 4, 19, 46, 4, 21, "#22ff66");
set(44, 3, 20, "#baffd2");
set(44, 3, 22, "#baffd2");
animate("crossSign", {
type: "colors",
palette: ["#22ff66", "#0f8a3a", "#7dffb0"],
pattern: "pulse",
glow: 0.9
});import { draw } from "./assets/voxel";
import { farmacia } from "./assets/farmacia";
// Every frame: standing on (x, y), the centre of its base.
draw(ctx, farmacia, 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 farmacia
# With Fogón's tools (connector)
add_assets({ slug: "<your-game>", ids: ["farmacia"] })
# It lands in client/assets/farmacia.ts
# https://fogon.page/object/farmacia