The videos in this section were created using a different editor for p5.js. All of the concepts should still apply, however, there are some minor changes. Most notably in JavaScript let
is now the preferred way to declare a variable over var
. If you would like to learn more about this you can watch this video about let vs var.
setup()
,draw()
, and other events:mousePressed()
, etc.- Built-in variables
- [2.1: Variables in p5.js (mouseX, mouseY)]https://thecodingtrain.com/tracks/code-programming-with-p5-js/code/2-variables/1-mouseX-mouseY)
- User defined variables
- [2.2: Variables in p5.js (Define your own)]https://thecodingtrain.com/tracks/code-programming-with-p5-js/code/2-variables/2-define-variables)
- The random() function
- The map() function
- video 9.1:
translate()
,rotate()
,push()
,pop()
- video 9.2:
scale()
- video 9.3: More on transformations
- Chapters 4 through Ex.4.5, 8 through Ex. 8.9
- Chapters 6 (Transformations) and 8.10-8.15 (More complex motion)
- Getting Started with p5.js book | Ebook (free with NYU Library login) | Code
- p5.js clock -- Clock coding challenge video, also John Maeda's 12 o'clocks
- Tutorial: Recode Catalog by John Whitney
- Rainbow Paintbrush in p5.js by Kelly Lougheed