← City3D assetfogon/banco-de-plaza
Banco de plaza
Drag to turn it// «Banco de plaza» · gpt-6-sol (medium)
// A classic park bench: a long seat and a backrest made of horizontal green-painted wooden slats, held by two ornate black cast iron side frames with curved armrests. The seat faces front (-y), with the backrest at the back (+y). Wide and low.
const iron = "#172b28";
const ironMid = "#29443a";
const ironLight = "#527365";
const greenDark = "#205443";
const green = "#32745a";
const greenLight = "#4c916c";
const greenTop = "#69a77c";
const brass = "#d5aa58";
// Cast-iron side frames, including the feet, back supports and curved arms.
for (const x of [7, 39]) {
for (const y of [16, 31]) {
box(x - 1, y - 2, 0, x + 1, y + 2, 1, iron);
box(x, y - 1, 2, x + 1, y + 1, 11, ironMid);
box(x, y - 1, 3, x, y - 1, 10, ironLight);
}
// Rear upright leans back with the wooden backrest.
line(x, 30, 10, x, 36, 27, 1, iron);
line(x, 31, 13, x, 35, 26, 0, ironLight);
// Thick, gently rising armrest and its curled front tip.
line(x, 15, 18, x, 18, 19, 1, iron);
line(x, 18, 19, x, 29, 19, 1, iron);
line(x, 29, 19, x, 34, 22, 1, iron);
line(x, 17, 20, x, 29, 20, 0, ironLight);
line(x, 15, 18, x, 14, 17, 1, ironMid);
set(x, 14, 18, brass);
// Decorative scrollwork beneath the arm, visible in side profile.
const scroll = [
[18, 17], [20, 16], [22, 15], [25, 15],
[27, 16], [27, 18], [25, 18], [24, 17],
[25, 16]
];
for (let i = 1; i < scroll.length; i++) {
line(x, scroll[i - 1][0], scroll[i - 1][1],
x, scroll[i][0], scroll[i][1], 0, ironLight);
}
line(x, 17, 11, x, 21, 16, 0, ironMid);
line(x, 31, 11, x, 27, 16, 0, ironMid);
set(x, 25, 17, brass);
}
// Sturdy rails tucked beneath the seat.
box(8, 16, 9, 38, 17, 10, iron);
box(8, 28, 9, 38, 29, 10, iron);
box(9, 16, 10, 37, 16, 10, ironLight);
// Three distinct horizontal seat planks.
for (const [front, back] of [[16, 19], [21, 24], [26, 29]]) {
box(8, front, 11, 38, back, 12, greenDark);
box(8, front, 13, 38, back, 13, green);
box(8, front + 1, 14, 38, back, 14, greenLight);
box(9, back, 14, 37, back, 14, greenTop);
// Small flecks of painted wood grain.
for (let i = 0; i < 32; i++) {
const x = 10 + Math.floor(rand() * 27);
const y = front + 1 + Math.floor(rand() * (back - front));
set(x, y, 14, rand() < 0.5 ? green : greenTop);
}
for (const x of [10, 36]) {
set(x, front + 1, 14, brass);
}
}
// Rounded-looking painted front apron.
box(8, 14, 10, 38, 15, 12, greenDark);
box(9, 14, 12, 37, 14, 12, greenLight);
// Backrest: three separated, slightly rearward-stepped slats.
for (const [y, z] of [[30, 15], [32, 20], [34, 25]]) {
box(8, y, z, 38, y + 1, z + 2, greenDark);
box(8, y, z + 1, 38, y, z + 2, green);
box(9, y, z + 2, 37, y, z + 2, greenLight);
box(9, y + 1, z + 2, 37, y + 1, z + 2, greenTop);
for (let i = 0; i < 24; i++) {
const x = 10 + Math.floor(rand() * 27);
set(x, y, z + 2, rand() < 0.5 ? green : greenTop);
}
for (const x of [10, 36]) set(x, y, z + 1, brass);
}
// Bright caps and a restrained fileteado-inspired accent on the front rail.
for (const x of [7, 39]) {
box(x - 1, 14, 19, x + 1, 15, 19, ironLight);
set(x, 15, 20, brass);
}
for (const x of [20, 22, 24, 26]) set(x, 14, 11, brass);import { draw } from "./assets/voxel";
import { bancoDePlaza } from "./assets/banco-de-plaza";
// Every frame: standing on (x, y), the centre of its base.
draw(ctx, bancoDePlaza, 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 banco-de-plaza
# With Fogón's tools (connector)
add_assets({ slug: "<your-game>", ids: ["banco-de-plaza"] })
# It lands in client/assets/banco-de-plaza.ts
# https://fogon.page/object/banco-de-plaza