Yellow-Dog-Man / Resonite-Issues

Issue repository for Resonite.
https://resonite.com
125 stars 2 forks source link

ProtoFlux Node: Swap two values based on a boolean #1517

Open JackTheFoxOtter opened 4 months ago

JackTheFoxOtter commented 4 months ago

Is your feature request related to a problem? Please describe.

Currently, it's not super elegant to swap two values / objects based on a boolean. The closest thing is the conditional operator, but that only outputs the "true" value, so you'd need at least two if you want to have a full "swap" of values.

Describe the solution you'd like

I have two ideas for this:

Personally since the functionality is so similar I'd think the second option might be the better one.

Describe alternatives you've considered

Using two conditional nodes. This isn't a big deal, it would just be a minor quality-of-life improvement.

Additional Context

No response

Requesters

No response

Zyzyl commented 4 months ago

As another alternative, I think a construct using ZeroOne and Demultiplex isn't too bad for this: image

JackTheFoxOtter commented 4 months ago

Smart. Yeah that works too as an alternative!