How can you duplicate a single object and make many of them in an array? This video looks at doing this with ES6 classes. I cover for loops as well as the Array function push(). Code: https://thecodingtrain.com/tracks/cod...
🕹️ p5.js Web Editor Sketch: https://editor.p5js.org/codingtrain/s...
🎥 Previous video: • 7.2: Arrays and Loops - p5.js Tutorial
🎥 Next video: • 7.4: Mouse Interaction with Objects -...
🎥 All videos: • Start learning here!
Timestamps:
0:00 Introduction
1:22 Making Multiple Objects with Arrays
2:17 Using Indexes to Create Objects
6:35 Using an Index in a Formula to Initialize Values
7:07 Using the Object's Length
10:48 Adding Objects with a Mouse Click
12:09 Pushing an Object to the End of the Array
Editing by Mathieu Blanchette
Animations by Jason Heglund
Music from Epidemic Sound
🚂 Website: http://thecodingtrain.com/
👾 Share Your Creation! https://thecodingtrain.com/guides/pas...
🚩 Suggest Topics: https://github.com/CodingTrain/Sugges...
💡 GitHub: https://github.com/CodingTrain
💬 Discord: / discord
💖 Membership: http://youtube.com/thecodingtrain/join
🛒 Store: https://standard.tv/codingtrain
🖋️ Twitter: / thecodingtrain
📸 Instagram: / the.coding.train
🎥 Coding Challenges: • Coding Challenges
🎥 Intro to Programming: • Start learning here!
🔗 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-o...
This description was auto-generated. If you see a problem, please open an issue: https://github.com/CodingTrain/thecod...
#arrays #objects #forloop #p5js #javascript
Смотрите видео 7.3: Arrays of Objects - p5.js Tutorial онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь The Coding Train 10 Октябрь 2017, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 168,438 раз и оно понравилось 2.7 тысяч людям.