Please enable JavaScript to use CodeHS

Digital Art with p5.js

Interactivity

Students learn about interactivity and how to create sketches that react to user input. Using system variables provided by p5.js, students add conditional logic to their code that modifies the composition when mouse and keyboard input is detected.

Lessons

3.1 What is Interactivity

  • What is Interactivity
  • Mouse Movement
  • Mouse Click
  • Keyboard Input
  • Reflection: Interactivity

3.2 Mouse Data

  • Mouse Data
  • mouseX
  • mouseY
  • mouseX and mouseY
  • mouseButton
  • +1 more

3.3 Keyboard Data

  • Keyboard Data
  • keyIsPressed
  • Key Codes
  • keyIsDown
  • key

3.4 Project: Create Your Own Interactive Sketch

  • Project: Create Your Own Interactive Sketch

Courses that include this module