Rugby field, in metres from the centre, the in-goal areas included. The middle of the right 22-metre line is (28, 0) in metres; the arrows show which way x (blue) and y (orange) grow.
The picture above was drawn when the docs were built. The script below draws it again with the published package.
import { drawKyogijo } from "@johnmorrisdotca/kyogijo-stadiums";
const svg = drawKyogijo({
sport: "rugby",
layers: [
{
kind: "arrows",
name: "x grows",
from: "rugby",
surfaceSize: { length: 393.70078740157476, width: 229.6587926509186, unit: "ft" },
data: [{ x: 28, y: 0, x2: 42.4, y2: 0 }],
style: { width: 1.2, color: "var(--ky-layer-home)" },
},
{
kind: "arrows",
name: "y grows",
from: "rugby",
surfaceSize: { length: 393.70078740157476, width: 229.6587926509186, unit: "ft" },
data: [{ x: 28, y: 0, x2: 28, y2: 8.4 }],
style: { width: 1.2, color: "var(--ky-layer-away)" },
},
{
kind: "points",
name: "the middle of the right 22-metre line",
from: "rugby",
surfaceSize: { length: 393.70078740157476, width: 229.6587926509186, unit: "ft" },
data: [{ x: 28, y: 0, title: "the middle of the right 22-metre line: 28, 0" }],
style: { size: 4, shape: "star" },
},
{
kind: "text",
name: "axes",
from: "rugby",
surfaceSize: { length: 393.70078740157476, width: 229.6587926509186, unit: "ft" },
data: [{ x: 46.72, y: 0, text: "x" }, { x: 28, y: 11.76, text: "y" }],
style: { size: 4 },
},
],
});
This page imports the package from jsDelivr (major version 0), which serves only versions that have been published to npm. A feature added after the last release is not in it: the page then keeps the picture above and says why. The docs were built from version 0.6.1.