← Pirates and sea3D assetfogon/timon
Timón
Drag to turn it// «Timón» · gpt-6-sol (medium)
// A big wooden ship's wheel mounted on a short wooden post: round warm-brown wheel with eight spokes ending in handles, a brass hub in the center, facing -y.
const cx = 24, cz = 24;
const wood = ["#8f4c26", "#a85e2e", "#bf7438", "#d58a45"];
const dark = "#63351f";
const brass = "#d99c27";
const gold = "#ffd15a";
// Sturdy planked base and short mounting post.
box(17, 22, 0, 31, 34, 1, dark);
box(18, 23, 2, 30, 33, 3, wood[1]);
for (let x = 19; x <= 29; x += 3) {
box(x, 23, 3, x, 33, 3, wood[2]);
}
box(21, 25, 4, 27, 30, 22, wood[1]);
box(21, 25, 4, 21, 30, 22, wood[0]);
box(22, 25, 5, 22, 25, 21, wood[3]);
box(26, 25, 5, 26, 25, 21, wood[2]);
box(21, 25, 22, 27, 30, 24, wood[2]);
line(19, 27, 4, 22, 27, 15, 1, wood[0]);
line(29, 27, 4, 26, 27, 15, 1, wood[0]);
// Fixed bearing behind the wheel.
cylinder(cx, 21, cz, 4, 5, dark, "y");
cylinder(cx, 22, cz, 2.5, 3, brass, "y");
// Everything below rotates about the axle.
part("wheel", [cx, 20, cz]);
// Solid, chunky wooden rim, with a lighter front grain.
for (let x = 5; x <= 43; x++) {
for (let z = 5; z <= 43; z++) {
const r = Math.hypot(x - cx, z - cz);
if (r < 12.3 || r > 15.2) continue;
for (let y = 17; y <= 21; y++) {
let color = r > 14.45 || y === 21 ? wood[0] : wood[1];
if (y === 17) color = z > cz ? wood[3] : wood[2];
if (rand() < 0.055) color = wood[2];
set(x, y, z, color);
}
// Thin raised wooden molding around the front of the rim.
if (r >= 12.5 && r <= 13.15) {
set(x, 16, z, z > cz ? wood[3] : wood[2]);
}
}
}
// Eight broad spokes and their projecting handgrips.
for (let i = 0; i < 8; i++) {
const a = i * Math.PI / 4;
const dx = Math.sin(a), dz = Math.cos(a);
const point = r => [cx + dx * r, cz + dz * r];
let [x0, z0] = point(2.5);
let [x1, z1] = point(14);
line(x0, 19, z0, x1, 19, z1, 1.35, wood[0]);
line(x0, 17, z0, x1, 17, z1, 0.85, wood[2]);
[x0, z0] = point(14);
[x1, z1] = point(19);
line(x0, 19, z0, x1, 19, z1, 1.3, wood[1]);
let [gx, gz] = point(16.1);
sphere(gx, 19, gz, 1.6, brass);
[gx, gz] = point(16.8);
sphere(gx, 19, gz, 1.35, wood[2]);
sphere(x1, 19, z1, 1.8, wood[2]);
set(Math.round(x1), 17, Math.round(z1), wood[3]);
// Small brass peg on the front of the rim.
[gx, gz] = point(13.8);
sphere(gx, 15.5, gz, 0.8, gold);
}
// Layered brass hub, proud of the front face.
cylinder(cx, 15, cz, 4, 4, "#9c661d", "y");
cylinder(cx, 14, cz, 3.5, 2, brass, "y");
cylinder(cx, 13, cz, 2.5, 2, gold, "y");
sphere(cx, 12.5, cz, 1, "#fff1a1");
animate("wheel", { type: "spin", axis: "y", speed: 0.8 });import { draw } from "./assets/voxel";
import { timon } from "./assets/timon";
// Every frame: standing on (x, y), the centre of its base.
draw(ctx, timon, 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 timon
# With Fogón's tools (connector)
add_assets({ slug: "<your-game>", ids: ["timon"] })
# It lands in client/assets/timon.ts
# https://fogon.page/object/timon