Creative Coding/Trajectory
From I/M/D Wiki
More actions
β¨π do you know... πβ¨
Class #01
Interface
- how to open P5
- how to save and share a P5 sketch
- how to upload it in Excalidraw
Functions (beginner)
- the difference between
setup()anddraw()π [example] - how to use shape functions π [example]
- how to use color functions π [example]
- how to use
map()andsin()π [example]
Variables (beginner)
- how to use an environment variable (e.g.
width,height,mouseX,mouseY,frameCount, etc) π [example] - how to declare a variable (e.g.
let x = 0) - how to update a variable (e.g.
x++,x = x - 2,x = mouseX, etc) π [example] - how to use variables as arguments of a function (e.g.
circle(mouseX, mouseY, s))
Dynamic Portrait
Class #02
Functions (medium)
- how to use text functions π [example]
- how to load and display images π [example]
- how to load and display fonts π [example]
- how to use
random()π [example]
Variables (medium)
- how to run a modulo cycle (e.g.
x = (x + 1)Β % 400) π [example]
Conditions
- how to write an if statement π [example]
- how to write an if-else statement π [example]
- how to use booleans (
mouseIsPressed) - how to create booleans (e.g.
let state = false) π [example] - how to use mouse coordinates as a condition (e.g.
if(mouseX > width/2){...}) π [example]
Interactive poem
Class #03
Variables (Advanced)
- how to create lists (e.g.
let list = ["cat", "dog", "potato"]) - how to use a variable from a list (e.g.
text(list[0], width/2, height/2)) π [example] - how to use an index variable (e.g.
list[i]) - how to load json datasetsπ [example]
- how to create your own json datasetπ [example]
Functions (Advanced)
- how to use
mouseClicked(),keyPressed()andkeyReleased()π [example] - how to declare a new function (e.g.
function myFunction() {...}) π [example] - how to use
createButton()andbutton.mousePressed(callback)π [example]
Loops
- how to make a for loop (e.g.
for (x = 0; x < width; x+= 50) {...}) π [example] - how to use a for loop with a list (e.g.
for (element of list) {...}) π [example]
One-button Game
Class #04
Buttons (P5)
- how to create a button and make it clickable in P5 π [example
- how to make a counter from the button π [example]
- how to make conditional statements with the counter π [example]
- how to use the counter for size values π [example]
- how to map the counter to other ranges of values π [example]
- how to style a button π [example]
Text Inputs (P5)
- how to create a text input and retrieve its value [example]
- how to create an HTML element from a text input [example]
Chatbot
- how this sketch works π [chatdog (bare)]
- ... with some CSS knowledge, you also understand how this one works too π [chatdog (with css)]
Class #05
HTML
- how HTML works [Website House]
- how to create a simple HTML document [example]
- how to use media elements in HTML [example]
- how to use the <a> tag [example]
CSS
- how CSS works [Website House]
- how to apply CSS in <head><style> [example]
- how to apply CSS in style.css [example]
- how selectors work [CSS selectors]
- how margins and paddings work [box model]
- how the display property works [CSS Display]
- how the position property works [CSS Position]
Coding environment
- how to code in the P5 editor
- how to code in a local code editor (VS Code, VS Codium, Pulsar, Brackets, Sublime, etc)
- how to code in the code.kabkimd.nl editor
Hypertext Narrative
- how to combine all the knowledge from the previous classes into the design and development of a "hyper-narrative". That is a narrative piece told through hyper-text, or the use of multiple HTML pages interconnected through
<a>tags.