Thanks Carl, you are right, my CodePen lacks any good explanation and is not easy to understand. Sorry about that.
I just created a new, much more shortened one, available here:
http://codepen.io/rzschoch/pen/RRrmBB?editors=1010
What I want to achieve is a morphing animation between keyframes that are defined in an SVG. For this testcase I simplified the available keyframes to only 3. Later on there will be at least 3 variants for each keyframe.
The desired effect is a new morphing animation from the beginning, while the old is not yet completed. This effect should repeat with changing keyframes while a specific condition is fulfilled. I hope to achieve a nearly randomized morphing effect when there are enough keyframes available in the SVG.
A description of my intended sequence as seen in the CodePen:
a new timeline including a morphing tween between keyframes (SVG elements) is added at position 0 in the main timeline (line 29) the main timeline starts playing (line 37) the new child timeline triggers the creation of another new timeline at a specific time (line 16), starting at the current playhead time (line 25) of the main timeline a completed timeline on the main timeline should be removed, as it is not needed anymore (line 10) / Here I have no idea what the best way would be?
And here are my questions:
Does my approach make sense? Why are the new child timelines not visible and playing like the first one? How can I remove a completed child timeline?
Makes more sense now? Thanks a lot for your time and patience.