Saturday, December 28, 2019

processing tips, and mourning java on the clientside web

 I follow the tumblr For Your Processing and they linked to an old 25 Life Saving Processing Tips article - I should really get better at knowing when to use noise() not random().

Playing with processing vs it javascript cousin p5 and trying to replicate a "persistence of vision" toy (a Disney's Frozen branded fan that used a strip of LEDs to make animations as the fan spun) I was reminded how much faster the Java stuff could run vs the p5 - Processing can easily get into 4-digit FPS, a p5 thing seems to max out around 60. (So in the case of replicating persistence of vision, it was better to use that "draw a semi-opaque rectangle over the last frame instead of erasing it" trick the Tips article mentions.)

But of course, Processing sketches can no longer be readily shared on the web, which is deeply sad. While I know applets never looked liked a piece of the native web, always a bit janky in terms of colors or fonts, I will never quite understand why the applet sandbox couldn't be made as safe as the javascript sandbox and so was always considered a security risk - javascript is so tightly woven into the browser, it feels like it would be tougher to get make sure it was secure and isolated from any weird overflow attacks or what not.

Similar argument for Flash, come to think of it. Flash artists were doing things decades ago that dynamic web people still struggle to replicate. (Of course when it came to UI for a site,  Flash was usually a lesson in "just because you can doesn't mean you should")

So many artists who want so share the work often have to export to GIF (which is kind of hilariously old and inefficient come to think about it - plus the format heavily favors things where the art can be made to smoothly loop. Anyway low-sugar-eye-candy is one of the best of that form...

No comments:

Post a Comment