p5.js is:
a JavaScript library that starts with the original goal of Processing, to make coding accessible for artists, designers, educators, and beginners, and reinterprets this for today's web.
Generally you'd want to start with the web editor for p5.js, via something like
The getting started page also walks you through using sublime text for working with p5.js, but there are a couple of things missing.
This repo takes the Complete Library download, wraps it in a git repo, and includes a couple of extra features:
- limited typescript support including
- typescript based autocomplete suport
- typescript based error detection
- instructions for visual studio code
- instructions for live-server / live coding
- A self-contained single location for local use
-
Clone this repo:
git clone https://github.com/EchoAbstract/p5.js-starter.git p5.js
-
Copy the example sketch to a new sketch:
cd p5.js cp -R empty-example first-sketch
-
Setup your editor
Install the live-server extension
Type ⌘⇧P then enter Install Extensions and search for live-server., reload when prompted and you should be ready to go.
Halp! This needs filled in!
The typescript support was grabbed from a blog post by the Friendly Error Fellowship, so it may be a bit dated, and there might be a better way to get this set up. I haven't had too much time to play with it yet.