hydra-synth / hydra

Livecoding networked visuals in the browser
https://hydra.ojack.xyz
GNU Affero General Public License v3.0
2.17k stars 264 forks source link

"Make random changes" button breaks initVideo #230

Open milangress opened 1 year ago

milangress commented 1 year ago

the "make random changes" button in the editor sometimes breaks functions that use text like initVideo and initImage

that results in values like:

s0.initVideo(NaN);

I guess if the value is not a number then it should not changes it?

flordefuego commented 1 year ago

what about just commenting s0.initVideo() once it's loaded? If you want to play with random button for live, once image it's loded I guess you don't need to call that function everytime

geikha commented 1 year ago

nah but it makes sense to try and make some exceptions if the randomizer code allows it. I'll look into it for a bit during the week. nice catch

milangress commented 1 year ago

Thanks, Flor for the idea of the quick fix! It helps. But I had the case when I was sending students code and asked them to explore it, so I would also like to reduce the complexity a bit for people with less coding experience. So a change to the randomizer code would be appreciated :)