@johnmorrisdotca/dougu-sports 0.1.0 → 0.2.1
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 +53 -1
- package/NOTICE.md +9 -58
- package/README.md +174 -37
- package/dist/emblems/award/badge.d.ts +2 -2
- package/dist/emblems/award/badge.js +14 -5
- package/dist/emblems/award/crown.d.ts +1 -1
- package/dist/emblems/award/crown.js +14 -4
- package/dist/emblems/award/medal.d.ts +2 -2
- package/dist/emblems/award/medal.js +14 -5
- package/dist/emblems/award/shield.d.ts +1 -1
- package/dist/emblems/award/shield.js +10 -4
- package/dist/emblems/award/star.d.ts +1 -1
- package/dist/emblems/award/star.js +10 -4
- package/dist/emblems/ball/ball.afl.js +3 -2
- package/dist/emblems/ball/ball.basketball6.js +1 -1
- package/dist/emblems/ball/ball.core.d.ts +9 -3
- package/dist/emblems/ball/ball.core.js +13 -0
- package/dist/emblems/ball/ball.cricket.js +1 -1
- package/dist/emblems/ball/ball.curlingstone.d.ts +2 -0
- package/dist/emblems/ball/ball.curlingstone.js +11 -7
- package/dist/emblems/ball/ball.discus.js +1 -1
- package/dist/emblems/ball/ball.engine.js +3 -3
- package/dist/emblems/ball/ball.football.js +9 -7
- package/dist/emblems/ball/ball.gaelic.js +1 -1
- package/dist/emblems/ball/ball.object.d.ts +5 -2
- package/dist/emblems/ball/ball.object.js +3 -2
- package/dist/emblems/ball/ball.puck.d.ts +2 -0
- package/dist/emblems/ball/ball.puck.js +2 -2
- package/dist/emblems/ball/ball.rugby.js +3 -2
- package/dist/emblems/ball/ball.shuttlecock.d.ts +4 -0
- package/dist/emblems/ball/ball.shuttlecock.js +6 -5
- package/dist/emblems/ball/ball.squash.js +5 -5
- package/dist/emblems/emblem.api.d.ts +39 -1
- package/dist/emblems/emblem.api.js +20 -2
- package/dist/emblems/emblem.compose.d.ts +31 -0
- package/dist/emblems/emblem.compose.js +91 -0
- package/dist/emblems/emblem.core.d.ts +48 -2
- package/dist/emblems/emblem.core.js +30 -0
- package/dist/emblems/emblem.descriptions.d.ts +7 -0
- package/dist/emblems/emblem.descriptions.js +60 -0
- package/dist/emblems/emblem.display.d.ts +75 -0
- package/dist/emblems/emblem.display.js +214 -0
- package/dist/emblems/emblem.engrave.d.ts +50 -0
- package/dist/emblems/emblem.engrave.js +145 -0
- package/dist/emblems/emblem.equipment.d.ts +24 -0
- package/dist/emblems/emblem.equipment.js +57 -0
- package/dist/emblems/emblem.flip.d.ts +10 -0
- package/dist/emblems/emblem.flip.js +46 -0
- package/dist/emblems/emblem.ids.d.ts +19 -11
- package/dist/emblems/emblem.ids.js +21 -6
- package/dist/emblems/emblem.lathe.d.ts +3 -0
- package/dist/emblems/emblem.lathe.js +26 -4
- package/dist/emblems/emblem.medal.js +4 -4
- package/dist/emblems/emblem.pennant.d.ts +3 -0
- package/dist/emblems/emblem.pennant.js +79 -0
- package/dist/emblems/emblem.registry.js +20 -0
- package/dist/emblems/emblem.shapes.d.ts +19 -2
- package/dist/emblems/emblem.shapes.js +55 -13
- package/dist/emblems/emblem.sprite.d.ts +38 -0
- package/dist/emblems/emblem.sprite.js +65 -0
- package/dist/emblems/emblem.uri.d.ts +22 -0
- package/dist/emblems/emblem.uri.js +29 -0
- package/dist/emblems/gear/gear.badmintonracket.d.ts +1 -1
- package/dist/emblems/gear/gear.badmintonracket.js +18 -14
- package/dist/emblems/gear/gear.baseballglove.d.ts +1 -1
- package/dist/emblems/gear/gear.baseballglove.js +20 -14
- package/dist/emblems/gear/gear.budo.d.ts +17 -0
- package/dist/emblems/gear/gear.budo.js +60 -0
- package/dist/emblems/gear/gear.core.d.ts +12 -31
- package/dist/emblems/gear/gear.core.js +61 -54
- package/dist/emblems/gear/gear.cricketbat.d.ts +1 -1
- package/dist/emblems/gear/gear.cricketbat.js +16 -14
- package/dist/emblems/gear/gear.fieldhockeystick.d.ts +1 -1
- package/dist/emblems/gear/gear.fieldhockeystick.js +15 -14
- package/dist/emblems/gear/gear.footballhelmet.d.ts +1 -1
- package/dist/emblems/gear/gear.footballhelmet.js +15 -14
- package/dist/emblems/gear/gear.goaliemask.d.ts +1 -1
- package/dist/emblems/gear/gear.goaliemask.js +22 -16
- package/dist/emblems/gear/gear.goalnet.d.ts +1 -1
- package/dist/emblems/gear/gear.goalnet.js +24 -14
- package/dist/emblems/gear/gear.hockeystick.d.ts +1 -1
- package/dist/emblems/gear/gear.hockeystick.js +14 -14
- package/dist/emblems/gear/gear.index.js +5 -1
- package/dist/emblems/gear/gear.kendo.d.ts +2 -0
- package/dist/emblems/gear/gear.kendo.js +41 -0
- package/dist/emblems/gear/gear.kyudo.d.ts +2 -0
- package/dist/emblems/gear/gear.kyudo.js +31 -0
- package/dist/emblems/gear/gear.lacrossestick.d.ts +1 -1
- package/dist/emblems/gear/gear.lacrossestick.js +25 -14
- package/dist/emblems/gear/gear.skates.js +1 -1
- package/dist/emblems/gear/gear.sticks.js +2 -2
- package/dist/emblems/gear/gear.sumo.d.ts +2 -0
- package/dist/emblems/gear/gear.sumo.js +43 -0
- package/dist/emblems/gear/gear.tabletennispaddle.d.ts +1 -1
- package/dist/emblems/gear/gear.tabletennispaddle.js +15 -14
- package/dist/emblems/gear/gear.tennisracket.d.ts +1 -1
- package/dist/emblems/gear/gear.tennisracket.js +16 -14
- package/dist/emblems/pennant/championship.d.ts +2 -0
- package/dist/emblems/pennant/championship.js +4 -0
- package/dist/emblems/sport/afl.js +1 -1
- package/dist/emblems/sport/artisticswimming.js +1 -1
- package/dist/emblems/sport/cfl.d.ts +1 -1
- package/dist/emblems/sport/cfl.js +4 -4
- package/dist/emblems/sport/cricket.d.ts +1 -1
- package/dist/emblems/sport/cricket.js +13 -4
- package/dist/emblems/sport/fieldhockey.js +1 -1
- package/dist/emblems/sport/gaelic.js +1 -1
- package/dist/emblems/sport/handball.d.ts +1 -1
- package/dist/emblems/sport/handball.js +14 -4
- package/dist/emblems/sport/ifaf.d.ts +1 -1
- package/dist/emblems/sport/ifaf.js +4 -4
- package/dist/emblems/sport/judo.d.ts +2 -0
- package/dist/emblems/sport/judo.js +13 -0
- package/dist/emblems/sport/karate.d.ts +2 -0
- package/dist/emblems/sport/karate.js +13 -0
- package/dist/emblems/sport/kendo.d.ts +2 -0
- package/dist/emblems/sport/kendo.js +14 -0
- package/dist/emblems/sport/kyudo.d.ts +2 -0
- package/dist/emblems/sport/kyudo.js +15 -0
- package/dist/emblems/sport/mlb.d.ts +1 -1
- package/dist/emblems/sport/mlb.js +27 -4
- package/dist/emblems/sport/nba.d.ts +1 -1
- package/dist/emblems/sport/nba.js +11 -4
- package/dist/emblems/sport/netball.js +1 -1
- package/dist/emblems/sport/nfl.d.ts +2 -1
- package/dist/emblems/sport/nfl.js +14 -4
- package/dist/emblems/sport/nhl.d.ts +1 -1
- package/dist/emblems/sport/nhl.js +12 -4
- package/dist/emblems/sport/pickleball.js +1 -1
- package/dist/emblems/sport/racquetball.js +1 -1
- package/dist/emblems/sport/roundnet.js +1 -1
- package/dist/emblems/sport/rugby.d.ts +1 -1
- package/dist/emblems/sport/rugby.js +11 -4
- package/dist/emblems/sport/sepaktakraw.js +1 -1
- package/dist/emblems/sport/soccer.d.ts +1 -1
- package/dist/emblems/sport/soccer.js +30 -4
- package/dist/emblems/sport/squash.js +1 -1
- package/dist/emblems/sport/sumo.d.ts +2 -0
- package/dist/emblems/sport/sumo.js +15 -0
- package/dist/emblems/sport/tabletennis.js +1 -1
- package/dist/emblems/sport/tennis.d.ts +1 -1
- package/dist/emblems/sport/tennis.js +14 -4
- package/dist/emblems/sport/teqball.js +1 -1
- package/dist/emblems/sport/volleyball.d.ts +1 -1
- package/dist/emblems/sport/volleyball.js +24 -4
- package/dist/emblems/trophy/banner.d.ts +2 -0
- package/dist/emblems/trophy/banner.js +20 -0
- package/dist/emblems/trophy/baseball.js +1 -0
- package/dist/emblems/trophy/basketball.js +1 -0
- package/dist/emblems/trophy/belt.js +2 -1
- package/dist/emblems/trophy/bowl.js +1 -0
- package/dist/emblems/trophy/canadian-bowl.js +1 -0
- package/dist/emblems/trophy/championship-banner.d.ts +2 -0
- package/dist/emblems/trophy/championship-banner.js +67 -0
- package/dist/emblems/trophy/cricket-urn.js +1 -0
- package/dist/emblems/trophy/cup.d.ts +1 -1
- package/dist/emblems/trophy/cup.js +15 -4
- package/dist/emblems/trophy/football.js +2 -1
- package/dist/emblems/trophy/globe.js +1 -0
- package/dist/emblems/trophy/hockey-cup.js +2 -1
- package/dist/emblems/trophy/lidded-cup.js +1 -0
- package/dist/emblems/trophy/plaque.js +2 -1
- package/dist/emblems/trophy/ring.d.ts +2 -0
- package/dist/emblems/trophy/ring.js +30 -0
- package/dist/emblems/trophy/rugby-cup.js +1 -0
- package/dist/emblems/trophy/salver.js +1 -0
- package/dist/emblems/trophy/soccer-ball.js +2 -1
- package/dist/emblems/trophy/soccer-globe.js +1 -0
- package/dist/emblems/trophy/sumo-cup.d.ts +2 -0
- package/dist/emblems/trophy/sumo-cup.js +28 -0
- package/dist/emblems/trophy/tennis-cup.js +2 -1
- package/dist/emblems/trophy/tennis-plate.js +1 -0
- package/dist/emblems-entry.d.ts +15 -6
- package/dist/emblems-entry.js +7 -2
- package/dist/index.d.ts +17 -0
- package/dist/index.js +15 -0
- package/dist/turn-control.d.ts +101 -0
- package/dist/turn-control.js +363 -0
- package/dist/turn-entry.d.ts +2 -0
- package/dist/turn-entry.js +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +7 -1
- package/LICENSES/Apache-2.0.txt +0 -202
- package/LICENSES/CC-BY-3.0.txt +0 -319
- package/LICENSES/upstream/game-icons.license.txt +0 -45
- package/LICENSES/upstream/noto-emoji-2D-svg.LICENSE +0 -13
- package/LICENSES/upstream/pictogrammers-mdi.LICENSE +0 -20
- package/dist/emblems/emblem.material.d.ts +0 -9
- package/dist/emblems/emblem.material.data.d.ts +0 -34
- package/dist/emblems/emblem.material.data.js +0 -85
- package/dist/emblems/emblem.material.js +0 -23
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { drawn, seg } from "./gear.core.js";
|
|
2
|
+
/** The colours of a judo belt from the first rank to the black belt, in order, which `tint` takes. */
|
|
3
|
+
export const OBI_RANKS = {
|
|
4
|
+
white: "#f2efe8",
|
|
5
|
+
yellow: "#f2c21b",
|
|
6
|
+
orange: "#ee8a1c",
|
|
7
|
+
green: "#2f9a52",
|
|
8
|
+
blue: "#2b64c8",
|
|
9
|
+
brown: "#7a4a24",
|
|
10
|
+
black: "#1f2228",
|
|
11
|
+
};
|
|
12
|
+
const CLOTH = "#f4f2ec";
|
|
13
|
+
const EDGE = "#7b8491";
|
|
14
|
+
/** A belt tied at the waist (a flat band, a knot, two ends hanging) from `x0` to `x1` at height `y`. */
|
|
15
|
+
const tied = (x0, x1, y) => {
|
|
16
|
+
const c = (x0 + x1) / 2;
|
|
17
|
+
return `M${x0} ${y}H${x1}V${y + 4}H${x0}zM${c - 3} ${y - 0.6}h6v5.2h-6zM${c - 1.4} ${y + 4.6}L${c - 4.6} ${y + 14}h3.4L${c + 0.4} ${y + 4.6}zM${c + 1.4} ${y + 4.6}L${c + 4.8} ${y + 13.4}h-3.4L${c - 0.4} ${y + 4.6}z`;
|
|
18
|
+
};
|
|
19
|
+
export const GEAR_JUDOGI = /* @__PURE__ */ drawn("gear:judogi", "Judo suit", "柔道衣", {
|
|
20
|
+
main: CLOTH,
|
|
21
|
+
accent: "#1f2228",
|
|
22
|
+
parts: [
|
|
23
|
+
{ d: "M22.4 44.4H31.6L30.8 61H21.2ZM32.4 44.4H41.6L42.8 61H33.2Z", fill: "$main", cyl: 0.6, shade: 0.3 },
|
|
24
|
+
{ d: "M23.6 9.4L8 36.4Q6.6 39.4 9.4 41.4L14.6 45Q17.4 46.4 19 43.4L29 27.4Z", fill: "$main", cyl: 0.5, shade: 0.4 },
|
|
25
|
+
{ d: "M40.4 9.4L56 36.4Q57.4 39.4 54.6 41.4L49.4 45Q46.6 46.4 45 43.4L35 27.4Z", fill: "$main", cyl: 0.5, shade: 0.4 },
|
|
26
|
+
{ d: "M23.6 9.4Q32 7 40.4 9.4L45 27.4V46H19V27.4Z", fill: "$main", cyl: 0.6, shade: 0.4 },
|
|
27
|
+
{ d: "M26 8.6L35.4 31M38 8.6L28.6 31", fill: "none", stroke: "#cfc8b8", w: 3.6, line: "none" },
|
|
28
|
+
{ d: "M26 8.6L35.4 31M38 8.6L28.6 31", fill: "none", stroke: "#8f98a3", w: 0.7, line: "stroke" },
|
|
29
|
+
{ d: "M29.2 9.4Q32 12 34.8 9.4L32 16Z", fill: "#3a414b", stroke: "none", op: 0.5, line: "none", fx: true },
|
|
30
|
+
{ d: "M13 31L19.4 39.4M11.4 34.4L17.6 42.4M47 31L40.6 39.4M48.6 34.4L42.4 42.4", fill: "none", stroke: "#a9b1bb", w: 0.7, line: "none" },
|
|
31
|
+
{ d: tied(19, 45, 40.4), fill: "$accent", stroke: EDGE, cyl: 0.8, shade: 0.2 },
|
|
32
|
+
],
|
|
33
|
+
});
|
|
34
|
+
export const GEAR_KARATE_GI = /* @__PURE__ */ drawn("gear:karate-gi", "Karate suit", "空手衣", {
|
|
35
|
+
main: CLOTH,
|
|
36
|
+
accent: "#1f2228",
|
|
37
|
+
parts: [
|
|
38
|
+
{ d: "M20.4 46H31.4L28.4 61H17.8ZM32.6 46H43.6L46.2 61H35.6Z", fill: "$main", cyl: 0.6, shade: 0.3 },
|
|
39
|
+
{ d: "M22.6 9.6L9 27.4Q7 30.4 9.6 32.4L13 34.6Q15.6 36.6 17.6 33.6L26 22Z", fill: "$main", cyl: 0.5, shade: 0.4 },
|
|
40
|
+
{ d: "M41.4 9.6L55 27.4Q57 30.4 54.4 32.4L51 34.6Q48.4 36.6 46.4 33.6L38 22Z", fill: "$main", cyl: 0.5, shade: 0.4 },
|
|
41
|
+
{ d: "M22.6 9.6Q32 7.4 41.4 9.6L44.8 28V48H19.2V28Z", fill: "$main", cyl: 0.6, shade: 0.4 },
|
|
42
|
+
{ d: "M25.4 8.8L37 37M38.6 8.8L27 37", fill: "none", stroke: "#8f98a3", w: 0.9, line: "stroke" },
|
|
43
|
+
{ d: "M28.8 9.6Q32 13 35.2 9.6L32 19Z", fill: "#3a414b", stroke: "none", op: 0.5, line: "none", fx: true },
|
|
44
|
+
{ d: tied(19.2, 44.8, 40), fill: "$accent", stroke: EDGE, cyl: 0.8, shade: 0.2 },
|
|
45
|
+
],
|
|
46
|
+
});
|
|
47
|
+
export const GEAR_OBI = /* @__PURE__ */ drawn("gear:obi", "Belt", "武道の帯", {
|
|
48
|
+
main: OBI_RANKS.black,
|
|
49
|
+
parts: [
|
|
50
|
+
{ d: "M35 34L24.4 57.6L30 61L40.6 36Z", fill: "$main", stroke: EDGE, cyl: 0.7, shade: 0.3 },
|
|
51
|
+
{ d: "M29 34L40.4 57.6L46 55.4L34.6 34Z", fill: "$main", stroke: EDGE, cyl: 0.7, shade: 0.3 },
|
|
52
|
+
{ d: seg(27.4, 55.6, 31.4, 58.4) + seg(38.4, 54.6, 42.4, 53), fill: "none", stroke: "$accent", w: 1.6, line: "none" },
|
|
53
|
+
{ d: "M2.6 23.4Q32 27.6 61.4 23.4V34.4Q32 38.6 2.6 34.4Z", fill: "$main", stroke: EDGE, cyl: 0.7, shade: 0.3 },
|
|
54
|
+
{ d: "M2.6 27.2Q32 31.4 61.4 27.2", fill: "none", stroke: "$accent", w: 1.4, line: "none" },
|
|
55
|
+
{ d: "M25.4 22.4h13.2v15.6H25.4z", fill: "$main", stroke: EDGE, cyl: 1, shade: 0.3 },
|
|
56
|
+
{ d: "M25.4 27.6h13.2M25.4 32.6h13.2", fill: "none", stroke: "$accent", w: 0.8, line: "none" },
|
|
57
|
+
],
|
|
58
|
+
});
|
|
59
|
+
/** The belt of a rank, `"white"` to `"black"`: the same as `GEAR_OBI.svg({ ...options, tint: OBI_RANKS[rank] })`. An unknown rank is the black belt. */
|
|
60
|
+
export const obi = (rank, options) => GEAR_OBI.svg({ ...options, tint: Object.hasOwn(OBI_RANKS, rank) ? OBI_RANKS[rank] : OBI_RANKS.black });
|
|
@@ -13,8 +13,12 @@ export interface Part {
|
|
|
13
13
|
line?: "stroke" | "ink" | "none";
|
|
14
14
|
/** A transform for the part. */
|
|
15
15
|
t?: string;
|
|
16
|
-
/** How much light and shade the part takes, 0 (flat) to 1 (the default). */
|
|
16
|
+
/** How much light and shade the part takes along a diagonal, 0 (flat) to 1 (the default). */
|
|
17
17
|
shade?: number;
|
|
18
|
+
/** How much a part is shaded across its own width, as a round shaft is (a bright band, a dark side), 0 to 1. Drawn in the part's own frame, so it follows the part's transform. */
|
|
19
|
+
cyl?: number;
|
|
20
|
+
/** A highlight or a shadow laid on a part: drawn in the metal style only, never flat and never as a line. */
|
|
21
|
+
fx?: boolean;
|
|
18
22
|
/** Opacity of the part in colour. */
|
|
19
23
|
op?: number;
|
|
20
24
|
}
|
|
@@ -36,9 +40,9 @@ export interface GearDef<Model = unknown> {
|
|
|
36
40
|
model: Model;
|
|
37
41
|
draw: (options: PieceOptions | undefined) => string;
|
|
38
42
|
}
|
|
39
|
-
/** A piece of gear from its drawing function.
|
|
43
|
+
/** A piece of gear from its drawing function. Turned, it flips like a coin (`flipSvg`): the front, then its mirrored back, with a thin rim. */
|
|
40
44
|
export declare function defineGear<Model>(def: GearDef<Model>): Piece<Model>;
|
|
41
|
-
/** A drawn piece: its parts become a document in
|
|
45
|
+
/** A drawn piece: its parts become a document in the metal, color or line style, whole or turned (the turn is `flipSvg`'s). */
|
|
42
46
|
export declare function drawGear(id: string, title: string, spec: GearSpec, options: PieceOptions | undefined): string;
|
|
43
47
|
/** The pieces' drawing helpers: shapes written as path strings. */
|
|
44
48
|
export declare const rect: (x: number, y: number, w: number, h: number, r?: number) => string;
|
|
@@ -49,35 +53,12 @@ export declare const poly: (...pts: Array<[number, number]>) => string;
|
|
|
49
53
|
export declare const seg: (x1: number, y1: number, x2: number, y2: number) => string;
|
|
50
54
|
/** A capsule: a thick line with round ends, as a closed path (so it has an outline in the line style). */
|
|
51
55
|
export declare function capsule(x1: number, y1: number, x2: number, y2: number, w: number): string;
|
|
52
|
-
/** The ink of a copied colour drawing worked out as a line drawing: dark fills and strokes become `currentColor`, light ones are left out, the rest are a faint tint of it. Used where no other line artwork exists. */
|
|
53
|
-
export declare function monoOf(markup: string): string;
|
|
54
56
|
/** A piece we drew: the common case of `defineGear`. */
|
|
55
57
|
export declare function drawn(id: string, en: string, ja: string, spec: GearSpec, size?: PieceSize): Piece<GearSpec>;
|
|
56
58
|
/** The strings of a racket's head: a grid of lines clipped to an ellipse. */
|
|
57
59
|
export declare function strings(cx: number, cy: number, rx: number, ry: number, step: number): string;
|
|
58
|
-
/**
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
source: PieceSource;
|
|
64
|
-
/** The attribution the licence asks for: the author and the licence. */
|
|
65
|
-
credit: string;
|
|
66
|
-
/** The colour artwork's box and its (minified) markup. For a piece drawn in one colour (the glove) it is the path alone. */
|
|
67
|
-
box: string;
|
|
68
|
-
colour: string;
|
|
69
|
-
/** The line artwork: a one-path icon, or `derived` to work it out of the colour one. */
|
|
70
|
-
line: {
|
|
71
|
-
box: string;
|
|
72
|
-
d: string;
|
|
73
|
-
} | "derived";
|
|
74
|
-
/** A pale shape to lay under line artwork that is only ink (a mask's face), so that it reads as a solid thing in colour. */
|
|
75
|
-
underlay?: string;
|
|
76
|
-
/** The colour a one-path piece is filled with (a glove's leather). */
|
|
77
|
-
leather?: string;
|
|
78
|
-
/** The ink of one-colour artwork in the colour style. */
|
|
79
|
-
ink?: string;
|
|
80
|
-
size?: PieceSize;
|
|
81
|
-
}
|
|
82
|
-
/** Copied artwork as a piece: the colour version as it was drawn, the line version in `currentColor`. */
|
|
83
|
-
export declare function copied(spec: CopiedSpec): Piece<CopiedSpec>;
|
|
60
|
+
/**
|
|
61
|
+
* A shape of varying width along a curve, as a closed path: a cubic Bezier from `a` to `b` through the controls `c1` and `c2`, drawn `width(t)` wide at the fraction `t` of the way along. A bow, a blade or a feather
|
|
62
|
+
* is one of these. `steps` is how many segments each side has.
|
|
63
|
+
*/
|
|
64
|
+
export declare function swell(a: readonly [number, number], c1: readonly [number, number], c2: readonly [number, number], b: readonly [number, number], width: (t: number) => number, steps?: number): string;
|
|
@@ -1,27 +1,35 @@
|
|
|
1
|
-
// Gear: pieces of equipment drawn flat
|
|
2
|
-
//
|
|
3
|
-
//
|
|
4
|
-
import {
|
|
5
|
-
|
|
1
|
+
// Gear: pieces of equipment drawn flat from a list of parts (a path, a colour, how it reads as a line), in the same three styles as the trophies: `metal` (a fill shaded across and along, edged in a darker tone
|
|
2
|
+
// of itself), `color` (flat fills with the same edges) and `line` (`currentColor`). A piece turns like a coin through the one turn every flat drawing shares (emblem.flip.ts): squeezed by the cosine of the yaw,
|
|
3
|
+
// its back mirrored, with a thin rim. Self-contained: it imports only the shared option and colour helpers of the ball folder and the coin-flip turn.
|
|
4
|
+
import { flipSvg } from "../emblem.flip.js";
|
|
5
|
+
import { escape, hashOf, labelled, mix, num, readColour, resolveOptions, wrapPiece } from "../ball/ball.core.js";
|
|
6
|
+
/** A turn in degrees, as a finite number (0 for anything else). */
|
|
7
|
+
const turn = (value) => (typeof value === "number" && Number.isFinite(value) ? value % 360 : 0);
|
|
8
|
+
/** A piece of gear turned like a coin: a flat cut-out with a front, a mirrored back and a thin rim. */
|
|
9
|
+
const flip = (draw) => (o) => flipSvg(draw(o), { yaw: turn(o?.yaw), pitch: turn(o?.pitch), line: o?.style === "line", thick: 0.025 });
|
|
10
|
+
/** A piece of gear from its drawing function. Turned, it flips like a coin (`flipSvg`): the front, then its mirrored back, with a thin rim. */
|
|
6
11
|
export function defineGear(def) {
|
|
7
|
-
return { id: def.id, en: def.en, ja: def.ja, source: def.source, kind: "gear", model: def.model, size: def.size, svg: (o) => def.draw(o), frame: (
|
|
12
|
+
return { id: def.id, en: def.en, ja: def.ja, source: def.source, kind: "gear", model: def.model, size: def.size, svg: labelled(def.en, def.ja, (o) => def.draw(o)), frame: labelled(def.en, def.ja, flip(def.draw)) };
|
|
8
13
|
}
|
|
9
|
-
/** A drawn piece: its parts become a document in
|
|
14
|
+
/** A drawn piece: its parts become a document in the metal, color or line style, whole or turned (the turn is `flipSvg`'s). */
|
|
10
15
|
export function drawGear(id, title, spec, options) {
|
|
11
16
|
const o = resolveOptions(options);
|
|
12
17
|
const line = o.style === "line";
|
|
18
|
+
const flat = options?.style === "color";
|
|
13
19
|
const main = o.tint ?? spec.main;
|
|
14
20
|
const accent = o.accent ?? spec.accent ?? mix(main, -0.3);
|
|
15
21
|
const gid = `g${hashOf(`${id}|${o.tint ?? ""}|${o.accent ?? ""}`)}`;
|
|
16
22
|
const resolve = (c) => (c === "$main" ? main : c === "$accent" ? accent : c);
|
|
17
23
|
let body = "";
|
|
24
|
+
let across = false;
|
|
25
|
+
let along = false;
|
|
18
26
|
for (const p of spec.parts) {
|
|
19
27
|
const t = p.t === undefined ? "" : ` transform="${escape(p.t)}"`;
|
|
20
28
|
const fill = resolve(p.fill);
|
|
21
29
|
const hasFill = fill !== undefined && fill !== "none";
|
|
22
30
|
if (line) {
|
|
23
31
|
const mode = p.line ?? "stroke";
|
|
24
|
-
if (mode === "none")
|
|
32
|
+
if (mode === "none" || p.fx === true)
|
|
25
33
|
continue;
|
|
26
34
|
if (mode === "ink" && hasFill)
|
|
27
35
|
body += `<path d="${p.d}" fill="currentColor"${t}/>`;
|
|
@@ -31,16 +39,31 @@ export function drawGear(id, title, spec, options) {
|
|
|
31
39
|
body += `<path d="${p.d}" fill="none" stroke="currentColor" stroke-width="${num(Math.max(p.w ?? 2, 1.6), 2)}"${t}/>`;
|
|
32
40
|
continue;
|
|
33
41
|
}
|
|
42
|
+
const op = p.op === undefined ? "" : ` opacity="${p.op}"`;
|
|
43
|
+
if (p.fx === true) {
|
|
44
|
+
if (!flat)
|
|
45
|
+
body += `<path d="${p.d}" fill="${fill}"${op}${t}/>`;
|
|
46
|
+
continue;
|
|
47
|
+
}
|
|
34
48
|
const stroke = resolve(p.stroke) ?? (hasFill ? mix(readColour(fill) === undefined ? "#888888" : fill, -0.45) : "none");
|
|
35
49
|
const w = p.w ?? 0.9;
|
|
36
|
-
const op = p.op === undefined ? "" : ` opacity="${p.op}"`;
|
|
37
50
|
body += `<path d="${p.d}" fill="${hasFill ? fill : "none"}" stroke="${stroke}" stroke-width="${num(w, 2)}"${hasFill || stroke === "none" ? ` stroke-linejoin="round"` : ` stroke-linecap="round"`}${op}${t}/>`;
|
|
38
|
-
if (hasFill &&
|
|
39
|
-
|
|
51
|
+
if (hasFill && !flat) {
|
|
52
|
+
if (p.shade !== 0) {
|
|
53
|
+
along = true;
|
|
54
|
+
body += `<path d="${p.d}" fill="url(#${gid})"${p.shade === undefined ? "" : ` opacity="${p.shade}"`}${t}/>`;
|
|
55
|
+
}
|
|
56
|
+
if (p.cyl !== undefined && p.cyl > 0) {
|
|
57
|
+
across = true;
|
|
58
|
+
body += `<path d="${p.d}" fill="url(#${gid}c)"${p.cyl === 1 ? "" : ` opacity="${p.cyl}"`}${t}/>`;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
40
61
|
}
|
|
41
|
-
const defs =
|
|
42
|
-
|
|
43
|
-
|
|
62
|
+
const defs = (along ? `<linearGradient id="${gid}" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="#fff" stop-opacity=".42"/><stop offset=".5" stop-color="#fff" stop-opacity="0"/><stop offset="1" stop-color="#000" stop-opacity=".3"/></linearGradient>` : "") +
|
|
63
|
+
(across ? `<linearGradient id="${gid}c" x2="1"><stop offset="0" stop-color="#000" stop-opacity=".34"/><stop offset=".26" stop-color="#fff" stop-opacity=".5"/><stop offset=".55" stop-color="#fff" stop-opacity="0"/><stop offset=".88" stop-color="#000" stop-opacity=".22"/><stop offset="1" stop-color="#000" stop-opacity=".4"/></linearGradient>` : "");
|
|
64
|
+
const box = spec.box ?? "0 0 64 64";
|
|
65
|
+
const inner = line ? `<g stroke-linecap="round" stroke-linejoin="round">${body}</g>` : `<g stroke-linecap="round">${body}</g>`;
|
|
66
|
+
return wrapPiece({ title: escape(title), size: o.size, theme: o.theme, defs, body: inner, box });
|
|
44
67
|
}
|
|
45
68
|
/** The pieces' drawing helpers: shapes written as path strings. */
|
|
46
69
|
export const rect = (x, y, w, h, r = 0) => r === 0 ? `M${x} ${y}h${w}v${h}h${-w}z` : `M${x + r} ${y}h${w - 2 * r}a${r} ${r} 0 0 1 ${r} ${r}v${h - 2 * r}a${r} ${r} 0 0 1 ${-r} ${r}h${-(w - 2 * r)}a${r} ${r} 0 0 1 ${-r} ${-r}v${-(h - 2 * r)}a${r} ${r} 0 0 1 ${r} ${-r}z`;
|
|
@@ -58,25 +81,6 @@ export function capsule(x1, y1, x2, y2, w) {
|
|
|
58
81
|
const f = (n) => String(Math.round(n * 100) / 100);
|
|
59
82
|
return `M${f(x1 + nx)} ${f(y1 + ny)}L${f(x2 + nx)} ${f(y2 + ny)}A${r} ${r} 0 0 0 ${f(x2 - nx)} ${f(y2 - ny)}L${f(x1 - nx)} ${f(y1 - ny)}A${r} ${r} 0 0 0 ${f(x1 + nx)} ${f(y1 + ny)}z`;
|
|
60
83
|
}
|
|
61
|
-
/** The ink of a copied colour drawing worked out as a line drawing: dark fills and strokes become `currentColor`, light ones are left out, the rest are a faint tint of it. Used where no other line artwork exists. */
|
|
62
|
-
export function monoOf(markup) {
|
|
63
|
-
const lum = (c) => {
|
|
64
|
-
const rgb = readColour(c);
|
|
65
|
-
if (rgb === undefined)
|
|
66
|
-
return 0.5;
|
|
67
|
-
const [r, g, b] = rgb.map((v) => v / 255);
|
|
68
|
-
return 0.2126 * r + 0.7152 * g + 0.0722 * b;
|
|
69
|
-
};
|
|
70
|
-
return markup
|
|
71
|
-
.replace(/<(linearGradient|radialGradient)[\s\S]*?<\/\1>/g, "")
|
|
72
|
-
.replace(/(fill|stroke)="(#[0-9a-fA-F]{3,6})"/g, (_m, attr, c) => {
|
|
73
|
-
const l = lum(c);
|
|
74
|
-
if (attr === "stroke")
|
|
75
|
-
return `stroke="currentColor"`;
|
|
76
|
-
return l < 0.5 ? `fill="currentColor"` : l > 0.86 ? `fill="none"` : `fill="currentColor" fill-opacity=".4"`;
|
|
77
|
-
})
|
|
78
|
-
.replace(/(fill|stroke)="url\(#[^)]*\)"/g, (_m, attr) => (attr === "fill" ? `fill="currentColor" fill-opacity=".25"` : `stroke="currentColor"`));
|
|
79
|
-
}
|
|
80
84
|
/** A piece we drew: the common case of `defineGear`. */
|
|
81
85
|
export function drawn(id, en, ja, spec, size) {
|
|
82
86
|
return defineGear({ id, en, ja, source: "drawn", size, model: spec, draw: (o) => drawGear(id, en, spec, o) });
|
|
@@ -95,26 +99,29 @@ export function strings(cx, cy, rx, ry, step) {
|
|
|
95
99
|
}
|
|
96
100
|
return d;
|
|
97
101
|
}
|
|
98
|
-
/**
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
return wrapPiece({ title: escape(spec.en), desc, size: o.size, theme: o.theme, box: spec.line.box, body: `<path d="${spec.line.d}" fill="currentColor"/>` });
|
|
107
|
-
}
|
|
108
|
-
if (spec.leather !== undefined) {
|
|
109
|
-
const gid = `g${hashOf(spec.id)}`;
|
|
110
|
-
const leather = o.tint ?? spec.leather;
|
|
111
|
-
const defs = `<linearGradient id="${gid}" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="#fff" stop-opacity=".4"/><stop offset=".5" stop-color="#fff" stop-opacity="0"/><stop offset="1" stop-color="#000" stop-opacity=".35"/></linearGradient>`;
|
|
112
|
-
const body = `<path d="${spec.colour}" fill="${leather}" stroke="${mix(leather, -0.5)}" stroke-width="${num(Number(spec.box.split(" ")[2]) / 200, 2)}"/><path d="${spec.colour}" fill="url(#${gid})"/>`;
|
|
113
|
-
return wrapPiece({ title: escape(spec.en), desc, size: o.size, theme: o.theme, box: spec.box, defs, body });
|
|
114
|
-
}
|
|
115
|
-
const under = spec.underlay === undefined ? "" : `<path d="${spec.underlay}" fill="#f4f1ea" stroke="#9aa3ae" stroke-width="1.2"/>`;
|
|
116
|
-
const body = spec.ink === undefined ? spec.colour : `<g fill="${o.tint ?? spec.ink}">${spec.colour}</g>`;
|
|
117
|
-
return wrapPiece({ title: escape(spec.en), desc, size: o.size, theme: o.theme, box: spec.box, body: under + body });
|
|
102
|
+
/**
|
|
103
|
+
* A shape of varying width along a curve, as a closed path: a cubic Bezier from `a` to `b` through the controls `c1` and `c2`, drawn `width(t)` wide at the fraction `t` of the way along. A bow, a blade or a feather
|
|
104
|
+
* is one of these. `steps` is how many segments each side has.
|
|
105
|
+
*/
|
|
106
|
+
export function swell(a, c1, c2, b, width, steps = 14) {
|
|
107
|
+
const at = (t) => {
|
|
108
|
+
const u = 1 - t;
|
|
109
|
+
return [u * u * u * a[0] + 3 * u * u * t * c1[0] + 3 * u * t * t * c2[0] + t * t * t * b[0], u * u * u * a[1] + 3 * u * u * t * c1[1] + 3 * u * t * t * c2[1] + t * t * t * b[1]];
|
|
118
110
|
};
|
|
119
|
-
|
|
111
|
+
const f = (n) => String(Math.round(n * 10) / 10);
|
|
112
|
+
const left = [];
|
|
113
|
+
const right = [];
|
|
114
|
+
for (let i = 0; i <= steps; i++) {
|
|
115
|
+
const t = i / steps;
|
|
116
|
+
const p = at(t);
|
|
117
|
+
const q = at(Math.min(1, t + 0.01));
|
|
118
|
+
const r = at(Math.max(0, t - 0.01));
|
|
119
|
+
const dx = q[0] - r[0];
|
|
120
|
+
const dy = q[1] - r[1];
|
|
121
|
+
const l = Math.hypot(dx, dy) || 1;
|
|
122
|
+
const h = width(t) / 2;
|
|
123
|
+
left.push(`${f(p[0] - (dy / l) * h)} ${f(p[1] + (dx / l) * h)}`);
|
|
124
|
+
right.push(`${f(p[0] + (dy / l) * h)} ${f(p[1] - (dx / l) * h)}`);
|
|
125
|
+
}
|
|
126
|
+
return `M${left.join("L")}L${right.reverse().join("L")}z`;
|
|
120
127
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const GEAR_CRICKET_BAT: import("./gear.index.ts").Piece<import("./gear.core.ts").
|
|
1
|
+
export declare const GEAR_CRICKET_BAT: import("./gear.index.ts").Piece<import("./gear.core.ts").GearSpec>;
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
//
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
// A cricket bat and a ball, drawn for this package: a broad willow blade with a ridge down the back, a cane handle with a grip, and a red ball with its seam.
|
|
2
|
+
import { capsule, circle, drawn } from "./gear.core.js";
|
|
3
|
+
const T = "rotate(34 32 32)";
|
|
4
|
+
export const GEAR_CRICKET_BAT = /* @__PURE__ */ drawn("gear:cricket-bat", "Cricket bat", "クリケットのバット", {
|
|
5
|
+
main: "#e6b96e",
|
|
6
|
+
accent: "#2a2f38",
|
|
7
|
+
parts: [
|
|
8
|
+
{ d: capsule(32, 2, 32, 26, 3.4), fill: "#c99a58", t: T, cyl: 1, shade: 0 },
|
|
9
|
+
{ d: capsule(32, 2, 32, 16, 4.4), fill: "$accent", t: T, cyl: 0.7, shade: 0 },
|
|
10
|
+
{ d: "M25.8 24.4h12.4L40.2 30V57a3 3 0 0 1-3 3H26.8a3 3 0 0 1-3-3V30z", fill: "$main", t: T, cyl: 0.9, shade: 0 },
|
|
11
|
+
{ d: "M32 31v27", fill: "none", stroke: "#b88540", w: 0.9, t: T, op: 0.9, line: "none", fx: true },
|
|
12
|
+
{ d: "M25 50.5h14", fill: "none", stroke: "#b88540", w: 0.8, t: T, line: "none", fx: true },
|
|
13
|
+
{ d: "M28.4 25.4L26.2 30.4", fill: "none", stroke: "#fff", w: 1.1, t: T, op: 0.5, line: "none", fx: true },
|
|
14
|
+
{ d: circle(53, 52.6, 6), fill: "#c4262e", stroke: "#6e1217", cyl: 0, shade: 0.7 },
|
|
15
|
+
{ d: "M48.6 48.6Q52 53 48.4 57M57.4 48.2Q54 52.6 57.6 57", fill: "none", stroke: "#f4ece0", w: 0.9, op: 0.9, line: "none" },
|
|
16
|
+
],
|
|
15
17
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const GEAR_FIELD_HOCKEY_STICK: import("./gear.index.ts").Piece<import("./gear.core.ts").
|
|
1
|
+
export declare const GEAR_FIELD_HOCKEY_STICK: import("./gear.index.ts").Piece<import("./gear.core.ts").GearSpec>;
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
//
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
// A field hockey stick and ball, drawn for this package: a long taped shaft and a head that hooks round at the foot, with a flat face, beside a white ball.
|
|
2
|
+
import { capsule, circle, drawn } from "./gear.core.js";
|
|
3
|
+
const T = "rotate(24 32 32)";
|
|
4
|
+
export const GEAR_FIELD_HOCKEY_STICK = /* @__PURE__ */ drawn("gear:field-hockey-stick", "Field hockey stick", "ホッケーのスティック", {
|
|
5
|
+
main: "#dcb06a",
|
|
6
|
+
accent: "#2a2f38",
|
|
7
|
+
parts: [
|
|
8
|
+
{ d: capsule(32, 1.5, 32, 44, 3.6), fill: "$main", t: T, cyl: 1, shade: 0 },
|
|
9
|
+
{ d: capsule(32, 1.5, 32, 16, 4.2), fill: "$accent", t: T, cyl: 0.7, shade: 0 },
|
|
10
|
+
{ d: "M24.2 41.2L29.8 43.6Q29.4 50.4 33.2 52.2H43.6Q46.6 52.4 46.6 55.6Q46.6 58.8 43.6 58.8H32.4Q22.8 58 23.4 48.4Q23.6 44.6 24.2 41.2Z", fill: "$main", cyl: 0.9, shade: 0 },
|
|
11
|
+
{ d: "M25.4 47.4Q25.6 55 33 56.6", fill: "none", stroke: "#fff", w: 1.1, op: 0.55, line: "none", fx: true },
|
|
12
|
+
{ d: capsule(31.5, 22.4, 31.5, 27.4, 4.2).replace(/^/, ""), fill: "$accent", t: T, line: "none", shade: 0.3 },
|
|
13
|
+
{ d: circle(54.5, 54.6, 4.8), fill: "#f4f2ee", stroke: "#8f98a3", shade: 0.9 },
|
|
14
|
+
{ d: "M51.4 51.8a4.6 4.6 0 0 1 3-1", fill: "none", stroke: "#fff", w: 1, line: "none", fx: true },
|
|
15
|
+
],
|
|
15
16
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const GEAR_FOOTBALL_HELMET: import("./gear.index.ts").Piece<import("./gear.core.ts").
|
|
1
|
+
export declare const GEAR_FOOTBALL_HELMET: import("./gear.index.ts").Piece<import("./gear.core.ts").GearSpec>;
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
//
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
// A football helmet, drawn for this package: a glossy shell seen from the side with a stripe over the crown, an ear hole, and a cage of bars across the face opening.
|
|
2
|
+
import { drawn, ellipse } from "./gear.core.js";
|
|
3
|
+
export const GEAR_FOOTBALL_HELMET = /* @__PURE__ */ drawn("gear:football-helmet", "Football helmet", "アメフトのヘルメット", {
|
|
4
|
+
main: "#cfd6de",
|
|
5
|
+
accent: "#c8202c",
|
|
6
|
+
parts: [
|
|
7
|
+
{ d: "M6 38C3 21 15 7 32 7C45 7 53 15 53 27V33L48.6 36L45.6 46C41.6 55 29.6 57 19.6 54C11.6 51 7 46 6 38Z", fill: "$main", cyl: 0.6 },
|
|
8
|
+
{ d: "M45 11.6Q22 9.4 12 31", fill: "none", stroke: "$accent", w: 4.4, line: "none" },
|
|
9
|
+
{ d: ellipse(25.5, 39, 6, 7.2), fill: "#2a2f38", stroke: "#1b1f27", shade: 0.5 },
|
|
10
|
+
{ d: "M21 33Q25 30.4 30 33", fill: "none", stroke: "#fff", w: 1, op: 0.45, line: "none", fx: true },
|
|
11
|
+
{ d: "M13 18Q21 9.6 33 10", fill: "none", stroke: "#fff", w: 2, op: 0.55, line: "none", fx: true },
|
|
12
|
+
{ d: "M52.6 28Q62 29.6 61 38L57 47Q54 52 46 52.4", fill: "none", stroke: "#4a5362", w: 2.6 },
|
|
13
|
+
{ d: "M50.4 35H60.4M49.2 41.6H58.4M47 47.4H55.4", fill: "none", stroke: "#4a5362", w: 2 },
|
|
14
|
+
{ d: "M45.6 46L50 52.4M38.6 55.4Q43 54.4 46 52.4", fill: "none", stroke: "#2a2f38", w: 2, line: "none" },
|
|
15
|
+
],
|
|
15
16
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const GEAR_GOALIE_MASK: import("./gear.index.ts").Piece<import("./gear.core.ts").
|
|
1
|
+
export declare const GEAR_GOALIE_MASK: import("./gear.index.ts").Piece<import("./gear.core.ts").GearSpec>;
|
|
@@ -1,17 +1,23 @@
|
|
|
1
|
-
//
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
// A goalie mask, drawn for this package: a pale moulded shell with a caged face opening, painted brow, side pieces over the ears and a chin guard.
|
|
2
|
+
import { drawn, ellipse, seg } from "./gear.core.js";
|
|
3
|
+
/** The cage: bars across the face opening. */
|
|
4
|
+
const CAGE = (() => {
|
|
5
|
+
let d = "";
|
|
6
|
+
for (const x of [26.5, 32, 37.5])
|
|
7
|
+
d += seg(x, 15, x, 53);
|
|
8
|
+
for (const y of [24, 35, 46])
|
|
9
|
+
d += `M${32 - 12.4 * Math.sqrt(1 - ((y - 34) / 20) ** 2)} ${y}H${32 + 12.4 * Math.sqrt(1 - ((y - 34) / 20) ** 2)}`;
|
|
10
|
+
return d;
|
|
11
|
+
})();
|
|
12
|
+
export const GEAR_GOALIE_MASK = /* @__PURE__ */ drawn("gear:goalie-mask", "Goalie mask", "ゴールキーパーマスク", {
|
|
13
|
+
main: "#eef0f2",
|
|
14
|
+
accent: "#c8202c",
|
|
15
|
+
parts: [
|
|
16
|
+
{ d: "M32 3C46 3 53 14 53 29C53 41 48 51 41 58Q32 63 23 58C16 51 11 41 11 29C11 14 18 3 32 3Z", fill: "$main", cyl: 0.7 },
|
|
17
|
+
{ d: "M14 20Q32 6 50 20L48 25Q32 13 16 25Z", fill: "$accent", stroke: "none", shade: 0.6, line: "none" },
|
|
18
|
+
{ d: ellipse(32, 34, 13.6, 20.4), fill: "#2b3038", stroke: "#1b1f27", shade: 0, line: "stroke" },
|
|
19
|
+
{ d: CAGE, fill: "none", stroke: "#cfd6de", w: 1.5 },
|
|
20
|
+
{ d: "M11.6 30Q10.6 40 13.6 47L18 44Q15.4 38 16.4 30ZM52.4 30Q53.4 40 50.4 47L46 44Q48.6 38 47.6 30Z", fill: "$main", cyl: 0.6, line: "none" },
|
|
21
|
+
{ d: "M18 8Q24 4.8 29 4.4", fill: "none", stroke: "#fff", w: 1.8, op: 0.8, line: "none", fx: true },
|
|
22
|
+
],
|
|
17
23
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const GEAR_GOAL_NET: import("./gear.index.ts").Piece<import("./gear.core.ts").
|
|
1
|
+
export declare const GEAR_GOAL_NET: import("./gear.index.ts").Piece<import("./gear.core.ts").GearSpec>;
|