Javascript Mode for Processing

http://wiki.processing.org/w/JavaScript

 

processing.js

https://processingjs.org
https://github.com/processing-js/processing-js
https://github.com/processing-js/processing-js/issues

 

http://processingjs.org/articles/PomaxGuide.html#jstosketch

 

TODO: sort these things
Game of Life
http://lambda-the-ultimate.org/node/2815 - LUT post from 2008 - anything worth while left in here?

 

http://aaron-sherwood.com/processingjs/
http://www.designfloat.com/blog/2013/07/24/8-effective-processing-js-tutorials/

 

 

history of conversion

Processing syntax is based on Java, which means that Processing.js has to essentially transform Java source code into JavaScript source code. Initially, this was achieved by treating the Java source code as a string, and iteratively replacing substrings of Java with their JavaScript equivalents. (For those interested in an early incarnation of the parser, it can be found at here, running from line 37 to line 266.) For a small syntax set, this is fine, but as time went on and complexity added to complexity, this approach started to break down. Consequently, the parser was completely rewritten to build an Abstract Syntax Tree (AST) instead, first breaking down the Java source code into functional blocks, and then mapping each of those blocks to their corresponding JavaScript syntax. The result is that, at the cost of readability, Processing.js now effectively contains an on-the-fly Java-to-JavaScript transcompiler. (Readers are welcome to peruse this code, up to line 19217.)

(source) NB: second link takes a while to load

 

Integration with Javascript and vice-versa

http://processingjs.nihongoresources.com/processing%20on%20the%20web/
http://fastcheetahs.com/blog/2012/11/using-processing-js-with-jquery/

 

 

See Also

JavaScript