ZestKit
ZestKit copied to clipboard
ITween - adds tween offsetting
This is very simple but rather usable change allowing to dynamically offset tweened values. It's usable when adding some more dynamic behaviour to tweened object by adding e.g. noise, and allows more advanced tween compositions: just implement your own TweenTarget and call setOffset() on original tween in e.g. Update with your target value - the resulting tweening will be additive composition of the original and your target tween. ( the tweened values types should be also the same -
Only ITween interface is modified in this PR - it should probably be available also on AbstractTweenable and this whole composition thing should be probably more generic / easier to set up to be proper ZestKit 'feature'.
note: not entirely sure about additive properties of Quaternions and Color, Color32, esp. in case of color types adding values should be in proper color space and not simple arithmetic addition.
Feel free to rename/tidy up/change or rip apart :) -- I tried to choose proper level of abstraction but maybe it is doable in a better way.