Two (or more) canvases on a page possible?

I'm creating a simple webpage for an upcoming party we are having at our house. It will include a guestbook and other info.

I've been playing around and want to have some fun with p5js to make the page more interesting. I have the banner on the website filled with rainbow (Dan would be proud) "snow" and want to have a similar effect in the footer of the page.

I've created a banner.js script file for the banner image and linked to the .js file in the head of the html. All works fine until I link in another .js file, footer.js.

Is the problem that I am creating two canvases on the same page? One in the banner and one in the footer? Or am I doing something else wrong?

Even linking a blank footer.js sketch with only the setup and draw functions (and nothing in them!) causes the banner.js script to fail. I don't seem to be getting any errors in the console.

Not sure what gives. Thanks for your help!

Tagged:
Sign In or Register to comment.