Hardwood under a shot chart

The data layers sit over the floor, shadows and sheen as they do over the clean one.

NBA basketball courtDrawn as: a basketball court, 94 by 50 feet, with its keys, three-point lines, free-throw circles and the centre circle. Data: 48 points. By outcome: shot 32, goal 16.48 pointsBy outcome: shot 32, goal 16.

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 shots = Array.from({ length: 48 }, (_, i) => ({ x: 6 + ((i * 17) % 84), y: 4 + ((i * 29) % 42), outcome: i % 3 === 0 ? "goal" : "shot" }));
const svg = drawKyogijo({ sport: "nba", court: { hardwood: true }, layers: [{ kind: "points", data: shots }] });

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.