[web-animations] Physics-based animation?

Hi Cheng,

Please note that the web-animations-changes mailing list is a low-volume
list to notify people of changes to the web animations polyfill. I've
replied to public-fx@w3.org, which is a good forum for feature requests and
comments about the web animations API.

Physics APIs tend to operate frame-by-frame - see for example box2d[1]. In
other words, a complex simulation engine drives the position of slaved
elements, and element changes are caused by updating those elements'
physical parameters.

There is no fundamental reason why this sort of technique can't coexist
with Web Animations. One approach is to set up and pause animations that
drive position and rotation, then update progress through those animations
by setting the player's currentTime.

If the use cases and developer desire for a physics API grows to the point
where we wish to provide native physics support on the web platform, we can
also provide a 'physics' objects that acts as a player for multiple
animations. This would closely mimic the approach described above and also
allow the developer to choose the mapping between physical output and
animated result, while still maintaining an understanding of how to smooth
out animations when the time delta is large.

Cheers,
    -Shane

[1] http://www.box2d.org/manual.html#_Toc258082976

On Tuesday, April 22, 2014, Cheng Lou <chenglou92@gmail.com> wrote:

> Will this ever be considered? I'm worried about this currently because
> judging from the proposed API, this whole category of animations doesn't
> seem to fit in very well.
>
> --
> You received this message because you are subscribed to the Google Groups
> "web-animations-changes" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to web-animations-changes+unsubscribe@googlegroups.com<javascript:_e(%7B%7D,'cvml','web-animations-changes%2Bunsubscribe@googlegroups.com');>
> .
> For more options, visit https://groups.google.com/d/optout.
>

Received on Tuesday, 22 April 2014 07:22:30 UTC