BetterMech BGPUBLIC · REV 0.1
Recipe · site

3D hall with a seat map

Trends: Live 3D/WebGL scene + Purposeful micro-interactions + Dark theme by default. A Better Mechanics concept from the recipe — not the brand's official site.

The start of the site "3D hall with a seat map"

The proof

WEB · MEHANIKA-3D-ZALAREV 0.1
axe serious
0
overflow 360
0 px
weight
732 KB
h1
1
lang
bg
date
2026-11-22
checkedaxe (WCAG 2.2 AA) in light and dark theme · 360 px · automatic; manual review pending

(a) The reusable prompt (EN, brand-neutral)

Build a single-page 3D view of a venue (sports hall, arena or theatre) for <venue name>, with a seat map
that reacts to data. One HTML file, Three.js (r160) as local ES modules, no external requests.

THE HALL IS PARAMETERS, NOT A MODEL
Describe the bowl with numbers: number of sectors, rows, inner ellipse radii, row step, rise per row (rake),
seat width, aisle share between sectors. Generate every seat from those numbers (sector, row, seat number,
x/y/z, facing angle). Never model seats one by one. If real seat data exists (block, row, number, x, y),
use it instead and derive height from the distance to the court: further away = higher.
A balcony is a separate tier: it starts at least 2 m above the top row of the floor and leans a few metres
toward the stage, so it visibly hangs over the back rows.

RENDERING
All seats are ONE InstancedMesh (one draw call). Colour per seat with setColorAt from its status:
free / held / sold / selected. Picking: raycast → instanceId → seat. Treat a pointer move of more than
6 px as a drag, not a click. Cap devicePixelRatio at 2. OrbitControls with damping and a slow autoRotate
that respects prefers-reduced-motion. Sector labels are HTML pinned to 3D points (CSS2DRenderer).
The court or stage is a flat plane with a thin outline.

DATA AND DASHBOARD
Bottom dashboard of four plain HTML panels: capacity, sold (number, %, bar), sold % per sector, the selected
seat (sector · row · seat · status). Sold/selected updates use aria-live="polite". A "simulate sales" button
fills seats in waves (front rows and long sides first) so the effect can be shown without a backend.

ACCESSIBILITY AND THEMES
lang set; one h1; the canvas has role="img" and an aria-label; every control is a real button
(aria-pressed for toggles); WCAG 2.2 AA contrast in light and dark (prefers-color-scheme); no overflow at 360 px;
a <noscript> line. Read colours from CSS custom properties so the 3D scene follows the theme.

DON'T
- 3D for the act of paying: real purchase stays on a 2D seat map (tap accuracy, zoom, accessibility).
- One mesh per seat, glow and bloom everywhere, a camera that never stops, invented sales numbers
  presented as real, CDN scripts on a site with a strict CSP.

(b) The brief for Better Mechanics

  • Goal: to show that a 3D view of a hall with thousands of seats runs smoothly in the browser and on a phone, with seats coming from data, not from hand modelling.
  • Hall: an example (12 sectors × 22 rows ≈ 4,600 seats) with a court in the middle. The sales numbers are a simulation, and the screen says so.
  • Theme: dark and light by the system setting; the scene colours are read from CSS custom properties.
  • Font: Manrope (local, ../_obshto/fonts/). Three.js r160 is in js/ with its MIT licence.
  • Proof: the same approach runs live in a real ticketing system: real seats by block, row and number, height by distance from the court, a balcony above the floor.