W3C home > Mailing lists > Public > public-css-archive@w3.org > December 2017

Re: [csswg-drafts] [web-animations-2] Idea: Custom Effects

From: Brian Birtles via GitHub <sysbot+gh@w3.org>
Date: Tue, 05 Dec 2017 04:44:30 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-349194066-1512449069-sysbot+gh@w3.org>
_From @Martin-Pitt on August 2, 2016 21:16_

Any particular reason why the API can't be like this instead?

``` javascript
var node = new JavaScriptEffect(function(timeFraction) {
  // When animating, timeFraction is from 0.0 to 1.0
  // When null, WAAPI is telling us to 'cleanup', e.g. fill: 'none' = unset element style for example when animation is complete
}, timingOptions);

var animation = new Animation(node, document.timeline);

I always felt this was a clean and direct way to go about things, kind of like a Promise. It makes no assumptions. You could be rendering to the Web Audio API or via Web Bluetooth to some custom hardware – animate the world!

GitHub Notification of comment by birtles
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2063#issuecomment-349194066 using your GitHub account
Received on Tuesday, 5 December 2017 04:44:44 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:21 UTC