A p5.js cheat sheet for beginners!

I could add a german version.

Are the comments saved here? https://www.dropbox.com/s/w5dxxozxnsazjjn/p5cheatsheet-de.pdf?dl=0


This looks great, thanks for this work. I’ll get a preliminary sheet together and private message you for a review/confirmation that I got everything in the correct places.


That is great!
Not knowing of this PDF, I decide to make a (ultimately rather similar) blog entry page - http://kirkdev.blogspot.com/2019/08/p5-reference-good-parts-edition.html - just covering that subset of the (possibly overwhelming) p5.js official reference that I’ve found most useful over the past 15 years… your approach is probably better in most ways tho :smiley:


Hey this post is great! a good extended supplement to the beginners cheatsheet!


There is now a German translation of the beginner cheat sheet! Thanks to @philipplehmann for the translation work!

Get the PDF

1 Like

-a- german version:

delete “schlaganfall” use “umrandung”

-b- all versions:
change “set the fill color” to “set the fill or text color”

1 Like

whoops! uploaded an old version, fixed now!

1 Like

Hey @bmoren, I’m currently at p5.js contributor’s conference and as part of the p5.js Global track, we are interested in further exploring the possibilities of the cheat sheet.

One specific idea we have is to convert the cheat sheet from an inDesign document into a p5.js sketch that can be generated and translated even from the web editor itself. One of the main reason to do this is to remove the requirements of needing inDesign to do a translation and also as a way to be able to distribute the template in more diverse way.

Do you have any thoughts on this? I’m only just starting to look at the possibilities around this but I look forward to hearing your opinion.


That sounds like a really great idea. I love the idea of getting rid of the dependency on inDesign, and it shouldn’t be too difficult to re-make the sheet using p5. I’m all for it.

I’m glad this is coming up at the contributors conference. Bummed to miss it. it seems like these things always get planned to close to the start of the semester for me to attend. I hope it’s going well!

after thinking about this for a second, it seems that one downside to the sketch (I think the positives outweigh this) is that it would not be plain text on export since p5 cannot export a pdf or svg. It would have to exist as a jpg/png only which could be a determent to screen readers or folks who want to highlight the text. From a printed sheet standpoint, this is a non-issue and it’s typically how I use this sheet in my classes.

Could the text be p5.dom text elements, and then printing happen via browser? Browsers can export to pdf, and layout could be managed via CSS.

1 Like

Yes, we’re also thinking about the accessibility side of it and decided that as a HTML canvas sketch it would not meet several of our requirements (screen reader accessibility being the biggest one). I’m also thinking of making it more of a regular HTML based website and also rethinking the layout. A layout of three columns currently is very defaulted to the printed page but it isn’t very intuitive as a web page.

One thing I’m considering is to build this web page cheat sheet first as an accessible web based thing then making sure there is functionality to export it as an image and also to print it out to one piece of paper easily.

1 Like

That took a bit of time but here is a version I’m fairly happy with: https://p5-cheat-sheet.surge.sh/

Besides being a web page, it can also be printed directly from the browser print dialog (fully tested with both Chrome and Firefox, and should work in both landscape and portrait although landscape should look better).

I haven’t tried seeing what translating it would look like but I hope it doesn’t mess up the layout too much. That’s to come.

The source code is here: https://github.com/limzykenneth/p5-cheat-sheet-html

@bmoren I’ll open an issue on github regarding how you would like me to contribute the source files back to your repo.


Hi Kenneth,

I sent a reply on github as well, but I’ve been so bust this has fallen back a bit, but I’m ready to pick back up, if you’d like to make a PR against the original repo, or if you want to transfer ownership of your or something along those likes I can get working.

a few things I’d like to do:

  • fix the desktop layout to better reflect the original sheet. (a single view)
  • add PDF versions for download (save to pdf from the print dialog)
  • unify the p5.js code so that all of the langs use one code and the lang objects are independent and are housed inside the respective HTML (so that everything is as unified as possible)
  • host on github pages (so it’s updates as quickly as possible)
  • get a domain name, for easy access!
1 Like

Introducing the new web based p5js cheat sheet!
Thank you very much to everyone involved, especially @limzykenneth for getting things off the ground! It’s now much easier to make translations and it can be printed or exported to PDF!



PDF versions are still available in the repository and at the links above. We’d love your help in making a translation, it’s as easy as ever, either send over edits as text or make a pull request against the repository


and will there be a link from the online editor to it? or from reference?

right bottom is a little space left, enough for FOR?

for ( let i = 0 ; i < limit; i++ ) { }

I don’t know about adding it to the editor or the reference, I’m sure you could open issues on the respective repositories to get that discussion going. Personally I’m interested in this as a printed resource for workshop settings, but I can see the merit of it being included elsewhere, but ultimately it’s not up to me to decide where it goes!

As for the for loop; there is loads of space now that its a website! But, the loop is not excluded due to a lack of space – it’s excluded due to the philosophy of the cheat sheet. This resource meant for absolute beginners, and loops are not a beginner topic (think about someone’s first day of writing code, that’s the target audience in mind). I do have ideas about how an intermediate sheet could be added into the mix and a for loop would be an excellent candidate for that level. Ideally it would be printed 2 sided with intermediate on one side and beginner on the other. Please join the conversation with your ideas over on the github repository: https://github.com/bmoren/p5js-cheat-sheet/issues/2


Well, for… loops were one of the first things I learned when I was a 12-years-old kid learning BASIC.
Also, repeat[] is one of the few logo promitives I know.


Hello Ben,

thank you for the P5 cheat sheet. I translated it to Slovak language now.



1 Like

Are you familiar with git / github at all? if so, and you’d like to contribute via git, please check out the instructions here:

otherwise, I’m more than happy to pull your wonderful translation over and include it in the main site if that’s alright with you!