@johnmorrisdotca/kyogijo-stadiums 0.0.0-stage → 0.4.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 +129 -0
- package/LICENSE +21 -0
- package/NOTICE.md +293 -0
- package/README.md +600 -2
- package/dist/annotate.d.ts +47 -0
- package/dist/annotate.js +349 -0
- package/dist/atlas-entry.d.ts +4 -0
- package/dist/atlas-entry.js +3 -0
- package/dist/atlas.d.ts +131 -0
- package/dist/atlas.js +149 -0
- package/dist/background.d.ts +56 -0
- package/dist/background.js +127 -0
- package/dist/ballpark.d.ts +48 -0
- package/dist/ballpark.js +129 -0
- package/dist/canvas-entry.d.ts +2 -0
- package/dist/canvas-entry.js +2 -0
- package/dist/canvas.d.ts +85 -0
- package/dist/canvas.js +279 -0
- package/dist/charts-entry.d.ts +10 -0
- package/dist/charts-entry.js +8 -0
- package/dist/charts.baseball.d.ts +30 -0
- package/dist/charts.baseball.js +152 -0
- package/dist/charts.curling.d.ts +52 -0
- package/dist/charts.curling.js +196 -0
- package/dist/charts.d.ts +172 -0
- package/dist/charts.js +508 -0
- package/dist/charts.network.d.ts +66 -0
- package/dist/charts.network.js +64 -0
- package/dist/charts.soccer.d.ts +43 -0
- package/dist/charts.soccer.js +191 -0
- package/dist/charts.types.d.ts +396 -0
- package/dist/charts.types.js +1 -0
- package/dist/colour.d.ts +29 -0
- package/dist/colour.js +97 -0
- package/dist/common.d.ts +14 -0
- package/dist/common.js +32 -0
- package/dist/court.d.ts +89 -0
- package/dist/court.js +248 -0
- package/dist/courts.style.d.ts +20 -0
- package/dist/courts.style.js +54 -0
- package/dist/cricket.board.d.ts +18 -0
- package/dist/cricket.board.js +67 -0
- package/dist/curling.board.d.ts +24 -0
- package/dist/curling.board.js +147 -0
- package/dist/d3-entry.d.ts +3 -0
- package/dist/d3-entry.js +2 -0
- package/dist/d3.d.ts +45 -0
- package/dist/d3.js +56 -0
- package/dist/draw.d.ts +52 -0
- package/dist/draw.js +705 -0
- package/dist/element-define.d.ts +2 -0
- package/dist/element-define.js +4 -0
- package/dist/element-entry.d.ts +1 -0
- package/dist/element-entry.js +2 -0
- package/dist/element.d.ts +39 -0
- package/dist/element.js +321 -0
- package/dist/eras-entry.d.ts +2 -0
- package/dist/eras-entry.js +2 -0
- package/dist/eras.d.ts +204 -0
- package/dist/eras.js +396 -0
- package/dist/events-entry.d.ts +3 -0
- package/dist/events-entry.js +3 -0
- package/dist/events.d.ts +54 -0
- package/dist/events.data.d.ts +59 -0
- package/dist/events.data.js +297 -0
- package/dist/events.js +127 -0
- package/dist/features.d.ts +31 -0
- package/dist/features.js +284 -0
- package/dist/field.score.d.ts +5 -0
- package/dist/field.score.js +33 -0
- package/dist/fields/afl.d.ts +11 -0
- package/dist/fields/afl.js +103 -0
- package/dist/fields/cricket.d.ts +9 -0
- package/dist/fields/cricket.js +81 -0
- package/dist/fields/fieldhockey.d.ts +6 -0
- package/dist/fields/fieldhockey.js +81 -0
- package/dist/fields/gaelic.d.ts +10 -0
- package/dist/fields/gaelic.js +86 -0
- package/dist/fields/handball.d.ts +6 -0
- package/dist/fields/handball.js +85 -0
- package/dist/fields/lacrosse.d.ts +17 -0
- package/dist/fields/lacrosse.js +169 -0
- package/dist/fields/rugby.d.ts +10 -0
- package/dist/fields/rugby.js +130 -0
- package/dist/fields.d.ts +12 -0
- package/dist/fields.js +44 -0
- package/dist/fields.kit.d.ts +63 -0
- package/dist/fields.kit.js +108 -0
- package/dist/fields.style.d.ts +4 -0
- package/dist/fields.style.js +19 -0
- package/dist/fields.types.d.ts +155 -0
- package/dist/fields.types.js +1 -0
- package/dist/format.d.ts +10 -0
- package/dist/format.js +28 -0
- package/dist/formations.d.ts +18 -0
- package/dist/formations.js +211 -0
- package/dist/frames-entry.d.ts +8 -0
- package/dist/frames-entry.js +7 -0
- package/dist/frames.d.ts +199 -0
- package/dist/frames.js +271 -0
- package/dist/frames.providers.d.ts +16 -0
- package/dist/frames.providers.js +302 -0
- package/dist/geojson-entry.d.ts +2 -0
- package/dist/geojson-entry.js +2 -0
- package/dist/geojson.d.ts +79 -0
- package/dist/geojson.js +147 -0
- package/dist/geometry-entry.d.ts +7 -0
- package/dist/geometry-entry.js +5 -0
- package/dist/geometry.d.ts +295 -0
- package/dist/geometry.js +361 -0
- package/dist/grounds-entry.d.ts +4 -0
- package/dist/grounds-entry.js +3 -0
- package/dist/grounds.d.ts +134 -0
- package/dist/grounds.data.d.ts +2 -0
- package/dist/grounds.data.js +1849 -0
- package/dist/grounds.js +74 -0
- package/dist/heat.colour.d.ts +37 -0
- package/dist/heat.colour.js +54 -0
- package/dist/heat.d.ts +43 -0
- package/dist/heat.js +614 -0
- package/dist/heat.stats.d.ts +123 -0
- package/dist/heat.stats.js +413 -0
- package/dist/heat.types.d.ts +145 -0
- package/dist/heat.types.js +1 -0
- package/dist/heat.zones.d.ts +54 -0
- package/dist/heat.zones.js +424 -0
- package/dist/homeside.d.ts +16 -0
- package/dist/homeside.js +43 -0
- package/dist/index.d.ts +47 -0
- package/dist/index.js +29 -0
- package/dist/layers-entry.d.ts +19 -0
- package/dist/layers-entry.js +11 -0
- package/dist/layers.d.ts +41 -0
- package/dist/layers.env.d.ts +72 -0
- package/dist/layers.env.js +79 -0
- package/dist/layers.js +533 -0
- package/dist/layers.marks.d.ts +45 -0
- package/dist/layers.marks.js +168 -0
- package/dist/layers.types.d.ts +226 -0
- package/dist/layers.types.js +1 -0
- package/dist/layout.d.ts +97 -0
- package/dist/layout.js +381 -0
- package/dist/layout.style.d.ts +6 -0
- package/dist/layout.style.js +17 -0
- package/dist/layouts-entry.d.ts +5 -0
- package/dist/layouts-entry.js +4 -0
- package/dist/leagues/aussie.d.ts +57 -0
- package/dist/leagues/aussie.js +36 -0
- package/dist/leagues/baseball.d.ts +58 -0
- package/dist/leagues/baseball.js +171 -0
- package/dist/leagues/basketball.d.ts +67 -0
- package/dist/leagues/basketball.js +128 -0
- package/dist/leagues/courts.d.ts +212 -0
- package/dist/leagues/courts.js +114 -0
- package/dist/leagues/cricket.d.ts +45 -0
- package/dist/leagues/cricket.js +34 -0
- package/dist/leagues/curling.d.ts +64 -0
- package/dist/leagues/curling.js +53 -0
- package/dist/leagues/fieldhockey.d.ts +48 -0
- package/dist/leagues/fieldhockey.js +29 -0
- package/dist/leagues/fields.d.ts +10 -0
- package/dist/leagues/fields.js +6 -0
- package/dist/leagues/football.d.ts +8 -0
- package/dist/leagues/football.js +82 -0
- package/dist/leagues/gaelic.d.ts +50 -0
- package/dist/leagues/gaelic.js +29 -0
- package/dist/leagues/handball.d.ts +45 -0
- package/dist/leagues/handball.js +32 -0
- package/dist/leagues/hockey.d.ts +63 -0
- package/dist/leagues/hockey.js +166 -0
- package/dist/leagues/lacrosse.d.ts +103 -0
- package/dist/leagues/lacrosse.js +175 -0
- package/dist/leagues/rugby.d.ts +59 -0
- package/dist/leagues/rugby.js +72 -0
- package/dist/leagues/sources.d.ts +18 -0
- package/dist/leagues/sources.js +95 -0
- package/dist/leagues/types.d.ts +43 -0
- package/dist/leagues/types.js +5 -0
- package/dist/leagues-entry.d.ts +23 -0
- package/dist/leagues-entry.js +15 -0
- package/dist/leagues.d.ts +172 -0
- package/dist/leagues.js +462 -0
- package/dist/look.d.ts +50 -0
- package/dist/look.js +186 -0
- package/dist/mark.d.ts +35 -0
- package/dist/mark.js +59 -0
- package/dist/mount-entry.d.ts +2 -0
- package/dist/mount-entry.js +2 -0
- package/dist/mount.d.ts +63 -0
- package/dist/mount.js +167 -0
- package/dist/mow.d.ts +36 -0
- package/dist/mow.js +111 -0
- package/dist/names.d.ts +77 -0
- package/dist/names.js +97 -0
- package/dist/outline.d.ts +25 -0
- package/dist/outline.js +112 -0
- package/dist/parks-entry.d.ts +4 -0
- package/dist/parks-entry.js +3 -0
- package/dist/parks.d.ts +200 -0
- package/dist/parks.data.d.ts +2 -0
- package/dist/parks.data.js +4489 -0
- package/dist/parks.js +92 -0
- package/dist/plot-entry.d.ts +2 -0
- package/dist/plot-entry.js +2 -0
- package/dist/plot.d.ts +74 -0
- package/dist/plot.js +68 -0
- package/dist/png-entry.d.ts +2 -0
- package/dist/png-entry.js +2 -0
- package/dist/png.d.ts +26 -0
- package/dist/png.js +46 -0
- package/dist/ranges.d.ts +33 -0
- package/dist/ranges.js +178 -0
- package/dist/ranges.names.d.ts +31 -0
- package/dist/ranges.names.js +65 -0
- package/dist/react-entry.d.ts +2 -0
- package/dist/react-entry.js +2 -0
- package/dist/react.d.ts +53 -0
- package/dist/react.js +58 -0
- package/dist/replay-entry.d.ts +5 -0
- package/dist/replay-entry.js +4 -0
- package/dist/replay.control.d.ts +47 -0
- package/dist/replay.control.js +184 -0
- package/dist/replay.d.ts +170 -0
- package/dist/replay.dom.d.ts +21 -0
- package/dist/replay.dom.js +388 -0
- package/dist/replay.js +579 -0
- package/dist/replay.types.d.ts +152 -0
- package/dist/replay.types.js +1 -0
- package/dist/restyle.d.ts +21 -0
- package/dist/restyle.js +70 -0
- package/dist/road.d.ts +26 -0
- package/dist/road.draw.d.ts +6 -0
- package/dist/road.draw.js +269 -0
- package/dist/road.js +59 -0
- package/dist/road.model.d.ts +63 -0
- package/dist/road.model.js +215 -0
- package/dist/road.style.d.ts +7 -0
- package/dist/road.style.js +26 -0
- package/dist/road.types.d.ts +122 -0
- package/dist/road.types.js +1 -0
- package/dist/scene-entry.d.ts +7 -0
- package/dist/scene-entry.js +5 -0
- package/dist/scene.css.d.ts +44 -0
- package/dist/scene.css.js +296 -0
- package/dist/scene.d.ts +27 -0
- package/dist/scene.fit.d.ts +12 -0
- package/dist/scene.fit.js +18 -0
- package/dist/scene.flat.d.ts +38 -0
- package/dist/scene.flat.js +167 -0
- package/dist/scene.js +420 -0
- package/dist/scene.path.d.ts +40 -0
- package/dist/scene.path.js +357 -0
- package/dist/scene.types.d.ts +172 -0
- package/dist/scene.types.js +1 -0
- package/dist/scene.xml.d.ts +31 -0
- package/dist/scene.xml.js +81 -0
- package/dist/score.d.ts +70 -0
- package/dist/score.js +212 -0
- package/dist/sets.board.d.ts +22 -0
- package/dist/sets.board.js +89 -0
- package/dist/sheet.d.ts +18 -0
- package/dist/sheet.js +38 -0
- package/dist/special.d.ts +44 -0
- package/dist/special.js +204 -0
- package/dist/special.style.d.ts +8 -0
- package/dist/special.style.js +36 -0
- package/dist/strings.d.ts +581 -0
- package/dist/strings.js +411 -0
- package/dist/style.d.ts +35 -0
- package/dist/style.js +177 -0
- package/dist/surfaces/baseball.d.ts +33 -0
- package/dist/surfaces/baseball.js +208 -0
- package/dist/surfaces/baseball.walls.d.ts +16 -0
- package/dist/surfaces/baseball.walls.js +150 -0
- package/dist/surfaces/basketball.d.ts +8 -0
- package/dist/surfaces/basketball.js +199 -0
- package/dist/surfaces/curling.d.ts +23 -0
- package/dist/surfaces/curling.js +128 -0
- package/dist/surfaces/field.d.ts +12 -0
- package/dist/surfaces/field.js +163 -0
- package/dist/surfaces/football.d.ts +12 -0
- package/dist/surfaces/football.js +208 -0
- package/dist/surfaces/hockey.d.ts +10 -0
- package/dist/surfaces/hockey.js +166 -0
- package/dist/surfaces/net.d.ts +7 -0
- package/dist/surfaces/net.js +151 -0
- package/dist/surfaces/soccer-providers.d.ts +124 -0
- package/dist/surfaces/soccer-providers.js +334 -0
- package/dist/surfaces/soccer-spec.d.ts +138 -0
- package/dist/surfaces/soccer-spec.js +175 -0
- package/dist/surfaces/soccer.d.ts +25 -0
- package/dist/surfaces/soccer.js +270 -0
- package/dist/surfaces/surface.d.ts +180 -0
- package/dist/surfaces/surface.js +49 -0
- package/dist/team.common.d.ts +75 -0
- package/dist/team.common.js +97 -0
- package/dist/team.formation.d.ts +24 -0
- package/dist/team.formation.js +121 -0
- package/dist/team.geometry.d.ts +66 -0
- package/dist/team.geometry.js +304 -0
- package/dist/team.layers.d.ts +16 -0
- package/dist/team.layers.js +32 -0
- package/dist/team.motion.d.ts +9 -0
- package/dist/team.motion.js +325 -0
- package/dist/team.network.d.ts +43 -0
- package/dist/team.network.js +215 -0
- package/dist/team.shape.d.ts +12 -0
- package/dist/team.shape.js +217 -0
- package/dist/team.types.d.ts +189 -0
- package/dist/team.types.js +1 -0
- package/dist/text.d.ts +31 -0
- package/dist/text.js +88 -0
- package/dist/themes.d.ts +14 -0
- package/dist/themes.js +24 -0
- package/dist/types.d.ts +565 -0
- package/dist/types.js +1 -0
- package/dist/units.d.ts +45 -0
- package/dist/units.js +90 -0
- package/dist/version.d.ts +2 -0
- package/dist/version.js +2 -0
- package/package.json +234 -4
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { fixed } from "./fields.js";
|
|
2
|
+
import { inFeet } from "./types.js";
|
|
3
|
+
/** The court's figures in feet, from the unit the rules give them in. */
|
|
4
|
+
export const handballInFeet = (figures, unit) => inFeet(figures, unit);
|
|
5
|
+
/**
|
|
6
|
+
* The IHF's court, from Rule 1 of the Rules of the Game for Indoor Handball (1 July 2025): 40 by 20 m (1:1); the goal 3 m wide and 2 m high (1:2); lines 5 cm, the goal line between the posts 8 cm (1:3); the
|
|
7
|
+
* goal-area line a 3 m line 6 m from the goal line with quarter circles of 6 m about the posts' rear inner corners (1:4); the free-throw line broken, 3 m outside it, segments and spaces of 15 cm (1:5); the 7-metre line 1 m
|
|
8
|
+
* long (1:6); the 4-metre line 15 cm long (1:7); the throw-off area 4 m across (1:9); the substitution line 4.5 m from the centre line, ended by a mark 15 cm either side of the side line (1:10). The net's 1.1 m
|
|
9
|
+
* depth at the ground is from the Guidelines for Playing Courts and Goals (V h), which are not part of the rules.
|
|
10
|
+
*/
|
|
11
|
+
export const IHF_COURT = {
|
|
12
|
+
length: fixed(40),
|
|
13
|
+
width: fixed(20),
|
|
14
|
+
goalWidth: 3,
|
|
15
|
+
goalHeight: 2,
|
|
16
|
+
goalDepth: 1.1,
|
|
17
|
+
areaLine: 3,
|
|
18
|
+
areaDistance: 6,
|
|
19
|
+
freeThrowOutside: 3,
|
|
20
|
+
freeThrowDash: 0.15,
|
|
21
|
+
sevenLine: 1,
|
|
22
|
+
sevenDistance: 7,
|
|
23
|
+
fourLine: 0.15,
|
|
24
|
+
fourDistance: 4,
|
|
25
|
+
throwOff: 4,
|
|
26
|
+
substitution: 4.5,
|
|
27
|
+
substitutionMark: 0.15,
|
|
28
|
+
lineWidth: 0.05,
|
|
29
|
+
goalLineWidth: 0.08,
|
|
30
|
+
};
|
|
31
|
+
/** The handball leagues. */
|
|
32
|
+
export const HANDBALL_LEAGUES = [{ id: "ihf", family: "handball", name: { en: "IHF handball court", ja: "IHFのハンドボールコート" }, unit: "m", dimensions: IHF_COURT, sources: ["ihf-rules"], builtIn: true }];
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { Unit } from "../units.ts";
|
|
2
|
+
import { type LeagueBase } from "./types.ts";
|
|
3
|
+
/** The figures of an ice rink. Lengths, in the unit of the table they are in. */
|
|
4
|
+
export interface RinkFigures {
|
|
5
|
+
/** End boards to end boards. */
|
|
6
|
+
length: number;
|
|
7
|
+
width: number;
|
|
8
|
+
/** The radius of the boards' corners. */
|
|
9
|
+
cornerRadius: number;
|
|
10
|
+
/** The goal line, from the end boards. */
|
|
11
|
+
goalLine: number;
|
|
12
|
+
/** The blue lines, from the end boards. */
|
|
13
|
+
blueLine: number;
|
|
14
|
+
/** The face-off circles' radius. */
|
|
15
|
+
circleRadius: number;
|
|
16
|
+
/** An end-zone face-off spot, from the goal line, and from the rink's long axis. */
|
|
17
|
+
endSpotFromGoalLine: number;
|
|
18
|
+
spotOffset: number;
|
|
19
|
+
spotRadius: number;
|
|
20
|
+
/** A neutral-zone spot, from the blue line. */
|
|
21
|
+
neutralSpotFromBlue: number;
|
|
22
|
+
centreSpotRadius: number;
|
|
23
|
+
/** The hash marks beside an end-zone circle: how long, and how far apart; none when the rules give none. */
|
|
24
|
+
hash: {
|
|
25
|
+
length: number;
|
|
26
|
+
apart: number;
|
|
27
|
+
} | null;
|
|
28
|
+
/** The goal crease: the radius of its arc, how deep its straight sides are, half its width at the goal line, and where the short marks stand (from the goal line). */
|
|
29
|
+
crease: {
|
|
30
|
+
radius: number;
|
|
31
|
+
depth: number;
|
|
32
|
+
halfWidth: number;
|
|
33
|
+
mark: number | null;
|
|
34
|
+
};
|
|
35
|
+
/** The goal net: its width and its depth. */
|
|
36
|
+
net: {
|
|
37
|
+
width: number;
|
|
38
|
+
depth: number;
|
|
39
|
+
};
|
|
40
|
+
/** The goalkeeper's trapezoid behind the net, or none. */
|
|
41
|
+
trapezoid: {
|
|
42
|
+
atBoards: number;
|
|
43
|
+
atGoalLine: number;
|
|
44
|
+
} | null;
|
|
45
|
+
/** The referee's crease, a semicircle, or none. */
|
|
46
|
+
refereeCrease: number | null;
|
|
47
|
+
/** The width of the goal line, the blue and red lines, and the face-off circles' lines. */
|
|
48
|
+
lineWidths: {
|
|
49
|
+
goal: number;
|
|
50
|
+
major: number;
|
|
51
|
+
minor: number;
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
/** A rink as the drawing wants it: the figures with every length in feet. */
|
|
55
|
+
export type RinkSpec = RinkFigures;
|
|
56
|
+
/** A rink's figures in feet, from the unit its rulebook gives them in. */
|
|
57
|
+
export declare const rinkInFeet: (figures: RinkFigures, unit: Unit) => RinkSpec;
|
|
58
|
+
/** The NHL rink today, from `NHL` (geometry.ts). Rule 1 of the NHL rulebook. */
|
|
59
|
+
export declare const NHL_RINK: RinkFigures;
|
|
60
|
+
/** A league with an ice rink of its own. */
|
|
61
|
+
export type HockeyLeague = LeagueBase<"hockey", RinkFigures>;
|
|
62
|
+
/** The hockey leagues, the NHL first. */
|
|
63
|
+
export declare const HOCKEY_LEAGUES: readonly HockeyLeague[];
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
// The ice rinks: the NHL's, which the package started with, and each league that marks its rink differently. Every figure is the
|
|
2
|
+
// rulebook's, in its own unit; docs/sources.md says which rule.
|
|
3
|
+
import { NHL } from "../geometry.js";
|
|
4
|
+
import { inFeet } from "./types.js";
|
|
5
|
+
/** A rink's figures in feet, from the unit its rulebook gives them in. */
|
|
6
|
+
export const rinkInFeet = (figures, unit) => inFeet(figures, unit);
|
|
7
|
+
/** The NHL rink today, from `NHL` (geometry.ts). Rule 1 of the NHL rulebook. */
|
|
8
|
+
export const NHL_RINK = {
|
|
9
|
+
length: NHL.length,
|
|
10
|
+
width: NHL.width,
|
|
11
|
+
cornerRadius: NHL.cornerRadius,
|
|
12
|
+
goalLine: NHL.goalLine,
|
|
13
|
+
blueLine: NHL.blueLine,
|
|
14
|
+
circleRadius: NHL.circleRadius,
|
|
15
|
+
endSpotFromGoalLine: NHL.endSpotFromGoalLine,
|
|
16
|
+
spotOffset: NHL.spotOffset,
|
|
17
|
+
spotRadius: NHL.spotRadius,
|
|
18
|
+
neutralSpotFromBlue: NHL.neutralSpotFromBlue,
|
|
19
|
+
centreSpotRadius: NHL.centreSpotRadius,
|
|
20
|
+
hash: { length: NHL.hashLength, apart: NHL.hashApart },
|
|
21
|
+
crease: { radius: NHL.crease.radius, depth: NHL.crease.depth, halfWidth: NHL.crease.halfWidth, mark: 4 },
|
|
22
|
+
net: { width: NHL.net.width, depth: NHL.net.depth },
|
|
23
|
+
trapezoid: { atBoards: NHL.trapezoid.atBoards, atGoalLine: NHL.trapezoid.atGoalLine },
|
|
24
|
+
refereeCrease: NHL.refereeCrease,
|
|
25
|
+
lineWidths: { goal: NHL.goalLineWidth, major: NHL.lineWidth, minor: 1 / 6 },
|
|
26
|
+
};
|
|
27
|
+
/** The NHL's rink with other markings laid over it: most leagues' Rule 1 is the NHL's, nearly word for word. */
|
|
28
|
+
const rink = (over) => ({ ...NHL_RINK, ...over });
|
|
29
|
+
/** Hash marks beside an end-zone circle, as the NCAA prints them: 2 feet long, 5 ft 7 in apart (the NHL's Rule 1.9 says the same, and `NHL_RINK` has it). */
|
|
30
|
+
const HASH_5_7 = { length: 2, apart: 5 + 7 / 12 };
|
|
31
|
+
/** The trapezoid the NCAA marks for Division I men's games from 2026-27: 28 feet at the boards, 22 at the goal line. */
|
|
32
|
+
const NCAA_TRAPEZOID = { atBoards: 28, atGoalLine: 22 };
|
|
33
|
+
/** The hockey leagues, the NHL first. */
|
|
34
|
+
export const HOCKEY_LEAGUES = [
|
|
35
|
+
{ id: "nhl", family: "hockey", name: { en: "NHL hockey rink", ja: "NHLのアイスホッケーリンク" }, unit: "ft", dimensions: NHL_RINK, sources: ["nhl-rules"], builtIn: true },
|
|
36
|
+
{
|
|
37
|
+
id: "iihf",
|
|
38
|
+
family: "hockey",
|
|
39
|
+
name: { en: "IIHF ice hockey rink", ja: "IIHF(国際アイスホッケー連盟)のアイスホッケーリンク" },
|
|
40
|
+
unit: "m",
|
|
41
|
+
// Rules 1.2 to 1.9 and Appendix VI of the IIHF Official Rule Book 2025/26 (the 2026/27 edition is the same), in metres. The rules give a range for the width (26 to 30 m) and the corner radius (7 to 8.5 m): the largest of each is drawn. The spots' places and the crease are read from the diagram; the goal's depth is the rules' none.
|
|
42
|
+
dimensions: {
|
|
43
|
+
length: 60,
|
|
44
|
+
width: 30,
|
|
45
|
+
cornerRadius: 8.5,
|
|
46
|
+
goalLine: 4,
|
|
47
|
+
blueLine: 22.5,
|
|
48
|
+
circleRadius: 4.5,
|
|
49
|
+
endSpotFromGoalLine: 6,
|
|
50
|
+
spotOffset: 7,
|
|
51
|
+
spotRadius: 0.3,
|
|
52
|
+
neutralSpotFromBlue: 1.5,
|
|
53
|
+
centreSpotRadius: 0.15,
|
|
54
|
+
hash: { length: 0.6, apart: 1.7 },
|
|
55
|
+
crease: { radius: 1.83, depth: 1.36, halfWidth: 1.225, mark: null },
|
|
56
|
+
net: { width: 1.83, depth: 1 },
|
|
57
|
+
trapezoid: { atBoards: 8.6, atGoalLine: 6.8 },
|
|
58
|
+
refereeCrease: 3,
|
|
59
|
+
lineWidths: { goal: 0.05, major: 0.3, minor: 0.05 },
|
|
60
|
+
},
|
|
61
|
+
sources: ["iihf-2025"],
|
|
62
|
+
history: {
|
|
63
|
+
blueLine: [
|
|
64
|
+
{ from: 2018, value: 22.86, what: "Blue lines are 22.86 m (75 feet) from the end boards.", ja: "ブルーラインはエンドボードから22.86m(75フィート)の位置にあります。", sources: ["iihf-2018"] },
|
|
65
|
+
{ from: 2022, value: 22.5, what: "Blue lines are 22.50 m from the end boards (the diagram of the 2022/23 rule book; the sources do not say which edge of the line is measured).", ja: "ブルーラインはエンドボードから22.50mの位置です(2022/23年版ルールブックの図による。線のどちらの縁から測るかは、資料には書かれていません)。", sources: ["iihf-2022-23"] },
|
|
66
|
+
],
|
|
67
|
+
trapezoid: [
|
|
68
|
+
{ from: 2018, value: null, what: "No restricted area behind the goal: the goalkeeper may play the puck anywhere.", ja: "ゴール裏にトラペゾイドはなく、ゴールキーパーはどこでもパックを扱えます。", sources: ["iihf-2018"] },
|
|
69
|
+
{ from: 2021, value: { atBoards: 8.6, atGoalLine: 6.8 }, what: "A restricted area for goalkeepers behind the net is marked: 6.80 m at the goal line, 8.60 m at the boards.", ja: "ゴール裏にゴールキーパーの制限区域(トラペゾイド)が引かれます。ゴールライン側が6.80m、エンドボード側が8.60mです。", sources: ["iihf-2021"] },
|
|
70
|
+
],
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
id: "ncaa-men",
|
|
75
|
+
family: "hockey",
|
|
76
|
+
name: { en: "NCAA men's ice hockey rink", ja: "NCAA男子のアイスホッケーリンク" },
|
|
77
|
+
unit: "ft",
|
|
78
|
+
// Rule 1 of the NCAA Men's and Women's Ice Hockey Rules: 200 by 85 feet, the corners 20 feet in radius, goal lines 11 feet (10 to 15 allowed), blue lines 64 feet from the goal lines (60 at least). Division I men's games have the trapezoid from 2026-27.
|
|
79
|
+
dimensions: rink({ cornerRadius: 20, hash: HASH_5_7, trapezoid: NCAA_TRAPEZOID }),
|
|
80
|
+
sources: ["ncaa-hockey", "ncaa-news-2026"],
|
|
81
|
+
history: {
|
|
82
|
+
trapezoid: [
|
|
83
|
+
{ from: null, value: null, what: "No trapezoid behind the net.", ja: "ゴール裏にトラペゾイド(台形の区域)はありません。", sources: ["ncaa-news-2026"] },
|
|
84
|
+
{ from: 2026, value: NCAA_TRAPEZOID, what: "Division I men's games have the trapezoid behind the net: 22 feet at the goal line, 28 at the boards.", ja: "ディビジョンI男子の試合では、ゴール裏にトラペゾイドが引かれます。ゴールライン側が22フィート、エンドボード側が28フィートです。", sources: ["ncaa-news-2026"] },
|
|
85
|
+
],
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
id: "ncaa-women",
|
|
90
|
+
family: "hockey",
|
|
91
|
+
name: { en: "NCAA women's ice hockey rink", ja: "NCAA女子のアイスホッケーリンク" },
|
|
92
|
+
unit: "ft",
|
|
93
|
+
// The same rink with no painted trapezoid: the goalkeeper's privileged area is bounded by imaginary lines (Rule 1.6).
|
|
94
|
+
dimensions: rink({ cornerRadius: 20, hash: HASH_5_7, trapezoid: null }),
|
|
95
|
+
sources: ["ncaa-hockey"],
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
id: "ahl",
|
|
99
|
+
family: "hockey",
|
|
100
|
+
name: { en: "AHL hockey rink", ja: "AHLのアイスホッケーリンク" },
|
|
101
|
+
unit: "ft",
|
|
102
|
+
// Rule 1 of the AHL Official Rules is the NHL's: 200 by 85 feet, goal lines 11 feet, blue lines 64 feet from the goal lines.
|
|
103
|
+
dimensions: NHL_RINK,
|
|
104
|
+
sources: ["ahl-2025"],
|
|
105
|
+
history: {
|
|
106
|
+
blueLine: [
|
|
107
|
+
{ from: null, value: 71, what: "Blue lines are 71 feet from the end boards: 60-foot attack zones and a 58-foot neutral zone (worked out from the AHL's move of 4 feet).", ja: "ブルーラインはエンドボードから71フィート(約21.6m)で、アタッキングゾーンは60フィート、ニュートラルゾーンは58フィートです(AHLが発表した4フィートの移動から算出)。", sources: ["ahl-2005"] },
|
|
108
|
+
{ from: 2005, value: 75, what: "Blue lines move 4 feet towards centre ice: 64-foot attack zones and a 50-foot neutral zone.", ja: "ブルーラインがリンクの中央寄りに4フィート移り、アタッキングゾーンは64フィート、ニュートラルゾーンは50フィートになります。", sources: ["ahl-2005"] },
|
|
109
|
+
],
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
id: "echl",
|
|
114
|
+
family: "hockey",
|
|
115
|
+
name: { en: "ECHL hockey rink", ja: "ECHLのアイスホッケーリンク" },
|
|
116
|
+
unit: "ft",
|
|
117
|
+
// Rule 1 of the ECHL Official Rules is the NHL's (its blue-line sentence reads "sixty feet (64')": the numeral is taken).
|
|
118
|
+
dimensions: NHL_RINK,
|
|
119
|
+
sources: ["echl-2025"],
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
id: "ohl",
|
|
123
|
+
family: "hockey",
|
|
124
|
+
name: { en: "OHL hockey rink", ja: "OHLのアイスホッケーリンク" },
|
|
125
|
+
unit: "ft",
|
|
126
|
+
// Rule 1 of the OHL Official Rules is the NHL's.
|
|
127
|
+
dimensions: NHL_RINK,
|
|
128
|
+
sources: ["ohl-2025"],
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
id: "whl",
|
|
132
|
+
family: "hockey",
|
|
133
|
+
name: { en: "WHL hockey rink", ja: "WHLのアイスホッケーリンク" },
|
|
134
|
+
unit: "ft",
|
|
135
|
+
// Rule 1 of the WHL Rule Book is the NHL's.
|
|
136
|
+
dimensions: NHL_RINK,
|
|
137
|
+
sources: ["whl-2025"],
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
id: "qmjhl",
|
|
141
|
+
family: "hockey",
|
|
142
|
+
name: { en: "QMJHL hockey rink", ja: "QMJHLのアイスホッケーリンク" },
|
|
143
|
+
unit: "ft",
|
|
144
|
+
// Rule 1 of the QMJHL Playing Rules is the NHL's, except that the hash marks beside a circle are 2 feet long and 5 feet apart.
|
|
145
|
+
dimensions: rink({ hash: { length: 2, apart: 5 } }),
|
|
146
|
+
sources: ["qmjhl-2025"],
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
id: "ushl",
|
|
150
|
+
family: "hockey",
|
|
151
|
+
name: { en: "USHL hockey rink", ja: "USHLのアイスホッケーリンク" },
|
|
152
|
+
unit: "ft",
|
|
153
|
+
// The USHL's rinks must follow the USA Hockey Junior rulebook (Rules 101 to 105): 185 to 200 by 85 to 100 feet (200 by 85 is drawn), goal lines 11 feet, blue lines 64 feet from the goal lines, circles 30 feet across, hash marks 2 feet long and 4 apart, no trapezoid. The rules give no corner radius: the NHL's is drawn.
|
|
154
|
+
dimensions: rink({ hash: { length: 2, apart: 4 }, trapezoid: null }),
|
|
155
|
+
sources: ["usa-hockey-junior", "ushl-2021"],
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
id: "pwhl",
|
|
159
|
+
family: "hockey",
|
|
160
|
+
name: { en: "PWHL hockey rink", ja: "PWHLのアイスホッケーリンク" },
|
|
161
|
+
unit: "ft",
|
|
162
|
+
// Rule 1 of the PWHL Rulebook is the NHL's, with no restricted area for goalkeepers (1.8 and 27.8).
|
|
163
|
+
dimensions: rink({ trapezoid: null }),
|
|
164
|
+
sources: ["pwhl-2025"],
|
|
165
|
+
},
|
|
166
|
+
];
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import type { Unit } from "../units.ts";
|
|
2
|
+
import { type Span } from "./fields.ts";
|
|
3
|
+
import { type LeagueBase } from "./types.ts";
|
|
4
|
+
/** The figures of a lacrosse surface, in the unit of the table they are in. `null` is what a game does not mark. */
|
|
5
|
+
export interface LacrosseFigures {
|
|
6
|
+
/** `box` (a floor with boards), or the field of the `men`'s game, the `women`'s or the `pll`'s. */
|
|
7
|
+
kind: "box" | "men" | "women" | "pll";
|
|
8
|
+
length: Span;
|
|
9
|
+
width: Span;
|
|
10
|
+
lineWidth: number;
|
|
11
|
+
/** The goal line's distance from the end line (the end boards on a floor). */
|
|
12
|
+
goalLine: number;
|
|
13
|
+
/** The goal's opening, and the depth of the net behind the goal line. */
|
|
14
|
+
goalWidth: number;
|
|
15
|
+
goalHeight: number;
|
|
16
|
+
netDepth: number;
|
|
17
|
+
/** The crease: the circle's radius about the middle of the goal line (men's game and the floor), and, on a floor, the flat that cuts it that far behind the goal line. */
|
|
18
|
+
crease: number | null;
|
|
19
|
+
creaseFlat: number | null;
|
|
20
|
+
/** The width of the crease line (the floor's). */
|
|
21
|
+
creaseLine: number | null;
|
|
22
|
+
/** The half circle of the goal mouth, from the middle of the goal line to each goal line extended (the NCAA men's). */
|
|
23
|
+
goalMouth: number | null;
|
|
24
|
+
/** The women's game: the goal circle's radius, the semicircle (the marking area) or fan, and the arc of 45-degree lines (a fan of the NCAA women's, the 11 m marking area of World Lacrosse). All from the middle of the goal line. */
|
|
25
|
+
goalCircle: number | null;
|
|
26
|
+
semicircle: number | null;
|
|
27
|
+
arcFan: number | null;
|
|
28
|
+
/** The restraining line: its distance from the goal line (the field), or from the centre line (the floor), across the whole width. */
|
|
29
|
+
restraining: number | null;
|
|
30
|
+
restrainingFromCentre: number | null;
|
|
31
|
+
/** The NCAA men's attack-area line: the half-length of the line parallel to the goal line, and its distance from the goal line. */
|
|
32
|
+
attackHalf: number | null;
|
|
33
|
+
attackFrom: number | null;
|
|
34
|
+
/** The wing lines: their distance from the centre of the field, and how far each extends either side of the centre line. */
|
|
35
|
+
wings: {
|
|
36
|
+
from: number;
|
|
37
|
+
half: number;
|
|
38
|
+
} | null;
|
|
39
|
+
/** The women's game: the centre circle's radius and the short line through the centre, parallel to the goal lines. The floor: the face-off circle's outer radius and the dotted inner circle's. */
|
|
40
|
+
centreCircle: number | null;
|
|
41
|
+
centreLine: number | null;
|
|
42
|
+
faceOffOuter: number | null;
|
|
43
|
+
faceOffInner: number | null;
|
|
44
|
+
/** The floor: the corner face-off spots' distance from the boards and inside the restraining lines; and the floor's corner radius. */
|
|
45
|
+
cornerSpotWall: number | null;
|
|
46
|
+
cornerSpotInside: number | null;
|
|
47
|
+
cornerRadius: number | null;
|
|
48
|
+
/** The PLL's two-point arc: its distance from the middle of the goal line at the goal line extended, and the radius of the arc across the field. */
|
|
49
|
+
twoPoint: {
|
|
50
|
+
gle: number;
|
|
51
|
+
radius: number;
|
|
52
|
+
} | null;
|
|
53
|
+
}
|
|
54
|
+
/** The surface as the drawing wants it: the figures with every length in feet. */
|
|
55
|
+
export type LacrosseSpec = LacrosseFigures;
|
|
56
|
+
/** A surface's figures in feet, from the unit its rulebook gives them in. */
|
|
57
|
+
export declare const lacrosseInFeet: (figures: LacrosseFigures, unit: Unit) => LacrosseSpec;
|
|
58
|
+
/** A league with a lacrosse surface of its own. */
|
|
59
|
+
export type LacrosseLeague = LeagueBase<"lacrosse", LacrosseFigures>;
|
|
60
|
+
/**
|
|
61
|
+
* World Lacrosse's men's field (Men's Field Lacrosse Official Playing Rules 2025-2027, v1.1): 91.4 to 100 m long and 50 to 60 m wide (1.1); goal posts 1.83 m apart and 1.83 m high, 12 m from each end line
|
|
62
|
+
* (2.1, 2.2); the net's anchor 2.1 m behind the goal line (4.1); the crease a circle of 3 m radius (3.1); the goal area lines 22 m from the goal line (5.1); wing lines 18 m from the centre, extending 10 m
|
|
63
|
+
* either side of the centre line (7.1); lines 5 cm, the centre line 10 cm (12.1). The centre is an X or a 10 cm square (6.1).
|
|
64
|
+
*/
|
|
65
|
+
export declare const WORLD_MEN_FIELD: LacrosseFigures;
|
|
66
|
+
/**
|
|
67
|
+
* World Lacrosse's women's field (Women's Field Lacrosse Official Playing Rules 2025-2026, v1.1): 91.4 to 100 m by 50 to 60 m (1.A.2); the goal line 12 m from each end line and 1.83 m long (1.A.5); a goal circle of
|
|
68
|
+
* 3 m radius (1.A.8); the 15 m marking area, a semicircle from the middle of the goal line to each goal line extended (1.A.6); the 11 m marking area, with a line from where the goal line extended meets the goal
|
|
69
|
+
* circle at 45 degrees to it out to the 11 m radius (1.A.7); restraining lines 22 m from each goal line (1.A.9); the centre line 3 m long (1.A.10) and the centre circle 9 m in radius (1.A.11); lines 5 to 10
|
|
70
|
+
* cm (1.A.2). The book prints no depth for the net: the men's 2.1 m is drawn.
|
|
71
|
+
*/
|
|
72
|
+
export declare const WORLD_WOMEN_FIELD: LacrosseFigures;
|
|
73
|
+
/**
|
|
74
|
+
* The NCAA's men's field (NCAA Men's Lacrosse Rules and Interpretations, 2027 and 2028, Rule 1): 110 by 60 yards (1-2); the goal 6 ft by 6 ft, 15 yards from each end line (1-3); the net fastened 7 ft behind the
|
|
75
|
+
* centre of the goal (1-5); a crease of 9 ft radius and a goal mouth of 6 ft radius (1-4); the attack-area line 40 yards long, 20 yards from the goal line, joined to the end lines (1-6); the defensive-area line
|
|
76
|
+
* 20 yards from the goal line, sideline to sideline (1-7); wing lines 20 yards from the centre, 10 yards each side of the centre line (1-8); the goal line and goal mouth 2 in wide, the centre line 4 in (1-2).
|
|
77
|
+
*/
|
|
78
|
+
export declare const NCAA_MEN_FIELD: LacrosseFigures;
|
|
79
|
+
/**
|
|
80
|
+
* The NCAA's women's field (NCAA Women's Lacrosse Rules, 2026 and 2027, Rule 1): 101 to 110 m by 55 to 64 m, the optimal 110 by 60 m with the goals 92 m apart, 9 m behind each goal line (1-1); the goal 1.83 m
|
|
81
|
+
* by 1.83 m with the net 2.1 m behind the goal line (1-18); a goal circle of 2.6 m radius (1-21); a restraining line 27 m from each goal line (1-4); a centre circle of 9 m radius and a 3 m line through the centre
|
|
82
|
+
* (1-5); an arc of 8 m and a fan of 12 m from the goal circle, the arc ending at lines at 45 degrees to the goal line extended and the fan at the goal line extended (1-6); lines 5 to 10.1 cm, the goal line 5 cm (1-3).
|
|
83
|
+
*/
|
|
84
|
+
export declare const NCAA_WOMEN_FIELD: LacrosseFigures;
|
|
85
|
+
/**
|
|
86
|
+
* The PLL's field (2024 PLL Rulebook, Section II, the newest book found): 100 by 60 yards (A); the goal 6 ft by 6 ft, 15 yards from each end line (C, D); a crease of 9 ft radius (E); the two-point arc 13 yards from
|
|
87
|
+
* the middle of the goal line at the goal line extended, parallel to the sideline until it is 15 yards from it, then an arc of 15 yards, and two straight lines from the goal line extended to the end line (G); wing
|
|
88
|
+
* lines 19 yards from the centre, 10 yards each side (H); the centre line and the arc 4 in wide, the goal lines 2 in (A). The net is "approximately seven feet" back (F).
|
|
89
|
+
*/
|
|
90
|
+
export declare const PLL_FIELD: LacrosseFigures;
|
|
91
|
+
/**
|
|
92
|
+
* The NLL's floor (Official Rules 2025-26, Section 1 and Diagram A): 180 to 200 ft long and 85 wide, corners of 28 ft radius (the diagram's labels); the goal 4 ft 9 in apart and 4 ft high, the goal line 12 ft from the
|
|
93
|
+
* end boards (2.1), poles of 4 ft 6 in behind (2.2); the crease a circle of 9 ft 3 in radius cut by a line 1 ft behind the goal line (3.1); restraining lines 42 ft 6 in from the centre line (1.5); the centre face-off
|
|
94
|
+
* circle of 11 ft radius with a dotted circle of 17 in (6.1); corner face-off spots 5 yards from the boards and 5 yards inside the restraining lines (6.2). The NLL's book prints no line width: World Lacrosse's 2 in is drawn.
|
|
95
|
+
*/
|
|
96
|
+
export declare const NLL_FLOOR: LacrosseFigures;
|
|
97
|
+
/**
|
|
98
|
+
* World Lacrosse's box floor (Box Lacrosse Official Playing Rules 2026-2028, v2.0): the diagram's 200 ft by 85 ft, the same crease (1.1.7), goals (1.2.1), restraining lines (1.1.5) and face-off circles (1.1.9) as the
|
|
99
|
+
* NLL's, all lines 2 in (1.1.3). Its Rule 1.2.2 says "25 m from the midline", which does not fit the feet.
|
|
100
|
+
*/
|
|
101
|
+
export declare const WORLD_BOX_FLOOR: LacrosseFigures;
|
|
102
|
+
/** The lacrosse leagues: World Lacrosse's men's field first, which is what a drawing has without a league. */
|
|
103
|
+
export declare const LACROSSE_LEAGUES: readonly LacrosseLeague[];
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import { fixed, span } from "./fields.js";
|
|
2
|
+
import { inFeet } from "./types.js";
|
|
3
|
+
const inches = (n) => n / 12;
|
|
4
|
+
const ftIn = (ft, inch) => ft + inch / 12;
|
|
5
|
+
/** A surface's figures in feet, from the unit its rulebook gives them in. */
|
|
6
|
+
export const lacrosseInFeet = (figures, unit) => inFeet(figures, unit);
|
|
7
|
+
const NO = {
|
|
8
|
+
crease: null,
|
|
9
|
+
creaseFlat: null,
|
|
10
|
+
creaseLine: null,
|
|
11
|
+
goalMouth: null,
|
|
12
|
+
goalCircle: null,
|
|
13
|
+
semicircle: null,
|
|
14
|
+
arcFan: null,
|
|
15
|
+
restraining: null,
|
|
16
|
+
restrainingFromCentre: null,
|
|
17
|
+
attackHalf: null,
|
|
18
|
+
attackFrom: null,
|
|
19
|
+
wings: null,
|
|
20
|
+
centreCircle: null,
|
|
21
|
+
centreLine: null,
|
|
22
|
+
faceOffOuter: null,
|
|
23
|
+
faceOffInner: null,
|
|
24
|
+
cornerSpotWall: null,
|
|
25
|
+
cornerSpotInside: null,
|
|
26
|
+
cornerRadius: null,
|
|
27
|
+
twoPoint: null,
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* World Lacrosse's men's field (Men's Field Lacrosse Official Playing Rules 2025-2027, v1.1): 91.4 to 100 m long and 50 to 60 m wide (1.1); goal posts 1.83 m apart and 1.83 m high, 12 m from each end line
|
|
31
|
+
* (2.1, 2.2); the net's anchor 2.1 m behind the goal line (4.1); the crease a circle of 3 m radius (3.1); the goal area lines 22 m from the goal line (5.1); wing lines 18 m from the centre, extending 10 m
|
|
32
|
+
* either side of the centre line (7.1); lines 5 cm, the centre line 10 cm (12.1). The centre is an X or a 10 cm square (6.1).
|
|
33
|
+
*/
|
|
34
|
+
export const WORLD_MEN_FIELD = {
|
|
35
|
+
kind: "men",
|
|
36
|
+
length: span(91.4, 100),
|
|
37
|
+
width: span(50, 60),
|
|
38
|
+
lineWidth: 0.05,
|
|
39
|
+
goalLine: 12,
|
|
40
|
+
goalWidth: 1.83,
|
|
41
|
+
goalHeight: 1.83,
|
|
42
|
+
netDepth: 2.1,
|
|
43
|
+
...NO,
|
|
44
|
+
crease: 3,
|
|
45
|
+
restraining: 22,
|
|
46
|
+
wings: { from: 18, half: 10 },
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* World Lacrosse's women's field (Women's Field Lacrosse Official Playing Rules 2025-2026, v1.1): 91.4 to 100 m by 50 to 60 m (1.A.2); the goal line 12 m from each end line and 1.83 m long (1.A.5); a goal circle of
|
|
50
|
+
* 3 m radius (1.A.8); the 15 m marking area, a semicircle from the middle of the goal line to each goal line extended (1.A.6); the 11 m marking area, with a line from where the goal line extended meets the goal
|
|
51
|
+
* circle at 45 degrees to it out to the 11 m radius (1.A.7); restraining lines 22 m from each goal line (1.A.9); the centre line 3 m long (1.A.10) and the centre circle 9 m in radius (1.A.11); lines 5 to 10
|
|
52
|
+
* cm (1.A.2). The book prints no depth for the net: the men's 2.1 m is drawn.
|
|
53
|
+
*/
|
|
54
|
+
export const WORLD_WOMEN_FIELD = {
|
|
55
|
+
kind: "women",
|
|
56
|
+
length: span(91.4, 100),
|
|
57
|
+
width: span(50, 60),
|
|
58
|
+
lineWidth: 0.05,
|
|
59
|
+
goalLine: 12,
|
|
60
|
+
goalWidth: 1.83,
|
|
61
|
+
goalHeight: 1.83,
|
|
62
|
+
netDepth: 2.1,
|
|
63
|
+
...NO,
|
|
64
|
+
goalCircle: 3,
|
|
65
|
+
semicircle: 15,
|
|
66
|
+
arcFan: 11,
|
|
67
|
+
restraining: 22,
|
|
68
|
+
centreCircle: 9,
|
|
69
|
+
centreLine: 3,
|
|
70
|
+
};
|
|
71
|
+
/**
|
|
72
|
+
* The NCAA's men's field (NCAA Men's Lacrosse Rules and Interpretations, 2027 and 2028, Rule 1): 110 by 60 yards (1-2); the goal 6 ft by 6 ft, 15 yards from each end line (1-3); the net fastened 7 ft behind the
|
|
73
|
+
* centre of the goal (1-5); a crease of 9 ft radius and a goal mouth of 6 ft radius (1-4); the attack-area line 40 yards long, 20 yards from the goal line, joined to the end lines (1-6); the defensive-area line
|
|
74
|
+
* 20 yards from the goal line, sideline to sideline (1-7); wing lines 20 yards from the centre, 10 yards each side of the centre line (1-8); the goal line and goal mouth 2 in wide, the centre line 4 in (1-2).
|
|
75
|
+
*/
|
|
76
|
+
export const NCAA_MEN_FIELD = {
|
|
77
|
+
kind: "men",
|
|
78
|
+
length: fixed(110),
|
|
79
|
+
width: fixed(60),
|
|
80
|
+
lineWidth: inches(2) / 3,
|
|
81
|
+
goalLine: 15,
|
|
82
|
+
goalWidth: 2,
|
|
83
|
+
goalHeight: 2,
|
|
84
|
+
netDepth: 7 / 3,
|
|
85
|
+
...NO,
|
|
86
|
+
crease: 3,
|
|
87
|
+
goalMouth: 2,
|
|
88
|
+
restraining: 20,
|
|
89
|
+
attackHalf: 20,
|
|
90
|
+
attackFrom: 20,
|
|
91
|
+
wings: { from: 20, half: 10 },
|
|
92
|
+
};
|
|
93
|
+
/**
|
|
94
|
+
* The NCAA's women's field (NCAA Women's Lacrosse Rules, 2026 and 2027, Rule 1): 101 to 110 m by 55 to 64 m, the optimal 110 by 60 m with the goals 92 m apart, 9 m behind each goal line (1-1); the goal 1.83 m
|
|
95
|
+
* by 1.83 m with the net 2.1 m behind the goal line (1-18); a goal circle of 2.6 m radius (1-21); a restraining line 27 m from each goal line (1-4); a centre circle of 9 m radius and a 3 m line through the centre
|
|
96
|
+
* (1-5); an arc of 8 m and a fan of 12 m from the goal circle, the arc ending at lines at 45 degrees to the goal line extended and the fan at the goal line extended (1-6); lines 5 to 10.1 cm, the goal line 5 cm (1-3).
|
|
97
|
+
*/
|
|
98
|
+
export const NCAA_WOMEN_FIELD = {
|
|
99
|
+
kind: "women",
|
|
100
|
+
length: span(101, 110),
|
|
101
|
+
width: span(55, 64, 60),
|
|
102
|
+
lineWidth: 0.05,
|
|
103
|
+
goalLine: 9,
|
|
104
|
+
goalWidth: 1.83,
|
|
105
|
+
goalHeight: 1.83,
|
|
106
|
+
netDepth: 2.1,
|
|
107
|
+
...NO,
|
|
108
|
+
goalCircle: 2.6,
|
|
109
|
+
semicircle: 14.6,
|
|
110
|
+
arcFan: 10.6,
|
|
111
|
+
restraining: 27,
|
|
112
|
+
centreCircle: 9,
|
|
113
|
+
centreLine: 3,
|
|
114
|
+
};
|
|
115
|
+
/**
|
|
116
|
+
* The PLL's field (2024 PLL Rulebook, Section II, the newest book found): 100 by 60 yards (A); the goal 6 ft by 6 ft, 15 yards from each end line (C, D); a crease of 9 ft radius (E); the two-point arc 13 yards from
|
|
117
|
+
* the middle of the goal line at the goal line extended, parallel to the sideline until it is 15 yards from it, then an arc of 15 yards, and two straight lines from the goal line extended to the end line (G); wing
|
|
118
|
+
* lines 19 yards from the centre, 10 yards each side (H); the centre line and the arc 4 in wide, the goal lines 2 in (A). The net is "approximately seven feet" back (F).
|
|
119
|
+
*/
|
|
120
|
+
export const PLL_FIELD = {
|
|
121
|
+
kind: "pll",
|
|
122
|
+
length: fixed(100),
|
|
123
|
+
width: fixed(60),
|
|
124
|
+
lineWidth: inches(2) / 3,
|
|
125
|
+
goalLine: 15,
|
|
126
|
+
goalWidth: 2,
|
|
127
|
+
goalHeight: 2,
|
|
128
|
+
netDepth: 7 / 3,
|
|
129
|
+
...NO,
|
|
130
|
+
crease: 3,
|
|
131
|
+
wings: { from: 19, half: 10 },
|
|
132
|
+
twoPoint: { gle: 13, radius: 15 },
|
|
133
|
+
};
|
|
134
|
+
const box = (kind, figures) => ({
|
|
135
|
+
kind,
|
|
136
|
+
length: span(180, 200),
|
|
137
|
+
width: fixed(85),
|
|
138
|
+
lineWidth: inches(2),
|
|
139
|
+
goalLine: 12,
|
|
140
|
+
goalWidth: ftIn(4, 9),
|
|
141
|
+
goalHeight: 4,
|
|
142
|
+
netDepth: ftIn(4, 6),
|
|
143
|
+
...NO,
|
|
144
|
+
crease: ftIn(9, 3),
|
|
145
|
+
creaseFlat: 1,
|
|
146
|
+
creaseLine: inches(5),
|
|
147
|
+
restrainingFromCentre: ftIn(42, 6),
|
|
148
|
+
faceOffOuter: 11,
|
|
149
|
+
faceOffInner: inches(17),
|
|
150
|
+
cornerSpotWall: 15,
|
|
151
|
+
cornerSpotInside: 15,
|
|
152
|
+
cornerRadius: 28,
|
|
153
|
+
...figures,
|
|
154
|
+
});
|
|
155
|
+
/**
|
|
156
|
+
* The NLL's floor (Official Rules 2025-26, Section 1 and Diagram A): 180 to 200 ft long and 85 wide, corners of 28 ft radius (the diagram's labels); the goal 4 ft 9 in apart and 4 ft high, the goal line 12 ft from the
|
|
157
|
+
* end boards (2.1), poles of 4 ft 6 in behind (2.2); the crease a circle of 9 ft 3 in radius cut by a line 1 ft behind the goal line (3.1); restraining lines 42 ft 6 in from the centre line (1.5); the centre face-off
|
|
158
|
+
* circle of 11 ft radius with a dotted circle of 17 in (6.1); corner face-off spots 5 yards from the boards and 5 yards inside the restraining lines (6.2). The NLL's book prints no line width: World Lacrosse's 2 in is drawn.
|
|
159
|
+
*/
|
|
160
|
+
export const NLL_FLOOR = box("box", {});
|
|
161
|
+
/**
|
|
162
|
+
* World Lacrosse's box floor (Box Lacrosse Official Playing Rules 2026-2028, v2.0): the diagram's 200 ft by 85 ft, the same crease (1.1.7), goals (1.2.1), restraining lines (1.1.5) and face-off circles (1.1.9) as the
|
|
163
|
+
* NLL's, all lines 2 in (1.1.3). Its Rule 1.2.2 says "25 m from the midline", which does not fit the feet.
|
|
164
|
+
*/
|
|
165
|
+
export const WORLD_BOX_FLOOR = box("box", { length: fixed(200) });
|
|
166
|
+
/** The lacrosse leagues: World Lacrosse's men's field first, which is what a drawing has without a league. */
|
|
167
|
+
export const LACROSSE_LEAGUES = [
|
|
168
|
+
{ id: "world-men", family: "lacrosse", name: { en: "World Lacrosse men's field", ja: "ワールドラクロスの男子フィールド" }, unit: "m", dimensions: WORLD_MEN_FIELD, sources: ["wl-men"], builtIn: true },
|
|
169
|
+
{ id: "world-women", family: "lacrosse", name: { en: "World Lacrosse women's field", ja: "ワールドラクロスの女子フィールド" }, unit: "m", dimensions: WORLD_WOMEN_FIELD, sources: ["wl-women"] },
|
|
170
|
+
{ id: "ncaa-men", family: "lacrosse", name: { en: "NCAA men's lacrosse field", ja: "NCAA男子ラクロスのフィールド" }, unit: "yd", dimensions: NCAA_MEN_FIELD, sources: ["ncaa-men-lacrosse"] },
|
|
171
|
+
{ id: "ncaa-women", family: "lacrosse", name: { en: "NCAA women's lacrosse field", ja: "NCAA女子ラクロスのフィールド" }, unit: "m", dimensions: NCAA_WOMEN_FIELD, sources: ["ncaa-women-lacrosse"] },
|
|
172
|
+
{ id: "pll", family: "lacrosse", name: { en: "PLL field", ja: "PLLのフィールド" }, unit: "yd", dimensions: PLL_FIELD, sources: ["pll-2024"] },
|
|
173
|
+
{ id: "nll", family: "lacrosse", name: { en: "NLL box lacrosse floor", ja: "NLLのボックスラクロスのフロア" }, unit: "ft", dimensions: NLL_FLOOR, sources: ["nll-rules", "wl-box"] },
|
|
174
|
+
{ id: "world-box", family: "lacrosse", name: { en: "World Lacrosse box lacrosse floor", ja: "ワールドラクロスのボックスラクロスのフロア" }, unit: "ft", dimensions: WORLD_BOX_FLOOR, sources: ["wl-box"] },
|
|
175
|
+
];
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { Unit } from "../units.ts";
|
|
2
|
+
import { type Span } from "./fields.ts";
|
|
3
|
+
import { type LeagueBase } from "./types.ts";
|
|
4
|
+
/** The figures of a rugby field. Lengths, in the unit of the table they are in. `null` and `[]` are what a code does not have. */
|
|
5
|
+
export interface RugbyFigures {
|
|
6
|
+
/** `union` or `league`: the lines each code marks differ. */
|
|
7
|
+
code: "union" | "league";
|
|
8
|
+
/** Try line to try line (goal line to goal line), and across. */
|
|
9
|
+
length: Span;
|
|
10
|
+
width: Span;
|
|
11
|
+
/** The depth of each in-goal area, try line to dead-ball line. */
|
|
12
|
+
inGoal: Span;
|
|
13
|
+
/** The width of the lines, as drawn at true width. */
|
|
14
|
+
lineWidth: number;
|
|
15
|
+
/** The goal posts: apart, and the crossbar's top edge above the ground. */
|
|
16
|
+
postsApart: number;
|
|
17
|
+
crossbar: number;
|
|
18
|
+
/** Union: the 22-metre line's distance from the try line, and the 10-metre lines' from the half-way line (dash lines). */
|
|
19
|
+
twentyTwo: number | null;
|
|
20
|
+
tenFromHalfway: number | null;
|
|
21
|
+
/** Union: the length of each dash, the dash lines parallel to the touchlines (from them), the dash line parallel to each try line (from it), and the half-way mark's length. */
|
|
22
|
+
dash: number | null;
|
|
23
|
+
dashFromTouch: number[];
|
|
24
|
+
dashFromTry: number | null;
|
|
25
|
+
halfwayMark: number | null;
|
|
26
|
+
/** Union: the flag posts outside the touchlines, in line with the 22-metre lines and the half-way line. */
|
|
27
|
+
flagsOutside: number | null;
|
|
28
|
+
/** League: lines across the field at this step from each goal line to the half-way line, the distances of the lines marked red, and the scrum lines in from each touchline. */
|
|
29
|
+
step: number | null;
|
|
30
|
+
red: number[];
|
|
31
|
+
scrum: number[];
|
|
32
|
+
scrumWidth: number | null;
|
|
33
|
+
}
|
|
34
|
+
/** A rugby field as the drawing wants it: the figures with every length in feet. */
|
|
35
|
+
export type RugbySpec = RugbyFigures;
|
|
36
|
+
/** A rugby field's figures in feet, from the unit its rulebook gives them in. */
|
|
37
|
+
export declare const rugbyInFeet: (figures: RugbyFigures, unit: Unit) => RugbySpec;
|
|
38
|
+
/** A league with a rugby field of its own. */
|
|
39
|
+
export type RugbyLeague = LeagueBase<"rugby", RugbyFigures>;
|
|
40
|
+
/**
|
|
41
|
+
* World Rugby's field, from Law 1 of the Laws of the Game, Rugby Union, 2026: the field of play 94 to 100 m between the try lines and 68 to 70 m wide; each in-goal 6 to 22 m deep
|
|
42
|
+
* (10 m is drawn: the Laws name none); the 22-metre lines 22 m from the try lines; the 10-metre dash lines 10 m either side of the half-way line; dash lines 5 m and 15 m from the touchlines and 5 m
|
|
43
|
+
* from the try lines, each dash 5 m; the half-way mark 0.5 m long; the goal posts 5.6 m apart on the try line, the crossbar 3 m to its top edge; flags 2 m outside the touchlines. Law 1 gives
|
|
44
|
+
* no width for the lines: 0.1 m is drawn.
|
|
45
|
+
*/
|
|
46
|
+
export declare const WORLD_RUGBY_FIELD: RugbyFigures;
|
|
47
|
+
/**
|
|
48
|
+
* The NRL's field, from Section 1 and Section 18 of the Rugby League Laws of the Game, International Level (2023 edition): 100 m between the goal lines, 68 m wide, in-goal areas 68 by 8 m,
|
|
49
|
+
* goal posts 5.5 m apart and 16 m high, lines 15 cm wide, white, at every 10 m from each goal line to the half-way line, those at 20 m and 40 m red; scrum lines 10 m and 20 m in from each touchline
|
|
50
|
+
* (10 cm). The section also prints a media line 1.5 m outside each touchline, which is not drawn: it gives no length. The crossbar's height, 3 m, is the plan's label in Section 1.
|
|
51
|
+
*/
|
|
52
|
+
export declare const NRL_FIELD: RugbyFigures;
|
|
53
|
+
/**
|
|
54
|
+
* The IRL's field, from Section 1 of the International Laws of the Game (2024): 100 m between the goal lines, 68 m wide, in-goal 6 to 11 m (8 m, the NRL's, is drawn), goal posts 5.5 m apart
|
|
55
|
+
* with the crossbar 3 m up, a line across the field at every 10 m from each goal line to the half-way line. The book prints no line width and no red lines: the NRL's 15 cm is drawn, in white.
|
|
56
|
+
*/
|
|
57
|
+
export declare const IRL_FIELD: RugbyFigures;
|
|
58
|
+
/** The rugby leagues, World Rugby's first. */
|
|
59
|
+
export declare const RUGBY_LEAGUES: readonly RugbyLeague[];
|