-
Notifications
You must be signed in to change notification settings - Fork 32
Description
This is a request/proposal, and I wanted to get some advice for this before I take a look at possibly contributing a change myself.
My goal right now, is to allow gradient effects to animate their colors.
However, I think if I go down this road, it would make sense to allow any effect uniforms to have the ability to define their own animations calculations.
My proposal is to add an animate function to the ShaderEffectUniform. The definition would be something like:
animate?: (start: T, end: T, progress) => T
This would (in theory) allow any uniform to define how the values are to be interpolated. eg. allowing a number[] to be animated
Of course, the current method would be a backup for any uniform that does not define this property.
Ideally, if this works out, then I think it could be useful to allow animations on many style and shader properties that are not just single numbers, and enable custom effects to define their own interpolation as well.