@johnmorrisdotca/dougu-sports 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/LICENSES/README.md +2 -11
  3. package/NOTICE.md +7 -5
  4. package/README.md +39 -21
  5. package/dist/element.js +18 -7
  6. package/dist/emblems/ball/ball.baseball.vintage.d.ts +3 -3
  7. package/dist/emblems/ball/ball.baseball.vintage.js +4 -4
  8. package/dist/emblems/ball/ball.basketball3x3.js +1 -1
  9. package/dist/emblems/ball/ball.index.d.ts +1 -1
  10. package/dist/emblems/ball/ball.index.js +1 -1
  11. package/dist/emblems/ball/ball.plastic.js +8 -10
  12. package/dist/emblems/ball/ball.soccer.vintage.js +3 -3
  13. package/dist/emblems/emblem.descriptions.js +24 -0
  14. package/dist/emblems/emblem.equipment.d.ts +1 -1
  15. package/dist/emblems/emblem.equipment.js +4 -4
  16. package/dist/emblems/emblem.ids.d.ts +4 -4
  17. package/dist/emblems/emblem.ids.js +5 -1
  18. package/dist/emblems/emblem.lathe.d.ts +4 -2
  19. package/dist/emblems/emblem.lathe.js +7 -5
  20. package/dist/emblems/emblem.named.js +30 -0
  21. package/dist/emblems/emblem.registry.js +6 -0
  22. package/dist/emblems/gear/gear.combat.d.ts +36 -0
  23. package/dist/emblems/gear/gear.combat.js +83 -0
  24. package/dist/emblems/gear/gear.index.d.ts +1 -1
  25. package/dist/emblems/gear/gear.index.js +3 -2
  26. package/dist/emblems/lathe.extras.js +2 -0
  27. package/dist/emblems/trophy/africa-cup-of-nations.d.ts +9 -0
  28. package/dist/emblems/trophy/africa-cup-of-nations.js +42 -0
  29. package/dist/emblems/trophy/ryder-cup.d.ts +9 -0
  30. package/dist/emblems/trophy/ryder-cup.js +44 -0
  31. package/dist/emblems/trophy/walter-a-brown-trophy.d.ts +9 -0
  32. package/dist/emblems/trophy/walter-a-brown-trophy.js +42 -0
  33. package/dist/emblems-entry.js +1 -1
  34. package/dist/index.d.ts +4 -0
  35. package/dist/index.js +4 -0
  36. package/dist/revisions.json +1 -1
  37. package/dist/version.d.ts +1 -1
  38. package/dist/version.js +1 -1
  39. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -6,6 +6,18 @@ All notable changes to this project are written here. The format follows
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ - Add two turnable championship trophies: the 2002 Africa Cup of Nations trophy and the original Walter A. Brown Trophy.
10
+ - Cite primary sources for 3x3 basketball and vintage ball specifications, and distinguish the practice baseballs' illustrative slot dimensions from published measurements.
11
+
12
+ ## [1.1.0] - 2026-12-06
13
+
14
+ A minor version: it adds five emblems and changes no drawing that 1.0.0 gave.
15
+
16
+ - Add `trophy:ryder-cup` and four pieces of combat-sport gear: `gear:boxing-glove`, `gear:mma-glove`, `gear:wrestling-mat` and `gear:wrestling-ring`. The four sports now return their gear from `sportEquipment`.
17
+ - Keep autoplay paused on `<dougu-emblem>` attribute changes when the element is out of view or the reader prefers reduced motion.
18
+ - Add Japanese reference pages and bilingual gallery descriptions for awards, medals, crests and the championship pennant.
19
+ - Correct the catalogue counts, sport list, entry point examples and artwork credits.
20
+
9
21
  ## [1.0.0] - 2026-12-03
10
22
 
11
23
  This is the first stable version. From here the package follows semantic versioning: a patch fixes without changing any drawing, a minor adds emblems and options and redraws emblems (always listed here and in `revisions.json`), and a major removes an id or an export or breaks the API. An emblem id is never removed. To keep an emblem looking exactly as it does, pin an exact version: old versions stay on npm and on the CDN.
@@ -1,14 +1,5 @@
1
1
  # Licences
2
2
 
3
- The code of this package is under the MIT licence: [MIT.txt](MIT.txt), the same text as [../LICENSE](../LICENSE).
3
+ The code and artwork in this package are under the MIT licence. [MIT.txt](MIT.txt) contains the same text as [the root licence](../LICENSE).
4
4
 
5
- Art taken from another project keeps its own licence, and that licence's text is kept in this folder, named for the licence, as soon as an emblem that uses it ships. [../NOTICE.md](../NOTICE.md) says which emblem comes from which source, under which licence, and what credit it asks for.
6
-
7
- | File | Licence | Covers |
8
- | --- | --- | --- |
9
- | [MIT.txt](MIT.txt) | MIT | The code of the package, and the art drawn for it (`source` `ours`, `generated` or `drawn`) |
10
- | [Apache-2.0.txt](Apache-2.0.txt) | Apache License 2.0 | Material Symbols (Google: sixteen icons), the Noto emoji shapes (Google) and Pictogrammers Material Design Icons (the line versions of some gear), where an emblem is taken from them |
11
- | [CC-BY-3.0.txt](CC-BY-3.0.txt) | Creative Commons Attribution 3.0 | game-icons.net icons (the baseball glove), each credited to its author in NOTICE.md |
12
- | [upstream/](upstream/) | Each upstream's own licence file, as found in its repository | Noto Emoji `2D/svg`, Pictogrammers MDI, game-icons.net |
13
-
14
- A source that is not in the table is not used: a new one is added here and to NOTICE.md in the same change as the emblem that needs it.
5
+ [NOTICE.md](../NOTICE.md) lists the references for facts about sports equipment. [The trophy source table](../docs/likeness-sources.md) lists reference photographs and their licences. The published SVG artwork is drawn for this package.
package/NOTICE.md CHANGED
@@ -9,10 +9,12 @@ The made-up maker marks and team logos (`@johnmorrisdotca/dougu-sports/brands`)
9
9
  ## How the art is made
10
10
 
11
11
  - The trophies, medals, crests, awards and sport pictograms are drawn in SVG by hand in a simplified, generic form. No real trophy, medal, logo, mark or engraving was copied or traced, and no photograph was traced (photographs were looked at, never copied).
12
+ - The Africa Cup of Nations trophy's globe uses selected coastline points read from [Natural Earth land data](https://www.naturalearthdata.com/downloads/110m-physical-vectors/110m-land/), which is [in the public domain](https://www.naturalearthdata.com/about/terms-of-use/).
12
13
  - The balls (`src/emblems/ball/`) are drawn by this package's own code: a rotation, a projection and our own geometry (a seam curve, the truncated icosahedron, an octahedron and an icosahedron, a layout of curved panels, a fitted basketball channel). The vintage, era-style and patterned balls ([docs/vintage-balls.md](docs/vintage-balls.md)) are our own graphics laid on those constructions (shapes placed on the sphere, rows of stitches, a lace, scuffs): the shop-wall patterns and the era styles were suggested by photographs the package's author supplied, which were looked at and not copied or traced, and no real ball's pattern, mark or name is used. The volleyballs take only three colours from a country's flag, and draw no flag.
13
14
  - The printed pucks (`puck:*`, `src/emblems/ball/ball.puck.print.ts`) are our own drawings: the maple leaf, the flags of the Canadian and United States patterns and the stars are drawn from simple geometry, the lettering is a stroke alphabet adapted from the block letters of the author's own senshu-jerseys (same author, same MIT licence, no font file), and the signature is made by a seeded pen, so it is no real person's. Photographs of souvenir pucks were looked at for what such a puck shows (a flag, a name, a number, a signature, a ring of words) and nothing was copied or traced. No team's or league's logo or wordmark, no maker's mark and no real player's name is used.
14
15
  - The made-up logos (`src/brands/`) are our own geometry: polygons, arcs and spirals worked out for this package and tuned by eye, with wordmarks set in our own stroke alphabet (`brand.letters.ts`, no font file). No real logo was traced, and no real mark was used as a base; the notes in `docs/brands.md` say what each was held against.
15
16
  - The gear (`src/emblems/gear/`) is drawn by us from a list of parts (a path, a colour, how it reads as a line); the bow, the arrow and the other tapering shapes are made by a small function of ours (`swell`), and the rest are paths written for this package.
17
+ - The [combat sports references](docs/references.md#combat-sports-gear) name the rules used for the boxing and MMA gloves, wrestling mat and professional wrestling ring.
16
18
  - The demo's podium shows the round flags of Japan, France and Italy from [Hata](https://github.com/johnmorrisdotca/hata) 1.5.0 (`demo/flags-data.ts`, made by `scripts/make-flags.mjs`; a development dependency of the demo, never of the package). Hata's manifest lists each of the three as public domain, so no credit is required.
17
19
  - The backgrounds behind the README pictures and the demo's preview (`scripts/family-backgrounds.ts`, version 1.0.0) are the family's shared module, copied byte for byte from taisen-brackets: twenty-five backgrounds drawn in code from gradients, patterns and paths, all by this package's author, none traced from a picture, a poster, a logo, a trophy or a photograph (MIT). It is tooling: the package ships none of it, and no emblem is drawn on a background.
18
20
  - The Japanese words for the Japanese items are the ones the sports' governing bodies use in their own rules and equipment lists (kendo, judo, kyudo and karate federations and the sumo association); the bodies' names and marks are not used in any id, title or drawing.
@@ -30,12 +32,12 @@ Each ball's `size.rule` names the rule; the table gives the document and where i
30
32
  | `ball:soccer`, `ball:soccer-colour`, `ball:soccer-26`, `ball:soccer-18`, `ball:soccer-14`, `ball:soccer-12`, `ball:soccer-6`, `ball:soccer-orange`, `ball:soccer-26-orange`, `ball:soccer-18-orange`, `ball:soccer-14-orange`, `ball:soccer-12-orange`, `ball:soccer-6-orange`, `ball:soccer-yellow`, `ball:soccer-26-yellow`, `ball:soccer-18-yellow`, `ball:soccer-14-yellow`, `ball:soccer-12-yellow`, `ball:soccer-6-yellow`, `ball:soccer-1960-32-panel-leather`, `ball:soccer-retro-pentagons`, `ball:soccer-retro-leaves`, `ball:soccer-retro-rosette`, `ball:soccer-retro-pinwheel`, `ball:soccer-retro-kites`, `ball:soccer-14-panel-double-border`, `ball:soccer-8-panel-plain`, `ball:soccer-6-panel-bands`, `ball:soccer-6-panel-diamonds`, `ball:soccer-20-panel-dots`, `ball:soccer-training-high-vis`, `ball:soccer-stars-blue`, `ball:soccer-stars-red`, `ball:soccer-stars-night`, `ball:soccer-hexagons-cyan`, `ball:soccer-hexagons-magenta`, `ball:soccer-hexagons-lime`, `ball:soccer-flames-fire`, `ball:soccer-flames-ice`, `ball:soccer-flames-toxic`, `ball:soccer-chevrons-red`, `ball:soccer-chevrons-green`, `ball:soccer-chevrons-blue`, `ball:soccer-swirl-blue`, `ball:soccer-swirl-red`, `ball:soccer-swirl-teal`, `ball:soccer-metallic-gold`, `ball:soccer-metallic-silver`, `ball:soccer-metallic-cobalt` | IFAB Laws of the Game, Law 2 The Ball, section 2.1 Qualities and measurements | https://www.theifab.com/laws/latest/the-ball/ |
31
33
  | `ball:futsal` | Futsal Laws of the Game 2025/26, Law 2 The Ball, section 1 Qualities and measurements (circumference 62-64 cm, 400-440 g, 0.6-0.9 atm, bounce 50-65 cm from 2 m) | https://digitalhub.fifa.com/m/20d52e6779b53321/original/FUTSAL-Laws-of-the-Game-2025-2026.pdf |
32
34
  | `ball:beach-soccer` | Beach Soccer Laws of the Game 2024-25, Law 2 The Ball, section 1 Qualities and measurements (circumference 68-70 cm, 400-440 g, 0.4-0.6 atm); the 2021/22 edition has the same figures | https://www.the-aiff.com/media/uploads/2024/11/Beach-Soccer-Laws-of-the-Game-2024-25.pdf |
33
- | `ball:soccer-1870-hand-stitched`, `ball:soccer-1900-laced`, `ball:soccer-1930-18-panel`, `ball:soccer-1950-12-panel` | Laws of the Game of the Football Association, revised 1872: a sphere 27 to 28 inches round (no mass given: the early figures could not be confirmed in a primary text); read in Wikipedia's account of the 1872 revision (secondary) | https://en.wikipedia.org/wiki/Ball_(association_football) |
35
+ | `ball:soccer-1870-hand-stitched`, `ball:soccer-1900-laced`, `ball:soccer-1930-18-panel`, `ball:soccer-1950-12-panel` | IFAB Laws of the Game 1903/04, Law 1, The Ball (27 to 28 inches of circumference, used as the reference size for the four drawings) | https://downloads.theifab.com/downloads/laws-of-the-game-1903-04?l=en#page=4 |
34
36
  | `ball:teqball` | FITEQ Official Rules and Regulations of Teqball 2026, Rule 3 The Official Ball, 3.1.1-3.1.6 | https://cdn.buttercms.com/s6Mb1gRkRJuFP38kpMTh |
35
37
  | `ball:basketball` | FIBA Basketball Equipment 2026, Rule 2 Basketballs, 2.4 and Table 1 (size 7 = men's competitions) | https://assets.fiba.basketball/image/upload/documents-corporate-fiba-official-rules-2026-equipment-v1-0.pdf |
36
38
  | `ball:basketball-6` | FIBA Basketball Equipment 2026, Rule 2 Basketballs, 2.4 and Table 1 (size 6 = women's competitions) | https://assets.fiba.basketball/image/upload/documents-corporate-fiba-official-rules-2026-equipment-v1-0.pdf |
37
- | `ball:basketball-3x3` | FIBA 3x3 Official Equipment & Software Appendix to the 3x3 Official Rules (Dec 2024 update), Table 1 and section 5.7 (as quoted by balls.com) (not read in the primary text: see the ball's note) | https://fiba3x3.com/docs/equipment-and-software-appendix-to-the-3x3-official-rules.pdf |
38
- | `ball:baseball`, `ball:baseball-lemon-peel`, `ball:baseball-red-blue`, `ball:baseball-black-red`, `ball:baseball-vintage-leather` | Official Baseball Rules, Rule 3.01 The Ball (the lemon-peel ball is drawn at today's size: no rule fixed the ball in the 1850s and 1860s) | https://mktg.mlbstatic.com/mlb/official-information/2026-official-baseball-rules.pdf |
39
+ | `ball:basketball-3x3` | FIBA 3x3 Equipment & Software Appendix to the 3x3 Official Rules (December 2024), section 5.7 and Table 1 (720 to 740 mm, 580 to 620 g, two principal contrasting colours) | https://fiba3x3.basketball/docs/equipment-and-software-appendix-to-the-3x3-official-rules.pdf#page=10 |
40
+ | `ball:baseball`, `ball:baseball-lemon-peel`, `ball:baseball-red-blue`, `ball:baseball-black-red`, `ball:baseball-vintage-leather` | Official Baseball Rules, Rule 3.01 The Ball (today's ball size is the reference for the vintage drawings) | https://mktg.mlbstatic.com/mlb/official-information/2026-official-baseball-rules.pdf |
39
41
  | `ball:softball-11-optic` | WBSC Official Rules of Softball Slow Pitch 2026-2029, Appendix 3 (Ball Standards), B.2 and the 'Ball standards' table: the 27.9 cm (11 in) ball, circumference 27.6 to 28.3 cm, 166.5 to 173.6 g, white or yellow optic, red stitch (read in the full text, 2026-10-14) | https://static.wbsc.org/uploads/federations/0/cms/documents/5f45c5e4-54ed-3659-8116-4d7cb5051f69.pdf |
40
42
  | `ball:softball` | WBSC Official Rules of Softball Slow Pitch 2026-2029, Appendix 3 (Ball Specifications), B. Dimensions and Specifications and 'Ball standards' table; Fast Pitch 2026-2029 Appendix 3 gives the same 12 in ball | https://static.wbsc.org/uploads/federations/0/cms/documents/5f45c5e4-54ed-3659-8116-4d7cb5051f69.pdf |
41
43
  | `ball:tennis` | ITF Rules of Tennis, Rule 3 The Ball and Appendix I The Ball (a)-(c) | https://www.itftennis.com/media/7221/2026-rules-of-tennis-english.pdf |
@@ -52,8 +54,8 @@ Each ball's `size.rule` names the rule; the table gives the document and where i
52
54
  | `ball:gaelic-football` | GAA Official Guide Part 2, Rules of Specification, Rule 4.4(ii) | https://www.galwaygaa.ie/wp-content/uploads/2026/02/Official-Guide-Part-2.pdf |
53
55
  | `ball:netball` | World Netball Rules of Netball, Rule 1 (Equipment: Ball), item 15 a-d | https://netballhamilton.org.nz/media/1997/world-netball-rules-book-2024.pdf |
54
56
  | `ball:pickleball-outdoor`, `ball:pickleball-indoor` | USA Pickleball Equipment Standards Manual (Jan 2025, Revision 3.0), 2.D.1 Design, 2.D.3 Size, 2.D.4 Weight, 2.D.8 Design (holes); USA Pickleball 2026 Official Rulebook rule 3.C Ball Specifications | https://equipment.usapickleball.org/docs/Equipment-Standards-Manual.pdf |
55
- | `ball:plastic-baseball-slotted` | English Wikipedia, the article on the hollow plastic practice ball with eight oblong holes (accessed 2026-10-21): hollow plastic, wall at most 1/8 in (3.2 mm), eight oblong holes of 0.75 in (19 mm) on one half only, about the size of a regulation baseball; the size is a baseball's, from Official Baseball Rules, Rule 3.01 The Ball | no link: the article is titled with the maker's registered trademark, which this package does not use |
56
- | `ball:plastic-baseball-practice`, `-white`, `-orange` | The same English Wikipedia article on the hollow plastic practice ball (accessed 2026-10-21) for the material and the wall; Official Baseball Rules, Rule 3.01, for the size. The number, size and layout of the slots (about 22 by 14 mm, oval), and the two tones, are drawn from product photographs looked at and never copied or traced; no maker's name or mark is used | https://en.wikipedia.org/wiki/Wiffle_ball |
57
+ | `ball:plastic-baseball-slotted` | Official Baseball Rules, Rule 3.01 The Ball, for the reference diameter. The count, size and layout of the slots and the wall thickness are drawing choices; no primary source confirms them. No maker's name or mark is used in the drawing. | [Official Baseball Rules](https://mktg.mlbstatic.com/mlb/official-information/2026-official-baseball-rules.pdf), [United States patent 2,776,139](https://patents.google.com/patent/US2776139A/en) |
58
+ | `ball:plastic-baseball-practice`, `-white`, `-orange` | Official Baseball Rules, Rule 3.01 The Ball, for the reference diameter. The slot count, dimensions, layout and colours describe the drawing. No maker's name or mark is used in the drawing. | https://mktg.mlbstatic.com/mlb/official-information/2026-official-baseball-rules.pdf |
57
59
  | `ball:squash` and its coloured dots | World Squash 'Specifications for Squash Balls' (Recommended standards approved by the WSF; updated WSF AGM 2021, rebranded 2025), sections 1-3 and Notes 2-4 | https://www.worldsquash.sport/wp-content/uploads/2025/07/211127_Ball-Specifications.pdf |
58
60
  | `ball:racquetball` | USA Racquetball Rules, Rule 2.2 Ball Specifications (a)-(b); Rule 2.3 Ball Selection | https://www.usaracquetball.com/play/rules/2-courts-and-equipment |
59
61
  | `ball:lacrosse` | World Lacrosse Rules of Men's Field Lacrosse 2025-2027 (Ver 1.0), Section 2 Equipment, Rule 14 The Ball, 14.1 | https://www.bclacrosse.com/Referees%20and%20Officials/World%20Lacrosse%20Men's%20Field%20Rule%20Book.pdf |
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  <h1 align="center">Dougu Sports <sub>道具</sub></h1>
4
4
 
5
5
  <p align="center"><strong>Sports emblems as SVG strings, with optional 3D turning.</strong><br>
6
- The ball and the gear of every sport, trophies, medals, crests and the icon of every sport, each one a function that returns SVG: in polished metal, in one line, or in flat colour, light and dark, any size, any tint. Turn one about its axis and it is another string. Each emblem is its own module, so a page that wants one trophy takes one trophy. MIT, with no dependencies.</p>
6
+ Trophies, medals, crests, sport icons, balls and gear, each one a function that returns SVG: in polished metal, in one line, or in flat colour, light and dark, any size, any tint. Turn one about its axis and it is another string. Each emblem is its own module, so a page that wants one trophy takes one trophy. MIT, with no dependencies.</p>
7
7
 
8
8
  <p align="center">
9
9
  <a href="https://github.com/johnmorrisdotca/dougu-sports/actions/workflows/ci.yml"><img alt="CI" src="https://github.com/johnmorrisdotca/dougu-sports/actions/workflows/ci.yml/badge.svg"></a>
@@ -39,14 +39,14 @@ The ball and the gear of every sport, trophies, medals, crests and the icon of e
39
39
  <p align="center">
40
40
  <picture>
41
41
  <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/johnmorrisdotca/dougu-sports/main/docs/images/famous-desk-dark.webp">
42
- <img alt="Thirty-six famous trophies on royal purple, each with its name under it: the FIFA World Cup, the Stanley Cup, the Lombardi Trophy, the Larry O'Brien trophy, the Grey Cup, the FA Cup, the America's Cup, the Ashes urn and the Webb Ellis Cup among them, then the baseball awards and the NHL's Hart, Vezina, Norris and Calder trophies." src="https://raw.githubusercontent.com/johnmorrisdotca/dougu-sports/main/docs/images/famous-desk-light.webp" width="760">
42
+ <img alt="Forty famous trophies on royal purple, each with its name under it: the FIFA World Cup, the Stanley Cup, the Lombardi Trophy, the Larry O'Brien trophy, the Grey Cup, the FA Cup, the America's Cup, the Ryder Cup, the Ashes urn and the Webb Ellis Cup among them, then the baseball awards and the NHL's Hart, Vezina, Norris and Calder trophies." src="https://raw.githubusercontent.com/johnmorrisdotca/dougu-sports/main/docs/images/famous-desk-light.webp" width="760">
43
43
  </picture>
44
44
  </p>
45
45
 
46
46
  <p align="center">
47
47
  <picture>
48
48
  <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/johnmorrisdotca/dougu-sports/main/docs/images/gear-desk-dark.webp">
49
- <img alt="Thirty-six pieces of gear in four rows of nine: hockey stick and skate, a goalie mask, field hockey, lacrosse and hurling sticks, a cricket bat and wicket, a baseball bat and glove, a football helmet and goalposts, a basketball hoop, a volleyball net, rackets and paddles, a curling broom, skates, swim goggles, starting blocks, a baton, a javelin, a hurdle, and the kendo, sumo, judo, kyudo and karate gear of Japan." src="https://raw.githubusercontent.com/johnmorrisdotca/dougu-sports/main/docs/images/gear-desk-light.webp" width="760">
49
+ <img alt="Forty pieces of gear in four rows of ten: hockey stick and skate, a goalie mask, field hockey, lacrosse and hurling sticks, a cricket bat and wicket, a baseball bat and glove, a football helmet and goalposts, a basketball hoop, a volleyball net, rackets and paddles, a curling broom, skates, swim goggles, starting blocks, a baton, a javelin, a hurdle, Japanese budo gear, a boxing glove, an MMA glove, a wrestling mat and a professional wrestling ring." src="https://raw.githubusercontent.com/johnmorrisdotca/dougu-sports/main/docs/images/gear-desk-light.webp" width="760">
50
50
  </picture>
51
51
  </p>
52
52
 
@@ -63,7 +63,7 @@ The ball and the gear of every sport, trophies, medals, crests and the icon of e
63
63
 
64
64
  ## The best of it
65
65
 
66
- - **66 famous trophies**, each a close likeness measured on a photograph and carrying no lettering, logo or mark: the Stanley Cup, the FIFA World Cup, the Lombardi Trophy, the Larry O'Brien trophy, the Grey Cup and the rest ([famous trophies](./docs/famous-trophies.md)).
66
+ - **70 famous trophies**, each a close likeness measured on a photograph and carrying no lettering, logo or mark: the Stanley Cup, the FIFA World Cup, the Lombardi Trophy, the Larry O'Brien trophy, the Grey Cup and the rest ([famous trophies](./docs/famous-trophies.md)).
67
67
 
68
68
  <p align="center">
69
69
  <picture>
@@ -72,7 +72,14 @@ The ball and the gear of every sport, trophies, medals, crests and the icon of e
72
72
  </picture>
73
73
  </p>
74
74
 
75
- - **118 balls and implements in 3D**, from the 32-panel soccer ball to the pucks and the curling stone, that roll as they turn ([gallery](./docs/gallery.md), [vintage and era-style balls](./docs/vintage-balls.md)).
75
+ <p align="center">
76
+ <picture>
77
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/johnmorrisdotca/dougu-sports/main/docs/images/championship-trophies-dark.webp">
78
+ <img alt="Two views each of the Africa Cup of Nations trophy with its golden globe and the Walter A. Brown Trophy with its wide silver bowl." src="https://raw.githubusercontent.com/johnmorrisdotca/dougu-sports/main/docs/images/championship-trophies-light.webp" width="520">
79
+ </picture>
80
+ </p>
81
+
82
+ - **121 balls and implements in 3D**, from the 32-panel soccer ball to the pucks and the curling stone, that roll as they turn ([gallery](./docs/gallery.md), [vintage and era-style balls](./docs/vintage-balls.md)).
76
83
 
77
84
  <p align="center">
78
85
  <picture>
@@ -106,7 +113,7 @@ The ball and the gear of every sport, trophies, medals, crests and the icon of e
106
113
  </picture>
107
114
  </p>
108
115
 
109
- - **Trophies, medals, crests and the icon of every sport**, in metal, one line or flat colour, light and dark.
116
+ - **Trophies, medals, crests and sport pictograms**, in metal, one line or flat colour, light and dark.
110
117
 
111
118
  <p align="center">
112
119
  <picture>
@@ -115,11 +122,11 @@ The ball and the gear of every sport, trophies, medals, crests and the icon of e
115
122
  </picture>
116
123
  </p>
117
124
 
118
- - **71 pieces of gear**, among them the Japanese sports and budo ([Japanese sports](./docs/japanese-sports.md)).
125
+ - **75 pieces of gear**, among them the Japanese sports and budo ([Japanese sports](./docs/japanese-sports.md)).
119
126
 
120
127
  - **On a phone**, and **turned by hand**: drag, arrow keys or the automatic turn ([turning](./docs/turning.md)).
121
128
 
122
- > **Status: preview.** 346 emblems: 90 trophies, 6 awards, 6 medals, 4 crests, a pictogram for each of the 42 sports, 118 balls and implements drawn in 3D, 8 printed pucks ([docs/pucks.md](./docs/pucks.md)), 71 pieces of gear (among them the Japanese sports and budo, [docs/japanese-sports.md](./docs/japanese-sports.md)) and a championship pennant; [docs/layout.md](./docs/layout.md) says where each goes. All of it is drawn for this package: no art is copied from another project.
129
+ > **356 emblems** in nine groups: 93 trophies, 6 awards, 6 medals, 4 crests, a pictogram for each of the 42 sports, 121 balls and implements drawn in 3D, 8 printed pucks ([docs/pucks.md](./docs/pucks.md)), 75 pieces of gear (among them the Japanese sports and budo, [docs/japanese-sports.md](./docs/japanese-sports.md)) and a championship pennant; [docs/layout.md](./docs/layout.md) says where each goes. All of it is drawn for this package: no art is copied from another project.
123
130
 
124
131
  ## In 30 seconds
125
132
 
@@ -143,11 +150,11 @@ Put the string in a page (`element.innerHTML = svg`), write it to a file, or sen
143
150
  - **Sports sites** that mark a champion, a result or a list with a trophy, a medal or a crest, without licensing a logo.
144
151
  - **Scoreboards and brackets** that want a generic emblem for a team that has no logo, tinted in the team's colour.
145
152
  - **Anyone building a game or a card** who needs a ball or a piece of gear for a sport, in one style that matches the rest.
146
- - **Pages that care about weight**: one emblem is one module, 2 to 7 kB gzipped with the renderer for its kind (a medal about 4.5, a turning cup about 7, an icon 2 to 3.6), and the package says `"sideEffects": false`.
153
+ - **Pages that care about weight**: one emblem is one module, 2 to 7 kB gzipped with the renderer for its kind (a medal about 4.5, a turning cup about 7, an icon 2 to 3.6), and the package declares a side effect only for the element registration.
147
154
 
148
155
  ## Features
149
156
 
150
- - **Equipment first (道具 is the word for it)**: 118 balls and implements drawn in 3D, from the 32-panel soccer ball to the 26, 18, 14, 12 and 6 panel constructions, vintage leather balls, era-style and shop-wall soccer balls, baseballs of other threads, volleyballs in national colours ([docs/vintage-balls.md](./docs/vintage-balls.md)), futsal, beach soccer and the pucks and stones, each with its official size, 8 printed pucks (a flag, a leaf, stars and stripes, a player's number, a made-up signature, your own picture: [docs/pucks.md](./docs/pucks.md)), and 42 pieces of gear (sticks, rackets, helmets, skates, nets, and the Japanese budo kit) drawn to match; see [docs/gallery.md](./docs/gallery.md).
157
+ - **Equipment first (道具 is the word for it)**: 121 balls and implements drawn in 3D, from the 32-panel soccer ball to the 26, 18, 14, 12 and 6 panel constructions, vintage leather balls, era-style and shop-wall soccer balls, baseballs of other threads, volleyballs in national colours ([docs/vintage-balls.md](./docs/vintage-balls.md)), futsal, beach soccer and the pucks and stones, each with its size reference, 8 printed pucks (a flag, a leaf, stars and stripes, a player's number, a made-up signature, your own picture: [docs/pucks.md](./docs/pucks.md)), and 75 pieces of gear (sticks, rackets, helmets, skates, nets, and the Japanese budo kit) drawn to match; see [docs/gallery.md](./docs/gallery.md).
151
158
  - **Three styles** for every emblem: `metal` (polished metal: a gradient, a highlight and a soft rim of reflected light, edged in a darker tone of its own metal, with no heavy outline), `line` (one clean outline in the page's text colour, made to read at 14 pixels) and `color` (flat fills); see [Theming](#theming).
152
159
  - **Size, tint, accent and theme** as options: a tint recolours the main part (a medal's metal, a crest's colour, a ball's patches; not the body of a golf ball or a baseball, whose colour the sport fixes), an accent the second colour (a ribbon, a crest's band, the pennants), a theme sets the ink for light, dark or either.
153
160
  - **Turning**: `emblemFrame` and `ballFrame` return the emblem at an angle, in plain SVG: every emblem turns, a ball rolls, a cup keeps its outline and moves its light, and everything flat (a medal, a crest, a banner, gear, a bat, a crown, a sport's icon) flips like a coin with a solid edge, a back of its own and its ribbon or pole seen from behind; `bindTurn` lets a drag, the arrow keys or an auto-turn do the turning in a page; see [docs/turning.md](./docs/turning.md).
@@ -210,7 +217,9 @@ The alias is a name in your `package.json` only: the same package, the same code
210
217
  | `@johnmorrisdotca/dougu-sports/brands` | Experimental, designs will change: twelve made-up maker marks and ten made-up team logos as SVG (`makerLogo`, `teamLogo`, `makerBall`, `renderMakerBall`, the groups to place in a drawing and the data); see [docs/brands.md](./docs/brands.md) |
211
218
  | `@johnmorrisdotca/dougu-sports/element` | `<dougu-emblem>`, the tag that draws an emblem in any page, still or turning (the only entry with a side effect: it registers the tag) |
212
219
  | `@johnmorrisdotca/dougu-sports/turn` | `emblemFrame`, `ballFrame` and `bindTurn`; `bindTurn` with an emblem object takes nothing else with it |
213
- | `@johnmorrisdotca/dougu-sports/<group>/<name>` | One emblem, alone: `trophy/hockey-cup`, `medal/gold`, `crest/shield`, `sport/nhl`, `award/crown`, `ball/soccer`, `pennant/championship`, `gear/<name>` |
220
+ | `@johnmorrisdotca/dougu-sports/revisions.json` | Drawing revisions and release history by id |
221
+ | `@johnmorrisdotca/dougu-sports/<group>/<name>` | One emblem, such as `trophy/hockey-cup`, `medal/gold`, `crest/shield`, `sport/nhl`, `award/crown` or `pennant/championship` |
222
+ | `@johnmorrisdotca/dougu-sports/ball/ball.<family>`, `@johnmorrisdotca/dougu-sports/gear/gear.<family>` | Balls and gear by family, such as `ball/ball.soccer` and `gear/gear.sticks` |
214
223
 
215
224
  ### One emblem and nothing else
216
225
 
@@ -221,7 +230,16 @@ console.log(TROPHY_HOCKEY_CUP.id); // trophy:hockey-cup
221
230
  console.log(TROPHY_HOCKEY_CUP.svg({ size: 24 }).includes('width="24"')); // true
222
231
  ```
223
232
 
224
- A bundler that imports this module takes the cup and the renderer for a body of revolution, and no other emblem: the package's `sideEffects` names only `./dist/element.js`, and each constant is marked pure. `test/size.test.ts` bundles one item with esbuild and holds it to a limit for its kind (a ball 7.6 kB, a medal or a crest 4.6 kB, a cup 7.1 kB gzipped, most of that the renderer); `pnpm test:package` does the same from the packed tarball.
233
+ A bundler that imports this module takes the cup and the renderer for a body of revolution, and no other emblem: the package's `sideEffects` names only `./dist/element.js`, and each constant is marked pure. `test/size.test.ts` bundles one item with esbuild and holds it to a limit for its kind (a ball 7.6 KiB, a medal or a crest 5.8 KiB, a cup 7.5 KiB gzipped, most of that the renderer); `pnpm test:package` does the same from the packed tarball.
234
+
235
+ For balls and gear, use the family module and import the constant you want.
236
+
237
+ ```js
238
+ import { BALL_SOCCER } from "@johnmorrisdotca/dougu-sports/ball/ball.soccer";
239
+ import { GEAR_HURLEY } from "@johnmorrisdotca/dougu-sports/gear/gear.sticks";
240
+
241
+ console.log(BALL_SOCCER.id, GEAR_HURLEY.id); // ball:soccer gear:hurley
242
+ ```
225
243
 
226
244
  ### Put it in your page
227
245
 
@@ -469,7 +487,7 @@ console.log(nhl.ball, nhl.trophy); // ball:puck trophy:hockey-cup
469
487
  console.log(nhl.gear.join(" ")); // gear:hockey-stick gear:hockey-skate gear:goalie-mask gear:goal-net
470
488
  ```
471
489
 
472
- Each of the 38 sports has a trophy, most have a ball and gear, and a sport in the Games has a medal; every id is one `renderEmblem` draws.
490
+ Each of the 42 sports has a trophy, most have a ball and gear, and a sport in the Games has a medal; every id is one `renderEmblem` draws.
473
491
 
474
492
  ### A podium and an award case
475
493
 
@@ -521,17 +539,17 @@ An emblem is a small object: `id`, `en` and `ja` names, a `source` (who drew it)
521
539
 
522
540
  | Group | What it holds | Folder |
523
541
  | --- | --- | --- |
524
- | `award` | Five awards: a medal, a badge, a crown, a star, a shield | `src/emblems/award/` |
525
- | `trophy` | Twenty-four trophies: ten that stand for a league's cup in a generic form (a tall banded cup, a ring of pennants round a baseball, a football on a stand, a ball over a net, a wide two-handled bowl, a globe held up by spiral figures, a gilt dish, a lidded cup with a pineapple, an urn, a gilded cup), plain cups, bowls and dishes, a plaque, a belt, a wreath, a rosette, a championship ring, a rafter banner, a phoenix-handled sumo cup and a championship banner | `src/emblems/trophy/` |
542
+ | `award` | Six awards including a medal, a badge, a crown, a star, a shield and a ribbon | `src/emblems/award/` |
543
+ | `trophy` | 93 trophies, including 70 [named trophies](./docs/famous-trophies.md) and ten that stand for a league's cup in a generic form (a tall banded cup, a ring of pennants round a baseball, a football on a stand, a ball over a net, a wide two-handled bowl, a globe held up by spiral figures, a gilt dish, a lidded cup with a pineapple, an urn, a gilded cup), plain cups, bowls and dishes, a plaque, a belt, a wreath, a rosette, a championship ring, a rafter banner, a phoenix-handled sumo cup and a championship banner | `src/emblems/trophy/` |
526
544
  | `medal` | Gold, silver and bronze medals on a ribbon of five stripes, and a badge for each of the first three places | `src/emblems/medal/` |
527
545
  | `crest` | Four generic crests, tinted by a team's colours, with its letters | `src/emblems/crest/` |
528
- | `ball` | 118 balls and implements, in 3D, each with its official size: soccer (in 32, 26, 18, 14, 12 and 6 panels, in three colourways, with futsal and beach soccer; [docs/soccer-balls.md](./docs/soccer-balls.md); and vintage leather, era-style and patterned balls, [docs/vintage-balls.md](./docs/vintage-balls.md)), basketball, baseball, tennis, rugby, the footballs, golf, the puck, the curling stone and the rest | `src/emblems/ball/` |
546
+ | `ball` | 121 balls and implements in 3D, each with a size reference: soccer (in 32, 26, 18, 14, 12 and 6 panels, in three colourways, with futsal and beach soccer; [docs/soccer-balls.md](./docs/soccer-balls.md); and vintage leather, era-style and patterned balls, [docs/vintage-balls.md](./docs/vintage-balls.md)), basketball, baseball, tennis, rugby, the footballs, golf, the puck, the curling stone and the rest | `src/emblems/ball/` |
529
547
  | `puck` | 8 printed pucks: the same puck with a print on its top face that turns with it (a flag and CANADA, a red leaf, stars and stripes, a player's name and number, a made-up signature, a souvenir), and a `face` option for any picture, emblem or flag code; [docs/pucks.md](./docs/pucks.md) | `src/emblems/ball/ball.puck.print.ts` |
530
- | `gear` | 67 pieces of equipment: sticks, rackets, skates, a glove, a helmet, nets and posts, a javelin, starting blocks, and for the Japanese sports a war fan, a sumo belt, a bamboo sword, a kendo helmet, the judo suit (white and blue, laid flat and folded, and from behind with its back number), the belts of every grade (white to red, the red-and-white belt, the women's black belt and the two-colour belts) and the six steps of tying one, a long bow, an arrow and a karate suit | `src/emblems/gear/` |
548
+ | `gear` | 75 pieces of equipment: sticks, rackets, skates, a glove, a helmet, nets and posts, a javelin, starting blocks, and for the Japanese sports a war fan, a sumo belt, a bamboo sword, a kendo helmet, the judo suit (white and blue, laid flat and folded, and from behind with its back number), the belts of every grade (white to red, the red-and-white belt, the women's black belt and the two-colour belts) and the six steps of tying one, a long bow, an arrow and a karate suit | `src/emblems/gear/` |
531
549
  | `sport` | One pictogram for each of the forty-two sports | `src/emblems/sport/` |
532
550
  | `pennant` | A felt championship pennant on a dowel, with a stitched edge, lettered with its words and its year | `src/emblems/pennant/` |
533
551
 
534
- The forty-two sports the ball, gear and sport emblems are made for are `SPORT_NAMES` (the five Japanese ones, sumo, kendo, judo, kyudo and karate, have a pictogram and their gear, and no ball; the four combat sports, MMA, boxing, wrestling and professional wrestling, have a pictogram and no ball or gear yet): NFL, CFL, IFAF, NHL, NBA, MLB, soccer, curling, tennis, volleyball, badminton, pickleball, table tennis, padel, squash, racquetball, sepak takraw, teqball, roundnet, netball, swimming, water polo, diving, artistic swimming, lacrosse, rugby, Australian football, Gaelic games, cricket, field hockey, handball, athletics and skating. How the trophies are drawn, and what each stands for, is in [docs/emblems.md](./docs/emblems.md); the balls and the gear are described in [src/emblems/README.md](./src/emblems/README.md).
552
+ The forty-two sports the ball, gear and sport emblems are made for are `SPORT_NAMES` (the five Japanese ones, sumo, kendo, judo, kyudo and karate, have a pictogram and their gear, and no ball; the four combat sports, MMA, boxing, wrestling and professional wrestling, have a pictogram and a piece of gear): NFL, CFL, IFAF, NHL, NBA, MLB, soccer, curling, tennis, volleyball, badminton, pickleball, table tennis, padel, squash, racquetball, sepak takraw, teqball, roundnet, netball, swimming, water polo, diving, artistic swimming, lacrosse, rugby, Australian football, Gaelic games, cricket, field hockey, handball, athletics, skating, sumo, kendo, judo, kyudo, karate, MMA, boxing, wrestling and professional wrestling. How the trophies are drawn, and what each stands for, is in [docs/emblems.md](./docs/emblems.md); the balls and the gear are described in [src/emblems/README.md](./src/emblems/README.md).
535
553
 
536
554
  ## API
537
555
 
@@ -636,7 +654,7 @@ If your pages need an emblem to look exactly as it does today, pin an exact vers
636
654
 
637
655
  - A turn is drawn in plain SVG, not in 3D: a cup keeps its silhouette and moves its light, handles and seams; a medal is squeezed; a ball is projected from its own geometry, panel by panel, and has no grain while it turns. Gear, icons and pictograms flip like a coin, with the back as a mirror of the front and a thin rim; a pennant's back is its own drawing; one turn (`src/emblems/emblem.flip.ts`) does it for all of them.
638
656
  - A tint is one colour, the main one, and an accent a second. A golf ball and a baseball are white by the rules of their sports, so they ignore `tint` (a baseball takes `paint`, as the custom balls do); every other ball takes it. The pieces of a trophy that are another metal (the gilt of a plate, the green bands of a globe, the black foot of a cup) keep their own colour.
639
- - The trophies are generic: each is drawn for this package in a simplified form that a reader knows at a glance, and none is traced from a photograph or carries a name, a mark or an engraving.
657
+ - Generic trophies use simplified shapes. Named trophies use proportions measured from reference photographs. The default trophy drawings omit lettering, marks and engravings.
640
658
  - A trophy in the metal style is about 3 to 4.5 kB of markup, a medal or a crest about 1 to 2 kB, a line drawing about 1 to 2.5 kB; a ball in 3D is 5 to 13 kB, and a piece of gear is 1 to 4 kB, drawn in layers.
641
659
  - The size is a number of pixels up to 4096; the drawing is a vector at any size.
642
660
  - No emblem carries a real league's, team's or federation's mark.
@@ -782,8 +800,8 @@ See [CHANGELOG.md](./CHANGELOG.md), which has every release from 0.0.1 with its
782
800
 
783
801
  ## Credits
784
802
 
785
- The medal and the soccer ball are drawn for this package. Every other source is credited in [NOTICE.md](./NOTICE.md).
803
+ The artwork is drawn for this package. [NOTICE.md](./NOTICE.md) lists the sources for dimensions and other facts, and [the trophy source table](./docs/likeness-sources.md) records visual references.
786
804
 
787
805
  ## Licence
788
806
 
789
- The code, and the art drawn for this package, are [MIT](./LICENSE). Art taken from another project keeps its own licence, named in [NOTICE.md](./NOTICE.md), with its text in [LICENSES/](./LICENSES/).
807
+ The code and artwork are [MIT](./LICENSE).
package/dist/element.js CHANGED
@@ -32,6 +32,7 @@ export class DouguEmblem extends Base {
32
32
  #stage;
33
33
  #turner;
34
34
  #watch;
35
+ #visible = true;
35
36
  #resume = false;
36
37
  #queued = false;
37
38
  /** The controller of the turning while the emblem is turnable and drawn, or `undefined`: its angles, `play()`, `pause()` and `setAngles()`. */
@@ -43,12 +44,12 @@ export class DouguEmblem extends Base {
43
44
  this.#draw();
44
45
  if (typeof IntersectionObserver === "function") {
45
46
  this.#watch = new IntersectionObserver((seen) => {
46
- const visible = seen[seen.length - 1]?.isIntersecting !== false;
47
- if (!visible && this.#turner?.playing) {
47
+ this.#visible = seen[seen.length - 1]?.isIntersecting !== false;
48
+ if (!this.#visible && this.#turner?.playing) {
48
49
  this.#turner.pause();
49
50
  this.#resume = true;
50
51
  }
51
- else if (visible && this.#resume) {
52
+ else if (this.#visible && this.#resume) {
52
53
  this.#resume = false;
53
54
  this.#turner?.play();
54
55
  }
@@ -59,6 +60,7 @@ export class DouguEmblem extends Base {
59
60
  disconnectedCallback() {
60
61
  this.#watch?.disconnect();
61
62
  this.#watch = undefined;
63
+ this.#visible = true;
62
64
  this.#resume = false;
63
65
  this.#turner?.destroy();
64
66
  this.#turner = undefined;
@@ -139,30 +141,39 @@ export class DouguEmblem extends Base {
139
141
  if (!ref) {
140
142
  this.#turner?.destroy();
141
143
  this.#turner = undefined;
144
+ this.#resume = false;
142
145
  stage.innerHTML = "";
143
146
  return;
144
147
  }
145
148
  const options = this.#options();
149
+ const autoplay = flag(this.getAttribute("autoplay"));
146
150
  try {
147
- if (flag(this.getAttribute("turnable")) || flag(this.getAttribute("autoplay"))) {
151
+ if (flag(this.getAttribute("turnable")) || autoplay) {
148
152
  const { yaw, pitch, roll, ...rest } = options;
149
153
  const angles = { ...(yaw === undefined ? {} : { yaw }), ...(pitch === undefined ? {} : { pitch }), ...(roll === undefined ? {} : { roll }) };
154
+ const wantsAutoPlay = autoplay && globalThis.matchMedia?.("(prefers-reduced-motion: reduce)").matches !== true;
155
+ const start = wantsAutoPlay && this.#visible;
156
+ if (!autoplay)
157
+ this.#resume = false;
158
+ else if (wantsAutoPlay && !this.#visible)
159
+ this.#resume = true;
150
160
  if (this.#turner) {
151
161
  this.#turner.update(ref, rest);
152
162
  if (Object.keys(angles).length > 0)
153
163
  this.#turner.setAngles(angles);
154
- if (flag(this.getAttribute("autoplay")) && !this.#turner.playing)
164
+ if (start && !this.#turner.playing)
155
165
  this.#turner.play();
156
- else if (!flag(this.getAttribute("autoplay")) && this.#turner.playing)
166
+ else if (!autoplay && this.#turner.playing)
157
167
  this.#turner.pause();
158
168
  }
159
169
  else
160
- this.#turner = bindTurn(stage, ref, { ...rest, ...angles, autoPlay: flag(this.getAttribute("autoplay")) });
170
+ this.#turner = bindTurn(stage, ref, { ...rest, ...angles, autoPlay: start });
161
171
  this.dataset["state"] = "live";
162
172
  return;
163
173
  }
164
174
  this.#turner?.destroy();
165
175
  this.#turner = undefined;
176
+ this.#resume = false;
166
177
  const turned = options.yaw !== undefined || options.pitch !== undefined || options.roll !== undefined;
167
178
  stage.innerHTML = turned ? emblemFrame(ref, options) : renderEmblem(ref, options);
168
179
  this.dataset["state"] = "still";
@@ -1,5 +1,5 @@
1
1
  /**
2
- * The 1850s and 1860s: a cover of four pieces sewn along four seams that run from one point to the opposite one, like the peel of a lemon, in aged leather with a dark thread. No rule fixed the ball then, so it is drawn at the size of today's.
2
+ * The 1850s and 1860s: four seams run from one point to the opposite one, like the peel of a lemon, in aged leather with a dark thread. The drawing uses today's ball size.
3
3
  * @example
4
4
  * ```ts
5
5
  * import { BALL_BASEBALL_LEMON_PEEL } from "@johnmorrisdotca/dougu-sports";
@@ -8,7 +8,7 @@
8
8
  */
9
9
  export declare const BALL_BASEBALL_LEMON_PEEL: import("./ball.core.ts").Piece<import("./ball.engine.ts").BallSpec>;
10
10
  /**
11
- * The figure-8 seam stitched with alternate red and blue stitches (the American League's laces, in the recollection of a 1930s player).
11
+ * The figure-8 seam stitched with alternate red and blue stitches, using the colours of early American League balls.
12
12
  * @example
13
13
  * ```ts
14
14
  * import { BALL_BASEBALL_RED_BLUE } from "@johnmorrisdotca/dougu-sports";
@@ -17,7 +17,7 @@ export declare const BALL_BASEBALL_LEMON_PEEL: import("./ball.core.ts").Piece<im
17
17
  */
18
18
  export declare const BALL_BASEBALL_RED_BLUE: import("./ball.core.ts").Piece<import("./ball.engine.ts").BallSpec>;
19
19
  /**
20
- * The figure-8 seam stitched with alternate black and red stitches (the National League's laces, in the same recollection).
20
+ * The figure-8 seam stitched with alternate black and red stitches, using the colours of early National League balls.
21
21
  * @example
22
22
  * ```ts
23
23
  * import { BALL_BASEBALL_BLACK_RED } from "@johnmorrisdotca/dougu-sports";
@@ -8,7 +8,7 @@ import { gores } from "./ball.tilings.js";
8
8
  import { BALL_BASEBALL } from "./ball.baseball.js";
9
9
  const SIZE = BALL_BASEBALL.size;
10
10
  /**
11
- * The 1850s and 1860s: a cover of four pieces sewn along four seams that run from one point to the opposite one, like the peel of a lemon, in aged leather with a dark thread. No rule fixed the ball then, so it is drawn at the size of today's.
11
+ * The 1850s and 1860s: four seams run from one point to the opposite one, like the peel of a lemon, in aged leather with a dark thread. The drawing uses today's ball size.
12
12
  * @example
13
13
  * ```ts
14
14
  * import { BALL_BASEBALL_LEMON_PEEL } from "@johnmorrisdotca/dougu-sports";
@@ -19,7 +19,7 @@ export const BALL_BASEBALL_LEMON_PEEL = /* @__PURE__ */ defineBall({
19
19
  id: "ball:baseball-lemon-peel",
20
20
  en: "Baseball, lemon-peel",
21
21
  ja: "レモンピール型野球ボール",
22
- size: { ...SIZE, rule: "Official Baseball Rules, Rule 3.01 The Ball (today's size; no rule fixed the ball in the 1850s and 1860s)", note: "Drawn at the size of today's ball. Diameter worked out from the middle of the circumference range." },
22
+ size: { ...SIZE, rule: "Official Baseball Rules, Rule 3.01 The Ball (today's size)", note: "Drawn at the size of today's ball. Diameter worked out from the middle of the circumference range." },
23
23
  spec: {
24
24
  view: { yaw: 18, pitch: 30, roll: -10 },
25
25
  base: "#e1cfa6",
@@ -40,7 +40,7 @@ const STITCH = { count: 108, half: 0.075, width: 0.85, lean: 0.032 };
40
40
  const WHITE = "#f4f0e6";
41
41
  const common = { size: SIZE, base: WHITE, b: 0.4, view: { yaw: 18, pitch: 28, roll: -10 }, mat: { gloss: 0.3, shade: "#4a3a2a", grain: { f: 1.4, a: 0.12 } }, groove: "#8a7a62" };
42
42
  /**
43
- * The figure-8 seam stitched with alternate red and blue stitches (the American League's laces, in the recollection of a 1930s player).
43
+ * The figure-8 seam stitched with alternate red and blue stitches, using the colours of early American League balls.
44
44
  * @example
45
45
  * ```ts
46
46
  * import { BALL_BASEBALL_RED_BLUE } from "@johnmorrisdotca/dougu-sports";
@@ -49,7 +49,7 @@ const common = { size: SIZE, base: WHITE, b: 0.4, view: { yaw: 18, pitch: 28, ro
49
49
  */
50
50
  export const BALL_BASEBALL_RED_BLUE = /* @__PURE__ */ seamedBall({ ...common, id: "ball:baseball-red-blue", en: "Baseball, red and blue", ja: "赤青の縫い糸の野球ボール", stitch: { ...STITCH, colour: "#c4262e", colour2: "#2257a8" } });
51
51
  /**
52
- * The figure-8 seam stitched with alternate black and red stitches (the National League's laces, in the same recollection).
52
+ * The figure-8 seam stitched with alternate black and red stitches, using the colours of early National League balls.
53
53
  * @example
54
54
  * ```ts
55
55
  * import { BALL_BASEBALL_BLACK_RED } from "@johnmorrisdotca/dougu-sports";
@@ -13,6 +13,6 @@ export const BALL_BASKETBALL_3X3 = /* @__PURE__ */ defineBall({
13
13
  id: "ball:basketball-3x3",
14
14
  en: "Basketball, 3x3",
15
15
  ja: "3x3バスケットボール",
16
- size: { extentMm: 232.4, diameterMm: 232.4, circumferenceMm: 730.0, massG: [580, 620], rule: "FIBA 3x3 Official Equipment & Software Appendix to the 3x3 Official Rules (Dec 2024 update), Table 1 and section 5.7 (as quoted by balls.com)", note: "Not read in the FIBA 3x3 equipment appendix itself (fiba3x3.com refused the request); the figures are those a ball retailer prints from it: the circumference of a size 6 with the weight of a size 7. Diameter worked out from the middle of the circumference range." },
16
+ size: { extentMm: 232.4, diameterMm: 232.4, circumferenceMm: 730.0, massG: [580, 620], rule: "FIBA 3x3 Equipment & Software Appendix to the 3x3 Official Rules (December 2024), section 5.7 and Table 1", note: "Table 1 gives a circumference of 720 to 740 mm and a mass of 580 to 620 g. Diameter worked out from the middle of the circumference range." },
17
17
  spec: basketballSpec("#e0701f", "#2b2d33"),
18
18
  });
@@ -15,7 +15,7 @@ export declare function renderBall(name: string, options?: PieceOptions): string
15
15
  * of a turntable. The grain stays out of a turning ball. Every ball is drawn in true 3D: the seams, panels and marks are on the sphere and turn with it.
16
16
  * @example
17
17
  * ```ts
18
- * import { ballFrame } from "@johnmorrisdotca/kyogijo-stadiums/balls";
18
+ * import { ballFrame } from "@johnmorrisdotca/dougu-sports/ball/ball.index";
19
19
  * const frames = [0, 60, 120, 180, 240, 300].map((yaw) => ballFrame("soccer", { yaw, size: 48 }));
20
20
  * console.log(frames.length, frames[0].startsWith("<svg"));
21
21
  * // 6 true
@@ -59,7 +59,7 @@ export function renderBall(name, options) {
59
59
  * of a turntable. The grain stays out of a turning ball. Every ball is drawn in true 3D: the seams, panels and marks are on the sphere and turn with it.
60
60
  * @example
61
61
  * ```ts
62
- * import { ballFrame } from "@johnmorrisdotca/kyogijo-stadiums/balls";
62
+ * import { ballFrame } from "@johnmorrisdotca/dougu-sports/ball/ball.index";
63
63
  * const frames = [0, 60, 120, 180, 240, 300].map((yaw) => ballFrame("soccer", { yaw, size: 48 }));
64
64
  * console.log(frames.length, frames[0].startsWith("<svg"));
65
65
  * // 6 true
@@ -1,6 +1,5 @@
1
- // The slotted plastic practice baseball: a hollow white plastic ball the size of a baseball, with eight oblong slots on one half and the other half solid. The figures are from the English Wikipedia
2
- // article on the ball (accessed 2026-10-21): hollow resilient plastic, a wall no more than 1/8 inch (3.2 mm) thick, eight oblong holes of 0.75 inch (19 mm), on one half only, about the size of a regulation
3
- // baseball. The holes are real, as a pickleball's are (ball.holes.ts): the near ones are cut out of the shell and show the inside of the ball, and where a near slot and a far one line up the page shows through.
1
+ // A hollow white plastic practice baseball with eight oblong slots in one half. The drawing uses regulation baseball diameter and an illustrative slot size.
2
+ // The holes are real, as a pickleball's are (ball.holes.ts): the near ones are cut out of the shell and show the inside of the ball, and where a near slot and a far one line up the page shows through.
4
3
  // No maker's name is in this package: it is a generic ball.
5
4
  import { defineBall } from "./ball.engine.js";
6
5
  import { holeLayers, slotRing } from "./ball.holes.js";
@@ -8,10 +7,10 @@ import { greatCircle } from "./ball.math.js";
8
7
  import { region } from "./ball.region.js";
9
8
  /** The axis of the perforated half: its pole, the middle of the solid-free half's ring of slots. */
10
9
  const POLE = [0, 0, 1];
11
- /** Eight slots in a ring round the pole at 36 degrees from it (the ring is about half way out in a picture of the ball seen from its pole), each running along the line to the pole. */
10
+ /** Eight slots in a ring 36 degrees from the pole in the drawing, each running along the line to the pole. */
12
11
  const COLATITUDE = (36 * Math.PI) / 180;
13
12
  const SLOTS = 8;
14
- /** A slot is 19 mm long on a ball 73.8 mm across (a radius of 36.9 mm): 0.515 radians, half of it 0.2575. Its width is not given; a third of its length is how it is drawn. */
13
+ /** Draw each slot 19 mm long and a third as wide on a ball 73.8 mm across. */
15
14
  const HALF_LONG = 19 / 73.8;
16
15
  const HALF_WIDTH = HALF_LONG / 3;
17
16
  const CENTRES = Array.from({ length: SLOTS }, (_, i) => {
@@ -31,7 +30,7 @@ export const BALL_PLASTIC_BASEBALL_SLOTTED = /* @__PURE__ */ defineBall({
31
30
  id: "ball:plastic-baseball-slotted",
32
31
  en: "Plastic baseball, slotted",
33
32
  ja: "野球の穴あき練習球",
34
- size: { extentMm: 73.8, diameterMm: 73.8, rule: "English Wikipedia, the article on the perforated plastic practice ball (accessed 2026-10-21): hollow plastic, wall at most 3.2 mm, eight oblong holes of 19 mm on one half only; size taken from Official Baseball Rules, Rule 3.01 The Ball", note: "The article says only that the ball is about the size of a regulation baseball, so the diameter is a baseball's (the middle of the circumference range). No mass is stated by a source read; none is given. The slots' width is not given and is drawn at a third of their length." },
33
+ size: { extentMm: 73.8, diameterMm: 73.8, rule: "Official Baseball Rules, Rule 3.01 The Ball (reference diameter)", note: "Diameter worked out from the middle of the regulation baseball circumference range. The eight oblong slots in one half, their dimensions and the shell thickness are drawing choices." },
35
34
  spec: {
36
35
  view: { yaw: -22, pitch: 22, roll: 0 },
37
36
  base: "#f4f4f0",
@@ -41,9 +40,8 @@ export const BALL_PLASTIC_BASEBALL_SLOTTED = /* @__PURE__ */ defineBall({
41
40
  },
42
41
  });
43
42
  /**
44
- * The common hollow plastic practice baseball with slots all over it (the other, the one-sided ball above, is the first): one ring of five large oval slots on each half, running toward the pole, the two rings
45
- * turned half a step apart so that no slot faces another across the seam, and often two-tone, the halves split along the seam. A slot is about 22 mm long and 14 mm wide on a ball of the size of a baseball, an oval
46
- * and not a slit (larger than the 19 mm of the one-sided ball, as the photographs show); the other figures are the same facts as above, and the number and the layout of the slots are drawn from photographs looked at and never copied. No maker's name is in this package.
43
+ * The drawing has one ring of six large oval slots per hemisphere, running toward the pole. The rings are staggered by half a slot spacing, and the two-tone variant splits colour along the equator.
44
+ * Each slot is drawn about 22 mm long by 14 mm wide on the reference baseball diameter.
47
45
  */
48
46
  const PRACTICE_HALF_LONG = 0.3;
49
47
  const PRACTICE_HALF_WIDTH = 0.19;
@@ -64,7 +62,7 @@ function practice(id, en, ja, colours) {
64
62
  id,
65
63
  en,
66
64
  ja,
67
- size: { extentMm: 73.8, diameterMm: 73.8, rule: "English Wikipedia, the article on the perforated plastic practice ball (accessed 2026-10-21): hollow plastic, wall at most 3.2 mm; size taken from Official Baseball Rules, Rule 3.01 (the middle of the circumference range). The count and layout of the slots are drawn from photographs looked at, not copied.", note: "The size of a slot on this ball is not given by the article (19 mm is the one-sided ball's): it is drawn about 22 by 14 mm, an oval, to match the photographs. The mass is not stated. " },
65
+ size: { extentMm: 73.8, diameterMm: 73.8, rule: "Official Baseball Rules, Rule 3.01 The Ball (reference diameter)", note: "Diameter worked out from the middle of the regulation baseball circumference range. The slot count, layout and dimensions describe the drawing." },
68
66
  spec: {
69
67
  view: { yaw: -22, pitch: 26, roll: 0 },
70
68
  base: colours.second ?? colours.first,
@@ -9,13 +9,13 @@ import { smallCircle } from "./ball.math.js";
9
9
  import { truncatedIcosahedron } from "./ball.polyhedra.js";
10
10
  import { dodecahedron, gorePoint, gores } from "./ball.tilings.js";
11
11
  import { SOCCER_SIZE } from "./ball.soccer.size.js";
12
- /** The ball the Laws describe from 1872: a sphere 27 to 28 inches (68.6 to 71.1 cm) round. The Laws' mass for the early years is left out, because the secondary sources read disagree on the figure and the year. */
12
+ /** The four older drawings use the 27 to 28 inch circumference recorded in the 1903/04 Laws. */
13
13
  const OLD_SIZE = {
14
14
  extentMm: 698.5 / Math.PI,
15
15
  diameterMm: 698.5 / Math.PI,
16
16
  circumferenceMm: 698.5,
17
- rule: "Laws of the Game of the Football Association, revised 1872: the ball is a sphere 27 to 28 inches round",
18
- note: "Before 1872 there was no rule. Diameter worked out from the middle of the circumference range. No mass is given, because the early figures could not be confirmed in a primary text.",
17
+ rule: "IFAB Laws of the Game 1903/04, Law 1: circumference 27 to 28 inches",
18
+ note: "The four drawings share this historical size as a reference. Diameter worked out from the middle of the circumference range.",
19
19
  };
20
20
  const LEATHER = { gloss: 0.22, shade: "#2b1608", grain: { f: 2.1, a: 0.34 } };
21
21
  const THREAD = "#e9d8b0";
@@ -28,11 +28,31 @@ function soccerColourways() {
28
28
  * ```
29
29
  */
30
30
  export const EMBLEM_DESCRIPTIONS = {
31
+ "award:medal": { en: "A gold star hanging from a notched red ribbon", ja: "先端に切り込みのある赤いリボンから下がる金色の星" },
32
+ "award:badge": { en: "A round seal with a star and two ribbon tails", ja: "中央に星があり、リボンの端が2本下がる丸いバッジ" },
33
+ "award:crown": { en: "A three-point crown with round tips and a jewelled band", ja: "丸い飾りの付いた3つの先端と、宝石付きの帯を持つ王冠" },
34
+ "award:star": { en: "A five-pointed gold star with bevelled edges", ja: "縁を面取りした金色の五芒星" },
35
+ "award:shield": { en: "A plain silver shield with a bevelled inset", ja: "縁を面取りした無地の銀色の盾" },
36
+ "award:ribbon": { en: "A gold band with two notched red ribbon tails", ja: "金色の帯の後ろから、先端に切り込みのある赤いリボンが2本下がる飾り" },
37
+ "medal:gold": { en: "A gold disc with a raised star, hanging from a five-colour ribbon", ja: "5色のリボンから下がる金色の円盤。表に浮き出た星がある" },
38
+ "medal:silver": { en: "A silver disc with a raised star, hanging from a five-colour ribbon", ja: "5色のリボンから下がる銀色の円盤。表に浮き出た星がある" },
39
+ "medal:bronze": { en: "A bronze disc with a raised star, hanging from a five-colour ribbon", ja: "5色のリボンから下がる銅色の円盤。表に浮き出た星がある" },
40
+ "medal:place-1": { en: "A bevelled gold badge with the numeral 1", ja: "縁を面取りし、数字の1を入れた金色の順位章" },
41
+ "medal:place-2": { en: "A bevelled silver badge with the numeral 2", ja: "縁を面取りし、数字の2を入れた銀色の順位章" },
42
+ "medal:place-3": { en: "A bevelled bronze badge with the numeral 3", ja: "縁を面取りし、数字の3を入れた銅色の順位章" },
43
+ "crest:shield": { en: "A shield with a band across the top, with a star or initials", ja: "上端に帯のある盾形の紋章。中央に星またはイニシャルが入る" },
44
+ "crest:roundel": { en: "A round crest with an inset ring and a star or initials", ja: "縁の内側に輪がある円形の紋章。中央に星またはイニシャルが入る" },
45
+ "crest:diamond": { en: "A double-bordered diamond with a star or initials", ja: "二重の縁取りがあるひし形の紋章。中央に星またはイニシャルが入る" },
46
+ "crest:pennant": { en: "A triangular flag on a pole, with a star or initials", ja: "棒に付けた三角旗の紋章。中央に星またはイニシャルが入る" },
47
+ "pennant:championship": { en: "A felt pennant with a stitched edge and a wooden dowel, with space for words and a year", ja: "縁を縫い合わせ、木の棒に付けたフェルトのペナント。文字と年を入れられる" },
31
48
  "trophy:hockey-cup": { en: "Tall banded silver cup", ja: "帯を何段も重ねた背の高い銀のカップ" },
32
49
  "trophy:basketball": { en: "Basketball trophy", ja: "バスケットボールのトロフィー" },
33
50
  "trophy:football": { en: "Football trophy", ja: "アメリカンフットボールのトロフィー" },
34
51
  "trophy:soccer-ball": { en: "Soccer ball trophy", ja: "サッカーボールのトロフィー" },
35
52
  "trophy:tennis-cup": { en: "Two-handled cup with a pineapple", ja: "取っ手が二つあり、ふたにパイナップルの飾りが付いたカップ" },
53
+ "trophy:ryder-cup": { en: "A gold lidded cup with scroll handles, a golfer finial and a tall stepped base", ja: "曲線を描く取っ手の付いた金色の杯。ふたにはゴルファーの像があり、背の高い台座は段を重ねている" },
54
+ "trophy:africa-cup-of-nations": { en: "A golden globe and a ring of small balls on a fluted stem above a blue stone base", ja: "金色の地球儀を小さな球が囲み、縦溝のある支柱と青い石の台座が支える" },
55
+ "trophy:walter-a-brown-trophy": { en: "A broad silver bowl on a wooden pedestal with four rows of champion plates", ja: "幅広い銀色の鉢と、優勝チームの銘板が4段並ぶ木製の台座" },
36
56
  "sport:ifaf": { en: "American football, international rules", ja: "国際ルールのアメリカンフットボール" },
37
57
  "sport:pickleball": { en: "Pickleball paddle and ball", ja: "ピックルボールのパドルとボール" },
38
58
  "sport:tabletennis": { en: "Table tennis paddle and ball", ja: "卓球のラケットとボール" },
@@ -82,6 +102,10 @@ export const EMBLEM_DESCRIPTIONS = {
82
102
  "gear:football-helmet": { en: "Football helmet", ja: "アメリカンフットボールのヘルメット" },
83
103
  "gear:baseball-cap": { en: "A baseball cap in three-quarter view: a dome crown with a button, a seam and three eyelets, and a curved brim with its edge and rows of stitching.", ja: "野球帽を斜め前から描いています。頭頂のボタン、縫い目、3つのはと目のあるドーム形のクラウンと、縁と何列もの縫い目のある湾曲したつばが見えます。" },
84
104
  "gear:hurley": { en: "Hurley", ja: "ハーリー(ハーリングのスティック)" },
105
+ "gear:boxing-glove": { en: "A padded red glove with an attached thumb and a dark wrist cuff", ja: "親指部分を本体に留め、手首に濃い色のカフを付けた赤いグローブ" },
106
+ "gear:mma-glove": { en: "A blue open-finger glove with a padded knuckle panel and wrist strap", ja: "指先の出る青いグローブ。拳を覆うパッドと手首のベルトが付く" },
107
+ "gear:wrestling-mat": { en: "A square mat in perspective, with an orange band around the competition area", ja: "斜めから見た正方形のマット。競技面をオレンジ色の帯が囲む" },
108
+ "gear:wrestling-ring": { en: "A square raised ring with three ropes and padded corner posts", ja: "高くなった正方形のリング。3本のロープとパッド付きのコーナーポストがある" },
85
109
  "trophy:sumo-cup": { en: "A tall silver cup on a tall stepped stand, with an ornate phoenix-crested handle on each side", ja: "段のある高い台に載った、背の高い銀の杯。両側の取っ手に鳳凰の飾りが付く" },
86
110
  "trophy:paterson-cup": { en: "The Paterson Cup: a wide silver bowl with a straight engraved band at the rim, two scrolled ear handles, a short stem and a dark wooden base. Given to the champion of the Pacific Coast Hockey Association from 1912", ja: "パターソン・カップ。縁にまっすぐな彫刻の帯がある幅広の銀のボウルで、渦巻き形の耳状の取っ手が2つ付き、短い脚と濃い色の木の台座があります。1912年から、パシフィック・コースト・ホッケー協会の優勝チームに贈られました。" },
87
111
  "trophy:stanley-cup": { en: "The Stanley Cup: a wide fluted bowl with a smooth band at the rim, a beaded neck, three narrow rings that step out and a barrel of five bands on a black base.", ja: "縁に滑らかな帯がある縦溝入りの広いボウル、玉飾りのある首、段状に広がる細い三つの輪、黒い台座にのった五段の帯の胴を描いています。ナショナル・ホッケー・リーグのプレーオフの優勝チームに贈られます(初授与は1893年)。" },