Do It Yourself – Tutorials – 2.2: Variables in p5.js (Define Your Own) – p5.js Tutorial

by | May 20, 2021 | 0 comments

Do It Yourself – Tutorials – 2.2: Variables in p5.js (Define Your Own) – p5.js Tutorial

by | May 20, 2021 | Do It Yourself - Build Your Own Website | 0 comments

Do It Yourself – Website Tutorials



In this video, I cover how to define, initialize, and use your own variables for the purpose of animating p5.js sketches. https://thecodingtrain.com/beginners/p5js/2.2-make-your-own.html

p5.js Web Editor Sketches:
πŸ•ΉοΈ Make Your Own Variable: https://editor.p5js.org/codingtrain/sketches/xPXNdPy17
πŸ•ΉοΈ Growing Circle Exercise: https://editor.p5js.org/codingtrain/sketches/ehbMJ-otC

πŸŽ₯ Previous video: https://youtu.be/7A5tKW9HGoM?list=PLRqwX-V7Uu6Zy51Q-x9tMWIv9cueOFTFA
πŸŽ₯ Next video: https://youtu.be/T26OJGjI8qI?list=PLRqwX-V7Uu6Zy51Q-x9tMWIv9cueOFTFA
πŸŽ₯ All videos: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6Zy51Q-x9tMWIv9cueOFTFA

Other videos mentioned in this video:
πŸŽ₯ let vs var – Topics of JavaScript/ES6: https://youtu.be/q8SHaDQdul0

Timestamps:
0:00 Hello! Let’s talk more about variables!
0:18 What are we trying to make?
0:52 What are the steps to making a variable?
1:12 Step 1: Declare
3:01 Step 2: Initialize
4:21 Step 3: Use
5:03 Let’s add the code!
5:49 Combining declaration and initialization.
6:43 What is a global variable?
7:31 But the circle isn’t moving! How can we fix that?
9:19 How can we make it interactive?
9:50 What’s next?

πŸš‚ Website: http://thecodingtrain.com/
πŸ‘Ύ Share Your Creation! https://thecodingtrain.com/Guides/community-contribution-guide.html
🚩 Suggest Topics: https://github.com/CodingTrain/Rainbow-Topics
πŸ’‘ GitHub: https://github.com/CodingTrain
πŸ’¬ Discord: https://discord.gg/hPuGy2g
πŸ’– Membership: http://youtube.com/thecodingtrain/join
πŸ›’ Store: https://standard.tv/codingtrain
πŸ“š Books: https://www.amazon.com/shop/thecodingtrain
πŸ–‹οΈ Twitter: https://twitter.com/thecodingtrain
πŸ“Έ Instagram: https://www.instagram.com/the.coding.train/

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

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

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

source