fogón

← Level pieces 23D assetfogon/nivel-medio-bloque-pasto

Medio bloque de pasto

by fogonCC055296 blocks
Medio bloque de pastoDrag to turn it
// «Medio bloque de pasto» · gpt-6-sol (medium)
// A half-height modular block: a full 48x48 footprint (x 0..47, y 0..47) but only 24 tall (z 0..23), a solid box with flat vertical sides and a flat top so it stacks and tiles seamlessly. Green grass top (z 22..23) with a 1-block uneven grass lip on the sides, warm brown dirt below in 2 shades with a few pebbles.

// Solid, grid-aligned 48×48×24 ground tile.
box(0, 0, 0, 47, 47, 9, "#9b6035");
box(0, 0, 10, 47, 47, 21, "#b8753e");
box(0, 0, 22, 47, 47, 22, "#3eaa38");
box(0, 0, 23, 47, 47, 23, "#65cf45");

// Light texture stays on the visible surfaces; the tile remains solid.
for (let y = 0; y < 48; y++) {
  for (let x = 0; x < 48; x++) {
    if (rand() < 0.045) set(x, y, 23, "#78dc52");
    else if (rand() < 0.035) set(x, y, 23, "#55bf3e");
  }
}

function dirtDetail(x, y, z) {
  const roll = rand();
  if (roll < 0.025) set(x, y, z, z < 10 ? "#ad7040" : "#c7884b");
  else if (roll < 0.040) set(x, y, z, z < 10 ? "#874d2e" : "#a76638");
}

for (let z = 1; z <= 20; z++) {
  for (let i = 0; i < 48; i++) {
    dirtDetail(i, 0, z);
    dirtDetail(i, 47, z);
    dirtDetail(0, i, z);
    dirtDetail(47, i, z);
  }
}

// Short, uneven grass fringe, confined to the footprint.
for (let i = 0; i < 48; i++) {
  for (const [x, y] of [[i, 0], [i, 47], [0, i], [47, i]]) {
    if ((Math.floor(i / 4) % 3 !== 1 && i % 4 !== 3) || rand() < 0.18) {
      set(x, y, 21, rand() < 0.25 ? "#50b83b" : "#3f9f35");
    }
  }
}

// A few small, flush pebbles in the dirt faces.
for (const [x, y, z] of [
  [7, 0, 5], [32, 0, 13], [43, 0, 7],
  [13, 47, 15], [38, 47, 4],
  [0, 9, 12], [0, 35, 5],
  [47, 18, 6], [47, 40, 16]
]) {
  set(x, y, z, "#c5ad87");
}