← BásicoObjeto 3Dfogon/camioneta-v2
Camioneta
Arrastrá para girarlo// «Camioneta» · gpt-6-sol (medium)
// Pickup truck («Camioneta»). One of several variations of this object: follow the reference picture closely.
const blue = "#197da4";
const lightBlue = "#2997bd";
const topBlue = "#36a2c8";
const deepBlue = "#15536e";
const darkBlue = "#123b50";
const glass = "#193b4d";
const glassLight = "#31586a";
const rubber = "#20252a";
const metal = "#9da9a8";
// Undercarriage and the long, squared-off body.
box(14, 8, 5, 33, 42, 8, "#30383a");
box(13, 7, 9, 34, 43, 12, deepBlue);
box(13, 8, 12, 34, 42, 13, blue);
box(13, 8, 10, 13, 43, 13, "#126083");
box(34, 8, 10, 34, 43, 13, "#126083");
// Four chunky tires, with visible gray, blocky wheel faces.
for (const x of [9, 35]) {
for (const y of [14, 37]) {
cylinder(x, y, 4, 4.7, 4, rubber, "x");
const outer = x === 9 ? 9 : 38;
cylinder(outer, y, 4, 3.3, 1, "#41494b", "x");
cylinder(outer, y, 4, 2.4, 1, "#87918f", "x");
cylinder(outer, y, 4, 1.1, 1, "#444c4e", "x");
for (const dy of [-2, 2]) {
set(outer, y + dy, 4, "#b1b9b4");
set(outer, y, 4 + dy, "#b1b9b4");
}
}
}
// The bright, broad hood.
box(13, 6, 12, 34, 18, 14, blue);
box(14, 7, 14, 33, 17, 14, topBlue);
box(15, 8, 15, 32, 16, 15, lightBlue);
box(16, 9, 15, 29, 10, 15, "#4aafd0");
box(17, 13, 15, 27, 13, 15, "#1680a8");
box(18, 14, 15, 28, 14, 15, "#16759a");
box(14, 7, 13, 14, 18, 14, "#287fa0");
box(33, 7, 13, 33, 18, 14, "#176c8e");
// Square front fascia, grille, lights, and silver bumper.
box(13, 5, 9, 34, 6, 12, deepBlue);
box(17, 4, 10, 30, 4, 11, "#34484d");
box(18, 4, 11, 29, 4, 11, "#647578");
for (const x of [13, 14, 15, 32, 33, 34]) {
box(x, 4, 10, x, 4, 12, "#e3dcc1");
set(x, 4, 9, "#e0aa56");
}
box(12, 4, 7, 35, 5, 8, "#849293");
box(14, 3, 7, 33, 3, 7, "#adb4ac");
box(12, 5, 7, 13, 7, 8, "#626e70");
box(34, 5, 7, 35, 7, 8, "#626e70");
// Cab lower body and doors.
box(14, 18, 12, 33, 31, 17, blue);
box(13, 19, 12, 13, 30, 16, deepBlue);
box(34, 19, 12, 35, 30, 16, deepBlue);
box(35, 20, 14, 35, 28, 16, "#207ca0");
box(35, 29, 12, 35, 29, 17, "#103f57");
box(35, 20, 12, 35, 20, 16, "#11445d");
box(36, 21, 14, 36, 27, 14, "#3193b2");
box(36, 26, 16, 36, 28, 16, "#b8c3ba");
set(37, 27, 15, "#e0ded0");
box(35, 18, 9, 35, 31, 10, "#a4aead");
// Dark front windshield, stepped back beneath the roof.
box(15, 18, 16, 32, 18, 20, glass);
box(15, 19, 20, 32, 19, 22, glass);
box(16, 18, 18, 17, 18, 20, glassLight);
box(18, 18, 19, 21, 18, 19, "#406579");
box(15, 17, 16, 15, 19, 22, deepBlue);
box(32, 17, 16, 33, 19, 22, deepBlue);
box(16, 17, 16, 31, 17, 16, "#102f40");
// Side windows and their strong vertical frames.
for (const x of [13, 35]) {
box(x, 20, 18, x, 28, 21, glass);
box(x, 21, 20, x, 23, 20, glassLight);
box(x, 19, 17, x, 19, 22, deepBlue);
box(x, 24, 17, x, 24, 22, "#236c8c");
box(x, 29, 17, x, 29, 22, deepBlue);
box(x, 20, 17, x, 28, 17, "#164a63");
box(x, 20, 22, x, 29, 22, "#247d9f");
}
box(14, 30, 17, 34, 30, 21, "#15506a");
// Chunky turquoise roof and its layered edge.
box(15, 19, 23, 33, 29, 24, lightBlue);
box(16, 20, 25, 32, 28, 25, "#2492ba");
box(17, 21, 25, 30, 26, 25, "#329fc6");
box(15, 18, 22, 33, 19, 23, deepBlue);
box(16, 19, 23, 32, 19, 23, "#48aacc");
box(15, 29, 22, 33, 30, 23, deepBlue);
box(16, 29, 24, 32, 29, 24, "#42a8c9");
// Square side mirrors, protruding beside the windshield.
for (const x of [10, 36]) {
box(x, 17, 18, x + 2, 19, 20, "#303c40");
box(x, 17, 19, x + 2, 17, 20, "#87938f");
}
box(36, 19, 16, 37, 19, 18, "#455356");
// Open pickup bed: dark interior, blue high sides and tailgate.
box(15, 32, 13, 33, 42, 13, "#263e47");
box(15, 33, 14, 33, 42, 14, "#334f58");
box(13, 32, 14, 14, 43, 17, deepBlue);
box(34, 32, 14, 35, 43, 17, blue);
box(13, 43, 13, 35, 44, 17, blue);
box(13, 31, 14, 35, 32, 17, deepBlue);
box(13, 32, 18, 14, 43, 18, lightBlue);
box(34, 32, 18, 35, 43, 18, "#3299ba");
box(13, 43, 18, 35, 44, 18, "#278cae");
box(35, 33, 15, 35, 41, 16, "#257fa1");
// A wooden crate standing visibly above the bed rails.
box(19, 34, 14, 29, 40, 20, "#b87533");
box(20, 34, 15, 28, 40, 20, "#d89949");
box(19, 34, 20, 29, 40, 20, "#e6ac5b");
for (const y of [35, 38]) {
box(19, y, 15, 19, y, 20, "#f0b96b");
box(29, y, 15, 29, y, 20, "#f0b96b");
}
box(20, 34, 17, 28, 34, 17, "#ab6b30");
box(20, 37, 20, 28, 37, 20, "#b97a39");
box(20, 40, 16, 28, 40, 16, "#a86831");
// Tail lamps and the long pale lower side trim.
for (const x of [13, 35]) {
box(x, 43, 12, x, 44, 16, "#b65b34");
box(x, 44, 14, x, 44, 16, "#e3a365");
}
box(35, 20, 9, 35, 32, 9, "#b4bbb2");
box(35, 32, 9, 35, 42, 9, "#8d9b98");
box(14, 44, 8, 34, 44, 9, "#697779");
// Sparse highlights and wear keep the large flat panels voxel-textured.
for (let i = 0; i < 55; i++) {
const x = 16 + Math.floor(rand() * 16);
const y = 8 + Math.floor(rand() * 9);
if (get(x, y, 15)) set(x, y, 15, rand() < 0.5 ? "#299bc1" : "#3aa4c7");
}import { draw } from "./assets/voxel";
import { camionetaV2 } from "./assets/camioneta-v2";
// En cada cuadro: parado sobre (x, y), el centro de su base.
draw(ctx, camionetaV2, 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 camioneta-v2
# Con las herramientas de Fogón (conector)
add_assets({ slug: "<tu-juego>", ids: ["camioneta-v2"] })
# Queda en client/assets/camioneta-v2.ts
# https://fogon.page/object/camioneta-v2