← MedievalObjeto 3Dfogon/carruaje-real
Carruaje real
Arrastrá para girarlo// «Carruaje real» · gpt-6-sol (medium)
// A royal carriage, horizontal along y: an ornate rounded coach body in deep blue with gold trim, curvy gold scrolls and a small golden crown on the roof, a door with a window and red curtains, four big golden spoked wheels (larger at the back), and a coachman's bench at the front.
const blue = "#173b84", blueLight = "#2854a0", blueDark = "#102959";
const gold = "#d6a841", goldLight = "#f5d375", goldDark = "#956922";
const wood = "#49301f", iron = "#292b31", red = "#9e2938";
// Sturdy undercarriage and axles.
box(12, 14, 14, 36, 40, 16, wood);
box(13, 16, 16, 35, 39, 17, goldDark);
for (const [y, z] of [[13, 7], [35, 9]]) {
box(8, y - 1, z - 1, 40, y + 1, z + 1, iron);
box(10, y - 1, z + 1, 38, y + 1, z + 1, goldDark);
}
// Rounded, solid coach body.
for (let y = 15; y <= 41; y++) {
for (let z = 18; z <= 35; z++) {
const corner = Math.max(0, Math.abs(y - 28) - 10)
+ Math.max(0, Math.abs(z - 26) - 7);
if (corner > 4) continue;
const inset = z >= 34 ? 1 : 0;
for (let x = 14 + inset; x <= 34 - inset; x++) {
let c = z >= 31 ? blueLight : z <= 20 ? blueDark : blue;
if ((x === 14 + inset || x === 34 - inset) && rand() < 0.075)
c = z > 26 ? "#315aa0" : "#20458b";
set(x, y, z, c);
}
}
}
// Roof: stepped blue canopy with bright gilded edges.
box(15, 18, 35, 33, 39, 36, blueDark);
box(17, 20, 37, 31, 37, 37, blue);
box(19, 22, 38, 29, 35, 38, blueLight);
for (const x of [15, 33]) line(x, 18, 36, x, 39, 36, 0, gold);
for (const y of [18, 39]) line(15, y, 36, 33, y, 36, 0, gold);
for (const x of [18, 30]) line(x, 21, 38, x, 36, 38, 0, goldDark);
// Raised gold molding around the sides.
for (const x of [13, 35]) {
line(x, 19, 18, x, 38, 18, 0, goldLight);
line(x, 18, 33, x, 39, 33, 0, gold);
for (const y of [19, 39]) line(x, y, 20, x, y, 31, 0, goldDark);
// Door panel, frame, and recessed glazed window.
box(x + (x === 13 ? -1 : 1), 23, 19,
x + (x === 13 ? -1 : 1), 33, 32, blueDark);
const outer = x === 13 ? 12 : 36;
const glass = x === 13 ? 11 : 37;
for (const y of [23, 33]) line(outer, y, 19, outer, y, 33, 0, goldLight);
for (const z of [19, 33]) line(outer, 23, z, outer, 33, z, 0, gold);
box(outer, 25, 25, outer, 31, 31, goldDark);
box(glass, 26, 26, glass, 30, 30, "#172638");
box(glass, 27, 28, glass, 29, 29, "#7190a4");
for (const y of [25, 31]) box(glass, y, 26, glass, y, 31, red);
line(glass, 25, 31, glass, 31, 31, 0, goldLight);
set(glass, 32, 22, goldLight); // Door handle.
// Curled gold flourishes flanking the door.
for (const y0 of [18, 35]) {
line(outer, y0, 22, outer, y0 + 3, 25, 0, gold);
line(outer, y0 + 3, 25, outer, y0 + 1, 28, 0, goldLight);
line(outer, y0 + 1, 28, outer, y0, 27, 0, gold);
set(outer, y0 + 2, 24, goldLight);
}
for (const y of [21, 36]) {
set(outer, y, 30, goldLight);
set(outer, y, 29, goldDark);
}
}
// Gold-framed windows on the front and back of the cab.
for (const y of [15, 41]) {
box(20, y, 25, 28, y, 32, goldDark);
box(21, y + (y === 15 ? -1 : 1), 26,
27, y + (y === 15 ? -1 : 1), 31, "#263c50");
line(24, y + (y === 15 ? -2 : 2), 26,
24, y + (y === 15 ? -2 : 2), 31, 0, goldLight);
line(20, y, 32, 28, y, 32, 0, goldLight);
}
// Side steps and hanging brackets.
for (const x of [10, 38]) {
box(x, 23, 13, x + 1, 33, 14, wood);
line(x, 24, 14, x + (x < 24 ? 3 : -3), 24, 18, 0, goldDark);
line(x, 32, 14, x + (x < 24 ? 3 : -3), 32, 18, 0, goldDark);
}
box(10, 24, 14, 13, 32, 14, goldDark);
box(35, 24, 14, 38, 32, 14, goldDark);
// Coachman's forward-facing bench, upholstered in red.
for (const x of [19, 29]) box(x, 10, 17, x + 1, 14, 24, wood);
box(17, 8, 24, 31, 15, 25, goldDark);
box(18, 8, 26, 30, 13, 26, red);
box(17, 15, 26, 31, 16, 30, wood);
box(18, 14, 27, 30, 14, 29, red);
line(17, 8, 25, 31, 8, 25, 0, goldLight);
for (const x of [16, 32]) {
box(x, 9, 25, x, 16, 26, wood);
line(x, 9, 27, x, 16, 27, 0, gold);
}
// Small front lanterns.
for (const x of [15, 33]) {
box(x, 12, 28, x + 1, 14, 31, goldDark);
box(x, 11, 29, x + 1, 11, 30, "#ffdf83");
box(x, 12, 32, x + 1, 13, 32, goldLight);
}
// A crown standing proud of the roof.
box(20, 25, 39, 28, 30, 40, goldDark);
box(21, 24, 40, 27, 25, 41, goldLight);
for (const x of [20, 24, 28]) {
box(x, 26, 41, x, 29, x === 24 ? 44 : 43, gold);
set(x, 25, x === 24 ? 44 : 43, goldLight);
}
for (const x of [22, 26]) set(x, 24, 40, red);
// Four independently rotating wheels, with larger rear wheels.
function wheel(name, x, y, z, r) {
part(name, [x, y, z]);
const outerX = x < 24 ? x - 2 : x + 2;
// Chunky circular rims, each three blocks thick along its axle.
for (let dy = -r; dy <= r; dy++) {
for (let dz = -r; dz <= r; dz++) {
const d = Math.sqrt(dy * dy + dz * dz);
if (d >= r - 1.45 && d <= r + 0.25) {
for (let dx = -1; dx <= 1; dx++)
set(x + dx, y + dy, z + dz,
dz > 2 ? goldLight : dz < -2 ? goldDark : gold);
set(outerX, y + dy, z + dz, goldLight);
}
}
}
for (let i = 0; i < 10; i++) {
const a = i * Math.PI * 2 / 10;
const yy = Math.round(Math.cos(a) * (r - 1));
const zz = Math.round(Math.sin(a) * (r - 1));
line(x, y, z, x, y + yy, z + zz, 0, gold);
line(outerX, y, z, outerX, y + yy, z + zz, 0, goldDark);
}
box(x - 2, y - 1, z - 1, x + 2, y + 1, z + 1, goldDark);
box(outerX, y - 1, z - 1, outerX, y + 1, z + 1, goldLight);
set(outerX + (x < 24 ? -1 : 1), y, z, iron);
part("body", [24, 24, 0]);
animate(name, { type: "spin", axis: "x", speed: 3 });
}
wheel("front_left_wheel", 9, 13, 7, 7);
wheel("front_right_wheel", 39, 13, 7, 7);
wheel("rear_left_wheel", 9, 35, 9, 9);
wheel("rear_right_wheel", 39, 35, 9, 9);import { draw } from "./assets/voxel";
import { carruajeReal } from "./assets/carruaje-real";
// En cada cuadro: parado sobre (x, y), el centro de su base.
draw(ctx, carruajeReal, 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 carruaje-real
# Con las herramientas de Fogón (conector)
add_assets({ slug: "<tu-juego>", ids: ["carruaje-real"] })
# Queda en client/assets/carruaje-real.ts
# https://fogon.page/object/carruaje-real