@johnmorrisdotca/kyogijo-stadiums 0.40.2 → 0.43.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 (61) hide show
  1. package/CHANGELOG.md +56 -0
  2. package/NOTICE.md +17 -0
  3. package/README.md +1 -3
  4. package/dist/context.d.ts +141 -0
  5. package/dist/context.js +290 -0
  6. package/dist/crowd.d.ts +9 -0
  7. package/dist/district-entry.d.ts +14 -0
  8. package/dist/district-entry.js +9 -0
  9. package/dist/district.d.ts +54 -1
  10. package/dist/district.dom.d.ts +31 -0
  11. package/dist/district.dom.js +52 -0
  12. package/dist/district.js +71 -11
  13. package/dist/district.turn.js +30 -6
  14. package/dist/gates.d.ts +56 -0
  15. package/dist/gates.js +95 -0
  16. package/dist/halls.d.ts +2 -0
  17. package/dist/halls.js +1 -1
  18. package/dist/kodokan.d.ts +28 -0
  19. package/dist/kodokan.data.d.ts +18 -0
  20. package/dist/kodokan.data.js +18 -0
  21. package/dist/kodokan.js +34 -0
  22. package/dist/osm-entry.d.ts +2 -0
  23. package/dist/osm-entry.js +2 -0
  24. package/dist/osm.context.data.d.ts +10 -0
  25. package/dist/osm.context.data.js +1107 -0
  26. package/dist/outside.d.ts +43 -0
  27. package/dist/outside.dom.d.ts +44 -0
  28. package/dist/outside.dom.js +203 -0
  29. package/dist/outside.js +227 -0
  30. package/dist/outside.paint.d.ts +57 -0
  31. package/dist/outside.paint.js +88 -0
  32. package/dist/plateau-entry.d.ts +3 -0
  33. package/dist/plateau-entry.js +3 -0
  34. package/dist/plateau.credit.d.ts +5 -0
  35. package/dist/plateau.credit.js +7 -0
  36. package/dist/plateau.data.d.ts +7 -0
  37. package/dist/plateau.data.js +757 -0
  38. package/dist/stadiums.d.ts +14 -0
  39. package/dist/stadiums.data.js +2 -1
  40. package/dist/stadiums.js +2 -0
  41. package/dist/strings.d.ts +3 -1
  42. package/dist/strings.js +4 -4
  43. package/dist/turn.dom.d.ts +10 -0
  44. package/dist/turn.dom.js +21 -0
  45. package/dist/turn.kit.d.ts +10 -3
  46. package/dist/turn.kit.js +7 -0
  47. package/dist/turn.markup.js +7 -2
  48. package/dist/turn.model.d.ts +3 -0
  49. package/dist/turn.style.js +14 -3
  50. package/dist/venue.real.d.ts +22 -1
  51. package/dist/venue.real.js +76 -7
  52. package/dist/venues.d.ts +9 -1
  53. package/dist/venues.data.js +2 -1
  54. package/dist/venues.js +1 -1
  55. package/dist/version.d.ts +1 -1
  56. package/dist/version.js +1 -1
  57. package/dist/walk.d.ts +56 -0
  58. package/dist/walk.data.d.ts +4 -0
  59. package/dist/walk.data.js +1295 -0
  60. package/dist/walk.js +120 -0
  61. package/package.json +17 -1
@@ -60,7 +60,8 @@ export const VENUE_DATA = [
60
60
  "en": { "title": "Rogers Arena", "revision": 1379918849 },
61
61
  "seats": { "hockey": 18871, "source": "wikipedia", "wikidata": 18422, "read": "the infobox's present figure for ice hockey (18,871, from 2018); Wikidata's 18,422 is the 1995 figure and the first the infobox lists" },
62
62
  "tiers": { "count": 2, "basis": "plausible", "read": "no source says how many seating levels there are: two bowls are drawn; the article speaks of a lower bowl; OpenStreetMap maps four building levels, which are floors, not seating bowls" },
63
- "roof": { "kind": "fixed", "basis": "plausible", "read": "an indoor arena: a fixed roof, as nothing says otherwise" },
63
+ "roof": { "kind": "fixed", "basis": "plausible", "read": "an indoor arena: a fixed roof, as nothing says otherwise; the long skylight over the middle of the roof, and the cap that closes the roof round it, are ours (the brief's)", "skylight": true },
64
+ "facade": { "podium": 38, "unit": "ft", "basis": "plausible", "read": "the brief: the stepped facade over the Pat Quinn Way front, a lower podium under the upper levels; its height is ours (the sources do not say)" },
64
65
  },
65
66
  {
66
67
  "id": "t-mobile-arena",
package/dist/venues.js CHANGED
@@ -209,7 +209,7 @@ function plan(venue, rink) {
209
209
  rings,
210
210
  off: { left: FIRST_ROW.end, right: FIRST_ROW.end, top: FIRST_ROW.side, bottom: FIRST_ROW.side + FIRST_ROW.bench },
211
211
  reach: { left: Math.max(0, rink.x - fb.x0), right: Math.max(0, fb.x1 - rink.x - rink.w), top: Math.max(0, rink.y - fb.y0) + room, bottom: Math.max(0, fb.y1 - rink.y - rink.h) },
212
- shell: { footprint, hall: { ...outer, x0: outer.x0 - HALL, y0: outer.y0 - HALL, x1: outer.x1 + HALL, y1: outer.y1 + HALL, r: outer.r + HALL }, ...(north === undefined ? {} : { north }), roof: venue.roof.kind, edge },
212
+ shell: { footprint, hall: { ...outer, x0: outer.x0 - HALL, y0: outer.y0 - HALL, x1: outer.x1 + HALL, y1: outer.y1 + HALL, r: outer.r + HALL }, ...(north === undefined ? {} : { north }), roof: venue.roof.kind, edge, ...(venue.facade === undefined ? {} : { podium: venue.facade.podium }), ...(venue.roof.skylight === true ? { skylight: true } : {}) },
213
213
  };
214
214
  return { venue, orientation, box: rink, footprint, bowl, seats: rings.map((ring) => ({ tier: ring.tier, seats: ring.seats })), total, seatArea, fit: tight ? "tight" : "fits" };
215
215
  }
package/dist/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  /** The package's version: the same as package.json's, and a test holds them to each other. */
2
- export declare const VERSION = "0.40.2";
2
+ export declare const VERSION = "0.43.0";
package/dist/version.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /** The package's version: the same as package.json's, and a test holds them to each other. */
2
- export const VERSION = "0.40.2";
2
+ export const VERSION = "0.43.0";
package/dist/walk.d.ts ADDED
@@ -0,0 +1,56 @@
1
+ import type { LonLat } from "./venues.geo.ts";
2
+ import type { Pt } from "./crowd.ts";
3
+ /** What a district's mask is made from, as `walk.data.ts` holds it: lines (`[width in tenths of a metre, first point, steps...]`) and areas (rings, the first the outside, in whole quarter-metres). */
4
+ export interface WalkData {
5
+ /** The raw file the data was made from, and the day it was read and the time of OpenStreetMap's data. */
6
+ source: string;
7
+ read: string;
8
+ base: string;
9
+ licence: "ODbL-1.0";
10
+ attribution: string;
11
+ /** The venues the district was made for: the keys of `VENUES` and `STADIUMS` with the configuration, as a district names them. */
12
+ venues: readonly string[];
13
+ /** The `[longitude, latitude]` the metres are measured from. */
14
+ origin: LonLat;
15
+ /** The box the data covers, `[west, south, east, north]` in metres from the origin. */
16
+ box: readonly [number, number, number, number];
17
+ walkLines: readonly (readonly number[])[];
18
+ walkAreas: readonly (readonly (readonly number[])[])[];
19
+ blockLines: readonly (readonly number[])[];
20
+ blockAreas: readonly (readonly (readonly number[])[])[];
21
+ }
22
+ /** The side of a cell of the mask, in metres: half a metre, finer than the narrowest path and a person's width. */
23
+ export declare const WALK_CELL = 0.5;
24
+ /** The grid of a mask: `cells[row * width + column]` is 1 where a person may stand. Cell `(0, 0)` has its corner at `(x0, y0)` metres east and north of `origin`. */
25
+ export interface WalkMask {
26
+ id: string;
27
+ origin: LonLat;
28
+ cell: number;
29
+ x0: number;
30
+ y0: number;
31
+ width: number;
32
+ height: number;
33
+ cells: Uint8Array;
34
+ /** How many cells are walkable. */
35
+ walkable: number;
36
+ }
37
+ /** The districts there are masks for. */
38
+ export declare const WALK_IDS: readonly string[];
39
+ /** A path from its packed form: the first point, then the step to each next one, in metres. */
40
+ export declare function unpack(packed: readonly number[], from?: number): Pt[];
41
+ /** What a mask is given besides the data: rings in metres from the mask's origin that stop a crowd (the venues' own buildings), and rings whose surroundings are the venues' own ground. */
42
+ export interface WalkExtras {
43
+ /** The outline of each venue's building: stops a crowd, and a band `apron` metres wide round it is ground a crowd may stand on. */
44
+ buildings: readonly (readonly Pt[])[];
45
+ /** The width of the venue's own ground round its building, in metres. */
46
+ apron: number;
47
+ }
48
+ /**
49
+ * The mask of a district, rasterised from `WALK_DATA` (and kept for the next call): the walkable areas and the paths at their width, the apron round each venue, then the carriageways, cycle tracks, railways, water and buildings cut out
50
+ * of them, and the venues' own buildings last. A person stands in a cell with value 1, and nowhere else.
51
+ */
52
+ export declare function walkMask(id: string, extras: WalkExtras): WalkMask;
53
+ /** Whether a point (metres east and north of the mask's origin) is in a walkable cell. */
54
+ export declare function walkable(mask: WalkMask, x: number, y: number): boolean;
55
+ /** The mask a set of venues stand on, if there is one: the first mask that names one of them (by id, whatever configuration). */
56
+ export declare const walkIdFor: (venueIds: readonly string[]) => string | undefined;
@@ -0,0 +1,4 @@
1
+ import type { WalkData } from "./walk.ts";
2
+ /** The metres one whole number of the mask's coordinates is. */
3
+ export declare const WALK_UNIT = 0.25;
4
+ export declare const WALK_DATA: Record<string, WalkData>;