ffd8 / P5LIVE

p5.js collaborative live-coding vj environment!
https://p5live.org
GNU General Public License v3.0
229 stars 35 forks source link

feature: don't erase canvas during recompile #19

Closed osresearch closed 5 years ago

osresearch commented 5 years ago

It would be nice for some performance to not have the canvas erased during a recompile. This might require hacking on the underlying p5 code to preserve the canvas if it exists.

ffd8 commented 5 years ago

Right now I'm developing a 'soft recompile', so that if you only make changes to the draw() function, it will simply inject those changes into the draw() of the iFrame, avoiding that momentary flash of a background..! I ran into the issue of that flash at the last VJ event I did. Any other changes, to setup/global etc– would require a complete recompile to get those variables etc. No major hacking of p5 necessary.. luckily figured out how to do it by appending to the iFrame. Update coming soon as I do further tests and make sure it's working for COCODING mode.

Here's a demo (as I just started developing this feature a couple days ago): https://www.instagram.com/p/B0UCtnrCw_Z/