← BásicoObjeto 3Dfogon/camioneta-v6
Camioneta
Arrastrá para girarlo// «Camioneta» · gpt-6-sol (medium)
// Pickup truck («Camioneta»). One of several variations of this object: follow the reference picture closely.
// Red pickup truck, facing -y.
const red = "#d94136";
const redLight = "#ef5041";
const redDark = "#a92d2a";
const trim = "#252d30";
const steel = "#9da8a7";
function speckledBox(x0, y0, z0, x1, y1, z1, base, lighter) {
box(x0, y0, z0, x1, y1, z1, base);
for (let x = x0; x <= x1; x++)
for (let y = y0; y <= y1; y++)
for (let z = z0; z <= z1; z++)
if (rand() < 0.045) set(x, y, z, lighter);
}
// Chassis and underside.
box(13, 5, 5, 35, 43, 9, "#343a3b");
box(15, 7, 4, 33, 40, 5, "#21282a");
box(11, 6, 9, 37, 42, 12, redDark);
speckledBox(11, 7, 12, 37, 42, 13, red, redLight);
// Long red body sides and a dark lower sill.
box(11, 7, 10, 12, 42, 14, redDark);
box(36, 7, 10, 37, 42, 14, red);
box(37, 16, 10, 38, 39, 11, "#393e3e");
box(37, 19, 12, 38, 31, 12, steel);
box(37, 31, 12, 38, 40, 12, "#a9a9a0");
// Hood: low, broad, and slightly stepped.
speckledBox(11, 6, 13, 37, 19, 15, red, redLight);
box(12, 5, 11, 36, 7, 14, redDark);
box(13, 7, 16, 35, 18, 16, redLight);
box(15, 8, 16, 16, 17, 16, "#b8312c");
box(32, 8, 16, 33, 17, 16, "#b8312c");
box(17, 9, 16, 31, 10, 16, "#f35a49");
box(13, 18, 15, 35, 19, 16, redDark);
// Front grille and upright cream headlights.
box(14, 4, 7, 34, 5, 10, "#323a3b");
box(17, 4, 8, 31, 4, 9, "#838d8b");
for (let x = 18; x <= 30; x += 3) box(x, 3, 8, x, 4, 9, "#b8bdb4");
for (const x of [12, 35]) {
box(x, 4, 10, x + 1, 5, 13, "#ebe7cc");
box(x, 3, 11, x + 1, 4, 12, "#fff0c5");
box(x, 4, 9, x + 1, 5, 9, "#e2aa58");
}
box(10, 3, 5, 38, 4, 6, "#aeb8b4");
box(12, 2, 5, 36, 2, 5, "#d3d5c9");
box(19, 2, 6, 29, 3, 6, "#4c5554");
// Cab and windshield.
box(12, 20, 14, 36, 30, 21, redDark);
box(13, 20, 21, 35, 30, 23, red);
box(15, 19, 17, 33, 19, 22, "#182f37");
box(16, 18, 18, 32, 18, 21, "#19414b");
box(17, 18, 19, 30, 18, 20, "#27616b");
box(15, 18, 17, 33, 18, 17, "#172c32");
box(14, 19, 18, 15, 20, 22, redDark);
box(33, 19, 18, 34, 20, 22, redDark);
box(18, 18, 17, 26, 18, 17, "#889596"); // windshield base
// Side windows, pillars and doors.
for (const x of [11, 37]) {
box(x, 21, 18, x, 29, 22, "#172b31");
box(x, 22, 19, x, 28, 21, "#20515a");
box(x, 23, 21, x, 27, 21, "#36717a");
box(x, 25, 18, x, 25, 23, redDark);
box(x, 29, 18, x, 30, 23, red);
box(x, 20, 17, x, 30, 17, "#a72d2a");
box(x, 21, 14, x, 29, 14, "#ee5142");
box(x, 28, 15, x, 29, 15, "#c5c8b6");
}
box(38, 25, 15, 38, 27, 15, "#c9c9b6");
box(10, 25, 15, 10, 27, 15, "#c9c9b6");
// Chunky side mirrors on short dark arms.
for (const x of [8, 39]) {
box(x, 19, 18, x + 1, 21, 20, "#313a3b");
box(x, 19, 18, x + 1, 19, 20, "#aeb6ae");
}
box(10, 20, 18, 12, 20, 18, trim);
box(37, 20, 18, 39, 20, 18, trim);
// Raised roof with a bright, broad red top.
box(11, 18, 23, 37, 31, 24, redDark);
box(12, 19, 24, 36, 30, 25, redLight);
box(14, 21, 26, 34, 29, 26, red);
box(15, 22, 26, 33, 22, 26, "#f86652");
box(12, 30, 23, 36, 31, 23, "#982824");
// Open pickup bed, with red rails.
box(12, 31, 13, 36, 42, 13, "#91302b");
box(14, 33, 14, 34, 40, 14, "#564441");
box(11, 31, 14, 13, 43, 17, redDark);
box(35, 31, 14, 37, 43, 17, red);
box(12, 41, 14, 36, 43, 17, red);
box(12, 31, 17, 14, 42, 17, redLight);
box(34, 31, 17, 37, 42, 17, "#ed4b3d");
box(13, 42, 17, 35, 43, 17, "#ee5041");
box(37, 33, 15, 37, 39, 15, "#b9342d");
// Wooden crate sitting in the bed, just behind the cab.
box(17, 33, 14, 32, 39, 20, "#a66d37");
box(18, 33, 20, 32, 39, 20, "#e5ad59");
box(19, 34, 21, 31, 38, 21, "#d99b4b");
box(17, 33, 18, 17, 39, 20, "#efba68");
box(32, 33, 17, 32, 39, 20, "#c68b46");
for (const y of [34, 38]) box(17, y, 21, 32, y, 21, "#f2bc6a");
for (const x of [18, 31]) box(x, 33, 17, x, 39, 20, "#edb262");
box(19, 33, 18, 30, 33, 18, "#80552f");
// Rear lights and bumper.
for (const x of [11, 36]) {
box(x, 42, 12, x + 1, 44, 16, "#b5362d");
box(x, 44, 14, x + 1, 44, 16, "#e9704d");
box(x, 44, 12, x + 1, 44, 13, "#e4c689");
}
box(11, 44, 6, 37, 45, 7, "#a8b1ad");
box(17, 44, 12, 31, 44, 13, "#aa302c");
// Four solid tires. The visible side has a recessed gray hub.
for (const yc of [13, 36]) {
for (const outer of [8, 38]) {
const visible = outer === 38;
for (let y = yc - 5; y <= yc + 5; y++) {
for (let z = 0; z <= 10; z++) {
const d = (y - yc) ** 2 + (z - 5) ** 2;
if (d > 27) continue;
const shade = d > 19 ? "#202526" : "#292e2e";
for (let x = outer; x <= outer + 2; x++) set(x, y, z, shade);
if (d > 20 && rand() < 0.27)
set(visible ? outer + 2 : outer, y, z, "#373c3b");
}
}
const face = visible ? outer + 2 : outer;
for (let y = yc - 3; y <= yc + 3; y++)
for (let z = 2; z <= 8; z++) {
const d = (y - yc) ** 2 + (z - 5) ** 2;
if (d <= 10) set(face, y, z, d > 5 ? "#707a78" : "#424b4b");
}
set(face, yc, 5, "#a4ad9f");
for (const [dy, dz] of [[-2,0],[2,0],[0,-2],[0,2]])
set(face, yc + dy, 5 + dz, "#a3aaa0");
}
}
// Dark curved fender edging over the two wheels on the visible side.
for (const yc of [13, 36]) {
for (let dy = -6; dy <= 6; dy++)
for (let z = 7; z <= 12; z++) {
const d = dy * dy + (z - 5) ** 2;
if (d >= 27 && d <= 37) set(38, yc + dy, z, trim);
}
}import { draw } from "./assets/voxel";
import { camionetaV6 } from "./assets/camioneta-v6";
// En cada cuadro: parado sobre (x, y), el centro de su base.
draw(ctx, camionetaV6, 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-v6
# Con las herramientas de Fogón (conector)
add_assets({ slug: "<tu-juego>", ids: ["camioneta-v6"] })
# Queda en client/assets/camioneta-v6.ts
# https://fogon.page/object/camioneta-v6