fade in fade out patch

bernardo's picture

a simple patch to fade in and fade out in javascript

PreviewAttachmentSize
fadeInFadeOut.qtz4.45 KB

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

gtoledo3's picture
Cool... to anyone else

Cool... to anyone else reading this that may like a head's up on related ideas (though many are sure to already know of this)... "fade smoothly" and "double click," from the developer folder, immediately kind of come to mind when seeing this, and are really useful. This is a cool macro, thanks for posting it!

leegrosbauer's picture
Looks broadly useful

Thanks Bernardo!

You know, this looks to me like it might be quite widely applied. It seems like the javascript fader output could be used for a boolean-related interaction with just about any variable Number input port?

Am I assessing this correctly? If so, I suspect it will be very handy. Last week, I was looking for just this type of interaction, in fact. I'll be testing this out tomorrow. Thanks again!

psonice's picture
Fade in/out (no javascript)

Modified slightly to use a smooth patch instead of javascript (this is the way I normally do it). It should be a bit faster without javascript.

As a side note, this is also very handy for cross-fading. Just connect the fade value to a dissolve transition instead of the colour patch, and you can cross fade between say effects and titles with variable speed.

PreviewAttachmentSize
fadeInFadeOut2.qtz3.79 KB

psonice's picture
forgot..

Oh, for efficiency: If you're using it to fade in + out the way I've done it there with the sprite (i.e. when it's faded out the sprite is totally invisible) then also connect the fade value to the 'enable' input of the sprite or whatever. Then when it's faded out, it will be disabled too so it will save rendering time.

leegrosbauer's picture
good

These patches and references will be very handy. Salut to all!

justints's picture
Re: Fade in/out (no javascript)

Ohhhh this is excellent. I was building a Javascript thing and found this link. Hi-jacking the smoother to interpolate between boolean values is a totally awesome solution. Really useful. Thanks.