A p5.js cheat sheet for beginners!

I’ve made a cheat sheet for beginners for my workshop at PCD @ Minneapolis tomorrow. I figured some folks here might like to see it / use it too!

Download PDF here!


nice, but could you squeeze in the

for ( int i = start; i < stop; i++ ) {statements}

and possibly on the grid system picture
indicate the


and for the
if then also the

if ( true ) { } 
else { }

Looks great! I might take a few of these to PCD@Denver tomorrow. Thanks for sharing.

1 Like

I’m not going to squeeze in a for loop, this is intended for a day 1 beginners workshop, it’s not meant to be comprehensive. At some point I’d like to add an intermediate sheet that could be printed on the back side and that would absolutely include a for loop example. Feel free to modify, the indesign files are on the github repo.

I do want to also add that this is a simplified and redesigned version of Ryo Sakai’s original more expansive cheat sheet which can be found here (this has a forloop): https://twitter.com/ryodejaneiro/status/827314983948210176?lang=en

else is tricky since I’d need to really make a more complex diagram, but it could be added without the diagram, I’ll think about it, again, feel free to mod in the short term.

The height and width is a good idea for day-1 beginners.

I wont be able to modify anything until next week, so if you need the changes you’d like sooner, you’ll have to boot up indesign and have a go at it!

thanks for the suggestions~


1 Like

actually it would be good if it would be a intro page for the
or a online editor menu point under [help and feedback] like the shortcuts…
or add it

so possibly open a issue at

as a improvement.
( but also read

even it is not same style )

There is now a French Translation and I’m seeking more translations for the beginner sheet! Specifically looking for Spanish and Chinese, but all translations welcome!

Get the PDF


There is now a Japanese translation of the cheat sheet thanks to Takawo Shunsuke!

Get the PDF

I’m still looking for assistance in translations to

(or really any other languages! – but these ones are high priority for p5.js users!)

I’m also likely going to be making the intermediate cheat sheet soon, so please give some feedback and ideas in the github repo

1 Like

please take a look at that processing versions too

just to get more ideas

also a PDF file has advantages ( offline )
how about a multi language HTML ( website ) version

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