javascript - How do you setup processingJS on html? -


how run processingjs script on html page? send me test .html , auxiliary code files me idea?

let's wanted run rectangle:

rect(50,50,50,50); 

everything want know on page: javascript quick start | processing.js

but basically, need create html file loads processing.js library, write processing.js code , load .pde file canvas tag on page. looks this:

<!doctype html>  <html>  <head>    <title>hello web - processing.js test</title>    <script src="processing-1.3.6.min.js"></script>  </head>  <body>   <h1>processing.js test</h1>   <p>this first processing.js web-based sketch:</p>   <canvas data-processing-sources="hello-web.pde"></canvas> </body> </html> 

the easiest way use javascript mode processing editor (you might have use version 2.2.1), click run. can view files created editor (go view > sketch folder) better idea of what's going on under hood.


Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -