@johnmorrisdotca/kyogijo-stadiums 0.28.0 → 0.31.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 +45 -0
- package/NOTICE.md +17 -5
- package/README.md +80 -107
- package/dist/crowd.d.ts +20 -2
- package/dist/crowd.park.d.ts +6 -0
- package/dist/crowd.park.js +3 -3
- package/dist/district.d.ts +3 -3
- package/dist/district.js +14 -13
- package/dist/draw.js +25 -10
- package/dist/flythrough-entry.d.ts +1 -0
- package/dist/flythrough-entry.js +1 -0
- package/dist/flythrough.dom.js +52 -6
- package/dist/flythrough.game.d.ts +36 -0
- package/dist/flythrough.game.js +145 -0
- package/dist/flythrough.markup.js +1 -0
- package/dist/flythrough.path.d.ts +6 -4
- package/dist/flythrough.path.js +26 -22
- package/dist/flythrough.style.d.ts +1 -1
- package/dist/flythrough.style.js +3 -0
- package/dist/flythrough.words.d.ts +2 -0
- package/dist/flythrough.words.js +6 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/stadiums-entry.d.ts +2 -2
- package/dist/stadiums-entry.js +2 -2
- package/dist/stadiums.d.ts +109 -28
- package/dist/stadiums.data.js +25 -0
- package/dist/stadiums.js +159 -30
- package/dist/stadiums.osm.data.js +114 -0
- package/dist/strings.d.ts +4 -0
- package/dist/strings.js +2 -2
- package/dist/turn.dom.d.ts +8 -2
- package/dist/turn.dom.js +10 -4
- package/dist/venue.d.ts +2 -0
- package/dist/venue.js +6 -5
- package/dist/venue.real.d.ts +7 -2
- package/dist/venue.real.js +124 -10
- package/dist/venues-entry.d.ts +2 -2
- package/dist/venues-entry.js +1 -1
- package/dist/venues.d.ts +14 -3
- package/dist/venues.data.js +72 -0
- package/dist/venues.geo.d.ts +22 -0
- package/dist/venues.geo.js +28 -0
- package/dist/venues.js +9 -1
- package/dist/venues.osm.data.js +366 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +4 -2
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,51 @@ All notable changes to this project are written here. The format follows
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.31.0] - 2026-10-20
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- **Seattle's stadiums** ([the real stadiums](./docs/stadiums.md), `stadium: "lumen-field"` and `park: "t-mobile-park"` with `crowd: { real: true }`): **Lumen Field** for football (`sport: "nfl"`, 68,740 seats) and soccer (37,722), and **T-Mobile Park** for baseball (`sport: "mlb"`, 47,368), each in the outline of its building as OpenStreetMap maps it, with the roof and a plausible bowl of the seats the sources give. A soccer drawing whose `ground` is `lumen-field` needs no `stadium`; any other sport, a `league` of your own and `crowd: { real: false }` are drawn as before.
|
|
15
|
+
- **Lumen Field.** OpenStreetMap maps both its pitches inside the building, lying north and south, so the field's orientation is mapped and not inferred. One bowl of three levels holds the 68,740 seats; a configuration opens its seats from the lowest bowl up (`bowlSeats`, `StadiumPlan.open`), so the soccer pitch closes the upper bowl and part of the middle one, drawn empty. Its roof is the article's canopy over 70 percent of the seats, drawn from the two roof parts OpenStreetMap maps (heights 36 metres, rise 10): strips of triangles from the low edge over the field's side to the high edge over the back of the stands, the bowl lowered to stand under it, the walls to just over the top row, the field and the ends open (`RealShell.roof: "canopy"`, `canopies`).
|
|
16
|
+
- **T-Mobile Park, a ballpark.** The usual ballpark stands (`parkLayout`) with each band as deep as its seats need (`planPark`): the Main Level's 20,521 seats the lower bowl, the Club, Suite and View levels' 22,075 the upper, the bleachers' 3,666, all from the article's layout, held to within two percent of 47,368. OpenStreetMap maps the infield but not home plate, so the way out to centre field is the one of the four the infield allows where the park's fence and the stands behind it lie inside the building's outline: 49.4 degrees, north-east (the build refuses to choose where the outline does not decide). The roof is the article's retractable one in four sections, 217 to 269 feet over the field, far over the 21-metre walls: closed, a band to a crown with the fabric across it; open (`roofOpen`), the sections rest over the east side, over the railway where the article says they rest (`RealShell.roof: "panels"`, `panels`, `wall`).
|
|
17
|
+
- **The district takes any of them** (`districtMember`, `planDistrict`): a ballpark's key is a venue (`t-mobile-park`, its one configuration `mlb`), its drawing turned about home plate by the heading of the way out to centre field (`stadiumFrameHeading`), and a stadium with several configurations takes the one named (`lumen-field:soccer`). Seattle is two presets of the demo's district page: `["t-mobile-park", "lumen-field"]` as neighbours (459 metres apart, Lumen Field to the north) and, with `mode: "city"`, the same two and `climate-pledge-arena` (3.4 to 3.8 kilometres off) at their real distances, with a grid of kilometres and a name beside each.
|
|
18
|
+
- **Data, kept apart as before.** `pnpm stadiums:fetch` now takes the building, the pitches, the infield and the roof parts a stadium names (`osm` in `scripts/stadiums.data.json`) where OpenStreetMap does not tag them with the Wikidata item, joins the outer ways of a relation into one ring, and puts a stadium added later beside the ones already archived; `pnpm stadiums` makes the data files and refuses a figure the sources do not give (a tier's seats not in the article, pitches that do not lie the same way, an outline that does not choose the way out to centre field). The raw answers are in `data-sources/stadiums/2026-10-20/`.
|
|
19
|
+
- **The demo's stadiums page** has the three stadiums as tabs and each one's configurations, with the facts of its roof; its district page has the Seattle presets. **The docs** have a section for each stadium, a Seattle section in [the district page](./docs/district.md) and items in [the gallery](https://johnmorrisdotca.github.io/kyogijo-stadiums/docs/gallery-stadiums.html).
|
|
20
|
+
|
|
21
|
+
### Fixed
|
|
22
|
+
|
|
23
|
+
- The 3D view gave two bands of a ballpark's bleachers (the left and the right) the same plane ids (`bleachers-front-0` for both); a second strip's planes now have an id of their own.
|
|
24
|
+
|
|
25
|
+
## [0.30.1] - 2026-10-20
|
|
26
|
+
|
|
27
|
+
### Added
|
|
28
|
+
|
|
29
|
+
- **A picture of the fly-through** in the README and in [its page](./docs/flythrough.md): the whole run to Climate Pledge Arena, sped up, as an animated WebP in a light and a dark variant (`turning-flythrough-desk-<light|dark>.webp`, 40 frames, about 300 KB each; `pnpm screenshots:flythrough` makes it from the demo's page by `seek`, without waiting on a clock).
|
|
30
|
+
|
|
31
|
+
## [0.30.0] - 2026-10-20
|
|
32
|
+
|
|
33
|
+
### Added
|
|
34
|
+
|
|
35
|
+
- **The fly-through ends on a game** (`game`, the sixth stage, after `rink`): a short play comes onto the ice while the rink goes on turning from the seat, with a label on the picture that says `Illustrative play`. It is a [replay](./docs/replay.md) timeline of the package's own (`ILLUSTRATIVE_PLAY`, entry `@johnmorrisdotca/kyogijo-stadiums/flythrough`): 101 frames a tenth of a second apart, five skaters and a goalie a side (shirt numbers only, no name, team or league), a puck, two passes, a shot and a goal, and the dots, numbers, trail and events are drawn by the replay's own layers (`replayLayers` through `renderLayers`). It is made up for the picture and says so on the screen, in the stage's words (English and Japanese) and in the docs; it is no real game's data.
|
|
36
|
+
- **The play lies on the floor of the 3D arena**: a plane that takes the floor's own transform after each paint and stands in the floor's layer of the stack, so the glass, the boards and the stands in front of the ice hide it as they hide the ice. It runs ten seconds, holds one and a half, fades out and starts again (the dots never jump back in view); its moment is worked out from the clock and not from the turn's folded time, so it does not jump when the turn comes round. A reader who prefers reduced motion gets the moment after the shot as a still.
|
|
37
|
+
- **The camera has one more channel** (`game`, how much of the play shows), still one path with no jumps; `playMarkup(moment, { id })`, `playAlpha`, `playMoment` and `PLAY_LOOK` are the rest of the play's API, pure and the same every time. `cameraAt` is a good deal faster (the path's tables are made once).
|
|
38
|
+
- Tests for the play (thirteen objects a frame, all on the ice, no skater faster than 40 feet a second and none that jumps, the puck on the stick of whoever has it, the events in order, the same markup for the same moment, no label of a team or a league, said to be made up in both languages) and, in a real browser, that the play is on the ice from the game stage on only, lies where the floor lies at every frame, and its dots move.
|
|
39
|
+
|
|
40
|
+
## [0.29.0] - 2026-10-20
|
|
41
|
+
|
|
42
|
+
### Added
|
|
43
|
+
|
|
44
|
+
- **The real venues of the Central Division**: the United Center, the Ball Arena, the American Airlines Center, the Grand Casino Arena, the Bridgestone Arena, the Enterprise Center, the Delta Center and the Canada Life Centre, drawn the way the Pacific Division's 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`. With the Pacific Division that is sixteen arenas, the Western Conference's. The Grand Casino Arena is the first of three seating tiers (its article counts four levels, one of them suites) and its building is a relation of two ways in OpenStreetMap; the Canada Life Centre's lower bowl has the 8,812 of its 15,225 seats its article gives. The rink's orientation is inferred from the main hall for twelve of the sixteen and not known for four (the Ball Arena is the new one); none is mapped. A Wikidata capacity for ice hockey that changed over the years (the Grand Casino Arena's 18,064 from 2000 and 17,954 from 2012) is read as the latest. The Eastern Conference follows.
|
|
45
|
+
- **Divisions and conferences in the data and the API**: every venue has a `division`, `VENUE_DIVISIONS` and `VENUE_CONFERENCES` give the league's order, and `venuesIn`, `venuesInConference` and `conferenceOf` list and place them. The raw reads are kept per division (`data-sources/venues/<date>/wikidata-<division>.json`, `wikipedia-<division>.json`, which now also keeps the infobox's capacity line, and `osm-<arena>.json`; `pnpm venues:fetch <date> <division>`), and `pnpm venues` also writes the table of `NOTICE.md`.
|
|
46
|
+
- **The 3D view's walls and roof apart**: `venue: { walls, roof }` (`walls` follows `roof` when it is left out, so the old `roof: true` is unchanged), and `turn.update(options, { venue })` changes them on a view that is mounted, which goes on turning from where it is.
|
|
47
|
+
- **The demo's venues page by division**, with a conference and division chooser, and **the controls on the view**: the stands, walls, roof, building, markings and labels are buttons beside the view (they never stop or restart the turn: the first three draw the scene again through `update`, the others are a style), flat or 3D, the view's own viewpoints, turn, tilt, zoom and Play under it (the 3D view turns by itself when it opens), a compact scrolling bar on a phone, and the choice in the address (`?stands=0&walls=1&roof=1&building=0&markings=0&labels=0&viewpoint=end&spin=off`; an old `roof=1` still means walls and roof).
|
|
48
|
+
- **The demo's home page leads with a real arena that turns by itself** (Climate Pledge Arena, any of the sixteen from a list), with the same buttons on it, in the address under `f` (`fv`, `fstands`, `froof`...), and links to the venues page, the tournament layouts in 3D and the judging page's broadcast view.
|
|
49
|
+
- **Two moving pictures at the head of the README** (a real arena and a tournament layout turning once round, animated WebP in a light and a dark file, 0.5 to 0.8 MB each) and a "Look at these first" table with one picture of the real venues, the tournament layouts, the judging broadcast view and the combat sports; the other pictures of those sections are on their docs pages. `pnpm screenshots:animation` makes the moving pictures from the demo (`scripts/readme-animation.mjs`, frames from Playwright and the few lines of RIFF in `scripts/webp-animated.mjs`, no other tool). The README lint (`scripts/readme-lint.mjs`) gives a `turning-*` picture a budget of its own and counts a picture a docs page shows as used.
|
|
50
|
+
|
|
51
|
+
### Changed
|
|
52
|
+
|
|
53
|
+
- The fly-through demo page's arena tabs (now the sixteen venues) are one row that scrolls on a phone, so that the view stays in sight.
|
|
54
|
+
|
|
10
55
|
## [0.28.0] - 2026-10-20
|
|
11
56
|
|
|
12
57
|
### Added
|
package/NOTICE.md
CHANGED
|
@@ -43,9 +43,9 @@ picture or code of the sources is copied; each source is named here so that the
|
|
|
43
43
|
| `grounds`: the World Cups each ground staged matches of, and where each final was played | The venue section of the English Wikipedia article of each men's and Women's World Cup, at the revision cited below; FIFA's own pages are not used | Facts, CC BY-SA 4.0 articles as above |
|
|
44
44
|
| `grounds`: the Wikidata item and the coordinates of each ground (`wikidata`, `lat`, `lon`) | The item that each cited article is linked to, its coordinates (P625) and its country (P17), read with the Wikidata API and checked against the item's labels by `scripts/check-grounds.mjs` | Wikidata's data is CC0 (https://creativecommons.org/publicdomain/zero/1.0/) |
|
|
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
|
-
| `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 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`) |
|
|
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
|
|
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
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) |
|
|
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 |
|
|
@@ -411,9 +411,10 @@ The Japanese Wikipedia articles read for the names, with their revisions, are li
|
|
|
411
411
|
|
|
412
412
|
## The venues' sources
|
|
413
413
|
|
|
414
|
-
The
|
|
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.
|
|
415
415
|
|
|
416
|
-
|
|
416
|
+
<!-- venues-notice -->
|
|
417
|
+
| Arena | Wikidata item | OpenStreetMap element | English article and revision |
|
|
417
418
|
| --- | --- | --- | --- |
|
|
418
419
|
| Honda Center | Q774138 | way/120623151 | Honda Center, 1380000927 |
|
|
419
420
|
| Scotiabank Saddledome | Q1140083 | way/4397328 | Scotiabank Saddledome, 1377341466 |
|
|
@@ -423,14 +424,25 @@ The eight arenas of the NHL's Pacific Division, read on 2026-10-20 (`pnpm venues
|
|
|
423
424
|
| Climate Pledge Arena | Q977529 | way/25123756 | Climate Pledge Arena, 1380851727 |
|
|
424
425
|
| Rogers Arena | Q517318 | way/24705911 | Rogers Arena, 1379918849 |
|
|
425
426
|
| T-Mobile Arena | Q3338973 | way/364489406 | T-Mobile Arena, 1379155307 |
|
|
427
|
+
| United Center | Q639975 | way/205221993 | United Center, 1380672233 |
|
|
428
|
+
| Ball Arena | Q795470 | way/25312645 | Ball Arena, 1379560431 |
|
|
429
|
+
| American Airlines Center | Q463345 | way/25312698 | American Airlines Center, 1379833787 |
|
|
430
|
+
| Grand Casino Arena | Q1421388 | relation/20658401 | Grand Casino Arena, 1379407082 |
|
|
431
|
+
| Bridgestone Arena | Q302869 | way/130905914 | Bridgestone Arena, 1380457078 |
|
|
432
|
+
| Enterprise Center | Q1067700 | way/42369176 | Enterprise Center, 1372086380 |
|
|
433
|
+
| Delta Center | Q82294 | way/23335190 | Delta Center, 1379043310 |
|
|
434
|
+
| Canada Life Centre | Q656928 | way/14869890 | Canada Life Centre, 1379717047 |
|
|
435
|
+
<!-- /venues-notice -->
|
|
426
436
|
|
|
427
437
|
## The stadiums' sources
|
|
428
438
|
|
|
429
|
-
BC Place, 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.
|
|
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.
|
|
430
440
|
|
|
431
441
|
| Stadium | Wikidata item | OpenStreetMap way | English article and revision |
|
|
432
442
|
| --- | --- | --- | --- |
|
|
433
443
|
| BC Place | Q612227 | way/24705904 | BC Place, 1372065649 |
|
|
444
|
+
| Lumen Field | Q612736 | relation/2305831 | Lumen Field, 1373998493 |
|
|
445
|
+
| T-Mobile Park | Q1193117 | relation/3008332 | T-Mobile Park, 1379419810 |
|
|
434
446
|
|
|
435
447
|
## The World Cups' articles
|
|
436
448
|
|
package/README.md
CHANGED
|
@@ -13,6 +13,25 @@ The surfaces of forty-three sports, from football and curling to the budō and t
|
|
|
13
13
|
|
|
14
14
|
<p align="center"><a href="https://johnmorrisdotca.github.io/kyogijo-stadiums/"><strong>Open the demo →</strong></a> · <a href="https://johnmorrisdotca.github.io/kyogijo-stadiums/docs/">Documentation</a> · <a href="https://johnmorrisdotca.github.io/kyogijo-stadiums/docs/gallery.html">Gallery</a> · <a href="./docs/compare.md">How it compares</a> · <a href="https://johnmorrisdotca.github.io/kyogijo-stadiums/api.html">API reference</a></p>
|
|
15
15
|
|
|
16
|
+
<table align="center">
|
|
17
|
+
<tr>
|
|
18
|
+
<td align="center" valign="top">
|
|
19
|
+
<picture>
|
|
20
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/johnmorrisdotca/kyogijo-stadiums/main/docs/images/turning-venue-desk-dark.webp">
|
|
21
|
+
<img src="https://raw.githubusercontent.com/johnmorrisdotca/kyogijo-stadiums/main/docs/images/turning-venue-desk-light.webp" alt="A real arena turning once round in 3D: Climate Pledge Arena in the outline of its building, two tiers of seats round the rink." width="410">
|
|
22
|
+
</picture>
|
|
23
|
+
<br><em>A real arena, turning: Climate Pledge Arena in the outline of its building (OpenStreetMap).</em>
|
|
24
|
+
</td>
|
|
25
|
+
<td align="center" valign="top">
|
|
26
|
+
<picture>
|
|
27
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/johnmorrisdotca/kyogijo-stadiums/main/docs/images/turning-hall-desk-dark.webp">
|
|
28
|
+
<img src="https://raw.githubusercontent.com/johnmorrisdotca/kyogijo-stadiums/main/docs/images/turning-hall-desk-light.webp" alt="A tournament layout turning once round in 3D: four table tennis areas on one floor, a surround round each and a scoreboard hung over them." width="410">
|
|
29
|
+
</picture>
|
|
30
|
+
<br><em>A tournament layout, turning: four table tennis areas under one scoreboard.</em>
|
|
31
|
+
</td>
|
|
32
|
+
</tr>
|
|
33
|
+
</table>
|
|
34
|
+
|
|
16
35
|
> **Renamed.** Previously `@johnmorrisdotca/kyogijo`; renamed in 0.4.0 to `@johnmorrisdotca/kyogijo-stadiums`. The product is still Kyogijo Stadiums (競技場); only the package and the repository names changed. See the [changelog](./CHANGELOG.md).
|
|
17
36
|
|
|
18
37
|
<table align="center">
|
|
@@ -36,6 +55,43 @@ The surfaces of forty-three sports, from football and curling to the budō and t
|
|
|
36
55
|
|
|
37
56
|
Kyogijo Stadiums draws the places a game is played on, with the score of the game on them: the teams at their ends, the score in the middle, a label for what it was. The surfaces are drawn to scale from the rulebooks: a football field has its hash marks where the rules put them, a ballpark its fence where its published distances put it.
|
|
38
57
|
|
|
58
|
+
## Look at these first
|
|
59
|
+
|
|
60
|
+
<table align="center">
|
|
61
|
+
<tr>
|
|
62
|
+
<td align="center" valign="top">
|
|
63
|
+
<picture>
|
|
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
|
+
<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
|
+
</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.
|
|
68
|
+
</td>
|
|
69
|
+
<td align="center" valign="top">
|
|
70
|
+
<picture>
|
|
71
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/johnmorrisdotca/kyogijo-stadiums/main/docs/images/multi-tabletennis-3d-desk-dark.webp">
|
|
72
|
+
<img src="https://raw.githubusercontent.com/johnmorrisdotca/kyogijo-stadiums/main/docs/images/multi-tabletennis-3d-desk-light.webp" alt="Four table tennis areas on one floor in 3D, with a hung scoreboard." width="400">
|
|
73
|
+
</picture>
|
|
74
|
+
<br><strong><a href="./docs/multi.md">Tournament layouts</a></strong>: judo, table tennis and other areas on one floor, to scale, in a hall or a stadium, flat or in 3D.
|
|
75
|
+
</td>
|
|
76
|
+
</tr>
|
|
77
|
+
<tr>
|
|
78
|
+
<td align="center" valign="top">
|
|
79
|
+
<picture>
|
|
80
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/johnmorrisdotca/kyogijo-stadiums/main/docs/images/judging-broadcast-3d-desk-dark.webp">
|
|
81
|
+
<img src="https://raw.githubusercontent.com/johnmorrisdotca/kyogijo-stadiums/main/docs/images/judging-broadcast-3d-desk-light.webp" alt="A kata mat in 3D from the broadcast camera, with a board at its side listing each judge." width="400">
|
|
82
|
+
</picture>
|
|
83
|
+
<br><strong><a href="./docs/judging.md">Who judges where</a></strong>: each judo mat's officials by seat, a broadcast view with the officials on a board, and a page to print.
|
|
84
|
+
</td>
|
|
85
|
+
<td align="center" valign="top">
|
|
86
|
+
<picture>
|
|
87
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/johnmorrisdotca/kyogijo-stadiums/main/docs/images/mma-cage-3d-desk-dark.webp">
|
|
88
|
+
<img src="https://raw.githubusercontent.com/johnmorrisdotca/kyogijo-stadiums/main/docs/images/mma-cage-3d-desk-light.webp" alt="An MMA cage in 3D: a mesh fence on a solid platform." width="400">
|
|
89
|
+
</picture>
|
|
90
|
+
<br><strong><a href="./docs/combat.md">The combat sports</a></strong>: an MMA cage, boxing and wrestling rings and mats, flat and in 3D.
|
|
91
|
+
</td>
|
|
92
|
+
</tr>
|
|
93
|
+
</table>
|
|
94
|
+
|
|
39
95
|
## In 30 seconds
|
|
40
96
|
|
|
41
97
|
```sh
|
|
@@ -505,38 +561,6 @@ console.log(layout.needs.length, layout.needs.width);
|
|
|
505
561
|
// 47 19
|
|
506
562
|
```
|
|
507
563
|
|
|
508
|
-
<p align="center">
|
|
509
|
-
<picture>
|
|
510
|
-
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/johnmorrisdotca/kyogijo-stadiums/main/docs/images/multi-judo-desk-dark.webp">
|
|
511
|
-
<img src="https://raw.githubusercontent.com/johnmorrisdotca/kyogijo-stadiums/main/docs/images/multi-judo-desk-light.webp" alt="Three judo contest areas in a row on one red floor of mats, dressed with a sample event's name, simple emblems and boards." width="640">
|
|
512
|
-
</picture>
|
|
513
|
-
<br><em>Three judo contest areas on one floor of mats: 47 by 19 metres, with sample content.</em>
|
|
514
|
-
</p>
|
|
515
|
-
|
|
516
|
-
<p align="center">
|
|
517
|
-
<picture>
|
|
518
|
-
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/johnmorrisdotca/kyogijo-stadiums/main/docs/images/multi-tabletennis-desk-dark.webp">
|
|
519
|
-
<img src="https://raw.githubusercontent.com/johnmorrisdotca/kyogijo-stadiums/main/docs/images/multi-tabletennis-desk-light.webp" alt="Four table tennis areas in two rows of two on one blue floor, with sample words and emblems, a hung scoreboard and boards." width="640">
|
|
520
|
-
</picture>
|
|
521
|
-
<br><em>Four table tennis areas under one scoreboard.</em>
|
|
522
|
-
</p>
|
|
523
|
-
|
|
524
|
-
<p align="center">
|
|
525
|
-
<picture>
|
|
526
|
-
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/johnmorrisdotca/kyogijo-stadiums/main/docs/images/multi-tabletennis-3d-desk-dark.webp">
|
|
527
|
-
<img src="https://raw.githubusercontent.com/johnmorrisdotca/kyogijo-stadiums/main/docs/images/multi-tabletennis-3d-desk-light.webp" alt="Four table tennis areas in 3D: tables on legs, a surround round each, a hung scoreboard." width="640">
|
|
528
|
-
</picture>
|
|
529
|
-
<br><em>The same four in 3D.</em>
|
|
530
|
-
</p>
|
|
531
|
-
|
|
532
|
-
<p align="center">
|
|
533
|
-
<picture>
|
|
534
|
-
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/johnmorrisdotca/kyogijo-stadiums/main/docs/images/multi-judo-empty-desk-dark.webp">
|
|
535
|
-
<img src="https://raw.githubusercontent.com/johnmorrisdotca/kyogijo-stadiums/main/docs/images/multi-judo-empty-desk-light.webp" alt="The three judo areas with the places for the event's words and marks left empty and dashed." width="640">
|
|
536
|
-
</picture>
|
|
537
|
-
<br><em>Without `sample`: the empty places an organiser fills.</em>
|
|
538
|
-
</p>
|
|
539
|
-
|
|
540
564
|
### Boards over a surface
|
|
541
565
|
|
|
542
566
|
`board` lays a results board, a bout presentation or a medal table, any SVG, over a surface in 2D and 3D, off its middle and never stretched ([boards](./docs/boards.md)).
|
|
@@ -567,27 +591,20 @@ console.log(layout.needs.length, layout.needs.width);
|
|
|
567
591
|
|
|
568
592
|
### The real venues
|
|
569
593
|
|
|
570
|
-
`crowd: { real: true }` draws an NHL arena in its building ([the real venues](./docs/venues.md)).
|
|
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.
|
|
571
595
|
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
<img src="https://raw.githubusercontent.com/johnmorrisdotca/kyogijo-stadiums/main/docs/images/venues-honda-desk-light.webp" alt="The Honda Center's rink in its building's outline: two tiers of seats and a north arrow." width="640">
|
|
576
|
-
</picture>
|
|
577
|
-
<br><em>The Honda Center.</em>
|
|
578
|
-
</p>
|
|
596
|
+
```ts
|
|
597
|
+
import { drawKyogijo } from "@johnmorrisdotca/kyogijo-stadiums";
|
|
598
|
+
import { planVenue, venueById } from "@johnmorrisdotca/kyogijo-stadiums/venues";
|
|
579
599
|
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
</picture>
|
|
585
|
-
<br><em>The Saddledome, in 3D.</em>
|
|
586
|
-
</p>
|
|
600
|
+
const svg = drawKyogijo({ sport: "nhl", arena: "climate-pledge-arena", crowd: { real: true } });
|
|
601
|
+
console.log(svg.includes("ky-cr-shell"), planVenue(venueById("climate-pledge-arena")!).total);
|
|
602
|
+
// true 17151
|
|
603
|
+
```
|
|
587
604
|
|
|
588
605
|
### A real stadium, and a district
|
|
589
606
|
|
|
590
|
-
`stadium: "bc-place"` draws BC Place for football or soccer under its cable roof; `drawDistrict({ venues: ["bc-place", "rogers-arena"] })` puts venues at their real positions, 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 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)).
|
|
591
608
|
|
|
592
609
|
<p align="center">
|
|
593
610
|
<picture>
|
|
@@ -605,36 +622,32 @@ console.log(layout.needs.length, layout.needs.width);
|
|
|
605
622
|
<br><em>BC Place and Rogers Arena.</em>
|
|
606
623
|
</p>
|
|
607
624
|
|
|
608
|
-
### Who judges where
|
|
609
|
-
|
|
610
|
-
`drawJudging` puts each judo mat's officials by seat in the picture and in a chart ([judging](./docs/judging.md)).
|
|
611
|
-
|
|
612
625
|
<p align="center">
|
|
613
626
|
<picture>
|
|
614
|
-
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/johnmorrisdotca/kyogijo-stadiums/main/docs/images/
|
|
615
|
-
<img src="https://raw.githubusercontent.com/johnmorrisdotca/kyogijo-stadiums/main/docs/images/
|
|
627
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/johnmorrisdotca/kyogijo-stadiums/main/docs/images/district-seattle-3d-desk-dark.webp">
|
|
628
|
+
<img src="https://raw.githubusercontent.com/johnmorrisdotca/kyogijo-stadiums/main/docs/images/district-seattle-3d-desk-light.webp" alt="Lumen Field and T-Mobile Park in 3D on one ground: a football stadium under canopies and a ballpark under its roof." width="640">
|
|
616
629
|
</picture>
|
|
617
|
-
<br><em>
|
|
630
|
+
<br><em>Seattle's SoDo.</em>
|
|
618
631
|
</p>
|
|
619
632
|
|
|
620
|
-
|
|
633
|
+
### A fly-through
|
|
621
634
|
|
|
622
|
-
|
|
623
|
-
<picture>
|
|
624
|
-
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/johnmorrisdotca/kyogijo-stadiums/main/docs/images/judging-broadcast-3d-desk-dark.webp">
|
|
625
|
-
<img src="https://raw.githubusercontent.com/johnmorrisdotca/kyogijo-stadiums/main/docs/images/judging-broadcast-3d-desk-light.webp" alt="A kata mat in 3D from the Broadcast camera, with a dark board at its side listing each judge's number, name and ID." width="640">
|
|
626
|
-
</picture>
|
|
627
|
-
<br><em>The broadcast view.</em>
|
|
628
|
-
</p>
|
|
635
|
+
`mountFlythrough` flies one camera from a map to a real arena: the map falls to the city and the building, which rises into 3D, the roof lifts away, and the camera comes in to a seat, where a made-up play runs on the ice ([the fly-through](./docs/flythrough.md)).
|
|
629
636
|
|
|
630
637
|
<p align="center">
|
|
631
638
|
<picture>
|
|
632
|
-
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/johnmorrisdotca/kyogijo-stadiums/main/docs/images/
|
|
633
|
-
<img src="https://raw.githubusercontent.com/johnmorrisdotca/kyogijo-stadiums/main/docs/images/
|
|
639
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/johnmorrisdotca/kyogijo-stadiums/main/docs/images/turning-flythrough-desk-dark.webp">
|
|
640
|
+
<img src="https://raw.githubusercontent.com/johnmorrisdotca/kyogijo-stadiums/main/docs/images/turning-flythrough-desk-light.webp" alt="The fly-through, sped up: a map of North America with a pin on Seattle, the building's outline in the city, Climate Pledge Arena rising into 3D and turning, the roof lifting away, a seat's view across the rink and a play on the ice." width="640">
|
|
634
641
|
</picture>
|
|
635
|
-
<br><em>
|
|
642
|
+
<br><em>The fly-through to Climate Pledge Arena, sped up.</em>
|
|
636
643
|
</p>
|
|
637
644
|
|
|
645
|
+
### Who judges where
|
|
646
|
+
|
|
647
|
+
`drawJudging` puts each judo mat's officials by seat in the picture and in a chart ([judging](./docs/judging.md)).
|
|
648
|
+
|
|
649
|
+
The broadcast view puts the mat large, with the officials on a board at its side; `judgingPrint` prints one mat to an A4 or US letter page.
|
|
650
|
+
|
|
638
651
|
### A table tennis area
|
|
639
652
|
|
|
640
653
|
A table in the ITTF's playing area, 14 m by 7 m, with surrounds and chairs ([courts](./docs/courts.md#the-table-tennis-playing-area)).
|
|
@@ -679,46 +692,6 @@ A table in the ITTF's playing area, 14 m by 7 m, with surrounds and chairs ([cou
|
|
|
679
692
|
|
|
680
693
|
An MMA cage, rings and wrestling mats ([the combat sports page](./docs/combat.md)).
|
|
681
694
|
|
|
682
|
-
<p align="center">
|
|
683
|
-
<picture>
|
|
684
|
-
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/johnmorrisdotca/kyogijo-stadiums/main/docs/images/mma-cage-desk-dark.webp">
|
|
685
|
-
<img src="https://raw.githubusercontent.com/johnmorrisdotca/kyogijo-stadiums/main/docs/images/mma-cage-desk-light.webp" alt="An MMA cage from above with a score" width="660">
|
|
686
|
-
</picture>
|
|
687
|
-
<br><em>With a score.</em>
|
|
688
|
-
</p>
|
|
689
|
-
|
|
690
|
-
<p align="center">
|
|
691
|
-
<picture>
|
|
692
|
-
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/johnmorrisdotca/kyogijo-stadiums/main/docs/images/mma-cage-3d-desk-dark.webp">
|
|
693
|
-
<img src="https://raw.githubusercontent.com/johnmorrisdotca/kyogijo-stadiums/main/docs/images/mma-cage-3d-desk-light.webp" alt="The cage in 3D: a mesh fence on a solid platform" width="660">
|
|
694
|
-
</picture>
|
|
695
|
-
<br><em>The cage in 3D.</em>
|
|
696
|
-
</p>
|
|
697
|
-
|
|
698
|
-
<p align="center">
|
|
699
|
-
<picture>
|
|
700
|
-
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/johnmorrisdotca/kyogijo-stadiums/main/docs/images/boxing-ring-3d-desk-dark.webp">
|
|
701
|
-
<img src="https://raw.githubusercontent.com/johnmorrisdotca/kyogijo-stadiums/main/docs/images/boxing-ring-3d-desk-light.webp" alt="The boxing ring in 3D: coloured corner posts, ropes and steps" width="660">
|
|
702
|
-
</picture>
|
|
703
|
-
<br><em>The ring in 3D.</em>
|
|
704
|
-
</p>
|
|
705
|
-
|
|
706
|
-
<p align="center">
|
|
707
|
-
<picture>
|
|
708
|
-
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/johnmorrisdotca/kyogijo-stadiums/main/docs/images/wrestling-mat-3d-desk-dark.webp">
|
|
709
|
-
<img src="https://raw.githubusercontent.com/johnmorrisdotca/kyogijo-stadiums/main/docs/images/wrestling-mat-3d-desk-light.webp" alt="The UWW's wrestling mat in 3D on its platform" width="660">
|
|
710
|
-
</picture>
|
|
711
|
-
<br><em>The UWW's mat in 3D.</em>
|
|
712
|
-
</p>
|
|
713
|
-
|
|
714
|
-
<p align="center">
|
|
715
|
-
<picture>
|
|
716
|
-
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/johnmorrisdotca/kyogijo-stadiums/main/docs/images/prowrestling-ring-3d-desk-dark.webp">
|
|
717
|
-
<img src="https://raw.githubusercontent.com/johnmorrisdotca/kyogijo-stadiums/main/docs/images/prowrestling-ring-3d-desk-light.webp" alt="A professional wrestling ring in 3D with three ropes" width="660">
|
|
718
|
-
</picture>
|
|
719
|
-
<br><em>A wrestling ring in 3D.</em>
|
|
720
|
-
</p>
|
|
721
|
-
|
|
722
695
|
### The element in a page
|
|
723
696
|
|
|
724
697
|
```html
|
|
@@ -815,7 +788,7 @@ English and Japanese: the title, the description and the statuses of a drawing,
|
|
|
815
788
|
Not here yet, each welcome as an [issue](https://github.com/johnmorrisdotca/kyogijo-stadiums/issues):
|
|
816
789
|
|
|
817
790
|
- **More surfaces**: the FIBA and college courts, the international rink, rugby pitches, soccer's beach and street formats.
|
|
818
|
-
- **More real venues**: the
|
|
791
|
+
- **More real venues**: the Eastern Conference's arenas, then the NBA's, NFL's and MLB's, and more districts.
|
|
819
792
|
- **More parks of the past**: the 19th-century grounds, and the parks whose articles give no distances yet.
|
|
820
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)).
|
|
821
794
|
- **Football in a different standard**: the college and high-school hash marks.
|
package/dist/crowd.d.ts
CHANGED
|
@@ -110,8 +110,26 @@ export interface RealShell {
|
|
|
110
110
|
}>;
|
|
111
111
|
/** The way north points on the page, in degrees clockwise from the top; absent where the rink's real orientation is not known. */
|
|
112
112
|
north?: number;
|
|
113
|
-
/**
|
|
114
|
-
|
|
113
|
+
/**
|
|
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`).
|
|
116
|
+
*/
|
|
117
|
+
roof: "fixed" | "saddle" | "cable" | "canopy" | "panels";
|
|
118
|
+
/** 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
|
+
wall?: number;
|
|
120
|
+
/** 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. */
|
|
121
|
+
canopies?: {
|
|
122
|
+
ring: Pt[];
|
|
123
|
+
low: number;
|
|
124
|
+
rise: number;
|
|
125
|
+
}[];
|
|
126
|
+
/** A `panels` roof: the outline it covers when closed, its bottom and its top above the field in feet (rim and crown), and where its sections rest when it is open. */
|
|
127
|
+
panels?: {
|
|
128
|
+
cover: Pt[];
|
|
129
|
+
bottom: number;
|
|
130
|
+
top: number;
|
|
131
|
+
parked: Pt[];
|
|
132
|
+
};
|
|
115
133
|
/** 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. */
|
|
116
134
|
crown?: {
|
|
117
135
|
rise: number;
|
package/dist/crowd.park.d.ts
CHANGED
|
@@ -14,6 +14,12 @@ export interface ParkInput {
|
|
|
14
14
|
crowd: Crowd;
|
|
15
15
|
/** The walls that have seats on top of them. */
|
|
16
16
|
seatsOnWalls?: readonly WallSeats[];
|
|
17
|
+
/** How deep each band of stands is, in feet: the conventions of a drawing (60, 56 and 54) unless a real ballpark's seats set them (`planPark`). */
|
|
18
|
+
depths?: {
|
|
19
|
+
lower: number;
|
|
20
|
+
upper: number;
|
|
21
|
+
bleachers: number;
|
|
22
|
+
};
|
|
17
23
|
}
|
|
18
24
|
/** The stands of a ballpark, as data. */
|
|
19
25
|
export declare function parkLayout(input: ParkInput): CrowdStands;
|
package/dist/crowd.park.js
CHANGED
|
@@ -91,16 +91,16 @@ export function parkLayout(input) {
|
|
|
91
91
|
aisles: pieces.flatMap((points) => aislesOf(points)),
|
|
92
92
|
});
|
|
93
93
|
};
|
|
94
|
-
const lowerDepth = 60;
|
|
94
|
+
const lowerDepth = input.depths?.lower ?? 60;
|
|
95
95
|
const walk = 7;
|
|
96
|
-
const upperDepth = 56;
|
|
96
|
+
const upperDepth = input.depths?.upper ?? 56;
|
|
97
97
|
add("lower", "lower", [band(inner, nI, 0, lowerDepth)], 0, lowerDepth, [4, 40], 1);
|
|
98
98
|
add("upper", "upper", [band(inner, nI, lowerDepth + walk, lowerDepth + walk + upperDepth)], lowerDepth + walk, lowerDepth + walk + upperDepth, [52, 104], 0.88);
|
|
99
99
|
const concourses = [{ region: { kind: "poly", points: band(inner, nI, lowerDepth - 0.5, lowerDepth + walk + 0.5) }, hole: null }];
|
|
100
100
|
// The outfield: bleachers right behind the fence, radially from home plate, but for a gap at the batter's eye in the horseshoe; and, where the park has seats on top of a wall,
|
|
101
101
|
// a band of them along the wall at its height.
|
|
102
102
|
const wall = 12;
|
|
103
|
-
const depth = 54;
|
|
103
|
+
const depth = input.depths?.bleachers ?? 54;
|
|
104
104
|
if (shape !== "grandstand") {
|
|
105
105
|
const nF = fence.map((p) => ({ n: [p[0] / (dist(p) || 1), p[1] / (dist(p) || 1)], k: 1 }));
|
|
106
106
|
const eye = (i) => Math.abs(fence[i][0]) < pole * 0.07 && shape === "horseshoe";
|
package/dist/district.d.ts
CHANGED
|
@@ -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";
|
|
36
|
+
kind: "arena" | "stadium" | "park";
|
|
37
37
|
config?: StadiumConfigId;
|
|
38
38
|
/** The name in both languages. */
|
|
39
39
|
name: {
|
|
@@ -112,7 +112,7 @@ export declare const DISTRICT_MARGIN: Readonly<Record<DistrictMode, number>>;
|
|
|
112
112
|
* import { planDistrict } from "@johnmorrisdotca/kyogijo-stadiums/district";
|
|
113
113
|
* const plan = planDistrict({ venues: ["bc-place", "rogers-arena"] });
|
|
114
114
|
* console.log(plan.mode, plan.members.length, Math.round(plan.between[0].metres));
|
|
115
|
-
* // neighbours 2
|
|
115
|
+
* // neighbours 2 264
|
|
116
116
|
* ```
|
|
117
117
|
*/
|
|
118
118
|
export declare function planDistrict(options: DistrictOptions): DistrictPlan;
|
|
@@ -132,7 +132,7 @@ export declare function nestedDrawing(svg: string): {
|
|
|
132
132
|
};
|
|
133
133
|
styles: string[];
|
|
134
134
|
};
|
|
135
|
-
/** The
|
|
135
|
+
/** The point of a venue's own drawing the district puts at the venue's place on the ground and turns it about: the middle of its surface (the box the stands are laid round), or home plate, the origin of a ballpark's frame. */
|
|
136
136
|
export declare function surfaceCentre(options: SurfaceOptions): Pt;
|
|
137
137
|
/** A length in metres worth drawing as a scale: the largest of 50, 100, 200, 500, 1000, 2000, 5000 that is not more than a fifth of the plan's width. */
|
|
138
138
|
export declare function scaleOf(view: {
|
package/dist/district.js
CHANGED
|
@@ -8,8 +8,7 @@ import { crowdStands, drawKyogijo } from "./draw.js";
|
|
|
8
8
|
import { FEET_PER_METRE } from "./geometry.js";
|
|
9
9
|
import { KYOGIJO_STRINGS } from "./strings.js";
|
|
10
10
|
import { esc, hash } from "./format.js";
|
|
11
|
-
import {
|
|
12
|
-
import { STADIUM_IDS, groundOfStadium, stadiumById, stadiumSeats } from "./stadiums.js";
|
|
11
|
+
import { STADIUM_IDS, stadiumById, stadiumConfigs, stadiumFrameHeading, stadiumKind, stadiumNames, stadiumSeats } from "./stadiums.js";
|
|
13
12
|
import { VENUE_ATTRIBUTION, VENUE_IDS, venueById } from "./venues.js";
|
|
14
13
|
import { hullOf, metresFrom, middleOf, smallestBox } from "./venues.geo.js";
|
|
15
14
|
export const DISTRICT_MODES = ["neighbours", "city"];
|
|
@@ -31,19 +30,19 @@ const venueMember = (venue, language) => {
|
|
|
31
30
|
};
|
|
32
31
|
};
|
|
33
32
|
const stadiumMember = (stadium, config, language) => {
|
|
34
|
-
const
|
|
33
|
+
const park = stadiumKind(stadium) === "park";
|
|
35
34
|
return {
|
|
36
35
|
key: `${stadium.id}:${config}`,
|
|
37
36
|
id: stadium.id,
|
|
38
|
-
kind: "stadium",
|
|
37
|
+
kind: park ? "park" : "stadium",
|
|
39
38
|
config,
|
|
40
|
-
name:
|
|
39
|
+
name: stadiumNames(stadium),
|
|
41
40
|
ring: stadium.osm.ring,
|
|
42
41
|
centre: stadium.osm.axis.centre,
|
|
43
|
-
heading: stadium
|
|
42
|
+
heading: stadiumFrameHeading(stadium),
|
|
44
43
|
basis: stadium.osm.axis.basis,
|
|
45
44
|
seats: stadiumSeats(stadium, config),
|
|
46
|
-
options: { sport: config, stadium: stadium.id, crowd: { real: true }, language },
|
|
45
|
+
options: park ? { sport: "mlb", park: stadium.id, crowd: { real: true }, language } : { sport: config, stadium: stadium.id, crowd: { real: true }, language },
|
|
47
46
|
};
|
|
48
47
|
};
|
|
49
48
|
/** Every key a district can be asked for: the arenas of `VENUES` and the stadiums of `STADIUMS`. */
|
|
@@ -70,9 +69,9 @@ export function districtMember(input, language = "en") {
|
|
|
70
69
|
}
|
|
71
70
|
const stadium = stadiumById(id);
|
|
72
71
|
if (stadium !== undefined) {
|
|
73
|
-
const config = (named ??
|
|
72
|
+
const config = (named ?? stadiumConfigs(stadium)[0]);
|
|
74
73
|
if (stadium.configs[config] === undefined)
|
|
75
|
-
throw new Error(`${id} has no configuration ${String(named)}: ${
|
|
74
|
+
throw new Error(`${id} has no configuration ${String(named)}: ${stadiumConfigs(stadium).join(", ")}`);
|
|
76
75
|
return stadiumMember(stadium, config, language);
|
|
77
76
|
}
|
|
78
77
|
throw new Error(`no venue ${String(id)}: the venues are ${DISTRICT_IDS.join(", ")}`);
|
|
@@ -97,7 +96,7 @@ const haversine = (a, b) => {
|
|
|
97
96
|
* import { planDistrict } from "@johnmorrisdotca/kyogijo-stadiums/district";
|
|
98
97
|
* const plan = planDistrict({ venues: ["bc-place", "rogers-arena"] });
|
|
99
98
|
* console.log(plan.mode, plan.members.length, Math.round(plan.between[0].metres));
|
|
100
|
-
* // neighbours 2
|
|
99
|
+
* // neighbours 2 264
|
|
101
100
|
* ```
|
|
102
101
|
*/
|
|
103
102
|
export function planDistrict(options) {
|
|
@@ -150,8 +149,8 @@ export const KYOGIJO_DISTRICT_STYLE = `
|
|
|
150
149
|
.ky-district .ky-dist-text{fill:var(--ky-dist-ink);font-family:var(--ky-font,system-ui,-apple-system,"Segoe UI","Hiragino Sans","Noto Sans JP",sans-serif);font-weight:600;paint-order:stroke;stroke:var(--ky-dist-halo);stroke-linejoin:round}`;
|
|
151
150
|
const ROOT = /^<svg([^>]*)>/;
|
|
152
151
|
const VIEWBOX = /viewBox="(-?[\d.]+) (-?[\d.]+) ([\d.]+) ([\d.]+)"/;
|
|
153
|
-
/** The north arrow of a venue's drawing and the apron under it: a district has one of each of its own. */
|
|
154
|
-
const withoutOwn = (svg) => svg.replace(/<rect class="ky-apron"[^>]*\/>/, "").replace(/<path class="ky-cr-north"[^>]*\/>/, "").replace(/<path class="ky-cr-north-n"[^>]*\/>/, "");
|
|
152
|
+
/** The north arrow of a venue's drawing and the apron (a ballpark's foul ground) under it: a district has one of each of its own. */
|
|
153
|
+
const withoutOwn = (svg) => svg.replace(/<rect class="ky-(?:apron|foul)"[^>]*\/>/, "").replace(/<path class="ky-cr-north"[^>]*\/>/, "").replace(/<path class="ky-cr-north-n"[^>]*\/>/, "");
|
|
155
154
|
/**
|
|
156
155
|
* A venue's drawing as a part of the district's: its root made a nested `svg` that keeps the class, the sport and the colours the drawing's stylesheet reads, its box laid in its own frame (so that the group's turn
|
|
157
156
|
* and shift put it in place), and its title, description, apron, arrow and stylesheet taken out (the stylesheet is given back in `styles`).
|
|
@@ -175,8 +174,10 @@ export function nestedDrawing(svg) {
|
|
|
175
174
|
return { markup: `<svg${keep} x="${x}" y="${y}" width="${w}" height="${h}" viewBox="${x} ${y} ${w} ${h}" aria-hidden="true" focusable="false">${body}</svg>`, box: { x, y, w, h }, styles };
|
|
176
175
|
}
|
|
177
176
|
const num = (value) => String(Math.round(value * 100) / 100);
|
|
178
|
-
/** The
|
|
177
|
+
/** The point of a venue's own drawing the district puts at the venue's place on the ground and turns it about: the middle of its surface (the box the stands are laid round), or home plate, the origin of a ballpark's frame. */
|
|
179
178
|
export function surfaceCentre(options) {
|
|
179
|
+
if (options.sport === "mlb")
|
|
180
|
+
return [0, 0];
|
|
180
181
|
const stands = crowdStands(options);
|
|
181
182
|
if (stands === undefined)
|
|
182
183
|
throw new Error("a district's venue has a crowd");
|