← City3D assetfogon/camion-de-bomberos
Camión de bomberos
Drag to turn it// «Camión de bomberos» · gpt-6-sol (medium)
// A fire truck: a long bright red truck along y with a cab at the front (-y), silver equipment compartments on the sides, a long white ladder folded on top, rolled hoses, a red light bar and six black wheels.
const red = "#df302c", redLight = "#ed4438", redDark = "#b92425";
const silver = "#c9d1d0", silverLight = "#e5e9e5", silverDark = "#879397";
const glass = "#8ac9d6", glassDark = "#498b9f";
const black = "#24282c";
part("body", [24, 24, 12]);
// Chassis, cab, hood, and long rear body.
box(12, 5, 7, 35, 43, 10, redDark);
box(13, 9, 10, 34, 20, 23, red);
box(14, 10, 24, 33, 19, 24, redLight);
box(13, 4, 10, 34, 10, 16, redLight);
box(12, 20, 10, 35, 43, 22, red);
box(13, 21, 23, 34, 43, 23, redLight);
// Slightly varied red panels.
for (let i = 0; i < 150; i++) {
const x = 13 + Math.floor(rand() * 22);
const y = 21 + Math.floor(rand() * 22);
const z = 11 + Math.floor(rand() * 12);
if (get(x, y, z) === red && rand() < 0.28)
set(x, y, z, rand() < 0.5 ? "#d92d2a" : "#e33730");
}
// Front windshield and chunky cab windows.
box(16, 9, 18, 31, 9, 22, glassDark);
box(17, 8, 19, 30, 8, 21, glass);
box(23, 8, 18, 24, 8, 22, redDark);
for (const x of [12, 35]) {
box(x, 11, 18, x, 17, 21, glassDark);
box(x, 12, 19, x, 16, 21, glass);
box(x, 17, 18, x, 17, 22, redDark);
box(x, 11, 11, x, 19, 11, redDark);
box(x, 18, 14, x, 18, 15, silverLight);
}
// Side mirrors.
box(9, 10, 17, 11, 12, 20, black);
box(9, 10, 18, 9, 11, 19, silverLight);
box(36, 10, 17, 38, 12, 20, black);
box(38, 10, 18, 38, 11, 19, silverLight);
// Friendly front face: grille, lamps, bumper.
box(18, 3, 11, 29, 3, 15, silverDark);
for (let z = 12; z <= 15; z += 2)
box(19, 2, z, 28, 2, z, silverLight);
box(13, 3, 13, 16, 3, 15, "#fff0bc");
box(31, 3, 13, 34, 3, 15, "#fff0bc");
box(12, 2, 8, 35, 4, 9, silver);
box(15, 2, 9, 18, 2, 9, silverLight);
box(29, 2, 9, 32, 2, 9, silverLight);
// Silver roll-up equipment shutters on both sides.
for (const x of [11, 36]) {
for (const [y0, y1] of [[22, 30], [33, 41]]) {
box(x, y0, 12, x, y1, 21, silverDark);
box(x, y0 + 1, 13, x, y1 - 1, 20, silver);
for (let z = 14; z <= 20; z += 2)
box(x + (x === 11 ? -1 : 1), y0 + 1, z,
x + (x === 11 ? -1 : 1), y1 - 1, z, silverLight);
box(x, y0, 12, x, y0, 22, redDark);
box(x, y1, 12, x, y1, 22, redDark);
}
// Gold and sky-blue fileteado-inspired pinstripes.
const outer = x === 11 ? 10 : 37;
box(outer, 21, 11, outer, 42, 11, "#efb94d");
box(outer, 21, 22, outer, 42, 22, "#8ad5df");
}
// Rear doors and bumper.
box(14, 44, 11, 33, 44, 21, redDark);
box(15, 44, 13, 23, 44, 20, redLight);
box(25, 44, 13, 32, 44, 20, redLight);
box(24, 44, 12, 24, 44, 21, silver);
box(21, 45, 15, 22, 45, 16, silverLight);
box(26, 45, 15, 27, 45, 16, silverLight);
box(12, 44, 8, 35, 45, 9, silverDark);
box(13, 45, 12, 16, 45, 14, "#e94b43");
box(31, 45, 12, 34, 45, 14, "#e94b43");
// Rolled hoses in roof-side cradles.
for (const y of [26, 37]) {
for (const x of [13, 32]) {
cylinder(x, y, 25, 3, 3, "#464e4e", "x");
cylinder(x + (x === 13 ? -1 : 3), y, 25, 2, 1, "#d5b678", "x");
set(x === 13 ? 12 : 36, y, 25, "#8b6245");
}
}
// Folded white extending ladder, with distinct rails and rungs.
box(16, 19, 24, 31, 22, 25, redDark);
box(17, 11, 26, 19, 43, 27, silverLight);
box(28, 11, 26, 30, 43, 27, silverLight);
box(18, 11, 28, 19, 43, 28, "#ffffff");
box(28, 11, 28, 29, 43, 28, "#ffffff");
for (let y = 12; y <= 42; y += 3)
box(19, y, 27, 28, y, 28, silverLight);
box(21, 17, 29, 22, 41, 29, silver);
box(25, 17, 29, 26, 41, 29, silver);
for (let y = 18; y <= 40; y += 4)
box(22, y, 29, 25, y, 29, "#ffffff");
// Cab roof light bar.
box(16, 11, 25, 31, 14, 25, black);
box(16, 11, 26, 22, 14, 27, "#f13c39");
box(25, 11, 26, 31, 14, 27, "#f13c39");
box(23, 11, 26, 24, 14, 26, silverLight);
box(17, 10, 27, 21, 10, 27, "#ff8374");
box(26, 10, 27, 30, 10, 27, "#ff8374");
// Each of the six wheels is an independently spinning part.
for (const y of [12, 29, 39]) {
for (const left of [true, false]) {
const start = left ? 7 : 35;
const face = left ? 7 : 40;
const name = `wheel_${left ? "left" : "right"}_${y}`;
part(name, [left ? 9.5 : 37.5, y, 5]);
cylinder(start, y, 5, 5, 6, black, "x");
cylinder(face, y, 5, 3, 1, "#454b4e", "x");
cylinder(face, y, 5, 2, 1, silver, "x");
cylinder(face, y, 5, 1, 1, silverDark, "x");
for (const [dy, dz] of [[0, 2], [0, -2], [2, 0], [-2, 0]])
set(face, y + dy, 5 + dz, silverLight);
animate(name, { type: "spin", axis: "x", speed: 6 });
}
}import { draw } from "./assets/voxel";
import { camionDeBomberos } from "./assets/camion-de-bomberos";
// Every frame: standing on (x, y), the centre of its base.
draw(ctx, camionDeBomberos, 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 camion-de-bomberos
# With Fogón's tools (connector)
add_assets({ slug: "<your-game>", ids: ["camion-de-bomberos"] })
# It lands in client/assets/camion-de-bomberos.ts
# https://fogon.page/object/camion-de-bomberos