We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b271128 commit b5e4b6fCopy full SHA for b5e4b6f
1 file changed
src/components/card-renderer.ts
@@ -36,7 +36,11 @@ export class CardRenderer {
36
const y = Math.floor(seededRandom() * height);
37
const r = (seededRandom() * 1 + 0.5).toFixed(1);
38
const opacity = (seededRandom() * 0.7 + 0.3).toFixed(1);
39
- return `<circle cx="${x}" cy="${y}" r="${r}" fill="${textColor}" opacity="${opacity}"/>`;
+ const duration = (seededRandom() * 3 + 2).toFixed(1);
40
+ const delay = (seededRandom() * 5).toFixed(1);
41
+ return `<circle cx="${x}" cy="${y}" r="${r}" fill="${textColor}" opacity="${opacity}">
42
+ <animate attributeName="opacity" values="${opacity};${(parseFloat(opacity) * 0.3).toFixed(1)};${opacity}" dur="${duration}s" begin="${delay}s" repeatCount="indefinite" />
43
+ </circle>`;
44
}).join('');
45
46
this.STARFIELD_CACHE.set(cacheKey, stars);
0 commit comments