fogón

← Level kit3D assetfogon/nivel-pinches

Pinches

by fogonCC010789 blocks
PinchesDrag to turn it
// «Pinches» · gpt-6-sol (medium)
// A spike trap tile: a full 48x48 metal base plate (x 0..47, y 0..47) 3 blocks thick (z 0..2), dark steel grey with a slightly lighter bevelled 1-block border and small rivets in the corners. On top, a regular 4x4 grid of sharp metal spikes (cones) evenly spaced 12 blocks apart (centers at 6, 18, 30, 42 on x and y): each spike has a base radius of 4 and is 14 tall, tapering to a one-block point, in light silver with a darker side and a white glint near the tip; the tips are slightly reddish.

// Full-size steel plate, three blocks thick.
for (let x = 0; x < 48; x++) {
  for (let y = 0; y < 48; y++) {
    const edge = x === 0 || x === 47 || y === 0 || y === 47;
    const innerRim = x === 1 || x === 46 || y === 1 || y === 46;

    set(x, y, 0, edge ? "#53616d" : "#34414c");
    set(x, y, 1, edge ? "#71818d" : "#45535f");
    set(x, y, 2,
      edge ? "#9aaab4" :
      innerRim ? "#788893" :
      rand() < 0.025 ? "#697985" : "#60707c"
    );
  }
}

// Fine panel seams, midway between spike rows.
for (const seam of [12, 24, 36]) {
  for (let i = 2; i <= 45; i++) {
    set(seam, i, 2, "#52616d");
    set(i, seam, 2, "#52616d");
  }
}

// Small corner rivets.
for (const x of [3, 44]) {
  for (const y of [3, 44]) {
    set(x, y, 3, "#aebdc5");
    set(x - 1, y, 3, "#788994");
    set(x, y - 1, 3, "#e3ebee");
  }
}

// Sixteen solid, tapered silver spikes.
for (const cx of [6, 18, 30, 42]) {
  for (const cy of [6, 18, 30, 42]) {
    for (let level = 0; level < 14; level++) {
      const z = 3 + level;
      const radius = 4 * (1 - level / 13);

      for (let dx = -4; dx <= 4; dx++) {
        for (let dy = -4; dy <= 4; dy++) {
          if (dx * dx + dy * dy > radius * radius + 0.12) continue;

          let color;
          if (level === 13) {
            color = "#ce7778"; // faintly reddish point
          } else if (level === 12) {
            color = "#e8b1ad";
          } else if (dx >= 1 || dy >= 2) {
            color = "#8999a5"; // shaded right and rear faces
          } else if (dx <= -1 && dy <= 0) {
            color = "#e8f0f1";
          } else {
            color = "#bdcbd1";
          }

          if (level <= 1 && (dx * dx + dy * dy) >= 8) color = "#71838f";
          if (level >= 9 && level <= 11 && dx === -1 && dy <= 0) {
            color = "#ffffff";
          }
          set(cx + dx, cy + dy, z, color);
        }
      }
    }
  }
}