@johnmorrisdotca/kyogijo-stadiums 0.5.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.
- package/CHANGELOG.md +58 -0
- package/NOTICE.md +179 -3
- package/README.md +43 -11
- package/dist/arenas-entry.d.ts +4 -0
- package/dist/arenas-entry.js +3 -0
- package/dist/arenas.d.ts +125 -0
- package/dist/arenas.data.d.ts +2 -0
- package/dist/arenas.data.js +3763 -0
- package/dist/arenas.js +72 -0
- package/dist/atlas-entry.d.ts +3 -1
- package/dist/atlas-entry.js +3 -2
- package/dist/atlas.d.ts +37 -19
- package/dist/atlas.js +92 -7
- package/dist/background.js +2 -1
- package/dist/budo/describe.d.ts +13 -0
- package/dist/budo/describe.js +120 -0
- package/dist/budo/dojo.api.d.ts +64 -0
- package/dist/budo/dojo.api.js +46 -0
- package/dist/budo/dojo.d.ts +72 -0
- package/dist/budo/dojo.js +300 -0
- package/dist/budo/judo.d.ts +61 -0
- package/dist/budo/judo.js +109 -0
- package/dist/budo/karate.d.ts +29 -0
- package/dist/budo/karate.js +80 -0
- package/dist/budo/kendo.d.ts +18 -0
- package/dist/budo/kendo.js +44 -0
- package/dist/budo/kimarite.d.ts +19 -0
- package/dist/budo/kimarite.js +33 -0
- package/dist/budo/kit.d.ts +16 -0
- package/dist/budo/kit.js +24 -0
- package/dist/budo/kyudo.d.ts +28 -0
- package/dist/budo/kyudo.js +66 -0
- package/dist/budo/looks.d.ts +28 -0
- package/dist/budo/looks.js +58 -0
- package/dist/budo/parts.d.ts +32 -0
- package/dist/budo/parts.js +10 -0
- package/dist/budo/plan.d.ts +64 -0
- package/dist/budo/plan.js +139 -0
- package/dist/budo/room.d.ts +133 -0
- package/dist/budo/room.js +111 -0
- package/dist/budo/sumo.d.ts +31 -0
- package/dist/budo/sumo.js +71 -0
- package/dist/budo/tatami.d.ts +55 -0
- package/dist/budo/tatami.js +156 -0
- package/dist/budo/types.d.ts +192 -0
- package/dist/budo/types.js +2 -0
- package/dist/budo-entry.d.ts +22 -0
- package/dist/budo-entry.js +13 -0
- package/dist/budo.board.d.ts +28 -0
- package/dist/budo.board.js +81 -0
- package/dist/budo.score.d.ts +18 -0
- package/dist/budo.score.js +52 -0
- package/dist/budo.style.d.ts +6 -0
- package/dist/budo.style.js +67 -0
- package/dist/charts.baseball.js +1 -1
- package/dist/charts.js +4 -4
- package/dist/charts.soccer.js +3 -3
- package/dist/charts.types.d.ts +10 -0
- package/dist/colour.d.ts +4 -4
- package/dist/colour.js +4 -4
- package/dist/crowd.d.ts +11 -1
- package/dist/crowd.draw.js +15 -9
- package/dist/crowd.js +17 -2
- package/dist/draw.js +156 -31
- package/dist/element-entry.d.ts +2 -0
- package/dist/element-entry.js +1 -0
- package/dist/element.d.ts +2 -2
- package/dist/element.js +2 -1
- package/dist/emblems-source.d.ts +50 -0
- package/dist/emblems-source.js +56 -0
- package/dist/eras.d.ts +3 -1
- package/dist/eras.js +8 -3
- package/dist/features.js +73 -0
- package/dist/field.data.d.ts +16 -0
- package/dist/field.data.js +50 -0
- package/dist/fields.kit.d.ts +2 -2
- package/dist/fields.types.d.ts +9 -3
- package/dist/formations.js +18 -7
- package/dist/formations.sports.d.ts +8 -0
- package/dist/formations.sports.js +251 -0
- package/dist/frames.providers.js +9 -1
- package/dist/halls.d.ts +65 -0
- package/dist/halls.js +122 -0
- package/dist/heat.js +17 -10
- package/dist/heat.zones.d.ts +4 -2
- package/dist/heat.zones.js +55 -3
- package/dist/homeside.js +7 -0
- package/dist/index.d.ts +15 -3
- package/dist/index.js +8 -1
- package/dist/layers-entry.d.ts +2 -1
- package/dist/layers-entry.js +1 -0
- package/dist/layers.d.ts +2 -1
- package/dist/layers.env.d.ts +10 -1
- package/dist/layers.env.js +33 -3
- package/dist/layers.js +30 -11
- package/dist/layers.types.d.ts +9 -2
- package/dist/leagues/budo.d.ts +196 -0
- package/dist/leagues/budo.js +105 -0
- package/dist/leagues/hockey.js +41 -19
- package/dist/leagues/sources.js +21 -0
- package/dist/leagues/types.d.ts +1 -1
- package/dist/leagues.d.ts +4 -1
- package/dist/leagues.js +102 -2
- package/dist/lineup.codes.d.ts +23 -0
- package/dist/lineup.codes.js +122 -0
- package/dist/logo.d.ts +25 -0
- package/dist/logo.js +47 -0
- package/dist/outline.d.ts +1 -1
- package/dist/outline.js +17 -3
- package/dist/pageant.js +7 -3
- package/dist/pointer-entry.d.ts +2 -0
- package/dist/pointer-entry.js +2 -0
- package/dist/pointer.d.ts +113 -0
- package/dist/pointer.js +151 -0
- package/dist/pool.d.ts +7 -7
- package/dist/pool.figures.d.ts +57 -55
- package/dist/pool.figures.js +59 -55
- package/dist/pool.js +7 -7
- package/dist/pool.labels.js +2 -1
- package/dist/ranges.names.js +6 -0
- package/dist/road.draw.js +3 -2
- package/dist/road.js +2 -1
- package/dist/road.types.d.ts +3 -0
- package/dist/rules.d.ts +138 -0
- package/dist/rules.js +511 -0
- package/dist/rules.types.d.ts +4 -0
- package/dist/rules.types.js +64 -0
- package/dist/score.d.ts +3 -0
- package/dist/score.js +23 -1
- package/dist/situation.d.ts +135 -0
- package/dist/situation.draw.d.ts +34 -0
- package/dist/situation.draw.js +202 -0
- package/dist/situation.js +337 -0
- package/dist/situation.style.d.ts +2 -0
- package/dist/situation.style.js +45 -0
- package/dist/situation.types.d.ts +77 -0
- package/dist/situation.types.js +3 -0
- package/dist/situation.widgets.d.ts +39 -0
- package/dist/situation.widgets.js +129 -0
- package/dist/strings.d.ts +175 -1
- package/dist/strings.js +364 -20
- package/dist/style.js +9 -2
- package/dist/surfaces/artistic.d.ts +3 -3
- package/dist/surfaces/artistic.js +3 -3
- package/dist/surfaces/baseball.js +2 -0
- package/dist/surfaces/basketball.js +1 -1
- package/dist/surfaces/budo.d.ts +6 -0
- package/dist/surfaces/budo.js +104 -0
- package/dist/surfaces/dive.d.ts +3 -3
- package/dist/surfaces/dive.js +3 -3
- package/dist/surfaces/football.js +7 -0
- package/dist/surfaces/hockey.js +3 -2
- package/dist/surfaces/polo.d.ts +4 -4
- package/dist/surfaces/polo.js +5 -5
- package/dist/surfaces/pool.d.ts +1 -1
- package/dist/surfaces/pool.js +3 -3
- package/dist/surfaces/surface.d.ts +32 -0
- package/dist/surfaces/venue.d.ts +1 -1
- package/dist/surfaces/venue.js +1 -1
- package/dist/target-entry.d.ts +2 -0
- package/dist/target-entry.js +2 -0
- package/dist/target.d.ts +200 -0
- package/dist/target.js +525 -0
- package/dist/team.common.d.ts +1 -1
- package/dist/team.common.js +3 -3
- package/dist/team.formation.d.ts +3 -1
- package/dist/team.formation.js +3 -3
- package/dist/team.layers.d.ts +2 -2
- package/dist/team.layers.js +4 -1
- package/dist/team.lineup.d.ts +27 -0
- package/dist/team.lineup.js +207 -0
- package/dist/team.network.js +6 -5
- package/dist/team.shape.js +5 -5
- package/dist/team.types.d.ts +40 -1
- package/dist/tenants.data.js +848 -0
- package/dist/turn-entry.d.ts +2 -2
- package/dist/turn-entry.js +1 -1
- package/dist/turn.camera.d.ts +12 -1
- package/dist/turn.camera.js +18 -2
- package/dist/turn.dom.js +11 -9
- package/dist/turn.kit.d.ts +2 -2
- package/dist/turn.style.js +4 -3
- package/dist/types.d.ts +43 -7
- package/dist/units.js +7 -0
- package/dist/uprights.budo.d.ts +17 -0
- package/dist/uprights.budo.js +87 -0
- package/dist/uprights.js +10 -1
- package/dist/uprights.pools.js +4 -4
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/zones-entry.d.ts +2 -0
- package/dist/zones-entry.js +2 -0
- package/package.json +39 -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;
|
package/dist/frames.providers.js
CHANGED
|
@@ -210,6 +210,14 @@ const swimmingFrame = centreFrame("swimming", "Swimming pool, in metres from the
|
|
|
210
210
|
const waterPoloFrame = centreFrame("waterpolo", "Water polo pool, in metres from the centre of the water", "m", 12.8, 10);
|
|
211
211
|
const divingFrame = centreFrame("diving", "Diving well, in metres from the centre of the water", "m", 10.5, 13.5);
|
|
212
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);
|
|
213
221
|
/**
|
|
214
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
|
|
215
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
|
|
@@ -251,7 +259,7 @@ const skatingFrame = {
|
|
|
251
259
|
source: "this package's own frame: the middle of the rink as the origin",
|
|
252
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.",
|
|
253
261
|
};
|
|
254
|
-
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])
|
|
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])
|
|
255
263
|
if (!Object.prototype.hasOwnProperty.call(FRAMES, frame.name))
|
|
256
264
|
registerFrame(frame);
|
|
257
265
|
// Retrosheet's hit-location diagram (Project Scoresheet's) draws the field in sectors: columns of the outfield from the left field
|
package/dist/halls.d.ts
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import type { PlaceAlias } from "./names.ts";
|
|
2
|
+
import type { BudoSport, DojoSpec, BudoStyle } from "./types.ts";
|
|
3
|
+
/** What is known of a surface's layout. `documented`: the floor, its size and its contest areas are from a source (the dohyō of the Association's rules). `count`: a source gives the number of mats, and the shape is plausible. `generic`: no source gives the size or the layout, and a plausible one is drawn. */
|
|
4
|
+
export type HallBasis = "documented" | "count" | "generic";
|
|
5
|
+
/** One surface a hall offers: a floor of a sport, with the options that draw it. */
|
|
6
|
+
export interface HallSurface {
|
|
7
|
+
/** The key within the hall: `main-dojo`. */
|
|
8
|
+
id: string;
|
|
9
|
+
name: {
|
|
10
|
+
en: string;
|
|
11
|
+
ja: string;
|
|
12
|
+
};
|
|
13
|
+
sport: BudoSport;
|
|
14
|
+
/** The options (beyond `sport`) that draw it. */
|
|
15
|
+
options: {
|
|
16
|
+
league?: string;
|
|
17
|
+
budo?: BudoStyle;
|
|
18
|
+
dojo?: DojoSpec;
|
|
19
|
+
};
|
|
20
|
+
basis: HallBasis;
|
|
21
|
+
/** The number of mats (jō) a source gives for the floor, where it gives one. */
|
|
22
|
+
mats?: number;
|
|
23
|
+
/** What is known and what is drawn, in a sentence each. */
|
|
24
|
+
note: {
|
|
25
|
+
en: string;
|
|
26
|
+
ja: string;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
/** A hall as the data gives it. */
|
|
30
|
+
export interface Hall {
|
|
31
|
+
id: string;
|
|
32
|
+
name: string;
|
|
33
|
+
nameJa: string;
|
|
34
|
+
readingJa?: string;
|
|
35
|
+
aliases: readonly PlaceAlias[];
|
|
36
|
+
city: string;
|
|
37
|
+
country: string;
|
|
38
|
+
lat: number;
|
|
39
|
+
lon: number;
|
|
40
|
+
wikidata: string;
|
|
41
|
+
/** The first year of the institution or the building (the Kodokan's is its founding, 1882). */
|
|
42
|
+
from: number;
|
|
43
|
+
/** What the first year is, in a phrase. */
|
|
44
|
+
fromWhat: {
|
|
45
|
+
en: string;
|
|
46
|
+
ja: string;
|
|
47
|
+
};
|
|
48
|
+
/** The most the hall seats or holds, where a source gives it, and which source. */
|
|
49
|
+
capacity?: {
|
|
50
|
+
value: number;
|
|
51
|
+
source: string;
|
|
52
|
+
};
|
|
53
|
+
/** The competitions and events it is known for. */
|
|
54
|
+
leagues: readonly string[];
|
|
55
|
+
surfaces: readonly HallSurface[];
|
|
56
|
+
/** Keys of `LEAGUE_SOURCES` that its facts were read from. */
|
|
57
|
+
sources: readonly string[];
|
|
58
|
+
/** What is known of the hall that no surface says, in a sentence. */
|
|
59
|
+
note: {
|
|
60
|
+
en: string;
|
|
61
|
+
ja: string;
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
/** The halls, in the order of their surfaces' fame: the Kodokan, the Budokan, the Kokugikan, the Butokuden and the Budokwai. */
|
|
65
|
+
export declare const HALLS: readonly Hall[];
|
package/dist/halls.js
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/** The Kodokan's main dojo as drawn: a square floor of 420 jō's area, four contest areas, the seat of honour, the banner, the wood and the gallery, in the two looks the owner's photographs show. The years of both are unknown. */
|
|
2
|
+
const KODOKAN_MAIN = {
|
|
3
|
+
mats: { width: 26.4, length: 26.4 },
|
|
4
|
+
surround: 1,
|
|
5
|
+
areas: { across: 2, down: 2 },
|
|
6
|
+
dais: true,
|
|
7
|
+
banner: true,
|
|
8
|
+
balcony: true,
|
|
9
|
+
kamiza: "north",
|
|
10
|
+
eras: [
|
|
11
|
+
{ name: "earlier", nameJa: "以前", from: null, to: null, look: "green-orange", outline: true },
|
|
12
|
+
{ name: "current", nameJa: "現在", from: null, to: null, look: "yellow-green" },
|
|
13
|
+
],
|
|
14
|
+
};
|
|
15
|
+
const wp = (name, lang, source) => ({ name, lang, kind: "wikipedia", source });
|
|
16
|
+
const official = (name, lang, source) => ({ name, lang, kind: "official", source });
|
|
17
|
+
/** The halls, in the order of their surfaces' fame: the Kodokan, the Budokan, the Kokugikan, the Butokuden and the Budokwai. */
|
|
18
|
+
export const HALLS = Object.freeze([
|
|
19
|
+
{
|
|
20
|
+
id: "kodokan",
|
|
21
|
+
name: "Kodokan",
|
|
22
|
+
nameJa: "講道館",
|
|
23
|
+
readingJa: "こうどうかん",
|
|
24
|
+
aliases: [official("Kodokan Judo Institute", "en", "kdkjudo.org"), wp("Kōdōkan", "en", "Wikidata Q1165384 label"), official("講道館国際柔道センター", "ja", "kdkjudo.org 施設のご案内")],
|
|
25
|
+
city: "Tokyo",
|
|
26
|
+
country: "JP",
|
|
27
|
+
lat: 35.708,
|
|
28
|
+
lon: 139.75344,
|
|
29
|
+
wikidata: "Q1165384",
|
|
30
|
+
from: 1882,
|
|
31
|
+
fromWhat: { en: "founded by Kanō Jigorō (the International Judo Center, the building the dojos are in, was completed in 1984)", ja: "嘉納治五郎が創設(道場のある講道館国際柔道センターは1984年に完成)" },
|
|
32
|
+
leagues: [],
|
|
33
|
+
surfaces: [
|
|
34
|
+
{ id: "main-dojo", name: { en: "Main dojo, 7th floor", ja: "大道場(7階)" }, sport: "dojo", options: { dojo: KODOKAN_MAIN }, basis: "count", mats: 420, note: { en: "420 jō on the 7th floor, four contest areas at once, with a gallery on the 8th that seats about 900. Per the owner's photographs: four contest areas in two rows, pale yellow mats on green safety bands and a green border, on a wood surround, a raised seat of honour with a dark banner at the front wall, a gallery on all four sides. The shape of the floor is not documented: a square of 26.4 m, the area of 420 jō, is drawn so that four areas of 8 m fit.", ja: "7階に420畳、同時に4面の試合ができ、8階に約900人が座れる見学席があります。提供された写真では、試合場が2列に4面並び、淡い黄色の畳の外側を緑の安全地帯と緑の縁取りが囲んでいます。周囲は板張りで、正面の上座には一段高い台と濃い色の垂れ幕があり、四方に見学席があります。床の形は資料にないので、420畳の広さにあたる26.4m四方の床に、8m四方の試合場4面が収まるように描いています。" } },
|
|
35
|
+
{ id: "main-dojo-earlier", name: { en: "Main dojo, 7th floor (earlier colours)", ja: "大道場(7階・以前の色)" }, sport: "dojo", options: { dojo: { ...KODOKAN_MAIN, era: "earlier" } }, basis: "count", mats: 420, note: { en: "The same room in the colours of the owner's older photograph: all green mats, the four contest areas outlined by red-orange border mats. No source gives the years of either look, so the eras carry none.", ja: "提供された古い写真の色で描いた同じ部屋です。畳はすべて緑で、4面の試合場それぞれを赤橙色の縁の畳が囲んでいます。どちらの色だった時期も資料にないので、年は記していません。" } },
|
|
36
|
+
{ id: "school-dojo", name: { en: "Judo School dojo, 6th floor", ja: "学校道場(6階)" }, sport: "dojo", options: { dojo: { jo: 240, look: "green-beige" } }, basis: "count", mats: 240, note: { en: "240 jō on the 6th floor; the shape is plausible.", ja: "6階に240畳。形は推定です。" } },
|
|
37
|
+
{ id: "international-dojo", name: { en: "International dojo, 6th floor", ja: "国際部道場(6階)" }, sport: "dojo", options: { dojo: { jo: 192, look: "green-beige" } }, basis: "count", mats: 192, note: { en: "192 jō on the 6th floor; the shape is plausible.", ja: "6階に192畳。形は推定です。" } },
|
|
38
|
+
{ id: "womens-dojo", name: { en: "Women's dojo, 5th floor", ja: "女子部道場(5階)" }, sport: "dojo", options: { dojo: { jo: 240, look: "green-beige" } }, basis: "count", mats: 240, note: { en: "240 jō on the 5th floor; the shape is plausible.", ja: "5階に240畳。形は推定です。" } },
|
|
39
|
+
{ id: "boys-dojo", name: { en: "Boys' dojo, 5th floor", ja: "少年部道場(5階)" }, sport: "dojo", options: { dojo: { jo: 114, look: "green-beige" } }, basis: "count", mats: 114, note: { en: "114 jō on the 5th floor; the shape is plausible.", ja: "5階に114畳。形は推定です。" } },
|
|
40
|
+
],
|
|
41
|
+
sources: ["kodokan-facilities", "wikipedia-kodokan", "wikipedia-halls"],
|
|
42
|
+
note: { en: "The Kodokan moved to Kasuga, Bunkyō, in 1958. The Bunkyō ward's page counts the main dojo as 510 jō; the Kodokan's own page says 420, as English Wikipedia does (which also gives 1,206 mats in the five dojos, the sum of the five counts). The 5th floor also has a dojo for special techniques, with no count given, and it is not drawn.", ja: "講道館は1958年に文京区春日に移りました。文京区のページは大道場を510畳としていますが、講道館自身のページは420畳で、English Wikipediaも同じです(5つの道場の畳の合計は1,206畳としていて、これは5つの数の合計です)。5階には特殊技術のための道場もありますが、畳の数が示されていないので描いていません。" },
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
id: "nippon-budokan",
|
|
46
|
+
name: "Nippon Budokan",
|
|
47
|
+
nameJa: "日本武道館",
|
|
48
|
+
readingJa: "にっぽんぶどうかん",
|
|
49
|
+
aliases: [official("Budokan", "en", "Wikidata Q386246"), wp("Nippon Budōkan", "en", "Wikidata Q386246 label")],
|
|
50
|
+
city: "Tokyo",
|
|
51
|
+
country: "JP",
|
|
52
|
+
lat: 35.693333,
|
|
53
|
+
lon: 139.75,
|
|
54
|
+
wikidata: "Q386246",
|
|
55
|
+
from: 1964,
|
|
56
|
+
fromWhat: { en: "opened on 3 October 1964, the venue of the Olympic judo that month", ja: "1964年10月3日に開館、その月の東京オリンピックの柔道会場" },
|
|
57
|
+
capacity: { value: 14501, source: "budokan-overview" },
|
|
58
|
+
leagues: ["Olympic Games 1964", "Olympic Games 2020", "All Japan Judo Championships", "All Japan Karate Championships"],
|
|
59
|
+
surfaces: [
|
|
60
|
+
{ id: "judo-games", name: { en: "Judo at the Olympic Games, two contest areas", ja: "オリンピックの柔道(試合場2面)" }, sport: "judo", options: { league: "ijf", budo: { hall: "budokan", areas: 2, platform: true, officials: true } }, basis: "generic", note: { en: "The arena is an octagon 55 m across the flats (2,513 m²). That the Games laid mats on a raised platform is reported; how many contest areas, and their colours, were not found: two areas of 10 m on a platform are drawn.", ja: "アリーナは対辺55mの正八角形(2,513㎡)です。大会で畳を台の上に敷いたことは報じられていますが、試合場の数と色は分かりませんでした。10mの試合場2面を台の上に描いています。" } },
|
|
61
|
+
{ id: "judo-championships", name: { en: "All Japan Judo Championships, one contest area", ja: "全日本柔道選手権大会(試合場1面)" }, sport: "judo", options: { league: "ajjf", budo: { hall: "budokan" } }, basis: "generic", note: { en: "The Championships are held at the Budokan on 29 April. The layout of the mats is not documented: one contest area with the AJJF's red danger zone is drawn.", ja: "選手権は4月29日に日本武道館で開かれます。畳の配置は分からないので、全柔連の赤い危険地帯のある試合場1面を描いています。" } },
|
|
62
|
+
{ id: "karate", name: { en: "Karate at the Olympic Games", ja: "オリンピックの空手道" }, sport: "karate", options: { league: "wkf-kumite", budo: { hall: "budokan", officials: true } }, basis: "generic", note: { en: "Karate was held at the Budokan at the 2020 Games. The number of competition areas was not found: one WKF kumite area is drawn in the middle of the arena.", ja: "2020年大会では空手道が日本武道館で行われました。試合場の数は分からないので、アリーナの中央に世界空手連盟の組手の試合場1面を描いています。" } },
|
|
63
|
+
{ id: "kendo", name: { en: "Kendo, one shiai-jo", ja: "剣道(試合場1面)" }, sport: "kendo", options: { budo: { hall: "budokan", size: 11 } }, basis: "generic", note: { en: "Kendo's national championships are held at the Budokan. The size of the shiai-jo used was not found: one of 11 m, the greatest the regulations allow, is drawn in the middle of the arena.", ja: "剣道の全国大会は日本武道館で開かれます。使う試合場の大きさは分からないので、規則が認める最大の11m四方を中央に描いています。" } },
|
|
64
|
+
],
|
|
65
|
+
sources: ["budokan-overview", "wikipedia-halls"],
|
|
66
|
+
note: { en: "The Budokan's own leaflet gives a maximum of 14,501 people; Wikidata and English Wikipedia give 14,471.", ja: "日本武道館のリーフレットは最大収容数を14,501人とし、WikidataとEnglish Wikipediaは14,471人としています。" },
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
id: "ryogoku-kokugikan",
|
|
70
|
+
name: "Ryōgoku Kokugikan",
|
|
71
|
+
nameJa: "両国国技館",
|
|
72
|
+
readingJa: "りょうごくこくぎかん",
|
|
73
|
+
aliases: [wp("Ryōgoku Kokugikan", "en", "Wikidata Q176821 label"), official("Kokugikan", "en", "Wikidata Q176821")],
|
|
74
|
+
city: "Tokyo",
|
|
75
|
+
country: "JP",
|
|
76
|
+
lat: 35.696944,
|
|
77
|
+
lon: 139.793333,
|
|
78
|
+
wikidata: "Q176821",
|
|
79
|
+
from: 1985,
|
|
80
|
+
fromWhat: { en: "opened on 9 January 1985", ja: "1985年1月9日に開館" },
|
|
81
|
+
capacity: { value: 11098, source: "wikipedia-halls" },
|
|
82
|
+
leagues: ["Grand Sumo Tournament"],
|
|
83
|
+
surfaces: [{ id: "dohyo", name: { en: "The dohyō", ja: "土俵" }, sport: "sumo", options: { budo: { tassels: true } }, basis: "documented", note: { en: "The clay square of 6.7 m and the ring of 4.55 m are the Association's own figures (Sumo Rules, Dohyō Regulations, Article 1); the Kokugikan holds the Tokyo tournaments in January, May and September, and its ring is movable.", ja: "一辺6.7mの土の正方形と直径4.55mの円は日本相撲協会の規則(相撲規則 土俵規定 第一条)の数値です。国技館では1月、5月、9月の東京場所が開かれ、土俵は移動式です。" } }],
|
|
84
|
+
sources: ["jsa-dohyo", "jsa-quiz", "wikipedia-halls"],
|
|
85
|
+
note: { en: "The Kokugikan seats 11,098 (Wikidata, English Wikipedia).", ja: "国技館の収容人数は11,098人です(Wikidata、English Wikipedia)。" },
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
id: "kyu-butokuden",
|
|
89
|
+
name: "Kyū Butokuden",
|
|
90
|
+
nameJa: "旧武徳殿",
|
|
91
|
+
readingJa: "きゅうぶとくでん",
|
|
92
|
+
aliases: [wp("Butokuden", "en", "Wikidata Q1017987 label"), official("Kyoto Butokuden", "en", "Wikidata Q1017987"), official("京都市武道センター旧武徳殿", "ja", "Wikidata Q1017987")],
|
|
93
|
+
city: "Kyoto",
|
|
94
|
+
country: "JP",
|
|
95
|
+
lat: 35.016389,
|
|
96
|
+
lon: 135.780833,
|
|
97
|
+
wikidata: "Q1017987",
|
|
98
|
+
from: 1899,
|
|
99
|
+
fromWhat: { en: "built as a hall for martial arts by the Dai Nippon Butokukai, designed by Matsumuro Shigemitsu; an Important Cultural Property since 1996", ja: "大日本武徳会が演武場として造営、設計は松室重光、1996年に国の重要文化財に指定" },
|
|
100
|
+
leagues: [],
|
|
101
|
+
surfaces: [{ id: "hall", name: { en: "The hall", ja: "旧武徳殿の床" }, sport: "dojo", options: { dojo: { jo: 100, look: "green-beige", kamiza: "north", shinzen: true, balcony: true } }, basis: "generic", note: { en: "The hall seats 1,200 and is part of the Kyoto Municipal Budo Center. The size of its floor and its mats were not found in a source: a floor of 100 jō is drawn as plausible.", ja: "旧武徳殿の座席は1,200席で、京都市武道センターの施設の一つです。床の大きさと畳の数は資料で確認できなかったので、100畳の床を推定して描いています。" } }],
|
|
102
|
+
sources: ["butokuden-ja"],
|
|
103
|
+
note: { en: "The hall was requisitioned after 1946 and used by the city's police school and art college, and is now a facility of the Kyoto Municipal Budo Center.", ja: "1946年以降は接収され、京都市警察学校や京都市立芸術大学が使い、今は京都市武道センターの施設です。" },
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
id: "budokwai",
|
|
107
|
+
name: "The Budokwai",
|
|
108
|
+
nameJa: "ブドクワイ",
|
|
109
|
+
aliases: [wp("Budokwai", "en", "Wikidata Q3646473 label")],
|
|
110
|
+
city: "London",
|
|
111
|
+
country: "GB",
|
|
112
|
+
lat: 51.4867,
|
|
113
|
+
lon: -0.180556,
|
|
114
|
+
wikidata: "Q3646473",
|
|
115
|
+
from: 1918,
|
|
116
|
+
fromWhat: { en: "opened on 26 January 1918 by Gunji Koizumi, at 15 Lower Grosvenor Place; at 4 Gilston Road since 1954", ja: "1918年1月26日に小泉軍治が開設(最初はロウアー・グロブナー・プレイス15番地)、1954年から現在のギルストン・ロード4番地" },
|
|
117
|
+
leagues: [],
|
|
118
|
+
surfaces: [{ id: "dojo", name: { en: "The dojo", ja: "道場" }, sport: "dojo", options: { dojo: { jo: 50, look: "green-beige" } }, basis: "generic", note: { en: "The size of the dojo and the number of its mats were not found in a source: a floor of 50 jō is drawn as plausible.", ja: "道場の大きさと畳の数は資料で確認できなかったので、50畳の床を推定して描いています。" } }],
|
|
119
|
+
sources: ["wikipedia-halls"],
|
|
120
|
+
note: { en: "A British martial arts club, read from English Wikipedia and Wikidata.", ja: "英国の武道クラブです。English WikipediaとWikidataによります。" },
|
|
121
|
+
},
|
|
122
|
+
]);
|
package/dist/heat.js
CHANGED
|
@@ -7,7 +7,7 @@ import { FRAMES } from "./frames.js";
|
|
|
7
7
|
import { resolveRamp, stepOf } from "./heat.colour.js";
|
|
8
8
|
import { binGrid, contourRings, densityAt, densityGrid, gridValues, hexBins, hexCorners, massThresholds, needsValues, newBin, niceTicks, reduceBin, scottBandwidth, uniformEdges, } from "./heat.stats.js";
|
|
9
9
|
import { buildZoneSet } from "./heat.zones.js";
|
|
10
|
-
import { clamp01, isNum, newMade, opacityOf, place, placeBack, toArray, unitOfLayer } from "./layers.env.js";
|
|
10
|
+
import { clamp01, isNum, markAttrs, newMade, opacityOf, place, placeBack, toArray, unitOfLayer } from "./layers.env.js";
|
|
11
11
|
import { rampColour } from "./layers.marks.js";
|
|
12
12
|
import { fill } from "./strings.js";
|
|
13
13
|
import { textWidth } from "./text.js";
|
|
@@ -483,7 +483,8 @@ export function drawHeat(layer, env, gid, known) {
|
|
|
483
483
|
spec.levels.forEach((level, i) => {
|
|
484
484
|
if (level.d === "")
|
|
485
485
|
return;
|
|
486
|
-
marks
|
|
486
|
+
const mark = env.marks ? ` data-mark-id="${i}" data-index="${i}"` : "";
|
|
487
|
+
marks.push(spec.filled ? `<path class="ky-cf" style="fill:${fillOf(colours, i)}" fill-rule="evenodd" d="${level.d}"${mark}/>` : `<path class="ky-cl" style="stroke:${fillOf(colours, i)}" d="${level.d}"${mark}/>`);
|
|
487
488
|
});
|
|
488
489
|
made.style = `--w:${num(env.base * (spec.filled ? 0.1 : 0.32))}`;
|
|
489
490
|
}
|
|
@@ -491,20 +492,26 @@ export function drawHeat(layer, env, gid, known) {
|
|
|
491
492
|
colours = coloursFor(layer, present);
|
|
492
493
|
const step = (v) => stepOf(v, colours.domain, colours.steps);
|
|
493
494
|
if (c.noun === "zones") {
|
|
494
|
-
|
|
495
|
+
c.items.forEach((it, i) => {
|
|
495
496
|
const title = `<title>${esc(`${it.name ?? ""}${it.value === null ? "" : `: ${fmt(it.value)}`} (${it.n})`)}</title>`;
|
|
496
|
-
|
|
497
|
-
|
|
497
|
+
const zone = it.id === undefined || !env.marks ? "" : ` data-mark-id="${esc(it.id)}" data-index="${i}" data-zone="${esc(it.id)}"`;
|
|
498
|
+
marks.push(`<path class="ky-zn" d="${it.d}" fill-rule="evenodd" style="fill:${it.value === null ? "none" : fillOf(colours, step(it.value))}"${zone}>${title}</path>`);
|
|
499
|
+
});
|
|
498
500
|
made.style = `--w:${num(env.base * 0.12)}`;
|
|
499
501
|
}
|
|
500
502
|
else {
|
|
503
|
+
// Each cell is a path of its own, so that a listener can tell which one it was on; the cells of a colour share a group that holds the fill.
|
|
501
504
|
const byStep = Array.from({ length: colours.steps }, () => []);
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
+
const pointable = env.marks;
|
|
506
|
+
c.items.forEach((it, i) => {
|
|
507
|
+
if (it.value === null)
|
|
508
|
+
return;
|
|
509
|
+
byStep[step(it.value)].push(pointable ? `<path d="${it.d}"${markAttrs(env, undefined, i, [it.cx, it.cy])}/>` : it.d);
|
|
510
|
+
});
|
|
505
511
|
byStep.forEach((list, k) => {
|
|
506
|
-
if (list.length
|
|
507
|
-
|
|
512
|
+
if (list.length === 0)
|
|
513
|
+
return;
|
|
514
|
+
marks.push(pointable ? `<g style="fill:${fillOf(colours, k)}">${list.join("")}</g>` : `<path style="fill:${fillOf(colours, k)}" d="${list.join("")}"/>`);
|
|
508
515
|
});
|
|
509
516
|
}
|
|
510
517
|
}
|
package/dist/heat.zones.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { Outline } from "./outline.ts";
|
|
|
2
2
|
import type { KyogijoWords } from "./strings.ts";
|
|
3
3
|
import type { Sport, SurfaceOptions } from "./types.ts";
|
|
4
4
|
/** The zone sets. */
|
|
5
|
-
export type ZoneSetId = "field-thirds" | "cricket-ground" | "soccer-positional" | "soccer-thirds" | "soccer-channels" | "soccer-18" | "nba-shot" | "nhl-slot" | "nhl-home-plate" | "baseball-spray" | "baseball-retrosheet" | "football-pass" | "athletics-track" | "skating-track" | "curling-house" | "net-court" | "wall-court" | "roundnet-rings" | "pool-lanes" | "water-polo-areas" | "pool-thirds";
|
|
5
|
+
export type ZoneSetId = "field-thirds" | "cricket-ground" | "soccer-positional" | "soccer-thirds" | "soccer-channels" | "soccer-18" | "nba-shot" | "nhl-slot" | "nhl-home-plate" | "baseball-spray" | "baseball-retrosheet" | "football-pass" | "athletics-track" | "skating-track" | "budo-areas" | "curling-house" | "net-court" | "wall-court" | "roundnet-rings" | "pool-lanes" | "water-polo-areas" | "pool-thirds";
|
|
6
6
|
type Pt = readonly [number, number];
|
|
7
7
|
/** One zone: its shape on the surface and whether a point lies in it. */
|
|
8
8
|
export interface ZoneShape {
|
|
@@ -30,7 +30,7 @@ export interface ZoneSet {
|
|
|
30
30
|
}
|
|
31
31
|
/** What a zone set needs to know about the drawing and the layer. */
|
|
32
32
|
export interface ZoneContext {
|
|
33
|
-
o: Pick<SurfaceOptions, "sport" | "pitch" | "units"> & Partial<Pick<SurfaceOptions, "league" | "net" | "field" | "pool" | "athletics" | "skating">>;
|
|
33
|
+
o: Pick<SurfaceOptions, "sport" | "pitch" | "units"> & Partial<Pick<SurfaceOptions, "league" | "net" | "field" | "pool" | "athletics" | "skating" | "budo" | "dojo">>;
|
|
34
34
|
outline: Outline;
|
|
35
35
|
/** The way the team attacks as the surface is drawn wide: names the sides and counts the bands from the team's own end. `right` by default. */
|
|
36
36
|
direction: "left" | "right";
|
|
@@ -49,6 +49,8 @@ export declare const ZONE_SETS: Readonly<Record<ZoneSetId, {
|
|
|
49
49
|
source: string;
|
|
50
50
|
}>>;
|
|
51
51
|
export declare const ZONE_SET_IDS: readonly ZoneSetId[];
|
|
52
|
+
/** The distance from home plate along a ray at `angle` (degrees, 0 straight out to centre field, negative to left) to the edge of the infield: the arc 95 feet round the pitcher's plate. */
|
|
53
|
+
export declare function infieldReach(angle: number): number;
|
|
52
54
|
/** The zones of a set on the surface the context describes. Throws for a set that is not for the surface's sport. */
|
|
53
55
|
export declare function buildZoneSet(id: ZoneSetId, ctx: ZoneContext): ZoneSet;
|
|
54
56
|
export {};
|