Anime: Animating numeric values with an exponent removes the exponent

Created on 6 Mar 2019  路  1Comment  路  Source: juliangarnier/anime

Describe the bug
When you animate a property to a numeric value with an exponent, anime ignores the exponent part. This makes it completely impossible to animate THREE.js Quaternions, or any value that's more than a few orders of magnitude larger or smaller than 1.
To Reproduce

const obj = {x: 0}
await anime({targets: obj, x: 6.123233995736766e-17}).finished
console.log(obj.x) // logs 6.123233995736766

Note the lack of e-17.
6.123233995736766 and 6.123233995736766e-17 are completely different numbers (by 17 orders of magnitude!)
Expected behavior
obj.x is 6.123233995736766e-17
Screenshots
N/A
Desktop (please complete the following information):

  • OS: Windows, MacOS, Linux
  • Browser: Chrome & Safari
  • Version: Chrome 71, Safari 12

Smartphone (please complete the following information):

  • Device: iPhone X, Pixel 2, Galaxy S7, every phone I test
  • OS: iOS 12, Android 9, Android 8
  • Browser: Safari, Chrome, Samsung Internet
  • Version: Most recent

Most helpful comment

If anyone else runs into this issue before my PR is merged, I've published a fixed version as "@arilotter/animejs" 3.0.2

>All comments

If anyone else runs into this issue before my PR is merged, I've published a fixed version as "@arilotter/animejs" 3.0.2

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jackedgson picture jackedgson  路  3Comments

gaou-piou picture gaou-piou  路  3Comments

DavudSafarli picture DavudSafarli  路  5Comments

littlee picture littlee  路  3Comments

trusktr picture trusktr  路  6Comments