← FantasíaObjeto 3Dfogon/pegaso
Pegaso
Arrastrá para girarlo// «Pegaso» · gpt-6-sol (medium)
// A white cartoon winged horse (pegasus) standing, horizontal along y: white body, light blue flowing mane and tail, gold hooves, head at the front (-y) with gentle eyes, and two big white feathered wings with pale blue tips raised from the shoulders.
const white = "#f8faff";
const sunWhite = "#ffffff";
const shade = "#dce8ee";
const shadow = "#bdcedb";
const blue = "#9ce7f3";
const blueLight = "#c9f5fb";
const blueDark = "#65bdd7";
const gold = "#e9b94f";
const goldLight = "#ffe08a";
const goldDark = "#b98137";
// Rounded body, with a broad back and soft chest.
ellipsoid(24, 26, 20, 9, 13, 8, white);
ellipsoid(24, 18, 21, 8, 7, 8, sunWhite);
ellipsoid(24, 33, 20, 8, 6, 7, white);
ellipsoid(24, 25, 27, 7, 10, 2, sunWhite);
// A little cool shading and sparkle on the coat.
forEach((x, y, z, color) => {
if (color !== white && color !== sunWhite) return;
if (get(x, y, z + 1) === undefined && rand() < 0.16)
set(x, y, z, "#edf8fc");
else if (z < 17 && get(x, y, z - 1) === undefined && rand() < 0.3)
set(x, y, z, shade);
});
// Upright, gently curved neck.
line(24, 19, 24, 24, 15, 33, 5, white);
ellipsoid(24, 16, 31, 5, 5, 7, white);
ellipsoid(24, 14, 35, 5, 5, 4, sunWhite);
// Big friendly head and a rounded, forward-projecting muzzle.
ellipsoid(24, 11, 35, 7, 6, 6, white);
ellipsoid(24, 7, 30, 5, 5, 4, "#f0f6f8");
ellipsoid(24, 5, 30, 4, 2, 3, white);
ellipsoid(24, 5, 28, 3, 2, 1, shade);
// Ears, with pale pink inner ears.
for (const x of [19, 29]) {
ellipsoid(x, 12, 42, 2, 2, 4, white);
ellipsoid(x, 10, 42, 1, 1, 2, "#eecbd9");
}
// Eyes on both visible sides of the head.
for (const side of [-1, 1]) {
const x = 24 + side * 6;
ellipsoid(x, 9, 35, 2, 2, 2, shade);
ellipsoid(x + side, 8, 35, 1, 2, 2, "#354b64");
set(x + side, 7, 36, sunWhite);
set(x + side, 8, 34, "#172d45");
// A softly raised brow.
line(x - 1, 8, 38, x + 1, 9, 38, 0, white);
}
set(21, 3, 31, "#a8aeb7");
set(27, 3, 31, "#a8aeb7");
line(22, 3, 28, 26, 3, 28, 0, "#a4aeb8");
// Flowing forelock and mane, swept back down the neck.
ellipsoid(24, 9, 40, 5, 3, 2, blueLight);
for (let i = 0; i < 7; i++) {
const x = 18 + i * 2;
line(x, 9, 40, x - 1, 7 + (i % 3), 37 - (i % 2),
1, i % 2 ? blue : blueLight);
}
for (const side of [-1, 1]) {
for (let i = 0; i < 5; i++) {
const x = 24 + side * (4 + i % 2);
const y = 13 + i * 2;
const z = 39 - i * 2;
line(x, y, z, x + side * 2, y + 3, z - 5,
1, i % 2 ? blueDark : blue);
sphere(x + side * 2, y + 3, z - 5, 1, blueLight);
}
}
// Tail: a full, curling plume with distinct strands.
ellipsoid(24, 38, 24, 4, 4, 3, blue);
for (let i = 0; i < 9; i++) {
const x = 21 + i % 7;
const endX = x + (i % 3) - 1;
const endZ = 15 + (i * 3) % 10;
line(x, 38, 25 + i % 3, endX, 44, endZ,
1, i % 3 === 0 ? blueDark : i % 2 ? blueLight : blue);
sphere(endX, 44, endZ, 1, i % 2 ? blueLight : blue);
}
// Four separate walking legs. Diagonal pairs move together.
function leg(name, x, y, speed) {
part(name, [x, y, 16]);
ellipsoid(x, y, 14, 3, 3, 5, white);
line(x, y, 13, x, y - 1, 5, 2, white);
ellipsoid(x, y - 1, 7, 2, 2, 3, shade);
line(x, y - 1, 7, x, y - 2, 2, 2, white);
box(x - 2, y - 4, 0, x + 2, y, 2, gold);
box(x - 2, y - 4, 2, x + 2, y, 3, goldLight);
box(x - 2, y, 0, x + 2, y, 1, goldDark);
animate(name, { type: "swing", axis: "x", speed, amplitude: 0.25 });
part("body");
}
leg("front_left_leg", 18, 17, 5);
leg("front_right_leg", 30, 17, -5);
leg("rear_left_leg", 18, 33, -5);
leg("rear_right_leg", 30, 33, 5);
// Raised wings: solid overlapping vanes, edged with individual feathers.
function wing(name, side, speed) {
const rootX = 24 + side * 7;
part(name, [rootX, 21, 26]);
// Strong rounded shoulder and sweeping leading edge.
ellipsoid(rootX + side, 22, 28, 3, 4, 4, white);
line(rootX, 21, 27, rootX + side * 7, 22, 36, 3, white);
line(rootX + side * 6, 22, 35, rootX + side * 12, 23, 41,
2, sunWhite);
// Broad overlapping feather fan, from low outer tips to high tips.
const tips = [
[14, 30], [16, 33], [17, 36], [17, 39],
[15, 42], [12, 44], [9, 43]
];
for (let i = 0; i < tips.length; i++) {
const [reach, height] = tips[i];
const bx = rootX + side * (3 + Math.floor(i / 2));
const bz = 28 + Math.floor(i * 1.3);
const tx = rootX + side * reach;
const col = i < 3 ? "#ccecf5" : i % 2 ? sunWhite : white;
line(bx, 22 + i % 2, bz, tx, 23 + i % 2, height,
2, col);
ellipsoid(tx, 23 + i % 2, height, 1, 2, 2,
i < 4 ? blueLight : "#e1f4fa");
}
// Little pale-blue divisions make the feathers legible from afar.
for (let i = 0; i < 5; i++) {
const x = rootX + side * (7 + i * 2);
line(x, 19, 33 + i, x + side * 2, 19, 31 + i,
0, "#a9d9e9");
}
animate(name, { type: "swing", axis: "y", speed, amplitude: 0.5 });
part("body");
}
wing("left_wing", -1, 3);
wing("right_wing", 1, -3);import { draw } from "./assets/voxel";
import { pegaso } from "./assets/pegaso";
// En cada cuadro: parado sobre (x, y), el centro de su base.
draw(ctx, pegaso, 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 pegaso
# Con las herramientas de Fogón (conector)
add_assets({ slug: "<tu-juego>", ids: ["pegaso"] })
# Queda en client/assets/pegaso.ts
# https://fogon.page/object/pegaso