I would like to call paper.js functions from HTML buttons in my page but I believe the paper.js functions exist in their own scope. The paper.js docs mention interoperability which sounds like the right direct by then take me to a page that says "coming soon":
http://paperjs.org/tutorials/getting-started/paperscript-interoperability/
Does anyone know how I can call a function created within a paper.js script from my HTML page?
Apologies for that missing tutorial. I shall really invest some time into writing it finally.
I've answered this question on the mailing list last year: https://groups.google.com/d/msg/paperjs/C6F0XFlplqM/_67AMqCR_nAJ
And in the same way, you can use this structure from normal JavaScript.
I just wanted to add some clarification for anyone who runs into this.
For PaperScript-to-JavaScript interoperability, do the following...
In HTML file:
In JavaScript file:
In PaperScript file: