Preset op and opacity for div


I’m experimenting with an idea for a friend.
The ‘preset’ op is a game changer. Thanks cables team.

My patch:
When the explode slider reaches 1, I want to make a div element visible. (There is one in my 3d scene) There will be more than 1.
The visibility of a div element is a togglebool. How do I add that value to my second preset? I tried to look at the patch example that fades a div element in, but my logic is not working.

Another question regarding the preset op. Is there a way that one can remove a preset value that was added to the preset op?


Hi HarryX,
Firstly great work with getting so far already with your patch.
So I added a few things to your patch
The slider now go’s between 0-2
We make the number an integer with the floor op
We then use compare numbers. if equal to 1 then output a 1
Then number to bool
Just look at the patch I added some comments :wink:
Slide it from 0 to 1 then from 1 to 2

Deleting a preset is easy
1- pick the preset you want to delete with the dopdown
2-click delete


Thanks Andro.

I saw your comments and additions. It is a great help. Now I can complete the demo.

I know how to delete a preset, but I don’t know how to delete an individual element added to the preset.

Hi @andro

I was looking at the work you did in my patch with regards to the fade in and out of the divs. I did not understand the boolToNumber op. When I remove it from the workflow, it still renders the same as with it? Is there a reason for its inclusion that I don’t understand yet?

Hi Harry,
This is more of a javascript thing with how bools/numbers are handled.
I just like to enforce clear types in a patch so it’s more of a personal thing.