diff --git a/assets/app.js b/assets/app.js index cbd7c91..2fcbda8 100644 --- a/assets/app.js +++ b/assets/app.js @@ -375,11 +375,20 @@ function spawnSeed({ markActive = false, source = 'ambient' } = {}) { const tilt = (Math.random() * 16 + 8) * (Math.random() < 0.5 ? -1 : 1); // +/-8–24deg const sway = 4 + Math.random() * 6; // px const flipDur = 5 + Math.random() * 4; // 5–9s - const fromLeft = Math.random() < 0.5; - const start = fromLeft ? '-12vw' : '112vw'; - const mid = fromLeft ? '30vw' : '-30vw'; - const end = fromLeft ? '112vw' : '-12vw'; - wrap.style.top = `${top}vh`; + const dir = ['left','right','top'][Math.floor(Math.random()*3)]; + const fromLeft = dir === 'left'; + let start = fromLeft ? '-12vw' : '112vw'; + let mid = fromLeft ? '30vw' : '-30vw'; + let end = fromLeft ? '112vw' : '-12vw'; + if (dir === 'top') { + const x = Math.random()*80 + 10; + start = `${x}vw`; + mid = `${x + (Math.random()*10 - 5)}vw`; + end = `${x + (Math.random()*20 - 10)}vw`; + wrap.style.top = '-12vh'; + } else { + wrap.style.top = `${top}vh`; + } wrap.style.setProperty('--seed-scale', scale); wrap.style.setProperty('--seed-duration', `${duration}s`); wrap.style.setProperty('--seed-tilt', `${tilt}deg`);