← Piezas de nivel 2Objeto 3Dfogon/nivel-pasto-esquina
Pasto de esquina
Arrastrá para girarlo// «Pasto de esquina» · gpt-6-sol (medium)
// A square ground tile that tiles seamlessly: a full 48x48 footprint (x 0..47, y 0..47), 8 blocks thick (z 0..7), a perfectly flat solid slab with straight vertical sides and no gaps. A grass tile for an outer corner of a level: green grass top, with a raised 2-block lip of darker green bushes along BOTH the front edge (y 0..3) and the left edge (x 0..3), meeting in a rounded corner; the front and left faces show brown dirt with stones and hanging roots.
// Solid, grid-aligned ground tile.
box(0, 0, 0, 47, 47, 6, "#a96535");
box(0, 0, 7, 47, 47, 7, "#55c946");
// Clean grass surface with sparse, subtle color variation.
for (let y = 0; y < 48; y++) {
for (let x = 0; x < 48; x++) {
const n = rand();
if (n < 0.07) set(x, y, 7, "#63d64b");
else if (n < 0.11) set(x, y, 7, "#49bb40");
}
}
// Warm dirt layers on the two exposed vertical faces.
for (let z = 0; z <= 6; z++) {
for (let i = 0; i < 48; i++) {
const base = z <= 1 ? "#8e4e30" : z >= 5 ? "#b8743b" : "#a96535";
const color = rand() < 0.075 ? "#bd7842" : base;
set(i, 0, z, color); // Front
set(0, i, z, color); // Left
}
}
// Chunky stones embedded flush in the dirt faces.
const stones = [
[6, 2], [14, 4], [22, 1], [30, 3], [40, 2],
[9, 5], [26, 5], [44, 5]
];
for (const [p, z] of stones) {
for (let dx = 0; dx < 3; dx++) {
set(p + dx, 0, z, dx === 0 ? "#b9b5a5" : "#dedaca");
set(0, p + dx, z, dx === 0 ? "#b9b5a5" : "#dedaca");
}
set(p + 1, 0, z - 1, "#aaa797");
set(0, p + 1, z - 1, "#aaa797");
}
// Thin roots descending from the grassy rim, painted onto the faces.
for (const p of [3, 11, 19, 35, 46]) {
const bottom = p % 3 === 0 ? 2 : 3;
for (let z = 6; z >= bottom; z--) {
const offset = z <= 3 ? 1 : 0;
set(Math.min(47, p + offset), 0, z, z > 4 ? "#d69c51" : "#946038");
}
}
for (const p of [5, 16, 28, 38, 45]) {
const bottom = p % 2 === 0 ? 2 : 3;
for (let z = 6; z >= bottom; z--) {
const offset = z <= 3 ? 1 : 0;
set(0, Math.min(47, p + offset), z, z > 4 ? "#d69c51" : "#946038");
}
}
// Continuous two-block-high bush lip, wholly inside the tile footprint.
box(0, 0, 8, 47, 3, 9, "#278e37");
box(0, 0, 8, 3, 47, 9, "#278e37");
// Lighter upper foliage and darker outward-facing edges.
for (let y = 0; y < 48; y++) {
for (let x = 0; x < 48; x++) {
if (x > 3 && y > 3) continue;
const highlight = rand();
set(x, y, 9, highlight < 0.18 ? "#55bb46" :
highlight < 0.55 ? "#43aa40" : "#329b3b");
if (x === 0 || y === 0) set(x, y, 8, "#267c34");
}
}
// Rounded-looking, leafy meeting point at the inside corner.
set(3, 3, 9, "#54ba47");
set(3, 2, 9, "#60c34b");
set(2, 3, 9, "#60c34b");
set(2, 2, 9, "#68cb50");
// Bright leaf flecks along the two inward-facing sides of the lip.
for (let p = 7; p < 46; p += 8) {
set(p, 3, 8, "#4db644");
set(3, p, 8, "#4db644");
set(p + 1, 2, 9, "#69cc50");
set(2, p + 1, 9, "#69cc50");
}import { draw } from "./assets/voxel";
import { nivelPastoEsquina } from "./assets/nivel-pasto-esquina";
// En cada cuadro: parado sobre (x, y), el centro de su base.
draw(ctx, nivelPastoEsquina, x, y, { size: 64, angle: 0, t: performance.now() / 1000 });
// size: lo que mide en px su lado más largo
// angle: giro sobre el piso, en radianes
// t: segundos; si se mueve, se anima solo con eso# En una terminal, en la carpeta del juego
fogon assets add nivel-pasto-esquina
# Con las herramientas de Fogón (conector)
add_assets({ slug: "<tu-juego>", ids: ["nivel-pasto-esquina"] })
# Queda en client/assets/nivel-pasto-esquina.ts
# https://fogon.page/object/nivel-pasto-esquina