@johnmorrisdotca/kyogijo-stadiums 0.4.0 → 0.6.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 (361) hide show
  1. package/CHANGELOG.md +133 -0
  2. package/NOTICE.md +182 -2
  3. package/README.md +106 -19
  4. package/dist/annotate.js +1 -1
  5. package/dist/arenas-entry.d.ts +4 -0
  6. package/dist/arenas-entry.js +3 -0
  7. package/dist/arenas.d.ts +125 -0
  8. package/dist/arenas.data.d.ts +2 -0
  9. package/dist/arenas.data.js +3763 -0
  10. package/dist/arenas.js +72 -0
  11. package/dist/athletics/describe.d.ts +8 -0
  12. package/dist/athletics/describe.js +41 -0
  13. package/dist/athletics/events.d.ts +17 -0
  14. package/dist/athletics/events.js +48 -0
  15. package/dist/athletics/facilities.d.ts +80 -0
  16. package/dist/athletics/facilities.js +176 -0
  17. package/dist/athletics/infield.d.ts +79 -0
  18. package/dist/athletics/infield.js +166 -0
  19. package/dist/athletics/layout.d.ts +13 -0
  20. package/dist/athletics/layout.js +98 -0
  21. package/dist/athletics/oval.d.ts +57 -0
  22. package/dist/athletics/oval.js +116 -0
  23. package/dist/athletics/plan.d.ts +97 -0
  24. package/dist/athletics/plan.js +355 -0
  25. package/dist/athletics/races.d.ts +102 -0
  26. package/dist/athletics/races.js +355 -0
  27. package/dist/athletics/steeplechase.d.ts +72 -0
  28. package/dist/athletics/steeplechase.js +196 -0
  29. package/dist/athletics/stencil.d.ts +13 -0
  30. package/dist/athletics/stencil.js +85 -0
  31. package/dist/athletics/track.d.ts +54 -0
  32. package/dist/athletics/track.js +105 -0
  33. package/dist/athletics/types.d.ts +77 -0
  34. package/dist/athletics/types.js +1 -0
  35. package/dist/athletics-entry.d.ts +17 -0
  36. package/dist/athletics-entry.js +11 -0
  37. package/dist/athletics.style.d.ts +16 -0
  38. package/dist/athletics.style.js +51 -0
  39. package/dist/atlas-entry.d.ts +6 -2
  40. package/dist/atlas-entry.js +4 -2
  41. package/dist/atlas.d.ts +117 -23
  42. package/dist/atlas.js +197 -12
  43. package/dist/background.js +2 -1
  44. package/dist/budo/describe.d.ts +13 -0
  45. package/dist/budo/describe.js +120 -0
  46. package/dist/budo/dojo.api.d.ts +64 -0
  47. package/dist/budo/dojo.api.js +46 -0
  48. package/dist/budo/dojo.d.ts +72 -0
  49. package/dist/budo/dojo.js +300 -0
  50. package/dist/budo/judo.d.ts +61 -0
  51. package/dist/budo/judo.js +109 -0
  52. package/dist/budo/karate.d.ts +29 -0
  53. package/dist/budo/karate.js +80 -0
  54. package/dist/budo/kendo.d.ts +18 -0
  55. package/dist/budo/kendo.js +44 -0
  56. package/dist/budo/kimarite.d.ts +19 -0
  57. package/dist/budo/kimarite.js +33 -0
  58. package/dist/budo/kit.d.ts +16 -0
  59. package/dist/budo/kit.js +24 -0
  60. package/dist/budo/kyudo.d.ts +28 -0
  61. package/dist/budo/kyudo.js +66 -0
  62. package/dist/budo/looks.d.ts +28 -0
  63. package/dist/budo/looks.js +58 -0
  64. package/dist/budo/parts.d.ts +32 -0
  65. package/dist/budo/parts.js +10 -0
  66. package/dist/budo/plan.d.ts +64 -0
  67. package/dist/budo/plan.js +139 -0
  68. package/dist/budo/room.d.ts +133 -0
  69. package/dist/budo/room.js +111 -0
  70. package/dist/budo/sumo.d.ts +31 -0
  71. package/dist/budo/sumo.js +71 -0
  72. package/dist/budo/tatami.d.ts +55 -0
  73. package/dist/budo/tatami.js +156 -0
  74. package/dist/budo/types.d.ts +192 -0
  75. package/dist/budo/types.js +2 -0
  76. package/dist/budo-entry.d.ts +22 -0
  77. package/dist/budo-entry.js +13 -0
  78. package/dist/budo.board.d.ts +28 -0
  79. package/dist/budo.board.js +81 -0
  80. package/dist/budo.score.d.ts +18 -0
  81. package/dist/budo.score.js +52 -0
  82. package/dist/budo.style.d.ts +6 -0
  83. package/dist/budo.style.js +67 -0
  84. package/dist/charts-entry.d.ts +6 -1
  85. package/dist/charts-entry.js +3 -0
  86. package/dist/charts.athletics.d.ts +183 -0
  87. package/dist/charts.athletics.js +455 -0
  88. package/dist/charts.baseball.js +1 -1
  89. package/dist/charts.curling.heat.d.ts +24 -0
  90. package/dist/charts.curling.heat.js +116 -0
  91. package/dist/charts.curling.js +14 -3
  92. package/dist/charts.js +4 -4
  93. package/dist/charts.pool.d.ts +67 -0
  94. package/dist/charts.pool.js +76 -0
  95. package/dist/charts.skating.d.ts +204 -0
  96. package/dist/charts.skating.js +426 -0
  97. package/dist/charts.soccer.js +3 -3
  98. package/dist/charts.types.d.ts +63 -1
  99. package/dist/colour.d.ts +4 -4
  100. package/dist/colour.js +4 -4
  101. package/dist/court.d.ts +85 -2
  102. package/dist/court.js +102 -7
  103. package/dist/court.more.d.ts +46 -0
  104. package/dist/court.more.js +219 -0
  105. package/dist/courts.style.d.ts +14 -2
  106. package/dist/courts.style.js +51 -4
  107. package/dist/crowd.d.ts +164 -0
  108. package/dist/crowd.draw.d.ts +17 -0
  109. package/dist/crowd.draw.js +204 -0
  110. package/dist/crowd.js +480 -0
  111. package/dist/crowd.park.d.ts +19 -0
  112. package/dist/crowd.park.js +153 -0
  113. package/dist/curling.stats.d.ts +271 -0
  114. package/dist/curling.stats.js +301 -0
  115. package/dist/draw.d.ts +16 -0
  116. package/dist/draw.js +462 -54
  117. package/dist/element-entry.d.ts +3 -1
  118. package/dist/element-entry.js +2 -1
  119. package/dist/element.d.ts +13 -2
  120. package/dist/element.js +79 -4
  121. package/dist/emblems-source.d.ts +50 -0
  122. package/dist/emblems-source.js +56 -0
  123. package/dist/eras.d.ts +3 -1
  124. package/dist/eras.js +8 -3
  125. package/dist/features.js +204 -0
  126. package/dist/field.data.d.ts +16 -0
  127. package/dist/field.data.js +50 -0
  128. package/dist/fields.kit.d.ts +2 -2
  129. package/dist/fields.types.d.ts +24 -4
  130. package/dist/formations.js +18 -7
  131. package/dist/formations.sports.d.ts +8 -0
  132. package/dist/formations.sports.js +251 -0
  133. package/dist/frames.providers.js +71 -8
  134. package/dist/geojson.js +3 -0
  135. package/dist/geometry-entry.d.ts +2 -1
  136. package/dist/geometry-entry.js +2 -1
  137. package/dist/geometry.d.ts +20 -0
  138. package/dist/geometry.js +78 -1
  139. package/dist/grounds.d.ts +4 -0
  140. package/dist/grounds.data.js +12 -0
  141. package/dist/halls.d.ts +65 -0
  142. package/dist/halls.js +122 -0
  143. package/dist/hardwood.d.ts +31 -0
  144. package/dist/hardwood.js +157 -0
  145. package/dist/heat.js +21 -13
  146. package/dist/heat.types.d.ts +5 -0
  147. package/dist/heat.zones.d.ts +4 -2
  148. package/dist/heat.zones.js +207 -7
  149. package/dist/homeside.js +24 -0
  150. package/dist/index.d.ts +30 -4
  151. package/dist/index.js +18 -2
  152. package/dist/layers-entry.d.ts +2 -1
  153. package/dist/layers-entry.js +1 -0
  154. package/dist/layers.d.ts +2 -1
  155. package/dist/layers.env.d.ts +12 -1
  156. package/dist/layers.env.js +36 -4
  157. package/dist/layers.js +32 -13
  158. package/dist/layers.types.d.ts +9 -2
  159. package/dist/leagues/athletics.d.ts +63 -0
  160. package/dist/leagues/athletics.js +87 -0
  161. package/dist/leagues/budo.d.ts +196 -0
  162. package/dist/leagues/budo.js +105 -0
  163. package/dist/leagues/courts.d.ts +269 -4
  164. package/dist/leagues/courts.js +155 -1
  165. package/dist/leagues/hockey.js +41 -19
  166. package/dist/leagues/skating.d.ts +145 -0
  167. package/dist/leagues/skating.js +73 -0
  168. package/dist/leagues/sources.js +41 -0
  169. package/dist/leagues/types.d.ts +1 -1
  170. package/dist/leagues-entry.d.ts +4 -2
  171. package/dist/leagues-entry.js +2 -1
  172. package/dist/leagues.d.ts +17 -4
  173. package/dist/leagues.js +246 -5
  174. package/dist/lineup.codes.d.ts +23 -0
  175. package/dist/lineup.codes.js +122 -0
  176. package/dist/logo.d.ts +25 -0
  177. package/dist/logo.js +47 -0
  178. package/dist/look.d.ts +3 -3
  179. package/dist/look.js +39 -6
  180. package/dist/outline.d.ts +1 -1
  181. package/dist/outline.js +46 -4
  182. package/dist/pageant.d.ts +120 -0
  183. package/dist/pageant.draw.d.ts +21 -0
  184. package/dist/pageant.draw.js +171 -0
  185. package/dist/pageant.js +211 -0
  186. package/dist/pageant.style.d.ts +8 -0
  187. package/dist/pageant.style.js +42 -0
  188. package/dist/png.d.ts +8 -1
  189. package/dist/png.js +21 -1
  190. package/dist/pointer-entry.d.ts +2 -0
  191. package/dist/pointer-entry.js +2 -0
  192. package/dist/pointer.d.ts +113 -0
  193. package/dist/pointer.js +151 -0
  194. package/dist/pool.d.ts +176 -0
  195. package/dist/pool.figures.d.ts +306 -0
  196. package/dist/pool.figures.js +148 -0
  197. package/dist/pool.js +304 -0
  198. package/dist/pool.kit.d.ts +48 -0
  199. package/dist/pool.kit.js +141 -0
  200. package/dist/pool.labels.d.ts +20 -0
  201. package/dist/pool.labels.js +258 -0
  202. package/dist/pool.race.d.ts +65 -0
  203. package/dist/pool.race.js +140 -0
  204. package/dist/pool.replay.d.ts +46 -0
  205. package/dist/pool.replay.js +127 -0
  206. package/dist/pool.section.d.ts +13 -0
  207. package/dist/pool.section.js +83 -0
  208. package/dist/pool.style.d.ts +20 -0
  209. package/dist/pool.style.js +169 -0
  210. package/dist/pool.types.d.ts +145 -0
  211. package/dist/pool.types.js +3 -0
  212. package/dist/pool.words.d.ts +13 -0
  213. package/dist/pool.words.js +101 -0
  214. package/dist/ranges.names.js +53 -3
  215. package/dist/replay-entry.d.ts +3 -0
  216. package/dist/replay-entry.js +2 -0
  217. package/dist/restyle.js +1 -1
  218. package/dist/road.draw.js +3 -2
  219. package/dist/road.js +2 -1
  220. package/dist/road.types.d.ts +3 -0
  221. package/dist/rules.d.ts +138 -0
  222. package/dist/rules.js +511 -0
  223. package/dist/rules.types.d.ts +4 -0
  224. package/dist/rules.types.js +64 -0
  225. package/dist/score.d.ts +3 -0
  226. package/dist/score.js +93 -6
  227. package/dist/sheet.d.ts +3 -0
  228. package/dist/sheet.js +7 -3
  229. package/dist/situation.d.ts +135 -0
  230. package/dist/situation.draw.d.ts +34 -0
  231. package/dist/situation.draw.js +202 -0
  232. package/dist/situation.js +337 -0
  233. package/dist/situation.style.d.ts +2 -0
  234. package/dist/situation.style.js +45 -0
  235. package/dist/situation.types.d.ts +77 -0
  236. package/dist/situation.types.js +3 -0
  237. package/dist/situation.widgets.d.ts +39 -0
  238. package/dist/situation.widgets.js +129 -0
  239. package/dist/skating/describe.d.ts +7 -0
  240. package/dist/skating/describe.js +44 -0
  241. package/dist/skating/events.d.ts +24 -0
  242. package/dist/skating/events.js +47 -0
  243. package/dist/skating/figure.d.ts +24 -0
  244. package/dist/skating/figure.js +37 -0
  245. package/dist/skating/long.d.ts +54 -0
  246. package/dist/skating/long.js +111 -0
  247. package/dist/skating/parts.d.ts +43 -0
  248. package/dist/skating/parts.js +40 -0
  249. package/dist/skating/plan.d.ts +55 -0
  250. package/dist/skating/plan.js +197 -0
  251. package/dist/skating/short.d.ts +47 -0
  252. package/dist/skating/short.js +89 -0
  253. package/dist/skating/track.d.ts +66 -0
  254. package/dist/skating/track.js +94 -0
  255. package/dist/skating/types.d.ts +57 -0
  256. package/dist/skating/types.js +3 -0
  257. package/dist/skating-entry.d.ts +17 -0
  258. package/dist/skating-entry.js +11 -0
  259. package/dist/skating.style.d.ts +4 -0
  260. package/dist/skating.style.js +24 -0
  261. package/dist/strings.d.ts +470 -0
  262. package/dist/strings.js +674 -13
  263. package/dist/style.d.ts +2 -0
  264. package/dist/style.js +19 -2
  265. package/dist/surfaces/artistic.d.ts +9 -0
  266. package/dist/surfaces/artistic.js +94 -0
  267. package/dist/surfaces/athletics.d.ts +16 -0
  268. package/dist/surfaces/athletics.js +132 -0
  269. package/dist/surfaces/baseball.js +17 -0
  270. package/dist/surfaces/basketball.floor.d.ts +27 -0
  271. package/dist/surfaces/basketball.floor.js +83 -0
  272. package/dist/surfaces/basketball.gear.d.ts +27 -0
  273. package/dist/surfaces/basketball.gear.js +90 -0
  274. package/dist/surfaces/basketball.js +44 -22
  275. package/dist/surfaces/budo.d.ts +6 -0
  276. package/dist/surfaces/budo.js +104 -0
  277. package/dist/surfaces/curling.d.ts +16 -0
  278. package/dist/surfaces/curling.fold.d.ts +67 -0
  279. package/dist/surfaces/curling.fold.js +107 -0
  280. package/dist/surfaces/curling.js +37 -3
  281. package/dist/surfaces/dive.d.ts +9 -0
  282. package/dist/surfaces/dive.js +128 -0
  283. package/dist/surfaces/field.d.ts +7 -2
  284. package/dist/surfaces/field.js +15 -9
  285. package/dist/surfaces/football.js +7 -0
  286. package/dist/surfaces/hockey.js +4 -2
  287. package/dist/surfaces/net.d.ts +2 -1
  288. package/dist/surfaces/net.js +160 -15
  289. package/dist/surfaces/polo.d.ts +12 -0
  290. package/dist/surfaces/polo.js +159 -0
  291. package/dist/surfaces/pool.d.ts +27 -0
  292. package/dist/surfaces/pool.js +198 -0
  293. package/dist/surfaces/skating.d.ts +6 -0
  294. package/dist/surfaces/skating.js +62 -0
  295. package/dist/surfaces/soccer.js +2 -1
  296. package/dist/surfaces/surface.d.ts +76 -0
  297. package/dist/surfaces/venue.d.ts +15 -0
  298. package/dist/surfaces/venue.js +95 -0
  299. package/dist/target-entry.d.ts +2 -0
  300. package/dist/target-entry.js +2 -0
  301. package/dist/target.d.ts +200 -0
  302. package/dist/target.js +525 -0
  303. package/dist/team.common.d.ts +1 -1
  304. package/dist/team.common.js +3 -3
  305. package/dist/team.formation.d.ts +3 -1
  306. package/dist/team.formation.js +3 -3
  307. package/dist/team.layers.d.ts +2 -2
  308. package/dist/team.layers.js +4 -1
  309. package/dist/team.lineup.d.ts +27 -0
  310. package/dist/team.lineup.js +207 -0
  311. package/dist/team.network.js +6 -5
  312. package/dist/team.shape.js +5 -5
  313. package/dist/team.types.d.ts +40 -1
  314. package/dist/tenants.d.ts +77 -0
  315. package/dist/tenants.data.d.ts +8 -0
  316. package/dist/tenants.data.js +1793 -0
  317. package/dist/tenants.js +46 -0
  318. package/dist/turn-entry.d.ts +12 -0
  319. package/dist/turn-entry.js +7 -0
  320. package/dist/turn.camera.d.ts +116 -0
  321. package/dist/turn.camera.js +184 -0
  322. package/dist/turn.dom.d.ts +40 -0
  323. package/dist/turn.dom.js +353 -0
  324. package/dist/turn.kit.d.ts +86 -0
  325. package/dist/turn.kit.js +110 -0
  326. package/dist/turn.markup.d.ts +48 -0
  327. package/dist/turn.markup.js +108 -0
  328. package/dist/turn.model.d.ts +78 -0
  329. package/dist/turn.model.js +91 -0
  330. package/dist/turn.style.d.ts +5 -0
  331. package/dist/turn.style.js +56 -0
  332. package/dist/types.d.ts +221 -20
  333. package/dist/units.d.ts +1 -1
  334. package/dist/units.js +22 -1
  335. package/dist/uprights.board.d.ts +17 -0
  336. package/dist/uprights.board.js +59 -0
  337. package/dist/uprights.budo.d.ts +17 -0
  338. package/dist/uprights.budo.js +87 -0
  339. package/dist/uprights.d.ts +37 -0
  340. package/dist/uprights.fields.d.ts +32 -0
  341. package/dist/uprights.fields.js +172 -0
  342. package/dist/uprights.goal.d.ts +49 -0
  343. package/dist/uprights.goal.js +69 -0
  344. package/dist/uprights.js +169 -0
  345. package/dist/uprights.more.d.ts +7 -0
  346. package/dist/uprights.more.js +183 -0
  347. package/dist/uprights.net.d.ts +12 -0
  348. package/dist/uprights.net.js +109 -0
  349. package/dist/uprights.netkit.d.ts +28 -0
  350. package/dist/uprights.netkit.js +67 -0
  351. package/dist/uprights.pools.d.ts +8 -0
  352. package/dist/uprights.pools.js +190 -0
  353. package/dist/uprights.rinks.d.ts +27 -0
  354. package/dist/uprights.rinks.js +106 -0
  355. package/dist/uprights.track.d.ts +50 -0
  356. package/dist/uprights.track.js +246 -0
  357. package/dist/version.d.ts +1 -1
  358. package/dist/version.js +1 -1
  359. package/dist/zones-entry.d.ts +2 -0
  360. package/dist/zones-entry.js +2 -0
  361. package/package.json +56 -3
@@ -0,0 +1,251 @@
1
+ const named = (en, ja) => ({ en, ja });
2
+ const at = (id, x, y, size) => (size === undefined ? { id, x, y } : { id, x, y, size });
3
+ /** The names of the positions of the sports in this file, and of the places this file adds to the first five, by id. */
4
+ export const MORE_NAMES = Object.freeze({
5
+ nhl: {
6
+ LW2: named("Left wing on the second line", "第2ラインのレフトウイング"),
7
+ C2: named("Centre on the second line", "第2ラインのセンター"),
8
+ RW2: named("Right wing on the second line", "第2ラインのライトウイング"),
9
+ LD2: named("Left defenceman on the second pair", "第2ペアの左ディフェンス"),
10
+ RD2: named("Right defenceman on the second pair", "第2ペアの右ディフェンス"),
11
+ },
12
+ mlb: {
13
+ DH: named("Designated hitter", "指名打者"),
14
+ },
15
+ rugby: {
16
+ "1": named("Loosehead prop", "ルースヘッドプロップ"),
17
+ "2": named("Hooker", "フッカー"),
18
+ "3": named("Tighthead prop", "タイトヘッドプロップ"),
19
+ "4": named("Lock", "ロック(4番)"),
20
+ "5": named("Lock", "ロック(5番)"),
21
+ "6": named("Blindside flanker", "ブラインドサイドフランカー"),
22
+ "7": named("Openside flanker", "オープンサイドフランカー"),
23
+ "8": named("Number eight", "ナンバーエイト"),
24
+ "9": named("Scrum-half", "スクラムハーフ"),
25
+ "10": named("Fly-half", "スタンドオフ"),
26
+ "11": named("Left wing", "左ウイング"),
27
+ "12": named("Inside centre", "インサイドセンター"),
28
+ "13": named("Outside centre", "アウトサイドセンター"),
29
+ "14": named("Right wing", "右ウイング"),
30
+ "15": named("Full-back", "フルバック"),
31
+ },
32
+ afl: {
33
+ FB: named("Full-back", "フルバック"),
34
+ BPL: named("Left back pocket", "左バックポケット"),
35
+ BPR: named("Right back pocket", "右バックポケット"),
36
+ CHB: named("Centre half-back", "センターハーフバック"),
37
+ HBFL: named("Left half-back flank", "左ハーフバックフランク"),
38
+ HBFR: named("Right half-back flank", "右ハーフバックフランク"),
39
+ C: named("Centre", "センター"),
40
+ WL: named("Left wing", "左ウイング"),
41
+ WR: named("Right wing", "右ウイング"),
42
+ CHF: named("Centre half-forward", "センターハーフフォワード"),
43
+ HFFL: named("Left half-forward flank", "左ハーフフォワードフランク"),
44
+ HFFR: named("Right half-forward flank", "右ハーフフォワードフランク"),
45
+ FF: named("Full-forward", "フルフォワード"),
46
+ FPL: named("Left forward pocket", "左フォワードポケット"),
47
+ FPR: named("Right forward pocket", "右フォワードポケット"),
48
+ RUC: named("Ruck", "ラック"),
49
+ RR: named("Ruck-rover", "ラックローバー"),
50
+ ROV: named("Rover", "ローバー"),
51
+ },
52
+ cricket: {
53
+ BWL: named("Bowler", "ボウラー"),
54
+ WK: named("Wicketkeeper", "ウィケットキーパー"),
55
+ SL1: named("First slip", "ファーストスリップ"),
56
+ SL2: named("Second slip", "セカンドスリップ"),
57
+ SL3: named("Third slip", "サードスリップ"),
58
+ GU: named("Gully", "ガリー"),
59
+ PT: named("Point", "ポイント"),
60
+ CV: named("Cover", "カバー"),
61
+ MO: named("Mid-off", "ミッドオフ"),
62
+ MN: named("Mid-on", "ミッドオン"),
63
+ MW: named("Mid-wicket", "ミッドウィケット"),
64
+ SQ: named("Square leg", "スクエアレッグ"),
65
+ FL: named("Fine leg", "ファインレッグ"),
66
+ TM: named("Third man", "サードマン"),
67
+ LO: named("Long-off", "ロングオフ"),
68
+ LN: named("Long-on", "ロングオン"),
69
+ DC: named("Deep cover", "ディープカバー"),
70
+ DM: named("Deep mid-wicket", "ディープミッドウィケット"),
71
+ },
72
+ volleyball: {
73
+ P1: named("Position 1, right back", "ポジション1(右後衛)"),
74
+ P2: named("Position 2, right front", "ポジション2(右前衛)"),
75
+ P3: named("Position 3, centre front", "ポジション3(中央前衛)"),
76
+ P4: named("Position 4, left front", "ポジション4(左前衛)"),
77
+ P5: named("Position 5, left back", "ポジション5(左後衛)"),
78
+ P6: named("Position 6, centre back", "ポジション6(中央後衛)"),
79
+ },
80
+ handball: {
81
+ GK: named("Goalkeeper", "ゴールキーパー"),
82
+ LW: named("Left wing", "レフトウイング"),
83
+ LB: named("Left back", "レフトバック"),
84
+ CB: named("Centre back", "センターバック"),
85
+ RB: named("Right back", "ライトバック"),
86
+ RW: named("Right wing", "ライトウイング"),
87
+ PV: named("Pivot", "ポスト"),
88
+ },
89
+ waterpolo: {
90
+ GK: named("Goalkeeper", "ゴールキーパー"),
91
+ LW: named("Left wing", "左ウイング"),
92
+ RW: named("Right wing", "右ウイング"),
93
+ LD: named("Left flat", "左ドライバー"),
94
+ RD: named("Right flat", "右ドライバー"),
95
+ CF: named("Centre forward", "センターフォワード"),
96
+ CB: named("Centre back", "センターバック"),
97
+ },
98
+ fieldhockey: {
99
+ GK: named("Goalkeeper", "ゴールキーパー"),
100
+ RB: named("Right back", "右フルバック"),
101
+ LB: named("Left back", "左フルバック"),
102
+ RCB: named("Right centre-back", "右センターバック"),
103
+ LCB: named("Left centre-back", "左センターバック"),
104
+ CB: named("Centre-back", "センターバック"),
105
+ RM: named("Right midfielder", "右ミッドフィールダー"),
106
+ LM: named("Left midfielder", "左ミッドフィールダー"),
107
+ CM: named("Central midfielder", "センターミッドフィールダー"),
108
+ RCM: named("Right central midfielder", "右センターミッドフィールダー"),
109
+ LCM: named("Left central midfielder", "左センターミッドフィールダー"),
110
+ RW: named("Right winger", "右フォワード"),
111
+ LW: named("Left winger", "左フォワード"),
112
+ CF: named("Centre forward", "センターフォワード"),
113
+ },
114
+ netball: {
115
+ GS: named("Goal shooter", "ゴールシューター"),
116
+ GA: named("Goal attack", "ゴールアタック"),
117
+ WA: named("Wing attack", "ウイングアタック"),
118
+ C: named("Centre", "センター"),
119
+ WD: named("Wing defence", "ウイングディフェンス"),
120
+ GD: named("Goal defence", "ゴールディフェンス"),
121
+ GK: named("Goal keeper", "ゴールキーパー"),
122
+ },
123
+ });
124
+ /** The extra places of the baseball and softball formations: the designated hitter, listed beside home plate where the batter on deck waits (feet, the frame `retrosheet`). */
125
+ const DH = [at("DH", -34, -10)];
126
+ // Rugby union, in the `rugby` frame: metres from the middle of the pitch, x towards the end the team attacks, y up the page, so the team's right is the low y. The pack is bound as for a scrum,
127
+ // the scrum-half beside it, the backs in a line out to the wings and the full-back deep.
128
+ const rugby15 = {
129
+ id: "rugby-15",
130
+ sport: "rugby",
131
+ frame: "rugby",
132
+ name: { en: "Rugby union, the fifteen", ja: "ラグビー(15人制)" },
133
+ about: { en: "The fifteen in their numbers, 1 to 15: the pack of eight bound as for a scrum, the scrum-half beside it, the fly-half and the centres in a line behind, the wings wide and the full-back deep.", ja: "背番号1〜15の15人。スクラムを組む形のフォワード8人、その脇にスクラムハーフ、後方に斜めに並ぶスタンドオフとセンター、両端のウイング、最後方のフルバック。" },
134
+ positions: [at("1", -6, 9), at("2", -6, 0), at("3", -6, -9), at("4", -14, 4.5), at("5", -14, -4.5), at("6", -14, 14), at("7", -14, -14), at("8", -22, 0), at("9", -23, -17), at("10", -27, 8), at("12", -30, 16), at("13", -34, 24), at("11", -40, 32), at("14", -40, -32), at("15", -46, -3)],
135
+ };
136
+ // Australian football, in the `afl` frame: metres from the middle of the ground. Three men on each of five lines and three followers, 18 in all (the interchange is not on the ground).
137
+ const afl18 = {
138
+ id: "afl-18",
139
+ sport: "afl",
140
+ frame: "afl",
141
+ name: { en: "Australian football, the eighteen", ja: "オーストラリアンフットボール(18人)" },
142
+ about: { en: "The eighteen on the ground: three on each of the back, half-back, centre, half-forward and forward lines, and three followers at the centre.", ja: "グラウンド上の18人。バック、ハーフバック、センター、ハーフフォワード、フォワードの各ラインに3人ずつと、中央に立つフォロワー3人。" },
143
+ positions: [at("BPL", -52, 17), at("FB", -56, 0), at("BPR", -52, -17), at("HBFL", -32, 26), at("CHB", -34, 0), at("HBFR", -32, -26), at("WL", -12, 32), at("C", -14, 0), at("WR", -12, -32), at("HFFL", 26, 26), at("CHF", 28, 0), at("HFFR", 26, -26), at("FPL", 50, 17), at("FF", 54, 0), at("FPR", 50, -17), at("RUC", 6, 0), at("RR", -3, 14), at("ROV", -3, -14)],
144
+ };
145
+ // Cricket, in the `cricket` frame: yards from the middle of the pitch, the striker's end at the right and a right-handed batter facing the bowler at the left, so the off side is up the page. The ground is 150 yards
146
+ // across and the circle 30 yards from the stumps. Eleven fielders, the bowler and the wicketkeeper among them.
147
+ const cricketTest = {
148
+ id: "cricket-test-attacking",
149
+ sport: "cricket",
150
+ frame: "cricket",
151
+ name: { en: "Cricket, attacking field for a fast bowler", ja: "クリケット(ファストボウラー向けの攻撃的な守備)" },
152
+ about: { en: "For a right-handed batter: three slips and a gully on the off side to catch an edge, point, cover, mid-off, mid-on and square leg all close, and the wicketkeeper standing back. Nobody is on the boundary.", ja: "右打者向けの守備。バットの縁に当たった球を捕るため、オフ側にスリップ3人とガリーを置き、ポイント、カバー、ミッドオフ、ミッドオン、スクエアレッグも近くに立ちます。ウィケットキーパーは後ろに下がり、バウンダリー付近には誰もいません。" },
153
+ positions: [at("BWL", -13, 0), at("WK", 19, -1.5), at("SL1", 18, 4), at("SL2", 16.5, 10), at("SL3", 15, 16), at("GU", 11.5, 22), at("PT", 11, 28), at("CV", -1, 28), at("MO", -15, 21), at("MN", -15, -21), at("SQ", 12, -22)],
154
+ };
155
+ const cricketPowerplay = {
156
+ id: "cricket-powerplay",
157
+ sport: "cricket",
158
+ frame: "cricket",
159
+ name: { en: "Cricket, one-day powerplay", ja: "クリケット(ワンデーのパワープレー)" },
160
+ about: { en: "The first ten overs of a one-day international, when no more than two fielders may be outside the 30-yard circle: nine close, with third man and fine leg deep.", ja: "ワンデー国際試合の最初の10オーバー。30ヤードサークルの外に置ける野手は2人までなので、9人はサークル内に、サードマンとファインレッグが外に立ちます。" },
161
+ positions: [at("BWL", -13, 0), at("WK", 14, 0), at("SL1", 17, 4), at("PT", 11, 28), at("CV", -1, 28), at("MO", -14, 20), at("MN", -14, -20), at("MW", 1, -25), at("SQ", 11, -22), at("TM", 46, 38), at("FL", 46, -36)],
162
+ };
163
+ const cricketDeath = {
164
+ id: "cricket-boundary-defence",
165
+ sport: "cricket",
166
+ frame: "cricket",
167
+ name: { en: "Cricket, defending the boundary", ja: "クリケット(バウンダリーを守る守備)" },
168
+ about: { en: "The last ten overs of a one-day international, when five fielders may be outside the circle: long-off, long-on, deep cover, deep mid-wicket and fine leg on the boundary, the rest close.", ja: "ワンデー国際試合の最後の10オーバー。サークルの外に5人置けるので、ロングオフ、ロングオン、ディープカバー、ディープミッドウィケット、ファインレッグがバウンダリー付近に、残りは近くに立ちます。" },
169
+ positions: [at("BWL", -13, 0), at("WK", 14, 0), at("PT", 11, 28), at("MO", -14, 20), at("MN", -14, -20), at("SQ", 11, -22), at("LO", -55, 20), at("LN", -55, -20), at("DC", -12, 58), at("DM", -2, -58), at("FL", 46, -36)],
170
+ };
171
+ // Volleyball, in the `volleyball` frame: metres from the middle of the net, x along the court, the team on the left half facing the net with its right hand towards the bottom of the page. The positions
172
+ // are the six places of the rotation order: 1 the server's, then 2, 3 and 4 along the front and 5 and 6 at the back.
173
+ const volleyball = {
174
+ id: "volleyball-rotation",
175
+ sport: "volleyball",
176
+ frame: "volleyball",
177
+ name: { en: "Volleyball, the six places of the rotation", ja: "バレーボール(ローテーションの6つの位置)" },
178
+ about: { en: "The six places, numbered as the rules number them: 1 right back (the server), 2 right front, 3 centre front, 4 left front, 5 left back and 6 centre back. After each side-out the team moves one place clockwise.", ja: "ルールどおりに番号が付いた6つの位置。1は右後衛(サーバー)、2は右前衛、3は中央前衛、4は左前衛、5は左後衛、6は中央後衛。サーブ権を得るたびに、チームは時計回りに1つ移ります。" },
179
+ positions: [at("P4", -2.5, 3), at("P3", -2.5, 0), at("P2", -2.5, -3), at("P5", -6.5, 3), at("P6", -6.5, 0), at("P1", -7, -3)],
180
+ };
181
+ // Handball, in the `handball` frame: metres from the middle of the court, the team attacking the right goal; the goal-area line is 6 m and the free-throw line 9 m from the goal.
182
+ const handballAttack = {
183
+ id: "handball-attack",
184
+ sport: "handball",
185
+ frame: "handball",
186
+ name: { en: "Handball, attack", ja: "ハンドボール(攻撃)" },
187
+ about: { en: "The seven in attack: the three backs outside the 9 m line, a wing in each corner, the pivot on the 6 m line among the defenders, and the goalkeeper at home.", ja: "攻撃時の7人。9mラインの外側に3人のバック、両コーナーにウイング、6mライン付近で相手の守備の間に立つポスト、自陣のゴールキーパー。" },
188
+ positions: [at("GK", -19, 0), at("LW", 16.5, 8.2), at("LB", 11.5, 6), at("CB", 10.5, 0), at("RB", 11.5, -6), at("RW", 16.5, -8.2), at("PV", 15, 0)],
189
+ };
190
+ const handball60 = {
191
+ id: "handball-6-0",
192
+ sport: "handball",
193
+ frame: "handball",
194
+ name: { en: "Handball, 6-0 defence", ja: "ハンドボール(6-0ディフェンス)" },
195
+ about: { en: "The six defenders in a line along the 6 m line of their own goal, the goalkeeper behind them. It is the commonest defence.", ja: "自陣のゴールの6mラインに沿って6人が横一列に並び、その後ろにゴールキーパー。最も一般的な守備です。" },
196
+ positions: [at("GK", -19, 0), at("LW", -15.5, 6.8), at("LB", -14.5, 4), at("CB", -14, 1.3), at("RB", -14, -1.3), at("RW", -14.5, -4), at("PV", -15.5, -6.8)],
197
+ };
198
+ // Water polo, in the `waterpolo` frame: metres from the middle of the pool, the team attacking the right goal, the 2 m line at 10.8 m from the middle and the 5 m line at 7.8 m.
199
+ const waterPolo = {
200
+ id: "waterpolo-attack",
201
+ sport: "waterpolo",
202
+ frame: "waterpolo",
203
+ name: { en: "Water polo, six on five", ja: "水球(6対5の攻撃)" },
204
+ about: { en: "A man-up attack of six: the centre forward on the 2 m line in front of the goal, a wing at each side of it, two drivers and the centre back at the point, with the goalkeeper at home.", ja: "数的優位時の攻撃の形。ゴール前の2mライン上にセンターフォワード、その両脇にウイング、2人のドライバー、後方のセンターバック。自陣にはゴールキーパー。" },
205
+ positions: [at("GK", -12, 0), at("CF", 10.2, 0), at("LW", 10.8, 7), at("RW", 10.8, -7), at("LD", 8.5, 3.6), at("RD", 8.5, -3.6), at("CB", 7, 0)],
206
+ };
207
+ // Field hockey, in the `fieldhockey` frame: metres from the middle of the pitch, the team attacking the right goal.
208
+ const fieldHockey = (id, en, ja, about, positions) => ({ id, sport: "fieldhockey", frame: "fieldhockey", name: { en, ja }, about, positions: [at("GK", -43, 0), ...positions] });
209
+ const fieldHockey433 = fieldHockey("fieldhockey-4-3-3", "Field hockey, 4-3-3", "フィールドホッケー(4-3-3)", { en: "The goalkeeper, four defenders, three midfielders and three forwards.", ja: "ゴールキーパー、ディフェンダー4人、ミッドフィールダー3人、フォワード3人。" }, [at("RB", -30, -19), at("RCB", -33, -7), at("LCB", -33, 7), at("LB", -30, 19), at("RCM", -8, -14), at("CM", -10, 0), at("LCM", -8, 14), at("RW", 22, -20), at("CF", 28, 0), at("LW", 22, 20)]);
210
+ const fieldHockey343 = fieldHockey("fieldhockey-3-4-3", "Field hockey, 3-4-3", "フィールドホッケー(3-4-3)", { en: "The goalkeeper, three defenders, four midfielders and three forwards.", ja: "ゴールキーパー、ディフェンダー3人、ミッドフィールダー4人、フォワード3人。" }, [at("RCB", -32, -13), at("CB", -34, 0), at("LCB", -32, 13), at("RM", -6, -21), at("RCM", -9, -7), at("LCM", -9, 7), at("LM", -6, 21), at("RW", 22, -18), at("CF", 28, 0), at("LW", 22, 18)]);
211
+ // Netball, in the `netball` frame: metres from the middle of the court, the team attacking the right goal. The seven positions are its zones: each player's bibs name the thirds and the circles she may enter.
212
+ const netball = {
213
+ id: "netball-start",
214
+ sport: "netball",
215
+ frame: "netball",
216
+ name: { en: "Netball, the seven positions", ja: "ネットボール(7つのポジション)" },
217
+ about: { en: "The seven positions in the places they start from: the shooter and the attack in the goal third, the wing attack, the centre and the wing defence in the middle third, and the goal defence and the keeper in the defending third. Each may go only to her own zones.", ja: "スタート時の位置に並んだ7つのポジション。ゴールサードにゴールシューターとゴールアタック、センターサードにウイングアタック・センター・ウイングディフェンス、守備側のサードにゴールディフェンスとゴールキーパー。各選手が入れるのは自分のゾーンだけです。" },
218
+ positions: [at("GS", 12.8, 0), at("GA", 9.5, 3.5), at("WA", 4, -4.5), at("C", 0, 0), at("WD", -4, 4.5), at("GD", -9.5, -3.5), at("GK", -12.8, 0)],
219
+ };
220
+ // Hockey's second line, in the `nhl-api` frame (feet): the first line where `hockey-5v5` puts it, and the second unit in a row along the benches at the top of the page, smaller.
221
+ const hockeyLines = {
222
+ id: "hockey-two-lines",
223
+ sport: "nhl",
224
+ frame: "nhl-api",
225
+ name: { en: "Hockey, two lines", ja: "アイスホッケー(2つのライン)" },
226
+ about: { en: "The six on the ice and, in a row along the bench side, the next forward line and defence pair, each marked as the second unit. The codes of the second unit end in 2.", ja: "氷上の6人と、ベンチ側に一列に並ぶ次のフォワードラインとディフェンスペア(第2ユニットとして表示)。第2ユニットの略称は末尾に2が付きます。" },
227
+ positions: [at("G", -87, 0), at("LD", -60, 16), at("RD", -60, -16), at("LW", -30, 28), at("C", -30, 0), at("RW", -30, -28), at("LD2", -66, 33, 0.8), at("RD2", -50, 33, 0.8), at("LW2", -16, 33, 0.8), at("C2", -2, 33, 0.8), at("RW2", 12, 33, 0.8)],
228
+ };
229
+ // Basketball in the `nba-stats` frame (tenths of feet): the traditional set, the guards out front, the forwards on the wings and a big man on each block.
230
+ const basketballTraditional = {
231
+ id: "basketball-traditional",
232
+ sport: "nba",
233
+ frame: "nba-stats",
234
+ name: { en: "Basketball, the five positions", ja: "バスケットボール(5つのポジション)" },
235
+ about: { en: "The five positions where they traditionally stand: the point guard at the top, the shooting guard and the small forward on the wings, the power forward and the centre near the blocks.", ja: "5つのポジションの伝統的な位置。トップにポイントガード、両ウイングにシューティングガードとスモールフォワード、ゴール近くにパワーフォワードとセンター。" },
236
+ positions: [at("PG", 0, 262), at("SG", 173, 173), at("SF", -173, 173), at("PF", 85, 70), at("C", -85, 70)],
237
+ };
238
+ // Softball, in the `retrosheet` frame (feet from home plate, y out towards the pitcher): a 60-foot diamond, the pitcher 43 feet away and a fence at 200.
239
+ const softball = {
240
+ id: "softball-standard",
241
+ sport: "mlb",
242
+ frame: "retrosheet",
243
+ name: { en: "Softball, standard defence", ja: "ソフトボール(通常の守備位置)" },
244
+ about: { en: "The nine fielders of a 60-foot diamond where they usually stand, with the designated hitter listed beside home plate.", ja: "塁間60フィート(約18.3m)のダイヤモンドでの9人の野手の定位置。指名打者はホームベースの脇に表示しています。" },
245
+ positions: [at("P", 0, 43), at("C", 0, -3), at("1B", 46, 52), at("2B", 24, 92), at("SS", -24, 92), at("3B", -46, 52), at("LF", -85, 165), at("CF", 0, 185), at("RF", 85, 165)],
246
+ extra: DH,
247
+ };
248
+ /** The formations of this file, in the order of the table that holds them. */
249
+ export const MORE_FORMATIONS = [hockeyLines, basketballTraditional, softball, rugby15, afl18, cricketTest, cricketPowerplay, cricketDeath, volleyball, handballAttack, handball60, waterPolo, fieldHockey433, fieldHockey343, netball];
250
+ /** The designated hitter's place, which `baseball-standard` and `baseball-shift` list and do not field. */
251
+ export const DESIGNATED_HITTER = DH;
@@ -2,6 +2,7 @@
2
2
  // frames.ts. Each is cited in docs/sources.md ("Coordinate frames"), which says what was read, where, and what is ours.
3
3
  // Soccer's providers are registered by src/surfaces/soccer-providers.ts. Facts only: no code of sportypy, sportyR or
4
4
  // hockey_rink is used.
5
+ import { isPoolSport } from "./pool.js";
5
6
  import { CURLING, FOOTBALL, NBA, NHL, footballLength, surfaceSize } from "./geometry.js";
6
7
  import { FRAMES, registerFrame, span } from "./frames.js";
7
8
  // The surfaces in feet, in the drawing's own landscape frame: x along the surface from the left end, y across it from the top.
@@ -141,7 +142,7 @@ const curling = {
141
142
  * size of the court it is placed on. This package's own frame: no
142
143
  * tracking provider's format was read (Hawk-Eye's and the others' are not published), and a rulebook measures a court from the net.
143
144
  */
144
- function netFrame(sport, title, unit, x, y, what) {
145
+ function netFrame(sport, title, unit, x, y, what, origin = `the centre of the net, on ${what}`) {
145
146
  const per = unit === "ft" ? 1 : 0.3048;
146
147
  const map = (size) => ({ x: span(-(size.length * per) / 2, (size.length * per) / 2, 0, size.length), y: span(-(size.width * per) / 2, (size.width * per) / 2, size.width, 0) });
147
148
  return {
@@ -151,13 +152,13 @@ function netFrame(sport, title, unit, x, y, what) {
151
152
  unit,
152
153
  x: [-x, x],
153
154
  y: [-y, y],
154
- origin: `the centre of the net, on ${what}`,
155
+ origin,
155
156
  yDirection: "up",
156
- size: sport === "volleyball" ? "variable" : "fixed",
157
+ size: sport === "volleyball" || sport === "squash" ? "variable" : "fixed",
157
158
  ends: "fixed",
158
- landmarks: sport === "volleyball" ? map : map(surfaceSize(sport, "ft")),
159
- source: "this package's own frame: the centre of the net as the origin, as the rulebook measures the court from the net",
160
- note: "Positive x is towards the end drawn at the right, positive y towards the top as the court is drawn wide. The frame is not a data provider's: it is the plain reading of the rules, which measure everything from the net.",
159
+ landmarks: sport === "volleyball" || sport === "squash" ? map : map(surfaceSize(sport, "ft")),
160
+ source: sport === "squash" || sport === "racquetball" || sport === "roundnet" || sport === "netball" ? "this package's own frame: the centre of the court as the origin" : "this package's own frame: the centre of the net as the origin, as the rulebook measures the court from the net",
161
+ note: "Positive x is towards the end drawn at the right, positive y towards the top as the court is drawn wide. The frame is not a data provider's: it is the plain reading of the rules, which measure everything from the net (or, on a court without one, from its lines).",
161
162
  };
162
163
  }
163
164
  const tennisFrame = netFrame("tennis", "Tennis court, in feet from the centre of the net", "ft", 39, 18, "the court");
@@ -165,6 +166,13 @@ const volleyballFrame = netFrame("volleyball", "Volleyball court, in metres from
165
166
  const badmintonFrame = netFrame("badminton", "Badminton court, in metres from the centre of the net", "m", 6.7, 3.05, "the court");
166
167
  const pickleballFrame = netFrame("pickleball", "Pickleball court, in feet from the centre of the net", "ft", 22, 10, "the court");
167
168
  const tableTennisFrame = netFrame("tabletennis", "Table tennis table, in metres from the centre of the net", "m", 1.37, 0.7625, "the table");
169
+ const padelFrame = netFrame("padel", "Padel court, in metres from the centre of the net", "m", 10, 5, "the court");
170
+ const squashFrame = netFrame("squash", "Squash court, in metres from the centre of the court", "m", 4.875, 4.21, "the court", "the centre of the court; the front wall is at the left");
171
+ const racquetballFrame = netFrame("racquetball", "Racquetball court, in feet from the centre of the court", "ft", 20, 10, "the court", "the centre of the court; the front wall is at the left");
172
+ const sepakTakrawFrame = netFrame("sepaktakraw", "Sepak takraw court, in metres from the centre of the net", "m", 6.7, 3.05, "the court");
173
+ const teqballFrame = netFrame("teqball", "Teqball court, in metres from the centre of the table and its net", "m", 8, 6, "the court");
174
+ const roundnetFrame = netFrame("roundnet", "Roundnet court, in metres from the centre of the set", "m", 5, 5, "the court", "the centre of the set, the middle of the court");
175
+ const netballFrame = netFrame("netball", "Netball court, in metres from the centre of the court", "m", 15.25, 7.625, "the court", "the centre of the court, on the centre circle");
168
176
  /**
169
177
  * A field sport's surface in the plain frame of its middle: the centre of the surface as the origin, x along it, positive towards the end drawn at the right, y across it, positive towards the top as it is drawn wide.
170
178
  * The unit is the one the sport's rulebook prints first (metres; yards for cricket, whose frame is measured from the middle of the pitch, which is the middle of the ground). The size of these surfaces is a range, so the frame
@@ -180,7 +188,7 @@ function centreFrame(sport, title, unit, x, y) {
180
188
  unit,
181
189
  x: [-x, x],
182
190
  y: [-y, y],
183
- origin: sport === "cricket" ? "the middle of the pitch, the centre of the ground" : "the centre of the surface",
191
+ origin: sport === "cricket" ? "the middle of the pitch, the centre of the ground" : isPoolSport(sport) ? "the centre of the water" : "the centre of the surface",
184
192
  yDirection: "up",
185
193
  size: "variable",
186
194
  ends: sport === "cricket" ? "none" : "fixed",
@@ -196,7 +204,62 @@ const gaelicFrame = centreFrame("gaelic", "Gaelic games field, in metres from th
196
204
  const cricketFrame = centreFrame("cricket", "Cricket ground, in yards from the middle of the pitch", "yd", 75, 75);
197
205
  const fieldHockeyFrame = centreFrame("fieldhockey", "Field hockey pitch, in metres from the centre", "m", 45.7, 27.5);
198
206
  const handballFrame = centreFrame("handball", "Handball court, in metres from the centre", "m", 20, 10);
199
- for (const frame of [nhlApi, hockeyTech, nbaStats, nflTracking, mlbam, retrosheet, curling, tennisFrame, volleyballFrame, badmintonFrame, pickleballFrame, tableTennisFrame, lacrosseFrame, rugbyFrame, aflFrame, gaelicFrame, cricketFrame, fieldHockeyFrame, handballFrame])
207
+ // The pools: the middle of the water, x along it from the starting wall (left) towards the turning wall, y positive towards the top as the pool is drawn wide, so that lane 1 (or 0) is at the bottom. The frame of a
208
+ // race replay (`raceTimeline`) puts a swimmer's distance along the pool and the lane's place across it in this frame.
209
+ const swimmingFrame = centreFrame("swimming", "Swimming pool, in metres from the centre of the water", "m", 25, 13);
210
+ const waterPoloFrame = centreFrame("waterpolo", "Water polo pool, in metres from the centre of the water", "m", 12.8, 10);
211
+ const divingFrame = centreFrame("diving", "Diving well, in metres from the centre of the water", "m", 10.5, 13.5);
212
+ const artisticFrame = centreFrame("artisticswimming", "Artistic swimming area, in metres from the centre of the water", "m", 15, 10);
213
+ // The budō: the centre of the surface (the mats of a competition area, the shiai-jo's floor, the dohyō's clay, the whole range of a kyūdōjō, a dojo's floor), x along it, y positive towards the top. The size of a
214
+ // competition area, a dojo and a range varies with the options, so each frame fits the size of the surface it is placed on.
215
+ const judoFrame = centreFrame("judo", "Judo competition area, in metres from the centre of the tatami", "m", 9, 9);
216
+ const karateFrame = centreFrame("karate", "Karate competition area, in metres from the centre of the mats", "m", 6, 6);
217
+ const kendoFrame = centreFrame("kendo", "Kendo shiai-jo, in metres from the centre", "m", 5, 5);
218
+ const sumoFrame = centreFrame("sumo", "Sumo dohyō, in metres from the centre of the ring", "m", 3.35, 3.35);
219
+ const kyudoFrame = centreFrame("kyudo", "Kyūdōjō, in metres from the middle of the range", "m", 18.9, 8.1);
220
+ const dojoFrame = centreFrame("dojo", "Dojo, in metres from the centre of the floor", "m", 3.64, 2.28);
221
+ /**
222
+ * The athletics stadium in the plain frame of its middle: the middle of the track as the origin, x along the straights (positive towards the right as the stadium is drawn wide), y across them, positive
223
+ * towards the bottom: the finish straight is at positive y, with the finish line at 42.195 m (half a straight) and the athletes running to the right along it. In metres. The frame is the plan's own
224
+ * (`athleticsPlan`), so a point of a lane (`pose`) is a point of the frame. It is fitted to the stadium's box, which is the oval's outer edge, so it is for a drawing of the stadium (the covered track
225
+ * too) and not for one field event alone at a large scale. This package's own frame: no tracking provider's format was read for athletics.
226
+ */
227
+ const athleticsFrame = {
228
+ name: "athletics",
229
+ title: "Athletics stadium, in metres from the middle of the track",
230
+ sport: "athletics",
231
+ unit: "m",
232
+ x: [-100, 100],
233
+ y: [-60, 60],
234
+ origin: "the middle of the track",
235
+ yDirection: "down",
236
+ size: "variable",
237
+ ends: "none",
238
+ landmarks: (size) => ({ x: span(-size.length / (1 / 0.3048) / 2, size.length / (1 / 0.3048) / 2, 0, size.length), y: span(-size.width / (1 / 0.3048) / 2, size.width / (1 / 0.3048) / 2, 0, size.width) }),
239
+ source: "this package's own frame: the middle of the track as the origin",
240
+ note: "Positive x is towards the right as the stadium is drawn wide, positive y towards the bottom, where the finish straight is. The athletes run counter-clockwise: to the right along the finish straight. The frame is fitted to the stadium's outer edge.",
241
+ };
242
+ /**
243
+ * The skating rink in the plain frame of its middle: the middle of the rink (the long track's ice, the short track's or the figure skating rink) as the origin, x along it (positive towards the right as
244
+ * the rink is drawn wide), y across it, positive towards the bottom, where a long track's finishing straight, a short track's finishing line and a figure skating rink's judges are. In metres. The frame is
245
+ * the plan's own (`skatingPlan`): a point of a lane (`pose`) is a point of the frame. It is fitted to the rink's box. This package's own frame: no tracking provider's format was read for skating.
246
+ */
247
+ const skatingFrame = {
248
+ name: "skating",
249
+ title: "Skating rink, in metres from the middle of the rink",
250
+ sport: "skating",
251
+ unit: "m",
252
+ x: [-100, 100],
253
+ y: [-60, 60],
254
+ origin: "the middle of the rink",
255
+ yDirection: "down",
256
+ size: "variable",
257
+ ends: "none",
258
+ landmarks: (size) => ({ x: span(-size.length / (1 / 0.3048) / 2, size.length / (1 / 0.3048) / 2, 0, size.length), y: span(-size.width / (1 / 0.3048) / 2, size.width / (1 / 0.3048) / 2, 0, size.width) }),
259
+ source: "this package's own frame: the middle of the rink as the origin",
260
+ note: "Positive x is towards the right as the rink is drawn wide, positive y towards the bottom. The skaters go counter-clockwise: to the right along the finishing straight at the bottom. The frame is fitted to the rink's box.",
261
+ };
262
+ for (const frame of [nhlApi, hockeyTech, nbaStats, nflTracking, mlbam, retrosheet, curling, tennisFrame, volleyballFrame, badmintonFrame, pickleballFrame, tableTennisFrame, padelFrame, squashFrame, racquetballFrame, sepakTakrawFrame, teqballFrame, roundnetFrame, netballFrame, lacrosseFrame, rugbyFrame, aflFrame, gaelicFrame, cricketFrame, fieldHockeyFrame, handballFrame, swimmingFrame, waterPoloFrame, divingFrame, artisticFrame, athleticsFrame, skatingFrame, judoFrame, karateFrame, kendoFrame, sumoFrame, kyudoFrame, dojoFrame])
200
263
  if (!Object.prototype.hasOwnProperty.call(FRAMES, frame.name))
201
264
  registerFrame(frame);
202
265
  // Retrosheet's hit-location diagram (Project Scoresheet's) draws the field in sectors: columns of the outfield from the left field
package/dist/geojson.js CHANGED
@@ -88,6 +88,9 @@ export function sceneToGeoJSON(source, options = {}) {
88
88
  visit(g.coordinates);
89
89
  };
90
90
  scene.items.forEach((item, order) => {
91
+ // A pageant's pictures are a picture laid over the surface, not a part of it: they are left out.
92
+ if (item.data?.pg !== undefined)
93
+ return;
91
94
  if (options.filter !== undefined && !options.filter(item))
92
95
  return;
93
96
  const s = item.style;
@@ -1,4 +1,5 @@
1
- export { BADMINTON, BEACH_VOLLEYBALL, CURLING, PICKLEBALL, STONE_DIAMETER, TABLE_TENNIS, TENNIS, VOLLEYBALL, DEFAULT_FENCE, FEET_PER_METRE, FEET_PER_YARD, FENCE_ANGLES, FOOTBALL, GOALPOST_WIDTH, HASH_LENGTH, MLB, NBA, NHL, fenceAt, fencePoints, dimensionsOf, fenceIn, footballLength, inch, surfaceSize, secondBase, skinJoin, threePointJoin } from "./geometry.ts";
1
+ export { ARTISTIC, DIVING, DIVING_LINES, SWIMMING, SWIMMING_WIDTHS, WATER_POLO } from "./pool.figures.ts";
2
+ export { BADMINTON, BEACH_VOLLEYBALL, CURLING, NETBALL, PADEL, PICKLEBALL, RACQUETBALL, ROUNDNET, SEPAK_TAKRAW, SITTING_VOLLEYBALL, SQUASH, STONE_DIAMETER, TABLE_TENNIS, TENNIS, TEQBALL, VOLLEYBALL, DEFAULT_FENCE, FEET_PER_METRE, FEET_PER_YARD, FENCE_ANGLES, FOOTBALL, GOALPOST_WIDTH, HASH_LENGTH, MLB, NBA, NHL, fenceAt, fencePoints, dimensionsOf, fenceIn, footballLength, inch, surfaceSize, secondBase, skinJoin, threePointJoin } from "./geometry.ts";
2
3
  export type { FencePoint, FootballSpec, SizedSport } from "./geometry.ts";
3
4
  export { boardsY } from "./surfaces/hockey.ts";
4
5
  export { FEET_PER, SURFACE_UNITS, UNITS, convertLength, convertPoint, isUnit, lengthsIn } from "./units.ts";
@@ -1,5 +1,6 @@
1
1
  // The dimensions of every surface, in feet, with the few functions that follow from them.
2
- export { BADMINTON, BEACH_VOLLEYBALL, CURLING, PICKLEBALL, STONE_DIAMETER, TABLE_TENNIS, TENNIS, VOLLEYBALL, DEFAULT_FENCE, FEET_PER_METRE, FEET_PER_YARD, FENCE_ANGLES, FOOTBALL, GOALPOST_WIDTH, HASH_LENGTH, MLB, NBA, NHL, fenceAt, fencePoints, dimensionsOf, fenceIn, footballLength, inch, surfaceSize, secondBase, skinJoin, threePointJoin } from "./geometry.js";
2
+ export { ARTISTIC, DIVING, DIVING_LINES, SWIMMING, SWIMMING_WIDTHS, WATER_POLO } from "./pool.figures.js";
3
+ export { BADMINTON, BEACH_VOLLEYBALL, CURLING, NETBALL, PADEL, PICKLEBALL, RACQUETBALL, ROUNDNET, SEPAK_TAKRAW, SITTING_VOLLEYBALL, SQUASH, STONE_DIAMETER, TABLE_TENNIS, TENNIS, TEQBALL, VOLLEYBALL, DEFAULT_FENCE, FEET_PER_METRE, FEET_PER_YARD, FENCE_ANGLES, FOOTBALL, GOALPOST_WIDTH, HASH_LENGTH, MLB, NBA, NHL, fenceAt, fencePoints, dimensionsOf, fenceIn, footballLength, inch, surfaceSize, secondBase, skinJoin, threePointJoin } from "./geometry.js";
3
4
  export { boardsY } from "./surfaces/hockey.js";
4
5
  export { FEET_PER, SURFACE_UNITS, UNITS, convertLength, convertPoint, isUnit, lengthsIn } from "./units.js";
5
6
  export { METRES_PER_FOOT, METRES_PER_YARD, SOCCER, SOCCER_PITCHES, SOCCER_PITCH_IDS, fullPitch, goalAreaWidth, penaltyAreaWidth, soccerPitchClass, soccerSpec } from "./surfaces/soccer-spec.js";
@@ -5,6 +5,7 @@ import { ICC_MEN_GROUND } from "./leagues/cricket.ts";
5
5
  import { FIH_PITCH } from "./leagues/fieldhockey.ts";
6
6
  import { GAA_FOOTBALL_FIELD } from "./leagues/gaelic.ts";
7
7
  import { IHF_COURT } from "./leagues/handball.ts";
8
+ import { ARTISTIC, DIVING, SWIMMING, WATER_POLO } from "./pool.figures.ts";
8
9
  import { WORLD_MEN_FIELD } from "./leagues/lacrosse.ts";
9
10
  import { WORLD_RUGBY_FIELD } from "./leagues/rugby.ts";
10
11
  import type { Sport } from "./types.ts";
@@ -185,6 +186,14 @@ export declare const BEACH_VOLLEYBALL: import("./leagues.ts").VolleyballFigures;
185
186
  export declare const BADMINTON: import("./leagues.ts").BadmintonFigures;
186
187
  export declare const PICKLEBALL: import("./leagues.ts").PickleballFigures;
187
188
  export declare const TABLE_TENNIS: import("./leagues.ts").TableTennisFigures;
189
+ export declare const SITTING_VOLLEYBALL: import("./leagues.ts").VolleyballFigures;
190
+ export declare const PADEL: import("./leagues.ts").PadelFigures;
191
+ export declare const SQUASH: import("./leagues.ts").SquashFigures;
192
+ export declare const RACQUETBALL: import("./leagues.ts").RacquetballFigures;
193
+ export declare const SEPAK_TAKRAW: import("./leagues.ts").SepakTakrawFigures;
194
+ export declare const TEQBALL: import("./leagues.ts").TeqballFigures;
195
+ export declare const ROUNDNET: import("./leagues.ts").RoundnetFigures;
196
+ export declare const NETBALL: import("./leagues.ts").NetballFigures;
188
197
  /** The baseball field, from rules 2.01 to 2.05 of the Official Baseball Rules. */
189
198
  export declare const MLB: {
190
199
  readonly base: 90;
@@ -283,6 +292,13 @@ export declare function dimensionsOf(sport: "volleyball", unit?: Unit): Scaled<t
283
292
  export declare function dimensionsOf(sport: "badminton", unit?: Unit): Scaled<typeof BADMINTON>;
284
293
  export declare function dimensionsOf(sport: "pickleball", unit?: Unit): Scaled<typeof PICKLEBALL>;
285
294
  export declare function dimensionsOf(sport: "tabletennis", unit?: Unit): Scaled<typeof TABLE_TENNIS>;
295
+ export declare function dimensionsOf(sport: "padel", unit?: Unit): Scaled<typeof PADEL>;
296
+ export declare function dimensionsOf(sport: "squash", unit?: Unit): Scaled<typeof SQUASH>;
297
+ export declare function dimensionsOf(sport: "racquetball", unit?: Unit): Scaled<typeof RACQUETBALL>;
298
+ export declare function dimensionsOf(sport: "sepaktakraw", unit?: Unit): Scaled<typeof SEPAK_TAKRAW>;
299
+ export declare function dimensionsOf(sport: "teqball", unit?: Unit): Scaled<typeof TEQBALL>;
300
+ export declare function dimensionsOf(sport: "roundnet", unit?: Unit): Scaled<typeof ROUNDNET>;
301
+ export declare function dimensionsOf(sport: "netball", unit?: Unit): Scaled<typeof NETBALL>;
286
302
  export declare function dimensionsOf(sport: "lacrosse", unit?: Unit): Scaled<typeof WORLD_MEN_FIELD>;
287
303
  export declare function dimensionsOf(sport: "rugby", unit?: Unit): Scaled<typeof WORLD_RUGBY_FIELD>;
288
304
  export declare function dimensionsOf(sport: "afl", unit?: Unit): Scaled<typeof AFL_GROUND>;
@@ -290,6 +306,10 @@ export declare function dimensionsOf(sport: "gaelic", unit?: Unit): Scaled<typeo
290
306
  export declare function dimensionsOf(sport: "cricket", unit?: Unit): Scaled<typeof ICC_MEN_GROUND>;
291
307
  export declare function dimensionsOf(sport: "fieldhockey", unit?: Unit): Scaled<typeof FIH_PITCH>;
292
308
  export declare function dimensionsOf(sport: "handball", unit?: Unit): Scaled<typeof IHF_COURT>;
309
+ export declare function dimensionsOf(sport: "swimming", unit?: Unit): Scaled<typeof SWIMMING>;
310
+ export declare function dimensionsOf(sport: "waterpolo", unit?: Unit): Scaled<typeof WATER_POLO>;
311
+ export declare function dimensionsOf(sport: "diving", unit?: Unit): Scaled<typeof DIVING>;
312
+ export declare function dimensionsOf(sport: "artisticswimming", unit?: Unit): Scaled<typeof ARTISTIC>;
293
313
  export declare function dimensionsOf(sport: Sport, unit?: Unit): unknown;
294
314
  /** A fence's points with each distance in another unit; the angles stay as they are. Feet are the default for `from`. */
295
315
  export declare function fenceIn(points: readonly FencePoint[], to: Unit, from?: Unit): FencePoint[];
package/dist/geometry.js CHANGED
@@ -3,12 +3,13 @@
3
3
  // hold a key distance to the rulebook.
4
4
  import { SURFACE_UNITS, convertLength, lengthsIn } from "./units.js";
5
5
  import { SOCCER, soccerSpec } from "./surfaces/soccer-spec.js";
6
- import { BWF_BADMINTON, FIVB_BEACH, FIVB_INDOOR, ITF_TENNIS, ITTF_TABLE, USAP_PICKLEBALL, netInFeet } from "./leagues/courts.js";
6
+ import { BWF_BADMINTON, FIP_PADEL, FITEQ_TEQBALL, FIVB_BEACH, FIVB_INDOOR, IRF_RACQUETBALL, IRF_ROUNDNET, ISTAF_SEPAK_TAKRAW, ITF_TENNIS, ITTF_TABLE, USAP_PICKLEBALL, WN_NETBALL, WPV_SITTING, WSF_SQUASH, netInFeet } from "./leagues/courts.js";
7
7
  import { AFL_GROUND } from "./leagues/aussie.js";
8
8
  import { ICC_MEN_GROUND } from "./leagues/cricket.js";
9
9
  import { FIH_PITCH } from "./leagues/fieldhockey.js";
10
10
  import { GAA_FOOTBALL_FIELD } from "./leagues/gaelic.js";
11
11
  import { IHF_COURT } from "./leagues/handball.js";
12
+ import { ARTISTIC, DIVING, SWIMMING, SWIMMING_WIDTHS, WATER_POLO } from "./pool.figures.js";
12
13
  import { WORLD_MEN_FIELD } from "./leagues/lacrosse.js";
13
14
  import { WORLD_RUGBY_FIELD } from "./leagues/rugby.js";
14
15
  export const FEET_PER_YARD = 3;
@@ -126,6 +127,14 @@ export const BEACH_VOLLEYBALL = netInFeet(FIVB_BEACH, "m");
126
127
  export const BADMINTON = netInFeet(BWF_BADMINTON, "m");
127
128
  export const PICKLEBALL = netInFeet(USAP_PICKLEBALL, "ft");
128
129
  export const TABLE_TENNIS = netInFeet(ITTF_TABLE, "m");
130
+ export const SITTING_VOLLEYBALL = netInFeet(WPV_SITTING, "m");
131
+ export const PADEL = netInFeet(FIP_PADEL, "m");
132
+ export const SQUASH = netInFeet(WSF_SQUASH, "m");
133
+ export const RACQUETBALL = netInFeet(IRF_RACQUETBALL, "ft");
134
+ export const SEPAK_TAKRAW = netInFeet(ISTAF_SEPAK_TAKRAW, "m");
135
+ export const TEQBALL = netInFeet(FITEQ_TEQBALL, "m");
136
+ export const ROUNDNET = netInFeet(IRF_ROUNDNET, "m");
137
+ export const NETBALL = netInFeet(WN_NETBALL, "m");
129
138
  /** The baseball field, from rules 2.01 to 2.05 of the Official Baseball Rules. */
130
139
  export const MLB = {
131
140
  base: 90,
@@ -274,6 +283,34 @@ export function surfaceSize(sport, unit = SURFACE_UNITS[sport]) {
274
283
  length = TABLE_TENNIS.length;
275
284
  width = TABLE_TENNIS.width;
276
285
  break;
286
+ case "padel":
287
+ length = PADEL.length;
288
+ width = PADEL.width;
289
+ break;
290
+ case "squash":
291
+ length = SQUASH.length;
292
+ width = SQUASH.width;
293
+ break;
294
+ case "racquetball":
295
+ length = RACQUETBALL.length;
296
+ width = RACQUETBALL.width;
297
+ break;
298
+ case "sepaktakraw":
299
+ length = SEPAK_TAKRAW.length;
300
+ width = SEPAK_TAKRAW.width;
301
+ break;
302
+ case "teqball":
303
+ length = TEQBALL.length;
304
+ width = TEQBALL.width;
305
+ break;
306
+ case "roundnet":
307
+ length = ROUNDNET.length;
308
+ width = ROUNDNET.width;
309
+ break;
310
+ case "netball":
311
+ length = NETBALL.length;
312
+ width = NETBALL.width;
313
+ break;
277
314
  case "lacrosse":
278
315
  length = convertLength(WORLD_MEN_FIELD.length.drawn, "m", "ft");
279
316
  width = convertLength(WORLD_MEN_FIELD.width.drawn, "m", "ft");
@@ -304,6 +341,23 @@ export function surfaceSize(sport, unit = SURFACE_UNITS[sport]) {
304
341
  length = convertLength(IHF_COURT.length.drawn, "m", "ft");
305
342
  width = convertLength(IHF_COURT.width.drawn, "m", "ft");
306
343
  break;
344
+ // The pools, as drawn without options: the 50 by 25 m pool of eight lanes, the water polo pool (the field and the 0.30 m behind each goal line), a diving well and the Olympic artistic swimming area.
345
+ case "swimming":
346
+ length = convertLength(SWIMMING.longCourse, "m", "ft");
347
+ width = convertLength(SWIMMING_WIDTHS.permanent, "m", "ft");
348
+ break;
349
+ case "waterpolo":
350
+ length = convertLength(WATER_POLO.length + 2 * WATER_POLO.goal.netClear, "m", "ft");
351
+ width = convertLength(WATER_POLO.width, "m", "ft");
352
+ break;
353
+ case "diving":
354
+ length = convertLength(DIVING.well.length, "m", "ft");
355
+ width = convertLength(DIVING.well.width, "m", "ft");
356
+ break;
357
+ case "artisticswimming":
358
+ length = convertLength(ARTISTIC.olympic.length, "m", "ft");
359
+ width = convertLength(ARTISTIC.olympic.width, "m", "ft");
360
+ break;
307
361
  default:
308
362
  throw new Error(`No fixed size for "${String(sport)}": a ballpark's size is its fence`);
309
363
  }
@@ -336,6 +390,20 @@ export function dimensionsOf(sport, unit = SURFACE_UNITS[sport]) {
336
390
  return lengthsIn(PICKLEBALL, unit);
337
391
  case "tabletennis":
338
392
  return lengthsIn(TABLE_TENNIS, unit);
393
+ case "padel":
394
+ return lengthsIn(PADEL, unit);
395
+ case "squash":
396
+ return lengthsIn(SQUASH, unit);
397
+ case "racquetball":
398
+ return lengthsIn(RACQUETBALL, unit);
399
+ case "sepaktakraw":
400
+ return lengthsIn(SEPAK_TAKRAW, unit);
401
+ case "teqball":
402
+ return lengthsIn(TEQBALL, unit);
403
+ case "roundnet":
404
+ return lengthsIn(ROUNDNET, unit);
405
+ case "netball":
406
+ return lengthsIn(NETBALL, unit);
339
407
  // The field sports: the figures of the league a drawing has without a `league` (`LEAGUES` has the others), kept in the unit their rulebook prints them in.
340
408
  case "lacrosse":
341
409
  return lengthsIn(WORLD_MEN_FIELD, unit, "m");
@@ -351,6 +419,15 @@ export function dimensionsOf(sport, unit = SURFACE_UNITS[sport]) {
351
419
  return lengthsIn(FIH_PITCH, unit, "m");
352
420
  case "handball":
353
421
  return lengthsIn(IHF_COURT, unit, "m");
422
+ // The pools' figures, kept in metres as World Aquatics prints them.
423
+ case "swimming":
424
+ return lengthsIn(SWIMMING, unit, "m");
425
+ case "waterpolo":
426
+ return lengthsIn(WATER_POLO, unit, "m");
427
+ case "diving":
428
+ return lengthsIn(DIVING, unit, "m");
429
+ case "artisticswimming":
430
+ return lengthsIn(ARTISTIC, unit, "m");
354
431
  default:
355
432
  throw new Error(`Unknown sport "${String(sport)}"`);
356
433
  }
package/dist/grounds.d.ts CHANGED
@@ -54,6 +54,10 @@ export interface GroundData {
54
54
  /** The year it opened, and for a past ground the year it closed. */
55
55
  from?: number;
56
56
  to?: number;
57
+ /** True where Wikidata lists athletics among the ground's sports (property P641): a running track lies round the pitch, which `drawKyogijo({ sport: "athletics", ground })` draws. Absent for a ground Wikidata says nothing of, which may still have one. */
58
+ track?: boolean;
59
+ /** Where `track` was read. */
60
+ trackSource?: string;
57
61
  /** The first capacity the article's infobox gives, when it gives a number. */
58
62
  capacity?: number;
59
63
  /** `published` when the article gives the pitch's length and width, `default` when it does not: the ground is then drawn at the international 105 by 68 m. */