← Weapons3D assetfogon/arma-uzis
Uzis
Drag to turn it// «Uzis» · propio
// Two compact black submachine guns (uzi style) side by side, with long magazines.
const colors = () => {};
// Two compact black SMGs (Uzi style) lying flat, muzzles toward -y.
const C_DARK = "#0b0b0f";
const C_BODY = "#181820";
const C_BODY2 = "#22222b";
const C_TOP = "#2d2d38";
const C_EDGE = "#40404e";
const C_METAL = "#4e4e5c";
const C_LIGHT = "#65657a";
const C_RED = "#b8352a";
function buildGun(xTop, dir) {
const X = u => xTop + dir * u;
const put = (u, y, z, c) => set(X(u), y, z, c);
const fill = (u0, u1, y0, y1, z0, z1, c) => {
for (let u = u0; u <= u1; u++)
for (let y = y0; y <= y1; y++)
for (let z = z0; z <= z1; z++)
set(X(u), y, z, c);
};
// ---------- receiver ----------
fill(0, 6, 14, 40, 0, 3, C_BODY);
fill(0, 6, 14, 40, 4, 4, C_TOP);
fill(0, 0, 14, 40, 0, 4, C_EDGE); // top ridge highlight
fill(6, 6, 14, 40, 0, 2, C_DARK); // under shadow
// ---------- barrel + shroud ----------
fill(2, 4, 6, 14, 1, 3, C_BODY);
fill(2, 4, 6, 14, 3, 3, C_METAL);
fill(1, 5, 9, 14, 0, 4, C_BODY2);
fill(1, 5, 9, 14, 4, 4, C_TOP);
fill(2, 4, 6, 6, 1, 3, C_METAL); // muzzle face
put(3, 6, 2, C_DARK); // bore
put(2, 8, 4, C_LIGHT); // tiny glint
// ---------- sights ----------
fill(-1, -1, 11, 13, 1, 4, C_EDGE);
fill(-1, -1, 35, 38, 1, 4, C_EDGE);
// ---------- top charging handle ----------
fill(2, 4, 36, 38, 5, 5, C_METAL);
// ---------- pistol grip / long raked magazine ----------
for (let u = 6; u <= 18; u++) {
const yc = 35 - (u - 6) * 0.45;
const half = u <= 8 ? 3 : 2;
const y0 = Math.round(yc - half);
const y1 = Math.round(yc + half);
for (let y = y0; y <= y1; y++) {
for (let z = 0; z <= 4; z++) {
let c;
if (z === 0) c = C_DARK;
else if (z === 4) c = (u >= 15) ? C_BODY2 : C_TOP;
else c = C_BODY;
set(X(u), y, z, c);
}
}
}
// magazine base plate
fill(19, 19, 27, 33, 0, 4, C_EDGE);
fill(19, 19, 27, 33, 0, 0, C_DARK);
// ---------- trigger guard + trigger ----------
fill(7, 9, 23, 23, 0, 4, C_BODY2); // front post
fill(9, 9, 23, 31, 0, 4, C_BODY2); // bottom bar
fill(7, 7, 26, 28, 0, 4, C_BODY2); // trigger
fill(7, 9, 23, 23, 4, 4, C_TOP);
fill(9, 9, 23, 31, 4, 4, C_TOP);
// ---------- folded wire stock ----------
fill(1, 1, 40, 44, 0, 4, C_BODY2);
fill(5, 5, 40, 44, 0, 4, C_BODY2);
fill(1, 5, 44, 44, 0, 4, C_BODY2);
fill(1, 1, 40, 44, 4, 4, C_TOP);
fill(5, 5, 40, 44, 4, 4, C_TOP);
fill(1, 5, 44, 44, 4, 4, C_TOP);
// ---------- small details ----------
fill(2, 4, 30, 34, 4, 4, C_METAL); // ejection port panel
put(1, 28, 4, C_RED);
put(1, 29, 4, C_RED);
// ---------- subtle surface noise ----------
for (let i = 0; i < 22; i++) {
const u = Math.round(rand() * 6);
const y = 14 + Math.round(rand() * 26);
if (get(X(u), y, 4) === C_TOP) set(X(u), y, 4, C_BODY2);
}
for (let i = 0; i < 14; i++) {
const u = 7 + Math.round(rand() * 11);
const y = 27 + Math.round(rand() * 11);
if (get(X(u), y, 4) === C_TOP) set(X(u), y, 4, C_BODY2);
}
}
// ================= LEFT GUN =================
part("gunA", [10, 25, 0]);
buildGun(19, -1);
// ================= RIGHT GUN =================
part("gunB", [36, 25, 0]);
buildGun(27, 1);
// ================= FLOATING PICKUP SPARKS =================
part("sparkA", [10, 25, 9]);
set(10, 25, 9, "#ffd166");
set(10, 25, 10, "#ff9f1c");
set(10, 25, 8, "#ff9f1c");
set(10, 26, 9, "#ff9f1c");
set(10, 24, 9, "#ff9f1c");
set(9, 25, 9, "#ff7b00");
set(11, 25, 9, "#ff7b00");
part("sparkB", [36, 25, 9]);
set(36, 25, 9, "#ffd166");
set(36, 25, 10, "#ff9f1c");
set(36, 25, 8, "#ff9f1c");
set(36, 26, 9, "#ff9f1c");
set(36, 24, 9, "#ff9f1c");
set(35, 25, 9, "#ff7b00");
set(37, 25, 9, "#ff7b00");
part("body");
// ================= ANIMATION =================
animate("sparkA", { type: "bob", axis: "z", speed: 1.6, amplitude: 1.5 });
animate("sparkB", { type: "bob", axis: "z", speed: 1.9, amplitude: 1.5 });
colors("sparkA", { palette: ["#ffd166", "#ff9f1c", "#ff5c00"], pattern: "flicker", speed: 2.2, glow: 1 });
colors("sparkB", { palette: ["#ffd166", "#ff9f1c", "#ff5c00"], pattern: "flicker", speed: 2.2, glow: 1 });import { draw } from "./assets/voxel";
import { armaUzis } from "./assets/arma-uzis";
// Every frame: standing on (x, y), the centre of its base.
draw(ctx, armaUzis, 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-uzis
# With Fogón's tools (connector)
add_assets({ slug: "<your-game>", ids: ["arma-uzis"] })
# It lands in client/assets/arma-uzis.ts
# https://fogon.page/object/arma-uzis