fogón

← Level pieces 23D assetfogon/nivel-esquina-de-rampa

Esquina de rampa

by fogonCC019601 blocks
Esquina de rampaDrag to turn it
// «Esquina de rampa» · gpt-6-sol (medium)
// An outer corner piece for ramps: a full 48x48 footprint, a solid pyramid-like corner rising from z 0 along the front edge (y 0) AND the left edge (x 0) up to z 24 at the back-right corner (x 47, y 47), so it joins a ramp going up along y and one going up along x. Grass top in green stripes, brown dirt on the vertical faces.

// Outer corner ramp: the front and left edges start at floor level,
// while the back and right edges climb to the back-right corner.
for (let x = 0; x < 48; x++) {
  for (let y = 0; y < 48; y++) {
    const height = Math.floor(Math.min(x, y) * 24 / 47);

    for (let z = 0; z < height; z++) {
      const nearSurface = height - z <= 3;
      let dirt = nearSurface ? "#a65d32" : "#ad6838";

      // Clean horizontal bands make exposed dirt faces readable.
      if (z % 7 === 0) dirt = "#96542f";
      if (rand() < 0.035) dirt = "#bd7741";

      set(x, y, z, dirt);
    }

    // Wide diagonal grass stripes across the sloping top.
    const stripe = (x + y) % 14;
    const grass = stripe < 5 ? "#80df48"
                : stripe < 9 ? "#68cb38"
                : "#57b92f";
    set(x, y, height, grass);
  }
}