web-animations / web-animations-js-legacy

The original emulator of the Web Animations specification. Please use web-animations-js instead:
https://github.com/web-animations/web-animations-js
Apache License 2.0
707 stars 84 forks source link

Error: "attempt to decompose non-normalized matrix" #644

Closed fr0 closed 9 years ago

fr0 commented 10 years ago

I'm getting this error from web-animations-js as a result of animating an element from { opacity: "1", transform: "none" } to { opacity: "0", transform: "scale(2)" }. The code in question works fine using the actual element.animate (i.e. not the polyfill) in Chrome 38.0.2125.101.

alancutter commented 9 years ago

This appears to be working as expected now. Tested in Firefox:

<!DOCTYPE html>
<script src="web-animations.dev.js"></script>
<style>
#test {
  background: blue;
  width: 100px;
  height: 100px;
}
</style>
<div id="test"></div>
<script>
function main() {
  test.animate([
    {opacity: 0, transform: 'none'},
    {opacity: 1, transform: 'scale(2)'},
  ], 1000);
}
window.addEventListener('load', main);
</script>