Kyogijo Stadiums競技場

Guides, the reference, a gallery of every picture it can draw, and how it compares: the pages are made from the package's own files when the site is built.

About the name

The pages are in English; this contents, the search and the buttons are in Japanese.

Units

Each surface keeps the unit its rulebook states its figures in. The drawing itself is made in feet, so a figure is one conversion away in either direction, and units says what the lengths you pass are in.

SurfaceUnitWhy
nfl, cfl, ifafyards (yd)the length of a field and its end zones are counted in yards
nhl, nbafeet (ft)the rulebooks give feet and inches
mlbfeet (ft)the Official Baseball Rules give feet
soccermetres (m)the Laws of the Game give metres, with yards beside them
curlingmetres (m)World Curling's rules give metres with feet beside them; Curling Canada's give feet first, so its league has feet
NPB parks (parkUnit)metres (m)the parks of Japan publish their fence in metres; PARKS holds them in feet, converted once at 0.3048 metres to the foot

SURFACE_UNITS is that table, and each league keeps the unit of its own rulebook (a FIBA court in metres, an IIHF rink in metres):

sportleagueSurfaceRulebook unit
nflthe sport's ownNFLyd (yards)
cflthe sport's ownCFLyd (yards)
ifafthe sport's ownIFAFyd (yards)
nhlthe sport's ownNHLft (feet)
nbathe sport's ownNBAft (feet)
mlbthe sport's ownMLBft (feet)
soccerthe sport's ownsoccerm (metres)
curlingthe sport's owncurlingm (metres)
tennisthe sport's owntennisft (feet)
volleyballthe sport's ownvolleyballm (metres)
badmintonthe sport's ownbadmintonm (metres)
pickleballthe sport's ownpickleballft (feet)
tabletennisthe sport's owntable tennism (metres)
padelthe sport's ownpadelm (metres)
squashthe sport's ownsquashm (metres)
racquetballthe sport's ownracquetballft (feet)
sepaktakrawthe sport's ownsepak takrawm (metres)
teqballthe sport's ownteqballm (metres)
roundnetthe sport's ownroundnetm (metres)
netballthe sport's ownnetballm (metres)
swimmingthe sport's ownswimmingm (metres)
waterpolothe sport's ownwater polom (metres)
divingthe sport's owndivingm (metres)
artisticswimmingthe sport's ownartistic swimmingm (metres)
athleticsthe sport's ownathleticsm (metres)
skatingthe sport's ownice skatingm (metres)
judothe sport's ownundefinedm (metres)
karatethe sport's ownundefinedm (metres)
kendothe sport's ownundefinedm (metres)
sumothe sport's ownundefinedm (metres)
kyudothe sport's ownundefinedm (metres)
dojothe sport's ownundefinedm (metres)
lacrossethe sport's ownlacrossem (metres)
rugbythe sport's ownrugbym (metres)
aflthe sport's ownAustralian footballm (metres)
gaelicthe sport's ownGaelic gamesm (metres)
cricketthe sport's owncricketyd (yards)
fieldhockeythe sport's ownfield hockeym (metres)
handballthe sport's ownhandballm (metres)
nbawnbaWNBA basketball courtft (feet)
nbafibaFIBA basketball courtm (metres)
nbancaa-menNCAA men's basketball courtft (feet)
nbancaa-womenNCAA women's basketball courtft (feet)
nbanfhsHigh school (NFHS) basketball courtft (feet)
nbagleagueNBA G League basketball courtft (feet)
nhliihfIIHF ice hockey rinkm (metres)
nhlncaa-menNCAA men's ice hockey rinkft (feet)
nhlncaa-womenNCAA women's ice hockey rinkft (feet)
nhlahlAHL hockey rinkft (feet)
nhlechlECHL hockey rinkft (feet)
nhlohlOHL hockey rinkft (feet)
nhlwhlWHL hockey rinkft (feet)
nhlqmjhlQMJHL hockey rinkft (feet)
nhlushlUSHL hockey rinkft (feet)
nhlpwhlPWHL hockey rinkft (feet)
nhlolympicOlympic ice hockey rink (60 by 26 m)m (metres)
nhlboston-gardenBoston Garden hockey rinkft (feet)
nfl, cfl, ifafncaaNCAA football fieldyd (yards)
nfl, cfl, ifafnfhsHigh school (NFHS) football field, 11 playersyd (yards)
nfl, cfl, ifafnfhs-9High school (NFHS) football field, 9 playersyd (yards)
nfl, cfl, ifafnfhs-8High school (NFHS) football field, 8 playersyd (yards)
nfl, cfl, ifafnfhs-6High school (NFHS) football field, 6 playersyd (yards)
nfl, cfl, ifafuil-6Texas (UIL) six-man football fieldyd (yards)
nfl, cfl, ifafiflIndoor Football League fieldyd (yards)
mlbmilbMinor League Baseball fieldft (feet)
mlbncaaNCAA baseball fieldft (feet)
mlbnfhsHigh school (NFHS) baseball fieldft (feet)
mlblittle-leagueLittle League baseball field (60-foot bases)ft (feet)
mlblittle-league-intermediateLittle League Intermediate (50/70) baseball fieldft (feet)
mlbponyPONY League (14U) baseball fieldft (feet)
mlbpony-broncoPONY Bronco (12U) baseball fieldft (feet)
mlbpony-mustangPONY Mustang (10U) baseball fieldft (feet)
mlbncaa-softballNCAA softball fieldft (feet)
mlbnfhs-softballHigh school (NFHS) softball fieldft (feet)
mlbfastpitchUSA Softball fast-pitch fieldft (feet)
mlbslowpitchUSA Softball slow-pitch fieldft (feet)
mlbslowpitch-wbscWBSC slow-pitch softball fieldft (feet)
curlingcurling-canadaCurling Canada sheetft (feet)
volleyballfivb-beachFIVB beach volleyball courtm (metres)
volleyballwpv-sittingWorld ParaVolley sitting volleyball courtm (metres)
lacrosseworld-womenWorld Lacrosse women's fieldm (metres)
lacrossencaa-menNCAA men's lacrosse fieldyd (yards)
lacrossencaa-womenNCAA women's lacrosse fieldm (metres)
lacrossepllPLL fieldyd (yards)
lacrossenllNLL box lacrosse floorft (feet)
lacrosseworld-boxWorld Lacrosse box lacrosse floorft (feet)
rugbynrlNRL field (rugby league)m (metres)
rugbyirlInternational Rugby League fieldm (metres)
gaelicgaa-hurlingGAA field for hurlingm (metres)
cricketicc-womenICC women's groundyd (yards)
cricketmccLaws of Cricket ground (MCC)yd (yards)

The table is made from the code by pnpm docs:make, and a test holds it to it. The units are ft, in, yd, m, cm and mm; anything else is an error and not feet.

import { NHL, SURFACE_UNITS, convertLength, dimensionsOf, lengthsIn, surfaceSize } from "@johnmorrisdotca/kyogijo-stadiums/geometry";
import { drawKyogijo } from "@johnmorrisdotca/kyogijo-stadiums";

console.log(SURFACE_UNITS.nfl, surfaceSize("nfl"), convertLength(100, "yd", "ft"));
// yd { length: 120, width: 53.333333333333336, unit: 'yd' } 300
console.log(surfaceSize("nhl", "m").length.toFixed(2), lengthsIn(NHL, "m").crease.radius.toFixed(3), dimensionsOf("nba", "yd").length.toFixed(2));
// 60.96 1.829 31.33

// The margin and the fence are lengths: with `units` they are in metres, and are converted before anything is drawn.
const metres = drawKyogijo({ sport: "mlb", id: "m", margin: 3.048, fence: { left: 100, center: 122 }, units: "m" });
const feet = drawKyogijo({ sport: "mlb", id: "m", margin: 10, fence: { left: 100 / 0.3048, center: 122 / 0.3048 } });
console.log(metres === feet);
// true

lengthsIn(table, unit) converts every length in a table of dimensions (NHL, NBA, MLB, a football spec) and keeps its names and flags; dimensionsOf(sport, unit) is the table of a sport, in its own unit when none is given; fenceIn(points, unit) converts a fence's distances and not its angles. Nothing is changed in place.

Edit this page on GitHub