afl

Australian football ground, in metres from the centre. The middle of the right Fifty Metre Arc is (30, 0) in metres; the arrows show which way x (blue) and y (orange) grow.

Australian football groundDrawn as: an Australian football ground, 160 by 141 metres, an oval with the goal squares, the centre square and circles, the fifty metre arcs, and the goal posts and behind posts. Data: 1 x grows. 1 y grows. 1 the middle of the right Fifty Metre Arc. 2 axes.1 x grows1 y grows1 the middle of the right Fifty Metre Arcthe middle of the right Fifty Metre Arc: 30, 02 axesxy

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: "afl",
  layers: [
    {
      kind: "arrows",
      name: "x grows",
      from: "afl",
      surfaceSize: { length: 524.9343832020996, width: 462.59842519685037, unit: "ft" },
      data: [{ x: 30, y: 0, x2: 49.2, y2: 0 }],
      style: { width: 1.2, color: "var(--ky-layer-home)" },
    },
    {
      kind: "arrows",
      name: "y grows",
      from: "afl",
      surfaceSize: { length: 524.9343832020996, width: 462.59842519685037, unit: "ft" },
      data: [{ x: 30, y: 0, x2: 30, y2: 16.92 }],
      style: { width: 1.2, color: "var(--ky-layer-away)" },
    },
    {
      kind: "points",
      name: "the middle of the right Fifty Metre Arc",
      from: "afl",
      surfaceSize: { length: 524.9343832020996, width: 462.59842519685037, unit: "ft" },
      data: [{ x: 30, y: 0, title: "the middle of the right Fifty Metre Arc: 30, 0" }],
      style: { size: 4, shape: "star" },
    },
    {
      kind: "text",
      name: "axes",
      from: "afl",
      surfaceSize: { length: 524.9343832020996, width: 462.59842519685037, unit: "ft" },
      data: [{ x: 54.96, y: 0, text: "x" }, { x: 30, y: 23.69, 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.