soccer-jersey-fork 1.0.30 → 1.0.32
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/lib/types/index.d.ts
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* This file has been modified from the original.
|
|
3
|
+
* Original source: https://github.com/nadchif/soccer-jersey/tree/master
|
|
4
|
+
* Modifications Copyright 2025 Lau Kai Chung
|
|
5
|
+
*
|
|
6
|
+
*/
|
|
1
7
|
/* eslint-disable max-len */
|
|
2
8
|
import { SVG } from "@svgdotjs/svg.js";
|
|
3
9
|
import lightenDarkenColor from "./lighten-darken-color";
|
|
4
10
|
import { drawHoops, drawSingleBand, drawStriped, drawCheckered, drawTwoColor, drawWaves, drawDashes, } from "../patterns/patterns";
|
|
5
11
|
/**
|
|
6
|
-
*
|
|
7
12
|
* @param {object} specs Specifications of the soccer jersey.
|
|
8
13
|
* @param {string} specs.shirtText The text to be displayed on the shirt.
|
|
9
14
|
* Recommended 3 letter team initials
|
|
@@ -175,6 +180,14 @@ export default function drawSoccerJersey({ shirtText, textColor, textOutlineColo
|
|
|
175
180
|
page.width(shirtWidth);
|
|
176
181
|
const pathShorts = `m 23 98 c 5 6, 50 6, 56 0 l 2 ${shortsHeight} c 0 5, -27 5, -27.5 0 l -2 -10, -2 10, c 0 5, -27 5, -27.5 0 l 1 -${shortsHeight}`;
|
|
177
182
|
page.path(pathShorts).fill(shortsColor);
|
|
183
|
+
page.path(pathShorts).fill(page
|
|
184
|
+
.gradient("linear", function (add) {
|
|
185
|
+
add.stop(0, "#000", 0.2);
|
|
186
|
+
add.stop(0.44, "#ddd", 0.1);
|
|
187
|
+
add.stop(1, "#fff", 0.1);
|
|
188
|
+
})
|
|
189
|
+
.from(1, 1)
|
|
190
|
+
.to(1, 0));
|
|
178
191
|
}
|
|
179
192
|
// +10 is some extra room with the shorts height, so the total should be 150
|
|
180
193
|
page.viewbox(`0 0 102 ${100 + shortsHeight + 10}`);
|