Here's the javascript template for making p5 sketches for COMP1720. If you've used Processing before, the p5 function names and general worldview will be really similar.
-
install Atom (Windows, OSX or Linux)
-
install the Git Plus, Live Server and Color Picker packages (if you use the
apm
tool it's justapm install git-plus atom-live-server color-picker
)
-
clone this repository somewhere
-
open the folder in Atom and start the atom live server (
Packages > atom-live-server > Start server
orCtrl+Alt+L
) -
in Chrome, type
localhost:3000
into the address bar to run/view the sketch -
every time you save the
sketch.js
file, the live server will auto-update the sketch in Chrome
This should work in all browsers, but we'll be using Chrome/Chromium in the labs, so it's probably best to use that.
Also, if you do make a cool sketch, don't push the changes back up to the "template" repo (you probably don't have permission to do that anyway). Instead, create a new GitLab repo and push it up there.
Here are a few places you'll find useful information: