@TheCodingTrain
  @TheCodingTrain
The Coding Train | 2.1: Variables in p5.js (mouseX, mouseY) - p5.js Tutorial @TheCodingTrain | Uploaded 3 years ago | Updated 1 hour ago
In this video, I introduce the concept of variables! The setup() and draw() functions are covered along with mouseX and mouseY in p5.js. Code: thecodingtrain.com/tracks/code-programming-with-p5-js/code/2-variables/1-mouseX-mouseY

πŸ•ΉοΈ p5.js Web Editor Sketch: editor.p5js.org/codingtrain/sketches/IeblvUQrf

πŸŽ₯ Previous video: youtu.be/xJcrPJuem5Q?list=PLRqwX-V7Uu6Zy51Q-x9tMWIv9cueOFTFA
πŸŽ₯ Next video: youtu.be/dRhXIIFp-ys?list=PLRqwX-V7Uu6Zy51Q-x9tMWIv9cueOFTFA
πŸŽ₯ All videos: youtube.com/playlist?list=PLRqwX-V7Uu6Zy51Q-x9tMWIv9cueOFTFA

References:
πŸ’Ύ mouseX: p5js.org/reference/#/p5/mouseX

Timestamps:
0:00 Introduction
0:35 What is program flow? How does it work in p5.js?
2:22 Let's simplify!
3:16 What is a variable?
4:47 What's happening here?
5:26 What could we do? Let's make a simple painting program!
6:05 Let's move background into setup. What do you think is gonna happen?
6:34 Why does that happen?
7:31 Let's talk about events! We can add a mousePressed function.
8:41 Let's add mousePressed and put background in it!
9:07 You might have this question. Why isn't it flickering?
10:10 What can you try? Can't wait to see what you create!

Editing by Mathieu Blanchette
Animations by Jason Heglund
Music from Epidemic Sound

πŸš‚ Website: http://thecodingtrain.com
πŸ‘Ύ Share Your Creation! thecodingtrain.com/guides/passenger-showcase-guide
🚩 Suggest Topics: github.com/CodingTrain/Suggestion-Box
πŸ’‘ GitHub: github.com/CodingTrain
πŸ’¬ Discord: discord.gg/hPuGy2g
πŸ’– Membership: http://youtube.com/thecodingtrain/join
πŸ›’ Store: standard.tv/codingtrain
πŸ–‹οΈ Twitter: twitter.com/thecodingtrain
πŸ“Έ Instagram: instagram.com/the.coding.train

πŸŽ₯ Coding Challenges: youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
πŸŽ₯ Intro to Programming: youtube.com/playlist?list=PLRqwX-V7Uu6Zy51Q-x9tMWIv9cueOFTFA

πŸ”— p5.js: p5js.org
πŸ”— p5.js Web Editor: editor.p5js.org
πŸ”— Processing: processing.org

πŸ“„ Code of Conduct: github.com/CodingTrain/Code-of-Conduct

This description was auto-generated. If you see a problem, please open an issue: github.com/CodingTrain/thecodingtrain.com/issues/new

#mouseinteraction #basics #variables #p5js #javascript
2.1: Variables in p5.js (mouseX, mouseY) - p5.js TutorialCoding Train Live: Riding the Oregon Trail 2What was Coding like 40 years ago?print(Hello, Shorts!) #shortsHexagonal Cellular Automata #genuary10 #genuaryDiscord Bots 3: Coding a Bot with discord.jsMoveNet vs. PoseNet? (Coding Train Live!)Discord Bots 5: Posting GIFsCoding Challenge #157: Zoom Annotations with Machine Learning + p5.jsSeriously, lets *really* finish the AutoEncoders Project!ml5.js: Classifying Drawings with DoodleNetI have no plan!

2.1: Variables in p5.js (mouseX, mouseY) - p5.js Tutorial @TheCodingTrain

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER