Replies: 2 comments
-
With the 100 animations it works:
Is it ok, or is there anything better that does not requires 100 animations? |
Beta Was this translation helpful? Give feedback.
-
Animations state is better used for multiple animations than a single one. Sometimes it's not even useful. Always first understand and describe your animations (to yourself/comments in code). Sounds like a funny thing, but it keeps you straight on what you want and makes it clear when you ask for help. I am going to do that based on what I see your code above is attempting.
each animation only needs one animation channel usually. Think of channels as timelines for the animation, and if it all fits in one timeline, use only one animation channel. What you describe only needs one.
Then start your specific animation passing the animation update routine (in your case a lambda)
|
Beta Was this translation helpful? Give feedback.
-
I have a chain of 100 WS2812 LED.
With this code I create a "rainbow" effect along the whole chain:
Now, say I want to fade from off (lum = 0) to the target lum, where each LED has the above target hue.
And, viceversa, fade to off the chain.
From my understanding I should use 100 AnimationState, since each one should be initialized with the correct hue.
Is it correct or is there a smarter way to do this with a good LinearBlend implementation?
Beta Was this translation helpful? Give feedback.
All reactions