← City3D assetfogon/senal-de-giro
Señal de giro
Drag to turn it// «Señal de giro» · gpt-6-sol (medium)
// A traffic sign on a thin grey metal post: a round blue disc facing front (-y) with a thick white curved arrow turning right, with a thin white rim. The post stands on the ground and the disc sits at the top, about 34 blocks high in total.
// Thin metal post and grounded foot
box(22, 21, 0, 26, 25, 0, "#78858b");
box(23, 22, 1, 25, 24, 16, "#909da3");
box(23, 22, 1, 23, 22, 16, "#c5d0d2");
box(25, 24, 1, 25, 24, 16, "#65737c");
// Round sign, centered at x=24, z=24
const cx = 24, cz = 24;
for (let x = 12; x <= 36; x++) {
for (let z = 12; z <= 36; z++) {
const d = Math.hypot(x - cx, z - cz);
if (d > 11.5) continue;
// Solid, chunky back and dark blue side edge
for (let y = 21; y <= 24; y++) {
const color = y === 24 ? "#244974" : "#315987";
set(x, y, z, color);
}
// Crisp white rim around a blue front face
if (d >= 10.45) {
set(x, 20, z, z > cz ? "#ffffff" : "#e0e9ef");
} else {
let blue = z > cz ? "#2672c5" : "#1764b7";
if (rand() < 0.045) blue = "#347dca";
set(x, 20, z, blue);
}
}
}
// Raised white arrow: upright stem, rounded right turn, and broad arrowhead
const arrow = (x0, z0, x1, z1, color = "#ffffff") =>
box(x0, 19, z0, x1, 19, z1, color);
arrow(20, 17, 23, 23);
arrow(21, 24, 24, 25);
arrow(23, 26, 26, 28);
arrow(26, 27, 29, 29);
// Right-pointing triangular head
for (let x = 27; x <= 33; x++) {
const halfWidth = Math.round((33 - x) * 0.7);
arrow(x, 28 - halfWidth, x, 28 + halfWidth);
}import { draw } from "./assets/voxel";
import { senalDeGiro } from "./assets/senal-de-giro";
// Every frame: standing on (x, y), the centre of its base.
draw(ctx, senalDeGiro, 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 senal-de-giro
# With Fogón's tools (connector)
add_assets({ slug: "<your-game>", ids: ["senal-de-giro"] })
# It lands in client/assets/senal-de-giro.ts
# https://fogon.page/object/senal-de-giro