Lineups: an offence and a defence

A football line stands shoulder to shoulder, so the picture is zoomed to the middle of the field.

NFL football fieldDrawn as: an American football field, 120 by 53 and a third yards with its end zones, with a yard line every 5 yards, hash marks, numbers and goal posts. Shows only the field between the 20-yard lines. Data outside it is not drawn. Data: Lineup in Football, I formation: 11 players. Players: 7 (Centre), 8 (Left guard), 10 (Left tackle), 9 (Right guard), 11 (Right tackle), 1 (Quarterback), 3 (Fullback), 2 (Halfback), 4 (Tight end), 5 (Wide receiver 1), 6 (Wide receiver 2). Offence: the quarterback under centre with the fullback and the halfback in a line behind him, a tight end and two wide receivers. Lineup in Football, 4-3 defence: 11 players. Players: 1 (Left defensive end), 2 (Left defensive tackle), 3 (Right defensive tackle), 4 (Right defensive end), 6 (Left linebacker), 5 (Middle linebacker), 7 (Right linebacker), 8 (Left cornerback), 9 (Right cornerback), 10 (Free safety), 11 (Strong safety). Defence against an offence going right: four linemen, three linebackers, two cornerbacks and two safeties. Left and right are the defenders' own.102030405040302010010203040504030201Lineup in Football, I formation: 11 playersPlayers: 7 (Centre), 8 (Left guard), 10 (Left tackle), 9 (Right guard), 11 (Right tackle), 1 (Quarterback), 3 (Fullback), 2 (Halfback), 4 (Tight end), 5 (Wide receiver 1), 6 (Wide receiver 2). Offence: the quarterback under centre with the fullback and the halfback in a line behind him, a tight end and two wide receivers.Centre: 7Left guard: 8Left tackle: 10Right guard: 9Right tackle: 11Quarterback: 1Fullback: 3Halfback: 2Tight end: 4Wide receiver 1: 5Wide receiver 2: 67810911132456Lineup in Football, 4-3 defence: 11 playersPlayers: 1 (Left defensive end), 2 (Left defensive tackle), 3 (Right defensive tackle), 4 (Right defensive end), 6 (Left linebacker), 5 (Middle linebacker), 7 (Right linebacker), 8 (Left cornerback), 9 (Right cornerback), 10 (Free safety), 11 (Strong safety). Defence against an offence going right: four linemen, three linebackers, two cornerbacks and two safeties. Left and right are the defenders' own.Left defensive end: 1Left defensive tackle: 2Right defensive tackle: 3Right defensive end: 4Left linebacker: 6Middle linebacker: 5Right linebacker: 7Left cornerback: 8Right cornerback: 9Free safety: 10Strong safety: 111234657891011

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 offence = ["QB", "HB", "FB", "TE", "WR", "WR", "C", "LG", "RG", "LT", "RT"];
const defence = ["DE", "DT", "DT", "DE", "LB", "LB", "LB", "CB", "CB", "S", "S"];
const of = (codes) => codes.map((pos, i) => ({ pos, number: i + 1 }));
const svg = drawKyogijo({
  sport: "nfl",
  range: "between-the-20s",
  layers: [{ kind: "lineup", side: "home", players: of(offence) }, { kind: "lineup", side: "away", players: of(defence) }],
});

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.