I've been coding a snake game, and I wanted to have a little html page for the instructions. But, I created p5 sprites for the buttons and I realized in the midst of the problem, I could not change the html page/web page through the p5 JavaScript editor. Is there a way I could change the webpage based on a p5 function?
So I tried creating an html element, but then I realized I couldn't make it go away if the game changed, e.g. the gameState changed from 0 to 1. When I tried it, it stayed there. Though I am still in the midst of finishing the game, is there a way I could call an html file to change using a p5 editor function? At this point, you might just call it changing to a different webpage. I don't know any methods to, and when I search online, I find nothing.