PolymerElements / neon-animation

Polymer + Web Animations
https://www.webcomponents.org/element/PolymerElements/neon-animation
143 stars 98 forks source link

Support multiple animations for entryAnimation and exitAnimation #154

Open motss opened 8 years ago

motss commented 8 years ago

Wouldn't it be much easier if entryAnimation and exitAnimation support multiple animations just like something in app-scroll-effects where we can just add multiple animation names instead of using animationConfig? WDYT?

For instance,

<neon-animated-pages entry-animation="slide-from-bottom-animation fade-in-animation" exit-animation="slide-down-animation fade-out-animation">
</neon-animated-pages>
samuelli commented 8 years ago

I'm not sure if its really possible to do this since they all have different (perhaps conflicting effects). eg. two of them animate opacity or multiple of them animate transform differently. Since only one animation can run per CSS property, this might not be feasible.

dstoc commented 8 years ago

It's possible. It would follow the same model as regular web animations, where all of the animations would run, but depending on the compositing mode, only the last affecting a particular property might be visible.