p5.js – Processing for Javascript & Web Developers

What is it?

p5.js is a new Javascript library developed by ‘Lauren McCarthy and others’ that allows Javascript programmers to write Processing sketches in native Javascript which can then be included in a HTML file. Although this may sound a lot like Processing.js there are a number of differences.


p5.js Vs Processing.js

On a basic level Processing.js is simply an interpreter which converts raw Processing sketches into Javascript. p5.js however is an entirely new library built from the ground up which looks and feels like traditional Processing but can also incorporate and interact with other web technologies in the same way normal Javascript can.


What does this mean?

Effectively p5.js allows developers to create advanced audio (Yup, theres already a well stocked audio library) and visual presentations  on the web which can form the bulk of, or some part of, a webpage. Using the additional DOM library users can even interact with the HTML DOM presenting possibilities for all kinds of interactivity.


Where can i find out more?

Firstly you’ll want to head over to p5js.org where you’ll find downloads for the library, the alpha version of the dedicated p5.js development environment and a short presentation from Lauren McCarthy and Dan Shiffman about p5.js.

There are also tutorials on the basics of the language, the differences from traditional Processing as well as a lesson explaining how realtime apps can be developed with p5.js and node.js.

If that’s not enough there are even p5.js sketches appearing on CodePen and some more examples and information available from the official p5.js github page.