if i use this:
$(document).ready(function() { pjs = Processing.getInstanceById("EyeCanvas"); console.log(pjs); }
then pjs is always undefined
when i use this:
function test() { pjs = Processing.getInstanceById("EyeCanvas"); console.log(pjs); }
and trigger test () with the button, then pjs = D. Processing, as it should be.
I load the scripts in the following order:
<script type="text/javascript" src="processing-1.3.6.min.js"></script> <script type="text/javascript" src="jquery1-7-1.js"></script> <script type="text/javascript" src="script.js"></script>
How can I work with pjs without clicking the people button?
source share