You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently you just define the animation properties like scale or opacity etc. in the root config object which also contains other not related properties for options like autoplay and targets etc.
This can be a bit dangerous. Because property-name collisions.
Simple example:
varbattery={charged: '0%',cycles: 120,duration: 42}anime({targets: battery,charged: '100%',cycles: 130,round: 1,easing: 'linear'});// How to animate "duration" from the battery object without passing the pre-defined props "duration" of Anime?
Maybe not the best example, but collisions with this design is possible.
Should be something like this:
Looks like that now there is 0 info in console. If lib will migrating to ts - this case will be solve in linting IDE level. But idea with props - nice.
Uh oh!
There was an error while loading. Please reload this page.
Currently you just define the animation properties like
scale
oropacity
etc. in the root config object which also contains other not related properties for options likeautoplay
andtargets
etc.This can be a bit dangerous. Because property-name collisions.
Simple example:
Maybe not the best example, but collisions with this design is possible.
Should be something like this:
"props" or "properties" or "keys" or "animate" or whatever...
Or is this already possible? Wrapping the properties to animate in another scope to prevent collisions with pre-defined options.
animejs@3.2.0
The text was updated successfully, but these errors were encountered: