The number in each zone is the stones that came to rest in it, by their centres.
The picture above was drawn when the docs were built. The script below draws it again with the published package.
import { curlingHeat } from "@johnmorrisdotca/kyogijo-stadiums/charts";
const luck = (n) => {
const v = Math.sin(n * 12.9898) * 43758.5453;
return v - Math.floor(v);
};
const bell = (n) => luck(n) + luck(n + 1) + luck(n + 2) - 1.5;
const stones = Array.from({ length: 240 }, (_, i) => {
const inHouse = luck(i * 7) < 0.45;
return { x: bell(i * 5) * (inHouse ? 3 : 2.5), y: inHouse ? bell(i * 11) * 3 : -8 - 9 * luck(i * 13), team: i % 2 ? "home" : "away" };
});
const svg = curlingHeat(stones, { view: "zones", show: "house" }).draw();
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.