Having trouble getting P5 JS to work in repl.it

Hi there, I’m a newcomer to using P5 JS. I have HTML, CSS, and JS loaded up in repl.it. In the head of the HTML, I added the script src="…/p5.js" thing and the src=“path/to/p5.sound.js” thing (I can’t copy the whole thing in here or it doesn’t show up) like the website said, but it doesn’t seem to work.

The basic load and play an audio file code was copy pasted and it doesn’t work, it doesn’t even seem to automatically run the preload and setup functions like it’s supposed to. Any help would be appreciated.

If that

is similar to:

You can try out my minimum “.html” template I use there: :sunglasses:

<script defer src=https://CDN.JSDelivr.net/npm/p5></script>
<!--<script defer src=https://CDN.JSDelivr.net/npm/p5/lib/addons/p5.dom.min.js></script>-->
<!--<script defer src=https://CDN.JSDelivr.net/npm/p5/lib/addons/p5.sound.min.js></script>-->

<!-- <script src=sketch.js></script> -->

An online example using that “.html” template: :angel:

Bouncing Colorful Balls

1 Like