@johnmorrisdotca/dougu-sports 0.0.1 → 0.2.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 (338) hide show
  1. package/CHANGELOG.md +61 -1
  2. package/LICENSES/README.md +4 -3
  3. package/NOTICE.md +54 -14
  4. package/README.md +251 -80
  5. package/dist/emblems/award/badge.d.ts +2 -0
  6. package/dist/emblems/award/badge.js +14 -0
  7. package/dist/emblems/award/crown.d.ts +2 -0
  8. package/dist/emblems/award/crown.js +15 -0
  9. package/dist/emblems/award/medal.d.ts +1 -1
  10. package/dist/emblems/award/medal.js +10 -15
  11. package/dist/emblems/award/shield.d.ts +2 -0
  12. package/dist/emblems/award/shield.js +11 -0
  13. package/dist/emblems/award/star.d.ts +2 -0
  14. package/dist/emblems/award/star.js +11 -0
  15. package/dist/emblems/ball/ball.afl.d.ts +1 -0
  16. package/dist/emblems/ball/ball.afl.js +24 -0
  17. package/dist/emblems/ball/ball.baseball.d.ts +1 -0
  18. package/dist/emblems/ball/ball.baseball.js +14 -0
  19. package/dist/emblems/ball/ball.basketball.d.ts +7 -0
  20. package/dist/emblems/ball/ball.basketball.js +32 -0
  21. package/dist/emblems/ball/ball.basketball3x3.d.ts +1 -0
  22. package/dist/emblems/ball/ball.basketball3x3.js +10 -0
  23. package/dist/emblems/ball/ball.basketball6.d.ts +1 -0
  24. package/dist/emblems/ball/ball.basketball6.js +10 -0
  25. package/dist/emblems/ball/ball.core.d.ts +111 -0
  26. package/dist/emblems/ball/ball.core.js +79 -0
  27. package/dist/emblems/ball/ball.cricket.d.ts +5 -0
  28. package/dist/emblems/ball/ball.cricket.js +31 -0
  29. package/dist/emblems/ball/ball.curlingstone.d.ts +3 -0
  30. package/dist/emblems/ball/ball.curlingstone.js +46 -0
  31. package/dist/emblems/ball/ball.discus.d.ts +1 -0
  32. package/dist/emblems/ball/ball.discus.js +24 -0
  33. package/dist/emblems/ball/ball.engine.d.ts +114 -0
  34. package/dist/emblems/ball/ball.engine.js +342 -0
  35. package/dist/emblems/ball/ball.family.dotted.d.ts +27 -0
  36. package/dist/emblems/ball/ball.family.dotted.js +20 -0
  37. package/dist/emblems/ball/ball.family.panelled.d.ts +7 -0
  38. package/dist/emblems/ball/ball.family.panelled.js +60 -0
  39. package/dist/emblems/ball/ball.family.prolate.d.ts +16 -0
  40. package/dist/emblems/ball/ball.family.prolate.js +29 -0
  41. package/dist/emblems/ball/ball.family.seamed.d.ts +31 -0
  42. package/dist/emblems/ball/ball.family.seamed.js +26 -0
  43. package/dist/emblems/ball/ball.fieldhockey.d.ts +1 -0
  44. package/dist/emblems/ball/ball.fieldhockey.js +15 -0
  45. package/dist/emblems/ball/ball.football.d.ts +3 -0
  46. package/dist/emblems/ball/ball.football.js +51 -0
  47. package/dist/emblems/ball/ball.gaelic.d.ts +2 -0
  48. package/dist/emblems/ball/ball.gaelic.js +30 -0
  49. package/dist/emblems/ball/ball.golf.d.ts +1 -0
  50. package/dist/emblems/ball/ball.golf.js +15 -0
  51. package/dist/emblems/ball/ball.hammer.d.ts +1 -0
  52. package/dist/emblems/ball/ball.hammer.js +31 -0
  53. package/dist/emblems/ball/ball.handball.d.ts +1 -0
  54. package/dist/emblems/ball/ball.handball.js +25 -0
  55. package/dist/emblems/ball/ball.index.d.ts +48 -0
  56. package/dist/emblems/ball/ball.index.js +103 -0
  57. package/dist/emblems/ball/ball.math.d.ts +38 -0
  58. package/dist/emblems/ball/ball.math.js +105 -0
  59. package/dist/emblems/ball/ball.object.d.ts +38 -0
  60. package/dist/emblems/ball/ball.object.js +20 -0
  61. package/dist/emblems/ball/ball.padel.d.ts +1 -0
  62. package/dist/emblems/ball/ball.padel.js +13 -0
  63. package/dist/emblems/ball/ball.pickleball.d.ts +2 -0
  64. package/dist/emblems/ball/ball.pickleball.js +26 -0
  65. package/dist/emblems/ball/ball.polyhedra.d.ts +15 -0
  66. package/dist/emblems/ball/ball.polyhedra.js +63 -0
  67. package/dist/emblems/ball/ball.puck.d.ts +3 -0
  68. package/dist/emblems/ball/ball.puck.js +22 -0
  69. package/dist/emblems/ball/ball.roundnet.d.ts +1 -0
  70. package/dist/emblems/ball/ball.roundnet.js +15 -0
  71. package/dist/emblems/ball/ball.rugby.d.ts +1 -0
  72. package/dist/emblems/ball/ball.rugby.js +35 -0
  73. package/dist/emblems/ball/ball.sepaktakraw.d.ts +1 -0
  74. package/dist/emblems/ball/ball.sepaktakraw.js +48 -0
  75. package/dist/emblems/ball/ball.shuttlecock.d.ts +6 -0
  76. package/dist/emblems/ball/ball.shuttlecock.js +93 -0
  77. package/dist/emblems/ball/ball.sliotar.d.ts +1 -0
  78. package/dist/emblems/ball/ball.sliotar.js +14 -0
  79. package/dist/emblems/ball/ball.smooth.d.ts +4 -0
  80. package/dist/emblems/ball/ball.smooth.js +51 -0
  81. package/dist/emblems/ball/ball.soccer.d.ts +2 -0
  82. package/dist/emblems/ball/ball.soccer.js +54 -0
  83. package/dist/emblems/ball/ball.softball.d.ts +1 -0
  84. package/dist/emblems/ball/ball.softball.js +14 -0
  85. package/dist/emblems/ball/ball.squash.d.ts +7 -0
  86. package/dist/emblems/ball/ball.squash.js +27 -0
  87. package/dist/emblems/ball/ball.stack.d.ts +48 -0
  88. package/dist/emblems/ball/ball.stack.js +127 -0
  89. package/dist/emblems/ball/ball.stitch.d.ts +10 -0
  90. package/dist/emblems/ball/ball.stitch.js +59 -0
  91. package/dist/emblems/ball/ball.tennis.d.ts +1 -0
  92. package/dist/emblems/ball/ball.tennis.js +13 -0
  93. package/dist/emblems/ball/ball.teqball.d.ts +1 -0
  94. package/dist/emblems/ball/ball.teqball.js +27 -0
  95. package/dist/emblems/ball/ball.volleyball.d.ts +3 -0
  96. package/dist/emblems/ball/ball.volleyball.js +56 -0
  97. package/dist/emblems/ball/ball.waterpolo.d.ts +1 -0
  98. package/dist/emblems/ball/ball.waterpolo.js +31 -0
  99. package/dist/emblems/crest/diamond.d.ts +2 -0
  100. package/dist/emblems/crest/diamond.js +18 -0
  101. package/dist/emblems/crest/pennant.d.ts +2 -0
  102. package/dist/emblems/crest/pennant.js +18 -0
  103. package/dist/emblems/crest/roundel.d.ts +2 -0
  104. package/dist/emblems/crest/roundel.js +18 -0
  105. package/dist/emblems/crest/shield.d.ts +2 -0
  106. package/dist/emblems/crest/shield.js +17 -0
  107. package/dist/emblems/emblem.api.d.ts +77 -9
  108. package/dist/emblems/emblem.api.js +56 -10
  109. package/dist/emblems/emblem.compose.d.ts +31 -0
  110. package/dist/emblems/emblem.compose.js +91 -0
  111. package/dist/emblems/emblem.core.d.ts +89 -7
  112. package/dist/emblems/emblem.core.js +85 -11
  113. package/dist/emblems/emblem.descriptions.d.ts +7 -0
  114. package/dist/emblems/emblem.descriptions.js +60 -0
  115. package/dist/emblems/emblem.display.d.ts +75 -0
  116. package/dist/emblems/emblem.display.js +214 -0
  117. package/dist/emblems/emblem.engrave.d.ts +50 -0
  118. package/dist/emblems/emblem.engrave.js +145 -0
  119. package/dist/emblems/emblem.equipment.d.ts +24 -0
  120. package/dist/emblems/emblem.equipment.js +57 -0
  121. package/dist/emblems/emblem.flip.d.ts +10 -0
  122. package/dist/emblems/emblem.flip.js +45 -0
  123. package/dist/emblems/emblem.ids.d.ts +44 -30
  124. package/dist/emblems/emblem.ids.js +51 -17
  125. package/dist/emblems/emblem.lathe.d.ts +62 -0
  126. package/dist/emblems/emblem.lathe.js +426 -0
  127. package/dist/emblems/emblem.medal.d.ts +6 -0
  128. package/dist/emblems/emblem.medal.js +38 -0
  129. package/dist/emblems/emblem.pennant.d.ts +3 -0
  130. package/dist/emblems/emblem.pennant.js +79 -0
  131. package/dist/emblems/emblem.registry.js +162 -4
  132. package/dist/emblems/emblem.shapes.d.ts +48 -12
  133. package/dist/emblems/emblem.shapes.js +138 -31
  134. package/dist/emblems/emblem.sprite.d.ts +38 -0
  135. package/dist/emblems/emblem.sprite.js +65 -0
  136. package/dist/emblems/emblem.uri.d.ts +22 -0
  137. package/dist/emblems/emblem.uri.js +29 -0
  138. package/dist/emblems/gear/gear.badmintonracket.d.ts +1 -0
  139. package/dist/emblems/gear/gear.badmintonracket.js +19 -0
  140. package/dist/emblems/gear/gear.baseballglove.d.ts +1 -0
  141. package/dist/emblems/gear/gear.baseballglove.js +21 -0
  142. package/dist/emblems/gear/gear.budo.d.ts +17 -0
  143. package/dist/emblems/gear/gear.budo.js +60 -0
  144. package/dist/emblems/gear/gear.core.d.ts +64 -0
  145. package/dist/emblems/gear/gear.core.js +127 -0
  146. package/dist/emblems/gear/gear.cricketbat.d.ts +1 -0
  147. package/dist/emblems/gear/gear.cricketbat.js +17 -0
  148. package/dist/emblems/gear/gear.field.d.ts +6 -0
  149. package/dist/emblems/gear/gear.field.js +81 -0
  150. package/dist/emblems/gear/gear.fieldhockeystick.d.ts +1 -0
  151. package/dist/emblems/gear/gear.fieldhockeystick.js +16 -0
  152. package/dist/emblems/gear/gear.footballhelmet.d.ts +1 -0
  153. package/dist/emblems/gear/gear.footballhelmet.js +16 -0
  154. package/dist/emblems/gear/gear.goaliemask.d.ts +1 -0
  155. package/dist/emblems/gear/gear.goaliemask.js +23 -0
  156. package/dist/emblems/gear/gear.goalnet.d.ts +1 -0
  157. package/dist/emblems/gear/gear.goalnet.js +25 -0
  158. package/dist/emblems/gear/gear.hockeystick.d.ts +1 -0
  159. package/dist/emblems/gear/gear.hockeystick.js +15 -0
  160. package/dist/emblems/gear/gear.index.d.ts +22 -0
  161. package/dist/emblems/gear/gear.index.js +49 -0
  162. package/dist/emblems/gear/gear.kendo.d.ts +2 -0
  163. package/dist/emblems/gear/gear.kendo.js +41 -0
  164. package/dist/emblems/gear/gear.kyudo.d.ts +2 -0
  165. package/dist/emblems/gear/gear.kyudo.js +31 -0
  166. package/dist/emblems/gear/gear.lacrossestick.d.ts +1 -0
  167. package/dist/emblems/gear/gear.lacrossestick.js +26 -0
  168. package/dist/emblems/gear/gear.rackets.d.ts +4 -0
  169. package/dist/emblems/gear/gear.rackets.js +60 -0
  170. package/dist/emblems/gear/gear.skates.d.ts +3 -0
  171. package/dist/emblems/gear/gear.skates.js +39 -0
  172. package/dist/emblems/gear/gear.sticks.d.ts +3 -0
  173. package/dist/emblems/gear/gear.sticks.js +34 -0
  174. package/dist/emblems/gear/gear.sumo.d.ts +2 -0
  175. package/dist/emblems/gear/gear.sumo.js +43 -0
  176. package/dist/emblems/gear/gear.tabletennispaddle.d.ts +1 -0
  177. package/dist/emblems/gear/gear.tabletennispaddle.js +16 -0
  178. package/dist/emblems/gear/gear.tennisracket.d.ts +1 -0
  179. package/dist/emblems/gear/gear.tennisracket.js +17 -0
  180. package/dist/emblems/gear/gear.track.d.ts +4 -0
  181. package/dist/emblems/gear/gear.track.js +45 -0
  182. package/dist/emblems/gear/gear.water.d.ts +2 -0
  183. package/dist/emblems/gear/gear.water.js +25 -0
  184. package/dist/emblems/medal/bronze.d.ts +2 -0
  185. package/dist/emblems/medal/bronze.js +4 -0
  186. package/dist/emblems/medal/gold.d.ts +2 -0
  187. package/dist/emblems/medal/gold.js +4 -0
  188. package/dist/emblems/medal/place-1.d.ts +2 -0
  189. package/dist/emblems/medal/place-1.js +4 -0
  190. package/dist/emblems/medal/place-2.d.ts +2 -0
  191. package/dist/emblems/medal/place-2.js +4 -0
  192. package/dist/emblems/medal/place-3.d.ts +2 -0
  193. package/dist/emblems/medal/place-3.js +4 -0
  194. package/dist/emblems/medal/silver.d.ts +2 -0
  195. package/dist/emblems/medal/silver.js +4 -0
  196. package/dist/emblems/pennant/championship.d.ts +2 -0
  197. package/dist/emblems/pennant/championship.js +4 -0
  198. package/dist/emblems/sport/afl.d.ts +2 -0
  199. package/dist/emblems/sport/afl.js +12 -0
  200. package/dist/emblems/sport/artisticswimming.d.ts +2 -0
  201. package/dist/emblems/sport/artisticswimming.js +16 -0
  202. package/dist/emblems/sport/athletics.d.ts +2 -0
  203. package/dist/emblems/sport/athletics.js +12 -0
  204. package/dist/emblems/sport/badminton.d.ts +2 -0
  205. package/dist/emblems/sport/badminton.js +13 -0
  206. package/dist/emblems/sport/cfl.d.ts +2 -0
  207. package/dist/emblems/sport/cfl.js +5 -0
  208. package/dist/emblems/sport/cricket.d.ts +2 -0
  209. package/dist/emblems/sport/cricket.js +14 -0
  210. package/dist/emblems/sport/curling.d.ts +2 -0
  211. package/dist/emblems/sport/curling.js +14 -0
  212. package/dist/emblems/sport/diving.d.ts +2 -0
  213. package/dist/emblems/sport/diving.js +18 -0
  214. package/dist/emblems/sport/fieldhockey.d.ts +2 -0
  215. package/dist/emblems/sport/fieldhockey.js +11 -0
  216. package/dist/emblems/sport/gaelic.d.ts +2 -0
  217. package/dist/emblems/sport/gaelic.js +11 -0
  218. package/dist/emblems/sport/handball.d.ts +2 -0
  219. package/dist/emblems/sport/handball.js +15 -0
  220. package/dist/emblems/sport/ifaf.d.ts +2 -0
  221. package/dist/emblems/sport/ifaf.js +5 -0
  222. package/dist/emblems/sport/judo.d.ts +2 -0
  223. package/dist/emblems/sport/judo.js +13 -0
  224. package/dist/emblems/sport/karate.d.ts +2 -0
  225. package/dist/emblems/sport/karate.js +13 -0
  226. package/dist/emblems/sport/kendo.d.ts +2 -0
  227. package/dist/emblems/sport/kendo.js +14 -0
  228. package/dist/emblems/sport/kyudo.d.ts +2 -0
  229. package/dist/emblems/sport/kyudo.js +15 -0
  230. package/dist/emblems/sport/lacrosse.d.ts +2 -0
  231. package/dist/emblems/sport/lacrosse.js +13 -0
  232. package/dist/emblems/sport/mlb.d.ts +2 -0
  233. package/dist/emblems/sport/mlb.js +28 -0
  234. package/dist/emblems/sport/nba.d.ts +2 -0
  235. package/dist/emblems/sport/nba.js +12 -0
  236. package/dist/emblems/sport/netball.d.ts +2 -0
  237. package/dist/emblems/sport/netball.js +14 -0
  238. package/dist/emblems/sport/nfl.d.ts +3 -0
  239. package/dist/emblems/sport/nfl.js +15 -0
  240. package/dist/emblems/sport/nhl.d.ts +2 -0
  241. package/dist/emblems/sport/nhl.js +13 -0
  242. package/dist/emblems/sport/padel.d.ts +2 -0
  243. package/dist/emblems/sport/padel.js +14 -0
  244. package/dist/emblems/sport/pickleball.d.ts +2 -0
  245. package/dist/emblems/sport/pickleball.js +13 -0
  246. package/dist/emblems/sport/racquetball.d.ts +2 -0
  247. package/dist/emblems/sport/racquetball.js +13 -0
  248. package/dist/emblems/sport/roundnet.d.ts +2 -0
  249. package/dist/emblems/sport/roundnet.js +15 -0
  250. package/dist/emblems/sport/rugby.d.ts +2 -0
  251. package/dist/emblems/sport/rugby.js +12 -0
  252. package/dist/emblems/sport/sepaktakraw.d.ts +2 -0
  253. package/dist/emblems/sport/sepaktakraw.js +11 -0
  254. package/dist/emblems/sport/skating.d.ts +2 -0
  255. package/dist/emblems/sport/skating.js +14 -0
  256. package/dist/emblems/sport/soccer.d.ts +2 -0
  257. package/dist/emblems/sport/soccer.js +31 -0
  258. package/dist/emblems/sport/squash.d.ts +2 -0
  259. package/dist/emblems/sport/squash.js +15 -0
  260. package/dist/emblems/sport/sumo.d.ts +2 -0
  261. package/dist/emblems/sport/sumo.js +15 -0
  262. package/dist/emblems/sport/swimming.d.ts +2 -0
  263. package/dist/emblems/sport/swimming.js +15 -0
  264. package/dist/emblems/sport/tabletennis.d.ts +2 -0
  265. package/dist/emblems/sport/tabletennis.js +12 -0
  266. package/dist/emblems/sport/tennis.d.ts +2 -0
  267. package/dist/emblems/sport/tennis.js +15 -0
  268. package/dist/emblems/sport/teqball.d.ts +2 -0
  269. package/dist/emblems/sport/teqball.js +15 -0
  270. package/dist/emblems/sport/volleyball.d.ts +2 -0
  271. package/dist/emblems/sport/volleyball.js +25 -0
  272. package/dist/emblems/sport/waterpolo.d.ts +2 -0
  273. package/dist/emblems/sport/waterpolo.js +15 -0
  274. package/dist/emblems/trophy/banner.d.ts +2 -0
  275. package/dist/emblems/trophy/banner.js +20 -0
  276. package/dist/emblems/trophy/baseball.d.ts +2 -0
  277. package/dist/emblems/trophy/baseball.js +15 -0
  278. package/dist/emblems/trophy/basketball.d.ts +2 -0
  279. package/dist/emblems/trophy/basketball.js +17 -0
  280. package/dist/emblems/trophy/belt.d.ts +2 -0
  281. package/dist/emblems/trophy/belt.js +17 -0
  282. package/dist/emblems/trophy/bowl.d.ts +2 -0
  283. package/dist/emblems/trophy/bowl.js +8 -0
  284. package/dist/emblems/trophy/canadian-bowl.d.ts +2 -0
  285. package/dist/emblems/trophy/canadian-bowl.js +23 -0
  286. package/dist/emblems/trophy/championship-banner.d.ts +2 -0
  287. package/dist/emblems/trophy/championship-banner.js +67 -0
  288. package/dist/emblems/trophy/cricket-urn.d.ts +2 -0
  289. package/dist/emblems/trophy/cricket-urn.js +23 -0
  290. package/dist/emblems/trophy/cup.d.ts +2 -0
  291. package/dist/emblems/trophy/cup.js +16 -0
  292. package/dist/emblems/trophy/football.d.ts +2 -0
  293. package/dist/emblems/trophy/football.js +11 -0
  294. package/dist/emblems/trophy/globe.d.ts +2 -0
  295. package/dist/emblems/trophy/globe.js +9 -0
  296. package/dist/emblems/trophy/hockey-cup.d.ts +2 -0
  297. package/dist/emblems/trophy/hockey-cup.js +22 -0
  298. package/dist/emblems/trophy/laurel.d.ts +2 -0
  299. package/dist/emblems/trophy/laurel.js +40 -0
  300. package/dist/emblems/trophy/lidded-cup.d.ts +2 -0
  301. package/dist/emblems/trophy/lidded-cup.js +21 -0
  302. package/dist/emblems/trophy/plaque.d.ts +2 -0
  303. package/dist/emblems/trophy/plaque.js +17 -0
  304. package/dist/emblems/trophy/ring.d.ts +2 -0
  305. package/dist/emblems/trophy/ring.js +30 -0
  306. package/dist/emblems/trophy/rosette.d.ts +2 -0
  307. package/dist/emblems/trophy/rosette.js +27 -0
  308. package/dist/emblems/trophy/rugby-cup.d.ts +2 -0
  309. package/dist/emblems/trophy/rugby-cup.js +23 -0
  310. package/dist/emblems/trophy/salver.d.ts +2 -0
  311. package/dist/emblems/trophy/salver.js +9 -0
  312. package/dist/emblems/trophy/soccer-ball.d.ts +2 -0
  313. package/dist/emblems/trophy/soccer-ball.js +9 -0
  314. package/dist/emblems/trophy/soccer-globe.d.ts +2 -0
  315. package/dist/emblems/trophy/soccer-globe.js +18 -0
  316. package/dist/emblems/trophy/sumo-cup.d.ts +2 -0
  317. package/dist/emblems/trophy/sumo-cup.js +28 -0
  318. package/dist/emblems/trophy/tennis-cup.d.ts +2 -0
  319. package/dist/emblems/trophy/tennis-cup.js +24 -0
  320. package/dist/emblems/trophy/tennis-plate.d.ts +2 -0
  321. package/dist/emblems/trophy/tennis-plate.js +16 -0
  322. package/dist/emblems-entry.d.ts +20 -7
  323. package/dist/emblems-entry.js +8 -2
  324. package/dist/index.d.ts +131 -1
  325. package/dist/index.js +131 -3
  326. package/dist/turn-control.d.ts +101 -0
  327. package/dist/turn-control.js +363 -0
  328. package/dist/turn-entry.d.ts +2 -0
  329. package/dist/turn-entry.js +1 -0
  330. package/dist/version.d.ts +1 -1
  331. package/dist/version.js +1 -1
  332. package/package.json +33 -7
  333. package/LICENSES/Apache-2.0.txt +0 -55
  334. package/LICENSES/CC-BY-3.0.md +0 -15
  335. package/dist/emblems/ball/soccer.d.ts +0 -2
  336. package/dist/emblems/ball/soccer.js +0 -9
  337. package/dist/emblems/emblem.ball.d.ts +0 -28
  338. package/dist/emblems/emblem.ball.js +0 -70
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  <h1 align="center">Dougu Sports <sub>道具</sub></h1>
2
2
 
3
3
  <p align="center"><strong>Sports emblems as SVG strings, with optional 3D turning.</strong><br>
4
- Trophies, medals, crests, and the ball and gear of every sport, each one a function that returns SVG: in 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 ball takes one ball. MIT, with no dependencies.</p>
4
+ Trophies, medals, crests, the icon of every sport, and the ball and gear of the sports, 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>
5
5
 
6
6
  <p align="center">
7
7
  <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>
@@ -11,19 +11,19 @@ Trophies, medals, crests, and the ball and gear of every sport, each one a funct
11
11
  <img alt="TypeScript" src="https://img.shields.io/badge/types-TypeScript-3178c6">
12
12
  </p>
13
13
 
14
- <p align="center"><a href="https://johnmorrisdotca.github.io/dougu-sports/"><strong>Open the demo →</strong></a> · <a href="https://johnmorrisdotca.github.io/dougu-sports/gallery.html">Gallery</a> · <a href="./docs/gallery.md">Every id</a> · <a href="./docs/turning.md">Turning</a> · <a href="./docs/layout.md">Layout</a></p>
14
+ <p align="center"><a href="https://johnmorrisdotca.github.io/dougu-sports/"><strong>Open the demo →</strong></a> · <a href="https://johnmorrisdotca.github.io/dougu-sports/gallery.html">Gallery</a> · <a href="./docs/gallery.md">Every id</a> · <a href="./docs/turning.md">Turning</a> · <a href="./docs/layout.md">Layout</a> · <a href="./docs/japanese-sports.md">Japanese sports</a></p>
15
15
 
16
16
  <p align="center">
17
17
  <picture>
18
18
  <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/johnmorrisdotca/dougu-sports/main/docs/images/hero-desk-dark.png">
19
- <img alt="The package's two sample emblems, each in the three styles: a gold medal on a red ribbon, and a soccer ball, drawn in metal with gradients, as one outline, and in flat colour." src="https://raw.githubusercontent.com/johnmorrisdotca/dougu-sports/main/docs/images/hero-desk-light.png" width="760">
19
+ <img alt="Ten trophies drawn in metal, each a generic form that stands for a league's cup: a tall banded silver cup, a ring of gold pennants round a baseball, a football on a three-sided stand, a basketball over a net, a wide two-handled bowl on a tall base, a globe held up by spiral figures, a gilt dish, a lidded cup with a pineapple, a terracotta urn and a gilded lidded cup. Below them gold, silver and bronze medals, crests, a rosette, a wreath and a belt, and one cup in the three styles." src="https://raw.githubusercontent.com/johnmorrisdotca/dougu-sports/main/docs/images/hero-desk-light.png" width="760">
20
20
  </picture>
21
21
  </p>
22
22
 
23
23
  <table align="center">
24
24
  <tr>
25
25
  <td align="center" valign="top">
26
- <img alt="A soccer ball and a medal turned through five angles: the ball rolls, and the medal flips like a coin to show its plain back." src="https://raw.githubusercontent.com/johnmorrisdotca/dougu-sports/main/docs/images/turn-desk-light.png" width="470"><br><em>Turned: a ball rolls, a medal flips</em>
26
+ <img alt="A two-handled cup, a banded cup, a medal and a soccer ball each turned through five angles: the cups keep their outline and move their light and handles, the medal flips like a coin to show its plain back, and the ball rolls." src="https://raw.githubusercontent.com/johnmorrisdotca/dougu-sports/main/docs/images/turn-desk-light.png" width="470"><br><em>Turned: a ball rolls, a medal flips</em>
27
27
  </td>
28
28
  <td align="center" valign="top">
29
29
  <img alt="The same emblems on a phone, light." src="https://raw.githubusercontent.com/johnmorrisdotca/dougu-sports/main/docs/images/phone-light.png" width="200"><br><em>On a phone</em>
@@ -31,7 +31,7 @@ Trophies, medals, crests, and the ball and gear of every sport, each one a funct
31
31
  </tr>
32
32
  </table>
33
33
 
34
- > **Status: scaffold.** The package so far holds the machinery and two sample emblems, `award:medal` and `ball:soccer`, that stand in for the art. The trophies, medals, crests and the ball and gear of 33 sports arrive group by group ([docs/layout.md](./docs/layout.md) says where each goes), and the README's counts are read from the code, so they grow with it. Not on npm yet.
34
+ > **Status: preview.** 167 emblems: 24 trophies, 5 awards, 6 medals, 4 crests, a pictogram for each of the 38 sports, 47 balls and implements drawn in 3D, 42 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.
35
35
 
36
36
  ## In 30 seconds
37
37
 
@@ -42,10 +42,10 @@ npm install @johnmorrisdotca/dougu-sports
42
42
  ```js
43
43
  import { renderEmblem } from "@johnmorrisdotca/dougu-sports/emblems";
44
44
 
45
- const svg = renderEmblem("ball:soccer", { style: "color", size: 48 });
45
+ const svg = renderEmblem("trophy:hockey-cup", { size: 48 });
46
46
 
47
47
  console.log(svg.startsWith("<svg")); // true
48
- console.log(svg.includes("<title>Soccer ball</title>")); // true
48
+ console.log(svg.includes("<title>Banded silver cup</title>")); // true
49
49
  ```
50
50
 
51
51
  Put the string in a page (`element.innerHTML = svg`), write it to a file, or send it from a server: it is plain SVG, with no script, no font and no network. The outline takes the page's text colour, so an emblem follows light and dark mode as the text does.
@@ -55,15 +55,20 @@ Put the string in a page (`element.innerHTML = svg`), write it to a file, or sen
55
55
  - **Sports sites** that mark a champion, a result or a list with a trophy, a medal or a crest, without licensing a logo.
56
56
  - **Scoreboards and brackets** that want a generic emblem for a team that has no logo, tinted in the team's colour.
57
57
  - **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.
58
- - **Pages that care about weight**: one emblem is one module and about 2 kB gzipped, and the package says `"sideEffects": false`.
58
+ - **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`.
59
59
 
60
60
  ## Features
61
61
 
62
- - **Three styles** for every emblem: `metal` (full colour with gradients), `line` (one outline in the page's text colour) and `color` (flat fills); see [Theming](#theming).
63
- - **Size, tint and theme** as options: a tint recolours the main part (a medal's metal, a ball's patches), a theme sets the outline for light, dark or either.
64
- - **Turning**: `emblemFrame` and `ballFrame` return the emblem at an angle, in plain SVG; see [docs/turning.md](./docs/turning.md).
62
+ - **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).
63
+ - **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), an accent the second colour (a ribbon, a crest's band, the pennants), a theme sets the ink for light, dark or either.
64
+ - **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 (gear, a bat, a crown, a sport's icon) flips like a coin; `bindTurn` lets a drag, the arrow keys or an auto-turn do the turning in a page; see [docs/turning.md](./docs/turning.md).
65
+ - **Engraving**: text cut into a medal, a plaque, the belt, a ring, a banner, a pennant and the plinth of a cup, from `label`, `year` and `rank` or one `engrave` string, in the ink that reads at 4.5 to 1 on the metal, and it turns with the emblem; see [Engrave an emblem](#engrave-an-emblem).
66
+ - **Labels in two languages**: the `<title>` is English or Japanese (`locale`), your own words (`title: "…"`), or left out for an emblem that sits beside text that says the same (`title: false`).
67
+ - **As an image, a sprite, a podium or a case**: `emblemDataUri` for an `<img>`, a CSS background or a canvas, `emblemSprite` to draw one emblem fifty times cheaply, `sportEquipment` for what a sport is played with, and `podium` and `awardCase` for results and trophy shelves; see [docs/compose.md](./docs/compose.md).
65
68
  - **One module per item**, so a bundler takes only what is imported; see [Use it in your project](#use-it-in-your-project).
66
- - **Typed ids**: `EmblemId` is a union of `award:*`, `trophy:*`, `medal:*`, `crest:*`, `ball:*`, `gear:*` and `sport:*` ids.
69
+ - **Short names and helpers**: `"cup"` is `"trophy:cup"`, `"trophy:cup/line"` is the line style, and `crest`, `medal`, `sportIcon` and `pennant` draw a team's crest, a medal, a sport's icon and a championship pennant.
70
+ - **Typed ids**: `EmblemId` is a union of `award:*`, `trophy:*`, `medal:*`, `crest:*`, `ball:*`, `gear:*`, `sport:*` and `pennant:*` ids.
71
+ - **Japanese sports and budō** (道具 is the name): a sumo cup, a championship banner, and the war fan, belt, bamboo sword, kendo helmet, judo and karate suits, rank belts, long bow and arrow, with Japanese names that are the governing bodies' words; see [docs/japanese-sports.md](./docs/japanese-sports.md).
67
72
  - **Generic by design**: no emblem carries a league's, a team's or a federation's name or mark.
68
73
  - **Accessible**: every drawing is `role="img"` with a `<title>`; see [Accessibility](#accessibility).
69
74
  - **Deterministic**: the same id and options give the same string; a gradient's id comes from its colour.
@@ -73,12 +78,12 @@ Put the string in a page (`element.innerHTML = svg`), write it to a file, or sen
73
78
 
74
79
  <table>
75
80
  <tr>
76
- <td align="center" valign="top"><img alt="A gold medal on a red ribbon with a star on its face, in metal, line and color." src="https://raw.githubusercontent.com/johnmorrisdotca/dougu-sports/main/docs/images/hero-desk-light.png" width="360"><br><em><code>award:medal</code> and <code>ball:soccer</code>, each in three styles</em></td>
77
- <td align="center" valign="top"><img alt="A soccer ball and a medal turned through five angles." src="https://raw.githubusercontent.com/johnmorrisdotca/dougu-sports/main/docs/images/turn-desk-light.png" width="360"><br><em>Turned through five angles</em></td>
81
+ <td align="center" valign="top"><img alt="Ten trophies, medals and crests, and one cup in the three styles." src="https://raw.githubusercontent.com/johnmorrisdotca/dougu-sports/main/docs/images/hero-desk-light.png" width="360"><br><em>Trophies, medals and crests, and one cup in three styles</em></td>
82
+ <td align="center" valign="top"><img alt="Cups, a medal and a ball turned through five angles." src="https://raw.githubusercontent.com/johnmorrisdotca/dougu-sports/main/docs/images/turn-desk-light.png" width="360"><br><em>Turned through five angles</em></td>
78
83
  </tr>
79
84
  </table>
80
85
 
81
- The list of every emblem, with its names, kind, source and the import that takes it alone, is [docs/gallery.md](./docs/gallery.md), made from the built package.
86
+ Every emblem, with its id in both styles and a button that copies it, is on the [gallery page](https://johnmorrisdotca.github.io/dougu-sports/gallery.html); the same list as text, with its names, kind, source and the import that takes it alone, is [docs/gallery.md](./docs/gallery.md), made from the built package. [docs/emblems.md](./docs/emblems.md) says how the art is drawn.
82
87
 
83
88
  ## Use it in your project
84
89
 
@@ -110,21 +115,19 @@ The alias is a name in your `package.json` only: the same package, the same code
110
115
  | --- | --- |
111
116
  | `@johnmorrisdotca/dougu-sports` | The full registry: every emblem by id, the functions, and each emblem as a constant |
112
117
  | `@johnmorrisdotca/dougu-sports/emblems` | `renderEmblem`, the ids and the types, with no single drawing imported by name |
113
- | `@johnmorrisdotca/dougu-sports/turn` | `emblemFrame` and `ballFrame` |
114
- | `@johnmorrisdotca/dougu-sports/award/<name>` | One award, trophy, medal, crest or sport emblem, alone (`award/medal`) |
115
- | `@johnmorrisdotca/dougu-sports/ball/<name>` | One ball, alone (`ball/soccer`) |
116
- | `@johnmorrisdotca/dougu-sports/gear/<name>` | One piece of gear, alone |
118
+ | `@johnmorrisdotca/dougu-sports/turn` | `emblemFrame`, `ballFrame` and `bindTurn` |
119
+ | `@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>` |
117
120
 
118
121
  ### One emblem and nothing else
119
122
 
120
123
  ```js
121
- import { BALL_SOCCER } from "@johnmorrisdotca/dougu-sports/ball/soccer";
124
+ import { TROPHY_HOCKEY_CUP } from "@johnmorrisdotca/dougu-sports/trophy/hockey-cup";
122
125
 
123
- console.log(BALL_SOCCER.id); // ball:soccer
124
- console.log(BALL_SOCCER.svg({ size: 24 }).includes('width="24"')); // true
126
+ console.log(TROPHY_HOCKEY_CUP.id); // trophy:hockey-cup
127
+ console.log(TROPHY_HOCKEY_CUP.svg({ size: 24 }).includes('width="24"')); // true
125
128
  ```
126
129
 
127
- A bundler that imports this module takes the soccer ball and the small renderer for balls, and no other emblem: the package says `"sideEffects": false` and each constant is marked pure. `test/size.test.ts` bundles one item with esbuild and holds it under 3 kB gzipped; `pnpm test:package` does the same from the packed tarball.
130
+ A bundler that imports this module takes the cup and the renderer for a body of revolution, and no other emblem: the package says `"sideEffects": false` 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 6.8 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.
128
131
 
129
132
  ### In a page
130
133
 
@@ -132,7 +135,7 @@ A bundler that imports this module takes the soccer ball and the small renderer
132
135
  <span id="trophy"></span>
133
136
  <script type="module">
134
137
  import { renderEmblem } from "https://cdn.jsdelivr.net/npm/@johnmorrisdotca/dougu-sports@0/emblems";
135
- document.getElementById("trophy").innerHTML = renderEmblem("award:medal", { size: 40 });
138
+ document.getElementById("trophy").innerHTML = renderEmblem("trophy:hockey-cup", { size: 40 });
136
139
  </script>
137
140
  ```
138
141
 
@@ -142,7 +145,7 @@ A bundler that imports this module takes the soccer ball and the small renderer
142
145
  import { renderEmblem } from "@johnmorrisdotca/dougu-sports/emblems";
143
146
  import { writeFileSync } from "node:fs";
144
147
 
145
- writeFileSync("medal.svg", renderEmblem("award:medal", { size: 256, theme: "light" }));
148
+ writeFileSync("cup.svg", renderEmblem("trophy:hockey-cup", { size: 256, theme: "light" }));
146
149
  ```
147
150
 
148
151
  ## Examples
@@ -154,10 +157,14 @@ An id is `<group>:<name>`. `renderEmblem` takes an id, or an id with a style aft
154
157
  ```js
155
158
  import { renderEmblem } from "@johnmorrisdotca/dougu-sports/emblems";
156
159
 
157
- console.log(renderEmblem("award:medal/line") === renderEmblem("award:medal", { style: "line" })); // true
158
- console.log(renderEmblem("award:medal") === renderEmblem("award:medal", { style: "metal" })); // true
160
+ console.log(renderEmblem("medal:gold/line") === renderEmblem("medal:gold", { style: "line" })); // true
161
+ console.log(renderEmblem("medal:gold") === renderEmblem("medal:gold", { style: "metal" })); // true
162
+ console.log(renderEmblem("cup") === renderEmblem("trophy:cup")); // true
163
+ console.log(renderEmblem("gear:hurley").includes("<title>Hurley</title>")); // true
159
164
  ```
160
165
 
166
+ A trophy or an award can also be written without its group: `"cup"` is `"trophy:cup"` and `"crown"` is `"award:crown"` (`EMBLEM_ALIASES` lists them).
167
+
161
168
  ### Tint an emblem in a team's colour
162
169
 
163
170
  ```js
@@ -168,16 +175,40 @@ console.log(svg.includes('fill="#0b6e4f"')); // true
168
175
  console.log(renderEmblem("ball:soccer", { tint: "not a colour" }) === renderEmblem("ball:soccer")); // true
169
176
  ```
170
177
 
171
- A tint is `#rgb`, `#rrggbb` or `rgb(r, g, b)`; anything else is ignored, so a colour that comes from outside cannot reach the markup.
178
+ A tint is `#rgb`, `#rrggbb` or `rgb(r, g, b)`; anything else is ignored, so a colour that comes from outside cannot reach the markup. The `accent` option is a second colour in the same form: a medal's ribbon, a crest's band, a rosette's tails.
179
+
180
+ ### Draw a crest for a team with no logo
181
+
182
+ ```js
183
+ import { crest } from "@johnmorrisdotca/dougu-sports/emblems";
184
+
185
+ const svg = crest({ shape: "roundel", colors: ["#c8102e", "#f4f0e4"], initials: "no" });
186
+ console.log(svg.includes(">NO<")); // true
187
+ console.log(svg.includes("#c8102e") && svg.includes("#f4f0e4")); // true
188
+ ```
189
+
190
+ A crest takes the team's colour and a second colour, and up to three letters, in the ink that reads on the colour; with no letters it has a star. `medal("gold")` and `sportIcon("nhl")` are the same kind of shortcut.
191
+
192
+ ### Draw balls at their true sizes
193
+
194
+ ```js
195
+ import { emblemInfo, lineup } from "@johnmorrisdotca/dougu-sports/emblems";
196
+
197
+ console.log(emblemInfo("ball:golf").size.diameterMm); // 42.67
198
+ const svg = lineup(["ball:golf", "ball:tennis", "ball:soccer", "ball:puck"], { height: 80 });
199
+ console.log(svg.includes("<title>Balls at their true relative sizes")); // true
200
+ ```
201
+
202
+ Each ball carries the official size of the rulebook it is from (`emblemInfo(id).size`, with the rule), and `lineup` draws several side by side at the rules' relative sizes.
172
203
 
173
204
  ### Choose the outline for a theme
174
205
 
175
206
  ```js
176
207
  import { renderEmblem } from "@johnmorrisdotca/dougu-sports/emblems";
177
208
 
178
- console.log(renderEmblem("award:medal", { theme: "dark" }).includes('color="#eef1f3"')); // true
179
- console.log(renderEmblem("award:medal", { theme: "light" }).includes('color="#20262d"')); // true
180
- console.log(renderEmblem("award:medal").includes(" color=")); // false
209
+ console.log(renderEmblem("medal:gold", { theme: "dark" }).includes('color="#eef1f3"')); // true
210
+ console.log(renderEmblem("medal:gold", { theme: "light" }).includes('color="#20262d"')); // true
211
+ console.log(renderEmblem("medal:gold").includes(" color=")); // false
181
212
  ```
182
213
 
183
214
  ### Turn an emblem
@@ -186,19 +217,58 @@ console.log(renderEmblem("award:medal").includes(" color=")); // false
186
217
  import { ballFrame, emblemFrame } from "@johnmorrisdotca/dougu-sports/turn";
187
218
  import { renderEmblem } from "@johnmorrisdotca/dougu-sports/emblems";
188
219
 
189
- console.log(emblemFrame("award:medal", { yaw: 0 }) === renderEmblem("award:medal")); // true
220
+ console.log(emblemFrame("trophy:hockey-cup", { yaw: 0 }) === renderEmblem("trophy:hockey-cup")); // true
221
+ console.log(emblemFrame("trophy:tennis-cup", { yaw: 90 }) === renderEmblem("trophy:tennis-cup")); // false
190
222
  console.log(ballFrame("ball:soccer", { yaw: 90 }) === ballFrame("ball:soccer", { yaw: 450 })); // true
191
223
  ```
192
224
 
193
225
  More in [docs/turning.md](./docs/turning.md).
194
226
 
227
+ ### Engrave an emblem
228
+
229
+ ```js
230
+ import { renderEmblem } from "@johnmorrisdotca/dougu-sports/emblems";
231
+
232
+ const medal = renderEmblem("medal:gold", { engrave: "MVP 2026" });
233
+ console.log(medal.includes(">MVP<") && medal.includes(">2026<")); // true
234
+ const plaque = renderEmblem("trophy:plaque", { label: "Champions", year: 2026 });
235
+ console.log(plaque.includes(">Champions<") && plaque.includes(">2026<")); // true
236
+ const cup = renderEmblem("trophy:hockey-cup", { engrave: "優勝 2026" });
237
+ console.log(cup.includes(">優<")); // true
238
+ console.log(renderEmblem("medal:gold").includes("<text")); // false
239
+ ```
240
+
241
+ A medal, a place badge, the plaque, the belt, a ring (the team up one shoulder and the year down the other), a banner and a pennant take an engraving, and so does the plinth of every cup that stands on one. Give one string (`engrave`, any text, Japanese included, up to three lines of 24 letters), or a `label`, a `year` and a `rank`: the rank is the biggest line, the year the smallest. The text is escaped, fitted to its face (a longer word is set smaller, and a space is a place to break the line when that makes bigger letters) and cut in the ink that reads at 4.5 to 1 on the metal, a tone of the metal, black or white, in the line style the page's ink.
242
+
243
+ ```js
244
+ import { emblemFrame } from "@johnmorrisdotca/dougu-sports/turn";
245
+
246
+ const at = (yaw) => emblemFrame("medal:gold", { engrave: "MVP", engraveBack: "2026", yaw });
247
+ console.log(at(0).includes(">MVP<"), at(180).includes(">MVP<"), at(180).includes(">2026<")); // true false true
248
+ ```
249
+
250
+ Turned, the engraving goes with its face: squeezed with a medal, hidden on its back (which has an engraving of its own when `engraveBack` is given), and on a cup set letter by letter round the plinth, so it foreshortens, slides behind the edge and comes round again. A drawn numeral or star that an engraving replaces is left out.
251
+
252
+ ### Draw a championship pennant
253
+
254
+ ```js
255
+ import { pennant } from "@johnmorrisdotca/dougu-sports/emblems";
256
+
257
+ const svg = pennant({ colors: ["#1f4e8c", "#f2c230"], text: "Champions", year: 2026 });
258
+ console.log(svg.includes(">CHAMPIONS<") && svg.includes(">2026<")); // true
259
+ console.log(pennant({ text: "Champions", view: "back" }).includes("CHAMPIONS")); // false
260
+ ```
261
+
262
+ A long triangle of felt on a dowel with a stitched edge, lettered with its words and its year as large as the triangle lets them be. The colours are the felt, the stitching and the lettering (which takes the stitching's colour unless a third is given); the back is plain felt with the dowel on the other side.
263
+
195
264
  ### Read what an emblem is
196
265
 
197
266
  ```js
198
267
  import { emblemInfo, emblemName } from "@johnmorrisdotca/dougu-sports";
199
268
 
200
- console.log(emblemInfo("award:medal").kind); // flat
201
- console.log(emblemName("award:medal", "ja")); // メダル
269
+ console.log(emblemInfo("medal:gold").kind); // flat
270
+ console.log(emblemInfo("trophy:hockey-cup").kind); // lathe
271
+ console.log(emblemName("medal:gold", "ja")); // 金メダル
202
272
  ```
203
273
 
204
274
  ### List the emblems
@@ -206,9 +276,9 @@ console.log(emblemName("award:medal", "ja")); // メダル
206
276
  ```js
207
277
  import { EMBLEM_GROUPS, EMBLEM_IDS, SPORT_NAMES } from "@johnmorrisdotca/dougu-sports";
208
278
 
209
- console.log(Object.keys(EMBLEM_GROUPS).join(" ")); // award trophy medal crest ball gear sport
279
+ console.log(Object.keys(EMBLEM_GROUPS).join(" ")); // award trophy medal crest ball gear sport pennant
210
280
  console.log(EMBLEM_IDS.includes("ball:soccer")); // true
211
- console.log(SPORT_NAMES.length); // 33
281
+ console.log(SPORT_NAMES.length); // 38
212
282
  ```
213
283
 
214
284
  ### Check a string from outside
@@ -221,59 +291,147 @@ console.log(parseEmblem("ball:soccer/line")?.style); // line
221
291
  console.log(parseEmblem("ball:nonesuch")); // undefined
222
292
  ```
223
293
 
294
+ ### Write the title in Japanese, in your own words, or not at all
295
+
296
+ ```js
297
+ import { renderEmblem } from "@johnmorrisdotca/dougu-sports/emblems";
298
+
299
+ console.log(renderEmblem("medal:gold", { locale: "ja" }).includes("<title>金メダル</title>")); // true
300
+ console.log(renderEmblem("medal:gold", { title: "Champions <2026>" }).includes("<title>Champions &lt;2026&gt;</title>")); // true
301
+ console.log(renderEmblem("medal:gold", { title: false }).includes('aria-hidden="true"')); // true
302
+ ```
303
+
304
+ `locale` is `"en"` (the default) or `"ja"`. A `title` string is escaped and wins over the locale; `false` drops the `<title>` and marks the drawing `aria-hidden="true"`, for an emblem beside text that says the same.
305
+
306
+ ### Use an emblem as an image
307
+
308
+ ```js
309
+ import { emblemDataUri } from "@johnmorrisdotca/dougu-sports/emblems";
310
+
311
+ const src = emblemDataUri("sport:nhl", { size: 48, color: "#c8102e" });
312
+ console.log(src.startsWith("data:image/svg+xml;utf8,%3Csvg")); // true
313
+ console.log(decodeURIComponent(src).includes("currentColor")); // false
314
+ ```
315
+
316
+ `currentColor` does not cross an `<img>` boundary, so the ink is made a colour for you: `color` for the line, otherwise the theme's (`"dark"` is pale ink; `"light"` and the default are dark ink). Every character that could end an attribute or a CSS `url()` is percent-encoded, so the string goes in `img.src`, `background-image: url("…")` and `new Image()` for a canvas. More in [docs/compose.md](./docs/compose.md).
317
+
318
+ ### Draw one emblem many times
319
+
320
+ ```js
321
+ import { emblemSprite } from "@johnmorrisdotca/dougu-sports/emblems";
322
+
323
+ const sprite = emblemSprite(["ball:soccer", "medal:gold"]);
324
+ const cell = sprite.use("ball:soccer", { size: 24, title: false });
325
+ console.log(cell.startsWith('<svg width="24" height="24" aria-hidden="true"><use href="#')); // true
326
+ console.log(sprite.sheet.includes("<symbol")); // true
327
+ ```
328
+
329
+ Put `sprite.sheet` in the page once, then `sprite.use(id, { size, class, title })` for each cell. Sixty-four soccer balls are 2,304 nodes and 530 kB drawn inline and 228 nodes and 15 kB from a sheet; see [docs/compose.md](./docs/compose.md).
330
+
331
+ ### What a sport is played with
332
+
333
+ ```js
334
+ import { sportEquipment } from "@johnmorrisdotca/dougu-sports/emblems";
335
+
336
+ const nhl = sportEquipment("nhl");
337
+ console.log(nhl.ball, nhl.trophy); // ball:puck trophy:hockey-cup
338
+ console.log(nhl.gear.join(" ")); // gear:hockey-stick gear:hockey-skate gear:goalie-mask gear:goal-net
339
+ ```
340
+
341
+ 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.
342
+
343
+ ### A podium and an award case
344
+
345
+ ```js
346
+ import { awardCase, podium } from "@johnmorrisdotca/dougu-sports/emblems";
347
+
348
+ const svg = podium([{ name: "Aoki", label: "9.80 s" }, { name: "Dupont" }, { name: "Rossi" }]);
349
+ console.log(svg.includes("<desc>1st: Aoki (9.80 s); 2nd: Dupont; 3rd: Rossi</desc>")); // true
350
+ const shelf = awardCase([{ emblem: "trophy:hockey-cup", count: 3 }, { emblem: "medal:gold" }]);
351
+ console.log(shelf.includes("×3")); // true
352
+ ```
353
+
354
+ Both are one SVG string in the page's text colour, with a title and a description. A podium takes a flag as SVG markup or a URL, drawn as an image so that it cannot run anything; see [docs/compose.md](./docs/compose.md).
355
+
356
+ ### Let a drag, the keys or a clock turn it
357
+
358
+ ```js no-run
359
+ import { bindTurn } from "@johnmorrisdotca/dougu-sports/turn";
360
+
361
+ const turner = bindTurn(document.getElementById("cup"), "trophy:tennis-cup", { size: 160, speed: 36 });
362
+ document.getElementById("spin").onclick = () => turner.togglePlay();
363
+ ```
364
+
365
+ A drag turns it, the arrow keys turn it, Space starts and stops an auto-turn, and nothing moves until you ask; see [docs/turning.md](./docs/turning.md).
366
+
224
367
  ### In React, Vue and the rest
225
368
 
226
- The functions return strings, so a framework puts them where it puts any markup: `dangerouslySetInnerHTML={{ __html: renderEmblem("award:medal") }}` in React, `v-html` in Vue, `{@html …}` in Svelte. The string holds no script and no external reference.
369
+ The functions return strings, so a framework puts them where it puts any markup: `dangerouslySetInnerHTML={{ __html: renderEmblem("medal:gold") }}` in React, `v-html` in Vue, `{@html …}` in Svelte. The string holds no script and no external reference.
227
370
 
228
371
  ```ts no-check
229
- const Medal = () => <span dangerouslySetInnerHTML={{ __html: renderEmblem("award:medal", { size: 32 }) }} />;
372
+ const Cup = () => <span dangerouslySetInnerHTML={{ __html: renderEmblem("trophy:hockey-cup", { size: 32 }) }} />;
230
373
  ```
231
374
 
232
375
  ## The emblems
233
376
 
234
- An emblem is a small object: `id`, `en` and `ja` names, a `source` (who drew it), a `kind`, the `model` it is drawn from, and two functions, `svg(options)` and `frame(options)`.
377
+ An emblem is a small object: `id`, `en` and `ja` names, a `source` (who drew it), a `kind`, the `model` it is drawn from, and two functions, `svg(options)` and `frame(options)`. A ball or an implement also has a `size`, its official dimensions and the rule they are from.
235
378
 
236
379
  | Kind | What it is | A turn |
237
380
  | --- | --- | --- |
238
- | `flat` | A front and a back drawn from paths: a medal, a plaque, a rosette | Flips like a coin |
239
- | `ball` | Marks on a sphere: a ball | Rolls |
240
- | `lathe` | A body of revolution: a cup, a bowl, an urn | Keeps its outline, moves its light |
241
- | `icon` | One path | Is not turned |
242
-
243
- Only `flat` and `ball` exist so far; the others are named here because the art that is coming needs them.
381
+ | `lathe` | A body of revolution: a cup, a bowl, an urn, a column with a ball or a globe on it, a stand with flat faces | Keeps its outline, and moves its light, its handles, its seams and its grooves |
382
+ | `flat` | A front and a back drawn from shapes: a medal, a crest, a plaque, a rosette, a ring, a banner, a pennant | Flips like a coin, thick at the rim as it goes edge on |
383
+ | `ball` | A ball or an implement drawn in true 3D, with its panels, seams and marks on the surface | Rolls |
384
+ | `icon` | One drawing: an award, a plain cup or a sport's pictogram | Flips like a coin: its front, its back mirrored and a little darker, and a thin rim |
385
+ | `gear` | A piece of equipment, a flat drawing in layers | Flips like a coin, as an icon does |
244
386
 
245
387
  ### The groups
246
388
 
247
389
  | Group | What it holds | Folder |
248
390
  | --- | --- | --- |
249
- | `award` | Awards: a medal on a ribbon, a crown, a star, a badge | `src/emblems/award/` |
250
- | `trophy` | Cups, bowls, plaques, belts, wreaths | `src/emblems/award/` |
251
- | `medal` | Gold, silver and bronze, and the places | `src/emblems/award/` |
252
- | `crest` | Generic crests, tinted by a team's colour | `src/emblems/award/` |
253
- | `ball` | The ball of each sport | `src/emblems/ball/` |
254
- | `gear` | The gear of each sport: a stick, a racket, a helmet | `src/emblems/gear/` |
255
- | `sport` | An icon for the sport itself | `src/emblems/award/` |
391
+ | `award` | Five awards: a medal, a badge, a crown, a star, a shield | `src/emblems/award/` |
392
+ | `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/` |
393
+ | `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/` |
394
+ | `crest` | Four generic crests, tinted by a team's colours, with its letters | `src/emblems/crest/` |
395
+ | `ball` | 47 balls and implements, in 3D, each with its official size: soccer, basketball, baseball, tennis, rugby, the footballs, golf, the puck, the curling stone and the rest | `src/emblems/ball/` |
396
+ | `gear` | 42 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, a judo suit, a belt, a long bow, an arrow and a karate suit | `src/emblems/gear/` |
397
+ | `sport` | One pictogram for each of the thirty-eight sports | `src/emblems/sport/` |
398
+ | `pennant` | A felt championship pennant on a dowel, with a stitched edge, lettered with its words and its year | `src/emblems/pennant/` |
256
399
 
257
- The thirty-three sports the ball, gear and sport emblems are made for are `SPORT_NAMES`: 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.
400
+ The thirty-eight 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): 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).
258
401
 
259
402
  ## API
260
403
 
261
404
  | Function or value | What it does |
262
405
  | --- | --- |
263
- | `renderEmblem(ref, options?)` | An emblem as SVG. `ref` is an id, an id with a style (`"award:medal/line"`), or an emblem |
406
+ | `renderEmblem(ref, options?)` | An emblem as SVG. `ref` is an id, an id with a style (`"medal:gold/line"`), or an emblem |
264
407
  | `emblemSvg` | The same as `renderEmblem` |
265
- | `emblemFrame(ref, options?)` | An emblem turned by `yaw` and `pitch` degrees |
408
+ | `crest(options?)` | A crest by shape, colours and letters |
409
+ | `pennant(options?)` | A championship pennant by colours, words and year |
410
+ | `medal(kind, options?)` | A gold, silver or bronze medal on its ribbon |
411
+ | `sportIcon(sport, options?)` | The pictogram of a sport, by the names of `SPORT_NAMES`; an unknown sport is an error |
412
+ | `lineup(ids, options?)` | Several balls side by side, at their true relative sizes (or all as large as the largest) |
413
+ | `emblemFrame(ref, options?)` | An emblem turned by `yaw` and `pitch` degrees (and `roll` for a ball) |
414
+ | `bindTurn(element, ref, options?)` | Draws an emblem into an element and lets a drag, the arrow keys, Space or a clock turn it; returns a controller with `angles`, `playing`, `turnable`, `setAngles`, `update`, `play`, `pause`, `togglePlay` and `destroy` |
415
+ | `emblemDataUri(ref, options?)` | An emblem as a `data:image/svg+xml;utf8,…` address for an `<img>`, a CSS background or a canvas, with the ink made a colour (`color`, or the theme's) |
416
+ | `emblemSprite(ids, options?)` | A hidden sheet of `<symbol>`s with unique ids, and `use(id, { size, class, title })` for the markup of each use |
417
+ | `sportEquipment(sport)` | The ball, gear, trophy and medal of a sport, as ids of the registry |
418
+ | `podium(places, options?)` | First, second and third on tiered steps, with medals or trophies, names, flags and lines of text, as one SVG |
419
+ | `awardCase(items, options?)` | A team's trophies on a shelf or in a row, with `×N` count badges, wrapping into rows, as one SVG |
266
420
  | `ballFrame(id, options?)` | A ball rolled; an id that is not a ball is an error |
267
421
  | `parseEmblem(value)` | The id and style a string names, or `undefined` |
268
422
  | `isEmblemId(value)`, `isBallId(value)` | Whether a value is the id of an emblem, or of a ball |
269
423
  | `emblemOf(ref)` | The emblem object a reference names |
270
- | `emblemInfo(id)`, `emblemName(id, language?)`, `emblemModel(id)` | What an emblem is: its names, kind and source, and the data it is drawn from |
424
+ | `emblemInfo(id)`, `emblemName(id, language?)`, `emblemModel(id)` | What an emblem is: its short names (which are its accessible names), kind and source, a longer `description` where it has one, and the data it is drawn from |
271
425
  | `EMBLEMS` | Every emblem as markup in the metal style at 64 pixels, by id |
272
426
  | `EMBLEM_TABLE` | Every emblem object, by id |
273
- | `AWARD_MEDAL`, `BALL_SOCCER` | The two emblems so far, as constants |
274
- | `EMBLEM_IDS`, `EMBLEM_GROUPS`, `EMBLEM_FOLDERS` | Every id, the groups, and the folder of each group's art |
275
- | `AWARD_IDS`, `TROPHY_IDS`, `MEDAL_IDS`, `CREST_IDS`, `BALL_IDS`, `GEAR_IDS`, `SPORT_IDS` | The ids of each group |
276
- | `SPORT_NAMES` | The thirty-three sports |
427
+ | `TROPHY_HOCKEY_CUP`, `MEDAL_GOLD`, `CREST_SHIELD`, `SPORT_NHL`, `BALL_SOCCER`, `GEAR_HURLEY`... | Each emblem as a constant, named by its id in capitals (`trophy:hockey-cup`); [docs/gallery.md](./docs/gallery.md) lists every constant with its id and the module that takes it alone |
428
+ | `EMBLEM_IDS`, `EMBLEM_GROUPS`, `EMBLEM_FOLDERS`, `EMBLEM_ALIASES` | Every id, the groups, the folder of each group's art, and the short names (`cup` for `trophy:cup`) |
429
+ | `AWARD_IDS`, `TROPHY_IDS`, `MEDAL_IDS`, `CREST_IDS`, `BALL_IDS`, `GEAR_IDS`, `SPORT_IDS`, `PENNANT_IDS` | The ids of each group |
430
+ | `MEDAL_KINDS`, `CREST_SHAPES` | The kinds of medal, and the shapes of crest |
431
+ | `SPORT_NAMES` | The thirty-eight sports |
432
+ | `JAPANESE_IDS` | The ids of the Japanese sports and budo, together: sumo, kendo, judo, kyudo and karate, with their trophies and gear ([docs/japanese-sports.md](./docs/japanese-sports.md)) |
433
+ | `OBI_RANKS`, `obi(rank, options?)` | The colours of a belt from `white` to `black`, and the belt of a rank drawn |
434
+ | `EMBLEM_DESCRIPTIONS` | The longer description of an emblem, in English and Japanese; `emblemInfo(id).description` is the one of an id |
277
435
  | `EMBLEM_STYLES`, `EMBLEM_INK`, `EMBLEM_PAGE`, `METALS` | The styles, the ink and page colours the themes use, and the metals |
278
436
  | `VERSION` | The package's version |
279
437
 
@@ -284,38 +442,53 @@ The thirty-three sports the ball, gear and sport emblems are made for are `SPORT
284
442
  | `style` | `"metal"`, `"line"`, `"color"` | `"metal"` |
285
443
  | `size` | A number of pixels, 4096 at most | `64` |
286
444
  | `tint` | `#rgb`, `#rrggbb` or `rgb(r, g, b)` | the emblem's own colour |
445
+ | `accent` | `#rgb`, `#rrggbb` or `rgb(r, g, b)` | the emblem's second colour (a ribbon, a band, pennants) |
446
+ | `initials` | Up to three letters (a crest, or the championship banner) | none: the crest has a star, the banner a ring and a star |
287
447
  | `theme` | `"inherit"`, `"auto"`, `"light"`, `"dark"` | `"inherit"` |
288
- | `yaw`, `pitch` (turning only) | Degrees from the resting view | `0` |
448
+ | `grain` | `true` or `false` (a ball only) | on for a ball of 48 pixels or more that is not turning |
449
+ | `engrave` | Any text, up to three lines of 24 letters, Japanese included: cut into the face (see [Engrave an emblem](#engrave-an-emblem)) | none |
450
+ | `label`, `year`, `rank` | The words, the year (smaller, under them) and the number (the biggest line) to engrave when `engrave` is not given | none (a place badge's rank is its place) |
451
+ | `engraveBack` | The text of a medal's, ring's or banner's back, shown when it is turned over | a plain back |
452
+ | `numberColor` | The colour of a pennant's lettering | the stitching's colour |
453
+ | `view` | `"front"` or `"back"`: which side of a pennant is drawn at rest | `"front"` |
454
+ | `locale` | `"en"`, `"ja"`: the language of the `<title>` | `"en"` |
455
+ | `title` | A string (written, escaped, as the `<title>`) or `false` (no `<title>`, and `aria-hidden="true"`) | the emblem's name |
456
+ | `yaw`, `pitch`, `roll` (turning only; `roll` for a ball) | Degrees from the resting view | `0` |
457
+
458
+ `podium` and `awardCase` take their own options too (`width`, `style`, `theme`, `locale`, `title`, `desc`, and for the case `perRow`, `size` and `layout`), and `emblemDataUri`, `emblemSprite` and `bindTurn` theirs: see [docs/compose.md](./docs/compose.md) and [docs/turning.md](./docs/turning.md).
289
459
 
290
- The types are `EmblemId`, `EmblemRef`, `EmblemOptions`, `FrameOptions`, `EmblemStyle`, `EmblemTheme`, `Emblem`, `EmblemInfo`, `EmblemKind`, `EmblemSource`, `EmblemGroup`, `SportName`, and the id types of each group.
460
+ The types are `EmblemId`, `EmblemRef`, `EmblemOptions`, `EmblemLocale`, `FrameOptions`, `DataUriOptions`, `Sprite`, `SpriteOptions`, `UseOptions`, `SportEquipment`, `PodiumPlace`, `PodiumOptions`, `AwardItem`, `AwardCaseOptions`, `DisplayOptions`, `TurnControlOptions`, `TurnController`, `TurnAngles`, `TurnContainer`, `TurnEvent`, `EmblemStyle`, `EmblemTheme`, `Emblem`, `EmblemInfo`, `EmblemKind`, `EmblemSource`, `EmblemGroup`, `CrestOptions`, `CrestShape`, `PennantOptions`, `PennantId`, `MedalKind`, `LineupOptions`, `PieceSize`, `EmblemDescription`, `ObiRank`, `SportName`, the id types of each group (and `JapaneseId`), and the types of the models the emblems are drawn from (`LatheModel`, `FlatModel` and their parts).
291
461
 
292
462
  ## Theming
293
463
 
294
- Every emblem is drawn with its outline in `currentColor`, so it takes the colour of the text around it. The `theme` option changes that when the SVG is used where it cannot inherit (an `<img>`, a data address):
464
+ In the `metal` and `color` styles a trophy, a medal or a crest is edged by a darker tone of its own metal, so it needs nothing from the page and looks the same on a light page and on a dark one. In the `line` style (and in a pictogram, which is a drawing in ink) the drawing is `currentColor`, so it takes the colour of the text around it. The `theme` option changes that when the SVG is used where it cannot inherit (an `<img>`, a data address):
295
465
 
296
- | `theme` | The outline |
466
+ | `theme` | The ink |
297
467
  | --- | --- |
298
468
  | `inherit` | The page's text colour (`currentColor`): the default for markup put in a page |
299
469
  | `auto` | Dark ink on a light device and pale ink on a dark one, by `prefers-color-scheme` |
300
470
  | `light` | `#20262d`, made to read on `#ffffff` |
301
471
  | `dark` | `#eef1f3`, made to read on `#14181c` |
302
472
 
303
- The metals are `METALS` (gold `#d9a620`, silver `#aeb6c0`, bronze `#b8733a`). The `line` style has no fill, so it takes only the outline's colour.
473
+ The metals are `METALS` (gold `#d9a620`, silver `#aeb6c0`, bronze `#b8733a`); each is shaded with a dark edge, a bright band, the metal, a darker side and a faint light from the rim, which holds on both pages. The `line` style has no fill, so it takes only the ink. For a ball and a piece of gear, `color` is the same shaded drawing as `metal`.
304
474
 
305
475
  ## Limits
306
476
 
307
- - Two sample emblems exist so far; the rest of the art is on its way (see the status note above).
308
- - A turn is drawn in plain SVG, not in 3D: a flat emblem is squeezed, and a ball's patches are projected points, not a lit mesh. A patch round a ball's edge is flattened against it rather than clipped to the sphere.
309
- - A tint is one colour. A second colour (a ribbon, a crest's band) is not an option yet.
477
+ - 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.
478
+ - A tint is one colour, the main one, and an accent a second. 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.
479
+ - 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.
480
+ - 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.
310
481
  - The size is a number of pixels up to 4096; the drawing is a vector at any size.
311
482
  - No emblem carries a real league's, team's or federation's mark.
312
483
 
313
484
  ## Accessibility
314
485
 
315
- - Every emblem is `role="img"` with a `<title>` that names it in English ("Medal", "Soccer ball"). `emblemName(id, "ja")` gives the Japanese name for a caller that writes its own label.
316
- - Where an emblem is only decoration next to text that says the same, hide it from a screen reader with `aria-hidden="true"` on the element that holds it.
486
+ - Every emblem is `role="img"` with a `<title>` that names it in English ("Gold medal", "Soccer ball"). `emblemName(id, "ja")` gives the Japanese name for a caller that writes its own label.
487
+ - Where an emblem is only decoration next to text that says the same, pass `title: false`: the drawing has no `<title>` and is `aria-hidden="true"`. `locale: "ja"` writes the Japanese name, with `lang="ja"` on the drawing.
488
+ - A podium and an award case are `role="img"` with a `<title>` and a `<desc>` that says who stands where, or what is in the case, with the counts; the emblems inside carry no titles of their own, so nothing is read twice.
489
+ - `bindTurn` gives its element a tab stop, a role description and a description that names the arrow keys and Space, and `touch-action: none` so that a drag turns the emblem instead of scrolling. Nothing turns until the reader asks, and under `prefers-reduced-motion` an auto-turn only starts when the caller forces it.
317
490
  - Colour is never the only carrier of meaning: the `line` style has no colour at all.
318
- - The outline reads at 4.5 to 1 against the page the `light` and `dark` themes name; the tests hold the pair.
491
+ - The ink reads at 4.5 to 1 against the page the `light` and `dark` themes name, and a crest's letters read at 4.5 to 1 on the crest's colour, whatever the colour; the tests hold both.
319
492
  - Nothing moves by itself: turning happens when the caller asks for a frame, and the demo's sliders are 44 pixels tall.
320
493
 
321
494
  ## Browser and runtime support
@@ -324,18 +497,16 @@ Any current browser, and Node 22 or later. The package is plain strings, so it a
324
497
 
325
498
  ## Languages
326
499
 
327
- The package's own words are the emblems' names, in English (`en`) and Japanese (`ja`), read with `emblemName(id, language)`. The `<title>` inside a drawing is English. The demo's header and footer come in English and Japanese.
500
+ The package's own words are the emblems' names, in English (`en`) and Japanese (`ja`), read with `emblemName(id, language)`. The `<title>` inside a drawing is English unless you pass `locale: "ja"` or a `title` of your own; a podium's and an award case's default title and description, and `bindTurn`'s description for a screen reader, come in both languages the same way. The demo's header and footer come in English and Japanese.
328
501
 
329
502
  ## Roadmap
330
503
 
331
- - The art: trophies, medals, crests, then the ball and the gear of each of the 33 sports, group by group.
332
- - Bodies of revolution (`lathe`), so a cup turns with its outline kept.
333
- - A second colour as an option.
504
+ - Native review of the Japanese names, and more pictograms and gear where a sport has none yet.
334
505
  - Deliberately not: logos of real leagues and teams, a canvas or WebGL renderer, and a runtime dependency.
335
506
 
336
507
  ## Architecture
337
508
 
338
- The code is `src/emblems/`: the core (options, colours, the wrapper), the id lists, the registry, the two renderers (flat and ball) and one module per emblem; [docs/layout.md](./docs/layout.md) has the folders and how to add one. The package has no state and no clock: every function is a pure function of its arguments.
509
+ The code is `src/emblems/`: the core (options, colours, gradients, the wrapper), the id lists, the registry, the renderers (the body of revolution, the flat object and icon, and the ball and gear engines) and one module per emblem, or per family of balls and gear, in a folder for its group; [docs/layout.md](./docs/layout.md) has the folders and how to add one. The package has no state and no clock: every function is a pure function of its arguments.
339
510
 
340
511
  ## The name
341
512
 
@@ -343,11 +514,11 @@ Dougu (道具, *dōgu*, どうぐ) is Japanese for a tool or a piece of equipmen
343
514
 
344
515
  ## Where it comes from, and where it is used
345
516
 
346
- The emblems are drawn for this package or made from the open sources listed in [NOTICE.md](./NOTICE.md), each with its licence in [LICENSES/](./LICENSES/). It is made for [spxn.com](https://spxn.com), the historical record of the NHL, NBA, MLB, NFL and CFL, and for the other packages of the family that draw sport.
517
+ Every emblem is drawn for this package, and nothing is copied from another project: no icon set, no emoji and no clip art ([NOTICE.md](./NOTICE.md) says so, and keeps the rulebooks the balls' sizes were read from, listed in [docs/references.md](./docs/references.md)). It is made for [spxn.com](https://spxn.com), the historical record of the NHL, NBA, MLB, NFL and CFL, and for the other packages of the family that draw sport.
347
518
 
348
519
  ### Used by
349
520
 
350
- [Kyogijo Stadiums](https://github.com/johnmorrisdotca/kyogijo-stadiums) draws the same kind of emblems today, inside itself; they move here, and Kyogijo then imports them.
521
+ [Kyogijo Stadiums](https://github.com/johnmorrisdotca/kyogijo-stadiums) drew the same kind of emblems inside itself; they moved here, redrawn, and Kyogijo then imports them.
351
522
 
352
523
  ### The family
353
524
 
@@ -381,7 +552,7 @@ Dougu Sports is one of twenty-seven packages, each made for the same site, each
381
552
  - [Houseki](https://github.com/johnmorrisdotca/houseki) (宝石): gem and stone matching puzzles: falling triplets, stone collapse, colour chains and gem swap. [Demo](https://johnmorrisdotca.github.io/houseki/).
382
553
  - [Kyogijo Stadiums](https://github.com/johnmorrisdotca/kyogijo-stadiums) (競技場): sports fields, rinks, courts and ballparks drawn to scale as SVG, with each team and the score on them. [Demo](https://johnmorrisdotca.github.io/kyogijo-stadiums/).
383
554
  - [Taisen Brackets](https://github.com/johnmorrisdotca/taisen-brackets) (対戦): a sport-agnostic tournament bracket, drawn as SVG, from a list of ties. [Demo](https://johnmorrisdotca.github.io/taisen-brackets/).
384
- - [Dougu Sports](https://github.com/johnmorrisdotca/dougu-sports) (道具): sports emblems as SVG: trophies, medals, crests, and the ball and gear of every sport, with optional 3D turning. [Demo](https://johnmorrisdotca.github.io/dougu-sports/). Not on npm yet.
555
+ - [Dougu Sports](https://github.com/johnmorrisdotca/dougu-sports) (道具): sports emblems as SVG: trophies, medals, crests, and the ball and gear of every sport, with optional 3D turning. [Demo](https://johnmorrisdotca.github.io/dougu-sports/).
385
556
 
386
557
  **This package is Dougu Sports.** The demos of all twenty-seven share one header and footer, so each links the rest.
387
558
  <!-- family:end -->
@@ -405,7 +576,7 @@ Bug reports and ideas go in the [issues](https://github.com/johnmorrisdotca/doug
405
576
 
406
577
  ## Changes
407
578
 
408
- See [CHANGELOG.md](./CHANGELOG.md). 0.0.1 is the first preview: the name, the API and two sample emblems; the full set follows.
579
+ See [CHANGELOG.md](./CHANGELOG.md). 0.2.0 is 167 emblems, every one drawn here, with the Japanese sports, engraving, a turn for every emblem and the compose helpers; 0.1.0 brought the first full set of 148; 0.0.1 was the first preview.
409
580
 
410
581
  ## Credits
411
582
 
@@ -0,0 +1,2 @@
1
+ /** Badge with a star. */
2
+ export declare const AWARD_BADGE: import("../emblem.core.ts").Emblem<import("../emblem.shapes.ts").FlatModel>;