P5.js Notes


  1. P5.js- animation
  2. Programming language – javascript
  3. Setup – beginning, setting up the canvas
  4. Draw – what happens to the animation
  5. Functions – smaller programmes, does something specific, and does it very well / paint brushes
  6. Library – takes the tiny bits of code which are already defined
  7. Library: (Help → Reference to the site)
  8. Why is function written only for some functions and not for others?
  9. ; – full stop for the programme
  10. Variable – a container for data – paint containers
  11. // – comments – these are not interpreted by the compiler. Like notes to myself
  12. Start with writing the things the programme MUST DO. This helps form the functions of the code. 

Bit Depth:

  1. 1 Bit system = 2 states (1, 0)
  2. 8 Bits = 256 states (1… 256)
  3. To go up each bit, you double it from what the previous number of states was
  4. 16 BIts =  65536 states (1… 66536)
  1. Let – local scoped variable (which only belongs inside of a function
  2. Random – assign random values between 0.0 to 1.0
  3. Random (x, y) to assign values between x and y
  4. 3JS – 3D
  5. Reference: https://p5js.org/reference/

Resources to learn more:

  1. The Coding Train
  2. W3schools

Leave a Reply

Your email address will not be published. Required fields are marked *