← Medieval3D assetfogon/rey
Rey
Drag to turn it// «Rey» · gpt-6-sol (medium)
// A chunky medieval king standing: a gold crown with red and blue jewels, a big white beard, a long deep red robe with a white fur collar with black spots (ermine) and gold trim, a gold scepter held in the right hand, brown boots. Arms and legs are moving parts.
// Chunky storybook king, facing -y.
const red = "#8f2030", redDark = "#651927", redLight = "#ad3440";
const gold = "#e4ad39", goldLight = "#ffd66a", goldDark = "#a97024";
const white = "#f0eadb", whiteShade = "#cec8bc";
const skin = "#dfab80", skinShade = "#b98261";
const brown = "#654333", brownLight = "#866044";
// Two walking legs, pivoting beneath the robe.
part("leftLeg", [21, 24, 12]);
box(19, 21, 7, 23, 28, 12, redDark);
box(19, 19, 1, 23, 28, 7, brown);
box(19, 18, 0, 23, 27, 2, brownLight);
box(19, 18, 0, 23, 19, 1, brown);
box(19, 20, 5, 23, 20, 6, goldDark);
animate("leftLeg", { type: "swing", axis: "x", speed: 3, amplitude: 0.3 });
part("rightLeg", [28, 24, 12]);
box(26, 21, 7, 30, 28, 12, redDark);
box(26, 19, 1, 30, 28, 7, brown);
box(26, 18, 0, 30, 27, 2, brownLight);
box(26, 18, 0, 30, 19, 1, brown);
box(26, 20, 5, 30, 20, 6, goldDark);
animate("rightLeg", { type: "swing", axis: "x", speed: -3, amplitude: 0.3 });
part("body");
// Heavy, flared robe and darker cape at the back.
box(17, 19, 22, 32, 30, 31, red);
box(16, 18, 16, 33, 31, 23, red);
box(15, 17, 10, 34, 32, 17, red);
box(13, 16, 5, 36, 33, 11, red);
box(14, 29, 8, 35, 34, 29, redDark);
box(15, 30, 20, 34, 34, 31, redDark);
// Broad red panels and a shaded lower hem.
box(16, 15, 8, 33, 16, 19, redLight);
box(18, 17, 20, 31, 18, 27, redLight);
box(13, 15, 5, 36, 16, 6, redDark);
box(14, 16, 5, 35, 16, 5, goldDark);
box(15, 15, 7, 34, 15, 7, gold);
for (let x = 14; x <= 35; x += 3) {
box(x, 15, 5, x, 15, 6, goldDark);
}
// Gold-edged front opening and royal-blue embroidered panels.
box(23, 14, 7, 23, 15, 27, goldDark);
box(24, 14, 7, 25, 15, 29, goldLight);
box(26, 14, 7, 26, 15, 27, goldDark);
box(19, 14, 12, 21, 15, 17, "#293d78");
box(28, 14, 12, 30, 15, 17, "#293d78");
box(20, 14, 14, 20, 14, 17, goldLight);
box(29, 14, 14, 29, 14, 17, goldLight);
// Belt and square buckle.
box(17, 17, 20, 32, 18, 21, goldDark);
box(22, 15, 19, 27, 17, 23, gold);
box(23, 14, 20, 26, 15, 22, goldLight);
box(24, 13, 20, 25, 14, 21, redDark);
// White ermine mantle across the shoulders.
box(16, 17, 28, 33, 30, 31, whiteShade);
box(17, 15, 29, 32, 18, 32, white);
box(18, 14, 27, 31, 16, 30, white);
box(16, 17, 25, 18, 20, 29, white);
box(31, 17, 25, 33, 20, 29, white);
for (const [x, z] of [[19, 29], [22, 30], [27, 30], [30, 29],
[17, 27], [32, 27], [21, 27], [28, 27]]) {
box(x, 13, z, x, 14, z, "#353138");
}
// Head, cheeks, ears, and a prominent nose.
box(20, 18, 31, 29, 27, 39, skin);
box(20, 16, 34, 29, 18, 38, skin);
box(19, 20, 33, 19, 24, 36, skinShade);
box(30, 20, 33, 30, 24, 36, skinShade);
box(24, 14, 33, 25, 17, 36, skinShade);
box(24, 13, 34, 25, 14, 35, skin);
// Eyebrows and eyes, clear above the beard.
box(21, 15, 37, 23, 16, 37, white);
box(26, 15, 37, 28, 16, 37, white);
box(22, 14, 37, 22, 14, 37, "#26313a");
box(27, 14, 37, 27, 14, 37, "#26313a");
box(20, 15, 38, 23, 15, 38, whiteShade);
box(26, 15, 38, 29, 15, 38, whiteShade);
// Large layered beard with a split, pointed bottom and moustache.
box(20, 15, 29, 29, 18, 34, whiteShade);
box(21, 13, 27, 28, 16, 33, white);
box(22, 12, 25, 27, 15, 30, white);
box(23, 12, 23, 24, 14, 26, whiteShade);
box(26, 12, 23, 27, 14, 26, white);
box(20, 12, 33, 23, 15, 34, white);
box(26, 12, 33, 29, 15, 34, white);
box(23, 12, 31, 26, 13, 32, whiteShade);
box(21, 12, 27, 21, 12, 30, whiteShade);
box(28, 12, 27, 28, 12, 30, whiteShade);
// High gold crown: thick band, colored jewels, and raised points.
box(19, 17, 39, 30, 28, 41, goldDark);
box(19, 16, 40, 30, 17, 42, gold);
box(20, 16, 42, 29, 17, 42, goldLight);
box(20, 18, 42, 22, 21, 45, gold);
box(24, 17, 42, 26, 21, 46, goldLight);
box(28, 18, 42, 30, 21, 45, gold);
box(19, 24, 42, 21, 27, 44, gold);
box(28, 24, 42, 30, 27, 44, gold);
box(20, 15, 40, 22, 16, 41, "#a62a39");
box(21, 14, 40, 21, 15, 41, "#eb5760");
box(24, 15, 40, 26, 16, 41, "#284b99");
box(25, 14, 40, 25, 15, 41, "#5c89d0");
box(28, 15, 40, 29, 16, 41, "#a62a39");
box(20, 16, 39, 29, 16, 39, goldLight);
// Left arm and sleeve.
part("leftArm", [16, 24, 28]);
box(11, 20, 19, 17, 29, 28, redDark);
box(11, 18, 20, 16, 20, 27, red);
box(11, 17, 18, 16, 21, 20, whiteShade);
box(12, 16, 18, 15, 18, 19, white);
box(12, 18, 15, 16, 23, 18, skin);
box(12, 17, 15, 15, 18, 17, skinShade);
box(11, 17, 23, 11, 17, 25, gold);
animate("leftArm", { type: "swing", axis: "x", speed: -3, amplitude: 0.3 });
// Right arm holds the scepter; staff swings with the hand.
part("rightArm", [33, 24, 28]);
box(32, 20, 19, 38, 29, 28, redDark);
box(33, 18, 20, 38, 20, 27, red);
box(34, 17, 18, 39, 21, 20, whiteShade);
box(35, 16, 18, 38, 18, 19, white);
box(35, 18, 15, 39, 23, 18, skin);
box(37, 16, 16, 39, 19, 18, skinShade);
// Long gold shaft, bands, and jeweled finial.
box(39, 16, 10, 40, 17, 37, goldDark);
box(39, 15, 12, 39, 15, 35, goldLight);
for (const z of [12, 17, 23, 30]) {
box(38, 15, z, 41, 18, z, gold);
}
box(37, 14, 36, 42, 19, 38, gold);
box(38, 15, 39, 41, 18, 40, goldLight);
box(39, 16, 41, 40, 17, 42, gold);
box(39, 13, 37, 40, 14, 38, "#31549a");
box(39, 13, 38, 39, 13, 38, "#79a7e0");
// Fingers curl visibly over the staff.
box(37, 14, 16, 39, 16, 17, skin);
box(37, 14, 18, 39, 16, 18, skin);
animate("rightArm", { type: "swing", axis: "x", speed: 3, amplitude: 0.3 });import { draw } from "./assets/voxel";
import { rey } from "./assets/rey";
// Every frame: standing on (x, y), the centre of its base.
draw(ctx, rey, x, y, { size: 64, angle: 0, t: performance.now() / 1000 });
// size: its longest side, in px
// angle: turn on the floor, in radians
// t: seconds; if it moves, that animates it# In a terminal, in the game's folder
fogon assets add rey
# With Fogón's tools (connector)
add_assets({ slug: "<your-game>", ids: ["rey"] })
# It lands in client/assets/rey.ts
# https://fogon.page/object/rey