soccer-jersey-fork 1.0.122 → 1.0.124
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.
|
@@ -18,6 +18,6 @@ export declare const drawWaves: (page: Svg, primaryColor: string, secondaryColor
|
|
|
18
18
|
export declare const drawConcentricCircles: (page: Svg, primaryColor: string, secondaryColor: string, direction: StyleDirection) => import("@svgdotjs/svg.js").Pattern;
|
|
19
19
|
export declare const drawDashes: (page: Svg, primaryColor: string, secondaryColor: string, dashDirection: StyleDirection) => import("@svgdotjs/svg.js").Pattern;
|
|
20
20
|
export declare const addShortSideColor: (page: Svg, color: string) => void;
|
|
21
|
-
export declare function addShoulderSideColor(page: Svg, color: string): void;
|
|
21
|
+
export declare function addShoulderSideColor(page: Svg, color: string, isLongSleeve: boolean): void;
|
|
22
22
|
export declare function addShirtSideColor(page: Svg, color: string): void;
|
|
23
23
|
export declare const drawCrossLines: (page: Svg, primaryColor: string, secondaryColor: string, direction: StyleDirection) => import("@svgdotjs/svg.js").Pattern;
|
package/lib/patterns/patterns.js
CHANGED
|
@@ -353,17 +353,23 @@ export const addShortSideColor = (page, color) => {
|
|
|
353
353
|
.fill("none")
|
|
354
354
|
.stroke({ width: 2, color, linecap: "butt" });
|
|
355
355
|
};
|
|
356
|
-
export function addShoulderSideColor(page, color) {
|
|
356
|
+
export function addShoulderSideColor(page, color, isLongSleeve) {
|
|
357
357
|
// left
|
|
358
|
+
const leftPath = isLongSleeve
|
|
359
|
+
? "M 36 0.5 C 26 5, 17.4 9, 17.4 9 C 9.7 13.9 8.6 24.4 7.5 32.6 C 5.7 43 7.3 61 6 90.1" // Starts at collar center (63.5) all the way long to the sleeve
|
|
360
|
+
: `m 0 35 l 16.5 -26 20 -8.5`;
|
|
358
361
|
page
|
|
359
|
-
.path(
|
|
362
|
+
.path(leftPath)
|
|
360
363
|
.fill("none")
|
|
361
|
-
.stroke({ width:
|
|
364
|
+
.stroke({ width: 1.5, color, linecap: "butt" });
|
|
365
|
+
const rightPath = isLongSleeve
|
|
366
|
+
? "M 63.5 0.5 C 74.5 5, 82.9 8.2, 82.9 8.2 C 90.7 13.2 91.8 23.7 92.9 31.9 C 94.7 42.2 93.1 60.2 94.4 89.3"
|
|
367
|
+
: `m 101 35 l -16.5 -26 -20 -8.5`;
|
|
362
368
|
// right
|
|
363
369
|
page
|
|
364
|
-
.path(
|
|
370
|
+
.path(rightPath)
|
|
365
371
|
.fill("none")
|
|
366
|
-
.stroke({ width:
|
|
372
|
+
.stroke({ width: 1.5, color, linecap: "butt" });
|
|
367
373
|
}
|
|
368
374
|
export function addShirtSideColor(page, color) {
|
|
369
375
|
page
|
|
@@ -42,7 +42,7 @@ export default function drawSoccerJersey({ shirtColor = "plain", shirtStyle, shi
|
|
|
42
42
|
.from(1, 1)
|
|
43
43
|
.to(1, 0));
|
|
44
44
|
if (shoulderSideColor) {
|
|
45
|
-
addShoulderSideColor(page, shoulderSideColor);
|
|
45
|
+
addShoulderSideColor(page, shoulderSideColor, isLongSleeve);
|
|
46
46
|
}
|
|
47
47
|
if (sleeveCuffColor) {
|
|
48
48
|
const pathLeftSleeveCuff = isLongSleeve
|