Tweak sparkles
This commit is contained in:
+4
-3
@@ -56,7 +56,8 @@ if (history.scrollRestoration) {
|
||||
const s = document.createElement('div');
|
||||
s.style.cssText = [
|
||||
'position:absolute',
|
||||
'width:3px', 'height:3px',
|
||||
|
||||
'width:2px', 'height:3px',
|
||||
'background:rgba(251,191,36,0.9)',
|
||||
'border-radius:50%',
|
||||
`top:${(Math.random() * 100).toFixed(2)}%`,
|
||||
@@ -134,12 +135,12 @@ var WAND_COLORS = [
|
||||
];
|
||||
|
||||
function spawnSparkleCluster(btn, x, btnH) {
|
||||
var n = 16 + Math.floor(Math.random() * 13); // 16–28 per cluster
|
||||
var n = 14 + Math.floor(Math.random() * 13); // 16–28 per cluster
|
||||
for (var i = 0; i < n; i++) {
|
||||
var s = document.createElement('span');
|
||||
s.className = 'btn-sparkle';
|
||||
var ox = (Math.random() - 0.5) * 40; // ±20px horizontal spread
|
||||
var fy = Math.random() * btnH - 8; // shifted up a few px
|
||||
var fy = Math.random() * btnH - 7; // shifted up a few px
|
||||
var sz = (0.28 + Math.random() * 0.55).toFixed(2);
|
||||
var dur = (0.38 + Math.random() * 0.45).toFixed(3);
|
||||
var col = WAND_COLORS[Math.floor(Math.random() * WAND_COLORS.length)];
|
||||
|
||||
Reference in New Issue
Block a user