fogón

← ArmasObjeto 3Dfogon/arma-rifle-rafaga

Rifle de ráfaga

de fogonCC02846 bloques
Rifle de ráfagaArrastrá para girarlo
// «Rifle de ráfaga» · propio
// An olive-green military assault rifle with a scope, curved magazine and stock.

const colors = () => {};
part("body");

// ================= RECEIVER =================
box(20,13,0, 27,32,6, "#35362c");
box(20,13,0, 20,32,6, "#4b4c3e");
box(27,13,0, 27,32,6, "#23241e");
box(26,13,0, 26,32,6, "#2b2c24");

// metal grain on the top face
for (let y = 13; y <= 32; y++) {
  for (let x = 21; x <= 25; x++) {
    if ((x * 5 + y * 7) % 13 === 0) set(x, y, 6, "#3f4034");
  }
}

// ejection port + charging handle
box(21,17,6, 23,22,6, "#23241e");
box(21,17,6, 23,17,6, "#4b4c3e");
box(22,14,6, 22,16,6, "#5c5e50");

// ================= STOCK =================
box(21,32,0, 26,37,5, "#3c4a22");
box(19,36,0, 27,46,5, "#52672c");
box(19,36,0, 19,46,5, "#6b8339");
box(27,36,0, 27,46,5, "#3c4a22");
box(19,45,0, 27,46,5, "#23241e");     // butt pad
box(22,39,0, 25,43,5, null);          // thumbhole cutout
box(19,38,5, 19,44,5, "#82994a");     // cheek highlight

// ================= HANDGUARD =================
box(21,6,1, 26,12,5, "#52672c");
box(21,6,1, 21,12,5, "#6b8339");
box(26,6,1, 26,12,5, "#3c4a22");
for (let y = 7; y <= 11; y += 2) box(22,y,5, 25,y,5, "#3c4a22");

// ================= BARREL =================
box(22,3,2, 25,8,4, "#35362c");
box(22,3,2, 22,8,4, "#4b4c3e");

// muzzle brake
box(21,1,1, 26,4,5, "#23241e");
box(21,1,1, 21,4,5, "#4b4c3e");
box(22,2,5, 25,2,5, "#35362c");
box(22,4,5, 25,4,5, "#35362c");
box(23,1,2, 24,1,4, null);

// front sight
box(19,7,2, 21,9,4, "#35362c");
box(19,7,2, 19,9,4, "#4b4c3e");

// ================= SCOPE =================
box(15,17,1, 19,27,5, "#2b2c24");
box(15,17,1, 15,27,5, "#4b4c3e");
box(19,17,1, 19,27,5, "#1d1e19");
box(15,18,1, 19,19,5, "#4b4c3e");
box(15,25,1, 19,26,5, "#4b4c3e");
box(14,21,2, 15,23,4, "#35362c");      // turret
box(19,20,2, 20,22,4, "#35362c");      // mount
box(19,24,2, 20,26,4, "#35362c");      // mount
box(16,17,2, 18,17,4, "#1b3b38");      // objective

// ================= GRIP & TRIGGER =================
box(27,27,1, 32,31,5, "#23241e");
box(27,27,1, 27,31,5, "#35362c");
box(32,27,1, 32,31,5, "#4b4c3e");
box(27,25,1, 31,26,5, "#35362c");      // guard front post
box(30,25,1, 31,31,5, "#35362c");      // guard lower rail
box(28,27,2, 29,28,4, "#5c5e50");      // trigger

// ================= MAGAZINE =================
box(27,16,1, 30,25,5, "#3c4a22");
box(30,15,1, 32,24,5, "#3c4a22");
box(32,14,1, 34,22,5, "#3c4a22");
box(27,16,1, 27,25,5, "#52672c");
box(30,15,1, 30,24,5, "#52672c");
box(32,14,1, 32,22,5, "#52672c");
box(34,14,1, 34,22,5, "#23241e");      // floor plate
for (let y = 16; y <= 22; y += 2) box(28,y,5, 33,y,5, "#4a5c2a");

// ================= GLOWING LENS =================
part("lens");
box(16,17,2, 18,17,4, "#2e6f68");

// ================= FLOATING SPARK =================
part("spark", [24, 0, 8]);
sphere(24, 0, 8, 1.0, "#ffcf6b");

// ================= ANIMATION =================
animate("spark", { type: "bob", axis: "z", speed: 1.6, amplitude: 1.5 });
colors("spark", { palette: ["#ffcf6b", "#ff9a3c", "#ffe9a8"], pattern: "flicker", speed: 2.2, glow: 0.9 });
colors("lens", { palette: ["#1b3b38", "#2e6f68", "#7fe3d0", "#d9fffa"], pattern: "pulse", speed: 1.2, glow: 0.6 });