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

0 Comments

Submit a Comment

What Our Clients Are Saying

Kelicor Logistics

Leland created my website for my new venture. I found his service to be excellent,was always available to answer my...

Colin, Kelicor Logistics Solutions

Dieno Digital Marketing Services
5
2018-04-27T01:07:34+00:00

Colin, Kelicor Logistics Solutions

Leland created my website for my new venture. I found his service to be excellent,was always available to answer my questions and was always prepared to go the extra mile, in order to ensure my website conveyed it's intended message,, And the cherry on top was it was most affordable. Would definitely recommend. Thanks Leland !

McNeney McNeney Spieker LLP

Dieno Digital has been providing our firm with what we like to call the Royal Package in customer service for...

M, McNeney McNeney Spieker LLP

Dieno Digital Marketing Services
5
2018-04-27T01:08:19+00:00

M, McNeney McNeney Spieker LLP

Dieno Digital has been providing our firm with what we like to call the Royal Package in customer service for over 3 years now. The knowledge and skills Leland brings to the table has increased our business and streamlined our social media platform. Our requests are always dealt with in a timely manner and we are always given options and alternatives to better reach potential new clients. We highly recommend Dieno Digital to increase your life social media presence.

Vancity Dietitians

Leland was speedy and efficient in working with our website. Leland knows how picky we can be and he handled...

Raman, Vancity Dietitians

Dieno Digital Marketing Services
5
2018-04-27T01:09:04+00:00

Raman, Vancity Dietitians

Leland was speedy and efficient in working with our website. Leland knows how picky we can be and he handled all change requests with patience! Furthermore, any time we had questions, there was no hesitation for Leland to reply with a thoughtful answer in a timely manner. Thanks for the great work!

Gloss Beauty Truck

Without the support and help of Leland my business would not be half of what it is. he puts the...

Tammie, Gloss Beauty Truck

Dieno Digital Marketing Services
5
2018-04-27T01:09:38+00:00

Tammie, Gloss Beauty Truck

Without the support and help of Leland my business would not be half of what it is. he puts the extra mile in to what he does to help make it easy from someone like myself who is incompetent with computers. I am so lucky to have him apart of my back end team. He's amazing at what he does .
5
4
Dieno Digital Marketing Services
[newsletter_form]
<div class="tnp tnp-subscription"> <form method="post" action="https://www.dienodigital.com/?na=s"> <input type="hidden" name="nlang" value=""><div class="tnp-field tnp-field-firstname"><label for="tnp-name">First name or full name</label> <input class="tnp-name" type="text" name="nn" value=""></div> <div class="tnp-field tnp-field-email"><label for="tnp-email">Email</label> <input class="tnp-email" type="email" name="ne" value="" required></div> <div class="tnp-field tnp-field-button"><input class="tnp-submit" type="submit" value="Subscribe" > </div> </form> </div>