Closed hansemannn closed 4 years ago
We have some callbacks for animation end that we can probably flesh out into a full listener. If there's a use case for tighter callbacks, I don't see why we'd be opposed to adding it in- go ahead!
+1 This was very useful 👍
Thanks! I have something working, but will require a bit more resources to test it properly. Current delegates:
- (void)vectorLayer:(KFVectorLayer *)vectorLayer didStartAnimation:(CAAnimation *)animation;
- (void)vectorLayer:(KFVectorLayer *)vectorLayer didStopAnimation:(CAAnimation *)animation;
- (void)vectorLayer:(KFVectorLayer *)vectorLayer didResumeAnimation:(CAAnimation *)animation;
We might want to add some userInfo
there as well, so the developer can identify the animation more easy.
I don't want to call something on every frame if avoidable. I've been thinking about integrating Adobe After Effects markers into callbacks. That way you'll get a call back with the name of the current marker whenever that changes. That could let you trigger specific interactivity like looping or randomizing animation segments without having to manually keep track of frame numbers manually
@subtleGradient 100 % agree. We need a real world use-case before exposing something from the scratch. The markers make sense, maybe some additional states as well. Please feel free to do it instead of you feel you have an idea that needs to leave your head 🤓
Not 100 % sure if that's available already, but we should create a delegate (iOS) / listener (Android) to notify the developer who implements the delegate / listener about the current progress. Is there an interest on this functionality? Then I'd implement it. 🚀