Many times a mechanism to extend or remove a node’s features is desired. For example, count:
- The most basic case suitable for most applications:
INC and RST only
- Next stage:
STEP, INC, RST
- Further:
STEP, INC, DEC, RST
- Yet further few steps (maybe):
STEP, INC, DEC, MIN, MAX, SNAP, INIT, RST
A possible UX is to drag a border like for a variadic. But how one would craft such node? In many times a shorter version might have a much more performant C++ implementation by the way.
One possible solution with high backward compatibility:
- For each “increment” create a new patch node:
count(one), count, count(dec), count(slider)
- Each simpler node is a trivial thin wrapper around one of the more complex nodes; at this point, they are usable on their own as usual
- Place a new
upgradable (name?) marker onto each simpler node
The presence of the marker makes the node’s border draggable. Dragging to the right effectively replaces the current node with the node used for wrapping. For example, count(dec) becomes count(slider).
Dragging to the left is inferred.
Applicable to
flip-flop(sr), flip-flop
equal, equal(approx)
clock(t), clock
continuously → loop, loop(en)
debounce, debounce(rst)
fade, fade(jump)
gate, branch
format-number, format-number(dig), format-number(ex)
button, button(upd) and all similar
Many times a mechanism to extend or remove a node’s features is desired. For example,
count:INCandRSTonlySTEP,INC,RSTSTEP,INC,DEC,RSTSTEP,INC,DEC,MIN,MAX,SNAP,INIT,RSTA possible UX is to drag a border like for a variadic. But how one would craft such node? In many times a shorter version might have a much more performant C++ implementation by the way.
One possible solution with high backward compatibility:
count(one),count,count(dec),count(slider)upgradable(name?) marker onto each simpler nodeThe presence of the marker makes the node’s border draggable. Dragging to the right effectively replaces the current node with the node used for wrapping. For example,
count(dec)becomescount(slider).Dragging to the left is inferred.
Applicable to
flip-flop(sr),flip-flopequal,equal(approx)clock(t),clockcontinuously→loop,loop(en)debounce,debounce(rst)fade,fade(jump)gate,branchformat-number,format-number(dig),format-number(ex)button,button(upd)and all similar