vendredi 14 juillet 2023

Is there a way to get a similiar result to this website?

I'm trying to make a website inspired by this website, https://impomu.com. I don't need it to have everything, like the secret prompt section and the discord advertisement. I'm mostly trying to get these main things working:

  • have a global counter (the total amount of times the button was clicked by every user that visited the site) and a local counter ( the total amount of times the button was clicked by the current user)
  • The website remembers the current count and doesn't reset back to zero (also updates the total count in real-time)
  • when the button is clicked, a randomly picked audio plays, as well as a completely randomly generated (different scale, rotation, and position it appears on screen) animated image that pops up for a little bit

I'm mostly having a difficult time reading the website code for reference, especially about the javascript code, as I'm kinda new to it. I'm having a hard time understanding what each javascript code is responsible for and which javascript code I need for my website. Especially which javascript code triggers the animated image pop-up. I tried looking for answers to previously asked questions from this site, but the answers given aren't what I looking for.

I'm asking if anyone can read the website's code, explain how it works, and how to achieve a similar result.

Before looking through the website code, I thought to get the counter to work; I needed to apply an increment to the button. But now, looking through the website's code, it doesn't involve increment, but something else I can't figure out.

Also, I couldn't understand how they achieved both audio and image working, especially the image part.




Aucun commentaire:

Enregistrer un commentaire