← City3D assetfogon/paso-peatonal
Paso peatonal
Drag to turn it// «Paso peatonal» · gpt-6-sol (medium)
// A flat street tile with a pedestrian crossing: a full 48x48 footprint, 3 blocks thick, dark asphalt grey with light noise, with thick white zebra stripes running along y across the middle, and thin yellow lines along the two edges. Perfectly flat so it tiles with other street tiles.
// Flat, full-footprint street tile.
box(0, 0, 0, 47, 47, 1, "#35383b");
box(0, 0, 2, 47, 47, 2, "#424548");
// Subtle asphalt variation, confined to the top surface.
for (let y = 0; y < 48; y++) {
for (let x = 0; x < 48; x++) {
const n = rand();
if (n < 0.09) set(x, y, 2, "#484b4d");
else if (n < 0.15) set(x, y, 2, "#3b3e41");
}
}
// Thin yellow road-edge lines.
for (let x = 0; x < 48; x++) {
for (const y of [2, 3, 44, 45]) {
set(x, y, 2, rand() < 0.08 ? "#e2ae38" : "#f4c84e");
}
}
// Chunky white zebra stripes, running in the y direction.
for (const x0 of [5, 13, 21, 29, 37]) {
for (let x = x0; x < x0 + 5; x++) {
for (let y = 9; y <= 38; y++) {
set(x, y, 2, rand() < 0.07 ? "#dce0da" : "#f3f1e9");
}
}
}import { draw } from "./assets/voxel";
import { pasoPeatonal } from "./assets/paso-peatonal";
// Every frame: standing on (x, y), the centre of its base.
draw(ctx, pasoPeatonal, 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 paso-peatonal
# With Fogón's tools (connector)
add_assets({ slug: "<your-game>", ids: ["paso-peatonal"] })
# It lands in client/assets/paso-peatonal.ts
# https://fogon.page/object/paso-peatonal