squash

Squash court, in metres from the centre of the court. The middle of the short line is (0.59, 0) in metres; the arrows show which way x (blue) and y (orange) grow.

Squash courtDrawn as: a squash court, 9.75 by 6.4 metres, with its short line, half court line and service boxes, the front wall laid flat beside it with its tin, service line and front wall line, and the walls round it. Data: 1 x grows. 1 y grows. 1 the middle of the short line. 2 axes.1 x grows1 y grows1 the middle of the short linethe middle of the short line: 0.59, 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: "squash",
  layers: [
    {
      kind: "arrows",
      name: "x grows",
      from: "squash",
      surfaceSize: { length: 9.75, width: 6.4, unit: "m" },
      data: [{ x: 0.59, y: 0, x2: 1.76, y2: 0 }],
      style: { width: 1.2, color: "var(--ky-layer-home)" },
    },
    {
      kind: "arrows",
      name: "y grows",
      from: "squash",
      surfaceSize: { length: 9.75, width: 6.4, unit: "m" },
      data: [{ x: 0.59, y: 0, x2: 0.59, y2: 1.01 }],
      style: { width: 1.2, color: "var(--ky-layer-away)" },
    },
    {
      kind: "points",
      name: "the middle of the short line",
      from: "squash",
      surfaceSize: { length: 9.75, width: 6.4, unit: "m" },
      data: [{ x: 0.59, y: 0, title: "the middle of the short line: 0.59, 0" }],
      style: { size: 4, shape: "star" },
    },
    {
      kind: "text",
      name: "axes",
      from: "squash",
      surfaceSize: { length: 9.75, width: 6.4, unit: "m" },
      data: [{ x: 2.11, y: 0, text: "x" }, { x: 0.59, y: 1.41, 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.