Конечно, это возможно.Есть много способов, один из способов - присоединить переменную, которую вы хотите передать, к объекту window
.Это не только решение и, безусловно, не самое элегантное решение, но оно работает.
Так что-то вроде этого:
// processingjs code...
window.varIWantToPassAround = "whatever";
// jQuery code...
// as long as you don't redefine the variable "varIWantToPassAround", you can reference it without referencing the window object. IE "window.varIWantToPassAround"
// but I like to be explicit so when I read my code 3 months later and go "where did *that* come from, I can see it is attached to the window object.
$("#unicorn_powerd_div").someFunctionThatGrowsMagicUnicorns(window.varIWantToPassAround);