Learning outcomes
It's impossible to remember all the JavaScript commands the computer understands. It would be like trying to remember all the words in an English dictionary. Just like looking up a word in a dictionary we can look up JavaScript commands to find out what they do, how to spell them and how to use them. We call this helpful guide "code documentation". Sometimes just called "the docs" for short.
We can find our JavaScript drawing documentation at http://p5js.org/reference/
To do
- Need some fun examples of reading documentation to find out new things
- One good example might be http://p5js.org/reference/#/p5/fill
- By the time we introduce the concept of "read the docs" the students will be familiar with
fill() but all they know is that fill() understands RGB color
- Fill has loads of different ways of describing color. One fun shortcut is just writing the English term for a color you have in mind e.g.,
fill('red')
- Another good example might be
triangle() or quad(). This will open up new drawing possibilities
- Could use this example as a quick exercise. "Read the docs and tell me how to draw a triangle"
- Don't forget to mention that the really cool thing about P5 docs is that they are interactive. You can write some code in the docs! How cool?!
Learning outcomes
It's impossible to remember all the JavaScript commands the computer understands. It would be like trying to remember all the words in an English dictionary. Just like looking up a word in a dictionary we can look up JavaScript commands to find out what they do, how to spell them and how to use them. We call this helpful guide "code documentation". Sometimes just called "the docs" for short.
We can find our JavaScript drawing documentation at http://p5js.org/reference/
To do
fill()but all they know is thatfill()understands RGB colorfill('red')triangle()orquad(). This will open up new drawing possibilities