← Weapons3D assetfogon/arma-escopeta
Escopeta
Drag to turn it// «Escopeta» · propio
// A pump shotgun: long dark metal barrel, wooden pump and wooden stock.
const colors = () => {};
part("body");
// ================= BARREL =================
cylinder(24, 2, 4, 2.4, 30, "#3a3f45", "y");
cylinder(24, 2, 4, 2.7, 2, "#1a1c1f", "y"); // muzzle ring
box(23, 4, 6, 25, 30, 6, "#4a5058"); // top light
box(23, 4, 2, 25, 30, 2, "#232628"); // under shadow
set(24, 2, 4, "#0a0a0c"); // bore
// front bead sight
box(24, 4, 7, 24, 5, 7, "#c9a227");
// ================= MAGAZINE TUBE =================
cylinder(24, 6, 2, 1.6, 26, "#2f3338", "y");
cylinder(24, 6, 2, 2.0, 2, "#4a5058", "y"); // end cap
// ================= PUMP (moving part) =================
part("pump", [24, 20, 2]);
box(20, 15, 0, 28, 24, 5, "#8a5a2e");
box(21, 15, 5, 27, 24, 5, "#a8703a");
for (let y = 16; y <= 23; y += 2) box(21, y, 0, 27, y, 5, "#6b4423");
box(20, 15, 0, 20, 24, 5, "#6b4423");
box(28, 15, 0, 28, 24, 5, "#6b4423");
box(20, 15, 0, 28, 15, 5, "#5e3a1c");
box(20, 24, 0, 28, 24, 5, "#5e3a1c");
part("body");
// ================= RECEIVER =================
box(21, 29, 0, 27, 38, 7, "#3a3f45");
box(22, 30, 7, 26, 37, 7, "#4a5058"); // top plate
box(21, 29, 0, 27, 29, 7, "#2f3338"); // front face
box(21, 38, 0, 27, 38, 7, "#2f3338"); // rear face
// ejection port on right side
box(27, 32, 3, 27, 36, 5, "#1a1c1f");
set(27, 34, 4, "#b23a2e"); // shell peeking out
set(27, 35, 4, "#8f2b22");
// bolt handle
box(28, 32, 5, 28, 34, 6, "#4a5058");
// shell side-saddle on left side
for (let i = 0; i < 3; i++) {
const yy = 31 + i * 2;
box(20, yy, 2, 20, yy + 1, 4, "#b23a2e");
box(20, yy, 5, 20, yy + 1, 5, "#c9a227");
}
// ================= STOCK =================
box(21, 39, 0, 27, 41, 7, "#8a5a2e");
box(21, 42, 0, 27, 43, 6, "#8a5a2e");
box(22, 44, 0, 26, 45, 6, "#8a5a2e");
box(22, 46, 0, 26, 46, 5, "#4a2e16"); // butt pad
box(22, 39, 7, 26, 41, 7, "#a8703a"); // comb highlight
box(22, 42, 6, 26, 43, 6, "#a8703a");
box(22, 44, 6, 26, 45, 6, "#a8703a");
box(21, 39, 0, 27, 46, 0, "#6b4423"); // underside shadow
// ================= WOOD GRAIN + METAL WEAR =================
forEach((x, y, z, c) => {
if (c === "#8a5a2e") {
const n = rand();
if (n < 0.14) set(x, y, z, "#6b4423");
else if (n > 0.90) set(x, y, z, "#a8703a");
} else if (c === "#3a3f45") {
if (rand() < 0.10) set(x, y, z, "#2f3338");
}
});
// ================= ANIMATION =================
animate("pump", { type: "bob", axis: "y", speed: 1.0, amplitude: 2.5 });import { draw } from "./assets/voxel";
import { armaEscopeta } from "./assets/arma-escopeta";
// Every frame: standing on (x, y), the centre of its base.
draw(ctx, armaEscopeta, 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-escopeta
# With Fogón's tools (connector)
add_assets({ slug: "<your-game>", ids: ["arma-escopeta"] })
# It lands in client/assets/arma-escopeta.ts
# https://fogon.page/object/arma-escopeta