Week 03

Animation, Variables, Interaction

1. Variable

number

var s = 90; 

string

var name = "don"

object

https://editor.p5js.org/kdoodoo/sketches/S1eJIVpdQarrow-up-right

var circle = {
    radius: 13,
    x: 60,
    y: 100
};


circle.radius 
circle.x
circle.y

array

2. Let and Variable

let allows you to declare variables that are limited in scope to the block, statement, or expression on which it is used. This is unlike the var keyword, which defines a variable globally, or locally to an entire function regardless of block scope.

https://editor.p5js.org/kdoodoo/sketches/rJ1s90hdmarrow-up-right

3. console.log()

4. Animation

What is animation? Either something that moves by the intention of the user or something that moves automatically for the better interaction in functionality and emotions.

https://editor.p5js.org/kdoodoo/sketches/Hy1BtR3u7arrow-up-right

random()

https://editor.p5js.org/kdoodoo/sketches/HJlfT03umarrow-up-right

mouseX, mouseY

https://jsfiddle.net/kdoodoo/53graLpd/arrow-up-right

map()

https://editor.p5js.org/kdoodoo/sketches/H1gGsETOQarrow-up-right

mousePressed()

https://editor.p5js.org/kdoodoo/sketches/ByYWeS6uXarrow-up-right

5. Assignment

Make any project that interacts with the user.

Last updated