If you've read some of my other pages, you would probably know that I use Processing.js to create interactive versions of my Processing programs on the pages. It was very difficult for me to figure out how to use it, so this is just to help anyone who wants to use it. Just embed the following HTML code in your website:
<script src="http://processingjs.org/js/processing.min.js"></script>
<canvas data-processing-sources="sketch.pde"></canvas>
Replace sketch.pde with the URL of your sketch, and it should work in the browser.
IMPORTANT NOTE: There are 2 ways to use Processing.js:
1. Write pure Processing code (which is what I do) and compile it, and
2. Write a kind of mix between Processing and JavaScript, which is then interpreted.
I use the former, and I'm not sure whether the HTML code will work for the latter.
<script src="http://processingjs.org/js/processing.min.js"></script>
<canvas data-processing-sources="sketch.pde"></canvas>
Replace sketch.pde with the URL of your sketch, and it should work in the browser.
IMPORTANT NOTE: There are 2 ways to use Processing.js:
1. Write pure Processing code (which is what I do) and compile it, and
2. Write a kind of mix between Processing and JavaScript, which is then interpreted.
I use the former, and I'm not sure whether the HTML code will work for the latter.