← CiudadObjeto 3Dfogon/moto-delivery
Moto delivery
Arrastrá para girarlo// «Moto delivery» · gpt-6-sol (medium)
// A delivery scooter: a small red scooter with a round headlight at the front (-y), a long seat, and a big square orange delivery box with a white logo on the back rack, two small black wheels.
const red = "#d83932";
const redLight = "#ee5144";
const redDark = "#a92829";
const orange = "#f58b27";
const orangeLight = "#ffad40";
const orangeDark = "#cc621e";
const cream = "#fff4d9";
const metal = "#aeb8bb";
const dark = "#25282b";
// Two independently spinning wheels. Their axles run left-to-right.
for (const [name, wy] of [["frontWheel", 12], ["rearWheel", 35]]) {
part(name, [24, wy, 5]);
cylinder(21, wy, 5, 5, 6, "#17191c", "x");
cylinder(20, wy, 5, 3, 1, "#41484b", "x");
cylinder(27, wy, 5, 3, 1, "#41484b", "x");
cylinder(20, wy, 5, 2, 1, "#8e999b", "x");
cylinder(27, wy, 5, 2, 1, "#8e999b", "x");
for (const x of [19, 28]) {
set(x, wy, 5, "#e5dbba");
set(x, wy - 2, 5, metal);
set(x, wy + 2, 5, metal);
set(x, wy, 3, metal);
set(x, wy, 7, metal);
}
animate(name, { type: "spin", axis: "x", speed: 8 });
}
part("body", [24, 24, 12]);
// Low, rounded-in-profile scooter chassis and footboard.
box(20, 17, 10, 28, 35, 13, redDark);
box(19, 18, 13, 29, 33, 15, red);
box(18, 18, 15, 30, 28, 16, redLight);
box(19, 20, 17, 29, 31, 17, "#383b3b");
box(20, 21, 18, 28, 30, 18, "#59605d");
for (const y of [23, 26, 29]) {
box(20, y, 19, 21, y, 19, "#85908b");
box(27, y, 19, 28, y, 19, "#85908b");
}
// Swept front leg shield: broad and unmistakably red from the front.
box(19, 11, 12, 29, 16, 20, red);
box(20, 10, 15, 28, 12, 22, redLight);
box(21, 11, 21, 27, 15, 24, red);
box(19, 13, 12, 19, 17, 19, redDark);
box(29, 13, 12, 29, 17, 19, redDark);
box(21, 10, 13, 27, 10, 14, redDark);
box(20, 10, 18, 20, 10, 21, cream);
box(28, 10, 18, 28, 10, 21, cream);
box(21, 10, 15, 27, 10, 15, orangeLight);
// Front mudguard arches over the tire.
box(21, 8, 9, 27, 15, 10, red);
box(22, 8, 8, 26, 9, 9, redLight);
box(21, 11, 11, 27, 14, 11, redLight);
box(23, 8, 10, 25, 8, 10, cream);
// Steering column, handlebars, grips, and two little mirrors.
line(24, 14, 21, 24, 13, 27, 1, "#687276");
line(17, 13, 27, 31, 13, 27, 1, metal);
box(15, 12, 26, 18, 14, 28, dark);
box(30, 12, 26, 33, 14, 28, dark);
line(17, 13, 28, 16, 12, 31, 0, metal);
line(31, 13, 28, 32, 12, 31, 0, metal);
box(14, 11, 30, 17, 13, 32, dark);
box(31, 11, 30, 34, 13, 32, dark);
box(15, 10, 31, 16, 10, 31, "#cbdcdb");
box(32, 10, 31, 33, 10, 31, "#cbdcdb");
// Big circular cream headlight, aimed toward -y.
sphere(24, 9, 23, 3, "#657074");
sphere(24, 8, 23, 2, cream);
set(23, 6, 24, "#ffffff");
set(24, 6, 24, "#ffffff");
box(22, 10, 19, 26, 10, 19, redDark);
// Long padded seat, slightly raised at the rear.
box(20, 22, 19, 28, 34, 20, "#1b2326");
box(19, 23, 20, 29, 33, 21, "#30373a");
box(20, 23, 22, 28, 32, 22, "#454b4b");
box(21, 24, 23, 27, 30, 23, "#505656");
box(20, 33, 21, 28, 34, 22, "#242a2b");
// Rear rack, visible under the delivery box.
box(18, 31, 19, 30, 42, 20, "#777f7b");
box(19, 33, 21, 29, 42, 21, "#b8aaa0");
box(19, 37, 16, 20, 39, 19, metal);
box(28, 37, 16, 29, 39, 19, metal);
box(20, 34, 13, 28, 39, 16, red);
box(21, 39, 13, 27, 40, 15, redDark);
box(22, 40, 14, 26, 40, 15, "#a82024");
// Big square orange delivery case with a crisp rim and lid.
box(17, 32, 22, 31, 44, 35, orangeDark);
box(18, 32, 23, 30, 43, 35, orange);
box(18, 33, 35, 30, 43, 36, orangeLight);
box(17, 32, 36, 31, 44, 37, orange);
box(18, 33, 38, 30, 43, 38, orangeLight);
box(17, 32, 22, 31, 32, 23, "#ba541f");
box(17, 32, 24, 17, 43, 34, orangeLight);
box(31, 32, 24, 31, 43, 34, orangeDark);
box(17, 32, 35, 31, 32, 35, "#ffd16d");
// White envelope logo on the front-facing side of the case.
box(20, 31, 27, 28, 31, 33, "#fffaf0");
box(21, 30, 28, 27, 30, 32, "#fffaf0");
for (let i = 0; i < 4; i++) {
set(21 + i, 29, 32 - i, orangeDark);
set(27 - i, 29, 32 - i, orangeDark);
}
box(22, 29, 28, 26, 29, 28, orangeDark);
set(24, 29, 29, "#fffaf0");
// A small white flourish on each side, readable from above and at an angle.
for (const x of [17, 31]) {
box(x, 36, 29, x, 40, 30, cream);
set(x, 35, 30, cream);
set(x, 41, 30, cream);
}
// Subtle painted highlights, avoiding the front logo.
for (let i = 0; i < 75; i++) {
const y = 33 + Math.floor(rand() * 11);
const z = 24 + Math.floor(rand() * 11);
const x = rand() < 0.5 ? 17 : 31;
if (get(x, y, z)) set(x, y, z, rand() < 0.55 ? "#f99932" : "#dc7424");
}import { draw } from "./assets/voxel";
import { motoDelivery } from "./assets/moto-delivery";
// En cada cuadro: parado sobre (x, y), el centro de su base.
draw(ctx, motoDelivery, 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 moto-delivery
# Con las herramientas de Fogón (conector)
add_assets({ slug: "<tu-juego>", ids: ["moto-delivery"] })
# Queda en client/assets/moto-delivery.ts
# https://fogon.page/object/moto-delivery