Skip to content
Demos Lab
  • p5.js
  • TouchDesigner
  • Generative Art
  • Installations
  • Physical Computing
  • Tools
  • Media Art
  • About

p5.js and Processing Tutorials, Sketches and Guides

This hub gathers Demos Lab's coverage of p5.js and Processing, the open-source tools that let artists, designers and students sketch with code. You'll find tutorials, annotated sketches and practical advice for building generative and interactive work in JavaScript or Java. It serves beginners drawing their first shape on a canvas and experienced coders who want cleaner, more expressive projects.

What you'll find here

Beginner-friendly tutorials

Walkthroughs start with setup() and draw(), then build toward shapes, color, motion, mouse and keyboard input, and simple animation.

Annotated example sketches

Each sketch is explained line by line so you understand why it works, with ideas for remixing it into something of your own.

OpenProcessing community guides

These pieces cover publishing, forking and learning from sketches on OpenProcessing, plus advice on presenting your work so others can explore and build on it.

JavaScript versus Java workflows

Comparisons show when browser-based p5.js suits a project and when Processing's Java environment is the better choice for installations, high-resolution exports and heavier computation.

Home » p5.js & Processing
Snake Game JavaScript Hero
November 15, 2026 by Demos Lab Editorial Team
p5.js & Processing

How to Code a Snake Game in JavaScript from Scratch

A complete Snake game in JavaScript takes about 150 lines and needs nothing more than a <canvas>, an array of grid cells and a…

Read article →
Hand Tracking Hero
November 15, 2026 by Demos Lab Editorial Team
p5.js & Processing

Handpose Hand Tracking in the Browser with ml5.js

From an ordinary webcam frame, a handpose model gives you 21 points per hand: the wrist, plus four joints on each finger. In a…

Read article →
Processing Coordinate System Hero
November 13, 2026 by Demos Lab Editorial Team
p5.js & Processing

The Processing Coordinate System Explained with Examples

In Processing, the point (0, 0) is the top-left corner of the window. x grows to the right and y grows downward, so a…

Read article →
JavaScript Mode in Processing
October 27, 2026 by Demos Lab Editorial Team
p5.js & Processing

How JavaScript Mode Works in Processing and What Replaced It

JavaScript Mode was an option in the Processing editor that ran your sketch in a web browser instead of the Java runtime. It worked…

Read article →
p5.js Creative Coding Hero
October 21, 2026 by Demos Lab Editorial Team
p5.js & Processing

What is p5.js and why artists love it

Toolp5.js CostFree, open source Runs inAny modern browser LevelBeginner friendly What p5.js actually is p5.js is a set of JavaScript functions that handle the…

Read article →

Latest experiments

  • Convert DAT Hero
    How to Use the Convert DAT to Reshape Tables and Text
  • Art Installation Hero
    Art Installation Explained with Key Works to Know
  • Jumper Wires Hero
    How to Choose the Right Jumper Wires for Arduino Projects
  • New Media Art Hero
    New Media Art Examples and Landmark Media Artworks
  • Anisotropic Filtering Hero
    Anisotropic Filtering and Why Your Textures Look Blurry

Sections

  • Creative Coding Tools (3)
  • Generative Art & Shaders (7)
  • Installations & Projection (3)
  • New Media Art (4)
  • p5.js & Processing (5)
  • Physical Computing (4)
  • TouchDesigner (4)

Demos Lab

Creative coding and interactive media art

Sections

  • Creative Coding Tools
  • Generative Art & Shaders
  • Installations & Projection
  • New Media Art
  • p5.js & Processing
  • Physical Computing
  • TouchDesigner

Latest

  • How to Use the Convert DAT to Reshape Tables and Text
  • Art Installation Explained with Key Works to Know
  • How to Choose the Right Jumper Wires for Arduino Projects
  • New Media Art Examples and Landmark Media Artworks
  • Anisotropic Filtering and Why Your Textures Look Blurry

© 2026 Demos Lab.
  • About
  • Contact
  • Code & Credits
  • Privacy Policy
  • Terms of Use
×