← Gear3D assetfogon/casco-vikingo
Casco vikingo
Drag to turn it// «Casco vikingo» · gpt-6-sol (medium)
// A cartoon viking helmet: a rounded steel dome with a brass band around the bottom and a brass ridge over the top, a nose guard at the front (-y), and two big curved cream horns sticking out to the sides and up. It stands upright on the floor (z=0), facing front (-y), centered, chunky and readable.
const steelDark = "#58616b";
const steel = "#89939d";
const steelLight = "#b8c2c9";
const brassDark = "#805020";
const brass = "#c18a38";
const brassLight = "#f0c46d";
// Rounded steel dome, solid and slightly mottled.
for (let x = 10; x <= 38; x++) {
for (let y = 10; y <= 38; y++) {
const d = ((x - 24) / 13) ** 2 + ((y - 24) / 12) ** 2;
if (d > 1) continue;
const top = Math.round(10 + 18 * Math.sqrt(1 - d));
for (let z = 6; z <= top; z++) {
let color = z >= top - 2 ? steelLight : steel;
if (y > 27 || z < 12) color = steelDark;
if (rand() < 0.055) color = z >= top - 2 ? steel : steelDark;
set(x, y, z, color);
}
}
}
// Thick brass band around the bottom edge.
for (let x = 9; x <= 39; x++) {
for (let y = 9; y <= 39; y++) {
const outer = ((x - 24) / 14.5) ** 2 + ((y - 24) / 13.5) ** 2;
const inner = ((x - 24) / 11.4) ** 2 + ((y - 24) / 10.4) ** 2;
if (outer > 1 || inner < 1) continue;
for (let z = 5; z <= 10; z++) {
const color = z === 5 ? brassDark : z >= 9 ? brassLight : brass;
set(x, y, z, color);
}
}
}
// Raised ridge running from forehead over the crown.
for (let y = 13; y <= 35; y++) {
const d = ((y - 24) / 12) ** 2;
const top = Math.round(10 + 18 * Math.sqrt(Math.max(0, 1 - d)));
box(22, y, top - 1, 26, y, top + 1, brassDark);
box(23, y, top + 1, 25, y, top + 2, brassLight);
set(24, y, top + 3, brass);
}
// Broad brow and pointed nose guard, projecting toward the viewer.
box(18, 9, 11, 30, 11, 12, brassDark);
box(19, 8, 12, 29, 9, 13, brassLight);
for (let z = 0; z <= 17; z++) {
const halfWidth = z < 3 ? 1 : z < 7 ? 2 : 3;
box(24 - halfWidth, 7, z, 24 + halfWidth, 9, z, brassDark);
box(24 - halfWidth + 1, 6, z, 24 + halfWidth - 1, 7, z,
z > 13 ? brassLight : brass);
set(24, 6, z, z < 4 ? brassLight : steelLight);
}
// Large, curling ivory horns. Their centers sweep out, then turn upward.
const path = [
[12, 24, 16, 4.6],
[9, 24, 17, 4.5],
[7, 23, 20, 4.0],
[6, 22, 24, 3.4],
[7, 21, 29, 2.5],
[9, 20, 35, 1.0]
];
for (const side of [-1, 1]) {
for (let i = 0; i < path.length - 1; i++) {
for (let t = 0; t <= 1; t += 0.12) {
const a = path[i], b = path[i + 1];
const leftX = a[0] + (b[0] - a[0]) * t;
const cx = side === -1 ? leftX : 48 - leftX;
const cy = a[1] + (b[1] - a[1]) * t;
const cz = a[2] + (b[2] - a[2]) * t;
const r = a[3] + (b[3] - a[3]) * t;
for (let x = Math.floor(cx - r); x <= Math.ceil(cx + r); x++)
for (let y = Math.floor(cy - r); y <= Math.ceil(cy + r); y++)
for (let z = Math.floor(cz - r); z <= Math.ceil(cz + r); z++) {
if ((x - cx) ** 2 + (y - cy) ** 2 + (z - cz) ** 2 > r * r) continue;
const color = z > cz + r * 0.3 ? "#fff2c9"
: y < cy ? "#f0ddb0" : "#cbb68d";
set(x, y, z, color);
}
}
}
// Dark socket and chunky brass collar at each horn root.
const rootX = side === -1 ? 12 : 36;
for (let x = rootX - 1; x <= rootX + 1; x++)
for (let y = 19; y <= 29; y++)
for (let z = 11; z <= 21; z++) {
const ring = (y - 24) ** 2 + (z - 16) ** 2;
if (ring >= 13 && ring <= 26)
set(x, y, z, x === rootX ? brassLight : brassDark);
}
}
// Rivets and small sapphire ornaments on the front band.
for (const x of [15, 33]) {
box(x - 1, 9, 7, x + 1, 10, 9, brassDark);
set(x, 8, 8, brassLight);
}
for (const x of [19, 29]) {
box(x - 1, 10, 6, x + 1, 10, 9, brassDark);
box(x, 9, 7, x, 9, 8, "#266b9b");
set(x, 8, 9, "#80d5e8");
}import { draw } from "./assets/voxel";
import { cascoVikingo } from "./assets/casco-vikingo";
// Every frame: standing on (x, y), the centre of its base.
draw(ctx, cascoVikingo, 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 casco-vikingo
# With Fogón's tools (connector)
add_assets({ slug: "<your-game>", ids: ["casco-vikingo"] })
# It lands in client/assets/casco-vikingo.ts
# https://fogon.page/object/casco-vikingo