view react_games/public/landing_page.js @ 273:e02e2036ef84 default tip

add Layer 2 JRPG component system Add reusable content and window modals, an isolated component sandbox, shared cyberpunk scroll areas, production-safe cache freshness, and server-rendered JRPG panel state. Co-authored-by: Copilot <[email protected]>
author MrJuneJune <me@mrjunejune.com>
date Sat, 08 Aug 2026 02:08:08 -0700
parents fb9bcd3145cb
children
line wrap: on
line source

const createStars = (x, y) => {
  const star = document.createElement("div");

  star.style.position = 'fixed';
  star.style.left = x + 'px';
  star.style.top = y + 'px';
  star.style.width = '4px';
  star.style.height = '4px';
  star.style.background = 'white';
  star.style.borderRadius = '50%';
  star.style.pointerEvents = 'none';
  star.style.zIndex = '1000';
  star.style.animation = 'sparkleAnim 1s ease-out forwards';

  document.body.appendChild(star);

  setTimeout(() => {
    star.remove();
  }, 1000);
}

document.addEventListener('mousemove', (e) => {
  if (Math.random() > 0.99) {
    createStars(e.clientX, e.clientY);
  }
});