Sprites in the p5 editor

I am a teacher and am using p5js to teach basic coding. However, although there is a lot that can done in the editor, I was wondering if there is a way to use sprites? I have been looking at the p5play library and it seems like you need to actually use a webpage to host the java script, but I was wondering if there is another way?

1 Like
1 Like

But how would you add that in just the p5 editor?

That online editor got an “index.html” file too that you can edit. :wink:

Yes, it took a little bit of looking to find something really obvious. But how to I upload pictures to an assets folder. It says that you can only upload certain file types, and non of them are picture.

I don’t use that particular p5js online editor. So I dunno, sorry. :anguished:

It’s pretty obvious on OpenProcessing.org though. :grinning:

Here’s a hosted sketch I’ve got w/ images inside subfolder “assets/”: :sunglasses:

1 Like

You can also give a try to codeguppy.com

The codeguppy.com environment is based on p5.js and p5.play and it comes with pre-built assets, so that young coders can focus only on coding.

There are different type of programs that can be created on codeguppy.com You can visit the site and see if this is working for you.

P.S. Please visit also the download section for some free PDF books.