A simpler way to create JavaScript

Processing (opens in new tab) 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 (opens in new tab).

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.

You can create simple interactive apps like this with a few lines of code

You can create simple interactive apps like this with a few lines of code

Created by New York-based artist and programmer Lauren McCarthy (opens in new tab) 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 (opens in new tab) 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 (opens in new tab).

Brendan Dawes uses p5.js to generate these fab sine wave-based images for his Twitter account

Brendan Dawes uses p5.js to generate these fab sine wave-based images for his Twitter account

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.

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.