← Level pieces 23D assetfogon/nivel-baldosas
Piso de baldosas
Drag to turn it// «Piso de baldosas» · 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 checkerboard tiled floor on top (z 6..7): 8x8 tiles alternating cream white and terracotta red, with thin 1-block light grey grout lines; the sides are plain light grey concrete with a slightly darker bottom row.
// Solid 48×48×8 slab with plain concrete sides.
box(0, 0, 0, 47, 47, 0, "#a3aaab");
box(0, 0, 1, 47, 47, 7, "#cbd1d1");
// Eight 6×6 checkerboard cells in each direction.
// Grout also frames the perimeter, keeping every exposed side grey.
for (let y = 0; y < 48; y++) {
for (let x = 0; x < 48; x++) {
const grout = x === 0 || y === 0 || x === 47 || y === 47 ||
x % 6 === 5 || y % 6 === 5;
if (grout) {
set(x, y, 7, "#d7dcdb");
} else {
const red = (Math.floor(x / 6) + Math.floor(y / 6)) % 2 === 1;
set(x, y, 7, red ? "#d87558" : "#f5ebd5");
}
}
}import { draw } from "./assets/voxel";
import { nivelBaldosas } from "./assets/nivel-baldosas";
// Every frame: standing on (x, y), the centre of its base.
draw(ctx, nivelBaldosas, x, y, { size: 64, angle: 0, t: performance.now() / 1000 });
// size: its longest side, in px
// angle: turn on the floor, in radians
// t: seconds; if it moves, that animates it# In a terminal, in the game's folder
fogon assets add nivel-baldosas
# With Fogón's tools (connector)
add_assets({ slug: "<your-game>", ids: ["nivel-baldosas"] })
# It lands in client/assets/nivel-baldosas.ts
# https://fogon.page/object/nivel-baldosas