Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.


Learn p5.js

via Codecademy


Create generative visualizations and interactive experiences with p5.js, a popular JavaScript library for creative coding.

### Why Learn p5.js?

Meet p5.js — an open-source JavaScript library that allows you to use programming as an artistic medium. With it, you can simplify the way you build graphic and interactive experiences. Create colorful, dynamic, and engaging visuals for design, architecture, fashion, gaming — anything you can imagine.

### Take-Away Skills

You’ll build on your JavaScript foundation and dive into p5.js’s full range of functionality. Learn how to create everything from simple 2D sketches to generative visualizations using interactive animations and multimedia elements.

### Note on Prerequisites:

We recommend having a basic knowledge of HTML, CSS, and JavaScript. It also helps to have an understanding of HTML elements and structures, CSS colors, and JavaScript arrays, loops, and objects before starting this course.


  • Welcome to p5.js: Get an introduction to creative coding and the p5.js JavaScript library.
    • Welcome to Learn p5.js

  • Introduction to Creative Coding: Learn the fundamental concepts of p5.js and create your first p5.js sketch to draw and color shapes!
    • Introduction to Creative Coding with p5.js
    • Drawing and Coloring Shapes with p5.js
    • p5.js Web Editor
    • Creating a Local p5.js Project
    • Wall Drawing
    • Introduction to Creative Coding with p5.js

  • Animation: Turn your static p5.js sketch into animation and learn to create more complex sketches using grouping and transformation functions.
    • Animation with p5.js
    • Grouping and Transforming Shapes
    • Tips for Creating Animations with p5.js
    • Bouncing Balls
    • Animations with p5.js

  • Interaction: Add interactivity to your p5.js sketch with mouse and keyboard functions.
    • Interaction with p5.js
    • Generative Art Creator
    • Interaction with p5.js

  • Media: Learn how to add and manipulate media assets, such as images and videos, in your p5.js sketch.
    • Images and Videos
    • Creative Coding with Webcams
    • Interactive Video Sculpture
    • Media with p5.js

  • Next Steps: You’ve completed the Learn p5.js course! What’s next?
    • Next Steps


Start your review of Learn p5.js

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.