I am rebuilding the website for a personal project of mine; the site is for a mod in a game that offers twitch integration, and in the mod, there is a "twitch chest" that only chat can open.
I added an easter egg on the website, that when you click on the chest in the footer, it follows the mouse in a similar way it would within the game -- it keeps a safe distance from the mouse to prevent interfering with it, and will repel away to that distance when moving the mouse towards it.
I added an easter egg on the website, that when you click on the chest in the footer, it follows the mouse in a similar way it would within the game -- it keeps a safe distance from the mouse to prevent interfering with it, and will repel away to that distance when moving the mouse towards it.
https://codesandbox.io/p/sandbox/floating-chest-k33n63 for a React component that implements this functionality.