Fusion
Fusion copied to clipboard
Allow T everywhere we publicly accept StateObject<T>
Right now, the last remaining pain point when dealing with things that are sometimes state objects, is that things like Observer will error if you pass it something that isn't a state object.
I propose that Fusion relaxes this restriction and allows for constant values to be interpreted identically to a state object that never changes value (i.e. onChange never runs, onBind runs once only, Spring always aims at that value, Tween never moves from that value, etc...)
This helps remove yet another hurdle preventing most code from dealing with CanBeState rather than requiring StateObject types.
This idea extends to Tween and Spring objects, too. Updating post to match.