Crop-calculator javascript
-
Here's a chunk of javascript I'm using to calculate the values for Isadora croppers based on a zoom meeting.
I call it for each number of participants from 1 to the max, feeding them into globals for each number of them.
I found a few algorithms around the web that worked pretty well, so I combined them and made a simple javascript version. I originally had written an OSC handler to do this, but then realized by making a straight javascript version, it could all happen directly in izzy.
Used this in cooperation with lots of routers and selectors and ZoomOSC to make a User Actor that is a simple list of the full cast, so I can do layouts by just taking the output of the cast and placing them around the screen.
After the show this weekend, I'll try to write up and share the whole set up.
-
I realized, the javascript alone might not be as helpful without the izzy file showing how to set it up to get all the global vals set accordingly.
-
I wanted to give credit appropriately. This was in a comment in the code but wanted to mention this article that gave me the core algorithm:
-
-
@peuclid Really glad to see this turned out so well! Great work.
-
Great work!
Please consider putting this on our Plugin Page (it's also for patches and any downloadables really). It makes it much easier to find in future because threads like these eventually get pushed deeper and deeper into the forum as new posts get made, but the plugin page is purpose-built for users to upload downloadable content for others.
Best wishes,
L Wilson-Spiro
-
Thanks. I'll add to the plug-ins, probably this weekend. I'll want to make a little how-to video since it might not be obvious how to use it.
Also, since I built upon the work shared by @frank522 in his showcase, I'll want to share how simple it is to make scenes from zoom participants. I'm excited about it.