Confirmed users
656
edits
No edit summary |
|||
| Line 26: | Line 26: | ||
'''Create simple sketch here''' | '''Create simple sketch here''' | ||
==1. Writing a Processing.js Sketch== | |||
There's nothing you should do differently here: you should write your Processing sketches exactly the same way you already do. For most people, this will mean using the Processing IDE, which has the nice benefit of letting you write, run, and test your code all in once place. Remember, any valid Processing sketch should also be a valid Processing.js sketch. | |||
If you want to experiment with web-based Processing.js code editors, you can also try these: | |||
* http://sketch.processing.org/ | |||
* http://sketchpad.cc/ | |||
* http://hascanvas.com/ | |||
==2. Obtaining Processing.js== | |||
Processing.js is a JavaScript library that is meant to be included in a web page. You don't have to compile it, tell your web server about it, etc. It simply has to be included in a web page, and the browser will do the rest. | |||
You can download Processing.js at http://processingjs.org/download. The library comes in a number of forms, for example: | |||
* processing-0.9.7.js | |||
* processing-0.9.7.min.js | |||
The version numbers may be different as you read this, but not the file extensions. Both end in .js, but one also has .min. The .min version is the other file in a minified form, which means it will be smaller to download. File sizes, and download times, matter on the web in a way they don't with normal Processing sketches. | |||
==3. Creating a Processing.js Web Page== | |||
no data dir | |||
libraries won't work, parts of Java won't work.... | |||