0
How can we run p5.js code on sololearn or anyother platform
I have made to games on p5.js I want it to be available on every platform and run on sublime text too. What should I do?
1 Respuesta
+ 2
Downloading a copy of the p5.js library
The easiest way to start is by using the empty example that comes with the p5.js complete download.
After download, you need to set up a local server. See instructions here . Run your local server within the downloaded folder and on your browser, go to http://localhost:{your-port-num}/empty-example
If you look in index.html, you'll notice that it links to the file p5.js. If you would like to use the minified version (compressed for faster page loading), change the link to p5.min.js.
alternatively you can link to a p5.js file hosted online. All versions of p5.js are stored in a CDN (Content Delivery Network). You can find a history of these versions in the p5.js CDN. In this case you can change the link to https://cdn.jsdelivr.net/npm/p5@1.4.0/lib/p5.js
example:
https://code.sololearn.com/WZsAl6RO35ne/?ref=app
Get more info from https://p5js.org/get-started/