A simpler way to create JavaScript
Inspired by accessible programming language Processing, p5.js makes it easy for anyone to sketch rich JavaScript apps.
Processing is a brilliant programming language aimed at more at artists and designers than at coders. Designed to help non-programmers get started with programming, it makes it easy for get instant visual results from your code. It's possible to run Processing programs in a browser using Processing.js, but now there's an alternative in the form of p5.js.
Currently in beta, it's a JavaScript library that starts with the original Processing goal of accessible coding, but that enables you to create attractive JavaScript examples that run directly in the browser.
Created by New York-based artist and programmer Lauren McCarthy and a team of contributors, p5.js is a software sketchbook for the web that features all of Processing's drawing functionality, but also lets you use add-on libraries to interact with HTML5 objects such as video and sound.
Long-time Processing fan Brendan Dawes has already been experimenting with p5.js, and has used it in conjunction with PhantomJS to generate a new sine wave-based header image for his Twitter account every hour. See how he did it here.
While it's a new interpretation of Processing rather than a straight port, it's easy to switch to pf.js and convert existing Processing projects to p5.js; there are instructions on the site. There's also an official editing environment on the way; if you have a Mac you can download an alpha version today. Otherwise you can simply use your preferred text editor; there are instructions for setting p5.js up with Sublime Text 2 on the site, along with loads of tutorials and code examples to help you get started.
Get top Black Friday deals sent straight to your inbox: Sign up now!
We curate the best offers on creative kit and give our expert recommendations to save you time this Black Friday. Upgrade your setup for less with Creative Bloq.
Thank you for reading 5 articles this month* Join now for unlimited access
Enjoy your first month for just £1 / $1 / €1
*Read 5 free articles per month without a subscription
Join now for unlimited access
Try first month for just £1 / $1 / €1
Jim McCauley is a writer, performer and cat-wrangler who started writing professionally way back in 1995 on PC Format magazine, and has been covering technology-related subjects ever since, whether it's hardware, software or videogames. A chance call in 2005 led to Jim taking charge of Computer Arts' website and developing an interest in the world of graphic design, and eventually led to a move over to the freshly-launched Creative Bloq in 2012. Jim now works as a freelance writer for sites including Creative Bloq, T3 and PetsRadar, specialising in design, technology, wellness and cats, while doing the occasional pantomime and street performance in Bath and designing posters for a local drama group on the side.