A p5.js cheat sheet for beginners!

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~

b.

1 Like

actually it would be good if it would be a intro page for the
https://p5js.org/reference/
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

2 Likes

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
Spanish
Chinese
Hindi
Arabic
Russian
Portuguese

(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

2 Likes

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.

Thanks!

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:

3 Likes

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

2 Likes

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:
noStroke()

delete “schlaganfall” use “umrandung”

-b- all versions:
fill(color)
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.

3 Likes

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.

5 Likes

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