Running multiple interact sketches

Hi there,
I am beginning to use P5.JS to create a small experience and one of the things i’m trying to do is to have a sketch that runs another sketch when an icon is clicked. I’m pretty sure this is a basic function but I can’t seem to find information about it.

Thank you in advance

1 Like

https://github.com/bmoren/p5.localmessage is a lib
what might allow to run 2 browser windows with p5.js sketch on one computer
and communicate.

but for a start that window could try just a LINK
https://p5js.org/reference/#/p5/createA
use the target="_blank" attribute

1 Like

Hi there ! thank you very much for answering.
The action is indeed really simple : clicking on square in sketch 1 open and plays sketch 2 in different window. So yeah, a link !
Thanks again have a good evening

2 Likes