@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.
- package/CHANGELOG.md +133 -0
- package/NOTICE.md +182 -2
- package/README.md +106 -19
- package/dist/annotate.js +1 -1
- 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/athletics/describe.d.ts +8 -0
- package/dist/athletics/describe.js +41 -0
- package/dist/athletics/events.d.ts +17 -0
- package/dist/athletics/events.js +48 -0
- package/dist/athletics/facilities.d.ts +80 -0
- package/dist/athletics/facilities.js +176 -0
- package/dist/athletics/infield.d.ts +79 -0
- package/dist/athletics/infield.js +166 -0
- package/dist/athletics/layout.d.ts +13 -0
- package/dist/athletics/layout.js +98 -0
- package/dist/athletics/oval.d.ts +57 -0
- package/dist/athletics/oval.js +116 -0
- package/dist/athletics/plan.d.ts +97 -0
- package/dist/athletics/plan.js +355 -0
- package/dist/athletics/races.d.ts +102 -0
- package/dist/athletics/races.js +355 -0
- package/dist/athletics/steeplechase.d.ts +72 -0
- package/dist/athletics/steeplechase.js +196 -0
- package/dist/athletics/stencil.d.ts +13 -0
- package/dist/athletics/stencil.js +85 -0
- package/dist/athletics/track.d.ts +54 -0
- package/dist/athletics/track.js +105 -0
- package/dist/athletics/types.d.ts +77 -0
- package/dist/athletics/types.js +1 -0
- package/dist/athletics-entry.d.ts +17 -0
- package/dist/athletics-entry.js +11 -0
- package/dist/athletics.style.d.ts +16 -0
- package/dist/athletics.style.js +51 -0
- package/dist/atlas-entry.d.ts +6 -2
- package/dist/atlas-entry.js +4 -2
- package/dist/atlas.d.ts +117 -23
- package/dist/atlas.js +197 -12
- 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-entry.d.ts +6 -1
- package/dist/charts-entry.js +3 -0
- package/dist/charts.athletics.d.ts +183 -0
- package/dist/charts.athletics.js +455 -0
- package/dist/charts.baseball.js +1 -1
- package/dist/charts.curling.heat.d.ts +24 -0
- package/dist/charts.curling.heat.js +116 -0
- package/dist/charts.curling.js +14 -3
- package/dist/charts.js +4 -4
- package/dist/charts.pool.d.ts +67 -0
- package/dist/charts.pool.js +76 -0
- package/dist/charts.skating.d.ts +204 -0
- package/dist/charts.skating.js +426 -0
- package/dist/charts.soccer.js +3 -3
- package/dist/charts.types.d.ts +63 -1
- package/dist/colour.d.ts +4 -4
- package/dist/colour.js +4 -4
- package/dist/court.d.ts +85 -2
- package/dist/court.js +102 -7
- package/dist/court.more.d.ts +46 -0
- package/dist/court.more.js +219 -0
- package/dist/courts.style.d.ts +14 -2
- package/dist/courts.style.js +51 -4
- package/dist/crowd.d.ts +164 -0
- package/dist/crowd.draw.d.ts +17 -0
- package/dist/crowd.draw.js +204 -0
- package/dist/crowd.js +480 -0
- package/dist/crowd.park.d.ts +19 -0
- package/dist/crowd.park.js +153 -0
- package/dist/curling.stats.d.ts +271 -0
- package/dist/curling.stats.js +301 -0
- package/dist/draw.d.ts +16 -0
- package/dist/draw.js +462 -54
- package/dist/element-entry.d.ts +3 -1
- package/dist/element-entry.js +2 -1
- package/dist/element.d.ts +13 -2
- package/dist/element.js +79 -4
- 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 +204 -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 +24 -4
- 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 +71 -8
- package/dist/geojson.js +3 -0
- package/dist/geometry-entry.d.ts +2 -1
- package/dist/geometry-entry.js +2 -1
- package/dist/geometry.d.ts +20 -0
- package/dist/geometry.js +78 -1
- package/dist/grounds.d.ts +4 -0
- package/dist/grounds.data.js +12 -0
- package/dist/halls.d.ts +65 -0
- package/dist/halls.js +122 -0
- package/dist/hardwood.d.ts +31 -0
- package/dist/hardwood.js +157 -0
- package/dist/heat.js +21 -13
- package/dist/heat.types.d.ts +5 -0
- package/dist/heat.zones.d.ts +4 -2
- package/dist/heat.zones.js +207 -7
- package/dist/homeside.js +24 -0
- package/dist/index.d.ts +30 -4
- package/dist/index.js +18 -2
- 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 +12 -1
- package/dist/layers.env.js +36 -4
- package/dist/layers.js +32 -13
- package/dist/layers.types.d.ts +9 -2
- package/dist/leagues/athletics.d.ts +63 -0
- package/dist/leagues/athletics.js +87 -0
- package/dist/leagues/budo.d.ts +196 -0
- package/dist/leagues/budo.js +105 -0
- package/dist/leagues/courts.d.ts +269 -4
- package/dist/leagues/courts.js +155 -1
- package/dist/leagues/hockey.js +41 -19
- package/dist/leagues/skating.d.ts +145 -0
- package/dist/leagues/skating.js +73 -0
- package/dist/leagues/sources.js +41 -0
- package/dist/leagues/types.d.ts +1 -1
- package/dist/leagues-entry.d.ts +4 -2
- package/dist/leagues-entry.js +2 -1
- package/dist/leagues.d.ts +17 -4
- package/dist/leagues.js +246 -5
- 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/look.d.ts +3 -3
- package/dist/look.js +39 -6
- package/dist/outline.d.ts +1 -1
- package/dist/outline.js +46 -4
- package/dist/pageant.d.ts +120 -0
- package/dist/pageant.draw.d.ts +21 -0
- package/dist/pageant.draw.js +171 -0
- package/dist/pageant.js +211 -0
- package/dist/pageant.style.d.ts +8 -0
- package/dist/pageant.style.js +42 -0
- package/dist/png.d.ts +8 -1
- package/dist/png.js +21 -1
- 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 +176 -0
- package/dist/pool.figures.d.ts +306 -0
- package/dist/pool.figures.js +148 -0
- package/dist/pool.js +304 -0
- package/dist/pool.kit.d.ts +48 -0
- package/dist/pool.kit.js +141 -0
- package/dist/pool.labels.d.ts +20 -0
- package/dist/pool.labels.js +258 -0
- package/dist/pool.race.d.ts +65 -0
- package/dist/pool.race.js +140 -0
- package/dist/pool.replay.d.ts +46 -0
- package/dist/pool.replay.js +127 -0
- package/dist/pool.section.d.ts +13 -0
- package/dist/pool.section.js +83 -0
- package/dist/pool.style.d.ts +20 -0
- package/dist/pool.style.js +169 -0
- package/dist/pool.types.d.ts +145 -0
- package/dist/pool.types.js +3 -0
- package/dist/pool.words.d.ts +13 -0
- package/dist/pool.words.js +101 -0
- package/dist/ranges.names.js +53 -3
- package/dist/replay-entry.d.ts +3 -0
- package/dist/replay-entry.js +2 -0
- package/dist/restyle.js +1 -1
- 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 +93 -6
- package/dist/sheet.d.ts +3 -0
- package/dist/sheet.js +7 -3
- 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/skating/describe.d.ts +7 -0
- package/dist/skating/describe.js +44 -0
- package/dist/skating/events.d.ts +24 -0
- package/dist/skating/events.js +47 -0
- package/dist/skating/figure.d.ts +24 -0
- package/dist/skating/figure.js +37 -0
- package/dist/skating/long.d.ts +54 -0
- package/dist/skating/long.js +111 -0
- package/dist/skating/parts.d.ts +43 -0
- package/dist/skating/parts.js +40 -0
- package/dist/skating/plan.d.ts +55 -0
- package/dist/skating/plan.js +197 -0
- package/dist/skating/short.d.ts +47 -0
- package/dist/skating/short.js +89 -0
- package/dist/skating/track.d.ts +66 -0
- package/dist/skating/track.js +94 -0
- package/dist/skating/types.d.ts +57 -0
- package/dist/skating/types.js +3 -0
- package/dist/skating-entry.d.ts +17 -0
- package/dist/skating-entry.js +11 -0
- package/dist/skating.style.d.ts +4 -0
- package/dist/skating.style.js +24 -0
- package/dist/strings.d.ts +470 -0
- package/dist/strings.js +674 -13
- package/dist/style.d.ts +2 -0
- package/dist/style.js +19 -2
- package/dist/surfaces/artistic.d.ts +9 -0
- package/dist/surfaces/artistic.js +94 -0
- package/dist/surfaces/athletics.d.ts +16 -0
- package/dist/surfaces/athletics.js +132 -0
- package/dist/surfaces/baseball.js +17 -0
- package/dist/surfaces/basketball.floor.d.ts +27 -0
- package/dist/surfaces/basketball.floor.js +83 -0
- package/dist/surfaces/basketball.gear.d.ts +27 -0
- package/dist/surfaces/basketball.gear.js +90 -0
- package/dist/surfaces/basketball.js +44 -22
- package/dist/surfaces/budo.d.ts +6 -0
- package/dist/surfaces/budo.js +104 -0
- package/dist/surfaces/curling.d.ts +16 -0
- package/dist/surfaces/curling.fold.d.ts +67 -0
- package/dist/surfaces/curling.fold.js +107 -0
- package/dist/surfaces/curling.js +37 -3
- package/dist/surfaces/dive.d.ts +9 -0
- package/dist/surfaces/dive.js +128 -0
- package/dist/surfaces/field.d.ts +7 -2
- package/dist/surfaces/field.js +15 -9
- package/dist/surfaces/football.js +7 -0
- package/dist/surfaces/hockey.js +4 -2
- package/dist/surfaces/net.d.ts +2 -1
- package/dist/surfaces/net.js +160 -15
- package/dist/surfaces/polo.d.ts +12 -0
- package/dist/surfaces/polo.js +159 -0
- package/dist/surfaces/pool.d.ts +27 -0
- package/dist/surfaces/pool.js +198 -0
- package/dist/surfaces/skating.d.ts +6 -0
- package/dist/surfaces/skating.js +62 -0
- package/dist/surfaces/soccer.js +2 -1
- package/dist/surfaces/surface.d.ts +76 -0
- package/dist/surfaces/venue.d.ts +15 -0
- package/dist/surfaces/venue.js +95 -0
- 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.d.ts +77 -0
- package/dist/tenants.data.d.ts +8 -0
- package/dist/tenants.data.js +1793 -0
- package/dist/tenants.js +46 -0
- package/dist/turn-entry.d.ts +12 -0
- package/dist/turn-entry.js +7 -0
- package/dist/turn.camera.d.ts +116 -0
- package/dist/turn.camera.js +184 -0
- package/dist/turn.dom.d.ts +40 -0
- package/dist/turn.dom.js +353 -0
- package/dist/turn.kit.d.ts +86 -0
- package/dist/turn.kit.js +110 -0
- package/dist/turn.markup.d.ts +48 -0
- package/dist/turn.markup.js +108 -0
- package/dist/turn.model.d.ts +78 -0
- package/dist/turn.model.js +91 -0
- package/dist/turn.style.d.ts +5 -0
- package/dist/turn.style.js +56 -0
- package/dist/types.d.ts +221 -20
- package/dist/units.d.ts +1 -1
- package/dist/units.js +22 -1
- package/dist/uprights.board.d.ts +17 -0
- package/dist/uprights.board.js +59 -0
- package/dist/uprights.budo.d.ts +17 -0
- package/dist/uprights.budo.js +87 -0
- package/dist/uprights.d.ts +37 -0
- package/dist/uprights.fields.d.ts +32 -0
- package/dist/uprights.fields.js +172 -0
- package/dist/uprights.goal.d.ts +49 -0
- package/dist/uprights.goal.js +69 -0
- package/dist/uprights.js +169 -0
- package/dist/uprights.more.d.ts +7 -0
- package/dist/uprights.more.js +183 -0
- package/dist/uprights.net.d.ts +12 -0
- package/dist/uprights.net.js +109 -0
- package/dist/uprights.netkit.d.ts +28 -0
- package/dist/uprights.netkit.js +67 -0
- package/dist/uprights.pools.d.ts +8 -0
- package/dist/uprights.pools.js +190 -0
- package/dist/uprights.rinks.d.ts +27 -0
- package/dist/uprights.rinks.js +106 -0
- package/dist/uprights.track.d.ts +50 -0
- package/dist/uprights.track.js +246 -0
- 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 +56 -3
package/dist/features.js
CHANGED
|
@@ -38,6 +38,121 @@ const HOCKEY = [
|
|
|
38
38
|
f("nets", "--ky-red", "The nets."),
|
|
39
39
|
f("referee-crease", "--ky-red", "The referee's crease at the boards."),
|
|
40
40
|
];
|
|
41
|
+
const ATHLETICS = [
|
|
42
|
+
f("apron", "--ky-apron", "The ground round the stadium."),
|
|
43
|
+
f("track", "--ky-track", "The synthetic surface of the track, the straights and the segments."),
|
|
44
|
+
f("infield", "--ky-surface", "The turf inside the track."),
|
|
45
|
+
f("mowing", "--ky-surface-alt", "The lighter tone of the mown turf."),
|
|
46
|
+
f("kerb", LINE, "The kerb on the inside edge of the track."),
|
|
47
|
+
f("lane-lines", LINE, "The lines between the lanes and the track's outer edge."),
|
|
48
|
+
f("lane-numbers", LINE, "The lane numbers painted before the finish and the starts."),
|
|
49
|
+
f("finish-line", LINE, "The finish line and the short lines 1 m before it."),
|
|
50
|
+
f("start-lines", LINE, "The start lines: straight, staggered and curved."),
|
|
51
|
+
f("breakline", "--ky-ath-g", "The breakline of the 800 m and the 4 x 400 m."),
|
|
52
|
+
f("relay-zones", ["--ky-ath-y", "--ky-ath-b", LINE], "The takeover zones' marks and the scratch lines."),
|
|
53
|
+
f("hurdle-marks", ["--ky-ath-y", "--ky-ath-b", "--ky-ath-g"], "The marks of the hurdles on the track."),
|
|
54
|
+
f("steeplechase-hurdles", "--ky-ath-k", "The steeplechase's hurdles."),
|
|
55
|
+
f("water-jump", ["--ky-water", LINE, "--ky-ath-k"], "The water jump: its pit, its border and its hurdle."),
|
|
56
|
+
f("high-jump", ["--ky-mat", LINE, "--ky-ath-k"], "The high jump: the mat, the crossbar and the lines."),
|
|
57
|
+
f("pole-vault", ["--ky-mat", "--ky-pad", LINE], "The pole vault: the mats, the boxes and the runways."),
|
|
58
|
+
f("long-jump", ["--ky-sand", LINE], "The long jump's pits, boards and runways."),
|
|
59
|
+
f("triple-jump", ["--ky-sand", LINE], "The triple jump's pits, boards and runways."),
|
|
60
|
+
f("shot-put", ["--ky-concrete", LINE], "The shot put's circles, stop boards and sectors."),
|
|
61
|
+
f("discus-throw", ["--ky-concrete", LINE], "The discus throw's circle and sector."),
|
|
62
|
+
f("hammer-throw", ["--ky-concrete", LINE], "The hammer throw's circle and sector."),
|
|
63
|
+
f("javelin-throw", LINE, "The javelin's runway, arc and sector."),
|
|
64
|
+
f("cage", "--ky-ath-k", "The discus and hammer cage."),
|
|
65
|
+
f("banking", "--ky-ath-k", "The shade of the covered track's banked bends."),
|
|
66
|
+
];
|
|
67
|
+
const SKATING = [
|
|
68
|
+
f("apron", "--ky-apron", "The ground round the rink."),
|
|
69
|
+
f("ice", "--ky-surface", "The ice."),
|
|
70
|
+
f("infield", "--ky-surface-alt", "The floor or the ice inside the track."),
|
|
71
|
+
f("warm-up", "--ky-surface-alt", "The warm-up lane of the long track."),
|
|
72
|
+
f("padding", "--ky-boards", "The padding round the track."),
|
|
73
|
+
f("boards", "--ky-boards", "The boards of a figure skating rink."),
|
|
74
|
+
f("lane-lines", "--ky-blue", "The lines that demarcate the lanes of the long track."),
|
|
75
|
+
f("track-line", ["--ky-blue", "--ky-ink"], "The line of the short track and the line between its blocks."),
|
|
76
|
+
f("blocks", "--ky-ink", "The blocks of a curve."),
|
|
77
|
+
f("cones", "--ky-red", "The cones at the entrance of a curve."),
|
|
78
|
+
f("finish-line", "--ky-red", "The finishing line."),
|
|
79
|
+
f("finish-marks", "--ky-blue", "The lines 1 m apart in the last 5 m before the finishing line."),
|
|
80
|
+
f("start-lines", "--ky-red", "The starting lines of the races marked."),
|
|
81
|
+
f("pre-start-lines", "--ky-blue", "The pre-start line 2 m before each starting line."),
|
|
82
|
+
f("start-positions", "--ky-ink", "The starting positions of the short track's 500 m and 1000 m."),
|
|
83
|
+
f("coaches-area", "--ky-red", "The coaches' area on the crossing straight."),
|
|
84
|
+
f("judges", "--ky-ink", "The judges' seats at the rinkboard."),
|
|
85
|
+
f("referee", "--ky-ink", "The referee's seat."),
|
|
86
|
+
f("technical-panel", "--ky-ink", "The technical panel's table."),
|
|
87
|
+
f("kiss-and-cry", "--ky-red", "The kiss and cry."),
|
|
88
|
+
];
|
|
89
|
+
const JUDO = [
|
|
90
|
+
f("apron", "--ky-apron", "The ground round the competition area."),
|
|
91
|
+
f("free-zone", "--ky-free", "The free zone of 50 cm kept round the competition area."),
|
|
92
|
+
f("platform", "--ky-bud-floor", "The platform under the tatami, when there is one."),
|
|
93
|
+
f("floor", "--ky-bud-floor", "The arena floor under the surface, when there is one (the Budokan's)."),
|
|
94
|
+
f("contest-area", "--ky-surface", "The tatami of the contest area."),
|
|
95
|
+
f("safety-area", "--ky-surface-alt", "The tatami of the safety area."),
|
|
96
|
+
f("danger-zone", "--ky-red", "The red tatami of the danger zone inside a contest area (the AJJF's)."),
|
|
97
|
+
f("seams", "--ky-ink", "The seams between the mats."),
|
|
98
|
+
f("start-right", ["--ky-blue", "--ky-red"], "The tape where the contestant to the referee's right starts: blue, or red in the AJJF's."),
|
|
99
|
+
f("start-left", "--ky-line", "The tape where the contestant to the referee's left starts."),
|
|
100
|
+
f("officials", "--ky-ink", "The technical table."),
|
|
101
|
+
];
|
|
102
|
+
const KARATE = [
|
|
103
|
+
f("apron", "--ky-apron", "The ground round the mats."),
|
|
104
|
+
f("floor", "--ky-bud-floor", "The arena floor under the surface, when there is one (the Budokan's)."),
|
|
105
|
+
f("safety-area", "--ky-surface-alt", "The mats of the safety area."),
|
|
106
|
+
f("boundary-band", "--ky-red", "The outer metre of a kumite area, in another colour."),
|
|
107
|
+
f("competition-area", "--ky-surface", "The mats inside the boundary band."),
|
|
108
|
+
f("start-mats", "--ky-red", "The two mats turned over at the start."),
|
|
109
|
+
f("seams", "--ky-ink", "The seams between the mats."),
|
|
110
|
+
f("judges", "--ky-ink", "The judges' seats."),
|
|
111
|
+
f("referee", "--ky-ink", "The referee's place."),
|
|
112
|
+
f("officials", "--ky-ink", "The officials' table."),
|
|
113
|
+
];
|
|
114
|
+
const KENDO = [
|
|
115
|
+
f("apron", "--ky-apron", "The ground round the shiai-jo."),
|
|
116
|
+
f("outside", "--ky-free", "The 1.5 m kept clear outside the boundary lines."),
|
|
117
|
+
f("floor", "--ky-bud-floor", "The wooden floor."),
|
|
118
|
+
f("boards", "--ky-ink", "The seams between the floorboards."),
|
|
119
|
+
f("boundary-lines", "--ky-line", "The boundary lines."),
|
|
120
|
+
f("cross", "--ky-line", "The cross at the centre."),
|
|
121
|
+
f("start-lines", "--ky-line", "The two kaishi-sen."),
|
|
122
|
+
f("outer-boundary", "--ky-ink", "The outer boundary, 1.5 m outside."),
|
|
123
|
+
];
|
|
124
|
+
const SUMO = [
|
|
125
|
+
f("apron", "--ky-apron", "The ground round the dohyō."),
|
|
126
|
+
f("clay", "--ky-dirt", "The clay of the platform and of the ring."),
|
|
127
|
+
f("jano-me", "--ky-sand", "The sand outside the tawara."),
|
|
128
|
+
f("tawara", "--ky-bud-straw", "The tawara of the ring."),
|
|
129
|
+
f("shikiri-sen", "--ky-line", "The two shikiri-sen."),
|
|
130
|
+
];
|
|
131
|
+
const KYUDO = [
|
|
132
|
+
f("apron", "--ky-apron", "The ground round the range."),
|
|
133
|
+
f("shajo", "--ky-bud-floor", "The floor of the shajō."),
|
|
134
|
+
f("yamichi", "--ky-surface", "The yamichi."),
|
|
135
|
+
f("yatori-michi", "--ky-surface-alt", "The path for fetching the arrows."),
|
|
136
|
+
f("azuchi", "--ky-dirt", "The azuchi, the mound."),
|
|
137
|
+
f("shooting-positions", "--ky-line", "The shooting positions and their line."),
|
|
138
|
+
f("honza", "--ky-line", "The honza and their line."),
|
|
139
|
+
f("targets", "--ky-line", "The targets."),
|
|
140
|
+
f("roofs", "--ky-ink", "The outlines of the roofs of the shajō and the matoba."),
|
|
141
|
+
];
|
|
142
|
+
const DOJO = [
|
|
143
|
+
f("apron", "--ky-apron", "The ground round the dojo."),
|
|
144
|
+
f("mats", "--ky-surface", "The mats, or the first tone of a checker or a competition floor."),
|
|
145
|
+
f("mats-alt", "--ky-surface-alt", "The second tone of a checker or a competition floor."),
|
|
146
|
+
f("border", "--ky-red", "The border of another colour of a border floor."),
|
|
147
|
+
f("seams", "--ky-ink", "The seams between the mats."),
|
|
148
|
+
f("heri", "--ky-ink", "The heri, the cloth along the long sides of a traditional mat."),
|
|
149
|
+
f("walls", "--ky-boards", "The walls."),
|
|
150
|
+
f("doors", "--ky-apron", "The doors."),
|
|
151
|
+
f("windows", "--ky-blue", "The windows."),
|
|
152
|
+
f("shrine", "--ky-red", "The shinzen, the shrine."),
|
|
153
|
+
f("dais", "--ky-bud-floor", "The raised platform of the seat of honour."),
|
|
154
|
+
f("banner", "--ky-ink", "The banner on the kamiza wall."),
|
|
155
|
+
];
|
|
41
156
|
const KEY = ["--ky-key", "--ky-key-left", "--ky-key-right"];
|
|
42
157
|
const BASKETBALL = [
|
|
43
158
|
f("apron", "--ky-apron", "The ground round the court."),
|
|
@@ -107,6 +222,63 @@ const CURLING = [
|
|
|
107
222
|
f("hog-lines", "--ky-hog", "The hog lines."),
|
|
108
223
|
f("hacks", "--ky-hack", "The hacks."),
|
|
109
224
|
];
|
|
225
|
+
const ROPES = ["--ky-pg", "--ky-pb", "--ky-py"];
|
|
226
|
+
const SWIMMING = [
|
|
227
|
+
f("apron", "--ky-apron", "The deck round the pool."),
|
|
228
|
+
f("gutter", "--ky-boards", "The gutter and the coping round the water."),
|
|
229
|
+
f("water", "--ky-surface", "The water."),
|
|
230
|
+
f("lane-lines", LINE, "The lane markings on the floor with their cross lines, the cross lines at 15 m, the marks on the deck and the target lines."),
|
|
231
|
+
f("touch-pads", "--ky-pd", "The touch panels on the end walls."),
|
|
232
|
+
f("starting-blocks", "--ky-pk", "The starting blocks."),
|
|
233
|
+
f("lane-ropes", ROPES, "The lane ropes' green, blue and yellow floats; the red floats near the walls are `rope-red` and the distinct marks `rope-white`."),
|
|
234
|
+
f("rope-green", "--ky-pg", "The green ropes of the outside lanes."),
|
|
235
|
+
f("rope-blue", "--ky-pb", "The blue ropes."),
|
|
236
|
+
f("rope-yellow", "--ky-py", "The yellow ropes of the middle lanes."),
|
|
237
|
+
f("rope-red", "--ky-pr", "The red floats within 5 m of each wall."),
|
|
238
|
+
f("rope-white", "--ky-pw", "The floats of a distinct colour at 15 m and 25 m."),
|
|
239
|
+
f("backstroke-flags", ["--ky-fa"], "The backstroke flags' rope 5 m from each wall."),
|
|
240
|
+
f("false-start-rope", "--ky-pf", "The false start rope 15 m from the starting end."),
|
|
241
|
+
f("pace-bars", "--ky-pe", "The outline of the split pace bars."),
|
|
242
|
+
];
|
|
243
|
+
const WATER_POLO = [
|
|
244
|
+
f("apron", "--ky-apron", "The deck round the pool."),
|
|
245
|
+
f("gutter", "--ky-boards", "The gutter round the water."),
|
|
246
|
+
f("water", "--ky-surface", "The water."),
|
|
247
|
+
f("goal-lines", "--ky-pw", "The two goal lines."),
|
|
248
|
+
f("half-distance-line", "--ky-pw", "The half distance line."),
|
|
249
|
+
f("two-metre-lines", "--ky-pr", "The 2 m lines."),
|
|
250
|
+
f("five-metre-marks", "--ky-pr", "The 5 m marks, where a penalty throw is taken from."),
|
|
251
|
+
f("six-metre-lines", "--ky-py", "The 6 m lines."),
|
|
252
|
+
f("goal-area-lines", "--ky-pr", "The lines 2 m long from the goal posts that make the goal areas."),
|
|
253
|
+
f("re-entry-areas", "--ky-pr", "The excluded players' re-entry areas."),
|
|
254
|
+
f("referee-platforms", ["--ky-pr", "--ky-py", "--ky-pg"], "The referees' platforms along both sides, coloured as the ropes are."),
|
|
255
|
+
f("lane-ropes", ROPES, "The ropes along the sides: their green floats, their yellow floats; the red ones are `rope-red`, the white ones `rope-white`."),
|
|
256
|
+
f("rope-green", "--ky-pg", "The green floats from 6 m to the half distance line."),
|
|
257
|
+
f("rope-yellow", "--ky-py", "The yellow floats from 2 to 6 m."),
|
|
258
|
+
f("rope-red", "--ky-pr", "The red floats from the goal line to 2 m and the 5 m mark."),
|
|
259
|
+
f("rope-white", "--ky-pw", "The white floats at the goal lines and the half distance line."),
|
|
260
|
+
f("goals", "--ky-pw", "The goals: the crossbar and the net."),
|
|
261
|
+
f("goal-posts", "--ky-pw", "The goal posts."),
|
|
262
|
+
f("official-table", "--ky-pk", "The official table."),
|
|
263
|
+
f("substitution-areas", ["--ky-left", "--ky-right"], "The areas for flying substitutions, in each team's colour."),
|
|
264
|
+
];
|
|
265
|
+
const DIVING = [
|
|
266
|
+
f("apron", "--ky-apron", "The deck round the well."),
|
|
267
|
+
f("gutter", "--ky-boards", "The gutter round the well."),
|
|
268
|
+
f("water", "--ky-surface", "The water."),
|
|
269
|
+
f("lane-lines", LINE, "The three lines across the well."),
|
|
270
|
+
f("stands", "--ky-boards", "The stands the boards are fixed to."),
|
|
271
|
+
f("platforms", "--ky-pc", "The platforms."),
|
|
272
|
+
f("springboards", "--ky-pbd", "The springboards."),
|
|
273
|
+
];
|
|
274
|
+
const ARTISTIC_SWIMMING = [
|
|
275
|
+
f("apron", "--ky-apron", "The deck round the pool."),
|
|
276
|
+
f("gutter", "--ky-boards", "The gutter round the water."),
|
|
277
|
+
f("water", "--ky-surface", "The water."),
|
|
278
|
+
f("floor-lines", LINE, "The lines on the floor along the pool."),
|
|
279
|
+
f("judges-platform", "--ky-pk", "The judges' platform."),
|
|
280
|
+
f("starting-platform", "--ky-pk", "The starting platform."),
|
|
281
|
+
];
|
|
110
282
|
const NET = [
|
|
111
283
|
f("apron", "--ky-apron", "The ground round the court."),
|
|
112
284
|
f("free-zone", "--ky-free", "The free zone round the court, where the rules give one."),
|
|
@@ -117,6 +289,19 @@ const NET = [
|
|
|
117
289
|
f("posts", "--ky-net", "The posts and the singles sticks."),
|
|
118
290
|
f("antennae", "--ky-red", "The antennae of a volleyball net."),
|
|
119
291
|
];
|
|
292
|
+
const APRON_COURT = [f("apron", "--ky-apron", "The ground round the court."), f("court", "--ky-surface", "The court."), f("lines", LINE, "The painted lines.")];
|
|
293
|
+
/** A padel court: the net's features, and the walls and the metal fence of its enclosure. */
|
|
294
|
+
const PADEL = [...NET, f("walls", "--ky-wall", "The walls of the enclosure."), f("fence", "--ky-mesh", "The metal fence between the walls.")];
|
|
295
|
+
/** A squash court: no net, walls round it, and its front wall laid flat beside it, with its tin. */
|
|
296
|
+
const SQUASH = [...APRON_COURT, f("walls", "--ky-wall", "The walls round the court."), f("wall-face", "--ky-face", "The front wall, laid flat beside the court."), f("tin", "--ky-tin", "The tin, on the front wall."), f("wall-lines", "--ky-wall-line", "The lines on the front wall.")];
|
|
297
|
+
/** A racquetball court: no net, and walls round it. */
|
|
298
|
+
const RACQUETBALL = [...APRON_COURT, f("walls", "--ky-wall", "The walls round the court.")];
|
|
299
|
+
/** A teqball court: the net, the table, and the court surrounds. */
|
|
300
|
+
const TEQBALL = [...APRON_COURT, f("net", "--ky-net", "The net."), f("table", "--ky-table", "The teqball table."), f("walls", "--ky-wall", "The court surrounds.")];
|
|
301
|
+
/** A roundnet court: the ground, the lines (the circles and the service marks), and the set. */
|
|
302
|
+
const ROUNDNET = [...APRON_COURT, f("net", "--ky-net", "The set: its rim.")];
|
|
303
|
+
/** A netball court: the ground and free zone, the lines and circles, and the goalposts. */
|
|
304
|
+
const NETBALL = [f("apron", "--ky-apron", "The ground round the court."), f("free-zone", "--ky-free", "The court surround."), f("court", "--ky-surface", "The court."), f("lines", LINE, "The painted lines and circles."), f("posts", "--ky-net", "The goalposts.")];
|
|
120
305
|
const TURF = [f("apron", "--ky-apron", "The ground round the surface."), f("turf", "--ky-surface", "The grass."), f("mowing", "--ky-surface-alt", "The lighter tone of the mown pattern.")];
|
|
121
306
|
const POST = "--ky-post";
|
|
122
307
|
const RUGBY = [
|
|
@@ -217,11 +402,22 @@ export const FEATURE_INFO = Object.freeze({
|
|
|
217
402
|
mlb: BASEBALL,
|
|
218
403
|
soccer: SOCCER,
|
|
219
404
|
curling: CURLING,
|
|
405
|
+
swimming: SWIMMING,
|
|
406
|
+
waterpolo: WATER_POLO,
|
|
407
|
+
diving: DIVING,
|
|
408
|
+
artisticswimming: ARTISTIC_SWIMMING,
|
|
220
409
|
tennis: NET,
|
|
221
410
|
volleyball: NET,
|
|
222
411
|
badminton: NET,
|
|
223
412
|
pickleball: NET,
|
|
224
413
|
tabletennis: NET,
|
|
414
|
+
padel: PADEL,
|
|
415
|
+
squash: SQUASH,
|
|
416
|
+
racquetball: RACQUETBALL,
|
|
417
|
+
sepaktakraw: NET,
|
|
418
|
+
teqball: TEQBALL,
|
|
419
|
+
roundnet: ROUNDNET,
|
|
420
|
+
netball: NETBALL,
|
|
225
421
|
lacrosse: LACROSSE,
|
|
226
422
|
rugby: RUGBY,
|
|
227
423
|
afl: AFL,
|
|
@@ -229,6 +425,14 @@ export const FEATURE_INFO = Object.freeze({
|
|
|
229
425
|
cricket: CRICKET,
|
|
230
426
|
fieldhockey: FIELD_HOCKEY,
|
|
231
427
|
handball: HANDBALL,
|
|
428
|
+
athletics: ATHLETICS,
|
|
429
|
+
skating: SKATING,
|
|
430
|
+
judo: JUDO,
|
|
431
|
+
karate: KARATE,
|
|
432
|
+
kendo: KENDO,
|
|
433
|
+
sumo: SUMO,
|
|
434
|
+
kyudo: KYUDO,
|
|
435
|
+
dojo: DOJO,
|
|
232
436
|
});
|
|
233
437
|
/**
|
|
234
438
|
* The names of the features of each sport: the keys `featureColors` takes. Football's three fields have the same, and so have the five net sports.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { SurfaceOptions } from "./types.ts";
|
|
2
|
+
/** The `data-box` and `data-rules` of a drawing's surface group, or nothing for a drawing the question does not apply to (a special game). */
|
|
3
|
+
export declare function fieldAttributes(o: SurfaceOptions): {
|
|
4
|
+
"data-box"?: string;
|
|
5
|
+
"data-rules"?: string;
|
|
6
|
+
};
|
|
7
|
+
/** The box and the options a surface group carries, or `undefined` when it carries none. */
|
|
8
|
+
export declare function readField(get: (name: string) => string | null): {
|
|
9
|
+
box: {
|
|
10
|
+
x: number;
|
|
11
|
+
y: number;
|
|
12
|
+
w: number;
|
|
13
|
+
h: number;
|
|
14
|
+
};
|
|
15
|
+
rules: Record<string, unknown>;
|
|
16
|
+
} | undefined;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
// What a drawing writes on its surface group so that a page can ask the drawing where a click is (pointer.ts): the box of the playing surface in feet in the
|
|
2
|
+
// drawing's wide frame, and the few options that decide its rules (the league, the season, the park, the pitch). The group's own `transform` is the quarter turn of a
|
|
3
|
+
// tall drawing, so its coordinates are always the wide frame's, whatever the drawing's shape on the page.
|
|
4
|
+
import { num } from "./format.js";
|
|
5
|
+
import { outlineOf } from "./outline.js";
|
|
6
|
+
const SIMPLE = ["league", "year", "pitch", "park", "fence", "units", "field"];
|
|
7
|
+
const COMPLEX = ["sheet", "net", "pool", "athletics", "skating"];
|
|
8
|
+
/** The longest the options that hold data of their own (a pool's race, an athletics meeting) may be, written out, before the drawing leaves them out of the page. */
|
|
9
|
+
const MOST = 600;
|
|
10
|
+
/** The `data-box` and `data-rules` of a drawing's surface group, or nothing for a drawing the question does not apply to (a special game). */
|
|
11
|
+
export function fieldAttributes(o) {
|
|
12
|
+
if (o.host !== undefined)
|
|
13
|
+
return {};
|
|
14
|
+
try {
|
|
15
|
+
const { box } = outlineOf(o);
|
|
16
|
+
const rules = {};
|
|
17
|
+
for (const key of SIMPLE)
|
|
18
|
+
if (o[key] !== undefined)
|
|
19
|
+
rules[key] = o[key];
|
|
20
|
+
for (const key of COMPLEX)
|
|
21
|
+
if (o[key] !== undefined && JSON.stringify(o[key]).length <= MOST)
|
|
22
|
+
rules[key] = o[key];
|
|
23
|
+
return { "data-box": [box.x, box.y, box.w, box.h].map(num).join(" "), "data-rules": Object.keys(rules).length === 0 ? undefined : JSON.stringify(rules) };
|
|
24
|
+
}
|
|
25
|
+
catch {
|
|
26
|
+
return {};
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
/** The box and the options a surface group carries, or `undefined` when it carries none. */
|
|
30
|
+
export function readField(get) {
|
|
31
|
+
const raw = get("data-box");
|
|
32
|
+
if (raw === null)
|
|
33
|
+
return undefined;
|
|
34
|
+
const [x, y, w, h] = raw.split(" ").map(Number);
|
|
35
|
+
if (![x, y, w, h].every(Number.isFinite))
|
|
36
|
+
return undefined;
|
|
37
|
+
let rules = {};
|
|
38
|
+
const text = get("data-rules");
|
|
39
|
+
if (text !== null) {
|
|
40
|
+
try {
|
|
41
|
+
const parsed = JSON.parse(text);
|
|
42
|
+
if (typeof parsed === "object" && parsed !== null && !Array.isArray(parsed))
|
|
43
|
+
rules = parsed;
|
|
44
|
+
}
|
|
45
|
+
catch {
|
|
46
|
+
rules = {};
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
return { box: { x, y, w, h }, rules };
|
|
50
|
+
}
|
package/dist/fields.kit.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ArcShape, BarShape, BoxShape, Dash, DotShape, LineShape, Outline, PathShape, PolyShape, RingShape } from "./fields.types.ts";
|
|
1
|
+
import type { AthleticsMark, SkatingMark, BudoMark, ArcShape, BarShape, BoxShape, Dash, DotShape, LineShape, Outline, PathShape, PolyShape, RingShape } from "./fields.types.ts";
|
|
2
2
|
import type { Span } from "./leagues/fields.ts";
|
|
3
3
|
import { type PlateSpot, type Zone } from "./surfaces/surface.ts";
|
|
4
4
|
import type { Box } from "./types.ts";
|
|
@@ -8,7 +8,7 @@ interface Style {
|
|
|
8
8
|
dash?: Dash;
|
|
9
9
|
/** The least this shape is drawn at, in feet, when the drawing is not at the true widths (a crease on a pitch has to stay thin beside a ground). */
|
|
10
10
|
least?: number;
|
|
11
|
-
cls?: "ky-line" | "ky-red";
|
|
11
|
+
cls?: "ky-line" | "ky-red" | AthleticsMark | SkatingMark | BudoMark;
|
|
12
12
|
}
|
|
13
13
|
/** A line from one point to another. */
|
|
14
14
|
export declare const line: (id: string, feature: string, x0: number, y0: number, x1: number, y1: number, style?: Style) => LineShape;
|
package/dist/fields.types.d.ts
CHANGED
|
@@ -13,9 +13,19 @@ interface Stroked extends Named {
|
|
|
13
13
|
dash?: Dash;
|
|
14
14
|
/** The least this shape is drawn at, in feet, when the drawing is not at true widths: the plan's `drawnLine` when missing. */
|
|
15
15
|
least?: number;
|
|
16
|
-
/** The class it is painted with: the ordinary line (`ky-line`, white) unless it is a red line (`ky-red`). */
|
|
17
|
-
cls?: "ky-line" | "ky-red";
|
|
16
|
+
/** The class it is painted with: the ordinary line (`ky-line`, white) unless it is a red line (`ky-red`), or one of athletics' coloured marks (yellow, blue, green, black or red). */
|
|
17
|
+
cls?: "ky-line" | "ky-red" | AthleticsMark | SkatingMark | BudoMark;
|
|
18
18
|
}
|
|
19
|
+
/** The coloured marks of an athletics track: the yellow of the 4 x 100 m's takeover zones, the blue of the 4 x 400 m's and the 110 m hurdles (red on a blue track), the green of the 400 m hurdles and the breakline, black marks and red ones. */
|
|
20
|
+
/** The fills of an athletics track's coloured marks (a bar of yellow, blue, green, black or red). */
|
|
21
|
+
export type AthleticsFill = "ky-ath-y-fill" | "ky-ath-b-fill" | "ky-ath-g-fill" | "ky-ath-k-fill" | "ky-ath-r-fill";
|
|
22
|
+
export type AthleticsMark = "ky-ath-y" | "ky-ath-b" | "ky-ath-g" | "ky-ath-k" | "ky-ath-r" | "ky-ath-s";
|
|
23
|
+
/** The coloured marks of a skating rink: the blue lines that demarcate the lanes, the red starting, finishing and coaches' lines, black lines, the dotted blocks of a curve. */
|
|
24
|
+
export type SkatingMark = "ky-ska-b" | "ky-ska-r" | "ky-ska-k" | "ky-ska-blocks";
|
|
25
|
+
/** The coloured marks of a budō surface: the white line, the blue, white and red tape, the seam between mats. */
|
|
26
|
+
/** The fills of a budō surface's tape: blue, white, red and ink. */
|
|
27
|
+
export type BudoFill = "ky-bud-blue-fill" | "ky-bud-white-fill" | "ky-bud-red-fill" | "ky-bud-ink-fill";
|
|
28
|
+
export type BudoMark = "ky-bud-line" | "ky-bud-blue" | "ky-bud-white" | "ky-bud-red" | "ky-bud-seam" | "ky-bud-ink";
|
|
19
29
|
/** A line from one point to another. */
|
|
20
30
|
export interface LineShape extends Stroked {
|
|
21
31
|
kind: "line";
|
|
@@ -62,11 +72,13 @@ export interface DotShape extends Named {
|
|
|
62
72
|
cy: number;
|
|
63
73
|
r: number;
|
|
64
74
|
/** The paint: the line's (`line`, the default), or the post's. */
|
|
65
|
-
paint?: "line" | "post";
|
|
75
|
+
paint?: "line" | "post" | "block" | "cone";
|
|
66
76
|
}
|
|
67
77
|
/** A rectangle filled in the line's colour: a short thick mark. */
|
|
68
78
|
export interface BarShape extends Named {
|
|
69
79
|
kind: "bar";
|
|
80
|
+
/** The class it is filled with, when it is not the line's colour. */
|
|
81
|
+
cls?: "ky-fill-line" | AthleticsFill | BudoFill;
|
|
70
82
|
x0: number;
|
|
71
83
|
y0: number;
|
|
72
84
|
x1: number;
|
|
@@ -79,9 +91,17 @@ export interface PathShape extends Stroked {
|
|
|
79
91
|
}
|
|
80
92
|
/** Every shape that is a marking. */
|
|
81
93
|
export type Shape = LineShape | ArcShape | RingShape | BoxShape | PolyShape | DotShape | BarShape | PathShape;
|
|
94
|
+
/** The areas of an athletics stadium: the track, the grass, the sand of a pit, the mat of a jump, the water of a pit, the concrete of a circle and a runway's cover. */
|
|
95
|
+
/** The areas of a skating rink: the ice, the floor of the infield, the warm-up lane, the padding and the furniture. */
|
|
96
|
+
export type SkatingArea = "ky-ska-ice" | "ky-ska-floor" | "ky-ska-warm" | "ky-ska-pad" | "ky-ska-desk" | "ky-ska-kiss";
|
|
97
|
+
/** The areas of a budō surface: the mats in three tones, the heri of a mat, the floor, the walls, the platform and the furniture, the clay and the sand and the straw of a dohyō, the azuchi and the yamichi. */
|
|
98
|
+
export type BudoArea = "ky-bud-t1" | "ky-bud-t2" | "ky-bud-t3" | "ky-bud-heri" | "ky-bud-floor" | "ky-bud-wall" | "ky-bud-window" | "ky-bud-door" | "ky-bud-platform" | "ky-bud-free" | "ky-bud-desk" | "ky-bud-clay" | "ky-bud-sand" | "ky-bud-tawara" | "ky-bud-azuchi" | "ky-bud-roof" | "ky-bud-yamichi" | "ky-bud-shrine" | "ky-bud-dais" | "ky-bud-banner" | "ky-bud-lane" | "ky-bud-mato" | "ky-bud-tassel-e" | "ky-bud-tassel-s" | "ky-bud-tassel-w" | "ky-bud-tassel-n" | "ky-bud-seat";
|
|
99
|
+
export type AthleticsArea = "ky-ath-track" | "ky-ath-grass" | "ky-ath-sand" | "ky-ath-mat" | "ky-ath-water" | "ky-ath-concrete" | "ky-ath-pad" | "ky-ath-board" | "ky-ath-bank";
|
|
82
100
|
/** A painted area, under the lines: a rectangle or an ellipse filled with a class of the stylesheet (`ky-area`, the tint of a goal area, or `ky-zone`). */
|
|
83
101
|
export interface Area extends Named {
|
|
84
|
-
cls: "ky-area" | "ky-zone" | "ky-dirt" | "ky-key" | "ky-boards";
|
|
102
|
+
cls: "ky-area" | "ky-zone" | "ky-dirt" | "ky-key" | "ky-boards" | AthleticsArea | SkatingArea | BudoArea;
|
|
103
|
+
/** Fill the path's insides by the even-odd rule: a ring (the track between its kerb and its outer edge). */
|
|
104
|
+
evenodd?: boolean;
|
|
85
105
|
/** A rectangle `[x0, y0, x1, y1]`, an ellipse's centre and radii, a path of your own, or a frame: the ring between a rounded rectangle and the one `thick` outside it (boards). */
|
|
86
106
|
rect?: readonly [x0: number, y0: number, x1: number, y1: number];
|
|
87
107
|
ellipse?: readonly [cx: number, cy: number, rx: number, ry: number];
|
package/dist/formations.js
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
|
+
// Formations (the first five sports' here, the others' in formations.sports.ts): where the players of a team stand, as named positions in a registered coordinate frame, so that a formation lies on a surface of any
|
|
2
|
+
// size and can be read back in a provider's own numbers. The positions are the usual ones of each sport, and the numbers are ours: a formation is a
|
|
3
|
+
// convention that coaches draw a little differently each time, so each place is an example of the shape and not a measurement. The names of the
|
|
4
|
+
// positions are the conventional ones; the rulebooks name few of them (the Laws of the Game, Law 3, name the goalkeeper and no other position; the
|
|
5
|
+
// Official Baseball Rules name the nine fielders, whose numbers 1 to 9 are the scorer's). The sources are in docs/sources.md.
|
|
6
|
+
import { DESIGNATED_HITTER, MORE_FORMATIONS, MORE_NAMES } from "./formations.sports.js";
|
|
1
7
|
const named = (en, ja) => ({ en, ja });
|
|
2
|
-
/** The names of the positions of
|
|
3
|
-
|
|
8
|
+
/** The names of the positions of the first five sports (the others are in formations.sports.ts), by the id a formation uses for them. */
|
|
9
|
+
const FIRST_NAMES = {
|
|
4
10
|
soccer: {
|
|
5
11
|
GK: named("Goalkeeper", "ゴールキーパー"),
|
|
6
12
|
RB: named("Right back", "右サイドバック"),
|
|
@@ -83,7 +89,9 @@ export const POSITION_NAMES = Object.freeze({
|
|
|
83
89
|
CF: named("Centre fielder", "センター"),
|
|
84
90
|
RF: named("Right fielder", "ライト"),
|
|
85
91
|
},
|
|
86
|
-
}
|
|
92
|
+
};
|
|
93
|
+
/** The names of the positions of each sport, by the id a formation uses for them. */
|
|
94
|
+
export const POSITION_NAMES = Object.freeze(Object.fromEntries(["soccer", "nhl", "nba", "nfl", "mlb", "rugby", "afl", "cricket", "volleyball", "handball", "waterpolo", "fieldhockey", "netball"].map((sport) => [sport, Object.freeze({ ...FIRST_NAMES[sport], ...MORE_NAMES[sport] })])));
|
|
87
95
|
const at = (id, x, y) => ({ id, x, y });
|
|
88
96
|
// Soccer, in the `opta` frame: x runs 0 to 100 from the team's own goal to the one it attacks, y runs 0 to 100 up the page, so the team's right flank is the low y.
|
|
89
97
|
const GK = at("GK", 5, 50);
|
|
@@ -149,7 +157,7 @@ export const FORMATIONS = Object.freeze(Object.fromEntries([
|
|
|
149
157
|
id: "football-i-formation",
|
|
150
158
|
sport: "nfl",
|
|
151
159
|
frame: "nfl-tracking",
|
|
152
|
-
name: { en: "Football, I formation", ja: "
|
|
160
|
+
name: { en: "Football, I formation", ja: "アメフト(Iフォーメーション)" },
|
|
153
161
|
about: { en: "Offence: the quarterback under centre with the fullback and the halfback in a line behind him, a tight end and two wide receivers.", ja: "オフェンス。センターの真後ろにクォーターバック、その後ろにフルバックとハーフバックが縦一列、タイトエンド1人とワイドレシーバー2人。" },
|
|
154
162
|
positions: [...LINE, at("QB", 58.8, 26.67), at("FB", 55, 26.67), at("HB", 52, 26.67), at("TE", 60, 22.4), at("WR1", 60, 50), at("WR2", 58.5, 4)],
|
|
155
163
|
},
|
|
@@ -157,7 +165,7 @@ export const FORMATIONS = Object.freeze(Object.fromEntries([
|
|
|
157
165
|
id: "football-shotgun",
|
|
158
166
|
sport: "nfl",
|
|
159
167
|
frame: "nfl-tracking",
|
|
160
|
-
name: { en: "Football, shotgun", ja: "
|
|
168
|
+
name: { en: "Football, shotgun", ja: "アメフト(ショットガン)" },
|
|
161
169
|
about: { en: "Offence: the quarterback a few yards behind the centre with a halfback beside him, a tight end and three wide receivers.", ja: "オフェンス。クォーターバックはセンターの数ヤード後ろに下がり、隣にハーフバック、タイトエンド1人とワイドレシーバー3人。" },
|
|
162
170
|
positions: [...LINE, at("QB", 54, 26.67), at("HB", 54, 30), at("TE", 60, 22.4), at("WR1", 60, 50), at("WR2", 59, 5), at("WR3", 59, 41)],
|
|
163
171
|
},
|
|
@@ -165,7 +173,7 @@ export const FORMATIONS = Object.freeze(Object.fromEntries([
|
|
|
165
173
|
id: "football-4-3",
|
|
166
174
|
sport: "nfl",
|
|
167
175
|
frame: "nfl-tracking",
|
|
168
|
-
name: { en: "Football, 4-3 defence", ja: "
|
|
176
|
+
name: { en: "Football, 4-3 defence", ja: "アメフト(4-3ディフェンス)" },
|
|
169
177
|
about: { en: "Defence against an offence going right: four linemen, three linebackers, two cornerbacks and two safeties. Left and right are the defenders' own.", ja: "右へ進むオフェンスに対するディフェンス。ディフェンスライン4人、ラインバッカー3人、コーナーバック2人、セーフティ2人。左右はディフェンス側から見たものです。" },
|
|
170
178
|
positions: [at("LDE", 61, 20), at("LDT", 61, 25), at("RDT", 61, 28.4), at("RDE", 61, 33), at("LLB", 65, 17), at("MLB", 65, 26.67), at("RLB", 65, 36), at("LCB", 65, 5), at("RCB", 65, 48), at("FS", 72, 33), at("SS", 72, 20)],
|
|
171
179
|
},
|
|
@@ -173,7 +181,7 @@ export const FORMATIONS = Object.freeze(Object.fromEntries([
|
|
|
173
181
|
id: "football-3-4",
|
|
174
182
|
sport: "nfl",
|
|
175
183
|
frame: "nfl-tracking",
|
|
176
|
-
name: { en: "Football, 3-4 defence", ja: "
|
|
184
|
+
name: { en: "Football, 3-4 defence", ja: "アメフト(3-4ディフェンス)" },
|
|
177
185
|
about: { en: "Defence against an offence going right: three linemen, four linebackers, two cornerbacks and two safeties. Left and right are the defenders' own.", ja: "右へ進むオフェンスに対するディフェンス。ディフェンスライン3人、ラインバッカー4人、コーナーバック2人、セーフティ2人。左右はディフェンス側から見たものです。" },
|
|
178
186
|
positions: [at("LDE", 61, 21), at("NT", 61, 26.67), at("RDE", 61, 32), at("LOLB", 64.5, 15), at("LILB", 64.5, 23), at("RILB", 64.5, 30.5), at("ROLB", 64.5, 38), at("LCB", 65, 5), at("RCB", 65, 48), at("FS", 72, 33), at("SS", 72, 20)],
|
|
179
187
|
},
|
|
@@ -184,6 +192,7 @@ export const FORMATIONS = Object.freeze(Object.fromEntries([
|
|
|
184
192
|
name: { en: "Baseball, standard defence", ja: "野球(通常の守備位置)" },
|
|
185
193
|
about: { en: "The nine fielders where they usually stand: a straight infield and the outfielders in their fields.", ja: "9人の野手の定位置。内野はシフトなしで、外野手はそれぞれ自分の守備範囲に立ちます。" },
|
|
186
194
|
positions: [at("P", 0, 60.5), at("C", 0, -3), at("1B", 70, 78), at("2B", 36, 140), at("SS", -36, 140), at("3B", -70, 78), at("LF", -120, 260), at("CF", 0, 290), at("RF", 120, 260)],
|
|
195
|
+
extra: DESIGNATED_HITTER,
|
|
187
196
|
},
|
|
188
197
|
{
|
|
189
198
|
id: "baseball-shift",
|
|
@@ -192,7 +201,9 @@ export const FORMATIONS = Object.freeze(Object.fromEntries([
|
|
|
192
201
|
name: { en: "Baseball, infield shift against a left-handed pull hitter", ja: "野球(左打者の引っ張り対策の内野シフト)" },
|
|
193
202
|
about: { en: "Three infielders on the right side of second base and the outfield turned the same way. Since 2023 MLB's Rule 5.02 requires two infielders on each side of second base, so this shift is not allowed there.", ja: "二塁ベースの一塁側に内野手3人が寄り、外野手も同じ方向に寄った守備。2023年から、MLBの規則5.02は二塁ベースの一塁側と三塁側に内野手を2人ずつ置くことを求めているため、MLBではこのシフトは認められません。" },
|
|
194
203
|
positions: [at("P", 0, 60.5), at("C", 0, -3), at("1B", 82, 92), at("2B", 60, 175), at("SS", 24, 135), at("3B", -34, 138), at("LF", -70, 275), at("CF", 60, 295), at("RF", 135, 270)],
|
|
204
|
+
extra: DESIGNATED_HITTER,
|
|
195
205
|
},
|
|
206
|
+
...MORE_FORMATIONS,
|
|
196
207
|
].map((f) => [f.id, f])));
|
|
197
208
|
/** The ids of the formations, in the order of the table. */
|
|
198
209
|
export const FORMATION_IDS = Object.freeze(Object.keys(FORMATIONS));
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Named } from "./formations.ts";
|
|
2
|
+
import type { Formation, FormationPosition, FormationSport } from "./team.types.ts";
|
|
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 declare const MORE_NAMES: Readonly<Partial<Record<FormationSport, Readonly<Record<string, Named>>>>>;
|
|
5
|
+
/** The formations of this file, in the order of the table that holds them. */
|
|
6
|
+
export declare const MORE_FORMATIONS: readonly Formation[];
|
|
7
|
+
/** The designated hitter's place, which `baseball-standard` and `baseball-shift` list and do not field. */
|
|
8
|
+
export declare const DESIGNATED_HITTER: readonly FormationPosition[];
|