- Discuss readings
- Portfolio Critique
- Sign up for p5.js web editor
- Introduce p5.js/DOM interactions/console.log()
- Basic mouse events in webpage
DOM stands for the Document Object Model. The DOM represents the document as nodes and objects, so that programs can change the document structure, style, and content. .This way, programming languages can connect to the page through accessing specific elements (EG: <p>,<div>,<footer> tags) , IDs (EG: #khalo), and classes (EG .painting).
- Avoid using numbers and no spaces.
- Variables are case sensitive
- the variable bike is different than a variable called Bike
- let dog;
- let dog = “dog”;
- let dog=5;
- let dog =true;
- Notice that I can use bgSlider inside the setup function, even though it was declared at the top.
- Declaring a variable inside a function means it can only be accessed inside that function.
- Notice that the variable bg is declared inside the draw function. This means I can only access and use it inside this function.
p5.js web editor
- p5.js Reference Library
- p5.js DOM Reference Library
- Coding Train p5.js DOM + HTML Tutorials
- Beyond the Canvas p5.js Tutorial