Re: [css-houdini-drafts] Mechanism to pause an animation

_From @flackr on April 18, 2017 8:0_

I think each instance has its own timelines, since the registered timeline list only specifies how to construct the timelines but doesn't contain actual constructed timelines.

Another idea I had was to create a mutable timeline list that animate can add to / remove from. An animator could then remove the document timeline and readd when it was needed again.
e.g.
```js
animate(elementMap, timelines) {
  // do stuff
  if (done) {
    timelines.pop();
    // animate will no longer be called every frame, only when
    // some other input has changed.
  } else if (timelines.length == 0) {
    timelines.push(new DocumentTimeline());
  }
}

-- 
GitHub Notification of comment by majido
Please view or discuss this issue at https://github.com/w3c/css-houdini-drafts/issues/808#issuecomment-417053260 using your GitHub account

Received on Wednesday, 29 August 2018 18:17:49 UTC