You'll see that in principle you don't need anything extra to author p5js sketches in Sublime Text (or any other text editor); except a browser to open your files. There is no required compile step to run JS code!!!
It is however a good idea to run a local server to test with; since you can run into security restrictions when trying to dynamically load local assets.
It is however a good idea to run a local server to test with; ...
I dunno why folks don't state the obvious: Any Firefox based browser can freely run any JS scripts!
And for Chrome based 1s, like SlimJet for example, just add "--allow-file-access-from-files" in its shortcut. Here's how mine is: "C:\Program Files\Slimjet\slimjet.exe" --allow-file-access-from-files
Here's some sketch entirely embedded in 1 ".html" file.
It works in any up-to-date Chrome, Firefox and even IE11 based browsers.
In IE11, just click to accept to run "blocked content" though. B-)
It's available online in these 2 sketch hosting sites:
Also you can create the following Build System file in {Path to Sublime Text folder}/Packages/User folder, choose new build system from Tools->Build System menu and run your scripts directly from the text editor with Ctrl+B command.
// ProcessingJS.sublime-build
{
"cmd": ["{Path to Chrome/Firefox folder}", "$file"]
}
Answers
Have you read the Getting started tutorial? :(|)
You'll see that in principle you don't need anything extra to author p5js sketches in Sublime Text (or any other text editor); except a browser to open your files. There is no required compile step to run JS code!!!
It is however a good idea to run a local server to test with; since you can run into security restrictions when trying to dynamically load local assets.
I dunno why folks don't state the obvious: Any Firefox based browser can freely run any JS scripts!
And for Chrome based 1s, like SlimJet for example, just add "--allow-file-access-from-files" in its shortcut. Here's how mine is:
"C:\Program Files\Slimjet\slimjet.exe" --allow-file-access-from-files
There's also an online IDE dedicated to p5.js: http://p5ide.HerokuApp.com/editor
For hosting as well, I like this 1: http://p5js.SketchPad.cc
Here's some sketch entirely embedded in 1 ".html" file.
It works in any up-to-date Chrome, Firefox and even IE11 based browsers.
In IE11, just click to accept to run "blocked content" though. B-)
It's available online in these 2 sketch hosting sites:
Also running under Pjs library (Java/JS cross-mode): :> http://studio.ProcessingTogether.com/sp/pad/export/ro.9lMOG-RZX8JDk
Just copy and paste the code below, saving it as an ".html" file.
Then double-click or drag it to some browser: :-bd
Also you can create the following Build System file in {Path to Sublime Text folder}/Packages/User folder, choose new build system from Tools->Build System menu and run your scripts directly from the text editor with Ctrl+B command.