Udemy
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
p5.js Master Class - Creative Coding with JavaScript
Rating: 4.8 out of 5(36 ratings)
141 students

p5.js Master Class - Creative Coding with JavaScript

p5.js, creative coding, JavaScript, generative art, interactive sketches, animations, canvas drawing, visual programming
Last updated 4/2026
English
English [Auto],

What you'll learn

  • Fundamentals of p5.js Creative programming.
  • Suite of tools for p5.js Creative programming.
  • Coding based examples.
  • Concepts of modular programming.

Course content

4 sections • 11 lectures • 2h 33m total length
  • p5.js Functions22:14

    Learn the core p5.js functions, including setup and draw, create canvas, draw shapes, apply colors, text and transforms, and handle mouse interactions with a moving circle example.

  • Variables8:19

    Explore variables in p5.js, including global, local, and built-in variables, and see how they control shapes, motion, color, and interaction. Learn how global variables persist across frames, how local variables reset within functions, and how built-in values like mouse x and mouse y and window size drive dynamic sketches.

  • Loading Images6:06

    Preload images in p5.js by declaring a global img variable, loading assets/lwa.jpg in preload, then drawing the image at 0,0 on a 400 by 400 canvas in draw.

  • Loading Audio Files4:42

    Define a global song variable and preload an mp3 with loadSound, then set up a 400 by 400 canvas and play the song on mouse press.

  • Useful Functions5:45

    Learn how the map function translates mouse x and y positions into rgb values, mapping 0–width and 0–height to 0–255, and draw centered rectangles while handling mouse and keyboard events.

Requirements

  • No prior knowledge of programming is required.

Description

Interested in creative coding and generative art? Start with p5.js! p5.js is JavaScript programming library which is suitable for beginners to learn programming and scription with fun interactive and animations. This course uses the p5.js library for visual programming and interactive sketches, no prior coding experience required.

Dive into core p5.js functions like setup(), draw(), shapes, colors, animation, and mouse/keyboard interaction to build dynamic canvas projects that respond to user input in real-time.

Perfect for artists, designers, developers new to code, hobbyists, educators, or anyone wanting to prototype ideas visually without complex setups or heavy frameworks.

This hands-on course covers canvas basics, drawing functions (line, circle, rect), color modes, loops for patterns, conditionals for interactivity, object-oriented sketches with classes, sound integration via p5.sound, and export-ready projects for web or portfolios.

Contents:

  • p5.js environment setup and first sketch

  • Basic shapes, stroke, fill, and color modes

  • Animation loops and timing with frameRate()

  • Mouse and keyboard event handling

  • Arrays and loops for generative patterns

  • Classes and objects for complex interactions

  • Image loading, pixel manipulation, and filters

What are you waiting for? Learn p5.js Creative Coding and transform your ideas into interactive visuals that captivate audiences worldwide. Thanks for joining—let's create something amazing together!

Who this course is for:

  • Beginner developer or programmer