diff --git a/packages/badge/src/index.ts b/packages/badge/src/index.ts
index 03682e4..6fbd9f5 100644
--- a/packages/badge/src/index.ts
+++ b/packages/badge/src/index.ts
@@ -18,22 +18,6 @@ const generateFontStyle = (): string => `
`
-const generateGlowFilter = (
- floodColor: string,
- floodOpacity: number,
- stdDeviation: number,
-): string => `
-
-
-
-
-
-
-
-
-
- `
-
const generateTrailingLight = (
width: number,
height: number,
@@ -45,10 +29,10 @@ const generateTrailingLight = (
const r = BADGE_CONFIG.borderRadius
const perimeter = 2 * (width - 2 * r) + 2 * (height - 2 * r) + 2 * Math.PI * r
- const blobCount = 3
+ const blobCount = 5
const blobRadius = Math.min(height, Math.max(16, Math.round(perimeter / 12)))
const dur = Math.max(3, perimeter / 60)
- const gap = 0.3
+ const gap = 0.12
const path = `M${ox + r},${oy} H${ox + width - r} Q${ox + width},${oy} ${ox + width},${oy + r} V${oy + height - r} Q${ox + width},${oy + height} ${ox + width - r},${oy + height} H${ox + r} Q${ox},${oy + height} ${ox},${oy + height - r} V${oy + r} Q${ox},${oy} ${ox + r},${oy} Z`
@@ -66,15 +50,12 @@ const generateTrailingLight = (
return `
-
-
-
${gradient}
-
+
${blobs}
`
@@ -87,13 +68,15 @@ const generateShineEffect = (
ox: number,
oy: number,
): string => {
+ const shineWidth = Math.round(width * 0.7)
+ const skewOffset = Math.round(height * 0.36)
+
return `
-
+
@@ -101,27 +84,30 @@ const generateShineEffect = (
-
-
+
+
+
+
+
+
+
`
}
@@ -140,9 +126,7 @@ const generateIcon = (
height="${size}"
viewBox="0 0 24 24"
fill="${color}"
- filter="url(#glow)"
xmlns="http://www.w3.org/2000/svg"
- style="overflow: visible"
>
@@ -236,7 +220,6 @@ export const generateBadgeSvg = (
- ${generateGlowFilter('#808080', 0.4, 3)}