@johnmorrisdotca/dougu-sports 0.5.1 → 0.6.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.
- package/CHANGELOG.md +33 -0
- package/NOTICE.md +1 -0
- package/README.md +16 -8
- package/dist/emblems/ball/ball.core.d.ts +14 -0
- package/dist/emblems/emblem.core.d.ts +3 -0
- package/dist/emblems/emblem.descriptions.js +6 -4
- package/dist/emblems/emblem.ids.d.ts +3 -3
- package/dist/emblems/emblem.ids.js +2 -2
- package/dist/emblems/gear/gear.budo.d.ts +11 -0
- package/dist/emblems/gear/gear.budo.js +146 -14
- package/dist/emblems/gear/gear.index.js +2 -2
- package/dist/emblems/sport/judo.js +3 -3
- package/dist/emblems/sport/karate.js +2 -2
- package/dist/emblems-entry.d.ts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,39 @@ All notable changes to this project are written here. The format follows
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.6.0] - 2026-10-14
|
|
10
|
+
|
|
11
|
+
A judogi has no short sleeves, and every judoka at an IJF event wears an official back number: the judo and karate drawings get their sleeves, and the judogi is drawn from behind with the back number sewn on. 263 emblems.
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
|
|
15
|
+
- **`sport:judo` drew elbow-length sleeves, and the flat `gear:judogi` sleeves stopped short of the hip.** The IJF's rule (C1.10) is that the sleeves cover the wrist bone completely, with room for the forearm all the way. The pictogram and the suit now hang their sleeves out and down to the hip, where the wrist is with the arms down, with a loose cuff and a stitched cuff hem, at every size (`sport:judo` still reads at 16 pixels). `test/judo.test.ts` measures it from the drawn paths: the cuff is at the hem or below, the outer edge as long as the jacket, the cuff at least a fifth as wide as the jacket is long.
|
|
16
|
+
- **`sport:karate` and `gear:karate-gi` drew elbow-length sleeves.** The WKF's rule (2.2.1 j) is half the forearm at least and the bend of the wrist at most, so they are now three-quarter length (longer than the elbow, a little shorter than a judogi's), with a wide cuff.
|
|
17
|
+
|
|
18
|
+
### Added
|
|
19
|
+
|
|
20
|
+
- **`gear:judogi-back` and `gear:judogi-blue-back`**: the white and the blue judogi laid flat and seen from behind, with the back number sewn on (large size, 38 by 39 cm, its top 3 cm under the collar): a white patch with the family name in white capitals on a band across the top, the three-letter country code under it, the rest blank for the sponsor, and a stitched edge. The belt is crossed behind the waist. They turn like the other suits.
|
|
21
|
+
- **The `backnumber` option**, `{ name, code, band }`, taken by `renderEmblem` and `emblemFrame` for the two back views (the type is `Backnumber`): the family name (capitals, 16 characters, accents are the plain letter), the country code (three letters) and the band (`blue`, `gold` for an Olympic champion, `red` for a world champion).
|
|
22
|
+
- The page [docs/judogi-back.md](docs/judogi-back.md) (and [in Japanese](docs/judogi-back.ja.md)), and the sources and what could not be confirmed in [docs/references.md](docs/references.md#the-ijf-back-number). No flag is drawn (the IJF's patch has none), and no logo of the IJF, of its supplier or of a sponsor.
|
|
23
|
+
|
|
24
|
+
### Changed
|
|
25
|
+
|
|
26
|
+
- The pictures of the gear and of the judo suits are redrawn, with a new picture of the suits from the front and the back (`judogi-light.webp`, `judogi-dark.webp`).
|
|
27
|
+
|
|
28
|
+
## [0.5.2] - 2026-10-14
|
|
29
|
+
|
|
30
|
+
The README's pictures are redone, because npm shows only the README that was published: every picture now stands on one of the family's shared backgrounds, and the demo can put one behind an emblem.
|
|
31
|
+
|
|
32
|
+
### Changed
|
|
33
|
+
|
|
34
|
+
- **Every README picture stands on a background** from the family's shared set (`scripts/family-backgrounds.ts`, version 1.0.0, copied byte for byte from taisen-brackets and held to its sha256 by `test/family-backgrounds.test.ts`): the balls under floodlights, the cups, medals and crests on royal purple, the gear on carbon fibre (dark) or a hardwood floor (light), the vintage balls on a warm sunburst, the printed pucks on the ice, the phone sheet on a glow and the turned emblems on a dark royal, each in a light and a dark twin where the README uses both. Labels take the ink the background returns, and every grid is full and runs edge to edge. The pictures stay webp (2.4 MB in all).
|
|
35
|
+
- The balls picture shows the 36 balls and pucks of the sports on four full rows; the vintage, baseball and era-style balls have a picture of their own (`vintage-desk-light.webp`, `vintage-desk-dark.webp`), the pucks have a dark twin (`pucks-dark.webp`), and the turned emblems are `turn-desk.webp` (it was `turn-desk-light.webp`).
|
|
36
|
+
- `pnpm screenshots` makes every picture, on port 7210 or `TEST_PORT`.
|
|
37
|
+
|
|
38
|
+
### Added
|
|
39
|
+
|
|
40
|
+
- **A background choice in the demo's preview**, off by default (`?background=ice`): one of the twenty-five, in the variant of the look, behind the stage, with the stage's text in the ink it returns. It is presentation only: the emblem the package draws is the same string with or without it, and the module is loaded only when a background is chosen. The package has no new code and still no dependency.
|
|
41
|
+
|
|
9
42
|
## [0.5.1] - 2026-10-14
|
|
10
43
|
|
|
11
44
|
The judo suit, the belt and the football pictograms were wrong, and are redrawn from the rules: the judogi is a real jacket and trousers (white or blue, flat and folded), the belt is tied in the flat square knot, and there is a belt for every grade. 261 emblems.
|
package/NOTICE.md
CHANGED
|
@@ -10,6 +10,7 @@ No emblem carries the name, mark or logo of a league, a team, a federation or an
|
|
|
10
10
|
- 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.
|
|
11
11
|
- 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.
|
|
12
12
|
- 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.
|
|
13
|
+
- 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.
|
|
13
14
|
- 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.
|
|
14
15
|
|
|
15
16
|
## The balls' sizes
|
package/README.md
CHANGED
|
@@ -16,7 +16,14 @@ The ball and the gear of every sport, trophies, medals, crests and the icon of e
|
|
|
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/balls-desk-dark.webp">
|
|
19
|
-
<img alt="
|
|
19
|
+
<img alt="Thirty-six balls and pucks drawn in 3D under floodlights, in four rows of nine: soccer balls of several constructions and colours, then basketball, the 3x3 ball, baseball, softball, a football, a rugby ball, an Australian football and two volleyballs, then tennis, padel, pickleball with its holes, squash with its two dots, racquetball, golf, red and pink cricket and water polo, and last sepak takraw, a shuttlecock, a puck, a curling stone, lacrosse, handball, table tennis, a sliotar and a roundnet ball." src="https://raw.githubusercontent.com/johnmorrisdotca/dougu-sports/main/docs/images/balls-desk-light.webp" width="760">
|
|
20
|
+
</picture>
|
|
21
|
+
</p>
|
|
22
|
+
|
|
23
|
+
<p align="center">
|
|
24
|
+
<picture>
|
|
25
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/johnmorrisdotca/dougu-sports/main/docs/images/vintage-desk-dark.webp">
|
|
26
|
+
<img alt="Eighteen more balls on a warm sunburst, in two rows of nine: five vintage leather soccer balls (hand-stitched, laced, 18 strips, 12 panels, 32 panels), a lemon-peel baseball, two baseballs stitched in two colours and an aged baseball, then nine soccer balls in the style of an era, from the late 1970s to the early 2020s." src="https://raw.githubusercontent.com/johnmorrisdotca/dougu-sports/main/docs/images/vintage-desk-light.webp" width="760">
|
|
20
27
|
</picture>
|
|
21
28
|
</p>
|
|
22
29
|
|
|
@@ -37,7 +44,7 @@ The ball and the gear of every sport, trophies, medals, crests and the icon of e
|
|
|
37
44
|
<table align="center">
|
|
38
45
|
<tr>
|
|
39
46
|
<td align="center" valign="top">
|
|
40
|
-
<img alt="A two-handled cup, a medal, a soccer ball and a championship banner each turned through seven angles: the cup keeps its outline and moves its light and handles, the medal and the banner flip like a coin to show their plain backs, and the ball rolls." src="https://raw.githubusercontent.com/johnmorrisdotca/dougu-sports/main/docs/images/turn-desk
|
|
47
|
+
<img alt="A two-handled cup, a medal, a soccer ball and a championship banner each turned through seven angles: the cup keeps its outline and moves its light and handles, the medal and the banner flip like a coin to show their plain backs, and the ball rolls." src="https://raw.githubusercontent.com/johnmorrisdotca/dougu-sports/main/docs/images/turn-desk.webp" width="470"><br><em>Turned: a ball rolls, a medal flips</em>
|
|
41
48
|
</td>
|
|
42
49
|
<td align="center" valign="top">
|
|
43
50
|
<img alt="Cups, a medal, balls and gear on a phone, three to a row." src="https://raw.githubusercontent.com/johnmorrisdotca/dougu-sports/main/docs/images/phone-light.webp" width="200"><br><em>On a phone</em>
|
|
@@ -45,7 +52,7 @@ The ball and the gear of every sport, trophies, medals, crests and the icon of e
|
|
|
45
52
|
</tr>
|
|
46
53
|
</table>
|
|
47
54
|
|
|
48
|
-
> **Status: preview.**
|
|
55
|
+
> **Status: preview.** 263 emblems: 24 trophies, 5 awards, 6 medals, 4 crests, a pictogram for each of the 38 sports, 116 balls and implements drawn in 3D, 8 printed pucks ([docs/pucks.md](./docs/pucks.md)), 61 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.
|
|
49
56
|
|
|
50
57
|
## In 30 seconds
|
|
51
58
|
|
|
@@ -83,7 +90,7 @@ Put the string in a page (`element.innerHTML = svg`), write it to a file, or sen
|
|
|
83
90
|
- **One module per item**, so a bundler takes only what is imported; see [Use it in your project](#use-it-in-your-project).
|
|
84
91
|
- **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.
|
|
85
92
|
- **Typed ids**: `EmblemId` is a union of `award:*`, `trophy:*`, `medal:*`, `crest:*`, `ball:*`, `gear:*`, `sport:*` and `pennant:*` ids.
|
|
86
|
-
- **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, the white and blue judo suit flat and
|
|
93
|
+
- **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, the white and blue judo suit flat, folded and seen from behind with its back number ([docs/judogi-back.md](./docs/judogi-back.md)), the belts of every grade, long bow and arrow, with Japanese names that are the governing bodies' words; see [docs/japanese-sports.md](./docs/japanese-sports.md).
|
|
87
94
|
- **Generic by design**: no emblem carries a league's, a team's or a federation's name or mark.
|
|
88
95
|
- **Accessible**: every drawing is `role="img"` with a `<title>`; see [Accessibility](#accessibility).
|
|
89
96
|
- **Deterministic**: the same id and options give the same string; a gradient's id comes from its colour.
|
|
@@ -94,7 +101,7 @@ Put the string in a page (`element.innerHTML = svg`), write it to a file, or sen
|
|
|
94
101
|
<table>
|
|
95
102
|
<tr>
|
|
96
103
|
<td align="center" valign="top"><img alt="Balls and pucks in four rows of nine." src="https://raw.githubusercontent.com/johnmorrisdotca/dougu-sports/main/docs/images/balls-desk-light.webp" width="360"><br><em>Balls and pucks, trophies, medals and gear</em></td>
|
|
97
|
-
<td align="center" valign="top"><img alt="A cup, a medal, a ball and a banner turned through seven angles." src="https://raw.githubusercontent.com/johnmorrisdotca/dougu-sports/main/docs/images/turn-desk
|
|
104
|
+
<td align="center" valign="top"><img alt="A cup, a medal, a ball and a banner turned through seven angles." src="https://raw.githubusercontent.com/johnmorrisdotca/dougu-sports/main/docs/images/turn-desk.webp" width="360"><br><em>Turned through seven angles</em></td>
|
|
98
105
|
</tr>
|
|
99
106
|
</table>
|
|
100
107
|
|
|
@@ -409,7 +416,7 @@ An emblem is a small object: `id`, `en` and `ja` names, a `source` (who drew it)
|
|
|
409
416
|
| `crest` | Four generic crests, tinted by a team's colours, with its letters | `src/emblems/crest/` |
|
|
410
417
|
| `ball` | 116 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/` |
|
|
411
418
|
| `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` |
|
|
412
|
-
| `gear` |
|
|
419
|
+
| `gear` | 61 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), a long bow, an arrow and a karate suit | `src/emblems/gear/` |
|
|
413
420
|
| `sport` | One pictogram for each of the thirty-eight sports | `src/emblems/sport/` |
|
|
414
421
|
| `pennant` | A felt championship pennant on a dowel, with a stitched edge, lettered with its words and its year | `src/emblems/pennant/` |
|
|
415
422
|
|
|
@@ -467,6 +474,7 @@ The thirty-eight sports the ball, gear and sport emblems are made for are `SPORT
|
|
|
467
474
|
| `engrave` | Any text, up to three lines of 24 letters, Japanese included: cut into the face (see [Engrave an emblem](#engrave-an-emblem)) | none |
|
|
468
475
|
| `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) |
|
|
469
476
|
| `engraveBack` | The text of a medal's, ring's or banner's back, shown when it is turned over | a plain back |
|
|
477
|
+
| `backnumber` | `{ name, code, band }` for `gear:judogi-back` and `gear:judogi-blue-back`: the family name in capitals, the three letters of the National Olympic Committee, and `"blue"`, `"gold"` or `"red"` for the band ([docs/judogi-back.md](./docs/judogi-back.md)) | `TANAKA`, `JPN`, blue |
|
|
470
478
|
| `numberColor` | The colour of a pennant's lettering | the stitching's colour |
|
|
471
479
|
| `view` | `"front"` or `"back"`: which side of a pennant is drawn at rest | `"front"` |
|
|
472
480
|
| `locale` | `"en"`, `"ja"`: the language of the `<title>` | `"en"` |
|
|
@@ -475,7 +483,7 @@ The thirty-eight sports the ball, gear and sport emblems are made for are `SPORT
|
|
|
475
483
|
|
|
476
484
|
`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).
|
|
477
485
|
|
|
478
|
-
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).
|
|
486
|
+
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`, `Backnumber`, `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).
|
|
479
487
|
|
|
480
488
|
## Theming
|
|
481
489
|
|
|
@@ -595,7 +603,7 @@ Bug reports and ideas go in the [issues](https://github.com/johnmorrisdotca/doug
|
|
|
595
603
|
|
|
596
604
|
## Changes
|
|
597
605
|
|
|
598
|
-
See [CHANGELOG.md](./CHANGELOG.md). 0.5.1 redraws the judo suit, the belt and the football pictograms and adds the blue and folded suits and the belts of every grade (261 emblems: [docs/japanese-sports.md](./docs/japanese-sports.md)); 0.5.0 adds fifty balls: vintage leather soccer balls, era-style and shop-wall soccer balls, baseballs of other threads and volleyballs in national colours, with a `colors` option (244 emblems: [docs/vintage-balls.md](./docs/vintage-balls.md)); 0.4.0 adds eight printed pucks and a `face` option (194 emblems: [docs/pucks.md](./docs/pucks.md)); 0.3.0 adds nineteen soccer balls (26, 18, 14, 12 and 6 panels, winter orange and high-visibility yellow, futsal and beach soccer: 186 emblems); 0.2.1 draws every ball and implement to the rulebook's proportions; 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.
|
|
606
|
+
See [CHANGELOG.md](./CHANGELOG.md). 0.6.0 gives the judo suit and the karate suit their sleeves (a judogi has no short ones: they reach the wrist) and adds the judogi seen from behind with the IJF-style back number, a family name and a country code on a patch, with a `backnumber` option (263 emblems: [docs/judogi-back.md](./docs/judogi-back.md)); 0.5.1 redraws the judo suit, the belt and the football pictograms and adds the blue and folded suits and the belts of every grade (261 emblems: [docs/japanese-sports.md](./docs/japanese-sports.md)); 0.5.0 adds fifty balls: vintage leather soccer balls, era-style and shop-wall soccer balls, baseballs of other threads and volleyballs in national colours, with a `colors` option (244 emblems: [docs/vintage-balls.md](./docs/vintage-balls.md)); 0.4.0 adds eight printed pucks and a `face` option (194 emblems: [docs/pucks.md](./docs/pucks.md)); 0.3.0 adds nineteen soccer balls (26, 18, 14, 12 and 6 panels, winter orange and high-visibility yellow, futsal and beach soccer: 186 emblems); 0.2.1 draws every ball and implement to the rulebook's proportions; 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.
|
|
599
607
|
|
|
600
608
|
## Credits
|
|
601
609
|
|
|
@@ -25,6 +25,20 @@ export interface PieceOptions {
|
|
|
25
25
|
face?: PuckFace;
|
|
26
26
|
/** A puck: a renderer for the flag codes this package does not draw (`face.flag`), `(code, { shape, size, theme }) => svg`, the one taisen-brackets takes. Synchronous. */
|
|
27
27
|
flags?: FlagRenderer;
|
|
28
|
+
/** A judogi seen from behind: the back number on it (see `Backnumber`). The back views of the judogi (`gear:judogi-back`, `gear:judogi-blue-back`) take it; anything else ignores it. */
|
|
29
|
+
backnumber?: Backnumber;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* The back number sewn on the back of a judogi (IJF Sport and Organisation Rules, C1.8): the competitor's family name and the three letters of the National Olympic Committee, on a white patch under a coloured band.
|
|
33
|
+
* Only `gear:judogi-back` and `gear:judogi-blue-back` take it; anything else ignores it.
|
|
34
|
+
*/
|
|
35
|
+
export interface Backnumber {
|
|
36
|
+
/** The family name, in capitals: letters, digits, spaces, hyphens and apostrophes, 16 characters at most (accents are drawn as the plain letter). Without it the patch reads `TANAKA`. */
|
|
37
|
+
name?: string;
|
|
38
|
+
/** The three letters of the National Olympic Committee (`CAN`, `JPN`, `USA`): letters only, capitals, 3 at most. Without it the patch reads `JPN`. */
|
|
39
|
+
code?: string;
|
|
40
|
+
/** The band the name is on: `blue` (the default), `gold` (an Olympic champion's) or `red` (a world champion's). */
|
|
41
|
+
band?: "blue" | "gold" | "red";
|
|
28
42
|
}
|
|
29
43
|
/** A turn: `yaw` degrees about the vertical axis (0 is the default view), `pitch` the tilt toward you, `roll` the turn about the line of sight. */
|
|
30
44
|
export interface BallFrameOptions extends PieceOptions {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { FlagRenderer, PuckFace } from "./ball/ball.face.ts";
|
|
2
|
+
import type { Backnumber } from "./ball/ball.core.ts";
|
|
2
3
|
/** `metal`: full colour with a gradient. `line`: one outline in `currentColor`. `color`: flat fills of the main colour, with no gradient. */
|
|
3
4
|
export type EmblemStyle = "metal" | "line" | "color";
|
|
4
5
|
export declare const EMBLEM_STYLES: readonly ["metal", "line", "color"];
|
|
@@ -60,6 +61,8 @@ export interface EmblemOptions {
|
|
|
60
61
|
colors?: readonly string[];
|
|
61
62
|
/** A puck: a renderer for the flag codes this package does not draw (`face.flag`): `(code, { shape: "round" | "square" | "rect", size, theme }) => svg`, synchronous, the same as taisen-brackets takes (hata's `flag()` is asynchronous, so load the flags first). */
|
|
62
63
|
flags?: FlagRenderer;
|
|
64
|
+
/** A judogi seen from behind: the back number sewn on it, `{ name, code, band }` (see `Backnumber`). `gear:judogi-back` and `gear:judogi-blue-back` take it; anything else ignores it. */
|
|
65
|
+
backnumber?: Backnumber;
|
|
63
66
|
}
|
|
64
67
|
/** A turn, in degrees from the resting view (0 and 0 is the still drawing): `yaw` about the vertical axis, `pitch` the tilt toward the eye. */
|
|
65
68
|
export interface FrameOptions extends EmblemOptions {
|
|
@@ -74,18 +74,20 @@ export const EMBLEM_DESCRIPTIONS = {
|
|
|
74
74
|
"sport:sumo": { en: "Two wrestlers in the crouch they face each other in at the start of a bout, with their belts", ja: "仕切りの姿勢で向かい合う、廻しを締めた二人の力士" },
|
|
75
75
|
"sport:handball": { en: "A hand throwing the ball, with lines of speed", ja: "ボールを投げる手と、速さを表す線" },
|
|
76
76
|
"sport:kendo": { en: "The kendo helmet", ja: "剣道の面" },
|
|
77
|
-
"sport:judo": { en: "A judo suit: jacket with crossed lapels, a belt in a flat knot with two ends hanging, and trousers", ja: "
|
|
77
|
+
"sport:judo": { en: "A judo suit: a jacket with sleeves down to the wrist and crossed lapels, a belt in a flat knot with two ends hanging, and trousers", ja: "柔道衣。手首まで届く袖と、右前に合わせた襟の上衣、本結びで二本の端を垂らした帯、ズボン" },
|
|
78
78
|
"sport:kyudo": { en: "A long bow, its string and an arrow", ja: "弦を張った長弓と矢" },
|
|
79
|
-
"sport:karate": { en: "A karate suit: a short jacket with a wide V of lapels, a belt in a flat knot, and straight trousers", ja: "
|
|
79
|
+
"sport:karate": { en: "A karate suit: a short jacket with three-quarter sleeves and a wide V of lapels, a belt in a flat knot, and straight trousers", ja: "空手衣。七分袖で襟を広いV字に合わせた短めの上衣、本結びの帯、まっすぐなズボン" },
|
|
80
80
|
"gear:gunbai": { en: "The sumo referee's war fan, with its tassel", ja: "行司が持つ軍配と、その房" },
|
|
81
81
|
"gear:mawashi": { en: "The wrestler's belt, with the stiff cords that hang from its front", ja: "力士の廻しと、前に垂らした下がり" },
|
|
82
82
|
"gear:shinai": { en: "The kendo practice sword: four bamboo staves with a leather tip, a tie and a hilt", ja: "剣道の竹刀。四つ割りの竹に先革、中結、柄が付く" },
|
|
83
83
|
"gear:kendo-men": { en: "The kendo helmet: a steel grille, cloth flaps and a throat guard", ja: "剣道の面。面金、面布団、突き垂れが付く" },
|
|
84
|
-
"gear:judogi": { en: "The white judo suit laid flat: a jacket with long sleeves, thick stitched lapels crossed left over right and a quilted upper body, trousers with reinforced knees, and the belt tied in a flat knot", ja: "
|
|
84
|
+
"gear:judogi": { en: "The white judo suit laid flat: a jacket with long sleeves down to the wrist, thick stitched lapels crossed left over right and a quilted upper body, trousers with reinforced knees, and the belt tied in a flat knot", ja: "白い柔道衣を広げた姿。手首まで届く長い袖、右前に合わせた刺し子で厚い襟、刺し子の身頃、膝を補強したズボン、本結びにした帯" },
|
|
85
85
|
"gear:obi": { en: "A belt in the flat square knot: two layers round the waist and two equal ends hanging, black", ja: "本結びにした黒帯。腰に二周巻き、同じ長さの端を二本垂らした形" },
|
|
86
86
|
"gear:judogi-blue": { en: "The blue judo suit laid flat, in the blue the competition rules allow beside white", ja: "試合で白と並んで認められている青の柔道衣を広げた姿" },
|
|
87
87
|
"gear:judogi-folded": { en: "The white judo suit folded into a neat rectangle, collar and lapel stitching on top, the belt tied round it", ja: "白い柔道衣をきちんと四角く畳んだ姿。上に襟の刺し子が見え、帯を巻いて結んである" },
|
|
88
88
|
"gear:judogi-blue-folded": { en: "The blue judo suit folded into a neat rectangle, collar and lapel stitching on top, the belt tied round it", ja: "青い柔道衣をきちんと四角く畳んだ姿。上に襟の刺し子が見え、帯を巻いて結んである" },
|
|
89
|
+
"gear:judogi-back": { en: "The white judo suit laid flat and seen from behind: long sleeves down to the wrist, the collar, the belt crossed behind the waist, and the back number of international competitions sewn on 3 cm under the collar, a white patch with the family name in white capitals on a band, the country code under it and a blank space for the sponsor", ja: "白い柔道衣を背中側から広げた姿。手首まで届く長い袖、襟、腰の後ろで交差した帯、襟の3cm下に縫い付けた国際大会用のゼッケン。白い布の上部の帯に白い大文字の姓、その下に国名コード、下部は協賛用の余白" },
|
|
90
|
+
"gear:judogi-blue-back": { en: "The blue judo suit laid flat and seen from behind, with the back number of international competitions sewn on 3 cm under the collar: the family name on a band, the country code under it and a blank space for the sponsor", ja: "青い柔道衣を背中側から広げた姿。襟の3cm下に縫い付けた国際大会用のゼッケン。帯に姓、その下に国名コード、下は協賛用の余白" },
|
|
89
91
|
"gear:obi-white": { en: "A white belt in the flat square knot, the first kyu belt", ja: "本結びにした白帯。初級の帯" },
|
|
90
92
|
"gear:obi-yellow": { en: "A yellow belt in the flat square knot", ja: "本結びにした黄帯" },
|
|
91
93
|
"gear:obi-orange": { en: "An orange belt in the flat square knot", ja: "本結びにした橙帯" },
|
|
@@ -102,7 +104,7 @@ export const EMBLEM_DESCRIPTIONS = {
|
|
|
102
104
|
"gear:obi-blue-brown": { en: "A two-colour belt, blue above and brown below, between the blue and brown grades", ja: "上半分が青、下半分が茶の二色帯。青帯と茶帯の間の級の帯" },
|
|
103
105
|
"gear:yumi": { en: "The long asymmetric bow, held a third of the way up, with its string and wrapped grip", ja: "上が長い非対称の長弓。弦を張り、握り革と籐巻きが付く" },
|
|
104
106
|
"gear:ya": { en: "A kyudo arrow with feather fletching, a nock and a steel point", ja: "弓道の矢。矢羽根、筈、矢尻が付く" },
|
|
105
|
-
"gear:karate-gi": { en: "The white karate suit laid flat: a lighter jacket with
|
|
107
|
+
"gear:karate-gi": { en: "The white karate suit laid flat: a lighter jacket with three-quarter sleeves, a wide V of plain lapels and tie strings, straight trousers, and a red belt in a flat knot", ja: "白い空手衣を広げた姿。七分袖の軽い上衣、広いV字の襟と結び紐、まっすぐなズボン、本結びにした赤い帯" },
|
|
106
108
|
"ball:soccer-26": { en: "26 panels: 8 triangles and 18 squares, the faces of a rhombicuboctahedron", ja: "三角形8枚と正方形18枚の26枚貼り。斜方立方八面体の26面と同じ構成" },
|
|
107
109
|
"ball:soccer-18": { en: "18 panels: three strips on each of the six faces of a cube, the strips of neighbouring faces square to each other", ja: "立方体の6面に3枚ずつ帯状のパネルを貼った18枚貼り。隣り合う面の帯は互いに直角" },
|
|
108
110
|
"ball:soccer-14": { en: "14 panels: 6 propellers and 8 triangles, on a truncated cube whose 12 long edges are bent into S curves", ja: "プロペラ形6枚と三角形8枚の14枚貼り。切頂立方体の長い辺12本をS字に曲げた形" },
|
|
@@ -24,10 +24,10 @@ export type BallId = (typeof BALL_IDS)[number];
|
|
|
24
24
|
export declare const PUCK_IDS: readonly ["puck:canada", "puck:canada-red", "puck:canada-white", "puck:usa", "puck:usa-navy", "puck:player", "puck:signed", "puck:souvenir"];
|
|
25
25
|
export type PuckId = (typeof PUCK_IDS)[number];
|
|
26
26
|
/** The pieces of gear: a piece of equipment for each sport, flat, drawn for this package, turning like a coin. */
|
|
27
|
-
export declare const GEAR_IDS: readonly ["gear:hockey-stick", "gear:goalie-stick", "gear:hockey-skate", "gear:goalie-mask", "gear:goal-net", "gear:field-hockey-stick", "gear:lacrosse-stick", "gear:cricket-bat", "gear:wicket", "gear:table-tennis-paddle", "gear:badminton-racket", "gear:tennis-racket", "gear:squash-racket", "gear:racquetball-racket", "gear:padel-racket", "gear:pickleball-paddle", "gear:roundnet-set", "gear:volleyball-net", "gear:basketball-hoop", "gear:baseball-bat", "gear:baseball-glove", "gear:football-helmet", "gear:goalposts", "gear:hurley", "gear:curling-broom", "gear:figure-skate", "gear:speed-skate", "gear:diving-board", "gear:swim-goggles", "gear:starting-blocks", "gear:relay-baton", "gear:javelin", "gear:hurdles", "gear:gunbai", "gear:mawashi", "gear:shinai", "gear:kendo-men", "gear:judogi", "gear:judogi-blue", "gear:judogi-folded", "gear:judogi-blue-folded", "gear:obi", "gear:obi-white", "gear:obi-yellow", "gear:obi-orange", "gear:obi-green", "gear:obi-blue", "gear:obi-brown", "gear:obi-kohaku", "gear:obi-red", "gear:obi-women", "gear:obi-white-yellow", "gear:obi-yellow-orange", "gear:obi-orange-green", "gear:obi-green-blue", "gear:obi-blue-brown", "gear:yumi", "gear:ya", "gear:karate-gi"];
|
|
27
|
+
export declare const GEAR_IDS: readonly ["gear:hockey-stick", "gear:goalie-stick", "gear:hockey-skate", "gear:goalie-mask", "gear:goal-net", "gear:field-hockey-stick", "gear:lacrosse-stick", "gear:cricket-bat", "gear:wicket", "gear:table-tennis-paddle", "gear:badminton-racket", "gear:tennis-racket", "gear:squash-racket", "gear:racquetball-racket", "gear:padel-racket", "gear:pickleball-paddle", "gear:roundnet-set", "gear:volleyball-net", "gear:basketball-hoop", "gear:baseball-bat", "gear:baseball-glove", "gear:football-helmet", "gear:goalposts", "gear:hurley", "gear:curling-broom", "gear:figure-skate", "gear:speed-skate", "gear:diving-board", "gear:swim-goggles", "gear:starting-blocks", "gear:relay-baton", "gear:javelin", "gear:hurdles", "gear:gunbai", "gear:mawashi", "gear:shinai", "gear:kendo-men", "gear:judogi", "gear:judogi-blue", "gear:judogi-folded", "gear:judogi-blue-folded", "gear:judogi-back", "gear:judogi-blue-back", "gear:obi", "gear:obi-white", "gear:obi-yellow", "gear:obi-orange", "gear:obi-green", "gear:obi-blue", "gear:obi-brown", "gear:obi-kohaku", "gear:obi-red", "gear:obi-women", "gear:obi-white-yellow", "gear:obi-yellow-orange", "gear:obi-orange-green", "gear:obi-green-blue", "gear:obi-blue-brown", "gear:yumi", "gear:ya", "gear:karate-gi"];
|
|
28
28
|
export type GearId = (typeof GEAR_IDS)[number];
|
|
29
29
|
/** The Japanese sports and budo: sumo, kendo, judo, kyudo and karate, with the trophies and the gear that belong to them. Every one is also in its own group; this list is for showing them together. */
|
|
30
|
-
export declare const JAPANESE_IDS: readonly ["sport:sumo", "trophy:sumo-cup", "gear:gunbai", "gear:mawashi", "trophy:championship-banner", "sport:kendo", "gear:shinai", "gear:kendo-men", "sport:judo", "gear:judogi", "gear:judogi-blue", "gear:judogi-folded", "gear:judogi-blue-folded", "gear:obi", "gear:obi-white", "gear:obi-yellow", "gear:obi-orange", "gear:obi-green", "gear:obi-blue", "gear:obi-brown", "gear:obi-kohaku", "gear:obi-red", "gear:obi-women", "gear:obi-white-yellow", "gear:obi-yellow-orange", "gear:obi-orange-green", "gear:obi-green-blue", "gear:obi-blue-brown", "sport:kyudo", "gear:yumi", "gear:ya", "sport:karate", "gear:karate-gi"];
|
|
30
|
+
export declare const JAPANESE_IDS: readonly ["sport:sumo", "trophy:sumo-cup", "gear:gunbai", "gear:mawashi", "trophy:championship-banner", "sport:kendo", "gear:shinai", "gear:kendo-men", "sport:judo", "gear:judogi", "gear:judogi-blue", "gear:judogi-folded", "gear:judogi-blue-folded", "gear:judogi-back", "gear:judogi-blue-back", "gear:obi", "gear:obi-white", "gear:obi-yellow", "gear:obi-orange", "gear:obi-green", "gear:obi-blue", "gear:obi-brown", "gear:obi-kohaku", "gear:obi-red", "gear:obi-women", "gear:obi-white-yellow", "gear:obi-yellow-orange", "gear:obi-orange-green", "gear:obi-green-blue", "gear:obi-blue-brown", "sport:kyudo", "gear:yumi", "gear:ya", "sport:karate", "gear:karate-gi"];
|
|
31
31
|
export type JapaneseId = (typeof JAPANESE_IDS)[number];
|
|
32
32
|
/** The pennants: a felt championship pennant with a stitched edge. */
|
|
33
33
|
export declare const PENNANT_IDS: readonly ["pennant:championship"];
|
|
@@ -45,7 +45,7 @@ export declare const EMBLEM_GROUPS: {
|
|
|
45
45
|
readonly crest: readonly ["crest:shield", "crest:roundel", "crest:diamond", "crest:pennant"];
|
|
46
46
|
readonly ball: readonly ["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:futsal", "ball:beach-soccer", "ball:soccer-1870-hand-stitched", "ball:soccer-1900-laced", "ball:soccer-1930-18-panel", "ball:soccer-1950-12-panel", "ball:soccer-1960-32-panel-leather", "ball:soccer-1970-black-white", "ball:soccer-1978-triad", "ball:soccer-1986-decorated-triad", "ball:soccer-1998-coloured-triad", "ball:soccer-2002-triangle-sweep", "ball:soccer-2006-propeller", "ball:soccer-2010-grooved", "ball:soccer-2014-ribbon", "ball:soccer-2018-pixel", "ball:soccer-2022-speed-shell", "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", "ball:teqball", "ball:basketball", "ball:basketball-6", "ball:basketball-3x3", "ball:baseball", "ball:softball", "ball:baseball-lemon-peel", "ball:baseball-red-blue", "ball:baseball-black-red", "ball:baseball-vintage-leather", "ball:softball-11-optic", "ball:tennis", "ball:padel", "ball:sliotar", "ball:volleyball", "ball:volleyball-8", "ball:beach-volleyball", "ball:volleyball-colours", "ball:volleyball-brazil", "ball:volleyball-japan", "ball:volleyball-canada", "ball:volleyball-usa", "ball:volleyball-italy", "ball:volleyball-poland", "ball:volleyball-france", "ball:volleyball-serbia", "ball:volleyball-netherlands", "ball:volleyball-germany", "ball:cricket-red", "ball:cricket-white", "ball:cricket-pink", "ball:football", "ball:football-cfl", "ball:football-ifaf", "ball:rugby", "ball:afl", "ball:gaelic-football", "ball:netball", "ball:pickleball-outdoor", "ball:pickleball-indoor", "ball:squash", "ball:squash-yellow", "ball:squash-green", "ball:squash-red", "ball:squash-blue", "ball:racquetball", "ball:lacrosse", "ball:field-hockey", "ball:table-tennis", "ball:handball", "ball:water-polo", "ball:golf", "ball:puck", "ball:curling-stone", "ball:shot", "ball:discus", "ball:hammer", "ball:sepak-takraw", "ball:roundnet", "ball:shuttlecock-feather", "ball:shuttlecock-nylon"];
|
|
47
47
|
readonly puck: readonly ["puck:canada", "puck:canada-red", "puck:canada-white", "puck:usa", "puck:usa-navy", "puck:player", "puck:signed", "puck:souvenir"];
|
|
48
|
-
readonly gear: readonly ["gear:hockey-stick", "gear:goalie-stick", "gear:hockey-skate", "gear:goalie-mask", "gear:goal-net", "gear:field-hockey-stick", "gear:lacrosse-stick", "gear:cricket-bat", "gear:wicket", "gear:table-tennis-paddle", "gear:badminton-racket", "gear:tennis-racket", "gear:squash-racket", "gear:racquetball-racket", "gear:padel-racket", "gear:pickleball-paddle", "gear:roundnet-set", "gear:volleyball-net", "gear:basketball-hoop", "gear:baseball-bat", "gear:baseball-glove", "gear:football-helmet", "gear:goalposts", "gear:hurley", "gear:curling-broom", "gear:figure-skate", "gear:speed-skate", "gear:diving-board", "gear:swim-goggles", "gear:starting-blocks", "gear:relay-baton", "gear:javelin", "gear:hurdles", "gear:gunbai", "gear:mawashi", "gear:shinai", "gear:kendo-men", "gear:judogi", "gear:judogi-blue", "gear:judogi-folded", "gear:judogi-blue-folded", "gear:obi", "gear:obi-white", "gear:obi-yellow", "gear:obi-orange", "gear:obi-green", "gear:obi-blue", "gear:obi-brown", "gear:obi-kohaku", "gear:obi-red", "gear:obi-women", "gear:obi-white-yellow", "gear:obi-yellow-orange", "gear:obi-orange-green", "gear:obi-green-blue", "gear:obi-blue-brown", "gear:yumi", "gear:ya", "gear:karate-gi"];
|
|
48
|
+
readonly gear: readonly ["gear:hockey-stick", "gear:goalie-stick", "gear:hockey-skate", "gear:goalie-mask", "gear:goal-net", "gear:field-hockey-stick", "gear:lacrosse-stick", "gear:cricket-bat", "gear:wicket", "gear:table-tennis-paddle", "gear:badminton-racket", "gear:tennis-racket", "gear:squash-racket", "gear:racquetball-racket", "gear:padel-racket", "gear:pickleball-paddle", "gear:roundnet-set", "gear:volleyball-net", "gear:basketball-hoop", "gear:baseball-bat", "gear:baseball-glove", "gear:football-helmet", "gear:goalposts", "gear:hurley", "gear:curling-broom", "gear:figure-skate", "gear:speed-skate", "gear:diving-board", "gear:swim-goggles", "gear:starting-blocks", "gear:relay-baton", "gear:javelin", "gear:hurdles", "gear:gunbai", "gear:mawashi", "gear:shinai", "gear:kendo-men", "gear:judogi", "gear:judogi-blue", "gear:judogi-folded", "gear:judogi-blue-folded", "gear:judogi-back", "gear:judogi-blue-back", "gear:obi", "gear:obi-white", "gear:obi-yellow", "gear:obi-orange", "gear:obi-green", "gear:obi-blue", "gear:obi-brown", "gear:obi-kohaku", "gear:obi-red", "gear:obi-women", "gear:obi-white-yellow", "gear:obi-yellow-orange", "gear:obi-orange-green", "gear:obi-green-blue", "gear:obi-blue-brown", "gear:yumi", "gear:ya", "gear:karate-gi"];
|
|
49
49
|
readonly sport: readonly ("sport:sumo" | "sport:kendo" | "sport:judo" | "sport:kyudo" | "sport:karate" | "sport:nfl" | "sport:cfl" | "sport:ifaf" | "sport:nhl" | "sport:nba" | "sport:mlb" | "sport:soccer" | "sport:curling" | "sport:tennis" | "sport:volleyball" | "sport:badminton" | "sport:pickleball" | "sport:tabletennis" | "sport:padel" | "sport:squash" | "sport:racquetball" | "sport:sepaktakraw" | "sport:teqball" | "sport:roundnet" | "sport:netball" | "sport:swimming" | "sport:waterpolo" | "sport:diving" | "sport:artisticswimming" | "sport:lacrosse" | "sport:rugby" | "sport:afl" | "sport:gaelic" | "sport:cricket" | "sport:fieldhockey" | "sport:handball" | "sport:athletics" | "sport:skating")[];
|
|
50
50
|
readonly pennant: readonly ["pennant:championship"];
|
|
51
51
|
};
|
|
@@ -39,7 +39,7 @@ export const GEAR_IDS = [
|
|
|
39
39
|
"gear:table-tennis-paddle", "gear:badminton-racket", "gear:tennis-racket", "gear:squash-racket", "gear:racquetball-racket", "gear:padel-racket", "gear:pickleball-paddle",
|
|
40
40
|
"gear:roundnet-set", "gear:volleyball-net", "gear:basketball-hoop", "gear:baseball-bat", "gear:baseball-glove", "gear:football-helmet", "gear:goalposts", "gear:hurley",
|
|
41
41
|
"gear:curling-broom", "gear:figure-skate", "gear:speed-skate", "gear:diving-board", "gear:swim-goggles", "gear:starting-blocks", "gear:relay-baton", "gear:javelin", "gear:hurdles",
|
|
42
|
-
"gear:gunbai", "gear:mawashi", "gear:shinai", "gear:kendo-men", "gear:judogi", "gear:judogi-blue", "gear:judogi-folded", "gear:judogi-blue-folded",
|
|
42
|
+
"gear:gunbai", "gear:mawashi", "gear:shinai", "gear:kendo-men", "gear:judogi", "gear:judogi-blue", "gear:judogi-folded", "gear:judogi-blue-folded", "gear:judogi-back", "gear:judogi-blue-back",
|
|
43
43
|
"gear:obi", "gear:obi-white", "gear:obi-yellow", "gear:obi-orange", "gear:obi-green", "gear:obi-blue", "gear:obi-brown", "gear:obi-kohaku", "gear:obi-red", "gear:obi-women", "gear:obi-white-yellow", "gear:obi-yellow-orange", "gear:obi-orange-green", "gear:obi-green-blue", "gear:obi-blue-brown",
|
|
44
44
|
"gear:yumi", "gear:ya", "gear:karate-gi"
|
|
45
45
|
];
|
|
@@ -48,7 +48,7 @@ export const JAPANESE_IDS = [
|
|
|
48
48
|
"sport:sumo", "trophy:sumo-cup", "gear:gunbai", "gear:mawashi",
|
|
49
49
|
"trophy:championship-banner",
|
|
50
50
|
"sport:kendo", "gear:shinai", "gear:kendo-men",
|
|
51
|
-
"sport:judo", "gear:judogi", "gear:judogi-blue", "gear:judogi-folded", "gear:judogi-blue-folded",
|
|
51
|
+
"sport:judo", "gear:judogi", "gear:judogi-blue", "gear:judogi-folded", "gear:judogi-blue-folded", "gear:judogi-back", "gear:judogi-blue-back",
|
|
52
52
|
"gear:obi", "gear:obi-white", "gear:obi-yellow", "gear:obi-orange", "gear:obi-green", "gear:obi-blue", "gear:obi-brown", "gear:obi-kohaku", "gear:obi-red", "gear:obi-women", "gear:obi-white-yellow", "gear:obi-yellow-orange", "gear:obi-orange-green", "gear:obi-green-blue", "gear:obi-blue-brown",
|
|
53
53
|
"sport:kyudo", "gear:yumi", "gear:ya",
|
|
54
54
|
"sport:karate", "gear:karate-gi",
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { PieceOptions } from "../ball/ball.core.ts";
|
|
2
|
+
import { type Part } from "./gear.core.ts";
|
|
2
3
|
/**
|
|
3
4
|
* The colours of the judo belts, which `tint` takes: the six kyu colours in order, black (1st to 5th dan), `kohaku` (the red of the red-and-white belt of the 6th to 8th dan, whose white panels are the accent) and
|
|
4
5
|
* `red` (9th and 10th dan). The Kodokan's own kyu belts are white and brown only; the colours between are a later, national addition, so a country's order may differ.
|
|
@@ -22,6 +23,16 @@ export declare const GEAR_JUDOGI: import("./gear.index.ts").Piece<import("./gear
|
|
|
22
23
|
export declare const GEAR_JUDOGI_BLUE: import("./gear.index.ts").Piece<import("./gear.core.ts").GearSpec>;
|
|
23
24
|
export declare const GEAR_JUDOGI_FOLDED: import("./gear.index.ts").Piece<import("./gear.core.ts").GearSpec>;
|
|
24
25
|
export declare const GEAR_JUDOGI_BLUE_FOLDED: import("./gear.index.ts").Piece<import("./gear.core.ts").GearSpec>;
|
|
26
|
+
export declare const GEAR_JUDOGI_BACK: import("./gear.index.ts").Piece<{
|
|
27
|
+
main: string;
|
|
28
|
+
accent: "#1f2228";
|
|
29
|
+
parts: Part[];
|
|
30
|
+
}>;
|
|
31
|
+
export declare const GEAR_JUDOGI_BLUE_BACK: import("./gear.index.ts").Piece<{
|
|
32
|
+
main: string;
|
|
33
|
+
accent: "#1f2228";
|
|
34
|
+
parts: Part[];
|
|
35
|
+
}>;
|
|
25
36
|
export declare const GEAR_KARATE_GI: import("./gear.index.ts").Piece<import("./gear.core.ts").GearSpec>;
|
|
26
37
|
export declare const GEAR_OBI: import("./gear.index.ts").Piece<import("./gear.core.ts").GearSpec>;
|
|
27
38
|
export declare const GEAR_OBI_WHITE: import("./gear.index.ts").Piece<import("./gear.core.ts").GearSpec>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { fitSize, linePath } from "../ball/ball.letters.js";
|
|
2
|
+
import { defineGear, drawGear, drawn, rect } from "./gear.core.js";
|
|
2
3
|
/**
|
|
3
4
|
* The colours of the judo belts, which `tint` takes: the six kyu colours in order, black (1st to 5th dan), `kohaku` (the red of the red-and-white belt of the 6th to 8th dan, whose white panels are the accent) and
|
|
4
5
|
* `red` (9th and 10th dan). The Kodokan's own kyu belts are white and brown only; the colours between are a later, national addition, so a country's order may differ.
|
|
@@ -36,6 +37,36 @@ const along = (a, b, off, t0, t1) => {
|
|
|
36
37
|
const p0 = lerp(a, b, t0), p1 = lerp(a, b, t1);
|
|
37
38
|
return `M${f(p0[0] + nx)} ${f(p0[1] + ny)}L${f(p1[0] + nx)} ${f(p1[1] + ny)}`;
|
|
38
39
|
};
|
|
40
|
+
/**
|
|
41
|
+
* A sleeve of the jacket's left side, hanging out and down from the armhole: its axis `deg` below the horizontal, `len` long from the middle of the armhole to the middle of the cuff, and the cuff `cuff` wide. The
|
|
42
|
+
* corners, in order: the top of the shoulder, the outer corner of the cuff, its inner corner and the underarm. Everything is measured from this shape (test/judo.test.ts).
|
|
43
|
+
*/
|
|
44
|
+
function hangingSleeve(top, under, deg, len, cuff) {
|
|
45
|
+
const a = (deg * Math.PI) / 180;
|
|
46
|
+
const mid = lerp(top, under, 0.5);
|
|
47
|
+
const tip = [mid[0] - Math.cos(a) * len, mid[1] + Math.sin(a) * len];
|
|
48
|
+
const hx = (Math.sin(a) * cuff) / 2, hy = (Math.cos(a) * cuff) / 2;
|
|
49
|
+
return [top, [tip[0] - hx, tip[1] - hy], [tip[0] + hx, tip[1] + hy], under];
|
|
50
|
+
}
|
|
51
|
+
/** The judogi's sleeve (IJF C1.10): to the wrist bone, about four fifths as long as the jacket, and wide at the cuff so that the forearm has room all the way. */
|
|
52
|
+
const JUDOGI_SLEEVE = hangingSleeve([19.8, 6.4], [18.6, 22.4], 60, 26, 8.8);
|
|
53
|
+
/** The karate-gi's sleeve (WKF 2.2.1 j): three-quarter length, between half the forearm and the bend of the wrist. */
|
|
54
|
+
const KARATE_SLEEVE = hangingSleeve([20.6, 8], [19.4, 22], 56, 23.6, 8.8);
|
|
55
|
+
/** Rows of quilting across a sleeve, from its top edge to its underside, leaving the ends of each row a little short of the seams. */
|
|
56
|
+
function sleeveRows(pts) {
|
|
57
|
+
let d = "";
|
|
58
|
+
for (let t = 0.1; t <= 0.9; t += 0.08) {
|
|
59
|
+
const a = lerp(pts[0], pts[1], t), b = lerp(pts[3], pts[2], t);
|
|
60
|
+
const a2 = lerp(a, b, 0.07), b2 = lerp(a, b, 0.93);
|
|
61
|
+
d += `M${f(a2[0])} ${f(a2[1])}L${f(b2[0])} ${f(b2[1])}`;
|
|
62
|
+
}
|
|
63
|
+
return d;
|
|
64
|
+
}
|
|
65
|
+
/** The hem of a sleeve's cuff, stitched across at the fraction `t` of the way from the shoulder. */
|
|
66
|
+
const cuffHem = (sleeve, t = 0.9) => {
|
|
67
|
+
const a = lerp(sleeve[0], sleeve[1], t), b = lerp(sleeve[3], sleeve[2], t);
|
|
68
|
+
return `M${f(a[0])} ${f(a[1])}L${f(b[0])} ${f(b[1])}`;
|
|
69
|
+
};
|
|
39
70
|
/** Horizontal rows (every `step`, from `y0` to `y1`) clipped to a convex polygon, as one path. */
|
|
40
71
|
function rows(poly, y0, y1, step, inset = 0) {
|
|
41
72
|
let d = "";
|
|
@@ -159,8 +190,8 @@ function judogiFlat() {
|
|
|
159
190
|
parts.push(dark(path(k) + rows(k, 51.4, 56.4, 1.6, 0.3), 0.28, 0.35));
|
|
160
191
|
}
|
|
161
192
|
parts.push(dark("M17.6 60.2H29.6M34.4 60.2H46.4", 0.3, 0.3));
|
|
162
|
-
// Sleeves:
|
|
163
|
-
const sleeve =
|
|
193
|
+
// Sleeves: to the wrist, the arms hanging out and down (IJF C1.10: the sleeve covers the wrist bone, at most 5 cm short of it, and is loose all along the forearm).
|
|
194
|
+
const sleeve = JUDOGI_SLEEVE;
|
|
164
195
|
for (const pts of [sleeve, mirror(sleeve)])
|
|
165
196
|
parts.push({ d: path(pts), fill: "$main", cyl: 0.15, shade: 0.35 });
|
|
166
197
|
const jacket = [[19.4, 6.6], [26.2, 4], [32, 3.2], [37.8, 4], [44.6, 6.6], [45.6, 8], [45.6, 36], [18.4, 36], [18.4, 8]];
|
|
@@ -169,15 +200,11 @@ function judogiFlat() {
|
|
|
169
200
|
const body = [[19, 7], [45, 7], [45.6, 26], [18.4, 26]];
|
|
170
201
|
parts.push(dark(rows(body, 8, 25, 1.4, 0.5), 0.28, 0.1));
|
|
171
202
|
parts.push(light(rows(body, 8.5, 25.5, 1.4, 0.5), 0.24, 0.2));
|
|
172
|
-
for (const pts of [sleeve, mirror(sleeve)])
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
d += `M${f(a2[0])} ${f(a2[1])}L${f(b2[0])} ${f(b2[1])}`;
|
|
178
|
-
}
|
|
179
|
-
parts.push(dark(d, 0.28, 0.1));
|
|
180
|
-
}
|
|
203
|
+
for (const pts of [sleeve, mirror(sleeve)])
|
|
204
|
+
parts.push(dark(sleeveRows(pts), 0.28, 0.1));
|
|
205
|
+
// The loose cuff: a hem stitched a little in from the open end, on both sleeves.
|
|
206
|
+
for (const pts of [sleeve, mirror(sleeve)])
|
|
207
|
+
parts.push(dark(cuffHem(pts), 0.3, 0.38));
|
|
181
208
|
// The neck: the collar goes round the back of the neck, and the opening is a V that ends under 10 cm below the sternum.
|
|
182
209
|
parts.push({ d: path([[26.4, 4.2], [37.6, 4.2], [33.4, 14]]), fill: INK, stroke: INK, w: 0.3, op: 0.62, line: "none" });
|
|
183
210
|
parts.push({ d: "M25.4 5.4Q32 2 38.6 5.4L37.6 8.2Q32 5.4 26.4 8.2Z", fill: "$main", cyl: 0.4, shade: 0.3 });
|
|
@@ -241,6 +268,109 @@ export const GEAR_JUDOGI = /* @__PURE__ */ drawn("gear:judogi", "Judo suit", "
|
|
|
241
268
|
export const GEAR_JUDOGI_BLUE = /* @__PURE__ */ drawn("gear:judogi-blue", "Blue judo suit", "青い柔道衣", { main: JUDOGI_BLUE, accent: OBI_RANKS.black, parts: judogiFlat() });
|
|
242
269
|
export const GEAR_JUDOGI_FOLDED = /* @__PURE__ */ drawn("gear:judogi-folded", "Folded judo suit", "畳んだ柔道衣", { main: JUDOGI_WHITE, accent: OBI_RANKS.black, parts: judogiFolded() });
|
|
243
270
|
export const GEAR_JUDOGI_BLUE_FOLDED = /* @__PURE__ */ drawn("gear:judogi-blue-folded", "Folded blue judo suit", "畳んだ青い柔道衣", { main: JUDOGI_BLUE, accent: OBI_RANKS.black, parts: judogiFolded() });
|
|
271
|
+
// ───────────────────────────── the judogi from behind, with its back number ─────────────────────────────
|
|
272
|
+
/** The bands of the back number (IJF C1.8): blue for everyone, gold for an Olympic champion and red for a world champion while the title is held. Each with the ink of the family name and the ink of the country code. */
|
|
273
|
+
const BAND = {
|
|
274
|
+
blue: { band: "#26318f", name: "#fefefe", code: "#26318f" },
|
|
275
|
+
gold: { band: "#d8a31a", name: "#1b2430", code: "#1b2430" },
|
|
276
|
+
red: { band: "#c4202e", name: "#fefefe", code: "#c4202e" },
|
|
277
|
+
};
|
|
278
|
+
/** The white of the patch. */
|
|
279
|
+
const PATCH_WHITE = "#fcfcf9";
|
|
280
|
+
/** The back number's size and place, in this drawing's units: the large one is 38 cm wide and 39 cm high (the manual of the IJF's partner, docs/references.md), and the jacket's 27.2 units across stand for about 60 cm. */
|
|
281
|
+
const BACKNUMBER = { x0: 23.4, x1: 40.6, y0: 8.4, y1: 26.1 };
|
|
282
|
+
const cleanName = (value) => typeof value === "string" ? value.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toUpperCase().replace(/[^A-Z0-9 '-]/g, "").replace(/\s+/g, " ").trim().slice(0, 16) : "";
|
|
283
|
+
const cleanCode = (value) => (typeof value === "string" ? value.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toUpperCase().replace(/[^A-Z]/g, "").slice(0, 3) : "");
|
|
284
|
+
/** A dashed line round the edge of a rectangle, `inset` in from it: the stitching that holds the patch on. */
|
|
285
|
+
function stitches(x0, y0, x1, y1, inset, dash = 0.9, gap = 0.75) {
|
|
286
|
+
let d = "";
|
|
287
|
+
const run = (xa, ya, xb, yb) => {
|
|
288
|
+
const len = Math.hypot(xb - xa, yb - ya);
|
|
289
|
+
for (let t = 0; t < len - 0.2; t += dash + gap) {
|
|
290
|
+
const e = Math.min(t + dash, len);
|
|
291
|
+
d += `M${f(xa + ((xb - xa) * t) / len)} ${f(ya + ((yb - ya) * t) / len)}L${f(xa + ((xb - xa) * e) / len)} ${f(ya + ((yb - ya) * e) / len)}`;
|
|
292
|
+
}
|
|
293
|
+
};
|
|
294
|
+
const a = x0 + inset, b = x1 - inset, c = y0 + inset, e = y1 - inset;
|
|
295
|
+
run(a, c, b, c);
|
|
296
|
+
run(b, c, b, e);
|
|
297
|
+
run(b, e, a, e);
|
|
298
|
+
run(a, e, a, c);
|
|
299
|
+
return d;
|
|
300
|
+
}
|
|
301
|
+
/**
|
|
302
|
+
* The back number as parts: a white patch with the family name in white capitals on a band across the top (the band arched), the three letters of the National Olympic Committee in capitals under it, and the rest
|
|
303
|
+
* of the patch blank, where the event's sponsor goes. A small square at the left edge stands for the label that makes it authentic. No flag (the IJF's patch has none), no logo, no mark of the IJF or of the maker.
|
|
304
|
+
*/
|
|
305
|
+
function backnumberParts(back) {
|
|
306
|
+
const parts = [];
|
|
307
|
+
const { x0, x1, y0, y1 } = BACKNUMBER;
|
|
308
|
+
const w = x1 - x0, cx = (x0 + x1) / 2;
|
|
309
|
+
const colours = BAND[back?.band === "gold" || back?.band === "red" ? back.band : "blue"];
|
|
310
|
+
const name = back?.name === undefined ? "TANAKA" : cleanName(back.name);
|
|
311
|
+
const code = back?.code === undefined ? "JPN" : cleanCode(back.code);
|
|
312
|
+
parts.push({ d: rect(x0, y0, w, y1 - y0, 0.3), fill: PATCH_WHITE, stroke: "#7d8594", w: 0.45, shade: 0.12 });
|
|
313
|
+
parts.push(dark(stitches(x0, y0, x1, y1, 0.5), 0.26, 0.45));
|
|
314
|
+
parts.push({ d: `M${x0} ${f(y0 + 0.9)}Q${f(cx)} ${f(y0 - 0.5)} ${x1} ${f(y0 + 0.9)}L${x1} ${f(y0 + 4.6)}Q${f(cx)} ${f(y0 + 3.4)} ${x0} ${f(y0 + 4.6)}Z`, fill: colours.band, stroke: colours.band, w: 0.3, shade: 0 });
|
|
315
|
+
const letters = { weight: 0.2, wide: 0.78 };
|
|
316
|
+
const nameSize = fitSize(name, letters, w - 3, 2.8);
|
|
317
|
+
if (name !== "")
|
|
318
|
+
parts.push({ d: linePath(name, { ...letters, size: nameSize }, cx, y0 + 2.4), fill: "none", stroke: colours.name, w: letters.weight * nameSize });
|
|
319
|
+
const codeLetters = { weight: 0.24, wide: 1.05 };
|
|
320
|
+
const codeSize = fitSize(code, codeLetters, 10, 3.2);
|
|
321
|
+
if (code !== "")
|
|
322
|
+
parts.push({ d: linePath(code, { ...codeLetters, size: codeSize }, cx, y0 + 8.4), fill: "none", stroke: colours.code, w: codeLetters.weight * codeSize });
|
|
323
|
+
parts.push({ d: rect(x0 + 0.9, y0 + 7.6, 1.3, 1.3), fill: "#1b2430", stroke: "none", shade: 0, line: "ink" });
|
|
324
|
+
return parts;
|
|
325
|
+
}
|
|
326
|
+
/** The judogi laid flat and seen from behind: collar, the back of the jacket with the back number sewn on it (its top 3 cm under the collar), the belt crossed behind the waist and the trousers. `$main` is the cloth, `$accent` the belt. */
|
|
327
|
+
function judogiBack(back) {
|
|
328
|
+
const parts = [];
|
|
329
|
+
const trousers = [[18.4, 37], [45.6, 37], [46.6, 62], [34.6, 62], [32, 43.6], [29.4, 62], [17.4, 62]];
|
|
330
|
+
parts.push({ d: path(trousers), fill: "$main", shade: 0.3, cyl: 0.25 });
|
|
331
|
+
parts.push({ d: path([[18.4, 37], [45.6, 37], [45.7, 39.8], [18.3, 39.8]]), fill: "$main", shade: 0.2 });
|
|
332
|
+
parts.push(dark("M18.6 38.9H45.4", 0.3, 0.35));
|
|
333
|
+
parts.push(dark("M17.6 60.2H29.6M34.4 60.2H46.4M32 39.8V43.4", 0.3, 0.3));
|
|
334
|
+
const sleeve = JUDOGI_SLEEVE;
|
|
335
|
+
for (const pts of [sleeve, mirror(sleeve)])
|
|
336
|
+
parts.push({ d: path(pts), fill: "$main", cyl: 0.15, shade: 0.35 });
|
|
337
|
+
const jacket = [[19.4, 6.6], [26.2, 4], [32, 3.2], [37.8, 4], [44.6, 6.6], [45.6, 8], [45.6, 36], [18.4, 36], [18.4, 8]];
|
|
338
|
+
parts.push({ d: path(jacket), fill: "$main", shade: 0.35, cyl: 0.18 });
|
|
339
|
+
parts.push(dark(rows([[19, 7], [45, 7], [45.6, 35], [18.4, 35]], 9, 34, 1.4, 0.5), 0.28, 0.1));
|
|
340
|
+
parts.push(light(rows([[19, 7], [45, 7], [45.6, 35], [18.4, 35]], 9.5, 34.5, 1.4, 0.5), 0.24, 0.2));
|
|
341
|
+
for (const pts of [sleeve, mirror(sleeve)])
|
|
342
|
+
parts.push(dark(sleeveRows(pts), 0.28, 0.1));
|
|
343
|
+
for (const pts of [sleeve, mirror(sleeve)])
|
|
344
|
+
parts.push(dark(cuffHem(pts), 0.3, 0.38));
|
|
345
|
+
parts.push(dark("M18.8 34.4H44.8", 0.3, 0.32));
|
|
346
|
+
parts.push(dark("M20.2 31.4V36M43.8 31.4V36", 0.4, 0.45));
|
|
347
|
+
parts.push(...backnumberParts(back));
|
|
348
|
+
// The collar goes round the back of the neck: a thick, stitched band.
|
|
349
|
+
parts.push({ d: "M24.6 5.4Q32 2 39.4 5.4L38.8 8.2Q32 5.6 25.2 8.2Z", fill: "$main", cyl: 0.4, shade: 0.3 });
|
|
350
|
+
parts.push(dark("M25.2 6.9Q32 4.2 38.8 6.9", 0.28, 0.4));
|
|
351
|
+
// The belt, crossed behind the waist: two wraps, and the two turns that cross in the middle of the back.
|
|
352
|
+
const edge = { stroke: BELT_EDGE, cyl: 0.5, shade: 0.25 };
|
|
353
|
+
parts.push({ d: path([[18.2, 27.2], [45.8, 27.2], [45.8, 29.7], [18.2, 29.7]]), fill: "$accent", ...edge });
|
|
354
|
+
parts.push({ d: path([[18.2, 29.4], [45.8, 29.4], [45.8, 31.9], [18.2, 31.9]]), fill: "$accent", ...edge });
|
|
355
|
+
parts.push({ d: path(strip([28.4, 27.2], [35.6, 31.9], 2.5)), fill: "$accent", ...edge });
|
|
356
|
+
parts.push({ d: path(strip([35.6, 27.2], [28.4, 31.9], 2.5)), fill: "$accent", ...edge });
|
|
357
|
+
parts.push(dark("M18.6 28.4H27M37 28.4H45.4M18.6 30.6H27M37 30.6H45.4", 0.26, 0.3));
|
|
358
|
+
return parts;
|
|
359
|
+
}
|
|
360
|
+
/** The title of a back view: its name, then (when the call gave a back number) the family name and the country code that are on it. */
|
|
361
|
+
const backTitle = (en, back) => {
|
|
362
|
+
if (back === undefined)
|
|
363
|
+
return en;
|
|
364
|
+
const name = back.name === undefined ? "TANAKA" : cleanName(back.name);
|
|
365
|
+
const code = back.code === undefined ? "JPN" : cleanCode(back.code);
|
|
366
|
+
return [en, `${name} ${code}`.trim()].filter((t) => t !== "").join(", ");
|
|
367
|
+
};
|
|
368
|
+
const backPiece = (id, en, ja, main) => {
|
|
369
|
+
const spec = { main, accent: OBI_RANKS.black, parts: judogiBack(undefined) };
|
|
370
|
+
return defineGear({ id, en, ja, source: "drawn", model: spec, draw: (o) => drawGear(id, backTitle(en, o?.backnumber), { ...spec, parts: o?.backnumber === undefined ? spec.parts : judogiBack(o.backnumber) }, o) });
|
|
371
|
+
};
|
|
372
|
+
export const GEAR_JUDOGI_BACK = /* @__PURE__ */ backPiece("gear:judogi-back", "Judo suit, back view", "柔道衣の背面", JUDOGI_WHITE);
|
|
373
|
+
export const GEAR_JUDOGI_BLUE_BACK = /* @__PURE__ */ backPiece("gear:judogi-blue-back", "Blue judo suit, back view", "青い柔道衣の背面", JUDOGI_BLUE);
|
|
244
374
|
// ───────────────────────────── the karate-gi ─────────────────────────────
|
|
245
375
|
/** The karate-gi laid flat: lighter cloth (no quilting), a plain narrow collar, shorter jacket and sleeves than the judogi, tie strings, ankle-length trousers and the belt. `$main` is the cloth, `$accent` the belt. */
|
|
246
376
|
function karateFlat() {
|
|
@@ -251,10 +381,12 @@ function karateFlat() {
|
|
|
251
381
|
parts.push(dark("M19.6 41.4H44.4", 0.3, 0.3));
|
|
252
382
|
parts.push({ d: "M26 41.8Q24.4 44.6 25.4 47M27.6 41.8Q28.4 44.4 27.4 46.8", fill: "none", stroke: INK, w: 0.35, op: 0.45, line: "none" });
|
|
253
383
|
parts.push(dark("M18.8 60H29.6M34.4 60H45.2", 0.3, 0.25));
|
|
254
|
-
// Sleeves reach the bend of the wrist at most (WKF 2.2.1 j),
|
|
255
|
-
const sleeve =
|
|
384
|
+
// Sleeves reach the bend of the wrist at most and halfway down the forearm at least (WKF 2.2.1 j): three-quarter length, a little shorter than a judogi's, with a wide cuff.
|
|
385
|
+
const sleeve = KARATE_SLEEVE;
|
|
256
386
|
for (const pts of [sleeve, mirror(sleeve)])
|
|
257
387
|
parts.push({ d: path(pts), fill: "$main", shade: 0.3, cyl: 0.12 });
|
|
388
|
+
for (const pts of [sleeve, mirror(sleeve)])
|
|
389
|
+
parts.push(dark(cuffHem(pts, 0.88), 0.3, 0.3));
|
|
258
390
|
const jacket = [[20.2, 8], [26.6, 5.2], [32, 4.4], [37.4, 5.2], [43.8, 8], [44.8, 38.6], [19.2, 38.6]];
|
|
259
391
|
parts.push({ d: path(jacket), fill: "$main", shade: 0.3, cyl: 0.15 });
|
|
260
392
|
// Neck: a wide V that ends lower than the judogi's, a plain thin collar.
|
|
@@ -17,10 +17,10 @@ import { GEAR_STARTING_BLOCKS, GEAR_RELAY_BATON, GEAR_JAVELIN, GEAR_HURDLES } fr
|
|
|
17
17
|
import { GEAR_DIVING_BOARD, GEAR_SWIM_GOGGLES } from "./gear.water.js";
|
|
18
18
|
import { GEAR_GUNBAI, GEAR_MAWASHI } from "./gear.sumo.js";
|
|
19
19
|
import { GEAR_SHINAI, GEAR_KENDO_MEN } from "./gear.kendo.js";
|
|
20
|
-
import { GEAR_JUDOGI, GEAR_JUDOGI_BLUE, GEAR_JUDOGI_FOLDED, GEAR_JUDOGI_BLUE_FOLDED, GEAR_KARATE_GI, GEAR_OBI, GEAR_OBI_WHITE, GEAR_OBI_YELLOW, GEAR_OBI_ORANGE, GEAR_OBI_GREEN, GEAR_OBI_BLUE, GEAR_OBI_BROWN, GEAR_OBI_KOHAKU, GEAR_OBI_RED, GEAR_OBI_WOMEN, GEAR_OBI_WHITE_YELLOW, GEAR_OBI_YELLOW_ORANGE, GEAR_OBI_ORANGE_GREEN, GEAR_OBI_GREEN_BLUE, GEAR_OBI_BLUE_BROWN } from "./gear.budo.js";
|
|
20
|
+
import { GEAR_JUDOGI, GEAR_JUDOGI_BLUE, GEAR_JUDOGI_FOLDED, GEAR_JUDOGI_BLUE_FOLDED, GEAR_JUDOGI_BACK, GEAR_JUDOGI_BLUE_BACK, GEAR_KARATE_GI, GEAR_OBI, GEAR_OBI_WHITE, GEAR_OBI_YELLOW, GEAR_OBI_ORANGE, GEAR_OBI_GREEN, GEAR_OBI_BLUE, GEAR_OBI_BROWN, GEAR_OBI_KOHAKU, GEAR_OBI_RED, GEAR_OBI_WOMEN, GEAR_OBI_WHITE_YELLOW, GEAR_OBI_YELLOW_ORANGE, GEAR_OBI_ORANGE_GREEN, GEAR_OBI_GREEN_BLUE, GEAR_OBI_BLUE_BROWN } from "./gear.budo.js";
|
|
21
21
|
import { GEAR_YUMI, GEAR_YA } from "./gear.kyudo.js";
|
|
22
22
|
/** Every piece of gear, in the order a gallery shows them. */
|
|
23
|
-
export const GEARS = [GEAR_HOCKEY_STICK, GEAR_GOALIE_STICK, GEAR_HOCKEY_SKATE, GEAR_GOALIE_MASK, GEAR_GOAL_NET, GEAR_FIELD_HOCKEY_STICK, GEAR_LACROSSE_STICK, GEAR_CRICKET_BAT, GEAR_WICKET, GEAR_TABLE_TENNIS_PADDLE, GEAR_BADMINTON_RACKET, GEAR_TENNIS_RACKET, GEAR_SQUASH_RACKET, GEAR_RACQUETBALL_RACKET, GEAR_PADEL_RACKET, GEAR_PICKLEBALL_PADDLE, GEAR_ROUNDNET_SET, GEAR_VOLLEYBALL_NET, GEAR_BASKETBALL_HOOP, GEAR_BASEBALL_BAT, GEAR_BASEBALL_GLOVE, GEAR_FOOTBALL_HELMET, GEAR_GOALPOSTS, GEAR_HURLEY, GEAR_CURLING_BROOM, GEAR_FIGURE_SKATE, GEAR_SPEED_SKATE, GEAR_DIVING_BOARD, GEAR_SWIM_GOGGLES, GEAR_STARTING_BLOCKS, GEAR_RELAY_BATON, GEAR_JAVELIN, GEAR_HURDLES, GEAR_GUNBAI, GEAR_MAWASHI, GEAR_SHINAI, GEAR_KENDO_MEN, GEAR_JUDOGI, GEAR_JUDOGI_BLUE, GEAR_JUDOGI_FOLDED, GEAR_JUDOGI_BLUE_FOLDED, GEAR_OBI, GEAR_OBI_WHITE, GEAR_OBI_YELLOW, GEAR_OBI_ORANGE, GEAR_OBI_GREEN, GEAR_OBI_BLUE, GEAR_OBI_BROWN, GEAR_OBI_KOHAKU, GEAR_OBI_RED, GEAR_OBI_WOMEN, GEAR_OBI_WHITE_YELLOW, GEAR_OBI_YELLOW_ORANGE, GEAR_OBI_ORANGE_GREEN, GEAR_OBI_GREEN_BLUE, GEAR_OBI_BLUE_BROWN, GEAR_YUMI, GEAR_YA, GEAR_KARATE_GI];
|
|
23
|
+
export const GEARS = [GEAR_HOCKEY_STICK, GEAR_GOALIE_STICK, GEAR_HOCKEY_SKATE, GEAR_GOALIE_MASK, GEAR_GOAL_NET, GEAR_FIELD_HOCKEY_STICK, GEAR_LACROSSE_STICK, GEAR_CRICKET_BAT, GEAR_WICKET, GEAR_TABLE_TENNIS_PADDLE, GEAR_BADMINTON_RACKET, GEAR_TENNIS_RACKET, GEAR_SQUASH_RACKET, GEAR_RACQUETBALL_RACKET, GEAR_PADEL_RACKET, GEAR_PICKLEBALL_PADDLE, GEAR_ROUNDNET_SET, GEAR_VOLLEYBALL_NET, GEAR_BASKETBALL_HOOP, GEAR_BASEBALL_BAT, GEAR_BASEBALL_GLOVE, GEAR_FOOTBALL_HELMET, GEAR_GOALPOSTS, GEAR_HURLEY, GEAR_CURLING_BROOM, GEAR_FIGURE_SKATE, GEAR_SPEED_SKATE, GEAR_DIVING_BOARD, GEAR_SWIM_GOGGLES, GEAR_STARTING_BLOCKS, GEAR_RELAY_BATON, GEAR_JAVELIN, GEAR_HURDLES, GEAR_GUNBAI, GEAR_MAWASHI, GEAR_SHINAI, GEAR_KENDO_MEN, GEAR_JUDOGI, GEAR_JUDOGI_BLUE, GEAR_JUDOGI_FOLDED, GEAR_JUDOGI_BLUE_FOLDED, GEAR_JUDOGI_BACK, GEAR_JUDOGI_BLUE_BACK, GEAR_OBI, GEAR_OBI_WHITE, GEAR_OBI_YELLOW, GEAR_OBI_ORANGE, GEAR_OBI_GREEN, GEAR_OBI_BLUE, GEAR_OBI_BROWN, GEAR_OBI_KOHAKU, GEAR_OBI_RED, GEAR_OBI_WOMEN, GEAR_OBI_WHITE_YELLOW, GEAR_OBI_YELLOW_ORANGE, GEAR_OBI_ORANGE_GREEN, GEAR_OBI_GREEN_BLUE, GEAR_OBI_BLUE_BROWN, GEAR_YUMI, GEAR_YA, GEAR_KARATE_GI];
|
|
24
24
|
/** The id of every piece of gear: `"gear:hockey-stick"`. */
|
|
25
25
|
export const GEAR_IDS = GEARS.map((g) => g.id);
|
|
26
26
|
const TABLE = new Map(GEARS.map((g) => [g.id, g]));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Judo: a pictogram of the judogi, drawn for this package in a 64 by 64 box: the jacket with its sleeves out, the lapels crossed left over right, the belt tied in a flat knot with the two ends hanging, and the trousers.
|
|
1
|
+
// Judo: a pictogram of the judogi, drawn for this package in a 64 by 64 box: the jacket with its sleeves hanging out and down to the wrist (a judogi has no short sleeves: IJF C1.10), the lapels crossed left over right, the belt tied in a flat knot with the two ends hanging, and the trousers.
|
|
2
2
|
// The metal style paints its main shapes with a grey sheet, the line style draws one outline.
|
|
3
3
|
import { bar, defineIcon } from "../emblem.shapes.js";
|
|
4
4
|
/** Judo. */
|
|
@@ -7,10 +7,10 @@ export const SPORT_JUDO = /* @__PURE__ */ defineIcon("sport:judo", "Judo", "柔
|
|
|
7
7
|
ink: true,
|
|
8
8
|
front: [
|
|
9
9
|
["m", "M18.6 38H45.4L47.2 60H34.4L32 45.4L29.6 60H16.8Z"],
|
|
10
|
-
["m", "M26 6Q32 3.8 38 6L45
|
|
10
|
+
["m", "M26 6Q32 3.8 38 6L45 9L61 38.4L51.2 43L46.4 27L46 39H18L17.6 27L12.8 43L3 38.4L19 9Z"],
|
|
11
11
|
["k", "M27 5.6H37L32.8 16Z"],
|
|
12
12
|
["n", bar(37.2, 6.4, 24.8, 38, 4.6)],
|
|
13
|
-
["t", "M17.6
|
|
13
|
+
["t", "M17.6 27L18 38M46.4 27L46 38M5 35.6L14 39.8M59 35.6L50 39.8"],
|
|
14
14
|
["k", "M17.8 27.6H46.2V32H17.8Z"],
|
|
15
15
|
["k", "M28 26.4H36V33H28Z"],
|
|
16
16
|
["k", "M29.4 32L26.6 46h4.4L32.6 32zM34.6 32L37.4 46h-4.4L31.4 32z"],
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Karate: a pictogram of the karate-gi, drawn for this package in a 64 by 64 box: a lighter suit than the judogi's, with
|
|
1
|
+
// Karate: a pictogram of the karate-gi, drawn for this package in a 64 by 64 box: a lighter suit than the judogi's, with three-quarter sleeves (WKF 2.2.1 j), a wide V of plain lapels, a short jacket, a belt tied low with its ends hanging
|
|
2
2
|
// and straight trousers. The metal style paints its main shapes with a grey sheet, the line style draws one outline.
|
|
3
3
|
import { bar, defineIcon } from "../emblem.shapes.js";
|
|
4
4
|
/** Karate. */
|
|
@@ -7,7 +7,7 @@ export const SPORT_KARATE = /* @__PURE__ */ defineIcon("sport:karate", "Karate",
|
|
|
7
7
|
ink: true,
|
|
8
8
|
front: [
|
|
9
9
|
["m", "M20 36H44L45.6 61H34.6L32 46L29.4 61H18.4Z"],
|
|
10
|
-
["m", "M26 6Q32 3.8 38 6L45 8.
|
|
10
|
+
["m", "M26 6Q32 3.8 38 6L45 8.6L62.2 32.9L54.9 38.1L45.4 23L45 40H19L18.6 23L9.1 38.1L1.8 32.9L19 8.6Z"],
|
|
11
11
|
["k", "M27 5.6H37L32 20Z"],
|
|
12
12
|
["n", bar(37, 6.4, 24, 40, 3)],
|
|
13
13
|
["k", "M18.8 31H45.2V35.4H18.8Z"],
|
package/dist/emblems-entry.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export { EMBLEM_INK, EMBLEM_PAGE, EMBLEM_STYLES, METALS } from "./emblems/emblem
|
|
|
8
8
|
export type { Emblem, EmblemKind, EmblemLocale, EmblemOptions, EmblemSource, EmblemStyle, EmblemTheme, FrameOptions } from "./emblems/emblem.core.ts";
|
|
9
9
|
export { lineup } from "./emblems/ball/ball.index.ts";
|
|
10
10
|
export type { LineupOptions } from "./emblems/ball/ball.index.ts";
|
|
11
|
-
export type { PieceSize } from "./emblems/ball/ball.core.ts";
|
|
11
|
+
export type { Backnumber, PieceSize } from "./emblems/ball/ball.core.ts";
|
|
12
12
|
export type { Ball, BallKind, Decor, Handle, LatheModel, Poles, Pt, Solid } from "./emblems/emblem.lathe.ts";
|
|
13
13
|
export type { FlatModel, Role, Shape } from "./emblems/emblem.shapes.ts";
|
|
14
14
|
export { emblemSprite } from "./emblems/emblem.sprite.ts";
|
package/dist/index.d.ts
CHANGED
|
@@ -138,7 +138,7 @@ export { GEAR_STARTING_BLOCKS, GEAR_RELAY_BATON, GEAR_JAVELIN, GEAR_HURDLES } fr
|
|
|
138
138
|
export { GEAR_DIVING_BOARD, GEAR_SWIM_GOGGLES } from "./emblems/gear/gear.water.ts";
|
|
139
139
|
export { GEAR_GUNBAI, GEAR_MAWASHI } from "./emblems/gear/gear.sumo.ts";
|
|
140
140
|
export { GEAR_SHINAI, GEAR_KENDO_MEN } from "./emblems/gear/gear.kendo.ts";
|
|
141
|
-
export { GEAR_JUDOGI, GEAR_JUDOGI_BLUE, GEAR_JUDOGI_FOLDED, GEAR_JUDOGI_BLUE_FOLDED, GEAR_KARATE_GI, GEAR_OBI, GEAR_OBI_WHITE, GEAR_OBI_YELLOW, GEAR_OBI_ORANGE, GEAR_OBI_GREEN, GEAR_OBI_BLUE, GEAR_OBI_BROWN, GEAR_OBI_KOHAKU, GEAR_OBI_RED, GEAR_OBI_WOMEN, GEAR_OBI_WHITE_YELLOW, GEAR_OBI_YELLOW_ORANGE, GEAR_OBI_ORANGE_GREEN, GEAR_OBI_GREEN_BLUE, GEAR_OBI_BLUE_BROWN, JUDOGI_WHITE, JUDOGI_BLUE, OBI_RANKS, obi } from "./emblems/gear/gear.budo.ts";
|
|
141
|
+
export { GEAR_JUDOGI, GEAR_JUDOGI_BLUE, GEAR_JUDOGI_FOLDED, GEAR_JUDOGI_BLUE_FOLDED, GEAR_JUDOGI_BACK, GEAR_JUDOGI_BLUE_BACK, GEAR_KARATE_GI, GEAR_OBI, GEAR_OBI_WHITE, GEAR_OBI_YELLOW, GEAR_OBI_ORANGE, GEAR_OBI_GREEN, GEAR_OBI_BLUE, GEAR_OBI_BROWN, GEAR_OBI_KOHAKU, GEAR_OBI_RED, GEAR_OBI_WOMEN, GEAR_OBI_WHITE_YELLOW, GEAR_OBI_YELLOW_ORANGE, GEAR_OBI_ORANGE_GREEN, GEAR_OBI_GREEN_BLUE, GEAR_OBI_BLUE_BROWN, JUDOGI_WHITE, JUDOGI_BLUE, OBI_RANKS, obi } from "./emblems/gear/gear.budo.ts";
|
|
142
142
|
export type { ObiRank, ObiOptions } from "./emblems/gear/gear.budo.ts";
|
|
143
143
|
export { GEAR_YUMI, GEAR_YA } from "./emblems/gear/gear.kyudo.ts";
|
|
144
144
|
export { VERSION } from "./version.ts";
|
package/dist/index.js
CHANGED
|
@@ -139,6 +139,6 @@ export { GEAR_STARTING_BLOCKS, GEAR_RELAY_BATON, GEAR_JAVELIN, GEAR_HURDLES } fr
|
|
|
139
139
|
export { GEAR_DIVING_BOARD, GEAR_SWIM_GOGGLES } from "./emblems/gear/gear.water.js";
|
|
140
140
|
export { GEAR_GUNBAI, GEAR_MAWASHI } from "./emblems/gear/gear.sumo.js";
|
|
141
141
|
export { GEAR_SHINAI, GEAR_KENDO_MEN } from "./emblems/gear/gear.kendo.js";
|
|
142
|
-
export { GEAR_JUDOGI, GEAR_JUDOGI_BLUE, GEAR_JUDOGI_FOLDED, GEAR_JUDOGI_BLUE_FOLDED, GEAR_KARATE_GI, GEAR_OBI, GEAR_OBI_WHITE, GEAR_OBI_YELLOW, GEAR_OBI_ORANGE, GEAR_OBI_GREEN, GEAR_OBI_BLUE, GEAR_OBI_BROWN, GEAR_OBI_KOHAKU, GEAR_OBI_RED, GEAR_OBI_WOMEN, GEAR_OBI_WHITE_YELLOW, GEAR_OBI_YELLOW_ORANGE, GEAR_OBI_ORANGE_GREEN, GEAR_OBI_GREEN_BLUE, GEAR_OBI_BLUE_BROWN, JUDOGI_WHITE, JUDOGI_BLUE, OBI_RANKS, obi } from "./emblems/gear/gear.budo.js";
|
|
142
|
+
export { GEAR_JUDOGI, GEAR_JUDOGI_BLUE, GEAR_JUDOGI_FOLDED, GEAR_JUDOGI_BLUE_FOLDED, GEAR_JUDOGI_BACK, GEAR_JUDOGI_BLUE_BACK, GEAR_KARATE_GI, GEAR_OBI, GEAR_OBI_WHITE, GEAR_OBI_YELLOW, GEAR_OBI_ORANGE, GEAR_OBI_GREEN, GEAR_OBI_BLUE, GEAR_OBI_BROWN, GEAR_OBI_KOHAKU, GEAR_OBI_RED, GEAR_OBI_WOMEN, GEAR_OBI_WHITE_YELLOW, GEAR_OBI_YELLOW_ORANGE, GEAR_OBI_ORANGE_GREEN, GEAR_OBI_GREEN_BLUE, GEAR_OBI_BLUE_BROWN, JUDOGI_WHITE, JUDOGI_BLUE, OBI_RANKS, obi } from "./emblems/gear/gear.budo.js";
|
|
143
143
|
export { GEAR_YUMI, GEAR_YA } from "./emblems/gear/gear.kyudo.js";
|
|
144
144
|
export { VERSION } from "./version.js";
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.6.0";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "0.
|
|
1
|
+
export const VERSION = "0.6.0";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@johnmorrisdotca/dougu-sports",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "Dougu Sports 道具, sports emblems as SVG strings: trophies, medals, crests, sport icons, and the ball and gear of every sport, in metal, line or flat colour, with optional 3D turning. Light and dark, accessible, tree-shakeable. Zero dependencies.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"sports",
|