@johnmorrisdotca/kyogijo-stadiums 0.31.0 → 0.33.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,30 @@ All notable changes to this project are written here. The format follows
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.33.0] - 2026-10-20
11
+
12
+ ### Added
13
+
14
+ - **Tokyo Dome City** ([the real stadiums](./docs/stadiums.md), [the district page](./docs/district.md)): **Tokyo Dome** (`park: "tokyo-dome"`, `東京ドーム`, 45,600 seats for baseball) and **Korakuen Hall** (`stadium: "korakuen-hall"` with `sport: "boxing"`, `後楽園ホール`, 1,403 seats and the balconies' standing places up to 2,005), each in the outline of its building from OpenStreetMap, side by side as a district (`["tokyo-dome", "korakuen-hall"]`).
15
+ - **An air-supported roof** (`StadiumRoof` `dome`, `RealShell.roof` `dome`): the 3D roof of Tokyo Dome is a lens over the whole ballpark, a pale skin in rings of pieces from the rim of the walls (26.19 metres) to the crown (56.19), the heights OpenStreetMap maps for the roof as a part of the building; it has no open state (`roofOpen` changes nothing). The roof's outline is kept with its heights (`StadiumOsm.roof.ring`).
16
+ - **Nothing is guessed about how Tokyo Dome's field lies.** No diamond is mapped in the dome and the building is nearly round, so the data says `none` and the drawing lies the way that fits the building (fence and stands, with home plate set so that the fair ground is centred), with no arrow to north; the build chooses that stand-in, the docs say it is not a fact, and a lead for later (the roof falls toward the outfield, which faces the garden to the north-west) is written down, not used.
17
+ - **A hall, a third kind of stadium** (`StadiumKind` `hall`, `StadiumConfigId` `boxing`): a ring in the middle, seats round it from a first row 8 feet from the ring's box, its names Wikidata's labels (`names`) and no ground or park of the package's; the lowest bowl holds the infobox's seats to the seat (`tiers.lowerSeats`) and the balconies are the closed upper bowl. `districtMember` calls it `kind: "hall"`.
18
+ - **A bowl that fits a small building** (`planPark`, `ParkPlan.seatArea`): where a ballpark's usual stands, at 4.6 square feet of plan a seat, do not fit inside its building, the bowl is made steeper (a seat takes less, as an arena's does) until they fit; T-Mobile Park's plan is unchanged.
19
+ - **Japanese Wikipedia as a source** (`scripts/stadiums.data.json` `ja`, `evidence`): `pnpm stadiums:fetch` keeps the revision and the sentences of a stadium's Japanese article beside the English one (`articlesJa`), and `pnpm stadiums` checks the revision and that each phrase a fact leans on is in the kept sentences.
20
+ - **The demos and the docs.** The stadiums page has the two as tabs (the roof, the orientation and the district link say what each is), the district page has the Tokyo Dome City preset, and the docs have a section for each venue, Tokyo Dome City in [the district page](./docs/district.md), items in [the gallery](https://johnmorrisdotca.github.io/kyogijo-stadiums/docs/gallery-stadiums.html), two pictures, the sources in [references](./docs/references.md) and [NOTICE.md](./NOTICE.md) (the Japanese articles' revisions in [NOTICE.ja.md](./NOTICE.ja.md)). Four descriptions are new in both languages (`said.stadiumHall`, `stadiumRingBuilding`, `stadiumPitchPark`, `stadiumNonePark`).
21
+
22
+ ### Changed
23
+
24
+ - The development dependency `@johnmorrisdotca/dougu-sports` is 0.13.0 (was 0.2.0): its four new icons, `sport:mma`, `sport:boxing`, `sport:wrestling` and `sport:prowrestling`, are the combat sports' own, so the test of the real set no longer stands in the karate and judo icons for them, and the demo's emblem pickers list them. Kyogijo's own code and its published package are unchanged; the demo (built from this repository) shows the new icons.
25
+
26
+ ## [0.32.0] - 2026-10-20
27
+
28
+ ### Added
29
+
30
+ - **The real venues of the Atlantic and Metropolitan Divisions**: TD Garden, the KeyBank Center, the Little Caesars Arena, the Amerant Bank Arena, the Bell Centre, the Canadian Tire Centre, the Benchmark International Arena and the Scotiabank Arena; the Lenovo Center, the Nationwide Arena, the Prudential Center, the UBS Arena, Madison Square Garden, the Xfinity Mobile Arena, PPG Paints Arena and the Capital One Arena. That completes the league: all thirty-two arenas, the Western and the Eastern Conference, drawn as the first sixteen were (the outline of the building from OpenStreetMap, read on 2026-10-20; a plausible bowl of the seats, tiers and roof the sources give, each fact labelled `documented` or `plausible`). Three arenas have three seating tiers besides the Grand Casino Arena's: the KeyBank Center's (its article names the 200 and 300 levels), the Bell Centre's (a three-tier layout) and the Canadian Tire Centre's (levels 100, 200 and 300); two tiers are documented for the Lenovo Center, the Prudential Center and Madison Square Garden. The Little Caesars Arena's and the UBS Arena's Wikidata items give no capacity (`seats.wikidata` is `null` there; the infobox's figure for ice hockey is used). Where two outlines carry an arena's Wikidata item (the Xfinity Mobile Arena's) the one tagged `building` is the building; a building that is a relation (the Benchmark International Arena's) is read as the Grand Casino Arena's was.
31
+ - **True orientation where OpenStreetMap maps the ice**: TD Garden, the Xfinity Mobile Arena and PPG Paints Arena have the rink mapped inside the building (a rink-sized outline whose long side gives the heading and whose middle is the rink's), so their rinks lie as the ice does (`basis: "mapped"`), not as the building's main hall suggests. Of the thirty-two, three are mapped, eighteen inferred from the main hall and eleven not known. A venue's `osm.ice.source` can now be a relation.
32
+ - **The demo's venues page, the home page's featured arena, the gallery and the docs** list all thirty-two by division and conference (the Eastern Conference's two divisions are in the chooser, `venuesInConference("eastern")` has its sixteen, `VENUE_IDS` has thirty-two), and the fly-through page flies each of them.
33
+
10
34
  ## [0.31.0] - 2026-10-20
11
35
 
12
36
  ### Added
package/NOTICE.md CHANGED
@@ -45,8 +45,8 @@ picture or code of the sources is copied; each source is named here so that the
45
45
  | `arenas`: each arena's names, years, city, seats, rink sizes, Wikidata item and coordinates | The infobox and the text of the English Wikipedia article of each arena, at the revision cited below (the names with the years the article dates them, the year it opened, closed and was pulled down, the seats for ice hockey and for basketball, a rink's length and width where the article gives them in a sentence of its own); the name in Japanese from the title of its Japanese article or written for the package; the Wikidata item (CC0) that each article is linked to and its coordinates (P625) | Facts. The articles are CC BY-SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/); none of their text, tables or images is used |
46
46
  | `venues`: the outline of each NHL arena's building, how its rink lies in it and the building's height (`VENUE_OSM`, `src/venues.osm.data.ts`) | OpenStreetMap, through the Overpass API: the closed way (or the relation of a building drawn in two ways) tagged with the venue's Wikidata item (and the ice, where it is mapped), read on 2026-10-20, with the raw answers kept in `data-sources/venues/2026-10-20/`; the outline is simplified to a metre, and the way the rink lies is worked out from it (`coreOf`, `src/venues.geo.ts`) | ODbL 1.0, (c) OpenStreetMap contributors (https://www.openstreetmap.org/copyright): a derived database, kept in its own file and offered under the ODbL; a drawing made from it is a produced work and carries the credit (`VENUE_ATTRIBUTION`) |
47
47
  | `venues`: each venue's seats for ice hockey, number of seating tiers and kind of roof (`VENUE_DATA`, `src/venues.data.ts`) | The item of Wikidata (the capacity P1083 and the sport it applies to P641) and the English Wikipedia article of each arena, at the revision cited below, in `data-sources/venues/2026-10-20/` as read; the facts are numbers and words of our own, with what was read in a few words | Wikidata's data is CC0; the facts read from the articles are facts, with the articles credited here (CC BY-SA 4.0) |
48
- | `stadiums`: the outline of each stadium's building, the roof OpenStreetMap maps over it (its heights, the opening in it or its canopies), the pitches or the infield, and how the field lies, worked out from the opening, the pitches or the infield and the outline (`STADIUM_OSM`, `src/stadiums.osm.data.ts`) | OpenStreetMap, through the Overpass API: the closed way tagged with the stadium's Wikidata item and the multipolygon of its roof (BC Place), or the relation of the building, the roof parts and the pitches or the infield named in `scripts/stadiums.data.json` (Lumen Field, T-Mobile Park), read on 2026-10-20, with the raw answers kept in `data-sources/stadiums/2026-10-20/`; the outline is simplified to a metre, and the way the field lies is worked out from the opening, the pitches or the infield (`smallestBox`, `src/venues.geo.ts`; a ballpark's way out to centre field is the one of four where its fence lies inside the outline) | ODbL 1.0, (c) OpenStreetMap contributors (https://www.openstreetmap.org/copyright): a derived database, kept in its own file and offered under the ODbL; a drawing made from it is a produced work and carries the credit (`VENUE_ATTRIBUTION`) |
49
- | `stadiums`: each stadium's seats for each configuration, number of seating bowls, kind of roof and the size of its opening (`STADIUM_DATA`, `src/stadiums.data.ts`) | The item of Wikidata (the capacity P1083) and the English Wikipedia article of each stadium, at the revision cited below, in `data-sources/stadiums/2026-10-20/` as read; the facts are numbers and words of our own, with what was read in a few words | Wikidata's data is CC0; the facts read from the article are facts, with the article credited here (CC BY-SA 4.0) |
48
+ | `stadiums`: the outline of each stadium's building, the roof OpenStreetMap maps over it (its heights, the opening in it or its canopies), the pitches or the infield, and how the field lies, worked out from the opening, the pitches or the infield and the outline (`STADIUM_OSM`, `src/stadiums.osm.data.ts`) | OpenStreetMap, through the Overpass API: the closed way tagged with the stadium's Wikidata item and the multipolygon of its roof (BC Place), or the way or relation of the building, the roof parts, the pitches, the infield or the grass of the field named in `scripts/stadiums.data.json` (Lumen Field, T-Mobile Park, Tokyo Dome, Korakuen Hall), read on 2026-10-20, with the raw answers kept in `data-sources/stadiums/2026-10-20/`; the outline is simplified to a metre, and the way the field lies is worked out from the opening, the pitches or the infield (`smallestBox`, `src/venues.geo.ts`; a ballpark's way out to centre field is the one of four where its fence lies inside the outline, or, where nothing maps it, not known, and the heading is the one in which fence and stands fit the outline best (Tokyo Dome)) | ODbL 1.0, (c) OpenStreetMap contributors (https://www.openstreetmap.org/copyright): a derived database, kept in its own file and offered under the ODbL; a drawing made from it is a produced work and carries the credit (`VENUE_ATTRIBUTION`) |
49
+ | `stadiums`: each stadium's seats for each configuration, number of seating bowls, kind of roof and the size of its opening (`STADIUM_DATA`, `src/stadiums.data.ts`) | The item of Wikidata (the capacity P1083, the coordinates P625 and the labels in English and Japanese that name a hall) and the English Wikipedia article of each stadium, at the revision cited below, and the Japanese article of the stadiums of Japan, at the revision cited in [NOTICE.ja.md](./NOTICE.ja.md#実在のスタジアム), in `data-sources/stadiums/2026-10-20/` as read; the facts are numbers and words of our own, with what was read in a few words (and, for a fact leaning on a sentence, the phrase the archive must hold) | Wikidata's data is CC0; the facts read from the articles are facts, with the articles credited here (CC BY-SA 4.0) |
50
50
  | `atlas`: the clubs that played in each park, ground and arena (`tenants`: the club, its Wikidata item, its league, the years) | The occupants (P466) and home venues (P115) Wikidata lists for each place, with the start (P580) and end (P582) times of each statement, and the clubs' labels in English and Japanese, sports (P641) and leagues (P118), read with the Wikidata API and query service by `scripts/fetch-tenants.mjs` into `scripts/tenants.wikidata.json`; and the `tenants` line of the infobox of each place's English Wikipedia article, at the revision that `source.wikipedia` names for each club (155 articles, read on 2026-10-13) | Facts. Wikidata's data is CC0 (https://creativecommons.org/publicdomain/zero/1.0/), and the articles are CC BY-SA 4.0 as above; the names of clubs and the years are facts, no text, table or image of an article is used. Which clubs are tenants, and the league each is filed under, are our reading, in docs/atlas.md ("Tenants") |
51
51
  | `parks`: the walls, quirks, backstop, warning track, dugouts and extra points of a ballpark (`walls`, `quirks`, `backstop_ft`, `track_ft`, `dugouts`, `labels`) | The infobox and the text of the same English article of each park, at the same revision as its fence (the Japanese article for the heights of the walls of the parks of Japan): the height of the wall along a stretch of the fence and the seasons it stood, the hill, overhang, poles, bullpens, ivy and basket the text describes with figures, the infobox's backstop distance, the warning track's width, the sides of the dugouts, and the further distances the text gives (Wrigley Field's wells, Sportsman's Park's and Milwaukee County Stadium's markers). The stretch each figure covers and the angle of each extra point are our reading of the article's words | Facts. The articles are CC BY-SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/); none of their text, tables or images is used |
52
52
  | `parks`: the coordinates of each ballpark (`lat`, `lon`) and the years it opened and closed (`opened`, `closed`) | The item's coordinate location (P625), its date of official opening or inception (P1619, P571) and of official closure or dissolution (P3999, P576), read with the Wikidata API by `scripts/fetch-park-coordinates.mjs` and checked by `scripts/check-parks.mjs` (ES CON Field's opening, 2023, is read from its article) | Wikidata's data is CC0 (https://creativecommons.org/publicdomain/zero/1.0/) |
@@ -411,7 +411,7 @@ The Japanese Wikipedia articles read for the names, with their revisions, are li
411
411
 
412
412
  ## The venues' sources
413
413
 
414
- The arenas of the NHL's Pacific and Central Divisions, read on 2026-10-20 (`pnpm venues:fetch <date> <division>`; the files are in `data-sources/venues/2026-10-20/`: `osm-<arena>.json` as Overpass returned them, and `wikidata-<division>.json` and `wikipedia-<division>.json`). The outline of a building is OpenStreetMap's, ODbL 1.0, (c) OpenStreetMap contributors, and lives in `src/venues.osm.data.ts` alone. The seats, the tiers and the roof are in `src/venues.data.ts`, with what each cites. No seat map of a team, a ticket seller or a venue is read or copied, and no mark of a team or a league is drawn.
414
+ The thirty-two arenas of the NHL, read on 2026-10-20 (`pnpm venues:fetch <date> <division>`; the files are in `data-sources/venues/2026-10-20/`: `osm-<arena>.json` as Overpass returned them, and `wikidata-<division>.json` and `wikipedia-<division>.json`). The outline of a building is OpenStreetMap's, ODbL 1.0, (c) OpenStreetMap contributors, and lives in `src/venues.osm.data.ts` alone. The seats, the tiers and the roof are in `src/venues.data.ts`, with what each cites. No seat map of a team, a ticket seller or a venue is read or copied, and no mark of a team or a league is drawn.
415
415
 
416
416
  <!-- venues-notice -->
417
417
  | Arena | Wikidata item | OpenStreetMap element | English article and revision |
@@ -432,17 +432,35 @@ The arenas of the NHL's Pacific and Central Divisions, read on 2026-10-20 (`pnpm
432
432
  | Enterprise Center | Q1067700 | way/42369176 | Enterprise Center, 1372086380 |
433
433
  | Delta Center | Q82294 | way/23335190 | Delta Center, 1379043310 |
434
434
  | Canada Life Centre | Q656928 | way/14869890 | Canada Life Centre, 1379717047 |
435
+ | TD Garden | Q432105 | way/25123637 | TD Garden, 1372238200 |
436
+ | KeyBank Center | Q1110789 | way/626433722 | KeyBank Center, 1381057909 |
437
+ | Little Caesars Arena | Q18154984 | way/526548805 | Little Caesars Arena, 1380799342 |
438
+ | Amerant Bank Arena | Q795526 | way/43903801 | Amerant Bank Arena, 1379821144 |
439
+ | Bell Centre | Q522282 | way/19911284 | Bell Centre, 1380110375 |
440
+ | Canadian Tire Centre | Q1327290 | way/449048777 | Canadian Tire Centre, 1378044395 |
441
+ | Benchmark International Arena | Q940199 | relation/12296444 | Benchmark International Arena, 1376541285 |
442
+ | Scotiabank Arena | Q406972 | way/19882585 | Scotiabank Arena, 1380381634 |
443
+ | Lenovo Center | Q39177 | way/47732090 | Lenovo Center, 1380055594 |
444
+ | Nationwide Arena | Q166503 | way/30266537 | Nationwide Arena, 1379010656 |
445
+ | Prudential Center | Q849027 | way/1421198650 | Prudential Center, 1380112777 |
446
+ | UBS Arena | Q48742753 | way/328876880 | UBS Arena, 1374271562 |
447
+ | Madison Square Garden | Q186125 | way/138141251 | Madison Square Garden, 1380115046 |
448
+ | Xfinity Mobile Arena | Q818735 | way/25312366 | Xfinity Mobile Arena, 1380172806 |
449
+ | PPG Paints Arena | Q595460 | way/130358195 | PPG Paints Arena, 1378458359 |
450
+ | Capital One Arena | Q223240 | way/48041466 | Capital One Arena, 1375927841 |
435
451
  <!-- /venues-notice -->
436
452
 
437
453
  ## The stadiums' sources
438
454
 
439
- BC Place, Lumen Field and T-Mobile Park, read on 2026-10-20 (`pnpm stadiums:fetch`; the files are in `data-sources/stadiums/2026-10-20/`: `osm-<stadium>.json` as Overpass returned it, `wikidata.json` and `wikipedia.json`). The outline of the building, its roof and the opening in it are OpenStreetMap's, ODbL 1.0, (c) OpenStreetMap contributors, and live in `src/stadiums.osm.data.ts` alone. The seats of each configuration, the bowls, the roof's kind and the size of its opening are in `src/stadiums.data.ts`, with what each cites. No seat map of a club, a ticket seller or a federation is read or copied, and no mark of a club, a league or a tournament is drawn.
455
+ BC Place, Lumen Field, T-Mobile Park, Tokyo Dome and Korakuen Hall, read on 2026-10-20 (`pnpm stadiums:fetch`; the files are in `data-sources/stadiums/2026-10-20/`: `osm-<stadium>.json` as Overpass returned it, `wikidata.json` and `wikipedia.json`). The outline of the building, its roof and the opening in it are OpenStreetMap's, ODbL 1.0, (c) OpenStreetMap contributors, and live in `src/stadiums.osm.data.ts` alone. The seats of each configuration, the bowls, the roof's kind and the size of its opening are in `src/stadiums.data.ts`, with what each cites. No seat map of a club, a ticket seller or a federation is read or copied, and no mark of a club, a league or a tournament is drawn.
440
456
 
441
457
  | Stadium | Wikidata item | OpenStreetMap way | English article and revision |
442
458
  | --- | --- | --- | --- |
443
459
  | BC Place | Q612227 | way/24705904 | BC Place, 1372065649 |
444
460
  | Lumen Field | Q612736 | relation/2305831 | Lumen Field, 1373998493 |
445
461
  | T-Mobile Park | Q1193117 | relation/3008332 | T-Mobile Park, 1379419810 |
462
+ | Tokyo Dome | Q733748 | way/20028328 | Tokyo Dome, 1379232526 |
463
+ | Korakuen Hall | Q4389857 | way/45977418 | Korakuen Hall, 1372211318 |
446
464
 
447
465
  ## The World Cups' articles
448
466
 
package/README.md CHANGED
@@ -64,7 +64,7 @@ Kyogijo Stadiums draws the places a game is played on, with the score of the gam
64
64
  <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/johnmorrisdotca/kyogijo-stadiums/main/docs/images/venues-saddledome-3d-desk-dark.webp">
65
65
  <img src="https://raw.githubusercontent.com/johnmorrisdotca/kyogijo-stadiums/main/docs/images/venues-saddledome-3d-desk-light.webp" alt="The Scotiabank Saddledome in 3D: two tiers of seats under its saddle roof." width="400">
66
66
  </picture>
67
- <br><strong><a href="./docs/venues.md">Real arenas</a></strong>: the NHL's Western Conference, each in the outline of its building with a plausible bowl of the seats, tiers and roof the sources give; 2D and 3D, with the stands, walls and roof to switch.
67
+ <br><strong><a href="./docs/venues.md">Real arenas</a></strong>: all thirty-two arenas of the NHL, each in the outline of its building with a plausible bowl of the seats, tiers and roof the sources give; 2D and 3D, with the stands, walls and roof to switch.
68
68
  </td>
69
69
  <td align="center" valign="top">
70
70
  <picture>
@@ -591,7 +591,7 @@ console.log(layout.needs.length, layout.needs.width);
591
591
 
592
592
  ### The real venues
593
593
 
594
- `crowd: { real: true }` draws an NHL arena in its building: the outline from OpenStreetMap, the rink lying along the building where it says so, and a plausible bowl of the seats, tiers and roof the sources give. Sixteen arenas so far, the Western Conference's (Pacific and Central Divisions); the Eastern Conference follows ([the real venues](./docs/venues.md)). In 3D the demo's [venues page](https://johnmorrisdotca.github.io/kyogijo-stadiums/venues.html) turns by itself, with the stands, walls, roof, building, markings and labels switched on the view while it turns.
594
+ `crowd: { real: true }` draws an NHL arena in its building: the outline from OpenStreetMap, the rink lying along the building where it says so, and a plausible bowl of the seats, tiers and roof the sources give. All thirty-two arenas of the league, division by division ([the real venues](./docs/venues.md)). In 3D the demo's [venues page](https://johnmorrisdotca.github.io/kyogijo-stadiums/venues.html) turns by itself, with the stands, walls, roof, building, markings and labels switched on the view while it turns.
595
595
 
596
596
  ```ts
597
597
  import { drawKyogijo } from "@johnmorrisdotca/kyogijo-stadiums";
@@ -604,7 +604,7 @@ console.log(svg.includes("ky-cr-shell"), planVenue(venueById("climate-pledge-are
604
604
 
605
605
  ### A real stadium, and a district
606
606
 
607
- `stadium: "bc-place"` draws BC Place for football or soccer under its cable roof, and Lumen Field and T-Mobile Park (`park`) likewise ([stadiums](./docs/stadiums.md)); `drawDistrict({ venues: ["bc-place", "rogers-arena"] })` puts venues at their real positions, tight as neighbours or spread as a city, to turn together in 3D ([districts](./docs/district.md)).
607
+ `stadium: "bc-place"` draws BC Place for football or soccer under its cable roof, and Lumen Field, T-Mobile Park, Tokyo Dome (`park`) and Korakuen Hall (`sport: "boxing"`) likewise ([stadiums](./docs/stadiums.md)); `drawDistrict({ venues: ["bc-place", "rogers-arena"] })` puts venues at their real positions, tight as neighbours or spread as a city, to turn together in 3D ([districts](./docs/district.md)).
608
608
 
609
609
  <p align="center">
610
610
  <picture>
@@ -788,7 +788,7 @@ English and Japanese: the title, the description and the statuses of a drawing,
788
788
  Not here yet, each welcome as an [issue](https://github.com/johnmorrisdotca/kyogijo-stadiums/issues):
789
789
 
790
790
  - **More surfaces**: the FIBA and college courts, the international rink, rugby pitches, soccer's beach and street formats.
791
- - **More real venues**: the Eastern Conference's arenas, then the NBA's, NFL's and MLB's, and more districts.
791
+ - **More real venues**: the NBA's, NFL's and MLB's, and more districts.
792
792
  - **More parks of the past**: the 19th-century grounds, and the parks whose articles give no distances yet.
793
793
  - **More charts on data layers**: a formation chart, a pass sonar chart and a Voronoi chart of their own (the layers exist; see [team shape](./docs/team-shape.md)).
794
794
  - **Football in a different standard**: the college and high-school hash marks.
package/dist/crowd.d.ts CHANGED
@@ -112,9 +112,10 @@ export interface RealShell {
112
112
  north?: number;
113
113
  /**
114
114
  * `fixed` is a lid; `saddle` a roof that rises at the two ends and falls at the two sides; `cable` a cable-supported roof with an opening over the surface, which a retractable fabric closes (BC Place's);
115
- * `canopy` roofs over some of the stands and leaves the field open (Lumen Field's, `canopies`); `panels` a retractable roof of sections over a ballpark's field and stands, far above its walls (T-Mobile Park's, `panels`).
115
+ * `canopy` roofs over some of the stands and leaves the field open (Lumen Field's, `canopies`); `panels` a retractable roof of sections over a ballpark's field and stands, far above its walls (T-Mobile Park's, `panels`);
116
+ * `dome` an air-supported roof, a membrane that rises from the rim of the walls to a crown over the middle of the field (Tokyo Dome's, `dome`); `open` no roof: the walls only (Koshien Stadium's).
116
117
  */
117
- roof: "fixed" | "saddle" | "cable" | "canopy" | "panels";
118
+ roof: "fixed" | "saddle" | "cable" | "canopy" | "panels" | "dome" | "open";
118
119
  /** The height of the walls, in feet, where it is not the roof's rim (a ballpark's walls stand far below its roof). */
119
120
  wall?: number;
120
121
  /** A `canopy` roof's pieces: the outline of each in the drawing's frame, the height of its low edge (over the field's side) and how far it rises to its high edge (over the back of the stands), in feet. */
@@ -130,6 +131,14 @@ export interface RealShell {
130
131
  top: number;
131
132
  parked: Pt[];
132
133
  };
134
+ /** A `dome` roof: the outline of its rim in the drawing's frame, and the heights of the rim (`low`) and of the crown above the surface, in feet. It is held up by the air inside, so it is a smooth lens, with no struts. */
135
+ dome?: {
136
+ rim: Pt[];
137
+ low: number;
138
+ crown: number;
139
+ };
140
+ /** Draw the walls as ivy-covered (a plain drawing choice: the wall in green). */
141
+ ivy?: boolean;
133
142
  /** A `cable` roof: how far its crown (the edge of the opening) stands over its rim, in feet, and the opening, a polygon in the drawing's frame over the surface. */
134
143
  crown?: {
135
144
  rise: number;
@@ -135,7 +135,7 @@ const poly = (points) => `M${points.map(([x, y]) => `${Math.round(x)} ${Math.rou
135
135
  /** The building of a real venue and, where its rink's orientation is known, a small arrow with an N that says where north lies. The N is a path of three strokes, so that no font is needed. */
136
136
  export function realMarkup(real) {
137
137
  const fp = real.footprint;
138
- let svg = el("path", { class: "ky-cr-shell", d: `M${fp.map(([x, y]) => `${n1(x)} ${n1(y)}`).join("L")}Z` });
138
+ let svg = el("path", { class: real.ivy === true ? "ky-cr-shell ky-cr-ivy" : "ky-cr-shell", d: `M${fp.map(([x, y]) => `${n1(x)} ${n1(y)}`).join("L")}Z` });
139
139
  if (real.north !== undefined) {
140
140
  const top = Math.min(...fp.map((p) => p[1]));
141
141
  const right = Math.max(...fp.map((p) => p[0]));
@@ -250,6 +250,7 @@ export const KYOGIJO_CROWD_STYLE = `
250
250
  .kyogijo .ky-cr-media{fill:#1c2127;fill-opacity:.4}
251
251
  .kyogijo .ky-cr-camera{fill:#1c2127;fill-opacity:.75}
252
252
  .kyogijo .ky-cr-shell{fill:var(--ky-cr-conc);fill-opacity:.55;stroke:var(--ky-cr-rim);stroke-width:1.6;stroke-linejoin:round}
253
+ .kyogijo .ky-cr-ivy{fill:#5b8a45;fill-opacity:.6}
253
254
  .kyogijo .ky-cr-north{fill:var(--ky-cr-rim);stroke:var(--ky-cr-rim);stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
254
255
  .kyogijo .ky-cr-north-n{fill:none;stroke:var(--ky-cr-rim);stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
255
256
  .kyogijo .ky-cr-plaza{fill:var(--ky-apron);stroke:var(--ky-apron);stroke-width:8;stroke-linejoin:round}
@@ -4,7 +4,7 @@ import type { Language, SurfaceOptions } from "./types.ts";
4
4
  /** How a district is fitted: `neighbours` tight round venues that stand close together, `city` at the real distances between venues that are kilometres apart. */
5
5
  export type DistrictMode = "neighbours" | "city";
6
6
  export declare const DISTRICT_MODES: readonly DistrictMode[];
7
- /** A venue of a district: its key, and for a stadium the configuration it is drawn in (`cfl` or `soccer`; the first it has where none is given). `"bc-place:soccer"` is the same as `{ id: "bc-place", config: "soccer" }`. */
7
+ /** A venue of a district: its key, and for a stadium the configuration it is drawn in (`cfl` or `soccer`; the first it has where none is given; a ballpark's is `mlb` and a hall's `boxing`). `"bc-place:soccer"` is the same as `{ id: "bc-place", config: "soccer" }`. */
8
8
  export type DistrictVenueInput = string | {
9
9
  id: string;
10
10
  config?: StadiumConfigId;
@@ -33,7 +33,7 @@ export interface DistrictMember {
33
33
  /** The key of the venue and the configuration, unique in a district: `rogers-arena`, `bc-place:soccer`. */
34
34
  key: string;
35
35
  id: string;
36
- kind: "arena" | "stadium" | "park";
36
+ kind: "arena" | "stadium" | "park" | "hall";
37
37
  config?: StadiumConfigId;
38
38
  /** The name in both languages. */
39
39
  name: {
package/dist/district.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // A district: several real venues of one city placed on one plan at their real relative positions and orientations, read from the same OpenStreetMap outlines each venue is drawn from (`venues.ts`, `stadiums.ts`).
2
- // It is generic: a district is a list of venue keys, whichever kinds they are (an NHL arena, a football or soccer stadium, a ballpark later), and the plan fits itself to them. Two modes say how far apart the venues are:
2
+ // It is generic: a district is a list of venue keys, whichever kinds they are (an NHL arena, a football or soccer stadium, a ballpark, a hall with a boxing ring), and the plan fits itself to them. Two modes say how far apart the venues are:
3
3
  // `neighbours` fits the plan tight round buildings that stand within a few hundred metres of each other, with no more than a margin between them; `city` keeps the real distances between venues that are kilometres
4
4
  // apart, with a grid, a scale and a name beside each. Nothing is drawn but what the venues are drawn from: no street, no park and no mark of a team, a league or a tournament; the credit
5
5
  // `VENUE_ATTRIBUTION` goes with it. Pure: options in, a plan, and markup, out; `district.turn.ts` raises it in 3D.
@@ -34,7 +34,7 @@ const stadiumMember = (stadium, config, language) => {
34
34
  return {
35
35
  key: `${stadium.id}:${config}`,
36
36
  id: stadium.id,
37
- kind: park ? "park" : "stadium",
37
+ kind: park ? "park" : stadiumKind(stadium) === "hall" ? "hall" : "stadium",
38
38
  config,
39
39
  name: stadiumNames(stadium),
40
40
  ring: stadium.osm.ring,
package/dist/draw.js CHANGED
@@ -324,7 +324,9 @@ function buildWhole(o, portrait, id, score, scored, extra) {
324
324
  const diamond = diamondOf(league, o.year);
325
325
  return baseball(fenceFor(parkById(o.park), feetFence(o.fence, unit), o.year, diamondFence(diamond)), { ...common, ballpark: ballparkFor(o) }, undefined, diamond);
326
326
  }
327
- return baseball(fenceFor(parkById(o.park), feetFence(o.fence, unit), o.year), { ...common, ballpark: ballparkFor(o) }, rulesFor("mlb", o.year).rules);
327
+ // A real ballpark whose infield is all dirt (Koshien Stadium's) has no grass inside the bases.
328
+ const dirt = realStadiumOf(o, "mlb", resolveCrowd(o.crowd)?.real === true)?.stadium.looks?.dirtInfield !== undefined;
329
+ return baseball(fenceFor(parkById(o.park), feetFence(o.fence, unit), o.year), { ...common, ballpark: ballparkFor(o), ...(dirt ? { dirtInfield: true } : {}) }, rulesFor("mlb", o.year).rules);
328
330
  }
329
331
  case "soccer":
330
332
  return buildSoccer(o, common, scored, unit);
@@ -749,8 +751,8 @@ export function describe(o) {
749
751
  const venue = sport === "nhl" && league === undefined && realCrowd?.real === true ? venueById(o.arena) : undefined;
750
752
  const realLine = venue === undefined || arenaName === undefined ? "" : `${gap}${fill(words.said.real, { arena: arenaName, seats: String(venue.seats.hockey), tiers: String(venue.tiers.count) })}${gap}${words.said[venue.osm.axis.basis === "mapped" ? "realMapped" : venue.osm.axis.basis === "building" ? "realBuilding" : "realNone"]}`;
751
753
  const real = realStadiumOf(o, sport, realCrowd?.real === true);
752
- const stadiumKey = (basis) => (basis === "opening" ? "stadiumOpening" : basis === "pitch" ? "stadiumPitch" : basis === "infield" ? "stadiumInfield" : basis === "building" ? "stadiumBuilding" : "stadiumNone");
753
- const stadiumLine = real === undefined ? "" : `${gap}${fill(real.config === "mlb" ? words.said.stadiumPark : words.said.stadium, { stadium: stadiumNames(real.stadium)[language], seats: String(stadiumSeats(real.stadium, real.config)), tiers: String(real.stadium.tiers.count) })}${gap}${words.said[stadiumKey(real.stadium.osm.axis.basis)]}`;
754
+ const stadiumKey = (basis, kind) => basis === "opening" ? "stadiumOpening" : basis === "pitch" ? (kind === "park" ? "stadiumPitchPark" : "stadiumPitch") : basis === "infield" ? "stadiumInfield" : basis === "building" ? (kind === "hall" ? "stadiumRingBuilding" : "stadiumBuilding") : kind === "park" ? "stadiumNonePark" : "stadiumNone";
755
+ const stadiumLine = real === undefined ? "" : `${gap}${fill(real.config === "mlb" ? words.said.stadiumPark : stadiumKind(real.stadium) === "hall" ? words.said.stadiumHall : words.said.stadium, { stadium: stadiumNames(real.stadium)[language], seats: String(stadiumSeats(real.stadium, real.config)), tiers: String(real.stadium.tiers.count) })}${gap}${words.said[stadiumKey(real.stadium.osm.axis.basis, stadiumKind(real.stadium))]}`;
754
756
  const parkLine = (parkName === undefined ? `${groundLine}${halfLine}${arenaLine}${realLine}${stadiumLine}` : `${gap}${fill(words.said.park, { park: parkName })}${officially(parkOfficial)}${ballpark === undefined ? "" : ballparkSentences(ballpark).map((line) => `${gap}${line}`).join("")}${stadiumLine}`) + (special === undefined ? "" : `${gap}${special.text}`);
755
757
  // A drawing of a past season says which: the markings are those of that season.
756
758
  const dated = typeof o.year === "number" && Number.isFinite(o.year);
@@ -5,15 +5,16 @@ import { VENUE_ATTRIBUTION } from "./venues.ts";
5
5
  export { VENUE_ATTRIBUTION };
6
6
  /** How a fact is known: `documented` is what a source cited with it says; `plausible` is ours, for a bowl no source describes. */
7
7
  export type StadiumBasis = "documented" | "plausible";
8
- /** The configurations of a stadium: the field the seats are counted for. `cfl` and `nfl` are the football fields of the two leagues, `soccer` a soccer pitch, `mlb` a baseball field. */
9
- export type StadiumConfigId = "cfl" | "nfl" | "soccer" | "mlb";
10
- /** What a stadium is: a `stadium` has a football field and a soccer pitch lying along its length, a `park` is a baseball park, whose frame is home plate's. */
11
- export type StadiumKind = "stadium" | "park";
8
+ /** The configurations of a stadium: the field the seats are counted for. `cfl` and `nfl` are the football fields of the two leagues, `soccer` a soccer pitch, `mlb` a baseball field, `boxing` a boxing ring in a hall. */
9
+ export type StadiumConfigId = "cfl" | "nfl" | "soccer" | "mlb" | "boxing";
10
+ /** What a stadium is: a `stadium` has a football field and a soccer pitch lying along its length, a `park` is a baseball park, whose frame is home plate's, a `hall` is a hall with a ring in the middle and the seats round it. */
11
+ export type StadiumKind = "stadium" | "park" | "hall";
12
12
  /**
13
13
  * The kinds of roof: `cable` is a cable-supported roof with an opening over the field that a retractable fabric closes (BC Place's); `fixed` a lid over the bowl; `canopy` roofs over some of the stands that leave the field
14
- * open (Lumen Field's); `panels` a retractable roof of sections high over a ballpark (T-Mobile Park's).
14
+ * open (Lumen Field's); `panels` a retractable roof of sections high over a ballpark (T-Mobile Park's); `dome` an air-supported roof, a membrane held up by the air inside (Tokyo Dome's); `open` no roof over the
15
+ * field (Koshien Stadium's).
15
16
  */
16
- export type StadiumRoof = "cable" | "fixed" | "canopy" | "panels";
17
+ export type StadiumRoof = "cable" | "fixed" | "canopy" | "panels" | "dome" | "open";
17
18
  /** What one configuration of a stadium is: its sport and its seats, and where the figure was read. */
18
19
  export interface StadiumConfigData {
19
20
  sport: StadiumConfigId;
@@ -41,6 +42,25 @@ export interface RealStadiumData {
41
42
  title: string;
42
43
  revision: number;
43
44
  };
45
+ /** The Japanese Wikipedia article some of the facts were read from, at a revision. */
46
+ ja?: {
47
+ title: string;
48
+ revision: number;
49
+ };
50
+ /** The names of a hall, in both languages (a stadium's and a park's are those of its ground and its park): Wikidata's labels. */
51
+ names?: {
52
+ en: string;
53
+ ja: string;
54
+ readingJa?: string;
55
+ };
56
+ /**
57
+ * Plain drawing choices where the sources say so, each with what was read: `ivyWalls` draws the building's walls in green (Koshien Stadium's ivy), `dirtInfield` draws the infield all dirt, with no grass inside the bases
58
+ * (the same stadium's). They are drawn as plain colours, not as a picture of the plants or the soil.
59
+ */
60
+ looks?: {
61
+ ivyWalls?: string;
62
+ dirtInfield?: string;
63
+ };
44
64
  configs: Partial<Record<StadiumConfigId, StadiumConfigData>>;
45
65
  /** The seats of the whole bowl where it holds more than a configuration's (Lumen Field's soccer seats are fewer: the upper sections are closed): the bowl is fitted to these and a configuration opens its seats from the lowest bowl up. */
46
66
  bowlSeats?: number;
@@ -72,7 +92,7 @@ export interface RealStadiumData {
72
92
  };
73
93
  /** A canopy's share of the seats it covers, as the article gives it. */
74
94
  cover?: number;
75
- /** A retractable roof's bottom and top above the field, in feet, as the article gives them. */
95
+ /** A retractable roof's bottom and top above the field, in feet, as the article gives them (an air-supported roof's height is the building's, from OpenStreetMap). */
76
96
  bottom?: number;
77
97
  top?: number;
78
98
  };
@@ -97,6 +117,7 @@ export interface StadiumOsm {
97
117
  source: string;
98
118
  ring: [number, number][];
99
119
  };
120
+ ring?: [number, number][];
100
121
  };
101
122
  /** The canopies OpenStreetMap maps over some of the stands: each one's outline, the height of its top and how far it rises (metres). */
102
123
  canopies?: {
@@ -109,9 +130,10 @@ export interface StadiumOsm {
109
130
  ring: [number, number][];
110
131
  /**
111
132
  * How the field lies, worked out when the data was made: the heading of its long side (degrees clockwise from north, 0 to under 180; for a ballpark, the heading from home plate out to centre field, 0 to under 360), how that
112
- * is known (`opening`: from the roof's opening, which the article says is the field's size; `pitch`: from the pitches OpenStreetMap maps; `infield`: from the mapped infield, with the outline choosing which way is out to
113
- * centre field; `building`: from the long axis of the building's main hall, an inference; `none`: no direction, 90 is stood in), how much of a direction the building has (`strength`) and how much longer than wide the
114
- * opening, the pitch or the hall is (`elongation`), and the middle of the field as `[longitude, latitude]` (home plate for a ballpark).
133
+ * is known (`opening`: from the roof's opening, which the article says is the field's size; `pitch`: from the pitches OpenStreetMap maps, and for a ballpark from the grass of the field it maps, fitted to the fence
134
+ * the park publishes (`rms`, in metres, is how far the two lie apart); `infield`: from the mapped infield, with the outline choosing which way is out to centre field; `building`: from the long axis of the
135
+ * building's main hall, an inference; `none`: no direction is known, and the heading is a stand-in (90 for a field with a long side, and for a ballpark the way that keeps its fence and its stands inside the building)),
136
+ * how much of a direction the building has (`strength`) and how much longer than wide the opening, the pitch or the hall is (`elongation`), and the middle of the field as `[longitude, latitude]` (home plate for a ballpark).
115
137
  */
116
138
  axis: {
117
139
  heading: number;
@@ -119,6 +141,7 @@ export interface StadiumOsm {
119
141
  strength: number;
120
142
  elongation: number;
121
143
  centre: [number, number];
144
+ rms?: number;
122
145
  };
123
146
  }
124
147
  /** A stadium: its facts and what OpenStreetMap gave. */
@@ -143,9 +166,9 @@ export declare const stadiumByWikidata: (wikidata: string | undefined) => RealSt
143
166
  export declare const stadiumKind: (stadium: RealStadium) => StadiumKind;
144
167
  /** The configurations a stadium has, in the order of its data. */
145
168
  export declare const stadiumConfigs: (stadium: RealStadium) => StadiumConfigId[];
146
- /** The ground a stadium is (its name, place and pitch). Throws for a ballpark, which has a park. */
169
+ /** The ground a stadium is (its name, place and pitch). Throws for a ballpark, which has a park, and for a hall, which has none. */
147
170
  export declare const groundOfStadium: (stadium: RealStadium) => Ground;
148
- /** The names a stadium goes by in both languages, of its ground or its park. */
171
+ /** The names a stadium goes by in both languages, of its ground or its park (a hall's own). */
149
172
  export declare function stadiumNames(stadium: RealStadium): {
150
173
  en: string;
151
174
  ja: string;
@@ -154,10 +177,12 @@ export declare function stadiumNames(stadium: RealStadium): {
154
177
  export declare const stadiumFrameHeading: (stadium: RealStadium) => number;
155
178
  /** How the field lies in a stadium's building (see `StadiumOsm.axis`). */
156
179
  export declare const stadiumOrientation: (stadium: RealStadium) => StadiumOrientation;
157
- /** The configuration a sport is: `cfl`, `nfl`, `soccer` or `mlb`, or `undefined` for a sport a stadium has no configuration for. */
180
+ /** The configuration a sport is: `cfl`, `nfl`, `soccer`, `mlb` or `boxing`, or `undefined` for a sport a stadium has no configuration for. */
158
181
  export declare const stadiumConfigOf: (sport: string | undefined) => StadiumConfigId | undefined;
159
182
  /** The seats of a stadium for a configuration (0 for one it has none of). */
160
183
  export declare const stadiumSeats: (stadium: RealStadium, config: StadiumConfigId) => number;
184
+ /** How far a hall's first row is from the box of the ring, on every side, in feet (ours: the seats at the ringside are a few feet from the ropes). */
185
+ export declare const HALL_FIRST_ROW = 8;
161
186
  /** The height of the first row above the field, in feet, the rise of a bowl's rows by the number of bowls (what the lowest, a middle and the upper rise, at most), and the rise of the walk between two bowls (a suite level): ours, no source gives them. */
162
187
  export declare const STADIUM_FIRST_HEIGHT = 5;
163
188
  export declare const STADIUM_RISES: Readonly<Record<1 | 2 | 3, readonly number[]>>;
@@ -229,6 +254,8 @@ export interface ParkPlan {
229
254
  seats: number;
230
255
  }[];
231
256
  total: number;
257
+ /** The floor a seat takes in the plan, in square feet: 4.6 as the usual stands have it, less where the building is too small for them and the bowl is steeper. */
258
+ seatArea: number;
232
259
  /** Whether the stands hold the configuration's seats to within two percent. */
233
260
  fit: "fits" | "tight";
234
261
  }
@@ -33,4 +33,29 @@ export const STADIUM_DATA = [
33
33
  "tiers": { "count": 4, "basis": "documented", "tierSeats": { "lower": 20521, "upper": 22075, "bleachers": 3666 }, "read": "the article's levels: the Main Level of 20,521 seats (most of the lower bowl), the Club Level of 4,123, the Suite Level of 2,050 and the View Level of 15,902, and two bleacher sections of 3,666" },
34
34
  "roof": { "kind": "panels", "basis": "documented", "bottom": 217, "top": 269, "read": "the article: a retractable roof in four sections that does not fully enclose the ballpark, its bottom 217 feet and its top 269 feet above the field, resting over the railway tracks to the east when open" },
35
35
  },
36
+ {
37
+ "id": "tokyo-dome",
38
+ "kind": "park",
39
+ "wikidata": "Q733748",
40
+ "park": "tokyo-dome",
41
+ "en": { "title": "Tokyo Dome", "revision": 1379232526 },
42
+ "ja": { "title": "東京ドーム", "revision": 111434287 },
43
+ "configs": { "mlb": { "sport": "mlb", "seats": 45600, "source": "wikipedia", "read": "the infobox's capacity for baseball, 45,600 (42,000 to 55,000 for events, 57,000 at the most)" } },
44
+ "wikidataSeats": [55000],
45
+ "tiers": { "count": 2, "basis": "documented", "read": "the Japanese article: the infield stands are in two levels with a balcony level between them, and the outfield stands are on one level" },
46
+ "roof": { "kind": "dome", "basis": "documented", "read": "the articles: an air-supported roof, a double membrane of coated glass cloth on a net of 28 wires 8.5 metres apart, held up by blowing the air inside 0.3 percent over the outside; 56 metres high inside" },
47
+ },
48
+ {
49
+ "id": "korakuen-hall",
50
+ "kind": "hall",
51
+ "wikidata": "Q4389857",
52
+ "names": { "en": "Korakuen Hall", "ja": "後楽園ホール", "readingJa": "こうらくえんホール" },
53
+ "en": { "title": "Korakuen Hall", "revision": 1372211318 },
54
+ "ja": { "title": "後楽園ホール", "revision": 111205284 },
55
+ "configs": { "boxing": { "sport": "boxing", "seats": 1403, "source": "wikipedia", "read": "the infobox's capacity, 1,403 seats (2,005 at the most, with the balconies used for standing)" } },
56
+ "bowlSeats": 2005,
57
+ "wikidataSeats": [2005],
58
+ "tiers": { "count": 2, "basis": "documented", "lowerSeats": 1403, "read": "the Japanese article: the 1,403 seats are on the floor (780 fixed seats on the south side, movable seats of 109 east, 109 west and 405 north), and the balconies on the east and west sides, above, take standing places up to 2,005" },
59
+ "roof": { "kind": "fixed", "basis": "plausible", "read": "the hall is on the fifth floor of a building (the Japanese article), under the building's own roof, drawn as a lid (ours)" },
60
+ },
36
61
  ];