@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/layers.js
CHANGED
|
@@ -3,12 +3,14 @@
|
|
|
3
3
|
// table that stands for the drawing. Every mark is a plain SVG element in the drawing's own frame, so the same options always give
|
|
4
4
|
// the same string. Written for this package; mplsoccer and hockey_rink were read for the list of charts to match, and nothing of
|
|
5
5
|
// either is used.
|
|
6
|
-
import { safeColour
|
|
6
|
+
import { safeColour } from "./colour.js";
|
|
7
|
+
import { withEmblems } from "./emblems-source.js";
|
|
8
|
+
import { safeLogo } from "./logo.js";
|
|
7
9
|
import { FRAMES } from "./frames.js";
|
|
8
10
|
import { KYOGIJO_HEAT_STYLE, KYOGIJO_TEAM_STYLE } from "./style.js";
|
|
9
11
|
import { drawTeam, isTeamLayer, teamTables } from "./team.layers.js";
|
|
10
12
|
import { drawHeat, drawLegend, heatTable } from "./heat.js";
|
|
11
|
-
import { clamp01, envFor, isNum, newMade, opacityOf, own, place, toArray, unitOfLayer } from "./layers.env.js";
|
|
13
|
+
import { clamp01, envFor, isNum, markAttrs, newMade, opacityOf, own, place, toArray, unitOfLayer } from "./layers.env.js";
|
|
12
14
|
import { safeClass } from "./common.js";
|
|
13
15
|
import { esc, num } from "./format.js";
|
|
14
16
|
import { curveBetween, curvePath, headPath, isPolygon, polylinePath, rampColour, shapePath, taperPath, wavePath, } from "./layers.marks.js";
|
|
@@ -136,12 +138,12 @@ function drawPoints(layer, env) {
|
|
|
136
138
|
const w = (isNum(d.size) && d.size > 0 ? d.size * k : sizeFn === undefined ? fixed : Math.max(0.05, sizeFn(d.value) * k)) * (outcome.scale ?? 1);
|
|
137
139
|
const { cls, css } = colourAttrs(colourFor(style.fill, d, NEUTRAL, domain), layerExpr, NEUTRAL);
|
|
138
140
|
const classes = `${cls}${outcome.hollow === true ? `${cls === "" ? "" : " "}ky-hol` : ""}`;
|
|
139
|
-
const open = attrs(classes, css, opacityOf(d.opacity));
|
|
141
|
+
const open = attrs(classes, css, opacityOf(d.opacity)) + markAttrs(env, d.id, i, [x, y]);
|
|
140
142
|
const role = d.team === "home" ? "home" : d.team === "away" ? "away" : undefined;
|
|
141
143
|
const logo = shape === "logo" ? safeLogo(d.logo) ?? (role === undefined ? undefined : safeLogo(style.logos?.[role]) ?? env.logos[role]) : undefined;
|
|
142
144
|
if (logo !== undefined) {
|
|
143
145
|
const side = w * 1.8;
|
|
144
|
-
out.push(titled("image", `${open} href="${esc(logo)}" x="${num(x - side / 2)}" y="${num(y - side / 2)}" width="${num(side)}" height="${num(side)}" preserveAspectRatio="xMidYMid meet"${env.
|
|
146
|
+
out.push(titled("image", `${open} href="${esc(logo)}" x="${num(x - side / 2)}" y="${num(y - side / 2)}" width="${num(side)}" height="${num(side)}" preserveAspectRatio="xMidYMid meet"${env.back !== 0 ? ` transform="rotate(${num(env.back)} ${num(x)} ${num(y)})"` : ""}`, d.title));
|
|
145
147
|
}
|
|
146
148
|
else if (shape !== "logo" && isPolygon(shape))
|
|
147
149
|
out.push(titled("path", `${open} d="${shapePath(shape, x, y, w, env.turned)}"`, d.title));
|
|
@@ -258,13 +260,15 @@ function drawLines(layer, env, index) {
|
|
|
258
260
|
const headEl = head === "" ? "" : `<path class="${headKind === "open" ? "ky-ln" : "ky-ah"}" d="${head}"${headKind === "open" ? ` stroke-width="${num(w)}"` : ""}/>`;
|
|
259
261
|
const title = typeof d.title === "string" && d.title !== "" ? `<title>${esc(d.title)}</title>` : "";
|
|
260
262
|
const opacity = opacityOf(d.opacity);
|
|
263
|
+
// Where it starts is its zone; where it ends is `data-zone-end`.
|
|
264
|
+
const marks = env.marks ? markAttrs(env, d.id, i, first) + (env.zone(last[0], last[1]) === undefined ? "" : ` data-zone-end="${esc(env.zone(last[0], last[1]))}"`) : "";
|
|
261
265
|
// A line with a head is a group (its colour and opacity on the group); a line alone carries them itself.
|
|
262
266
|
const wrap = headEl !== "";
|
|
263
267
|
const pathClass = [shaftClass, wrap ? "" : cls].filter((c) => c !== "").join(" ");
|
|
264
268
|
const pathStyle = [wrap ? "" : css, gradient].filter((c) => c !== "").join(";");
|
|
265
|
-
const pathOpen = `${attrs(pathClass, pathStyle, wrap ? undefined : opacity)} d="${shaft}"${tapered === undefined ? strokeWidth + dashes : ""}`;
|
|
269
|
+
const pathOpen = `${attrs(pathClass, pathStyle, wrap ? undefined : opacity)}${wrap ? "" : marks} d="${shaft}"${tapered === undefined ? strokeWidth + dashes : ""}`;
|
|
266
270
|
if (wrap)
|
|
267
|
-
out.push(`<g${attrs(cls, css, opacity)}>${title}<path${pathOpen}/>${headEl}</g>`);
|
|
271
|
+
out.push(`<g${attrs(cls, css, opacity)}${marks}>${title}<path${pathOpen}/>${headEl}</g>`);
|
|
268
272
|
else
|
|
269
273
|
out.push(title === "" ? `<path${pathOpen}/>` : `<path${pathOpen}>${title}</path>`);
|
|
270
274
|
});
|
|
@@ -307,14 +311,19 @@ function drawText(layer, env) {
|
|
|
307
311
|
const { cls, css } = colourAttrs(colourFor(style.color, d, INK, domain), layerExpr, INK);
|
|
308
312
|
const anchor = d.anchor === "start" || d.anchor === "middle" || d.anchor === "end" ? d.anchor : base;
|
|
309
313
|
// The letters are turned back by the quarter the surface was turned, so that they read upright, and by the caller's own turn on top.
|
|
310
|
-
const angle =
|
|
314
|
+
const angle = env.back + (isNum(d.rotate) ? d.rotate : 0);
|
|
311
315
|
const classes = ["ky-lt", style.halo === false ? "ky-nh" : "", cls].filter((c) => c !== "").join(" ");
|
|
312
|
-
const open = `${attrs(classes, `${s === size ? "" : `font-size:${num(s)}px`}${s !== size && css !== "" ? ";" : ""}${css}`, opacityOf(d.opacity))}${anchor === base ? "" : ` text-anchor="${anchor}"`} x="${num(x)}" y="${num(y + s * 0.36)}"${angle === 0 ? "" : ` transform="rotate(${num(angle)} ${num(x)} ${num(y)})"`}`;
|
|
316
|
+
const open = `${attrs(classes, `${s === size ? "" : `font-size:${num(s)}px`}${s !== size && css !== "" ? ";" : ""}${css}`, opacityOf(d.opacity))}${markAttrs(env, d.id, i, [x, y])}${anchor === base ? "" : ` text-anchor="${anchor}"`} x="${num(x)}" y="${num(y + s * 0.36)}"${angle === 0 ? "" : ` transform="rotate(${num(angle)} ${num(x)} ${num(y)})"`}`;
|
|
313
317
|
out.push(`<text${open}>${esc(String(d.text))}${typeof d.title === "string" && d.title !== "" ? `<title>${esc(d.title)}</title>` : ""}</text>`);
|
|
314
318
|
});
|
|
315
319
|
made.marks = out.join("");
|
|
316
320
|
return made;
|
|
317
321
|
}
|
|
322
|
+
/**
|
|
323
|
+
* True when a datum of the layer has an `id`: the caller means to find its marks again. Not for the team layers, whose data have always had an `id` of their own (the player's, for a label and a table),
|
|
324
|
+
* so that a drawing made before the marks had ids is the same text now.
|
|
325
|
+
*/
|
|
326
|
+
const hasIds = (layer) => !isTeamLayer(layer) && Array.isArray(layer.data) && (layer.data).some((d) => typeof d === "object" && d !== null && d.id !== undefined);
|
|
318
327
|
const plural = (words, kind, n) => words[`${kind === "lines" ? "line" : kind === "arrows" ? "arrow" : kind === "text" ? "text" : "point"}${n === 1 ? "One" : "Many"}`];
|
|
319
328
|
const tidy = (text) => text.replace(/[.。]\s*$/, "");
|
|
320
329
|
/** A list of counts, `goal 3, shot 21`, the most first. */
|
|
@@ -348,12 +357,16 @@ function summarise(layer, made, words, stop, gap) {
|
|
|
348
357
|
return { title, description: parts.join(gap) };
|
|
349
358
|
}
|
|
350
359
|
/** The layers of a drawing as markup, and a sentence for each. `turned` says whether the surface group is turned a quarter. */
|
|
351
|
-
export function renderLayers(o, layers, turned, range) {
|
|
360
|
+
export function renderLayers(o, layers, turned, range, upright, zone) {
|
|
361
|
+
return withEmblems(o.emblems, () => renderedLayers(o, layers, turned, range, upright, zone));
|
|
362
|
+
}
|
|
363
|
+
function renderedLayers(o, layers, turned, range, upright, zone) {
|
|
352
364
|
if (layers === undefined || layers.length === 0)
|
|
353
365
|
return { svg: "", summaries: [] };
|
|
354
366
|
if (!Array.isArray(layers))
|
|
355
367
|
throw new TypeError("layers is a list of layers");
|
|
356
|
-
const env = envFor(o, turned, range);
|
|
368
|
+
const env = envFor(o, turned, range, upright, zone);
|
|
369
|
+
const markedBy = env.marks;
|
|
357
370
|
const clipId = `${env.id}-lc`;
|
|
358
371
|
const { stop, gap } = env.words.said;
|
|
359
372
|
const said = [];
|
|
@@ -366,6 +379,8 @@ export function renderLayers(o, layers, turned, range) {
|
|
|
366
379
|
layers.forEach((layer, index) => {
|
|
367
380
|
if (typeof layer !== "object" || layer === null)
|
|
368
381
|
throw new TypeError(`layer ${index} is not a layer`);
|
|
382
|
+
// The marks are written with their ids, indexes and zones when the layer or the drawing asks, or when the caller gave a datum an id of its own.
|
|
383
|
+
env.marks = typeof layer.marks === "boolean" ? layer.marks : markedBy || hasIds(layer);
|
|
369
384
|
const name = safeClass(layer.id).replace(/ /g, "-");
|
|
370
385
|
const gid = name === "" ? `${env.id}-l${index}` : `${env.id}-${name}`;
|
|
371
386
|
const finish = (made) => {
|
|
@@ -375,7 +390,8 @@ export function renderLayers(o, layers, turned, range) {
|
|
|
375
390
|
return;
|
|
376
391
|
const { title, description } = summarise(layer, made, env.words.layers, stop, gap);
|
|
377
392
|
said[index] = description === "" ? `${tidy(title)}${stop}` : `${tidy(title)}${stop}${gap}${description}`;
|
|
378
|
-
|
|
393
|
+
// A lineup is not cut to the outline unless it is asked to be: a fielder at the foul line or a catcher behind the plate would lose half a jersey.
|
|
394
|
+
const clip = layer.kind !== "legend" && (layer.clip === "surface" || (layer.clip !== "none" && layer.kind !== "lineup"));
|
|
379
395
|
clipped = clipped || clip;
|
|
380
396
|
const cls = made.cls ?? (layer.kind === "points" ? "ky-pts" : layer.kind === "text" ? "ky-txt" : "ky-lns");
|
|
381
397
|
// Cropped to a range, a clipped layer is also cut to the range: its group is held by a group with the range's clip.
|
|
@@ -403,6 +419,7 @@ export function renderLayers(o, layers, turned, range) {
|
|
|
403
419
|
return;
|
|
404
420
|
case "network":
|
|
405
421
|
case "formation":
|
|
422
|
+
case "lineup":
|
|
406
423
|
case "voronoi":
|
|
407
424
|
case "delaunay":
|
|
408
425
|
case "hull":
|
|
@@ -415,7 +432,7 @@ export function renderLayers(o, layers, turned, range) {
|
|
|
415
432
|
slots[index] = () => finish(drawLegend(layer, env, gid, known));
|
|
416
433
|
return;
|
|
417
434
|
default:
|
|
418
|
-
throw new TypeError(`layer ${index} has the kind "${String(layer.kind)}": use points, lines, arrows, text, network, formation, voronoi, delaunay, hull, flow, sonar, heatmap, hexbin, zones, contour or legend`);
|
|
435
|
+
throw new TypeError(`layer ${index} has the kind "${String(layer.kind)}": use points, lines, arrows, text, network, formation, lineup, voronoi, delaunay, hull, flow, sonar, heatmap, hexbin, zones, contour or legend`);
|
|
419
436
|
}
|
|
420
437
|
});
|
|
421
438
|
slots.forEach((later) => later?.());
|
|
@@ -491,7 +508,7 @@ export function layerTable(layers, options = {}) {
|
|
|
491
508
|
return render(heatTable(layer, surfaceEnv), layer.kind);
|
|
492
509
|
if (surfaceEnv !== undefined && isTeamLayer(layer))
|
|
493
510
|
return teamTables(layer, surfaceEnv).map((t) => render(t, layer.kind)).join("");
|
|
494
|
-
const data = layer.kind === "formation" ? (layer.data ?? []) : toArray(layer.data, `layer ${index}`);
|
|
511
|
+
const data = layer.kind === "formation" ? (layer.data ?? []) : layer.kind === "lineup" ? (layer.players ?? []) : toArray(layer.data, `layer ${index}`);
|
|
495
512
|
const columns = [];
|
|
496
513
|
const has = (key) => data.some((d) => typeof d === "object" && d !== null && d[key] !== undefined && d[key] !== null);
|
|
497
514
|
const t = words.team;
|
|
@@ -501,6 +518,8 @@ export function layerTable(layers, options = {}) {
|
|
|
501
518
|
columns.push([t.tableFrom, "from", (d) => d.from], [t.tableTo, "to", (d) => d.to]);
|
|
502
519
|
if (layer.kind === "formation")
|
|
503
520
|
columns.push([t.tablePosition, "position", (d) => d.position], [t.tableNumber, "number", (d) => d.number], [t.tableName, "name", (d) => d.name]);
|
|
521
|
+
else if (layer.kind === "lineup")
|
|
522
|
+
columns.push([t.tablePosition, "pos", (d) => d.pos], [t.tableNumber, "number", (d) => d.number], [t.tableName, "name", (d) => d.name]);
|
|
504
523
|
else {
|
|
505
524
|
columns.push([w.tableX, "x", (d) => d.x]);
|
|
506
525
|
columns.push([w.tableY, "y", (d) => d.y]);
|
package/dist/layers.types.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ScoreOptions, SurfaceOptions } from "./types.ts";
|
|
2
2
|
import type { Frame, Attacking, Landmark, SurfaceSize } from "./frames.ts";
|
|
3
3
|
import type { ContourLayer, HeatmapLayer, HexbinLayer, LegendLayer, ZonesLayer } from "./heat.types.ts";
|
|
4
|
-
import type { DelaunayLayer, FlowLayer, FormationLayer, HullLayer, NetworkLayer, SonarLayer, VoronoiLayer } from "./team.types.ts";
|
|
4
|
+
import type { DelaunayLayer, FlowLayer, FormationLayer, HullLayer, LineupLayer, NetworkLayer, SonarLayer, VoronoiLayer } from "./team.types.ts";
|
|
5
5
|
import type { Unit } from "./units.ts";
|
|
6
6
|
/** The shapes a point can be drawn as. A team's logo is `logo`. */
|
|
7
7
|
export type MarkShape = "circle" | "square" | "triangle" | "diamond" | "cross" | "x" | "star";
|
|
@@ -45,6 +45,8 @@ export interface OutcomeStyle {
|
|
|
45
45
|
}
|
|
46
46
|
/** What every mark can carry. */
|
|
47
47
|
export interface MarkDatum {
|
|
48
|
+
/** Your id for the mark: written on it as `data-mark-id`, so that a listener can link it to a row of your table. The mark's index is written when there is none. */
|
|
49
|
+
id?: string | number;
|
|
48
50
|
/** The tooltip, and what a screen reader reads for the mark. */
|
|
49
51
|
title?: string;
|
|
50
52
|
/** `home`, `away` or another team. */
|
|
@@ -189,6 +191,11 @@ export interface LayerBase {
|
|
|
189
191
|
clip?: "surface" | "none";
|
|
190
192
|
/** Hide the layer. It is still in `layerTable`. */
|
|
191
193
|
hidden?: boolean;
|
|
194
|
+
/**
|
|
195
|
+
* Write `data-mark-id`, `data-index` and `data-zone` on every mark of the layer (and draw each cell of a heat map or hexbin as a path of its own), so that one listener can link a mark to a table.
|
|
196
|
+
* Off by default, to keep a drawing compact; on by itself when a datum has an `id`, and when the drawing is made with `marks: true` or `pointer: true`. `false` turns it off for this layer.
|
|
197
|
+
*/
|
|
198
|
+
marks?: boolean;
|
|
192
199
|
}
|
|
193
200
|
export interface PointsLayer extends LayerBase {
|
|
194
201
|
kind: "points";
|
|
@@ -211,7 +218,7 @@ export interface TextLayer extends LayerBase {
|
|
|
211
218
|
style?: TextStyle;
|
|
212
219
|
}
|
|
213
220
|
/** A layer of data on a surface. */
|
|
214
|
-
export type Layer = PointsLayer | LinesLayer | ArrowsLayer | TextLayer | HeatmapLayer | HexbinLayer | ZonesLayer | ContourLayer | LegendLayer | NetworkLayer | FormationLayer | VoronoiLayer | DelaunayLayer | HullLayer | FlowLayer | SonarLayer;
|
|
221
|
+
export type Layer = PointsLayer | LinesLayer | ArrowsLayer | TextLayer | HeatmapLayer | HexbinLayer | ZonesLayer | ContourLayer | LegendLayer | NetworkLayer | FormationLayer | LineupLayer | VoronoiLayer | DelaunayLayer | HullLayer | FlowLayer | SonarLayer;
|
|
215
222
|
/** The kinds of layer. */
|
|
216
223
|
export type LayerKind = Layer["kind"];
|
|
217
224
|
/** What `layerTable` takes. */
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { type Unit } from "../units.ts";
|
|
2
|
+
import type { LeagueBase } from "./types.ts";
|
|
3
|
+
/** The figures of an oval track, in metres. */
|
|
4
|
+
export interface AthleticsFigures {
|
|
5
|
+
/** The length of each straight (the distance between the centres of the semicircles, for the outdoor track's). */
|
|
6
|
+
straight: number;
|
|
7
|
+
/** The radius of each bend at the inside of the track, where the kerb is. */
|
|
8
|
+
radius: number;
|
|
9
|
+
/** The width of a lane, the line on its right included. */
|
|
10
|
+
lane: number;
|
|
11
|
+
/** The least, the most and the drawn number of lanes of the oval. */
|
|
12
|
+
lanes: {
|
|
13
|
+
min: number;
|
|
14
|
+
max: number;
|
|
15
|
+
drawn: number;
|
|
16
|
+
};
|
|
17
|
+
/** The width of the painted lines. */
|
|
18
|
+
line: number;
|
|
19
|
+
/** The width of the kerb, as it is drawn (the rules allow 50 to 250 mm). */
|
|
20
|
+
kerb: number;
|
|
21
|
+
/** Where the running line is measured: from the kerb in lane 1, from the line on the left in the other lanes. */
|
|
22
|
+
inner: number;
|
|
23
|
+
outer: number;
|
|
24
|
+
/** The obstacle-free zone inside the kerb and outside the track, at least. */
|
|
25
|
+
safety: number;
|
|
26
|
+
/** The lane width of the straight that runs on beyond the oval's. */
|
|
27
|
+
straightLane: number;
|
|
28
|
+
/** The least and the most lanes of that straight, and the lengths round it: the starting area and the run-out. */
|
|
29
|
+
straightLanes: {
|
|
30
|
+
min: number;
|
|
31
|
+
max: number;
|
|
32
|
+
};
|
|
33
|
+
startArea: number;
|
|
34
|
+
runOut: number;
|
|
35
|
+
/** True for a covered track: its bends are banked, at this angle in degrees. */
|
|
36
|
+
banking: number | null;
|
|
37
|
+
}
|
|
38
|
+
/** The figures in feet, as the drawing's units are: the lengths only, not the counts of lanes or the angle of the banking. */
|
|
39
|
+
export declare function athleticsInFeet(figures: AthleticsFigures, unit: Unit): AthleticsFigures;
|
|
40
|
+
/** A league with an athletics track of its own. */
|
|
41
|
+
export type AthleticsLeague = LeagueBase<"athletics", AthleticsFigures>;
|
|
42
|
+
/**
|
|
43
|
+
* The 400 m Standard Track (Manual 2.2.1.1, Table 2.2.1.1): two semicircles of 36.50 m radius at the kerb joined by two straights of 84.39 m, lanes 1.22 m wide including the 50 mm line on the
|
|
44
|
+
* right (Rule 14.4), the running line 0.30 m outside the kerb in lane 1 and 0.20 m outside the line on the left in every other lane (Rule 14.2), eight lanes at least for the big competitions (Rule
|
|
45
|
+
* 14.5) and nine at the most (Manual 2.2.1.1). A straight of at least six lanes runs on beyond the oval's with a starting area of 3 m and a run-out of 17 m (Manual 2.2.2.1), and has no most (2.2.2.1).
|
|
46
|
+
* The safety zones are 1.00 m wide (2.2.1.5). The kerb is drawn 0.05 m wide, the narrowest the rules allow (Rule 14.1: 50 to 250 mm).
|
|
47
|
+
*/
|
|
48
|
+
export declare const WA_STANDARD_TRACK: AthleticsFigures;
|
|
49
|
+
/**
|
|
50
|
+
* The 200 m Standard Short Track (Marking Plan for the World Athletics Standard Short Track, 1 January 2026; Rules 41 to 44): the bends have a construction radius of 17.205 m at the kerb and the
|
|
51
|
+
* centres of the banked bends are 44.983 m apart; lanes are 1.000 m wide on the oval and 1.220 m on the infield straight, four to six of them (Rule 43: 0.90 to 1.22 m, a minimum of four lanes and
|
|
52
|
+
* a maximum of six); the bends are banked at 10.000 degrees. The plan's own transitions (the ascending and descending sections) are drawn here as one circular bend of the same radius, which is ours.
|
|
53
|
+
*/
|
|
54
|
+
export declare const WA_SHORT_TRACK: AthleticsFigures;
|
|
55
|
+
/** The staggers of the lanes of the 400 m Standard Track as the Manual prints them (Table 2.2.1.6a), in metres on the running line, for lanes 2 to 8: 200 m, 400 m, 800 m and 4 x 400 m. */
|
|
56
|
+
export declare const WA_STAGGER_TABLE: Readonly<Record<"200m" | "400m" | "800m" | "4x400m", readonly number[]>>;
|
|
57
|
+
/**
|
|
58
|
+
* The staggers of the lanes of the 200 m Standard Short Track (Marking Plan, 1 January 2026), in metres measured 0.20 m out from the lane line, for lanes 2 to 6. The first row serves the 200 m, 400 m,
|
|
59
|
+
* 800 m, 4 x 400 m and 4 x 800 m (two bends in lanes), the second the 4 x 200 m (three bends in lanes), the third the second leg of the 4 x 200 m (one bend).
|
|
60
|
+
*/
|
|
61
|
+
export declare const WA_SHORT_STAGGER_TABLE: Readonly<Record<"two-bends" | "three-bends" | "one-bend", readonly number[]>>;
|
|
62
|
+
/** The athletics leagues: the outdoor track (the sport's own) and the covered one. */
|
|
63
|
+
export declare const ATHLETICS_LEAGUES: readonly AthleticsLeague[];
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
// The athletics track: World Athletics' 400 m Standard Track (Track and Field Facilities Manual, 2019 edition, 2.2.1, and Technical Rule 14 of Book C2.1) and its 200 m Standard Short Track
|
|
2
|
+
// for covered stadia (Technical Rules 41 to 44, and the Marking Plan for the Standard Short Track of 1 January 2026), with the figures of each in metres. Nothing here draws.
|
|
3
|
+
import { convertLength } from "../units.js";
|
|
4
|
+
/** The figures in feet, as the drawing's units are: the lengths only, not the counts of lanes or the angle of the banking. */
|
|
5
|
+
export function athleticsInFeet(figures, unit) {
|
|
6
|
+
const k = (v) => convertLength(v, unit, "ft");
|
|
7
|
+
return {
|
|
8
|
+
straight: k(figures.straight),
|
|
9
|
+
radius: k(figures.radius),
|
|
10
|
+
lane: k(figures.lane),
|
|
11
|
+
lanes: { ...figures.lanes },
|
|
12
|
+
line: k(figures.line),
|
|
13
|
+
kerb: k(figures.kerb),
|
|
14
|
+
inner: k(figures.inner),
|
|
15
|
+
outer: k(figures.outer),
|
|
16
|
+
safety: k(figures.safety),
|
|
17
|
+
straightLane: k(figures.straightLane),
|
|
18
|
+
straightLanes: { ...figures.straightLanes },
|
|
19
|
+
startArea: k(figures.startArea),
|
|
20
|
+
runOut: k(figures.runOut),
|
|
21
|
+
banking: figures.banking,
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* The 400 m Standard Track (Manual 2.2.1.1, Table 2.2.1.1): two semicircles of 36.50 m radius at the kerb joined by two straights of 84.39 m, lanes 1.22 m wide including the 50 mm line on the
|
|
26
|
+
* right (Rule 14.4), the running line 0.30 m outside the kerb in lane 1 and 0.20 m outside the line on the left in every other lane (Rule 14.2), eight lanes at least for the big competitions (Rule
|
|
27
|
+
* 14.5) and nine at the most (Manual 2.2.1.1). A straight of at least six lanes runs on beyond the oval's with a starting area of 3 m and a run-out of 17 m (Manual 2.2.2.1), and has no most (2.2.2.1).
|
|
28
|
+
* The safety zones are 1.00 m wide (2.2.1.5). The kerb is drawn 0.05 m wide, the narrowest the rules allow (Rule 14.1: 50 to 250 mm).
|
|
29
|
+
*/
|
|
30
|
+
export const WA_STANDARD_TRACK = {
|
|
31
|
+
straight: 84.39,
|
|
32
|
+
radius: 36.5,
|
|
33
|
+
lane: 1.22,
|
|
34
|
+
lanes: { min: 4, max: 9, drawn: 8 },
|
|
35
|
+
line: 0.05,
|
|
36
|
+
kerb: 0.05,
|
|
37
|
+
inner: 0.3,
|
|
38
|
+
outer: 0.2,
|
|
39
|
+
safety: 1,
|
|
40
|
+
straightLane: 1.22,
|
|
41
|
+
straightLanes: { min: 6, max: 10 },
|
|
42
|
+
startArea: 3,
|
|
43
|
+
runOut: 17,
|
|
44
|
+
banking: null,
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* The 200 m Standard Short Track (Marking Plan for the World Athletics Standard Short Track, 1 January 2026; Rules 41 to 44): the bends have a construction radius of 17.205 m at the kerb and the
|
|
48
|
+
* centres of the banked bends are 44.983 m apart; lanes are 1.000 m wide on the oval and 1.220 m on the infield straight, four to six of them (Rule 43: 0.90 to 1.22 m, a minimum of four lanes and
|
|
49
|
+
* a maximum of six); the bends are banked at 10.000 degrees. The plan's own transitions (the ascending and descending sections) are drawn here as one circular bend of the same radius, which is ours.
|
|
50
|
+
*/
|
|
51
|
+
export const WA_SHORT_TRACK = {
|
|
52
|
+
straight: 44.983,
|
|
53
|
+
radius: 17.205,
|
|
54
|
+
lane: 1,
|
|
55
|
+
lanes: { min: 4, max: 6, drawn: 6 },
|
|
56
|
+
line: 0.05,
|
|
57
|
+
kerb: 0.05,
|
|
58
|
+
inner: 0.3,
|
|
59
|
+
outer: 0.2,
|
|
60
|
+
safety: 1,
|
|
61
|
+
straightLane: 1.22,
|
|
62
|
+
straightLanes: { min: 4, max: 6 },
|
|
63
|
+
startArea: 3,
|
|
64
|
+
runOut: 10,
|
|
65
|
+
banking: 10,
|
|
66
|
+
};
|
|
67
|
+
/** The staggers of the lanes of the 400 m Standard Track as the Manual prints them (Table 2.2.1.6a), in metres on the running line, for lanes 2 to 8: 200 m, 400 m, 800 m and 4 x 400 m. */
|
|
68
|
+
export const WA_STAGGER_TABLE = Object.freeze({
|
|
69
|
+
"200m": [3.519, 7.351, 11.184, 15.017, 18.85, 22.682, 26.515],
|
|
70
|
+
"400m": [7.037, 14.703, 22.368, 30.034, 37.699, 45.365, 53.03],
|
|
71
|
+
"800m": [3.526, 7.384, 11.259, 15.151, 19.06, 22.987, 26.93],
|
|
72
|
+
"4x400m": [10.563, 22.086, 33.627, 45.185, 56.76, 68.352, 79.96],
|
|
73
|
+
});
|
|
74
|
+
/**
|
|
75
|
+
* The staggers of the lanes of the 200 m Standard Short Track (Marking Plan, 1 January 2026), in metres measured 0.20 m out from the lane line, for lanes 2 to 6. The first row serves the 200 m, 400 m,
|
|
76
|
+
* 800 m, 4 x 400 m and 4 x 800 m (two bends in lanes), the second the 4 x 200 m (three bends in lanes), the third the second leg of the 4 x 200 m (one bend).
|
|
77
|
+
*/
|
|
78
|
+
export const WA_SHORT_STAGGER_TABLE = Object.freeze({
|
|
79
|
+
"two-bends": [5.597, 11.821, 18.051, 24.285, 30.523],
|
|
80
|
+
"three-bends": [8.407, 17.781, 27.188, 36.626, 46.092],
|
|
81
|
+
"one-bend": [2.81, 5.959, 9.137, 12.341, 15.57],
|
|
82
|
+
});
|
|
83
|
+
/** The athletics leagues: the outdoor track (the sport's own) and the covered one. */
|
|
84
|
+
export const ATHLETICS_LEAGUES = [
|
|
85
|
+
{ id: "world-athletics", family: "athletics", name: { en: "World Athletics 400 m standard track", ja: "ワールドアスレティックスの400m標準トラック" }, unit: "m", dimensions: WA_STANDARD_TRACK, sources: ["wa-facilities-manual", "wa-technical-rules"], builtIn: true },
|
|
86
|
+
{ id: "world-athletics-short", family: "athletics", name: { en: "World Athletics 200 m standard short track", ja: "ワールドアスレティックスの200m標準トラック(ショート・トラック)" }, unit: "m", dimensions: WA_SHORT_TRACK, sources: ["wa-short-track-plan", "wa-technical-rules"] },
|
|
87
|
+
];
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
import { type Span } from "./fields.ts";
|
|
2
|
+
import type { LeagueBase } from "./types.ts";
|
|
3
|
+
/** A mat: its length and width in metres. */
|
|
4
|
+
export interface Mat {
|
|
5
|
+
length: number;
|
|
6
|
+
width: number;
|
|
7
|
+
}
|
|
8
|
+
/** The figures of a judo contest area (a competition tatami), in metres. */
|
|
9
|
+
export interface JudoFigures {
|
|
10
|
+
kind: "judo";
|
|
11
|
+
/** The contest area, a square: 8 m to 10 m a side (IJF SOR 8.7); 10 m at the Olympic Games, the World Championships and the Masters, which is the size drawn. */
|
|
12
|
+
contest: Span;
|
|
13
|
+
/** The safety area round it: at least 3 m (SOR 8.7). At the Games it is 4 m (the common and the exterior one); that is drawn. The rules give no greatest, so the drawing allows up to 6 m (ours). */
|
|
14
|
+
safety: Span;
|
|
15
|
+
/** The distance between two adjoining contest areas: a common safe zone of at least 4 m may serve (SOR 8.7). */
|
|
16
|
+
common: number;
|
|
17
|
+
/** The free zone kept round the whole competition area: at least 0.5 m (SOR 8.7). */
|
|
18
|
+
freeZone: number;
|
|
19
|
+
/** The tatami: 1 m by 2 m by 5 cm of pressed foam (SOR 8.7); the AJJF's own is 182 cm by 91 cm, 5 or 6 cm thick (guidebook 2-1). */
|
|
20
|
+
tatami: Mat & {
|
|
21
|
+
thickness: number;
|
|
22
|
+
};
|
|
23
|
+
/** A solid platform under the tatami is one metre wider and longer than the tatami (SOR 8.7), with an exterior safety area of 4 m. */
|
|
24
|
+
platform: number;
|
|
25
|
+
/** The tape that marks where the contestants start: 10 cm by 50 cm (SOR 2020 18.1), and how far each is from the centre. */
|
|
26
|
+
marks: {
|
|
27
|
+
width: number;
|
|
28
|
+
length: number;
|
|
29
|
+
fromCentre: number;
|
|
30
|
+
} | null;
|
|
31
|
+
/** The domestic red tatami of the danger zone, as wide as one tatami, inside the contest area; none in an IJF contest area (the guidebook 2-3 allows it at events other than the Games, the Worlds and the Masters). */
|
|
32
|
+
danger: boolean;
|
|
33
|
+
/** A kata area: two white tapes 5 cm by 50 cm, 3 m from the centre either side, and a safety area of 2 m (SOR B1.8). */
|
|
34
|
+
kata: boolean;
|
|
35
|
+
}
|
|
36
|
+
/** The figures of a karate competition area, in metres. */
|
|
37
|
+
export interface KarateFigures {
|
|
38
|
+
kind: "karate";
|
|
39
|
+
/** The matted square, 8 m a side measured from the outside (WKF Kumite 1.1, Kata 1.1). */
|
|
40
|
+
area: number;
|
|
41
|
+
/** Kumite: the outer 1 m of the square is in another colour, marking the boundary (1.1). None for kata. */
|
|
42
|
+
band: number;
|
|
43
|
+
/** The safety area round the square: 2 m (1.1). */
|
|
44
|
+
safety: number;
|
|
45
|
+
/** The least distance between two competition areas: 2 m (1.2). */
|
|
46
|
+
between: number;
|
|
47
|
+
/** Kumite: the two mats turned over, red side up, 1 m from the centre (1.5). The mat's size is not in the rules: 1 m by 1 m (ours, the size of a WKF-approved mat). */
|
|
48
|
+
startMats: {
|
|
49
|
+
size: number;
|
|
50
|
+
fromCentre: number;
|
|
51
|
+
} | null;
|
|
52
|
+
/** The referee stands at the middle, 2 m from the boundary (1.6); each judge sits about 1.5 m off a corner in the safety area (1.6). */
|
|
53
|
+
referee: number;
|
|
54
|
+
judges: number;
|
|
55
|
+
}
|
|
56
|
+
/** The figures of a kendo shiai-jo, in metres. */
|
|
57
|
+
export interface KendoFigures {
|
|
58
|
+
kind: "kendo";
|
|
59
|
+
/** A square or a rectangle of 9 m to 11 m a side, inclusive of the width of the line (Article 2). 10 m is drawn: the middle (ours). */
|
|
60
|
+
side: Span;
|
|
61
|
+
/** The lines are 5 cm to 10 cm wide and white as a rule (Subsidiary Rules, Article 1). */
|
|
62
|
+
lineWidth: Span;
|
|
63
|
+
/** The cross at the centre: 30 cm to 40 cm (Figure 1). */
|
|
64
|
+
cross: Span;
|
|
65
|
+
/** The two kaishi-sen, each 50 cm long and 1.4 m from the centre (Figure 1). */
|
|
66
|
+
startLine: {
|
|
67
|
+
length: number;
|
|
68
|
+
fromCentre: number;
|
|
69
|
+
};
|
|
70
|
+
/** A space of at least 1.5 m is kept outside the shiai-jo (Subsidiary Rules, Article 1). */
|
|
71
|
+
outside: number;
|
|
72
|
+
}
|
|
73
|
+
/** The figures of a sumo dohyō, in metres. */
|
|
74
|
+
export interface SumoFigures {
|
|
75
|
+
kind: "sumo";
|
|
76
|
+
/** The clay square: 6.7 m a side (Sumo Rules, Dohyō Regulations, Article 1). */
|
|
77
|
+
platform: number;
|
|
78
|
+
/** Its height: 34 cm to 60 cm for a public dohyō (Article 1); 55 cm is drawn (ours). */
|
|
79
|
+
height: Span;
|
|
80
|
+
/** The circle of tawara: 4.55 m, 15 shaku (Article 1). Taken as the inside of the ring, where the wrestlers stand (ours: the rule does not say which edge). */
|
|
81
|
+
circle: number;
|
|
82
|
+
/** The tawara of the circle: 20, which are 4 tokudawara and 4 between each of them (Quiz No. 355). */
|
|
83
|
+
tawara: {
|
|
84
|
+
count: number;
|
|
85
|
+
tokuda: number;
|
|
86
|
+
between: number;
|
|
87
|
+
};
|
|
88
|
+
/** The shikiri-sen: two white lines 90 cm long, 6 cm wide and 70 cm apart (Quiz No. 1091). */
|
|
89
|
+
shikiri: {
|
|
90
|
+
length: number;
|
|
91
|
+
width: number;
|
|
92
|
+
apart: number;
|
|
93
|
+
};
|
|
94
|
+
/** The width of a tawara's cross-section and how far a tokudawara stands out from the circle: the rules give neither (ours). */
|
|
95
|
+
bale: {
|
|
96
|
+
width: number;
|
|
97
|
+
out: number;
|
|
98
|
+
};
|
|
99
|
+
/** The band of sand, the jano-me, outside the tawara: the rules give no width (ours). */
|
|
100
|
+
jano: number;
|
|
101
|
+
}
|
|
102
|
+
/** The figures of a kyūdōjō, in metres. */
|
|
103
|
+
export interface KyudoFigures {
|
|
104
|
+
kind: "kyudo";
|
|
105
|
+
/** The distance from the shooting position (射位) to the face of the target: 28 m (kinteki) or 60 m (enteki) (Wakayama 2015; ANKF manual 4). */
|
|
106
|
+
distance: number;
|
|
107
|
+
/** The target: 36 cm across (a kasumi-mato) for kinteki, 100 cm for enteki; its centre 27 cm above the azuchi's base and tilted 5 degrees, or 97 cm above the ground and tilted 15 degrees. */
|
|
108
|
+
target: {
|
|
109
|
+
diameter: number;
|
|
110
|
+
centre: number;
|
|
111
|
+
tilt: number;
|
|
112
|
+
};
|
|
113
|
+
/** The shooters' places: 1.8 m apart (1.6 m to 2.0 m) for kinteki and 1.6 m (1.4 m to 1.8 m) for enteki, a line of 5 (ANKF manual 6). */
|
|
114
|
+
step: Span;
|
|
115
|
+
count: number;
|
|
116
|
+
/** The distance from the shooting position back to the honza (本座): 2.0 m for kinteki and 1.1 m for enteki (ANKF manual 6). */
|
|
117
|
+
honza: number;
|
|
118
|
+
/** The ceiling of the shajō: 4.0 m, at least 3.8 m (ANKF manual 6). */
|
|
119
|
+
ceiling: number;
|
|
120
|
+
/** The shooters stand to one side or the other of the door: the distance to the wall behind the last shooter, at least 1.4 m, and the least distance from the honza to the officials' seats behind (3.0 m for kinteki, 4.0 m for enteki). */
|
|
121
|
+
behind: {
|
|
122
|
+
wall: number;
|
|
123
|
+
officials: number;
|
|
124
|
+
};
|
|
125
|
+
/**
|
|
126
|
+
* The shajō in the manual's figures (Figures II-1 and II-3): 9.0 m from the front edge to the row of the officials' seats, with the shooting positions 2.1 m behind the front edge; 2.7 m (kinteki) or 2.2 m (enteki) from the first and the
|
|
127
|
+
* last shooter to the side walls, so that the frontage of 5 shooters is 12.6 m or 10.8 m; 3.6 m more for the judges' side. How far the back wall stands beyond the officials' row is not given: 1.5 m (ours).
|
|
128
|
+
*/
|
|
129
|
+
hall: {
|
|
130
|
+
front: number;
|
|
131
|
+
depth: number;
|
|
132
|
+
side: number;
|
|
133
|
+
judges: number;
|
|
134
|
+
rear: number;
|
|
135
|
+
};
|
|
136
|
+
/** The distance from the honza back to the row of the officials' seats: 4.9 m (kinteki) and 5.8 m (enteki), Figures II-1 and II-3. */
|
|
137
|
+
row: number;
|
|
138
|
+
/** The width of the yamichi beyond the line of targets on each side, and the depth, the height and the margin of the azuchi: the rules give none (ours). */
|
|
139
|
+
yamichi: {
|
|
140
|
+
margin: number;
|
|
141
|
+
};
|
|
142
|
+
azuchi: {
|
|
143
|
+
depth: number;
|
|
144
|
+
height: number;
|
|
145
|
+
margin: number;
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
/** The figures of a dojo's mat: one tatami of a region. */
|
|
149
|
+
export interface DojoFigures {
|
|
150
|
+
kind: "dojo";
|
|
151
|
+
/** One mat, a jō (畳), twice as long as it is wide. */
|
|
152
|
+
mat: Mat;
|
|
153
|
+
/** Where the standard is used. */
|
|
154
|
+
region: {
|
|
155
|
+
en: string;
|
|
156
|
+
ja: string;
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
/** The figures of a budō league. */
|
|
160
|
+
export type BudoFigures = JudoFigures | KarateFigures | KendoFigures | SumoFigures | KyudoFigures | DojoFigures;
|
|
161
|
+
/** The leagues of each budō sport. */
|
|
162
|
+
export type JudoLeague = LeagueBase<"judo", JudoFigures>;
|
|
163
|
+
export type KarateLeague = LeagueBase<"karate", KarateFigures>;
|
|
164
|
+
export type KendoLeague = LeagueBase<"kendo", KendoFigures>;
|
|
165
|
+
export type SumoLeague = LeagueBase<"sumo", SumoFigures>;
|
|
166
|
+
export type KyudoLeague = LeagueBase<"kyudo", KyudoFigures>;
|
|
167
|
+
export type DojoLeague = LeagueBase<"dojo", DojoFigures>;
|
|
168
|
+
/** A league with a budō surface of its own. */
|
|
169
|
+
export type BudoLeague = JudoLeague | KarateLeague | KendoLeague | SumoLeague | KyudoLeague | DojoLeague;
|
|
170
|
+
/** The IJF's contest area (Sport and Organisation Rules 8.7, version of 21 January 2026) as drawn for the Games, the Worlds and the Masters. */
|
|
171
|
+
export declare const IJF_CONTEST: JudoFigures;
|
|
172
|
+
/** The All Japan Judo Federation's: the tatami of 182 cm by 91 cm, the red tatami of the danger zone, and the red and white tape 4 m (2 ken) apart (Tournament Management Guidebook 2023, 2-1, 2-3, 2-4). */
|
|
173
|
+
export declare const AJJF_CONTEST: JudoFigures;
|
|
174
|
+
/** The kata area (SOR B1.8): 10 m for the World Championships and 8 m for other events, a safety area of 2 m, two white tapes of 5 cm by 50 cm, 3 m from the centre. */
|
|
175
|
+
export declare const IJF_KATA: JudoFigures;
|
|
176
|
+
/** The WKF's kumite area (Kumite Competition Rules 2026.01, Article 1). */
|
|
177
|
+
export declare const WKF_KUMITE: KarateFigures;
|
|
178
|
+
/** The WKF's kata area (Kata Competition Rules 2026, Article 1): the same square, with no band and no start mats. */
|
|
179
|
+
export declare const WKF_KATA: KarateFigures;
|
|
180
|
+
/** The kendo shiai-jo (FIK Regulations, Article 2, the Subsidiary Rules' Article 1 and Figure 1). */
|
|
181
|
+
export declare const FIK_SHIAI_JO: KendoFigures;
|
|
182
|
+
/** The dohyō of the Japan Sumo Association (Sumo Rules, Dohyō Regulations, Article 1, and the Association's quizzes). */
|
|
183
|
+
export declare const JSA_DOHYO: SumoFigures;
|
|
184
|
+
/** The kyūdōjō for kinteki (近的), the 28 m range of a competition (ANKF competition manual 6 and the National Sports Festival's rules). */
|
|
185
|
+
export declare const KINTEKI: KyudoFigures;
|
|
186
|
+
/** The kyūdōjō for enteki (遠的), 60 m, with the target of 1 m. */
|
|
187
|
+
export declare const ENTEKI: KyudoFigures;
|
|
188
|
+
/** The budō leagues: for each sport the rulebook's own first. */
|
|
189
|
+
export declare const JUDO_LEAGUES: readonly JudoLeague[];
|
|
190
|
+
export declare const KARATE_LEAGUES: readonly KarateLeague[];
|
|
191
|
+
export declare const KENDO_LEAGUES: readonly KendoLeague[];
|
|
192
|
+
export declare const SUMO_LEAGUES: readonly SumoLeague[];
|
|
193
|
+
export declare const KYUDO_LEAGUES: readonly KyudoLeague[];
|
|
194
|
+
export declare const DOJO_LEAGUES: readonly DojoLeague[];
|
|
195
|
+
/** Every budō league, once each. */
|
|
196
|
+
export declare const BUDO_LEAGUES: readonly BudoLeague[];
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
// The surfaces of the budō (武道): the contest areas of judo and karate, the shiai-jo of kendo, the dohyō of sumo, the kyūdōjō, and the tatami of a dojo, each from the rulebook or the
|
|
2
|
+
// federation's own page it was read in, with every figure in metres. A figure that no rule gives is said so in its comment (ours). Nothing here draws.
|
|
3
|
+
import { span } from "./fields.js";
|
|
4
|
+
/** The IJF's contest area (Sport and Organisation Rules 8.7, version of 21 January 2026) as drawn for the Games, the Worlds and the Masters. */
|
|
5
|
+
export const IJF_CONTEST = {
|
|
6
|
+
kind: "judo",
|
|
7
|
+
contest: span(8, 10, 10),
|
|
8
|
+
safety: span(3, 6, 4),
|
|
9
|
+
common: 4,
|
|
10
|
+
freeZone: 0.5,
|
|
11
|
+
tatami: { length: 2, width: 1, thickness: 0.05 },
|
|
12
|
+
platform: 1,
|
|
13
|
+
marks: { width: 0.1, length: 0.5, fromCentre: 2 },
|
|
14
|
+
danger: false,
|
|
15
|
+
kata: false,
|
|
16
|
+
};
|
|
17
|
+
/** The All Japan Judo Federation's: the tatami of 182 cm by 91 cm, the red tatami of the danger zone, and the red and white tape 4 m (2 ken) apart (Tournament Management Guidebook 2023, 2-1, 2-3, 2-4). */
|
|
18
|
+
export const AJJF_CONTEST = {
|
|
19
|
+
...IJF_CONTEST,
|
|
20
|
+
contest: span(8, 10, 8),
|
|
21
|
+
safety: span(3, 6, 3),
|
|
22
|
+
tatami: { length: 1.82, width: 0.91, thickness: 0.06 },
|
|
23
|
+
danger: true,
|
|
24
|
+
};
|
|
25
|
+
/** The kata area (SOR B1.8): 10 m for the World Championships and 8 m for other events, a safety area of 2 m, two white tapes of 5 cm by 50 cm, 3 m from the centre. */
|
|
26
|
+
export const IJF_KATA = {
|
|
27
|
+
...IJF_CONTEST,
|
|
28
|
+
contest: span(8, 10, 10),
|
|
29
|
+
safety: span(2, 6, 2),
|
|
30
|
+
marks: { width: 0.05, length: 0.5, fromCentre: 3 },
|
|
31
|
+
kata: true,
|
|
32
|
+
};
|
|
33
|
+
/** The WKF's kumite area (Kumite Competition Rules 2026.01, Article 1). */
|
|
34
|
+
export const WKF_KUMITE = { kind: "karate", area: 8, band: 1, safety: 2, between: 2, startMats: { size: 1, fromCentre: 1 }, referee: 2, judges: 1.5 };
|
|
35
|
+
/** The WKF's kata area (Kata Competition Rules 2026, Article 1): the same square, with no band and no start mats. */
|
|
36
|
+
export const WKF_KATA = { kind: "karate", area: 8, band: 0, safety: 2, between: 2, startMats: null, referee: 2, judges: 1.5 };
|
|
37
|
+
/** The kendo shiai-jo (FIK Regulations, Article 2, the Subsidiary Rules' Article 1 and Figure 1). */
|
|
38
|
+
export const FIK_SHIAI_JO = { kind: "kendo", side: span(9, 11, 10), lineWidth: span(0.05, 0.1, 0.05), cross: span(0.3, 0.4, 0.35), startLine: { length: 0.5, fromCentre: 1.4 }, outside: 1.5 };
|
|
39
|
+
/** The dohyō of the Japan Sumo Association (Sumo Rules, Dohyō Regulations, Article 1, and the Association's quizzes). */
|
|
40
|
+
export const JSA_DOHYO = {
|
|
41
|
+
kind: "sumo",
|
|
42
|
+
platform: 6.7,
|
|
43
|
+
height: span(0.34, 0.6, 0.55),
|
|
44
|
+
circle: 4.55,
|
|
45
|
+
tawara: { count: 20, tokuda: 4, between: 4 },
|
|
46
|
+
shikiri: { length: 0.9, width: 0.06, apart: 0.7 },
|
|
47
|
+
bale: { width: 0.2, out: 0.2 },
|
|
48
|
+
jano: 0.5,
|
|
49
|
+
};
|
|
50
|
+
/** The kyūdōjō for kinteki (近的), the 28 m range of a competition (ANKF competition manual 6 and the National Sports Festival's rules). */
|
|
51
|
+
export const KINTEKI = {
|
|
52
|
+
kind: "kyudo",
|
|
53
|
+
distance: 28,
|
|
54
|
+
target: { diameter: 0.36, centre: 0.27, tilt: 5 },
|
|
55
|
+
step: span(1.6, 2, 1.8),
|
|
56
|
+
count: 5,
|
|
57
|
+
honza: 2,
|
|
58
|
+
ceiling: 4,
|
|
59
|
+
behind: { wall: 1.4, officials: 3 },
|
|
60
|
+
hall: { front: 2.1, depth: 9, side: 2.7, judges: 3.6, rear: 1.5 },
|
|
61
|
+
row: 4.9,
|
|
62
|
+
yamichi: { margin: 1.2 },
|
|
63
|
+
azuchi: { depth: 2.4, height: 1.5, margin: 1.8 },
|
|
64
|
+
};
|
|
65
|
+
/** The kyūdōjō for enteki (遠的), 60 m, with the target of 1 m. */
|
|
66
|
+
export const ENTEKI = {
|
|
67
|
+
kind: "kyudo",
|
|
68
|
+
distance: 60,
|
|
69
|
+
target: { diameter: 1, centre: 0.97, tilt: 15 },
|
|
70
|
+
step: span(1.4, 1.8, 1.6),
|
|
71
|
+
count: 5,
|
|
72
|
+
honza: 1.1,
|
|
73
|
+
ceiling: 4,
|
|
74
|
+
behind: { wall: 1.4, officials: 4 },
|
|
75
|
+
hall: { front: 2.1, depth: 9, side: 2.2, judges: 3.6, rear: 1.5 },
|
|
76
|
+
row: 5.8,
|
|
77
|
+
yamichi: { margin: 1.6 },
|
|
78
|
+
azuchi: { depth: 3, height: 1.8, margin: 2.4 },
|
|
79
|
+
};
|
|
80
|
+
const mat = (length, width, en, ja) => ({ kind: "dojo", mat: { length, width }, region: { en, ja } });
|
|
81
|
+
/** The budō leagues: for each sport the rulebook's own first. */
|
|
82
|
+
export const JUDO_LEAGUES = [
|
|
83
|
+
{ id: "ijf", family: "judo", name: { en: "IJF contest area", ja: "国際柔道連盟の試合場" }, unit: "m", dimensions: IJF_CONTEST, sources: ["ijf-sor", "ijf-sor-2020"], builtIn: true },
|
|
84
|
+
{ id: "ajjf", family: "judo", name: { en: "AJJF contest area", ja: "全日本柔道連盟の試合場" }, unit: "m", dimensions: AJJF_CONTEST, sources: ["ajjf-guide", "ijf-sor"] },
|
|
85
|
+
{ id: "ijf-kata", family: "judo", name: { en: "IJF kata area", ja: "国際柔道連盟の形の試合場" }, unit: "m", dimensions: IJF_KATA, sources: ["ijf-sor"] },
|
|
86
|
+
];
|
|
87
|
+
export const KARATE_LEAGUES = [
|
|
88
|
+
{ id: "wkf-kumite", family: "karate", name: { en: "WKF kumite area", ja: "世界空手連盟の組手の試合場" }, unit: "m", dimensions: WKF_KUMITE, sources: ["wkf-kumite"], builtIn: true },
|
|
89
|
+
{ id: "wkf-kata", family: "karate", name: { en: "WKF kata area", ja: "世界空手連盟の形の試合場" }, unit: "m", dimensions: WKF_KATA, sources: ["wkf-kata"] },
|
|
90
|
+
];
|
|
91
|
+
export const KENDO_LEAGUES = [{ id: "fik", family: "kendo", name: { en: "FIK shiai-jo", ja: "国際剣道連盟の試合場" }, unit: "m", dimensions: FIK_SHIAI_JO, sources: ["fik-regulations"], builtIn: true }];
|
|
92
|
+
export const SUMO_LEAGUES = [{ id: "jsa", family: "sumo", name: { en: "Japan Sumo Association dohyō", ja: "日本相撲協会の土俵" }, unit: "m", dimensions: JSA_DOHYO, sources: ["jsa-dohyo", "jsa-quiz", "wikipedia-dohyo"], builtIn: true }];
|
|
93
|
+
export const KYUDO_LEAGUES = [
|
|
94
|
+
{ id: "kinteki", family: "kyudo", name: { en: "Kyūdōjō for kinteki, 28 m", ja: "近的の弓道場(28m)" }, unit: "m", dimensions: KINTEKI, sources: ["znkr-unei", "wakayama-kyudo-2015"], builtIn: true },
|
|
95
|
+
{ id: "enteki", family: "kyudo", name: { en: "Kyūdōjō for enteki, 60 m", ja: "遠的の弓道場(60m)" }, unit: "m", dimensions: ENTEKI, sources: ["znkr-unei", "wakayama-kyudo-2015"] },
|
|
96
|
+
];
|
|
97
|
+
export const DOJO_LEAGUES = [
|
|
98
|
+
{ id: "chukyoma", family: "dojo", name: { en: "Chūkyōma tatami, 1820 by 910 mm", ja: "中京間の畳(1820×910mm)" }, unit: "m", dimensions: mat(1.82, 0.91, "Nagoya and the Chūbu region", "名古屋・中部"), sources: ["tatami-sizes", "ajjf-guide"], builtIn: true },
|
|
99
|
+
{ id: "kyoma", family: "dojo", name: { en: "Kyōma tatami, 1910 by 955 mm", ja: "京間の畳(1910×955mm)" }, unit: "m", dimensions: mat(1.91, 0.955, "Kyoto and the Kansai region", "京都・関西"), sources: ["tatami-sizes"] },
|
|
100
|
+
{ id: "edoma", family: "dojo", name: { en: "Edoma tatami, 1760 by 880 mm", ja: "江戸間の畳(1760×880mm)" }, unit: "m", dimensions: mat(1.76, 0.88, "Edo (Tokyo) and the Kantō region", "江戸・関東"), sources: ["tatami-sizes"] },
|
|
101
|
+
{ id: "danchima", family: "dojo", name: { en: "Danchima tatami, 1700 by 850 mm", ja: "団地間の畳(1700×850mm)" }, unit: "m", dimensions: mat(1.7, 0.85, "housing complexes", "団地"), sources: ["tatami-sizes"] },
|
|
102
|
+
{ id: "judo-2x1", family: "dojo", name: { en: "Judo tatami, 2 m by 1 m", ja: "柔道畳(2m×1m)" }, unit: "m", dimensions: mat(2, 1, "the IJF's standard", "国際柔道連盟の標準"), sources: ["ijf-sor", "ajjf-guide"] },
|
|
103
|
+
];
|
|
104
|
+
/** Every budō league, once each. */
|
|
105
|
+
export const BUDO_LEAGUES = Object.freeze([...JUDO_LEAGUES, ...KARATE_LEAGUES, ...KENDO_LEAGUES, ...SUMO_LEAGUES, ...KYUDO_LEAGUES, ...DOJO_LEAGUES]);
|