code-for-a-living April 17, 2021

Level Up: Creative Coding with p5.js – part 6

During our second session, we learned how to transform arrays into Bouncing Balls. In this session, we will take the principles of loops and arrays we used to create 100 ellipses bouncing around the canvas and learn how to adapt them to fit within in an object-oriented approach. We will start from the basics and…
Avatar for
Content Marketer

During our second session, we learned how to transform arrays into Bouncing Balls. In this session, we will take the principles of loops and arrays we used to create 100 ellipses bouncing around the canvas and learn how to adapt them to fit within in an object-oriented approach. We will start from the basics and talk about what an object is and how it can be applied to create dynamic visualizations with p5.js. By the end of this session, we’ll have a Ball class that has its own attributes and methods.

Here are some Stack Overflow questions related to the work we did in this session:

JavaScript pattern for multiple constructors

Class keyword in JavaScript

p5js – can’t create more than 1 object in draw()

My for loop to create objects isn’t working in .js with P5

If you enjoyed this lesson, you can catch up on the rest of the series on YouTube. If you’d like to watch a session live, follow the Codecademy YouTube channel.

Every Tuesday from now until April 27th, we’ll be streaming a new session at 4PM EST. You can set a reminder for the stream for April 20th here.

Finally, if you want even more Creative Coding with p5.js content, you can sign up for the interactive course this series was based on here. This course was developed by Jiwon and has many more quizzes, projects, and helpful articles that we can’t fit into our streams!

Tags: , ,
Podcast logo The Stack Overflow Podcast is a weekly conversation about working in software development, learning to code, and the art and culture of computer programming.

Related

series of stacked circles
code-for-a-living May 8, 2021

Level Up: Creative Coding with p5.js – part 8

In our last session, we will learn how to create audio visualizations with the p5.sound.js library. We will start by learning how to upload and play a sound file in the p5.js web editor. We will first talk about what amplitude is and how we can program a p5.js sketch to react to the amplitude…
Avatar for
Content Marketer
code-for-a-living September 18, 2021

Level Up: Introduction to TypeScript

In this one-off Level Up session, we’re exploring TypeScript, a popular programming language used for web development. Josh Goldberg, a Staff Frontend Developer at Codecademy, walks us through the basics of TypeScript. We discuss its relationship to JavaScript, how TypeScript is used in real production environments (like Codecademy itself!), how to get involved in the…
Avatar for
Content Marketer
The Overflow Newsletter Banner
newsletter May 21, 2021

The Overflow #74: Behind the scenes at SpaceX

Welcome to ISSUE #74 of the Overflow! This newsletter is by developers, for developers, written and curated by the Stack Overflow team and Cassidy Williams at Netlify. This week: So long to a podcast co-host, it’s a good year to go to Mars, and neural networks doing the important work of making video games more realistic. From the…
Avatar for Ryan Donovan
Content Marketer
Level up: SwiftUI quiz
code-for-a-living August 14, 2021

Level Up: Build a Quiz App with SwiftUI – Part 1

SwiftUI is Apple’s newest framework for building iOS applications.  It uses the best features of the Swift language to enable writing performative, declarative code.  If you’ve ever wanted to build your own iOS applications, now is an excellent time to get started. The Codecademy Live: Build a Quiz App with SwiftUI series will be hosted…
Avatar for
Content Marketer