Refactor animation delays in seasonal effects for improved performance and consistency [skip ci]
This commit is contained in:
@@ -82,7 +82,7 @@ function addSymbols(count) {
|
||||
for (let i = 0; i < count; i++) {
|
||||
const imageSrc = images[Math.floor(Math.random() * images.length)];
|
||||
const left = Math.random() * 100;
|
||||
const delay = Math.random() * 12;
|
||||
const delay = -(Math.random() * 12);
|
||||
container.appendChild(createSymbol(imageSrc, left, delay));
|
||||
}
|
||||
}
|
||||
@@ -99,7 +99,7 @@ function initResurrection(count) {
|
||||
// Place one of each of the 8 provided resurrection images first.
|
||||
images.forEach((imageSrc, index) => {
|
||||
const left = (index + 1) * (100 / (images.length + 1));
|
||||
const delay = Math.random() * 8;
|
||||
const delay = -(Math.random() * 8);
|
||||
container.appendChild(createSymbol(imageSrc, left, delay));
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user