← CiudadObjeto 3Dfogon/panaderia
Panadería
Arrastrá para girarlo// «Panadería» · gpt-6-sol (medium)
// A cozy bakery shop: a one-story storefront with a cream facade and brown trim, a big display window (-y) with trays of medialunas, bread loaves and cakes, a striped brown and white awning, a sign on top reading PANADERIA with a little bread icon, and a chalkboard menu on the sidewalk.
const C = {
cream: "#f5e8cb",
creamLight: "#fff2d9",
creamShade: "#e7d4b1",
brick: "#b9684d",
brickLight: "#ca7858",
brown: "#70452f",
darkBrown: "#493125",
wood: "#98633d",
awning: "#754b38",
awningLight: "#fff4df",
glass: "#456b70",
glassLight: "#7ba4a0",
gold: "#e8ad4d",
bread: "#c78136",
breadLight: "#efb968",
chalk: "#e8e7ce",
green: "#244c3d"
};
// Sidewalk and foundation.
box(2, 2, 0, 45, 42, 0, "#c7c3b7");
box(2, 2, 0, 45, 11, 0, "#dcd8cc");
for (let x = 3; x <= 44; x++) {
for (let y = 3; y <= 41; y++) {
if (rand() < 0.055) {
set(x, y, 0, y < 12 ? "#e9e5d9" : "#b8b4a9");
}
}
}
for (let x = 12; x <= 44; x += 10) {
line(x, 2, 0, x, 11, 0, 0, "#c5c0b3");
}
box(5, 12, 1, 42, 39, 2, "#746653");
box(5, 12, 3, 42, 14, 31, C.cream);
box(5, 15, 3, 7, 39, 31, C.creamShade);
box(40, 15, 3, 42, 39, 31, C.creamShade);
box(8, 37, 3, 39, 39, 31, C.brick);
box(8, 15, 29, 39, 36, 31, C.cream);
box(5, 12, 32, 42, 39, 33, C.brown);
// Brick accents on the side.
for (let z = 5; z < 29; z += 4) {
for (let y = 18 + (z % 8 ? 2 : 0); y < 37; y += 7) {
box(42, y, z, 42, y + 4, z + 2, C.brick);
set(42, y + 1, z + 2, C.brickLight);
}
}
// Lightly textured cream facade.
for (let x = 5; x <= 42; x++) {
for (let z = 4; z <= 30; z++) {
if (get(x, 12, z) === C.cream && rand() < 0.065) {
set(x, 12, z, rand() < 0.5 ? C.creamLight : C.creamShade);
}
}
}
// Display window and recessed entrance.
box(8, 12, 8, 29, 14, 23, null);
box(33, 12, 3, 39, 14, 23, null);
box(8, 14, 8, 29, 14, 23, C.glass);
box(9, 14, 9, 28, 14, 12, "#3e5957");
box(10, 13, 19, 11, 13, 22, C.glassLight);
box(12, 13, 21, 16, 13, 21, "#9dbeb4");
box(7, 10, 7, 30, 11, 8, C.brown);
box(7, 10, 23, 30, 12, 24, C.brown);
box(7, 10, 8, 8, 12, 23, C.brown);
box(29, 10, 8, 30, 12, 23, C.brown);
box(18, 11, 8, 18, 12, 23, C.wood);
box(8, 10, 16, 29, 11, 16, C.wood);
box(8, 10, 7, 29, 11, 7, "#b58250");
box(9, 11, 9, 17, 11, 9, "#786045");
box(19, 11, 9, 28, 11, 9, "#786045");
box(9, 11, 17, 28, 11, 17, "#786045");
// Bread loaves on the lower display shelf.
for (const x of [10, 14, 22, 26]) {
box(x, 10, 10, x + 2, 11, 11, C.bread);
box(x, 10, 12, x + 2, 10, 12, C.breadLight);
set(x + 1, 9, 12, C.breadLight);
}
// Golden medialunas on the upper shelf.
for (const x of [10, 14, 20, 24]) {
set(x, 10, 18, C.breadLight);
set(x + 1, 10, 17, C.gold);
set(x + 2, 10, 18, C.breadLight);
set(x, 11, 18, C.bread);
set(x + 2, 11, 18, C.bread);
}
// Two frosted cakes.
box(19, 10, 10, 23, 11, 10, "#f2e4ca");
box(19, 10, 11, 23, 11, 12, "#dc937e");
box(20, 10, 13, 22, 11, 13, "#fff2df");
set(21, 10, 14, "#cf5859");
box(25, 10, 10, 28, 11, 10, "#f2e4ca");
box(25, 10, 11, 28, 11, 12, "#8b543a");
box(25, 10, 13, 28, 11, 13, "#fff2df");
set(25, 10, 14, "#d86663");
set(27, 10, 14, "#d86663");
// Wood-and-glass door.
box(32, 11, 3, 40, 14, 4, C.darkBrown);
box(32, 11, 4, 33, 13, 24, C.brown);
box(39, 11, 4, 40, 13, 24, C.brown);
box(33, 12, 23, 39, 13, 24, C.brown);
box(34, 13, 5, 38, 13, 22, C.wood);
box(34, 12, 10, 38, 12, 21, "#385d62");
box(35, 11, 16, 35, 11, 20, "#83aaa5");
box(34, 11, 9, 38, 11, 10, C.darkBrown);
set(37, 10, 12, C.gold);
box(32, 10, 3, 39, 11, 3, "#ae9d82");
// Trim and colorful little fileteado accents.
box(5, 11, 29, 42, 14, 30, C.brown);
box(5, 11, 30, 42, 12, 30, "#d2a36a");
box(5, 11, 4, 6, 12, 25, C.wood);
box(41, 11, 4, 42, 12, 25, C.wood);
for (const x of [6, 41]) {
for (const z of [12, 16, 20]) {
set(x, 10, z, z === 16 ? "#d85e4e" : C.gold);
}
}
for (let x = 8; x <= 40; x += 5) {
set(x, 10, 30, C.gold);
}
// Brown-and-cream striped awning with a scalloped edge.
for (let x = 6; x <= 41; x++) {
const brownStripe = Math.floor((x - 6) / 4) % 2 === 0;
const color = brownStripe ? C.awning : C.awningLight;
box(x, 5, 26, x, 8, 27, color);
box(x, 9, 27, x, 12, 28, color);
box(x, 5, 23, x, 5, 25, color);
if ((x - 6) % 4 !== 3) {
set(x, 5, 22, color);
}
set(x, 5, 26, brownStripe ? "#94664a" : "#fffaf0");
}
box(6, 9, 25, 6, 12, 27, C.brown);
box(41, 9, 25, 41, 12, 27, C.brown);
// Rooftop PANADERIA sign.
box(5, 10, 33, 42, 13, 41, C.darkBrown);
box(6, 9, 34, 41, 9, 40, "#805035");
box(6, 8, 33, 41, 10, 33, C.gold);
for (let x = 7; x <= 40; x += 4) {
set(x, 8, 34, "#b87b46");
set(x, 8, 40, "#b87b46");
}
const letters = {
P: ["110", "101", "110", "100", "100"],
A: ["010", "101", "111", "101", "101"],
N: ["101", "111", "111", "111", "101"],
D: ["110", "101", "101", "101", "110"],
E: ["111", "100", "110", "100", "111"],
R: ["110", "101", "110", "101", "101"],
I: ["111", "010", "010", "010", "111"]
};
const word = "PANADERIA";
for (let i = 0; i < word.length; i++) {
for (let row = 0; row < 5; row++) {
for (let col = 0; col < 3; col++) {
if (letters[word[i]][row][col] === "1") {
set(7 + i * 4 + col, 8, 39 - row, "#fff0cf");
}
}
}
}
// Little loaf icon above the sign.
box(21, 9, 41, 27, 10, 42, C.bread);
box(22, 9, 43, 26, 10, 43, C.breadLight);
box(23, 9, 44, 25, 10, 44, C.breadLight);
set(23, 8, 42, "#fff0c6");
set(25, 8, 42, "#fff0c6");
// Sidewalk chalkboard menu.
box(4, 5, 1, 4, 6, 9, C.wood);
box(10, 5, 1, 10, 6, 9, C.wood);
box(4, 4, 3, 10, 5, 10, C.darkBrown);
box(5, 3, 4, 9, 3, 9, C.green);
box(5, 3, 10, 9, 4, 10, "#b88951");
box(5, 3, 3, 9, 4, 3, "#b88951");
box(5, 3, 4, 5, 3, 9, "#b88951");
box(9, 3, 4, 9, 3, 9, "#b88951");
set(6, 2, 8, C.chalk);
set(8, 2, 8, C.chalk);
box(6, 2, 7, 8, 2, 7, C.chalk);
box(6, 2, 5, 8, 2, 5, "#e3c181");
set(6, 2, 6, C.chalk);
set(8, 2, 6, C.chalk);
set(7, 2, 4, "#d3a36c");
// Planter beside the entrance.
box(42, 8, 1, 45, 11, 4, "#9b6548");
box(42, 8, 4, 45, 11, 4, "#c48762");
box(43, 9, 5, 44, 10, 7, "#376e4d");
sphere(43.5, 9.5, 8, 2, "#4b8955");
set(43, 8, 9, "#71a966");
set(44, 9, 10, "#71a966");import { draw } from "./assets/voxel";
import { panaderia } from "./assets/panaderia";
// En cada cuadro: parado sobre (x, y), el centro de su base.
draw(ctx, panaderia, 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 panaderia
# Con las herramientas de Fogón (conector)
add_assets({ slug: "<tu-juego>", ids: ["panaderia"] })
# Queda en client/assets/panaderia.ts
# https://fogon.page/object/panaderia