@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.
Files changed (48) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/NOTICE.md +17 -5
  3. package/README.md +80 -107
  4. package/dist/crowd.d.ts +20 -2
  5. package/dist/crowd.park.d.ts +6 -0
  6. package/dist/crowd.park.js +3 -3
  7. package/dist/district.d.ts +3 -3
  8. package/dist/district.js +14 -13
  9. package/dist/draw.js +25 -10
  10. package/dist/flythrough-entry.d.ts +1 -0
  11. package/dist/flythrough-entry.js +1 -0
  12. package/dist/flythrough.dom.js +52 -6
  13. package/dist/flythrough.game.d.ts +36 -0
  14. package/dist/flythrough.game.js +145 -0
  15. package/dist/flythrough.markup.js +1 -0
  16. package/dist/flythrough.path.d.ts +6 -4
  17. package/dist/flythrough.path.js +26 -22
  18. package/dist/flythrough.style.d.ts +1 -1
  19. package/dist/flythrough.style.js +3 -0
  20. package/dist/flythrough.words.d.ts +2 -0
  21. package/dist/flythrough.words.js +6 -2
  22. package/dist/index.d.ts +2 -2
  23. package/dist/index.js +1 -1
  24. package/dist/stadiums-entry.d.ts +2 -2
  25. package/dist/stadiums-entry.js +2 -2
  26. package/dist/stadiums.d.ts +109 -28
  27. package/dist/stadiums.data.js +25 -0
  28. package/dist/stadiums.js +159 -30
  29. package/dist/stadiums.osm.data.js +114 -0
  30. package/dist/strings.d.ts +4 -0
  31. package/dist/strings.js +2 -2
  32. package/dist/turn.dom.d.ts +8 -2
  33. package/dist/turn.dom.js +10 -4
  34. package/dist/venue.d.ts +2 -0
  35. package/dist/venue.js +6 -5
  36. package/dist/venue.real.d.ts +7 -2
  37. package/dist/venue.real.js +124 -10
  38. package/dist/venues-entry.d.ts +2 -2
  39. package/dist/venues-entry.js +1 -1
  40. package/dist/venues.d.ts +14 -3
  41. package/dist/venues.data.js +72 -0
  42. package/dist/venues.geo.d.ts +22 -0
  43. package/dist/venues.geo.js +28 -0
  44. package/dist/venues.js +9 -1
  45. package/dist/venues.osm.data.js +366 -0
  46. package/dist/version.d.ts +1 -1
  47. package/dist/version.js +1 -1
  48. package/package.json +4 -2
@@ -2,13 +2,14 @@ export const FLYTHROUGH_WORDS = {
2
2
  en: {
3
3
  title: "Fly-through: {arena}",
4
4
  region: "fly-through",
5
- about: "A fly-through from a map to {arena} in {place}: the map, the city, the arena in 3D, the way in over the stands and the rink seen from a seat. Play, pause, step back or forward and choose a stage with the buttons or the keys.",
5
+ about: "A fly-through from a map to {arena} in {place}: the map, the city, the arena in 3D, the way in over the stands, the rink seen from a seat and a short play on the ice. Play, pause, step back or forward and choose a stage with the buttons or the keys.",
6
6
  stage: {
7
7
  map: { name: "Map", text: "{arena} stands in {place}." },
8
8
  city: { name: "City", text: "The building of {arena} from above, as OpenStreetMap maps it." },
9
9
  arena: { name: "Arena", text: "{arena} in 3D, turning." },
10
10
  bowl: { name: "Bowl", text: "In over the stands, with the roof lifted away: a plausible bowl of {seats} seats in {tiers} tiers, not a seat map." },
11
11
  rink: { name: "Rink", text: "A view across the ice from the stands, turning; the place and the height of the seat are ours, not a real seat's." },
12
+ game: { name: "Game", text: "A short play made up for the picture, with five skaters and a goalie a side and a puck, moving on the ice. It is illustrative, not a real game's data." },
12
13
  },
13
14
  announce: "Stage {n} of {total}: {name}. {text}",
14
15
  play: "Play",
@@ -19,18 +20,20 @@ export const FLYTHROUGH_WORDS = {
19
20
  keys: "Space plays or pauses. Left and right arrows go back and forward a stage; the number keys choose a stage; Home starts again.",
20
21
  creditMap: "Map: Natural Earth (public domain), drawn with chizu. Building outline: (c) OpenStreetMap contributors, ODbL 1.0, openstreetmap.org/copyright.",
21
22
  creditPlain: "Building outline: (c) OpenStreetMap contributors, ODbL 1.0, openstreetmap.org/copyright.",
23
+ illustrative: "Illustrative play",
22
24
  still: "Each stage is shown as a still picture, because this device is set to reduce motion.",
23
25
  },
24
26
  ja: {
25
27
  title: "フライスルー:{arena}",
26
28
  region: "フライスルー",
27
- about: "地図から{place}の{arena}まで進むフライスルーです。地図、都市、3Dのアリーナ、スタンドの上空から中へ入る場面、客席から見たリンクの順に見られます。ボタンまたはキーで、再生・一時停止、前後の場面への移動、場面の選択ができます。",
29
+ about: "地図から{place}の{arena}まで進むフライスルーです。地図、都市、3Dのアリーナ、スタンドの上空から中へ入る場面、客席から見たリンク、氷上の短い模擬プレーの順に見られます。ボタンまたはキーで、再生・一時停止、前後の場面への移動、場面の選択ができます。",
28
30
  stage: {
29
31
  map: { name: "地図", text: "{arena}は{place}にあります。" },
30
32
  city: { name: "都市", text: "{arena}の建物を真上から見たところです(OpenStreetMapの記録による)。" },
31
33
  arena: { name: "アリーナ", text: "{arena}を3Dで回転させて表示しています。" },
32
34
  bowl: { name: "客席", text: "屋根を取り払い、スタンドの上空から中へ入ります。{seats}席・{tiers}層の推定のスタンドで、実際の座席表ではありません。" },
33
35
  rink: { name: "リンク", text: "スタンドからリンクを見渡した眺めで、ゆっくり回転します。視点の位置と高さは仮のもので、実在の座席ではありません。" },
36
+ game: { name: "試合", text: "絵として作った短い模擬プレーです。両チーム各5人のスケーターとゴーリー、そしてパックが氷上を動きます。実際の試合のデータではありません。" },
34
37
  },
35
38
  announce: "場面{n}/{total}:{name}。{text}",
36
39
  play: "再生",
@@ -41,6 +44,7 @@ export const FLYTHROUGH_WORDS = {
41
44
  keys: "スペースキーで再生・一時停止。左右の矢印キーで前後の場面へ、数字キーで場面を選び、Homeキーで最初に戻ります。",
42
45
  creditMap: "地図:Natural Earth(パブリックドメイン)、chizuで描画。建物の輪郭:(c) OpenStreetMap contributors、ODbL 1.0、openstreetmap.org/copyright。",
43
46
  creditPlain: "建物の輪郭:(c) OpenStreetMap contributors、ODbL 1.0、openstreetmap.org/copyright。",
47
+ illustrative: "模擬プレー(イメージ)",
44
48
  still: "この端末は動きを減らす設定のため、各場面を静止画で表示しています。",
45
49
  },
46
50
  };
package/dist/index.d.ts CHANGED
@@ -63,8 +63,8 @@ export { ERA_CURRENT, ERA_SOURCES, ERA_SPORTS, eraChanges, eraRange, eraStates,
63
63
  export type { EraChange, EraRules, EraRulesOf, EraSource, EraSpan, EraSport, FootballRules, MlbRules, NbaRules, NhlRules } from "./eras.ts";
64
64
  export { ARENA_IDS, ARENAS, arenaById, arenaByName, arenaByWikidata, arenaCourtIn, arenaNameIn, arenaOfficialName, arenaRinkIn, arenaSourceUrl, arenasByName } from "./arenas.ts";
65
65
  export type { Arena, ArenaCapacity, ArenaData, ArenaName, ArenaSize, ArenaSource } from "./arenas.ts";
66
- export { VENUE_ATTRIBUTION, VENUE_IDS, VENUES, arenaOfVenue, bowlInside, planVenue, venueBowl, venueById, venueByWikidata, venueOrientation, venueRink, venuesIn } from "./venues.ts";
67
- export type { RealVenue, RealVenueData, VenueBasis, VenueDivision, VenueOrientation, VenueOsm, VenuePlan, VenueRoof } from "./venues.ts";
66
+ export { VENUE_ATTRIBUTION, VENUE_CONFERENCES, VENUE_DIVISIONS, VENUE_IDS, VENUES, arenaOfVenue, bowlInside, conferenceOf, planVenue, venueBowl, venueById, venueByWikidata, venueOrientation, venueRink, venuesIn, venuesInConference } from "./venues.ts";
67
+ export type { RealVenue, RealVenueData, VenueBasis, VenueConference, VenueDivision, VenueOrientation, VenueOsm, VenuePlan, VenueRoof } from "./venues.ts";
68
68
  export { GROUND_IDS, GROUNDS, groundById, groundByName, groundByWikidata, groundNameIn, groundOfficialName, groundSourceUrl, groundsByName, groundsHosting } from "./grounds.ts";
69
69
  export type { Ground, GroundCompetition, GroundData, GroundName, GroundSource, GroundTournament } from "./grounds.ts";
70
70
  export { AFL_GROUNDS, FAMILY_OF, LEAGUES, LEAGUE_SOURCES, VARIANTS, chooseLeague, hasHistory, leagueAt, leagueById, leagueChanges, leagueFigures, leagueIds, leagueSeason, leagueSize } from "./leagues.ts";
package/dist/index.js CHANGED
@@ -39,7 +39,7 @@ export { PARKS, PARK_IDS, fenceFor, parkById, parkByName, parkByWikidata, parkNa
39
39
  export { officialName, plainName } from "./names.js";
40
40
  export { ERA_CURRENT, ERA_SOURCES, ERA_SPORTS, eraChanges, eraRange, eraStates, footballIn, rulesFor, seasonLabel } from "./eras.js";
41
41
  export { ARENA_IDS, ARENAS, arenaById, arenaByName, arenaByWikidata, arenaCourtIn, arenaNameIn, arenaOfficialName, arenaRinkIn, arenaSourceUrl, arenasByName } from "./arenas.js";
42
- export { VENUE_ATTRIBUTION, VENUE_IDS, VENUES, arenaOfVenue, bowlInside, planVenue, venueBowl, venueById, venueByWikidata, venueOrientation, venueRink, venuesIn } from "./venues.js";
42
+ export { VENUE_ATTRIBUTION, VENUE_CONFERENCES, VENUE_DIVISIONS, VENUE_IDS, VENUES, arenaOfVenue, bowlInside, conferenceOf, planVenue, venueBowl, venueById, venueByWikidata, venueOrientation, venueRink, venuesIn, venuesInConference } from "./venues.js";
43
43
  export { GROUND_IDS, GROUNDS, groundById, groundByName, groundByWikidata, groundNameIn, groundOfficialName, groundSourceUrl, groundsByName, groundsHosting } from "./grounds.js";
44
44
  export { AFL_GROUNDS, FAMILY_OF, LEAGUES, LEAGUE_SOURCES, VARIANTS, chooseLeague, hasHistory, leagueAt, leagueById, leagueChanges, leagueFigures, leagueIds, leagueSeason, leagueSize } from "./leagues.js";
45
45
  export { SURFACE_UNITS, UNITS, convertLength, isUnit } from "./units.js";
@@ -1,2 +1,2 @@
1
- export { VENUE_ATTRIBUTION, STADIUMS, STADIUM_IDS, groundOfStadium, planStadium, stadiumBowl, stadiumBowlInside, stadiumById, stadiumByWikidata, stadiumConfigOf, stadiumOrientation, stadiumSeats } from "./stadiums.ts";
2
- export type { RealStadium, RealStadiumData, StadiumBasis, StadiumConfigData, StadiumConfigId, StadiumOrientation, StadiumOsm, StadiumPlan, StadiumRoof } from "./stadiums.ts";
1
+ export { VENUE_ATTRIBUTION, STADIUMS, STADIUM_IDS, groundOfStadium, planPark, planStadium, stadiumBowl, stadiumBowlInside, stadiumById, stadiumByWikidata, stadiumConfigOf, stadiumConfigs, stadiumFrameHeading, stadiumKind, stadiumNames, stadiumOrientation, stadiumSeats } from "./stadiums.ts";
2
+ export type { ParkPlan, RealStadium, RealStadiumData, StadiumBasis, StadiumConfigData, StadiumConfigId, StadiumKind, StadiumOrientation, StadiumOsm, StadiumPlan, StadiumRoof } from "./stadiums.ts";
@@ -1,2 +1,2 @@
1
- // The real stadiums: the outline of each stadium's building and the way its field lies (OpenStreetMap, ODbL 1.0) and a plausible bowl from the seats of each configuration, the bowls and the roof the sources give (Wikidata, Wikipedia).
2
- export { VENUE_ATTRIBUTION, STADIUMS, STADIUM_IDS, groundOfStadium, planStadium, stadiumBowl, stadiumBowlInside, stadiumById, stadiumByWikidata, stadiumConfigOf, stadiumOrientation, stadiumSeats } from "./stadiums.js";
1
+ // The real stadiums and ballparks: the outline of each building and the way its field lies (OpenStreetMap, ODbL 1.0) and a plausible bowl from the seats of each configuration, the bowls and the roof the sources give (Wikidata, Wikipedia).
2
+ export { VENUE_ATTRIBUTION, STADIUMS, STADIUM_IDS, groundOfStadium, planPark, planStadium, stadiumBowl, stadiumBowlInside, stadiumById, stadiumByWikidata, stadiumConfigOf, stadiumConfigs, stadiumFrameHeading, stadiumKind, stadiumNames, stadiumOrientation, stadiumSeats } from "./stadiums.js";
@@ -1,16 +1,22 @@
1
- import { type Box, type Pt, type RealBowl } from "./crowd.ts";
1
+ import { type Box, type CrowdStands, type Pt, type RealBowl } from "./crowd.ts";
2
+ import { type ParkInput } from "./crowd.park.ts";
2
3
  import { type Ground } from "./grounds.ts";
3
4
  import { VENUE_ATTRIBUTION } from "./venues.ts";
4
5
  export { VENUE_ATTRIBUTION };
5
6
  /** How a fact is known: `documented` is what a source cited with it says; `plausible` is ours, for a bowl no source describes. */
6
7
  export type StadiumBasis = "documented" | "plausible";
7
- /** The configurations of a stadium: the field the seats are counted for. `cfl` is the football field of the Canadian league, `soccer` a soccer pitch. */
8
- export type StadiumConfigId = "cfl" | "soccer";
9
- /** The kinds of roof the stadiums have: `cable` is a cable-supported roof with an opening over the field that a retractable fabric closes; `fixed` a lid over the bowl. */
10
- export type StadiumRoof = "cable" | "fixed";
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";
12
+ /**
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).
15
+ */
16
+ export type StadiumRoof = "cable" | "fixed" | "canopy" | "panels";
11
17
  /** What one configuration of a stadium is: its sport and its seats, and where the figure was read. */
12
18
  export interface StadiumConfigData {
13
- sport: "cfl" | "soccer";
19
+ sport: StadiumConfigId;
14
20
  /** The seats for this configuration: the infobox's figure for it, or Wikidata's. */
15
21
  seats: number;
16
22
  source: "wikidata" | "wikipedia";
@@ -19,45 +25,68 @@ export interface StadiumConfigData {
19
25
  }
20
26
  /** The facts of a stadium: the seats of each configuration, the number of bowls and the kind of roof, each with what a source says. No text of an article is kept. */
21
27
  export interface RealStadiumData {
22
- /** The key: `bc-place`, the key of the stadium's ground in `GROUNDS`. */
28
+ /** The key: `bc-place`, the key of the stadium's ground in `GROUNDS` (or of its park in `PARKS`). */
23
29
  id: string;
30
+ kind?: StadiumKind;
24
31
  /** The Wikidata item of the stadium. */
25
32
  wikidata: string;
26
- /** The key of the stadium's ground in `GROUNDS` (its name, its place, its pitch). */
27
- ground: string;
33
+ /** The key of the stadium's ground in `GROUNDS` (its name, its place, its pitch): a stadium has one. */
34
+ ground?: string;
35
+ /** The key of a ballpark in `PARKS` (its name, its place, its fence): a park has one. */
36
+ park?: string;
37
+ /** Whose football field the first row stands round: the CFL's (the default) or the NFL's. */
38
+ gridiron?: "cfl" | "nfl";
28
39
  /** The English Wikipedia article the facts that are not Wikidata's were read from, at a revision. */
29
40
  en: {
30
41
  title: string;
31
42
  revision: number;
32
43
  };
33
- configs: Record<StadiumConfigId, StadiumConfigData>;
44
+ configs: Partial<Record<StadiumConfigId, StadiumConfigData>>;
45
+ /** 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
+ bowlSeats?: number;
47
+ /** Wikidata's own capacities (P1083), kept beside the figures used: they are often for another event or another year. */
48
+ wikidataSeats?: number[];
34
49
  tiers: {
35
- /** The seating levels (bowls). */
36
- count: 1 | 2 | 3;
50
+ /** The seating levels (bowls): a ballpark's four levels are drawn as a lower bowl, an upper bowl and the bleachers. */
51
+ count: 1 | 2 | 3 | 4;
37
52
  basis: StadiumBasis;
38
53
  /** The seats of the lowest bowl, where a source gives them: the lower tier's band holds this many whatever the configuration (the upper bowl is what is opened or closed for the others). */
39
54
  lowerSeats?: number;
55
+ /** A ballpark's seats by band, where the article gives them by level: the lower bowl, the upper bowl (the club, suite and view levels) and the bleachers. */
56
+ tierSeats?: {
57
+ lower: number;
58
+ upper: number;
59
+ bleachers: number;
60
+ };
40
61
  read: string;
41
62
  };
42
63
  roof: {
43
64
  kind: StadiumRoof;
44
65
  basis: StadiumBasis;
45
- read: string; /** A cable roof's opening over the field, as the article gives it, in metres. */
66
+ read: string;
67
+ /** A cable roof's opening over the field, as the article gives it, in metres. */
46
68
  opening?: {
47
69
  length: number;
48
70
  width: number;
49
71
  unit: "m";
50
72
  };
73
+ /** A canopy's share of the seats it covers, as the article gives it. */
74
+ cover?: number;
75
+ /** A retractable roof's bottom and top above the field, in feet, as the article gives them. */
76
+ bottom?: number;
77
+ top?: number;
51
78
  };
52
79
  }
53
80
  /** What OpenStreetMap gave of a stadium: ODbL 1.0 data, "(c) OpenStreetMap contributors". */
54
81
  export interface StadiumOsm {
55
- /** The element the outline is: `way/24705904`. */
82
+ /** The element the outline is: `way/24705904`, `relation/2305831`. */
56
83
  source: string;
57
84
  read: string;
58
85
  base: string;
59
86
  licence: "ODbL-1.0";
60
87
  attribution: string;
88
+ /** The building's height in metres, where OpenStreetMap maps one. */
89
+ height?: number;
61
90
  /** The roof OpenStreetMap maps over the building: its heights in metres (`height` to the top of the roof, `rise` of that the roof's own) and the opening in it as `[longitude, latitude]`. */
62
91
  roof?: {
63
92
  source: string;
@@ -69,16 +98,24 @@ export interface StadiumOsm {
69
98
  ring: [number, number][];
70
99
  };
71
100
  };
101
+ /** 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
+ canopies?: {
103
+ source: string;
104
+ height: number;
105
+ rise: number;
106
+ ring: [number, number][];
107
+ }[];
72
108
  /** The building's outline as `[longitude, latitude]`, not repeating its first point. */
73
109
  ring: [number, number][];
74
110
  /**
75
- * 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), how that is known (`opening`: from the roof's opening, which the article says is
76
- * the field's size; `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
77
- * wide the opening or the hall is (`elongation`), and the middle of the field as `[longitude, latitude]`.
111
+ * 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).
78
115
  */
79
116
  axis: {
80
117
  heading: number;
81
- basis: "opening" | "building" | "none";
118
+ basis: "opening" | "pitch" | "infield" | "building" | "none";
82
119
  strength: number;
83
120
  elongation: number;
84
121
  centre: [number, number];
@@ -88,10 +125,10 @@ export interface StadiumOsm {
88
125
  export interface RealStadium extends RealStadiumData {
89
126
  osm: StadiumOsm;
90
127
  }
91
- /** How the field lies in the building: its long side's heading, how that is known, and the way north points on the page (degrees clockwise from the top). */
128
+ /** How the field lies in the building: its long side's heading (a ballpark's: home plate to centre field), how that is known, and the way north points on the page (degrees clockwise from the top). */
92
129
  export interface StadiumOrientation {
93
130
  heading: number;
94
- basis: "opening" | "building" | "none";
131
+ basis: StadiumOsm["axis"]["basis"];
95
132
  north: number;
96
133
  }
97
134
  /** The stadiums by key. */
@@ -102,13 +139,24 @@ export declare const STADIUM_IDS: readonly string[];
102
139
  export declare const stadiumById: (id: string | undefined) => RealStadium | undefined;
103
140
  /** The stadium whose Wikidata item is `Q612227`, or `undefined`. */
104
141
  export declare const stadiumByWikidata: (wikidata: string | undefined) => RealStadium | undefined;
105
- /** The ground a stadium is (its name, place and pitch). */
142
+ /** The kind of a stadium: a `stadium` unless it is a ballpark. */
143
+ export declare const stadiumKind: (stadium: RealStadium) => StadiumKind;
144
+ /** The configurations a stadium has, in the order of its data. */
145
+ 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. */
106
147
  export declare const groundOfStadium: (stadium: RealStadium) => Ground;
148
+ /** The names a stadium goes by in both languages, of its ground or its park. */
149
+ export declare function stadiumNames(stadium: RealStadium): {
150
+ en: string;
151
+ ja: string;
152
+ };
153
+ /** The heading the field's frame runs along, degrees clockwise from north: the long side's, and for a ballpark (whose frame has home plate at its origin, x to the right of the way out and y minus the way out) a quarter turn from the way out to centre field. */
154
+ export declare const stadiumFrameHeading: (stadium: RealStadium) => number;
107
155
  /** How the field lies in a stadium's building (see `StadiumOsm.axis`). */
108
156
  export declare const stadiumOrientation: (stadium: RealStadium) => StadiumOrientation;
109
- /** The configuration a sport is: `cfl` or `soccer`, or `undefined` for a sport a stadium has no configuration for. */
157
+ /** The configuration a sport is: `cfl`, `nfl`, `soccer` or `mlb`, or `undefined` for a sport a stadium has no configuration for. */
110
158
  export declare const stadiumConfigOf: (sport: string | undefined) => StadiumConfigId | undefined;
111
- /** The seats of a stadium for a configuration. */
159
+ /** The seats of a stadium for a configuration (0 for one it has none of). */
112
160
  export declare const stadiumSeats: (stadium: RealStadium, config: StadiumConfigId) => number;
113
161
  /** 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. */
114
162
  export declare const STADIUM_FIRST_HEIGHT = 5;
@@ -116,6 +164,8 @@ export declare const STADIUM_RISES: Readonly<Record<1 | 2 | 3, readonly number[]
116
164
  export declare const STADIUM_WALK_RISE = 24;
117
165
  /** The height a roof's rim stands over the top row, at the least, in feet. */
118
166
  export declare const STADIUM_CLEARANCE = 22;
167
+ /** How far a canopy's low edge stands over the top row at the least, in feet: a bowl under a canopy is lowered to keep it. */
168
+ export declare const CANOPY_CLEARANCE = 6;
119
169
  /** The plan of a stadium for a configuration: its building in the drawing's frame, the bowl fitted inside, and how it lies. */
120
170
  export interface StadiumPlan {
121
171
  stadium: RealStadium;
@@ -129,26 +179,28 @@ export interface StadiumPlan {
129
179
  opening: Pt[] | undefined;
130
180
  /** The stands for `layoutOf`: bowls, first row, ground, and the building and roof. */
131
181
  bowl: RealBowl;
132
- /** The seats the bowls hold, by bowl, and in all: equal to the configuration's seats where the building has room (`fit` is `fits`). */
182
+ /** The seats the bowls hold, by bowl, and in all: equal to the bowl's seats where the building has room (`fit` is `fits`). */
133
183
  seats: {
134
184
  tier: string;
135
185
  seats: number;
136
186
  }[];
137
187
  total: number;
188
+ /** The seats open in this configuration: the configuration's own, counted from the lowest bowl up (the rest of a larger bowl is closed). */
189
+ open: number;
138
190
  /** The floor a seat takes in the plan, in square feet (one of `SEAT_AREAS`). */
139
191
  seatArea: number;
140
192
  fit: "fits" | "tight";
141
193
  }
142
194
  /**
143
195
  * The plan of a stadium's bowl for a configuration: the building's outline turned so that the field lies along x, a first row round a football field's footprint as a gridiron's stands have it, the largest bowl-shaped
144
- * outline that fits the building round the middle of the field, and between the two the bowls, the outer edge of each placed so that its band holds the share of the configuration's seats the sources give it, with a walk
145
- * between them. The bowl is the same building for football and soccer (the seats of the configuration differ, and the field).
196
+ * outline that fits the building round the middle of the field, and between the two the bowls, the outer edge of each placed so that its band holds the share of the seats the sources give it, with a walk
197
+ * between them. The bowl is the same building for every configuration (the seats of the configuration differ, and the field); where a bowl holds more seats than a configuration opens, the rest are closed.
146
198
  * @example
147
199
  * ```ts
148
200
  * import { planStadium, stadiumById } from "@johnmorrisdotca/kyogijo-stadiums/stadiums";
149
201
  * const plan = planStadium(stadiumById("bc-place")!, "soccer", { x: 0, y: 0, w: 344.5, h: 223.1 });
150
- * console.log(plan.orientation.basis, plan.seats.map((t) => t.tier).join(" "), plan.total);
151
- * // opening lower upper 52497
202
+ * console.log(plan.orientation.basis, plan.seats.map((t) => `${t.tier} ${t.seats}`).join(", "), plan.total);
203
+ * // opening lower 27695, upper 24802 52497
152
204
  * ```
153
205
  */
154
206
  export declare function planStadium(stadium: RealStadium, config: StadiumConfigId, box: Box): StadiumPlan;
@@ -156,3 +208,32 @@ export declare function planStadium(stadium: RealStadium, config: StadiumConfigI
156
208
  export declare const stadiumBowl: (stadium: RealStadium, config: StadiumConfigId, box: Box) => RealBowl;
157
209
  /** Whether the bowl lies inside the building: every corner of every bowl's outer edge is inside the footprint. */
158
210
  export declare function stadiumBowlInside(plan: StadiumPlan): boolean;
211
+ /** The plan of a ballpark: its usual stands (`parkLayout`), the depth of each band set so that it holds the seats the article gives for its level, and the building, the way home plate faces and the roof round them. */
212
+ export interface ParkPlan {
213
+ stadium: RealStadium;
214
+ config: StadiumConfigId;
215
+ orientation: StadiumOrientation;
216
+ /** The building's outline in feet, in the park's frame (home plate at its origin, x to the right of the way out to centre field, y minus the way out). */
217
+ footprint: Pt[];
218
+ /** The stands, with the building and the roof (`real`). */
219
+ stands: CrowdStands;
220
+ /** The depth of each band of stands the seats gave, in feet. */
221
+ depths: {
222
+ lower: number;
223
+ upper: number;
224
+ bleachers: number;
225
+ };
226
+ /** The seats each band holds, and in all, against the configuration's. */
227
+ seats: {
228
+ tier: string;
229
+ seats: number;
230
+ }[];
231
+ total: number;
232
+ /** Whether the stands hold the configuration's seats to within two percent. */
233
+ fit: "fits" | "tight";
234
+ }
235
+ /**
236
+ * The plan of a ballpark from what its stands are laid from (`input`: the park's fence, the backstop and the crowd): the usual stands with each band as deep as its seats need, the building's outline turned so that home
237
+ * plate faces where OpenStreetMap's infield and the outline say, and the roof: sections far over the field, closed over the stands and the field or resting over the east side where the article says they rest.
238
+ */
239
+ export declare function planPark(stadium: RealStadium, input: ParkInput): ParkPlan;
@@ -5,7 +5,32 @@ export const STADIUM_DATA = [
5
5
  "ground": "bc-place",
6
6
  "en": { "title": "BC Place", "revision": 1372065649 },
7
7
  "configs": { "cfl": { "sport": "cfl", "seats": 54500, "source": "wikipedia", "read": "the infobox's first capacity, 54,500, which Wikidata's capacity (P1083) also gives; the article's stand for football of the CFL's club" }, "soccer": { "sport": "soccer", "seats": 52497, "source": "wikipedia", "read": "the infobox's capacity for the 2026 world cup of soccer, 52,497, 2,003 fewer than its first" } },
8
+ "wikidataSeats": [54500],
8
9
  "tiers": { "count": 2, "basis": "documented", "lowerSeats": 27695, "read": "the infobox's lower bowl of 27,695 seats, and the article's lower and upper bowls (the club that plays soccer there sold only the lower bowl)" },
9
10
  "roof": { "kind": "cable", "basis": "documented", "read": "the article: a retractable roof supported by cables, the largest of its kind, its opening 100 by 85 metres (the size of the field), the fabric retracting into a pod in the middle of the opening above the suspended video board", "opening": { "length": 100, "width": 85, "unit": "m" } },
10
11
  },
12
+ {
13
+ "id": "lumen-field",
14
+ "kind": "stadium",
15
+ "wikidata": "Q612736",
16
+ "ground": "lumen-field",
17
+ "gridiron": "nfl",
18
+ "en": { "title": "Lumen Field", "revision": 1373998493 },
19
+ "configs": { "nfl": { "sport": "nfl", "seats": 68740, "source": "wikipedia", "read": "the infobox's capacity for the NFL, 68,740 (expandable to 72,000 for special events)" }, "soccer": { "sport": "soccer", "seats": 37722, "source": "wikipedia", "read": "the infobox's capacity for MLS, 37,722, the upper and lower sections tarped off beyond it" } },
20
+ "bowlSeats": 68740,
21
+ "wikidataSeats": [67000, 72000],
22
+ "tiers": { "count": 3, "basis": "documented", "read": "the article names the lower concourse levels, the club and suite levels and the Summit levels above them" },
23
+ "roof": { "kind": "canopy", "basis": "documented", "cover": 0.7, "read": "the article: a roof of 200,000 square feet that covers 70 percent of the seats and leaves the field open, spanning 720 feet between concrete pylons at the north and south ends" },
24
+ },
25
+ {
26
+ "id": "t-mobile-park",
27
+ "kind": "park",
28
+ "wikidata": "Q1193117",
29
+ "park": "t-mobile-park",
30
+ "en": { "title": "T-Mobile Park", "revision": 1379419810 },
31
+ "configs": { "mlb": { "sport": "mlb", "seats": 47368, "source": "wikipedia", "read": "the infobox's capacity for baseball, 47,368" } },
32
+ "wikidataSeats": [47476],
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
+ "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
+ },
11
36
  ];