← Gear3D assetfogon/maza
Maza
Drag to turn it// «Maza» · gpt-6-sol (medium)
// A mace: a short wooden handle wrapped in leather and at the front a heavy round iron head with eight chunky pyramid spikes sticking out all around, dark grey with lighter tips. It LIES FLAT horizontally on the ground (z=0), as a chunky toy-like item seen from above: tip/front toward -y, handle/back toward +y, centered on x, using most of the grid along y, at least 4-5 blocks thick so it reads at small size. No hands, no stand, no base plate.
const cx = 24, hy = 16, hz = 9;
// Rounded wooden grip, lying along the y axis.
for (let y = 23; y <= 43; y++) {
for (let x = 19; x <= 29; x++) {
for (let z = 0; z <= 8; z++) {
const d = Math.hypot(x - cx, z - 4);
if (d > 4.15) continue;
let color = z >= 6 ? "#ad7141" : z <= 2 ? "#704323" : "#91582f";
if (rand() < 0.12) color = "#80502b";
if (rand() < 0.06 && z >= 5) color = "#bd8050";
set(x, y, z, color);
// Broad, diagonal leather wraps on the outside of the grip.
const wrap = ((y + Math.floor((x - cx) * 0.8) + 100) % 6);
if (d >= 2.9 && wrap < 2) {
set(x, y, z, wrap === 0 ? "#653720" : "#874a2b");
}
}
}
}
// Brass collar where the grip enters the head.
for (let y = 23; y <= 26; y++) {
for (let x = 19; x <= 29; x++) {
for (let z = 0; z <= 9; z++) {
if (Math.hypot(x - cx, z - 4) <= 4.6) {
set(x, y, z, z >= 6 ? "#e0b65b" : y === 26 ? "#8b602c" : "#bd883a");
}
}
}
}
// Heavy, round iron head; its underside touches the floor.
for (let x = 14; x <= 34; x++) {
for (let y = 6; y <= 26; y++) {
for (let z = 0; z <= 18; z++) {
const d2 = (x - cx) ** 2 + (y - hy) ** 2 + (z - hz) ** 2;
if (d2 > 81) continue;
let color = z >= 13 ? "#69747b" : z <= 5 ? "#343d43" : "#4b565d";
if (rand() < 0.09) color = z >= 10 ? "#78838a" : "#566168";
set(x, y, z, color);
}
}
}
// Eight broad-based, tapering pyramids around the head.
for (let i = 0; i < 8; i++) {
const a = i * Math.PI / 4;
const dx = Math.cos(a), dy = Math.sin(a);
for (let x = 5; x <= 43; x++) {
for (let y = 0; y <= 34; y++) {
const ox = x - cx, oy = y - hy;
const t = ox * dx + oy * dy;
const side = -ox * dy + oy * dx;
if (t < 6.5 || t > 16.5) continue;
const taper = (t - 6.5) / 10;
const halfWidth = 4.5 - 3.65 * taper;
const halfHeight = 4.8 - 3.7 * taper;
if (Math.abs(side) > halfWidth) continue;
for (let z = 3; z <= 15; z++) {
if (Math.abs(z - hz) > halfHeight) continue;
let color = z >= hz + halfHeight - 1.5 ? "#89949a"
: z < hz - 1 ? "#343d43" : "#576269";
if (Math.abs(side) > halfWidth - 1.1) color = "#394349";
if (t >= 14.3) color = z >= hz ? "#abb4b7" : "#738087";
set(x, y, z, color);
}
}
}
}
// Raised iron boss and four bright rivets on the upper face.
for (let x = 21; x <= 27; x++) {
for (let y = 13; y <= 19; y++) {
if ((x - cx) ** 2 + (y - hy) ** 2 <= 11) {
set(x, y, 18, "#849096");
if ((x - cx) ** 2 + (y - hy) ** 2 <= 3) set(x, y, 19, "#a5afb1");
}
}
}
for (const [x, y, z] of [
[24, 9, 15], [31, 16, 15], [24, 23, 15], [17, 16, 15]
]) {
box(x - 1, y - 1, z, x, y, z + 1, "#a1aaad");
set(x - 1, y - 1, z + 1, "#c4c9c6");
}
// Solid brass-capped butt, with a dark end face.
for (let y = 42; y <= 45; y++) {
for (let x = 19; x <= 29; x++) {
for (let z = 0; z <= 8; z++) {
if (Math.hypot(x - cx, z - 4) > 4.3) continue;
let color = z >= 6 ? "#dfb461" : "#a67636";
if (y === 45) color = "#704b29";
set(x, y, z, color);
}
}
}
box(22, 45, 3, 26, 45, 5, "#d4a552");import { draw } from "./assets/voxel";
import { maza } from "./assets/maza";
// Every frame: standing on (x, y), the centre of its base.
draw(ctx, maza, 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 maza
# With Fogón's tools (connector)
add_assets({ slug: "<your-game>", ids: ["maza"] })
# It lands in client/assets/maza.ts
# https://fogon.page/object/maza