fogón

← Weapons3D assetfogon/arma-lanzallamas

Lanzallamas

by fogonCC02070 blocks
LanzallamasDrag to turn it
// «Lanzallamas» · propio
// A flamethrower: a red fuel tank at the back, metal pipe and nozzle with a little blue pilot flame at the tip.

const colors = () => {};
// =========================================================
//  FLAMETHROWER  —  lying flat, nozzle pointing toward -y
// =========================================================

const RED_A = "#e2564a";
const RED_B = "#c23a30";
const RED_C = "#93251f";
const MET_A = "#c3c8d2";
const MET_B = "#8d929e";
const MET_C = "#5e636e";
const BR_A  = "#e8c25a";
const BR_B  = "#b0872a";
const BLK_A = "#3b3e46";
const BLK_B = "#23252b";
const FL_A  = "#d8f8ff";
const FL_B  = "#6fd6ff";
const FL_C  = "#2a8fe0";
const GLASS = "#dfe9f2";

// ---------------- FUEL TANK (rear) ----------------
cylinder(24, 31, 5, 5, 14, RED_B, "y");        // body y 31..44
ellipsoid(24, 44, 5, 5, 2, 5, RED_B);          // rounded back

// steel bands
cylinder(24, 33, 5, 5.6, 1, MET_B, "y");
cylinder(24, 41, 5, 5.6, 1, MET_B, "y");

// side fuel valve (balances the silhouette)
cylinder(16, 38, 5, 1.8, 4, BR_B, "x");
cylinder(15, 38, 5, 1.1, 2, BR_A, "x");

// ---------------- BARREL / PIPE ----------------
cylinder(24, 12, 5, 2, 19, MET_B, "y");        // pipe y 12..30
cylinder(24, 29, 5, 3.2, 2, MET_C, "y");       // coupling to tank

// ---------------- NOZZLE (flared bell) ----------------
cylinder(24, 11, 5, 2.6, 1, MET_C, "y");
cylinder(24,  9, 5, 3.2, 2, MET_B, "y");
cylinder(24,  7, 5, 3.8, 2, MET_C, "y");

// ---------------- GRIP / HANDLE ----------------
box(26, 22, 0, 32, 27, 4, BLK_A);
box(28, 22, 0, 28, 27, 4, BLK_B);              // grooves
box(30, 22, 0, 30, 27, 4, BLK_B);
box(32, 23, 0, 32, 26, 3, BLK_B);              // rounded end

// ---------------- PRESSURE GAUGE ----------------
cylinder(24, 37, 10, 2.0, 1, BR_B, "z");
cylinder(24, 37, 11, 1.6, 1, GLASS, "z");

// ---------------- VALVE CAP BASE ----------------
cylinder(24, 40, 10, 2.4, 1, MET_C, "z");

// ---------------- shading / texture pass ----------------
forEach((x, y, z, c) => {
  if (c === RED_B) {
    if (z <= 1)            set(x, y, z, RED_C);
    else if (z >= 8)       set(x, y, z, RED_A);
    else if (rand() < 0.10) set(x, y, z, RED_C);
  } else if (c === MET_B) {
    if (z >= 7)            set(x, y, z, MET_A);
    else if (z <= 1)       set(x, y, z, MET_C);
    else if (rand() < 0.12) set(x, y, z, MET_C);
  }
});

// ---------------- PILOT FLAME ----------------
part("flame", [24, 4, 5]);
cylinder(24, 6, 5, 2.4, 1, FL_C, "y");
cylinder(24, 5, 5, 2.2, 1, FL_C, "y");
cylinder(24, 4, 5, 1.8, 1, FL_B, "y");
cylinder(24, 3, 5, 1.4, 1, FL_B, "y");
cylinder(24, 2, 5, 1.0, 1, FL_A, "y");
set(24, 1, 5, FL_A);
colors("flame", {
  palette: [FL_A, FL_B, FL_C, "#ffffff"],
  pattern: "flicker",
  speed: 2.2,
  glow: 1
});

// ---------------- BOBBING PRESSURE CAP ----------------
part("cap", [24, 40, 11]);
cylinder(24, 40, 11, 2.0, 1, MET_A, "z");
cylinder(24, 40, 12, 1.4, 1, MET_C, "z");
animate("cap", { type: "bob", axis: "z", speed: 1.8, amplitude: 1 });