Changes

Jump to: navigation, search

Processingjs gamepaper

889 bytes added, 05:26, 16 January 2011
JavaScript
The original Processing Language was written in Java and the syntax is Java based. Sketches written in Processing are then compiled into standalone applications or Java Applets. Processing.js interprets Processing sketches and creates JavaScript code that renders on a web page. When the original Processing Language, also known as P5, was first developed, Java was supposed to become the language of the web while JavaScript was client-side scripting language for small tasks. As the web matured, JavaScript, however, became the language of the web, although many of the misconceptions about it still persist. /*cite javascript the good parts here*/ With recent developments in JavaScript technology, JavaScript is now fast enough to handle the demands of realtime interactive web graphics.
 
From it's inception, Processing.js was designed to be more than just a rewrite of the Java functions provided by Processing to JavaScript. John Resig wrote the original Processing.js parser to scan a Processing sketch for hints of Java code and convert that code to JavaScript. However, if the parser encountered JavaScript code, it would leave the code intact. This method allowed not only for the interpretation of existing Processing code to JavaScript but the injection of JavaScript into Processing sketches. By allowing JavaScript to exist within a Processing Sketch intact, Java and JavaScript code can exist together without any need to declare the language you are using. Old sketches written for Processing will work but new sketches written for Processing.js can not only have Processing code but can make use of JavaScript to interact with other elements of the webpage.
Processing.js is more than just a Processing parser re-written in JavaScript. It is designed in a way that connects the Processing language (also known as P5) with web technologies such as JavaScript, the HTML5 canvas element, JQuery, and various web services. /*Awkward*/ Furthermore, Processing.js is built in such a way as to allow easy integration of new technologies as they emerge. It is designed to be fast and to take advantage of recent JavaScript developments to ensure that the platform is responsive.

Navigation menu