@johnmorrisdotca/dougu-sports 0.26.0 → 0.28.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 +45 -0
- package/README.md +3 -3
- package/dist/emblems/emblem.descriptions.js +16 -4
- package/dist/emblems/emblem.ids.d.ts +2 -2
- package/dist/emblems/emblem.ids.js +12 -0
- package/dist/emblems/emblem.lathe.d.ts +124 -4
- package/dist/emblems/emblem.lathe.js +28 -6
- package/dist/emblems/emblem.named.js +125 -5
- package/dist/emblems/emblem.registry.js +24 -0
- package/dist/emblems/lathe.ballrods.d.ts +2 -0
- package/dist/emblems/lathe.ballrods.js +155 -0
- package/dist/emblems/lathe.conference.d.ts +2 -0
- package/dist/emblems/lathe.conference.js +219 -0
- package/dist/emblems/lathe.extras.d.ts +3 -1
- package/dist/emblems/lathe.extras.js +77 -2
- package/dist/emblems/lathe.framed.d.ts +30 -0
- package/dist/emblems/lathe.framed.js +98 -0
- package/dist/emblems/lathe.sculpt.d.ts +6 -0
- package/dist/emblems/lathe.sculpt.js +320 -0
- package/dist/emblems/nba.parts.d.ts +27 -0
- package/dist/emblems/nba.parts.js +34 -0
- package/dist/emblems/trophy/bill-russell-trophy.d.ts +1 -1
- package/dist/emblems/trophy/bill-russell-trophy.js +17 -13
- package/dist/emblems/trophy/bob-cousy-trophy.d.ts +2 -0
- package/dist/emblems/trophy/bob-cousy-trophy.js +18 -0
- package/dist/emblems/trophy/calder-cup.js +4 -4
- package/dist/emblems/trophy/foundation-player-award.d.ts +2 -0
- package/dist/emblems/trophy/foundation-player-award.js +31 -0
- package/dist/emblems/trophy/george-halas-trophy.d.ts +2 -0
- package/dist/emblems/trophy/george-halas-trophy.js +6 -0
- package/dist/emblems/trophy/jackie-robinson-award.d.ts +2 -0
- package/dist/emblems/trophy/jackie-robinson-award.js +60 -0
- package/dist/emblems/trophy/kelly-cup.js +7 -6
- package/dist/emblems/trophy/lamar-hunt-trophy.d.ts +1 -1
- package/dist/emblems/trophy/lamar-hunt-trophy.js +5 -16
- package/dist/emblems/trophy/larry-bird-trophy.d.ts +2 -0
- package/dist/emblems/trophy/larry-bird-trophy.js +23 -0
- package/dist/emblems/trophy/larry-obrien-trophy-1977.d.ts +2 -0
- package/dist/emblems/trophy/larry-obrien-trophy-1977.js +23 -0
- package/dist/emblems/trophy/larry-obrien-trophy.d.ts +1 -1
- package/dist/emblems/trophy/larry-obrien-trophy.js +18 -11
- package/dist/emblems/trophy/magic-johnson-trophy.d.ts +2 -0
- package/dist/emblems/trophy/magic-johnson-trophy.js +20 -0
- package/dist/emblems/trophy/messier-leadership-award.d.ts +2 -0
- package/dist/emblems/trophy/messier-leadership-award.js +79 -0
- package/dist/emblems/trophy/nba-eastern-conference-2001.d.ts +2 -0
- package/dist/emblems/trophy/nba-eastern-conference-2001.js +18 -0
- package/dist/emblems/trophy/nba-western-conference-2001.d.ts +2 -0
- package/dist/emblems/trophy/nba-western-conference-2001.js +19 -0
- package/dist/emblems/trophy/oscar-robertson-trophy.d.ts +2 -0
- package/dist/emblems/trophy/oscar-robertson-trophy.js +19 -0
- package/dist/emblems/trophy/willie-oree-award.d.ts +2 -0
- package/dist/emblems/trophy/willie-oree-award.js +55 -0
- package/dist/emblems/trophy/wnba-championship-trophy.d.ts +1 -1
- package/dist/emblems/trophy/wnba-championship-trophy.js +6 -17
- package/dist/index.d.ts +12 -0
- package/dist/index.js +12 -0
- 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,51 @@ All notable changes to this project are written here. The format follows
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.28.0] - 2026-10-30
|
|
10
|
+
|
|
11
|
+
More league awards: the Jackie Robinson Rookie of the Year plaque, the NFC's Halas Trophy and the Mark Messier and Willie O'Ree awards, the NBA's postseason trophies, and redrawn WNBA, Lamar Hunt, Larry O'Brien and Bill Russell trophies.
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- **`trophy:jackie-robinson-award`**: the Jackie Robinson Rookie of the Year Award of Major League Baseball, the walnut plaque used since at least 1989: a board three quarters as wide as it is tall with a slight bevel, a black nameplate edged in gold, a gold emblem (a ribbon banner over a diamond badge, with two bats crossed behind it), a raised gold frame round a bronze relief of a play at the plate (an umpire with his arms spread, a catcher in his gear, a runner sliding in with his cap flying), a black plate and a small green pin. A flat plaque with a back and a coin-flip turn, so the side profile shows the board's thickness. Measured on photographs John supplied (looked at, never copied; no lettering, banner text, league mark or engraving: the plates are blank). The relief is three simplified silhouettes of a few dozen points each, so it is approximate; the 1940s shield-shaped plaque is not drawn. 346 emblems, 90 trophies.
|
|
16
|
+
- **`trophy:george-halas-trophy`**: the George Halas Trophy of the NFC champion, an open football of polished silver that stands on its tip leaning back, on a round flared base with a black foot and a bright flat cut at its front. The football is a front plate with seven slots where the laces are, a narrower neck below them with a satin point, and two curved bands that make the ring. It is drawn in 3D parts, so it turns: the plate in front, the bands curving away behind it, a side profile, a back. Line, metal and colour styles, light and dark. Measured on John's photographs (looked at, never copied or traced); no shield, conference letters or engraving. The base takes the `engrave` option.
|
|
17
|
+
- **The NBA's postseason trophies of 2022, and the ones they replaced**, each measured on photographs of the real ones (looked at, never copied; no freely licensed photograph exists), with a basketball whose seams are grooves and whose finish can be grained, and a body that sets its ball forward from the axis. No lettering, logo or name on any drawing.
|
|
18
|
+
- **`trophy:oscar-robertson-trophy`** and **`trophy:bob-cousy-trophy`**: the Western and Eastern Conference champions' trophies, a large silver ball in crossed gold bands over a gold dome, or on three gold posts over a dish, on a round stepped black and gold base.
|
|
19
|
+
- **`trophy:magic-johnson-trophy`** and **`trophy:larry-bird-trophy`**: the Western and Eastern Conference finals MVP trophies (given from 2022), twins of the two above on a tall flared gold trumpet etched with a diamond net.
|
|
20
|
+
- **`trophy:larry-obrien-trophy-1977`**: the Larry O'Brien Championship Trophy as given from 1977-78 to 2020-21, a smooth gold ball set forward on a tapering gold vase with a net over its lower half, on a black ring and a square plinth.
|
|
21
|
+
- **`trophy:nba-western-conference-2001`** and **`trophy:nba-eastern-conference-2001`**: the conference champions' trophies as given from 2001 to 2021, before they were named, with a grained ball and a black and polished silver base.
|
|
22
|
+
- `docs/trophy-audit.md` says which years each trophy covers, so a site can choose by season.
|
|
23
|
+
- New in the model: `nba`, `seam`, `lean`, `grain` and `fwd` on a ball (drawn by `LATHE_BALL`, taken only by the models that use them), and a tone and a line width on `mesh`. 343 emblems, 87 trophies.
|
|
24
|
+
- **`trophy:messier-leadership-award`**: the Mark Messier NHL Leadership Award, a polished silver cut-out of a skater in a skating stance with his stick low to the right, four more of the same cut-out stacked behind it and stepping back in depth, on a black base of a foot, a lip and two tiers with polished rims, a blank silver nameplate on the upper tier and two rows of five small silver jerseys on the front of the lower one (and two rows of three on each side). The player is an original smooth-curve silhouette of a crouching skater (rounded helmet, sloped shoulders, padded arms, both gloves on the stick, bent knees, skates apart with blades), fitted to the photograph at 1:1 and not a trace. Measured on five photographs John supplied (looked at, never copied). The nameplate takes the `engrave` option. 9.9 kB of markup in the metal style, 3.1 kB in line, 9.2 kB in colour (held to its own larger limit); it turns, the cut-outs show as thin plates edge on, and the base is a set of boxes with lit faces.
|
|
25
|
+
- **`trophy:willie-oree-award`**: the Willie O'Ree Community Hero Award, a gold fedora (a pinched, two-lobed crown with a band and a small bow on a wide brim) on three broad gold ribbons, each about a third of the brim's width, that twist and cross as they spread toward a round stepped gold base, whose gold drum carries four black plates (the front one takes the `engrave` option). The ribbons are strips of shaded quadrilaterals drawn by the new `ribbon` part, their centre lines and widths fitted to the front photograph at 1:1; they turn with the base, so the twist reads from every side. Measured on six photographs John supplied (looked at, never copied); the ribbons and plates are blank. 8.1 kB of markup in the metal style, 2.9 kB in line, 7.0 kB in colour.
|
|
26
|
+
- **A box part** (`kind: "box"`, `rim`), **decals** (`decal`, `fine`, `plate` for engraved text on a face) and the flat `fl` fill for the cut-outs of a lathe model. 346 emblems, 90 trophies, 65 named.
|
|
27
|
+
|
|
28
|
+
### Changed
|
|
29
|
+
|
|
30
|
+
- A body of revolution leaves out the gradients that nothing paints with (a tone asked for only its colour by a box or a shade): the definitions of a lathe emblem are smaller, by 0.2 to 1.3 kB for the ones that had unused tones, and the drawings are the same.
|
|
31
|
+
- **`trophy:wnba-championship-trophy`** is redrawn as the trophy of today (the design used since 2023): a polished silver basketball with its seams cut as grooves, held up on a tripod of three thin rods, each in its own collar near a corner of a low, rounded, triangular plinth with bevelled sides (two at the front corners, one at the back). The rods are long, from the plinth to the ball's underside about two and a fifth ball widths, and lean together to one point under the ball, so from the front they make a tall narrow triangle; the whole tripod leans forward about 18 degrees, which puts the ball forward of the plinth's centre, and the plinth is about a third wider than the ball. It is drawn in 3D parts (`src/emblems/lathe.ballrods.ts`), so the rods and the plinth turn with it, and the front of the plinth takes the `engrave` option. Measured on two photographs from Wikimedia Commons (CC BY-SA 4.0: File:Jaylyn Sharrrod.jpg and File:Sloot Trophy.png, both of the trophy carried and tilted) and on a description from John's own photographs; no maker's mark, league mark or lettering. Markup 6.2 kB in the metal style, 2.2 kB in line and 4.8 kB in colour. The earlier drawing (two tubes over a slab) was marked approximate. The WNBA Finals MVP trophy, a smaller trophy of the same design, is not drawn: no photograph close enough was found.
|
|
32
|
+
- **`trophy:george-halas-trophy`** and **`trophy:lamar-hunt-trophy`**: the base is taller and more flared, as in the photographs (about a fifth of the trophy's height with its black foot: a cone 12.8 units high and a foot 3.2, was 9.8 and 3.0), and its bright flat cut at the front runs down to the foot.
|
|
33
|
+
- **`trophy:lamar-hunt-trophy`** is redrawn as the same drawing as the Halas Trophy, because the two trophies are one design. It was a clear ring on a slab, drawn from a photograph of another object.
|
|
34
|
+
- A body of revolution can carry parts that are not bodies of revolution (`parts` in its model, `lathe.parts.ts`: a point turned and placed like the body's surface, polished-metal shading read off a small room, a smooth curve through a table of measurements), a thin edge (`edgeWidth`) and a cap on how far a turn may look from above (`maxElevation`). A cup that uses none carries none of it, and every other cup draws as before. The bundle of a cup grew by about 0.2 kB gzipped for the hook, and the two conference trophies add about 6.3 kB minified (2.6 kB gzipped) over a plain cup, because their facets are computed when drawn and not stored. Their markup is 11.9 kB in the metal style, 2.8 kB in line and 10.9 kB in colour (`FRAMED_LIMIT` in `test/emblem.test.ts`).
|
|
35
|
+
- **`trophy:larry-obrien-trophy`** is now the 2022 redesign: silver seams on the gold ball, which is set forward and touches the vase's rim, a silver net over the whole vase, and a base of two stacked round discs (the base was far too narrow before). Choose `trophy:larry-obrien-trophy-1977` for a season before 2021-22.
|
|
36
|
+
- The Japanese name of `trophy:larry-obrien-trophy` is now `ラリー・オブライエン・トロフィー` (it lacked the first name); reviewed.
|
|
37
|
+
- **The Larry O'Brien vase leans.** In both designs the vase is oblique: one edge near vertical, the other slanting out, the mouth forward of the foot and the ball set forward on that rim. A solid of a lathe model takes `lean: [k, deg, y0]` (a shear of the whole solid, so the net etching leans with it and the slant turns with the body) and a ball takes `dir` for the angle of `fwd`. The cup bundle grew by about 0.1 kB gzipped.
|
|
38
|
+
- **`trophy:bill-russell-trophy`** is redrawn on measurements of a clear photograph of the 2022 trophy: a wider flange, a longer and thinner waist, a stepped foot, silver seams on the ball and a silver net.
|
|
39
|
+
|
|
40
|
+
## [0.27.0] - 2026-10-30
|
|
41
|
+
|
|
42
|
+
A new NHL award, and two of the new cups redrawn closer to the photographs.
|
|
43
|
+
|
|
44
|
+
### Added
|
|
45
|
+
|
|
46
|
+
- **`trophy:foundation-player-award`**: the NHL Foundation Player Award, a tall block of clear crystal a little more than twice as tall as it is wide, with two long V-cut facets from its top corners down to a point near the bottom centre, drawn as two bright reflecting triangles, with the thin bright strips of the glass edges. Measured on photographs John supplied (looked at, never copied, not committed). The text is left off: plain glass. 2.6 kB of markup in the metal style, 0.5 kB in line, 1.2 kB in colour; the block turns with a solid glass edge and its depth, and shows its back mirrored.
|
|
47
|
+
- **Cut-outs and ribbons for a body of revolution** (`src/emblems/lathe.sculpt.ts`, `parts` and `sculptor` in a lathe model): a flat silhouette drawn from an original path and extruded, standing in a plane that turns with the body (it squeezes with the turn, shows its back and a solid edge, and clear glass is a convex slab), and a ribbon that twists as it rises. A model with no parts carries none of the code; a cup's bundle grows by about 20 bytes gzipped for the hook (the `lathe` size limit is 7.3 kB, was 7.1). No new runtime dependency.
|
|
48
|
+
|
|
49
|
+
### Fixed
|
|
50
|
+
|
|
51
|
+
- **`trophy:kelly-cup`**: the bowl is a straight-sided beaker as tall as it is wide, with two raised ring bands a third of the way down, a flat shelf under it, a short thick neck and a domed foot with a ring, on the first black drum; the handles are thinner straps. Compared with the photograph at 1:1.
|
|
52
|
+
- **`trophy:calder-cup`**: the bowl is a rounder, wider hemisphere under its laurel band, over a short chunky stem (a collar, a round knob and a narrow waist) and a stepped foot; the knob and foot were measured on John's photographs and the Commons photograph. The line style's stem follows the knob.
|
|
53
|
+
|
|
9
54
|
## [0.26.0] - 2026-10-30
|
|
10
55
|
|
|
11
56
|
Four league championship trophies, each measured on a photograph of the real one, for the big-game cards of a results site.
|
package/README.md
CHANGED
|
@@ -61,7 +61,7 @@ The ball and the gear of every sport, trophies, medals, crests and the icon of e
|
|
|
61
61
|
|
|
62
62
|
## The best of it
|
|
63
63
|
|
|
64
|
-
- **
|
|
64
|
+
- **66 famous trophies**, each a close likeness measured on a photograph and carrying no lettering, logo or mark: the Stanley Cup, the FIFA World Cup, the Lombardi Trophy, the Larry O'Brien trophy, the Grey Cup and the rest ([famous trophies](./docs/famous-trophies.md)).
|
|
65
65
|
|
|
66
66
|
<p align="center">
|
|
67
67
|
<picture>
|
|
@@ -110,7 +110,7 @@ The ball and the gear of every sport, trophies, medals, crests and the icon of e
|
|
|
110
110
|
|
|
111
111
|
- **On a phone**, and **turned by hand**: drag, arrow keys or the automatic turn ([turning](./docs/turning.md)).
|
|
112
112
|
|
|
113
|
-
> **Status: preview.**
|
|
113
|
+
> **Status: preview.** 346 emblems: 90 trophies, 6 awards, 6 medals, 4 crests, a pictogram for each of the 42 sports, 118 balls and implements drawn in 3D, 8 printed pucks ([docs/pucks.md](./docs/pucks.md)), 71 pieces of gear (among them the Japanese sports and budo, [docs/japanese-sports.md](./docs/japanese-sports.md)) and a championship pennant; [docs/layout.md](./docs/layout.md) says where each goes. All of it is drawn for this package: no art is copied from another project.
|
|
114
114
|
|
|
115
115
|
## In 30 seconds
|
|
116
116
|
|
|
@@ -676,7 +676,7 @@ Bug reports and ideas go in the [issues](https://github.com/johnmorrisdotca/doug
|
|
|
676
676
|
|
|
677
677
|
## Changes
|
|
678
678
|
|
|
679
|
-
See [CHANGELOG.md](./CHANGELOG.md). 0.26.0 adds four league championship trophies, drawn from photographs of the real ones: the Calder Cup of the AHL, the Kelly Cup of the ECHL, the MLS Cup and the College Football Playoff trophy (`trophy:calder-cup`, `trophy:kelly-cup`, `trophy:mls-cup`, `trophy:cfp-trophy`, 334 emblems); 0.25.0 adds two of baseball's awards, drawn from photographs of the real ones: the Hank Aaron Award and the Relief Man Award (`trophy:hank-aaron-award`, `trophy:relief-man-award`, 330 emblems); 0.24.0 adds a baseball cap (`gear:baseball-cap`, 328 emblems); 0.23.0 adds the Bill Russell Finals MVP Trophy, drawn from a photograph of the real one (`trophy:bill-russell-trophy`, 327 emblems); 0.22.0 takes out the award cups and the cap of the unpublished 0.17.0 to 0.21.0, which did not match the real objects; 0.16.0 adds a slotted plastic practice baseball (`ball:plastic-baseball-slotted`, 326 emblems: [docs/slotted-ball.md](./docs/slotted-ball.md)); 0.15.0 gives the pickleballs real holes, cut through the shell and drawn with the inside of the ball behind them, so the page shows through where two holes line up ([docs/pickleball.md](./docs/pickleball.md)); 0.14.0 lets the auto-turn go either way (`direction: "clockwise"` or `"counterclockwise"`, `setDirection()`); 0.13.0 adds a pictogram for each of four combat sports, MMA (a cage), boxing (a glove), wrestling (two wrestlers on the mat) and professional wrestling (a ring with ropes), in the three styles (326 emblems); 0.12.0 adds forty-seven named trophies, each a close likeness measured on a photograph (321 emblems); 0.11.0 gives the era soccer balls neutral ids (the old ones stay as aliases), new looks and a second 1980s ball (274 emblems); 0.10.0 adds a standalone ribbon and the nets and posts of sepak takraw, netball and teqball from their rulebooks' sizes (273 emblems); 0.9.0 lets the baseball, the softball and the classic soccer balls be painted and printed: solid and two-tone colours, a logo of your own wrapped onto the ball, stamped text, an original cursive word and a small mark, all turning with the ball ([docs/custom-balls.md](./docs/custom-balls.md)); 0.8.0 makes `bindTurn` light: it takes an emblem object and then needs no registry, so a turnable cup is about 9.4 kB gzipped instead of about 81 kB, and an id loads the registry on demand; 0.7.3 turns the build, docs and picture scripts, the browser tests and the demo's source from JavaScript into TypeScript, with no change to the package; 0.7.2 makes every docs page single-language (a page in Japanese beside each page that had Japanese words in it, and a test that holds them apart), with no change to the pictures; 0.7.1 puts real countries (Canada, Japan) in the crest and puck examples in place of made-up teams, with no change to the code; 0.7.0 gives the national volleyballs layouts that tell them apart (Japan a crimson band, Poland white above and red below, the USA a navy field), strengthens the 2010-style grooved soccer ball, and adds six pictures of how the judo belt is tied, `gear:obi-step-1` to `gear:obi-step-6` (269 emblems: [docs/obi-steps.md](./docs/obi-steps.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 (269 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.
|
|
679
|
+
See [CHANGELOG.md](./CHANGELOG.md). 0.28.0 adds the Jackie Robinson Rookie of the Year plaque (`trophy:jackie-robinson-award`), the Halas, Messier, O'Ree and NBA postseason trophies and redraws the WNBA, Lamar Hunt, Larry O'Brien and Bill Russell trophies (346 emblems); 0.27.0 adds the NHL Foundation Player Award (`trophy:foundation-player-award`, 335 emblems) and redraws the Kelly Cup and the Calder Cup closer to their photographs; 0.26.0 adds four league championship trophies, drawn from photographs of the real ones: the Calder Cup of the AHL, the Kelly Cup of the ECHL, the MLS Cup and the College Football Playoff trophy (`trophy:calder-cup`, `trophy:kelly-cup`, `trophy:mls-cup`, `trophy:cfp-trophy`, 334 emblems); 0.25.0 adds two of baseball's awards, drawn from photographs of the real ones: the Hank Aaron Award and the Relief Man Award (`trophy:hank-aaron-award`, `trophy:relief-man-award`, 330 emblems); 0.24.0 adds a baseball cap (`gear:baseball-cap`, 328 emblems); 0.23.0 adds the Bill Russell Finals MVP Trophy, drawn from a photograph of the real one (`trophy:bill-russell-trophy`, 327 emblems); 0.22.0 takes out the award cups and the cap of the unpublished 0.17.0 to 0.21.0, which did not match the real objects; 0.16.0 adds a slotted plastic practice baseball (`ball:plastic-baseball-slotted`, 326 emblems: [docs/slotted-ball.md](./docs/slotted-ball.md)); 0.15.0 gives the pickleballs real holes, cut through the shell and drawn with the inside of the ball behind them, so the page shows through where two holes line up ([docs/pickleball.md](./docs/pickleball.md)); 0.14.0 lets the auto-turn go either way (`direction: "clockwise"` or `"counterclockwise"`, `setDirection()`); 0.13.0 adds a pictogram for each of four combat sports, MMA (a cage), boxing (a glove), wrestling (two wrestlers on the mat) and professional wrestling (a ring with ropes), in the three styles (326 emblems); 0.12.0 adds forty-seven named trophies, each a close likeness measured on a photograph (321 emblems); 0.11.0 gives the era soccer balls neutral ids (the old ones stay as aliases), new looks and a second 1980s ball (274 emblems); 0.10.0 adds a standalone ribbon and the nets and posts of sepak takraw, netball and teqball from their rulebooks' sizes (273 emblems); 0.9.0 lets the baseball, the softball and the classic soccer balls be painted and printed: solid and two-tone colours, a logo of your own wrapped onto the ball, stamped text, an original cursive word and a small mark, all turning with the ball ([docs/custom-balls.md](./docs/custom-balls.md)); 0.8.0 makes `bindTurn` light: it takes an emblem object and then needs no registry, so a turnable cup is about 9.4 kB gzipped instead of about 81 kB, and an id loads the registry on demand; 0.7.3 turns the build, docs and picture scripts, the browser tests and the demo's source from JavaScript into TypeScript, with no change to the package; 0.7.2 makes every docs page single-language (a page in Japanese beside each page that had Japanese words in it, and a test that holds them apart), with no change to the pictures; 0.7.1 puts real countries (Canada, Japan) in the crest and puck examples in place of made-up teams, with no change to the code; 0.7.0 gives the national volleyballs layouts that tell them apart (Japan a crimson band, Poland white above and red below, the USA a navy field), strengthens the 2010-style grooved soccer ball, and adds six pictures of how the judo belt is tied, `gear:obi-step-1` to `gear:obi-step-6` (269 emblems: [docs/obi-steps.md](./docs/obi-steps.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 (269 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.
|
|
680
680
|
|
|
681
681
|
## Credits
|
|
682
682
|
|
|
@@ -93,17 +93,25 @@ export const EMBLEM_DESCRIPTIONS = {
|
|
|
93
93
|
"trophy:ted-lindsay-award": { en: "The Ted Lindsay Award: a bronze skater with a stick on a pin, over a tall black hexagonal pillar and a flared silver base.", ja: "スティックを持つ青銅のスケーターがピンの上に立ち、その下に背の高い黒い六角形の柱と、広がった銀の台座がある姿を描いています。選手たちの投票で選ばれる、最も傑出した選手に贈られます。" },
|
|
94
94
|
"trophy:lester-patrick-trophy": { en: "The Lester Patrick Trophy: a bronze figure of a man standing at ease on a tall square pedestal of reddish wood.", ja: "青銅の男性像が、赤みがかった木の背の高い四角い台座の上に、くつろいだ姿勢で立っている姿を描いています。アメリカでのホッケーに対する傑出した貢献をした人々に贈られます。" },
|
|
95
95
|
"trophy:lombardi-trophy": { en: "The Vince Lombardi Trophy: a silver football tilted over a tall three-sided pylon that widens to its foot.", ja: "ロンバルディ・トロフィーは、銀色のフットボールが、足元に向かって広がる背の高い三角柱の台の上に斜めに載った姿を描いています。NFLの優勝決定戦、スーパーボウルの優勝チームに贈られます。" },
|
|
96
|
-
"trophy:larry-obrien-trophy": { en: "The Larry O'Brien Championship Trophy: a gold basketball
|
|
96
|
+
"trophy:larry-obrien-trophy": { en: "The Larry O'Brien Championship Trophy as redrawn for 2022: a gold basketball with grooved silver seams set forward on the rim of a tall gold vase that tapers outward to the top, etched with a silver net of diamonds, on two stacked round gold discs.", ja: "2022年に新しくなったラリー・オブライエン・トロフィーは、銀色の溝状の縫い目をもつ金色のバスケットボールが、上に向かって広がる背の高い金色の花瓶の縁の手前に載り、花瓶には銀色のひし形の網目が刻まれ、重なった2枚の金色の円盤の上に立つ姿を描いています。NBAファイナルの優勝チームに贈られます。" },
|
|
97
97
|
"trophy:commissioners-trophy": { en: "The Commissioner's Trophy: thirty slender poles with gilt pennants in a ring whose tops are higher at the back than at the front, over a wide round silver base.", ja: "コミッショナーズ・トロフィーは、30本の細い支柱が、それぞれ金色のペナントを付けて輪になり、輪の上端は後ろが高く手前が低く、幅広い丸い銀色の台の上に立つ姿を描いています。ワールドシリーズの優勝チームに贈られます。" },
|
|
98
98
|
"trophy:grey-cup": { en: "The Grey Cup: a two-handled silver cup with a swirled stem on a tall flared cone of twelve panels crossed by dark bands.", ja: "グレイカップは、持ち手が2つで渦巻き模様の脚をもつ銀色のカップが、暗い帯の入った12面の背の高い広がる円錐形の台の上に載った姿を描いています。カナディアン・フットボール・リーグの優勝決定戦に勝ったチームに贈られます。" },
|
|
99
99
|
"trophy:cy-young-award": { en: "The Cy Young Award: a dark plaque with a curved silver band, a V and a hand holding a baseball over a nameplate.", ja: "サイ・ヤング賞は、暗い色の飾り板に、曲線を描く銀色の帯とV字、銘板の上で野球のボールを握る手をあしらった姿を描いています。各リーグの最優秀投手に贈られます。" },
|
|
100
100
|
"trophy:relief-man-award": { en: "The Relief Man Award: a silver fire helmet with a gilt shield, on a short chrome column over a walnut block with a brass nameplate and a stepped walnut base.", ja: "リリーフマン賞は、金色の盾を付けた銀色の消防ヘルメットが、短いクロームの支柱の上に載り、真鍮の銘板を付けたクルミ材の角柱と、段のあるクルミ材の台の上に立つ姿を描いています。1976年から2012年まで、各リーグの最優秀救援投手に贈られました。" },
|
|
101
101
|
"trophy:hank-aaron-award": { en: "The Hank Aaron Award: a mahogany block cut in the shape of home plate, with a grey metal face, a bat laid across it from the upper left and two ribbons over the bat.", ja: "ハンク・アーロン賞は、ホームベースの形に削り出したマホガニーの台に、灰色の金属の面、左上がりに置かれたバット、その上に重なる2本のリボンをあしらった姿を描いています。各リーグの最優秀打者に贈られます。" },
|
|
102
|
-
"trophy:bill-russell-trophy": { en: "The Bill Russell Trophy: a gold basketball seated
|
|
102
|
+
"trophy:bill-russell-trophy": { en: "The Bill Russell Trophy: a gold basketball with grooved silver seams seated in the mouth of a tall gold trumpet etched with a silver net, which narrows to a slim waist and flares into a round foot of two tiers.", ja: "ビル・ラッセル・トロフィーは、銀色の溝状の縫い目をもつ金色のバスケットボールが、銀色の網目を刻んだ背の高い金色のラッパ形の台の口に収まり、台は細いくびれへとすぼまってから二段の丸い足へと広がる姿を描いています。NBAファイナルの最優秀選手(ファイナルMVP)に贈られます。" },
|
|
103
|
+
"trophy:oscar-robertson-trophy": { en: "The Oscar Robertson Trophy: a large silver basketball with grooved seams held in a cradle of crossed gold bands over a small gold dome, on a round base of a black ring, a thin gold band, a flared black drum, a tall gold skirt and a black foot.", ja: "オスカー・ロバートソン・トロフィーは、溝のある縫い目をもつ大きな銀色のバスケットボールが、交差する金色の帯の受け台に収まり、小さな金色のドームの上に載り、黒い輪、細い金色の帯、広がった黒い胴、背の高い金色のすそ、黒い足が重なる丸い土台に立つ姿を描いています。ウェスタン・カンファレンスの優勝チームに贈られます。" },
|
|
104
|
+
"trophy:bob-cousy-trophy": { en: "The Bob Cousy Trophy: a large silver basketball with grooved seams on three slim gold posts over a small gold dish, on a round base of a gold plate, three black tiers, a tall gold drum and a black foot.", ja: "ボブ・クージー・トロフィーは、溝のある縫い目をもつ大きな銀色のバスケットボールが、小さな金色の皿の上の3本の細い金色の支柱に載り、金色の板、黒い3段、背の高い金色の胴、黒い足が重なる丸い土台に立つ姿を描いています。イースタン・カンファレンスの優勝チームに贈られます。" },
|
|
105
|
+
"trophy:magic-johnson-trophy": { en: "The Magic Johnson Trophy: a silver basketball with grooved seams in a small gold cradle of crossed bands, over a tall flared gold trumpet etched with a diamond net, on a black ring, a gold band and a black foot.", ja: "マジック・ジョンソン・トロフィーは、溝のある縫い目をもつ銀色のバスケットボールが、交差する帯の小さな金色の受け台に収まり、ひし形の網目を刻んだ背の高い金色のラッパ形の台の上に載り、台は黒い輪、金色の帯、黒い足の上に立つ姿を描いています。ウェスタン・カンファレンス・ファイナルの最優秀選手に贈られます。" },
|
|
106
|
+
"trophy:larry-bird-trophy": { en: "The Larry Bird Trophy: a silver basketball with grooved seams on three slim gold posts over a small gold dish, over a tall flared gold trumpet etched with a diamond net, on a black ring, a gold band and a black foot.", ja: "ラリー・バード・トロフィーは、溝のある縫い目をもつ銀色のバスケットボールが、小さな金色の皿の上の3本の細い金色の支柱に載り、ひし形の網目を刻んだ背の高い金色のラッパ形の台の上に載り、台は黒い輪、金色の帯、黒い足の上に立つ姿を描いています。イースタン・カンファレンス・ファイナルの最優秀選手に贈られます。" },
|
|
107
|
+
"trophy:larry-obrien-trophy-1977": { en: "The Larry O'Brien Championship Trophy as given up to 2021: a smooth gold basketball set forward on the rim of a gold vase that tapers outward to the top and is etched with a net on its lower half, on a black ring and a flat square gold plinth.", ja: "2021年までのラリー・オブライエン・トロフィーは、表面のなめらかな金色のバスケットボールが、上に向かって広がる金色の花瓶の縁の手前に載り、花瓶の下半分には網目が刻まれ、黒い輪と平らな四角い金色の台座の上に立つ姿を描いています。NBAファイナルの優勝チームに贈られます。" },
|
|
108
|
+
"trophy:nba-western-conference-2001": { en: "The Western Conference champions' trophy of 2001 to 2021: a grained silver basketball with grooved seams in crossed gold bands, on a round base that is black above a flared skirt of polished silver.", ja: "2001年から2021年までのウェスタン・カンファレンス優勝トロフィーは、溝のある縫い目と細かなざらつきをもつ銀色のバスケットボールが、交差する金色の帯に載り、上が黒く下に向かって広がる磨かれた銀色のすそをもつ丸い土台に立つ姿を描いています。ウェスタン・カンファレンスの優勝チームに贈られました。" },
|
|
109
|
+
"trophy:nba-eastern-conference-2001": { en: "The Eastern Conference champions' trophy of 2001 to 2021: a pale frosted, grained silver basketball with grooved seams on three slim gold posts, on a round black base with a polished silver plate and drum.", ja: "2001年から2021年までのイースタン・カンファレンス優勝トロフィーは、溝のある縫い目と細かなざらつきをもつ淡いつや消しの銀色のバスケットボールが、3本の細い金色の支柱に載り、磨かれた銀色の板と胴をもつ黒い丸い土台に立つ姿を描いています。イースタン・カンファレンスの優勝チームに贈られました。" },
|
|
103
110
|
"trophy:mlb-mvp-award": { en: "The Most Valuable Player Award: a dark octagonal plaque with a silver ring and diamond, a gilt medallion, a nameplate and crossed bats.", ja: "MVP賞は、銀色の輪とダイヤモンド、金色のメダリオン、銘板、交差した2本のバットを配した、暗い色の八角形の飾り板を描いています。各リーグの最優秀選手に贈られます。" },
|
|
104
111
|
"trophy:walter-cup": { en: "The Walter Cup: a wide shallow silver bowl on a stem between two tall stick-shaped blades, over a heavy round base.", ja: "ウォルター・カップは、脚付きの幅広く浅い銀色のボウルが、スティック形の背の高い2枚のブレードの間に立ち、重厚な丸い台の上に載った姿を描いています。プロフェッショナル・ウィメンズ・ホッケー・リーグ(PWHL)の優勝チームに贈られます。" },
|
|
105
|
-
"trophy:wnba-championship-trophy": { en: "The WNBA Championship Trophy: a silver basketball held on
|
|
106
|
-
"trophy:lamar-hunt-trophy": { en: "The Lamar Hunt Trophy:
|
|
112
|
+
"trophy:wnba-championship-trophy": { en: "The WNBA Championship Trophy: a polished silver basketball held up high on three leaning silver rods that rise from small collars on a low, rounded, triangular plinth.", ja: "WNBA優勝トロフィーは、磨かれた銀色のバスケットボールを、傾いた3本の銀色の棒が高く掲げ、棒は低く丸みのある三角形の台から立ち上がる姿を描いています。WNBAファイナルの優勝チームに贈られます。" },
|
|
113
|
+
"trophy:lamar-hunt-trophy": { en: "The Lamar Hunt Trophy: an open football of polished silver, a ribbon with slots for the laces in front and two curved bands behind, standing on its tip, leaning back, on a round flared silver base over a black foot.", ja: "ラマー・ハント・トロフィーは、磨いた銀色の、中が透けたフットボールが先端で後ろへ傾いて立つ姿を描いています。手前には紐を通す切れ込みのある帯があり、後ろには曲がった二本の帯があって、裾の広がった丸い銀色の台と黒い土台の上に載っています。アメリカン・フットボール・カンファレンス(AFC)の優勝チームに贈られます。" },
|
|
114
|
+
"trophy:george-halas-trophy": { en: "The George Halas Trophy: an open football of polished silver, a ribbon with slots for the laces in front and two curved bands behind, standing on its tip, leaning back, on a round flared silver base over a black foot.", ja: "ジョージ・ハラス・トロフィーは、磨いた銀色の、中が透けたフットボールが先端で後ろへ傾いて立つ姿を描いています。手前には紐を通す切れ込みのある帯があり、後ろには曲がった二本の帯があって、裾の広がった丸い銀色の台と黒い土台の上に載っています。ナショナル・フットボール・カンファレンス(NFC)の優勝チームに贈られます。" },
|
|
107
115
|
"trophy:silver-slugger-award": { en: "The Silver Slugger Award: a silver bat across a tall black board with an oval badge and a plate.", ja: "シルバースラッガー賞は、背の高い黒い板を銀色のバットが横切り、楕円のバッジと銘板が付いた姿を描いています。各リーグの各ポジションで最も優れた打者に贈られます。" },
|
|
108
116
|
"trophy:world-series-mvp-trophy": { en: "The World Series MVP trophy: a twisted silver flame on a wide round base with a dark band.", ja: "ワールドシリーズMVP賞は、ねじれた銀色の炎が、暗い帯の入った幅広い丸い台の上に立つ姿を描いています。ワールドシリーズで最も活躍した選手に贈られます。" },
|
|
109
117
|
"trophy:avco-world-trophy": { en: "The Avco World Trophy: a wide silver bowl on a stem over a glass cylinder with a silver ball in it, a ringed collar, a tall black drum with silver plates and a wide silver foot.", ja: "アブコ・ワールド・トロフィー。銀の玉が入ったガラスの筒の上に、脚付きの広い銀のボウルをのせ、輪のついた首の部分、銀の板をはめた背の高い黒い筒、広い銀の台座を描いています。ワールド・ホッケー・アソシエーション(WHA)の優勝チームに贈られます。" },
|
|
@@ -122,10 +130,14 @@ export const EMBLEM_DESCRIPTIONS = {
|
|
|
122
130
|
"trophy:ashes-urn": { en: "The Ashes urn: a small terracotta urn with square handles on a turned wooden base.", ja: "テラコッタの小さな壺を描いています。四角い取っ手が付き、旋盤で削り出した木の台に載っています。イングランドとオーストラリアが戦うアッシズ・シリーズの象徴として、ローズ・クリケット・グラウンドに保管されています。" },
|
|
123
131
|
"trophy:webb-ellis-cup": { en: "The Webb Ellis Cup: a gilt lidded two-handled cup with a pineapple finial on a round plinth.", ja: "金色のふた付きカップを描いています。取っ手が二つあり、ふたの上にパイナップル形の飾りが付いて、丸い台座に載っています。男子のラグビーワールドカップの優勝チームに贈られます。" },
|
|
124
132
|
"trophy:champions-league-trophy": { en: "The UEFA Champions League trophy: a tall silver urn with two long looping handles.", ja: "UEFAチャンピオンズリーグ・トロフィー。長い取っ手が二つ輪を描く、背の高い銀の壺を描いています。UEFAチャンピオンズリーグの優勝クラブに贈られます。" },
|
|
133
|
+
"trophy:jackie-robinson-award": { en: "The Jackie Robinson Award: a walnut plaque with a black nameplate, a gold emblem of a banner over a diamond badge and crossed bats, a bronze relief of a runner sliding in at the plate past a catcher and an umpire, a black plate and a small green pin.", ja: "ジャッキー・ロビンソン賞は、クルミ材の記念盾に、上に黒い銘板、その下にバナーを載せたダイヤモンドの記章と交差した2本のバットをあしらった金色の紋章、中央に本塁へ滑り込む走者と捕手と球審を表した青銅の浮き彫り、下に黒い銘板と小さな緑色のピンを配した姿を描いています。各リーグの最優秀新人選手に贈られます。" },
|
|
125
134
|
"trophy:calder-cup": { en: "The Calder Cup: a two-handled silver bowl with a band of laurel leaves round its rim, on a knobbed stem that flares to a bell, over a black round plinth and two stepped black blocks with plates.", ja: "カルダー・カップは、縁に月桂樹の葉の帯をめぐらせ、持ち手が2つある銀色のボウルが、こぶのある脚の上に載る姿を描いています。脚は鐘の形に広がり、黒い丸い台座と、板をはめた2段の黒い角台の上に立っています。アメリカン・ホッケー・リーグ(AHL)の優勝チームに贈られます。" },
|
|
126
135
|
"trophy:kelly-cup": { en: "The Kelly Cup: a small two-handled silver cup with two thin rings under its lip, on a stack of three black drums with silver-edged plate bands, the lowest the widest.", ja: "ケリー・カップは、口縁の下に細い輪を2本めぐらせ、持ち手が2つある小さな銀色のカップが、銀で縁取った板の帯を巻いた3段の黒い円筒の台座の上に立つ姿を描いています。下の段ほど幅が広くなっています。ECHLの優勝チームに贈られます。" },
|
|
127
136
|
"trophy:cfp-trophy": { en: "The College Football Playoff trophy: an upright dark football with a gilt rim on a tall slim gold column that narrows to a small collar, over a black drum with a plate band.", ja: "CFPトロフィーは、縁が金色で縦に立てた黒いフットボールが、背の高い細い金色の柱の上に載る姿を描いています。柱は上へ細くすぼまって小さな受け皿になり、板の帯を巻いた黒い円筒の台座の上に立っています。カレッジフットボール・プレーオフの全米王者に贈られます。" },
|
|
128
137
|
"trophy:mls-cup": { en: "The MLS Cup: a tall silver goblet with a gilt rim whose bowl narrows steadily to a slim stem, on a flared round pedestal with one dark groove, with four fluted blades that sweep up and out from the stem, past the rim, and curl in over it.", ja: "MLSカップは、金色の縁をもつ背の高い銀色のゴブレットが、裾の広がった丸い台座の上に載る姿を描いています。ゴブレットの杯部は脚に向かってなだらかにすぼまり、台座には濃い色の溝が1本刻まれています。脚から立ち上がる溝入りの4枚の羽根状の飾りが、外側へ広がりながら上へ伸び、縁を越えてから内側へ巻いています。メジャーリーグサッカー(MLS)のプレーオフの優勝クラブに贈られます。" },
|
|
138
|
+
"trophy:foundation-player-award": { en: "The NHL Foundation Player Award: a tall block of clear crystal, a little more than twice as tall as it is wide, with two long V-cut facets from the top corners down to a point near the bottom centre.", ja: "背の高い透明なクリスタルのブロックを描いています。高さは幅の2倍強あり、正面には上の両角から下の中央近くまで伸びる、細長いV字のカット面が2つあります。ホッケーの価値観を生かして、暮らす地域の人々の生活を最も豊かにした選手に贈られます。" },
|
|
139
|
+
"trophy:messier-leadership-award": { en: "The Mark Messier NHL Leadership Award: a polished silver cut-out of a skater in a skating stance with his stick low to the right, more of the same cut-out stacked behind it and stepping back, on a black two-tier base with a silver nameplate and rows of small silver jerseys.", ja: "磨いた銀の切り抜きの選手が、スティックを右の低い位置に構え、スケーティングする姿を描いています。その後ろに同じ切り抜きが、奥へ少しずつずれながら重なっています。台座は黒い2段で、銀の銘板と、何列も並ぶ小さな銀のユニフォームがあります。氷上でも氷の外でも、最もリーダーシップを発揮した選手に贈られます。" },
|
|
140
|
+
"trophy:willie-oree-award": { en: "The Willie O'Ree Community Hero Award: a gold fedora with a band and a small bow, on three twisting gold ribbons that rise and cross from a round stepped gold base with black plates.", ja: "金のフェドーラ帽が、ねじれた3本の金のリボンの上に載る姿を描いています。リボンは、金と黒の段のある丸い台座から立ち上がり、台座の正面には銘板があります。ホッケーを通じて、地域や文化、社会によい影響を与えた人に贈られます。" },
|
|
129
141
|
"trophy:championship-banner": { en: "A fringed banner on a pole with a gilt finial and an embroidered border, with no lettering unless some is given", ja: "金の先端飾りの付いた竿に掛けた、刺繍の縁と房の付いた旗。文字は指定したときだけ入る" },
|
|
130
142
|
"sport:sumo": { en: "Two wrestlers in the crouch they face each other in at the start of a bout, with their belts", ja: "仕切りの姿勢で向かい合う、廻しを締めた二人の力士" },
|
|
131
143
|
"sport:handball": { en: "A hand throwing the ball, with lines of speed", ja: "ボールを投げる手と、速さを表す線" },
|
|
@@ -5,7 +5,7 @@ export type SportName = (typeof SPORT_NAMES)[number];
|
|
|
5
5
|
export declare const AWARD_IDS: readonly ["award:medal", "award:badge", "award:crown", "award:star", "award:shield", "award:ribbon"];
|
|
6
6
|
export type AwardId = (typeof AWARD_IDS)[number];
|
|
7
7
|
/** The trophies: a cup for each league's champion in a descriptive, generic form, the plain cups and dishes, and the flat plaque, belt, wreath and rosette. */
|
|
8
|
-
export declare const TROPHY_IDS: readonly ["trophy:cup", "trophy:lidded-cup", "trophy:bowl", "trophy:salver", "trophy:globe", "trophy:hockey-cup", "trophy:basketball", "trophy:baseball", "trophy:football", "trophy:canadian-bowl", "trophy:soccer-ball", "trophy:soccer-globe", "trophy:tennis-plate", "trophy:tennis-cup", "trophy:cricket-urn", "trophy:rugby-cup", "trophy:plaque", "trophy:belt", "trophy:laurel", "trophy:rosette", "trophy:ring", "trophy:banner", "trophy:sumo-cup", "trophy:championship-banner", "trophy:paterson-cup", "trophy:stanley-cup", "trophy:hart-trophy", "trophy:vezina-trophy", "trophy:norris-trophy", "trophy:calder-trophy", "trophy:presidents-trophy", "trophy:art-ross-trophy", "trophy:lady-byng-trophy", "trophy:jennings-trophy", "trophy:selke-trophy", "trophy:king-clancy-trophy", "trophy:masterton-trophy", "trophy:jack-adams-trophy", "trophy:prince-of-wales-trophy", "trophy:campbell-bowl", "trophy:rocket-richard-trophy", "trophy:conn-smythe-trophy", "trophy:ted-lindsay-award", "trophy:lester-patrick-trophy", "trophy:lombardi-trophy", "trophy:larry-obrien-trophy", "trophy:commissioners-trophy", "trophy:grey-cup", "trophy:cy-young-award", "trophy:mlb-mvp-award", "trophy:relief-man-award", "trophy:hank-aaron-award", "trophy:bill-russell-trophy", "trophy:walter-cup", "trophy:wnba-championship-trophy", "trophy:lamar-hunt-trophy", "trophy:silver-slugger-award", "trophy:world-series-mvp-trophy", "trophy:avco-world-trophy", "trophy:obrien-cup", "trophy:gold-glove-award", "trophy:fifa-world-cup", "trophy:woodlawn-vase", "trophy:dfb-pokal", "trophy:champions-league-trophy", "trophy:webb-ellis-cup", "trophy:fa-cup", "trophy:cricket-world-cup", "trophy:wimbledon-gentlemens-trophy", "trophy:venus-rosewater-dish", "trophy:ballon-dor", "trophy:ashes-urn", "trophy:borg-warner-trophy", "trophy:americas-cup", "trophy:calder-cup", "trophy:kelly-cup", "trophy:cfp-trophy", "trophy:mls-cup"];
|
|
8
|
+
export declare const TROPHY_IDS: readonly ["trophy:cup", "trophy:lidded-cup", "trophy:bowl", "trophy:salver", "trophy:globe", "trophy:hockey-cup", "trophy:basketball", "trophy:baseball", "trophy:football", "trophy:canadian-bowl", "trophy:soccer-ball", "trophy:soccer-globe", "trophy:tennis-plate", "trophy:tennis-cup", "trophy:cricket-urn", "trophy:rugby-cup", "trophy:plaque", "trophy:belt", "trophy:laurel", "trophy:rosette", "trophy:ring", "trophy:banner", "trophy:sumo-cup", "trophy:championship-banner", "trophy:paterson-cup", "trophy:stanley-cup", "trophy:hart-trophy", "trophy:vezina-trophy", "trophy:norris-trophy", "trophy:calder-trophy", "trophy:presidents-trophy", "trophy:art-ross-trophy", "trophy:lady-byng-trophy", "trophy:jennings-trophy", "trophy:selke-trophy", "trophy:king-clancy-trophy", "trophy:masterton-trophy", "trophy:jack-adams-trophy", "trophy:prince-of-wales-trophy", "trophy:campbell-bowl", "trophy:rocket-richard-trophy", "trophy:conn-smythe-trophy", "trophy:ted-lindsay-award", "trophy:lester-patrick-trophy", "trophy:lombardi-trophy", "trophy:larry-obrien-trophy", "trophy:commissioners-trophy", "trophy:grey-cup", "trophy:cy-young-award", "trophy:mlb-mvp-award", "trophy:relief-man-award", "trophy:hank-aaron-award", "trophy:bill-russell-trophy", "trophy:nba-western-conference-2001", "trophy:nba-eastern-conference-2001", "trophy:oscar-robertson-trophy", "trophy:bob-cousy-trophy", "trophy:magic-johnson-trophy", "trophy:larry-bird-trophy", "trophy:larry-obrien-trophy-1977", "trophy:walter-cup", "trophy:wnba-championship-trophy", "trophy:lamar-hunt-trophy", "trophy:george-halas-trophy", "trophy:silver-slugger-award", "trophy:world-series-mvp-trophy", "trophy:avco-world-trophy", "trophy:obrien-cup", "trophy:gold-glove-award", "trophy:fifa-world-cup", "trophy:woodlawn-vase", "trophy:dfb-pokal", "trophy:champions-league-trophy", "trophy:webb-ellis-cup", "trophy:fa-cup", "trophy:cricket-world-cup", "trophy:wimbledon-gentlemens-trophy", "trophy:venus-rosewater-dish", "trophy:ballon-dor", "trophy:ashes-urn", "trophy:borg-warner-trophy", "trophy:americas-cup", "trophy:jackie-robinson-award", "trophy:calder-cup", "trophy:kelly-cup", "trophy:cfp-trophy", "trophy:mls-cup", "trophy:foundation-player-award", "trophy:willie-oree-award", "trophy:messier-leadership-award"];
|
|
9
9
|
export type TrophyId = (typeof TROPHY_IDS)[number];
|
|
10
10
|
/** The medals on a ribbon, and the badges for the first three places. */
|
|
11
11
|
export declare const MEDAL_KINDS: readonly ["gold", "silver", "bronze"];
|
|
@@ -40,7 +40,7 @@ export type EmblemId = AwardId | TrophyId | MedalId | CrestId | BallId | PuckId
|
|
|
40
40
|
/** The groups of ids, in the order a gallery shows them. */
|
|
41
41
|
export declare const EMBLEM_GROUPS: {
|
|
42
42
|
readonly award: readonly ["award:medal", "award:badge", "award:crown", "award:star", "award:shield", "award:ribbon"];
|
|
43
|
-
readonly trophy: readonly ["trophy:cup", "trophy:lidded-cup", "trophy:bowl", "trophy:salver", "trophy:globe", "trophy:hockey-cup", "trophy:basketball", "trophy:baseball", "trophy:football", "trophy:canadian-bowl", "trophy:soccer-ball", "trophy:soccer-globe", "trophy:tennis-plate", "trophy:tennis-cup", "trophy:cricket-urn", "trophy:rugby-cup", "trophy:plaque", "trophy:belt", "trophy:laurel", "trophy:rosette", "trophy:ring", "trophy:banner", "trophy:sumo-cup", "trophy:championship-banner", "trophy:paterson-cup", "trophy:stanley-cup", "trophy:hart-trophy", "trophy:vezina-trophy", "trophy:norris-trophy", "trophy:calder-trophy", "trophy:presidents-trophy", "trophy:art-ross-trophy", "trophy:lady-byng-trophy", "trophy:jennings-trophy", "trophy:selke-trophy", "trophy:king-clancy-trophy", "trophy:masterton-trophy", "trophy:jack-adams-trophy", "trophy:prince-of-wales-trophy", "trophy:campbell-bowl", "trophy:rocket-richard-trophy", "trophy:conn-smythe-trophy", "trophy:ted-lindsay-award", "trophy:lester-patrick-trophy", "trophy:lombardi-trophy", "trophy:larry-obrien-trophy", "trophy:commissioners-trophy", "trophy:grey-cup", "trophy:cy-young-award", "trophy:mlb-mvp-award", "trophy:relief-man-award", "trophy:hank-aaron-award", "trophy:bill-russell-trophy", "trophy:walter-cup", "trophy:wnba-championship-trophy", "trophy:lamar-hunt-trophy", "trophy:silver-slugger-award", "trophy:world-series-mvp-trophy", "trophy:avco-world-trophy", "trophy:obrien-cup", "trophy:gold-glove-award", "trophy:fifa-world-cup", "trophy:woodlawn-vase", "trophy:dfb-pokal", "trophy:champions-league-trophy", "trophy:webb-ellis-cup", "trophy:fa-cup", "trophy:cricket-world-cup", "trophy:wimbledon-gentlemens-trophy", "trophy:venus-rosewater-dish", "trophy:ballon-dor", "trophy:ashes-urn", "trophy:borg-warner-trophy", "trophy:americas-cup", "trophy:calder-cup", "trophy:kelly-cup", "trophy:cfp-trophy", "trophy:mls-cup"];
|
|
43
|
+
readonly trophy: readonly ["trophy:cup", "trophy:lidded-cup", "trophy:bowl", "trophy:salver", "trophy:globe", "trophy:hockey-cup", "trophy:basketball", "trophy:baseball", "trophy:football", "trophy:canadian-bowl", "trophy:soccer-ball", "trophy:soccer-globe", "trophy:tennis-plate", "trophy:tennis-cup", "trophy:cricket-urn", "trophy:rugby-cup", "trophy:plaque", "trophy:belt", "trophy:laurel", "trophy:rosette", "trophy:ring", "trophy:banner", "trophy:sumo-cup", "trophy:championship-banner", "trophy:paterson-cup", "trophy:stanley-cup", "trophy:hart-trophy", "trophy:vezina-trophy", "trophy:norris-trophy", "trophy:calder-trophy", "trophy:presidents-trophy", "trophy:art-ross-trophy", "trophy:lady-byng-trophy", "trophy:jennings-trophy", "trophy:selke-trophy", "trophy:king-clancy-trophy", "trophy:masterton-trophy", "trophy:jack-adams-trophy", "trophy:prince-of-wales-trophy", "trophy:campbell-bowl", "trophy:rocket-richard-trophy", "trophy:conn-smythe-trophy", "trophy:ted-lindsay-award", "trophy:lester-patrick-trophy", "trophy:lombardi-trophy", "trophy:larry-obrien-trophy", "trophy:commissioners-trophy", "trophy:grey-cup", "trophy:cy-young-award", "trophy:mlb-mvp-award", "trophy:relief-man-award", "trophy:hank-aaron-award", "trophy:bill-russell-trophy", "trophy:nba-western-conference-2001", "trophy:nba-eastern-conference-2001", "trophy:oscar-robertson-trophy", "trophy:bob-cousy-trophy", "trophy:magic-johnson-trophy", "trophy:larry-bird-trophy", "trophy:larry-obrien-trophy-1977", "trophy:walter-cup", "trophy:wnba-championship-trophy", "trophy:lamar-hunt-trophy", "trophy:george-halas-trophy", "trophy:silver-slugger-award", "trophy:world-series-mvp-trophy", "trophy:avco-world-trophy", "trophy:obrien-cup", "trophy:gold-glove-award", "trophy:fifa-world-cup", "trophy:woodlawn-vase", "trophy:dfb-pokal", "trophy:champions-league-trophy", "trophy:webb-ellis-cup", "trophy:fa-cup", "trophy:cricket-world-cup", "trophy:wimbledon-gentlemens-trophy", "trophy:venus-rosewater-dish", "trophy:ballon-dor", "trophy:ashes-urn", "trophy:borg-warner-trophy", "trophy:americas-cup", "trophy:jackie-robinson-award", "trophy:calder-cup", "trophy:kelly-cup", "trophy:cfp-trophy", "trophy:mls-cup", "trophy:foundation-player-award", "trophy:willie-oree-award", "trophy:messier-leadership-award"];
|
|
44
44
|
readonly medal: readonly ["medal:gold", "medal:silver", "medal:bronze", "medal:place-1", "medal:place-2", "medal:place-3"];
|
|
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-retro-pentagons", "ball:soccer-retro-leaves", "ball:soccer-retro-rosette", "ball:soccer-retro-star", "ball:soccer-retro-pinwheel", "ball:soccer-retro-kites", "ball:soccer-14-panel-double-border", "ball:soccer-8-panel-plain", "ball:soccer-6-panel-bands", "ball:soccer-6-panel-diamonds", "ball:soccer-20-panel-dots", "ball:soccer-training-high-vis", "ball:soccer-stars-blue", "ball:soccer-stars-red", "ball:soccer-stars-night", "ball:soccer-hexagons-cyan", "ball:soccer-hexagons-magenta", "ball:soccer-hexagons-lime", "ball:soccer-flames-fire", "ball:soccer-flames-ice", "ball:soccer-flames-toxic", "ball:soccer-chevrons-red", "ball:soccer-chevrons-green", "ball:soccer-chevrons-blue", "ball:soccer-swirl-blue", "ball:soccer-swirl-red", "ball:soccer-swirl-teal", "ball:soccer-metallic-gold", "ball:soccer-metallic-silver", "ball:soccer-metallic-cobalt", "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:plastic-baseball-slotted", "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"];
|
|
@@ -45,9 +45,17 @@ export const TROPHY_IDS = [
|
|
|
45
45
|
"trophy:relief-man-award",
|
|
46
46
|
"trophy:hank-aaron-award",
|
|
47
47
|
"trophy:bill-russell-trophy",
|
|
48
|
+
"trophy:nba-western-conference-2001",
|
|
49
|
+
"trophy:nba-eastern-conference-2001",
|
|
50
|
+
"trophy:oscar-robertson-trophy",
|
|
51
|
+
"trophy:bob-cousy-trophy",
|
|
52
|
+
"trophy:magic-johnson-trophy",
|
|
53
|
+
"trophy:larry-bird-trophy",
|
|
54
|
+
"trophy:larry-obrien-trophy-1977",
|
|
48
55
|
"trophy:walter-cup",
|
|
49
56
|
"trophy:wnba-championship-trophy",
|
|
50
57
|
"trophy:lamar-hunt-trophy",
|
|
58
|
+
"trophy:george-halas-trophy",
|
|
51
59
|
"trophy:silver-slugger-award",
|
|
52
60
|
"trophy:world-series-mvp-trophy",
|
|
53
61
|
"trophy:avco-world-trophy",
|
|
@@ -66,10 +74,14 @@ export const TROPHY_IDS = [
|
|
|
66
74
|
"trophy:ashes-urn",
|
|
67
75
|
"trophy:borg-warner-trophy",
|
|
68
76
|
"trophy:americas-cup",
|
|
77
|
+
"trophy:jackie-robinson-award",
|
|
69
78
|
"trophy:calder-cup",
|
|
70
79
|
"trophy:kelly-cup",
|
|
71
80
|
"trophy:cfp-trophy",
|
|
72
81
|
"trophy:mls-cup",
|
|
82
|
+
"trophy:foundation-player-award",
|
|
83
|
+
"trophy:willie-oree-award",
|
|
84
|
+
"trophy:messier-leadership-award",
|
|
73
85
|
];
|
|
74
86
|
/** The medals on a ribbon, and the badges for the first three places. */
|
|
75
87
|
export const MEDAL_KINDS = ["gold", "silver", "bronze"];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type Emblem, type EmblemSource, type Metal, type Rgb } from "./emblem.core.ts";
|
|
1
|
+
import { type Emblem, type EmblemSource, type Gradient, type Metal, type Rgb } from "./emblem.core.ts";
|
|
2
2
|
import { type Band } from "./emblem.engrave.ts";
|
|
3
3
|
/** A point of the profile: the height `y` (0 at the top of the 64 unit box), the radius `r` from the axis (x = 32), 1 for a sharp corner (a smooth run of points ends at one), and the tone of the piece that starts here. */
|
|
4
4
|
export type Pt = readonly [y: number, r: number, corner?: 0 | 1, tone?: string];
|
|
@@ -6,10 +6,10 @@ export type Pt = readonly [y: number, r: number, corner?: 0 | 1, tone?: string];
|
|
|
6
6
|
export type Decor = readonly ["ring", y: number] | readonly ["mer", y0: number, y1: number, n: number, off?: number] | readonly ["helix", y0: number, y1: number, n: number, turns: number] | readonly ["net", y0: number, y1: number, n: number] | readonly ["dots", y: number, n: number, size: number, off?: number] | readonly ["disc", rho: number, tone: string] | readonly ["pills", rho: number, n: number, length: number, width: number, tone: string] | ExtraDecor;
|
|
7
7
|
/**
|
|
8
8
|
* Decorations that only some bodies use, drawn by the model's own `extras` (`lathe.extras.ts`) so that a body without them carries none of their code: a `mesh` is `rows` rows of diamonds stacked down the body from `y0` to `y1`
|
|
9
|
-
* with `n` strands round (strands that wind a column to the side at each row, one way and the other: an etched net); a `patch` is a tone laid on a round body between two angles and two heights (a shield on a helmet); a
|
|
9
|
+
* with `n` strands round (strands that wind a column to the side at each row, one way and the other: an etched net, in a tone of its own and a line `width` when given); a `patch` is a tone laid on a round body between two angles and two heights (a shield on a helmet); a
|
|
10
10
|
* `panel` is a tone laid on one flat face of a body with flat sides, from a fraction `u0` to `u1` across the face (a nameplate on a block).
|
|
11
11
|
*/
|
|
12
|
-
export type ExtraDecor = readonly ["mesh", y0: number, y1: number, n: number, rows: number] | readonly ["patch", y0: number, y1: number, deg0: number, deg1: number, tone: string] | readonly ["panel", face: number, y0: number, y1: number, u0: number, u1: number, tone: string];
|
|
12
|
+
export type ExtraDecor = readonly ["mesh", y0: number, y1: number, n: number, rows: number, tone?: string, width?: number] | readonly ["patch", y0: number, y1: number, deg0: number, deg1: number, tone: string] | readonly ["panel", face: number, y0: number, y1: number, u0: number, u1: number, tone: string];
|
|
13
13
|
/** What a drawer of `extras` is given: the solid, the turn and the helpers that place a point of its surface. */
|
|
14
14
|
export interface DecorCtx {
|
|
15
15
|
p: readonly Pt[];
|
|
@@ -29,6 +29,8 @@ export interface Solid {
|
|
|
29
29
|
turn?: number;
|
|
30
30
|
/** Stands off the axis: at the distance `r` from it, at the angle `deg` (90 is the right side, 0 faces the eye), and turns round the axis with the rest. Its own profile is about its own axis. */
|
|
31
31
|
at?: readonly [r: number, deg: number];
|
|
32
|
+
/** Leans the body: at the height `y0` it stands on the axis, and each unit above that its centre is `k` units further toward the angle `deg` (90 is the right side, 0 faces the eye), so a tapering vase can stand oblique, its mouth forward of its foot. The slant turns with the rest, and what is drawn on the body leans with it. */
|
|
33
|
+
lean?: readonly [k: number, deg: number, y0: number];
|
|
32
34
|
tone?: string;
|
|
33
35
|
decor?: readonly Decor[];
|
|
34
36
|
}
|
|
@@ -40,7 +42,11 @@ export interface Handle {
|
|
|
40
42
|
tone?: string;
|
|
41
43
|
}
|
|
42
44
|
export type BallKind = "plain" | "basket" | "soccer" | "base" | "globe" | "football" | "pine";
|
|
43
|
-
/**
|
|
45
|
+
/**
|
|
46
|
+
* A ball on the body: `cy` its centre, `r` its radius (and `ry` when it is longer than it is wide), `rot` the lean of a football in degrees. `fwd` sets the ball that far from the axis, toward the eye or, with `dir`, toward that angle (and so round the axis with the turn).
|
|
47
|
+
* `nba` gives it the seams of a basketball as grooves, drawn by the model's `ballExtras` (`LATHE_BALL`): in the tone `seam` when given, the ball leaning by `lean` (degrees about the line of sight, then about the horizontal)
|
|
48
|
+
* and, when `grain` is a number, that many specks of a grained finish.
|
|
49
|
+
*/
|
|
44
50
|
export interface Ball {
|
|
45
51
|
kind: BallKind;
|
|
46
52
|
cx?: number;
|
|
@@ -49,6 +55,23 @@ export interface Ball {
|
|
|
49
55
|
ry?: number;
|
|
50
56
|
rot?: number;
|
|
51
57
|
tone?: string;
|
|
58
|
+
fwd?: number;
|
|
59
|
+
dir?: number;
|
|
60
|
+
nba?: boolean;
|
|
61
|
+
seam?: string;
|
|
62
|
+
lean?: readonly [number, number];
|
|
63
|
+
grain?: number;
|
|
64
|
+
}
|
|
65
|
+
/** What a drawer of `ballExtras` is given: the ball, where it is drawn, the turn and the eye's elevation, and the tones. */
|
|
66
|
+
export interface BallCtx {
|
|
67
|
+
ball: Ball;
|
|
68
|
+
cx: number;
|
|
69
|
+
cy: number;
|
|
70
|
+
yaw: number;
|
|
71
|
+
elevation: number;
|
|
72
|
+
line: boolean;
|
|
73
|
+
flat: boolean;
|
|
74
|
+
tone: (name?: string) => Tone;
|
|
52
75
|
}
|
|
53
76
|
/** A ring of `n` poles that stand from a ring of radius `r0` at `y0` up to a ring of radius `r1`, their tops stepping from the height `top1` down to `top2` once round, each with a pennant `size` tall. */
|
|
54
77
|
export interface Poles {
|
|
@@ -62,6 +85,86 @@ export interface Poles {
|
|
|
62
85
|
/** The tops lie on a tilted ring, not a spiral: `top1` at the pole that faces the eye at rest, `top2` at the one opposite, and the sides between. */
|
|
63
86
|
tilted?: boolean;
|
|
64
87
|
}
|
|
88
|
+
/**
|
|
89
|
+
* What a model's own `framed` drawer is given: the turn (`yaw`, and `s`, the sine of the elevation of the eye), the style, and the tones of the body. The drawer places a point of its own 3D parts with `yaw` and `s`
|
|
90
|
+
* the way the body's surface is placed (x grows to the right, z toward the eye, y down) and returns SVG that is drawn over the solids, so a model with swept or framed parts (the open football of a conference
|
|
91
|
+
* trophy, the rods of a ball held up on three) keeps the body, the light and the turn of the rest.
|
|
92
|
+
*/
|
|
93
|
+
export interface FramedCtx {
|
|
94
|
+
yaw: number;
|
|
95
|
+
s: number;
|
|
96
|
+
line: boolean;
|
|
97
|
+
flat: boolean;
|
|
98
|
+
tone: (name?: string) => Tone;
|
|
99
|
+
/** The fill of a gradient of the model's own: its `url(#id)` in the metal style (the definition goes into the drawing), and the colour `rgb` flat in the `color` style. */
|
|
100
|
+
paint: (g: Gradient, rgb: Rgb) => string;
|
|
101
|
+
/** The engraving asked for, as one line (empty when none): a drawer that has its own plinth sets it on one flat side with `sideText`, in `ink`. */
|
|
102
|
+
engrave: string;
|
|
103
|
+
ink: string;
|
|
104
|
+
}
|
|
105
|
+
/** What a drawer of `parts` is given: the turn, the tilt (the sine of the elevation), the tones and the style. */
|
|
106
|
+
export interface SculptCtx {
|
|
107
|
+
yaw: number;
|
|
108
|
+
s: number;
|
|
109
|
+
tone: (name?: string) => Tone;
|
|
110
|
+
line: boolean;
|
|
111
|
+
flat: boolean;
|
|
112
|
+
/** The text of the engraving the options ask for, on one line ("" when none). */
|
|
113
|
+
words: string;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* One layer of a cut-out: a tone, a path (absolute `M L H V C Q Z` in the 64 unit box) and how it is painted: by default the tone's own metal shading with an edge; `dk` and `lt` a darker and a lighter
|
|
117
|
+
* shade laid over it (a fold, a highlight); `ln` a thin line; `gl` clear glass; `rf` a bright reflection; `fl` a flat fill; `sh` a white shine. The first layer is the silhouette, and the thickness of the cut-out is the extrusion of it.
|
|
118
|
+
*/
|
|
119
|
+
export type Layer = readonly [tone: string, d: string, mode?: "dk" | "lt" | "ln" | "gl" | "rf" | "fl" | "sh"];
|
|
120
|
+
/**
|
|
121
|
+
* A flat cut-out with thickness that stands in a plane and turns with the body: a silhouette (a player, a jersey, a plate of glass) drawn as original paths, extruded `t` thick. `at` is where its plane stands (`x`
|
|
122
|
+
* to the right and `z` toward the eye, from the axis), `y` moves it down, `rot` turns the way it faces (90 faces the right side), `copies` stand more of it at other places (`[x, z, y]`). A `decal` is on a
|
|
123
|
+
* face of a body and is not drawn when it faces away; a cut-out that is `under` is drawn before the bodies (a clear arc behind a cup). `n` is how many steps of edge a thick one is given at most; `fine` is left out of the line style.
|
|
124
|
+
*/
|
|
125
|
+
export interface Cut {
|
|
126
|
+
kind: "cut";
|
|
127
|
+
layers: readonly Layer[];
|
|
128
|
+
at?: readonly [x: number, z: number];
|
|
129
|
+
y?: number;
|
|
130
|
+
rot?: number;
|
|
131
|
+
t?: number;
|
|
132
|
+
decal?: boolean;
|
|
133
|
+
/** Left out of the line style, where small things only crowd the outline. */
|
|
134
|
+
fine?: boolean;
|
|
135
|
+
/** Where a text cut into the face goes, as the box's `[x0, x1, y0, y1]` (a nameplate); a decal with no layers carries only this. */
|
|
136
|
+
plate?: readonly [x0: number, x1: number, y0: number, y1: number];
|
|
137
|
+
under?: boolean;
|
|
138
|
+
copies?: readonly (readonly [x: number, z: number, y?: number])[];
|
|
139
|
+
n?: number;
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* A ribbon of metal that twists as it rises: a centre line through points `[x, y, z, phi, w]` (a place in the 3D of the body, the way the width lies in the horizontal plane in degrees, and the half width),
|
|
143
|
+
* drawn as a strip of quadrilaterals, each shaded by which way it faces.
|
|
144
|
+
*/
|
|
145
|
+
export interface Ribbon {
|
|
146
|
+
kind: "ribbon";
|
|
147
|
+
pts: readonly (readonly [x: number, y: number, z: number, phi: number, w: number])[];
|
|
148
|
+
tone?: string;
|
|
149
|
+
steps?: number;
|
|
150
|
+
under?: boolean;
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* A box with flat faces, wider than it is deep when the model says so (a body of revolution with flat sides is square): `x`, `y` and `z` are the faces' places (from the axis to the right, from the top of the
|
|
154
|
+
* box down, and from the back toward the eye), in `tone` with `top` for its upper face. Boxes are drawn in the order they are given, before the cut-outs and ribbons, so a base is listed from the bottom up.
|
|
155
|
+
*/
|
|
156
|
+
export interface Block {
|
|
157
|
+
kind: "box";
|
|
158
|
+
x: readonly [number, number];
|
|
159
|
+
y: readonly [number, number];
|
|
160
|
+
z: readonly [number, number];
|
|
161
|
+
tone?: string;
|
|
162
|
+
top?: string;
|
|
163
|
+
/** A tone for the edge of the upper face: a polished rim round the top of a tier. */
|
|
164
|
+
rim?: string;
|
|
165
|
+
under?: boolean;
|
|
166
|
+
}
|
|
167
|
+
export type Part = Cut | Ribbon | Block;
|
|
65
168
|
/** What a body of revolution is made of. All of it is in the 64 by 64 box with the axis at x = 32. */
|
|
66
169
|
export interface LatheModel {
|
|
67
170
|
metal: Metal;
|
|
@@ -87,6 +190,23 @@ export interface LatheModel {
|
|
|
87
190
|
plate?: Band;
|
|
88
191
|
/** Draws the `mesh`, `patch` and `panel` decorations of the solids (`LATHE_EXTRAS` in `lathe.extras.ts`); a body that uses none leaves it out. */
|
|
89
192
|
extras?: (c: DecorCtx, d: ExtraDecor) => string;
|
|
193
|
+
/** Cut-outs and ribbons that stand beside the solids and turn with them (`lathe.sculpt.ts`): a player, a plate of glass, a twisting ribbon. */
|
|
194
|
+
parts?: readonly Part[];
|
|
195
|
+
/** Draws the `parts` (`LATHE_SCULPT`); a body with no parts leaves it out, and carries none of the code. */
|
|
196
|
+
sculptor?: (c: SculptCtx, parts: readonly Part[]) => {
|
|
197
|
+
under: string;
|
|
198
|
+
over: string;
|
|
199
|
+
};
|
|
200
|
+
/** Draws parts that are not bodies of revolution (see `FramedCtx`, `lathe.framed.ts`), over the solids and under the handles and balls; a body without any leaves it out. */
|
|
201
|
+
framed?: (c: FramedCtx) => string;
|
|
202
|
+
/** The stroke of the `line` style when 2.3 is too heavy for the drawing's fine parts. */
|
|
203
|
+
lineWidth?: number;
|
|
204
|
+
/** The thin edge of the metal and colour styles (0.6) when that is too heavy for a polished one. */
|
|
205
|
+
edgeWidth?: number;
|
|
206
|
+
/** The highest elevation of the eye in degrees that a turn may reach (75 by default): a body that leans far from the axis swings its far end up the page by the sine of the elevation times its depth, so one that is tall and leaning stops short of a view from straight above. */
|
|
207
|
+
maxElevation?: number;
|
|
208
|
+
/** Draws the seams and the grain of the balls that ask for them (`nba`); `LATHE_BALL` in `lathe.extras.ts`. */
|
|
209
|
+
ballExtras?: (c: BallCtx) => string;
|
|
90
210
|
}
|
|
91
211
|
/** The radius of the body at a height. */
|
|
92
212
|
export declare function radiusAt(profile: readonly Pt[], y: number): number;
|
|
@@ -68,7 +68,7 @@ const ellipse = (cx, cy, rx, ry, fill, extra = "") => `<ellipse cx="${f(cx)}" cy
|
|
|
68
68
|
function draw(model, r, o, yaw, pitch) {
|
|
69
69
|
const line = r.style === "line";
|
|
70
70
|
const flat = r.style === "color";
|
|
71
|
-
const elevation = Math.max(0, Math.min(75, (model.tilt ?? 12) + pitch));
|
|
71
|
+
const elevation = Math.max(0, Math.min(model.maxElevation ?? 75, (model.tilt ?? 12) + pitch));
|
|
72
72
|
const s = Math.sin(elevation * RAD);
|
|
73
73
|
const spin = Math.sin(yaw * RAD);
|
|
74
74
|
const shift = 0.2 * spin;
|
|
@@ -248,6 +248,14 @@ function draw(model, r, o, yaw, pitch) {
|
|
|
248
248
|
mid.push(m);
|
|
249
249
|
}
|
|
250
250
|
}
|
|
251
|
+
if (solid.lean !== undefined) {
|
|
252
|
+
const [k, a, y0] = solid.lean;
|
|
253
|
+
const th = (a + yaw) * RAD;
|
|
254
|
+
const c = -k * Math.sin(th);
|
|
255
|
+
const d = 1 - s * k * Math.cos(th);
|
|
256
|
+
const g = (n) => String(Math.round(n * 1e3) / 1e3);
|
|
257
|
+
mid.push(`<g transform="matrix(1 0 ${g(c)} ${g(d)} ${g(-c * y0)} ${g(y0 * (1 - d))})">${mid.splice(mark).join("")}</g>`);
|
|
258
|
+
}
|
|
251
259
|
// A solid that stands off the axis is moved to its place, behind the body when it is on the far side and in front of it when it is on the near side.
|
|
252
260
|
if (solid.at !== undefined) {
|
|
253
261
|
const deg = solid.at[1] + yaw;
|
|
@@ -255,6 +263,8 @@ function draw(model, r, o, yaw, pitch) {
|
|
|
255
263
|
(Math.cos(deg * RAD) >= 0 ? front : back).push(`<g transform="translate(${f(solid.at[0] * Math.sin(deg * RAD))} ${f(s * solid.at[0] * Math.cos(deg * RAD))})">${piece.join("")}</g>`);
|
|
256
264
|
}
|
|
257
265
|
}
|
|
266
|
+
if (model.framed !== undefined)
|
|
267
|
+
mid.push(model.framed({ yaw, s, line, flat, tone, paint: (g, rgb) => (line ? "none" : flat ? hexOf(rgb) : (grads.push(g), g.fill)), engrave: model.plate === undefined ? flatText(engravingOf(o)) : "", ink: engravingInk(r.style, main.rgb) }));
|
|
258
268
|
// Handles: a tube through the points of its plane, behind the body when it is on the far side.
|
|
259
269
|
for (const h of model.handles ?? []) {
|
|
260
270
|
const deg = h.a + yaw;
|
|
@@ -306,8 +316,8 @@ function draw(model, r, o, yaw, pitch) {
|
|
|
306
316
|
const t = tone(ball.tone);
|
|
307
317
|
const rx = ball.r;
|
|
308
318
|
const ry = ball.ry ?? ball.r;
|
|
309
|
-
const
|
|
310
|
-
const
|
|
319
|
+
const [fx, cy] = at(ball.fwd ?? 0, ball.cy, yaw + (ball.dir ?? 0));
|
|
320
|
+
const cx = fx + (ball.cx ?? CX) - CX;
|
|
311
321
|
const spherical = line || flat || ball.kind === "pine" ? t.fill : (() => {
|
|
312
322
|
const g = orbGradient(t.rgb);
|
|
313
323
|
grads.push(g);
|
|
@@ -323,7 +333,7 @@ function draw(model, r, o, yaw, pitch) {
|
|
|
323
333
|
parts.push(`<g transform="translate(${f(cx)} ${f(cy)}) rotate(${f(ball.rot ?? 0)})"><path d="${shape}" fill="${spherical}"/>${line || flat ? "" : `<path d="M${f(-rx * 0.62)} ${f(-ry * 0.42)}Q${f(-rx * 0.5)} ${f(-ry * 0.1)} ${f(-rx * 0.54)} ${f(ry * 0.3)}" stroke="#fff" stroke-opacity=".5" stroke-width="1.6" fill="none"/>`}<path d="${laces}" stroke-width="1.1"/></g>`);
|
|
324
334
|
}
|
|
325
335
|
else {
|
|
326
|
-
parts.push(ellipse(cx, cy, rx, ry, spherical));
|
|
336
|
+
parts.push(ellipse(cx, cy, rx, ry, spherical, ball.nba ? own(t) : ""));
|
|
327
337
|
let seams = "";
|
|
328
338
|
const meridian = (lon) => {
|
|
329
339
|
const l = ((((lon + 90) % 360) + 360) % 360) - 90;
|
|
@@ -384,6 +394,8 @@ function draw(model, r, o, yaw, pitch) {
|
|
|
384
394
|
default:
|
|
385
395
|
break;
|
|
386
396
|
}
|
|
397
|
+
if (ball.nba)
|
|
398
|
+
parts.push(model.ballExtras?.({ ball, cx, cy, yaw, elevation, line, flat, tone }) ?? "");
|
|
387
399
|
if (patches !== "")
|
|
388
400
|
parts.push(`<path d="${patches}" fill="${line ? "none" : t.deep}" stroke-width="1"/>`);
|
|
389
401
|
if (seams !== "") {
|
|
@@ -397,6 +409,14 @@ function draw(model, r, o, yaw, pitch) {
|
|
|
397
409
|
}
|
|
398
410
|
mid.push(...parts);
|
|
399
411
|
}
|
|
412
|
+
// Cut-outs and ribbons: the ones behind the bodies first, then the rest in front of them.
|
|
413
|
+
if (model.parts !== undefined && model.sculptor !== undefined) {
|
|
414
|
+
const made = model.sculptor({ yaw, s, tone, line, flat, words: flatText(engravingOf(o)) }, model.parts);
|
|
415
|
+
if (made.under !== "")
|
|
416
|
+
back.unshift(made.under);
|
|
417
|
+
if (made.over !== "")
|
|
418
|
+
mid.push(made.over);
|
|
419
|
+
}
|
|
400
420
|
// The engraving on the plinth: letters set round the body (or along one flat side), foreshortened and hidden as they turn away.
|
|
401
421
|
const plate = model.plate;
|
|
402
422
|
const words = plate === undefined ? "" : flatText(engravingOf(o));
|
|
@@ -417,7 +437,9 @@ function draw(model, r, o, yaw, pitch) {
|
|
|
417
437
|
mid.push(sideText(words, 2 * radius * Math.sin(Math.PI / n), plate.y1 - plate.y0, ink, [ax, ay], [bx, by], Math.cos(((a0 + a1) / 2) * RAD)));
|
|
418
438
|
}
|
|
419
439
|
}
|
|
420
|
-
|
|
440
|
+
// A tone that was only asked for its colour (a box, a shade) has a gradient nothing paints with: it is left out of the definitions.
|
|
441
|
+
const body = back.join("") + mid.join("") + front.join("");
|
|
442
|
+
return { body, defs: line || flat ? "" : defsOf(grads.filter((g) => body.includes(g.id))), edge: main.edge };
|
|
421
443
|
}
|
|
422
444
|
/** The twelve pentagons of a ball, as the centres of a sphere's faces: the poles and two rings of five. */
|
|
423
445
|
const PENTAGONS = [
|
|
@@ -435,7 +457,7 @@ export function defineLathe(id, en, ja, source, model) {
|
|
|
435
457
|
const pitch = typeof o?.pitch === "number" && Number.isFinite(o.pitch) ? Math.max(-40, Math.min(60, o.pitch)) : 0;
|
|
436
458
|
const d = draw(model, r, o, yaw, pitch);
|
|
437
459
|
const box = (o?.turnBox ?? turned) ? turn : rest;
|
|
438
|
-
return wrap({ title: en, size: r.size, style: r.style, theme: r.theme, defs: d.defs, body: d.body, box, edge: d.edge, width: r.style === "line" ? 2.3 : 0.6 });
|
|
460
|
+
return wrap({ title: en, size: r.size, style: r.style, theme: r.theme, defs: d.defs, body: d.body, box, edge: d.edge, width: r.style === "line" ? (model.lineWidth ?? 2.3) : (model.edgeWidth ?? 0.6) });
|
|
439
461
|
};
|
|
440
462
|
const still = labelled(en, ja, (o) => make(o, false));
|
|
441
463
|
return { id, en, ja, source, kind: "lathe", model, svg: still, frame: labelled(en, ja, (o) => make(o, true)) };
|