← Weapons3D assetfogon/arma-minigun
Minigun
Drag to turn it// «Minigun» · propio
// A rotary minigun: six barrels in a circle, a big motor body and an ammo box, dark grey with yellow details.
const colors = () => {};
const D0="#191c21", D1="#242a32", D2="#333a44", D3="#464e5a", D4="#5d6673";
const Y1="#a87b22", Y2="#e8b93e", Y3="#ffdd80";
const B1="#8a6a2f", B2="#c9a04a";
part("body");
// ---------- MOTOR HOUSING ----------
box(3, 20, 0, 17, 38, 19, D2);
for (let x = 3; x <= 17; x++)
for (let y = 20; y <= 38; y++)
for (let z = 0; z <= 19; z++) {
if (Math.abs(y - 29) >= 8 && Math.abs(z - 9.5) >= 8) set(x, y, z, null);
}
// rear plate
box(2, 22, 2, 2, 36, 17, D1);
// raised spine
box(4, 24, 19, 16, 34, 20, D3);
// bold yellow band around housing
for (let x = 9; x <= 11; x++)
for (let y = 20; y <= 38; y++)
for (let z = 0; z <= 20; z++)
if (get(x, y, z)) set(x, y, z, Y2);
// ---------- CARRY HANDLE ----------
box(6, 27, 20, 7, 32, 25, D1);
box(13, 27, 20, 14, 32, 25, D1);
box(6, 27, 24, 14, 32, 25, D1);
box(6, 27, 21, 14, 32, 21, D2);
// ---------- ROTOR DRUM ----------
cylinder(18, 29, 10, 8, 10, D3, "x");
for (let y = 20; y <= 38; y++)
for (let z = 1; z <= 19; z++) {
const d = Math.hypot(y - 29, z - 10);
if (d <= 8) set(27, y, z, d > 7.2 ? D0 : D1);
}
for (const p of [[6,0],[3,5],[-3,5],[-6,0],[-3,-5],[3,-5]])
set(27, 29 + p[0], 10 + p[1], Y2);
// ---------- STATIC BARREL SUPPORT RING ----------
for (let x = 33; x <= 34; x++)
for (let y = 20; y <= 38; y++)
for (let z = 1; z <= 19; z++) {
const d = Math.hypot(y - 29, z - 10);
if (d <= 7.8 && d >= 5.4) set(x, y, z, D2);
}
// ---------- AMMO BOX ----------
box(7, 10, 0, 22, 20, 8, D3);
box(6, 9, 8, 23, 21, 12, D1);
for (let x = 6; x <= 23; x++)
for (let y = 9; y <= 21; y++)
if (x === 6 || x === 23 || y === 9) set(x, y, 10, Y2);
for (let x = 7; x <= 22; x++)
for (let z = 2; z <= 3; z++) set(x, 10, z, Y1);
for (let x = 8; x <= 21; x += 2) {
set(x, 13, 13, B2);
set(x, 14, 13, B2);
set(x, 15, 13, B1);
}
box(7, 10, 0, 7, 20, 1, D1);
box(22, 10, 0, 22, 20, 1, D1);
// ---------- SIX BARRELS (spinning assembly) ----------
part("barrels", [24, 29, 10]);
const offs = [[4,0],[2,4],[-2,4],[-4,0],[-2,-4],[2,-4]];
for (let i = 0; i < 6; i++) {
const cy = 29 + offs[i][0];
const cz = 10 + offs[i][1];
for (let x = 25; x <= 45; x++) {
for (let dy = -1; dy <= 1; dy++)
for (let dz = -1; dz <= 1; dz++) {
let c = D2;
if (dz === 1) c = D4;
if (x === 39 || x === 40) c = Y2;
if (x >= 44) c = D0;
set(x, cy + dy, cz + dz, c);
}
}
}
// muzzle clamp ring (spins with barrels)
for (let x = 42; x <= 43; x++)
for (let y = 20; y <= 38; y++)
for (let z = 1; z <= 19; z++) {
const d = Math.hypot(y - 29, z - 10);
if (d <= 7.8 && d >= 5.4) set(x, y, z, D1);
}
for (let x = 42; x <= 43; x++)
for (const p of [[7,0],[3,6],[-3,6],[-7,0],[-3,-6],[3,-6]])
set(x, 29 + p[0], 10 + p[1], Y2);
// ---------- TOP POWER LIGHT ----------
part("light");
sphere(22, 29, 19, 1.6, Y3);
ellipsoid(22, 29, 19, 2.4, 2.4, 1.2, D1);
sphere(22, 29, 19, 1.6, Y3);
// ---------- SUBTLE SURFACE NOISE ----------
forEach((x, y, z, c) => {
if (c === D2 && rand() < 0.10) set(x, y, z, D3);
else if (c === D3 && rand() < 0.10) set(x, y, z, D2);
else if (c === D4 && rand() < 0.12) set(x, y, z, D3);
});
// ---------- ANIMATION ----------
animate("barrels", { type: "spin", axis: "x", speed: 5 });
colors("light", { palette: ["#ffdd80", "#ff9a2a", "#fff3c4"], pattern: "pulse", speed: 2, glow: 1 });import { draw } from "./assets/voxel";
import { armaMinigun } from "./assets/arma-minigun";
// Every frame: standing on (x, y), the centre of its base.
draw(ctx, armaMinigun, 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 arma-minigun
# With Fogón's tools (connector)
add_assets({ slug: "<your-game>", ids: ["arma-minigun"] })
# It lands in client/assets/arma-minigun.ts
# https://fogon.page/object/arma-minigun