Course Hive
Search

Welcome

Sign in or create your account

Continue with Google
or
2.1: Variables in p5.js (mouseX, mouseY) - p5.js Tutorial
Play lesson

Start learning here! - 2.1: Variables in p5.js (mouseX, mouseY) - p5.js Tutorial

4.0 (0)
9 learners

What you'll learn

This course includes

  • 6.5 hours of video
  • Certificate of completion
  • Access on mobile and TV

Summary

Full Transcript

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: https://thecodingtrain.com/tracks/code-programming-with-p5-js/code/2-variables/1-mouseX-mouseY 🕹️ p5.js Web Editor Sketch: https://editor.p5js.org/codingtrain/sketches/IeblvUQrf 🎥 Previous video: https://youtu.be/xJcrPJuem5Q?list=PLRqwX-V7Uu6Zy51Q-x9tMWIv9cueOFTFA 🎥 Next video: https://youtu.be/dRhXIIFp-ys?list=PLRqwX-V7Uu6Zy51Q-x9tMWIv9cueOFTFA 🎥 All videos: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6Zy51Q-x9tMWIv9cueOFTFA References: 💾 mouseX: https://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! https://thecodingtrain.com/guides/passenger-showcase-guide 🚩 Suggest Topics: https://github.com/CodingTrain/Suggestion-Box 💡 GitHub: https://github.com/CodingTrain 💬 Discord: https://discord.gg/hPuGy2g 💖 Membership: http://youtube.com/thecodingtrain/join 🛒 Store: https://standard.tv/codingtrain 🖋️ 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 This description was auto-generated. If you see a problem, please open an issue: https://github.com/CodingTrain/thecodingtrain.com/issues/new #mouseinteraction #basics #variables #p5js #javascript

Course Hive

Continue this lesson in the app

Install CourseHive on Android or iOS to keep learning while you move.

Related Courses

FAQs

Course Hive
Download CourseHive
Keep learning anywhere